From e5a83d7c3eb01832c242070a1ef1a36d927512db Mon Sep 17 00:00:00 2001 From: andreasohlund Date: Mon, 8 Nov 2010 20:55:31 +0100 Subject: [PATCH] Fixed crlf --- .gitignore | 36 +- AllProjects-NotForBuilding-SeeReadme.sln | 1322 +- RunMeFirst.bat | 4 +- Samples/AsyncPages/AsyncPages.sln | 72 +- Samples/AsyncPages/Messages/Command.cs | 20 +- Samples/AsyncPages/Messages/ErrorCodes.cs | 16 +- Samples/AsyncPages/Messages/Messages.csproj | 188 +- .../Messages/Properties/AssemblyInfo.cs | 70 +- Samples/AsyncPages/Server/App.config | 38 +- .../Server/CommandMessageHandler.cs | 48 +- Samples/AsyncPages/Server/MessageEndpoint.cs | 16 +- .../Server/Properties/AssemblyInfo.cs | 66 +- Samples/AsyncPages/Server/Server.csproj | 228 +- .../AsyncPages/WebApplication1/Default.aspx | 42 +- .../WebApplication1/Default.aspx.cs | 42 +- .../WebApplication1/Default.aspx.designer.cs | 104 +- .../AsyncPages/WebApplication1/Global.asax | 2 +- .../AsyncPages/WebApplication1/Global.asax.cs | 60 +- .../Properties/AssemblyInfo.cs | 70 +- .../Properties/Settings.Designer.cs | 52 +- .../Properties/Settings.settings | 8 +- .../WebApplication1/WebApplication1.csproj | 254 +- .../WebApplication1.csproj.user | 54 +- Samples/AsyncPages/WebApplication1/web.config | 192 +- .../AzureFullDuplex/AzureFullDuplex.ccproj | 146 +- .../AzureFullDuplex.ccproj.user | 30 +- Samples/AzureFullDuplex/AzureFullDuplex.sln | 76 +- .../AzureFullDuplex/OrderService/App.config | 50 +- .../OrderService/EndpointConfiguration.cs | 10 +- Samples/AzureFullDuplex/OrderService/Host.cs | 10 +- .../SubmitOrderMessageHandler.cs | 62 +- .../OrderService/OrderService.csproj | 196 +- .../OrderService/Properties/AssemblyInfo.cs | 72 +- .../OrderService/WorkerRole.cs | 198 +- .../AzureFullDuplex/OrderWebSite/Default.aspx | 112 +- .../OrderWebSite/Default.aspx.cs | 72 +- .../OrderWebSite/Default.aspx.designer.cs | 102 +- .../AzureFullDuplex/OrderWebSite/Global.asax | 2 +- .../OrderWebSite/Global.asax.cs | 74 +- .../OrderWebSite/OrderWebSite.csproj | 262 +- .../OrderWebSite/OrderWebSite.csproj.user | 54 +- .../OrderWebSite/Properties/AssemblyInfo.cs | 70 +- .../AzureFullDuplex/OrderWebSite/Web.config | 46 +- .../AzureFullDuplex/OrderWebSite/WebRole.cs | 72 +- .../ServiceConfiguration.cscfg | 74 +- .../AzureFullDuplex/ServiceDefinition.csdef | 70 +- Samples/AzurePubSub/AzurePubSub.ccproj | 146 +- Samples/AzurePubSub/AzurePubSub.ccproj.user | 30 +- Samples/AzurePubSub/AzurePubSub.sln | 76 +- .../MyMessages/LoadOrdersMessage.cs | 16 +- .../MyMessages/LoadOrdersResponseMessage.cs | 48 +- .../AzurePubSub/MyMessages/MyMessages.csproj | 118 +- Samples/AzurePubSub/MyMessages/Order.cs | 84 +- .../AzurePubSub/MyMessages/OrderMessage.cs | 22 +- Samples/AzurePubSub/MyMessages/OrderStatus.cs | 16 +- .../MyMessages/OrderUpdatedEvent.cs | 16 +- .../MyMessages/Properties/AssemblyInfo.cs | 72 +- Samples/AzurePubSub/OrderService/App.config | 52 +- .../OrderService/EndpointConfiguration.cs | 10 +- .../OrderService/EndpointInitialisation.cs | 24 +- Samples/AzurePubSub/OrderService/Host.cs | 10 +- .../LoadOrdersMessageHandlers.cs | 52 +- .../MessageHandlers/OrderMessageHandler.cs | 76 +- Samples/AzurePubSub/OrderService/OrderList.cs | 124 +- .../OrderService/OrderService.csproj | 202 +- .../OrderService/Properties/AssemblyInfo.cs | 72 +- .../AzurePubSub/OrderService/WorkerRole.cs | 198 +- Samples/AzurePubSub/OrderWebSite/Default.aspx | 116 +- .../AzurePubSub/OrderWebSite/Default.aspx.cs | 92 +- .../OrderWebSite/Default.aspx.designer.cs | 102 +- Samples/AzurePubSub/OrderWebSite/Global.asax | 2 +- .../AzurePubSub/OrderWebSite/Global.asax.cs | 74 +- .../LoadOrdersResponseMessageHandler.cs | 26 +- .../OrderUpdatedEventHandler.cs | 40 +- .../OrderWebSite/OrderWebSite.csproj | 260 +- .../OrderWebSite/OrderWebSite.csproj.user | 54 +- .../OrderWebSite/Properties/AssemblyInfo.cs | 70 +- Samples/AzurePubSub/OrderWebSite/Web.config | 48 +- Samples/AzurePubSub/OrderWebSite/WebRole.cs | 78 +- .../AzurePubSub/ServiceConfiguration.cscfg | 80 +- Samples/AzurePubSub/ServiceDefinition.csdef | 74 +- Samples/AzureSagas/Barista/App.config | 62 +- Samples/AzureSagas/Barista/Barista.csproj | 212 +- .../Barista/BaristaMessageHandler.cs | 142 +- Samples/AzureSagas/Barista/BaristaRegistry.cs | 36 +- Samples/AzureSagas/Barista/BaristaSagaData.cs | 40 +- Samples/AzureSagas/Barista/Bootstrapper.cs | 116 +- Samples/AzureSagas/Barista/Disposable.cs | 90 +- .../Barista/MessageSubscriptions.cs | 96 +- Samples/AzureSagas/Barista/Program.cs | 58 +- .../Barista/Properties/AssemblyInfo.cs | 72 +- .../Barista/StarbucksBarista.Designer.cs | 148 +- .../AzureSagas/Barista/StarbucksBarista.cs | 104 +- .../AzureSagas/Barista/StarbucksBarista.resx | 240 +- .../Barista/ViewData/DeliverOrderView.cs | 34 +- .../Barista/ViewData/OrderIsDoneView.cs | 28 +- .../Barista/ViewData/PrepareOrderView.cs | 38 +- Samples/AzureSagas/Cashier/App.config | 58 +- Samples/AzureSagas/Cashier/Bootstrapper.cs | 86 +- Samples/AzureSagas/Cashier/Cashier.csproj | 208 +- .../Cashier/CashierMessageHandler.cs | 154 +- Samples/AzureSagas/Cashier/CashierRegistry.cs | 28 +- Samples/AzureSagas/Cashier/CashierSagaData.cs | 38 +- Samples/AzureSagas/Cashier/Program.cs | 48 +- .../Cashier/Properties/AssemblyInfo.cs | 72 +- .../Cashier/StarbucksCashier.Designer.cs | 148 +- .../AzureSagas/Cashier/StarbucksCashier.cs | 112 +- .../AzureSagas/Cashier/StarbucksCashier.resx | 240 +- .../ViewData/CustomerRefusesToPayView.cs | 42 +- .../Cashier/ViewData/NewOrderView.cs | 38 +- .../ViewData/ReceivedFullPaymentView.cs | 38 +- .../CashierContracts/CashierContracts.csproj | 116 +- .../AzureSagas/CashierContracts/DrinkSize.cs | 18 +- .../CashierContracts/NewOrderMessage.cs | 44 +- .../PaymentCompleteMessage.cs | 32 +- .../CashierContracts/PaymentMessage.cs | 36 +- .../CashierContracts/PrepareOrderMessage.cs | 44 +- .../Properties/AssemblyInfo.cs | 72 +- Samples/AzureSagas/Customer/App.config | 56 +- Samples/AzureSagas/Customer/Bootstrapper.cs | 112 +- Samples/AzureSagas/Customer/Customer.csproj | 206 +- .../Customer/CustomerOrder.Designer.cs | 290 +- Samples/AzureSagas/Customer/CustomerOrder.cs | 92 +- .../AzureSagas/Customer/CustomerOrder.resx | 240 +- .../AzureSagas/Customer/CustomerRegistry.cs | 26 +- Samples/AzureSagas/Customer/Program.cs | 48 +- .../Customer/Properties/AssemblyInfo.cs | 70 +- .../CustomerContracts.csproj | 114 +- .../CustomerContracts/OrderReadyMessage.cs | 36 +- .../PaymentRequestMessage.cs | 40 +- .../Properties/AssemblyInfo.cs | 72 +- Samples/AzureSagas/Starbucks.sln | 178 +- Samples/AzureSagas/TimeoutManager/App.config | 52 +- .../AzureSagas/TimeoutManager/Bootstrapper.cs | 84 +- Samples/AzureSagas/TimeoutManager/Program.cs | 52 +- .../TimeoutManager/Properties/AssemblyInfo.cs | 72 +- .../Properties/Resources.Designer.cs | 126 +- .../TimeoutManager/Properties/Resources.resx | 232 +- .../Properties/Settings.Designer.cs | 52 +- .../Properties/Settings.settings | 14 +- .../StarbucksTimeoutManager.Designer.cs | 148 +- .../TimeoutManager/StarbucksTimeoutManager.cs | 46 +- .../StarbucksTimeoutManager.resx | 238 +- .../TimeoutManager/TimeoutManager.csproj | 218 +- .../TimeoutManager/TimeoutManager.csproj.user | 10 +- .../TimeoutManager/TimeoutRegistry.cs | 28 +- Samples/Encryption/Client/App.config | 54 +- Samples/Encryption/Client/Client.cs | 68 +- Samples/Encryption/Client/Client.csproj | 248 +- .../Client/Properties/AssemblyInfo.cs | 72 +- Samples/Encryption/Encryption.sln | 64 +- .../Messages/MessageWithSecretData.cs | 18 +- Samples/Encryption/Messages/Messages.csproj | 202 +- .../Messages/Properties/AssemblyInfo.cs | 72 +- Samples/Encryption/Server/App.config | 48 +- .../Server/Properties/AssemblyInfo.cs | 72 +- Samples/Encryption/Server/Server.cs | 48 +- Samples/Encryption/Server/Server.csproj | 248 +- Samples/FaultHandling/FaultHandling.sln | 72 +- Samples/FaultHandling/MyClient/App.config | 128 +- .../FaultHandling/MyClient/ClientEndpoint.cs | 118 +- .../MyClient/DataResponseMessageHandler.cs | 38 +- .../FaultHandling/MyClient/EndpointConfig.cs | 32 +- .../FaultHandling/MyClient/MyClient.csproj | 190 +- Samples/FaultHandling/MyMessages/Messages.cs | 34 +- .../MyMessages/MyMessages.csproj | 118 +- Samples/FaultHandling/MyServer/App.config | 54 +- .../FaultHandling/MyServer/EndpointConfig.cs | 28 +- .../FaultHandling/MyServer/MyServer.csproj | 164 +- .../MyServer/RequestDataMessageHandler.cs | 58 +- Samples/FtpSample/FtpSample.sln | 64 +- Samples/FtpSample/TestClient/App.config | 54 +- .../FtpSample/TestClient/ClientEndpoint.cs | 84 +- .../FtpSample/TestClient/EndpointConfig.cs | 46 +- .../TestClient/Properties/AssemblyInfo.cs | 72 +- .../FtpSample/TestClient/TestClient.csproj | 164 +- .../TestClient/TestClient.csproj.user | 12 +- Samples/FtpSample/TestMessage/FtpMessage.cs | 32 +- Samples/FtpSample/TestMessage/FtpReply.cs | 34 +- .../TestMessage/Properties/AssemblyInfo.cs | 72 +- .../FtpSample/TestMessage/TestMessage.csproj | 116 +- Samples/FtpSample/TestServer/App.config | 64 +- .../FtpSample/TestServer/EndpointConfig.cs | 42 +- .../FtpSample/TestServer/FtpMessageHandler.cs | 58 +- .../TestServer/Properties/AssemblyInfo.cs | 72 +- .../FtpSample/TestServer/TestServer.csproj | 160 +- .../TestServer/TestServer.csproj.user | 12 +- Samples/FullDuplex/MyClient/App.config | 46 +- Samples/FullDuplex/MyClient/ClientEndpoint.cs | 104 +- .../MyClient/DataResponseMessageHandler.cs | 46 +- Samples/FullDuplex/MyClient/EndpointConfig.cs | 10 +- Samples/FullDuplex/MyClient/MyClient.csproj | 160 +- .../MyClient/Properties/AssemblyInfo.cs | 66 +- Samples/FullDuplex/MyMessages/Messages.cs | 34 +- .../FullDuplex/MyMessages/MyMessages.csproj | 120 +- .../MyMessages/Properties/AssemblyInfo.cs | 70 +- Samples/FullDuplex/MyServer.Tests/App.config | 10 +- .../MyServer.Tests/MyServer.Tests.csproj | 162 +- .../MyServer.Tests/Properties/AssemblyInfo.cs | 72 +- Samples/FullDuplex/MyServer.Tests/Tests.cs | 54 +- Samples/FullDuplex/MyServer/App.config | 44 +- Samples/FullDuplex/MyServer/EndpointConfig.cs | 10 +- Samples/FullDuplex/MyServer/MyServer.csproj | 162 +- .../MyServer/Properties/AssemblyInfo.cs | 66 +- .../MyServer/RequestDataMessageHandler.cs | 72 +- Samples/FullDuplex/RequestResponse.sln | 84 +- Samples/GenericHost/GenericHost.sln | 64 +- Samples/GenericHost/Logging/App.config | 54 +- Samples/GenericHost/Logging/Endpoint.cs | 42 +- Samples/GenericHost/Logging/Logging.csproj | 150 +- .../Logging/Properties/AssemblyInfo.cs | 72 +- .../LoggingFromAppConfig/App.config | 90 +- .../LoggingFromAppConfig/EndpointConfig.cs | 28 +- .../LoggingFromAppConfig/Logger.cs | 38 +- .../LoggingFromAppConfig.csproj | 168 +- .../Properties/AssemblyInfo.cs | 72 +- .../App.config | 44 +- .../EndpointConfig.cs | 52 +- .../LoggingWithConfigurableThreshold.csproj | 166 +- .../Properties/AssemblyInfo.cs | 72 +- Samples/Manufacturing/HR.Host/App.config | 36 +- Samples/Manufacturing/HR.Host/HR.Host.csproj | 214 +- Samples/Manufacturing/HR.Host/Program.cs | 52 +- .../HR.Host/Properties/AssemblyInfo.cs | 66 +- .../HR.MessageHandlers.csproj | 200 +- .../Properties/AssemblyInfo.cs | 70 +- ...RequestOrderAuthorizationMessageHandler.cs | 48 +- .../HR.Messages/HR.Messages.csproj | 190 +- .../Manufacturing/HR.Messages/IOrderLine.cs | 22 +- .../OrderAuthorizationResponseMessage.cs | 24 +- .../HR.Messages/Properties/AssemblyInfo.cs | 70 +- .../RequestOrderAuthorizationMessage.cs | 24 +- .../InteropPartner/InteropPartner.csproj | 190 +- .../Manufacturing/InteropPartner/Program.cs | 84 +- .../InteropPartner/Properties/AssemblyInfo.cs | 72 +- .../Manufacturing/InteropPartner/schema0.xsd | 34 +- .../InteropPartner/schema1_schema0.cs | 520 +- Samples/Manufacturing/Manufacturing.sln | 148 +- .../OrderService/OrderService.Host/App.config | 158 +- .../OrderService.Host.csproj | 316 +- .../OrderService/OrderService.Host/Program.cs | 98 +- .../Properties/AssemblyInfo.cs | 66 +- .../CancelOrderMessage.cs | 22 +- .../OrderService.Messages/OrderLine.cs | 24 +- .../OrderService.Messages/OrderMessage.cs | 30 +- .../OrderService.Messages.csproj | 208 +- .../OrderStatusChangedMessage.cs | 28 +- .../OrderService.Messages/OrderStatusEnum.cs | 22 +- .../Properties/AssemblyInfo.cs | 70 +- .../OrderService.Tests/OrderSagaTests.cs | 276 +- .../OrderService.Tests.csproj | 246 +- .../Properties/AssemblyInfo.cs | 70 +- .../OrderService/OrderService/App.config | 102 +- .../OrderService/EndpointConfig.cs | 10 +- .../OrderService/OrderService/OrderSaga.cs | 262 +- .../OrderService/OrderSagaData.cs | 156 +- .../OrderService/OrderService.csproj | 258 +- .../OrderService/Properties/AssemblyInfo.cs | 70 +- Samples/Manufacturing/Partner/App.config | 50 +- .../OrderStatusChangedMessageHandler.cs | 30 +- Samples/Manufacturing/Partner/Partner.csproj | 230 +- Samples/Manufacturing/Partner/Program.cs | 220 +- .../Partner/Properties/AssemblyInfo.cs | 66 +- Samples/Manufacturing/RunTimeoutManager.bat | 4 +- Samples/Manufacturing/readme.txt | 10 +- Samples/PubSub/MyMessages/Messages.cs | 40 +- Samples/PubSub/MyMessages/MyMessages.csproj | 118 +- .../MyMessages/Properties/AssemblyInfo.cs | 70 +- Samples/PubSub/MyPublisher/App.config | 66 +- Samples/PubSub/MyPublisher/EndpointConfig.cs | 16 +- Samples/PubSub/MyPublisher/MyPublisher.csproj | 172 +- .../MyPublisher/NServiceBus.Host.exe.config | 10 +- .../MyPublisher/Properties/AssemblyInfo.cs | 66 +- Samples/PubSub/MyPublisher/ServerEndpoint.cs | 76 +- .../MyPublisher/SubscriptionAuthorizer.cs | 36 +- Samples/PubSub/PubSub.sln | 76 +- Samples/PubSub/Subscriber1/App.config | 52 +- Samples/PubSub/Subscriber1/EndpointConfig.cs | 12 +- .../PubSub/Subscriber1/EventMessageHandler.cs | 40 +- .../Subscriber1/Properties/AssemblyInfo.cs | 66 +- Samples/PubSub/Subscriber1/Subscriber1.csproj | 240 +- Samples/PubSub/Subscriber2/App.config | 52 +- Samples/PubSub/Subscriber2/EndpointConfig.cs | 32 +- .../PubSub/Subscriber2/EventMessageHandler.cs | 40 +- .../Subscriber2/Properties/AssemblyInfo.cs | 66 +- Samples/PubSub/Subscriber2/Subscriber2.csproj | 282 +- .../PubSub/Subscriber2/Subscriber2Endpoint.cs | 46 +- .../SendOnlyEndpoint.Custom.sln | 40 +- .../SendOnlyEndpoint.Custom/Program.cs | 64 +- .../Properties/AssemblyInfo.cs | 72 +- .../SendOnlyEndpoint.Custom.csproj | 122 +- Samples/Starbucks/Barista/App.config | 42 +- Samples/Starbucks/Barista/Barista.csproj | 218 +- .../Barista/BaristaMessageHandler.cs | 142 +- Samples/Starbucks/Barista/BaristaRegistry.cs | 36 +- Samples/Starbucks/Barista/BaristaSagaData.cs | 40 +- Samples/Starbucks/Barista/Bootstrapper.cs | 86 +- Samples/Starbucks/Barista/Disposable.cs | 90 +- .../Starbucks/Barista/MessageSubscriptions.cs | 96 +- Samples/Starbucks/Barista/Program.cs | 58 +- .../Barista/Properties/AssemblyInfo.cs | 72 +- .../Barista/StarbucksBarista.Designer.cs | 148 +- Samples/Starbucks/Barista/StarbucksBarista.cs | 104 +- .../Starbucks/Barista/StarbucksBarista.resx | 240 +- .../Barista/ViewData/DeliverOrderView.cs | 34 +- .../Barista/ViewData/OrderIsDoneView.cs | 28 +- .../Barista/ViewData/PrepareOrderView.cs | 38 +- Samples/Starbucks/Cashier/App.config | 42 +- Samples/Starbucks/Cashier/Bootstrapper.cs | 84 +- Samples/Starbucks/Cashier/Cashier.csproj | 214 +- .../Cashier/CashierMessageHandler.cs | 154 +- Samples/Starbucks/Cashier/CashierRegistry.cs | 28 +- Samples/Starbucks/Cashier/CashierSagaData.cs | 38 +- Samples/Starbucks/Cashier/Program.cs | 48 +- .../Cashier/Properties/AssemblyInfo.cs | 72 +- .../Cashier/StarbucksCashier.Designer.cs | 148 +- Samples/Starbucks/Cashier/StarbucksCashier.cs | 112 +- .../Starbucks/Cashier/StarbucksCashier.resx | 240 +- .../ViewData/CustomerRefusesToPayView.cs | 42 +- .../Cashier/ViewData/NewOrderView.cs | 38 +- .../ViewData/ReceivedFullPaymentView.cs | 38 +- .../CashierContracts/CashierContracts.csproj | 116 +- .../Starbucks/CashierContracts/DrinkSize.cs | 18 +- .../CashierContracts/NewOrderMessage.cs | 44 +- .../PaymentCompleteMessage.cs | 32 +- .../CashierContracts/PaymentMessage.cs | 36 +- .../CashierContracts/PrepareOrderMessage.cs | 44 +- .../Properties/AssemblyInfo.cs | 72 +- Samples/Starbucks/Customer/App.config | 36 +- Samples/Starbucks/Customer/Bootstrapper.cs | 80 +- Samples/Starbucks/Customer/Customer.csproj | 206 +- .../Customer/CustomerOrder.Designer.cs | 290 +- Samples/Starbucks/Customer/CustomerOrder.cs | 92 +- Samples/Starbucks/Customer/CustomerOrder.resx | 240 +- .../Starbucks/Customer/CustomerRegistry.cs | 26 +- Samples/Starbucks/Customer/Program.cs | 48 +- .../Customer/Properties/AssemblyInfo.cs | 70 +- .../CustomerContracts.csproj | 116 +- .../CustomerContracts/OrderReadyMessage.cs | 36 +- .../PaymentRequestMessage.cs | 40 +- .../Properties/AssemblyInfo.cs | 72 +- Samples/Starbucks/Starbucks.sln | 88 +- .../V1.Messages/Properties/AssemblyInfo.cs | 72 +- .../V1.Messages/SomethingHappened.cs | 18 +- .../Versioning/V1.Messages/V1.Messages.csproj | 186 +- Samples/Versioning/V1Subscriber/App.config | 52 +- .../V1Subscriber/Properties/AssemblyInfo.cs | 72 +- .../V1Subscriber/SomethingHappenedHandler.cs | 32 +- .../V1Subscriber/V1Subscriber.csproj | 242 +- .../V1Subscriber/V1SubscriberEndpoint.cs | 10 +- .../V2.Messages/Properties/AssemblyInfo.cs | 72 +- .../V2.Messages/SomethingHappened.cs | 14 +- .../Versioning/V2.Messages/V2.Messages.csproj | 198 +- Samples/Versioning/V2Publisher/App.config | 56 +- .../Versioning/V2Publisher/EndpointConfig.cs | 12 +- .../V2Publisher/Properties/AssemblyInfo.cs | 72 +- .../Versioning/V2Publisher/V2Publisher.csproj | 236 +- .../V2Publisher/V2PublisherEndpoint.cs | 60 +- Samples/Versioning/V2Subscriber/App.config | 52 +- .../V2Subscriber/Properties/AssemblyInfo.cs | 72 +- .../V2Subscriber/SomethingHappenedHandler.cs | 32 +- .../V2Subscriber/V2Subscriber.csproj | 250 +- .../V2Subscriber/V2SubscriberEndpoint.cs | 10 +- Samples/Versioning/Versioning.sln | 88 +- Samples/WcfIntegration/Client/Client.csproj | 134 +- Samples/WcfIntegration/Client/Program.cs | 96 +- .../Client/Properties/AssemblyInfo.cs | 72 +- Samples/WcfIntegration/Client/app.config | 16 +- .../WcfIntegration/Messages/CancelOrder.cs | 16 +- Samples/WcfIntegration/Messages/ErrorCodes.cs | 16 +- .../Messages/ICancelOrderService.cs | 36 +- .../WcfIntegration/Messages/Messages.csproj | 112 +- .../Messages/Properties/AssemblyInfo.cs | 72 +- .../WcfIntegration/Server/EndpointConfig.cs | 14 +- .../Server/Handlers/CancelOrderHandler.cs | 50 +- .../Server/Properties/AssemblyInfo.cs | 72 +- Samples/WcfIntegration/Server/Server.csproj | 156 +- .../Server/WebServices/CancelOrderService.cs | 16 +- Samples/WcfIntegration/Server/app.config | 110 +- Samples/WcfIntegration/WcfIntegration.sln | 64 +- Samples/WebServiceBridge/Messages/Command.cs | 20 +- .../WebServiceBridge/Messages/ErrorCodes.cs | 16 +- .../WebServiceBridge/Messages/Messages.csproj | 188 +- .../Messages/Properties/AssemblyInfo.cs | 70 +- Samples/WebServiceBridge/Server/App.config | 38 +- .../Server/CommandMessageHandler.cs | 42 +- .../Server/Properties/AssemblyInfo.cs | 66 +- Samples/WebServiceBridge/Server/Server.csproj | 228 +- .../WebServiceBridge/Server/ServerEndpoint.cs | 10 +- .../WebApplication1/Default.aspx | 42 +- .../WebApplication1/Default.aspx.cs | 50 +- .../WebApplication1/Default.aspx.designer.cs | 104 +- .../Properties/AssemblyInfo.cs | 70 +- .../Properties/Settings.Designer.cs | 72 +- .../Properties/Settings.settings | 16 +- .../localhost/ErrorCodes.datasource | 18 +- .../Web References/localhost/Reference.cs | 366 +- .../Web References/localhost/Reference.map | 12 +- .../Web References/localhost/Service1.disco | 10 +- .../Web References/localhost/Service1.wsdl | 150 +- .../WebApplication1/WebApplication1.csproj | 270 +- .../WebApplication1/web.config | 180 +- .../WebServiceBridge/WebService1/Global.asax | 2 +- .../WebService1/Global.asax.cs | 52 +- .../WebService1/Properties/AssemblyInfo.cs | 70 +- .../WebService1/Service1.asmx.cs | 30 +- .../WebServiceBridge/WebService1/Web.config | 216 +- .../WebService1/WebService1.csproj | 228 +- Samples/WebServiceBridge/WebServiceBridge.sln | 84 +- acknowledgements.txt | 24 +- docs/NServiceBus_Code_Snippets.snippet | 60 +- docs/NServiceBus_Code_Snippets.vscontent | 22 +- ilmerge.exclude | 10 +- lib/Autofac License.txt | 52 +- lib/Autofac.XML | 10144 +- .../Microsoft.WindowsAzure.CloudDrive.xml | 472 +- .../Microsoft.WindowsAzure.Diagnostics.xml | 2974 +- .../Microsoft.WindowsAzure.ServiceRuntime.xml | 1450 +- .../Microsoft.WindowsAzure.StorageClient.xml | 25492 ++-- lib/Castle.Core.xml | 6394 +- lib/Castle.DynamicProxy2.xml | 2498 +- lib/Castle.MicroKernel.xml | 10968 +- lib/Castle.Windsor.xml | 3142 +- lib/Common.Logging.Log4Net.xml | 436 +- lib/Common.Logging.xml | 6188 +- lib/FluentNHibernate/FluentNHibernate.XML | 10970 +- lib/Iesi.Collections.license.txt | 18 +- lib/Iesi.Collections.xml | 3806 +- lib/LinFu.License.txt | 334 +- .../FireBird.cfg.xml | 62 +- .../MSSQL.cfg.xml | 42 +- .../MySql.cfg.xml | 32 +- .../Oracle.cfg.xml | 36 +- .../PostgreSQL.cfg.xml | 30 +- .../SQLite.cfg.xml | 32 +- lib/NHibernate.ByteCode.LinFu.xml | 16 +- lib/NHibernate.license.txt | 920 +- lib/NHibernate.xml | 81110 ++++++------- .../Microsoft.Practices.ServiceLocation.xml | 560 +- lib/Spring.Core.xml | 95666 ++++++++-------- lib/System.Web.Mvc.xml | 16634 +-- lib/log4net.license.txt | 402 +- lib/log4net.xml | 57310 ++++----- lib/nhibernate-configuration.xsd | 428 +- lib/nhibernate-mapping.xsd | 3388 +- lib/nunit.license.txt | 30 +- lib/rhino.mocks/Rhino.Mocks.license.txt | 48 +- lib/rhino.mocks/Rhino.Mocks.xml | 10826 +- lib/structuremap/StructureMap.xml | 7748 +- nant.build | 1230 +- readme.txt | 398 +- src/ObjectBuilder/ComponentCallModelEnum.cs | 42 +- src/ObjectBuilder/IBuilder.cs | 126 +- src/ObjectBuilder/IComponentConfig.cs | 70 +- src/ObjectBuilder/IConfigureComponents.cs | 144 +- src/ObjectBuilder/ObjectBuilder.csproj | 194 +- src/ObjectBuilder/ObjectBuilder.sln | 40 +- src/ObjectBuilder/Properties/AssemblyInfo.cs | 44 +- .../NServiceBus.Config.UnitTests/App.config | 124 +- .../NServiceBus.Config.UnitTests.csproj | 156 +- .../Properties/AssemblyInfo.cs | 72 +- .../TestConfigurationSection.cs | 46 +- ...ustom_configuration_source_is_specified.cs | 66 +- ...users_override_the_configuration_source.cs | 76 +- src/config/NServiceBus.Config.sln | 52 +- .../NServiceBus.Config/AllAssemblies.cs | 136 +- .../DefaultConfigurationSource.cs | 36 +- .../IConfigurationSource.cs | 28 +- src/config/NServiceBus.Config/Configure.cs | 508 +- .../NServiceBus.Config/INeedInitialization.cs | 28 +- .../NServiceBus.Config.csproj | 236 +- .../Properties/AssemblyInfo.cs | 44 +- src/core/NServiceBus.Saga/HasCompleted.cs | 28 +- src/core/NServiceBus.Saga/IConfigurable.cs | 28 +- .../IConfigureHowToFindSagaWithMessage.cs | 46 +- src/core/NServiceBus.Saga/IFindSagas.cs | 60 +- .../IHandleReplyingToNullOriginator.cs | 24 +- .../NServiceBus.Saga/IHandleSagaNotFound.cs | 32 +- src/core/NServiceBus.Saga/ISaga.cs | 64 +- src/core/NServiceBus.Saga/ISagaEntity.cs | 76 +- src/core/NServiceBus.Saga/ISagaMessage.cs | 32 +- src/core/NServiceBus.Saga/ISagaPersister.cs | 102 +- src/core/NServiceBus.Saga/ISagaStartedBy.cs | 42 +- src/core/NServiceBus.Saga/ITimeoutable.cs | 30 +- .../NServiceBus.Saga/NServiceBus.Saga.csproj | 246 +- .../Properties/AssemblyInfo.cs | 44 +- src/core/NServiceBus.Saga/Saga.cs | 312 +- src/core/NServiceBus.Saga/TimeoutMessage.cs | 184 +- .../IMessageSerializer.cs | 50 +- .../NServiceBus.Serialization.csproj | 210 +- .../Properties/AssemblyInfo.cs | 44 +- src/core/NServiceBus.sln | 64 +- src/core/NServiceBus/CompletionResult.cs | 52 +- src/core/NServiceBus/ExtensionMethods.cs | 300 +- .../NServiceBus/IAuthorizeSubscriptions.cs | 68 +- src/core/NServiceBus/IBus.cs | 392 +- src/core/NServiceBus/ICallback.cs | 76 +- src/core/NServiceBus/IMessage.cs | 142 +- src/core/NServiceBus/IMessageContext.cs | 62 +- src/core/NServiceBus/IMessageCreator.cs | 64 +- src/core/NServiceBus/IMessageHandler.cs | 48 +- src/core/NServiceBus/IMessageModule.cs | 48 +- .../ISpecifyMessageHandlerOrdering.cs | 214 +- src/core/NServiceBus/IStartableBus.cs | 56 +- src/core/NServiceBus/NServiceBus.csproj | 226 +- .../NServiceBus/Properties/AssemblyInfo.cs | 48 +- src/core/NServiceBus/WireEncryptedString.cs | 168 +- .../MsmqWorkerAvailabilityManager.cs | 244 +- .../MsmqWorkerAvailabilityManager.csproj | 224 +- .../MsmqWorkerAvailabilityManager.sln | 40 +- .../Properties/AssemblyInfo.cs | 44 +- src/distributor/NServiceBus.Distributor.sln | 72 +- .../NServiceBus.Distributor/App.config | 34 +- .../NServiceBus.Distributor/EndpointRunner.cs | 34 +- .../NServiceBus.Distributor.csproj | 182 +- .../Properties/AssemblyInfo.cs | 2 +- .../NServiceBus.Distributor/Service.cs | 190 +- .../Distributor.cs | 240 +- .../IWorkerAvailabilityManager.cs | 76 +- .../NServiceBus.Unicast.Distributor.csproj | 224 +- .../Properties/AssemblyInfo.cs | 44 +- .../ReadyMessageHandler.cs | 76 +- .../NServiceBus.Encryption/Bootstrapper.cs | 26 +- .../EncryptionMessageMutator.cs | 112 +- .../IEncryptionService.cs | 44 +- .../NServiceBus.Encryption.csproj | 156 +- .../Properties/AssemblyInfo.cs | 44 +- src/encryption/encryption.sln | 40 +- src/faults/NServiceBus.Faults.sln | 40 +- .../IManageMessageFailures.cs | 22 +- .../NServiceBus.Faults.csproj | 118 +- .../Properties/AssemblyInfo.cs | 44 +- src/gateway/NServiceBus.Gateway/App.config | 42 +- .../NServiceBus.Gateway/EndpointConfig.cs | 168 +- src/gateway/NServiceBus.Gateway/Extensions.cs | 38 +- src/gateway/NServiceBus.Gateway/Hasher.cs | 48 +- .../NServiceBus.Gateway/HeaderMapper.cs | 132 +- .../NServiceBus.Gateway/HttpRequestHandler.cs | 270 +- src/gateway/NServiceBus.Gateway/IContext.cs | 32 +- .../NServiceBus.Gateway/MsmqHandler.cs | 134 +- .../NServiceBus.Gateway.csproj | 182 +- .../NServiceBus.Gateway/NetHttpContext.cs | 88 +- .../Properties/AssemblyInfo.cs | 44 +- .../NServiceBus.Gateway/WebHttpContext.cs | 92 +- src/gateway/gateway.sln | 40 +- .../Bootstrapper.cs | 80 +- ...angeNumberOfWorkerThreadsMessageHandler.cs | 126 +- .../GetNumberOfWorkerThreadsMessageHandler.cs | 78 +- .../GridInterceptingMessageHandler.cs | 174 +- .../IManageReadyMessages.cs | 58 +- .../NServiceBus.Grid.MessageHandlers.csproj | 294 +- .../Properties/AssemblyInfo.cs | 44 +- .../ReadyManager.cs | 212 +- .../ChangeNumberOfWorkerThreadsMessage.cs | 34 +- .../GetNumberOfWorkerThreadsMessage.cs | 26 +- .../GotNumberOfWorkerThreadsMessage.cs | 34 +- .../NServiceBus.Grid.Messages.csproj | 220 +- .../Properties/AssemblyInfo.cs | 44 +- .../NServiceBus.Grid.Messages/ReadyMessage.cs | 34 +- src/grid/NServiceBus.Grid.sln | 52 +- .../Bootstrapper.cs | 46 +- .../MessageHeaderManager.cs | 170 +- .../NServiceBus.MessageHeaders.csproj | 174 +- .../Properties/AssemblyInfo.cs | 44 +- src/headers/headers.sln | 40 +- .../NServiceBus.Hosting.Azure/Entrypoint.cs | 248 +- .../ProductionLoggingHandler.cs | 46 +- .../NServiceBus.Hosting.Azure.csproj | 170 +- .../Handler/ProductionProfileHandler.cs | 42 +- .../Profiles/Production.cs | 18 +- .../Properties/AssemblyInfo.cs | 72 +- .../Roles/AsA_Publisher.cs | 16 +- .../Roles/AsA_Server.cs | 18 +- .../Roles/Handlers/ServerRoleHandler.cs | 56 +- .../NServiceBus.Hosting.Tests.csproj | 146 +- .../Properties/AssemblyInfo.cs | 72 +- .../RoleManagerTests.cs | 118 +- .../Arguments/HostArguments.cs | 86 +- .../Content/Help.txt | 108 +- .../HostServiceLocator.cs | 76 +- .../IntegrationLoggingHandler.cs | 30 +- .../LoggingHandlers/LiteLoggingHandler.cs | 30 +- .../ProductionLoggingHandler.cs | 52 +- .../NServiceBus.Host.sln | 48 +- .../NServiceBus.Hosting.Windows.csproj | 248 +- .../Handlers/InstallDtcProfileHandler.cs | 28 +- .../Handlers/InstallMsmqProfileHandler.cs | 28 +- ...nstallPerformanceCountersProfileHandler.cs | 30 +- .../Handlers/IntegrationProfileHandler.cs | 80 +- .../Profiles/Handlers/LiteProfileHandler.cs | 36 +- .../PerformanceCountersProfileHandler.cs | 124 +- .../Handlers/ProductionProfileHandler.cs | 38 +- .../Profiles/InstallDtc.cs | 22 +- .../Profiles/InstallMsmq.cs | 24 +- .../Profiles/InstallPerformanceCounters.cs | 18 +- .../Profiles/Integration.cs | 18 +- .../Profiles/Lite.cs | 18 +- .../Profiles/PerformanceCounters.cs | 18 +- .../Profiles/Production.cs | 18 +- .../NServiceBus.Hosting.Windows/Program.cs | 454 +- .../Properties/AssemblyInfo.cs | 44 +- .../Roles/AsA_Client.cs | 18 +- .../Roles/AsA_Publisher.cs | 16 +- .../Roles/AsA_Server.cs | 18 +- .../Roles/Handlers/ClientRoleHandler.cs | 52 +- .../Roles/Handlers/ServerRoleHandler.cs | 60 +- .../WindowsHost.cs | 88 +- src/hosting/NServiceBus.Hosting.sln | 76 +- .../Configuration/ConfigurationManager.cs | 236 +- .../Configuration/IConfigureLogging.cs | 52 +- .../Configuration/IConfigureThisEndpoint.cs | 18 +- .../Configuration/IWant.cs | 120 +- .../NServiceBus.Hosting/GenericHost.cs | 264 +- .../Helpers/AssemblyScanner.cs | 154 +- .../NServiceBus.Hosting.csproj | 166 +- .../Profiles/IHandleProfile.cs | 38 +- .../NServiceBus.Hosting/Profiles/IProfile.cs | 20 +- .../Profiles/ProfileManager.cs | 246 +- .../Properties/AssemblyInfo.cs | 72 +- .../Roles/IConfigureRole.cs | 48 +- .../NServiceBus.Hosting/Roles/IRole.cs | 16 +- .../NServiceBus.Hosting/Roles/RoleManager.cs | 124 +- .../NServiceBus.Hosting/Wcf/WcfManager.cs | 180 +- .../NServiceBus.Hosting/Wcf/WcfServiceHost.cs | 124 +- .../ImpersonationManager.cs | 132 +- .../NServiceBus.Impersonation.csproj | 160 +- .../Properties/AssemblyInfo.cs | 44 +- src/impersonation/impersonation.sln | 40 +- .../Config/ConfigureDefaultBuilder.cs | 52 +- ...iceBus.ObjectBuilder.DefaultBuilder.csproj | 174 +- .../Properties/AssemblyInfo.cs | 4 +- .../ConfigureCommon.cs | 56 +- .../ConfigureContainer.cs | 68 +- .../ObjectBuilder.Common.Config.csproj | 232 +- .../Properties/AssemblyInfo.cs | 44 +- .../ObjectBuilder.Common.Config/SyncConfig.cs | 78 +- .../ObjectBuilder.Common.sln | 64 +- .../CommonObjectBuilder.cs | 316 +- .../ObjectBuilder.Common/ComponentConfig.cs | 84 +- .../ObjectBuilder.Common/IContainer.cs | 142 +- .../ObjectBuilder.Common.csproj | 208 +- .../Properties/AssemblyInfo.cs | 44 +- .../SynchronizedInvoker.cs | 68 +- .../AutofacObjectBuilder.cs | 340 +- .../Config/ConfigureAutofacBuilder.cs | 72 +- .../Internal/ContainerExtensions.cs | 44 +- .../Internal/ContainerUpdater.cs | 62 +- .../Internal/ObjectExtensions.cs | 42 +- .../Internal/TypeExtensions.cs | 70 +- .../ObjectBuilder.Autofac.csproj | 232 +- .../Properties/AssemblyInfo.cs | 50 +- .../Config/ConfigureWindsorBuilder.cs | 74 +- .../ObjectBuilder.CastleWindsor.csproj | 246 +- .../Properties/AssemblyInfo.cs | 44 +- .../WindsorObjectBuilder .cs | 300 +- .../ObjectBuilder.Spring/ComponentConfig.cs | 62 +- .../Config/ConfigureSpringBuilder.cs | 80 +- .../ObjectBuilder.Spring.csproj | 146 +- .../Properties/AssemblyInfo.cs | 44 +- .../SpringObjectBuilder.cs | 304 +- .../Config/ConfigureStructureMapBuilder.cs | 76 +- .../NServiceBusThreadLocalStorageLifestyle.cs | 116 +- .../ObjectBuilder.StructureMap.csproj | 224 +- .../Properties/AssemblyInfo.cs | 46 +- .../StructureMapExtensions.cs | 112 +- .../StructureMapObjectBuilder.cs | 340 +- .../ObjectBuilder.Tests/App.config | 26 +- .../ObjectBuilder.Tests/BuilderFixture.cs | 132 +- .../ObjectBuilder.Tests.csproj | 278 +- .../Properties/AssemblyInfo.cs | 2 +- .../When_using_nested_containers.cs | 124 +- ...icebus_specific_thread_static_lifecycle.cs | 64 +- .../When_building_components.cs | 116 +- ...When_querying_for_registered_components.cs | 108 +- .../When_registering_components.cs | 160 +- .../AutowireEnabledInjectionProperty.cs | 278 +- .../Config/ConfigureUnityBuilder.cs | 70 +- .../ConfigureComponentAdapter.cs | 72 +- .../FullAutowireContainerExtension.cs | 34 +- .../FullAutowirePropertySelectorPolicy.cs | 242 +- .../ObjectBuilder.Unity.csproj | 190 +- .../OptionalFixedTypeResolverPolicy.cs | 86 +- .../Properties/AssemblyInfo.cs | 46 +- .../ObjectBuilder.Unity/UnityObjectBuilder.cs | 340 +- src/impl/ObjectBuilder/ObjectBuilder.sln | 108 +- src/impl/SagaPersisters/InMemory/InMemory.sln | 40 +- .../Config/ConfigureInMemorySagaPersister.cs | 46 +- .../InMemorySagaPersister.cs | 98 +- ...NServiceBus.SagaPersisters.InMemory.csproj | 134 +- .../Properties/AssemblyInfo.cs | 2 +- .../NHibernateSagaPersister.sln | 88 +- .../AzureSagaPersisterConfig.cs | 88 +- .../ConfigureAzureSagaPersister.cs | 160 +- .../Internal/SessionFactoryBuilder.cs | 214 +- ...viceBus.SagaPersisters.Azure.Config.csproj | 194 +- .../Properties/AssemblyInfo.cs | 72 +- .../Attributes/TableNameAttribute.cs | 26 +- .../Attributes/UniqueAttribute.cs | 14 +- .../CollectionsShouldCascadeConvention.cs | 24 +- .../IdShouldBeAssignedConvention.cs | 44 +- .../TableNameBasedOnAttributeConvention.cs | 74 +- .../Conventions/UniqueConvention.cs | 30 +- .../Create.cs | 200 +- ...rsisters.NHibernate.AutoPersistence.csproj | 148 +- .../Properties/AssemblyInfo.cs | 44 +- .../ConfigureNHibernateSagaPersister.cs | 182 +- .../Internal/SessionFactoryBuilder.cs | 194 +- .../NHibernateSagaPersisterConfig.cs | 252 +- ...us.SagaPersisters.NHibernate.Config.csproj | 218 +- .../Properties/AssemblyInfo.cs | 44 +- .../App.config | 30 +- .../InMemoryFixture.cs | 66 +- .../MySaga.cs | 36 +- ...Bus.SagaPersisters.NHibernate.Tests.csproj | 346 +- .../Properties/AssemblyInfo.cs | 4 +- .../TestSaga.cs | 190 +- .../TestSagaWithHbmlXmlOverride.hbm.xml | 18 +- .../When_automapping_sagas.cs | 254 +- .../When_building_the_sessionfactory.cs | 124 +- ...uring_the_saga_persister_from_appconfig.cs | 64 +- ...guring_the_saga_persister_to_use_sqlite.cs | 90 +- ...ersisting_a_saga_with_a_unique_property.cs | 86 +- ...ng_sagas_on_non_transactional_endpoints.cs | 86 +- ...isting_sagas_on_transactional_endpoints.cs | 118 +- ...erviceBus.SagaPersisters.NHibernate.csproj | 218 +- .../Properties/AssemblyInfo.cs | 44 +- .../SagaPersister.cs | 132 +- .../Sagas/NServiceBus.Sagas.Impl/Configure.cs | 1010 +- ...igureHowToFindSagaWithMessageDispatcher.cs | 42 +- .../NServiceBus.Sagas.Impl/ConfigureSagas.cs | 44 +- .../GuidCombGenerator.cs | 108 +- .../NServiceBus.Sagas.Impl.csproj | 194 +- .../NServiceBus.Sagas.Impl/NullSagaFinder.cs | 44 +- .../Properties/AssemblyInfo.cs | 44 +- .../PropertySagaFinder.cs | 80 +- .../ReplyingToNullOriginatorDispatcher.cs | 40 +- .../SagaEntityFinder.cs | 58 +- .../SagaMessageHandler.cs | 490 +- src/impl/Sagas/Sagas.sln | 48 +- .../ConfigureBinarySerializer.cs | 48 +- ...erviceBus.Serializers.Binary.Config.csproj | 254 +- .../Properties/AssemblyInfo.cs | 44 +- .../MessageSerializer.cs | 100 +- .../NServiceBus.Serializers.Binary.csproj | 218 +- .../Properties/AssemblyInfo.cs | 44 +- .../SimpleMessageMapper.cs | 96 +- .../ConfigureXmlSerializer.cs | 108 +- .../NServiceBus.Serializers.XML.Config.csproj | 264 +- .../Properties/AssemblyInfo.cs | 44 +- .../NServiceBus.Serializers.XML.Test/IM1.cs | 22 +- .../NServiceBus.Serializers.XML.Test/IM2.cs | 62 +- .../NServiceBus.Serializers.XML.Test/M1.cs | 56 +- .../NServiceBus.Serializers.XML.Test/M2.cs | 36 +- .../NServiceBus.Serializers.XML.Test.csproj | 250 +- .../Properties/AssemblyInfo.cs | 70 +- .../NServiceBus.Serializers.XML.Test/Risk.cs | 24 +- .../SerializerTests.cs | 580 +- .../SomeEnum.cs | 16 +- .../ComplexType.cs | 244 +- .../ComplexTypeWriter.cs | 90 +- .../Element.cs | 168 +- .../ElementWriter.cs | 94 +- .../Events.cs | 32 +- ...iceBus.Serializers.XML.XsdGenerator.csproj | 238 +- .../Program.cs | 260 +- .../Properties/AssemblyInfo.cs | 44 +- .../Reflect.cs | 116 +- .../Repository.cs | 174 +- .../SimpleTypeWriter.cs | 56 +- .../Strings.cs | 36 +- .../app.config | 6 +- .../MessageSerializer.cs | 1650 +- .../NServiceBus.Serializers.XML.csproj | 234 +- .../Properties/AssemblyInfo.cs | 44 +- .../ProfilingTest/ProfilingTest.csproj | 192 +- src/impl/Serializers/ProfilingTest/Program.cs | 36 +- .../ProfilingTest/Properties/AssemblyInfo.cs | 66 +- src/impl/Serializers/Serializers.sln | 100 +- .../ConfigureRijndaelEncryptionService.cs | 72 +- ...rviceBus.Encryption.Rijndael.Config.csproj | 158 +- .../Properties/AssemblyInfo.cs | 44 +- .../RijndaelEncryptionServiceConfig.cs | 46 +- .../EncryptionService.cs | 152 +- .../NServiceBus.Encryption.Rijndael.csproj | 134 +- .../Properties/AssemblyInfo.cs | 44 +- src/impl/encryption/encryption.sln | 52 +- .../ConfigureFaultsForwarder.cs | 128 +- .../MessageForwardingInCaseOfFaultConfig.cs | 46 +- ...NServiceBus.Faults.Forwarder.Config.csproj | 268 +- .../Properties/AssemblyInfo.cs | 44 +- .../ExceptionInfo.cs | 54 +- .../ExceptionSanitizer.cs | 22 +- .../FaultManager.cs | 100 +- .../NServiceBus.Faults.Forwarder.csproj | 240 +- .../ProcessingFailedMessage.cs | 22 +- .../Properties/AssemblyInfo.cs | 44 +- .../SerializationFailedMessage.cs | 22 +- .../ConfigureInMemoryFaultManagement.cs | 46 +- .../NServiceBus.Faults.InMemory.Config.csproj | 244 +- .../Properties/AssemblyInfo.cs | 44 +- .../FaultManager.cs | 42 +- .../NServiceBus.Faults.InMemory.csproj | 214 +- .../Properties/AssemblyInfo.cs | 44 +- .../App.config | 48 +- .../FaultManagerSpecification.cs | 60 +- ...NServiceBus.Faults.NHibernate.Tests.csproj | 312 +- .../Properties/AssemblyInfo.cs | 44 +- ..._nhibernate_fault_manager_to_use_sqlite.cs | 70 +- ...lt_manager_using_default_config_section.cs | 90 +- ...ault_manager_using_named_config_section.cs | 88 +- ...ling_fault_caused_by_a_nested_exception.cs | 94 +- ...g_faults_on_non_transactional_endpoints.cs | 40 +- ...dling_faults_on_transactional_endpoints.cs | 80 +- .../ConfigurationSectionHandler.cs | 60 +- .../ConfigureNHibernateFaultManager.cs | 262 +- .../FailureInfo.cs | 122 +- .../FaultManager.cs | 102 +- .../FaultManagerSessionFactory.cs | 48 +- .../MultiConfiguration.cs | 46 +- .../NServiceBus.Faults.NHibernate.csproj | 278 +- .../Properties/AssemblyInfo.cs | 50 +- src/impl/faults/NServiceBus.Faults.sln | 100 +- .../MessageMapper.cs | 616 +- ...Interfaces.MessageMapper.Reflection.csproj | 230 +- .../Properties/AssemblyInfo.cs | 44 +- ...NServiceBus.MessageInterfaces.Tests.csproj | 140 +- .../Properties/AssemblyInfo.cs | 4 +- .../When_mapping_interfaces.cs | 82 +- .../messageInterfaces/messageInterfaces.sln | 52 +- .../ConfigureMsmqTransport.cs | 44 +- .../MsmqTransportConfig.cs | 164 +- ...ceBus.Unicast.Transport.Msmq.Config.csproj | 204 +- .../Properties/AssemblyInfo.cs | 44 +- .../NServiceBus.Unicast.Transport.Msmq.sln | 40 +- .../Config/AzureSubscriptionStorageConfig.cs | 66 +- ...igureNHibernateAzureSubscriptionStorage.cs | 160 +- .../Config/SubscriptionMap.cs | 26 +- ...st.Subscriptions.Azure.TableStorage.csproj | 274 +- ...bscriptions.Azure.TableStorage.csproj.user | 24 +- ...icast.Subscriptions.Azure.TableStorage.sln | 40 +- .../Properties/AssemblyInfo.cs | 4 +- .../Subscription.cs | 66 +- .../SubscriptionStorage.cs | 190 +- .../ConfigureMsmqSubscriptionStorage.cs | 46 +- .../InMemorySubscriptionStorage.cs | 128 +- ...eBus.Unicast.Subscriptions.InMemory.csproj | 134 +- ...viceBus.Unicast.Subscriptions.InMemory.sln | 40 +- .../Properties/AssemblyInfo.cs | 2 +- .../Entry.cs | 42 +- .../MsmqSubscriptionStorage.cs | 526 +- .../ConfigMsmqSubscriptionStorage.cs | 74 +- .../ConfigureMsmqSubscriptionStorage.cs | 60 +- .../MsmqSubscriptionStorageConfig.cs | 54 +- ...s.Unicast.Subscriptions.Msmq.Config.csproj | 256 +- .../Properties/AssemblyInfo.cs | 44 +- ...rviceBus.Unicast.Subscriptions.Msmq.csproj | 262 +- ...NServiceBus.Unicast.Subscriptions.Msmq.sln | 52 +- .../Properties/AssemblyInfo.cs | 44 +- .../App.config | 36 +- ...en_configuring_the_subscription_storage.cs | 166 +- .../InMemoryDBFixture.cs | 66 +- ...cast.Subscriptions.NHibernate.Tests.csproj | 306 +- .../Properties/AssemblyInfo.cs | 2 +- ...n_listing_subscribers_for_message_types.cs | 50 +- .../When_receiving_a_subscription_message.cs | 94 +- ...When_receiving_a_unsubscription_message.cs | 74 +- .../ConfigureNHibernateSubscriptionStorage.cs | 202 +- .../Config/DBSubscriptionStorageConfig.cs | 70 +- .../Config/NHibernateProperty.cs | 64 +- .../Config/NHibernatePropertyCollection.cs | 66 +- .../Config/SubscriptionMap.cs | 28 +- .../ISubscriptionStorageSessionProvider.cs | 16 +- ...us.Unicast.Subscriptions.NHibernate.csproj | 258 +- ...ceBus.Unicast.Subscriptions.NHibernate.sln | 52 +- .../Properties/AssemblyInfo.cs | 4 +- .../Subscription.cs | 66 +- .../SubscriptionStorage.cs | 200 +- .../SubscriptionStorageSessionProvider.cs | 36 +- .../AzureQueueConfig.cs | 142 +- .../ConfigureAzureMessageQueue.cs | 192 +- ...iceBus.Unicast.Queuing.Azure.Config.csproj | 172 +- .../Properties/AssemblyInfo.cs | 4 +- .../App.config | 16 +- .../AzureQueueFixture.cs | 108 +- ...viceBus.Unicast.Queuing.Azure.Tests.csproj | 230 +- .../Properties/AssemblyInfo.cs | 4 +- .../When_configuring_the_azure_queue.cs | 104 +- .../When_creating_a_queue.cs | 30 +- .../When_initializing_the_queue.cs | 44 +- .../When_receiving_messages.cs | 302 +- .../When_sending_messages.cs | 118 +- .../AzureMessageQueue.cs | 306 +- .../NServiceBus.Unicast.Queuing.Azure.csproj | 168 +- .../Properties/AssemblyInfo.cs | 2 +- .../ReceiveResourceManager.cs | 82 +- .../SendResourceManager.cs | 74 +- .../ConfigureFtpQueue.cs | 62 +- .../FtpQueueConfig.cs | 98 +- ...rviceBus.Unicast.Queuing.Ftp.Config.csproj | 148 +- .../Properties/AssemblyInfo.cs | 72 +- .../FtpMessageQueue.cs | 378 +- .../NServiceBus.Unicast.Queuing.Ftp.csproj | 134 +- .../Properties/AssemblyInfo.cs | 72 +- .../ConfigureMsmqMessageQueue.cs | 94 +- .../MsmqMessageQueueConfig.cs | 88 +- ...viceBus.Unicast.Queuing.Msmq.Config.csproj | 164 +- .../Properties/AssemblyInfo.cs | 44 +- .../HeaderInfo.cs | 42 +- .../HeaderKeys.cs | 12 +- .../MsmqMessageReceiver.cs | 370 +- .../MsmqMessageSender.cs | 176 +- .../NServiceBus.Unicast.Queuing.Msmq.csproj | 168 +- .../Properties/AssemblyInfo.cs | 44 +- src/impl/unicast/queuing/queuing.sln | 148 +- .../Bootstrapper.cs | 64 +- ...cast.Transport.Transactional.Config.csproj | 156 +- .../Properties/AssemblyInfo.cs | 44 +- .../TransactionalConfigManager.cs | 198 +- ...icast.Transport.Transactional.Tests.csproj | 152 +- .../Properties/AssemblyInfo.cs | 2 +- .../When_a_message_fails_processing.cs | 106 +- .../AbortHandlingCurrentMessageException.cs | 28 +- ...Bus.Unicast.Transport.Transactional.csproj | 154 +- .../Properties/AssemblyInfo.cs | 44 +- .../TransactionalTransport.cs | 944 +- src/impl/unicast/transport/transport.sln | 64 +- .../ConfigureNHibernateUnitOfWork.cs | 44 +- ...iceBus.UnitOfWork.NHibernate.Config.csproj | 170 +- .../Properties/AssemblyInfo.cs | 44 +- .../NServiceBus.UnitOfWork.NHibernate.csproj | 146 +- .../Properties/AssemblyInfo.cs | 44 +- .../UnitOfWorkManager.cs | 136 +- src/impl/unitofwork/unitofwork.sln | 52 +- .../App.config | 14 +- ...NServiceBus.Integration.Azure.Tests.csproj | 154 +- .../Properties/AssemblyInfo.cs | 4 +- .../SectionNotPresentInConfig.cs | 44 +- .../TestConfigSection.cs | 68 +- ...en_using_the_azure_configuration_source.cs | 100 +- .../AzureAppender.cs | 268 +- .../AzureConfigurationSettings.cs | 50 +- .../AzureConfigurationSource.cs | 110 +- .../Config/ConfigureAzureIntegration.cs | 26 +- .../IAzureConfigurationSettings.cs | 12 +- .../NServiceBus.Integration.Azure.csproj | 182 +- .../Properties/AssemblyInfo.cs | 4 +- .../NServiceBus.Integration.WCF/App.config | 58 +- .../IWcfService.cs | 62 +- .../NServiceBus.Integration.WCF.csproj | 176 +- .../Properties/AssemblyInfo.cs | 44 +- .../ServiceAsyncResult.cs | 138 +- .../NServiceBus.Integration.WCF/WcfService.cs | 108 +- ...NServiceBus.Integration.WebServices.csproj | 158 +- .../Properties/AssemblyInfo.cs | 44 +- .../Webservice.cs | 130 +- src/integration/integration.sln | 76 +- src/logging/NServiceBus.Logging.sln | 40 +- src/logging/NServiceBus.Logging/Logging.cs | 46 +- .../NServiceBus.Logging.csproj | 176 +- .../Properties/AssemblyInfo.cs | 46 +- .../NServiceBus.Logging/SetLoggingLibrary.cs | 188 +- .../IMessageMapper.cs | 66 +- .../NServiceBus.MessageInterfaces.csproj | 200 +- .../Properties/AssemblyInfo.cs | 44 +- src/messageInterfaces/messageInterfaces.sln | 40 +- .../NServiceBus.MessageMutator.sln | 40 +- .../IMapTransportMessages.cs | 24 +- .../IMessageMutator.cs | 66 +- .../NServiceBus.MessageMutator.csproj | 120 +- .../Properties/AssemblyInfo.cs | 4 +- src/proxy/NServiceBus.Proxy.sln | 40 +- src/proxy/NServiceBus.Proxy/App.config | 84 +- src/proxy/NServiceBus.Proxy/EndpointConfig.cs | 124 +- .../NServiceBus.Proxy/IProxyDataStorage.cs | 16 +- .../NServiceBus.Proxy/MsmqProxyDataStorage.cs | 112 +- .../NServiceBus.Proxy.csproj | 256 +- .../Properties/AssemblyInfo.cs | 44 +- src/proxy/NServiceBus.Proxy/Proxy.cs | 306 +- src/proxy/NServiceBus.Proxy/ProxyData.cs | 24 +- src/testing/Delegates.cs | 96 +- src/testing/Handler.cs | 442 +- src/testing/Helper.cs | 808 +- src/testing/MessageContext.cs | 26 +- .../NServiceBus.Testing.Tests.csproj | 156 +- .../Properties/AssemblyInfo.cs | 44 +- .../TestHandlerFixture.cs | 204 +- src/testing/NServiceBus.Testing.csproj | 244 +- src/testing/NServiceBus.Testing.sln | 52 +- src/testing/Properties/AssemblyInfo.cs | 44 +- src/testing/Saga.cs | 410 +- src/testing/Test.cs | 374 +- .../Timeout.MessageHandlers/App.config | 58 +- .../Timeout.MessageHandlers/Endpoint.cs | 110 +- .../Properties/AssemblyInfo.cs | 44 +- .../Timeout.MessageHandlers.csproj | 246 +- .../TimeoutMessageHandler.cs | 186 +- src/timeout/Timeout.sln | 40 +- .../Class1.cs | 112 +- ...nagement.Errors.ReturnToSourceQueue.csproj | 202 +- .../Properties/AssemblyInfo.cs | 70 +- .../ReturnToSourceQueue.sln | 52 +- .../ReturnToSourceQueue/Program.cs | 118 +- .../Properties/AssemblyInfo.cs | 66 +- .../ReturnToSourceQueue.csproj | 216 +- src/tools/management/Grid/Grid.sln | 52 +- src/tools/management/Grid/Grid/Grid.csproj | 218 +- .../management/Grid/Grid/ManagedEndpoint.cs | 106 +- src/tools/management/Grid/Grid/Manager.cs | 378 +- .../Grid/Grid/Properties/AssemblyInfo.cs | 44 +- src/tools/management/Grid/Grid/Worker.cs | 74 +- src/tools/management/Grid/UI/App.config | 106 +- .../management/Grid/UI/Form1.Designer.cs | 998 +- src/tools/management/Grid/UI/Form1.cs | 586 +- src/tools/management/Grid/UI/Form1.resx | 250 +- src/tools/management/Grid/UI/Program.cs | 114 +- .../Grid/UI/Properties/AssemblyInfo.cs | 44 +- .../Grid/UI/Properties/Resources.Designer.cs | 126 +- .../Grid/UI/Properties/Resources.resx | 232 +- .../Grid/UI/Properties/Settings.Designer.cs | 52 +- .../Grid/UI/Properties/Settings.settings | 14 +- src/tools/management/Grid/UI/UI.csproj | 296 +- .../ConfigUnicastBus.cs | 574 +- .../ConfigureUnicastBus.cs | 72 +- .../MessageEndpointMapping.cs | 84 +- .../MessageEndpointMappingCollection.cs | 394 +- .../NServiceBus.Unicast.Config.csproj | 264 +- .../Properties/AssemblyInfo.cs | 44 +- .../UnicastBusConfig.cs | 214 +- .../IReceiveMessages.cs | 56 +- .../ISendMessages.cs | 32 +- .../NServiceBus.Unicast.Queuing.csproj | 138 +- .../Properties/AssemblyInfo.cs | 46 +- .../QueueNotFoundException.cs | 62 +- .../QueuedMessage.cs | 50 +- .../ISubscriptionStorage.cs | 76 +- .../NServiceBus.Unicast.Subscriptions.csproj | 204 +- .../Properties/AssemblyInfo.cs | 44 +- .../NServiceBus.Unicast.Tests.csproj | 152 +- .../Properties/AssemblyInfo.cs | 4 +- ...en_the_bus_is_started_in_send_only_mode.cs | 178 +- .../NServiceBus.Unicast/BusAsyncResult.cs | 188 +- src/unicast/NServiceBus.Unicast/Callback.cs | 306 +- .../NServiceBus.Unicast/IUnicastBus.cs | 50 +- .../NServiceBus.Unicast/MessageContext.cs | 86 +- .../NServiceBus.Unicast/MessageEventArgs.cs | 88 +- .../NServiceBus.Unicast.csproj | 314 +- .../Properties/AssemblyInfo.cs | 44 +- .../SubscriptionEventArgs.cs | 40 +- .../SubscriptionsManager.cs | 118 +- src/unicast/NServiceBus.Unicast/UnicastBus.cs | 3118 +- src/unicast/Unicast.sln | 88 +- .../NServiceBus.Unicast.Transport.sln | 40 +- .../CompletionMessage.cs | 32 +- .../ITransport.cs | 118 +- .../MessageIntentEnum.cs | 66 +- .../NServiceBus.Unicast.Transport.csproj | 146 +- .../Properties/AssemblyInfo.cs | 44 +- .../SubscriptionMessage.cs | 114 +- .../TransportMessage.cs | 152 +- ...TransportMessageHandlingFailedException.cs | 46 +- .../TransportMessageReceivedEventArgs.cs | 60 +- .../IManageUnitsOfWork.cs | 48 +- .../NServiceBus.UnitOfWork.csproj | 124 +- .../Properties/AssemblyInfo.cs | 44 +- src/unitofwork/unitofwork.sln | 40 +- src/utils/DtcUtil.cs | 142 +- src/utils/MsmqInstallation.cs | 520 +- src/utils/MsmqUtilities.cs | 412 +- .../DelegateFactory.cs | 236 +- .../ExtensionMethods.cs | 238 +- .../NServiceBus.Utils.Reflection.csproj | 136 +- .../Properties/AssemblyInfo.cs | 44 +- .../NServiceBus.Utils.Reflection/Reflect.cs | 442 +- src/utils/NServiceBus.Utils.csproj | 232 +- src/utils/NServiceBus.Utils.sln | 64 +- src/utils/PerformanceCounterInstallation.cs | 82 +- src/utils/ProcessUtil.cs | 82 +- src/utils/Properties/AssemblyInfo.cs | 44 +- src/utils/Runner/Program.cs | 88 +- src/utils/Runner/Properties/AssemblyInfo.cs | 4 +- src/utils/Runner/Runner.csproj | 142 +- src/utils/TransactionWrapper.cs | 76 +- src/utils/WorkerThread.cs | 186 +- tools/NUnit/framework/nunit.framework.xml | 20560 ++-- tools/nant/NAnt.CompressionTasks.xml | 708 +- tools/nant/NAnt.Core.xml | 22426 ++-- tools/nant/NAnt.DotNetTasks.xml | 6346 +- tools/nant/NAnt.MSNetTasks.xml | 630 +- tools/nant/NAnt.NUnit.xml | 516 +- tools/nant/NAnt.NUnit1Tasks.xml | 738 +- tools/nant/NAnt.NUnit2Tasks.xml | 882 +- tools/nant/NAnt.SourceControlTasks.xml | 984 +- tools/nant/NAnt.VSNetTasks.xml | 4870 +- tools/nant/NAnt.VisualCppTasks.xml | 1088 +- tools/nant/NAnt.Win32Tasks.xml | 428 +- tools/nant/NAnt.xml | 68 +- .../extensions/common/2.0/NAnt.MSBuild.xml | 72 +- tools/nant/nant.xsd | 4980 +- 1098 files changed, 271372 insertions(+), 271372 deletions(-) diff --git a/.gitignore b/.gitignore index 1082bbe4c8a..9c916ed831f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,18 +1,18 @@ -build -binaries -obj -bin -.nu -_ReSharper.* -_UpgradeReport.* -*.csproj.user -*.resharper.user -*.resharper -*.suo -*.cache -*~ -*.swp -*.user -TestResult.xml -results -CommonAssemblyInfo.cs +build +binaries +obj +bin +.nu +_ReSharper.* +_UpgradeReport.* +*.csproj.user +*.resharper.user +*.resharper +*.suo +*.cache +*~ +*.swp +*.user +TestResult.xml +results +CommonAssemblyInfo.cs diff --git a/AllProjects-NotForBuilding-SeeReadme.sln b/AllProjects-NotForBuilding-SeeReadme.sln index 0ac48d0b380..e030ba58cc0 100644 --- a/AllProjects-NotForBuilding-SeeReadme.sln +++ b/AllProjects-NotForBuilding-SeeReadme.sln @@ -1,661 +1,661 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "core", "core", "{4A182899-5624-4FF0-8753-D2E8E31AF140}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{6CEB2C22-90CC-4161-952D-7ED706BB8387}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "distributor", "distributor", "{8C38D3A9-16E6-40A0-A813-818A45BF0374}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "impl", "impl", "{7B56E082-A287-4400-B069-D1625C229E55}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "unicast", "unicast", "{D8B58938-14AF-4FA2-BAC3-7FE59721B7E0}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "unicast", "unicast", "{2BC45674-F407-45D5-B299-BF314DAF88BE}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "utils", "utils", "{AE680ED6-74D9-4D85-834F-E9F20DE9C2B4}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{4ECE40D6-7EA4-4D65-89FE-2D0915D29B5E}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WebServiceBridge", "WebServiceBridge", "{EE641ACE-ABE5-4ACE-9AAE-DC52C55B51F9}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AsyncPages", "AsyncPages", "{B351256F-5A1C-435F-A81E-97EC2E4EB155}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SagaPersisters", "SagaPersisters", "{12392715-B9A3-433E-B395-C0031569A864}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ObjectBuilder", "ObjectBuilder", "{5B85CA4F-0E58-413A-932E-2FF6A757DB74}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ObjectBuilder", "ObjectBuilder", "{102BD992-A123-4B71-B9C7-7FFAA515FACE}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "grid", "grid", "{B46133C5-7441-4F05-BC44-7E67B5EDAA4D}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{51E8903A-31C8-42CC-AEB9-AD813EE282F4}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "management", "management", "{50CF4253-AABB-475D-87DD-D8A2C7CF236D}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "grid", "grid", "{058A28C7-57DE-44B4-AA26-CE8A57FF7147}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "FullDuplex", "FullDuplex", "{BE42D213-AE26-4C5D-9766-39A18BB166B9}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "timeout", "timeout", "{3D1ACC82-B571-400D-AECA-C50B97E17845}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PubSub", "PubSub", "{5931F01B-C194-4720-A181-458B1672581A}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "messageInterfaces", "messageInterfaces", "{9AE18F6C-57A6-4026-8427-8F4A366B5FA5}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "messageInterfaces", "messageInterfaces", "{7959A868-6A54-4A64-8706-F063CC1476A5}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Serializers", "Serializers", "{7A0566CF-5BAF-48E0-B105-C6BF2E77A3A1}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Manufacturing", "Manufacturing", "{8C092982-A337-4013-A277-481813BD09D6}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "OrderService", "OrderService", "{4111FD2B-3E6A-4A1B-A9B3-44E5E2259BD3}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "HR", "HR", "{937799AF-0B7F-4AC2-81B8-0A4348E499E3}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Partner", "Partner", "{997214B7-CB1B-4E18-836F-49290BDDED12}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "errors", "errors", "{F32296DF-E899-425F-9EE7-CDBD8995E00B}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "testing", "testing", "{0711BE68-5F6B-4570-9471-1D615084CE6B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus", "src\core\NServiceBus\NServiceBus.csproj", "{73867D40-8CBB-48E9-BFFA-12BBDD48A341}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MsmqWorkerAvailabilityManager", "src\distributor\MsmqWorkerAvailabilityManager\MsmqWorkerAvailabilityManager.csproj", "{A60CA2C3-0B28-4D03-9F0B-19FE56D27689}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Distributor", "src\distributor\NServiceBus.Unicast.Distributor\NServiceBus.Unicast.Distributor.csproj", "{D142D372-C9FA-4505-A6EB-E919746F0FF1}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Distributor.Runner", "src\distributor\NServiceBus.Unicast.Distributor.Runner\NServiceBus.Unicast.Distributor.Runner.csproj", "{D72C6682-16CE-4424-A875-435418118B61}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Transport.Msmq", "src\impl\unicast\NServiceBus.Unicast.Msmq\NServiceBus.Unicast.Transport.Msmq.csproj", "{487809CE-0B5D-4425-A6CA-06F7C444DBCC}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Subscriptions.Msmq", "src\impl\unicast\NServiceBus.Unicast.Subscriptions.Msmq\NServiceBus.Unicast.Subscriptions.Msmq.csproj", "{6657A1B8-3773-46A4-88F2-A421E074D35F}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast", "src\unicast\NServiceBus.Unicast\NServiceBus.Unicast.csproj", "{EB2C42A2-70FD-4469-959B-C577470B001B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Subscriptions", "src\unicast\NServiceBus.Unicast.Subscriptions\NServiceBus.Unicast.Subscriptions.csproj", "{CD9FA43E-A56D-4B62-8245-F911B137EC09}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Transport", "src\unicast\NServiceBus.Unicast.Transport\NServiceBus.Unicast.Transport.csproj", "{D9628493-605A-4259-ADD3-7732F0DEFFBB}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Messages", "Samples\WebServiceBridge\Messages\Messages.csproj", "{ED855B92-C7EB-4BE7-9072-5C2260C329FC}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server", "Samples\WebServiceBridge\Server\Server.csproj", "{E259AE1E-613E-41D8-B36A-F80343239363}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebApplication1", "Samples\WebServiceBridge\WebApplication1\WebApplication1.csproj", "{FE207907-5E5A-4E6C-BF00-9C1C9858F258}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebService1", "Samples\WebServiceBridge\WebService1\WebService1.csproj", "{20EE4282-E399-4253-81DF-F99A508DEE0D}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Saga", "src\core\NServiceBus.Saga\NServiceBus.Saga.csproj", "{C1DE5465-4694-475A-8D06-E17733C41D69}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Messages", "Samples\AsyncPages\Messages\Messages.csproj", "{0F1A46A2-D1CE-4DB1-9E75-45D41CCA7EA7}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server", "Samples\AsyncPages\Server\Server.csproj", "{C9491F30-6CCA-41D5-A9E6-1DC8758C4BE1}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebApplication1", "Samples\AsyncPages\WebApplication1\WebApplication1.csproj", "{562F1C2D-8279-482D-8474-30CDE9EE3269}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectBuilder", "src\ObjectBuilder\ObjectBuilder.csproj", "{C831B94E-6D08-404C-BA80-B8E8442EA9DE}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Grid.Messages", "src\grid\NServiceBus.Grid.Messages\NServiceBus.Grid.Messages.csproj", "{1C22F3DF-F020-491D-A680-5AE98D390140}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Grid.MessageHandlers", "src\grid\NServiceBus.Grid.MessageHandlers\NServiceBus.Grid.MessageHandlers.csproj", "{02D21488-C00A-4DD2-97BE-C0EA1CDB7206}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Grid", "src\tools\management\Grid\Grid\Grid.csproj", "{DEC520C3-D1CA-4EF6-94FB-4F24F1D92651}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UI", "src\tools\management\Grid\UI\UI.csproj", "{211C2BF6-5146-4019-8972-6AC87C90745B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Client", "Samples\FullDuplex\Client\Client.csproj", "{9F8E556C-0AFA-4C5D-B64F-AE9376ABF145}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Messages", "Samples\FullDuplex\Messages\Messages.csproj", "{20F613ED-C871-477C-B1E4-48B96CACF794}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server", "Samples\FullDuplex\Server\Server.csproj", "{CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Timeout.MessageHandlers", "src\timeout\Timeout.MessageHandlers\Timeout.MessageHandlers.csproj", "{7EA93511-0B01-4E6B-95C4-A3069A4A107A}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Messages", "Samples\PubSub\Messages\Messages.csproj", "{5686FE6C-A5E3-40D1-A6BD-25F94DA612F8}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server", "Samples\PubSub\Server\Server.csproj", "{7036A49B-359F-4BC7-AFBA-DE3C7AB41986}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Subscriber1", "Samples\PubSub\Subscriber1\Subscriber1.csproj", "{28DE496A-3885-410E-A0B8-004FAEFF9378}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Subscriber2", "Samples\PubSub\Subscriber2\Subscriber2.csproj", "{6A699A4E-F2FD-4B71-AF73-199B499482BD}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Config", "src\unicast\NServiceBus.Unicast.Config\NServiceBus.Unicast.Config.csproj", "{B6D6B021-F477-4C8C-B19E-9CB2ABBCA095}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Subscriptions.DB", "src\impl\unicast\NServiceBus.Unicast.Subscriptions.DB\NServiceBus.Unicast.Subscriptions.DB.csproj", "{FF96F021-897B-49D6-AF24-5533BB0961B9}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.MessageInterfaces", "src\messageInterfaces\NServiceBus.MessageInterfaces\NServiceBus.MessageInterfaces.csproj", "{F3D13CDB-B5AE-4CEE-BDA9-6A7007D09FA6}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.MessageInterfaces.MessageMapper.Reflection", "src\impl\messageInterfaces\NServiceBus.MessageInterfaces.MessageMapper.Reflection\NServiceBus.MessageInterfaces.MessageMapper.Reflection.csproj", "{4DF0FE9E-3608-426F-B6CB-AC55FE04D997}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Serializers.Binary", "src\impl\Serializers\NServiceBus.Serializers.Binary\NServiceBus.Serializers.Binary.csproj", "{4AB4015A-2DBF-44F9-9119-0E095703EC2D}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Serializers.XML", "src\impl\Serializers\NServiceBus.Serializers.XML\NServiceBus.Serializers.XML.csproj", "{4D9A660B-C2AF-42A8-AEB4-E2F97ED1CB3C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Serialization", "src\core\NServiceBus.Serialization\NServiceBus.Serialization.csproj", "{F7563AAC-BA9E-4762-888D-27DB9399AF54}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Utils", "src\utils\NServiceBus.Utils.csproj", "{2616579A-202F-48F6-8A7F-6A6AA9288CA7}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrderService", "Samples\Manufacturing\OrderService\OrderService\OrderService.csproj", "{452C5FEA-16C8-49E1-BC95-1EC55E49EECB}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrderService.Messages", "Samples\Manufacturing\OrderService\OrderService.Messages\OrderService.Messages.csproj", "{A490D793-1D1D-486F-B808-827010EF8369}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HR.Messages", "Samples\Manufacturing\HR.Messages\HR.Messages.csproj", "{BAC04722-7E15-485E-BA17-3EC46AB7FC3C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrderService.Tests", "Samples\Manufacturing\OrderService\OrderService.Tests\OrderService.Tests.csproj", "{CB39076B-B46C-416A-A9C1-D1032B4C50D6}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrderService.Host", "Samples\Manufacturing\OrderService\OrderService.Host\OrderService.Host.csproj", "{03E59C83-170A-4BF6-86FB-A05B75DE9510}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Partner", "Samples\Manufacturing\Partner\Partner.csproj", "{646585FC-12F6-4668-9926-A39E6CCD6400}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HR.MessageHandlers", "Samples\Manufacturing\HR.MessageHandlers\HR.MessageHandlers.csproj", "{96EE6700-2A16-4C7A-8EF9-3D81E0CE3470}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HR.Host", "Samples\Manufacturing\HR.Host\HR.Host.csproj", "{D3CA0BFC-8AE8-4828-90EE-0296D7DDF679}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProfilingTest", "src\impl\Serializers\ProfilingTest\ProfilingTest.csproj", "{CB32FA40-2A8A-4D40-81A2-C3EF1203A81D}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.SagaPersisters.NHibernate", "src\impl\SagaPersisters\NHibernateSagaPersister\NServiceBus.SagaPersisters.NHibernate\NServiceBus.SagaPersisters.NHibernate.csproj", "{4A904B94-8DC4-4C02-A4FD-374E78990374}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Tools.Management.Errors.ReturnToSourceQueue", "src\tools\management\Errors\ReturnToSourceQueue\NServiceBus.Tools.Management.Errors.ReturnToSourceQueue\NServiceBus.Tools.Management.Errors.ReturnToSourceQueue.csproj", "{B9CE6C00-1AE2-4125-BD1A-A7AABA1072CA}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReturnToSourceQueue", "src\tools\management\Errors\ReturnToSourceQueue\ReturnToSourceQueue\ReturnToSourceQueue.csproj", "{C4693C58-BB66-4630-984E-313E1BCC2474}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Testing", "src\testing\NServiceBus.Testing.csproj", "{8B815173-9AFA-4D95-BAB4-686C298F17DA}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Transport.Msmq.Config", "src\impl\unicast\NServiceBus.Unicast.Msmq\NServiceBus.Unicast.Transport.Msmq.Config\NServiceBus.Unicast.Transport.Msmq.Config.csproj", "{2D3D9033-200C-423E-BF8A-8FB40D8D1572}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Subscriptions.DB.Config", "src\impl\unicast\NServiceBus.Unicast.Subscriptions.DB\NServiceBus.Unicast.Subscriptions.DB.Config\NServiceBus.Unicast.Subscriptions.DB.Config.csproj", "{4A178990-A30D-437C-A7B2-775348ABF5DE}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Subscriptions.Msmq.Config", "src\impl\unicast\NServiceBus.Unicast.Subscriptions.Msmq\NServiceBus.Unicast.Subscriptions.Msmq.Config\NServiceBus.Unicast.Subscriptions.Msmq.Config.csproj", "{585AB2C3-17B3-49B4-BA59-B5861317D7B3}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Interop", "Interop", "{C4C7BB61-4F8B-4FE6-AD7D-BB258799380F}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InteropPartner", "Samples\Manufacturing\InteropPartner\InteropPartner.csproj", "{AF9929C8-85B8-4A36-9EC8-E46C17FE3B65}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Serializers.XML.Test", "src\impl\Serializers\NServiceBus.Serializers.XML.Test\NServiceBus.Serializers.XML.Test.csproj", "{45CC79AE-C0DE-486C-953B-7697C6E09E94}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Serializers.XML.XsdGenerator", "src\impl\Serializers\NServiceBus.Serializers.XML.XsdGenerator\NServiceBus.Serializers.XML.XsdGenerator.csproj", "{85118B5C-6CAA-44B4-87EA-419DC6F4F2FB}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "config", "config", "{8805DB2A-62B1-4055-9A72-571ABB8EC16E}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Config", "src\config\NServiceBus.Config\NServiceBus.Config.csproj", "{444FAA3D-D5E1-498E-9AE1-201DB619CAF0}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectBuilder.CastleWindsor", "src\impl\ObjectBuilder\ObjectBuilder.CastleWindsor\ObjectBuilder.CastleWindsor.csproj", "{9A9A0BD5-AC37-4B90-B90F-FD1C1395FEBD}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrderService.Persistence", "Samples\Manufacturing\OrderService\OrderService.Persistence\OrderService.Persistence.csproj", "{C34B917B-14A4-4FFB-A744-F32E9AFBAECD}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Serializers.Binary.Config", "src\impl\Serializers\NServiceBus.Serializers.Binary.Config\NServiceBus.Serializers.Binary.Config.csproj", "{D33E56FB-CD9E-4B1D-A0F1-1B272F154DC1}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Serializers.XML.Config", "src\impl\Serializers\NServiceBus.Serializers.XML.Config\NServiceBus.Serializers.XML.Config.csproj", "{17629A13-3ED4-4E88-B70C-DFFCBAE96A6A}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Versioning", "Versioning", "{570C81EC-F237-4F7A-915C-59EB4B6A148F}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "V1.Messages", "Samples\Versioning\V1.Messages\V1.Messages.csproj", "{9D27D517-B938-4594-8836-CE06A2955FFD}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "V1Subscriber", "Samples\Versioning\V1Subscriber\V1Subscriber.csproj", "{FBA8997D-01C8-458D-ACE6-28DC7BC32711}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "V2.Messages", "Samples\Versioning\V2.Messages\V2.Messages.csproj", "{D22F0CFF-D47F-4541-BD6D-3F07808EE468}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "V2Publisher", "Samples\Versioning\V2Publisher\V2Publisher.csproj", "{CCC62E59-19DD-44B7-B565-CEA7AE8A83EC}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "V2Subscriber", "Samples\Versioning\V2Subscriber\V2Subscriber.csproj", "{DCFE28B5-245F-4C28-869B-C42C73E816E5}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Saga.Config", "src\config\NServiceBus.Saga.Config\NServiceBus.Saga.Config.csproj", "{AC4EFBFD-CC81-4401-B24C-380A900B3C14}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectBuilder.StructureMap", "src\impl\ObjectBuilder\ObjectBuilder.StructureMap\ObjectBuilder.StructureMap.csproj", "{C05E5B87-EB74-4A3F-B4FC-AFDD28570850}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectBuilder.Autofac", "src\impl\ObjectBuilder\ObjectBuilder.Autofac\ObjectBuilder.Autofac.csproj", "{73EC4EBE-826D-4A0A-8837-51D3458FC2A8}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "host", "host", "{7332A8CB-3659-42D2-A3FC-587F67286C60}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{2D3A24D4-C815-4CDE-996E-82D2B770DBDC}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Host", "src\host\NServiceBus.Host\NServiceBus.Host.csproj", "{85E813C0-4A94-4946-8B1F-DE1E39AA7D11}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectBuilder.Common", "src\impl\ObjectBuilder.Common\ObjectBuilder.Common\ObjectBuilder.Common.csproj", "{771CDD6A-6880-4802-8EB1-F7A35386D9B4}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectBuilder.Common.Config", "src\impl\ObjectBuilder.Common\ObjectBuilder.Common.Config\ObjectBuilder.Common.Config.csproj", "{34C89D80-4F8D-48A6-AAB5-2D6DC5A1B953}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectBuilder.Spring", "src\impl\ObjectBuilder.Common\ObjectBuilder.Spring\ObjectBuilder.Spring.csproj", "{734D30CF-4376-488A-A6B4-1033FED93660}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectBuilder.Spring.Config", "src\impl\ObjectBuilder.Common\ObjectBuilder.Spring.Config\ObjectBuilder.Spring.Config.csproj", "{8C4C690F-6B4A-4908-AA7D-1AF9D117E267}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.SagaPersisters.NHibernate.Tests", "src\impl\SagaPersisters\NHibernateSagaPersister\NServiceBus.SagaPersisters.NHibernate.Tests\NServiceBus.SagaPersisters.NHibernate.Tests.csproj", "{7F1A7421-0335-43D4-8C50-4ED444D19336}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Subscriptions.NHibernate", "src\impl\unicast\NServiceBus.Unicast.Subscriptions.NHibernate\NServiceBus.Unicast.Subscriptions.NHibernate.csproj", "{FB2ACC79-1E04-47CA-8F4B-31327E10B5E3}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Subscriptions.NHibernate.Tests", "src\impl\unicast\NServiceBus.Unicast.Subscriptions.NHibernate.Tests\NServiceBus.Unicast.Subscriptions.NHibernate.Tests.csproj", "{06AE9368-B357-4682-8B79-1FB186BF38B5}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {73867D40-8CBB-48E9-BFFA-12BBDD48A341}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {73867D40-8CBB-48E9-BFFA-12BBDD48A341}.Debug|Any CPU.Build.0 = Debug|Any CPU - {73867D40-8CBB-48E9-BFFA-12BBDD48A341}.Release|Any CPU.ActiveCfg = Release|Any CPU - {73867D40-8CBB-48E9-BFFA-12BBDD48A341}.Release|Any CPU.Build.0 = Release|Any CPU - {A60CA2C3-0B28-4D03-9F0B-19FE56D27689}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A60CA2C3-0B28-4D03-9F0B-19FE56D27689}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A60CA2C3-0B28-4D03-9F0B-19FE56D27689}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A60CA2C3-0B28-4D03-9F0B-19FE56D27689}.Release|Any CPU.Build.0 = Release|Any CPU - {D142D372-C9FA-4505-A6EB-E919746F0FF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D142D372-C9FA-4505-A6EB-E919746F0FF1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D142D372-C9FA-4505-A6EB-E919746F0FF1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D142D372-C9FA-4505-A6EB-E919746F0FF1}.Release|Any CPU.Build.0 = Release|Any CPU - {D72C6682-16CE-4424-A875-435418118B61}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D72C6682-16CE-4424-A875-435418118B61}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D72C6682-16CE-4424-A875-435418118B61}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D72C6682-16CE-4424-A875-435418118B61}.Release|Any CPU.Build.0 = Release|Any CPU - {487809CE-0B5D-4425-A6CA-06F7C444DBCC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {487809CE-0B5D-4425-A6CA-06F7C444DBCC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {487809CE-0B5D-4425-A6CA-06F7C444DBCC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {487809CE-0B5D-4425-A6CA-06F7C444DBCC}.Release|Any CPU.Build.0 = Release|Any CPU - {6657A1B8-3773-46A4-88F2-A421E074D35F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6657A1B8-3773-46A4-88F2-A421E074D35F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6657A1B8-3773-46A4-88F2-A421E074D35F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6657A1B8-3773-46A4-88F2-A421E074D35F}.Release|Any CPU.Build.0 = Release|Any CPU - {EB2C42A2-70FD-4469-959B-C577470B001B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EB2C42A2-70FD-4469-959B-C577470B001B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EB2C42A2-70FD-4469-959B-C577470B001B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EB2C42A2-70FD-4469-959B-C577470B001B}.Release|Any CPU.Build.0 = Release|Any CPU - {CD9FA43E-A56D-4B62-8245-F911B137EC09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CD9FA43E-A56D-4B62-8245-F911B137EC09}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CD9FA43E-A56D-4B62-8245-F911B137EC09}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CD9FA43E-A56D-4B62-8245-F911B137EC09}.Release|Any CPU.Build.0 = Release|Any CPU - {D9628493-605A-4259-ADD3-7732F0DEFFBB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D9628493-605A-4259-ADD3-7732F0DEFFBB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D9628493-605A-4259-ADD3-7732F0DEFFBB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D9628493-605A-4259-ADD3-7732F0DEFFBB}.Release|Any CPU.Build.0 = Release|Any CPU - {ED855B92-C7EB-4BE7-9072-5C2260C329FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {ED855B92-C7EB-4BE7-9072-5C2260C329FC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {ED855B92-C7EB-4BE7-9072-5C2260C329FC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {ED855B92-C7EB-4BE7-9072-5C2260C329FC}.Release|Any CPU.Build.0 = Release|Any CPU - {E259AE1E-613E-41D8-B36A-F80343239363}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E259AE1E-613E-41D8-B36A-F80343239363}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E259AE1E-613E-41D8-B36A-F80343239363}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E259AE1E-613E-41D8-B36A-F80343239363}.Release|Any CPU.Build.0 = Release|Any CPU - {FE207907-5E5A-4E6C-BF00-9C1C9858F258}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FE207907-5E5A-4E6C-BF00-9C1C9858F258}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FE207907-5E5A-4E6C-BF00-9C1C9858F258}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FE207907-5E5A-4E6C-BF00-9C1C9858F258}.Release|Any CPU.Build.0 = Release|Any CPU - {20EE4282-E399-4253-81DF-F99A508DEE0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {20EE4282-E399-4253-81DF-F99A508DEE0D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {20EE4282-E399-4253-81DF-F99A508DEE0D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {20EE4282-E399-4253-81DF-F99A508DEE0D}.Release|Any CPU.Build.0 = Release|Any CPU - {C1DE5465-4694-475A-8D06-E17733C41D69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C1DE5465-4694-475A-8D06-E17733C41D69}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C1DE5465-4694-475A-8D06-E17733C41D69}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C1DE5465-4694-475A-8D06-E17733C41D69}.Release|Any CPU.Build.0 = Release|Any CPU - {0F1A46A2-D1CE-4DB1-9E75-45D41CCA7EA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0F1A46A2-D1CE-4DB1-9E75-45D41CCA7EA7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0F1A46A2-D1CE-4DB1-9E75-45D41CCA7EA7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0F1A46A2-D1CE-4DB1-9E75-45D41CCA7EA7}.Release|Any CPU.Build.0 = Release|Any CPU - {C9491F30-6CCA-41D5-A9E6-1DC8758C4BE1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C9491F30-6CCA-41D5-A9E6-1DC8758C4BE1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C9491F30-6CCA-41D5-A9E6-1DC8758C4BE1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C9491F30-6CCA-41D5-A9E6-1DC8758C4BE1}.Release|Any CPU.Build.0 = Release|Any CPU - {562F1C2D-8279-482D-8474-30CDE9EE3269}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {562F1C2D-8279-482D-8474-30CDE9EE3269}.Debug|Any CPU.Build.0 = Debug|Any CPU - {562F1C2D-8279-482D-8474-30CDE9EE3269}.Release|Any CPU.ActiveCfg = Release|Any CPU - {562F1C2D-8279-482D-8474-30CDE9EE3269}.Release|Any CPU.Build.0 = Release|Any CPU - {C831B94E-6D08-404C-BA80-B8E8442EA9DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C831B94E-6D08-404C-BA80-B8E8442EA9DE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C831B94E-6D08-404C-BA80-B8E8442EA9DE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C831B94E-6D08-404C-BA80-B8E8442EA9DE}.Release|Any CPU.Build.0 = Release|Any CPU - {1C22F3DF-F020-491D-A680-5AE98D390140}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1C22F3DF-F020-491D-A680-5AE98D390140}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1C22F3DF-F020-491D-A680-5AE98D390140}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1C22F3DF-F020-491D-A680-5AE98D390140}.Release|Any CPU.Build.0 = Release|Any CPU - {02D21488-C00A-4DD2-97BE-C0EA1CDB7206}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {02D21488-C00A-4DD2-97BE-C0EA1CDB7206}.Debug|Any CPU.Build.0 = Debug|Any CPU - {02D21488-C00A-4DD2-97BE-C0EA1CDB7206}.Release|Any CPU.ActiveCfg = Release|Any CPU - {02D21488-C00A-4DD2-97BE-C0EA1CDB7206}.Release|Any CPU.Build.0 = Release|Any CPU - {DEC520C3-D1CA-4EF6-94FB-4F24F1D92651}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DEC520C3-D1CA-4EF6-94FB-4F24F1D92651}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DEC520C3-D1CA-4EF6-94FB-4F24F1D92651}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DEC520C3-D1CA-4EF6-94FB-4F24F1D92651}.Release|Any CPU.Build.0 = Release|Any CPU - {211C2BF6-5146-4019-8972-6AC87C90745B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {211C2BF6-5146-4019-8972-6AC87C90745B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {211C2BF6-5146-4019-8972-6AC87C90745B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {211C2BF6-5146-4019-8972-6AC87C90745B}.Release|Any CPU.Build.0 = Release|Any CPU - {9F8E556C-0AFA-4C5D-B64F-AE9376ABF145}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9F8E556C-0AFA-4C5D-B64F-AE9376ABF145}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9F8E556C-0AFA-4C5D-B64F-AE9376ABF145}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9F8E556C-0AFA-4C5D-B64F-AE9376ABF145}.Release|Any CPU.Build.0 = Release|Any CPU - {20F613ED-C871-477C-B1E4-48B96CACF794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {20F613ED-C871-477C-B1E4-48B96CACF794}.Debug|Any CPU.Build.0 = Debug|Any CPU - {20F613ED-C871-477C-B1E4-48B96CACF794}.Release|Any CPU.ActiveCfg = Release|Any CPU - {20F613ED-C871-477C-B1E4-48B96CACF794}.Release|Any CPU.Build.0 = Release|Any CPU - {CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6}.Release|Any CPU.Build.0 = Release|Any CPU - {7EA93511-0B01-4E6B-95C4-A3069A4A107A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7EA93511-0B01-4E6B-95C4-A3069A4A107A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7EA93511-0B01-4E6B-95C4-A3069A4A107A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7EA93511-0B01-4E6B-95C4-A3069A4A107A}.Release|Any CPU.Build.0 = Release|Any CPU - {5686FE6C-A5E3-40D1-A6BD-25F94DA612F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5686FE6C-A5E3-40D1-A6BD-25F94DA612F8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5686FE6C-A5E3-40D1-A6BD-25F94DA612F8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5686FE6C-A5E3-40D1-A6BD-25F94DA612F8}.Release|Any CPU.Build.0 = Release|Any CPU - {7036A49B-359F-4BC7-AFBA-DE3C7AB41986}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7036A49B-359F-4BC7-AFBA-DE3C7AB41986}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7036A49B-359F-4BC7-AFBA-DE3C7AB41986}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7036A49B-359F-4BC7-AFBA-DE3C7AB41986}.Release|Any CPU.Build.0 = Release|Any CPU - {28DE496A-3885-410E-A0B8-004FAEFF9378}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {28DE496A-3885-410E-A0B8-004FAEFF9378}.Debug|Any CPU.Build.0 = Debug|Any CPU - {28DE496A-3885-410E-A0B8-004FAEFF9378}.Release|Any CPU.ActiveCfg = Release|Any CPU - {28DE496A-3885-410E-A0B8-004FAEFF9378}.Release|Any CPU.Build.0 = Release|Any CPU - {6A699A4E-F2FD-4B71-AF73-199B499482BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6A699A4E-F2FD-4B71-AF73-199B499482BD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6A699A4E-F2FD-4B71-AF73-199B499482BD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6A699A4E-F2FD-4B71-AF73-199B499482BD}.Release|Any CPU.Build.0 = Release|Any CPU - {B6D6B021-F477-4C8C-B19E-9CB2ABBCA095}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B6D6B021-F477-4C8C-B19E-9CB2ABBCA095}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B6D6B021-F477-4C8C-B19E-9CB2ABBCA095}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B6D6B021-F477-4C8C-B19E-9CB2ABBCA095}.Release|Any CPU.Build.0 = Release|Any CPU - {FF96F021-897B-49D6-AF24-5533BB0961B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FF96F021-897B-49D6-AF24-5533BB0961B9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FF96F021-897B-49D6-AF24-5533BB0961B9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FF96F021-897B-49D6-AF24-5533BB0961B9}.Release|Any CPU.Build.0 = Release|Any CPU - {F3D13CDB-B5AE-4CEE-BDA9-6A7007D09FA6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F3D13CDB-B5AE-4CEE-BDA9-6A7007D09FA6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F3D13CDB-B5AE-4CEE-BDA9-6A7007D09FA6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F3D13CDB-B5AE-4CEE-BDA9-6A7007D09FA6}.Release|Any CPU.Build.0 = Release|Any CPU - {4DF0FE9E-3608-426F-B6CB-AC55FE04D997}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4DF0FE9E-3608-426F-B6CB-AC55FE04D997}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4DF0FE9E-3608-426F-B6CB-AC55FE04D997}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4DF0FE9E-3608-426F-B6CB-AC55FE04D997}.Release|Any CPU.Build.0 = Release|Any CPU - {4AB4015A-2DBF-44F9-9119-0E095703EC2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4AB4015A-2DBF-44F9-9119-0E095703EC2D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4AB4015A-2DBF-44F9-9119-0E095703EC2D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4AB4015A-2DBF-44F9-9119-0E095703EC2D}.Release|Any CPU.Build.0 = Release|Any CPU - {4D9A660B-C2AF-42A8-AEB4-E2F97ED1CB3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4D9A660B-C2AF-42A8-AEB4-E2F97ED1CB3C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4D9A660B-C2AF-42A8-AEB4-E2F97ED1CB3C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4D9A660B-C2AF-42A8-AEB4-E2F97ED1CB3C}.Release|Any CPU.Build.0 = Release|Any CPU - {F7563AAC-BA9E-4762-888D-27DB9399AF54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F7563AAC-BA9E-4762-888D-27DB9399AF54}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F7563AAC-BA9E-4762-888D-27DB9399AF54}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F7563AAC-BA9E-4762-888D-27DB9399AF54}.Release|Any CPU.Build.0 = Release|Any CPU - {2616579A-202F-48F6-8A7F-6A6AA9288CA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2616579A-202F-48F6-8A7F-6A6AA9288CA7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2616579A-202F-48F6-8A7F-6A6AA9288CA7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2616579A-202F-48F6-8A7F-6A6AA9288CA7}.Release|Any CPU.Build.0 = Release|Any CPU - {452C5FEA-16C8-49E1-BC95-1EC55E49EECB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {452C5FEA-16C8-49E1-BC95-1EC55E49EECB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {452C5FEA-16C8-49E1-BC95-1EC55E49EECB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {452C5FEA-16C8-49E1-BC95-1EC55E49EECB}.Release|Any CPU.Build.0 = Release|Any CPU - {A490D793-1D1D-486F-B808-827010EF8369}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A490D793-1D1D-486F-B808-827010EF8369}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A490D793-1D1D-486F-B808-827010EF8369}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A490D793-1D1D-486F-B808-827010EF8369}.Release|Any CPU.Build.0 = Release|Any CPU - {BAC04722-7E15-485E-BA17-3EC46AB7FC3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BAC04722-7E15-485E-BA17-3EC46AB7FC3C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BAC04722-7E15-485E-BA17-3EC46AB7FC3C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BAC04722-7E15-485E-BA17-3EC46AB7FC3C}.Release|Any CPU.Build.0 = Release|Any CPU - {CB39076B-B46C-416A-A9C1-D1032B4C50D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CB39076B-B46C-416A-A9C1-D1032B4C50D6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CB39076B-B46C-416A-A9C1-D1032B4C50D6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CB39076B-B46C-416A-A9C1-D1032B4C50D6}.Release|Any CPU.Build.0 = Release|Any CPU - {03E59C83-170A-4BF6-86FB-A05B75DE9510}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {03E59C83-170A-4BF6-86FB-A05B75DE9510}.Debug|Any CPU.Build.0 = Debug|Any CPU - {03E59C83-170A-4BF6-86FB-A05B75DE9510}.Release|Any CPU.ActiveCfg = Release|Any CPU - {03E59C83-170A-4BF6-86FB-A05B75DE9510}.Release|Any CPU.Build.0 = Release|Any CPU - {646585FC-12F6-4668-9926-A39E6CCD6400}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {646585FC-12F6-4668-9926-A39E6CCD6400}.Debug|Any CPU.Build.0 = Debug|Any CPU - {646585FC-12F6-4668-9926-A39E6CCD6400}.Release|Any CPU.ActiveCfg = Release|Any CPU - {646585FC-12F6-4668-9926-A39E6CCD6400}.Release|Any CPU.Build.0 = Release|Any CPU - {96EE6700-2A16-4C7A-8EF9-3D81E0CE3470}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {96EE6700-2A16-4C7A-8EF9-3D81E0CE3470}.Debug|Any CPU.Build.0 = Debug|Any CPU - {96EE6700-2A16-4C7A-8EF9-3D81E0CE3470}.Release|Any CPU.ActiveCfg = Release|Any CPU - {96EE6700-2A16-4C7A-8EF9-3D81E0CE3470}.Release|Any CPU.Build.0 = Release|Any CPU - {D3CA0BFC-8AE8-4828-90EE-0296D7DDF679}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D3CA0BFC-8AE8-4828-90EE-0296D7DDF679}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D3CA0BFC-8AE8-4828-90EE-0296D7DDF679}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D3CA0BFC-8AE8-4828-90EE-0296D7DDF679}.Release|Any CPU.Build.0 = Release|Any CPU - {CB32FA40-2A8A-4D40-81A2-C3EF1203A81D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CB32FA40-2A8A-4D40-81A2-C3EF1203A81D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CB32FA40-2A8A-4D40-81A2-C3EF1203A81D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CB32FA40-2A8A-4D40-81A2-C3EF1203A81D}.Release|Any CPU.Build.0 = Release|Any CPU - {4A904B94-8DC4-4C02-A4FD-374E78990374}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4A904B94-8DC4-4C02-A4FD-374E78990374}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4A904B94-8DC4-4C02-A4FD-374E78990374}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4A904B94-8DC4-4C02-A4FD-374E78990374}.Release|Any CPU.Build.0 = Release|Any CPU - {B9CE6C00-1AE2-4125-BD1A-A7AABA1072CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B9CE6C00-1AE2-4125-BD1A-A7AABA1072CA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B9CE6C00-1AE2-4125-BD1A-A7AABA1072CA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B9CE6C00-1AE2-4125-BD1A-A7AABA1072CA}.Release|Any CPU.Build.0 = Release|Any CPU - {C4693C58-BB66-4630-984E-313E1BCC2474}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C4693C58-BB66-4630-984E-313E1BCC2474}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C4693C58-BB66-4630-984E-313E1BCC2474}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C4693C58-BB66-4630-984E-313E1BCC2474}.Release|Any CPU.Build.0 = Release|Any CPU - {8B815173-9AFA-4D95-BAB4-686C298F17DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8B815173-9AFA-4D95-BAB4-686C298F17DA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8B815173-9AFA-4D95-BAB4-686C298F17DA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8B815173-9AFA-4D95-BAB4-686C298F17DA}.Release|Any CPU.Build.0 = Release|Any CPU - {2D3D9033-200C-423E-BF8A-8FB40D8D1572}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2D3D9033-200C-423E-BF8A-8FB40D8D1572}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2D3D9033-200C-423E-BF8A-8FB40D8D1572}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2D3D9033-200C-423E-BF8A-8FB40D8D1572}.Release|Any CPU.Build.0 = Release|Any CPU - {4A178990-A30D-437C-A7B2-775348ABF5DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4A178990-A30D-437C-A7B2-775348ABF5DE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4A178990-A30D-437C-A7B2-775348ABF5DE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4A178990-A30D-437C-A7B2-775348ABF5DE}.Release|Any CPU.Build.0 = Release|Any CPU - {585AB2C3-17B3-49B4-BA59-B5861317D7B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {585AB2C3-17B3-49B4-BA59-B5861317D7B3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {585AB2C3-17B3-49B4-BA59-B5861317D7B3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {585AB2C3-17B3-49B4-BA59-B5861317D7B3}.Release|Any CPU.Build.0 = Release|Any CPU - {AF9929C8-85B8-4A36-9EC8-E46C17FE3B65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AF9929C8-85B8-4A36-9EC8-E46C17FE3B65}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AF9929C8-85B8-4A36-9EC8-E46C17FE3B65}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AF9929C8-85B8-4A36-9EC8-E46C17FE3B65}.Release|Any CPU.Build.0 = Release|Any CPU - {45CC79AE-C0DE-486C-953B-7697C6E09E94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {45CC79AE-C0DE-486C-953B-7697C6E09E94}.Debug|Any CPU.Build.0 = Debug|Any CPU - {45CC79AE-C0DE-486C-953B-7697C6E09E94}.Release|Any CPU.ActiveCfg = Release|Any CPU - {45CC79AE-C0DE-486C-953B-7697C6E09E94}.Release|Any CPU.Build.0 = Release|Any CPU - {85118B5C-6CAA-44B4-87EA-419DC6F4F2FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {85118B5C-6CAA-44B4-87EA-419DC6F4F2FB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {85118B5C-6CAA-44B4-87EA-419DC6F4F2FB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {85118B5C-6CAA-44B4-87EA-419DC6F4F2FB}.Release|Any CPU.Build.0 = Release|Any CPU - {444FAA3D-D5E1-498E-9AE1-201DB619CAF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {444FAA3D-D5E1-498E-9AE1-201DB619CAF0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {444FAA3D-D5E1-498E-9AE1-201DB619CAF0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {444FAA3D-D5E1-498E-9AE1-201DB619CAF0}.Release|Any CPU.Build.0 = Release|Any CPU - {9A9A0BD5-AC37-4B90-B90F-FD1C1395FEBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9A9A0BD5-AC37-4B90-B90F-FD1C1395FEBD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9A9A0BD5-AC37-4B90-B90F-FD1C1395FEBD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9A9A0BD5-AC37-4B90-B90F-FD1C1395FEBD}.Release|Any CPU.Build.0 = Release|Any CPU - {C34B917B-14A4-4FFB-A744-F32E9AFBAECD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C34B917B-14A4-4FFB-A744-F32E9AFBAECD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C34B917B-14A4-4FFB-A744-F32E9AFBAECD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C34B917B-14A4-4FFB-A744-F32E9AFBAECD}.Release|Any CPU.Build.0 = Release|Any CPU - {D33E56FB-CD9E-4B1D-A0F1-1B272F154DC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D33E56FB-CD9E-4B1D-A0F1-1B272F154DC1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D33E56FB-CD9E-4B1D-A0F1-1B272F154DC1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D33E56FB-CD9E-4B1D-A0F1-1B272F154DC1}.Release|Any CPU.Build.0 = Release|Any CPU - {17629A13-3ED4-4E88-B70C-DFFCBAE96A6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {17629A13-3ED4-4E88-B70C-DFFCBAE96A6A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {17629A13-3ED4-4E88-B70C-DFFCBAE96A6A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {17629A13-3ED4-4E88-B70C-DFFCBAE96A6A}.Release|Any CPU.Build.0 = Release|Any CPU - {9D27D517-B938-4594-8836-CE06A2955FFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9D27D517-B938-4594-8836-CE06A2955FFD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9D27D517-B938-4594-8836-CE06A2955FFD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9D27D517-B938-4594-8836-CE06A2955FFD}.Release|Any CPU.Build.0 = Release|Any CPU - {FBA8997D-01C8-458D-ACE6-28DC7BC32711}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FBA8997D-01C8-458D-ACE6-28DC7BC32711}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FBA8997D-01C8-458D-ACE6-28DC7BC32711}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FBA8997D-01C8-458D-ACE6-28DC7BC32711}.Release|Any CPU.Build.0 = Release|Any CPU - {D22F0CFF-D47F-4541-BD6D-3F07808EE468}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D22F0CFF-D47F-4541-BD6D-3F07808EE468}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D22F0CFF-D47F-4541-BD6D-3F07808EE468}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D22F0CFF-D47F-4541-BD6D-3F07808EE468}.Release|Any CPU.Build.0 = Release|Any CPU - {CCC62E59-19DD-44B7-B565-CEA7AE8A83EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CCC62E59-19DD-44B7-B565-CEA7AE8A83EC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CCC62E59-19DD-44B7-B565-CEA7AE8A83EC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CCC62E59-19DD-44B7-B565-CEA7AE8A83EC}.Release|Any CPU.Build.0 = Release|Any CPU - {DCFE28B5-245F-4C28-869B-C42C73E816E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DCFE28B5-245F-4C28-869B-C42C73E816E5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DCFE28B5-245F-4C28-869B-C42C73E816E5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DCFE28B5-245F-4C28-869B-C42C73E816E5}.Release|Any CPU.Build.0 = Release|Any CPU - {AC4EFBFD-CC81-4401-B24C-380A900B3C14}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AC4EFBFD-CC81-4401-B24C-380A900B3C14}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AC4EFBFD-CC81-4401-B24C-380A900B3C14}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AC4EFBFD-CC81-4401-B24C-380A900B3C14}.Release|Any CPU.Build.0 = Release|Any CPU - {C05E5B87-EB74-4A3F-B4FC-AFDD28570850}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C05E5B87-EB74-4A3F-B4FC-AFDD28570850}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C05E5B87-EB74-4A3F-B4FC-AFDD28570850}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C05E5B87-EB74-4A3F-B4FC-AFDD28570850}.Release|Any CPU.Build.0 = Release|Any CPU - {73EC4EBE-826D-4A0A-8837-51D3458FC2A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {73EC4EBE-826D-4A0A-8837-51D3458FC2A8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {73EC4EBE-826D-4A0A-8837-51D3458FC2A8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {73EC4EBE-826D-4A0A-8837-51D3458FC2A8}.Release|Any CPU.Build.0 = Release|Any CPU - {85E813C0-4A94-4946-8B1F-DE1E39AA7D11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {85E813C0-4A94-4946-8B1F-DE1E39AA7D11}.Debug|Any CPU.Build.0 = Debug|Any CPU - {85E813C0-4A94-4946-8B1F-DE1E39AA7D11}.Release|Any CPU.ActiveCfg = Release|Any CPU - {85E813C0-4A94-4946-8B1F-DE1E39AA7D11}.Release|Any CPU.Build.0 = Release|Any CPU - {771CDD6A-6880-4802-8EB1-F7A35386D9B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {771CDD6A-6880-4802-8EB1-F7A35386D9B4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {771CDD6A-6880-4802-8EB1-F7A35386D9B4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {771CDD6A-6880-4802-8EB1-F7A35386D9B4}.Release|Any CPU.Build.0 = Release|Any CPU - {34C89D80-4F8D-48A6-AAB5-2D6DC5A1B953}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {34C89D80-4F8D-48A6-AAB5-2D6DC5A1B953}.Debug|Any CPU.Build.0 = Debug|Any CPU - {34C89D80-4F8D-48A6-AAB5-2D6DC5A1B953}.Release|Any CPU.ActiveCfg = Release|Any CPU - {34C89D80-4F8D-48A6-AAB5-2D6DC5A1B953}.Release|Any CPU.Build.0 = Release|Any CPU - {734D30CF-4376-488A-A6B4-1033FED93660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {734D30CF-4376-488A-A6B4-1033FED93660}.Debug|Any CPU.Build.0 = Debug|Any CPU - {734D30CF-4376-488A-A6B4-1033FED93660}.Release|Any CPU.ActiveCfg = Release|Any CPU - {734D30CF-4376-488A-A6B4-1033FED93660}.Release|Any CPU.Build.0 = Release|Any CPU - {8C4C690F-6B4A-4908-AA7D-1AF9D117E267}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8C4C690F-6B4A-4908-AA7D-1AF9D117E267}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8C4C690F-6B4A-4908-AA7D-1AF9D117E267}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8C4C690F-6B4A-4908-AA7D-1AF9D117E267}.Release|Any CPU.Build.0 = Release|Any CPU - {7F1A7421-0335-43D4-8C50-4ED444D19336}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7F1A7421-0335-43D4-8C50-4ED444D19336}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7F1A7421-0335-43D4-8C50-4ED444D19336}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7F1A7421-0335-43D4-8C50-4ED444D19336}.Release|Any CPU.Build.0 = Release|Any CPU - {FB2ACC79-1E04-47CA-8F4B-31327E10B5E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FB2ACC79-1E04-47CA-8F4B-31327E10B5E3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FB2ACC79-1E04-47CA-8F4B-31327E10B5E3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FB2ACC79-1E04-47CA-8F4B-31327E10B5E3}.Release|Any CPU.Build.0 = Release|Any CPU - {06AE9368-B357-4682-8B79-1FB186BF38B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {06AE9368-B357-4682-8B79-1FB186BF38B5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {06AE9368-B357-4682-8B79-1FB186BF38B5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {06AE9368-B357-4682-8B79-1FB186BF38B5}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {4A182899-5624-4FF0-8753-D2E8E31AF140} = {6CEB2C22-90CC-4161-952D-7ED706BB8387} - {8C38D3A9-16E6-40A0-A813-818A45BF0374} = {6CEB2C22-90CC-4161-952D-7ED706BB8387} - {7B56E082-A287-4400-B069-D1625C229E55} = {6CEB2C22-90CC-4161-952D-7ED706BB8387} - {2BC45674-F407-45D5-B299-BF314DAF88BE} = {6CEB2C22-90CC-4161-952D-7ED706BB8387} - {AE680ED6-74D9-4D85-834F-E9F20DE9C2B4} = {6CEB2C22-90CC-4161-952D-7ED706BB8387} - {5B85CA4F-0E58-413A-932E-2FF6A757DB74} = {6CEB2C22-90CC-4161-952D-7ED706BB8387} - {B46133C5-7441-4F05-BC44-7E67B5EDAA4D} = {6CEB2C22-90CC-4161-952D-7ED706BB8387} - {3D1ACC82-B571-400D-AECA-C50B97E17845} = {6CEB2C22-90CC-4161-952D-7ED706BB8387} - {9AE18F6C-57A6-4026-8427-8F4A366B5FA5} = {6CEB2C22-90CC-4161-952D-7ED706BB8387} - {0711BE68-5F6B-4570-9471-1D615084CE6B} = {6CEB2C22-90CC-4161-952D-7ED706BB8387} - {8805DB2A-62B1-4055-9A72-571ABB8EC16E} = {6CEB2C22-90CC-4161-952D-7ED706BB8387} - {7332A8CB-3659-42D2-A3FC-587F67286C60} = {6CEB2C22-90CC-4161-952D-7ED706BB8387} - {2D3A24D4-C815-4CDE-996E-82D2B770DBDC} = {6CEB2C22-90CC-4161-952D-7ED706BB8387} - {73867D40-8CBB-48E9-BFFA-12BBDD48A341} = {4A182899-5624-4FF0-8753-D2E8E31AF140} - {C1DE5465-4694-475A-8D06-E17733C41D69} = {4A182899-5624-4FF0-8753-D2E8E31AF140} - {F7563AAC-BA9E-4762-888D-27DB9399AF54} = {4A182899-5624-4FF0-8753-D2E8E31AF140} - {A60CA2C3-0B28-4D03-9F0B-19FE56D27689} = {8C38D3A9-16E6-40A0-A813-818A45BF0374} - {D142D372-C9FA-4505-A6EB-E919746F0FF1} = {8C38D3A9-16E6-40A0-A813-818A45BF0374} - {D72C6682-16CE-4424-A875-435418118B61} = {8C38D3A9-16E6-40A0-A813-818A45BF0374} - {D8B58938-14AF-4FA2-BAC3-7FE59721B7E0} = {7B56E082-A287-4400-B069-D1625C229E55} - {12392715-B9A3-433E-B395-C0031569A864} = {7B56E082-A287-4400-B069-D1625C229E55} - {102BD992-A123-4B71-B9C7-7FFAA515FACE} = {7B56E082-A287-4400-B069-D1625C229E55} - {7959A868-6A54-4A64-8706-F063CC1476A5} = {7B56E082-A287-4400-B069-D1625C229E55} - {7A0566CF-5BAF-48E0-B105-C6BF2E77A3A1} = {7B56E082-A287-4400-B069-D1625C229E55} - {487809CE-0B5D-4425-A6CA-06F7C444DBCC} = {D8B58938-14AF-4FA2-BAC3-7FE59721B7E0} - {6657A1B8-3773-46A4-88F2-A421E074D35F} = {D8B58938-14AF-4FA2-BAC3-7FE59721B7E0} - {FF96F021-897B-49D6-AF24-5533BB0961B9} = {D8B58938-14AF-4FA2-BAC3-7FE59721B7E0} - {2D3D9033-200C-423E-BF8A-8FB40D8D1572} = {D8B58938-14AF-4FA2-BAC3-7FE59721B7E0} - {4A178990-A30D-437C-A7B2-775348ABF5DE} = {D8B58938-14AF-4FA2-BAC3-7FE59721B7E0} - {585AB2C3-17B3-49B4-BA59-B5861317D7B3} = {D8B58938-14AF-4FA2-BAC3-7FE59721B7E0} - {FB2ACC79-1E04-47CA-8F4B-31327E10B5E3} = {D8B58938-14AF-4FA2-BAC3-7FE59721B7E0} - {06AE9368-B357-4682-8B79-1FB186BF38B5} = {D8B58938-14AF-4FA2-BAC3-7FE59721B7E0} - {EB2C42A2-70FD-4469-959B-C577470B001B} = {2BC45674-F407-45D5-B299-BF314DAF88BE} - {CD9FA43E-A56D-4B62-8245-F911B137EC09} = {2BC45674-F407-45D5-B299-BF314DAF88BE} - {D9628493-605A-4259-ADD3-7732F0DEFFBB} = {2BC45674-F407-45D5-B299-BF314DAF88BE} - {B6D6B021-F477-4C8C-B19E-9CB2ABBCA095} = {2BC45674-F407-45D5-B299-BF314DAF88BE} - {2616579A-202F-48F6-8A7F-6A6AA9288CA7} = {AE680ED6-74D9-4D85-834F-E9F20DE9C2B4} - {EE641ACE-ABE5-4ACE-9AAE-DC52C55B51F9} = {4ECE40D6-7EA4-4D65-89FE-2D0915D29B5E} - {B351256F-5A1C-435F-A81E-97EC2E4EB155} = {4ECE40D6-7EA4-4D65-89FE-2D0915D29B5E} - {BE42D213-AE26-4C5D-9766-39A18BB166B9} = {4ECE40D6-7EA4-4D65-89FE-2D0915D29B5E} - {5931F01B-C194-4720-A181-458B1672581A} = {4ECE40D6-7EA4-4D65-89FE-2D0915D29B5E} - {8C092982-A337-4013-A277-481813BD09D6} = {4ECE40D6-7EA4-4D65-89FE-2D0915D29B5E} - {570C81EC-F237-4F7A-915C-59EB4B6A148F} = {4ECE40D6-7EA4-4D65-89FE-2D0915D29B5E} - {ED855B92-C7EB-4BE7-9072-5C2260C329FC} = {EE641ACE-ABE5-4ACE-9AAE-DC52C55B51F9} - {E259AE1E-613E-41D8-B36A-F80343239363} = {EE641ACE-ABE5-4ACE-9AAE-DC52C55B51F9} - {FE207907-5E5A-4E6C-BF00-9C1C9858F258} = {EE641ACE-ABE5-4ACE-9AAE-DC52C55B51F9} - {20EE4282-E399-4253-81DF-F99A508DEE0D} = {EE641ACE-ABE5-4ACE-9AAE-DC52C55B51F9} - {0F1A46A2-D1CE-4DB1-9E75-45D41CCA7EA7} = {B351256F-5A1C-435F-A81E-97EC2E4EB155} - {C9491F30-6CCA-41D5-A9E6-1DC8758C4BE1} = {B351256F-5A1C-435F-A81E-97EC2E4EB155} - {562F1C2D-8279-482D-8474-30CDE9EE3269} = {B351256F-5A1C-435F-A81E-97EC2E4EB155} - {4A904B94-8DC4-4C02-A4FD-374E78990374} = {12392715-B9A3-433E-B395-C0031569A864} - {7F1A7421-0335-43D4-8C50-4ED444D19336} = {12392715-B9A3-433E-B395-C0031569A864} - {C831B94E-6D08-404C-BA80-B8E8442EA9DE} = {5B85CA4F-0E58-413A-932E-2FF6A757DB74} - {9A9A0BD5-AC37-4B90-B90F-FD1C1395FEBD} = {102BD992-A123-4B71-B9C7-7FFAA515FACE} - {C05E5B87-EB74-4A3F-B4FC-AFDD28570850} = {102BD992-A123-4B71-B9C7-7FFAA515FACE} - {73EC4EBE-826D-4A0A-8837-51D3458FC2A8} = {102BD992-A123-4B71-B9C7-7FFAA515FACE} - {771CDD6A-6880-4802-8EB1-F7A35386D9B4} = {102BD992-A123-4B71-B9C7-7FFAA515FACE} - {34C89D80-4F8D-48A6-AAB5-2D6DC5A1B953} = {102BD992-A123-4B71-B9C7-7FFAA515FACE} - {734D30CF-4376-488A-A6B4-1033FED93660} = {102BD992-A123-4B71-B9C7-7FFAA515FACE} - {8C4C690F-6B4A-4908-AA7D-1AF9D117E267} = {102BD992-A123-4B71-B9C7-7FFAA515FACE} - {1C22F3DF-F020-491D-A680-5AE98D390140} = {B46133C5-7441-4F05-BC44-7E67B5EDAA4D} - {02D21488-C00A-4DD2-97BE-C0EA1CDB7206} = {B46133C5-7441-4F05-BC44-7E67B5EDAA4D} - {50CF4253-AABB-475D-87DD-D8A2C7CF236D} = {51E8903A-31C8-42CC-AEB9-AD813EE282F4} - {058A28C7-57DE-44B4-AA26-CE8A57FF7147} = {50CF4253-AABB-475D-87DD-D8A2C7CF236D} - {F32296DF-E899-425F-9EE7-CDBD8995E00B} = {50CF4253-AABB-475D-87DD-D8A2C7CF236D} - {DEC520C3-D1CA-4EF6-94FB-4F24F1D92651} = {058A28C7-57DE-44B4-AA26-CE8A57FF7147} - {211C2BF6-5146-4019-8972-6AC87C90745B} = {058A28C7-57DE-44B4-AA26-CE8A57FF7147} - {9F8E556C-0AFA-4C5D-B64F-AE9376ABF145} = {BE42D213-AE26-4C5D-9766-39A18BB166B9} - {20F613ED-C871-477C-B1E4-48B96CACF794} = {BE42D213-AE26-4C5D-9766-39A18BB166B9} - {CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6} = {BE42D213-AE26-4C5D-9766-39A18BB166B9} - {7EA93511-0B01-4E6B-95C4-A3069A4A107A} = {3D1ACC82-B571-400D-AECA-C50B97E17845} - {5686FE6C-A5E3-40D1-A6BD-25F94DA612F8} = {5931F01B-C194-4720-A181-458B1672581A} - {7036A49B-359F-4BC7-AFBA-DE3C7AB41986} = {5931F01B-C194-4720-A181-458B1672581A} - {28DE496A-3885-410E-A0B8-004FAEFF9378} = {5931F01B-C194-4720-A181-458B1672581A} - {6A699A4E-F2FD-4B71-AF73-199B499482BD} = {5931F01B-C194-4720-A181-458B1672581A} - {F3D13CDB-B5AE-4CEE-BDA9-6A7007D09FA6} = {9AE18F6C-57A6-4026-8427-8F4A366B5FA5} - {4DF0FE9E-3608-426F-B6CB-AC55FE04D997} = {7959A868-6A54-4A64-8706-F063CC1476A5} - {4AB4015A-2DBF-44F9-9119-0E095703EC2D} = {7A0566CF-5BAF-48E0-B105-C6BF2E77A3A1} - {4D9A660B-C2AF-42A8-AEB4-E2F97ED1CB3C} = {7A0566CF-5BAF-48E0-B105-C6BF2E77A3A1} - {CB32FA40-2A8A-4D40-81A2-C3EF1203A81D} = {7A0566CF-5BAF-48E0-B105-C6BF2E77A3A1} - {45CC79AE-C0DE-486C-953B-7697C6E09E94} = {7A0566CF-5BAF-48E0-B105-C6BF2E77A3A1} - {85118B5C-6CAA-44B4-87EA-419DC6F4F2FB} = {7A0566CF-5BAF-48E0-B105-C6BF2E77A3A1} - {D33E56FB-CD9E-4B1D-A0F1-1B272F154DC1} = {7A0566CF-5BAF-48E0-B105-C6BF2E77A3A1} - {17629A13-3ED4-4E88-B70C-DFFCBAE96A6A} = {7A0566CF-5BAF-48E0-B105-C6BF2E77A3A1} - {4111FD2B-3E6A-4A1B-A9B3-44E5E2259BD3} = {8C092982-A337-4013-A277-481813BD09D6} - {937799AF-0B7F-4AC2-81B8-0A4348E499E3} = {8C092982-A337-4013-A277-481813BD09D6} - {997214B7-CB1B-4E18-836F-49290BDDED12} = {8C092982-A337-4013-A277-481813BD09D6} - {C4C7BB61-4F8B-4FE6-AD7D-BB258799380F} = {8C092982-A337-4013-A277-481813BD09D6} - {452C5FEA-16C8-49E1-BC95-1EC55E49EECB} = {4111FD2B-3E6A-4A1B-A9B3-44E5E2259BD3} - {A490D793-1D1D-486F-B808-827010EF8369} = {4111FD2B-3E6A-4A1B-A9B3-44E5E2259BD3} - {CB39076B-B46C-416A-A9C1-D1032B4C50D6} = {4111FD2B-3E6A-4A1B-A9B3-44E5E2259BD3} - {03E59C83-170A-4BF6-86FB-A05B75DE9510} = {4111FD2B-3E6A-4A1B-A9B3-44E5E2259BD3} - {C34B917B-14A4-4FFB-A744-F32E9AFBAECD} = {4111FD2B-3E6A-4A1B-A9B3-44E5E2259BD3} - {BAC04722-7E15-485E-BA17-3EC46AB7FC3C} = {937799AF-0B7F-4AC2-81B8-0A4348E499E3} - {96EE6700-2A16-4C7A-8EF9-3D81E0CE3470} = {937799AF-0B7F-4AC2-81B8-0A4348E499E3} - {D3CA0BFC-8AE8-4828-90EE-0296D7DDF679} = {937799AF-0B7F-4AC2-81B8-0A4348E499E3} - {646585FC-12F6-4668-9926-A39E6CCD6400} = {997214B7-CB1B-4E18-836F-49290BDDED12} - {B9CE6C00-1AE2-4125-BD1A-A7AABA1072CA} = {F32296DF-E899-425F-9EE7-CDBD8995E00B} - {C4693C58-BB66-4630-984E-313E1BCC2474} = {F32296DF-E899-425F-9EE7-CDBD8995E00B} - {8B815173-9AFA-4D95-BAB4-686C298F17DA} = {0711BE68-5F6B-4570-9471-1D615084CE6B} - {AF9929C8-85B8-4A36-9EC8-E46C17FE3B65} = {C4C7BB61-4F8B-4FE6-AD7D-BB258799380F} - {444FAA3D-D5E1-498E-9AE1-201DB619CAF0} = {8805DB2A-62B1-4055-9A72-571ABB8EC16E} - {AC4EFBFD-CC81-4401-B24C-380A900B3C14} = {8805DB2A-62B1-4055-9A72-571ABB8EC16E} - {9D27D517-B938-4594-8836-CE06A2955FFD} = {570C81EC-F237-4F7A-915C-59EB4B6A148F} - {FBA8997D-01C8-458D-ACE6-28DC7BC32711} = {570C81EC-F237-4F7A-915C-59EB4B6A148F} - {D22F0CFF-D47F-4541-BD6D-3F07808EE468} = {570C81EC-F237-4F7A-915C-59EB4B6A148F} - {CCC62E59-19DD-44B7-B565-CEA7AE8A83EC} = {570C81EC-F237-4F7A-915C-59EB4B6A148F} - {DCFE28B5-245F-4C28-869B-C42C73E816E5} = {570C81EC-F237-4F7A-915C-59EB4B6A148F} - {85E813C0-4A94-4946-8B1F-DE1E39AA7D11} = {7332A8CB-3659-42D2-A3FC-587F67286C60} - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "core", "core", "{4A182899-5624-4FF0-8753-D2E8E31AF140}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{6CEB2C22-90CC-4161-952D-7ED706BB8387}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "distributor", "distributor", "{8C38D3A9-16E6-40A0-A813-818A45BF0374}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "impl", "impl", "{7B56E082-A287-4400-B069-D1625C229E55}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "unicast", "unicast", "{D8B58938-14AF-4FA2-BAC3-7FE59721B7E0}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "unicast", "unicast", "{2BC45674-F407-45D5-B299-BF314DAF88BE}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "utils", "utils", "{AE680ED6-74D9-4D85-834F-E9F20DE9C2B4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Samples", "Samples", "{4ECE40D6-7EA4-4D65-89FE-2D0915D29B5E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WebServiceBridge", "WebServiceBridge", "{EE641ACE-ABE5-4ACE-9AAE-DC52C55B51F9}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AsyncPages", "AsyncPages", "{B351256F-5A1C-435F-A81E-97EC2E4EB155}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SagaPersisters", "SagaPersisters", "{12392715-B9A3-433E-B395-C0031569A864}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ObjectBuilder", "ObjectBuilder", "{5B85CA4F-0E58-413A-932E-2FF6A757DB74}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ObjectBuilder", "ObjectBuilder", "{102BD992-A123-4B71-B9C7-7FFAA515FACE}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "grid", "grid", "{B46133C5-7441-4F05-BC44-7E67B5EDAA4D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{51E8903A-31C8-42CC-AEB9-AD813EE282F4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "management", "management", "{50CF4253-AABB-475D-87DD-D8A2C7CF236D}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "grid", "grid", "{058A28C7-57DE-44B4-AA26-CE8A57FF7147}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "FullDuplex", "FullDuplex", "{BE42D213-AE26-4C5D-9766-39A18BB166B9}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "timeout", "timeout", "{3D1ACC82-B571-400D-AECA-C50B97E17845}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PubSub", "PubSub", "{5931F01B-C194-4720-A181-458B1672581A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "messageInterfaces", "messageInterfaces", "{9AE18F6C-57A6-4026-8427-8F4A366B5FA5}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "messageInterfaces", "messageInterfaces", "{7959A868-6A54-4A64-8706-F063CC1476A5}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Serializers", "Serializers", "{7A0566CF-5BAF-48E0-B105-C6BF2E77A3A1}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Manufacturing", "Manufacturing", "{8C092982-A337-4013-A277-481813BD09D6}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "OrderService", "OrderService", "{4111FD2B-3E6A-4A1B-A9B3-44E5E2259BD3}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "HR", "HR", "{937799AF-0B7F-4AC2-81B8-0A4348E499E3}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Partner", "Partner", "{997214B7-CB1B-4E18-836F-49290BDDED12}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "errors", "errors", "{F32296DF-E899-425F-9EE7-CDBD8995E00B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "testing", "testing", "{0711BE68-5F6B-4570-9471-1D615084CE6B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus", "src\core\NServiceBus\NServiceBus.csproj", "{73867D40-8CBB-48E9-BFFA-12BBDD48A341}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MsmqWorkerAvailabilityManager", "src\distributor\MsmqWorkerAvailabilityManager\MsmqWorkerAvailabilityManager.csproj", "{A60CA2C3-0B28-4D03-9F0B-19FE56D27689}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Distributor", "src\distributor\NServiceBus.Unicast.Distributor\NServiceBus.Unicast.Distributor.csproj", "{D142D372-C9FA-4505-A6EB-E919746F0FF1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Distributor.Runner", "src\distributor\NServiceBus.Unicast.Distributor.Runner\NServiceBus.Unicast.Distributor.Runner.csproj", "{D72C6682-16CE-4424-A875-435418118B61}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Transport.Msmq", "src\impl\unicast\NServiceBus.Unicast.Msmq\NServiceBus.Unicast.Transport.Msmq.csproj", "{487809CE-0B5D-4425-A6CA-06F7C444DBCC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Subscriptions.Msmq", "src\impl\unicast\NServiceBus.Unicast.Subscriptions.Msmq\NServiceBus.Unicast.Subscriptions.Msmq.csproj", "{6657A1B8-3773-46A4-88F2-A421E074D35F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast", "src\unicast\NServiceBus.Unicast\NServiceBus.Unicast.csproj", "{EB2C42A2-70FD-4469-959B-C577470B001B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Subscriptions", "src\unicast\NServiceBus.Unicast.Subscriptions\NServiceBus.Unicast.Subscriptions.csproj", "{CD9FA43E-A56D-4B62-8245-F911B137EC09}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Transport", "src\unicast\NServiceBus.Unicast.Transport\NServiceBus.Unicast.Transport.csproj", "{D9628493-605A-4259-ADD3-7732F0DEFFBB}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Messages", "Samples\WebServiceBridge\Messages\Messages.csproj", "{ED855B92-C7EB-4BE7-9072-5C2260C329FC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server", "Samples\WebServiceBridge\Server\Server.csproj", "{E259AE1E-613E-41D8-B36A-F80343239363}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebApplication1", "Samples\WebServiceBridge\WebApplication1\WebApplication1.csproj", "{FE207907-5E5A-4E6C-BF00-9C1C9858F258}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebService1", "Samples\WebServiceBridge\WebService1\WebService1.csproj", "{20EE4282-E399-4253-81DF-F99A508DEE0D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Saga", "src\core\NServiceBus.Saga\NServiceBus.Saga.csproj", "{C1DE5465-4694-475A-8D06-E17733C41D69}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Messages", "Samples\AsyncPages\Messages\Messages.csproj", "{0F1A46A2-D1CE-4DB1-9E75-45D41CCA7EA7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server", "Samples\AsyncPages\Server\Server.csproj", "{C9491F30-6CCA-41D5-A9E6-1DC8758C4BE1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebApplication1", "Samples\AsyncPages\WebApplication1\WebApplication1.csproj", "{562F1C2D-8279-482D-8474-30CDE9EE3269}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectBuilder", "src\ObjectBuilder\ObjectBuilder.csproj", "{C831B94E-6D08-404C-BA80-B8E8442EA9DE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Grid.Messages", "src\grid\NServiceBus.Grid.Messages\NServiceBus.Grid.Messages.csproj", "{1C22F3DF-F020-491D-A680-5AE98D390140}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Grid.MessageHandlers", "src\grid\NServiceBus.Grid.MessageHandlers\NServiceBus.Grid.MessageHandlers.csproj", "{02D21488-C00A-4DD2-97BE-C0EA1CDB7206}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Grid", "src\tools\management\Grid\Grid\Grid.csproj", "{DEC520C3-D1CA-4EF6-94FB-4F24F1D92651}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UI", "src\tools\management\Grid\UI\UI.csproj", "{211C2BF6-5146-4019-8972-6AC87C90745B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Client", "Samples\FullDuplex\Client\Client.csproj", "{9F8E556C-0AFA-4C5D-B64F-AE9376ABF145}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Messages", "Samples\FullDuplex\Messages\Messages.csproj", "{20F613ED-C871-477C-B1E4-48B96CACF794}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server", "Samples\FullDuplex\Server\Server.csproj", "{CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Timeout.MessageHandlers", "src\timeout\Timeout.MessageHandlers\Timeout.MessageHandlers.csproj", "{7EA93511-0B01-4E6B-95C4-A3069A4A107A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Messages", "Samples\PubSub\Messages\Messages.csproj", "{5686FE6C-A5E3-40D1-A6BD-25F94DA612F8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server", "Samples\PubSub\Server\Server.csproj", "{7036A49B-359F-4BC7-AFBA-DE3C7AB41986}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Subscriber1", "Samples\PubSub\Subscriber1\Subscriber1.csproj", "{28DE496A-3885-410E-A0B8-004FAEFF9378}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Subscriber2", "Samples\PubSub\Subscriber2\Subscriber2.csproj", "{6A699A4E-F2FD-4B71-AF73-199B499482BD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Config", "src\unicast\NServiceBus.Unicast.Config\NServiceBus.Unicast.Config.csproj", "{B6D6B021-F477-4C8C-B19E-9CB2ABBCA095}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Subscriptions.DB", "src\impl\unicast\NServiceBus.Unicast.Subscriptions.DB\NServiceBus.Unicast.Subscriptions.DB.csproj", "{FF96F021-897B-49D6-AF24-5533BB0961B9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.MessageInterfaces", "src\messageInterfaces\NServiceBus.MessageInterfaces\NServiceBus.MessageInterfaces.csproj", "{F3D13CDB-B5AE-4CEE-BDA9-6A7007D09FA6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.MessageInterfaces.MessageMapper.Reflection", "src\impl\messageInterfaces\NServiceBus.MessageInterfaces.MessageMapper.Reflection\NServiceBus.MessageInterfaces.MessageMapper.Reflection.csproj", "{4DF0FE9E-3608-426F-B6CB-AC55FE04D997}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Serializers.Binary", "src\impl\Serializers\NServiceBus.Serializers.Binary\NServiceBus.Serializers.Binary.csproj", "{4AB4015A-2DBF-44F9-9119-0E095703EC2D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Serializers.XML", "src\impl\Serializers\NServiceBus.Serializers.XML\NServiceBus.Serializers.XML.csproj", "{4D9A660B-C2AF-42A8-AEB4-E2F97ED1CB3C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Serialization", "src\core\NServiceBus.Serialization\NServiceBus.Serialization.csproj", "{F7563AAC-BA9E-4762-888D-27DB9399AF54}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Utils", "src\utils\NServiceBus.Utils.csproj", "{2616579A-202F-48F6-8A7F-6A6AA9288CA7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrderService", "Samples\Manufacturing\OrderService\OrderService\OrderService.csproj", "{452C5FEA-16C8-49E1-BC95-1EC55E49EECB}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrderService.Messages", "Samples\Manufacturing\OrderService\OrderService.Messages\OrderService.Messages.csproj", "{A490D793-1D1D-486F-B808-827010EF8369}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HR.Messages", "Samples\Manufacturing\HR.Messages\HR.Messages.csproj", "{BAC04722-7E15-485E-BA17-3EC46AB7FC3C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrderService.Tests", "Samples\Manufacturing\OrderService\OrderService.Tests\OrderService.Tests.csproj", "{CB39076B-B46C-416A-A9C1-D1032B4C50D6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrderService.Host", "Samples\Manufacturing\OrderService\OrderService.Host\OrderService.Host.csproj", "{03E59C83-170A-4BF6-86FB-A05B75DE9510}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Partner", "Samples\Manufacturing\Partner\Partner.csproj", "{646585FC-12F6-4668-9926-A39E6CCD6400}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HR.MessageHandlers", "Samples\Manufacturing\HR.MessageHandlers\HR.MessageHandlers.csproj", "{96EE6700-2A16-4C7A-8EF9-3D81E0CE3470}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HR.Host", "Samples\Manufacturing\HR.Host\HR.Host.csproj", "{D3CA0BFC-8AE8-4828-90EE-0296D7DDF679}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProfilingTest", "src\impl\Serializers\ProfilingTest\ProfilingTest.csproj", "{CB32FA40-2A8A-4D40-81A2-C3EF1203A81D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.SagaPersisters.NHibernate", "src\impl\SagaPersisters\NHibernateSagaPersister\NServiceBus.SagaPersisters.NHibernate\NServiceBus.SagaPersisters.NHibernate.csproj", "{4A904B94-8DC4-4C02-A4FD-374E78990374}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Tools.Management.Errors.ReturnToSourceQueue", "src\tools\management\Errors\ReturnToSourceQueue\NServiceBus.Tools.Management.Errors.ReturnToSourceQueue\NServiceBus.Tools.Management.Errors.ReturnToSourceQueue.csproj", "{B9CE6C00-1AE2-4125-BD1A-A7AABA1072CA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReturnToSourceQueue", "src\tools\management\Errors\ReturnToSourceQueue\ReturnToSourceQueue\ReturnToSourceQueue.csproj", "{C4693C58-BB66-4630-984E-313E1BCC2474}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Testing", "src\testing\NServiceBus.Testing.csproj", "{8B815173-9AFA-4D95-BAB4-686C298F17DA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Transport.Msmq.Config", "src\impl\unicast\NServiceBus.Unicast.Msmq\NServiceBus.Unicast.Transport.Msmq.Config\NServiceBus.Unicast.Transport.Msmq.Config.csproj", "{2D3D9033-200C-423E-BF8A-8FB40D8D1572}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Subscriptions.DB.Config", "src\impl\unicast\NServiceBus.Unicast.Subscriptions.DB\NServiceBus.Unicast.Subscriptions.DB.Config\NServiceBus.Unicast.Subscriptions.DB.Config.csproj", "{4A178990-A30D-437C-A7B2-775348ABF5DE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Subscriptions.Msmq.Config", "src\impl\unicast\NServiceBus.Unicast.Subscriptions.Msmq\NServiceBus.Unicast.Subscriptions.Msmq.Config\NServiceBus.Unicast.Subscriptions.Msmq.Config.csproj", "{585AB2C3-17B3-49B4-BA59-B5861317D7B3}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Interop", "Interop", "{C4C7BB61-4F8B-4FE6-AD7D-BB258799380F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InteropPartner", "Samples\Manufacturing\InteropPartner\InteropPartner.csproj", "{AF9929C8-85B8-4A36-9EC8-E46C17FE3B65}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Serializers.XML.Test", "src\impl\Serializers\NServiceBus.Serializers.XML.Test\NServiceBus.Serializers.XML.Test.csproj", "{45CC79AE-C0DE-486C-953B-7697C6E09E94}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Serializers.XML.XsdGenerator", "src\impl\Serializers\NServiceBus.Serializers.XML.XsdGenerator\NServiceBus.Serializers.XML.XsdGenerator.csproj", "{85118B5C-6CAA-44B4-87EA-419DC6F4F2FB}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "config", "config", "{8805DB2A-62B1-4055-9A72-571ABB8EC16E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Config", "src\config\NServiceBus.Config\NServiceBus.Config.csproj", "{444FAA3D-D5E1-498E-9AE1-201DB619CAF0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectBuilder.CastleWindsor", "src\impl\ObjectBuilder\ObjectBuilder.CastleWindsor\ObjectBuilder.CastleWindsor.csproj", "{9A9A0BD5-AC37-4B90-B90F-FD1C1395FEBD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrderService.Persistence", "Samples\Manufacturing\OrderService\OrderService.Persistence\OrderService.Persistence.csproj", "{C34B917B-14A4-4FFB-A744-F32E9AFBAECD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Serializers.Binary.Config", "src\impl\Serializers\NServiceBus.Serializers.Binary.Config\NServiceBus.Serializers.Binary.Config.csproj", "{D33E56FB-CD9E-4B1D-A0F1-1B272F154DC1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Serializers.XML.Config", "src\impl\Serializers\NServiceBus.Serializers.XML.Config\NServiceBus.Serializers.XML.Config.csproj", "{17629A13-3ED4-4E88-B70C-DFFCBAE96A6A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Versioning", "Versioning", "{570C81EC-F237-4F7A-915C-59EB4B6A148F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "V1.Messages", "Samples\Versioning\V1.Messages\V1.Messages.csproj", "{9D27D517-B938-4594-8836-CE06A2955FFD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "V1Subscriber", "Samples\Versioning\V1Subscriber\V1Subscriber.csproj", "{FBA8997D-01C8-458D-ACE6-28DC7BC32711}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "V2.Messages", "Samples\Versioning\V2.Messages\V2.Messages.csproj", "{D22F0CFF-D47F-4541-BD6D-3F07808EE468}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "V2Publisher", "Samples\Versioning\V2Publisher\V2Publisher.csproj", "{CCC62E59-19DD-44B7-B565-CEA7AE8A83EC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "V2Subscriber", "Samples\Versioning\V2Subscriber\V2Subscriber.csproj", "{DCFE28B5-245F-4C28-869B-C42C73E816E5}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Saga.Config", "src\config\NServiceBus.Saga.Config\NServiceBus.Saga.Config.csproj", "{AC4EFBFD-CC81-4401-B24C-380A900B3C14}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectBuilder.StructureMap", "src\impl\ObjectBuilder\ObjectBuilder.StructureMap\ObjectBuilder.StructureMap.csproj", "{C05E5B87-EB74-4A3F-B4FC-AFDD28570850}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectBuilder.Autofac", "src\impl\ObjectBuilder\ObjectBuilder.Autofac\ObjectBuilder.Autofac.csproj", "{73EC4EBE-826D-4A0A-8837-51D3458FC2A8}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "host", "host", "{7332A8CB-3659-42D2-A3FC-587F67286C60}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{2D3A24D4-C815-4CDE-996E-82D2B770DBDC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Host", "src\host\NServiceBus.Host\NServiceBus.Host.csproj", "{85E813C0-4A94-4946-8B1F-DE1E39AA7D11}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectBuilder.Common", "src\impl\ObjectBuilder.Common\ObjectBuilder.Common\ObjectBuilder.Common.csproj", "{771CDD6A-6880-4802-8EB1-F7A35386D9B4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectBuilder.Common.Config", "src\impl\ObjectBuilder.Common\ObjectBuilder.Common.Config\ObjectBuilder.Common.Config.csproj", "{34C89D80-4F8D-48A6-AAB5-2D6DC5A1B953}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectBuilder.Spring", "src\impl\ObjectBuilder.Common\ObjectBuilder.Spring\ObjectBuilder.Spring.csproj", "{734D30CF-4376-488A-A6B4-1033FED93660}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectBuilder.Spring.Config", "src\impl\ObjectBuilder.Common\ObjectBuilder.Spring.Config\ObjectBuilder.Spring.Config.csproj", "{8C4C690F-6B4A-4908-AA7D-1AF9D117E267}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.SagaPersisters.NHibernate.Tests", "src\impl\SagaPersisters\NHibernateSagaPersister\NServiceBus.SagaPersisters.NHibernate.Tests\NServiceBus.SagaPersisters.NHibernate.Tests.csproj", "{7F1A7421-0335-43D4-8C50-4ED444D19336}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Subscriptions.NHibernate", "src\impl\unicast\NServiceBus.Unicast.Subscriptions.NHibernate\NServiceBus.Unicast.Subscriptions.NHibernate.csproj", "{FB2ACC79-1E04-47CA-8F4B-31327E10B5E3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Subscriptions.NHibernate.Tests", "src\impl\unicast\NServiceBus.Unicast.Subscriptions.NHibernate.Tests\NServiceBus.Unicast.Subscriptions.NHibernate.Tests.csproj", "{06AE9368-B357-4682-8B79-1FB186BF38B5}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {73867D40-8CBB-48E9-BFFA-12BBDD48A341}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {73867D40-8CBB-48E9-BFFA-12BBDD48A341}.Debug|Any CPU.Build.0 = Debug|Any CPU + {73867D40-8CBB-48E9-BFFA-12BBDD48A341}.Release|Any CPU.ActiveCfg = Release|Any CPU + {73867D40-8CBB-48E9-BFFA-12BBDD48A341}.Release|Any CPU.Build.0 = Release|Any CPU + {A60CA2C3-0B28-4D03-9F0B-19FE56D27689}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A60CA2C3-0B28-4D03-9F0B-19FE56D27689}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A60CA2C3-0B28-4D03-9F0B-19FE56D27689}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A60CA2C3-0B28-4D03-9F0B-19FE56D27689}.Release|Any CPU.Build.0 = Release|Any CPU + {D142D372-C9FA-4505-A6EB-E919746F0FF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D142D372-C9FA-4505-A6EB-E919746F0FF1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D142D372-C9FA-4505-A6EB-E919746F0FF1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D142D372-C9FA-4505-A6EB-E919746F0FF1}.Release|Any CPU.Build.0 = Release|Any CPU + {D72C6682-16CE-4424-A875-435418118B61}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D72C6682-16CE-4424-A875-435418118B61}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D72C6682-16CE-4424-A875-435418118B61}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D72C6682-16CE-4424-A875-435418118B61}.Release|Any CPU.Build.0 = Release|Any CPU + {487809CE-0B5D-4425-A6CA-06F7C444DBCC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {487809CE-0B5D-4425-A6CA-06F7C444DBCC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {487809CE-0B5D-4425-A6CA-06F7C444DBCC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {487809CE-0B5D-4425-A6CA-06F7C444DBCC}.Release|Any CPU.Build.0 = Release|Any CPU + {6657A1B8-3773-46A4-88F2-A421E074D35F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6657A1B8-3773-46A4-88F2-A421E074D35F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6657A1B8-3773-46A4-88F2-A421E074D35F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6657A1B8-3773-46A4-88F2-A421E074D35F}.Release|Any CPU.Build.0 = Release|Any CPU + {EB2C42A2-70FD-4469-959B-C577470B001B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EB2C42A2-70FD-4469-959B-C577470B001B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EB2C42A2-70FD-4469-959B-C577470B001B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EB2C42A2-70FD-4469-959B-C577470B001B}.Release|Any CPU.Build.0 = Release|Any CPU + {CD9FA43E-A56D-4B62-8245-F911B137EC09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CD9FA43E-A56D-4B62-8245-F911B137EC09}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CD9FA43E-A56D-4B62-8245-F911B137EC09}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CD9FA43E-A56D-4B62-8245-F911B137EC09}.Release|Any CPU.Build.0 = Release|Any CPU + {D9628493-605A-4259-ADD3-7732F0DEFFBB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D9628493-605A-4259-ADD3-7732F0DEFFBB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D9628493-605A-4259-ADD3-7732F0DEFFBB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D9628493-605A-4259-ADD3-7732F0DEFFBB}.Release|Any CPU.Build.0 = Release|Any CPU + {ED855B92-C7EB-4BE7-9072-5C2260C329FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ED855B92-C7EB-4BE7-9072-5C2260C329FC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ED855B92-C7EB-4BE7-9072-5C2260C329FC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ED855B92-C7EB-4BE7-9072-5C2260C329FC}.Release|Any CPU.Build.0 = Release|Any CPU + {E259AE1E-613E-41D8-B36A-F80343239363}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E259AE1E-613E-41D8-B36A-F80343239363}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E259AE1E-613E-41D8-B36A-F80343239363}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E259AE1E-613E-41D8-B36A-F80343239363}.Release|Any CPU.Build.0 = Release|Any CPU + {FE207907-5E5A-4E6C-BF00-9C1C9858F258}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FE207907-5E5A-4E6C-BF00-9C1C9858F258}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FE207907-5E5A-4E6C-BF00-9C1C9858F258}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FE207907-5E5A-4E6C-BF00-9C1C9858F258}.Release|Any CPU.Build.0 = Release|Any CPU + {20EE4282-E399-4253-81DF-F99A508DEE0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {20EE4282-E399-4253-81DF-F99A508DEE0D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {20EE4282-E399-4253-81DF-F99A508DEE0D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {20EE4282-E399-4253-81DF-F99A508DEE0D}.Release|Any CPU.Build.0 = Release|Any CPU + {C1DE5465-4694-475A-8D06-E17733C41D69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C1DE5465-4694-475A-8D06-E17733C41D69}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C1DE5465-4694-475A-8D06-E17733C41D69}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C1DE5465-4694-475A-8D06-E17733C41D69}.Release|Any CPU.Build.0 = Release|Any CPU + {0F1A46A2-D1CE-4DB1-9E75-45D41CCA7EA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0F1A46A2-D1CE-4DB1-9E75-45D41CCA7EA7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0F1A46A2-D1CE-4DB1-9E75-45D41CCA7EA7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0F1A46A2-D1CE-4DB1-9E75-45D41CCA7EA7}.Release|Any CPU.Build.0 = Release|Any CPU + {C9491F30-6CCA-41D5-A9E6-1DC8758C4BE1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C9491F30-6CCA-41D5-A9E6-1DC8758C4BE1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C9491F30-6CCA-41D5-A9E6-1DC8758C4BE1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C9491F30-6CCA-41D5-A9E6-1DC8758C4BE1}.Release|Any CPU.Build.0 = Release|Any CPU + {562F1C2D-8279-482D-8474-30CDE9EE3269}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {562F1C2D-8279-482D-8474-30CDE9EE3269}.Debug|Any CPU.Build.0 = Debug|Any CPU + {562F1C2D-8279-482D-8474-30CDE9EE3269}.Release|Any CPU.ActiveCfg = Release|Any CPU + {562F1C2D-8279-482D-8474-30CDE9EE3269}.Release|Any CPU.Build.0 = Release|Any CPU + {C831B94E-6D08-404C-BA80-B8E8442EA9DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C831B94E-6D08-404C-BA80-B8E8442EA9DE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C831B94E-6D08-404C-BA80-B8E8442EA9DE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C831B94E-6D08-404C-BA80-B8E8442EA9DE}.Release|Any CPU.Build.0 = Release|Any CPU + {1C22F3DF-F020-491D-A680-5AE98D390140}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1C22F3DF-F020-491D-A680-5AE98D390140}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1C22F3DF-F020-491D-A680-5AE98D390140}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1C22F3DF-F020-491D-A680-5AE98D390140}.Release|Any CPU.Build.0 = Release|Any CPU + {02D21488-C00A-4DD2-97BE-C0EA1CDB7206}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {02D21488-C00A-4DD2-97BE-C0EA1CDB7206}.Debug|Any CPU.Build.0 = Debug|Any CPU + {02D21488-C00A-4DD2-97BE-C0EA1CDB7206}.Release|Any CPU.ActiveCfg = Release|Any CPU + {02D21488-C00A-4DD2-97BE-C0EA1CDB7206}.Release|Any CPU.Build.0 = Release|Any CPU + {DEC520C3-D1CA-4EF6-94FB-4F24F1D92651}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DEC520C3-D1CA-4EF6-94FB-4F24F1D92651}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DEC520C3-D1CA-4EF6-94FB-4F24F1D92651}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DEC520C3-D1CA-4EF6-94FB-4F24F1D92651}.Release|Any CPU.Build.0 = Release|Any CPU + {211C2BF6-5146-4019-8972-6AC87C90745B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {211C2BF6-5146-4019-8972-6AC87C90745B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {211C2BF6-5146-4019-8972-6AC87C90745B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {211C2BF6-5146-4019-8972-6AC87C90745B}.Release|Any CPU.Build.0 = Release|Any CPU + {9F8E556C-0AFA-4C5D-B64F-AE9376ABF145}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9F8E556C-0AFA-4C5D-B64F-AE9376ABF145}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9F8E556C-0AFA-4C5D-B64F-AE9376ABF145}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9F8E556C-0AFA-4C5D-B64F-AE9376ABF145}.Release|Any CPU.Build.0 = Release|Any CPU + {20F613ED-C871-477C-B1E4-48B96CACF794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {20F613ED-C871-477C-B1E4-48B96CACF794}.Debug|Any CPU.Build.0 = Debug|Any CPU + {20F613ED-C871-477C-B1E4-48B96CACF794}.Release|Any CPU.ActiveCfg = Release|Any CPU + {20F613ED-C871-477C-B1E4-48B96CACF794}.Release|Any CPU.Build.0 = Release|Any CPU + {CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6}.Release|Any CPU.Build.0 = Release|Any CPU + {7EA93511-0B01-4E6B-95C4-A3069A4A107A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7EA93511-0B01-4E6B-95C4-A3069A4A107A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7EA93511-0B01-4E6B-95C4-A3069A4A107A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7EA93511-0B01-4E6B-95C4-A3069A4A107A}.Release|Any CPU.Build.0 = Release|Any CPU + {5686FE6C-A5E3-40D1-A6BD-25F94DA612F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5686FE6C-A5E3-40D1-A6BD-25F94DA612F8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5686FE6C-A5E3-40D1-A6BD-25F94DA612F8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5686FE6C-A5E3-40D1-A6BD-25F94DA612F8}.Release|Any CPU.Build.0 = Release|Any CPU + {7036A49B-359F-4BC7-AFBA-DE3C7AB41986}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7036A49B-359F-4BC7-AFBA-DE3C7AB41986}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7036A49B-359F-4BC7-AFBA-DE3C7AB41986}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7036A49B-359F-4BC7-AFBA-DE3C7AB41986}.Release|Any CPU.Build.0 = Release|Any CPU + {28DE496A-3885-410E-A0B8-004FAEFF9378}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28DE496A-3885-410E-A0B8-004FAEFF9378}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28DE496A-3885-410E-A0B8-004FAEFF9378}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28DE496A-3885-410E-A0B8-004FAEFF9378}.Release|Any CPU.Build.0 = Release|Any CPU + {6A699A4E-F2FD-4B71-AF73-199B499482BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6A699A4E-F2FD-4B71-AF73-199B499482BD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6A699A4E-F2FD-4B71-AF73-199B499482BD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6A699A4E-F2FD-4B71-AF73-199B499482BD}.Release|Any CPU.Build.0 = Release|Any CPU + {B6D6B021-F477-4C8C-B19E-9CB2ABBCA095}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B6D6B021-F477-4C8C-B19E-9CB2ABBCA095}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B6D6B021-F477-4C8C-B19E-9CB2ABBCA095}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B6D6B021-F477-4C8C-B19E-9CB2ABBCA095}.Release|Any CPU.Build.0 = Release|Any CPU + {FF96F021-897B-49D6-AF24-5533BB0961B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FF96F021-897B-49D6-AF24-5533BB0961B9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FF96F021-897B-49D6-AF24-5533BB0961B9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FF96F021-897B-49D6-AF24-5533BB0961B9}.Release|Any CPU.Build.0 = Release|Any CPU + {F3D13CDB-B5AE-4CEE-BDA9-6A7007D09FA6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F3D13CDB-B5AE-4CEE-BDA9-6A7007D09FA6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F3D13CDB-B5AE-4CEE-BDA9-6A7007D09FA6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F3D13CDB-B5AE-4CEE-BDA9-6A7007D09FA6}.Release|Any CPU.Build.0 = Release|Any CPU + {4DF0FE9E-3608-426F-B6CB-AC55FE04D997}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4DF0FE9E-3608-426F-B6CB-AC55FE04D997}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4DF0FE9E-3608-426F-B6CB-AC55FE04D997}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4DF0FE9E-3608-426F-B6CB-AC55FE04D997}.Release|Any CPU.Build.0 = Release|Any CPU + {4AB4015A-2DBF-44F9-9119-0E095703EC2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4AB4015A-2DBF-44F9-9119-0E095703EC2D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4AB4015A-2DBF-44F9-9119-0E095703EC2D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4AB4015A-2DBF-44F9-9119-0E095703EC2D}.Release|Any CPU.Build.0 = Release|Any CPU + {4D9A660B-C2AF-42A8-AEB4-E2F97ED1CB3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4D9A660B-C2AF-42A8-AEB4-E2F97ED1CB3C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4D9A660B-C2AF-42A8-AEB4-E2F97ED1CB3C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4D9A660B-C2AF-42A8-AEB4-E2F97ED1CB3C}.Release|Any CPU.Build.0 = Release|Any CPU + {F7563AAC-BA9E-4762-888D-27DB9399AF54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F7563AAC-BA9E-4762-888D-27DB9399AF54}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F7563AAC-BA9E-4762-888D-27DB9399AF54}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F7563AAC-BA9E-4762-888D-27DB9399AF54}.Release|Any CPU.Build.0 = Release|Any CPU + {2616579A-202F-48F6-8A7F-6A6AA9288CA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2616579A-202F-48F6-8A7F-6A6AA9288CA7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2616579A-202F-48F6-8A7F-6A6AA9288CA7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2616579A-202F-48F6-8A7F-6A6AA9288CA7}.Release|Any CPU.Build.0 = Release|Any CPU + {452C5FEA-16C8-49E1-BC95-1EC55E49EECB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {452C5FEA-16C8-49E1-BC95-1EC55E49EECB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {452C5FEA-16C8-49E1-BC95-1EC55E49EECB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {452C5FEA-16C8-49E1-BC95-1EC55E49EECB}.Release|Any CPU.Build.0 = Release|Any CPU + {A490D793-1D1D-486F-B808-827010EF8369}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A490D793-1D1D-486F-B808-827010EF8369}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A490D793-1D1D-486F-B808-827010EF8369}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A490D793-1D1D-486F-B808-827010EF8369}.Release|Any CPU.Build.0 = Release|Any CPU + {BAC04722-7E15-485E-BA17-3EC46AB7FC3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BAC04722-7E15-485E-BA17-3EC46AB7FC3C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BAC04722-7E15-485E-BA17-3EC46AB7FC3C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BAC04722-7E15-485E-BA17-3EC46AB7FC3C}.Release|Any CPU.Build.0 = Release|Any CPU + {CB39076B-B46C-416A-A9C1-D1032B4C50D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CB39076B-B46C-416A-A9C1-D1032B4C50D6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CB39076B-B46C-416A-A9C1-D1032B4C50D6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CB39076B-B46C-416A-A9C1-D1032B4C50D6}.Release|Any CPU.Build.0 = Release|Any CPU + {03E59C83-170A-4BF6-86FB-A05B75DE9510}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {03E59C83-170A-4BF6-86FB-A05B75DE9510}.Debug|Any CPU.Build.0 = Debug|Any CPU + {03E59C83-170A-4BF6-86FB-A05B75DE9510}.Release|Any CPU.ActiveCfg = Release|Any CPU + {03E59C83-170A-4BF6-86FB-A05B75DE9510}.Release|Any CPU.Build.0 = Release|Any CPU + {646585FC-12F6-4668-9926-A39E6CCD6400}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {646585FC-12F6-4668-9926-A39E6CCD6400}.Debug|Any CPU.Build.0 = Debug|Any CPU + {646585FC-12F6-4668-9926-A39E6CCD6400}.Release|Any CPU.ActiveCfg = Release|Any CPU + {646585FC-12F6-4668-9926-A39E6CCD6400}.Release|Any CPU.Build.0 = Release|Any CPU + {96EE6700-2A16-4C7A-8EF9-3D81E0CE3470}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {96EE6700-2A16-4C7A-8EF9-3D81E0CE3470}.Debug|Any CPU.Build.0 = Debug|Any CPU + {96EE6700-2A16-4C7A-8EF9-3D81E0CE3470}.Release|Any CPU.ActiveCfg = Release|Any CPU + {96EE6700-2A16-4C7A-8EF9-3D81E0CE3470}.Release|Any CPU.Build.0 = Release|Any CPU + {D3CA0BFC-8AE8-4828-90EE-0296D7DDF679}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D3CA0BFC-8AE8-4828-90EE-0296D7DDF679}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D3CA0BFC-8AE8-4828-90EE-0296D7DDF679}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D3CA0BFC-8AE8-4828-90EE-0296D7DDF679}.Release|Any CPU.Build.0 = Release|Any CPU + {CB32FA40-2A8A-4D40-81A2-C3EF1203A81D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CB32FA40-2A8A-4D40-81A2-C3EF1203A81D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CB32FA40-2A8A-4D40-81A2-C3EF1203A81D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CB32FA40-2A8A-4D40-81A2-C3EF1203A81D}.Release|Any CPU.Build.0 = Release|Any CPU + {4A904B94-8DC4-4C02-A4FD-374E78990374}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4A904B94-8DC4-4C02-A4FD-374E78990374}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4A904B94-8DC4-4C02-A4FD-374E78990374}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4A904B94-8DC4-4C02-A4FD-374E78990374}.Release|Any CPU.Build.0 = Release|Any CPU + {B9CE6C00-1AE2-4125-BD1A-A7AABA1072CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B9CE6C00-1AE2-4125-BD1A-A7AABA1072CA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B9CE6C00-1AE2-4125-BD1A-A7AABA1072CA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B9CE6C00-1AE2-4125-BD1A-A7AABA1072CA}.Release|Any CPU.Build.0 = Release|Any CPU + {C4693C58-BB66-4630-984E-313E1BCC2474}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C4693C58-BB66-4630-984E-313E1BCC2474}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C4693C58-BB66-4630-984E-313E1BCC2474}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C4693C58-BB66-4630-984E-313E1BCC2474}.Release|Any CPU.Build.0 = Release|Any CPU + {8B815173-9AFA-4D95-BAB4-686C298F17DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8B815173-9AFA-4D95-BAB4-686C298F17DA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8B815173-9AFA-4D95-BAB4-686C298F17DA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8B815173-9AFA-4D95-BAB4-686C298F17DA}.Release|Any CPU.Build.0 = Release|Any CPU + {2D3D9033-200C-423E-BF8A-8FB40D8D1572}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2D3D9033-200C-423E-BF8A-8FB40D8D1572}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2D3D9033-200C-423E-BF8A-8FB40D8D1572}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2D3D9033-200C-423E-BF8A-8FB40D8D1572}.Release|Any CPU.Build.0 = Release|Any CPU + {4A178990-A30D-437C-A7B2-775348ABF5DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4A178990-A30D-437C-A7B2-775348ABF5DE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4A178990-A30D-437C-A7B2-775348ABF5DE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4A178990-A30D-437C-A7B2-775348ABF5DE}.Release|Any CPU.Build.0 = Release|Any CPU + {585AB2C3-17B3-49B4-BA59-B5861317D7B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {585AB2C3-17B3-49B4-BA59-B5861317D7B3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {585AB2C3-17B3-49B4-BA59-B5861317D7B3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {585AB2C3-17B3-49B4-BA59-B5861317D7B3}.Release|Any CPU.Build.0 = Release|Any CPU + {AF9929C8-85B8-4A36-9EC8-E46C17FE3B65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AF9929C8-85B8-4A36-9EC8-E46C17FE3B65}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AF9929C8-85B8-4A36-9EC8-E46C17FE3B65}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AF9929C8-85B8-4A36-9EC8-E46C17FE3B65}.Release|Any CPU.Build.0 = Release|Any CPU + {45CC79AE-C0DE-486C-953B-7697C6E09E94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {45CC79AE-C0DE-486C-953B-7697C6E09E94}.Debug|Any CPU.Build.0 = Debug|Any CPU + {45CC79AE-C0DE-486C-953B-7697C6E09E94}.Release|Any CPU.ActiveCfg = Release|Any CPU + {45CC79AE-C0DE-486C-953B-7697C6E09E94}.Release|Any CPU.Build.0 = Release|Any CPU + {85118B5C-6CAA-44B4-87EA-419DC6F4F2FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85118B5C-6CAA-44B4-87EA-419DC6F4F2FB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85118B5C-6CAA-44B4-87EA-419DC6F4F2FB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85118B5C-6CAA-44B4-87EA-419DC6F4F2FB}.Release|Any CPU.Build.0 = Release|Any CPU + {444FAA3D-D5E1-498E-9AE1-201DB619CAF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {444FAA3D-D5E1-498E-9AE1-201DB619CAF0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {444FAA3D-D5E1-498E-9AE1-201DB619CAF0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {444FAA3D-D5E1-498E-9AE1-201DB619CAF0}.Release|Any CPU.Build.0 = Release|Any CPU + {9A9A0BD5-AC37-4B90-B90F-FD1C1395FEBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9A9A0BD5-AC37-4B90-B90F-FD1C1395FEBD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9A9A0BD5-AC37-4B90-B90F-FD1C1395FEBD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9A9A0BD5-AC37-4B90-B90F-FD1C1395FEBD}.Release|Any CPU.Build.0 = Release|Any CPU + {C34B917B-14A4-4FFB-A744-F32E9AFBAECD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C34B917B-14A4-4FFB-A744-F32E9AFBAECD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C34B917B-14A4-4FFB-A744-F32E9AFBAECD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C34B917B-14A4-4FFB-A744-F32E9AFBAECD}.Release|Any CPU.Build.0 = Release|Any CPU + {D33E56FB-CD9E-4B1D-A0F1-1B272F154DC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D33E56FB-CD9E-4B1D-A0F1-1B272F154DC1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D33E56FB-CD9E-4B1D-A0F1-1B272F154DC1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D33E56FB-CD9E-4B1D-A0F1-1B272F154DC1}.Release|Any CPU.Build.0 = Release|Any CPU + {17629A13-3ED4-4E88-B70C-DFFCBAE96A6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {17629A13-3ED4-4E88-B70C-DFFCBAE96A6A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {17629A13-3ED4-4E88-B70C-DFFCBAE96A6A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {17629A13-3ED4-4E88-B70C-DFFCBAE96A6A}.Release|Any CPU.Build.0 = Release|Any CPU + {9D27D517-B938-4594-8836-CE06A2955FFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9D27D517-B938-4594-8836-CE06A2955FFD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9D27D517-B938-4594-8836-CE06A2955FFD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9D27D517-B938-4594-8836-CE06A2955FFD}.Release|Any CPU.Build.0 = Release|Any CPU + {FBA8997D-01C8-458D-ACE6-28DC7BC32711}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FBA8997D-01C8-458D-ACE6-28DC7BC32711}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FBA8997D-01C8-458D-ACE6-28DC7BC32711}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FBA8997D-01C8-458D-ACE6-28DC7BC32711}.Release|Any CPU.Build.0 = Release|Any CPU + {D22F0CFF-D47F-4541-BD6D-3F07808EE468}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D22F0CFF-D47F-4541-BD6D-3F07808EE468}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D22F0CFF-D47F-4541-BD6D-3F07808EE468}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D22F0CFF-D47F-4541-BD6D-3F07808EE468}.Release|Any CPU.Build.0 = Release|Any CPU + {CCC62E59-19DD-44B7-B565-CEA7AE8A83EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CCC62E59-19DD-44B7-B565-CEA7AE8A83EC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CCC62E59-19DD-44B7-B565-CEA7AE8A83EC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CCC62E59-19DD-44B7-B565-CEA7AE8A83EC}.Release|Any CPU.Build.0 = Release|Any CPU + {DCFE28B5-245F-4C28-869B-C42C73E816E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DCFE28B5-245F-4C28-869B-C42C73E816E5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DCFE28B5-245F-4C28-869B-C42C73E816E5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DCFE28B5-245F-4C28-869B-C42C73E816E5}.Release|Any CPU.Build.0 = Release|Any CPU + {AC4EFBFD-CC81-4401-B24C-380A900B3C14}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AC4EFBFD-CC81-4401-B24C-380A900B3C14}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AC4EFBFD-CC81-4401-B24C-380A900B3C14}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AC4EFBFD-CC81-4401-B24C-380A900B3C14}.Release|Any CPU.Build.0 = Release|Any CPU + {C05E5B87-EB74-4A3F-B4FC-AFDD28570850}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C05E5B87-EB74-4A3F-B4FC-AFDD28570850}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C05E5B87-EB74-4A3F-B4FC-AFDD28570850}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C05E5B87-EB74-4A3F-B4FC-AFDD28570850}.Release|Any CPU.Build.0 = Release|Any CPU + {73EC4EBE-826D-4A0A-8837-51D3458FC2A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {73EC4EBE-826D-4A0A-8837-51D3458FC2A8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {73EC4EBE-826D-4A0A-8837-51D3458FC2A8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {73EC4EBE-826D-4A0A-8837-51D3458FC2A8}.Release|Any CPU.Build.0 = Release|Any CPU + {85E813C0-4A94-4946-8B1F-DE1E39AA7D11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85E813C0-4A94-4946-8B1F-DE1E39AA7D11}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85E813C0-4A94-4946-8B1F-DE1E39AA7D11}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85E813C0-4A94-4946-8B1F-DE1E39AA7D11}.Release|Any CPU.Build.0 = Release|Any CPU + {771CDD6A-6880-4802-8EB1-F7A35386D9B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {771CDD6A-6880-4802-8EB1-F7A35386D9B4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {771CDD6A-6880-4802-8EB1-F7A35386D9B4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {771CDD6A-6880-4802-8EB1-F7A35386D9B4}.Release|Any CPU.Build.0 = Release|Any CPU + {34C89D80-4F8D-48A6-AAB5-2D6DC5A1B953}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {34C89D80-4F8D-48A6-AAB5-2D6DC5A1B953}.Debug|Any CPU.Build.0 = Debug|Any CPU + {34C89D80-4F8D-48A6-AAB5-2D6DC5A1B953}.Release|Any CPU.ActiveCfg = Release|Any CPU + {34C89D80-4F8D-48A6-AAB5-2D6DC5A1B953}.Release|Any CPU.Build.0 = Release|Any CPU + {734D30CF-4376-488A-A6B4-1033FED93660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {734D30CF-4376-488A-A6B4-1033FED93660}.Debug|Any CPU.Build.0 = Debug|Any CPU + {734D30CF-4376-488A-A6B4-1033FED93660}.Release|Any CPU.ActiveCfg = Release|Any CPU + {734D30CF-4376-488A-A6B4-1033FED93660}.Release|Any CPU.Build.0 = Release|Any CPU + {8C4C690F-6B4A-4908-AA7D-1AF9D117E267}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8C4C690F-6B4A-4908-AA7D-1AF9D117E267}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8C4C690F-6B4A-4908-AA7D-1AF9D117E267}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8C4C690F-6B4A-4908-AA7D-1AF9D117E267}.Release|Any CPU.Build.0 = Release|Any CPU + {7F1A7421-0335-43D4-8C50-4ED444D19336}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7F1A7421-0335-43D4-8C50-4ED444D19336}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7F1A7421-0335-43D4-8C50-4ED444D19336}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7F1A7421-0335-43D4-8C50-4ED444D19336}.Release|Any CPU.Build.0 = Release|Any CPU + {FB2ACC79-1E04-47CA-8F4B-31327E10B5E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FB2ACC79-1E04-47CA-8F4B-31327E10B5E3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FB2ACC79-1E04-47CA-8F4B-31327E10B5E3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FB2ACC79-1E04-47CA-8F4B-31327E10B5E3}.Release|Any CPU.Build.0 = Release|Any CPU + {06AE9368-B357-4682-8B79-1FB186BF38B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {06AE9368-B357-4682-8B79-1FB186BF38B5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {06AE9368-B357-4682-8B79-1FB186BF38B5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {06AE9368-B357-4682-8B79-1FB186BF38B5}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {4A182899-5624-4FF0-8753-D2E8E31AF140} = {6CEB2C22-90CC-4161-952D-7ED706BB8387} + {8C38D3A9-16E6-40A0-A813-818A45BF0374} = {6CEB2C22-90CC-4161-952D-7ED706BB8387} + {7B56E082-A287-4400-B069-D1625C229E55} = {6CEB2C22-90CC-4161-952D-7ED706BB8387} + {2BC45674-F407-45D5-B299-BF314DAF88BE} = {6CEB2C22-90CC-4161-952D-7ED706BB8387} + {AE680ED6-74D9-4D85-834F-E9F20DE9C2B4} = {6CEB2C22-90CC-4161-952D-7ED706BB8387} + {5B85CA4F-0E58-413A-932E-2FF6A757DB74} = {6CEB2C22-90CC-4161-952D-7ED706BB8387} + {B46133C5-7441-4F05-BC44-7E67B5EDAA4D} = {6CEB2C22-90CC-4161-952D-7ED706BB8387} + {3D1ACC82-B571-400D-AECA-C50B97E17845} = {6CEB2C22-90CC-4161-952D-7ED706BB8387} + {9AE18F6C-57A6-4026-8427-8F4A366B5FA5} = {6CEB2C22-90CC-4161-952D-7ED706BB8387} + {0711BE68-5F6B-4570-9471-1D615084CE6B} = {6CEB2C22-90CC-4161-952D-7ED706BB8387} + {8805DB2A-62B1-4055-9A72-571ABB8EC16E} = {6CEB2C22-90CC-4161-952D-7ED706BB8387} + {7332A8CB-3659-42D2-A3FC-587F67286C60} = {6CEB2C22-90CC-4161-952D-7ED706BB8387} + {2D3A24D4-C815-4CDE-996E-82D2B770DBDC} = {6CEB2C22-90CC-4161-952D-7ED706BB8387} + {73867D40-8CBB-48E9-BFFA-12BBDD48A341} = {4A182899-5624-4FF0-8753-D2E8E31AF140} + {C1DE5465-4694-475A-8D06-E17733C41D69} = {4A182899-5624-4FF0-8753-D2E8E31AF140} + {F7563AAC-BA9E-4762-888D-27DB9399AF54} = {4A182899-5624-4FF0-8753-D2E8E31AF140} + {A60CA2C3-0B28-4D03-9F0B-19FE56D27689} = {8C38D3A9-16E6-40A0-A813-818A45BF0374} + {D142D372-C9FA-4505-A6EB-E919746F0FF1} = {8C38D3A9-16E6-40A0-A813-818A45BF0374} + {D72C6682-16CE-4424-A875-435418118B61} = {8C38D3A9-16E6-40A0-A813-818A45BF0374} + {D8B58938-14AF-4FA2-BAC3-7FE59721B7E0} = {7B56E082-A287-4400-B069-D1625C229E55} + {12392715-B9A3-433E-B395-C0031569A864} = {7B56E082-A287-4400-B069-D1625C229E55} + {102BD992-A123-4B71-B9C7-7FFAA515FACE} = {7B56E082-A287-4400-B069-D1625C229E55} + {7959A868-6A54-4A64-8706-F063CC1476A5} = {7B56E082-A287-4400-B069-D1625C229E55} + {7A0566CF-5BAF-48E0-B105-C6BF2E77A3A1} = {7B56E082-A287-4400-B069-D1625C229E55} + {487809CE-0B5D-4425-A6CA-06F7C444DBCC} = {D8B58938-14AF-4FA2-BAC3-7FE59721B7E0} + {6657A1B8-3773-46A4-88F2-A421E074D35F} = {D8B58938-14AF-4FA2-BAC3-7FE59721B7E0} + {FF96F021-897B-49D6-AF24-5533BB0961B9} = {D8B58938-14AF-4FA2-BAC3-7FE59721B7E0} + {2D3D9033-200C-423E-BF8A-8FB40D8D1572} = {D8B58938-14AF-4FA2-BAC3-7FE59721B7E0} + {4A178990-A30D-437C-A7B2-775348ABF5DE} = {D8B58938-14AF-4FA2-BAC3-7FE59721B7E0} + {585AB2C3-17B3-49B4-BA59-B5861317D7B3} = {D8B58938-14AF-4FA2-BAC3-7FE59721B7E0} + {FB2ACC79-1E04-47CA-8F4B-31327E10B5E3} = {D8B58938-14AF-4FA2-BAC3-7FE59721B7E0} + {06AE9368-B357-4682-8B79-1FB186BF38B5} = {D8B58938-14AF-4FA2-BAC3-7FE59721B7E0} + {EB2C42A2-70FD-4469-959B-C577470B001B} = {2BC45674-F407-45D5-B299-BF314DAF88BE} + {CD9FA43E-A56D-4B62-8245-F911B137EC09} = {2BC45674-F407-45D5-B299-BF314DAF88BE} + {D9628493-605A-4259-ADD3-7732F0DEFFBB} = {2BC45674-F407-45D5-B299-BF314DAF88BE} + {B6D6B021-F477-4C8C-B19E-9CB2ABBCA095} = {2BC45674-F407-45D5-B299-BF314DAF88BE} + {2616579A-202F-48F6-8A7F-6A6AA9288CA7} = {AE680ED6-74D9-4D85-834F-E9F20DE9C2B4} + {EE641ACE-ABE5-4ACE-9AAE-DC52C55B51F9} = {4ECE40D6-7EA4-4D65-89FE-2D0915D29B5E} + {B351256F-5A1C-435F-A81E-97EC2E4EB155} = {4ECE40D6-7EA4-4D65-89FE-2D0915D29B5E} + {BE42D213-AE26-4C5D-9766-39A18BB166B9} = {4ECE40D6-7EA4-4D65-89FE-2D0915D29B5E} + {5931F01B-C194-4720-A181-458B1672581A} = {4ECE40D6-7EA4-4D65-89FE-2D0915D29B5E} + {8C092982-A337-4013-A277-481813BD09D6} = {4ECE40D6-7EA4-4D65-89FE-2D0915D29B5E} + {570C81EC-F237-4F7A-915C-59EB4B6A148F} = {4ECE40D6-7EA4-4D65-89FE-2D0915D29B5E} + {ED855B92-C7EB-4BE7-9072-5C2260C329FC} = {EE641ACE-ABE5-4ACE-9AAE-DC52C55B51F9} + {E259AE1E-613E-41D8-B36A-F80343239363} = {EE641ACE-ABE5-4ACE-9AAE-DC52C55B51F9} + {FE207907-5E5A-4E6C-BF00-9C1C9858F258} = {EE641ACE-ABE5-4ACE-9AAE-DC52C55B51F9} + {20EE4282-E399-4253-81DF-F99A508DEE0D} = {EE641ACE-ABE5-4ACE-9AAE-DC52C55B51F9} + {0F1A46A2-D1CE-4DB1-9E75-45D41CCA7EA7} = {B351256F-5A1C-435F-A81E-97EC2E4EB155} + {C9491F30-6CCA-41D5-A9E6-1DC8758C4BE1} = {B351256F-5A1C-435F-A81E-97EC2E4EB155} + {562F1C2D-8279-482D-8474-30CDE9EE3269} = {B351256F-5A1C-435F-A81E-97EC2E4EB155} + {4A904B94-8DC4-4C02-A4FD-374E78990374} = {12392715-B9A3-433E-B395-C0031569A864} + {7F1A7421-0335-43D4-8C50-4ED444D19336} = {12392715-B9A3-433E-B395-C0031569A864} + {C831B94E-6D08-404C-BA80-B8E8442EA9DE} = {5B85CA4F-0E58-413A-932E-2FF6A757DB74} + {9A9A0BD5-AC37-4B90-B90F-FD1C1395FEBD} = {102BD992-A123-4B71-B9C7-7FFAA515FACE} + {C05E5B87-EB74-4A3F-B4FC-AFDD28570850} = {102BD992-A123-4B71-B9C7-7FFAA515FACE} + {73EC4EBE-826D-4A0A-8837-51D3458FC2A8} = {102BD992-A123-4B71-B9C7-7FFAA515FACE} + {771CDD6A-6880-4802-8EB1-F7A35386D9B4} = {102BD992-A123-4B71-B9C7-7FFAA515FACE} + {34C89D80-4F8D-48A6-AAB5-2D6DC5A1B953} = {102BD992-A123-4B71-B9C7-7FFAA515FACE} + {734D30CF-4376-488A-A6B4-1033FED93660} = {102BD992-A123-4B71-B9C7-7FFAA515FACE} + {8C4C690F-6B4A-4908-AA7D-1AF9D117E267} = {102BD992-A123-4B71-B9C7-7FFAA515FACE} + {1C22F3DF-F020-491D-A680-5AE98D390140} = {B46133C5-7441-4F05-BC44-7E67B5EDAA4D} + {02D21488-C00A-4DD2-97BE-C0EA1CDB7206} = {B46133C5-7441-4F05-BC44-7E67B5EDAA4D} + {50CF4253-AABB-475D-87DD-D8A2C7CF236D} = {51E8903A-31C8-42CC-AEB9-AD813EE282F4} + {058A28C7-57DE-44B4-AA26-CE8A57FF7147} = {50CF4253-AABB-475D-87DD-D8A2C7CF236D} + {F32296DF-E899-425F-9EE7-CDBD8995E00B} = {50CF4253-AABB-475D-87DD-D8A2C7CF236D} + {DEC520C3-D1CA-4EF6-94FB-4F24F1D92651} = {058A28C7-57DE-44B4-AA26-CE8A57FF7147} + {211C2BF6-5146-4019-8972-6AC87C90745B} = {058A28C7-57DE-44B4-AA26-CE8A57FF7147} + {9F8E556C-0AFA-4C5D-B64F-AE9376ABF145} = {BE42D213-AE26-4C5D-9766-39A18BB166B9} + {20F613ED-C871-477C-B1E4-48B96CACF794} = {BE42D213-AE26-4C5D-9766-39A18BB166B9} + {CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6} = {BE42D213-AE26-4C5D-9766-39A18BB166B9} + {7EA93511-0B01-4E6B-95C4-A3069A4A107A} = {3D1ACC82-B571-400D-AECA-C50B97E17845} + {5686FE6C-A5E3-40D1-A6BD-25F94DA612F8} = {5931F01B-C194-4720-A181-458B1672581A} + {7036A49B-359F-4BC7-AFBA-DE3C7AB41986} = {5931F01B-C194-4720-A181-458B1672581A} + {28DE496A-3885-410E-A0B8-004FAEFF9378} = {5931F01B-C194-4720-A181-458B1672581A} + {6A699A4E-F2FD-4B71-AF73-199B499482BD} = {5931F01B-C194-4720-A181-458B1672581A} + {F3D13CDB-B5AE-4CEE-BDA9-6A7007D09FA6} = {9AE18F6C-57A6-4026-8427-8F4A366B5FA5} + {4DF0FE9E-3608-426F-B6CB-AC55FE04D997} = {7959A868-6A54-4A64-8706-F063CC1476A5} + {4AB4015A-2DBF-44F9-9119-0E095703EC2D} = {7A0566CF-5BAF-48E0-B105-C6BF2E77A3A1} + {4D9A660B-C2AF-42A8-AEB4-E2F97ED1CB3C} = {7A0566CF-5BAF-48E0-B105-C6BF2E77A3A1} + {CB32FA40-2A8A-4D40-81A2-C3EF1203A81D} = {7A0566CF-5BAF-48E0-B105-C6BF2E77A3A1} + {45CC79AE-C0DE-486C-953B-7697C6E09E94} = {7A0566CF-5BAF-48E0-B105-C6BF2E77A3A1} + {85118B5C-6CAA-44B4-87EA-419DC6F4F2FB} = {7A0566CF-5BAF-48E0-B105-C6BF2E77A3A1} + {D33E56FB-CD9E-4B1D-A0F1-1B272F154DC1} = {7A0566CF-5BAF-48E0-B105-C6BF2E77A3A1} + {17629A13-3ED4-4E88-B70C-DFFCBAE96A6A} = {7A0566CF-5BAF-48E0-B105-C6BF2E77A3A1} + {4111FD2B-3E6A-4A1B-A9B3-44E5E2259BD3} = {8C092982-A337-4013-A277-481813BD09D6} + {937799AF-0B7F-4AC2-81B8-0A4348E499E3} = {8C092982-A337-4013-A277-481813BD09D6} + {997214B7-CB1B-4E18-836F-49290BDDED12} = {8C092982-A337-4013-A277-481813BD09D6} + {C4C7BB61-4F8B-4FE6-AD7D-BB258799380F} = {8C092982-A337-4013-A277-481813BD09D6} + {452C5FEA-16C8-49E1-BC95-1EC55E49EECB} = {4111FD2B-3E6A-4A1B-A9B3-44E5E2259BD3} + {A490D793-1D1D-486F-B808-827010EF8369} = {4111FD2B-3E6A-4A1B-A9B3-44E5E2259BD3} + {CB39076B-B46C-416A-A9C1-D1032B4C50D6} = {4111FD2B-3E6A-4A1B-A9B3-44E5E2259BD3} + {03E59C83-170A-4BF6-86FB-A05B75DE9510} = {4111FD2B-3E6A-4A1B-A9B3-44E5E2259BD3} + {C34B917B-14A4-4FFB-A744-F32E9AFBAECD} = {4111FD2B-3E6A-4A1B-A9B3-44E5E2259BD3} + {BAC04722-7E15-485E-BA17-3EC46AB7FC3C} = {937799AF-0B7F-4AC2-81B8-0A4348E499E3} + {96EE6700-2A16-4C7A-8EF9-3D81E0CE3470} = {937799AF-0B7F-4AC2-81B8-0A4348E499E3} + {D3CA0BFC-8AE8-4828-90EE-0296D7DDF679} = {937799AF-0B7F-4AC2-81B8-0A4348E499E3} + {646585FC-12F6-4668-9926-A39E6CCD6400} = {997214B7-CB1B-4E18-836F-49290BDDED12} + {B9CE6C00-1AE2-4125-BD1A-A7AABA1072CA} = {F32296DF-E899-425F-9EE7-CDBD8995E00B} + {C4693C58-BB66-4630-984E-313E1BCC2474} = {F32296DF-E899-425F-9EE7-CDBD8995E00B} + {8B815173-9AFA-4D95-BAB4-686C298F17DA} = {0711BE68-5F6B-4570-9471-1D615084CE6B} + {AF9929C8-85B8-4A36-9EC8-E46C17FE3B65} = {C4C7BB61-4F8B-4FE6-AD7D-BB258799380F} + {444FAA3D-D5E1-498E-9AE1-201DB619CAF0} = {8805DB2A-62B1-4055-9A72-571ABB8EC16E} + {AC4EFBFD-CC81-4401-B24C-380A900B3C14} = {8805DB2A-62B1-4055-9A72-571ABB8EC16E} + {9D27D517-B938-4594-8836-CE06A2955FFD} = {570C81EC-F237-4F7A-915C-59EB4B6A148F} + {FBA8997D-01C8-458D-ACE6-28DC7BC32711} = {570C81EC-F237-4F7A-915C-59EB4B6A148F} + {D22F0CFF-D47F-4541-BD6D-3F07808EE468} = {570C81EC-F237-4F7A-915C-59EB4B6A148F} + {CCC62E59-19DD-44B7-B565-CEA7AE8A83EC} = {570C81EC-F237-4F7A-915C-59EB4B6A148F} + {DCFE28B5-245F-4C28-869B-C42C73E816E5} = {570C81EC-F237-4F7A-915C-59EB4B6A148F} + {85E813C0-4A94-4946-8B1F-DE1E39AA7D11} = {7332A8CB-3659-42D2-A3FC-587F67286C60} + EndGlobalSection +EndGlobal diff --git a/RunMeFirst.bat b/RunMeFirst.bat index ab413031b1e..5664d5d7468 100644 --- a/RunMeFirst.bat +++ b/RunMeFirst.bat @@ -1,3 +1,3 @@ -IF EXIST nant.build (.\tools\nant\nant BuildMsmqUtils) - +IF EXIST nant.build (.\tools\nant\nant BuildMsmqUtils) + .\tools\msmqutils\runner.exe %1 \ No newline at end of file diff --git a/Samples/AsyncPages/AsyncPages.sln b/Samples/AsyncPages/AsyncPages.sln index 661607d20dc..1833e370d14 100644 --- a/Samples/AsyncPages/AsyncPages.sln +++ b/Samples/AsyncPages/AsyncPages.sln @@ -1,36 +1,36 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebApplication1", "WebApplication1\WebApplication1.csproj", "{562F1C2D-8279-482D-8474-30CDE9EE3269}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Messages", "Messages\Messages.csproj", "{0F1A46A2-D1CE-4DB1-9E75-45D41CCA7EA7}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server", "Server\Server.csproj", "{C9491F30-6CCA-41D5-A9E6-1DC8758C4BE1}" -EndProject -Global - GlobalSection(SubversionScc) = preSolution - Svn-Managed = True - Manager = AnkhSVN - Subversion Support for Visual Studio - EndGlobalSection - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {562F1C2D-8279-482D-8474-30CDE9EE3269}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {562F1C2D-8279-482D-8474-30CDE9EE3269}.Debug|Any CPU.Build.0 = Debug|Any CPU - {562F1C2D-8279-482D-8474-30CDE9EE3269}.Release|Any CPU.ActiveCfg = Release|Any CPU - {562F1C2D-8279-482D-8474-30CDE9EE3269}.Release|Any CPU.Build.0 = Release|Any CPU - {0F1A46A2-D1CE-4DB1-9E75-45D41CCA7EA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0F1A46A2-D1CE-4DB1-9E75-45D41CCA7EA7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0F1A46A2-D1CE-4DB1-9E75-45D41CCA7EA7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0F1A46A2-D1CE-4DB1-9E75-45D41CCA7EA7}.Release|Any CPU.Build.0 = Release|Any CPU - {C9491F30-6CCA-41D5-A9E6-1DC8758C4BE1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C9491F30-6CCA-41D5-A9E6-1DC8758C4BE1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C9491F30-6CCA-41D5-A9E6-1DC8758C4BE1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C9491F30-6CCA-41D5-A9E6-1DC8758C4BE1}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebApplication1", "WebApplication1\WebApplication1.csproj", "{562F1C2D-8279-482D-8474-30CDE9EE3269}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Messages", "Messages\Messages.csproj", "{0F1A46A2-D1CE-4DB1-9E75-45D41CCA7EA7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server", "Server\Server.csproj", "{C9491F30-6CCA-41D5-A9E6-1DC8758C4BE1}" +EndProject +Global + GlobalSection(SubversionScc) = preSolution + Svn-Managed = True + Manager = AnkhSVN - Subversion Support for Visual Studio + EndGlobalSection + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {562F1C2D-8279-482D-8474-30CDE9EE3269}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {562F1C2D-8279-482D-8474-30CDE9EE3269}.Debug|Any CPU.Build.0 = Debug|Any CPU + {562F1C2D-8279-482D-8474-30CDE9EE3269}.Release|Any CPU.ActiveCfg = Release|Any CPU + {562F1C2D-8279-482D-8474-30CDE9EE3269}.Release|Any CPU.Build.0 = Release|Any CPU + {0F1A46A2-D1CE-4DB1-9E75-45D41CCA7EA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0F1A46A2-D1CE-4DB1-9E75-45D41CCA7EA7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0F1A46A2-D1CE-4DB1-9E75-45D41CCA7EA7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0F1A46A2-D1CE-4DB1-9E75-45D41CCA7EA7}.Release|Any CPU.Build.0 = Release|Any CPU + {C9491F30-6CCA-41D5-A9E6-1DC8758C4BE1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C9491F30-6CCA-41D5-A9E6-1DC8758C4BE1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C9491F30-6CCA-41D5-A9E6-1DC8758C4BE1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C9491F30-6CCA-41D5-A9E6-1DC8758C4BE1}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Samples/AsyncPages/Messages/Command.cs b/Samples/AsyncPages/Messages/Command.cs index 5663fd4de0d..be564d830cb 100644 --- a/Samples/AsyncPages/Messages/Command.cs +++ b/Samples/AsyncPages/Messages/Command.cs @@ -1,11 +1,11 @@ -using System; -using NServiceBus; - -namespace Messages -{ - [Serializable] - public class Command : IMessage - { - public int Id { get; set; } - } +using System; +using NServiceBus; + +namespace Messages +{ + [Serializable] + public class Command : IMessage + { + public int Id { get; set; } + } } \ No newline at end of file diff --git a/Samples/AsyncPages/Messages/ErrorCodes.cs b/Samples/AsyncPages/Messages/ErrorCodes.cs index 895930f2545..c010676e7e5 100644 --- a/Samples/AsyncPages/Messages/ErrorCodes.cs +++ b/Samples/AsyncPages/Messages/ErrorCodes.cs @@ -1,8 +1,8 @@ -namespace Messages -{ - public enum ErrorCodes - { - None, - Fail - } -} +namespace Messages +{ + public enum ErrorCodes + { + None, + Fail + } +} diff --git a/Samples/AsyncPages/Messages/Messages.csproj b/Samples/AsyncPages/Messages/Messages.csproj index 9d9d57542b0..34d47a89301 100644 --- a/Samples/AsyncPages/Messages/Messages.csproj +++ b/Samples/AsyncPages/Messages/Messages.csproj @@ -1,95 +1,95 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {0F1A46A2-D1CE-4DB1-9E75-45D41CCA7EA7} - Library - Properties - Messages - Messages - - - - - - v4.0 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\binaries\NServiceBus.dll - - - - - - - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {0F1A46A2-D1CE-4DB1-9E75-45D41CCA7EA7} + Library + Properties + Messages + Messages + + + + + + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\binaries\NServiceBus.dll + + + + + + + + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + \ No newline at end of file diff --git a/Samples/AsyncPages/Messages/Properties/AssemblyInfo.cs b/Samples/AsyncPages/Messages/Properties/AssemblyInfo.cs index cb5949d7b0e..eaafe2c314d 100644 --- a/Samples/AsyncPages/Messages/Properties/AssemblyInfo.cs +++ b/Samples/AsyncPages/Messages/Properties/AssemblyInfo.cs @@ -1,35 +1,35 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Messages")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Messages")] -[assembly: AssemblyCopyright("Copyright © 2007")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("58f0c0ae-d27c-4548-886b-077b7cab2376")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Messages")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Messages")] +[assembly: AssemblyCopyright("Copyright © 2007")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("58f0c0ae-d27c-4548-886b-077b7cab2376")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/AsyncPages/Server/App.config b/Samples/AsyncPages/Server/App.config index 169fa450652..1d929851bc3 100644 --- a/Samples/AsyncPages/Server/App.config +++ b/Samples/AsyncPages/Server/App.config @@ -1,19 +1,19 @@ - - - -
- - - - - - - + + + +
+ + + + + + + diff --git a/Samples/AsyncPages/Server/CommandMessageHandler.cs b/Samples/AsyncPages/Server/CommandMessageHandler.cs index fcb09a45025..d09fe209631 100644 --- a/Samples/AsyncPages/Server/CommandMessageHandler.cs +++ b/Samples/AsyncPages/Server/CommandMessageHandler.cs @@ -1,24 +1,24 @@ -using Messages; -using NServiceBus; -using System.Threading; -using System; - -namespace Server -{ - public class CommandMessageHandler : IHandleMessages - { - public IBus Bus { get; set; } - - public void Handle(Command message) - { - Console.WriteLine("======================================================================"); - - Thread.Sleep(TimeSpan.FromSeconds(1)); - - if (message.Id % 2 == 0) - Bus.Return(ErrorCodes.Fail); - else - Bus.Return(ErrorCodes.None); - } - } -} +using Messages; +using NServiceBus; +using System.Threading; +using System; + +namespace Server +{ + public class CommandMessageHandler : IHandleMessages + { + public IBus Bus { get; set; } + + public void Handle(Command message) + { + Console.WriteLine("======================================================================"); + + Thread.Sleep(TimeSpan.FromSeconds(1)); + + if (message.Id % 2 == 0) + Bus.Return(ErrorCodes.Fail); + else + Bus.Return(ErrorCodes.None); + } + } +} diff --git a/Samples/AsyncPages/Server/MessageEndpoint.cs b/Samples/AsyncPages/Server/MessageEndpoint.cs index 378a76c980a..f225d68dac0 100644 --- a/Samples/AsyncPages/Server/MessageEndpoint.cs +++ b/Samples/AsyncPages/Server/MessageEndpoint.cs @@ -1,9 +1,9 @@ -using NServiceBus; - -namespace Server -{ - public class MessageEndpoint : IConfigureThisEndpoint, AsA_Server - { - } - +using NServiceBus; + +namespace Server +{ + public class MessageEndpoint : IConfigureThisEndpoint, AsA_Server + { + } + } \ No newline at end of file diff --git a/Samples/AsyncPages/Server/Properties/AssemblyInfo.cs b/Samples/AsyncPages/Server/Properties/AssemblyInfo.cs index 58ed41b6e91..e1c67ec7577 100644 --- a/Samples/AsyncPages/Server/Properties/AssemblyInfo.cs +++ b/Samples/AsyncPages/Server/Properties/AssemblyInfo.cs @@ -1,33 +1,33 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Server")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Server")] -[assembly: AssemblyCopyright("Copyright © 2007")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("6d0a1864-1cf8-4f8a-90ae-bc3fda6179d9")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Server")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Server")] +[assembly: AssemblyCopyright("Copyright © 2007")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("6d0a1864-1cf8-4f8a-90ae-bc3fda6179d9")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/AsyncPages/Server/Server.csproj b/Samples/AsyncPages/Server/Server.csproj index 28ff1ffc7c0..41705a64c36 100644 --- a/Samples/AsyncPages/Server/Server.csproj +++ b/Samples/AsyncPages/Server/Server.csproj @@ -1,115 +1,115 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {C9491F30-6CCA-41D5-A9E6-1DC8758C4BE1} - Library - Properties - Server - Server - - - - - - v4.0 - - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\binaries\log4net.dll - - - False - ..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\binaries\NServiceBus.Core.dll - - - False - ..\..\..\binaries\NServiceBus.Host.exe - - - - - - - - - - - - - - - - - - {0F1A46A2-D1CE-4DB1-9E75-45D41CCA7EA7} - Messages %28Samples\AsyncPages\Messages%29 - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - Program - $(ProjectDir)$(OutputPath)NServiceBus.Host.exe - AllRules.ruleset - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {C9491F30-6CCA-41D5-A9E6-1DC8758C4BE1} + Library + Properties + Server + Server + + + + + + v4.0 + + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\binaries\log4net.dll + + + False + ..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\binaries\NServiceBus.Core.dll + + + False + ..\..\..\binaries\NServiceBus.Host.exe + + + + + + + + + + + + + + + + + + {0F1A46A2-D1CE-4DB1-9E75-45D41CCA7EA7} + Messages %28Samples\AsyncPages\Messages%29 + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + Program + $(ProjectDir)$(OutputPath)NServiceBus.Host.exe + AllRules.ruleset + \ No newline at end of file diff --git a/Samples/AsyncPages/WebApplication1/Default.aspx b/Samples/AsyncPages/WebApplication1/Default.aspx index 90f36048499..4b4fd5798fa 100644 --- a/Samples/AsyncPages/WebApplication1/Default.aspx +++ b/Samples/AsyncPages/WebApplication1/Default.aspx @@ -1,21 +1,21 @@ -<%@ Page Language="C#" AutoEventWireup="true" Async="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" %> - - - - - - Untitled Page - - -
-
- Enter a number below and click "Go".
- If the number is even, the result will be "Fail", otherwise it will be "None". -

- - - -
-
- - +<%@ Page Language="C#" AutoEventWireup="true" Async="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" %> + + + + + + Untitled Page + + +
+
+ Enter a number below and click "Go".
+ If the number is even, the result will be "Fail", otherwise it will be "None". +

+ + + +
+
+ + diff --git a/Samples/AsyncPages/WebApplication1/Default.aspx.cs b/Samples/AsyncPages/WebApplication1/Default.aspx.cs index 10e26381a24..2a3bf018a7e 100644 --- a/Samples/AsyncPages/WebApplication1/Default.aspx.cs +++ b/Samples/AsyncPages/WebApplication1/Default.aspx.cs @@ -1,21 +1,21 @@ -using System; -using System.Web.UI; -using Messages; -using NServiceBus; - -namespace WebApplication1 -{ - public partial class _Default : Page - { - protected void Button1_Click(object sender, EventArgs e) - { - int number = int.Parse(TextBox1.Text); - var command = new Command { Id = number }; - - Global.Bus.Send(command).Register( - code => Label1.Text = Enum.GetName(typeof (ErrorCodes), code) - ); - } - - } -} +using System; +using System.Web.UI; +using Messages; +using NServiceBus; + +namespace WebApplication1 +{ + public partial class _Default : Page + { + protected void Button1_Click(object sender, EventArgs e) + { + int number = int.Parse(TextBox1.Text); + var command = new Command { Id = number }; + + Global.Bus.Send(command).Register( + code => Label1.Text = Enum.GetName(typeof (ErrorCodes), code) + ); + } + + } +} diff --git a/Samples/AsyncPages/WebApplication1/Default.aspx.designer.cs b/Samples/AsyncPages/WebApplication1/Default.aspx.designer.cs index d386cc6b98a..09ec9eeddcb 100644 --- a/Samples/AsyncPages/WebApplication1/Default.aspx.designer.cs +++ b/Samples/AsyncPages/WebApplication1/Default.aspx.designer.cs @@ -1,52 +1,52 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.3053 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace WebApplication1 { - - - public partial class _Default { - - /// - /// form1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlForm form1; - - /// - /// TextBox1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox TextBox1; - - /// - /// Button1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button Button1; - - /// - /// Label1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label Label1; - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.3053 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WebApplication1 { + + + public partial class _Default { + + /// + /// form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// TextBox1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox TextBox1; + + /// + /// Button1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button Button1; + + /// + /// Label1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label Label1; + } +} diff --git a/Samples/AsyncPages/WebApplication1/Global.asax b/Samples/AsyncPages/WebApplication1/Global.asax index 415133f0f1b..7ac710aba21 100644 --- a/Samples/AsyncPages/WebApplication1/Global.asax +++ b/Samples/AsyncPages/WebApplication1/Global.asax @@ -1 +1 @@ -<%@ Application Codebehind="Global.asax.cs" Inherits="WebApplication1.Global" Language="C#" %> +<%@ Application Codebehind="Global.asax.cs" Inherits="WebApplication1.Global" Language="C#" %> diff --git a/Samples/AsyncPages/WebApplication1/Global.asax.cs b/Samples/AsyncPages/WebApplication1/Global.asax.cs index 7895aaa1c76..09679aee03a 100644 --- a/Samples/AsyncPages/WebApplication1/Global.asax.cs +++ b/Samples/AsyncPages/WebApplication1/Global.asax.cs @@ -1,31 +1,31 @@ -using System; -using System.Web; -using NServiceBus; - -namespace WebApplication1 -{ - public class Global : HttpApplication - { - public static IBus Bus { get; private set; } - - protected void Application_Start(object sender, EventArgs e) - { - Bus = NServiceBus.Configure.WithWeb() - .Log4Net() - .DefaultBuilder() - .XmlSerializer() - .MsmqTransport() - .IsTransactional(false) - .PurgeOnStartup(false) - .UnicastBus() - .ImpersonateSender(false) - .CreateBus() - .Start(); - } - - protected void Application_End(object sender, EventArgs e) - { - - } - } +using System; +using System.Web; +using NServiceBus; + +namespace WebApplication1 +{ + public class Global : HttpApplication + { + public static IBus Bus { get; private set; } + + protected void Application_Start(object sender, EventArgs e) + { + Bus = NServiceBus.Configure.WithWeb() + .Log4Net() + .DefaultBuilder() + .XmlSerializer() + .MsmqTransport() + .IsTransactional(false) + .PurgeOnStartup(false) + .UnicastBus() + .ImpersonateSender(false) + .CreateBus() + .Start(); + } + + protected void Application_End(object sender, EventArgs e) + { + + } + } } \ No newline at end of file diff --git a/Samples/AsyncPages/WebApplication1/Properties/AssemblyInfo.cs b/Samples/AsyncPages/WebApplication1/Properties/AssemblyInfo.cs index e729abac68c..d5224c73902 100644 --- a/Samples/AsyncPages/WebApplication1/Properties/AssemblyInfo.cs +++ b/Samples/AsyncPages/WebApplication1/Properties/AssemblyInfo.cs @@ -1,35 +1,35 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("WebApplication1")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("WebApplication1")] -[assembly: AssemblyCopyright("Copyright © 2007")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("3d5900ae-111a-45be-96b3-d9e4606ca793")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("WebApplication1")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("WebApplication1")] +[assembly: AssemblyCopyright("Copyright © 2007")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("3d5900ae-111a-45be-96b3-d9e4606ca793")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/AsyncPages/WebApplication1/Properties/Settings.Designer.cs b/Samples/AsyncPages/WebApplication1/Properties/Settings.Designer.cs index 7f8b123b641..08aac96f53b 100644 --- a/Samples/AsyncPages/WebApplication1/Properties/Settings.Designer.cs +++ b/Samples/AsyncPages/WebApplication1/Properties/Settings.Designer.cs @@ -1,26 +1,26 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.1 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace WebApplication1.Properties { - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default { - get { - return defaultInstance; - } - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.1 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WebApplication1.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/Samples/AsyncPages/WebApplication1/Properties/Settings.settings b/Samples/AsyncPages/WebApplication1/Properties/Settings.settings index 2bd17f050c7..8e615f25fdc 100644 --- a/Samples/AsyncPages/WebApplication1/Properties/Settings.settings +++ b/Samples/AsyncPages/WebApplication1/Properties/Settings.settings @@ -1,5 +1,5 @@ - - - - + + + + \ No newline at end of file diff --git a/Samples/AsyncPages/WebApplication1/WebApplication1.csproj b/Samples/AsyncPages/WebApplication1/WebApplication1.csproj index d3c69538d24..5cbcbd53f17 100644 --- a/Samples/AsyncPages/WebApplication1/WebApplication1.csproj +++ b/Samples/AsyncPages/WebApplication1/WebApplication1.csproj @@ -1,128 +1,128 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {562F1C2D-8279-482D-8474-30CDE9EE3269} - {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} - Library - Properties - WebApplication1 - WebApplication1 - - - - - - v4.0 - - - true - full - false - bin\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\binaries\log4net.dll - - - False - ..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\binaries\NServiceBus.Core.dll - - - - - - - - - - - - - - - - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - - - - - ASPXCodeBehind - Default.aspx - - - Default.aspx - - - Global.asax - - - - True - True - Settings.settings - - - - - {0F1A46A2-D1CE-4DB1-9E75-45D41CCA7EA7} - Messages %28Samples\AsyncPages\Messages%29 - - - - - - - - - - False - True - 21943 - / - - - False - False - - - False - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {562F1C2D-8279-482D-8474-30CDE9EE3269} + {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + WebApplication1 + WebApplication1 + + + + + + v4.0 + + + true + full + false + bin\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\binaries\log4net.dll + + + False + ..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\binaries\NServiceBus.Core.dll + + + + + + + + + + + + + + + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + + ASPXCodeBehind + Default.aspx + + + Default.aspx + + + Global.asax + + + + True + True + Settings.settings + + + + + {0F1A46A2-D1CE-4DB1-9E75-45D41CCA7EA7} + Messages %28Samples\AsyncPages\Messages%29 + + + + + + + + + + False + True + 21943 + / + + + False + False + + + False + + + + \ No newline at end of file diff --git a/Samples/AsyncPages/WebApplication1/WebApplication1.csproj.user b/Samples/AsyncPages/WebApplication1/WebApplication1.csproj.user index ef95e01a556..d80ba5b31b4 100644 --- a/Samples/AsyncPages/WebApplication1/WebApplication1.csproj.user +++ b/Samples/AsyncPages/WebApplication1/WebApplication1.csproj.user @@ -1,28 +1,28 @@ - - - - - - - - - CurrentPage - True - False - False - False - - - - - - - - - False - True - - - - + + + + + + + + + CurrentPage + True + False + False + False + + + + + + + + + False + True + + + + \ No newline at end of file diff --git a/Samples/AsyncPages/WebApplication1/web.config b/Samples/AsyncPages/WebApplication1/web.config index c425b84562c..5a743870f68 100644 --- a/Samples/AsyncPages/WebApplication1/web.config +++ b/Samples/AsyncPages/WebApplication1/web.config @@ -1,96 +1,96 @@ - - - -
-
- - -
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + +
+
+ + +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Samples/AzureFullDuplex/AzureFullDuplex.ccproj b/Samples/AzureFullDuplex/AzureFullDuplex.ccproj index 55e768de6c7..ad42f2a9cbb 100644 --- a/Samples/AzureFullDuplex/AzureFullDuplex.ccproj +++ b/Samples/AzureFullDuplex/AzureFullDuplex.ccproj @@ -1,74 +1,74 @@ - - - - Debug - AnyCPU - 1.0.0 - {adcfc6b6-8bf7-4d56-b6a4-f6d221111666} - Library - Properties - AzureService - AzureService - True - AzureService - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - OrderService - {84aca710-e5b3-4a46-b87a-7c12fb2527a8} - True - Worker - OrderService - - - - OrderWebSite - {f3798c2c-41dc-407c-9ebe-3f10c1ca9a76} - True - Web - OrderWebSite - - - - - $(MSBuildExtensionsPath)\Microsoft\Cloud Service\1.0\Visual Studio 10.0\ - - - - - - - - + + + + Debug + AnyCPU + 1.0.0 + {adcfc6b6-8bf7-4d56-b6a4-f6d221111666} + Library + Properties + AzureService + AzureService + True + AzureService + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + OrderService + {84aca710-e5b3-4a46-b87a-7c12fb2527a8} + True + Worker + OrderService + + + + OrderWebSite + {f3798c2c-41dc-407c-9ebe-3f10c1ca9a76} + True + Web + OrderWebSite + + + + + $(MSBuildExtensionsPath)\Microsoft\Cloud Service\1.0\Visual Studio 10.0\ + + + + + + + + \ No newline at end of file diff --git a/Samples/AzureFullDuplex/AzureFullDuplex.ccproj.user b/Samples/AzureFullDuplex/AzureFullDuplex.ccproj.user index d3700e29267..16679ee303e 100644 --- a/Samples/AzureFullDuplex/AzureFullDuplex.ccproj.user +++ b/Samples/AzureFullDuplex/AzureFullDuplex.ccproj.user @@ -1,16 +1,16 @@ - - - - False - YvesGoeleven - yvesgoeleven - Goeleven - Production - False - goelevenplayground - playground - AzureService - 26/09/2010 17:21:40 - True - False - + + + + False + YvesGoeleven + yvesgoeleven + Goeleven + Production + False + goelevenplayground + playground + AzureService - 26/09/2010 17:21:40 + True + False + \ No newline at end of file diff --git a/Samples/AzureFullDuplex/AzureFullDuplex.sln b/Samples/AzureFullDuplex/AzureFullDuplex.sln index f8c4504a7c5..82f5e97ea03 100644 --- a/Samples/AzureFullDuplex/AzureFullDuplex.sln +++ b/Samples/AzureFullDuplex/AzureFullDuplex.sln @@ -1,38 +1,38 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{CC5FD16D-436D-48AD-A40C-5A424C6E3E79}") = "AzureFullDuplex", "AzureFullDuplex.ccproj", "{ADCFC6B6-8BF7-4D56-B6A4-F6D221111666}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrderWebSite", "OrderWebSite\OrderWebSite.csproj", "{F3798C2C-41DC-407C-9EBE-3F10C1CA9A76}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrderService", "OrderService\OrderService.csproj", "{84ACA710-E5B3-4A46-B87A-7C12FB2527A8}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyMessages", "MyMessages\MyMessages.csproj", "{3871CC9B-235F-4E60-98F7-FEF04DB1201B}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {ADCFC6B6-8BF7-4D56-B6A4-F6D221111666}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {ADCFC6B6-8BF7-4D56-B6A4-F6D221111666}.Debug|Any CPU.Build.0 = Debug|Any CPU - {ADCFC6B6-8BF7-4D56-B6A4-F6D221111666}.Release|Any CPU.ActiveCfg = Release|Any CPU - {ADCFC6B6-8BF7-4D56-B6A4-F6D221111666}.Release|Any CPU.Build.0 = Release|Any CPU - {F3798C2C-41DC-407C-9EBE-3F10C1CA9A76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F3798C2C-41DC-407C-9EBE-3F10C1CA9A76}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F3798C2C-41DC-407C-9EBE-3F10C1CA9A76}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F3798C2C-41DC-407C-9EBE-3F10C1CA9A76}.Release|Any CPU.Build.0 = Release|Any CPU - {84ACA710-E5B3-4A46-B87A-7C12FB2527A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {84ACA710-E5B3-4A46-B87A-7C12FB2527A8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {84ACA710-E5B3-4A46-B87A-7C12FB2527A8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {84ACA710-E5B3-4A46-B87A-7C12FB2527A8}.Release|Any CPU.Build.0 = Release|Any CPU - {3871CC9B-235F-4E60-98F7-FEF04DB1201B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3871CC9B-235F-4E60-98F7-FEF04DB1201B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3871CC9B-235F-4E60-98F7-FEF04DB1201B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3871CC9B-235F-4E60-98F7-FEF04DB1201B}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{CC5FD16D-436D-48AD-A40C-5A424C6E3E79}") = "AzureFullDuplex", "AzureFullDuplex.ccproj", "{ADCFC6B6-8BF7-4D56-B6A4-F6D221111666}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrderWebSite", "OrderWebSite\OrderWebSite.csproj", "{F3798C2C-41DC-407C-9EBE-3F10C1CA9A76}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrderService", "OrderService\OrderService.csproj", "{84ACA710-E5B3-4A46-B87A-7C12FB2527A8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyMessages", "MyMessages\MyMessages.csproj", "{3871CC9B-235F-4E60-98F7-FEF04DB1201B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {ADCFC6B6-8BF7-4D56-B6A4-F6D221111666}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ADCFC6B6-8BF7-4D56-B6A4-F6D221111666}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ADCFC6B6-8BF7-4D56-B6A4-F6D221111666}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ADCFC6B6-8BF7-4D56-B6A4-F6D221111666}.Release|Any CPU.Build.0 = Release|Any CPU + {F3798C2C-41DC-407C-9EBE-3F10C1CA9A76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F3798C2C-41DC-407C-9EBE-3F10C1CA9A76}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F3798C2C-41DC-407C-9EBE-3F10C1CA9A76}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F3798C2C-41DC-407C-9EBE-3F10C1CA9A76}.Release|Any CPU.Build.0 = Release|Any CPU + {84ACA710-E5B3-4A46-B87A-7C12FB2527A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {84ACA710-E5B3-4A46-B87A-7C12FB2527A8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {84ACA710-E5B3-4A46-B87A-7C12FB2527A8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {84ACA710-E5B3-4A46-B87A-7C12FB2527A8}.Release|Any CPU.Build.0 = Release|Any CPU + {3871CC9B-235F-4E60-98F7-FEF04DB1201B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3871CC9B-235F-4E60-98F7-FEF04DB1201B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3871CC9B-235F-4E60-98F7-FEF04DB1201B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3871CC9B-235F-4E60-98F7-FEF04DB1201B}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Samples/AzureFullDuplex/OrderService/App.config b/Samples/AzureFullDuplex/OrderService/App.config index 6b90fafd50f..015b6a86cce 100644 --- a/Samples/AzureFullDuplex/OrderService/App.config +++ b/Samples/AzureFullDuplex/OrderService/App.config @@ -1,25 +1,25 @@ - - - -
-
-
- - - - - - - - - - - - - - - - - - - + + + +
+
+
+ + + + + + + + + + + + + + + + + + + diff --git a/Samples/AzureFullDuplex/OrderService/EndpointConfiguration.cs b/Samples/AzureFullDuplex/OrderService/EndpointConfiguration.cs index 3390460c3c0..9613a05ba71 100644 --- a/Samples/AzureFullDuplex/OrderService/EndpointConfiguration.cs +++ b/Samples/AzureFullDuplex/OrderService/EndpointConfiguration.cs @@ -1,6 +1,6 @@ -using NServiceBus; - -namespace OrderService -{ - public class EndpointConfiguration : IConfigureThisEndpoint, AsA_Server { } +using NServiceBus; + +namespace OrderService +{ + public class EndpointConfiguration : IConfigureThisEndpoint, AsA_Server { } } \ No newline at end of file diff --git a/Samples/AzureFullDuplex/OrderService/Host.cs b/Samples/AzureFullDuplex/OrderService/Host.cs index 8f336c04c3c..2a2f8d372c6 100644 --- a/Samples/AzureFullDuplex/OrderService/Host.cs +++ b/Samples/AzureFullDuplex/OrderService/Host.cs @@ -1,6 +1,6 @@ -using NServiceBus.Hosting.Azure; - -namespace OrderService -{ - public class Host : RoleEntryPoint{} +using NServiceBus.Hosting.Azure; + +namespace OrderService +{ + public class Host : RoleEntryPoint{} } \ No newline at end of file diff --git a/Samples/AzureFullDuplex/OrderService/MessageHandlers/SubmitOrderMessageHandler.cs b/Samples/AzureFullDuplex/OrderService/MessageHandlers/SubmitOrderMessageHandler.cs index 838824b25d8..ece9a270f18 100644 --- a/Samples/AzureFullDuplex/OrderService/MessageHandlers/SubmitOrderMessageHandler.cs +++ b/Samples/AzureFullDuplex/OrderService/MessageHandlers/SubmitOrderMessageHandler.cs @@ -1,32 +1,32 @@ -using System.Threading; -using MyMessages; -using NServiceBus; -using Order=MyMessages.Order; - -namespace OrderService.MessageHandlers -{ - public class SubmitOrderMessageHandler : IHandleMessages - { - private readonly IBus bus; - - public SubmitOrderMessageHandler(IBus bus) - { - this.bus = bus; - } - - public void Handle(SubmitOrderRequest message) - { - var order = new Order - { - Id = message.Id, - Quantity = message.Quantity, - Status = OrderStatus.Pending - }; - - // Thread.Sleep(4000); //simulate processing - - var response = bus.CreateInstance(x=>x.Order = order); - bus.Reply(response); - } - } +using System.Threading; +using MyMessages; +using NServiceBus; +using Order=MyMessages.Order; + +namespace OrderService.MessageHandlers +{ + public class SubmitOrderMessageHandler : IHandleMessages + { + private readonly IBus bus; + + public SubmitOrderMessageHandler(IBus bus) + { + this.bus = bus; + } + + public void Handle(SubmitOrderRequest message) + { + var order = new Order + { + Id = message.Id, + Quantity = message.Quantity, + Status = OrderStatus.Pending + }; + + // Thread.Sleep(4000); //simulate processing + + var response = bus.CreateInstance(x=>x.Order = order); + bus.Reply(response); + } + } } \ No newline at end of file diff --git a/Samples/AzureFullDuplex/OrderService/OrderService.csproj b/Samples/AzureFullDuplex/OrderService/OrderService.csproj index 9589128cac4..28d8b552231 100644 --- a/Samples/AzureFullDuplex/OrderService/OrderService.csproj +++ b/Samples/AzureFullDuplex/OrderService/OrderService.csproj @@ -1,99 +1,99 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {84ACA710-E5B3-4A46-B87A-7C12FB2527A8} - Library - Properties - OrderService - OrderService - v4.0 - 512 - Worker - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\binaries\log4net.dll - - - False - ..\..\..\binaries\Microsoft.WindowsAzure.Diagnostics.dll - - - False - ..\..\..\binaries\Microsoft.WindowsAzure.ServiceRuntime.dll - True - - - False - ..\..\..\binaries\Microsoft.WindowsAzure.StorageClient.dll - - - False - ..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\binaries\NServiceBus.Core.dll - - - False - ..\..\..\build\hosting\NServiceBus.Hosting.dll - - - False - ..\..\..\build\hosting\NServiceBus.Hosting.Azure.dll - - - - - - - - - - - - - - - - {3871CC9B-235F-4E60-98F7-FEF04DB1201B} - MyMessages - - - - - Designer - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {84ACA710-E5B3-4A46-B87A-7C12FB2527A8} + Library + Properties + OrderService + OrderService + v4.0 + 512 + Worker + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\binaries\log4net.dll + + + False + ..\..\..\binaries\Microsoft.WindowsAzure.Diagnostics.dll + + + False + ..\..\..\binaries\Microsoft.WindowsAzure.ServiceRuntime.dll + True + + + False + ..\..\..\binaries\Microsoft.WindowsAzure.StorageClient.dll + + + False + ..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\binaries\NServiceBus.Core.dll + + + False + ..\..\..\build\hosting\NServiceBus.Hosting.dll + + + False + ..\..\..\build\hosting\NServiceBus.Hosting.Azure.dll + + + + + + + + + + + + + + + + {3871CC9B-235F-4E60-98F7-FEF04DB1201B} + MyMessages + + + + + Designer + + + + \ No newline at end of file diff --git a/Samples/AzureFullDuplex/OrderService/Properties/AssemblyInfo.cs b/Samples/AzureFullDuplex/OrderService/Properties/AssemblyInfo.cs index aa871cd8d91..77fc28ac62a 100644 --- a/Samples/AzureFullDuplex/OrderService/Properties/AssemblyInfo.cs +++ b/Samples/AzureFullDuplex/OrderService/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OrderService")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("OrderService")] -[assembly: AssemblyCopyright("Copyright © 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("6fdad954-96d7-4733-b5ee-41733ae4f018")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("OrderService")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("OrderService")] +[assembly: AssemblyCopyright("Copyright © 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("6fdad954-96d7-4733-b5ee-41733ae4f018")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/AzureFullDuplex/OrderService/WorkerRole.cs b/Samples/AzureFullDuplex/OrderService/WorkerRole.cs index 713b1ea9180..34da24466f9 100644 --- a/Samples/AzureFullDuplex/OrderService/WorkerRole.cs +++ b/Samples/AzureFullDuplex/OrderService/WorkerRole.cs @@ -1,99 +1,99 @@ -using System; -using System.Collections.Specialized; -using System.Threading; -using Common.Logging; -using log4net.Core; -using Microsoft.WindowsAzure.ServiceRuntime; -using MyMessages; -using NServiceBus; -using NServiceBus.Config; -using NServiceBus.Integration.Azure; - -namespace OrderService -{ - public class WorkerRole : RoleEntryPoint - { - public IBus Bus; - - public OrderList Orders = new OrderList(); - private ILog logger; - - public override void Run() - { - ConfigureLogging(); - - logger.Info("Starting order worker with instance id:" + RoleEnvironment.CurrentRoleInstance.Id); - - ConfigureNServiceBus(); - - while (true) - { - Thread.Sleep(10000); - - logger.Info("Approving orders"); - - foreach (var order in Orders.GetOrdersToApprove()) - { - var updatedOrder = Orders.UpdateStatus(order, OrderStatus.Approved); - - //publish update - var orderUpdatedEvent = Bus.CreateInstance(x => x.UpdatedOrder = updatedOrder); - Bus.Publish(orderUpdatedEvent); - } - } - } - - private void ConfigureNServiceBus() - { - - logger.Info("Initalizing NServiceBus"); - try - { - var config = Configure.With() - .SpringBuilder() - .AzureConfigurationSource() - .XmlSerializer() - .UnicastBus() - .LoadMessageHandlers() - .AzureQueuesTransport() - .IsTransactional(true) - .PurgeOnStartup(false) - .InMemorySubscriptionStorage();//we use inmemory storage until we have a sub storage for TableStorage or SQL Services - - Configure.Instance.Configurer.RegisterSingleton(Orders); - - Bus = config.CreateBus() - .Start(); - - } - catch (Exception ex) - { - logger.Error(ex); - throw; - } - - logger.Info("NServiceBus started"); - - } - - - private void ConfigureLogging() - { - LogManager.Adapter = new Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter(new NameValueCollection - { - {"configType","EXTERNAL"} - }); - - var appender = new AzureAppender - { - ConnectionStringKey = "AzureQueueConfig.ConnectionString", - Threshold = Level.Debug - }; - appender.ActivateOptions(); - - log4net.Config.BasicConfigurator.Configure(appender); - - logger = LogManager.GetLogger(typeof(WorkerRole)); - } - } -} +using System; +using System.Collections.Specialized; +using System.Threading; +using Common.Logging; +using log4net.Core; +using Microsoft.WindowsAzure.ServiceRuntime; +using MyMessages; +using NServiceBus; +using NServiceBus.Config; +using NServiceBus.Integration.Azure; + +namespace OrderService +{ + public class WorkerRole : RoleEntryPoint + { + public IBus Bus; + + public OrderList Orders = new OrderList(); + private ILog logger; + + public override void Run() + { + ConfigureLogging(); + + logger.Info("Starting order worker with instance id:" + RoleEnvironment.CurrentRoleInstance.Id); + + ConfigureNServiceBus(); + + while (true) + { + Thread.Sleep(10000); + + logger.Info("Approving orders"); + + foreach (var order in Orders.GetOrdersToApprove()) + { + var updatedOrder = Orders.UpdateStatus(order, OrderStatus.Approved); + + //publish update + var orderUpdatedEvent = Bus.CreateInstance(x => x.UpdatedOrder = updatedOrder); + Bus.Publish(orderUpdatedEvent); + } + } + } + + private void ConfigureNServiceBus() + { + + logger.Info("Initalizing NServiceBus"); + try + { + var config = Configure.With() + .SpringBuilder() + .AzureConfigurationSource() + .XmlSerializer() + .UnicastBus() + .LoadMessageHandlers() + .AzureQueuesTransport() + .IsTransactional(true) + .PurgeOnStartup(false) + .InMemorySubscriptionStorage();//we use inmemory storage until we have a sub storage for TableStorage or SQL Services + + Configure.Instance.Configurer.RegisterSingleton(Orders); + + Bus = config.CreateBus() + .Start(); + + } + catch (Exception ex) + { + logger.Error(ex); + throw; + } + + logger.Info("NServiceBus started"); + + } + + + private void ConfigureLogging() + { + LogManager.Adapter = new Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter(new NameValueCollection + { + {"configType","EXTERNAL"} + }); + + var appender = new AzureAppender + { + ConnectionStringKey = "AzureQueueConfig.ConnectionString", + Threshold = Level.Debug + }; + appender.ActivateOptions(); + + log4net.Config.BasicConfigurator.Configure(appender); + + logger = LogManager.GetLogger(typeof(WorkerRole)); + } + } +} diff --git a/Samples/AzureFullDuplex/OrderWebSite/Default.aspx b/Samples/AzureFullDuplex/OrderWebSite/Default.aspx index 07ba3eaa53e..5c5901eedf5 100644 --- a/Samples/AzureFullDuplex/OrderWebSite/Default.aspx +++ b/Samples/AzureFullDuplex/OrderWebSite/Default.aspx @@ -1,56 +1,56 @@ -<%@ Page Language="C#" AutoEventWireup="true" Async="true" CodeBehind="Default.aspx.cs" Inherits="OrderWebSite._Default" %> - - - - - - -
-
- Enter quantity: - - -
-
- Refresh the page after submitting orders (would of course use Ajax for this in production :) ) -
-
- Click here to refresh orderlist -
-
- - - - - - - - - - - - - - - - - -
- Id - - Quantity - - Status -
- <%# DataBinder.Eval(Container.DataItem, "Id") %> - - <%# DataBinder.Eval(Container.DataItem, "Quantity") %> - - <%# DataBinder.Eval(Container.DataItem, "Status") %> -
- -
-
- - - +<%@ Page Language="C#" AutoEventWireup="true" Async="true" CodeBehind="Default.aspx.cs" Inherits="OrderWebSite._Default" %> + + + + + + +
+
+ Enter quantity: + + +
+
+ Refresh the page after submitting orders (would of course use Ajax for this in production :) ) +
+
+ Click here to refresh orderlist +
+
+ + + + + + + + + + + + + + + + + +
+ Id + + Quantity + + Status +
+ <%# DataBinder.Eval(Container.DataItem, "Id") %> + + <%# DataBinder.Eval(Container.DataItem, "Quantity") %> + + <%# DataBinder.Eval(Container.DataItem, "Status") %> +
+ +
+
+ + + diff --git a/Samples/AzureFullDuplex/OrderWebSite/Default.aspx.cs b/Samples/AzureFullDuplex/OrderWebSite/Default.aspx.cs index e9766a0293d..00f53dbee59 100644 --- a/Samples/AzureFullDuplex/OrderWebSite/Default.aspx.cs +++ b/Samples/AzureFullDuplex/OrderWebSite/Default.aspx.cs @@ -1,36 +1,36 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using MyMessages; -using NServiceBus; -using Order = MyMessages.Order; - -namespace OrderWebSite -{ - public partial class _Default : System.Web.UI.Page, IHandleMessages - { - protected void Page_PreRender(object sender, EventArgs e) - { - lock (WebRole.Orders) - OrderList.DataSource = new List(WebRole.Orders); - - OrderList.DataBind(); - } - - protected void btnSubmit_Click(object sender, EventArgs e) - { - WebRole.Bus - .Send(new SubmitOrderRequest - { - Id = Guid.NewGuid(), - Quantity = Convert.ToInt32(txtQuatity.Text) - }); - } - - public void Handle(SubmitOrderResponse message) - { - lock (WebRole.Orders) - WebRole.Orders.Add(message.Order); - } - } -} +using System; +using System.Collections.Generic; +using System.Threading; +using MyMessages; +using NServiceBus; +using Order = MyMessages.Order; + +namespace OrderWebSite +{ + public partial class _Default : System.Web.UI.Page, IHandleMessages + { + protected void Page_PreRender(object sender, EventArgs e) + { + lock (WebRole.Orders) + OrderList.DataSource = new List(WebRole.Orders); + + OrderList.DataBind(); + } + + protected void btnSubmit_Click(object sender, EventArgs e) + { + WebRole.Bus + .Send(new SubmitOrderRequest + { + Id = Guid.NewGuid(), + Quantity = Convert.ToInt32(txtQuatity.Text) + }); + } + + public void Handle(SubmitOrderResponse message) + { + lock (WebRole.Orders) + WebRole.Orders.Add(message.Order); + } + } +} diff --git a/Samples/AzureFullDuplex/OrderWebSite/Default.aspx.designer.cs b/Samples/AzureFullDuplex/OrderWebSite/Default.aspx.designer.cs index ef584044bb1..ce1c978147b 100644 --- a/Samples/AzureFullDuplex/OrderWebSite/Default.aspx.designer.cs +++ b/Samples/AzureFullDuplex/OrderWebSite/Default.aspx.designer.cs @@ -1,51 +1,51 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace OrderWebSite { - - - public partial class _Default { - - /// - /// form1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlForm form1; - - /// - /// txtQuatity control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox txtQuatity; - - /// - /// btnSubmit control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button btnSubmit; - - /// - /// OrderList control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Repeater OrderList; - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace OrderWebSite { + + + public partial class _Default { + + /// + /// form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// txtQuatity control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtQuatity; + + /// + /// btnSubmit control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnSubmit; + + /// + /// OrderList control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Repeater OrderList; + } +} diff --git a/Samples/AzureFullDuplex/OrderWebSite/Global.asax b/Samples/AzureFullDuplex/OrderWebSite/Global.asax index c300e345c7d..97e0ad28ae5 100644 --- a/Samples/AzureFullDuplex/OrderWebSite/Global.asax +++ b/Samples/AzureFullDuplex/OrderWebSite/Global.asax @@ -1 +1 @@ -<%@ Application Codebehind="Global.asax.cs" Inherits="OrderWebSite.Global" Language="C#" %> +<%@ Application Codebehind="Global.asax.cs" Inherits="OrderWebSite.Global" Language="C#" %> diff --git a/Samples/AzureFullDuplex/OrderWebSite/Global.asax.cs b/Samples/AzureFullDuplex/OrderWebSite/Global.asax.cs index ef0dd9dc562..d0e094f663a 100644 --- a/Samples/AzureFullDuplex/OrderWebSite/Global.asax.cs +++ b/Samples/AzureFullDuplex/OrderWebSite/Global.asax.cs @@ -1,38 +1,38 @@ -using System; -using System.Web; -using log4net; - -namespace OrderWebSite -{ - public class Global : HttpApplication - { - - protected void Application_Start(object sender, EventArgs e) - { - - } - - protected void Application_AuthenticateRequest(object sender, EventArgs e) - { - - } - - protected void Application_Error(object sender, EventArgs e) - { - //get reference to the source of the exception chain - var ex = Server.GetLastError().GetBaseException(); - - LogManager.GetLogger(typeof(Global)).Error(ex.ToString()); - } - - protected void Session_End(object sender, EventArgs e) - { - - } - - protected void Application_End(object sender, EventArgs e) - { - - } - } +using System; +using System.Web; +using log4net; + +namespace OrderWebSite +{ + public class Global : HttpApplication + { + + protected void Application_Start(object sender, EventArgs e) + { + + } + + protected void Application_AuthenticateRequest(object sender, EventArgs e) + { + + } + + protected void Application_Error(object sender, EventArgs e) + { + //get reference to the source of the exception chain + var ex = Server.GetLastError().GetBaseException(); + + LogManager.GetLogger(typeof(Global)).Error(ex.ToString()); + } + + protected void Session_End(object sender, EventArgs e) + { + + } + + protected void Application_End(object sender, EventArgs e) + { + + } + } } \ No newline at end of file diff --git a/Samples/AzureFullDuplex/OrderWebSite/OrderWebSite.csproj b/Samples/AzureFullDuplex/OrderWebSite/OrderWebSite.csproj index eadb54df22d..93f98a18849 100644 --- a/Samples/AzureFullDuplex/OrderWebSite/OrderWebSite.csproj +++ b/Samples/AzureFullDuplex/OrderWebSite/OrderWebSite.csproj @@ -1,132 +1,132 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {F3798C2C-41DC-407C-9EBE-3F10C1CA9A76} - {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} - Library - Properties - OrderWebSite - OrderWebSite - v4.0 - - - 4.0 - - - - true - full - false - bin\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\ - TRACE - prompt - 4 - - - - False - ..\..\..\binaries\log4net.dll - - - False - ..\..\..\binaries\Microsoft.WindowsAzure.Diagnostics.dll - - - False - ..\..\..\binaries\Microsoft.WindowsAzure.ServiceRuntime.dll - - - False - ..\..\..\binaries\Microsoft.WindowsAzure.StorageClient.dll - - - False - ..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\binaries\NServiceBus.Core.dll - - - ..\..\..\build\hosting\NServiceBus.Hosting.dll - - - - - - - - - - - - - - - Designer - - - - - ASPXCodeBehind - Default.aspx - - - Default.aspx - - - Global.asax - - - - - - - {3871CC9B-235F-4E60-98F7-FEF04DB1201B} - MyMessages - - - - - - - - - - - - - False - True - 51188 - / - - - False - False - - - False - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {F3798C2C-41DC-407C-9EBE-3F10C1CA9A76} + {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + OrderWebSite + OrderWebSite + v4.0 + + + 4.0 + + + + true + full + false + bin\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\ + TRACE + prompt + 4 + + + + False + ..\..\..\binaries\log4net.dll + + + False + ..\..\..\binaries\Microsoft.WindowsAzure.Diagnostics.dll + + + False + ..\..\..\binaries\Microsoft.WindowsAzure.ServiceRuntime.dll + + + False + ..\..\..\binaries\Microsoft.WindowsAzure.StorageClient.dll + + + False + ..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\binaries\NServiceBus.Core.dll + + + ..\..\..\build\hosting\NServiceBus.Hosting.dll + + + + + + + + + + + + + + + Designer + + + + + ASPXCodeBehind + Default.aspx + + + Default.aspx + + + Global.asax + + + + + + + {3871CC9B-235F-4E60-98F7-FEF04DB1201B} + MyMessages + + + + + + + + + + + + + False + True + 51188 + / + + + False + False + + + False + + + + \ No newline at end of file diff --git a/Samples/AzureFullDuplex/OrderWebSite/OrderWebSite.csproj.user b/Samples/AzureFullDuplex/OrderWebSite/OrderWebSite.csproj.user index 9e237d15c92..6aa6b739b4f 100644 --- a/Samples/AzureFullDuplex/OrderWebSite/OrderWebSite.csproj.user +++ b/Samples/AzureFullDuplex/OrderWebSite/OrderWebSite.csproj.user @@ -1,28 +1,28 @@ - - - - - - - - - CurrentPage - True - False - False - False - - - - - - - - - False - False - - - - + + + + + + + + + CurrentPage + True + False + False + False + + + + + + + + + False + False + + + + \ No newline at end of file diff --git a/Samples/AzureFullDuplex/OrderWebSite/Properties/AssemblyInfo.cs b/Samples/AzureFullDuplex/OrderWebSite/Properties/AssemblyInfo.cs index cd6e8984485..e2cf2ae74bf 100644 --- a/Samples/AzureFullDuplex/OrderWebSite/Properties/AssemblyInfo.cs +++ b/Samples/AzureFullDuplex/OrderWebSite/Properties/AssemblyInfo.cs @@ -1,35 +1,35 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OrderWebSite")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("OrderWebSite")] -[assembly: AssemblyCopyright("Copyright © 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("3d5900ae-111a-45be-96b3-d9e4606ca793")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("OrderWebSite")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("OrderWebSite")] +[assembly: AssemblyCopyright("Copyright © 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("3d5900ae-111a-45be-96b3-d9e4606ca793")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/AzureFullDuplex/OrderWebSite/Web.config b/Samples/AzureFullDuplex/OrderWebSite/Web.config index c8f516aedcf..dfad3fe8cce 100644 --- a/Samples/AzureFullDuplex/OrderWebSite/Web.config +++ b/Samples/AzureFullDuplex/OrderWebSite/Web.config @@ -1,23 +1,23 @@ - - - -
-
-
- - - - - - - - - - - - - - - - - + + + +
+
+
+ + + + + + + + + + + + + + + + + diff --git a/Samples/AzureFullDuplex/OrderWebSite/WebRole.cs b/Samples/AzureFullDuplex/OrderWebSite/WebRole.cs index b85073e5c63..7204fdd0659 100644 --- a/Samples/AzureFullDuplex/OrderWebSite/WebRole.cs +++ b/Samples/AzureFullDuplex/OrderWebSite/WebRole.cs @@ -1,37 +1,37 @@ -using System.Collections.Generic; -using log4net.Core; -using Microsoft.WindowsAzure.ServiceRuntime; -using MyMessages; -using NServiceBus; -using NServiceBus.Config; -using NServiceBus.Integration.Azure; - -public class WebRole : RoleEntryPoint -{ - public static IBus Bus; - public static IList Orders; - - public override bool OnStart() - { - Orders = new List(); - - ConfigureNServiceBus(); - - return base.OnStart(); - } - - private void ConfigureNServiceBus() - { - Bus = Configure.WithWeb() - .DefaultBuilder() // sets up the ioc container - .Log4Net(new AzureAppender()) // logging - .AzureConfigurationSource() // configures service configuration file support - .AzureMessageQueue() // use azure storage queues - .XmlSerializer() - .UnicastBus() - .LoadMessageHandlers() // automatically register known message handlers - .IsTransactional(true) - .CreateBus() - .Start(); - } +using System.Collections.Generic; +using log4net.Core; +using Microsoft.WindowsAzure.ServiceRuntime; +using MyMessages; +using NServiceBus; +using NServiceBus.Config; +using NServiceBus.Integration.Azure; + +public class WebRole : RoleEntryPoint +{ + public static IBus Bus; + public static IList Orders; + + public override bool OnStart() + { + Orders = new List(); + + ConfigureNServiceBus(); + + return base.OnStart(); + } + + private void ConfigureNServiceBus() + { + Bus = Configure.WithWeb() + .DefaultBuilder() // sets up the ioc container + .Log4Net(new AzureAppender()) // logging + .AzureConfigurationSource() // configures service configuration file support + .AzureMessageQueue() // use azure storage queues + .XmlSerializer() + .UnicastBus() + .LoadMessageHandlers() // automatically register known message handlers + .IsTransactional(true) + .CreateBus() + .Start(); + } } \ No newline at end of file diff --git a/Samples/AzureFullDuplex/ServiceConfiguration.cscfg b/Samples/AzureFullDuplex/ServiceConfiguration.cscfg index 10cdba2b80f..54f6bcf9957 100644 --- a/Samples/AzureFullDuplex/ServiceConfiguration.cscfg +++ b/Samples/AzureFullDuplex/ServiceConfiguration.cscfg @@ -1,38 +1,38 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Samples/AzureFullDuplex/ServiceDefinition.csdef b/Samples/AzureFullDuplex/ServiceDefinition.csdef index bfd0ec7c56a..72acf441223 100644 --- a/Samples/AzureFullDuplex/ServiceDefinition.csdef +++ b/Samples/AzureFullDuplex/ServiceDefinition.csdef @@ -1,36 +1,36 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Samples/AzurePubSub/AzurePubSub.ccproj b/Samples/AzurePubSub/AzurePubSub.ccproj index 55e768de6c7..ad42f2a9cbb 100644 --- a/Samples/AzurePubSub/AzurePubSub.ccproj +++ b/Samples/AzurePubSub/AzurePubSub.ccproj @@ -1,74 +1,74 @@ - - - - Debug - AnyCPU - 1.0.0 - {adcfc6b6-8bf7-4d56-b6a4-f6d221111666} - Library - Properties - AzureService - AzureService - True - AzureService - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - OrderService - {84aca710-e5b3-4a46-b87a-7c12fb2527a8} - True - Worker - OrderService - - - - OrderWebSite - {f3798c2c-41dc-407c-9ebe-3f10c1ca9a76} - True - Web - OrderWebSite - - - - - $(MSBuildExtensionsPath)\Microsoft\Cloud Service\1.0\Visual Studio 10.0\ - - - - - - - - + + + + Debug + AnyCPU + 1.0.0 + {adcfc6b6-8bf7-4d56-b6a4-f6d221111666} + Library + Properties + AzureService + AzureService + True + AzureService + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + OrderService + {84aca710-e5b3-4a46-b87a-7c12fb2527a8} + True + Worker + OrderService + + + + OrderWebSite + {f3798c2c-41dc-407c-9ebe-3f10c1ca9a76} + True + Web + OrderWebSite + + + + + $(MSBuildExtensionsPath)\Microsoft\Cloud Service\1.0\Visual Studio 10.0\ + + + + + + + + \ No newline at end of file diff --git a/Samples/AzurePubSub/AzurePubSub.ccproj.user b/Samples/AzurePubSub/AzurePubSub.ccproj.user index d3700e29267..16679ee303e 100644 --- a/Samples/AzurePubSub/AzurePubSub.ccproj.user +++ b/Samples/AzurePubSub/AzurePubSub.ccproj.user @@ -1,16 +1,16 @@ - - - - False - YvesGoeleven - yvesgoeleven - Goeleven - Production - False - goelevenplayground - playground - AzureService - 26/09/2010 17:21:40 - True - False - + + + + False + YvesGoeleven + yvesgoeleven + Goeleven + Production + False + goelevenplayground + playground + AzureService - 26/09/2010 17:21:40 + True + False + \ No newline at end of file diff --git a/Samples/AzurePubSub/AzurePubSub.sln b/Samples/AzurePubSub/AzurePubSub.sln index 575ad071995..a9a189af175 100644 --- a/Samples/AzurePubSub/AzurePubSub.sln +++ b/Samples/AzurePubSub/AzurePubSub.sln @@ -1,38 +1,38 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{CC5FD16D-436D-48AD-A40C-5A424C6E3E79}") = "AzurePubSub", "AzurePubSub.ccproj", "{ADCFC6B6-8BF7-4D56-B6A4-F6D221111666}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrderWebSite", "OrderWebSite\OrderWebSite.csproj", "{F3798C2C-41DC-407C-9EBE-3F10C1CA9A76}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrderService", "OrderService\OrderService.csproj", "{84ACA710-E5B3-4A46-B87A-7C12FB2527A8}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyMessages", "MyMessages\MyMessages.csproj", "{3871CC9B-235F-4E60-98F7-FEF04DB1201B}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {ADCFC6B6-8BF7-4D56-B6A4-F6D221111666}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {ADCFC6B6-8BF7-4D56-B6A4-F6D221111666}.Debug|Any CPU.Build.0 = Debug|Any CPU - {ADCFC6B6-8BF7-4D56-B6A4-F6D221111666}.Release|Any CPU.ActiveCfg = Release|Any CPU - {ADCFC6B6-8BF7-4D56-B6A4-F6D221111666}.Release|Any CPU.Build.0 = Release|Any CPU - {F3798C2C-41DC-407C-9EBE-3F10C1CA9A76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F3798C2C-41DC-407C-9EBE-3F10C1CA9A76}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F3798C2C-41DC-407C-9EBE-3F10C1CA9A76}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F3798C2C-41DC-407C-9EBE-3F10C1CA9A76}.Release|Any CPU.Build.0 = Release|Any CPU - {84ACA710-E5B3-4A46-B87A-7C12FB2527A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {84ACA710-E5B3-4A46-B87A-7C12FB2527A8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {84ACA710-E5B3-4A46-B87A-7C12FB2527A8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {84ACA710-E5B3-4A46-B87A-7C12FB2527A8}.Release|Any CPU.Build.0 = Release|Any CPU - {3871CC9B-235F-4E60-98F7-FEF04DB1201B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3871CC9B-235F-4E60-98F7-FEF04DB1201B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3871CC9B-235F-4E60-98F7-FEF04DB1201B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3871CC9B-235F-4E60-98F7-FEF04DB1201B}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{CC5FD16D-436D-48AD-A40C-5A424C6E3E79}") = "AzurePubSub", "AzurePubSub.ccproj", "{ADCFC6B6-8BF7-4D56-B6A4-F6D221111666}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrderWebSite", "OrderWebSite\OrderWebSite.csproj", "{F3798C2C-41DC-407C-9EBE-3F10C1CA9A76}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrderService", "OrderService\OrderService.csproj", "{84ACA710-E5B3-4A46-B87A-7C12FB2527A8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyMessages", "MyMessages\MyMessages.csproj", "{3871CC9B-235F-4E60-98F7-FEF04DB1201B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {ADCFC6B6-8BF7-4D56-B6A4-F6D221111666}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ADCFC6B6-8BF7-4D56-B6A4-F6D221111666}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ADCFC6B6-8BF7-4D56-B6A4-F6D221111666}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ADCFC6B6-8BF7-4D56-B6A4-F6D221111666}.Release|Any CPU.Build.0 = Release|Any CPU + {F3798C2C-41DC-407C-9EBE-3F10C1CA9A76}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F3798C2C-41DC-407C-9EBE-3F10C1CA9A76}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F3798C2C-41DC-407C-9EBE-3F10C1CA9A76}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F3798C2C-41DC-407C-9EBE-3F10C1CA9A76}.Release|Any CPU.Build.0 = Release|Any CPU + {84ACA710-E5B3-4A46-B87A-7C12FB2527A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {84ACA710-E5B3-4A46-B87A-7C12FB2527A8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {84ACA710-E5B3-4A46-B87A-7C12FB2527A8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {84ACA710-E5B3-4A46-B87A-7C12FB2527A8}.Release|Any CPU.Build.0 = Release|Any CPU + {3871CC9B-235F-4E60-98F7-FEF04DB1201B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3871CC9B-235F-4E60-98F7-FEF04DB1201B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3871CC9B-235F-4E60-98F7-FEF04DB1201B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3871CC9B-235F-4E60-98F7-FEF04DB1201B}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Samples/AzurePubSub/MyMessages/LoadOrdersMessage.cs b/Samples/AzurePubSub/MyMessages/LoadOrdersMessage.cs index 8d4a216db07..a39aa1a5fa5 100644 --- a/Samples/AzurePubSub/MyMessages/LoadOrdersMessage.cs +++ b/Samples/AzurePubSub/MyMessages/LoadOrdersMessage.cs @@ -1,9 +1,9 @@ -using NServiceBus; - -namespace MyMessages -{ - public class LoadOrdersMessage:IMessage - { - - } +using NServiceBus; + +namespace MyMessages +{ + public class LoadOrdersMessage:IMessage + { + + } } \ No newline at end of file diff --git a/Samples/AzurePubSub/MyMessages/LoadOrdersResponseMessage.cs b/Samples/AzurePubSub/MyMessages/LoadOrdersResponseMessage.cs index 4c71e47fcc4..315ef57ae1f 100644 --- a/Samples/AzurePubSub/MyMessages/LoadOrdersResponseMessage.cs +++ b/Samples/AzurePubSub/MyMessages/LoadOrdersResponseMessage.cs @@ -1,25 +1,25 @@ -using System.Collections.Generic; -using NServiceBus; - -namespace MyMessages -{ - public class LoadOrdersResponseMessage : IMessage - { - private List orders; - - public List Orders - { - get - { - if(orders == null) - orders = new List(); - - return orders; - } - set - { - orders = value; - } - } - } +using System.Collections.Generic; +using NServiceBus; + +namespace MyMessages +{ + public class LoadOrdersResponseMessage : IMessage + { + private List orders; + + public List Orders + { + get + { + if(orders == null) + orders = new List(); + + return orders; + } + set + { + orders = value; + } + } + } } \ No newline at end of file diff --git a/Samples/AzurePubSub/MyMessages/MyMessages.csproj b/Samples/AzurePubSub/MyMessages/MyMessages.csproj index f0a0a0731b6..b88c948e4c6 100644 --- a/Samples/AzurePubSub/MyMessages/MyMessages.csproj +++ b/Samples/AzurePubSub/MyMessages/MyMessages.csproj @@ -1,60 +1,60 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {3871CC9B-235F-4E60-98F7-FEF04DB1201B} - Library - Properties - MyMessages - MyMessages - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\binaries\NServiceBus.dll - - - - - - - - - - - - - - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {3871CC9B-235F-4E60-98F7-FEF04DB1201B} + Library + Properties + MyMessages + MyMessages + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\binaries\NServiceBus.dll + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Samples/AzurePubSub/MyMessages/Order.cs b/Samples/AzurePubSub/MyMessages/Order.cs index a2806b6da8d..78a36a1d312 100644 --- a/Samples/AzurePubSub/MyMessages/Order.cs +++ b/Samples/AzurePubSub/MyMessages/Order.cs @@ -1,43 +1,43 @@ -using System; - -namespace MyMessages -{ - public class Order - { - public Guid Id { get; set; } - public OrderStatus Status { get; set; } - - public int Quantity { get; set; } - - - public bool Equals(Order other) - { - if (ReferenceEquals(null, other)) return false; - if (ReferenceEquals(this, other)) return true; - return other.Id.Equals(Id); - } - - public override bool Equals(object obj) - { - if (ReferenceEquals(null, obj)) return false; - if (ReferenceEquals(this, obj)) return true; - if (obj.GetType() != typeof (Order)) return false; - return Equals((Order) obj); - } - - public override int GetHashCode() - { - return Id.GetHashCode(); - } - - public static bool operator ==(Order left, Order right) - { - return Equals(left, right); - } - - public static bool operator !=(Order left, Order right) - { - return !Equals(left, right); - } - } +using System; + +namespace MyMessages +{ + public class Order + { + public Guid Id { get; set; } + public OrderStatus Status { get; set; } + + public int Quantity { get; set; } + + + public bool Equals(Order other) + { + if (ReferenceEquals(null, other)) return false; + if (ReferenceEquals(this, other)) return true; + return other.Id.Equals(Id); + } + + public override bool Equals(object obj) + { + if (ReferenceEquals(null, obj)) return false; + if (ReferenceEquals(this, obj)) return true; + if (obj.GetType() != typeof (Order)) return false; + return Equals((Order) obj); + } + + public override int GetHashCode() + { + return Id.GetHashCode(); + } + + public static bool operator ==(Order left, Order right) + { + return Equals(left, right); + } + + public static bool operator !=(Order left, Order right) + { + return !Equals(left, right); + } + } } \ No newline at end of file diff --git a/Samples/AzurePubSub/MyMessages/OrderMessage.cs b/Samples/AzurePubSub/MyMessages/OrderMessage.cs index 347cb083339..538fd3e532c 100644 --- a/Samples/AzurePubSub/MyMessages/OrderMessage.cs +++ b/Samples/AzurePubSub/MyMessages/OrderMessage.cs @@ -1,11 +1,11 @@ -using System; -using NServiceBus; - -namespace MyMessages -{ - public class OrderMessage:IMessage - { - public Guid Id { get; set; } - public int Quantity { get; set; } - } -} +using System; +using NServiceBus; + +namespace MyMessages +{ + public class OrderMessage:IMessage + { + public Guid Id { get; set; } + public int Quantity { get; set; } + } +} diff --git a/Samples/AzurePubSub/MyMessages/OrderStatus.cs b/Samples/AzurePubSub/MyMessages/OrderStatus.cs index 29961f0447a..2d78e051238 100644 --- a/Samples/AzurePubSub/MyMessages/OrderStatus.cs +++ b/Samples/AzurePubSub/MyMessages/OrderStatus.cs @@ -1,9 +1,9 @@ -namespace MyMessages -{ - public enum OrderStatus - { - AwaitingApproval, - Approved, - Pending - } +namespace MyMessages +{ + public enum OrderStatus + { + AwaitingApproval, + Approved, + Pending + } } \ No newline at end of file diff --git a/Samples/AzurePubSub/MyMessages/OrderUpdatedEvent.cs b/Samples/AzurePubSub/MyMessages/OrderUpdatedEvent.cs index d12771166b9..f022ac1ebf7 100644 --- a/Samples/AzurePubSub/MyMessages/OrderUpdatedEvent.cs +++ b/Samples/AzurePubSub/MyMessages/OrderUpdatedEvent.cs @@ -1,9 +1,9 @@ -using NServiceBus; - -namespace MyMessages -{ - public interface OrderUpdatedEvent:IMessage - { - Order UpdatedOrder{ get; set; } - } +using NServiceBus; + +namespace MyMessages +{ + public interface OrderUpdatedEvent:IMessage + { + Order UpdatedOrder{ get; set; } + } } \ No newline at end of file diff --git a/Samples/AzurePubSub/MyMessages/Properties/AssemblyInfo.cs b/Samples/AzurePubSub/MyMessages/Properties/AssemblyInfo.cs index 2f9c958524f..3ffd0007b74 100644 --- a/Samples/AzurePubSub/MyMessages/Properties/AssemblyInfo.cs +++ b/Samples/AzurePubSub/MyMessages/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("MyMessages")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("MyMessages")] -[assembly: AssemblyCopyright("Copyright © 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("39b14fdb-e9e9-4dab-96e5-919966481923")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("MyMessages")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("MyMessages")] +[assembly: AssemblyCopyright("Copyright © 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("39b14fdb-e9e9-4dab-96e5-919966481923")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/AzurePubSub/OrderService/App.config b/Samples/AzurePubSub/OrderService/App.config index 3d40b809b44..08445233a75 100644 --- a/Samples/AzurePubSub/OrderService/App.config +++ b/Samples/AzurePubSub/OrderService/App.config @@ -1,26 +1,26 @@ - - - -
-
-
-
- - - - - - - - - - - - - - - - - - - + + + +
+
+
+
+ + + + + + + + + + + + + + + + + + + diff --git a/Samples/AzurePubSub/OrderService/EndpointConfiguration.cs b/Samples/AzurePubSub/OrderService/EndpointConfiguration.cs index 8a4d7ea1916..d777a78e67c 100644 --- a/Samples/AzurePubSub/OrderService/EndpointConfiguration.cs +++ b/Samples/AzurePubSub/OrderService/EndpointConfiguration.cs @@ -1,6 +1,6 @@ -using NServiceBus; - -namespace OrderService -{ - public class EndpointConfiguration : IConfigureThisEndpoint, AsA_Publisher { } +using NServiceBus; + +namespace OrderService +{ + public class EndpointConfiguration : IConfigureThisEndpoint, AsA_Publisher { } } \ No newline at end of file diff --git a/Samples/AzurePubSub/OrderService/EndpointInitialisation.cs b/Samples/AzurePubSub/OrderService/EndpointInitialisation.cs index ed7e54f94ad..99bb258aba5 100644 --- a/Samples/AzurePubSub/OrderService/EndpointInitialisation.cs +++ b/Samples/AzurePubSub/OrderService/EndpointInitialisation.cs @@ -1,12 +1,12 @@ -using NServiceBus; - -namespace OrderService -{ - public class EndpointInitialisation : IWantCustomInitialization - { - public void Init() - { - Configure.Instance.Configurer.RegisterSingleton(new OrderList()); - } - } -} +using NServiceBus; + +namespace OrderService +{ + public class EndpointInitialisation : IWantCustomInitialization + { + public void Init() + { + Configure.Instance.Configurer.RegisterSingleton(new OrderList()); + } + } +} diff --git a/Samples/AzurePubSub/OrderService/Host.cs b/Samples/AzurePubSub/OrderService/Host.cs index 8f336c04c3c..2a2f8d372c6 100644 --- a/Samples/AzurePubSub/OrderService/Host.cs +++ b/Samples/AzurePubSub/OrderService/Host.cs @@ -1,6 +1,6 @@ -using NServiceBus.Hosting.Azure; - -namespace OrderService -{ - public class Host : RoleEntryPoint{} +using NServiceBus.Hosting.Azure; + +namespace OrderService +{ + public class Host : RoleEntryPoint{} } \ No newline at end of file diff --git a/Samples/AzurePubSub/OrderService/MessageHandlers/LoadOrdersMessageHandlers.cs b/Samples/AzurePubSub/OrderService/MessageHandlers/LoadOrdersMessageHandlers.cs index 9ba67ddb38e..c6f0c86fde2 100644 --- a/Samples/AzurePubSub/OrderService/MessageHandlers/LoadOrdersMessageHandlers.cs +++ b/Samples/AzurePubSub/OrderService/MessageHandlers/LoadOrdersMessageHandlers.cs @@ -1,27 +1,27 @@ -using System.Linq; -using MyMessages; -using NServiceBus; - -namespace OrderService.MessageHandlers -{ - public class LoadOrdersMessageHandlers : IHandleMessages - { - private readonly IBus bus; - private readonly OrderList orders; - - public LoadOrdersMessageHandlers(IBus bus,OrderList orders) - { - this.bus = bus; - this.orders = orders; - } - - public void Handle(LoadOrdersMessage message) - { - var reply = new LoadOrdersResponseMessage - { - Orders = orders.GetCurrentOrders().ToList() - }; - bus.Reply(reply); - } - } +using System.Linq; +using MyMessages; +using NServiceBus; + +namespace OrderService.MessageHandlers +{ + public class LoadOrdersMessageHandlers : IHandleMessages + { + private readonly IBus bus; + private readonly OrderList orders; + + public LoadOrdersMessageHandlers(IBus bus,OrderList orders) + { + this.bus = bus; + this.orders = orders; + } + + public void Handle(LoadOrdersMessage message) + { + var reply = new LoadOrdersResponseMessage + { + Orders = orders.GetCurrentOrders().ToList() + }; + bus.Reply(reply); + } + } } \ No newline at end of file diff --git a/Samples/AzurePubSub/OrderService/MessageHandlers/OrderMessageHandler.cs b/Samples/AzurePubSub/OrderService/MessageHandlers/OrderMessageHandler.cs index 832acd7e858..b57074f9107 100644 --- a/Samples/AzurePubSub/OrderService/MessageHandlers/OrderMessageHandler.cs +++ b/Samples/AzurePubSub/OrderService/MessageHandlers/OrderMessageHandler.cs @@ -1,39 +1,39 @@ -using System.Threading; -using MyMessages; -using NServiceBus; -using Order=MyMessages.Order; - -namespace OrderService.MessageHandlers -{ - public class OrderMessageHandler : IHandleMessages - { - private readonly IBus bus; - private readonly OrderList orders; - - public OrderMessageHandler(IBus bus, OrderList orders) - { - this.bus = bus; - this.orders = orders; - } - - public void Handle(OrderMessage message) - { - var order = new Order - { - Id = message.Id, - Quantity = message.Quantity - }; - //simulate processing - Thread.Sleep(4000); - - //simlute business logic - order.Status = message.Quantity < 100 ? OrderStatus.Approved : OrderStatus.AwaitingApproval; - - orders.AddOrder(order); - - //publish update - var orderUpdatedEvent = bus.CreateInstance(x=>x.UpdatedOrder = order); - bus.Publish(orderUpdatedEvent); - } - } +using System.Threading; +using MyMessages; +using NServiceBus; +using Order=MyMessages.Order; + +namespace OrderService.MessageHandlers +{ + public class OrderMessageHandler : IHandleMessages + { + private readonly IBus bus; + private readonly OrderList orders; + + public OrderMessageHandler(IBus bus, OrderList orders) + { + this.bus = bus; + this.orders = orders; + } + + public void Handle(OrderMessage message) + { + var order = new Order + { + Id = message.Id, + Quantity = message.Quantity + }; + //simulate processing + Thread.Sleep(4000); + + //simlute business logic + order.Status = message.Quantity < 100 ? OrderStatus.Approved : OrderStatus.AwaitingApproval; + + orders.AddOrder(order); + + //publish update + var orderUpdatedEvent = bus.CreateInstance(x=>x.UpdatedOrder = order); + bus.Publish(orderUpdatedEvent); + } + } } \ No newline at end of file diff --git a/Samples/AzurePubSub/OrderService/OrderList.cs b/Samples/AzurePubSub/OrderService/OrderList.cs index 464c93f4469..65dc4f5be54 100644 --- a/Samples/AzurePubSub/OrderService/OrderList.cs +++ b/Samples/AzurePubSub/OrderService/OrderList.cs @@ -1,63 +1,63 @@ -using System; -using System.Collections.Generic; - -using System.Linq; -using MyMessages; - -namespace OrderService -{ - public class OrderList - { - private readonly IList orders; - - public OrderList() - { - //add some orders to simulate "existing orders" - orders = new List - { - new Order {Id = Guid.NewGuid(), Quantity = 20, Status = OrderStatus.Approved}, - new Order {Id = Guid.NewGuid(), Quantity = 300, Status = OrderStatus.Approved} - }; - } - - public void AddOrder(Order order) - { - lock(orders) - orders.Add(order); - } - - public Order UpdateStatus(Order order,OrderStatus newStatus) - { - lock (orders) - { - foreach (var orderToUpdate in orders) - { - if(orderToUpdate.Id == order.Id) - { - orderToUpdate.Status = newStatus; - return orderToUpdate; - } - - } - throw new Exception("Order not found"); - } - - } - - - - public IEnumerable GetOrdersToApprove() - { - lock(orders) - { - return new List(orders.Where(x => x.Status == OrderStatus.AwaitingApproval)); - } - } - - public IEnumerable GetCurrentOrders() - { - lock (orders) - return new List(orders); - } - } +using System; +using System.Collections.Generic; + +using System.Linq; +using MyMessages; + +namespace OrderService +{ + public class OrderList + { + private readonly IList orders; + + public OrderList() + { + //add some orders to simulate "existing orders" + orders = new List + { + new Order {Id = Guid.NewGuid(), Quantity = 20, Status = OrderStatus.Approved}, + new Order {Id = Guid.NewGuid(), Quantity = 300, Status = OrderStatus.Approved} + }; + } + + public void AddOrder(Order order) + { + lock(orders) + orders.Add(order); + } + + public Order UpdateStatus(Order order,OrderStatus newStatus) + { + lock (orders) + { + foreach (var orderToUpdate in orders) + { + if(orderToUpdate.Id == order.Id) + { + orderToUpdate.Status = newStatus; + return orderToUpdate; + } + + } + throw new Exception("Order not found"); + } + + } + + + + public IEnumerable GetOrdersToApprove() + { + lock(orders) + { + return new List(orders.Where(x => x.Status == OrderStatus.AwaitingApproval)); + } + } + + public IEnumerable GetCurrentOrders() + { + lock (orders) + return new List(orders); + } + } } \ No newline at end of file diff --git a/Samples/AzurePubSub/OrderService/OrderService.csproj b/Samples/AzurePubSub/OrderService/OrderService.csproj index a5287ef9392..3e3f4052095 100644 --- a/Samples/AzurePubSub/OrderService/OrderService.csproj +++ b/Samples/AzurePubSub/OrderService/OrderService.csproj @@ -1,102 +1,102 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {84ACA710-E5B3-4A46-B87A-7C12FB2527A8} - Library - Properties - OrderService - OrderService - v4.0 - 512 - Worker - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\binaries\log4net.dll - - - False - ..\..\..\binaries\Microsoft.WindowsAzure.Diagnostics.dll - - - False - ..\..\..\binaries\Microsoft.WindowsAzure.ServiceRuntime.dll - True - - - False - ..\..\..\binaries\Microsoft.WindowsAzure.StorageClient.dll - - - False - ..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\binaries\NServiceBus.Core.dll - - - False - ..\..\..\build\hosting\NServiceBus.Hosting.dll - - - False - ..\..\..\build\hosting\NServiceBus.Hosting.Azure.dll - - - - - - - - - - - - - - - - - - - {3871CC9B-235F-4E60-98F7-FEF04DB1201B} - MyMessages - - - - - Designer - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {84ACA710-E5B3-4A46-B87A-7C12FB2527A8} + Library + Properties + OrderService + OrderService + v4.0 + 512 + Worker + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\binaries\log4net.dll + + + False + ..\..\..\binaries\Microsoft.WindowsAzure.Diagnostics.dll + + + False + ..\..\..\binaries\Microsoft.WindowsAzure.ServiceRuntime.dll + True + + + False + ..\..\..\binaries\Microsoft.WindowsAzure.StorageClient.dll + + + False + ..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\binaries\NServiceBus.Core.dll + + + False + ..\..\..\build\hosting\NServiceBus.Hosting.dll + + + False + ..\..\..\build\hosting\NServiceBus.Hosting.Azure.dll + + + + + + + + + + + + + + + + + + + {3871CC9B-235F-4E60-98F7-FEF04DB1201B} + MyMessages + + + + + Designer + + + + \ No newline at end of file diff --git a/Samples/AzurePubSub/OrderService/Properties/AssemblyInfo.cs b/Samples/AzurePubSub/OrderService/Properties/AssemblyInfo.cs index aa871cd8d91..77fc28ac62a 100644 --- a/Samples/AzurePubSub/OrderService/Properties/AssemblyInfo.cs +++ b/Samples/AzurePubSub/OrderService/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OrderService")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("OrderService")] -[assembly: AssemblyCopyright("Copyright © 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("6fdad954-96d7-4733-b5ee-41733ae4f018")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("OrderService")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("OrderService")] +[assembly: AssemblyCopyright("Copyright © 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("6fdad954-96d7-4733-b5ee-41733ae4f018")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/AzurePubSub/OrderService/WorkerRole.cs b/Samples/AzurePubSub/OrderService/WorkerRole.cs index 713b1ea9180..34da24466f9 100644 --- a/Samples/AzurePubSub/OrderService/WorkerRole.cs +++ b/Samples/AzurePubSub/OrderService/WorkerRole.cs @@ -1,99 +1,99 @@ -using System; -using System.Collections.Specialized; -using System.Threading; -using Common.Logging; -using log4net.Core; -using Microsoft.WindowsAzure.ServiceRuntime; -using MyMessages; -using NServiceBus; -using NServiceBus.Config; -using NServiceBus.Integration.Azure; - -namespace OrderService -{ - public class WorkerRole : RoleEntryPoint - { - public IBus Bus; - - public OrderList Orders = new OrderList(); - private ILog logger; - - public override void Run() - { - ConfigureLogging(); - - logger.Info("Starting order worker with instance id:" + RoleEnvironment.CurrentRoleInstance.Id); - - ConfigureNServiceBus(); - - while (true) - { - Thread.Sleep(10000); - - logger.Info("Approving orders"); - - foreach (var order in Orders.GetOrdersToApprove()) - { - var updatedOrder = Orders.UpdateStatus(order, OrderStatus.Approved); - - //publish update - var orderUpdatedEvent = Bus.CreateInstance(x => x.UpdatedOrder = updatedOrder); - Bus.Publish(orderUpdatedEvent); - } - } - } - - private void ConfigureNServiceBus() - { - - logger.Info("Initalizing NServiceBus"); - try - { - var config = Configure.With() - .SpringBuilder() - .AzureConfigurationSource() - .XmlSerializer() - .UnicastBus() - .LoadMessageHandlers() - .AzureQueuesTransport() - .IsTransactional(true) - .PurgeOnStartup(false) - .InMemorySubscriptionStorage();//we use inmemory storage until we have a sub storage for TableStorage or SQL Services - - Configure.Instance.Configurer.RegisterSingleton(Orders); - - Bus = config.CreateBus() - .Start(); - - } - catch (Exception ex) - { - logger.Error(ex); - throw; - } - - logger.Info("NServiceBus started"); - - } - - - private void ConfigureLogging() - { - LogManager.Adapter = new Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter(new NameValueCollection - { - {"configType","EXTERNAL"} - }); - - var appender = new AzureAppender - { - ConnectionStringKey = "AzureQueueConfig.ConnectionString", - Threshold = Level.Debug - }; - appender.ActivateOptions(); - - log4net.Config.BasicConfigurator.Configure(appender); - - logger = LogManager.GetLogger(typeof(WorkerRole)); - } - } -} +using System; +using System.Collections.Specialized; +using System.Threading; +using Common.Logging; +using log4net.Core; +using Microsoft.WindowsAzure.ServiceRuntime; +using MyMessages; +using NServiceBus; +using NServiceBus.Config; +using NServiceBus.Integration.Azure; + +namespace OrderService +{ + public class WorkerRole : RoleEntryPoint + { + public IBus Bus; + + public OrderList Orders = new OrderList(); + private ILog logger; + + public override void Run() + { + ConfigureLogging(); + + logger.Info("Starting order worker with instance id:" + RoleEnvironment.CurrentRoleInstance.Id); + + ConfigureNServiceBus(); + + while (true) + { + Thread.Sleep(10000); + + logger.Info("Approving orders"); + + foreach (var order in Orders.GetOrdersToApprove()) + { + var updatedOrder = Orders.UpdateStatus(order, OrderStatus.Approved); + + //publish update + var orderUpdatedEvent = Bus.CreateInstance(x => x.UpdatedOrder = updatedOrder); + Bus.Publish(orderUpdatedEvent); + } + } + } + + private void ConfigureNServiceBus() + { + + logger.Info("Initalizing NServiceBus"); + try + { + var config = Configure.With() + .SpringBuilder() + .AzureConfigurationSource() + .XmlSerializer() + .UnicastBus() + .LoadMessageHandlers() + .AzureQueuesTransport() + .IsTransactional(true) + .PurgeOnStartup(false) + .InMemorySubscriptionStorage();//we use inmemory storage until we have a sub storage for TableStorage or SQL Services + + Configure.Instance.Configurer.RegisterSingleton(Orders); + + Bus = config.CreateBus() + .Start(); + + } + catch (Exception ex) + { + logger.Error(ex); + throw; + } + + logger.Info("NServiceBus started"); + + } + + + private void ConfigureLogging() + { + LogManager.Adapter = new Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter(new NameValueCollection + { + {"configType","EXTERNAL"} + }); + + var appender = new AzureAppender + { + ConnectionStringKey = "AzureQueueConfig.ConnectionString", + Threshold = Level.Debug + }; + appender.ActivateOptions(); + + log4net.Config.BasicConfigurator.Configure(appender); + + logger = LogManager.GetLogger(typeof(WorkerRole)); + } + } +} diff --git a/Samples/AzurePubSub/OrderWebSite/Default.aspx b/Samples/AzurePubSub/OrderWebSite/Default.aspx index 0e420d2b60a..6215a4f4b95 100644 --- a/Samples/AzurePubSub/OrderWebSite/Default.aspx +++ b/Samples/AzurePubSub/OrderWebSite/Default.aspx @@ -1,58 +1,58 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="OrderWebSite._Default" %> -<%@ Import Namespace="System.Data" %> - - - - - - -
-
- Enter quantity: - - -
-
- Entering a value above 100 will require manager approval (extends the delay 10 seconds)
- Refresh the page after submitting orders (would of course use Ajax for this in production :) ) -
- Click here to refresh orderlist -
-
-
- - - - - - - - - - - - - - - - - -
- Id - - Quantity - - Status -
- <%# DataBinder.Eval(Container.DataItem, "Id") %> - - <%# DataBinder.Eval(Container.DataItem, "Quantity") %> - - <%# DataBinder.Eval(Container.DataItem, "Status") %> -
- -
-
-
- - +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="OrderWebSite._Default" %> +<%@ Import Namespace="System.Data" %> + + + + + + +
+
+ Enter quantity: + + +
+
+ Entering a value above 100 will require manager approval (extends the delay 10 seconds)
+ Refresh the page after submitting orders (would of course use Ajax for this in production :) ) +
+ Click here to refresh orderlist +
+
+
+ + + + + + + + + + + + + + + + + +
+ Id + + Quantity + + Status +
+ <%# DataBinder.Eval(Container.DataItem, "Id") %> + + <%# DataBinder.Eval(Container.DataItem, "Quantity") %> + + <%# DataBinder.Eval(Container.DataItem, "Status") %> +
+ +
+
+
+ + diff --git a/Samples/AzurePubSub/OrderWebSite/Default.aspx.cs b/Samples/AzurePubSub/OrderWebSite/Default.aspx.cs index d1a7ab2e0d6..bcfb6e5fc90 100644 --- a/Samples/AzurePubSub/OrderWebSite/Default.aspx.cs +++ b/Samples/AzurePubSub/OrderWebSite/Default.aspx.cs @@ -1,46 +1,46 @@ -using System; -using System.Collections.Generic; -using MyMessages; - -namespace OrderWebSite -{ - public partial class _Default : System.Web.UI.Page - { - - protected void Page_Load(object sender, EventArgs e) - { - Refresh(); - } - - private void Refresh() - { - lock (WebRole.Orders) - OrderList.DataSource = new List(WebRole.Orders); - - - OrderList.DataBind(); - } - - protected void btnSubmit_Click(object sender, EventArgs e) - { - var order = new Order - { - Id = Guid.NewGuid(), - Quantity = Convert.ToInt32(txtQuatity.Text), - Status = OrderStatus.Pending - - }; - - WebRole.Bus.Send(new OrderMessage - { - Id = order.Id, - Quantity = order.Quantity - }); - - lock (WebRole.Orders) - WebRole.Orders.Add(order); - - Refresh(); - } - } -} +using System; +using System.Collections.Generic; +using MyMessages; + +namespace OrderWebSite +{ + public partial class _Default : System.Web.UI.Page + { + + protected void Page_Load(object sender, EventArgs e) + { + Refresh(); + } + + private void Refresh() + { + lock (WebRole.Orders) + OrderList.DataSource = new List(WebRole.Orders); + + + OrderList.DataBind(); + } + + protected void btnSubmit_Click(object sender, EventArgs e) + { + var order = new Order + { + Id = Guid.NewGuid(), + Quantity = Convert.ToInt32(txtQuatity.Text), + Status = OrderStatus.Pending + + }; + + WebRole.Bus.Send(new OrderMessage + { + Id = order.Id, + Quantity = order.Quantity + }); + + lock (WebRole.Orders) + WebRole.Orders.Add(order); + + Refresh(); + } + } +} diff --git a/Samples/AzurePubSub/OrderWebSite/Default.aspx.designer.cs b/Samples/AzurePubSub/OrderWebSite/Default.aspx.designer.cs index ef584044bb1..ce1c978147b 100644 --- a/Samples/AzurePubSub/OrderWebSite/Default.aspx.designer.cs +++ b/Samples/AzurePubSub/OrderWebSite/Default.aspx.designer.cs @@ -1,51 +1,51 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace OrderWebSite { - - - public partial class _Default { - - /// - /// form1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlForm form1; - - /// - /// txtQuatity control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox txtQuatity; - - /// - /// btnSubmit control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button btnSubmit; - - /// - /// OrderList control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Repeater OrderList; - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace OrderWebSite { + + + public partial class _Default { + + /// + /// form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// txtQuatity control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox txtQuatity; + + /// + /// btnSubmit control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button btnSubmit; + + /// + /// OrderList control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Repeater OrderList; + } +} diff --git a/Samples/AzurePubSub/OrderWebSite/Global.asax b/Samples/AzurePubSub/OrderWebSite/Global.asax index c300e345c7d..97e0ad28ae5 100644 --- a/Samples/AzurePubSub/OrderWebSite/Global.asax +++ b/Samples/AzurePubSub/OrderWebSite/Global.asax @@ -1 +1 @@ -<%@ Application Codebehind="Global.asax.cs" Inherits="OrderWebSite.Global" Language="C#" %> +<%@ Application Codebehind="Global.asax.cs" Inherits="OrderWebSite.Global" Language="C#" %> diff --git a/Samples/AzurePubSub/OrderWebSite/Global.asax.cs b/Samples/AzurePubSub/OrderWebSite/Global.asax.cs index ef0dd9dc562..d0e094f663a 100644 --- a/Samples/AzurePubSub/OrderWebSite/Global.asax.cs +++ b/Samples/AzurePubSub/OrderWebSite/Global.asax.cs @@ -1,38 +1,38 @@ -using System; -using System.Web; -using log4net; - -namespace OrderWebSite -{ - public class Global : HttpApplication - { - - protected void Application_Start(object sender, EventArgs e) - { - - } - - protected void Application_AuthenticateRequest(object sender, EventArgs e) - { - - } - - protected void Application_Error(object sender, EventArgs e) - { - //get reference to the source of the exception chain - var ex = Server.GetLastError().GetBaseException(); - - LogManager.GetLogger(typeof(Global)).Error(ex.ToString()); - } - - protected void Session_End(object sender, EventArgs e) - { - - } - - protected void Application_End(object sender, EventArgs e) - { - - } - } +using System; +using System.Web; +using log4net; + +namespace OrderWebSite +{ + public class Global : HttpApplication + { + + protected void Application_Start(object sender, EventArgs e) + { + + } + + protected void Application_AuthenticateRequest(object sender, EventArgs e) + { + + } + + protected void Application_Error(object sender, EventArgs e) + { + //get reference to the source of the exception chain + var ex = Server.GetLastError().GetBaseException(); + + LogManager.GetLogger(typeof(Global)).Error(ex.ToString()); + } + + protected void Session_End(object sender, EventArgs e) + { + + } + + protected void Application_End(object sender, EventArgs e) + { + + } + } } \ No newline at end of file diff --git a/Samples/AzurePubSub/OrderWebSite/MessageHandlers/LoadOrdersResponseMessageHandler.cs b/Samples/AzurePubSub/OrderWebSite/MessageHandlers/LoadOrdersResponseMessageHandler.cs index 5ba30d54752..69bb1ac6c82 100644 --- a/Samples/AzurePubSub/OrderWebSite/MessageHandlers/LoadOrdersResponseMessageHandler.cs +++ b/Samples/AzurePubSub/OrderWebSite/MessageHandlers/LoadOrdersResponseMessageHandler.cs @@ -1,14 +1,14 @@ -using MyMessages; -using NServiceBus; - -namespace OrderWebSite.MessageHandlers -{ - public class LoadOrdersResponseMessageHandler : IHandleMessages - { - public void Handle(LoadOrdersResponseMessage message) - { - lock (WebRole.Orders) - WebRole.Orders = message.Orders; - } - } +using MyMessages; +using NServiceBus; + +namespace OrderWebSite.MessageHandlers +{ + public class LoadOrdersResponseMessageHandler : IHandleMessages + { + public void Handle(LoadOrdersResponseMessage message) + { + lock (WebRole.Orders) + WebRole.Orders = message.Orders; + } + } } \ No newline at end of file diff --git a/Samples/AzurePubSub/OrderWebSite/MessageHandlers/OrderUpdatedEventHandler.cs b/Samples/AzurePubSub/OrderWebSite/MessageHandlers/OrderUpdatedEventHandler.cs index 1042641d8c4..8daeffc7ea7 100644 --- a/Samples/AzurePubSub/OrderWebSite/MessageHandlers/OrderUpdatedEventHandler.cs +++ b/Samples/AzurePubSub/OrderWebSite/MessageHandlers/OrderUpdatedEventHandler.cs @@ -1,21 +1,21 @@ -using MyMessages; -using NServiceBus; - -namespace OrderWebSite.MessageHandlers -{ - public class OrderUpdatedEventHandler : IHandleMessages - { - public void Handle(OrderUpdatedEvent message) - { - var order = message.UpdatedOrder; - - lock (WebRole.Orders) - { - if (WebRole.Orders.Contains(order)) - WebRole.Orders.Remove(order); - - WebRole.Orders.Add(order); - } - } - } +using MyMessages; +using NServiceBus; + +namespace OrderWebSite.MessageHandlers +{ + public class OrderUpdatedEventHandler : IHandleMessages + { + public void Handle(OrderUpdatedEvent message) + { + var order = message.UpdatedOrder; + + lock (WebRole.Orders) + { + if (WebRole.Orders.Contains(order)) + WebRole.Orders.Remove(order); + + WebRole.Orders.Add(order); + } + } + } } \ No newline at end of file diff --git a/Samples/AzurePubSub/OrderWebSite/OrderWebSite.csproj b/Samples/AzurePubSub/OrderWebSite/OrderWebSite.csproj index e51ce532390..7b0e8ab2486 100644 --- a/Samples/AzurePubSub/OrderWebSite/OrderWebSite.csproj +++ b/Samples/AzurePubSub/OrderWebSite/OrderWebSite.csproj @@ -1,131 +1,131 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {F3798C2C-41DC-407C-9EBE-3F10C1CA9A76} - {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} - Library - Properties - OrderWebSite - OrderWebSite - v4.0 - - - 4.0 - - - - true - full - false - bin\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\ - TRACE - prompt - 4 - - - - False - ..\..\..\binaries\log4net.dll - - - False - ..\..\..\binaries\Microsoft.WindowsAzure.Diagnostics.dll - - - False - ..\..\..\binaries\Microsoft.WindowsAzure.ServiceRuntime.dll - - - False - ..\..\..\binaries\Microsoft.WindowsAzure.StorageClient.dll - - - False - ..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\binaries\NServiceBus.Core.dll - - - - - - - - - - - - - - - Designer - - - - - ASPXCodeBehind - Default.aspx - - - Default.aspx - - - Global.asax - - - - - - - - - {3871CC9B-235F-4E60-98F7-FEF04DB1201B} - MyMessages - - - - - - - - - - - - - False - True - 51188 - / - - - False - False - - - False - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {F3798C2C-41DC-407C-9EBE-3F10C1CA9A76} + {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + OrderWebSite + OrderWebSite + v4.0 + + + 4.0 + + + + true + full + false + bin\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\ + TRACE + prompt + 4 + + + + False + ..\..\..\binaries\log4net.dll + + + False + ..\..\..\binaries\Microsoft.WindowsAzure.Diagnostics.dll + + + False + ..\..\..\binaries\Microsoft.WindowsAzure.ServiceRuntime.dll + + + False + ..\..\..\binaries\Microsoft.WindowsAzure.StorageClient.dll + + + False + ..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\binaries\NServiceBus.Core.dll + + + + + + + + + + + + + + + Designer + + + + + ASPXCodeBehind + Default.aspx + + + Default.aspx + + + Global.asax + + + + + + + + + {3871CC9B-235F-4E60-98F7-FEF04DB1201B} + MyMessages + + + + + + + + + + + + + False + True + 51188 + / + + + False + False + + + False + + + + \ No newline at end of file diff --git a/Samples/AzurePubSub/OrderWebSite/OrderWebSite.csproj.user b/Samples/AzurePubSub/OrderWebSite/OrderWebSite.csproj.user index 9e237d15c92..6aa6b739b4f 100644 --- a/Samples/AzurePubSub/OrderWebSite/OrderWebSite.csproj.user +++ b/Samples/AzurePubSub/OrderWebSite/OrderWebSite.csproj.user @@ -1,28 +1,28 @@ - - - - - - - - - CurrentPage - True - False - False - False - - - - - - - - - False - False - - - - + + + + + + + + + CurrentPage + True + False + False + False + + + + + + + + + False + False + + + + \ No newline at end of file diff --git a/Samples/AzurePubSub/OrderWebSite/Properties/AssemblyInfo.cs b/Samples/AzurePubSub/OrderWebSite/Properties/AssemblyInfo.cs index cd6e8984485..e2cf2ae74bf 100644 --- a/Samples/AzurePubSub/OrderWebSite/Properties/AssemblyInfo.cs +++ b/Samples/AzurePubSub/OrderWebSite/Properties/AssemblyInfo.cs @@ -1,35 +1,35 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OrderWebSite")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("OrderWebSite")] -[assembly: AssemblyCopyright("Copyright © 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("3d5900ae-111a-45be-96b3-d9e4606ca793")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("OrderWebSite")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("OrderWebSite")] +[assembly: AssemblyCopyright("Copyright © 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("3d5900ae-111a-45be-96b3-d9e4606ca793")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/AzurePubSub/OrderWebSite/Web.config b/Samples/AzurePubSub/OrderWebSite/Web.config index 647b829ab99..ec07a55ee8e 100644 --- a/Samples/AzurePubSub/OrderWebSite/Web.config +++ b/Samples/AzurePubSub/OrderWebSite/Web.config @@ -1,24 +1,24 @@ - - - -
-
-
-
- - - - - - - - - - - - - - - - - + + + +
+
+
+
+ + + + + + + + + + + + + + + + + diff --git a/Samples/AzurePubSub/OrderWebSite/WebRole.cs b/Samples/AzurePubSub/OrderWebSite/WebRole.cs index a13cf6eceb1..c170956aa5f 100644 --- a/Samples/AzurePubSub/OrderWebSite/WebRole.cs +++ b/Samples/AzurePubSub/OrderWebSite/WebRole.cs @@ -1,40 +1,40 @@ -using System.Collections.Generic; -using log4net.Core; -using Microsoft.WindowsAzure.ServiceRuntime; -using MyMessages; -using NServiceBus; -using NServiceBus.Config; -using NServiceBus.Integration.Azure; - -public class WebRole : RoleEntryPoint -{ - public static IBus Bus; - public static IList Orders; - - public override bool OnStart() - { - Orders = new List(); - - ConfigureNServiceBus(); - - //request all orders to "warmup" the cache - Bus.Send(new LoadOrdersMessage()); - return base.OnStart(); - } - - private void ConfigureNServiceBus() - { - Bus = Configure.WithWeb() - .DefaultBuilder() - .Log4Net(new AzureAppender()) - .AzureConfigurationSource() - .AzureMessageQueue() - .XmlSerializer() - .UnicastBus() - .LoadMessageHandlers() - .IsTransactional(true) - // .PurgeOnStartup(true) - .CreateBus() - .Start(); - } +using System.Collections.Generic; +using log4net.Core; +using Microsoft.WindowsAzure.ServiceRuntime; +using MyMessages; +using NServiceBus; +using NServiceBus.Config; +using NServiceBus.Integration.Azure; + +public class WebRole : RoleEntryPoint +{ + public static IBus Bus; + public static IList Orders; + + public override bool OnStart() + { + Orders = new List(); + + ConfigureNServiceBus(); + + //request all orders to "warmup" the cache + Bus.Send(new LoadOrdersMessage()); + return base.OnStart(); + } + + private void ConfigureNServiceBus() + { + Bus = Configure.WithWeb() + .DefaultBuilder() + .Log4Net(new AzureAppender()) + .AzureConfigurationSource() + .AzureMessageQueue() + .XmlSerializer() + .UnicastBus() + .LoadMessageHandlers() + .IsTransactional(true) + // .PurgeOnStartup(true) + .CreateBus() + .Start(); + } } \ No newline at end of file diff --git a/Samples/AzurePubSub/ServiceConfiguration.cscfg b/Samples/AzurePubSub/ServiceConfiguration.cscfg index 80dcf4d626f..b9fcb54fc50 100644 --- a/Samples/AzurePubSub/ServiceConfiguration.cscfg +++ b/Samples/AzurePubSub/ServiceConfiguration.cscfg @@ -1,41 +1,41 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Samples/AzurePubSub/ServiceDefinition.csdef b/Samples/AzurePubSub/ServiceDefinition.csdef index 77192aa7400..81d1e4e3e75 100644 --- a/Samples/AzurePubSub/ServiceDefinition.csdef +++ b/Samples/AzurePubSub/ServiceDefinition.csdef @@ -1,38 +1,38 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Samples/AzureSagas/Barista/App.config b/Samples/AzureSagas/Barista/App.config index 83754d07f22..7b3c4fbc7ff 100644 --- a/Samples/AzureSagas/Barista/App.config +++ b/Samples/AzureSagas/Barista/App.config @@ -1,31 +1,31 @@ - - - -
-
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - + + + +
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + diff --git a/Samples/AzureSagas/Barista/Barista.csproj b/Samples/AzureSagas/Barista/Barista.csproj index 307fe4fab26..893193cb613 100644 --- a/Samples/AzureSagas/Barista/Barista.csproj +++ b/Samples/AzureSagas/Barista/Barista.csproj @@ -1,107 +1,107 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {F5C48D42-06F2-4CCA-88B5-6C49F2A09065} - WinExe - Properties - Barista - Barista - v4.0 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - - - - False - ..\..\..\binaries\log4net.dll - - - False - ..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\binaries\NServiceBus.Core.dll - - - False - ..\..\..\binaries\containers\structuremap\NServiceBus.ObjectBuilder.StructureMap.dll - - - False - ..\..\..\binaries\containers\structuremap\StructureMap.dll - - - - - - - - - - - - - - - - - Form - - - StarbucksBarista.cs - - - - - StarbucksBarista.cs - - - Designer - - - - - - - - {3963D354-2888-4005-8763-6E54A4D6BFCC} - CashierContracts - - - {05882666-3DBD-4B8D-ADAE-439CABDD7DFB} - CustomerContracts - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {F5C48D42-06F2-4CCA-88B5-6C49F2A09065} + WinExe + Properties + Barista + Barista + v4.0 + 512 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + true + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + true + + + + False + ..\..\..\binaries\log4net.dll + + + False + ..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\binaries\NServiceBus.Core.dll + + + False + ..\..\..\binaries\containers\structuremap\NServiceBus.ObjectBuilder.StructureMap.dll + + + False + ..\..\..\binaries\containers\structuremap\StructureMap.dll + + + + + + + + + + + + + + + + + Form + + + StarbucksBarista.cs + + + + + StarbucksBarista.cs + + + Designer + + + + + + + + {3963D354-2888-4005-8763-6E54A4D6BFCC} + CashierContracts + + + {05882666-3DBD-4B8D-ADAE-439CABDD7DFB} + CustomerContracts + + + + \ No newline at end of file diff --git a/Samples/AzureSagas/Barista/BaristaMessageHandler.cs b/Samples/AzureSagas/Barista/BaristaMessageHandler.cs index 1b53b72fdab..8e1617b9a22 100644 --- a/Samples/AzureSagas/Barista/BaristaMessageHandler.cs +++ b/Samples/AzureSagas/Barista/BaristaMessageHandler.cs @@ -1,71 +1,71 @@ -using System.Threading; -using Barista.ViewData; -using CashierContracts; -using CustomerContracts; -using NServiceBus; -using NServiceBus.Saga; - -namespace Barista -{ - public class BaristaMessageHandler : Saga, - IAmStartedByMessages, - IHandleMessages - { - private readonly IStarbucksBaristaView _view; - - public BaristaMessageHandler() - {} - - public BaristaMessageHandler(IStarbucksBaristaView view) - { - _view = view; - } - - public override void ConfigureHowToFindSaga() - { - ConfigureMapping(s => s.OrderId, m => m.OrderId); - ConfigureMapping(s => s.OrderId, m => m.OrderId); - } - - public void Handle(PrepareOrderMessage message) - { - var viewData = new PrepareOrderView(message.CustomerName, message.Drink, message.DrinkSize); - _view.PrepareOrder(viewData); - - Data.CustomerName = message.CustomerName; - Data.Drink = message.Drink; - Data.OrderId = message.OrderId; - Data.Size = message.DrinkSize; - - for(var i=0; i<10; i++) - { - Thread.Sleep(1000); - } - - var additionalViewData = new OrderIsDoneView(message.CustomerName); - _view.OrderIsDone(additionalViewData); - - Data.OrderIsReady = true; - DeliverOrder(); - } - - public void Handle(PaymentCompleteMessage message) - { - Data.OrderIsPaid = true; - DeliverOrder(); - } - - private void DeliverOrder() - { - if(!Data.OrderIsReady || !Data.OrderIsPaid) - return; - - var viewData = new DeliverOrderView(Data.Drink, Data.Size); - _view.DeliverOrder(viewData); - - Bus.Send(new OrderReadyMessage(Data.CustomerName, Data.Drink)); - - MarkAsComplete(); - } - } -} +using System.Threading; +using Barista.ViewData; +using CashierContracts; +using CustomerContracts; +using NServiceBus; +using NServiceBus.Saga; + +namespace Barista +{ + public class BaristaMessageHandler : Saga, + IAmStartedByMessages, + IHandleMessages + { + private readonly IStarbucksBaristaView _view; + + public BaristaMessageHandler() + {} + + public BaristaMessageHandler(IStarbucksBaristaView view) + { + _view = view; + } + + public override void ConfigureHowToFindSaga() + { + ConfigureMapping(s => s.OrderId, m => m.OrderId); + ConfigureMapping(s => s.OrderId, m => m.OrderId); + } + + public void Handle(PrepareOrderMessage message) + { + var viewData = new PrepareOrderView(message.CustomerName, message.Drink, message.DrinkSize); + _view.PrepareOrder(viewData); + + Data.CustomerName = message.CustomerName; + Data.Drink = message.Drink; + Data.OrderId = message.OrderId; + Data.Size = message.DrinkSize; + + for(var i=0; i<10; i++) + { + Thread.Sleep(1000); + } + + var additionalViewData = new OrderIsDoneView(message.CustomerName); + _view.OrderIsDone(additionalViewData); + + Data.OrderIsReady = true; + DeliverOrder(); + } + + public void Handle(PaymentCompleteMessage message) + { + Data.OrderIsPaid = true; + DeliverOrder(); + } + + private void DeliverOrder() + { + if(!Data.OrderIsReady || !Data.OrderIsPaid) + return; + + var viewData = new DeliverOrderView(Data.Drink, Data.Size); + _view.DeliverOrder(viewData); + + Bus.Send(new OrderReadyMessage(Data.CustomerName, Data.Drink)); + + MarkAsComplete(); + } + } +} diff --git a/Samples/AzureSagas/Barista/BaristaRegistry.cs b/Samples/AzureSagas/Barista/BaristaRegistry.cs index aa2024c8bd4..8e63b2f0beb 100644 --- a/Samples/AzureSagas/Barista/BaristaRegistry.cs +++ b/Samples/AzureSagas/Barista/BaristaRegistry.cs @@ -1,18 +1,18 @@ -using StructureMap.Attributes; -using StructureMap.Configuration.DSL; - -namespace Barista -{ - public class BaristaRegistry : Registry - { - public BaristaRegistry() - { - For() - .Singleton() - .Use(); - - For() - .Use(); - } - } -} +using StructureMap.Attributes; +using StructureMap.Configuration.DSL; + +namespace Barista +{ + public class BaristaRegistry : Registry + { + public BaristaRegistry() + { + For() + .Singleton() + .Use(); + + For() + .Use(); + } + } +} diff --git a/Samples/AzureSagas/Barista/BaristaSagaData.cs b/Samples/AzureSagas/Barista/BaristaSagaData.cs index 007da748814..5d04c97962e 100644 --- a/Samples/AzureSagas/Barista/BaristaSagaData.cs +++ b/Samples/AzureSagas/Barista/BaristaSagaData.cs @@ -1,20 +1,20 @@ -using System; -using CashierContracts; -using NServiceBus.Saga; - -namespace Barista -{ - public class BaristaSagaData : IContainSagaData - { - public virtual Guid Id { get; set; } - public virtual String Originator { get; set; } - public virtual String OriginalMessageId { get; set; } - - public virtual String CustomerName { get; set; } - public virtual String Drink { get; set; } - public virtual Guid OrderId { get; set; } - public virtual DrinkSize Size { get; set; } - public virtual Boolean OrderIsReady { get; set; } - public virtual Boolean OrderIsPaid { get; set; } - } -} +using System; +using CashierContracts; +using NServiceBus.Saga; + +namespace Barista +{ + public class BaristaSagaData : IContainSagaData + { + public virtual Guid Id { get; set; } + public virtual String Originator { get; set; } + public virtual String OriginalMessageId { get; set; } + + public virtual String CustomerName { get; set; } + public virtual String Drink { get; set; } + public virtual Guid OrderId { get; set; } + public virtual DrinkSize Size { get; set; } + public virtual Boolean OrderIsReady { get; set; } + public virtual Boolean OrderIsPaid { get; set; } + } +} diff --git a/Samples/AzureSagas/Barista/Bootstrapper.cs b/Samples/AzureSagas/Barista/Bootstrapper.cs index 420b7518131..9eb150d66bf 100644 --- a/Samples/AzureSagas/Barista/Bootstrapper.cs +++ b/Samples/AzureSagas/Barista/Bootstrapper.cs @@ -1,58 +1,58 @@ -using NServiceBus; -using NServiceBus.Config; -using StructureMap; - -namespace Barista -{ - public class Bootstrapper - { - private Bootstrapper() - {} - - public static void Bootstrap() - { - BootstrapStructureMap(); - BootstrapNServiceBus(); - } - - private static void BootstrapStructureMap() - { - ObjectFactory.Initialize(x => x.AddRegistry(new BaristaRegistry())); - } - - private static void BootstrapNServiceBus() - { - //Configure.With() - // .Log4Net() - // .StructureMapBuilder(ObjectFactory.Container) - // .MsmqSubscriptionStorage() - // .XmlSerializer() - // // For sagas - // .Sagas() - // .NHibernateSagaPersisterWithSQLiteAndAutomaticSchemaGeneration() - // // End - // .MsmqTransport() - // .IsTransactional(true) - // .PurgeOnStartup(false) - // .UnicastBus() - // .ImpersonateSender(false) - // .LoadMessageHandlers() - // .CreateBus() - // .Start(); - - Configure.With() - .Log4Net() - .StructureMapBuilder(ObjectFactory.Container) - .AzureConfigurationSource() - .AzureMessageQueue().XmlSerializer() - .AzureSubcriptionStorage() - .Sagas().AzureSagaPersister().NHibernateUnitOfWork() - - .UnicastBus() - .LoadMessageHandlers() - .IsTransactional(true) - .CreateBus() - .Start(); - } - } -} +using NServiceBus; +using NServiceBus.Config; +using StructureMap; + +namespace Barista +{ + public class Bootstrapper + { + private Bootstrapper() + {} + + public static void Bootstrap() + { + BootstrapStructureMap(); + BootstrapNServiceBus(); + } + + private static void BootstrapStructureMap() + { + ObjectFactory.Initialize(x => x.AddRegistry(new BaristaRegistry())); + } + + private static void BootstrapNServiceBus() + { + //Configure.With() + // .Log4Net() + // .StructureMapBuilder(ObjectFactory.Container) + // .MsmqSubscriptionStorage() + // .XmlSerializer() + // // For sagas + // .Sagas() + // .NHibernateSagaPersisterWithSQLiteAndAutomaticSchemaGeneration() + // // End + // .MsmqTransport() + // .IsTransactional(true) + // .PurgeOnStartup(false) + // .UnicastBus() + // .ImpersonateSender(false) + // .LoadMessageHandlers() + // .CreateBus() + // .Start(); + + Configure.With() + .Log4Net() + .StructureMapBuilder(ObjectFactory.Container) + .AzureConfigurationSource() + .AzureMessageQueue().XmlSerializer() + .AzureSubcriptionStorage() + .Sagas().AzureSagaPersister().NHibernateUnitOfWork() + + .UnicastBus() + .LoadMessageHandlers() + .IsTransactional(true) + .CreateBus() + .Start(); + } + } +} diff --git a/Samples/AzureSagas/Barista/Disposable.cs b/Samples/AzureSagas/Barista/Disposable.cs index 2821f27a806..fa0796b716c 100644 --- a/Samples/AzureSagas/Barista/Disposable.cs +++ b/Samples/AzureSagas/Barista/Disposable.cs @@ -1,45 +1,45 @@ -using System; - -namespace Barista -{ - public abstract class Disposable : IDisposable - { - protected Boolean IsDisposed { get; private set; } - - private void Dispose(Boolean disposing) - { - // The object has already been disposed - if(IsDisposed) - { - return; - } - - if(disposing) - { - // Dispose managed resources - DisposeManagedResources(); - } - - // Dispose unmanaged resources - DisposeUnmanagedResources(); - - IsDisposed = true; - } - - ~Disposable() - { - Dispose(false); - } - - protected abstract void DisposeManagedResources(); - - protected virtual void DisposeUnmanagedResources() - { } - - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - } -} +using System; + +namespace Barista +{ + public abstract class Disposable : IDisposable + { + protected Boolean IsDisposed { get; private set; } + + private void Dispose(Boolean disposing) + { + // The object has already been disposed + if(IsDisposed) + { + return; + } + + if(disposing) + { + // Dispose managed resources + DisposeManagedResources(); + } + + // Dispose unmanaged resources + DisposeUnmanagedResources(); + + IsDisposed = true; + } + + ~Disposable() + { + Dispose(false); + } + + protected abstract void DisposeManagedResources(); + + protected virtual void DisposeUnmanagedResources() + { } + + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/Samples/AzureSagas/Barista/MessageSubscriptions.cs b/Samples/AzureSagas/Barista/MessageSubscriptions.cs index 0f5741d7eef..aaf8dc46d3a 100644 --- a/Samples/AzureSagas/Barista/MessageSubscriptions.cs +++ b/Samples/AzureSagas/Barista/MessageSubscriptions.cs @@ -1,48 +1,48 @@ -using System; -using CashierContracts; -using NServiceBus; - -namespace Barista -{ - public interface IMessageSubscriptions : IDisposable - { - IDisposable Subscribe(); - void Unsubscribe(); - } - - public class MessageSubscriptions : Disposable, - IMessageSubscriptions - { - private readonly IBus _bus; - - private static readonly Type[] MessageTypes = new Type[] - { - typeof(PrepareOrderMessage), - typeof(PaymentCompleteMessage) - }; - - public MessageSubscriptions(IBus bus) - { - _bus = bus; - } - - public IDisposable Subscribe() - { - foreach(var messageType in MessageTypes) - _bus.Subscribe(messageType); - - return this; - } - - public void Unsubscribe() - { - foreach(var messageType in MessageTypes) - _bus.Unsubscribe(messageType); - } - - protected override void DisposeManagedResources() - { - Unsubscribe(); - } - } -} +using System; +using CashierContracts; +using NServiceBus; + +namespace Barista +{ + public interface IMessageSubscriptions : IDisposable + { + IDisposable Subscribe(); + void Unsubscribe(); + } + + public class MessageSubscriptions : Disposable, + IMessageSubscriptions + { + private readonly IBus _bus; + + private static readonly Type[] MessageTypes = new Type[] + { + typeof(PrepareOrderMessage), + typeof(PaymentCompleteMessage) + }; + + public MessageSubscriptions(IBus bus) + { + _bus = bus; + } + + public IDisposable Subscribe() + { + foreach(var messageType in MessageTypes) + _bus.Subscribe(messageType); + + return this; + } + + public void Unsubscribe() + { + foreach(var messageType in MessageTypes) + _bus.Unsubscribe(messageType); + } + + protected override void DisposeManagedResources() + { + Unsubscribe(); + } + } +} diff --git a/Samples/AzureSagas/Barista/Program.cs b/Samples/AzureSagas/Barista/Program.cs index ab3c81acd31..ea77a6e276a 100644 --- a/Samples/AzureSagas/Barista/Program.cs +++ b/Samples/AzureSagas/Barista/Program.cs @@ -1,29 +1,29 @@ -using System; -using System.Windows.Forms; -using StructureMap; - -namespace Barista -{ - static class Program - { - /// - /// The main entry point for the application. - /// - [STAThread] - static void Main() - { - Bootstrapper.Bootstrap(); - - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - - using(var messageSubscriptions = ObjectFactory.GetInstance()) - { - messageSubscriptions.Subscribe(); - - var startupDialog = ObjectFactory.GetInstance(); - startupDialog.Start(); - } - } - } -} +using System; +using System.Windows.Forms; +using StructureMap; + +namespace Barista +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Bootstrapper.Bootstrap(); + + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + + using(var messageSubscriptions = ObjectFactory.GetInstance()) + { + messageSubscriptions.Subscribe(); + + var startupDialog = ObjectFactory.GetInstance(); + startupDialog.Start(); + } + } + } +} diff --git a/Samples/AzureSagas/Barista/Properties/AssemblyInfo.cs b/Samples/AzureSagas/Barista/Properties/AssemblyInfo.cs index 16eefc0847f..c35fcb35fc9 100644 --- a/Samples/AzureSagas/Barista/Properties/AssemblyInfo.cs +++ b/Samples/AzureSagas/Barista/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Barista")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Barista")] -[assembly: AssemblyCopyright("Copyright 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("5ce23dcd-97df-43c7-a33a-b4abc6c7754d")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Barista")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Barista")] +[assembly: AssemblyCopyright("Copyright 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("5ce23dcd-97df-43c7-a33a-b4abc6c7754d")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/AzureSagas/Barista/StarbucksBarista.Designer.cs b/Samples/AzureSagas/Barista/StarbucksBarista.Designer.cs index 6549bf8be73..5da3427deb3 100644 --- a/Samples/AzureSagas/Barista/StarbucksBarista.Designer.cs +++ b/Samples/AzureSagas/Barista/StarbucksBarista.Designer.cs @@ -1,74 +1,74 @@ -namespace Barista -{ - partial class StarbucksBarista - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if(disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.OrdersLabel = new System.Windows.Forms.Label(); - this.OrdersListBox = new System.Windows.Forms.ListBox(); - this.SuspendLayout(); - // - // OrdersLabel - // - this.OrdersLabel.AutoSize = true; - this.OrdersLabel.Location = new System.Drawing.Point(12, 11); - this.OrdersLabel.Name = "OrdersLabel"; - this.OrdersLabel.Size = new System.Drawing.Size(38, 13); - this.OrdersLabel.TabIndex = 3; - this.OrdersLabel.Text = "Orders"; - // - // OrdersListBox - // - this.OrdersListBox.FormattingEnabled = true; - this.OrdersListBox.Location = new System.Drawing.Point(12, 27); - this.OrdersListBox.Name = "OrdersListBox"; - this.OrdersListBox.Size = new System.Drawing.Size(557, 290); - this.OrdersListBox.TabIndex = 2; - // - // StarbucksBarista - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(580, 328); - this.Controls.Add(this.OrdersLabel); - this.Controls.Add(this.OrdersListBox); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.Name = "StarbucksBarista"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "Starbucks Barista Monitor XP - Professional Edition"; - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Label OrdersLabel; - private System.Windows.Forms.ListBox OrdersListBox; - } -} - +namespace Barista +{ + partial class StarbucksBarista + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if(disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.OrdersLabel = new System.Windows.Forms.Label(); + this.OrdersListBox = new System.Windows.Forms.ListBox(); + this.SuspendLayout(); + // + // OrdersLabel + // + this.OrdersLabel.AutoSize = true; + this.OrdersLabel.Location = new System.Drawing.Point(12, 11); + this.OrdersLabel.Name = "OrdersLabel"; + this.OrdersLabel.Size = new System.Drawing.Size(38, 13); + this.OrdersLabel.TabIndex = 3; + this.OrdersLabel.Text = "Orders"; + // + // OrdersListBox + // + this.OrdersListBox.FormattingEnabled = true; + this.OrdersListBox.Location = new System.Drawing.Point(12, 27); + this.OrdersListBox.Name = "OrdersListBox"; + this.OrdersListBox.Size = new System.Drawing.Size(557, 290); + this.OrdersListBox.TabIndex = 2; + // + // StarbucksBarista + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(580, 328); + this.Controls.Add(this.OrdersLabel); + this.Controls.Add(this.OrdersListBox); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.Name = "StarbucksBarista"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Starbucks Barista Monitor XP - Professional Edition"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label OrdersLabel; + private System.Windows.Forms.ListBox OrdersListBox; + } +} + diff --git a/Samples/AzureSagas/Barista/StarbucksBarista.cs b/Samples/AzureSagas/Barista/StarbucksBarista.cs index d012155b629..29a01113429 100644 --- a/Samples/AzureSagas/Barista/StarbucksBarista.cs +++ b/Samples/AzureSagas/Barista/StarbucksBarista.cs @@ -1,52 +1,52 @@ -using System; -using System.Windows.Forms; -using Barista.ViewData; - -namespace Barista -{ - public interface IStarbucksBaristaView - { - void DeliverOrder(DeliverOrderView view); - void OrderIsDone(OrderIsDoneView view); - void PrepareOrder(PrepareOrderView view); - void Start(); - } - - public partial class StarbucksBarista : Form, IStarbucksBaristaView - { - public StarbucksBarista() - { - InitializeComponent(); - } - - public void DeliverOrder(DeliverOrderView view) - { - var logItem = String.Format("Delivering {0} - {1}.", view.Drink, view.DrinkSize); - Invoke(new Action(Log), logItem); - } - - public void OrderIsDone(OrderIsDoneView view) - { - var logItem = String.Format("Done preparing order for customer {0}.", view.CustomerName); - Invoke(new Action(Log), logItem); - } - - public void PrepareOrder(PrepareOrderView view) - { - var logItem = String.Format("Preparing {0} - {1} for customer {2}.", - view.Drink, view.DrinkSize, view.CustomerName); - - Invoke(new Action(Log), logItem); - } - - public void Start() - { - Application.Run(this); - } - - private void Log(String logItem) - { - OrdersListBox.Items.Add(logItem); - } - } -} +using System; +using System.Windows.Forms; +using Barista.ViewData; + +namespace Barista +{ + public interface IStarbucksBaristaView + { + void DeliverOrder(DeliverOrderView view); + void OrderIsDone(OrderIsDoneView view); + void PrepareOrder(PrepareOrderView view); + void Start(); + } + + public partial class StarbucksBarista : Form, IStarbucksBaristaView + { + public StarbucksBarista() + { + InitializeComponent(); + } + + public void DeliverOrder(DeliverOrderView view) + { + var logItem = String.Format("Delivering {0} - {1}.", view.Drink, view.DrinkSize); + Invoke(new Action(Log), logItem); + } + + public void OrderIsDone(OrderIsDoneView view) + { + var logItem = String.Format("Done preparing order for customer {0}.", view.CustomerName); + Invoke(new Action(Log), logItem); + } + + public void PrepareOrder(PrepareOrderView view) + { + var logItem = String.Format("Preparing {0} - {1} for customer {2}.", + view.Drink, view.DrinkSize, view.CustomerName); + + Invoke(new Action(Log), logItem); + } + + public void Start() + { + Application.Run(this); + } + + private void Log(String logItem) + { + OrdersListBox.Items.Add(logItem); + } + } +} diff --git a/Samples/AzureSagas/Barista/StarbucksBarista.resx b/Samples/AzureSagas/Barista/StarbucksBarista.resx index 11113e43986..194da1e4138 100644 --- a/Samples/AzureSagas/Barista/StarbucksBarista.resx +++ b/Samples/AzureSagas/Barista/StarbucksBarista.resx @@ -1,120 +1,120 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + diff --git a/Samples/AzureSagas/Barista/ViewData/DeliverOrderView.cs b/Samples/AzureSagas/Barista/ViewData/DeliverOrderView.cs index 732f230afe9..36b5c869034 100644 --- a/Samples/AzureSagas/Barista/ViewData/DeliverOrderView.cs +++ b/Samples/AzureSagas/Barista/ViewData/DeliverOrderView.cs @@ -1,17 +1,17 @@ -using System; -using CashierContracts; - -namespace Barista.ViewData -{ - public class DeliverOrderView - { - public String Drink { get; private set; } - public String DrinkSize { get; private set; } - - public DeliverOrderView(String drink, DrinkSize size) - { - Drink = drink; - DrinkSize = size.ToString(); - } - } -} +using System; +using CashierContracts; + +namespace Barista.ViewData +{ + public class DeliverOrderView + { + public String Drink { get; private set; } + public String DrinkSize { get; private set; } + + public DeliverOrderView(String drink, DrinkSize size) + { + Drink = drink; + DrinkSize = size.ToString(); + } + } +} diff --git a/Samples/AzureSagas/Barista/ViewData/OrderIsDoneView.cs b/Samples/AzureSagas/Barista/ViewData/OrderIsDoneView.cs index 6dc1bfc017d..757c06bfc04 100644 --- a/Samples/AzureSagas/Barista/ViewData/OrderIsDoneView.cs +++ b/Samples/AzureSagas/Barista/ViewData/OrderIsDoneView.cs @@ -1,14 +1,14 @@ -using System; - -namespace Barista.ViewData -{ - public class OrderIsDoneView - { - public String CustomerName { get; private set; } - - public OrderIsDoneView(String customerName) - { - CustomerName = customerName; - } - } -} +using System; + +namespace Barista.ViewData +{ + public class OrderIsDoneView + { + public String CustomerName { get; private set; } + + public OrderIsDoneView(String customerName) + { + CustomerName = customerName; + } + } +} diff --git a/Samples/AzureSagas/Barista/ViewData/PrepareOrderView.cs b/Samples/AzureSagas/Barista/ViewData/PrepareOrderView.cs index 677428d18c7..b39518e3067 100644 --- a/Samples/AzureSagas/Barista/ViewData/PrepareOrderView.cs +++ b/Samples/AzureSagas/Barista/ViewData/PrepareOrderView.cs @@ -1,19 +1,19 @@ -using System; -using CashierContracts; - -namespace Barista.ViewData -{ - public class PrepareOrderView - { - public String CustomerName { get; private set; } - public String Drink { get; private set; } - public String DrinkSize { get; private set; } - - public PrepareOrderView(String customerName, String drink, DrinkSize size) - { - CustomerName = customerName; - Drink = drink; - DrinkSize = size.ToString(); - } - } -} +using System; +using CashierContracts; + +namespace Barista.ViewData +{ + public class PrepareOrderView + { + public String CustomerName { get; private set; } + public String Drink { get; private set; } + public String DrinkSize { get; private set; } + + public PrepareOrderView(String customerName, String drink, DrinkSize size) + { + CustomerName = customerName; + Drink = drink; + DrinkSize = size.ToString(); + } + } +} diff --git a/Samples/AzureSagas/Cashier/App.config b/Samples/AzureSagas/Cashier/App.config index 40464d78b52..6fc4063a16a 100644 --- a/Samples/AzureSagas/Cashier/App.config +++ b/Samples/AzureSagas/Cashier/App.config @@ -1,29 +1,29 @@ - - - -
-
-
- -
-
- - - - - - - - - - - - - - - - - - - - + + + +
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + diff --git a/Samples/AzureSagas/Cashier/Bootstrapper.cs b/Samples/AzureSagas/Cashier/Bootstrapper.cs index d1c4aa8d8c5..72797e73acd 100644 --- a/Samples/AzureSagas/Cashier/Bootstrapper.cs +++ b/Samples/AzureSagas/Cashier/Bootstrapper.cs @@ -1,43 +1,43 @@ -using log4net.Core; -using NServiceBus; -using NServiceBus.Config; -using NServiceBus.Integration.Azure; -using StructureMap; - -namespace Cashier -{ - public class Bootstrapper - { - private Bootstrapper() - {} - - public static void Bootstrap() - { - BootstrapStructureMap(); - BootstrapNServiceBus(); - } - - private static void BootstrapStructureMap() - { - ObjectFactory.Initialize(x => x.AddRegistry(new CashierRegistry())); - } - - private static void BootstrapNServiceBus() - { - Configure.With() - .Log4Net() - .StructureMapBuilder(ObjectFactory.Container) - - .AzureConfigurationSource() - .AzureMessageQueue().XmlSerializer() - .AzureSubcriptionStorage() - .Sagas().AzureSagaPersister().NHibernateUnitOfWork() - - .UnicastBus() - .LoadMessageHandlers() - .IsTransactional(true) - .CreateBus() - .Start(); - } - } -} +using log4net.Core; +using NServiceBus; +using NServiceBus.Config; +using NServiceBus.Integration.Azure; +using StructureMap; + +namespace Cashier +{ + public class Bootstrapper + { + private Bootstrapper() + {} + + public static void Bootstrap() + { + BootstrapStructureMap(); + BootstrapNServiceBus(); + } + + private static void BootstrapStructureMap() + { + ObjectFactory.Initialize(x => x.AddRegistry(new CashierRegistry())); + } + + private static void BootstrapNServiceBus() + { + Configure.With() + .Log4Net() + .StructureMapBuilder(ObjectFactory.Container) + + .AzureConfigurationSource() + .AzureMessageQueue().XmlSerializer() + .AzureSubcriptionStorage() + .Sagas().AzureSagaPersister().NHibernateUnitOfWork() + + .UnicastBus() + .LoadMessageHandlers() + .IsTransactional(true) + .CreateBus() + .Start(); + } + } +} diff --git a/Samples/AzureSagas/Cashier/Cashier.csproj b/Samples/AzureSagas/Cashier/Cashier.csproj index 65eab365848..89f4dc13c21 100644 --- a/Samples/AzureSagas/Cashier/Cashier.csproj +++ b/Samples/AzureSagas/Cashier/Cashier.csproj @@ -1,105 +1,105 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {DCCBF183-A703-4999-BB10-046E6C2800B9} - WinExe - Properties - Cashier - Cashier - v4.0 - 512 - - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\binaries\log4net.dll - - - False - ..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\binaries\NServiceBus.Core.dll - - - False - ..\..\..\binaries\containers\structuremap\NServiceBus.ObjectBuilder.StructureMap.dll - - - False - ..\..\..\binaries\containers\structuremap\StructureMap.dll - - - - - - - - - - - - - - - - - - - StarbucksCashier.cs - - - Designer - - - Form - - - StarbucksCashier.cs - - - - - - {3963D354-2888-4005-8763-6E54A4D6BFCC} - CashierContracts - - - {05882666-3DBD-4B8D-ADAE-439CABDD7DFB} - CustomerContracts - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {DCCBF183-A703-4999-BB10-046E6C2800B9} + WinExe + Properties + Cashier + Cashier + v4.0 + 512 + + + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\binaries\log4net.dll + + + False + ..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\binaries\NServiceBus.Core.dll + + + False + ..\..\..\binaries\containers\structuremap\NServiceBus.ObjectBuilder.StructureMap.dll + + + False + ..\..\..\binaries\containers\structuremap\StructureMap.dll + + + + + + + + + + + + + + + + + + + StarbucksCashier.cs + + + Designer + + + Form + + + StarbucksCashier.cs + + + + + + {3963D354-2888-4005-8763-6E54A4D6BFCC} + CashierContracts + + + {05882666-3DBD-4B8D-ADAE-439CABDD7DFB} + CustomerContracts + + + + \ No newline at end of file diff --git a/Samples/AzureSagas/Cashier/CashierMessageHandler.cs b/Samples/AzureSagas/Cashier/CashierMessageHandler.cs index 27069a8c550..fc0a30196ff 100644 --- a/Samples/AzureSagas/Cashier/CashierMessageHandler.cs +++ b/Samples/AzureSagas/Cashier/CashierMessageHandler.cs @@ -1,77 +1,77 @@ -using System; -using Cashier.ViewData; -using CashierContracts; -using CustomerContracts; -using NServiceBus; -using NServiceBus.Saga; - -namespace Cashier -{ - public class CashierMessageHandler : Saga, - IAmStartedByMessages, - IHandleMessages - { - private readonly IStarbucksCashierView _view; - - public CashierMessageHandler() - {} - - public CashierMessageHandler(IStarbucksCashierView view) - { - _view = view; - } - - public override void ConfigureHowToFindSaga() - { - ConfigureMapping(s => s.OrderId, m => m.OrderId); - ConfigureMapping(s => s.OrderId, m => m.OrderId); - } - - public void Handle(NewOrderMessage message) - { - _view.NewOrder(new NewOrderView(message)); - - Data.Drink = message.Drink; - Data.DrinkSize = message.DrinkSize; - Data.OrderId = message.OrderId; - Data.CustomerName = message.CustomerName; - Data.Amount = CalculateAmountAccordingTo(message.DrinkSize); - - Bus.Publish(new PrepareOrderMessage(Data.CustomerName, Data.Drink, Data.DrinkSize, Data.OrderId)); - Bus.Reply(new PaymentRequestMessage(Data.Amount, message.CustomerName, message.OrderId)); - } - - public void Handle(PaymentMessage message) - { - if(message.Amount >= Data.Amount) - { - var viewData = new ReceivedFullPaymentView(Data.CustomerName, Data.Drink, Data.DrinkSize); - _view.ReceivedFullPayment(viewData); - - Bus.Publish(new PaymentCompleteMessage(Data.OrderId)); - } - else if(message.Amount == 0) - { - var viewData = new CustomerRefusesToPayView(Data.CustomerName, Data.Amount, Data.Drink, Data.DrinkSize); - _view.CustomerRefusesToPay(viewData); - } - - MarkAsComplete(); - } - - private static Double CalculateAmountAccordingTo(DrinkSize size) - { - switch(size) - { - case DrinkSize.Tall: - return 3.25; - case DrinkSize.Grande: - return 4.00; - case DrinkSize.Venti: - return 4.75; - default: - throw new InvalidOperationException(String.Format("Size '{0}' does not compute!", size)); - } - } - } -} +using System; +using Cashier.ViewData; +using CashierContracts; +using CustomerContracts; +using NServiceBus; +using NServiceBus.Saga; + +namespace Cashier +{ + public class CashierMessageHandler : Saga, + IAmStartedByMessages, + IHandleMessages + { + private readonly IStarbucksCashierView _view; + + public CashierMessageHandler() + {} + + public CashierMessageHandler(IStarbucksCashierView view) + { + _view = view; + } + + public override void ConfigureHowToFindSaga() + { + ConfigureMapping(s => s.OrderId, m => m.OrderId); + ConfigureMapping(s => s.OrderId, m => m.OrderId); + } + + public void Handle(NewOrderMessage message) + { + _view.NewOrder(new NewOrderView(message)); + + Data.Drink = message.Drink; + Data.DrinkSize = message.DrinkSize; + Data.OrderId = message.OrderId; + Data.CustomerName = message.CustomerName; + Data.Amount = CalculateAmountAccordingTo(message.DrinkSize); + + Bus.Publish(new PrepareOrderMessage(Data.CustomerName, Data.Drink, Data.DrinkSize, Data.OrderId)); + Bus.Reply(new PaymentRequestMessage(Data.Amount, message.CustomerName, message.OrderId)); + } + + public void Handle(PaymentMessage message) + { + if(message.Amount >= Data.Amount) + { + var viewData = new ReceivedFullPaymentView(Data.CustomerName, Data.Drink, Data.DrinkSize); + _view.ReceivedFullPayment(viewData); + + Bus.Publish(new PaymentCompleteMessage(Data.OrderId)); + } + else if(message.Amount == 0) + { + var viewData = new CustomerRefusesToPayView(Data.CustomerName, Data.Amount, Data.Drink, Data.DrinkSize); + _view.CustomerRefusesToPay(viewData); + } + + MarkAsComplete(); + } + + private static Double CalculateAmountAccordingTo(DrinkSize size) + { + switch(size) + { + case DrinkSize.Tall: + return 3.25; + case DrinkSize.Grande: + return 4.00; + case DrinkSize.Venti: + return 4.75; + default: + throw new InvalidOperationException(String.Format("Size '{0}' does not compute!", size)); + } + } + } +} diff --git a/Samples/AzureSagas/Cashier/CashierRegistry.cs b/Samples/AzureSagas/Cashier/CashierRegistry.cs index 8a8f9be13d2..0c80577e752 100644 --- a/Samples/AzureSagas/Cashier/CashierRegistry.cs +++ b/Samples/AzureSagas/Cashier/CashierRegistry.cs @@ -1,14 +1,14 @@ -using StructureMap.Configuration.DSL; - -namespace Cashier -{ - public class CashierRegistry : Registry - { - public CashierRegistry() - { - For() - .Singleton() - .Use(); - } - } -} +using StructureMap.Configuration.DSL; + +namespace Cashier +{ + public class CashierRegistry : Registry + { + public CashierRegistry() + { + For() + .Singleton() + .Use(); + } + } +} diff --git a/Samples/AzureSagas/Cashier/CashierSagaData.cs b/Samples/AzureSagas/Cashier/CashierSagaData.cs index ab0b7766ccb..4f736accd9d 100644 --- a/Samples/AzureSagas/Cashier/CashierSagaData.cs +++ b/Samples/AzureSagas/Cashier/CashierSagaData.cs @@ -1,19 +1,19 @@ -using System; -using CashierContracts; -using NServiceBus.Saga; - -namespace Cashier -{ - public class CashierSagaData : IContainSagaData - { - public virtual Guid Id { get; set; } - public virtual String Originator { get; set; } - public virtual String OriginalMessageId { get; set; } - - public virtual Double Amount { get; set; } - public virtual String CustomerName { get; set; } - public virtual String Drink { get; set; } - public virtual DrinkSize DrinkSize { get; set; } - public virtual Guid OrderId { get; set; } - } -} +using System; +using CashierContracts; +using NServiceBus.Saga; + +namespace Cashier +{ + public class CashierSagaData : IContainSagaData + { + public virtual Guid Id { get; set; } + public virtual String Originator { get; set; } + public virtual String OriginalMessageId { get; set; } + + public virtual Double Amount { get; set; } + public virtual String CustomerName { get; set; } + public virtual String Drink { get; set; } + public virtual DrinkSize DrinkSize { get; set; } + public virtual Guid OrderId { get; set; } + } +} diff --git a/Samples/AzureSagas/Cashier/Program.cs b/Samples/AzureSagas/Cashier/Program.cs index c28da7d5a2b..6680f2ce575 100644 --- a/Samples/AzureSagas/Cashier/Program.cs +++ b/Samples/AzureSagas/Cashier/Program.cs @@ -1,24 +1,24 @@ -using System; -using System.Windows.Forms; -using StructureMap; - -namespace Cashier -{ - static class Program - { - /// - /// The main entry point for the application. - /// - [STAThread] - static void Main() - { - Bootstrapper.Bootstrap(); - - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - - var startupDialog = ObjectFactory.GetInstance(); - startupDialog.Start(); - } - } -} +using System; +using System.Windows.Forms; +using StructureMap; + +namespace Cashier +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Bootstrapper.Bootstrap(); + + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + + var startupDialog = ObjectFactory.GetInstance(); + startupDialog.Start(); + } + } +} diff --git a/Samples/AzureSagas/Cashier/Properties/AssemblyInfo.cs b/Samples/AzureSagas/Cashier/Properties/AssemblyInfo.cs index c2c606e7372..1301b8d53b7 100644 --- a/Samples/AzureSagas/Cashier/Properties/AssemblyInfo.cs +++ b/Samples/AzureSagas/Cashier/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Cashier")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Cashier")] -[assembly: AssemblyCopyright("Copyright 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("a23d05c3-f8de-4c46-91bc-99c11db88551")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Cashier")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Cashier")] +[assembly: AssemblyCopyright("Copyright 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("a23d05c3-f8de-4c46-91bc-99c11db88551")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/AzureSagas/Cashier/StarbucksCashier.Designer.cs b/Samples/AzureSagas/Cashier/StarbucksCashier.Designer.cs index 9388dcd36b8..b9ae5a89ff7 100644 --- a/Samples/AzureSagas/Cashier/StarbucksCashier.Designer.cs +++ b/Samples/AzureSagas/Cashier/StarbucksCashier.Designer.cs @@ -1,74 +1,74 @@ -namespace Cashier -{ - partial class StarbucksCashier - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if(disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.OrdersListBox = new System.Windows.Forms.ListBox(); - this.OrdersLabel = new System.Windows.Forms.Label(); - this.SuspendLayout(); - // - // OrdersListBox - // - this.OrdersListBox.FormattingEnabled = true; - this.OrdersListBox.Location = new System.Drawing.Point(12, 25); - this.OrdersListBox.Name = "OrdersListBox"; - this.OrdersListBox.Size = new System.Drawing.Size(557, 290); - this.OrdersListBox.TabIndex = 0; - // - // OrdersLabel - // - this.OrdersLabel.AutoSize = true; - this.OrdersLabel.Location = new System.Drawing.Point(12, 9); - this.OrdersLabel.Name = "OrdersLabel"; - this.OrdersLabel.Size = new System.Drawing.Size(38, 13); - this.OrdersLabel.TabIndex = 1; - this.OrdersLabel.Text = "Orders"; - // - // StarbucksCashier - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(582, 330); - this.Controls.Add(this.OrdersLabel); - this.Controls.Add(this.OrdersListBox); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.Name = "StarbucksCashier"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "Starbucks Cashier Monitor 2000 - Ultimate Edition"; - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.ListBox OrdersListBox; - private System.Windows.Forms.Label OrdersLabel; - } -} - +namespace Cashier +{ + partial class StarbucksCashier + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if(disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.OrdersListBox = new System.Windows.Forms.ListBox(); + this.OrdersLabel = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // OrdersListBox + // + this.OrdersListBox.FormattingEnabled = true; + this.OrdersListBox.Location = new System.Drawing.Point(12, 25); + this.OrdersListBox.Name = "OrdersListBox"; + this.OrdersListBox.Size = new System.Drawing.Size(557, 290); + this.OrdersListBox.TabIndex = 0; + // + // OrdersLabel + // + this.OrdersLabel.AutoSize = true; + this.OrdersLabel.Location = new System.Drawing.Point(12, 9); + this.OrdersLabel.Name = "OrdersLabel"; + this.OrdersLabel.Size = new System.Drawing.Size(38, 13); + this.OrdersLabel.TabIndex = 1; + this.OrdersLabel.Text = "Orders"; + // + // StarbucksCashier + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(582, 330); + this.Controls.Add(this.OrdersLabel); + this.Controls.Add(this.OrdersListBox); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.Name = "StarbucksCashier"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Starbucks Cashier Monitor 2000 - Ultimate Edition"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.ListBox OrdersListBox; + private System.Windows.Forms.Label OrdersLabel; + } +} + diff --git a/Samples/AzureSagas/Cashier/StarbucksCashier.cs b/Samples/AzureSagas/Cashier/StarbucksCashier.cs index fe02d82db8a..91eab9cc188 100644 --- a/Samples/AzureSagas/Cashier/StarbucksCashier.cs +++ b/Samples/AzureSagas/Cashier/StarbucksCashier.cs @@ -1,56 +1,56 @@ -using System; -using System.Windows.Forms; -using Cashier.ViewData; - -namespace Cashier -{ - public interface IStarbucksCashierView - { - void CustomerRefusesToPay(CustomerRefusesToPayView view); - void NewOrder(NewOrderView view); - void ReceivedFullPayment(ReceivedFullPaymentView view); - void Start(); - } - - public partial class StarbucksCashier : Form, IStarbucksCashierView - { - public StarbucksCashier() - { - InitializeComponent(); - } - - public void CustomerRefusesToPay(CustomerRefusesToPayView view) - { - var logItem = String.Format("Customer {0} refuses to pay {1} for its order ({2} - {3}).", - view.CustomerName, view.Amount, view.Drink, view.DrinkSize); - - Invoke(new Action(Log), logItem); - } - - public void NewOrder(NewOrderView view) - { - var logItem = String.Format("Customer {0} ordered {1} - {2}.", - view.CustomerName, view.Drink, view.DrinkSize); - - Invoke(new Action(Log), logItem); - } - - public void ReceivedFullPayment(ReceivedFullPaymentView view) - { - var logItem = String.Format("Customer {0} paid for its order ({1} - {2}).", - view.CustomerName, view.Drink, view.DrinkSize); - - Invoke(new Action(Log), logItem); - } - - public void Start() - { - Application.Run(this); - } - - private void Log(String logItem) - { - OrdersListBox.Items.Add(logItem); - } - } -} +using System; +using System.Windows.Forms; +using Cashier.ViewData; + +namespace Cashier +{ + public interface IStarbucksCashierView + { + void CustomerRefusesToPay(CustomerRefusesToPayView view); + void NewOrder(NewOrderView view); + void ReceivedFullPayment(ReceivedFullPaymentView view); + void Start(); + } + + public partial class StarbucksCashier : Form, IStarbucksCashierView + { + public StarbucksCashier() + { + InitializeComponent(); + } + + public void CustomerRefusesToPay(CustomerRefusesToPayView view) + { + var logItem = String.Format("Customer {0} refuses to pay {1} for its order ({2} - {3}).", + view.CustomerName, view.Amount, view.Drink, view.DrinkSize); + + Invoke(new Action(Log), logItem); + } + + public void NewOrder(NewOrderView view) + { + var logItem = String.Format("Customer {0} ordered {1} - {2}.", + view.CustomerName, view.Drink, view.DrinkSize); + + Invoke(new Action(Log), logItem); + } + + public void ReceivedFullPayment(ReceivedFullPaymentView view) + { + var logItem = String.Format("Customer {0} paid for its order ({1} - {2}).", + view.CustomerName, view.Drink, view.DrinkSize); + + Invoke(new Action(Log), logItem); + } + + public void Start() + { + Application.Run(this); + } + + private void Log(String logItem) + { + OrdersListBox.Items.Add(logItem); + } + } +} diff --git a/Samples/AzureSagas/Cashier/StarbucksCashier.resx b/Samples/AzureSagas/Cashier/StarbucksCashier.resx index 11113e43986..194da1e4138 100644 --- a/Samples/AzureSagas/Cashier/StarbucksCashier.resx +++ b/Samples/AzureSagas/Cashier/StarbucksCashier.resx @@ -1,120 +1,120 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + diff --git a/Samples/AzureSagas/Cashier/ViewData/CustomerRefusesToPayView.cs b/Samples/AzureSagas/Cashier/ViewData/CustomerRefusesToPayView.cs index 69e8b7ef412..b51c9c069db 100644 --- a/Samples/AzureSagas/Cashier/ViewData/CustomerRefusesToPayView.cs +++ b/Samples/AzureSagas/Cashier/ViewData/CustomerRefusesToPayView.cs @@ -1,21 +1,21 @@ -using System; -using CashierContracts; - -namespace Cashier.ViewData -{ - public class CustomerRefusesToPayView - { - public Double Amount { get; private set; } - public String CustomerName { get; private set; } - public String Drink { get; private set; } - public String DrinkSize { get; private set; } - - public CustomerRefusesToPayView(String customerName, Double amount, String drink, DrinkSize drinkSize) - { - CustomerName = customerName; - Amount = amount; - Drink = drink; - DrinkSize = drinkSize.ToString(); - } - } -} +using System; +using CashierContracts; + +namespace Cashier.ViewData +{ + public class CustomerRefusesToPayView + { + public Double Amount { get; private set; } + public String CustomerName { get; private set; } + public String Drink { get; private set; } + public String DrinkSize { get; private set; } + + public CustomerRefusesToPayView(String customerName, Double amount, String drink, DrinkSize drinkSize) + { + CustomerName = customerName; + Amount = amount; + Drink = drink; + DrinkSize = drinkSize.ToString(); + } + } +} diff --git a/Samples/AzureSagas/Cashier/ViewData/NewOrderView.cs b/Samples/AzureSagas/Cashier/ViewData/NewOrderView.cs index 50e7738f9d5..5d80b5a21e8 100644 --- a/Samples/AzureSagas/Cashier/ViewData/NewOrderView.cs +++ b/Samples/AzureSagas/Cashier/ViewData/NewOrderView.cs @@ -1,19 +1,19 @@ -using System; -using CashierContracts; - -namespace Cashier.ViewData -{ - public class NewOrderView - { - public String CustomerName { get; private set; } - public String Drink { get; private set; } - public String DrinkSize { get; private set; } - - public NewOrderView(NewOrderMessage message) - { - CustomerName = message.CustomerName; - Drink = message.Drink; - DrinkSize = message.DrinkSize.ToString(); - } - } -} +using System; +using CashierContracts; + +namespace Cashier.ViewData +{ + public class NewOrderView + { + public String CustomerName { get; private set; } + public String Drink { get; private set; } + public String DrinkSize { get; private set; } + + public NewOrderView(NewOrderMessage message) + { + CustomerName = message.CustomerName; + Drink = message.Drink; + DrinkSize = message.DrinkSize.ToString(); + } + } +} diff --git a/Samples/AzureSagas/Cashier/ViewData/ReceivedFullPaymentView.cs b/Samples/AzureSagas/Cashier/ViewData/ReceivedFullPaymentView.cs index 462d2d21e96..f02fde49959 100644 --- a/Samples/AzureSagas/Cashier/ViewData/ReceivedFullPaymentView.cs +++ b/Samples/AzureSagas/Cashier/ViewData/ReceivedFullPaymentView.cs @@ -1,19 +1,19 @@ -using System; -using CashierContracts; - -namespace Cashier.ViewData -{ - public class ReceivedFullPaymentView - { - public String CustomerName { get; private set; } - public String Drink { get; private set; } - public String DrinkSize { get; private set; } - - public ReceivedFullPaymentView(String customerName, String drink, DrinkSize drinkSize) - { - CustomerName = customerName; - Drink = drink; - DrinkSize = drinkSize.ToString(); - } - } -} +using System; +using CashierContracts; + +namespace Cashier.ViewData +{ + public class ReceivedFullPaymentView + { + public String CustomerName { get; private set; } + public String Drink { get; private set; } + public String DrinkSize { get; private set; } + + public ReceivedFullPaymentView(String customerName, String drink, DrinkSize drinkSize) + { + CustomerName = customerName; + Drink = drink; + DrinkSize = drinkSize.ToString(); + } + } +} diff --git a/Samples/AzureSagas/CashierContracts/CashierContracts.csproj b/Samples/AzureSagas/CashierContracts/CashierContracts.csproj index 708864f4f39..f62a43c92db 100644 --- a/Samples/AzureSagas/CashierContracts/CashierContracts.csproj +++ b/Samples/AzureSagas/CashierContracts/CashierContracts.csproj @@ -1,59 +1,59 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {3963D354-2888-4005-8763-6E54A4D6BFCC} - Library - Properties - CashierContracts - CashierContracts - v4.0 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - - - - False - ..\..\..\binaries\NServiceBus.dll - - - - - - - - - - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {3963D354-2888-4005-8763-6E54A4D6BFCC} + Library + Properties + CashierContracts + CashierContracts + v4.0 + 512 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + true + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + true + + + + False + ..\..\..\binaries\NServiceBus.dll + + + + + + + + + + + + + \ No newline at end of file diff --git a/Samples/AzureSagas/CashierContracts/DrinkSize.cs b/Samples/AzureSagas/CashierContracts/DrinkSize.cs index 65e224fbee0..24c5666bd98 100644 --- a/Samples/AzureSagas/CashierContracts/DrinkSize.cs +++ b/Samples/AzureSagas/CashierContracts/DrinkSize.cs @@ -1,9 +1,9 @@ -namespace CashierContracts -{ - public enum DrinkSize - { - Tall, - Grande, - Venti - } -} +namespace CashierContracts +{ + public enum DrinkSize + { + Tall, + Grande, + Venti + } +} diff --git a/Samples/AzureSagas/CashierContracts/NewOrderMessage.cs b/Samples/AzureSagas/CashierContracts/NewOrderMessage.cs index e96eccdf5a6..029f3aa88bc 100644 --- a/Samples/AzureSagas/CashierContracts/NewOrderMessage.cs +++ b/Samples/AzureSagas/CashierContracts/NewOrderMessage.cs @@ -1,22 +1,22 @@ -using System; -using NServiceBus; - -namespace CashierContracts -{ - [Serializable] - public class NewOrderMessage : IMessage - { - public String CustomerName { get; private set; } - public String Drink { get; private set; } - public DrinkSize DrinkSize { get; private set; } - public Guid OrderId { get; private set; } - - public NewOrderMessage(String customerName, String drink, DrinkSize drinkSize) - { - CustomerName = customerName; - Drink = drink; - DrinkSize = drinkSize; - OrderId = Guid.NewGuid(); - } - } -} +using System; +using NServiceBus; + +namespace CashierContracts +{ + [Serializable] + public class NewOrderMessage : IMessage + { + public String CustomerName { get; private set; } + public String Drink { get; private set; } + public DrinkSize DrinkSize { get; private set; } + public Guid OrderId { get; private set; } + + public NewOrderMessage(String customerName, String drink, DrinkSize drinkSize) + { + CustomerName = customerName; + Drink = drink; + DrinkSize = drinkSize; + OrderId = Guid.NewGuid(); + } + } +} diff --git a/Samples/AzureSagas/CashierContracts/PaymentCompleteMessage.cs b/Samples/AzureSagas/CashierContracts/PaymentCompleteMessage.cs index 994a10ebcd9..42021f42683 100644 --- a/Samples/AzureSagas/CashierContracts/PaymentCompleteMessage.cs +++ b/Samples/AzureSagas/CashierContracts/PaymentCompleteMessage.cs @@ -1,16 +1,16 @@ -using System; -using NServiceBus; - -namespace CashierContracts -{ - [Serializable] - public class PaymentCompleteMessage : IMessage - { - public Guid OrderId { get; private set; } - - public PaymentCompleteMessage(Guid orderId) - { - OrderId = orderId; - } - } -} +using System; +using NServiceBus; + +namespace CashierContracts +{ + [Serializable] + public class PaymentCompleteMessage : IMessage + { + public Guid OrderId { get; private set; } + + public PaymentCompleteMessage(Guid orderId) + { + OrderId = orderId; + } + } +} diff --git a/Samples/AzureSagas/CashierContracts/PaymentMessage.cs b/Samples/AzureSagas/CashierContracts/PaymentMessage.cs index 4a66a63430c..ca69cba68a8 100644 --- a/Samples/AzureSagas/CashierContracts/PaymentMessage.cs +++ b/Samples/AzureSagas/CashierContracts/PaymentMessage.cs @@ -1,18 +1,18 @@ -using System; -using NServiceBus; - -namespace CashierContracts -{ - [Serializable] - public class PaymentMessage : IMessage - { - public Double Amount { get; private set; } - public Guid OrderId { get; private set; } - - public PaymentMessage(Double amount, Guid orderId) - { - Amount = amount; - OrderId = orderId; - } - } -} +using System; +using NServiceBus; + +namespace CashierContracts +{ + [Serializable] + public class PaymentMessage : IMessage + { + public Double Amount { get; private set; } + public Guid OrderId { get; private set; } + + public PaymentMessage(Double amount, Guid orderId) + { + Amount = amount; + OrderId = orderId; + } + } +} diff --git a/Samples/AzureSagas/CashierContracts/PrepareOrderMessage.cs b/Samples/AzureSagas/CashierContracts/PrepareOrderMessage.cs index e7e1054b0cf..383ca9503b2 100644 --- a/Samples/AzureSagas/CashierContracts/PrepareOrderMessage.cs +++ b/Samples/AzureSagas/CashierContracts/PrepareOrderMessage.cs @@ -1,22 +1,22 @@ -using System; -using NServiceBus; - -namespace CashierContracts -{ - [Serializable] - public class PrepareOrderMessage : IMessage - { - public String CustomerName { get; private set; } - public String Drink { get; private set; } - public DrinkSize DrinkSize { get; private set; } - public Guid OrderId { get; private set; } - - public PrepareOrderMessage(String customerName, String drink, DrinkSize size, Guid orderId) - { - CustomerName = customerName; - Drink = drink; - DrinkSize = size; - OrderId = orderId; - } - } -} +using System; +using NServiceBus; + +namespace CashierContracts +{ + [Serializable] + public class PrepareOrderMessage : IMessage + { + public String CustomerName { get; private set; } + public String Drink { get; private set; } + public DrinkSize DrinkSize { get; private set; } + public Guid OrderId { get; private set; } + + public PrepareOrderMessage(String customerName, String drink, DrinkSize size, Guid orderId) + { + CustomerName = customerName; + Drink = drink; + DrinkSize = size; + OrderId = orderId; + } + } +} diff --git a/Samples/AzureSagas/CashierContracts/Properties/AssemblyInfo.cs b/Samples/AzureSagas/CashierContracts/Properties/AssemblyInfo.cs index 586a289387c..d7fd0632540 100644 --- a/Samples/AzureSagas/CashierContracts/Properties/AssemblyInfo.cs +++ b/Samples/AzureSagas/CashierContracts/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("CashierContracts")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("CashierContracts")] -[assembly: AssemblyCopyright("Copyright 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("15e01ae1-e78d-4467-95a1-b5ce66f67de0")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("CashierContracts")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("CashierContracts")] +[assembly: AssemblyCopyright("Copyright 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("15e01ae1-e78d-4467-95a1-b5ce66f67de0")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/AzureSagas/Customer/App.config b/Samples/AzureSagas/Customer/App.config index c252bfa65e5..6b9e5394f43 100644 --- a/Samples/AzureSagas/Customer/App.config +++ b/Samples/AzureSagas/Customer/App.config @@ -1,28 +1,28 @@ - - - -
-
-
- -
-
- - - - - - - - - - - - - - - - - - - + + + +
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + diff --git a/Samples/AzureSagas/Customer/Bootstrapper.cs b/Samples/AzureSagas/Customer/Bootstrapper.cs index 583b8e1c6f8..f24d6a741e7 100644 --- a/Samples/AzureSagas/Customer/Bootstrapper.cs +++ b/Samples/AzureSagas/Customer/Bootstrapper.cs @@ -1,56 +1,56 @@ -using Cashier; -using NServiceBus; -using NServiceBus.Config; -using StructureMap; - -namespace Customer -{ - public class Bootstrapper - { - private Bootstrapper() - {} - - public static void Bootstrap() - { - BootstrapStructureMap(); - BootstrapNServiceBus(); - } - - private static void BootstrapStructureMap() - { - ObjectFactory.Initialize(x => x.AddRegistry(new CustomerRegistry())); - } - - private static void BootstrapNServiceBus() - { - //Configure.With() - // .Log4Net() - // .StructureMapBuilder(ObjectFactory.Container) - // .MsmqSubscriptionStorage() - // .XmlSerializer() - // .MsmqTransport() - // .IsTransactional(true) - // .PurgeOnStartup(false) - // .UnicastBus() - // .ImpersonateSender(false) - // .LoadMessageHandlers() - // .CreateBus() - // .Start(); - - Configure.With() - .Log4Net() - .StructureMapBuilder(ObjectFactory.Container) - - .AzureConfigurationSource() - .AzureMessageQueue().XmlSerializer() - .AzureSubcriptionStorage() - .Sagas().AzureSagaPersister() - - .UnicastBus() - .LoadMessageHandlers() - .IsTransactional(true) - .CreateBus() - .Start(); - } - } -} +using Cashier; +using NServiceBus; +using NServiceBus.Config; +using StructureMap; + +namespace Customer +{ + public class Bootstrapper + { + private Bootstrapper() + {} + + public static void Bootstrap() + { + BootstrapStructureMap(); + BootstrapNServiceBus(); + } + + private static void BootstrapStructureMap() + { + ObjectFactory.Initialize(x => x.AddRegistry(new CustomerRegistry())); + } + + private static void BootstrapNServiceBus() + { + //Configure.With() + // .Log4Net() + // .StructureMapBuilder(ObjectFactory.Container) + // .MsmqSubscriptionStorage() + // .XmlSerializer() + // .MsmqTransport() + // .IsTransactional(true) + // .PurgeOnStartup(false) + // .UnicastBus() + // .ImpersonateSender(false) + // .LoadMessageHandlers() + // .CreateBus() + // .Start(); + + Configure.With() + .Log4Net() + .StructureMapBuilder(ObjectFactory.Container) + + .AzureConfigurationSource() + .AzureMessageQueue().XmlSerializer() + .AzureSubcriptionStorage() + .Sagas().AzureSagaPersister() + + .UnicastBus() + .LoadMessageHandlers() + .IsTransactional(true) + .CreateBus() + .Start(); + } + } +} diff --git a/Samples/AzureSagas/Customer/Customer.csproj b/Samples/AzureSagas/Customer/Customer.csproj index 423a8fca5ee..59b034d20b1 100644 --- a/Samples/AzureSagas/Customer/Customer.csproj +++ b/Samples/AzureSagas/Customer/Customer.csproj @@ -1,104 +1,104 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {88B4585B-A73D-4EFC-9FA4-14B33FBBBE79} - WinExe - Properties - Customer - Customer - v4.0 - 512 - - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - - - - False - ..\..\..\lib\log4net.dll - - - False - ..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\binaries\NServiceBus.Core.dll - - - False - ..\..\..\binaries\containers\structuremap\NServiceBus.ObjectBuilder.StructureMap.dll - - - False - ..\..\..\binaries\containers\structuremap\StructureMap.dll - - - - - - - - - - - - - Form - - - CustomerOrder.cs - - - - - - - CustomerOrder.cs - - - - - - - - {3963D354-2888-4005-8763-6E54A4D6BFCC} - CashierContracts - - - {05882666-3DBD-4B8D-ADAE-439CABDD7DFB} - CustomerContracts - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {88B4585B-A73D-4EFC-9FA4-14B33FBBBE79} + WinExe + Properties + Customer + Customer + v4.0 + 512 + + + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + true + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + true + + + + False + ..\..\..\lib\log4net.dll + + + False + ..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\binaries\NServiceBus.Core.dll + + + False + ..\..\..\binaries\containers\structuremap\NServiceBus.ObjectBuilder.StructureMap.dll + + + False + ..\..\..\binaries\containers\structuremap\StructureMap.dll + + + + + + + + + + + + + Form + + + CustomerOrder.cs + + + + + + + CustomerOrder.cs + + + + + + + + {3963D354-2888-4005-8763-6E54A4D6BFCC} + CashierContracts + + + {05882666-3DBD-4B8D-ADAE-439CABDD7DFB} + CustomerContracts + + + + \ No newline at end of file diff --git a/Samples/AzureSagas/Customer/CustomerOrder.Designer.cs b/Samples/AzureSagas/Customer/CustomerOrder.Designer.cs index 477b39642df..880a72c6629 100644 --- a/Samples/AzureSagas/Customer/CustomerOrder.Designer.cs +++ b/Samples/AzureSagas/Customer/CustomerOrder.Designer.cs @@ -1,145 +1,145 @@ -namespace Customer -{ - partial class CustomerOrder - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if(disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.OrderButton = new System.Windows.Forms.Button(); - this.NameLabel = new System.Windows.Forms.Label(); - this.NameTextBox = new System.Windows.Forms.TextBox(); - this.DrinkLabel = new System.Windows.Forms.Label(); - this.SizeLabel = new System.Windows.Forms.Label(); - this.DrinkComboBox = new System.Windows.Forms.ComboBox(); - this.SizeComboBox = new System.Windows.Forms.ComboBox(); - this.SuspendLayout(); - // - // OrderButton - // - this.OrderButton.Location = new System.Drawing.Point(127, 164); - this.OrderButton.Name = "OrderButton"; - this.OrderButton.Size = new System.Drawing.Size(75, 23); - this.OrderButton.TabIndex = 3; - this.OrderButton.Text = "Order"; - this.OrderButton.UseVisualStyleBackColor = true; - this.OrderButton.Click += new System.EventHandler(this.OrderButton_Click); - // - // NameLabel - // - this.NameLabel.AutoSize = true; - this.NameLabel.Location = new System.Drawing.Point(12, 9); - this.NameLabel.Name = "NameLabel"; - this.NameLabel.Size = new System.Drawing.Size(58, 13); - this.NameLabel.TabIndex = 1; - this.NameLabel.Text = "Your name"; - // - // NameTextBox - // - this.NameTextBox.Location = new System.Drawing.Point(15, 25); - this.NameTextBox.Name = "NameTextBox"; - this.NameTextBox.Size = new System.Drawing.Size(187, 20); - this.NameTextBox.TabIndex = 0; - // - // DrinkLabel - // - this.DrinkLabel.AutoSize = true; - this.DrinkLabel.Location = new System.Drawing.Point(12, 59); - this.DrinkLabel.Name = "DrinkLabel"; - this.DrinkLabel.Size = new System.Drawing.Size(32, 13); - this.DrinkLabel.TabIndex = 3; - this.DrinkLabel.Text = "Drink"; - // - // SizeLabel - // - this.SizeLabel.AutoSize = true; - this.SizeLabel.Location = new System.Drawing.Point(12, 109); - this.SizeLabel.Name = "SizeLabel"; - this.SizeLabel.Size = new System.Drawing.Size(27, 13); - this.SizeLabel.TabIndex = 4; - this.SizeLabel.Text = "Size"; - // - // DrinkComboBox - // - this.DrinkComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.DrinkComboBox.FormattingEnabled = true; - this.DrinkComboBox.Items.AddRange(new object[] { - "Caramel Macchiato", - "Mocha", - "Americano", - "Latte", - "Cuban", - "Frapachappaccino"}); - this.DrinkComboBox.Location = new System.Drawing.Point(15, 75); - this.DrinkComboBox.Name = "DrinkComboBox"; - this.DrinkComboBox.Size = new System.Drawing.Size(187, 21); - this.DrinkComboBox.TabIndex = 1; - // - // SizeComboBox - // - this.SizeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.SizeComboBox.FormattingEnabled = true; - this.SizeComboBox.Items.AddRange(new object[] { - "Tall", - "Grande", - "Venti"}); - this.SizeComboBox.Location = new System.Drawing.Point(15, 125); - this.SizeComboBox.Name = "SizeComboBox"; - this.SizeComboBox.Size = new System.Drawing.Size(187, 21); - this.SizeComboBox.TabIndex = 2; - // - // CustomerOrder - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(217, 196); - this.Controls.Add(this.SizeComboBox); - this.Controls.Add(this.DrinkComboBox); - this.Controls.Add(this.SizeLabel); - this.Controls.Add(this.DrinkLabel); - this.Controls.Add(this.NameTextBox); - this.Controls.Add(this.NameLabel); - this.Controls.Add(this.OrderButton); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.Name = "CustomerOrder"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "Order @ Starbucks"; - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Button OrderButton; - private System.Windows.Forms.Label NameLabel; - private System.Windows.Forms.TextBox NameTextBox; - private System.Windows.Forms.Label DrinkLabel; - private System.Windows.Forms.Label SizeLabel; - private System.Windows.Forms.ComboBox DrinkComboBox; - private System.Windows.Forms.ComboBox SizeComboBox; - - } -} +namespace Customer +{ + partial class CustomerOrder + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if(disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.OrderButton = new System.Windows.Forms.Button(); + this.NameLabel = new System.Windows.Forms.Label(); + this.NameTextBox = new System.Windows.Forms.TextBox(); + this.DrinkLabel = new System.Windows.Forms.Label(); + this.SizeLabel = new System.Windows.Forms.Label(); + this.DrinkComboBox = new System.Windows.Forms.ComboBox(); + this.SizeComboBox = new System.Windows.Forms.ComboBox(); + this.SuspendLayout(); + // + // OrderButton + // + this.OrderButton.Location = new System.Drawing.Point(127, 164); + this.OrderButton.Name = "OrderButton"; + this.OrderButton.Size = new System.Drawing.Size(75, 23); + this.OrderButton.TabIndex = 3; + this.OrderButton.Text = "Order"; + this.OrderButton.UseVisualStyleBackColor = true; + this.OrderButton.Click += new System.EventHandler(this.OrderButton_Click); + // + // NameLabel + // + this.NameLabel.AutoSize = true; + this.NameLabel.Location = new System.Drawing.Point(12, 9); + this.NameLabel.Name = "NameLabel"; + this.NameLabel.Size = new System.Drawing.Size(58, 13); + this.NameLabel.TabIndex = 1; + this.NameLabel.Text = "Your name"; + // + // NameTextBox + // + this.NameTextBox.Location = new System.Drawing.Point(15, 25); + this.NameTextBox.Name = "NameTextBox"; + this.NameTextBox.Size = new System.Drawing.Size(187, 20); + this.NameTextBox.TabIndex = 0; + // + // DrinkLabel + // + this.DrinkLabel.AutoSize = true; + this.DrinkLabel.Location = new System.Drawing.Point(12, 59); + this.DrinkLabel.Name = "DrinkLabel"; + this.DrinkLabel.Size = new System.Drawing.Size(32, 13); + this.DrinkLabel.TabIndex = 3; + this.DrinkLabel.Text = "Drink"; + // + // SizeLabel + // + this.SizeLabel.AutoSize = true; + this.SizeLabel.Location = new System.Drawing.Point(12, 109); + this.SizeLabel.Name = "SizeLabel"; + this.SizeLabel.Size = new System.Drawing.Size(27, 13); + this.SizeLabel.TabIndex = 4; + this.SizeLabel.Text = "Size"; + // + // DrinkComboBox + // + this.DrinkComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.DrinkComboBox.FormattingEnabled = true; + this.DrinkComboBox.Items.AddRange(new object[] { + "Caramel Macchiato", + "Mocha", + "Americano", + "Latte", + "Cuban", + "Frapachappaccino"}); + this.DrinkComboBox.Location = new System.Drawing.Point(15, 75); + this.DrinkComboBox.Name = "DrinkComboBox"; + this.DrinkComboBox.Size = new System.Drawing.Size(187, 21); + this.DrinkComboBox.TabIndex = 1; + // + // SizeComboBox + // + this.SizeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.SizeComboBox.FormattingEnabled = true; + this.SizeComboBox.Items.AddRange(new object[] { + "Tall", + "Grande", + "Venti"}); + this.SizeComboBox.Location = new System.Drawing.Point(15, 125); + this.SizeComboBox.Name = "SizeComboBox"; + this.SizeComboBox.Size = new System.Drawing.Size(187, 21); + this.SizeComboBox.TabIndex = 2; + // + // CustomerOrder + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(217, 196); + this.Controls.Add(this.SizeComboBox); + this.Controls.Add(this.DrinkComboBox); + this.Controls.Add(this.SizeLabel); + this.Controls.Add(this.DrinkLabel); + this.Controls.Add(this.NameTextBox); + this.Controls.Add(this.NameLabel); + this.Controls.Add(this.OrderButton); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.Name = "CustomerOrder"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Order @ Starbucks"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button OrderButton; + private System.Windows.Forms.Label NameLabel; + private System.Windows.Forms.TextBox NameTextBox; + private System.Windows.Forms.Label DrinkLabel; + private System.Windows.Forms.Label SizeLabel; + private System.Windows.Forms.ComboBox DrinkComboBox; + private System.Windows.Forms.ComboBox SizeComboBox; + + } +} diff --git a/Samples/AzureSagas/Customer/CustomerOrder.cs b/Samples/AzureSagas/Customer/CustomerOrder.cs index 136c6987810..1e575203163 100644 --- a/Samples/AzureSagas/Customer/CustomerOrder.cs +++ b/Samples/AzureSagas/Customer/CustomerOrder.cs @@ -1,46 +1,46 @@ -using System; -using System.Windows.Forms; -using CashierContracts; -using CustomerContracts; -using NServiceBus; - -namespace Customer -{ - public partial class CustomerOrder : Form, - IHandleMessages, - IHandleMessages - { - private readonly IBus _bus; - - public CustomerOrder(IBus bus) - { - _bus = bus; - InitializeComponent(); - } - - private void OrderButton_Click(Object sender, EventArgs e) - { - var customerName = NameTextBox.Text; - var drink = DrinkComboBox.Text; - var drinkSize = (DrinkSize) Enum.Parse(typeof(DrinkSize), SizeComboBox.Text); - - var newOrder = new NewOrderMessage(customerName, drink, drinkSize); - _bus.Send(newOrder); - } - - public new void Handle(PaymentRequestMessage message) - { - var text = String.Format("Hi {0}, thanks for your order. That'll be {1} please.", message.CustomerName, message.Amount); - var result = MessageBox.Show(text, "Request payment", MessageBoxButtons.YesNo); - - var amount = (DialogResult.Yes == result) ? message.Amount : 0.0; - _bus.Reply(new PaymentMessage(amount, message.OrderId)); - } - - public new void Handle(OrderReadyMessage message) - { - var text = String.Format("Here you go {0}, enjoy your {1}. Thank you, come again.", message.CustomerName, message.Drink); - MessageBox.Show(text); - } - } -} +using System; +using System.Windows.Forms; +using CashierContracts; +using CustomerContracts; +using NServiceBus; + +namespace Customer +{ + public partial class CustomerOrder : Form, + IHandleMessages, + IHandleMessages + { + private readonly IBus _bus; + + public CustomerOrder(IBus bus) + { + _bus = bus; + InitializeComponent(); + } + + private void OrderButton_Click(Object sender, EventArgs e) + { + var customerName = NameTextBox.Text; + var drink = DrinkComboBox.Text; + var drinkSize = (DrinkSize) Enum.Parse(typeof(DrinkSize), SizeComboBox.Text); + + var newOrder = new NewOrderMessage(customerName, drink, drinkSize); + _bus.Send(newOrder); + } + + public new void Handle(PaymentRequestMessage message) + { + var text = String.Format("Hi {0}, thanks for your order. That'll be {1} please.", message.CustomerName, message.Amount); + var result = MessageBox.Show(text, "Request payment", MessageBoxButtons.YesNo); + + var amount = (DialogResult.Yes == result) ? message.Amount : 0.0; + _bus.Reply(new PaymentMessage(amount, message.OrderId)); + } + + public new void Handle(OrderReadyMessage message) + { + var text = String.Format("Here you go {0}, enjoy your {1}. Thank you, come again.", message.CustomerName, message.Drink); + MessageBox.Show(text); + } + } +} diff --git a/Samples/AzureSagas/Customer/CustomerOrder.resx b/Samples/AzureSagas/Customer/CustomerOrder.resx index 11113e43986..194da1e4138 100644 --- a/Samples/AzureSagas/Customer/CustomerOrder.resx +++ b/Samples/AzureSagas/Customer/CustomerOrder.resx @@ -1,120 +1,120 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + diff --git a/Samples/AzureSagas/Customer/CustomerRegistry.cs b/Samples/AzureSagas/Customer/CustomerRegistry.cs index bb5db01f5be..15e1a59718a 100644 --- a/Samples/AzureSagas/Customer/CustomerRegistry.cs +++ b/Samples/AzureSagas/Customer/CustomerRegistry.cs @@ -1,13 +1,13 @@ -using Customer; -using StructureMap.Configuration.DSL; - -namespace Cashier -{ - public class CustomerRegistry : Registry - { - public CustomerRegistry() - { - - } - } -} +using Customer; +using StructureMap.Configuration.DSL; + +namespace Cashier +{ + public class CustomerRegistry : Registry + { + public CustomerRegistry() + { + + } + } +} diff --git a/Samples/AzureSagas/Customer/Program.cs b/Samples/AzureSagas/Customer/Program.cs index 2b45f58f861..d3fbd980ba3 100644 --- a/Samples/AzureSagas/Customer/Program.cs +++ b/Samples/AzureSagas/Customer/Program.cs @@ -1,24 +1,24 @@ -using System; -using System.Windows.Forms; -using StructureMap; - -namespace Customer -{ - internal static class Program - { - /// - /// The main entry point for the application. - /// - [STAThread] - private static void Main() - { - Bootstrapper.Bootstrap(); - - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - - var startupDialog = ObjectFactory.GetInstance(); - Application.Run(startupDialog); - } - } -} +using System; +using System.Windows.Forms; +using StructureMap; + +namespace Customer +{ + internal static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + private static void Main() + { + Bootstrapper.Bootstrap(); + + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + + var startupDialog = ObjectFactory.GetInstance(); + Application.Run(startupDialog); + } + } +} diff --git a/Samples/AzureSagas/Customer/Properties/AssemblyInfo.cs b/Samples/AzureSagas/Customer/Properties/AssemblyInfo.cs index c9b3fa31f79..43f37b2f34e 100644 --- a/Samples/AzureSagas/Customer/Properties/AssemblyInfo.cs +++ b/Samples/AzureSagas/Customer/Properties/AssemblyInfo.cs @@ -1,35 +1,35 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Starbucks")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Starbucks")] -[assembly: AssemblyCopyright("Copyright 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("95d68a80-2651-4438-99f3-dcc3b6ff8fa2")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Starbucks")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Starbucks")] +[assembly: AssemblyCopyright("Copyright 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("95d68a80-2651-4438-99f3-dcc3b6ff8fa2")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/AzureSagas/CustomerContracts/CustomerContracts.csproj b/Samples/AzureSagas/CustomerContracts/CustomerContracts.csproj index ba1964e333e..7be0f80189e 100644 --- a/Samples/AzureSagas/CustomerContracts/CustomerContracts.csproj +++ b/Samples/AzureSagas/CustomerContracts/CustomerContracts.csproj @@ -1,58 +1,58 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {05882666-3DBD-4B8D-ADAE-439CABDD7DFB} - Library - Properties - CustomerContracts - CustomerContracts - v4.0 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - - - - False - ..\..\..\binaries\NServiceBus.dll - - - - - - - - - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {05882666-3DBD-4B8D-ADAE-439CABDD7DFB} + Library + Properties + CustomerContracts + CustomerContracts + v4.0 + 512 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + true + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + true + + + + False + ..\..\..\binaries\NServiceBus.dll + + + + + + + + + + + + \ No newline at end of file diff --git a/Samples/AzureSagas/CustomerContracts/OrderReadyMessage.cs b/Samples/AzureSagas/CustomerContracts/OrderReadyMessage.cs index 14a263452b1..cdd44cab897 100644 --- a/Samples/AzureSagas/CustomerContracts/OrderReadyMessage.cs +++ b/Samples/AzureSagas/CustomerContracts/OrderReadyMessage.cs @@ -1,18 +1,18 @@ -using System; -using NServiceBus; - -namespace CustomerContracts -{ - [Serializable] - public class OrderReadyMessage : IMessage - { - public String CustomerName { get; set; } - public String Drink { get; set; } - - public OrderReadyMessage(String customerName, String drink) - { - CustomerName = customerName; - Drink = drink; - } - } -} +using System; +using NServiceBus; + +namespace CustomerContracts +{ + [Serializable] + public class OrderReadyMessage : IMessage + { + public String CustomerName { get; set; } + public String Drink { get; set; } + + public OrderReadyMessage(String customerName, String drink) + { + CustomerName = customerName; + Drink = drink; + } + } +} diff --git a/Samples/AzureSagas/CustomerContracts/PaymentRequestMessage.cs b/Samples/AzureSagas/CustomerContracts/PaymentRequestMessage.cs index e56b73b4ca7..cc270ec709b 100644 --- a/Samples/AzureSagas/CustomerContracts/PaymentRequestMessage.cs +++ b/Samples/AzureSagas/CustomerContracts/PaymentRequestMessage.cs @@ -1,20 +1,20 @@ -using System; -using NServiceBus; - -namespace CustomerContracts -{ - [Serializable] - public class PaymentRequestMessage : IMessage - { - public Double Amount { get; private set; } - public String CustomerName { get; private set; } - public Guid OrderId { get; private set; } - - public PaymentRequestMessage(Double amount, String customerName, Guid orderId) - { - Amount = amount; - CustomerName = customerName; - OrderId = orderId; - } - } -} +using System; +using NServiceBus; + +namespace CustomerContracts +{ + [Serializable] + public class PaymentRequestMessage : IMessage + { + public Double Amount { get; private set; } + public String CustomerName { get; private set; } + public Guid OrderId { get; private set; } + + public PaymentRequestMessage(Double amount, String customerName, Guid orderId) + { + Amount = amount; + CustomerName = customerName; + OrderId = orderId; + } + } +} diff --git a/Samples/AzureSagas/CustomerContracts/Properties/AssemblyInfo.cs b/Samples/AzureSagas/CustomerContracts/Properties/AssemblyInfo.cs index 725c3fd347d..6306bcc9b34 100644 --- a/Samples/AzureSagas/CustomerContracts/Properties/AssemblyInfo.cs +++ b/Samples/AzureSagas/CustomerContracts/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("CustomerContracts")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("CustomerContracts")] -[assembly: AssemblyCopyright("Copyright 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("b661ecb2-d7f2-4346-94a8-198ec4b10b3b")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("CustomerContracts")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("CustomerContracts")] +[assembly: AssemblyCopyright("Copyright 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("b661ecb2-d7f2-4346-94a8-198ec4b10b3b")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/AzureSagas/Starbucks.sln b/Samples/AzureSagas/Starbucks.sln index 5c01a6ff524..d9d20f76aba 100644 --- a/Samples/AzureSagas/Starbucks.sln +++ b/Samples/AzureSagas/Starbucks.sln @@ -1,89 +1,89 @@ -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cashier", "Cashier\Cashier.csproj", "{DCCBF183-A703-4999-BB10-046E6C2800B9}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Customer", "Customer\Customer.csproj", "{88B4585B-A73D-4EFC-9FA4-14B33FBBBE79}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CashierContracts", "CashierContracts\CashierContracts.csproj", "{3963D354-2888-4005-8763-6E54A4D6BFCC}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomerContracts", "CustomerContracts\CustomerContracts.csproj", "{05882666-3DBD-4B8D-ADAE-439CABDD7DFB}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Barista", "Barista\Barista.csproj", "{F5C48D42-06F2-4CCA-88B5-6C49F2A09065}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TimeoutManager", "TimeoutManager\TimeoutManager.csproj", "{402F4888-C262-4AB7-82D2-183ADD631B26}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|Mixed Platforms = Debug|Mixed Platforms - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|Mixed Platforms = Release|Mixed Platforms - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {DCCBF183-A703-4999-BB10-046E6C2800B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DCCBF183-A703-4999-BB10-046E6C2800B9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DCCBF183-A703-4999-BB10-046E6C2800B9}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {DCCBF183-A703-4999-BB10-046E6C2800B9}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {DCCBF183-A703-4999-BB10-046E6C2800B9}.Debug|x86.ActiveCfg = Debug|Any CPU - {DCCBF183-A703-4999-BB10-046E6C2800B9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DCCBF183-A703-4999-BB10-046E6C2800B9}.Release|Any CPU.Build.0 = Release|Any CPU - {DCCBF183-A703-4999-BB10-046E6C2800B9}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {DCCBF183-A703-4999-BB10-046E6C2800B9}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {DCCBF183-A703-4999-BB10-046E6C2800B9}.Release|x86.ActiveCfg = Release|Any CPU - {88B4585B-A73D-4EFC-9FA4-14B33FBBBE79}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {88B4585B-A73D-4EFC-9FA4-14B33FBBBE79}.Debug|Any CPU.Build.0 = Debug|Any CPU - {88B4585B-A73D-4EFC-9FA4-14B33FBBBE79}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {88B4585B-A73D-4EFC-9FA4-14B33FBBBE79}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {88B4585B-A73D-4EFC-9FA4-14B33FBBBE79}.Debug|x86.ActiveCfg = Debug|Any CPU - {88B4585B-A73D-4EFC-9FA4-14B33FBBBE79}.Release|Any CPU.ActiveCfg = Release|Any CPU - {88B4585B-A73D-4EFC-9FA4-14B33FBBBE79}.Release|Any CPU.Build.0 = Release|Any CPU - {88B4585B-A73D-4EFC-9FA4-14B33FBBBE79}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {88B4585B-A73D-4EFC-9FA4-14B33FBBBE79}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {88B4585B-A73D-4EFC-9FA4-14B33FBBBE79}.Release|x86.ActiveCfg = Release|Any CPU - {3963D354-2888-4005-8763-6E54A4D6BFCC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3963D354-2888-4005-8763-6E54A4D6BFCC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3963D354-2888-4005-8763-6E54A4D6BFCC}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {3963D354-2888-4005-8763-6E54A4D6BFCC}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {3963D354-2888-4005-8763-6E54A4D6BFCC}.Debug|x86.ActiveCfg = Debug|Any CPU - {3963D354-2888-4005-8763-6E54A4D6BFCC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3963D354-2888-4005-8763-6E54A4D6BFCC}.Release|Any CPU.Build.0 = Release|Any CPU - {3963D354-2888-4005-8763-6E54A4D6BFCC}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {3963D354-2888-4005-8763-6E54A4D6BFCC}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {3963D354-2888-4005-8763-6E54A4D6BFCC}.Release|x86.ActiveCfg = Release|Any CPU - {05882666-3DBD-4B8D-ADAE-439CABDD7DFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {05882666-3DBD-4B8D-ADAE-439CABDD7DFB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {05882666-3DBD-4B8D-ADAE-439CABDD7DFB}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {05882666-3DBD-4B8D-ADAE-439CABDD7DFB}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {05882666-3DBD-4B8D-ADAE-439CABDD7DFB}.Debug|x86.ActiveCfg = Debug|Any CPU - {05882666-3DBD-4B8D-ADAE-439CABDD7DFB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {05882666-3DBD-4B8D-ADAE-439CABDD7DFB}.Release|Any CPU.Build.0 = Release|Any CPU - {05882666-3DBD-4B8D-ADAE-439CABDD7DFB}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {05882666-3DBD-4B8D-ADAE-439CABDD7DFB}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {05882666-3DBD-4B8D-ADAE-439CABDD7DFB}.Release|x86.ActiveCfg = Release|Any CPU - {F5C48D42-06F2-4CCA-88B5-6C49F2A09065}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F5C48D42-06F2-4CCA-88B5-6C49F2A09065}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F5C48D42-06F2-4CCA-88B5-6C49F2A09065}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {F5C48D42-06F2-4CCA-88B5-6C49F2A09065}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {F5C48D42-06F2-4CCA-88B5-6C49F2A09065}.Debug|x86.ActiveCfg = Debug|Any CPU - {F5C48D42-06F2-4CCA-88B5-6C49F2A09065}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F5C48D42-06F2-4CCA-88B5-6C49F2A09065}.Release|Any CPU.Build.0 = Release|Any CPU - {F5C48D42-06F2-4CCA-88B5-6C49F2A09065}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {F5C48D42-06F2-4CCA-88B5-6C49F2A09065}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {F5C48D42-06F2-4CCA-88B5-6C49F2A09065}.Release|x86.ActiveCfg = Release|Any CPU - {402F4888-C262-4AB7-82D2-183ADD631B26}.Debug|Any CPU.ActiveCfg = Debug|x86 - {402F4888-C262-4AB7-82D2-183ADD631B26}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {402F4888-C262-4AB7-82D2-183ADD631B26}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {402F4888-C262-4AB7-82D2-183ADD631B26}.Debug|x86.ActiveCfg = Debug|x86 - {402F4888-C262-4AB7-82D2-183ADD631B26}.Debug|x86.Build.0 = Debug|x86 - {402F4888-C262-4AB7-82D2-183ADD631B26}.Release|Any CPU.ActiveCfg = Release|x86 - {402F4888-C262-4AB7-82D2-183ADD631B26}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {402F4888-C262-4AB7-82D2-183ADD631B26}.Release|Mixed Platforms.Build.0 = Release|x86 - {402F4888-C262-4AB7-82D2-183ADD631B26}.Release|x86.ActiveCfg = Release|x86 - {402F4888-C262-4AB7-82D2-183ADD631B26}.Release|x86.Build.0 = Release|x86 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cashier", "Cashier\Cashier.csproj", "{DCCBF183-A703-4999-BB10-046E6C2800B9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Customer", "Customer\Customer.csproj", "{88B4585B-A73D-4EFC-9FA4-14B33FBBBE79}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CashierContracts", "CashierContracts\CashierContracts.csproj", "{3963D354-2888-4005-8763-6E54A4D6BFCC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomerContracts", "CustomerContracts\CustomerContracts.csproj", "{05882666-3DBD-4B8D-ADAE-439CABDD7DFB}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Barista", "Barista\Barista.csproj", "{F5C48D42-06F2-4CCA-88B5-6C49F2A09065}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TimeoutManager", "TimeoutManager\TimeoutManager.csproj", "{402F4888-C262-4AB7-82D2-183ADD631B26}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|Mixed Platforms = Debug|Mixed Platforms + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|Mixed Platforms = Release|Mixed Platforms + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DCCBF183-A703-4999-BB10-046E6C2800B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DCCBF183-A703-4999-BB10-046E6C2800B9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DCCBF183-A703-4999-BB10-046E6C2800B9}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {DCCBF183-A703-4999-BB10-046E6C2800B9}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {DCCBF183-A703-4999-BB10-046E6C2800B9}.Debug|x86.ActiveCfg = Debug|Any CPU + {DCCBF183-A703-4999-BB10-046E6C2800B9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DCCBF183-A703-4999-BB10-046E6C2800B9}.Release|Any CPU.Build.0 = Release|Any CPU + {DCCBF183-A703-4999-BB10-046E6C2800B9}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {DCCBF183-A703-4999-BB10-046E6C2800B9}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {DCCBF183-A703-4999-BB10-046E6C2800B9}.Release|x86.ActiveCfg = Release|Any CPU + {88B4585B-A73D-4EFC-9FA4-14B33FBBBE79}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {88B4585B-A73D-4EFC-9FA4-14B33FBBBE79}.Debug|Any CPU.Build.0 = Debug|Any CPU + {88B4585B-A73D-4EFC-9FA4-14B33FBBBE79}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {88B4585B-A73D-4EFC-9FA4-14B33FBBBE79}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {88B4585B-A73D-4EFC-9FA4-14B33FBBBE79}.Debug|x86.ActiveCfg = Debug|Any CPU + {88B4585B-A73D-4EFC-9FA4-14B33FBBBE79}.Release|Any CPU.ActiveCfg = Release|Any CPU + {88B4585B-A73D-4EFC-9FA4-14B33FBBBE79}.Release|Any CPU.Build.0 = Release|Any CPU + {88B4585B-A73D-4EFC-9FA4-14B33FBBBE79}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {88B4585B-A73D-4EFC-9FA4-14B33FBBBE79}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {88B4585B-A73D-4EFC-9FA4-14B33FBBBE79}.Release|x86.ActiveCfg = Release|Any CPU + {3963D354-2888-4005-8763-6E54A4D6BFCC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3963D354-2888-4005-8763-6E54A4D6BFCC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3963D354-2888-4005-8763-6E54A4D6BFCC}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {3963D354-2888-4005-8763-6E54A4D6BFCC}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {3963D354-2888-4005-8763-6E54A4D6BFCC}.Debug|x86.ActiveCfg = Debug|Any CPU + {3963D354-2888-4005-8763-6E54A4D6BFCC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3963D354-2888-4005-8763-6E54A4D6BFCC}.Release|Any CPU.Build.0 = Release|Any CPU + {3963D354-2888-4005-8763-6E54A4D6BFCC}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {3963D354-2888-4005-8763-6E54A4D6BFCC}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {3963D354-2888-4005-8763-6E54A4D6BFCC}.Release|x86.ActiveCfg = Release|Any CPU + {05882666-3DBD-4B8D-ADAE-439CABDD7DFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {05882666-3DBD-4B8D-ADAE-439CABDD7DFB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {05882666-3DBD-4B8D-ADAE-439CABDD7DFB}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {05882666-3DBD-4B8D-ADAE-439CABDD7DFB}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {05882666-3DBD-4B8D-ADAE-439CABDD7DFB}.Debug|x86.ActiveCfg = Debug|Any CPU + {05882666-3DBD-4B8D-ADAE-439CABDD7DFB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {05882666-3DBD-4B8D-ADAE-439CABDD7DFB}.Release|Any CPU.Build.0 = Release|Any CPU + {05882666-3DBD-4B8D-ADAE-439CABDD7DFB}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {05882666-3DBD-4B8D-ADAE-439CABDD7DFB}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {05882666-3DBD-4B8D-ADAE-439CABDD7DFB}.Release|x86.ActiveCfg = Release|Any CPU + {F5C48D42-06F2-4CCA-88B5-6C49F2A09065}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F5C48D42-06F2-4CCA-88B5-6C49F2A09065}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F5C48D42-06F2-4CCA-88B5-6C49F2A09065}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {F5C48D42-06F2-4CCA-88B5-6C49F2A09065}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {F5C48D42-06F2-4CCA-88B5-6C49F2A09065}.Debug|x86.ActiveCfg = Debug|Any CPU + {F5C48D42-06F2-4CCA-88B5-6C49F2A09065}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F5C48D42-06F2-4CCA-88B5-6C49F2A09065}.Release|Any CPU.Build.0 = Release|Any CPU + {F5C48D42-06F2-4CCA-88B5-6C49F2A09065}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {F5C48D42-06F2-4CCA-88B5-6C49F2A09065}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {F5C48D42-06F2-4CCA-88B5-6C49F2A09065}.Release|x86.ActiveCfg = Release|Any CPU + {402F4888-C262-4AB7-82D2-183ADD631B26}.Debug|Any CPU.ActiveCfg = Debug|x86 + {402F4888-C262-4AB7-82D2-183ADD631B26}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {402F4888-C262-4AB7-82D2-183ADD631B26}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {402F4888-C262-4AB7-82D2-183ADD631B26}.Debug|x86.ActiveCfg = Debug|x86 + {402F4888-C262-4AB7-82D2-183ADD631B26}.Debug|x86.Build.0 = Debug|x86 + {402F4888-C262-4AB7-82D2-183ADD631B26}.Release|Any CPU.ActiveCfg = Release|x86 + {402F4888-C262-4AB7-82D2-183ADD631B26}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {402F4888-C262-4AB7-82D2-183ADD631B26}.Release|Mixed Platforms.Build.0 = Release|x86 + {402F4888-C262-4AB7-82D2-183ADD631B26}.Release|x86.ActiveCfg = Release|x86 + {402F4888-C262-4AB7-82D2-183ADD631B26}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Samples/AzureSagas/TimeoutManager/App.config b/Samples/AzureSagas/TimeoutManager/App.config index 9250b9d5b06..eb191e39ff5 100644 --- a/Samples/AzureSagas/TimeoutManager/App.config +++ b/Samples/AzureSagas/TimeoutManager/App.config @@ -1,26 +1,26 @@ - - - -
-
-
- -
-
- - - - - - - - - - - - - - - - - + + + +
+
+
+ +
+
+ + + + + + + + + + + + + + + + + diff --git a/Samples/AzureSagas/TimeoutManager/Bootstrapper.cs b/Samples/AzureSagas/TimeoutManager/Bootstrapper.cs index c42fa79c4a7..552b4abcbce 100644 --- a/Samples/AzureSagas/TimeoutManager/Bootstrapper.cs +++ b/Samples/AzureSagas/TimeoutManager/Bootstrapper.cs @@ -1,42 +1,42 @@ -using NServiceBus; -using NServiceBus.Config; -using StructureMap; - -namespace TimeoutManager -{ - public class Bootstrapper - { - private Bootstrapper() - {} - - public static void Bootstrap() - { - BootstrapStructureMap(); - BootstrapNServiceBus(); - } - - private static void BootstrapStructureMap() - { - ObjectFactory.Initialize(x => x.AddRegistry(new TimeoutRegistry())); - } - - private static void BootstrapNServiceBus() - { - - Configure.With() - .Log4Net() - .StructureMapBuilder(ObjectFactory.Container) - - .AzureConfigurationSource() - .AzureMessageQueue().XmlSerializer() - //.AzureSubcriptionStorage() - //.Sagas().AzureSagaPersister() - - .UnicastBus() - .LoadMessageHandlers() - .IsTransactional(true) - .CreateBus() - .Start(); - } - } -} +using NServiceBus; +using NServiceBus.Config; +using StructureMap; + +namespace TimeoutManager +{ + public class Bootstrapper + { + private Bootstrapper() + {} + + public static void Bootstrap() + { + BootstrapStructureMap(); + BootstrapNServiceBus(); + } + + private static void BootstrapStructureMap() + { + ObjectFactory.Initialize(x => x.AddRegistry(new TimeoutRegistry())); + } + + private static void BootstrapNServiceBus() + { + + Configure.With() + .Log4Net() + .StructureMapBuilder(ObjectFactory.Container) + + .AzureConfigurationSource() + .AzureMessageQueue().XmlSerializer() + //.AzureSubcriptionStorage() + //.Sagas().AzureSagaPersister() + + .UnicastBus() + .LoadMessageHandlers() + .IsTransactional(true) + .CreateBus() + .Start(); + } + } +} diff --git a/Samples/AzureSagas/TimeoutManager/Program.cs b/Samples/AzureSagas/TimeoutManager/Program.cs index e39edd952bc..3837508d3b5 100644 --- a/Samples/AzureSagas/TimeoutManager/Program.cs +++ b/Samples/AzureSagas/TimeoutManager/Program.cs @@ -1,26 +1,26 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Windows.Forms; -using StructureMap; - -namespace TimeoutManager -{ - static class Program - { - /// - /// The main entry point for the application. - /// - [STAThread] - static void Main() - { - Bootstrapper.Bootstrap(); - - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - - var startupDialog = ObjectFactory.GetInstance(); - startupDialog.Start(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; +using StructureMap; + +namespace TimeoutManager +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Bootstrapper.Bootstrap(); + + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + + var startupDialog = ObjectFactory.GetInstance(); + startupDialog.Start(); + } + } +} diff --git a/Samples/AzureSagas/TimeoutManager/Properties/AssemblyInfo.cs b/Samples/AzureSagas/TimeoutManager/Properties/AssemblyInfo.cs index d011eae4b77..0c3475e2f78 100644 --- a/Samples/AzureSagas/TimeoutManager/Properties/AssemblyInfo.cs +++ b/Samples/AzureSagas/TimeoutManager/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("TimeoutManager")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Capgemini")] -[assembly: AssemblyProduct("TimeoutManager")] -[assembly: AssemblyCopyright("Copyright © Capgemini 2010")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("f3d4d4e2-bc1f-43e2-ac15-d58f2f530819")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("TimeoutManager")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Capgemini")] +[assembly: AssemblyProduct("TimeoutManager")] +[assembly: AssemblyCopyright("Copyright © Capgemini 2010")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("f3d4d4e2-bc1f-43e2-ac15-d58f2f530819")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/AzureSagas/TimeoutManager/Properties/Resources.Designer.cs b/Samples/AzureSagas/TimeoutManager/Properties/Resources.Designer.cs index 7dc7de84315..20c001b9f1b 100644 --- a/Samples/AzureSagas/TimeoutManager/Properties/Resources.Designer.cs +++ b/Samples/AzureSagas/TimeoutManager/Properties/Resources.Designer.cs @@ -1,63 +1,63 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.1 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace TimeoutManager.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TimeoutManager.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.1 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace TimeoutManager.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TimeoutManager.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/Samples/AzureSagas/TimeoutManager/Properties/Resources.resx b/Samples/AzureSagas/TimeoutManager/Properties/Resources.resx index ffecec851ab..af7dbebbace 100644 --- a/Samples/AzureSagas/TimeoutManager/Properties/Resources.resx +++ b/Samples/AzureSagas/TimeoutManager/Properties/Resources.resx @@ -1,117 +1,117 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/Samples/AzureSagas/TimeoutManager/Properties/Settings.Designer.cs b/Samples/AzureSagas/TimeoutManager/Properties/Settings.Designer.cs index a5ac691fd24..472b9b20a27 100644 --- a/Samples/AzureSagas/TimeoutManager/Properties/Settings.Designer.cs +++ b/Samples/AzureSagas/TimeoutManager/Properties/Settings.Designer.cs @@ -1,26 +1,26 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.1 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace TimeoutManager.Properties { - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default { - get { - return defaultInstance; - } - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.1 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace TimeoutManager.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/Samples/AzureSagas/TimeoutManager/Properties/Settings.settings b/Samples/AzureSagas/TimeoutManager/Properties/Settings.settings index abf36c5d3d7..39645652af6 100644 --- a/Samples/AzureSagas/TimeoutManager/Properties/Settings.settings +++ b/Samples/AzureSagas/TimeoutManager/Properties/Settings.settings @@ -1,7 +1,7 @@ - - - - - - - + + + + + + + diff --git a/Samples/AzureSagas/TimeoutManager/StarbucksTimeoutManager.Designer.cs b/Samples/AzureSagas/TimeoutManager/StarbucksTimeoutManager.Designer.cs index 20b80456280..bfdb03438d3 100644 --- a/Samples/AzureSagas/TimeoutManager/StarbucksTimeoutManager.Designer.cs +++ b/Samples/AzureSagas/TimeoutManager/StarbucksTimeoutManager.Designer.cs @@ -1,74 +1,74 @@ -namespace TimeoutManager -{ - partial class StarbucksTimeoutManager - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if(disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.TimoutsListBox = new System.Windows.Forms.ListBox(); - this.TimeoutsLabel = new System.Windows.Forms.Label(); - this.SuspendLayout(); - // - // TimoutsListBox - // - this.TimoutsListBox.FormattingEnabled = true; - this.TimoutsListBox.Location = new System.Drawing.Point(12, 25); - this.TimoutsListBox.Name = "TimoutsListBox"; - this.TimoutsListBox.Size = new System.Drawing.Size(557, 290); - this.TimoutsListBox.TabIndex = 0; - // - // TimeoutsLabel - // - this.TimeoutsLabel.AutoSize = true; - this.TimeoutsLabel.Location = new System.Drawing.Point(12, 9); - this.TimeoutsLabel.Name = "TimeoutsLabel"; - this.TimeoutsLabel.Size = new System.Drawing.Size(50, 13); - this.TimeoutsLabel.TabIndex = 1; - this.TimeoutsLabel.Text = "Timeouts"; - // - // StarbucksTimeoutManager - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(582, 330); - this.Controls.Add(this.TimeoutsLabel); - this.Controls.Add(this.TimoutsListBox); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.Name = "StarbucksTimeoutManager"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "Timout Monitor 2000 - Ultimate Edition"; - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.ListBox TimoutsListBox; - private System.Windows.Forms.Label TimeoutsLabel; - } -} - +namespace TimeoutManager +{ + partial class StarbucksTimeoutManager + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if(disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.TimoutsListBox = new System.Windows.Forms.ListBox(); + this.TimeoutsLabel = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // TimoutsListBox + // + this.TimoutsListBox.FormattingEnabled = true; + this.TimoutsListBox.Location = new System.Drawing.Point(12, 25); + this.TimoutsListBox.Name = "TimoutsListBox"; + this.TimoutsListBox.Size = new System.Drawing.Size(557, 290); + this.TimoutsListBox.TabIndex = 0; + // + // TimeoutsLabel + // + this.TimeoutsLabel.AutoSize = true; + this.TimeoutsLabel.Location = new System.Drawing.Point(12, 9); + this.TimeoutsLabel.Name = "TimeoutsLabel"; + this.TimeoutsLabel.Size = new System.Drawing.Size(50, 13); + this.TimeoutsLabel.TabIndex = 1; + this.TimeoutsLabel.Text = "Timeouts"; + // + // StarbucksTimeoutManager + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(582, 330); + this.Controls.Add(this.TimeoutsLabel); + this.Controls.Add(this.TimoutsListBox); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.Name = "StarbucksTimeoutManager"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Timout Monitor 2000 - Ultimate Edition"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.ListBox TimoutsListBox; + private System.Windows.Forms.Label TimeoutsLabel; + } +} + diff --git a/Samples/AzureSagas/TimeoutManager/StarbucksTimeoutManager.cs b/Samples/AzureSagas/TimeoutManager/StarbucksTimeoutManager.cs index 0bd33f6472a..5ab0c0afe06 100644 --- a/Samples/AzureSagas/TimeoutManager/StarbucksTimeoutManager.cs +++ b/Samples/AzureSagas/TimeoutManager/StarbucksTimeoutManager.cs @@ -1,23 +1,23 @@ -using System; -using System.Windows.Forms; - -namespace TimeoutManager -{ - public interface IStarbucksTimeoutManagerView - { - void Start(); - } - - public partial class StarbucksTimeoutManager : Form, IStarbucksTimeoutManagerView - { - public StarbucksTimeoutManager() - { - InitializeComponent(); - } - - public void Start() - { - Application.Run(this); - } - } -} +using System; +using System.Windows.Forms; + +namespace TimeoutManager +{ + public interface IStarbucksTimeoutManagerView + { + void Start(); + } + + public partial class StarbucksTimeoutManager : Form, IStarbucksTimeoutManagerView + { + public StarbucksTimeoutManager() + { + InitializeComponent(); + } + + public void Start() + { + Application.Run(this); + } + } +} diff --git a/Samples/AzureSagas/TimeoutManager/StarbucksTimeoutManager.resx b/Samples/AzureSagas/TimeoutManager/StarbucksTimeoutManager.resx index c7e0d4bdf13..d58980a38d7 100644 --- a/Samples/AzureSagas/TimeoutManager/StarbucksTimeoutManager.resx +++ b/Samples/AzureSagas/TimeoutManager/StarbucksTimeoutManager.resx @@ -1,120 +1,120 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/Samples/AzureSagas/TimeoutManager/TimeoutManager.csproj b/Samples/AzureSagas/TimeoutManager/TimeoutManager.csproj index 952d72e9a06..6223ced67f7 100644 --- a/Samples/AzureSagas/TimeoutManager/TimeoutManager.csproj +++ b/Samples/AzureSagas/TimeoutManager/TimeoutManager.csproj @@ -1,110 +1,110 @@ - - - - Debug - x86 - 8.0.30703 - 2.0 - {402F4888-C262-4AB7-82D2-183ADD631B26} - WinExe - Properties - TimeoutManager - TimeoutManager - v4.0 - - - 512 - - - x86 - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - x86 - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\..\..\lib\log4net.dll - - - ..\..\..\build\timeout\NServiceBus.dll - - - ..\..\..\build\timeout\NServiceBus.Core.dll - - - ..\..\..\binaries\containers\structuremap\NServiceBus.ObjectBuilder.StructureMap.dll - - - ..\..\..\binaries\containers\structuremap\StructureMap.dll - - - - - - - - - - - - - ..\..\..\build\timeout\Timeout.MessageHandlers.dll - - - - - - - - - Form - - - StarbucksTimeoutManager.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - True - - - StarbucksTimeoutManager.cs - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - - + + + + Debug + x86 + 8.0.30703 + 2.0 + {402F4888-C262-4AB7-82D2-183ADD631B26} + WinExe + Properties + TimeoutManager + TimeoutManager + v4.0 + + + 512 + + + x86 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + x86 + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\..\lib\log4net.dll + + + ..\..\..\build\timeout\NServiceBus.dll + + + ..\..\..\build\timeout\NServiceBus.Core.dll + + + ..\..\..\binaries\containers\structuremap\NServiceBus.ObjectBuilder.StructureMap.dll + + + ..\..\..\binaries\containers\structuremap\StructureMap.dll + + + + + + + + + + + + + ..\..\..\build\timeout\Timeout.MessageHandlers.dll + + + + + + + + + Form + + + StarbucksTimeoutManager.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + StarbucksTimeoutManager.cs + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + \ No newline at end of file diff --git a/Samples/AzureSagas/TimeoutManager/TimeoutManager.csproj.user b/Samples/AzureSagas/TimeoutManager/TimeoutManager.csproj.user index 566c009ac90..55f44b95fec 100644 --- a/Samples/AzureSagas/TimeoutManager/TimeoutManager.csproj.user +++ b/Samples/AzureSagas/TimeoutManager/TimeoutManager.csproj.user @@ -1,6 +1,6 @@ - - - - ShowAllFiles - + + + + ShowAllFiles + \ No newline at end of file diff --git a/Samples/AzureSagas/TimeoutManager/TimeoutRegistry.cs b/Samples/AzureSagas/TimeoutManager/TimeoutRegistry.cs index d95e8d053f2..377f926e399 100644 --- a/Samples/AzureSagas/TimeoutManager/TimeoutRegistry.cs +++ b/Samples/AzureSagas/TimeoutManager/TimeoutRegistry.cs @@ -1,14 +1,14 @@ -using StructureMap.Configuration.DSL; - -namespace TimeoutManager -{ - public class TimeoutRegistry : Registry - { - public TimeoutRegistry() - { - For() - .Singleton() - .Use(); - } - } -} +using StructureMap.Configuration.DSL; + +namespace TimeoutManager +{ + public class TimeoutRegistry : Registry + { + public TimeoutRegistry() + { + For() + .Singleton() + .Use(); + } + } +} diff --git a/Samples/Encryption/Client/App.config b/Samples/Encryption/Client/App.config index a71bc754ae0..8f09d693d5d 100644 --- a/Samples/Encryption/Client/App.config +++ b/Samples/Encryption/Client/App.config @@ -1,27 +1,27 @@ - - - -
-
-
- - - - - - - - - - - - - - - - - - + + + +
+
+
+ + + + + + + + + + + + + + + + + + diff --git a/Samples/Encryption/Client/Client.cs b/Samples/Encryption/Client/Client.cs index 8a30eb677f3..35812c1d69a 100644 --- a/Samples/Encryption/Client/Client.cs +++ b/Samples/Encryption/Client/Client.cs @@ -1,34 +1,34 @@ -using System; -using NServiceBus; -using Messages; - -namespace Client -{ - public class EndpointConfig : IConfigureThisEndpoint, AsA_Client {} - - public class SecurityConfig : IWantCustomInitialization - { - public void Init() - { - NServiceBus.Configure.Instance.RijndaelEncryptionService(); - } - } - - public class Runner : IWantToRunAtStartup - { - public void Run() - { - Console.WriteLine("Press 'Enter' to send a message."); - while (Console.ReadLine() != null) - { - Bus.Send(m => m.Secret = "betcha can't guess my secret"); - } - } - - public void Stop() - { - } - - public IBus Bus { get; set; } - } -} +using System; +using NServiceBus; +using Messages; + +namespace Client +{ + public class EndpointConfig : IConfigureThisEndpoint, AsA_Client {} + + public class SecurityConfig : IWantCustomInitialization + { + public void Init() + { + NServiceBus.Configure.Instance.RijndaelEncryptionService(); + } + } + + public class Runner : IWantToRunAtStartup + { + public void Run() + { + Console.WriteLine("Press 'Enter' to send a message."); + while (Console.ReadLine() != null) + { + Bus.Send(m => m.Secret = "betcha can't guess my secret"); + } + } + + public void Stop() + { + } + + public IBus Bus { get; set; } + } +} diff --git a/Samples/Encryption/Client/Client.csproj b/Samples/Encryption/Client/Client.csproj index 1b830ead03e..38db9c2febe 100644 --- a/Samples/Encryption/Client/Client.csproj +++ b/Samples/Encryption/Client/Client.csproj @@ -1,125 +1,125 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {9AF57290-9CEE-4934-BDB4-D201F1EABE49} - Library - Properties - Client - Client - v4.0 - 512 - - - - - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\binaries\log4net.dll - - - False - ..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\binaries\NServiceBus.Core.dll - - - False - ..\..\..\binaries\NServiceBus.Host.exe - - - - 3.5 - - - 3.5 - - - 3.5 - - - - - - - - - - - {E62F2DF8-9E8F-4512-9FD9-C97C97AEC15A} - Messages - - - - - Designer - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {9AF57290-9CEE-4934-BDB4-D201F1EABE49} + Library + Properties + Client + Client + v4.0 + 512 + + + + + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\binaries\log4net.dll + + + False + ..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\binaries\NServiceBus.Core.dll + + + False + ..\..\..\binaries\NServiceBus.Host.exe + + + + 3.5 + + + 3.5 + + + 3.5 + + + + + + + + + + + {E62F2DF8-9E8F-4512-9FD9-C97C97AEC15A} + Messages + + + + + Designer + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + \ No newline at end of file diff --git a/Samples/Encryption/Client/Properties/AssemblyInfo.cs b/Samples/Encryption/Client/Properties/AssemblyInfo.cs index bb1ba109bb6..6cd75a7f7be 100644 --- a/Samples/Encryption/Client/Properties/AssemblyInfo.cs +++ b/Samples/Encryption/Client/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Client")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("Client")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2010")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("7d18ccd3-65e6-465e-ae13-91cbd150bb93")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Client")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Client")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2010")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("7d18ccd3-65e6-465e-ae13-91cbd150bb93")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/Encryption/Encryption.sln b/Samples/Encryption/Encryption.sln index e2ad095e135..e384fd13dd1 100644 --- a/Samples/Encryption/Encryption.sln +++ b/Samples/Encryption/Encryption.sln @@ -1,32 +1,32 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Messages", "Messages\Messages.csproj", "{E62F2DF8-9E8F-4512-9FD9-C97C97AEC15A}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Client", "Client\Client.csproj", "{9AF57290-9CEE-4934-BDB4-D201F1EABE49}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server", "Server\Server.csproj", "{2FAF88E7-8FC9-4AFA-B265-9085F983C702}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E62F2DF8-9E8F-4512-9FD9-C97C97AEC15A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E62F2DF8-9E8F-4512-9FD9-C97C97AEC15A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E62F2DF8-9E8F-4512-9FD9-C97C97AEC15A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E62F2DF8-9E8F-4512-9FD9-C97C97AEC15A}.Release|Any CPU.Build.0 = Release|Any CPU - {9AF57290-9CEE-4934-BDB4-D201F1EABE49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9AF57290-9CEE-4934-BDB4-D201F1EABE49}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9AF57290-9CEE-4934-BDB4-D201F1EABE49}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9AF57290-9CEE-4934-BDB4-D201F1EABE49}.Release|Any CPU.Build.0 = Release|Any CPU - {2FAF88E7-8FC9-4AFA-B265-9085F983C702}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2FAF88E7-8FC9-4AFA-B265-9085F983C702}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2FAF88E7-8FC9-4AFA-B265-9085F983C702}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2FAF88E7-8FC9-4AFA-B265-9085F983C702}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Messages", "Messages\Messages.csproj", "{E62F2DF8-9E8F-4512-9FD9-C97C97AEC15A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Client", "Client\Client.csproj", "{9AF57290-9CEE-4934-BDB4-D201F1EABE49}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server", "Server\Server.csproj", "{2FAF88E7-8FC9-4AFA-B265-9085F983C702}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E62F2DF8-9E8F-4512-9FD9-C97C97AEC15A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E62F2DF8-9E8F-4512-9FD9-C97C97AEC15A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E62F2DF8-9E8F-4512-9FD9-C97C97AEC15A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E62F2DF8-9E8F-4512-9FD9-C97C97AEC15A}.Release|Any CPU.Build.0 = Release|Any CPU + {9AF57290-9CEE-4934-BDB4-D201F1EABE49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9AF57290-9CEE-4934-BDB4-D201F1EABE49}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9AF57290-9CEE-4934-BDB4-D201F1EABE49}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9AF57290-9CEE-4934-BDB4-D201F1EABE49}.Release|Any CPU.Build.0 = Release|Any CPU + {2FAF88E7-8FC9-4AFA-B265-9085F983C702}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2FAF88E7-8FC9-4AFA-B265-9085F983C702}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2FAF88E7-8FC9-4AFA-B265-9085F983C702}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2FAF88E7-8FC9-4AFA-B265-9085F983C702}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Samples/Encryption/Messages/MessageWithSecretData.cs b/Samples/Encryption/Messages/MessageWithSecretData.cs index 0de8c8a1524..3ae2fd0ab4f 100644 --- a/Samples/Encryption/Messages/MessageWithSecretData.cs +++ b/Samples/Encryption/Messages/MessageWithSecretData.cs @@ -1,9 +1,9 @@ -using NServiceBus; - -namespace Messages -{ - public class MessageWithSecretData : IMessage - { - public WireEncryptedString Secret { get; set; } - } -} +using NServiceBus; + +namespace Messages +{ + public class MessageWithSecretData : IMessage + { + public WireEncryptedString Secret { get; set; } + } +} diff --git a/Samples/Encryption/Messages/Messages.csproj b/Samples/Encryption/Messages/Messages.csproj index 14af055617b..52e697c2872 100644 --- a/Samples/Encryption/Messages/Messages.csproj +++ b/Samples/Encryption/Messages/Messages.csproj @@ -1,102 +1,102 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {E62F2DF8-9E8F-4512-9FD9-C97C97AEC15A} - Library - Properties - Messages - Messages - v4.0 - 512 - - - - - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\binaries\NServiceBus.dll - - - - 3.5 - - - 3.5 - - - 3.5 - - - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {E62F2DF8-9E8F-4512-9FD9-C97C97AEC15A} + Library + Properties + Messages + Messages + v4.0 + 512 + + + + + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\binaries\NServiceBus.dll + + + + 3.5 + + + 3.5 + + + 3.5 + + + + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + \ No newline at end of file diff --git a/Samples/Encryption/Messages/Properties/AssemblyInfo.cs b/Samples/Encryption/Messages/Properties/AssemblyInfo.cs index bf75dcb3b35..839a733d56b 100644 --- a/Samples/Encryption/Messages/Properties/AssemblyInfo.cs +++ b/Samples/Encryption/Messages/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Messages")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("Messages")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2010")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("8bd53a32-7a35-4572-96c8-544f43be65cb")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Messages")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Messages")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2010")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("8bd53a32-7a35-4572-96c8-544f43be65cb")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/Encryption/Server/App.config b/Samples/Encryption/Server/App.config index 9268b4f1157..8957bfb6b77 100644 --- a/Samples/Encryption/Server/App.config +++ b/Samples/Encryption/Server/App.config @@ -1,24 +1,24 @@ - - - -
-
-
- - - - - - - - - - - - - - - + + + +
+
+
+ + + + + + + + + + + + + + + diff --git a/Samples/Encryption/Server/Properties/AssemblyInfo.cs b/Samples/Encryption/Server/Properties/AssemblyInfo.cs index e0410282fdf..643b38772de 100644 --- a/Samples/Encryption/Server/Properties/AssemblyInfo.cs +++ b/Samples/Encryption/Server/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Server")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("Server")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2010")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("8d6e084c-ad7b-41b0-901e-77a3c5b7ac72")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Server")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Server")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2010")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("8d6e084c-ad7b-41b0-901e-77a3c5b7ac72")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/Encryption/Server/Server.cs b/Samples/Encryption/Server/Server.cs index 02406fd5559..a038eac6d03 100644 --- a/Samples/Encryption/Server/Server.cs +++ b/Samples/Encryption/Server/Server.cs @@ -1,24 +1,24 @@ -using System; -using Messages; -using NServiceBus; - -namespace Server -{ - public class EndpointConfig : IConfigureThisEndpoint, AsA_Server {} - - public class SecurityConfig : IWantCustomInitialization - { - public void Init() - { - NServiceBus.Configure.Instance.RijndaelEncryptionService(); - } - } - - public class Handler : IHandleMessages - { - public void Handle(MessageWithSecretData message) - { - Console.WriteLine("I know your secret - it's '" + message.Secret + "'."); - } - } -} +using System; +using Messages; +using NServiceBus; + +namespace Server +{ + public class EndpointConfig : IConfigureThisEndpoint, AsA_Server {} + + public class SecurityConfig : IWantCustomInitialization + { + public void Init() + { + NServiceBus.Configure.Instance.RijndaelEncryptionService(); + } + } + + public class Handler : IHandleMessages + { + public void Handle(MessageWithSecretData message) + { + Console.WriteLine("I know your secret - it's '" + message.Secret + "'."); + } + } +} diff --git a/Samples/Encryption/Server/Server.csproj b/Samples/Encryption/Server/Server.csproj index 643c405e4f7..3e99894678e 100644 --- a/Samples/Encryption/Server/Server.csproj +++ b/Samples/Encryption/Server/Server.csproj @@ -1,125 +1,125 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {2FAF88E7-8FC9-4AFA-B265-9085F983C702} - Library - Properties - Server - Server - v4.0 - 512 - - - - - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\binaries\log4net.dll - - - False - ..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\binaries\NServiceBus.Core.dll - - - False - ..\..\..\binaries\NServiceBus.Host.exe - - - - 3.5 - - - 3.5 - - - 3.5 - - - - - - - - - - - {E62F2DF8-9E8F-4512-9FD9-C97C97AEC15A} - Messages - - - - - Designer - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {2FAF88E7-8FC9-4AFA-B265-9085F983C702} + Library + Properties + Server + Server + v4.0 + 512 + + + + + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\binaries\log4net.dll + + + False + ..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\binaries\NServiceBus.Core.dll + + + False + ..\..\..\binaries\NServiceBus.Host.exe + + + + 3.5 + + + 3.5 + + + 3.5 + + + + + + + + + + + {E62F2DF8-9E8F-4512-9FD9-C97C97AEC15A} + Messages + + + + + Designer + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + \ No newline at end of file diff --git a/Samples/FaultHandling/FaultHandling.sln b/Samples/FaultHandling/FaultHandling.sln index 9a1e391ce9a..c644690902e 100644 --- a/Samples/FaultHandling/FaultHandling.sln +++ b/Samples/FaultHandling/FaultHandling.sln @@ -1,36 +1,36 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyClient", "MyClient\MyClient.csproj", "{9F8E556C-0AFA-4C5D-B64F-AE9376ABF145}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyServer", "MyServer\MyServer.csproj", "{CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyMessages", "MyMessages\MyMessages.csproj", "{20F613ED-C871-477C-B1E4-48B96CACF794}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {9F8E556C-0AFA-4C5D-B64F-AE9376ABF145}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9F8E556C-0AFA-4C5D-B64F-AE9376ABF145}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9F8E556C-0AFA-4C5D-B64F-AE9376ABF145}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9F8E556C-0AFA-4C5D-B64F-AE9376ABF145}.Release|Any CPU.Build.0 = Release|Any CPU - {CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6}.Release|Any CPU.Build.0 = Release|Any CPU - {20F613ED-C871-477C-B1E4-48B96CACF794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {20F613ED-C871-477C-B1E4-48B96CACF794}.Debug|Any CPU.Build.0 = Debug|Any CPU - {20F613ED-C871-477C-B1E4-48B96CACF794}.Release|Any CPU.ActiveCfg = Release|Any CPU - {20F613ED-C871-477C-B1E4-48B96CACF794}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(SubversionScc) = preSolution - Svn-Managed = True - Manager = AnkhSVN - Subversion Support for Visual Studio - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyClient", "MyClient\MyClient.csproj", "{9F8E556C-0AFA-4C5D-B64F-AE9376ABF145}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyServer", "MyServer\MyServer.csproj", "{CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyMessages", "MyMessages\MyMessages.csproj", "{20F613ED-C871-477C-B1E4-48B96CACF794}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9F8E556C-0AFA-4C5D-B64F-AE9376ABF145}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9F8E556C-0AFA-4C5D-B64F-AE9376ABF145}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9F8E556C-0AFA-4C5D-B64F-AE9376ABF145}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9F8E556C-0AFA-4C5D-B64F-AE9376ABF145}.Release|Any CPU.Build.0 = Release|Any CPU + {CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6}.Release|Any CPU.Build.0 = Release|Any CPU + {20F613ED-C871-477C-B1E4-48B96CACF794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {20F613ED-C871-477C-B1E4-48B96CACF794}.Debug|Any CPU.Build.0 = Debug|Any CPU + {20F613ED-C871-477C-B1E4-48B96CACF794}.Release|Any CPU.ActiveCfg = Release|Any CPU + {20F613ED-C871-477C-B1E4-48B96CACF794}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(SubversionScc) = preSolution + Svn-Managed = True + Manager = AnkhSVN - Subversion Support for Visual Studio + EndGlobalSection +EndGlobal diff --git a/Samples/FaultHandling/MyClient/App.config b/Samples/FaultHandling/MyClient/App.config index ccc02f486b0..246fb03436c 100644 --- a/Samples/FaultHandling/MyClient/App.config +++ b/Samples/FaultHandling/MyClient/App.config @@ -1,65 +1,65 @@ - - - -
-
-
- -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - NHibernate.Dialect.SQLiteDialect - NHibernate.Connection.DriverConnectionProvider - NHibernate.Driver.SQLite20Driver - Data Source=.\NServiceBus.Sagas.sqlite;Version=3;New=True; - NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu - 1 - - + + + +
+
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NHibernate.Dialect.SQLiteDialect + NHibernate.Connection.DriverConnectionProvider + NHibernate.Driver.SQLite20Driver + Data Source=.\NServiceBus.Sagas.sqlite;Version=3;New=True; + NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu + 1 + + \ No newline at end of file diff --git a/Samples/FaultHandling/MyClient/ClientEndpoint.cs b/Samples/FaultHandling/MyClient/ClientEndpoint.cs index 9f8d7ac85d9..14b17d4c656 100644 --- a/Samples/FaultHandling/MyClient/ClientEndpoint.cs +++ b/Samples/FaultHandling/MyClient/ClientEndpoint.cs @@ -1,59 +1,59 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using NHibernate.Cfg; -using NServiceBus; -using MyMessages; -using NHibernate; -using NServiceBus.Faults.NHibernate; - -namespace MyClient -{ - public class ClientEndpoint : IWantToRunAtStartup - { - private static readonly ISessionFactory SessionFactory = new Configuration().Configure().BuildSessionFactory(); - private static readonly Random _random = new Random(); - - public IBus Bus { get; set; } - - public void Run() - { - Console.WriteLine("Press 'S' to send a message, 'D' to dump errors. To exit, Ctrl + C"); - - while (true) - { - char key = char.ToLower(Console.ReadKey().KeyChar); - if (key == 's') - { - Bus.Send(new RequestDataMessage {Fault = Fault()}); - } - else if (key == 'd') - { - DumpFaults(); - } - } - } - - public void Stop() - { - } - - private static bool Fault() - { - return _random.Next(2) == 0; - } - - private static void DumpFaults() - { - Console.WriteLine("Errors:"); - using (var session = SessionFactory.OpenSession()) - { - IList failures = session.CreateCriteria(typeof (FailureInfo)).List(); - foreach (var info in failures) - { - Console.WriteLine(info.TopmostExceptionMessage); - } - } - } - } -} +using System; +using System.Collections.Generic; +using System.Diagnostics; +using NHibernate.Cfg; +using NServiceBus; +using MyMessages; +using NHibernate; +using NServiceBus.Faults.NHibernate; + +namespace MyClient +{ + public class ClientEndpoint : IWantToRunAtStartup + { + private static readonly ISessionFactory SessionFactory = new Configuration().Configure().BuildSessionFactory(); + private static readonly Random _random = new Random(); + + public IBus Bus { get; set; } + + public void Run() + { + Console.WriteLine("Press 'S' to send a message, 'D' to dump errors. To exit, Ctrl + C"); + + while (true) + { + char key = char.ToLower(Console.ReadKey().KeyChar); + if (key == 's') + { + Bus.Send(new RequestDataMessage {Fault = Fault()}); + } + else if (key == 'd') + { + DumpFaults(); + } + } + } + + public void Stop() + { + } + + private static bool Fault() + { + return _random.Next(2) == 0; + } + + private static void DumpFaults() + { + Console.WriteLine("Errors:"); + using (var session = SessionFactory.OpenSession()) + { + IList failures = session.CreateCriteria(typeof (FailureInfo)).List(); + foreach (var info in failures) + { + Console.WriteLine(info.TopmostExceptionMessage); + } + } + } + } +} diff --git a/Samples/FaultHandling/MyClient/DataResponseMessageHandler.cs b/Samples/FaultHandling/MyClient/DataResponseMessageHandler.cs index 91f4a408c36..bc5f5c91af3 100644 --- a/Samples/FaultHandling/MyClient/DataResponseMessageHandler.cs +++ b/Samples/FaultHandling/MyClient/DataResponseMessageHandler.cs @@ -1,19 +1,19 @@ -using System; -using MyMessages; -using NServiceBus; - -namespace MyClient -{ - class DataResponseMessageHandler : IHandleMessages - { - public void Handle(DataResponseMessage message) - { - if (message.Fault) - { - Console.WriteLine("Fault message: throwing exception"); - throw new Exception(); - } - Console.WriteLine("Message processed"); - } - } -} +using System; +using MyMessages; +using NServiceBus; + +namespace MyClient +{ + class DataResponseMessageHandler : IHandleMessages + { + public void Handle(DataResponseMessage message) + { + if (message.Fault) + { + Console.WriteLine("Fault message: throwing exception"); + throw new Exception(); + } + Console.WriteLine("Message processed"); + } + } +} diff --git a/Samples/FaultHandling/MyClient/EndpointConfig.cs b/Samples/FaultHandling/MyClient/EndpointConfig.cs index b18dd676a85..83a39c1a411 100644 --- a/Samples/FaultHandling/MyClient/EndpointConfig.cs +++ b/Samples/FaultHandling/MyClient/EndpointConfig.cs @@ -1,17 +1,17 @@ -using NServiceBus; -using NServiceBus.Faults; -using NServiceBus.Faults.NHibernate; - -namespace MyClient -{ - public class EndpointConfig : IConfigureThisEndpoint, AsA_Client {} - - public class ClientInit : IWantCustomInitialization - { - public void Init() - { - Configure.Instance.BinarySerializer() - .NHibernateFaultManagerWithSQLiteAndAutomaticSchemaGeneration(); - } - } +using NServiceBus; +using NServiceBus.Faults; +using NServiceBus.Faults.NHibernate; + +namespace MyClient +{ + public class EndpointConfig : IConfigureThisEndpoint, AsA_Client {} + + public class ClientInit : IWantCustomInitialization + { + public void Init() + { + Configure.Instance.BinarySerializer() + .NHibernateFaultManagerWithSQLiteAndAutomaticSchemaGeneration(); + } + } } \ No newline at end of file diff --git a/Samples/FaultHandling/MyClient/MyClient.csproj b/Samples/FaultHandling/MyClient/MyClient.csproj index 1f6d89ca1de..6974b7d7768 100644 --- a/Samples/FaultHandling/MyClient/MyClient.csproj +++ b/Samples/FaultHandling/MyClient/MyClient.csproj @@ -1,96 +1,96 @@ - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {9F8E556C-0AFA-4C5D-B64F-AE9376ABF145} - library - Properties - MyClient - MyClient - - - - - - v4.0 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\binaries\log4net.dll - - - False - ..\..\..\lib\NHibernate.dll - - - False - ..\..\..\lib\NHibernate.ByteCode.LinFu.dll - - - False - ..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\binaries\NServiceBus.Core.dll - - - False - ..\..\..\binaries\NServiceBus.Host.exe - - - - - - - - - False - ..\..\..\lib\sqlite\System.Data.SQLite.dll - - - - - - - - - - - - - - - - - - {20F613ED-C871-477C-B1E4-48B96CACF794} - MyMessages - - - - - Program - $(ProjectDir)$(OutputPath)NServiceBus.Host.exe - + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {9F8E556C-0AFA-4C5D-B64F-AE9376ABF145} + library + Properties + MyClient + MyClient + + + + + + v4.0 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\binaries\log4net.dll + + + False + ..\..\..\lib\NHibernate.dll + + + False + ..\..\..\lib\NHibernate.ByteCode.LinFu.dll + + + False + ..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\binaries\NServiceBus.Core.dll + + + False + ..\..\..\binaries\NServiceBus.Host.exe + + + + + + + + + False + ..\..\..\lib\sqlite\System.Data.SQLite.dll + + + + + + + + + + + + + + + + + + {20F613ED-C871-477C-B1E4-48B96CACF794} + MyMessages + + + + + Program + $(ProjectDir)$(OutputPath)NServiceBus.Host.exe + \ No newline at end of file diff --git a/Samples/FaultHandling/MyMessages/Messages.cs b/Samples/FaultHandling/MyMessages/Messages.cs index 58789bee785..bc033571ee4 100644 --- a/Samples/FaultHandling/MyMessages/Messages.cs +++ b/Samples/FaultHandling/MyMessages/Messages.cs @@ -1,17 +1,17 @@ -using NServiceBus; -using System; - -namespace MyMessages -{ - [Serializable] - public class RequestDataMessage : IMessage - { - public bool Fault { get; set; } - } - - [Serializable] - public class DataResponseMessage : IMessage - { - public bool Fault { get; set; } - } -} +using NServiceBus; +using System; + +namespace MyMessages +{ + [Serializable] + public class RequestDataMessage : IMessage + { + public bool Fault { get; set; } + } + + [Serializable] + public class DataResponseMessage : IMessage + { + public bool Fault { get; set; } + } +} diff --git a/Samples/FaultHandling/MyMessages/MyMessages.csproj b/Samples/FaultHandling/MyMessages/MyMessages.csproj index 23217bbc9f7..c83f5a24dd7 100644 --- a/Samples/FaultHandling/MyMessages/MyMessages.csproj +++ b/Samples/FaultHandling/MyMessages/MyMessages.csproj @@ -1,60 +1,60 @@ - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {20F613ED-C871-477C-B1E4-48B96CACF794} - Library - Properties - MyMessages - MyMessages - - - - - - v4.0 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\binaries\NServiceBus.dll - - - - - - - - - - - - - - + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {20F613ED-C871-477C-B1E4-48B96CACF794} + Library + Properties + MyMessages + MyMessages + + + + + + v4.0 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\binaries\NServiceBus.dll + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Samples/FaultHandling/MyServer/App.config b/Samples/FaultHandling/MyServer/App.config index 5c9cf4c917c..4b0b48c25ab 100644 --- a/Samples/FaultHandling/MyServer/App.config +++ b/Samples/FaultHandling/MyServer/App.config @@ -1,27 +1,27 @@ - - - -
-
- - - - - - - - - - - - + + + +
+
+ + + + + + + + + + + + diff --git a/Samples/FaultHandling/MyServer/EndpointConfig.cs b/Samples/FaultHandling/MyServer/EndpointConfig.cs index 7290982f48c..ddd47fc0496 100644 --- a/Samples/FaultHandling/MyServer/EndpointConfig.cs +++ b/Samples/FaultHandling/MyServer/EndpointConfig.cs @@ -1,15 +1,15 @@ -using NServiceBus; - -namespace MyServer -{ - public class EndpointConfig : IConfigureThisEndpoint, AsA_Server {} - - public class ServerInit : IWantCustomInitialization - { - public void Init() - { - Configure.Instance.BinarySerializer() - .NHibernateFaultManagerWithSQLiteAndAutomaticSchemaGeneration(); - } - } +using NServiceBus; + +namespace MyServer +{ + public class EndpointConfig : IConfigureThisEndpoint, AsA_Server {} + + public class ServerInit : IWantCustomInitialization + { + public void Init() + { + Configure.Instance.BinarySerializer() + .NHibernateFaultManagerWithSQLiteAndAutomaticSchemaGeneration(); + } + } } \ No newline at end of file diff --git a/Samples/FaultHandling/MyServer/MyServer.csproj b/Samples/FaultHandling/MyServer/MyServer.csproj index 8f73a739283..da950faffa4 100644 --- a/Samples/FaultHandling/MyServer/MyServer.csproj +++ b/Samples/FaultHandling/MyServer/MyServer.csproj @@ -1,83 +1,83 @@ - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6} - library - Properties - MyServer - MyServer - - - - - - v4.0 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\binaries\log4net.dll - - - False - ..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\binaries\NServiceBus.Host.exe - - - False - ..\..\..\binaries\NServiceBus.Core.dll - - - - - - - - False - ..\..\..\lib\sqlite\System.Data.SQLite.dll - - - - - - - - - - - - - - {20F613ED-C871-477C-B1E4-48B96CACF794} - MyMessages - - - - - Program - $(ProjectDir)$(OutputPath)NServiceBus.Host.exe - + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6} + library + Properties + MyServer + MyServer + + + + + + v4.0 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\binaries\log4net.dll + + + False + ..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\binaries\NServiceBus.Host.exe + + + False + ..\..\..\binaries\NServiceBus.Core.dll + + + + + + + + False + ..\..\..\lib\sqlite\System.Data.SQLite.dll + + + + + + + + + + + + + + {20F613ED-C871-477C-B1E4-48B96CACF794} + MyMessages + + + + + Program + $(ProjectDir)$(OutputPath)NServiceBus.Host.exe + \ No newline at end of file diff --git a/Samples/FaultHandling/MyServer/RequestDataMessageHandler.cs b/Samples/FaultHandling/MyServer/RequestDataMessageHandler.cs index 869f6049986..d6299df55a0 100644 --- a/Samples/FaultHandling/MyServer/RequestDataMessageHandler.cs +++ b/Samples/FaultHandling/MyServer/RequestDataMessageHandler.cs @@ -1,29 +1,29 @@ -using System; -using MyMessages; -using NServiceBus; - -namespace MyServer -{ - public class RequestDataMessageHandler : IHandleMessages - { - private static readonly Random _random = new Random(); - - public IBus Bus { get; set; } - - public void Handle(RequestDataMessage message) - { - if (message.Fault) - { - Console.WriteLine("Fault message: throwing exception"); - throw new Exception(); - } - Bus.Reply(new DataResponseMessage { Fault = Fault() }); - Console.WriteLine("Message processed"); - } - - private static bool Fault() - { - return _random.Next(2) == 0; - } - } -} +using System; +using MyMessages; +using NServiceBus; + +namespace MyServer +{ + public class RequestDataMessageHandler : IHandleMessages + { + private static readonly Random _random = new Random(); + + public IBus Bus { get; set; } + + public void Handle(RequestDataMessage message) + { + if (message.Fault) + { + Console.WriteLine("Fault message: throwing exception"); + throw new Exception(); + } + Bus.Reply(new DataResponseMessage { Fault = Fault() }); + Console.WriteLine("Message processed"); + } + + private static bool Fault() + { + return _random.Next(2) == 0; + } + } +} diff --git a/Samples/FtpSample/FtpSample.sln b/Samples/FtpSample/FtpSample.sln index a42c021c2f9..c2f98be01cc 100644 --- a/Samples/FtpSample/FtpSample.sln +++ b/Samples/FtpSample/FtpSample.sln @@ -1,32 +1,32 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestClient", "TestClient\TestClient.csproj", "{75A2117A-2443-4677-88A1-88974C8F9A3C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestMessage", "TestMessage\TestMessage.csproj", "{33C480C2-37B9-4772-809A-9E4B522F1574}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestServer", "TestServer\TestServer.csproj", "{5FE8070B-D216-4C83-A05C-BEFAA90538E1}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {75A2117A-2443-4677-88A1-88974C8F9A3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {75A2117A-2443-4677-88A1-88974C8F9A3C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {75A2117A-2443-4677-88A1-88974C8F9A3C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {75A2117A-2443-4677-88A1-88974C8F9A3C}.Release|Any CPU.Build.0 = Release|Any CPU - {33C480C2-37B9-4772-809A-9E4B522F1574}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {33C480C2-37B9-4772-809A-9E4B522F1574}.Debug|Any CPU.Build.0 = Debug|Any CPU - {33C480C2-37B9-4772-809A-9E4B522F1574}.Release|Any CPU.ActiveCfg = Release|Any CPU - {33C480C2-37B9-4772-809A-9E4B522F1574}.Release|Any CPU.Build.0 = Release|Any CPU - {5FE8070B-D216-4C83-A05C-BEFAA90538E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5FE8070B-D216-4C83-A05C-BEFAA90538E1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5FE8070B-D216-4C83-A05C-BEFAA90538E1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5FE8070B-D216-4C83-A05C-BEFAA90538E1}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestClient", "TestClient\TestClient.csproj", "{75A2117A-2443-4677-88A1-88974C8F9A3C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestMessage", "TestMessage\TestMessage.csproj", "{33C480C2-37B9-4772-809A-9E4B522F1574}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestServer", "TestServer\TestServer.csproj", "{5FE8070B-D216-4C83-A05C-BEFAA90538E1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {75A2117A-2443-4677-88A1-88974C8F9A3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {75A2117A-2443-4677-88A1-88974C8F9A3C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {75A2117A-2443-4677-88A1-88974C8F9A3C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {75A2117A-2443-4677-88A1-88974C8F9A3C}.Release|Any CPU.Build.0 = Release|Any CPU + {33C480C2-37B9-4772-809A-9E4B522F1574}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {33C480C2-37B9-4772-809A-9E4B522F1574}.Debug|Any CPU.Build.0 = Debug|Any CPU + {33C480C2-37B9-4772-809A-9E4B522F1574}.Release|Any CPU.ActiveCfg = Release|Any CPU + {33C480C2-37B9-4772-809A-9E4B522F1574}.Release|Any CPU.Build.0 = Release|Any CPU + {5FE8070B-D216-4C83-A05C-BEFAA90538E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5FE8070B-D216-4C83-A05C-BEFAA90538E1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5FE8070B-D216-4C83-A05C-BEFAA90538E1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5FE8070B-D216-4C83-A05C-BEFAA90538E1}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Samples/FtpSample/TestClient/App.config b/Samples/FtpSample/TestClient/App.config index aeeb5e3f27a..ed9aed28c81 100644 --- a/Samples/FtpSample/TestClient/App.config +++ b/Samples/FtpSample/TestClient/App.config @@ -1,28 +1,28 @@ - - - -
-
-
- - - - - - - - - - - + + + +
+
+
+ + + + + + + + + + + \ No newline at end of file diff --git a/Samples/FtpSample/TestClient/ClientEndpoint.cs b/Samples/FtpSample/TestClient/ClientEndpoint.cs index 7f3ba2e383b..a7cbf054208 100644 --- a/Samples/FtpSample/TestClient/ClientEndpoint.cs +++ b/Samples/FtpSample/TestClient/ClientEndpoint.cs @@ -1,42 +1,42 @@ -using System; -using NServiceBus; -using TestMessage; - -namespace TestClient -{ - public class ClientEndpoint : IWantToRunAtStartup - { - public IBus Bus { get; set; } - - #region IWantToRunAtStartup Members - - public void Run() - { - while (true) - { - Console.WriteLine("\n\nEnter ID: "); - String id = Console.ReadLine(); - - Console.WriteLine("Enter Name: "); - String name = Console.ReadLine(); - - var msg = new FtpMessage(); - msg.ID = Int32.Parse(id); - msg.Name = name; - - - this.Bus.Send(msg).Register(t => Console.WriteLine("Reply Received: " + t.OtherData.ToString())); - Console.ReadLine(); - } - - - } - - public void Stop() - { - - } - - #endregion - } -} +using System; +using NServiceBus; +using TestMessage; + +namespace TestClient +{ + public class ClientEndpoint : IWantToRunAtStartup + { + public IBus Bus { get; set; } + + #region IWantToRunAtStartup Members + + public void Run() + { + while (true) + { + Console.WriteLine("\n\nEnter ID: "); + String id = Console.ReadLine(); + + Console.WriteLine("Enter Name: "); + String name = Console.ReadLine(); + + var msg = new FtpMessage(); + msg.ID = Int32.Parse(id); + msg.Name = name; + + + this.Bus.Send(msg).Register(t => Console.WriteLine("Reply Received: " + t.OtherData.ToString())); + Console.ReadLine(); + } + + + } + + public void Stop() + { + + } + + #endregion + } +} diff --git a/Samples/FtpSample/TestClient/EndpointConfig.cs b/Samples/FtpSample/TestClient/EndpointConfig.cs index d30d7f15b4c..8f0f9eabdea 100644 --- a/Samples/FtpSample/TestClient/EndpointConfig.cs +++ b/Samples/FtpSample/TestClient/EndpointConfig.cs @@ -1,23 +1,23 @@ -using NServiceBus; - -namespace TestClient -{ - public class EndpointConfig : IWantCustomInitialization, IConfigureThisEndpoint - { - #region IWantCustomInitialization Members - - public void Init() - { - Configure.With() - .DefaultBuilder() - .FtpTransport() - .UnicastBus() - .LoadMessageHandlers(); - - - - } - - #endregion - } -} +using NServiceBus; + +namespace TestClient +{ + public class EndpointConfig : IWantCustomInitialization, IConfigureThisEndpoint + { + #region IWantCustomInitialization Members + + public void Init() + { + Configure.With() + .DefaultBuilder() + .FtpTransport() + .UnicastBus() + .LoadMessageHandlers(); + + + + } + + #endregion + } +} diff --git a/Samples/FtpSample/TestClient/Properties/AssemblyInfo.cs b/Samples/FtpSample/TestClient/Properties/AssemblyInfo.cs index 7831d56aef0..cfdb684f77a 100644 --- a/Samples/FtpSample/TestClient/Properties/AssemblyInfo.cs +++ b/Samples/FtpSample/TestClient/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("TestClient")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("TestClient")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2010")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("2a29ab6e-948f-4652-be70-fe679c6d5e34")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("TestClient")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("TestClient")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2010")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("2a29ab6e-948f-4652-be70-fe679c6d5e34")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/FtpSample/TestClient/TestClient.csproj b/Samples/FtpSample/TestClient/TestClient.csproj index 47074a42ea0..f606ea11239 100644 --- a/Samples/FtpSample/TestClient/TestClient.csproj +++ b/Samples/FtpSample/TestClient/TestClient.csproj @@ -1,83 +1,83 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {75A2117A-2443-4677-88A1-88974C8F9A3C} - Library - Properties - TestClient - TestClient - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\binaries\log4net.dll - - - False - ..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\binaries\NServiceBus.Core.dll - - - False - .exe - ..\..\..\binaries\NServiceBus.Host.exe - - - - - - - - - - - - - - - - - Designer - - - - - {33C480C2-37B9-4772-809A-9E4B522F1574} - TestMessage - - - - + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {75A2117A-2443-4677-88A1-88974C8F9A3C} + Library + Properties + TestClient + TestClient + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\binaries\log4net.dll + + + False + ..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\binaries\NServiceBus.Core.dll + + + False + .exe + ..\..\..\binaries\NServiceBus.Host.exe + + + + + + + + + + + + + + + + + Designer + + + + + {33C480C2-37B9-4772-809A-9E4B522F1574} + TestMessage + + + + \ No newline at end of file diff --git a/Samples/FtpSample/TestClient/TestClient.csproj.user b/Samples/FtpSample/TestClient/TestClient.csproj.user index cda12e00456..13aa0ab11ba 100644 --- a/Samples/FtpSample/TestClient/TestClient.csproj.user +++ b/Samples/FtpSample/TestClient/TestClient.csproj.user @@ -1,7 +1,7 @@ - - - - Program - C:\dev\NServiceBus\trunk\Samples\FtpSample\TestClient\bin\Debug\NServiceBus.Host.exe - + + + + Program + C:\dev\NServiceBus\trunk\Samples\FtpSample\TestClient\bin\Debug\NServiceBus.Host.exe + \ No newline at end of file diff --git a/Samples/FtpSample/TestMessage/FtpMessage.cs b/Samples/FtpSample/TestMessage/FtpMessage.cs index 3c110b2594c..94afcd312e8 100644 --- a/Samples/FtpSample/TestMessage/FtpMessage.cs +++ b/Samples/FtpSample/TestMessage/FtpMessage.cs @@ -1,16 +1,16 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using NServiceBus; - -namespace TestMessage -{ - [Serializable] - public class FtpMessage : IMessage - { - public int ID { get; set; } - - public String Name { get; set; } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using NServiceBus; + +namespace TestMessage +{ + [Serializable] + public class FtpMessage : IMessage + { + public int ID { get; set; } + + public String Name { get; set; } + } +} diff --git a/Samples/FtpSample/TestMessage/FtpReply.cs b/Samples/FtpSample/TestMessage/FtpReply.cs index 22649d3d179..3262a243e39 100644 --- a/Samples/FtpSample/TestMessage/FtpReply.cs +++ b/Samples/FtpSample/TestMessage/FtpReply.cs @@ -1,17 +1,17 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using NServiceBus; - -namespace TestMessage -{ - [Serializable] - public class FtpReply : IMessage - { - public int ID { get; set; } - public Guid OtherData { get; set; } - public bool IsThisCool { get; set; } - public String Description { get; set; } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using NServiceBus; + +namespace TestMessage +{ + [Serializable] + public class FtpReply : IMessage + { + public int ID { get; set; } + public Guid OtherData { get; set; } + public bool IsThisCool { get; set; } + public String Description { get; set; } + } +} diff --git a/Samples/FtpSample/TestMessage/Properties/AssemblyInfo.cs b/Samples/FtpSample/TestMessage/Properties/AssemblyInfo.cs index 9ed2869c3e1..e871c966bb4 100644 --- a/Samples/FtpSample/TestMessage/Properties/AssemblyInfo.cs +++ b/Samples/FtpSample/TestMessage/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("TestMessage")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("TestMessage")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2010")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("cf83e5e7-c90e-43eb-9e48-5cfa2a982fd6")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("TestMessage")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("TestMessage")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2010")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("cf83e5e7-c90e-43eb-9e48-5cfa2a982fd6")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/FtpSample/TestMessage/TestMessage.csproj b/Samples/FtpSample/TestMessage/TestMessage.csproj index af3ab28abd6..384eb9047ab 100644 --- a/Samples/FtpSample/TestMessage/TestMessage.csproj +++ b/Samples/FtpSample/TestMessage/TestMessage.csproj @@ -1,59 +1,59 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {33C480C2-37B9-4772-809A-9E4B522F1574} - Library - Properties - TestMessage - TestMessage - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\binaries\NServiceBus.dll - - - - - - - - - - - - - - - - + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {33C480C2-37B9-4772-809A-9E4B522F1574} + Library + Properties + TestMessage + TestMessage + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\binaries\NServiceBus.dll + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Samples/FtpSample/TestServer/App.config b/Samples/FtpSample/TestServer/App.config index 3fe64bc6cb6..8f80249fa20 100644 --- a/Samples/FtpSample/TestServer/App.config +++ b/Samples/FtpSample/TestServer/App.config @@ -1,33 +1,33 @@ - - - -
-
-
- - - - - - - - - - - - + + + +
+
+
+ + + + + + + + + + + + \ No newline at end of file diff --git a/Samples/FtpSample/TestServer/EndpointConfig.cs b/Samples/FtpSample/TestServer/EndpointConfig.cs index 9130a2e75a0..9325b9b700b 100644 --- a/Samples/FtpSample/TestServer/EndpointConfig.cs +++ b/Samples/FtpSample/TestServer/EndpointConfig.cs @@ -1,21 +1,21 @@ -using System; -using NServiceBus; - -namespace TestServer -{ - public class EndpointConfig : IConfigureThisEndpoint, IWantCustomInitialization - { - #region IWantCustomInitialization Members - - public void Init() - { - Configure.With() - .DefaultBuilder() - .FtpTransport() - .UnicastBus() - .LoadMessageHandlers(); - } - - #endregion - } -} +using System; +using NServiceBus; + +namespace TestServer +{ + public class EndpointConfig : IConfigureThisEndpoint, IWantCustomInitialization + { + #region IWantCustomInitialization Members + + public void Init() + { + Configure.With() + .DefaultBuilder() + .FtpTransport() + .UnicastBus() + .LoadMessageHandlers(); + } + + #endregion + } +} diff --git a/Samples/FtpSample/TestServer/FtpMessageHandler.cs b/Samples/FtpSample/TestServer/FtpMessageHandler.cs index 86bd34644b5..cb86a2bc280 100644 --- a/Samples/FtpSample/TestServer/FtpMessageHandler.cs +++ b/Samples/FtpSample/TestServer/FtpMessageHandler.cs @@ -1,29 +1,29 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using NServiceBus; -using TestMessage; - -namespace TestServer -{ - public class FtpMessageHandler : IMessageHandler - { - public IBus Bus { get; set; } - - #region IMessageHandler Members - - public void Handle(TestMessage.FtpMessage message) - { - Console.WriteLine("Message Received With The Following\n\n"); - - Console.WriteLine("ID: " + message.ID.ToString()); - Console.WriteLine("Name: " + message.Name); - - FtpReply rep = new FtpReply { ID = 500, OtherData = Guid.NewGuid(), IsThisCool = true, Description = "What the?" }; - this.Bus.Reply(rep); - } - - #endregion - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using NServiceBus; +using TestMessage; + +namespace TestServer +{ + public class FtpMessageHandler : IMessageHandler + { + public IBus Bus { get; set; } + + #region IMessageHandler Members + + public void Handle(TestMessage.FtpMessage message) + { + Console.WriteLine("Message Received With The Following\n\n"); + + Console.WriteLine("ID: " + message.ID.ToString()); + Console.WriteLine("Name: " + message.Name); + + FtpReply rep = new FtpReply { ID = 500, OtherData = Guid.NewGuid(), IsThisCool = true, Description = "What the?" }; + this.Bus.Reply(rep); + } + + #endregion + } +} diff --git a/Samples/FtpSample/TestServer/Properties/AssemblyInfo.cs b/Samples/FtpSample/TestServer/Properties/AssemblyInfo.cs index b3e0abaab0b..19ec4a9194b 100644 --- a/Samples/FtpSample/TestServer/Properties/AssemblyInfo.cs +++ b/Samples/FtpSample/TestServer/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("TestServer")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("TestServer")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2010")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("d1497bc7-3c15-470e-b070-d1f6321d975f")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("TestServer")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("TestServer")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2010")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("d1497bc7-3c15-470e-b070-d1f6321d975f")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/FtpSample/TestServer/TestServer.csproj b/Samples/FtpSample/TestServer/TestServer.csproj index ec4e9f0fbb9..97bc64b13a6 100644 --- a/Samples/FtpSample/TestServer/TestServer.csproj +++ b/Samples/FtpSample/TestServer/TestServer.csproj @@ -1,81 +1,81 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {5FE8070B-D216-4C83-A05C-BEFAA90538E1} - Library - Properties - TestServer - TestServer - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\binaries\log4net.dll - - - False - ..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\binaries\NServiceBus.Core.dll - - - False - .exe - ..\..\..\binaries\NServiceBus.Host.exe - - - - - - - - - - - - - - - - - {33C480C2-37B9-4772-809A-9E4B522F1574} - TestMessage - - - - - - - + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {5FE8070B-D216-4C83-A05C-BEFAA90538E1} + Library + Properties + TestServer + TestServer + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\binaries\log4net.dll + + + False + ..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\binaries\NServiceBus.Core.dll + + + False + .exe + ..\..\..\binaries\NServiceBus.Host.exe + + + + + + + + + + + + + + + + + {33C480C2-37B9-4772-809A-9E4B522F1574} + TestMessage + + + + + + + \ No newline at end of file diff --git a/Samples/FtpSample/TestServer/TestServer.csproj.user b/Samples/FtpSample/TestServer/TestServer.csproj.user index e573255d2b3..5c2f98f62c7 100644 --- a/Samples/FtpSample/TestServer/TestServer.csproj.user +++ b/Samples/FtpSample/TestServer/TestServer.csproj.user @@ -1,7 +1,7 @@ - - - - Program - C:\dev\NServiceBus\trunk\Samples\FtpSample\TestServer\bin\Debug\NServiceBus.Host.exe - + + + + Program + C:\dev\NServiceBus\trunk\Samples\FtpSample\TestServer\bin\Debug\NServiceBus.Host.exe + \ No newline at end of file diff --git a/Samples/FullDuplex/MyClient/App.config b/Samples/FullDuplex/MyClient/App.config index ad695b66980..2afceb97455 100644 --- a/Samples/FullDuplex/MyClient/App.config +++ b/Samples/FullDuplex/MyClient/App.config @@ -1,23 +1,23 @@ - - - -
-
- - - - - - - - - - - - - - - + + + +
+
+ + + + + + + + + + + + + + + diff --git a/Samples/FullDuplex/MyClient/ClientEndpoint.cs b/Samples/FullDuplex/MyClient/ClientEndpoint.cs index cf83982c600..87e8286c9c6 100644 --- a/Samples/FullDuplex/MyClient/ClientEndpoint.cs +++ b/Samples/FullDuplex/MyClient/ClientEndpoint.cs @@ -1,52 +1,52 @@ -using System; -using System.Diagnostics; -using NServiceBus; -using MyMessages; - -namespace MyClient -{ - public class ClientEndpoint : IWantToRunAtStartup - { - public IBus Bus { get; set; } - - public void Run() - { - Console.WriteLine("Press 'Enter' to send a message.To exit, Ctrl + C"); - - while (Console.ReadLine() != null) - { - Guid g = Guid.NewGuid(); - - Console.WriteLine("=========================================================================="); - Console.WriteLine("Requesting to get data by id: {0}", g.ToString("N")); - - Bus.OutgoingHeaders["Test"] = g.ToString("N"); - - var watch = new Stopwatch(); - watch.Start(); - Bus.Send(m => - { - m.DataId = g; - m.String = "it's my \"node\" & i like it"; - }) - .Register(i => - { - Console.WriteLine("=========================================================================="); - Console.WriteLine( - "Response with header 'Test' = {0}, 1 = {1}, 2 = {2}.", - Bus.CurrentMessageContext.Headers["Test"], - Bus.CurrentMessageContext.Headers["1"], - Bus.CurrentMessageContext.Headers["2"]); - }); - - watch.Stop(); - - Console.WriteLine("Elapsed time: {0}", watch.ElapsedMilliseconds); - } - } - - public void Stop() - { - } - } -} +using System; +using System.Diagnostics; +using NServiceBus; +using MyMessages; + +namespace MyClient +{ + public class ClientEndpoint : IWantToRunAtStartup + { + public IBus Bus { get; set; } + + public void Run() + { + Console.WriteLine("Press 'Enter' to send a message.To exit, Ctrl + C"); + + while (Console.ReadLine() != null) + { + Guid g = Guid.NewGuid(); + + Console.WriteLine("=========================================================================="); + Console.WriteLine("Requesting to get data by id: {0}", g.ToString("N")); + + Bus.OutgoingHeaders["Test"] = g.ToString("N"); + + var watch = new Stopwatch(); + watch.Start(); + Bus.Send(m => + { + m.DataId = g; + m.String = "it's my \"node\" & i like it"; + }) + .Register(i => + { + Console.WriteLine("=========================================================================="); + Console.WriteLine( + "Response with header 'Test' = {0}, 1 = {1}, 2 = {2}.", + Bus.CurrentMessageContext.Headers["Test"], + Bus.CurrentMessageContext.Headers["1"], + Bus.CurrentMessageContext.Headers["2"]); + }); + + watch.Stop(); + + Console.WriteLine("Elapsed time: {0}", watch.ElapsedMilliseconds); + } + } + + public void Stop() + { + } + } +} diff --git a/Samples/FullDuplex/MyClient/DataResponseMessageHandler.cs b/Samples/FullDuplex/MyClient/DataResponseMessageHandler.cs index f707d30831e..efe0e5abd21 100644 --- a/Samples/FullDuplex/MyClient/DataResponseMessageHandler.cs +++ b/Samples/FullDuplex/MyClient/DataResponseMessageHandler.cs @@ -1,23 +1,23 @@ -using System; -using MyMessages; -using NServiceBus; - -namespace MyClient -{ - class DataResponseMessageHandler : IHandleMessages - { - public void Handle(DataResponseMessage message) - { - Console.WriteLine("Response received with description: {0}", message.String); - } - } - - public class PreventSubscription : IWantCustomInitialization - { - public void Init() - { - //so we don't end up subscribing to DataResponseMessage - Configure.Instance.UnicastBus().DoNotAutoSubscribe(); - } - } -} +using System; +using MyMessages; +using NServiceBus; + +namespace MyClient +{ + class DataResponseMessageHandler : IHandleMessages + { + public void Handle(DataResponseMessage message) + { + Console.WriteLine("Response received with description: {0}", message.String); + } + } + + public class PreventSubscription : IWantCustomInitialization + { + public void Init() + { + //so we don't end up subscribing to DataResponseMessage + Configure.Instance.UnicastBus().DoNotAutoSubscribe(); + } + } +} diff --git a/Samples/FullDuplex/MyClient/EndpointConfig.cs b/Samples/FullDuplex/MyClient/EndpointConfig.cs index a74f29a8736..4adb27b055a 100644 --- a/Samples/FullDuplex/MyClient/EndpointConfig.cs +++ b/Samples/FullDuplex/MyClient/EndpointConfig.cs @@ -1,6 +1,6 @@ -using NServiceBus; - -namespace MyClient -{ - public class EndpointConfig : IConfigureThisEndpoint, AsA_Client {} +using NServiceBus; + +namespace MyClient +{ + public class EndpointConfig : IConfigureThisEndpoint, AsA_Client {} } \ No newline at end of file diff --git a/Samples/FullDuplex/MyClient/MyClient.csproj b/Samples/FullDuplex/MyClient/MyClient.csproj index 470364ef337..47e00a37720 100644 --- a/Samples/FullDuplex/MyClient/MyClient.csproj +++ b/Samples/FullDuplex/MyClient/MyClient.csproj @@ -1,81 +1,81 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {9F8E556C-0AFA-4C5D-B64F-AE9376ABF145} - library - Properties - MyClient - MyClient - - - - - - v4.0 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\binaries\log4net.dll - - - False - ..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\binaries\NServiceBus.Core.dll - - - False - ..\..\..\binaries\NServiceBus.Host.exe - - - - - - - - - - - - - - - - - - - {20F613ED-C871-477C-B1E4-48B96CACF794} - MyMessages - - - - - Program - $(ProjectDir)$(OutputPath)NServiceBus.Host.exe - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {9F8E556C-0AFA-4C5D-B64F-AE9376ABF145} + library + Properties + MyClient + MyClient + + + + + + v4.0 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\binaries\log4net.dll + + + False + ..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\binaries\NServiceBus.Core.dll + + + False + ..\..\..\binaries\NServiceBus.Host.exe + + + + + + + + + + + + + + + + + + + {20F613ED-C871-477C-B1E4-48B96CACF794} + MyMessages + + + + + Program + $(ProjectDir)$(OutputPath)NServiceBus.Host.exe + \ No newline at end of file diff --git a/Samples/FullDuplex/MyClient/Properties/AssemblyInfo.cs b/Samples/FullDuplex/MyClient/Properties/AssemblyInfo.cs index 5fcd2e3965b..4f7be895ad8 100644 --- a/Samples/FullDuplex/MyClient/Properties/AssemblyInfo.cs +++ b/Samples/FullDuplex/MyClient/Properties/AssemblyInfo.cs @@ -1,33 +1,33 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("MyClient")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("MyClient")] -[assembly: AssemblyCopyright("Copyright © 2007")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("9354e6a9-a8e5-4017-a67b-fd5075bd3941")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("MyClient")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("MyClient")] +[assembly: AssemblyCopyright("Copyright © 2007")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("9354e6a9-a8e5-4017-a67b-fd5075bd3941")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/FullDuplex/MyMessages/Messages.cs b/Samples/FullDuplex/MyMessages/Messages.cs index e6e83c3cd28..c32ddf47a19 100644 --- a/Samples/FullDuplex/MyMessages/Messages.cs +++ b/Samples/FullDuplex/MyMessages/Messages.cs @@ -1,17 +1,17 @@ -using NServiceBus; -using System; - -namespace MyMessages -{ - public class RequestDataMessage : IMessage - { - public Guid DataId { get; set; } - public string String { get; set; } - } - - public class DataResponseMessage : IMessage - { - public Guid DataId { get; set; } - public string String { get; set; } - } -} +using NServiceBus; +using System; + +namespace MyMessages +{ + public class RequestDataMessage : IMessage + { + public Guid DataId { get; set; } + public string String { get; set; } + } + + public class DataResponseMessage : IMessage + { + public Guid DataId { get; set; } + public string String { get; set; } + } +} diff --git a/Samples/FullDuplex/MyMessages/MyMessages.csproj b/Samples/FullDuplex/MyMessages/MyMessages.csproj index 420e447d985..2a479a61f1c 100644 --- a/Samples/FullDuplex/MyMessages/MyMessages.csproj +++ b/Samples/FullDuplex/MyMessages/MyMessages.csproj @@ -1,61 +1,61 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {20F613ED-C871-477C-B1E4-48B96CACF794} - Library - Properties - MyMessages - MyMessages - - - - - - v4.0 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\binaries\NServiceBus.dll - - - - - - - - - - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {20F613ED-C871-477C-B1E4-48B96CACF794} + Library + Properties + MyMessages + MyMessages + + + + + + v4.0 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\binaries\NServiceBus.dll + + + + + + + + + + + + + \ No newline at end of file diff --git a/Samples/FullDuplex/MyMessages/Properties/AssemblyInfo.cs b/Samples/FullDuplex/MyMessages/Properties/AssemblyInfo.cs index 9cde7713a2b..983a52a727e 100644 --- a/Samples/FullDuplex/MyMessages/Properties/AssemblyInfo.cs +++ b/Samples/FullDuplex/MyMessages/Properties/AssemblyInfo.cs @@ -1,35 +1,35 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("MyMessages")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("MyMessages")] -[assembly: AssemblyCopyright("Copyright © 2007")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("5e94a240-87cd-470f-9633-adffc9532a22")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("MyMessages")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("MyMessages")] +[assembly: AssemblyCopyright("Copyright © 2007")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("5e94a240-87cd-470f-9633-adffc9532a22")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/FullDuplex/MyServer.Tests/App.config b/Samples/FullDuplex/MyServer.Tests/App.config index 3afecdf66eb..a1813d43653 100644 --- a/Samples/FullDuplex/MyServer.Tests/App.config +++ b/Samples/FullDuplex/MyServer.Tests/App.config @@ -1,6 +1,6 @@ - - - - - + + + + + \ No newline at end of file diff --git a/Samples/FullDuplex/MyServer.Tests/MyServer.Tests.csproj b/Samples/FullDuplex/MyServer.Tests/MyServer.Tests.csproj index 7785f114951..487ac2b2baa 100644 --- a/Samples/FullDuplex/MyServer.Tests/MyServer.Tests.csproj +++ b/Samples/FullDuplex/MyServer.Tests/MyServer.Tests.csproj @@ -1,82 +1,82 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {1AB56FB7-ADB3-40DF-BBF4-53BAAE9A8F6F} - Library - Properties - MyServer.Tests - MyServer.Tests - v4.0 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\binaries\NServiceBus.Testing.dll - - - False - ..\..\..\binaries\nunit.framework.dll - - - - - - - - - - - - - - - - - - {20F613ED-C871-477C-B1E4-48B96CACF794} - MyMessages - - - {CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6} - MyServer - - - - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {1AB56FB7-ADB3-40DF-BBF4-53BAAE9A8F6F} + Library + Properties + MyServer.Tests + MyServer.Tests + v4.0 + 512 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\binaries\NServiceBus.Testing.dll + + + False + ..\..\..\binaries\nunit.framework.dll + + + + + + + + + + + + + + + + + + {20F613ED-C871-477C-B1E4-48B96CACF794} + MyMessages + + + {CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6} + MyServer + + + + + + + \ No newline at end of file diff --git a/Samples/FullDuplex/MyServer.Tests/Properties/AssemblyInfo.cs b/Samples/FullDuplex/MyServer.Tests/Properties/AssemblyInfo.cs index 718beec67b4..ca5d33f025b 100644 --- a/Samples/FullDuplex/MyServer.Tests/Properties/AssemblyInfo.cs +++ b/Samples/FullDuplex/MyServer.Tests/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("MyServer.Tests")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("MyServer.Tests")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("cd60e9fe-4ab6-48ea-a0f8-24da38b13979")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("MyServer.Tests")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("MyServer.Tests")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("cd60e9fe-4ab6-48ea-a0f8-24da38b13979")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/FullDuplex/MyServer.Tests/Tests.cs b/Samples/FullDuplex/MyServer.Tests/Tests.cs index 38ce189a697..f7589853111 100644 --- a/Samples/FullDuplex/MyServer.Tests/Tests.cs +++ b/Samples/FullDuplex/MyServer.Tests/Tests.cs @@ -1,27 +1,27 @@ -using System; -using MyMessages; -using NUnit.Framework; -using NServiceBus.Testing; -using NServiceBus; - -namespace MyServer.Tests -{ - [TestFixture] - public class Tests - { - [Test] - public void TestHandler() - { - Test.Initialize(); - - var dataId = Guid.NewGuid(); - var str = "hello"; - WireEncryptedString secret = "secret"; - - Test.Handler() - .SetIncomingHeader("Test", "abc") - .ExpectReply(m => m.DataId == dataId && m.String == str) - .OnMessage(m => { m.DataId = dataId; m.String = str; }); - } - } -} +using System; +using MyMessages; +using NUnit.Framework; +using NServiceBus.Testing; +using NServiceBus; + +namespace MyServer.Tests +{ + [TestFixture] + public class Tests + { + [Test] + public void TestHandler() + { + Test.Initialize(); + + var dataId = Guid.NewGuid(); + var str = "hello"; + WireEncryptedString secret = "secret"; + + Test.Handler() + .SetIncomingHeader("Test", "abc") + .ExpectReply(m => m.DataId == dataId && m.String == str) + .OnMessage(m => { m.DataId = dataId; m.String = str; }); + } + } +} diff --git a/Samples/FullDuplex/MyServer/App.config b/Samples/FullDuplex/MyServer/App.config index 68e5ece5e83..cd97c49f971 100644 --- a/Samples/FullDuplex/MyServer/App.config +++ b/Samples/FullDuplex/MyServer/App.config @@ -1,22 +1,22 @@ - - - -
-
- - - - - - - - - - - - - - + + + +
+
+ + + + + + + + + + + + + + diff --git a/Samples/FullDuplex/MyServer/EndpointConfig.cs b/Samples/FullDuplex/MyServer/EndpointConfig.cs index 54c661ddf15..981dec52fb6 100644 --- a/Samples/FullDuplex/MyServer/EndpointConfig.cs +++ b/Samples/FullDuplex/MyServer/EndpointConfig.cs @@ -1,6 +1,6 @@ -using NServiceBus; - -namespace MyServer -{ - public class EndpointConfig : IConfigureThisEndpoint, AsA_Server {} +using NServiceBus; + +namespace MyServer +{ + public class EndpointConfig : IConfigureThisEndpoint, AsA_Server {} } \ No newline at end of file diff --git a/Samples/FullDuplex/MyServer/MyServer.csproj b/Samples/FullDuplex/MyServer/MyServer.csproj index f7864664981..3c5d766c91a 100644 --- a/Samples/FullDuplex/MyServer/MyServer.csproj +++ b/Samples/FullDuplex/MyServer/MyServer.csproj @@ -1,82 +1,82 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6} - library - Properties - MyServer - MyServer - - - - - - v4.0 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\binaries\log4net.dll - - - False - ..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\binaries\NServiceBus.Host.exe - - - False - ..\..\..\binaries\NServiceBus.Core.dll - - - - - - - - - - - - - - - Designer - - - - - {20F613ED-C871-477C-B1E4-48B96CACF794} - MyMessages - - - - - Program - $(ProjectDir)$(OutputPath)NServiceBus.Host.exe - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6} + library + Properties + MyServer + MyServer + + + + + + v4.0 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\binaries\log4net.dll + + + False + ..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\binaries\NServiceBus.Host.exe + + + False + ..\..\..\binaries\NServiceBus.Core.dll + + + + + + + + + + + + + + + Designer + + + + + {20F613ED-C871-477C-B1E4-48B96CACF794} + MyMessages + + + + + Program + $(ProjectDir)$(OutputPath)NServiceBus.Host.exe + \ No newline at end of file diff --git a/Samples/FullDuplex/MyServer/Properties/AssemblyInfo.cs b/Samples/FullDuplex/MyServer/Properties/AssemblyInfo.cs index 835ba543541..7299f493b44 100644 --- a/Samples/FullDuplex/MyServer/Properties/AssemblyInfo.cs +++ b/Samples/FullDuplex/MyServer/Properties/AssemblyInfo.cs @@ -1,33 +1,33 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("MyServer")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("MyServer")] -[assembly: AssemblyCopyright("Copyright © 2007")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("6d0a1864-1cf8-4f8a-90ae-bc3fda6179d9")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("MyServer")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("MyServer")] +[assembly: AssemblyCopyright("Copyright © 2007")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("6d0a1864-1cf8-4f8a-90ae-bc3fda6179d9")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/FullDuplex/MyServer/RequestDataMessageHandler.cs b/Samples/FullDuplex/MyServer/RequestDataMessageHandler.cs index 91970388afa..5daa57f66a1 100644 --- a/Samples/FullDuplex/MyServer/RequestDataMessageHandler.cs +++ b/Samples/FullDuplex/MyServer/RequestDataMessageHandler.cs @@ -1,36 +1,36 @@ -using System; -using System.Threading; -using log4net; -using MyMessages; -using NServiceBus; - -namespace MyServer -{ - public class RequestDataMessageHandler : IHandleMessages - { - public IBus Bus { get; set; } - - public void Handle(RequestDataMessage message) - { - Logger.Info("=========================================================================="); - Logger.InfoFormat("Received request {0}.", message.DataId); - Logger.InfoFormat("String received: {0}.", message.String); - Logger.InfoFormat("Header 'Test' = {0}.", message.GetHeader("Test")); - Logger.InfoFormat(Thread.CurrentPrincipal != null ? Thread.CurrentPrincipal.Identity.Name : string.Empty); - - var response = Bus.CreateInstance(m => - { - m.DataId = message.DataId; - m.String = message.String; - }); - - response.CopyHeaderFromRequest("Test"); - response.SetHeader("1", "1"); - response.SetHeader("2", "2"); - - Bus.Reply(response); //Try experimenting with sending multiple responses - } - - public static ILog Logger = LogManager.GetLogger("MyServer"); - } -} +using System; +using System.Threading; +using log4net; +using MyMessages; +using NServiceBus; + +namespace MyServer +{ + public class RequestDataMessageHandler : IHandleMessages + { + public IBus Bus { get; set; } + + public void Handle(RequestDataMessage message) + { + Logger.Info("=========================================================================="); + Logger.InfoFormat("Received request {0}.", message.DataId); + Logger.InfoFormat("String received: {0}.", message.String); + Logger.InfoFormat("Header 'Test' = {0}.", message.GetHeader("Test")); + Logger.InfoFormat(Thread.CurrentPrincipal != null ? Thread.CurrentPrincipal.Identity.Name : string.Empty); + + var response = Bus.CreateInstance(m => + { + m.DataId = message.DataId; + m.String = message.String; + }); + + response.CopyHeaderFromRequest("Test"); + response.SetHeader("1", "1"); + response.SetHeader("2", "2"); + + Bus.Reply(response); //Try experimenting with sending multiple responses + } + + public static ILog Logger = LogManager.GetLogger("MyServer"); + } +} diff --git a/Samples/FullDuplex/RequestResponse.sln b/Samples/FullDuplex/RequestResponse.sln index 238a73643a5..790abcfcc44 100644 --- a/Samples/FullDuplex/RequestResponse.sln +++ b/Samples/FullDuplex/RequestResponse.sln @@ -1,42 +1,42 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyClient", "MyClient\MyClient.csproj", "{9F8E556C-0AFA-4C5D-B64F-AE9376ABF145}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyServer", "MyServer\MyServer.csproj", "{CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyMessages", "MyMessages\MyMessages.csproj", "{20F613ED-C871-477C-B1E4-48B96CACF794}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyServer.Tests", "MyServer.Tests\MyServer.Tests.csproj", "{1AB56FB7-ADB3-40DF-BBF4-53BAAE9A8F6F}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {9F8E556C-0AFA-4C5D-B64F-AE9376ABF145}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9F8E556C-0AFA-4C5D-B64F-AE9376ABF145}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9F8E556C-0AFA-4C5D-B64F-AE9376ABF145}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9F8E556C-0AFA-4C5D-B64F-AE9376ABF145}.Release|Any CPU.Build.0 = Release|Any CPU - {CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6}.Release|Any CPU.Build.0 = Release|Any CPU - {20F613ED-C871-477C-B1E4-48B96CACF794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {20F613ED-C871-477C-B1E4-48B96CACF794}.Debug|Any CPU.Build.0 = Debug|Any CPU - {20F613ED-C871-477C-B1E4-48B96CACF794}.Release|Any CPU.ActiveCfg = Release|Any CPU - {20F613ED-C871-477C-B1E4-48B96CACF794}.Release|Any CPU.Build.0 = Release|Any CPU - {1AB56FB7-ADB3-40DF-BBF4-53BAAE9A8F6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1AB56FB7-ADB3-40DF-BBF4-53BAAE9A8F6F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1AB56FB7-ADB3-40DF-BBF4-53BAAE9A8F6F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1AB56FB7-ADB3-40DF-BBF4-53BAAE9A8F6F}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(SubversionScc) = preSolution - Svn-Managed = True - Manager = AnkhSVN - Subversion Support for Visual Studio - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyClient", "MyClient\MyClient.csproj", "{9F8E556C-0AFA-4C5D-B64F-AE9376ABF145}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyServer", "MyServer\MyServer.csproj", "{CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyMessages", "MyMessages\MyMessages.csproj", "{20F613ED-C871-477C-B1E4-48B96CACF794}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyServer.Tests", "MyServer.Tests\MyServer.Tests.csproj", "{1AB56FB7-ADB3-40DF-BBF4-53BAAE9A8F6F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9F8E556C-0AFA-4C5D-B64F-AE9376ABF145}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9F8E556C-0AFA-4C5D-B64F-AE9376ABF145}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9F8E556C-0AFA-4C5D-B64F-AE9376ABF145}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9F8E556C-0AFA-4C5D-B64F-AE9376ABF145}.Release|Any CPU.Build.0 = Release|Any CPU + {CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CA4DB5DB-88E3-45C2-92EC-ED1865FB83B6}.Release|Any CPU.Build.0 = Release|Any CPU + {20F613ED-C871-477C-B1E4-48B96CACF794}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {20F613ED-C871-477C-B1E4-48B96CACF794}.Debug|Any CPU.Build.0 = Debug|Any CPU + {20F613ED-C871-477C-B1E4-48B96CACF794}.Release|Any CPU.ActiveCfg = Release|Any CPU + {20F613ED-C871-477C-B1E4-48B96CACF794}.Release|Any CPU.Build.0 = Release|Any CPU + {1AB56FB7-ADB3-40DF-BBF4-53BAAE9A8F6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1AB56FB7-ADB3-40DF-BBF4-53BAAE9A8F6F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1AB56FB7-ADB3-40DF-BBF4-53BAAE9A8F6F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1AB56FB7-ADB3-40DF-BBF4-53BAAE9A8F6F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(SubversionScc) = preSolution + Svn-Managed = True + Manager = AnkhSVN - Subversion Support for Visual Studio + EndGlobalSection +EndGlobal diff --git a/Samples/GenericHost/GenericHost.sln b/Samples/GenericHost/GenericHost.sln index 786ad8194fe..3afaaca0351 100644 --- a/Samples/GenericHost/GenericHost.sln +++ b/Samples/GenericHost/GenericHost.sln @@ -1,32 +1,32 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Logging", "Logging\Logging.csproj", "{15E0163A-315E-4473-9BF3-DD9EA128EBD7}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoggingFromAppConfig", "LoggingFromAppConfig\LoggingFromAppConfig.csproj", "{2DA2522F-3567-4A2D-90A8-1A1AC98E6051}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoggingWithConfigurableThreshold", "LoggingWithConfigurableThreshold\LoggingWithConfigurableThreshold.csproj", "{3BF3849F-A0F5-4B9A-BB8F-12D4219F7787}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {15E0163A-315E-4473-9BF3-DD9EA128EBD7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {15E0163A-315E-4473-9BF3-DD9EA128EBD7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {15E0163A-315E-4473-9BF3-DD9EA128EBD7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {15E0163A-315E-4473-9BF3-DD9EA128EBD7}.Release|Any CPU.Build.0 = Release|Any CPU - {2DA2522F-3567-4A2D-90A8-1A1AC98E6051}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2DA2522F-3567-4A2D-90A8-1A1AC98E6051}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2DA2522F-3567-4A2D-90A8-1A1AC98E6051}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2DA2522F-3567-4A2D-90A8-1A1AC98E6051}.Release|Any CPU.Build.0 = Release|Any CPU - {3BF3849F-A0F5-4B9A-BB8F-12D4219F7787}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3BF3849F-A0F5-4B9A-BB8F-12D4219F7787}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3BF3849F-A0F5-4B9A-BB8F-12D4219F7787}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3BF3849F-A0F5-4B9A-BB8F-12D4219F7787}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Logging", "Logging\Logging.csproj", "{15E0163A-315E-4473-9BF3-DD9EA128EBD7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoggingFromAppConfig", "LoggingFromAppConfig\LoggingFromAppConfig.csproj", "{2DA2522F-3567-4A2D-90A8-1A1AC98E6051}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoggingWithConfigurableThreshold", "LoggingWithConfigurableThreshold\LoggingWithConfigurableThreshold.csproj", "{3BF3849F-A0F5-4B9A-BB8F-12D4219F7787}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {15E0163A-315E-4473-9BF3-DD9EA128EBD7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {15E0163A-315E-4473-9BF3-DD9EA128EBD7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {15E0163A-315E-4473-9BF3-DD9EA128EBD7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {15E0163A-315E-4473-9BF3-DD9EA128EBD7}.Release|Any CPU.Build.0 = Release|Any CPU + {2DA2522F-3567-4A2D-90A8-1A1AC98E6051}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2DA2522F-3567-4A2D-90A8-1A1AC98E6051}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2DA2522F-3567-4A2D-90A8-1A1AC98E6051}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2DA2522F-3567-4A2D-90A8-1A1AC98E6051}.Release|Any CPU.Build.0 = Release|Any CPU + {3BF3849F-A0F5-4B9A-BB8F-12D4219F7787}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3BF3849F-A0F5-4B9A-BB8F-12D4219F7787}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3BF3849F-A0F5-4B9A-BB8F-12D4219F7787}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3BF3849F-A0F5-4B9A-BB8F-12D4219F7787}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Samples/GenericHost/Logging/App.config b/Samples/GenericHost/Logging/App.config index 5bfbaa70c82..6d931192d5b 100644 --- a/Samples/GenericHost/Logging/App.config +++ b/Samples/GenericHost/Logging/App.config @@ -1,27 +1,27 @@ - - - -
-
- - - - - - - - - - - - - - + + + +
+
+ + + + + + + + + + + + + + diff --git a/Samples/GenericHost/Logging/Endpoint.cs b/Samples/GenericHost/Logging/Endpoint.cs index 092daa56ad0..5987cea7f0b 100644 --- a/Samples/GenericHost/Logging/Endpoint.cs +++ b/Samples/GenericHost/Logging/Endpoint.cs @@ -1,21 +1,21 @@ -using System; -using NServiceBus; - -namespace Logging -{ - /* In this sample, we want our own production logging while leaving the regular NServiceBus - configuration of the endpoint so we specify "Logging.MyProductionProfile" on the command line. - */ - - public class Endpoint : IConfigureThisEndpoint {} - - public class MyProductionProfile : Production {} - - public class MyProductionLogging : IConfigureLoggingForProfile - { - public void Configure(IConfigureThisEndpoint specifier) - { - Console.WriteLine("I'm going to do my custom logging setup in here using my own profile."); - } - } -} +using System; +using NServiceBus; + +namespace Logging +{ + /* In this sample, we want our own production logging while leaving the regular NServiceBus + configuration of the endpoint so we specify "Logging.MyProductionProfile" on the command line. + */ + + public class Endpoint : IConfigureThisEndpoint {} + + public class MyProductionProfile : Production {} + + public class MyProductionLogging : IConfigureLoggingForProfile + { + public void Configure(IConfigureThisEndpoint specifier) + { + Console.WriteLine("I'm going to do my custom logging setup in here using my own profile."); + } + } +} diff --git a/Samples/GenericHost/Logging/Logging.csproj b/Samples/GenericHost/Logging/Logging.csproj index 42e62197fbd..08f4b894fb0 100644 --- a/Samples/GenericHost/Logging/Logging.csproj +++ b/Samples/GenericHost/Logging/Logging.csproj @@ -1,76 +1,76 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {15E0163A-315E-4473-9BF3-DD9EA128EBD7} - Library - Properties - Logging - Logging - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\lib\log4net.dll - - - False - ..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\binaries\NServiceBus.Core.dll - - - False - ..\..\..\binaries\NServiceBus.Host.exe - - - - - - - - - - - - - - - - - - - - - - - - Program - $(ProjectDir)$(OutputPath)NServiceBus.Host.exe - Logging.MyProductionProfile - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {15E0163A-315E-4473-9BF3-DD9EA128EBD7} + Library + Properties + Logging + Logging + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\lib\log4net.dll + + + False + ..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\binaries\NServiceBus.Core.dll + + + False + ..\..\..\binaries\NServiceBus.Host.exe + + + + + + + + + + + + + + + + + + + + + + + + Program + $(ProjectDir)$(OutputPath)NServiceBus.Host.exe + Logging.MyProductionProfile + \ No newline at end of file diff --git a/Samples/GenericHost/Logging/Properties/AssemblyInfo.cs b/Samples/GenericHost/Logging/Properties/AssemblyInfo.cs index 12bf643e6e6..1047033dfaf 100644 --- a/Samples/GenericHost/Logging/Properties/AssemblyInfo.cs +++ b/Samples/GenericHost/Logging/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Logging")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("Logging")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("5e6efd52-16ac-440a-88bd-1c1ce449f08a")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Logging")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Logging")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("5e6efd52-16ac-440a-88bd-1c1ce449f08a")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/GenericHost/LoggingFromAppConfig/App.config b/Samples/GenericHost/LoggingFromAppConfig/App.config index b847adb9702..88d9a8c9755 100644 --- a/Samples/GenericHost/LoggingFromAppConfig/App.config +++ b/Samples/GenericHost/LoggingFromAppConfig/App.config @@ -1,45 +1,45 @@ - - - -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Samples/GenericHost/LoggingFromAppConfig/EndpointConfig.cs b/Samples/GenericHost/LoggingFromAppConfig/EndpointConfig.cs index 64dbea5ab6b..203fdcd7342 100644 --- a/Samples/GenericHost/LoggingFromAppConfig/EndpointConfig.cs +++ b/Samples/GenericHost/LoggingFromAppConfig/EndpointConfig.cs @@ -1,14 +1,14 @@ -using System; -using NServiceBus; - -namespace LoggingFromAppConfig -{ - public class EndpointConfig : IConfigureThisEndpoint, AsA_Client, IWantCustomLogging - { - public void Init() - { - Console.WriteLine("I'm using the logging configured in the app.config."); - NServiceBus.SetLoggingLibrary.Log4Net(log4net.Config.XmlConfigurator.Configure); - } - } -} +using System; +using NServiceBus; + +namespace LoggingFromAppConfig +{ + public class EndpointConfig : IConfigureThisEndpoint, AsA_Client, IWantCustomLogging + { + public void Init() + { + Console.WriteLine("I'm using the logging configured in the app.config."); + NServiceBus.SetLoggingLibrary.Log4Net(log4net.Config.XmlConfigurator.Configure); + } + } +} diff --git a/Samples/GenericHost/LoggingFromAppConfig/Logger.cs b/Samples/GenericHost/LoggingFromAppConfig/Logger.cs index 1656d70f555..810fa31bde8 100644 --- a/Samples/GenericHost/LoggingFromAppConfig/Logger.cs +++ b/Samples/GenericHost/LoggingFromAppConfig/Logger.cs @@ -1,19 +1,19 @@ -using NServiceBus; -using log4net; - -namespace LoggingFromAppConfig -{ - class Logger : IWantToRunAtStartup - { - public void Run() - { - Log.Debug("logging this."); - } - - public void Stop() - { - } - - private static readonly ILog Log = LogManager.GetLogger("Logger"); - } -} +using NServiceBus; +using log4net; + +namespace LoggingFromAppConfig +{ + class Logger : IWantToRunAtStartup + { + public void Run() + { + Log.Debug("logging this."); + } + + public void Stop() + { + } + + private static readonly ILog Log = LogManager.GetLogger("Logger"); + } +} diff --git a/Samples/GenericHost/LoggingFromAppConfig/LoggingFromAppConfig.csproj b/Samples/GenericHost/LoggingFromAppConfig/LoggingFromAppConfig.csproj index 8aba5c3a513..95e01a6944d 100644 --- a/Samples/GenericHost/LoggingFromAppConfig/LoggingFromAppConfig.csproj +++ b/Samples/GenericHost/LoggingFromAppConfig/LoggingFromAppConfig.csproj @@ -1,85 +1,85 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {2DA2522F-3567-4A2D-90A8-1A1AC98E6051} - Library - Properties - LoggingFromAppConfig - LoggingFromAppConfig - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\lib\log4net.dll - - - False - ..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\binaries\NServiceBus.Core.dll - - - False - ..\..\..\binaries\NServiceBus.Host.exe - - - - - - - - - - - - - - - - - - - - - - - - - Program - $(ProjectDir)$(OutputPath)NServiceBus.Host.exe - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {2DA2522F-3567-4A2D-90A8-1A1AC98E6051} + Library + Properties + LoggingFromAppConfig + LoggingFromAppConfig + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\lib\log4net.dll + + + False + ..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\binaries\NServiceBus.Core.dll + + + False + ..\..\..\binaries\NServiceBus.Host.exe + + + + + + + + + + + + + + + + + + + + + + + + + Program + $(ProjectDir)$(OutputPath)NServiceBus.Host.exe + + + + \ No newline at end of file diff --git a/Samples/GenericHost/LoggingFromAppConfig/Properties/AssemblyInfo.cs b/Samples/GenericHost/LoggingFromAppConfig/Properties/AssemblyInfo.cs index 65e36f94265..49612646c7e 100644 --- a/Samples/GenericHost/LoggingFromAppConfig/Properties/AssemblyInfo.cs +++ b/Samples/GenericHost/LoggingFromAppConfig/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("LoggingFromAppConfig")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("LoggingFromAppConfig")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("be81d417-c98e-401d-b8cc-e98f572f92c8")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("LoggingFromAppConfig")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("LoggingFromAppConfig")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("be81d417-c98e-401d-b8cc-e98f572f92c8")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/GenericHost/LoggingWithConfigurableThreshold/App.config b/Samples/GenericHost/LoggingWithConfigurableThreshold/App.config index 360f9e0b52e..9c29c5afa95 100644 --- a/Samples/GenericHost/LoggingWithConfigurableThreshold/App.config +++ b/Samples/GenericHost/LoggingWithConfigurableThreshold/App.config @@ -1,22 +1,22 @@ - - - -
-
- - - - - - - - - + + + +
+
+ + + + + + + + + diff --git a/Samples/GenericHost/LoggingWithConfigurableThreshold/EndpointConfig.cs b/Samples/GenericHost/LoggingWithConfigurableThreshold/EndpointConfig.cs index fb3b0149e23..63e744eb009 100644 --- a/Samples/GenericHost/LoggingWithConfigurableThreshold/EndpointConfig.cs +++ b/Samples/GenericHost/LoggingWithConfigurableThreshold/EndpointConfig.cs @@ -1,26 +1,26 @@ -using System; -using log4net; -using log4net.Appender; -using NServiceBus; - -namespace LoggingWithConfigurableThreshold -{ - public class EndpointConfig : IConfigureThisEndpoint, AsA_Server, IWantCustomLogging, IWantToRunAtStartup - { - public void Init() - { - NServiceBus.SetLoggingLibrary.Log4Net(null, ca => ca.Name = "Udi"); - Console.WriteLine("The WARN threshold has been set in the config file."); - } - - public void Run() - { - LogManager.GetLogger("A").Debug("This should not appear"); - LogManager.GetLogger("A").Warn("This should appear"); - } - - public void Stop() - { - } - } -} +using System; +using log4net; +using log4net.Appender; +using NServiceBus; + +namespace LoggingWithConfigurableThreshold +{ + public class EndpointConfig : IConfigureThisEndpoint, AsA_Server, IWantCustomLogging, IWantToRunAtStartup + { + public void Init() + { + NServiceBus.SetLoggingLibrary.Log4Net(null, ca => ca.Name = "Udi"); + Console.WriteLine("The WARN threshold has been set in the config file."); + } + + public void Run() + { + LogManager.GetLogger("A").Debug("This should not appear"); + LogManager.GetLogger("A").Warn("This should appear"); + } + + public void Stop() + { + } + } +} diff --git a/Samples/GenericHost/LoggingWithConfigurableThreshold/LoggingWithConfigurableThreshold.csproj b/Samples/GenericHost/LoggingWithConfigurableThreshold/LoggingWithConfigurableThreshold.csproj index bad56e2517f..98d0d3f8831 100644 --- a/Samples/GenericHost/LoggingWithConfigurableThreshold/LoggingWithConfigurableThreshold.csproj +++ b/Samples/GenericHost/LoggingWithConfigurableThreshold/LoggingWithConfigurableThreshold.csproj @@ -1,83 +1,83 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {3BF3849F-A0F5-4B9A-BB8F-12D4219F7787} - Library - Properties - LoggingWithConfigurableThreshold - LoggingWithConfigurableThreshold - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\binaries\log4net.dll - - - False - ..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\binaries\NServiceBus.Core.dll - - - False - ..\..\..\binaries\NServiceBus.Host.exe - - - - - - - - - - - - - - - - - - - - - - - - - Program - $(ProjectDir)$(OutputPath)NServiceBus.Host.exe - Logging.MyProductionProfile - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {3BF3849F-A0F5-4B9A-BB8F-12D4219F7787} + Library + Properties + LoggingWithConfigurableThreshold + LoggingWithConfigurableThreshold + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\binaries\log4net.dll + + + False + ..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\binaries\NServiceBus.Core.dll + + + False + ..\..\..\binaries\NServiceBus.Host.exe + + + + + + + + + + + + + + + + + + + + + + + + + Program + $(ProjectDir)$(OutputPath)NServiceBus.Host.exe + Logging.MyProductionProfile + + diff --git a/Samples/GenericHost/LoggingWithConfigurableThreshold/Properties/AssemblyInfo.cs b/Samples/GenericHost/LoggingWithConfigurableThreshold/Properties/AssemblyInfo.cs index 06411eb514c..d9ba11e679c 100644 --- a/Samples/GenericHost/LoggingWithConfigurableThreshold/Properties/AssemblyInfo.cs +++ b/Samples/GenericHost/LoggingWithConfigurableThreshold/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("LoggingWithConfigurableThreshold")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("LoggingWithConfigurableThreshold")] -[assembly: AssemblyCopyright("Copyright Microsoft 2010")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("6ed0b129-bd8e-478e-afea-106c7cdffb92")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("LoggingWithConfigurableThreshold")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("LoggingWithConfigurableThreshold")] +[assembly: AssemblyCopyright("Copyright Microsoft 2010")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("6ed0b129-bd8e-478e-afea-106c7cdffb92")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/Manufacturing/HR.Host/App.config b/Samples/Manufacturing/HR.Host/App.config index ec872a1e4e1..702d37a2da5 100644 --- a/Samples/Manufacturing/HR.Host/App.config +++ b/Samples/Manufacturing/HR.Host/App.config @@ -1,18 +1,18 @@ - - - -
- - - - - - - + + + +
+ + + + + + + diff --git a/Samples/Manufacturing/HR.Host/HR.Host.csproj b/Samples/Manufacturing/HR.Host/HR.Host.csproj index 57731dddc1d..e25eafe872a 100644 --- a/Samples/Manufacturing/HR.Host/HR.Host.csproj +++ b/Samples/Manufacturing/HR.Host/HR.Host.csproj @@ -1,108 +1,108 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {D3CA0BFC-8AE8-4828-90EE-0296D7DDF679} - Exe - Properties - HR.Host - HR.Host - - - - - - v4.0 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\binaries\log4net.dll - - - False - ..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\binaries\NServiceBus.Core.dll - - - - - - - - - - - - - - {96EE6700-2A16-4C7A-8EF9-3D81E0CE3470} - HR.MessageHandlers - - - {BAC04722-7E15-485E-BA17-3EC46AB7FC3C} - HR.Messages - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {D3CA0BFC-8AE8-4828-90EE-0296D7DDF679} + Exe + Properties + HR.Host + HR.Host + + + + + + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\binaries\log4net.dll + + + False + ..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\binaries\NServiceBus.Core.dll + + + + + + + + + + + + + + {96EE6700-2A16-4C7A-8EF9-3D81E0CE3470} + HR.MessageHandlers + + + {BAC04722-7E15-485E-BA17-3EC46AB7FC3C} + HR.Messages + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + \ No newline at end of file diff --git a/Samples/Manufacturing/HR.Host/Program.cs b/Samples/Manufacturing/HR.Host/Program.cs index c39753a7ddb..d394166e538 100644 --- a/Samples/Manufacturing/HR.Host/Program.cs +++ b/Samples/Manufacturing/HR.Host/Program.cs @@ -1,26 +1,26 @@ -using System; -using NServiceBus; - -namespace HR.Host -{ - class Program - { - static void Main() - { - var bus = NServiceBus.Configure.With() - .Log4Net() - .DefaultBuilder() - .XmlSerializer() - .MsmqTransport() - .IsTransactional(true) - .PurgeOnStartup(false) - .UnicastBus() - .ImpersonateSender(false) - .LoadMessageHandlers() - .CreateBus() - .Start(); - - Console.Read(); - } - } -} +using System; +using NServiceBus; + +namespace HR.Host +{ + class Program + { + static void Main() + { + var bus = NServiceBus.Configure.With() + .Log4Net() + .DefaultBuilder() + .XmlSerializer() + .MsmqTransport() + .IsTransactional(true) + .PurgeOnStartup(false) + .UnicastBus() + .ImpersonateSender(false) + .LoadMessageHandlers() + .CreateBus() + .Start(); + + Console.Read(); + } + } +} diff --git a/Samples/Manufacturing/HR.Host/Properties/AssemblyInfo.cs b/Samples/Manufacturing/HR.Host/Properties/AssemblyInfo.cs index 0af0887148c..21d52154226 100644 --- a/Samples/Manufacturing/HR.Host/Properties/AssemblyInfo.cs +++ b/Samples/Manufacturing/HR.Host/Properties/AssemblyInfo.cs @@ -1,33 +1,33 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("HR.Host")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("HR.Host")] -[assembly: AssemblyCopyright("Copyright © 2008")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("fb58930e-1b5b-4029-a946-f887280c6180")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("HR.Host")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("HR.Host")] +[assembly: AssemblyCopyright("Copyright © 2008")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("fb58930e-1b5b-4029-a946-f887280c6180")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/Manufacturing/HR.MessageHandlers/HR.MessageHandlers.csproj b/Samples/Manufacturing/HR.MessageHandlers/HR.MessageHandlers.csproj index f5b6c3fc7bd..3dbdf0ab741 100644 --- a/Samples/Manufacturing/HR.MessageHandlers/HR.MessageHandlers.csproj +++ b/Samples/Manufacturing/HR.MessageHandlers/HR.MessageHandlers.csproj @@ -1,101 +1,101 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {96EE6700-2A16-4C7A-8EF9-3D81E0CE3470} - Library - Properties - HR.MessageHandlers - HR.MessageHandlers - - - - - - v4.0 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\binaries\NServiceBus.dll - - - - - - - - - - - - - - {BAC04722-7E15-485E-BA17-3EC46AB7FC3C} - HR.Messages - False - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {96EE6700-2A16-4C7A-8EF9-3D81E0CE3470} + Library + Properties + HR.MessageHandlers + HR.MessageHandlers + + + + + + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\binaries\NServiceBus.dll + + + + + + + + + + + + + + {BAC04722-7E15-485E-BA17-3EC46AB7FC3C} + HR.Messages + False + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + \ No newline at end of file diff --git a/Samples/Manufacturing/HR.MessageHandlers/Properties/AssemblyInfo.cs b/Samples/Manufacturing/HR.MessageHandlers/Properties/AssemblyInfo.cs index 8b3e6a87f6c..246641712d5 100644 --- a/Samples/Manufacturing/HR.MessageHandlers/Properties/AssemblyInfo.cs +++ b/Samples/Manufacturing/HR.MessageHandlers/Properties/AssemblyInfo.cs @@ -1,35 +1,35 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("HR.MessageHandlers")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("HR.MessageHandlers")] -[assembly: AssemblyCopyright("Copyright © 2008")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("1860fe17-7216-4831-b84a-3f39c59ead03")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("HR.MessageHandlers")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("HR.MessageHandlers")] +[assembly: AssemblyCopyright("Copyright © 2008")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("1860fe17-7216-4831-b84a-3f39c59ead03")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/Manufacturing/HR.MessageHandlers/RequestOrderAuthorizationMessageHandler.cs b/Samples/Manufacturing/HR.MessageHandlers/RequestOrderAuthorizationMessageHandler.cs index 9c4f717ec70..89de18d0169 100644 --- a/Samples/Manufacturing/HR.MessageHandlers/RequestOrderAuthorizationMessageHandler.cs +++ b/Samples/Manufacturing/HR.MessageHandlers/RequestOrderAuthorizationMessageHandler.cs @@ -1,24 +1,24 @@ -using System; -using HR.Messages; -using NServiceBus; -using System.Threading; - -namespace HR.MessageHandlers -{ - public class RequestOrderAuthorizationMessageHandler : IHandleMessages - { - public void Handle(RequestOrderAuthorizationMessage message) - { - Console.WriteLine("======================================================================"); - - if (message.OrderLines != null) - foreach(IOrderLine ol in message.OrderLines) - if (ol.Quantity > 50F) - Thread.Sleep(10000); - - Bus.Reply(m => { m.SagaId = message.SagaId; m.Success = true; m.OrderLines = message.OrderLines; }); - } - - public IBus Bus { get; set; } - } -} +using System; +using HR.Messages; +using NServiceBus; +using System.Threading; + +namespace HR.MessageHandlers +{ + public class RequestOrderAuthorizationMessageHandler : IHandleMessages + { + public void Handle(RequestOrderAuthorizationMessage message) + { + Console.WriteLine("======================================================================"); + + if (message.OrderLines != null) + foreach(IOrderLine ol in message.OrderLines) + if (ol.Quantity > 50F) + Thread.Sleep(10000); + + Bus.Reply(m => { m.SagaId = message.SagaId; m.Success = true; m.OrderLines = message.OrderLines; }); + } + + public IBus Bus { get; set; } + } +} diff --git a/Samples/Manufacturing/HR.Messages/HR.Messages.csproj b/Samples/Manufacturing/HR.Messages/HR.Messages.csproj index b88bd1fc125..6651c25257a 100644 --- a/Samples/Manufacturing/HR.Messages/HR.Messages.csproj +++ b/Samples/Manufacturing/HR.Messages/HR.Messages.csproj @@ -1,96 +1,96 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {BAC04722-7E15-485E-BA17-3EC46AB7FC3C} - Library - Properties - HR.Messages - HR.Messages - - - - - - v4.0 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\binaries\NServiceBus.dll - - - - - - - - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {BAC04722-7E15-485E-BA17-3EC46AB7FC3C} + Library + Properties + HR.Messages + HR.Messages + + + + + + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\binaries\NServiceBus.dll + + + + + + + + + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + \ No newline at end of file diff --git a/Samples/Manufacturing/HR.Messages/IOrderLine.cs b/Samples/Manufacturing/HR.Messages/IOrderLine.cs index 050346aaa03..bb409851ea5 100644 --- a/Samples/Manufacturing/HR.Messages/IOrderLine.cs +++ b/Samples/Manufacturing/HR.Messages/IOrderLine.cs @@ -1,11 +1,11 @@ -using System; -using NServiceBus; - -namespace HR.Messages -{ - public interface IOrderLine : IMessage - { - Guid ProductId { get; set; } - float Quantity { get; set; } - } -} +using System; +using NServiceBus; + +namespace HR.Messages +{ + public interface IOrderLine : IMessage + { + Guid ProductId { get; set; } + float Quantity { get; set; } + } +} diff --git a/Samples/Manufacturing/HR.Messages/OrderAuthorizationResponseMessage.cs b/Samples/Manufacturing/HR.Messages/OrderAuthorizationResponseMessage.cs index f59495e4c70..7b56c7c8192 100644 --- a/Samples/Manufacturing/HR.Messages/OrderAuthorizationResponseMessage.cs +++ b/Samples/Manufacturing/HR.Messages/OrderAuthorizationResponseMessage.cs @@ -1,12 +1,12 @@ -using System; -using System.Collections.Generic; -using NServiceBus.Saga; - -namespace HR.Messages -{ - public interface OrderAuthorizationResponseMessage : ISagaMessage - { - bool Success { get; set; } - List OrderLines { get; set; } - } -} +using System; +using System.Collections.Generic; +using NServiceBus.Saga; + +namespace HR.Messages +{ + public interface OrderAuthorizationResponseMessage : ISagaMessage + { + bool Success { get; set; } + List OrderLines { get; set; } + } +} diff --git a/Samples/Manufacturing/HR.Messages/Properties/AssemblyInfo.cs b/Samples/Manufacturing/HR.Messages/Properties/AssemblyInfo.cs index c3e45872b05..243191b0ee2 100644 --- a/Samples/Manufacturing/HR.Messages/Properties/AssemblyInfo.cs +++ b/Samples/Manufacturing/HR.Messages/Properties/AssemblyInfo.cs @@ -1,35 +1,35 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("HR.Messages")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("HR.Messages")] -[assembly: AssemblyCopyright("Copyright © 2008")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("9d6db41f-c8de-4992-bca6-3879ea49e571")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("HR.Messages")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("HR.Messages")] +[assembly: AssemblyCopyright("Copyright © 2008")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("9d6db41f-c8de-4992-bca6-3879ea49e571")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/Manufacturing/HR.Messages/RequestOrderAuthorizationMessage.cs b/Samples/Manufacturing/HR.Messages/RequestOrderAuthorizationMessage.cs index 5bb11f4ec8e..5e65e7f5ba0 100644 --- a/Samples/Manufacturing/HR.Messages/RequestOrderAuthorizationMessage.cs +++ b/Samples/Manufacturing/HR.Messages/RequestOrderAuthorizationMessage.cs @@ -1,12 +1,12 @@ -using System; -using NServiceBus.Saga; -using System.Collections.Generic; - -namespace HR.Messages -{ - public interface RequestOrderAuthorizationMessage : ISagaMessage - { - Guid PartnerId { get; set; } - List OrderLines { get; set; } - } -} +using System; +using NServiceBus.Saga; +using System.Collections.Generic; + +namespace HR.Messages +{ + public interface RequestOrderAuthorizationMessage : ISagaMessage + { + Guid PartnerId { get; set; } + List OrderLines { get; set; } + } +} diff --git a/Samples/Manufacturing/InteropPartner/InteropPartner.csproj b/Samples/Manufacturing/InteropPartner/InteropPartner.csproj index 126a2f35a99..b84fda71cc2 100644 --- a/Samples/Manufacturing/InteropPartner/InteropPartner.csproj +++ b/Samples/Manufacturing/InteropPartner/InteropPartner.csproj @@ -1,96 +1,96 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {AF9929C8-85B8-4A36-9EC8-E46C17FE3B65} - Exe - Properties - InteropPartner - InteropPartner - v4.0 - 512 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - - - - - - - - - - - - - - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {AF9929C8-85B8-4A36-9EC8-E46C17FE3B65} + Exe + Properties + InteropPartner + InteropPartner + v4.0 + 512 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + + + + + + + + + + + + + + + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + \ No newline at end of file diff --git a/Samples/Manufacturing/InteropPartner/Program.cs b/Samples/Manufacturing/InteropPartner/Program.cs index e2f0bfa49fd..e03b0ae2249 100644 --- a/Samples/Manufacturing/InteropPartner/Program.cs +++ b/Samples/Manufacturing/InteropPartner/Program.cs @@ -1,42 +1,42 @@ -using System; -using System.Messaging; -using System.Xml.Serialization; - -namespace InteropPartner -{ - class Program - { - static void Main() - { - Console.WriteLine("Using straight xml serialization and msmq to test interop."); - Console.WriteLine("To exit, enter 'q'. Press 'Enter' to send a message."); - - string queueName = string.Format("FormatName:DIRECT=OS:{0}\\private$\\OrderServiceInputQueue", Environment.MachineName); - var label = "UDI_MOBILE_2\\Administrator"; - - var q = new MessageQueue(queueName); - - var serializer = new XmlSerializer(typeof(OrderMessage), new[] { typeof(OrderLine) }); - - while ((Console.ReadLine().ToLower()) != "q") - { - var m1 = new OrderMessage - { - PurchaseOrderNumber = Guid.NewGuid().ToString(), - ProvideBy = DateTime.Now, - PartnerId = Guid.NewGuid(), - OrderLines = new[] {new OrderLine {ProductId = Guid.NewGuid(), Quantity = 10F}}, - Done = true - }; - - var toSend = new Message(); - serializer.Serialize(toSend.BodyStream, m1); - toSend.ResponseQueue = new MessageQueue(string.Format("FormatName:DIRECT=OS:{0}\\private$\\PartnerInputQueue", Environment.MachineName)); - toSend.Label = label; - - q.Send(toSend, MessageQueueTransactionType.Single); - Console.WriteLine("Sent order {0}", m1.PurchaseOrderNumber); - } - } - } -} +using System; +using System.Messaging; +using System.Xml.Serialization; + +namespace InteropPartner +{ + class Program + { + static void Main() + { + Console.WriteLine("Using straight xml serialization and msmq to test interop."); + Console.WriteLine("To exit, enter 'q'. Press 'Enter' to send a message."); + + string queueName = string.Format("FormatName:DIRECT=OS:{0}\\private$\\OrderServiceInputQueue", Environment.MachineName); + var label = "UDI_MOBILE_2\\Administrator"; + + var q = new MessageQueue(queueName); + + var serializer = new XmlSerializer(typeof(OrderMessage), new[] { typeof(OrderLine) }); + + while ((Console.ReadLine().ToLower()) != "q") + { + var m1 = new OrderMessage + { + PurchaseOrderNumber = Guid.NewGuid().ToString(), + ProvideBy = DateTime.Now, + PartnerId = Guid.NewGuid(), + OrderLines = new[] {new OrderLine {ProductId = Guid.NewGuid(), Quantity = 10F}}, + Done = true + }; + + var toSend = new Message(); + serializer.Serialize(toSend.BodyStream, m1); + toSend.ResponseQueue = new MessageQueue(string.Format("FormatName:DIRECT=OS:{0}\\private$\\PartnerInputQueue", Environment.MachineName)); + toSend.Label = label; + + q.Send(toSend, MessageQueueTransactionType.Single); + Console.WriteLine("Sent order {0}", m1.PurchaseOrderNumber); + } + } + } +} diff --git a/Samples/Manufacturing/InteropPartner/Properties/AssemblyInfo.cs b/Samples/Manufacturing/InteropPartner/Properties/AssemblyInfo.cs index 0c76a1b928a..81e2173ae2e 100644 --- a/Samples/Manufacturing/InteropPartner/Properties/AssemblyInfo.cs +++ b/Samples/Manufacturing/InteropPartner/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("InteropPartner")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("InteropPartner")] -[assembly: AssemblyCopyright("Copyright © 2008")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("6e1c25c9-5c7e-4f9c-beee-576f1558a5f8")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("InteropPartner")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("InteropPartner")] +[assembly: AssemblyCopyright("Copyright © 2008")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("6e1c25c9-5c7e-4f9c-beee-576f1558a5f8")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/Manufacturing/InteropPartner/schema0.xsd b/Samples/Manufacturing/InteropPartner/schema0.xsd index a8da45d5c2e..b95602e0f69 100644 --- a/Samples/Manufacturing/InteropPartner/schema0.xsd +++ b/Samples/Manufacturing/InteropPartner/schema0.xsd @@ -1,53 +1,53 @@ - - - + + + - + - + - + - + - + - + - + - + - + - + - + - - - + + + diff --git a/Samples/Manufacturing/InteropPartner/schema1_schema0.cs b/Samples/Manufacturing/InteropPartner/schema1_schema0.cs index 1f76db6c3db..97e98e5d700 100644 --- a/Samples/Manufacturing/InteropPartner/schema1_schema0.cs +++ b/Samples/Manufacturing/InteropPartner/schema1_schema0.cs @@ -1,260 +1,260 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.3053 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -using System.Xml.Serialization; - -// -// This source code was auto-generated by xsd, Version=2.0.50727.3038. -// - - -/// -[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")] -[System.SerializableAttribute()] -[System.Diagnostics.DebuggerStepThroughAttribute()] -[System.ComponentModel.DesignerCategoryAttribute("code")] -[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.net/OrderService.Messages")] -[System.Xml.Serialization.XmlRootAttribute(Namespace="http://tempuri.net/OrderService.Messages", IsNullable=true)] -public partial class OrderStatusChangedMessage { - - private string purchaseOrderNumberField; - - private System.Guid partnerIdField; - - private OrderStatusEnum statusField; - - private object[] orderLinesField; - - /// - public string PurchaseOrderNumber { - get { - return this.purchaseOrderNumberField; - } - set { - this.purchaseOrderNumberField = value; - } - } - - /// - public System.Guid PartnerId { - get { - return this.partnerIdField; - } - set { - this.partnerIdField = value; - } - } - - /// - public OrderStatusEnum Status { - get { - return this.statusField; - } - set { - this.statusField = value; - } - } - - /// - [System.Xml.Serialization.XmlArrayItemAttribute("OrderLine")] - public object[] OrderLines { - get { - return this.orderLinesField; - } - set { - this.orderLinesField = value; - } - } -} - -/// -[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")] -[System.SerializableAttribute()] -[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.net/OrderService.Messages")] -[System.Xml.Serialization.XmlRootAttribute(Namespace="http://tempuri.net/OrderService.Messages", IsNullable=false)] -public enum OrderStatusEnum { - - /// - Tentative, - - /// - Recieved, - - /// - Authorized, - - /// - Rejected, - - /// - Accepted, -} - -/// -[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")] -[System.SerializableAttribute()] -[System.Diagnostics.DebuggerStepThroughAttribute()] -[System.ComponentModel.DesignerCategoryAttribute("code")] -[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.net/OrderService.Messages")] -[System.Xml.Serialization.XmlRootAttribute(Namespace="http://tempuri.net/OrderService.Messages", IsNullable=true)] -public partial class OrderMessage { - - private bool doneField; - - private System.DateTime provideByField; - - private object[] orderLinesField; - - private string purchaseOrderNumberField; - - private System.Guid partnerIdField; - - /// - public bool Done { - get { - return this.doneField; - } - set { - this.doneField = value; - } - } - - /// - public System.DateTime ProvideBy { - get { - return this.provideByField; - } - set { - this.provideByField = value; - } - } - - /// - [System.Xml.Serialization.XmlArrayItemAttribute("OrderLine")] - public object[] OrderLines { - get { - return this.orderLinesField; - } - set { - this.orderLinesField = value; - } - } - - /// - public string PurchaseOrderNumber { - get { - return this.purchaseOrderNumberField; - } - set { - this.purchaseOrderNumberField = value; - } - } - - /// - public System.Guid PartnerId { - get { - return this.partnerIdField; - } - set { - this.partnerIdField = value; - } - } -} - -/// -[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")] -[System.SerializableAttribute()] -[System.Diagnostics.DebuggerStepThroughAttribute()] -[System.ComponentModel.DesignerCategoryAttribute("code")] -[System.Xml.Serialization.XmlTypeAttribute(TypeName="ArrayOfOrderLine", Namespace="http://tempuri.net/OrderService.Messages")] -[System.Xml.Serialization.XmlRootAttribute("ArrayOfOrderLine", Namespace="http://tempuri.net/OrderService.Messages", IsNullable=true)] -public partial class ArrayOfOrderLine1 { - - private object[] orderLineField; - - /// - [System.Xml.Serialization.XmlElementAttribute("OrderLine", IsNullable=true)] - public object[] OrderLine { - get { - return this.orderLineField; - } - set { - this.orderLineField = value; - } - } -} - -/// -[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")] -[System.SerializableAttribute()] -[System.Diagnostics.DebuggerStepThroughAttribute()] -[System.ComponentModel.DesignerCategoryAttribute("code")] -[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.net/OrderService.Messages")] -[System.Xml.Serialization.XmlRootAttribute(Namespace="http://tempuri.net/OrderService.Messages", IsNullable=true)] -public partial class OrderLine { - - private System.Guid productIdField; - - private float quantityField; - - /// - public System.Guid ProductId { - get { - return this.productIdField; - } - set { - this.productIdField = value; - } - } - - /// - public float Quantity { - get { - return this.quantityField; - } - set { - this.quantityField = value; - } - } -} - -/// -[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")] -[System.SerializableAttribute()] -[System.Diagnostics.DebuggerStepThroughAttribute()] -[System.ComponentModel.DesignerCategoryAttribute("code")] -[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.net/OrderService.Messages")] -[System.Xml.Serialization.XmlRootAttribute(Namespace="http://tempuri.net/OrderService.Messages", IsNullable=true)] -public partial class CancelOrderMessage { - - private string purchaseOrderNumberField; - - private System.Guid partnerIdField; - - /// - public string PurchaseOrderNumber { - get { - return this.purchaseOrderNumberField; - } - set { - this.purchaseOrderNumberField = value; - } - } - - /// - public System.Guid PartnerId { - get { - return this.partnerIdField; - } - set { - this.partnerIdField = value; - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.3053 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System.Xml.Serialization; + +// +// This source code was auto-generated by xsd, Version=2.0.50727.3038. +// + + +/// +[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")] +[System.SerializableAttribute()] +[System.Diagnostics.DebuggerStepThroughAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.net/OrderService.Messages")] +[System.Xml.Serialization.XmlRootAttribute(Namespace="http://tempuri.net/OrderService.Messages", IsNullable=true)] +public partial class OrderStatusChangedMessage { + + private string purchaseOrderNumberField; + + private System.Guid partnerIdField; + + private OrderStatusEnum statusField; + + private object[] orderLinesField; + + /// + public string PurchaseOrderNumber { + get { + return this.purchaseOrderNumberField; + } + set { + this.purchaseOrderNumberField = value; + } + } + + /// + public System.Guid PartnerId { + get { + return this.partnerIdField; + } + set { + this.partnerIdField = value; + } + } + + /// + public OrderStatusEnum Status { + get { + return this.statusField; + } + set { + this.statusField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("OrderLine")] + public object[] OrderLines { + get { + return this.orderLinesField; + } + set { + this.orderLinesField = value; + } + } +} + +/// +[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")] +[System.SerializableAttribute()] +[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.net/OrderService.Messages")] +[System.Xml.Serialization.XmlRootAttribute(Namespace="http://tempuri.net/OrderService.Messages", IsNullable=false)] +public enum OrderStatusEnum { + + /// + Tentative, + + /// + Recieved, + + /// + Authorized, + + /// + Rejected, + + /// + Accepted, +} + +/// +[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")] +[System.SerializableAttribute()] +[System.Diagnostics.DebuggerStepThroughAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.net/OrderService.Messages")] +[System.Xml.Serialization.XmlRootAttribute(Namespace="http://tempuri.net/OrderService.Messages", IsNullable=true)] +public partial class OrderMessage { + + private bool doneField; + + private System.DateTime provideByField; + + private object[] orderLinesField; + + private string purchaseOrderNumberField; + + private System.Guid partnerIdField; + + /// + public bool Done { + get { + return this.doneField; + } + set { + this.doneField = value; + } + } + + /// + public System.DateTime ProvideBy { + get { + return this.provideByField; + } + set { + this.provideByField = value; + } + } + + /// + [System.Xml.Serialization.XmlArrayItemAttribute("OrderLine")] + public object[] OrderLines { + get { + return this.orderLinesField; + } + set { + this.orderLinesField = value; + } + } + + /// + public string PurchaseOrderNumber { + get { + return this.purchaseOrderNumberField; + } + set { + this.purchaseOrderNumberField = value; + } + } + + /// + public System.Guid PartnerId { + get { + return this.partnerIdField; + } + set { + this.partnerIdField = value; + } + } +} + +/// +[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")] +[System.SerializableAttribute()] +[System.Diagnostics.DebuggerStepThroughAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(TypeName="ArrayOfOrderLine", Namespace="http://tempuri.net/OrderService.Messages")] +[System.Xml.Serialization.XmlRootAttribute("ArrayOfOrderLine", Namespace="http://tempuri.net/OrderService.Messages", IsNullable=true)] +public partial class ArrayOfOrderLine1 { + + private object[] orderLineField; + + /// + [System.Xml.Serialization.XmlElementAttribute("OrderLine", IsNullable=true)] + public object[] OrderLine { + get { + return this.orderLineField; + } + set { + this.orderLineField = value; + } + } +} + +/// +[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")] +[System.SerializableAttribute()] +[System.Diagnostics.DebuggerStepThroughAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.net/OrderService.Messages")] +[System.Xml.Serialization.XmlRootAttribute(Namespace="http://tempuri.net/OrderService.Messages", IsNullable=true)] +public partial class OrderLine { + + private System.Guid productIdField; + + private float quantityField; + + /// + public System.Guid ProductId { + get { + return this.productIdField; + } + set { + this.productIdField = value; + } + } + + /// + public float Quantity { + get { + return this.quantityField; + } + set { + this.quantityField = value; + } + } +} + +/// +[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")] +[System.SerializableAttribute()] +[System.Diagnostics.DebuggerStepThroughAttribute()] +[System.ComponentModel.DesignerCategoryAttribute("code")] +[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.net/OrderService.Messages")] +[System.Xml.Serialization.XmlRootAttribute(Namespace="http://tempuri.net/OrderService.Messages", IsNullable=true)] +public partial class CancelOrderMessage { + + private string purchaseOrderNumberField; + + private System.Guid partnerIdField; + + /// + public string PurchaseOrderNumber { + get { + return this.purchaseOrderNumberField; + } + set { + this.purchaseOrderNumberField = value; + } + } + + /// + public System.Guid PartnerId { + get { + return this.partnerIdField; + } + set { + this.partnerIdField = value; + } + } +} diff --git a/Samples/Manufacturing/Manufacturing.sln b/Samples/Manufacturing/Manufacturing.sln index 94a16660916..7481cc51adc 100644 --- a/Samples/Manufacturing/Manufacturing.sln +++ b/Samples/Manufacturing/Manufacturing.sln @@ -1,74 +1,74 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "OrderService", "OrderService", "{B3A86F87-4170-49FF-87A0-7B1B8A7BE087}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "HRService", "HRService", "{497655AA-94DF-421F-BD96-D27958E3C465}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrderService", "OrderService\OrderService\OrderService.csproj", "{452C5FEA-16C8-49E1-BC95-1EC55E49EECB}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HR.Messages", "HR.Messages\HR.Messages.csproj", "{BAC04722-7E15-485E-BA17-3EC46AB7FC3C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrderService.Messages", "OrderService\OrderService.Messages\OrderService.Messages.csproj", "{A490D793-1D1D-486F-B808-827010EF8369}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrderService.Tests", "OrderService\OrderService.Tests\OrderService.Tests.csproj", "{CB39076B-B46C-416A-A9C1-D1032B4C50D6}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HR.MessageHandlers", "HR.MessageHandlers\HR.MessageHandlers.csproj", "{96EE6700-2A16-4C7A-8EF9-3D81E0CE3470}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HR.Host", "HR.Host\HR.Host.csproj", "{D3CA0BFC-8AE8-4828-90EE-0296D7DDF679}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Partner", "Partner\Partner.csproj", "{646585FC-12F6-4668-9926-A39E6CCD6400}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InteropPartner", "InteropPartner\InteropPartner.csproj", "{AF9929C8-85B8-4A36-9EC8-E46C17FE3B65}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {452C5FEA-16C8-49E1-BC95-1EC55E49EECB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {452C5FEA-16C8-49E1-BC95-1EC55E49EECB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {452C5FEA-16C8-49E1-BC95-1EC55E49EECB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {452C5FEA-16C8-49E1-BC95-1EC55E49EECB}.Release|Any CPU.Build.0 = Release|Any CPU - {BAC04722-7E15-485E-BA17-3EC46AB7FC3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BAC04722-7E15-485E-BA17-3EC46AB7FC3C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BAC04722-7E15-485E-BA17-3EC46AB7FC3C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BAC04722-7E15-485E-BA17-3EC46AB7FC3C}.Release|Any CPU.Build.0 = Release|Any CPU - {A490D793-1D1D-486F-B808-827010EF8369}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A490D793-1D1D-486F-B808-827010EF8369}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A490D793-1D1D-486F-B808-827010EF8369}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A490D793-1D1D-486F-B808-827010EF8369}.Release|Any CPU.Build.0 = Release|Any CPU - {CB39076B-B46C-416A-A9C1-D1032B4C50D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CB39076B-B46C-416A-A9C1-D1032B4C50D6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CB39076B-B46C-416A-A9C1-D1032B4C50D6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CB39076B-B46C-416A-A9C1-D1032B4C50D6}.Release|Any CPU.Build.0 = Release|Any CPU - {96EE6700-2A16-4C7A-8EF9-3D81E0CE3470}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {96EE6700-2A16-4C7A-8EF9-3D81E0CE3470}.Debug|Any CPU.Build.0 = Debug|Any CPU - {96EE6700-2A16-4C7A-8EF9-3D81E0CE3470}.Release|Any CPU.ActiveCfg = Release|Any CPU - {96EE6700-2A16-4C7A-8EF9-3D81E0CE3470}.Release|Any CPU.Build.0 = Release|Any CPU - {D3CA0BFC-8AE8-4828-90EE-0296D7DDF679}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D3CA0BFC-8AE8-4828-90EE-0296D7DDF679}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D3CA0BFC-8AE8-4828-90EE-0296D7DDF679}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D3CA0BFC-8AE8-4828-90EE-0296D7DDF679}.Release|Any CPU.Build.0 = Release|Any CPU - {646585FC-12F6-4668-9926-A39E6CCD6400}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {646585FC-12F6-4668-9926-A39E6CCD6400}.Debug|Any CPU.Build.0 = Debug|Any CPU - {646585FC-12F6-4668-9926-A39E6CCD6400}.Release|Any CPU.ActiveCfg = Release|Any CPU - {646585FC-12F6-4668-9926-A39E6CCD6400}.Release|Any CPU.Build.0 = Release|Any CPU - {AF9929C8-85B8-4A36-9EC8-E46C17FE3B65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AF9929C8-85B8-4A36-9EC8-E46C17FE3B65}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AF9929C8-85B8-4A36-9EC8-E46C17FE3B65}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AF9929C8-85B8-4A36-9EC8-E46C17FE3B65}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {452C5FEA-16C8-49E1-BC95-1EC55E49EECB} = {B3A86F87-4170-49FF-87A0-7B1B8A7BE087} - {A490D793-1D1D-486F-B808-827010EF8369} = {B3A86F87-4170-49FF-87A0-7B1B8A7BE087} - {CB39076B-B46C-416A-A9C1-D1032B4C50D6} = {B3A86F87-4170-49FF-87A0-7B1B8A7BE087} - {BAC04722-7E15-485E-BA17-3EC46AB7FC3C} = {497655AA-94DF-421F-BD96-D27958E3C465} - {96EE6700-2A16-4C7A-8EF9-3D81E0CE3470} = {497655AA-94DF-421F-BD96-D27958E3C465} - {D3CA0BFC-8AE8-4828-90EE-0296D7DDF679} = {497655AA-94DF-421F-BD96-D27958E3C465} - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "OrderService", "OrderService", "{B3A86F87-4170-49FF-87A0-7B1B8A7BE087}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "HRService", "HRService", "{497655AA-94DF-421F-BD96-D27958E3C465}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrderService", "OrderService\OrderService\OrderService.csproj", "{452C5FEA-16C8-49E1-BC95-1EC55E49EECB}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HR.Messages", "HR.Messages\HR.Messages.csproj", "{BAC04722-7E15-485E-BA17-3EC46AB7FC3C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrderService.Messages", "OrderService\OrderService.Messages\OrderService.Messages.csproj", "{A490D793-1D1D-486F-B808-827010EF8369}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrderService.Tests", "OrderService\OrderService.Tests\OrderService.Tests.csproj", "{CB39076B-B46C-416A-A9C1-D1032B4C50D6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HR.MessageHandlers", "HR.MessageHandlers\HR.MessageHandlers.csproj", "{96EE6700-2A16-4C7A-8EF9-3D81E0CE3470}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HR.Host", "HR.Host\HR.Host.csproj", "{D3CA0BFC-8AE8-4828-90EE-0296D7DDF679}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Partner", "Partner\Partner.csproj", "{646585FC-12F6-4668-9926-A39E6CCD6400}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InteropPartner", "InteropPartner\InteropPartner.csproj", "{AF9929C8-85B8-4A36-9EC8-E46C17FE3B65}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {452C5FEA-16C8-49E1-BC95-1EC55E49EECB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {452C5FEA-16C8-49E1-BC95-1EC55E49EECB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {452C5FEA-16C8-49E1-BC95-1EC55E49EECB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {452C5FEA-16C8-49E1-BC95-1EC55E49EECB}.Release|Any CPU.Build.0 = Release|Any CPU + {BAC04722-7E15-485E-BA17-3EC46AB7FC3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BAC04722-7E15-485E-BA17-3EC46AB7FC3C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BAC04722-7E15-485E-BA17-3EC46AB7FC3C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BAC04722-7E15-485E-BA17-3EC46AB7FC3C}.Release|Any CPU.Build.0 = Release|Any CPU + {A490D793-1D1D-486F-B808-827010EF8369}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A490D793-1D1D-486F-B808-827010EF8369}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A490D793-1D1D-486F-B808-827010EF8369}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A490D793-1D1D-486F-B808-827010EF8369}.Release|Any CPU.Build.0 = Release|Any CPU + {CB39076B-B46C-416A-A9C1-D1032B4C50D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CB39076B-B46C-416A-A9C1-D1032B4C50D6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CB39076B-B46C-416A-A9C1-D1032B4C50D6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CB39076B-B46C-416A-A9C1-D1032B4C50D6}.Release|Any CPU.Build.0 = Release|Any CPU + {96EE6700-2A16-4C7A-8EF9-3D81E0CE3470}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {96EE6700-2A16-4C7A-8EF9-3D81E0CE3470}.Debug|Any CPU.Build.0 = Debug|Any CPU + {96EE6700-2A16-4C7A-8EF9-3D81E0CE3470}.Release|Any CPU.ActiveCfg = Release|Any CPU + {96EE6700-2A16-4C7A-8EF9-3D81E0CE3470}.Release|Any CPU.Build.0 = Release|Any CPU + {D3CA0BFC-8AE8-4828-90EE-0296D7DDF679}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D3CA0BFC-8AE8-4828-90EE-0296D7DDF679}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D3CA0BFC-8AE8-4828-90EE-0296D7DDF679}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D3CA0BFC-8AE8-4828-90EE-0296D7DDF679}.Release|Any CPU.Build.0 = Release|Any CPU + {646585FC-12F6-4668-9926-A39E6CCD6400}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {646585FC-12F6-4668-9926-A39E6CCD6400}.Debug|Any CPU.Build.0 = Debug|Any CPU + {646585FC-12F6-4668-9926-A39E6CCD6400}.Release|Any CPU.ActiveCfg = Release|Any CPU + {646585FC-12F6-4668-9926-A39E6CCD6400}.Release|Any CPU.Build.0 = Release|Any CPU + {AF9929C8-85B8-4A36-9EC8-E46C17FE3B65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AF9929C8-85B8-4A36-9EC8-E46C17FE3B65}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AF9929C8-85B8-4A36-9EC8-E46C17FE3B65}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AF9929C8-85B8-4A36-9EC8-E46C17FE3B65}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {452C5FEA-16C8-49E1-BC95-1EC55E49EECB} = {B3A86F87-4170-49FF-87A0-7B1B8A7BE087} + {A490D793-1D1D-486F-B808-827010EF8369} = {B3A86F87-4170-49FF-87A0-7B1B8A7BE087} + {CB39076B-B46C-416A-A9C1-D1032B4C50D6} = {B3A86F87-4170-49FF-87A0-7B1B8A7BE087} + {BAC04722-7E15-485E-BA17-3EC46AB7FC3C} = {497655AA-94DF-421F-BD96-D27958E3C465} + {96EE6700-2A16-4C7A-8EF9-3D81E0CE3470} = {497655AA-94DF-421F-BD96-D27958E3C465} + {D3CA0BFC-8AE8-4828-90EE-0296D7DDF679} = {497655AA-94DF-421F-BD96-D27958E3C465} + EndGlobalSection +EndGlobal diff --git a/Samples/Manufacturing/OrderService/OrderService.Host/App.config b/Samples/Manufacturing/OrderService/OrderService.Host/App.config index 6e59f70e1e7..8eec1fa7b06 100644 --- a/Samples/Manufacturing/OrderService/OrderService.Host/App.config +++ b/Samples/Manufacturing/OrderService/OrderService.Host/App.config @@ -1,79 +1,79 @@ - - - -
-
-
- - -
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + +
+
+
+ + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Samples/Manufacturing/OrderService/OrderService.Host/OrderService.Host.csproj b/Samples/Manufacturing/OrderService/OrderService.Host/OrderService.Host.csproj index 18e106553fd..444ecf59dd9 100644 --- a/Samples/Manufacturing/OrderService/OrderService.Host/OrderService.Host.csproj +++ b/Samples/Manufacturing/OrderService/OrderService.Host/OrderService.Host.csproj @@ -1,159 +1,159 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {03E59C83-170A-4BF6-86FB-A05B75DE9510} - Exe - Properties - OrderService.Host - OrderService.Host - - - - - - v4.0 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\..\lib\Castle.Core.dll - - - False - ..\..\..\..\lib\Castle.MicroKernel.dll - - - False - ..\..\..\..\lib\Castle.Windsor.dll - - - False - ..\..\..\..\lib\FluentNHibernate\FluentNHibernate.dll - - - False - ..\..\..\..\lib\Iesi.Collections.dll - - - False - ..\..\..\..\lib\log4net.dll - - - False - ..\..\..\..\lib\NHibernate.dll - - - False - ..\..\..\..\lib\NHibernate.ByteCode.LinFu.dll - - - False - ..\..\..\..\build\output\NServiceBus.dll - - - False - ..\..\..\..\build\output\containers\NServiceBus.ObjectBuilder.CastleWindsor.dll - - - False - ..\..\..\..\build\output\nhibernate\NServiceBus.SagaPersisters.SqLite.dll - - - False - ..\..\..\..\build\output\nhibernate\NServiceBus.Unicast.Subscriptions.NHibernate.dll - - - - - - - False - ..\..\..\..\lib\sqlite\x64\System.Data.SQLite.dll - - - - - - - - - - {BAC04722-7E15-485E-BA17-3EC46AB7FC3C} - HR.Messages - - - {A490D793-1D1D-486F-B808-827010EF8369} - OrderService.Messages - - - {452C5FEA-16C8-49E1-BC95-1EC55E49EECB} - OrderService %28Samples\Manufacturing\OrderService\OrderService%29 - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {03E59C83-170A-4BF6-86FB-A05B75DE9510} + Exe + Properties + OrderService.Host + OrderService.Host + + + + + + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\..\lib\Castle.Core.dll + + + False + ..\..\..\..\lib\Castle.MicroKernel.dll + + + False + ..\..\..\..\lib\Castle.Windsor.dll + + + False + ..\..\..\..\lib\FluentNHibernate\FluentNHibernate.dll + + + False + ..\..\..\..\lib\Iesi.Collections.dll + + + False + ..\..\..\..\lib\log4net.dll + + + False + ..\..\..\..\lib\NHibernate.dll + + + False + ..\..\..\..\lib\NHibernate.ByteCode.LinFu.dll + + + False + ..\..\..\..\build\output\NServiceBus.dll + + + False + ..\..\..\..\build\output\containers\NServiceBus.ObjectBuilder.CastleWindsor.dll + + + False + ..\..\..\..\build\output\nhibernate\NServiceBus.SagaPersisters.SqLite.dll + + + False + ..\..\..\..\build\output\nhibernate\NServiceBus.Unicast.Subscriptions.NHibernate.dll + + + + + + + False + ..\..\..\..\lib\sqlite\x64\System.Data.SQLite.dll + + + + + + + + + + {BAC04722-7E15-485E-BA17-3EC46AB7FC3C} + HR.Messages + + + {A490D793-1D1D-486F-B808-827010EF8369} + OrderService.Messages + + + {452C5FEA-16C8-49E1-BC95-1EC55E49EECB} + OrderService %28Samples\Manufacturing\OrderService\OrderService%29 + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + \ No newline at end of file diff --git a/Samples/Manufacturing/OrderService/OrderService.Host/Program.cs b/Samples/Manufacturing/OrderService/OrderService.Host/Program.cs index d3997347926..7e7857fa960 100644 --- a/Samples/Manufacturing/OrderService/OrderService.Host/Program.cs +++ b/Samples/Manufacturing/OrderService/OrderService.Host/Program.cs @@ -1,49 +1,49 @@ -using System; -using Common.Logging; -using FluentNHibernate.Cfg.Db; -using NServiceBus; -using NServiceBus.Grid.MessageHandlers; -using NServiceBus.Saga; -using NServiceBus.Sagas.Impl; - - -namespace OrderService.Host -{ - class Program - { - static void Main() - { - LogManager.GetLogger("hello").Debug("Order Started."); - - try - { - - var bus = NServiceBus.Configure.With() - .SpringBuilder() - .XmlSerializer() - .MsmqTransport() - .IsTransactional(true) - .PurgeOnStartup(false) - .NHibernateSubcriptionStorage(SQLiteConfiguration.Standard.UsingFile(".\\subscriptions.sqllite")) - .Sagas() - .SQLiteSagaPersister() - .UnicastBus() - .ImpersonateSender(false) - .LoadMessageHandlers( - First - .Then() - ) - - .CreateBus() - .Start(); - } - catch (Exception e) - { - LogManager.GetLogger("hello").Fatal("Exiting", e); - } - - Console.Read(); - - } - } -} +using System; +using Common.Logging; +using FluentNHibernate.Cfg.Db; +using NServiceBus; +using NServiceBus.Grid.MessageHandlers; +using NServiceBus.Saga; +using NServiceBus.Sagas.Impl; + + +namespace OrderService.Host +{ + class Program + { + static void Main() + { + LogManager.GetLogger("hello").Debug("Order Started."); + + try + { + + var bus = NServiceBus.Configure.With() + .SpringBuilder() + .XmlSerializer() + .MsmqTransport() + .IsTransactional(true) + .PurgeOnStartup(false) + .NHibernateSubcriptionStorage(SQLiteConfiguration.Standard.UsingFile(".\\subscriptions.sqllite")) + .Sagas() + .SQLiteSagaPersister() + .UnicastBus() + .ImpersonateSender(false) + .LoadMessageHandlers( + First + .Then() + ) + + .CreateBus() + .Start(); + } + catch (Exception e) + { + LogManager.GetLogger("hello").Fatal("Exiting", e); + } + + Console.Read(); + + } + } +} diff --git a/Samples/Manufacturing/OrderService/OrderService.Host/Properties/AssemblyInfo.cs b/Samples/Manufacturing/OrderService/OrderService.Host/Properties/AssemblyInfo.cs index 2f81afba520..373eacec2c5 100644 --- a/Samples/Manufacturing/OrderService/OrderService.Host/Properties/AssemblyInfo.cs +++ b/Samples/Manufacturing/OrderService/OrderService.Host/Properties/AssemblyInfo.cs @@ -1,33 +1,33 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OrderService.Host")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("OrderService.Host")] -[assembly: AssemblyCopyright("Copyright © 2008")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("4c6777f2-5cc1-46c2-a54a-b05dc16f9d0c")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("OrderService.Host")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("OrderService.Host")] +[assembly: AssemblyCopyright("Copyright © 2008")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("4c6777f2-5cc1-46c2-a54a-b05dc16f9d0c")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/Manufacturing/OrderService/OrderService.Messages/CancelOrderMessage.cs b/Samples/Manufacturing/OrderService/OrderService.Messages/CancelOrderMessage.cs index dff22a2e64a..3d2de33abe1 100644 --- a/Samples/Manufacturing/OrderService/OrderService.Messages/CancelOrderMessage.cs +++ b/Samples/Manufacturing/OrderService/OrderService.Messages/CancelOrderMessage.cs @@ -1,11 +1,11 @@ -using System; -using NServiceBus; - -namespace OrderService.Messages -{ - public interface CancelOrderMessage : IMessage - { - string PurchaseOrderNumber { get; set; } - Guid PartnerId { get; set; } - } -} +using System; +using NServiceBus; + +namespace OrderService.Messages +{ + public interface CancelOrderMessage : IMessage + { + string PurchaseOrderNumber { get; set; } + Guid PartnerId { get; set; } + } +} diff --git a/Samples/Manufacturing/OrderService/OrderService.Messages/OrderLine.cs b/Samples/Manufacturing/OrderService/OrderService.Messages/OrderLine.cs index a91e736912b..f453154727e 100644 --- a/Samples/Manufacturing/OrderService/OrderService.Messages/OrderLine.cs +++ b/Samples/Manufacturing/OrderService/OrderService.Messages/OrderLine.cs @@ -1,12 +1,12 @@ -using System; -using HR.Messages; -using NServiceBus; - -namespace OrderService.Messages -{ - public interface OrderLine : IMessage - { - Guid ProductId { get; set; } - float Quantity { get; set; } - } -} +using System; +using HR.Messages; +using NServiceBus; + +namespace OrderService.Messages +{ + public interface OrderLine : IMessage + { + Guid ProductId { get; set; } + float Quantity { get; set; } + } +} diff --git a/Samples/Manufacturing/OrderService/OrderService.Messages/OrderMessage.cs b/Samples/Manufacturing/OrderService/OrderService.Messages/OrderMessage.cs index 0e6ee5c7a0c..429a68ae685 100644 --- a/Samples/Manufacturing/OrderService/OrderService.Messages/OrderMessage.cs +++ b/Samples/Manufacturing/OrderService/OrderService.Messages/OrderMessage.cs @@ -1,15 +1,15 @@ -using System; -using System.Collections.Generic; -using NServiceBus; - -namespace OrderService.Messages -{ - public interface OrderMessage : IMessage - { - bool Done { get; set; } - DateTime ProvideBy { get; set; } - List OrderLines { get; set; } - string PurchaseOrderNumber { get; set; } - Guid PartnerId { get; set; } - } -} +using System; +using System.Collections.Generic; +using NServiceBus; + +namespace OrderService.Messages +{ + public interface OrderMessage : IMessage + { + bool Done { get; set; } + DateTime ProvideBy { get; set; } + List OrderLines { get; set; } + string PurchaseOrderNumber { get; set; } + Guid PartnerId { get; set; } + } +} diff --git a/Samples/Manufacturing/OrderService/OrderService.Messages/OrderService.Messages.csproj b/Samples/Manufacturing/OrderService/OrderService.Messages/OrderService.Messages.csproj index f5adad6b4c5..13ab0e6a7d7 100644 --- a/Samples/Manufacturing/OrderService/OrderService.Messages/OrderService.Messages.csproj +++ b/Samples/Manufacturing/OrderService/OrderService.Messages/OrderService.Messages.csproj @@ -1,105 +1,105 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {A490D793-1D1D-486F-B808-827010EF8369} - Library - Properties - OrderService.Messages - OrderService.Messages - - - - - - v4.0 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\..\binaries\NServiceBus.dll - - - - - - - - - - - - - - - - - - {BAC04722-7E15-485E-BA17-3EC46AB7FC3C} - HR.Messages - False - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {A490D793-1D1D-486F-B808-827010EF8369} + Library + Properties + OrderService.Messages + OrderService.Messages + + + + + + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\..\binaries\NServiceBus.dll + + + + + + + + + + + + + + + + + + {BAC04722-7E15-485E-BA17-3EC46AB7FC3C} + HR.Messages + False + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + \ No newline at end of file diff --git a/Samples/Manufacturing/OrderService/OrderService.Messages/OrderStatusChangedMessage.cs b/Samples/Manufacturing/OrderService/OrderService.Messages/OrderStatusChangedMessage.cs index 205669f36ef..4d19e00515d 100644 --- a/Samples/Manufacturing/OrderService/OrderService.Messages/OrderStatusChangedMessage.cs +++ b/Samples/Manufacturing/OrderService/OrderService.Messages/OrderStatusChangedMessage.cs @@ -1,14 +1,14 @@ -using System; -using System.Collections.Generic; -using NServiceBus; - -namespace OrderService.Messages -{ - public interface OrderStatusChangedMessage : IMessage - { - string PurchaseOrderNumber { get; set; } - Guid PartnerId { get; set; } - OrderStatusEnum Status { get; set; } - List OrderLines { get; set; } - } -} +using System; +using System.Collections.Generic; +using NServiceBus; + +namespace OrderService.Messages +{ + public interface OrderStatusChangedMessage : IMessage + { + string PurchaseOrderNumber { get; set; } + Guid PartnerId { get; set; } + OrderStatusEnum Status { get; set; } + List OrderLines { get; set; } + } +} diff --git a/Samples/Manufacturing/OrderService/OrderService.Messages/OrderStatusEnum.cs b/Samples/Manufacturing/OrderService/OrderService.Messages/OrderStatusEnum.cs index 9a23f901f23..42bb7e65f08 100644 --- a/Samples/Manufacturing/OrderService/OrderService.Messages/OrderStatusEnum.cs +++ b/Samples/Manufacturing/OrderService/OrderService.Messages/OrderStatusEnum.cs @@ -1,11 +1,11 @@ -namespace OrderService.Messages -{ - public enum OrderStatusEnum - { - Tentative, - Recieved, - Authorized, - Rejected, - Accepted - } -} +namespace OrderService.Messages +{ + public enum OrderStatusEnum + { + Tentative, + Recieved, + Authorized, + Rejected, + Accepted + } +} diff --git a/Samples/Manufacturing/OrderService/OrderService.Messages/Properties/AssemblyInfo.cs b/Samples/Manufacturing/OrderService/OrderService.Messages/Properties/AssemblyInfo.cs index cc66e383e0f..127aebd64a0 100644 --- a/Samples/Manufacturing/OrderService/OrderService.Messages/Properties/AssemblyInfo.cs +++ b/Samples/Manufacturing/OrderService/OrderService.Messages/Properties/AssemblyInfo.cs @@ -1,35 +1,35 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Messages")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Messages")] -[assembly: AssemblyCopyright("Copyright © 2008")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("304e0ad9-8837-4233-a9c4-d888c072987f")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Messages")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Messages")] +[assembly: AssemblyCopyright("Copyright © 2008")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("304e0ad9-8837-4233-a9c4-d888c072987f")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/Manufacturing/OrderService/OrderService.Tests/OrderSagaTests.cs b/Samples/Manufacturing/OrderService/OrderService.Tests/OrderSagaTests.cs index 62d324029e9..d6b61e62272 100644 --- a/Samples/Manufacturing/OrderService/OrderService.Tests/OrderSagaTests.cs +++ b/Samples/Manufacturing/OrderService/OrderService.Tests/OrderSagaTests.cs @@ -1,138 +1,138 @@ -using System; -using System.Collections.Generic; -using HR.Messages; -using NServiceBus.Saga; -using NServiceBus.Testing; -using OrderService.Messages; -using NUnit.Framework; -using NServiceBus; - -namespace OrderService.Tests -{ - [TestFixture] - public class OrderSagaTests - { - #region members - - string partnerAddress; - Guid productId; - float quantity; - Guid partnerId; - string purchaseOrderNumber; - List orderLines; - - #endregion - - [TestFixtureSetUp] - public void Setup() - { - Test.Initialize(); - - partnerAddress = "partner"; - productId = Guid.NewGuid(); - quantity = 10.0F; - partnerId = Guid.NewGuid(); - purchaseOrderNumber = Guid.NewGuid().ToString(); - orderLines = new List(); - orderLines.Add(ol => { ol.ProductId = productId; ol.Quantity = quantity; }); - } - - [Test] - public void OrderSagaTest() - { - var sagaId = Guid.NewGuid(); - - Test.Saga(sagaId).WhenReceivesMessageFrom(partnerAddress) - .ExpectReplyToOrginator(m => (Check(m, OrderStatusEnum.Recieved))) - .ExpectPublish(m => Check(m, OrderStatusEnum.Recieved)) - .ExpectSend(Check) - .ExpectSend(m => m.SagaId == sagaId) - .When(os => os.Handle(CreateRequest())) - - .ExpectReplyToOrginator(m => (Check(m, OrderStatusEnum.Accepted))) - .ExpectPublish(m => Check(m, OrderStatusEnum.Accepted)) - .When(os => os.Handle(CreateResponse(sagaId))); - } - - [Test] - public void TimeoutTest() - { - object state = null; - var sagaId = Guid.NewGuid(); - - Test.Saga(sagaId).WhenReceivesMessageFrom(partnerAddress) - .ExpectReplyToOrginator(m => (Check(m, OrderStatusEnum.Recieved))) - .ExpectPublish(m => Check(m, OrderStatusEnum.Recieved)) - .ExpectSend(Check) - .ExpectSend(m => { state = m.State; return m.SagaId == sagaId; }) - .When(os => os.Handle(CreateRequest())) - - .ExpectReplyToOrginator(m => (Check(m, OrderStatusEnum.Accepted))) - .ExpectPublish(m => BasicCheck(m, OrderStatusEnum.Accepted)) - .When(os => os.Timeout(state)) - - .AssertSagaCompletionIs(true); - } - - #region helper methods - - private OrderMessage CreateRequest() - { - return Test.CreateInstance(m => - { - m.PurchaseOrderNumber = purchaseOrderNumber; - m.PartnerId = partnerId; - m.Done = true; - m.ProvideBy = DateTime.Now + TimeSpan.FromDays(2); - m.OrderLines = orderLines; - }); - } - - private OrderAuthorizationResponseMessage CreateResponse(Guid sagaId) - { - var hrLines = new List - { - Test.CreateInstance(m => - { - m.ProductId = productId; - m.Quantity = quantity; - }) - }; - - return Test.CreateInstance(m => { m.SagaId = sagaId; m.Success = true; m.OrderLines = hrLines; }); - } - - private bool Check(OrderStatusChangedMessage m, OrderStatusEnum status) - { - return ( - m.PartnerId == partnerId && - m.PurchaseOrderNumber == purchaseOrderNumber && - m.Status == status && - m.OrderLines.Count == 1 && - m.OrderLines[0].ProductId == productId && - m.OrderLines[0].Quantity == quantity - ); - } - - private bool Check(RequestOrderAuthorizationMessage m) - { - return ( - m.PartnerId == partnerId && - m.OrderLines.Count == 1 && - m.OrderLines[0].ProductId == productId && - m.OrderLines[0].Quantity == quantity - ); - } - - private bool BasicCheck(OrderStatusChangedMessage m, OrderStatusEnum status) - { - return ( - m.PartnerId == partnerId && - m.PurchaseOrderNumber == purchaseOrderNumber && - m.Status == status - ); - } - #endregion - - } -} +using System; +using System.Collections.Generic; +using HR.Messages; +using NServiceBus.Saga; +using NServiceBus.Testing; +using OrderService.Messages; +using NUnit.Framework; +using NServiceBus; + +namespace OrderService.Tests +{ + [TestFixture] + public class OrderSagaTests + { + #region members + + string partnerAddress; + Guid productId; + float quantity; + Guid partnerId; + string purchaseOrderNumber; + List orderLines; + + #endregion + + [TestFixtureSetUp] + public void Setup() + { + Test.Initialize(); + + partnerAddress = "partner"; + productId = Guid.NewGuid(); + quantity = 10.0F; + partnerId = Guid.NewGuid(); + purchaseOrderNumber = Guid.NewGuid().ToString(); + orderLines = new List(); + orderLines.Add(ol => { ol.ProductId = productId; ol.Quantity = quantity; }); + } + + [Test] + public void OrderSagaTest() + { + var sagaId = Guid.NewGuid(); + + Test.Saga(sagaId).WhenReceivesMessageFrom(partnerAddress) + .ExpectReplyToOrginator(m => (Check(m, OrderStatusEnum.Recieved))) + .ExpectPublish(m => Check(m, OrderStatusEnum.Recieved)) + .ExpectSend(Check) + .ExpectSend(m => m.SagaId == sagaId) + .When(os => os.Handle(CreateRequest())) + + .ExpectReplyToOrginator(m => (Check(m, OrderStatusEnum.Accepted))) + .ExpectPublish(m => Check(m, OrderStatusEnum.Accepted)) + .When(os => os.Handle(CreateResponse(sagaId))); + } + + [Test] + public void TimeoutTest() + { + object state = null; + var sagaId = Guid.NewGuid(); + + Test.Saga(sagaId).WhenReceivesMessageFrom(partnerAddress) + .ExpectReplyToOrginator(m => (Check(m, OrderStatusEnum.Recieved))) + .ExpectPublish(m => Check(m, OrderStatusEnum.Recieved)) + .ExpectSend(Check) + .ExpectSend(m => { state = m.State; return m.SagaId == sagaId; }) + .When(os => os.Handle(CreateRequest())) + + .ExpectReplyToOrginator(m => (Check(m, OrderStatusEnum.Accepted))) + .ExpectPublish(m => BasicCheck(m, OrderStatusEnum.Accepted)) + .When(os => os.Timeout(state)) + + .AssertSagaCompletionIs(true); + } + + #region helper methods + + private OrderMessage CreateRequest() + { + return Test.CreateInstance(m => + { + m.PurchaseOrderNumber = purchaseOrderNumber; + m.PartnerId = partnerId; + m.Done = true; + m.ProvideBy = DateTime.Now + TimeSpan.FromDays(2); + m.OrderLines = orderLines; + }); + } + + private OrderAuthorizationResponseMessage CreateResponse(Guid sagaId) + { + var hrLines = new List + { + Test.CreateInstance(m => + { + m.ProductId = productId; + m.Quantity = quantity; + }) + }; + + return Test.CreateInstance(m => { m.SagaId = sagaId; m.Success = true; m.OrderLines = hrLines; }); + } + + private bool Check(OrderStatusChangedMessage m, OrderStatusEnum status) + { + return ( + m.PartnerId == partnerId && + m.PurchaseOrderNumber == purchaseOrderNumber && + m.Status == status && + m.OrderLines.Count == 1 && + m.OrderLines[0].ProductId == productId && + m.OrderLines[0].Quantity == quantity + ); + } + + private bool Check(RequestOrderAuthorizationMessage m) + { + return ( + m.PartnerId == partnerId && + m.OrderLines.Count == 1 && + m.OrderLines[0].ProductId == productId && + m.OrderLines[0].Quantity == quantity + ); + } + + private bool BasicCheck(OrderStatusChangedMessage m, OrderStatusEnum status) + { + return ( + m.PartnerId == partnerId && + m.PurchaseOrderNumber == purchaseOrderNumber && + m.Status == status + ); + } + #endregion + + } +} diff --git a/Samples/Manufacturing/OrderService/OrderService.Tests/OrderService.Tests.csproj b/Samples/Manufacturing/OrderService/OrderService.Tests/OrderService.Tests.csproj index 08059b06d7b..afa277bafd8 100644 --- a/Samples/Manufacturing/OrderService/OrderService.Tests/OrderService.Tests.csproj +++ b/Samples/Manufacturing/OrderService/OrderService.Tests/OrderService.Tests.csproj @@ -1,124 +1,124 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {CB39076B-B46C-416A-A9C1-D1032B4C50D6} - Library - Properties - OrderService.Tests - OrderService.Tests - - - - - - v4.0 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\..\lib\log4net.dll - - - False - ..\..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\..\binaries\NServiceBus.Core.dll - - - False - ..\..\..\..\binaries\NServiceBus.Testing.dll - - - False - ..\..\..\..\binaries\nunit.framework.dll - - - - - - - - - - - - - - {BAC04722-7E15-485E-BA17-3EC46AB7FC3C} - HR.Messages - - - {A490D793-1D1D-486F-B808-827010EF8369} - OrderService.Messages - - - {452C5FEA-16C8-49E1-BC95-1EC55E49EECB} - OrderService %28Samples\Manufacturing\OrderService\OrderService%29 - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {CB39076B-B46C-416A-A9C1-D1032B4C50D6} + Library + Properties + OrderService.Tests + OrderService.Tests + + + + + + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\..\lib\log4net.dll + + + False + ..\..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\..\binaries\NServiceBus.Core.dll + + + False + ..\..\..\..\binaries\NServiceBus.Testing.dll + + + False + ..\..\..\..\binaries\nunit.framework.dll + + + + + + + + + + + + + + {BAC04722-7E15-485E-BA17-3EC46AB7FC3C} + HR.Messages + + + {A490D793-1D1D-486F-B808-827010EF8369} + OrderService.Messages + + + {452C5FEA-16C8-49E1-BC95-1EC55E49EECB} + OrderService %28Samples\Manufacturing\OrderService\OrderService%29 + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + \ No newline at end of file diff --git a/Samples/Manufacturing/OrderService/OrderService.Tests/Properties/AssemblyInfo.cs b/Samples/Manufacturing/OrderService/OrderService.Tests/Properties/AssemblyInfo.cs index 65dc5b2c5c4..38fc5eb9f76 100644 --- a/Samples/Manufacturing/OrderService/OrderService.Tests/Properties/AssemblyInfo.cs +++ b/Samples/Manufacturing/OrderService/OrderService.Tests/Properties/AssemblyInfo.cs @@ -1,35 +1,35 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OrderService.Tests")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("OrderService.Tests")] -[assembly: AssemblyCopyright("Copyright © 2008")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("380775e6-942a-40fe-a0a1-53eb267960f4")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("OrderService.Tests")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("OrderService.Tests")] +[assembly: AssemblyCopyright("Copyright © 2008")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("380775e6-942a-40fe-a0a1-53eb267960f4")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/Manufacturing/OrderService/OrderService/App.config b/Samples/Manufacturing/OrderService/OrderService/App.config index d917835949f..6a32c5c073c 100644 --- a/Samples/Manufacturing/OrderService/OrderService/App.config +++ b/Samples/Manufacturing/OrderService/OrderService/App.config @@ -1,51 +1,51 @@ - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Samples/Manufacturing/OrderService/OrderService/EndpointConfig.cs b/Samples/Manufacturing/OrderService/OrderService/EndpointConfig.cs index 3b56a627e92..efa86269281 100644 --- a/Samples/Manufacturing/OrderService/OrderService/EndpointConfig.cs +++ b/Samples/Manufacturing/OrderService/OrderService/EndpointConfig.cs @@ -1,6 +1,6 @@ -using NServiceBus; - -namespace OrderService -{ - public class EndpointConfig : IConfigureThisEndpoint, AsA_Publisher { } +using NServiceBus; + +namespace OrderService +{ + public class EndpointConfig : IConfigureThisEndpoint, AsA_Publisher { } } \ No newline at end of file diff --git a/Samples/Manufacturing/OrderService/OrderService/OrderSaga.cs b/Samples/Manufacturing/OrderService/OrderService/OrderSaga.cs index f11df09c714..743c0b96285 100644 --- a/Samples/Manufacturing/OrderService/OrderService/OrderSaga.cs +++ b/Samples/Manufacturing/OrderService/OrderService/OrderSaga.cs @@ -1,131 +1,131 @@ -using System; -using System.Collections.Generic; -using HR.Messages; -using NServiceBus.Saga; -using OrderService.Messages; -using NServiceBus; - -namespace OrderService -{ - public class OrderSaga : Saga, - IAmStartedByMessages, - IHandleMessages, - IHandleMessages - { - public override void ConfigureHowToFindSaga() - { - ConfigureMapping(s => s.PurchaseOrderNumber, m => m.PurchaseOrderNumber); - ConfigureMapping(s => s.PurchaseOrderNumber, m => m.PurchaseOrderNumber); - } - - public void Handle(OrderMessage message) - { - Console.WriteLine("======================================================================"); - - Data.PurchaseOrderNumber = message.PurchaseOrderNumber; - Data.PartnerId = message.PartnerId; - Data.ProvideBy = message.ProvideBy; - - foreach (Messages.OrderLine ol in message.OrderLines) - Data.UpdateOrderLine(ol.ProductId, ol.Quantity); - - var status = GetStatus(OrderStatusEnum.Recieved, GetOrderLines(Data.OrderLines)); - - if (message.Done) - { - ReplyToOriginator(status); - Bus.Publish(status); - - Bus.Send(m => { m.SagaId = Data.Id; m.PartnerId = Data.PartnerId; m.OrderLines = Convert(status.OrderLines); }); - - RequestTimeout(Data.ProvideBy - TimeSpan.FromSeconds(2), "state"); - } - else - { - status.Status = OrderStatusEnum.Tentative; - Bus.Publish(status); - } - } - - public void Handle(OrderAuthorizationResponseMessage message) - { - Console.WriteLine("======================================================================"); - - var status = GetStatus( - (message.Success ? OrderStatusEnum.Authorized : OrderStatusEnum.Rejected), - GetOrderLines(message.OrderLines)); - - ReplyToOriginator(status); - Bus.Publish(status); - - foreach (var ol in message.OrderLines) - Data.UpdateAuthorization(message.Success, ol.ProductId, ol.Quantity); - - if (Data.IsAuthorized()) - Complete(); - } - - public void Handle(CancelOrderMessage message) - { - Console.WriteLine("======================================================================"); - - } - - private void Complete() - { - var finalStatus = GetStatus(OrderStatusEnum.Accepted, GetOrderLines(Data.OrderLines)); - - Bus.Publish(finalStatus); - ReplyToOriginator(finalStatus); - - MarkAsComplete(); - } - - public override void Timeout(object state) - { - Console.WriteLine("======================================================================"); - - Complete(); - } - - private List Convert(List list) where T : Messages.OrderLine where K : IOrderLine - { - var result = new List(list.Count); - - list.ForEach(ol => result.Add(Bus.CreateInstance(k => { k.ProductId = ol.ProductId; k.Quantity = ol.Quantity; }))); - - return result; - } - - private static List GetOrderLines(IEnumerable lines) - { - var result = new List(); - - foreach (OrderLine ol in lines) - result.Add(o => { o.ProductId = ol.ProductId; o.Quantity = ol.Quantity; }); - - return result; - } - - private OrderStatusChangedMessage GetStatus(OrderStatusEnum status, List lines) - { - return Bus.CreateInstance(m => - { - m.PurchaseOrderNumber = Data.PurchaseOrderNumber; - m.PartnerId = Data.PartnerId; - m.Status = status; - m.OrderLines = lines; - }); - } - - private static List GetOrderLines(IEnumerable lines) - { - var result = new List(); - - foreach (IOrderLine ol in lines) - result.Add(o => { o.ProductId = ol.ProductId; o.Quantity = ol.Quantity; }); - - return result; - } - } -} +using System; +using System.Collections.Generic; +using HR.Messages; +using NServiceBus.Saga; +using OrderService.Messages; +using NServiceBus; + +namespace OrderService +{ + public class OrderSaga : Saga, + IAmStartedByMessages, + IHandleMessages, + IHandleMessages + { + public override void ConfigureHowToFindSaga() + { + ConfigureMapping(s => s.PurchaseOrderNumber, m => m.PurchaseOrderNumber); + ConfigureMapping(s => s.PurchaseOrderNumber, m => m.PurchaseOrderNumber); + } + + public void Handle(OrderMessage message) + { + Console.WriteLine("======================================================================"); + + Data.PurchaseOrderNumber = message.PurchaseOrderNumber; + Data.PartnerId = message.PartnerId; + Data.ProvideBy = message.ProvideBy; + + foreach (Messages.OrderLine ol in message.OrderLines) + Data.UpdateOrderLine(ol.ProductId, ol.Quantity); + + var status = GetStatus(OrderStatusEnum.Recieved, GetOrderLines(Data.OrderLines)); + + if (message.Done) + { + ReplyToOriginator(status); + Bus.Publish(status); + + Bus.Send(m => { m.SagaId = Data.Id; m.PartnerId = Data.PartnerId; m.OrderLines = Convert(status.OrderLines); }); + + RequestTimeout(Data.ProvideBy - TimeSpan.FromSeconds(2), "state"); + } + else + { + status.Status = OrderStatusEnum.Tentative; + Bus.Publish(status); + } + } + + public void Handle(OrderAuthorizationResponseMessage message) + { + Console.WriteLine("======================================================================"); + + var status = GetStatus( + (message.Success ? OrderStatusEnum.Authorized : OrderStatusEnum.Rejected), + GetOrderLines(message.OrderLines)); + + ReplyToOriginator(status); + Bus.Publish(status); + + foreach (var ol in message.OrderLines) + Data.UpdateAuthorization(message.Success, ol.ProductId, ol.Quantity); + + if (Data.IsAuthorized()) + Complete(); + } + + public void Handle(CancelOrderMessage message) + { + Console.WriteLine("======================================================================"); + + } + + private void Complete() + { + var finalStatus = GetStatus(OrderStatusEnum.Accepted, GetOrderLines(Data.OrderLines)); + + Bus.Publish(finalStatus); + ReplyToOriginator(finalStatus); + + MarkAsComplete(); + } + + public override void Timeout(object state) + { + Console.WriteLine("======================================================================"); + + Complete(); + } + + private List Convert(List list) where T : Messages.OrderLine where K : IOrderLine + { + var result = new List(list.Count); + + list.ForEach(ol => result.Add(Bus.CreateInstance(k => { k.ProductId = ol.ProductId; k.Quantity = ol.Quantity; }))); + + return result; + } + + private static List GetOrderLines(IEnumerable lines) + { + var result = new List(); + + foreach (OrderLine ol in lines) + result.Add(o => { o.ProductId = ol.ProductId; o.Quantity = ol.Quantity; }); + + return result; + } + + private OrderStatusChangedMessage GetStatus(OrderStatusEnum status, List lines) + { + return Bus.CreateInstance(m => + { + m.PurchaseOrderNumber = Data.PurchaseOrderNumber; + m.PartnerId = Data.PartnerId; + m.Status = status; + m.OrderLines = lines; + }); + } + + private static List GetOrderLines(IEnumerable lines) + { + var result = new List(); + + foreach (IOrderLine ol in lines) + result.Add(o => { o.ProductId = ol.ProductId; o.Quantity = ol.Quantity; }); + + return result; + } + } +} diff --git a/Samples/Manufacturing/OrderService/OrderService/OrderSagaData.cs b/Samples/Manufacturing/OrderService/OrderService/OrderSagaData.cs index e9b9a62b66a..2a3a3ffa122 100644 --- a/Samples/Manufacturing/OrderService/OrderService/OrderSagaData.cs +++ b/Samples/Manufacturing/OrderService/OrderService/OrderSagaData.cs @@ -1,78 +1,78 @@ -using System; -using System.Collections.Generic; -using NServiceBus.Saga; - -namespace OrderService -{ - public class OrderSagaData : IContainSagaData - { - public virtual Guid Id { get; set; } - public virtual string Originator { get; set; } - public virtual string OriginalMessageId { get; set; } - public virtual string PurchaseOrderNumber { get; set; } - public virtual Guid PartnerId { get; set; } - public virtual DateTime ProvideBy { get; set; } - - public virtual void UpdateOrderLine(Guid productId, float quantity) - { - bool found = false; - - foreach (OrderLine line in OrderLines) - if (line.ProductId == productId) - { - line.Quantity = quantity; - found = true; - } - - if (!found) - OrderLines.Add(new OrderLine { Order = this, ProductId = productId, Quantity = quantity }); - } - - public virtual void UpdateAuthorization(bool authorized, Guid productId, float quantity) - { - OrderLine toRemove = null; - - foreach (OrderLine line in OrderLines) - if (line.ProductId == productId) - if (authorized) - line.AuthorizedQuantity = quantity; - else - toRemove = line; - - if (toRemove != null) - OrderLines.Remove(toRemove); - } - - public virtual bool IsAuthorized() - { - foreach(OrderLine line in OrderLines) - if (line.Quantity != line.AuthorizedQuantity) - return false; - - return true; - } - - - private IList orderLines; - - public virtual IList OrderLines - { - get - { - if (orderLines == null) - orderLines = new List(); - return orderLines; - } - set { orderLines = value; } - } - } - - public class OrderLine - { - public virtual Guid Id { get; set; } - public virtual OrderSagaData Order { get; set; } - public virtual Guid ProductId { get; set; } - public virtual float Quantity { get; set; } - public virtual float AuthorizedQuantity { get; set; } - } -} +using System; +using System.Collections.Generic; +using NServiceBus.Saga; + +namespace OrderService +{ + public class OrderSagaData : IContainSagaData + { + public virtual Guid Id { get; set; } + public virtual string Originator { get; set; } + public virtual string OriginalMessageId { get; set; } + public virtual string PurchaseOrderNumber { get; set; } + public virtual Guid PartnerId { get; set; } + public virtual DateTime ProvideBy { get; set; } + + public virtual void UpdateOrderLine(Guid productId, float quantity) + { + bool found = false; + + foreach (OrderLine line in OrderLines) + if (line.ProductId == productId) + { + line.Quantity = quantity; + found = true; + } + + if (!found) + OrderLines.Add(new OrderLine { Order = this, ProductId = productId, Quantity = quantity }); + } + + public virtual void UpdateAuthorization(bool authorized, Guid productId, float quantity) + { + OrderLine toRemove = null; + + foreach (OrderLine line in OrderLines) + if (line.ProductId == productId) + if (authorized) + line.AuthorizedQuantity = quantity; + else + toRemove = line; + + if (toRemove != null) + OrderLines.Remove(toRemove); + } + + public virtual bool IsAuthorized() + { + foreach(OrderLine line in OrderLines) + if (line.Quantity != line.AuthorizedQuantity) + return false; + + return true; + } + + + private IList orderLines; + + public virtual IList OrderLines + { + get + { + if (orderLines == null) + orderLines = new List(); + return orderLines; + } + set { orderLines = value; } + } + } + + public class OrderLine + { + public virtual Guid Id { get; set; } + public virtual OrderSagaData Order { get; set; } + public virtual Guid ProductId { get; set; } + public virtual float Quantity { get; set; } + public virtual float AuthorizedQuantity { get; set; } + } +} diff --git a/Samples/Manufacturing/OrderService/OrderService/OrderService.csproj b/Samples/Manufacturing/OrderService/OrderService/OrderService.csproj index 7a895cb80e3..07d0c289157 100644 --- a/Samples/Manufacturing/OrderService/OrderService/OrderService.csproj +++ b/Samples/Manufacturing/OrderService/OrderService/OrderService.csproj @@ -1,130 +1,130 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {452C5FEA-16C8-49E1-BC95-1EC55E49EECB} - Library - Properties - OrderService - OrderService - - - - - - v4.0 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\..\binaries\log4net.dll - - - False - ..\..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\..\binaries\NServiceBus.Core.dll - - - False - ..\..\..\..\binaries\NServiceBus.Host.exe - - - - - - - False - ..\..\..\..\binaries\System.Data.SQLite.DLL - - - - - - - - - - - - {BAC04722-7E15-485E-BA17-3EC46AB7FC3C} - HR.Messages - - - {A490D793-1D1D-486F-B808-827010EF8369} - OrderService.Messages - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - Program - $(ProjectDir)$(OutputPath)NServiceBus.Host.exe - NServiceBus.Integration - AllRules.ruleset - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {452C5FEA-16C8-49E1-BC95-1EC55E49EECB} + Library + Properties + OrderService + OrderService + + + + + + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\..\binaries\log4net.dll + + + False + ..\..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\..\binaries\NServiceBus.Core.dll + + + False + ..\..\..\..\binaries\NServiceBus.Host.exe + + + + + + + False + ..\..\..\..\binaries\System.Data.SQLite.DLL + + + + + + + + + + + + {BAC04722-7E15-485E-BA17-3EC46AB7FC3C} + HR.Messages + + + {A490D793-1D1D-486F-B808-827010EF8369} + OrderService.Messages + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + Program + $(ProjectDir)$(OutputPath)NServiceBus.Host.exe + NServiceBus.Integration + AllRules.ruleset + \ No newline at end of file diff --git a/Samples/Manufacturing/OrderService/OrderService/Properties/AssemblyInfo.cs b/Samples/Manufacturing/OrderService/OrderService/Properties/AssemblyInfo.cs index 2a85d1a660b..829aa563e16 100644 --- a/Samples/Manufacturing/OrderService/OrderService/Properties/AssemblyInfo.cs +++ b/Samples/Manufacturing/OrderService/OrderService/Properties/AssemblyInfo.cs @@ -1,35 +1,35 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OrderService")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("OrderService")] -[assembly: AssemblyCopyright("Copyright © 2008")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("38ec37f2-ea0e-4edd-9c4b-b15a32e26fea")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("OrderService")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("OrderService")] +[assembly: AssemblyCopyright("Copyright © 2008")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("38ec37f2-ea0e-4edd-9c4b-b15a32e26fea")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/Manufacturing/Partner/App.config b/Samples/Manufacturing/Partner/App.config index 3d30234b7de..0898d545859 100644 --- a/Samples/Manufacturing/Partner/App.config +++ b/Samples/Manufacturing/Partner/App.config @@ -1,25 +1,25 @@ - - - -
-
- - - - - - - - - - - - - + + + +
+
+ + + + + + + + + + + + + diff --git a/Samples/Manufacturing/Partner/OrderStatusChangedMessageHandler.cs b/Samples/Manufacturing/Partner/OrderStatusChangedMessageHandler.cs index 58194e77bfa..d940b7837fd 100644 --- a/Samples/Manufacturing/Partner/OrderStatusChangedMessageHandler.cs +++ b/Samples/Manufacturing/Partner/OrderStatusChangedMessageHandler.cs @@ -1,15 +1,15 @@ -using System; -using NServiceBus; -using OrderService.Messages; - -namespace Partner -{ - public class OrderStatusChangedMessageHandler : IHandleMessages - { - public void Handle(OrderStatusChangedMessage message) - { - Console.WriteLine("Received status {0} for PO Number {1}.", Enum.GetName(typeof(OrderStatusEnum), message.Status), message.PurchaseOrderNumber); - } - } - -} +using System; +using NServiceBus; +using OrderService.Messages; + +namespace Partner +{ + public class OrderStatusChangedMessageHandler : IHandleMessages + { + public void Handle(OrderStatusChangedMessage message) + { + Console.WriteLine("Received status {0} for PO Number {1}.", Enum.GetName(typeof(OrderStatusEnum), message.Status), message.PurchaseOrderNumber); + } + } + +} diff --git a/Samples/Manufacturing/Partner/Partner.csproj b/Samples/Manufacturing/Partner/Partner.csproj index 2a483d858a2..f601fa3999d 100644 --- a/Samples/Manufacturing/Partner/Partner.csproj +++ b/Samples/Manufacturing/Partner/Partner.csproj @@ -1,116 +1,116 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {646585FC-12F6-4668-9926-A39E6CCD6400} - Exe - Properties - Partner - Partner - - - - - - v4.0 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\binaries\log4net.dll - - - False - ..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\binaries\NServiceBus.Core.dll - - - - - - - - - - - - - - - {BAC04722-7E15-485E-BA17-3EC46AB7FC3C} - HR.Messages - - - {A490D793-1D1D-486F-B808-827010EF8369} - OrderService.Messages - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {646585FC-12F6-4668-9926-A39E6CCD6400} + Exe + Properties + Partner + Partner + + + + + + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\binaries\log4net.dll + + + False + ..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\binaries\NServiceBus.Core.dll + + + + + + + + + + + + + + + {BAC04722-7E15-485E-BA17-3EC46AB7FC3C} + HR.Messages + + + {A490D793-1D1D-486F-B808-827010EF8369} + OrderService.Messages + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + \ No newline at end of file diff --git a/Samples/Manufacturing/Partner/Program.cs b/Samples/Manufacturing/Partner/Program.cs index 79f778ac64c..62a390eafc9 100644 --- a/Samples/Manufacturing/Partner/Program.cs +++ b/Samples/Manufacturing/Partner/Program.cs @@ -1,110 +1,110 @@ -using System; -using System.Collections.Generic; -using System.Threading; -using log4net; -using NServiceBus; -using OrderService.Messages; - -namespace Partner -{ - class Program - { - static void Main() - { - try - { - var bus = NServiceBus.Configure.With() - .DefaultBuilder() - .XmlSerializer() - .MsmqTransport() - .IsTransactional(true) - .PurgeOnStartup(false) - .UnicastBus() - .ImpersonateSender(false) - .LoadMessageHandlers() - .CreateBus() - .Start(); - - Guid partnerId = Guid.NewGuid(); - Guid productId = Guid.NewGuid(); - float quantity = 10.0F; - List orderlines; - - Console.WriteLine("Enter the quantity you wish to order.\nSignal a complete PO with 'y'.\nTo exit, enter 'q'."); - string line; - string poId = Guid.NewGuid().ToString(); - while ((line = Console.ReadLine().ToLower()) != "q") - { - if (line.ToLower().Contains("simulate")) - Simulate(bus, line.ToLower().Contains("step")); - - bool done = (line == "y"); - orderlines = new List(1); - - if (!done) - { - float.TryParse(line, out quantity); - orderlines.Add(ol => { ol.ProductId = productId; ol.Quantity = quantity; }); - } - - bus.Send(m => - { - m.PurchaseOrderNumber = poId; - m.PartnerId = partnerId; - m.Done = done; - m.ProvideBy = DateTime.Now + TimeSpan.FromSeconds(10); - m.OrderLines = orderlines; - }).Register(i => Console.WriteLine("OK")); - - Console.WriteLine("Send PO Number {0}.", poId); - - if (done) - poId = Guid.NewGuid().ToString(); - } - } - catch (Exception e) - { - LogManager.GetLogger("Partner").Fatal("Exiting", e); - Console.Read(); - } - } - - private static void Simulate(IBus bus, bool step) - { - Guid partnerId = Guid.NewGuid(); - - int numberOfLines; - int secondsToProvideBy; - - while(true) - { - Random r = new Random(); - - numberOfLines = 5 + r.Next(0, 5); - secondsToProvideBy = 5 + r.Next(0, 5); - string purchaseOrderNumber = Guid.NewGuid().ToString(); - - for (int i = 0; i < numberOfLines; i++) - { - bus.Send(m => - { - m.PurchaseOrderNumber = purchaseOrderNumber; - m.PartnerId = partnerId; - m.Done = (i == numberOfLines - 1); - m.ProvideBy = DateTime.Now + TimeSpan.FromSeconds(secondsToProvideBy); - m.OrderLines = new List { - bus.CreateInstance(ol => { - ol.ProductId = Guid.NewGuid(); - ol.Quantity = (float) (Math.Sqrt(2)*r.Next(10)); - }) - }; - }); - } - - Thread.Sleep(1000); - if (step) - Console.ReadLine(); - } - } - } -} +using System; +using System.Collections.Generic; +using System.Threading; +using log4net; +using NServiceBus; +using OrderService.Messages; + +namespace Partner +{ + class Program + { + static void Main() + { + try + { + var bus = NServiceBus.Configure.With() + .DefaultBuilder() + .XmlSerializer() + .MsmqTransport() + .IsTransactional(true) + .PurgeOnStartup(false) + .UnicastBus() + .ImpersonateSender(false) + .LoadMessageHandlers() + .CreateBus() + .Start(); + + Guid partnerId = Guid.NewGuid(); + Guid productId = Guid.NewGuid(); + float quantity = 10.0F; + List orderlines; + + Console.WriteLine("Enter the quantity you wish to order.\nSignal a complete PO with 'y'.\nTo exit, enter 'q'."); + string line; + string poId = Guid.NewGuid().ToString(); + while ((line = Console.ReadLine().ToLower()) != "q") + { + if (line.ToLower().Contains("simulate")) + Simulate(bus, line.ToLower().Contains("step")); + + bool done = (line == "y"); + orderlines = new List(1); + + if (!done) + { + float.TryParse(line, out quantity); + orderlines.Add(ol => { ol.ProductId = productId; ol.Quantity = quantity; }); + } + + bus.Send(m => + { + m.PurchaseOrderNumber = poId; + m.PartnerId = partnerId; + m.Done = done; + m.ProvideBy = DateTime.Now + TimeSpan.FromSeconds(10); + m.OrderLines = orderlines; + }).Register(i => Console.WriteLine("OK")); + + Console.WriteLine("Send PO Number {0}.", poId); + + if (done) + poId = Guid.NewGuid().ToString(); + } + } + catch (Exception e) + { + LogManager.GetLogger("Partner").Fatal("Exiting", e); + Console.Read(); + } + } + + private static void Simulate(IBus bus, bool step) + { + Guid partnerId = Guid.NewGuid(); + + int numberOfLines; + int secondsToProvideBy; + + while(true) + { + Random r = new Random(); + + numberOfLines = 5 + r.Next(0, 5); + secondsToProvideBy = 5 + r.Next(0, 5); + string purchaseOrderNumber = Guid.NewGuid().ToString(); + + for (int i = 0; i < numberOfLines; i++) + { + bus.Send(m => + { + m.PurchaseOrderNumber = purchaseOrderNumber; + m.PartnerId = partnerId; + m.Done = (i == numberOfLines - 1); + m.ProvideBy = DateTime.Now + TimeSpan.FromSeconds(secondsToProvideBy); + m.OrderLines = new List { + bus.CreateInstance(ol => { + ol.ProductId = Guid.NewGuid(); + ol.Quantity = (float) (Math.Sqrt(2)*r.Next(10)); + }) + }; + }); + } + + Thread.Sleep(1000); + if (step) + Console.ReadLine(); + } + } + } +} diff --git a/Samples/Manufacturing/Partner/Properties/AssemblyInfo.cs b/Samples/Manufacturing/Partner/Properties/AssemblyInfo.cs index e89d91a1942..2e63e1127fb 100644 --- a/Samples/Manufacturing/Partner/Properties/AssemblyInfo.cs +++ b/Samples/Manufacturing/Partner/Properties/AssemblyInfo.cs @@ -1,33 +1,33 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Partner")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Partner")] -[assembly: AssemblyCopyright("Copyright © 2008")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("2957cb13-b062-4f27-8a25-67e2461ad9a4")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Partner")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Partner")] +[assembly: AssemblyCopyright("Copyright © 2008")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("2957cb13-b062-4f27-8a25-67e2461ad9a4")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/Manufacturing/RunTimeoutManager.bat b/Samples/Manufacturing/RunTimeoutManager.bat index 8313986e749..9de96ed9e08 100644 --- a/Samples/Manufacturing/RunTimeoutManager.bat +++ b/Samples/Manufacturing/RunTimeoutManager.bat @@ -1,3 +1,3 @@ -pushd ..\..\processes\timeout\ - +pushd ..\..\processes\timeout\ + NServiceBus.Host.exe \ No newline at end of file diff --git a/Samples/Manufacturing/readme.txt b/Samples/Manufacturing/readme.txt index 5f17be94e28..459ad3e9bfe 100644 --- a/Samples/Manufacturing/readme.txt +++ b/Samples/Manufacturing/readme.txt @@ -1,6 +1,6 @@ -Since the saga in this sample uses timeouts, make sure to run the TimeoutManager process found in the directory /build/timeout/ of nServiceBus. - -This sample uses the MsmqSubscriptionStorage. If you want to try the DB Subscription Storage run the order service with a blank commandline. -If you do make sure to specify a db for the saga storage. (see comments in app.config of the orderservice) - +Since the saga in this sample uses timeouts, make sure to run the TimeoutManager process found in the directory /build/timeout/ of nServiceBus. + +This sample uses the MsmqSubscriptionStorage. If you want to try the DB Subscription Storage run the order service with a blank commandline. +If you do make sure to specify a db for the saga storage. (see comments in app.config of the orderservice) + Experiment with killing the hr process, and notice how the timeout causes the saga to complete anyway. \ No newline at end of file diff --git a/Samples/PubSub/MyMessages/Messages.cs b/Samples/PubSub/MyMessages/Messages.cs index e144cc955f9..bce2fe83390 100644 --- a/Samples/PubSub/MyMessages/Messages.cs +++ b/Samples/PubSub/MyMessages/Messages.cs @@ -1,20 +1,20 @@ -using NServiceBus; -using System; - -namespace MyMessages -{ - [Serializable] - public class EventMessage : IEvent - { - public Guid EventId { get; set; } - public DateTime? Time { get; set; } - public TimeSpan Duration { get; set; } - } - - public interface IEvent : IMessage - { - Guid EventId { get; set; } - DateTime? Time { get; set; } - TimeSpan Duration { get; set; } - } -} +using NServiceBus; +using System; + +namespace MyMessages +{ + [Serializable] + public class EventMessage : IEvent + { + public Guid EventId { get; set; } + public DateTime? Time { get; set; } + public TimeSpan Duration { get; set; } + } + + public interface IEvent : IMessage + { + Guid EventId { get; set; } + DateTime? Time { get; set; } + TimeSpan Duration { get; set; } + } +} diff --git a/Samples/PubSub/MyMessages/MyMessages.csproj b/Samples/PubSub/MyMessages/MyMessages.csproj index de110cc705b..2fc03e008bb 100644 --- a/Samples/PubSub/MyMessages/MyMessages.csproj +++ b/Samples/PubSub/MyMessages/MyMessages.csproj @@ -1,60 +1,60 @@ - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {5686FE6C-A5E3-40D1-A6BD-25F94DA612F8} - Library - Properties - MyMessages - MyMessages - - - - - - v4.0 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\binaries\NServiceBus.dll - - - - - - - - - - - - - - + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {5686FE6C-A5E3-40D1-A6BD-25F94DA612F8} + Library + Properties + MyMessages + MyMessages + + + + + + v4.0 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\binaries\NServiceBus.dll + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Samples/PubSub/MyMessages/Properties/AssemblyInfo.cs b/Samples/PubSub/MyMessages/Properties/AssemblyInfo.cs index 9cde7713a2b..983a52a727e 100644 --- a/Samples/PubSub/MyMessages/Properties/AssemblyInfo.cs +++ b/Samples/PubSub/MyMessages/Properties/AssemblyInfo.cs @@ -1,35 +1,35 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("MyMessages")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("MyMessages")] -[assembly: AssemblyCopyright("Copyright © 2007")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("5e94a240-87cd-470f-9633-adffc9532a22")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("MyMessages")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("MyMessages")] +[assembly: AssemblyCopyright("Copyright © 2007")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("5e94a240-87cd-470f-9633-adffc9532a22")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/PubSub/MyPublisher/App.config b/Samples/PubSub/MyPublisher/App.config index 7d5d9fb227c..47e20752f51 100644 --- a/Samples/PubSub/MyPublisher/App.config +++ b/Samples/PubSub/MyPublisher/App.config @@ -1,33 +1,33 @@ - - - -
-
- - - - - - - - - - - - - - - - - + + + +
+
+ + + + + + + + + + + + + + + + + diff --git a/Samples/PubSub/MyPublisher/EndpointConfig.cs b/Samples/PubSub/MyPublisher/EndpointConfig.cs index f5af6863609..3253b106b98 100644 --- a/Samples/PubSub/MyPublisher/EndpointConfig.cs +++ b/Samples/PubSub/MyPublisher/EndpointConfig.cs @@ -1,8 +1,8 @@ -using NServiceBus; -using NServiceBus.Grid.MessageHandlers; -using NServiceBus.Sagas.Impl; - -namespace MyPublisher -{ - class EndpointConfig : IConfigureThisEndpoint, AsA_Publisher {} -} +using NServiceBus; +using NServiceBus.Grid.MessageHandlers; +using NServiceBus.Sagas.Impl; + +namespace MyPublisher +{ + class EndpointConfig : IConfigureThisEndpoint, AsA_Publisher {} +} diff --git a/Samples/PubSub/MyPublisher/MyPublisher.csproj b/Samples/PubSub/MyPublisher/MyPublisher.csproj index e828162c8da..daf10a1e798 100644 --- a/Samples/PubSub/MyPublisher/MyPublisher.csproj +++ b/Samples/PubSub/MyPublisher/MyPublisher.csproj @@ -1,87 +1,87 @@ - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {7036A49B-359F-4BC7-AFBA-DE3C7AB41986} - Library - Properties - MyPublisher - MyPublisher - - - - - - v4.0 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\binaries\log4net.dll - - - False - ..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\binaries\NServiceBus.Core.dll - - - False - ..\..\..\binaries\NServiceBus.Host.exe - - - - - - - - - - - - - - - - - - PreserveNewest - - - - - {5686FE6C-A5E3-40D1-A6BD-25F94DA612F8} - MyMessages - - - - - - Program - $(ProjectDir)$(OutputPath)NServiceBus.Host.exe - + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {7036A49B-359F-4BC7-AFBA-DE3C7AB41986} + Library + Properties + MyPublisher + MyPublisher + + + + + + v4.0 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\binaries\log4net.dll + + + False + ..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\binaries\NServiceBus.Core.dll + + + False + ..\..\..\binaries\NServiceBus.Host.exe + + + + + + + + + + + + + + + + + + PreserveNewest + + + + + {5686FE6C-A5E3-40D1-A6BD-25F94DA612F8} + MyMessages + + + + + + Program + $(ProjectDir)$(OutputPath)NServiceBus.Host.exe + \ No newline at end of file diff --git a/Samples/PubSub/MyPublisher/NServiceBus.Host.exe.config b/Samples/PubSub/MyPublisher/NServiceBus.Host.exe.config index ed824dda22c..55afed52044 100644 --- a/Samples/PubSub/MyPublisher/NServiceBus.Host.exe.config +++ b/Samples/PubSub/MyPublisher/NServiceBus.Host.exe.config @@ -1,6 +1,6 @@ - - - - - + + + + + \ No newline at end of file diff --git a/Samples/PubSub/MyPublisher/Properties/AssemblyInfo.cs b/Samples/PubSub/MyPublisher/Properties/AssemblyInfo.cs index 3dcaa160a2a..f8865c60bca 100644 --- a/Samples/PubSub/MyPublisher/Properties/AssemblyInfo.cs +++ b/Samples/PubSub/MyPublisher/Properties/AssemblyInfo.cs @@ -1,33 +1,33 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("MyPublisher")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("MyPublisher")] -[assembly: AssemblyCopyright("Copyright © 2007")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("6d0a1864-1cf8-4f8a-90ae-bc3fda6179d9")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("MyPublisher")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("MyPublisher")] +[assembly: AssemblyCopyright("Copyright © 2007")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("6d0a1864-1cf8-4f8a-90ae-bc3fda6179d9")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/PubSub/MyPublisher/ServerEndpoint.cs b/Samples/PubSub/MyPublisher/ServerEndpoint.cs index 391cb38f8f3..af3b423d156 100644 --- a/Samples/PubSub/MyPublisher/ServerEndpoint.cs +++ b/Samples/PubSub/MyPublisher/ServerEndpoint.cs @@ -1,39 +1,39 @@ -using System; -using MyMessages; -using NServiceBus; - -namespace MyPublisher -{ - public class ServerEndpoint : IWantToRunAtStartup - { - public IBus Bus { get; set; } - - public void Run() - { - Console.WriteLine("This will publish IEvent and EventMessage alternately."); - Console.WriteLine("Press 'Enter' to publish a message.To exit, Ctrl + C"); - - bool publishIEvent = true; - while (Console.ReadLine() != null) - { - var eventMessage = publishIEvent ? Bus.CreateInstance() : new EventMessage(); - - eventMessage.EventId = Guid.NewGuid(); - eventMessage.Time = DateTime.Now.Second > 30 ? (DateTime?)DateTime.Now : null; - eventMessage.Duration = TimeSpan.FromSeconds(99999D); - - Bus.Publish(eventMessage); - - Console.WriteLine("Published event with Id {0}.", eventMessage.EventId); - Console.WriteLine("=========================================================================="); - - publishIEvent = !publishIEvent; - } - } - - public void Stop() - { - - } - } +using System; +using MyMessages; +using NServiceBus; + +namespace MyPublisher +{ + public class ServerEndpoint : IWantToRunAtStartup + { + public IBus Bus { get; set; } + + public void Run() + { + Console.WriteLine("This will publish IEvent and EventMessage alternately."); + Console.WriteLine("Press 'Enter' to publish a message.To exit, Ctrl + C"); + + bool publishIEvent = true; + while (Console.ReadLine() != null) + { + var eventMessage = publishIEvent ? Bus.CreateInstance() : new EventMessage(); + + eventMessage.EventId = Guid.NewGuid(); + eventMessage.Time = DateTime.Now.Second > 30 ? (DateTime?)DateTime.Now : null; + eventMessage.Duration = TimeSpan.FromSeconds(99999D); + + Bus.Publish(eventMessage); + + Console.WriteLine("Published event with Id {0}.", eventMessage.EventId); + Console.WriteLine("=========================================================================="); + + publishIEvent = !publishIEvent; + } + } + + public void Stop() + { + + } + } } \ No newline at end of file diff --git a/Samples/PubSub/MyPublisher/SubscriptionAuthorizer.cs b/Samples/PubSub/MyPublisher/SubscriptionAuthorizer.cs index 54c014b103b..bd9570bd239 100644 --- a/Samples/PubSub/MyPublisher/SubscriptionAuthorizer.cs +++ b/Samples/PubSub/MyPublisher/SubscriptionAuthorizer.cs @@ -1,18 +1,18 @@ -using System.Collections.Generic; -using NServiceBus; - -namespace MyPublisher -{ - public class SubscriptionAuthorizer : IAuthorizeSubscriptions - { - public bool AuthorizeSubscribe(string messageType, string clientEndpoint, IDictionary headers) - { - return true; - } - - public bool AuthorizeUnsubscribe(string messageType, string clientEndpoint, IDictionary headers) - { - return true; - } - } -} +using System.Collections.Generic; +using NServiceBus; + +namespace MyPublisher +{ + public class SubscriptionAuthorizer : IAuthorizeSubscriptions + { + public bool AuthorizeSubscribe(string messageType, string clientEndpoint, IDictionary headers) + { + return true; + } + + public bool AuthorizeUnsubscribe(string messageType, string clientEndpoint, IDictionary headers) + { + return true; + } + } +} diff --git a/Samples/PubSub/PubSub.sln b/Samples/PubSub/PubSub.sln index fc737d3d2d1..94df9e72dca 100644 --- a/Samples/PubSub/PubSub.sln +++ b/Samples/PubSub/PubSub.sln @@ -1,38 +1,38 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyMessages", "MyMessages\MyMessages.csproj", "{5686FE6C-A5E3-40D1-A6BD-25F94DA612F8}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyPublisher", "MyPublisher\MyPublisher.csproj", "{7036A49B-359F-4BC7-AFBA-DE3C7AB41986}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Subscriber1", "Subscriber1\Subscriber1.csproj", "{28DE496A-3885-410E-A0B8-004FAEFF9378}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Subscriber2", "Subscriber2\Subscriber2.csproj", "{6A699A4E-F2FD-4B71-AF73-199B499482BD}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {5686FE6C-A5E3-40D1-A6BD-25F94DA612F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5686FE6C-A5E3-40D1-A6BD-25F94DA612F8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5686FE6C-A5E3-40D1-A6BD-25F94DA612F8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5686FE6C-A5E3-40D1-A6BD-25F94DA612F8}.Release|Any CPU.Build.0 = Release|Any CPU - {7036A49B-359F-4BC7-AFBA-DE3C7AB41986}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7036A49B-359F-4BC7-AFBA-DE3C7AB41986}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7036A49B-359F-4BC7-AFBA-DE3C7AB41986}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7036A49B-359F-4BC7-AFBA-DE3C7AB41986}.Release|Any CPU.Build.0 = Release|Any CPU - {28DE496A-3885-410E-A0B8-004FAEFF9378}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {28DE496A-3885-410E-A0B8-004FAEFF9378}.Debug|Any CPU.Build.0 = Debug|Any CPU - {28DE496A-3885-410E-A0B8-004FAEFF9378}.Release|Any CPU.ActiveCfg = Release|Any CPU - {28DE496A-3885-410E-A0B8-004FAEFF9378}.Release|Any CPU.Build.0 = Release|Any CPU - {6A699A4E-F2FD-4B71-AF73-199B499482BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6A699A4E-F2FD-4B71-AF73-199B499482BD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6A699A4E-F2FD-4B71-AF73-199B499482BD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6A699A4E-F2FD-4B71-AF73-199B499482BD}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyMessages", "MyMessages\MyMessages.csproj", "{5686FE6C-A5E3-40D1-A6BD-25F94DA612F8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MyPublisher", "MyPublisher\MyPublisher.csproj", "{7036A49B-359F-4BC7-AFBA-DE3C7AB41986}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Subscriber1", "Subscriber1\Subscriber1.csproj", "{28DE496A-3885-410E-A0B8-004FAEFF9378}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Subscriber2", "Subscriber2\Subscriber2.csproj", "{6A699A4E-F2FD-4B71-AF73-199B499482BD}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5686FE6C-A5E3-40D1-A6BD-25F94DA612F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5686FE6C-A5E3-40D1-A6BD-25F94DA612F8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5686FE6C-A5E3-40D1-A6BD-25F94DA612F8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5686FE6C-A5E3-40D1-A6BD-25F94DA612F8}.Release|Any CPU.Build.0 = Release|Any CPU + {7036A49B-359F-4BC7-AFBA-DE3C7AB41986}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7036A49B-359F-4BC7-AFBA-DE3C7AB41986}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7036A49B-359F-4BC7-AFBA-DE3C7AB41986}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7036A49B-359F-4BC7-AFBA-DE3C7AB41986}.Release|Any CPU.Build.0 = Release|Any CPU + {28DE496A-3885-410E-A0B8-004FAEFF9378}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28DE496A-3885-410E-A0B8-004FAEFF9378}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28DE496A-3885-410E-A0B8-004FAEFF9378}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28DE496A-3885-410E-A0B8-004FAEFF9378}.Release|Any CPU.Build.0 = Release|Any CPU + {6A699A4E-F2FD-4B71-AF73-199B499482BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6A699A4E-F2FD-4B71-AF73-199B499482BD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6A699A4E-F2FD-4B71-AF73-199B499482BD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6A699A4E-F2FD-4B71-AF73-199B499482BD}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Samples/PubSub/Subscriber1/App.config b/Samples/PubSub/Subscriber1/App.config index fcadc279e9b..eca34e85e76 100644 --- a/Samples/PubSub/Subscriber1/App.config +++ b/Samples/PubSub/Subscriber1/App.config @@ -1,26 +1,26 @@ - - - -
-
- - - - - - - - - - - - - + + + +
+
+ + + + + + + + + + + + + diff --git a/Samples/PubSub/Subscriber1/EndpointConfig.cs b/Samples/PubSub/Subscriber1/EndpointConfig.cs index caf2ee4cc45..c2d199dab72 100644 --- a/Samples/PubSub/Subscriber1/EndpointConfig.cs +++ b/Samples/PubSub/Subscriber1/EndpointConfig.cs @@ -1,6 +1,6 @@ -using NServiceBus; - -namespace Subscriber1 -{ - class EndpointConfig : IConfigureThisEndpoint, AsA_Server {} -} +using NServiceBus; + +namespace Subscriber1 +{ + class EndpointConfig : IConfigureThisEndpoint, AsA_Server {} +} diff --git a/Samples/PubSub/Subscriber1/EventMessageHandler.cs b/Samples/PubSub/Subscriber1/EventMessageHandler.cs index 0a920ac089e..20784c2aebd 100644 --- a/Samples/PubSub/Subscriber1/EventMessageHandler.cs +++ b/Samples/PubSub/Subscriber1/EventMessageHandler.cs @@ -1,20 +1,20 @@ -using System; -using log4net; -using MyMessages; -using NServiceBus; - -namespace Subscriber1 -{ - public class EventMessageHandler : IHandleMessages - { - public void Handle(EventMessage message) - { - Logger.Info(string.Format("Subscriber 1 received EventMessage with Id {0}.", message.EventId)); - Logger.Info(string.Format("Message time: {0}.", message.Time)); - Logger.Info(string.Format("Message duration: {0}.", message.Duration)); - Console.WriteLine("=========================================================================="); - } - - private static readonly ILog Logger = LogManager.GetLogger(typeof (EventMessageHandler)); - } -} +using System; +using log4net; +using MyMessages; +using NServiceBus; + +namespace Subscriber1 +{ + public class EventMessageHandler : IHandleMessages + { + public void Handle(EventMessage message) + { + Logger.Info(string.Format("Subscriber 1 received EventMessage with Id {0}.", message.EventId)); + Logger.Info(string.Format("Message time: {0}.", message.Time)); + Logger.Info(string.Format("Message duration: {0}.", message.Duration)); + Console.WriteLine("=========================================================================="); + } + + private static readonly ILog Logger = LogManager.GetLogger(typeof (EventMessageHandler)); + } +} diff --git a/Samples/PubSub/Subscriber1/Properties/AssemblyInfo.cs b/Samples/PubSub/Subscriber1/Properties/AssemblyInfo.cs index 5b9f173c230..ace03f54076 100644 --- a/Samples/PubSub/Subscriber1/Properties/AssemblyInfo.cs +++ b/Samples/PubSub/Subscriber1/Properties/AssemblyInfo.cs @@ -1,33 +1,33 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Client")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Client")] -[assembly: AssemblyCopyright("Copyright © 2007")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("9354e6a9-a8e5-4017-a67b-fd5075bd3941")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Client")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Client")] +[assembly: AssemblyCopyright("Copyright © 2007")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("9354e6a9-a8e5-4017-a67b-fd5075bd3941")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/PubSub/Subscriber1/Subscriber1.csproj b/Samples/PubSub/Subscriber1/Subscriber1.csproj index 359cc240c16..5c0f934951b 100644 --- a/Samples/PubSub/Subscriber1/Subscriber1.csproj +++ b/Samples/PubSub/Subscriber1/Subscriber1.csproj @@ -1,121 +1,121 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {28DE496A-3885-410E-A0B8-004FAEFF9378} - Library - Properties - Subscriber1 - Subscriber1 - - - - - - v4.0 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\binaries\log4net.dll - - - False - ..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\binaries\NServiceBus.Core.dll - - - False - ..\..\..\binaries\NServiceBus.Host.exe - - - - - - - - - - - - - - - - - - {5686FE6C-A5E3-40D1-A6BD-25F94DA612F8} - MyMessages - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - Program - $(ProjectDir)$(OutputPath)NServiceBus.Host.exe - NServiceBus.Integration - AllRules.ruleset - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {28DE496A-3885-410E-A0B8-004FAEFF9378} + Library + Properties + Subscriber1 + Subscriber1 + + + + + + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\binaries\log4net.dll + + + False + ..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\binaries\NServiceBus.Core.dll + + + False + ..\..\..\binaries\NServiceBus.Host.exe + + + + + + + + + + + + + + + + + + {5686FE6C-A5E3-40D1-A6BD-25F94DA612F8} + MyMessages + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + Program + $(ProjectDir)$(OutputPath)NServiceBus.Host.exe + NServiceBus.Integration + AllRules.ruleset + \ No newline at end of file diff --git a/Samples/PubSub/Subscriber2/App.config b/Samples/PubSub/Subscriber2/App.config index 8ec5e1abe12..0184370cf18 100644 --- a/Samples/PubSub/Subscriber2/App.config +++ b/Samples/PubSub/Subscriber2/App.config @@ -1,26 +1,26 @@ - - - -
-
- - - - - - - - - - - - - + + + +
+
+ + + + + + + + + + + + + diff --git a/Samples/PubSub/Subscriber2/EndpointConfig.cs b/Samples/PubSub/Subscriber2/EndpointConfig.cs index 0cd9e303bf4..3a449cc184e 100644 --- a/Samples/PubSub/Subscriber2/EndpointConfig.cs +++ b/Samples/PubSub/Subscriber2/EndpointConfig.cs @@ -1,16 +1,16 @@ -using NServiceBus; - -namespace Subscriber2 -{ - public class EndpointConfig : IConfigureThisEndpoint, AsA_Server, IWantCustomInitialization - { - public void Init() - { - NServiceBus.Configure.With() - .CastleWindsorBuilder() // just to show we can mix and match containers - .XmlSerializer() - .UnicastBus() - .DoNotAutoSubscribe(); //managed by the class Subscriber2Endpoint - } - } -} +using NServiceBus; + +namespace Subscriber2 +{ + public class EndpointConfig : IConfigureThisEndpoint, AsA_Server, IWantCustomInitialization + { + public void Init() + { + NServiceBus.Configure.With() + .CastleWindsorBuilder() // just to show we can mix and match containers + .XmlSerializer() + .UnicastBus() + .DoNotAutoSubscribe(); //managed by the class Subscriber2Endpoint + } + } +} diff --git a/Samples/PubSub/Subscriber2/EventMessageHandler.cs b/Samples/PubSub/Subscriber2/EventMessageHandler.cs index 0ec60ddba1e..e9bb0bc0415 100644 --- a/Samples/PubSub/Subscriber2/EventMessageHandler.cs +++ b/Samples/PubSub/Subscriber2/EventMessageHandler.cs @@ -1,20 +1,20 @@ -using System; -using log4net; -using MyMessages; -using NServiceBus; - -namespace Subscriber2 -{ - public class EventMessageHandler : IHandleMessages - { - public void Handle(IEvent message) - { - Logger.Info(string.Format("Subscriber 2 received IEvent with Id {0}.", message.EventId)); - Logger.Info(string.Format("Message time: {0}.", message.Time)); - Logger.Info(string.Format("Message duration: {0}.", message.Duration)); - Console.WriteLine("=========================================================================="); - } - - private static readonly ILog Logger = LogManager.GetLogger(typeof (EventMessageHandler)); - } -} +using System; +using log4net; +using MyMessages; +using NServiceBus; + +namespace Subscriber2 +{ + public class EventMessageHandler : IHandleMessages + { + public void Handle(IEvent message) + { + Logger.Info(string.Format("Subscriber 2 received IEvent with Id {0}.", message.EventId)); + Logger.Info(string.Format("Message time: {0}.", message.Time)); + Logger.Info(string.Format("Message duration: {0}.", message.Duration)); + Console.WriteLine("=========================================================================="); + } + + private static readonly ILog Logger = LogManager.GetLogger(typeof (EventMessageHandler)); + } +} diff --git a/Samples/PubSub/Subscriber2/Properties/AssemblyInfo.cs b/Samples/PubSub/Subscriber2/Properties/AssemblyInfo.cs index 5b9f173c230..ace03f54076 100644 --- a/Samples/PubSub/Subscriber2/Properties/AssemblyInfo.cs +++ b/Samples/PubSub/Subscriber2/Properties/AssemblyInfo.cs @@ -1,33 +1,33 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Client")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Client")] -[assembly: AssemblyCopyright("Copyright © 2007")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("9354e6a9-a8e5-4017-a67b-fd5075bd3941")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Client")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Client")] +[assembly: AssemblyCopyright("Copyright © 2007")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("9354e6a9-a8e5-4017-a67b-fd5075bd3941")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/PubSub/Subscriber2/Subscriber2.csproj b/Samples/PubSub/Subscriber2/Subscriber2.csproj index fe6ebdf74fa..bc0d257327c 100644 --- a/Samples/PubSub/Subscriber2/Subscriber2.csproj +++ b/Samples/PubSub/Subscriber2/Subscriber2.csproj @@ -1,142 +1,142 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {6A699A4E-F2FD-4B71-AF73-199B499482BD} - Library - Properties - Subscriber2 - Subscriber2 - - - - - - v4.0 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\binaries\containers\castle\Castle.Core.dll - - - False - ..\..\..\binaries\containers\castle\Castle.DynamicProxy2.dll - - - False - ..\..\..\binaries\containers\castle\Castle.MicroKernel.dll - - - False - ..\..\..\binaries\containers\castle\Castle.Windsor.dll - - - False - ..\..\..\binaries\log4net.dll - - - False - ..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\binaries\NServiceBus.Core.dll - - - False - ..\..\..\binaries\NServiceBus.Host.exe - - - False - ..\..\..\binaries\containers\castle\NServiceBus.ObjectBuilder.CastleWindsor.dll - - - - - - - - - - - - - - - - - - - {5686FE6C-A5E3-40D1-A6BD-25F94DA612F8} - MyMessages - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - Program - $(ProjectDir)$(OutputPath)NServiceBus.Host.exe - NServiceBus.Integration - AllRules.ruleset - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {6A699A4E-F2FD-4B71-AF73-199B499482BD} + Library + Properties + Subscriber2 + Subscriber2 + + + + + + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\binaries\containers\castle\Castle.Core.dll + + + False + ..\..\..\binaries\containers\castle\Castle.DynamicProxy2.dll + + + False + ..\..\..\binaries\containers\castle\Castle.MicroKernel.dll + + + False + ..\..\..\binaries\containers\castle\Castle.Windsor.dll + + + False + ..\..\..\binaries\log4net.dll + + + False + ..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\binaries\NServiceBus.Core.dll + + + False + ..\..\..\binaries\NServiceBus.Host.exe + + + False + ..\..\..\binaries\containers\castle\NServiceBus.ObjectBuilder.CastleWindsor.dll + + + + + + + + + + + + + + + + + + + {5686FE6C-A5E3-40D1-A6BD-25F94DA612F8} + MyMessages + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + Program + $(ProjectDir)$(OutputPath)NServiceBus.Host.exe + NServiceBus.Integration + AllRules.ruleset + \ No newline at end of file diff --git a/Samples/PubSub/Subscriber2/Subscriber2Endpoint.cs b/Samples/PubSub/Subscriber2/Subscriber2Endpoint.cs index cdcb43c4d94..ae7c185db52 100644 --- a/Samples/PubSub/Subscriber2/Subscriber2Endpoint.cs +++ b/Samples/PubSub/Subscriber2/Subscriber2Endpoint.cs @@ -1,23 +1,23 @@ -using MyMessages; -using NServiceBus; - -namespace Subscriber2 -{ - /// - /// Showing how to manage subscriptions manually - /// - class Subscriber2Endpoint : IWantToRunAtStartup - { - public IBus Bus { get; set; } - - public void Run() - { - Bus.Subscribe(); - } - - public void Stop() - { - Bus.Unsubscribe(); - } - } -} +using MyMessages; +using NServiceBus; + +namespace Subscriber2 +{ + /// + /// Showing how to manage subscriptions manually + /// + class Subscriber2Endpoint : IWantToRunAtStartup + { + public IBus Bus { get; set; } + + public void Run() + { + Bus.Subscribe(); + } + + public void Stop() + { + Bus.Unsubscribe(); + } + } +} diff --git a/Samples/SendOnlyEndpoint/SendOnlyEndpoint.Custom.sln b/Samples/SendOnlyEndpoint/SendOnlyEndpoint.Custom.sln index c977df8b69c..f05d0c5a077 100644 --- a/Samples/SendOnlyEndpoint/SendOnlyEndpoint.Custom.sln +++ b/Samples/SendOnlyEndpoint/SendOnlyEndpoint.Custom.sln @@ -1,20 +1,20 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SendOnlyEndpoint.Custom", "SendOnlyEndpoint.Custom\SendOnlyEndpoint.Custom.csproj", "{52E814AA-CD2D-48F5-AD5C-38D8335DEBF4}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x86 = Debug|x86 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {52E814AA-CD2D-48F5-AD5C-38D8335DEBF4}.Debug|x86.ActiveCfg = Debug|x86 - {52E814AA-CD2D-48F5-AD5C-38D8335DEBF4}.Debug|x86.Build.0 = Debug|x86 - {52E814AA-CD2D-48F5-AD5C-38D8335DEBF4}.Release|x86.ActiveCfg = Release|x86 - {52E814AA-CD2D-48F5-AD5C-38D8335DEBF4}.Release|x86.Build.0 = Release|x86 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SendOnlyEndpoint.Custom", "SendOnlyEndpoint.Custom\SendOnlyEndpoint.Custom.csproj", "{52E814AA-CD2D-48F5-AD5C-38D8335DEBF4}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {52E814AA-CD2D-48F5-AD5C-38D8335DEBF4}.Debug|x86.ActiveCfg = Debug|x86 + {52E814AA-CD2D-48F5-AD5C-38D8335DEBF4}.Debug|x86.Build.0 = Debug|x86 + {52E814AA-CD2D-48F5-AD5C-38D8335DEBF4}.Release|x86.ActiveCfg = Release|x86 + {52E814AA-CD2D-48F5-AD5C-38D8335DEBF4}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Samples/SendOnlyEndpoint/SendOnlyEndpoint.Custom/Program.cs b/Samples/SendOnlyEndpoint/SendOnlyEndpoint.Custom/Program.cs index e9122922269..6b6849c3d27 100644 --- a/Samples/SendOnlyEndpoint/SendOnlyEndpoint.Custom/Program.cs +++ b/Samples/SendOnlyEndpoint/SendOnlyEndpoint.Custom/Program.cs @@ -1,32 +1,32 @@ -using System; -using NServiceBus; - -namespace SendOnlyEndpoint.Custom -{ - public class Program - { - static void Main() - { - var bus = Configure.With() - .DefaultBuilder() - .XmlSerializer() - .InMemoryFaultManagement() - .MsmqTransport() - .UnicastBus() - .CreateBus() - .Start(); - - bus.Send("SendOnlyDestination@someserver",new TestMessage()); - - Console.WriteLine("Message sent to remote endpoint, you can verify this by looking at the outgoing queues in you msmq MMC-snapin"); - Console.WriteLine("Press any key to exit"); - - Console.ReadKey(); - } - } - - - public class TestMessage : IMessage - { - } -} +using System; +using NServiceBus; + +namespace SendOnlyEndpoint.Custom +{ + public class Program + { + static void Main() + { + var bus = Configure.With() + .DefaultBuilder() + .XmlSerializer() + .InMemoryFaultManagement() + .MsmqTransport() + .UnicastBus() + .CreateBus() + .Start(); + + bus.Send("SendOnlyDestination@someserver",new TestMessage()); + + Console.WriteLine("Message sent to remote endpoint, you can verify this by looking at the outgoing queues in you msmq MMC-snapin"); + Console.WriteLine("Press any key to exit"); + + Console.ReadKey(); + } + } + + + public class TestMessage : IMessage + { + } +} diff --git a/Samples/SendOnlyEndpoint/SendOnlyEndpoint.Custom/Properties/AssemblyInfo.cs b/Samples/SendOnlyEndpoint/SendOnlyEndpoint.Custom/Properties/AssemblyInfo.cs index 0d138b0aaad..c3511b850f8 100644 --- a/Samples/SendOnlyEndpoint/SendOnlyEndpoint.Custom/Properties/AssemblyInfo.cs +++ b/Samples/SendOnlyEndpoint/SendOnlyEndpoint.Custom/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("SendOnlyEndpoint.Custom")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("SendOnlyEndpoint.Custom")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2010")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("e96ccad3-a27e-4941-bc3c-b68aec263446")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("SendOnlyEndpoint.Custom")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("SendOnlyEndpoint.Custom")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2010")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("e96ccad3-a27e-4941-bc3c-b68aec263446")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/SendOnlyEndpoint/SendOnlyEndpoint.Custom/SendOnlyEndpoint.Custom.csproj b/Samples/SendOnlyEndpoint/SendOnlyEndpoint.Custom/SendOnlyEndpoint.Custom.csproj index f02116d59f0..6a494368c8f 100644 --- a/Samples/SendOnlyEndpoint/SendOnlyEndpoint.Custom/SendOnlyEndpoint.Custom.csproj +++ b/Samples/SendOnlyEndpoint/SendOnlyEndpoint.Custom/SendOnlyEndpoint.Custom.csproj @@ -1,62 +1,62 @@ - - - - Debug - x86 - 8.0.30703 - 2.0 - {52E814AA-CD2D-48F5-AD5C-38D8335DEBF4} - Exe - Properties - SendOnlyEndpoint.Custom - SendOnlyEndpoint.Custom - v4.0 - - - 512 - - - x86 - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - x86 - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\..\..\binaries\log4net.dll - - - ..\..\..\binaries\NServiceBus.dll - - - ..\..\..\binaries\NServiceBus.Core.dll - - - - - - - - - - + + + + Debug + x86 + 8.0.30703 + 2.0 + {52E814AA-CD2D-48F5-AD5C-38D8335DEBF4} + Exe + Properties + SendOnlyEndpoint.Custom + SendOnlyEndpoint.Custom + v4.0 + + + 512 + + + x86 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + x86 + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\..\binaries\log4net.dll + + + ..\..\..\binaries\NServiceBus.dll + + + ..\..\..\binaries\NServiceBus.Core.dll + + + + + + + + + + \ No newline at end of file diff --git a/Samples/Starbucks/Barista/App.config b/Samples/Starbucks/Barista/App.config index db8ee56f16a..c55593ce14b 100644 --- a/Samples/Starbucks/Barista/App.config +++ b/Samples/Starbucks/Barista/App.config @@ -1,21 +1,21 @@ - - - -
-
- - - - - - - - - - - - - + + + +
+
+ + + + + + + + + + + + + diff --git a/Samples/Starbucks/Barista/Barista.csproj b/Samples/Starbucks/Barista/Barista.csproj index 850e56e8e85..4d12daf0e22 100644 --- a/Samples/Starbucks/Barista/Barista.csproj +++ b/Samples/Starbucks/Barista/Barista.csproj @@ -1,109 +1,109 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {F5C48D42-06F2-4CCA-88B5-6C49F2A09065} - WinExe - Properties - Barista - Barista - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - - - - False - ..\..\..\binaries\log4net.dll - - - False - ..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\binaries\NServiceBus.Core.dll - - - False - ..\..\..\binaries\containers\structuremap\NServiceBus.ObjectBuilder.StructureMap.dll - - - False - ..\..\..\binaries\containers\structuremap\StructureMap.dll - - - - - - - False - ..\..\..\binaries\System.Data.SQLite.DLL - - - - - - - - - - - - - - Form - - - StarbucksBarista.cs - - - - - StarbucksBarista.cs - - - - - - - - - {3963D354-2888-4005-8763-6E54A4D6BFCC} - CashierContracts - - - {05882666-3DBD-4B8D-ADAE-439CABDD7DFB} - CustomerContracts - - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {F5C48D42-06F2-4CCA-88B5-6C49F2A09065} + WinExe + Properties + Barista + Barista + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + true + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + true + + + + False + ..\..\..\binaries\log4net.dll + + + False + ..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\binaries\NServiceBus.Core.dll + + + False + ..\..\..\binaries\containers\structuremap\NServiceBus.ObjectBuilder.StructureMap.dll + + + False + ..\..\..\binaries\containers\structuremap\StructureMap.dll + + + + + + + False + ..\..\..\binaries\System.Data.SQLite.DLL + + + + + + + + + + + + + + Form + + + StarbucksBarista.cs + + + + + StarbucksBarista.cs + + + + + + + + + {3963D354-2888-4005-8763-6E54A4D6BFCC} + CashierContracts + + + {05882666-3DBD-4B8D-ADAE-439CABDD7DFB} + CustomerContracts + + + + + diff --git a/Samples/Starbucks/Barista/BaristaMessageHandler.cs b/Samples/Starbucks/Barista/BaristaMessageHandler.cs index 1b53b72fdab..8e1617b9a22 100644 --- a/Samples/Starbucks/Barista/BaristaMessageHandler.cs +++ b/Samples/Starbucks/Barista/BaristaMessageHandler.cs @@ -1,71 +1,71 @@ -using System.Threading; -using Barista.ViewData; -using CashierContracts; -using CustomerContracts; -using NServiceBus; -using NServiceBus.Saga; - -namespace Barista -{ - public class BaristaMessageHandler : Saga, - IAmStartedByMessages, - IHandleMessages - { - private readonly IStarbucksBaristaView _view; - - public BaristaMessageHandler() - {} - - public BaristaMessageHandler(IStarbucksBaristaView view) - { - _view = view; - } - - public override void ConfigureHowToFindSaga() - { - ConfigureMapping(s => s.OrderId, m => m.OrderId); - ConfigureMapping(s => s.OrderId, m => m.OrderId); - } - - public void Handle(PrepareOrderMessage message) - { - var viewData = new PrepareOrderView(message.CustomerName, message.Drink, message.DrinkSize); - _view.PrepareOrder(viewData); - - Data.CustomerName = message.CustomerName; - Data.Drink = message.Drink; - Data.OrderId = message.OrderId; - Data.Size = message.DrinkSize; - - for(var i=0; i<10; i++) - { - Thread.Sleep(1000); - } - - var additionalViewData = new OrderIsDoneView(message.CustomerName); - _view.OrderIsDone(additionalViewData); - - Data.OrderIsReady = true; - DeliverOrder(); - } - - public void Handle(PaymentCompleteMessage message) - { - Data.OrderIsPaid = true; - DeliverOrder(); - } - - private void DeliverOrder() - { - if(!Data.OrderIsReady || !Data.OrderIsPaid) - return; - - var viewData = new DeliverOrderView(Data.Drink, Data.Size); - _view.DeliverOrder(viewData); - - Bus.Send(new OrderReadyMessage(Data.CustomerName, Data.Drink)); - - MarkAsComplete(); - } - } -} +using System.Threading; +using Barista.ViewData; +using CashierContracts; +using CustomerContracts; +using NServiceBus; +using NServiceBus.Saga; + +namespace Barista +{ + public class BaristaMessageHandler : Saga, + IAmStartedByMessages, + IHandleMessages + { + private readonly IStarbucksBaristaView _view; + + public BaristaMessageHandler() + {} + + public BaristaMessageHandler(IStarbucksBaristaView view) + { + _view = view; + } + + public override void ConfigureHowToFindSaga() + { + ConfigureMapping(s => s.OrderId, m => m.OrderId); + ConfigureMapping(s => s.OrderId, m => m.OrderId); + } + + public void Handle(PrepareOrderMessage message) + { + var viewData = new PrepareOrderView(message.CustomerName, message.Drink, message.DrinkSize); + _view.PrepareOrder(viewData); + + Data.CustomerName = message.CustomerName; + Data.Drink = message.Drink; + Data.OrderId = message.OrderId; + Data.Size = message.DrinkSize; + + for(var i=0; i<10; i++) + { + Thread.Sleep(1000); + } + + var additionalViewData = new OrderIsDoneView(message.CustomerName); + _view.OrderIsDone(additionalViewData); + + Data.OrderIsReady = true; + DeliverOrder(); + } + + public void Handle(PaymentCompleteMessage message) + { + Data.OrderIsPaid = true; + DeliverOrder(); + } + + private void DeliverOrder() + { + if(!Data.OrderIsReady || !Data.OrderIsPaid) + return; + + var viewData = new DeliverOrderView(Data.Drink, Data.Size); + _view.DeliverOrder(viewData); + + Bus.Send(new OrderReadyMessage(Data.CustomerName, Data.Drink)); + + MarkAsComplete(); + } + } +} diff --git a/Samples/Starbucks/Barista/BaristaRegistry.cs b/Samples/Starbucks/Barista/BaristaRegistry.cs index aa2024c8bd4..8e63b2f0beb 100644 --- a/Samples/Starbucks/Barista/BaristaRegistry.cs +++ b/Samples/Starbucks/Barista/BaristaRegistry.cs @@ -1,18 +1,18 @@ -using StructureMap.Attributes; -using StructureMap.Configuration.DSL; - -namespace Barista -{ - public class BaristaRegistry : Registry - { - public BaristaRegistry() - { - For() - .Singleton() - .Use(); - - For() - .Use(); - } - } -} +using StructureMap.Attributes; +using StructureMap.Configuration.DSL; + +namespace Barista +{ + public class BaristaRegistry : Registry + { + public BaristaRegistry() + { + For() + .Singleton() + .Use(); + + For() + .Use(); + } + } +} diff --git a/Samples/Starbucks/Barista/BaristaSagaData.cs b/Samples/Starbucks/Barista/BaristaSagaData.cs index 007da748814..5d04c97962e 100644 --- a/Samples/Starbucks/Barista/BaristaSagaData.cs +++ b/Samples/Starbucks/Barista/BaristaSagaData.cs @@ -1,20 +1,20 @@ -using System; -using CashierContracts; -using NServiceBus.Saga; - -namespace Barista -{ - public class BaristaSagaData : IContainSagaData - { - public virtual Guid Id { get; set; } - public virtual String Originator { get; set; } - public virtual String OriginalMessageId { get; set; } - - public virtual String CustomerName { get; set; } - public virtual String Drink { get; set; } - public virtual Guid OrderId { get; set; } - public virtual DrinkSize Size { get; set; } - public virtual Boolean OrderIsReady { get; set; } - public virtual Boolean OrderIsPaid { get; set; } - } -} +using System; +using CashierContracts; +using NServiceBus.Saga; + +namespace Barista +{ + public class BaristaSagaData : IContainSagaData + { + public virtual Guid Id { get; set; } + public virtual String Originator { get; set; } + public virtual String OriginalMessageId { get; set; } + + public virtual String CustomerName { get; set; } + public virtual String Drink { get; set; } + public virtual Guid OrderId { get; set; } + public virtual DrinkSize Size { get; set; } + public virtual Boolean OrderIsReady { get; set; } + public virtual Boolean OrderIsPaid { get; set; } + } +} diff --git a/Samples/Starbucks/Barista/Bootstrapper.cs b/Samples/Starbucks/Barista/Bootstrapper.cs index 43116b63e8c..c5dba033b6e 100644 --- a/Samples/Starbucks/Barista/Bootstrapper.cs +++ b/Samples/Starbucks/Barista/Bootstrapper.cs @@ -1,43 +1,43 @@ -using NServiceBus; -using StructureMap; - -namespace Barista -{ - public class Bootstrapper - { - private Bootstrapper() - {} - - public static void Bootstrap() - { - BootstrapStructureMap(); - BootstrapNServiceBus(); - } - - private static void BootstrapStructureMap() - { - ObjectFactory.Initialize(x => x.AddRegistry(new BaristaRegistry())); - } - - private static void BootstrapNServiceBus() - { - Configure.With() - .Log4Net() - .StructureMapBuilder(ObjectFactory.Container) - .MsmqSubscriptionStorage() - .XmlSerializer() - // For sagas - .Sagas() - .NHibernateSagaPersisterWithSQLiteAndAutomaticSchemaGeneration() - // End - .MsmqTransport() - .IsTransactional(true) - .PurgeOnStartup(false) - .UnicastBus() - .ImpersonateSender(false) - .LoadMessageHandlers() - .CreateBus() - .Start(); - } - } -} +using NServiceBus; +using StructureMap; + +namespace Barista +{ + public class Bootstrapper + { + private Bootstrapper() + {} + + public static void Bootstrap() + { + BootstrapStructureMap(); + BootstrapNServiceBus(); + } + + private static void BootstrapStructureMap() + { + ObjectFactory.Initialize(x => x.AddRegistry(new BaristaRegistry())); + } + + private static void BootstrapNServiceBus() + { + Configure.With() + .Log4Net() + .StructureMapBuilder(ObjectFactory.Container) + .MsmqSubscriptionStorage() + .XmlSerializer() + // For sagas + .Sagas() + .NHibernateSagaPersisterWithSQLiteAndAutomaticSchemaGeneration() + // End + .MsmqTransport() + .IsTransactional(true) + .PurgeOnStartup(false) + .UnicastBus() + .ImpersonateSender(false) + .LoadMessageHandlers() + .CreateBus() + .Start(); + } + } +} diff --git a/Samples/Starbucks/Barista/Disposable.cs b/Samples/Starbucks/Barista/Disposable.cs index 2821f27a806..fa0796b716c 100644 --- a/Samples/Starbucks/Barista/Disposable.cs +++ b/Samples/Starbucks/Barista/Disposable.cs @@ -1,45 +1,45 @@ -using System; - -namespace Barista -{ - public abstract class Disposable : IDisposable - { - protected Boolean IsDisposed { get; private set; } - - private void Dispose(Boolean disposing) - { - // The object has already been disposed - if(IsDisposed) - { - return; - } - - if(disposing) - { - // Dispose managed resources - DisposeManagedResources(); - } - - // Dispose unmanaged resources - DisposeUnmanagedResources(); - - IsDisposed = true; - } - - ~Disposable() - { - Dispose(false); - } - - protected abstract void DisposeManagedResources(); - - protected virtual void DisposeUnmanagedResources() - { } - - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - } -} +using System; + +namespace Barista +{ + public abstract class Disposable : IDisposable + { + protected Boolean IsDisposed { get; private set; } + + private void Dispose(Boolean disposing) + { + // The object has already been disposed + if(IsDisposed) + { + return; + } + + if(disposing) + { + // Dispose managed resources + DisposeManagedResources(); + } + + // Dispose unmanaged resources + DisposeUnmanagedResources(); + + IsDisposed = true; + } + + ~Disposable() + { + Dispose(false); + } + + protected abstract void DisposeManagedResources(); + + protected virtual void DisposeUnmanagedResources() + { } + + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/Samples/Starbucks/Barista/MessageSubscriptions.cs b/Samples/Starbucks/Barista/MessageSubscriptions.cs index 0f5741d7eef..aaf8dc46d3a 100644 --- a/Samples/Starbucks/Barista/MessageSubscriptions.cs +++ b/Samples/Starbucks/Barista/MessageSubscriptions.cs @@ -1,48 +1,48 @@ -using System; -using CashierContracts; -using NServiceBus; - -namespace Barista -{ - public interface IMessageSubscriptions : IDisposable - { - IDisposable Subscribe(); - void Unsubscribe(); - } - - public class MessageSubscriptions : Disposable, - IMessageSubscriptions - { - private readonly IBus _bus; - - private static readonly Type[] MessageTypes = new Type[] - { - typeof(PrepareOrderMessage), - typeof(PaymentCompleteMessage) - }; - - public MessageSubscriptions(IBus bus) - { - _bus = bus; - } - - public IDisposable Subscribe() - { - foreach(var messageType in MessageTypes) - _bus.Subscribe(messageType); - - return this; - } - - public void Unsubscribe() - { - foreach(var messageType in MessageTypes) - _bus.Unsubscribe(messageType); - } - - protected override void DisposeManagedResources() - { - Unsubscribe(); - } - } -} +using System; +using CashierContracts; +using NServiceBus; + +namespace Barista +{ + public interface IMessageSubscriptions : IDisposable + { + IDisposable Subscribe(); + void Unsubscribe(); + } + + public class MessageSubscriptions : Disposable, + IMessageSubscriptions + { + private readonly IBus _bus; + + private static readonly Type[] MessageTypes = new Type[] + { + typeof(PrepareOrderMessage), + typeof(PaymentCompleteMessage) + }; + + public MessageSubscriptions(IBus bus) + { + _bus = bus; + } + + public IDisposable Subscribe() + { + foreach(var messageType in MessageTypes) + _bus.Subscribe(messageType); + + return this; + } + + public void Unsubscribe() + { + foreach(var messageType in MessageTypes) + _bus.Unsubscribe(messageType); + } + + protected override void DisposeManagedResources() + { + Unsubscribe(); + } + } +} diff --git a/Samples/Starbucks/Barista/Program.cs b/Samples/Starbucks/Barista/Program.cs index ab3c81acd31..ea77a6e276a 100644 --- a/Samples/Starbucks/Barista/Program.cs +++ b/Samples/Starbucks/Barista/Program.cs @@ -1,29 +1,29 @@ -using System; -using System.Windows.Forms; -using StructureMap; - -namespace Barista -{ - static class Program - { - /// - /// The main entry point for the application. - /// - [STAThread] - static void Main() - { - Bootstrapper.Bootstrap(); - - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - - using(var messageSubscriptions = ObjectFactory.GetInstance()) - { - messageSubscriptions.Subscribe(); - - var startupDialog = ObjectFactory.GetInstance(); - startupDialog.Start(); - } - } - } -} +using System; +using System.Windows.Forms; +using StructureMap; + +namespace Barista +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Bootstrapper.Bootstrap(); + + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + + using(var messageSubscriptions = ObjectFactory.GetInstance()) + { + messageSubscriptions.Subscribe(); + + var startupDialog = ObjectFactory.GetInstance(); + startupDialog.Start(); + } + } + } +} diff --git a/Samples/Starbucks/Barista/Properties/AssemblyInfo.cs b/Samples/Starbucks/Barista/Properties/AssemblyInfo.cs index 16eefc0847f..c35fcb35fc9 100644 --- a/Samples/Starbucks/Barista/Properties/AssemblyInfo.cs +++ b/Samples/Starbucks/Barista/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Barista")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Barista")] -[assembly: AssemblyCopyright("Copyright 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("5ce23dcd-97df-43c7-a33a-b4abc6c7754d")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Barista")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Barista")] +[assembly: AssemblyCopyright("Copyright 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("5ce23dcd-97df-43c7-a33a-b4abc6c7754d")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/Starbucks/Barista/StarbucksBarista.Designer.cs b/Samples/Starbucks/Barista/StarbucksBarista.Designer.cs index 6549bf8be73..5da3427deb3 100644 --- a/Samples/Starbucks/Barista/StarbucksBarista.Designer.cs +++ b/Samples/Starbucks/Barista/StarbucksBarista.Designer.cs @@ -1,74 +1,74 @@ -namespace Barista -{ - partial class StarbucksBarista - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if(disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.OrdersLabel = new System.Windows.Forms.Label(); - this.OrdersListBox = new System.Windows.Forms.ListBox(); - this.SuspendLayout(); - // - // OrdersLabel - // - this.OrdersLabel.AutoSize = true; - this.OrdersLabel.Location = new System.Drawing.Point(12, 11); - this.OrdersLabel.Name = "OrdersLabel"; - this.OrdersLabel.Size = new System.Drawing.Size(38, 13); - this.OrdersLabel.TabIndex = 3; - this.OrdersLabel.Text = "Orders"; - // - // OrdersListBox - // - this.OrdersListBox.FormattingEnabled = true; - this.OrdersListBox.Location = new System.Drawing.Point(12, 27); - this.OrdersListBox.Name = "OrdersListBox"; - this.OrdersListBox.Size = new System.Drawing.Size(557, 290); - this.OrdersListBox.TabIndex = 2; - // - // StarbucksBarista - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(580, 328); - this.Controls.Add(this.OrdersLabel); - this.Controls.Add(this.OrdersListBox); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.Name = "StarbucksBarista"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "Starbucks Barista Monitor XP - Professional Edition"; - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Label OrdersLabel; - private System.Windows.Forms.ListBox OrdersListBox; - } -} - +namespace Barista +{ + partial class StarbucksBarista + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if(disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.OrdersLabel = new System.Windows.Forms.Label(); + this.OrdersListBox = new System.Windows.Forms.ListBox(); + this.SuspendLayout(); + // + // OrdersLabel + // + this.OrdersLabel.AutoSize = true; + this.OrdersLabel.Location = new System.Drawing.Point(12, 11); + this.OrdersLabel.Name = "OrdersLabel"; + this.OrdersLabel.Size = new System.Drawing.Size(38, 13); + this.OrdersLabel.TabIndex = 3; + this.OrdersLabel.Text = "Orders"; + // + // OrdersListBox + // + this.OrdersListBox.FormattingEnabled = true; + this.OrdersListBox.Location = new System.Drawing.Point(12, 27); + this.OrdersListBox.Name = "OrdersListBox"; + this.OrdersListBox.Size = new System.Drawing.Size(557, 290); + this.OrdersListBox.TabIndex = 2; + // + // StarbucksBarista + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(580, 328); + this.Controls.Add(this.OrdersLabel); + this.Controls.Add(this.OrdersListBox); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.Name = "StarbucksBarista"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Starbucks Barista Monitor XP - Professional Edition"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label OrdersLabel; + private System.Windows.Forms.ListBox OrdersListBox; + } +} + diff --git a/Samples/Starbucks/Barista/StarbucksBarista.cs b/Samples/Starbucks/Barista/StarbucksBarista.cs index d012155b629..29a01113429 100644 --- a/Samples/Starbucks/Barista/StarbucksBarista.cs +++ b/Samples/Starbucks/Barista/StarbucksBarista.cs @@ -1,52 +1,52 @@ -using System; -using System.Windows.Forms; -using Barista.ViewData; - -namespace Barista -{ - public interface IStarbucksBaristaView - { - void DeliverOrder(DeliverOrderView view); - void OrderIsDone(OrderIsDoneView view); - void PrepareOrder(PrepareOrderView view); - void Start(); - } - - public partial class StarbucksBarista : Form, IStarbucksBaristaView - { - public StarbucksBarista() - { - InitializeComponent(); - } - - public void DeliverOrder(DeliverOrderView view) - { - var logItem = String.Format("Delivering {0} - {1}.", view.Drink, view.DrinkSize); - Invoke(new Action(Log), logItem); - } - - public void OrderIsDone(OrderIsDoneView view) - { - var logItem = String.Format("Done preparing order for customer {0}.", view.CustomerName); - Invoke(new Action(Log), logItem); - } - - public void PrepareOrder(PrepareOrderView view) - { - var logItem = String.Format("Preparing {0} - {1} for customer {2}.", - view.Drink, view.DrinkSize, view.CustomerName); - - Invoke(new Action(Log), logItem); - } - - public void Start() - { - Application.Run(this); - } - - private void Log(String logItem) - { - OrdersListBox.Items.Add(logItem); - } - } -} +using System; +using System.Windows.Forms; +using Barista.ViewData; + +namespace Barista +{ + public interface IStarbucksBaristaView + { + void DeliverOrder(DeliverOrderView view); + void OrderIsDone(OrderIsDoneView view); + void PrepareOrder(PrepareOrderView view); + void Start(); + } + + public partial class StarbucksBarista : Form, IStarbucksBaristaView + { + public StarbucksBarista() + { + InitializeComponent(); + } + + public void DeliverOrder(DeliverOrderView view) + { + var logItem = String.Format("Delivering {0} - {1}.", view.Drink, view.DrinkSize); + Invoke(new Action(Log), logItem); + } + + public void OrderIsDone(OrderIsDoneView view) + { + var logItem = String.Format("Done preparing order for customer {0}.", view.CustomerName); + Invoke(new Action(Log), logItem); + } + + public void PrepareOrder(PrepareOrderView view) + { + var logItem = String.Format("Preparing {0} - {1} for customer {2}.", + view.Drink, view.DrinkSize, view.CustomerName); + + Invoke(new Action(Log), logItem); + } + + public void Start() + { + Application.Run(this); + } + + private void Log(String logItem) + { + OrdersListBox.Items.Add(logItem); + } + } +} diff --git a/Samples/Starbucks/Barista/StarbucksBarista.resx b/Samples/Starbucks/Barista/StarbucksBarista.resx index 11113e43986..194da1e4138 100644 --- a/Samples/Starbucks/Barista/StarbucksBarista.resx +++ b/Samples/Starbucks/Barista/StarbucksBarista.resx @@ -1,120 +1,120 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + diff --git a/Samples/Starbucks/Barista/ViewData/DeliverOrderView.cs b/Samples/Starbucks/Barista/ViewData/DeliverOrderView.cs index 732f230afe9..36b5c869034 100644 --- a/Samples/Starbucks/Barista/ViewData/DeliverOrderView.cs +++ b/Samples/Starbucks/Barista/ViewData/DeliverOrderView.cs @@ -1,17 +1,17 @@ -using System; -using CashierContracts; - -namespace Barista.ViewData -{ - public class DeliverOrderView - { - public String Drink { get; private set; } - public String DrinkSize { get; private set; } - - public DeliverOrderView(String drink, DrinkSize size) - { - Drink = drink; - DrinkSize = size.ToString(); - } - } -} +using System; +using CashierContracts; + +namespace Barista.ViewData +{ + public class DeliverOrderView + { + public String Drink { get; private set; } + public String DrinkSize { get; private set; } + + public DeliverOrderView(String drink, DrinkSize size) + { + Drink = drink; + DrinkSize = size.ToString(); + } + } +} diff --git a/Samples/Starbucks/Barista/ViewData/OrderIsDoneView.cs b/Samples/Starbucks/Barista/ViewData/OrderIsDoneView.cs index 6dc1bfc017d..757c06bfc04 100644 --- a/Samples/Starbucks/Barista/ViewData/OrderIsDoneView.cs +++ b/Samples/Starbucks/Barista/ViewData/OrderIsDoneView.cs @@ -1,14 +1,14 @@ -using System; - -namespace Barista.ViewData -{ - public class OrderIsDoneView - { - public String CustomerName { get; private set; } - - public OrderIsDoneView(String customerName) - { - CustomerName = customerName; - } - } -} +using System; + +namespace Barista.ViewData +{ + public class OrderIsDoneView + { + public String CustomerName { get; private set; } + + public OrderIsDoneView(String customerName) + { + CustomerName = customerName; + } + } +} diff --git a/Samples/Starbucks/Barista/ViewData/PrepareOrderView.cs b/Samples/Starbucks/Barista/ViewData/PrepareOrderView.cs index 677428d18c7..b39518e3067 100644 --- a/Samples/Starbucks/Barista/ViewData/PrepareOrderView.cs +++ b/Samples/Starbucks/Barista/ViewData/PrepareOrderView.cs @@ -1,19 +1,19 @@ -using System; -using CashierContracts; - -namespace Barista.ViewData -{ - public class PrepareOrderView - { - public String CustomerName { get; private set; } - public String Drink { get; private set; } - public String DrinkSize { get; private set; } - - public PrepareOrderView(String customerName, String drink, DrinkSize size) - { - CustomerName = customerName; - Drink = drink; - DrinkSize = size.ToString(); - } - } -} +using System; +using CashierContracts; + +namespace Barista.ViewData +{ + public class PrepareOrderView + { + public String CustomerName { get; private set; } + public String Drink { get; private set; } + public String DrinkSize { get; private set; } + + public PrepareOrderView(String customerName, String drink, DrinkSize size) + { + CustomerName = customerName; + Drink = drink; + DrinkSize = size.ToString(); + } + } +} diff --git a/Samples/Starbucks/Cashier/App.config b/Samples/Starbucks/Cashier/App.config index 915bb013be2..cd3b870c3bd 100644 --- a/Samples/Starbucks/Cashier/App.config +++ b/Samples/Starbucks/Cashier/App.config @@ -1,21 +1,21 @@ - - - -
-
- - - - - - - - - - - + + + +
+
+ + + + + + + + + + + diff --git a/Samples/Starbucks/Cashier/Bootstrapper.cs b/Samples/Starbucks/Cashier/Bootstrapper.cs index 4e74f00da1e..c9dd90115e7 100644 --- a/Samples/Starbucks/Cashier/Bootstrapper.cs +++ b/Samples/Starbucks/Cashier/Bootstrapper.cs @@ -1,42 +1,42 @@ -using NServiceBus; -using StructureMap; - -namespace Cashier -{ - public class Bootstrapper - { - private Bootstrapper() - {} - - public static void Bootstrap() - { - BootstrapStructureMap(); - BootstrapNServiceBus(); - } - - private static void BootstrapStructureMap() - { - ObjectFactory.Initialize(x => x.AddRegistry(new CashierRegistry())); - } - - private static void BootstrapNServiceBus() - { - Configure.With() - .StructureMapBuilder(ObjectFactory.Container) - .MsmqSubscriptionStorage() - .XmlSerializer() - // For sagas - .Sagas() - .NHibernateSagaPersisterWithSQLiteAndAutomaticSchemaGeneration() - // End - .MsmqTransport() - .IsTransactional(true) - .PurgeOnStartup(false) - .UnicastBus() - .ImpersonateSender(false) - .LoadMessageHandlers() - .CreateBus() - .Start(); - } - } -} +using NServiceBus; +using StructureMap; + +namespace Cashier +{ + public class Bootstrapper + { + private Bootstrapper() + {} + + public static void Bootstrap() + { + BootstrapStructureMap(); + BootstrapNServiceBus(); + } + + private static void BootstrapStructureMap() + { + ObjectFactory.Initialize(x => x.AddRegistry(new CashierRegistry())); + } + + private static void BootstrapNServiceBus() + { + Configure.With() + .StructureMapBuilder(ObjectFactory.Container) + .MsmqSubscriptionStorage() + .XmlSerializer() + // For sagas + .Sagas() + .NHibernateSagaPersisterWithSQLiteAndAutomaticSchemaGeneration() + // End + .MsmqTransport() + .IsTransactional(true) + .PurgeOnStartup(false) + .UnicastBus() + .ImpersonateSender(false) + .LoadMessageHandlers() + .CreateBus() + .Start(); + } + } +} diff --git a/Samples/Starbucks/Cashier/Cashier.csproj b/Samples/Starbucks/Cashier/Cashier.csproj index c7646c181e0..6dbe62279cd 100644 --- a/Samples/Starbucks/Cashier/Cashier.csproj +++ b/Samples/Starbucks/Cashier/Cashier.csproj @@ -1,107 +1,107 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {DCCBF183-A703-4999-BB10-046E6C2800B9} - WinExe - Properties - Cashier - Cashier - v4.0 - 512 - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\binaries\log4net.dll - - - False - ..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\binaries\NServiceBus.Core.dll - - - False - ..\..\..\binaries\containers\structuremap\NServiceBus.ObjectBuilder.StructureMap.dll - - - False - ..\..\..\binaries\containers\structuremap\StructureMap.dll - - - - - - - False - ..\..\..\binaries\System.Data.SQLite.DLL - - - - - - - - - - - - - - - - StarbucksCashier.cs - - - - Form - - - StarbucksCashier.cs - - - - - - {3963D354-2888-4005-8763-6E54A4D6BFCC} - CashierContracts - - - {05882666-3DBD-4B8D-ADAE-439CABDD7DFB} - CustomerContracts - - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {DCCBF183-A703-4999-BB10-046E6C2800B9} + WinExe + Properties + Cashier + Cashier + v4.0 + 512 + + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\binaries\log4net.dll + + + False + ..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\binaries\NServiceBus.Core.dll + + + False + ..\..\..\binaries\containers\structuremap\NServiceBus.ObjectBuilder.StructureMap.dll + + + False + ..\..\..\binaries\containers\structuremap\StructureMap.dll + + + + + + + False + ..\..\..\binaries\System.Data.SQLite.DLL + + + + + + + + + + + + + + + + StarbucksCashier.cs + + + + Form + + + StarbucksCashier.cs + + + + + + {3963D354-2888-4005-8763-6E54A4D6BFCC} + CashierContracts + + + {05882666-3DBD-4B8D-ADAE-439CABDD7DFB} + CustomerContracts + + + + + diff --git a/Samples/Starbucks/Cashier/CashierMessageHandler.cs b/Samples/Starbucks/Cashier/CashierMessageHandler.cs index f326897bf28..7b86eb5cf8a 100644 --- a/Samples/Starbucks/Cashier/CashierMessageHandler.cs +++ b/Samples/Starbucks/Cashier/CashierMessageHandler.cs @@ -1,77 +1,77 @@ -using System; -using Cashier.ViewData; -using CashierContracts; -using CustomerContracts; -using NServiceBus; -using NServiceBus.Saga; - -namespace Cashier -{ - public class CashierMessageHandler : Saga, - IAmStartedByMessages, - IHandleMessages - { - private readonly IStarbucksCashierView _view; - - public CashierMessageHandler() - {} - - public CashierMessageHandler(IStarbucksCashierView view) - { - _view = view; - } - - public override void ConfigureHowToFindSaga() - { - ConfigureMapping(s => s.OrderId, m => m.OrderId); - ConfigureMapping(s => s.OrderId, m => m.OrderId); - } - - public void Handle(NewOrderMessage message) - { - _view.NewOrder(new NewOrderView(message)); - - Data.Drink = message.Drink; - Data.DrinkSize = message.DrinkSize; - Data.OrderId = message.OrderId; - Data.CustomerName = message.CustomerName; - Data.Amount = CalculateAmountAccordingTo(message.DrinkSize); - - Bus.Publish(new PrepareOrderMessage(Data.CustomerName, Data.Drink, Data.DrinkSize, Data.OrderId)); - Bus.Reply(new PaymentRequestMessage(Data.Amount, message.CustomerName, message.OrderId)); - } - - public void Handle(PaymentMessage message) - { - if(message.Amount >= Data.Amount) - { - var viewData = new ReceivedFullPaymentView(Data.CustomerName, Data.Drink, Data.DrinkSize); - _view.ReceivedFullPayment(viewData); - - Bus.Publish(new PaymentCompleteMessage(Data.OrderId)); - } - else if(message.Amount == 0) - { - var viewData = new CustomerRefusesToPayView(Data.CustomerName, Data.Amount, Data.Drink, Data.DrinkSize); - _view.CustomerRefusesToPay(viewData); - } - - MarkAsComplete(); - } - - private static Decimal CalculateAmountAccordingTo(DrinkSize size) - { - switch(size) - { - case DrinkSize.Tall: - return 3.25m; - case DrinkSize.Grande: - return 4.00m; - case DrinkSize.Venti: - return 4.75m; - default: - throw new InvalidOperationException(String.Format("Size '{0}' does not compute!", size)); - } - } - } -} +using System; +using Cashier.ViewData; +using CashierContracts; +using CustomerContracts; +using NServiceBus; +using NServiceBus.Saga; + +namespace Cashier +{ + public class CashierMessageHandler : Saga, + IAmStartedByMessages, + IHandleMessages + { + private readonly IStarbucksCashierView _view; + + public CashierMessageHandler() + {} + + public CashierMessageHandler(IStarbucksCashierView view) + { + _view = view; + } + + public override void ConfigureHowToFindSaga() + { + ConfigureMapping(s => s.OrderId, m => m.OrderId); + ConfigureMapping(s => s.OrderId, m => m.OrderId); + } + + public void Handle(NewOrderMessage message) + { + _view.NewOrder(new NewOrderView(message)); + + Data.Drink = message.Drink; + Data.DrinkSize = message.DrinkSize; + Data.OrderId = message.OrderId; + Data.CustomerName = message.CustomerName; + Data.Amount = CalculateAmountAccordingTo(message.DrinkSize); + + Bus.Publish(new PrepareOrderMessage(Data.CustomerName, Data.Drink, Data.DrinkSize, Data.OrderId)); + Bus.Reply(new PaymentRequestMessage(Data.Amount, message.CustomerName, message.OrderId)); + } + + public void Handle(PaymentMessage message) + { + if(message.Amount >= Data.Amount) + { + var viewData = new ReceivedFullPaymentView(Data.CustomerName, Data.Drink, Data.DrinkSize); + _view.ReceivedFullPayment(viewData); + + Bus.Publish(new PaymentCompleteMessage(Data.OrderId)); + } + else if(message.Amount == 0) + { + var viewData = new CustomerRefusesToPayView(Data.CustomerName, Data.Amount, Data.Drink, Data.DrinkSize); + _view.CustomerRefusesToPay(viewData); + } + + MarkAsComplete(); + } + + private static Decimal CalculateAmountAccordingTo(DrinkSize size) + { + switch(size) + { + case DrinkSize.Tall: + return 3.25m; + case DrinkSize.Grande: + return 4.00m; + case DrinkSize.Venti: + return 4.75m; + default: + throw new InvalidOperationException(String.Format("Size '{0}' does not compute!", size)); + } + } + } +} diff --git a/Samples/Starbucks/Cashier/CashierRegistry.cs b/Samples/Starbucks/Cashier/CashierRegistry.cs index 8a8f9be13d2..0c80577e752 100644 --- a/Samples/Starbucks/Cashier/CashierRegistry.cs +++ b/Samples/Starbucks/Cashier/CashierRegistry.cs @@ -1,14 +1,14 @@ -using StructureMap.Configuration.DSL; - -namespace Cashier -{ - public class CashierRegistry : Registry - { - public CashierRegistry() - { - For() - .Singleton() - .Use(); - } - } -} +using StructureMap.Configuration.DSL; + +namespace Cashier +{ + public class CashierRegistry : Registry + { + public CashierRegistry() + { + For() + .Singleton() + .Use(); + } + } +} diff --git a/Samples/Starbucks/Cashier/CashierSagaData.cs b/Samples/Starbucks/Cashier/CashierSagaData.cs index 26d34d0e1b0..8544fb4de07 100644 --- a/Samples/Starbucks/Cashier/CashierSagaData.cs +++ b/Samples/Starbucks/Cashier/CashierSagaData.cs @@ -1,19 +1,19 @@ -using System; -using CashierContracts; -using NServiceBus.Saga; - -namespace Cashier -{ - public class CashierSagaData : IContainSagaData - { - public virtual Guid Id { get; set; } - public virtual String Originator { get; set; } - public virtual String OriginalMessageId { get; set; } - - public virtual Decimal Amount { get; set; } - public virtual String CustomerName { get; set; } - public virtual String Drink { get; set; } - public virtual DrinkSize DrinkSize { get; set; } - public virtual Guid OrderId { get; set; } - } -} +using System; +using CashierContracts; +using NServiceBus.Saga; + +namespace Cashier +{ + public class CashierSagaData : IContainSagaData + { + public virtual Guid Id { get; set; } + public virtual String Originator { get; set; } + public virtual String OriginalMessageId { get; set; } + + public virtual Decimal Amount { get; set; } + public virtual String CustomerName { get; set; } + public virtual String Drink { get; set; } + public virtual DrinkSize DrinkSize { get; set; } + public virtual Guid OrderId { get; set; } + } +} diff --git a/Samples/Starbucks/Cashier/Program.cs b/Samples/Starbucks/Cashier/Program.cs index c28da7d5a2b..6680f2ce575 100644 --- a/Samples/Starbucks/Cashier/Program.cs +++ b/Samples/Starbucks/Cashier/Program.cs @@ -1,24 +1,24 @@ -using System; -using System.Windows.Forms; -using StructureMap; - -namespace Cashier -{ - static class Program - { - /// - /// The main entry point for the application. - /// - [STAThread] - static void Main() - { - Bootstrapper.Bootstrap(); - - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - - var startupDialog = ObjectFactory.GetInstance(); - startupDialog.Start(); - } - } -} +using System; +using System.Windows.Forms; +using StructureMap; + +namespace Cashier +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Bootstrapper.Bootstrap(); + + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + + var startupDialog = ObjectFactory.GetInstance(); + startupDialog.Start(); + } + } +} diff --git a/Samples/Starbucks/Cashier/Properties/AssemblyInfo.cs b/Samples/Starbucks/Cashier/Properties/AssemblyInfo.cs index c2c606e7372..1301b8d53b7 100644 --- a/Samples/Starbucks/Cashier/Properties/AssemblyInfo.cs +++ b/Samples/Starbucks/Cashier/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Cashier")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Cashier")] -[assembly: AssemblyCopyright("Copyright 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("a23d05c3-f8de-4c46-91bc-99c11db88551")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Cashier")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Cashier")] +[assembly: AssemblyCopyright("Copyright 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("a23d05c3-f8de-4c46-91bc-99c11db88551")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/Starbucks/Cashier/StarbucksCashier.Designer.cs b/Samples/Starbucks/Cashier/StarbucksCashier.Designer.cs index 9388dcd36b8..b9ae5a89ff7 100644 --- a/Samples/Starbucks/Cashier/StarbucksCashier.Designer.cs +++ b/Samples/Starbucks/Cashier/StarbucksCashier.Designer.cs @@ -1,74 +1,74 @@ -namespace Cashier -{ - partial class StarbucksCashier - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if(disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.OrdersListBox = new System.Windows.Forms.ListBox(); - this.OrdersLabel = new System.Windows.Forms.Label(); - this.SuspendLayout(); - // - // OrdersListBox - // - this.OrdersListBox.FormattingEnabled = true; - this.OrdersListBox.Location = new System.Drawing.Point(12, 25); - this.OrdersListBox.Name = "OrdersListBox"; - this.OrdersListBox.Size = new System.Drawing.Size(557, 290); - this.OrdersListBox.TabIndex = 0; - // - // OrdersLabel - // - this.OrdersLabel.AutoSize = true; - this.OrdersLabel.Location = new System.Drawing.Point(12, 9); - this.OrdersLabel.Name = "OrdersLabel"; - this.OrdersLabel.Size = new System.Drawing.Size(38, 13); - this.OrdersLabel.TabIndex = 1; - this.OrdersLabel.Text = "Orders"; - // - // StarbucksCashier - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(582, 330); - this.Controls.Add(this.OrdersLabel); - this.Controls.Add(this.OrdersListBox); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.Name = "StarbucksCashier"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "Starbucks Cashier Monitor 2000 - Ultimate Edition"; - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.ListBox OrdersListBox; - private System.Windows.Forms.Label OrdersLabel; - } -} - +namespace Cashier +{ + partial class StarbucksCashier + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if(disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.OrdersListBox = new System.Windows.Forms.ListBox(); + this.OrdersLabel = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // OrdersListBox + // + this.OrdersListBox.FormattingEnabled = true; + this.OrdersListBox.Location = new System.Drawing.Point(12, 25); + this.OrdersListBox.Name = "OrdersListBox"; + this.OrdersListBox.Size = new System.Drawing.Size(557, 290); + this.OrdersListBox.TabIndex = 0; + // + // OrdersLabel + // + this.OrdersLabel.AutoSize = true; + this.OrdersLabel.Location = new System.Drawing.Point(12, 9); + this.OrdersLabel.Name = "OrdersLabel"; + this.OrdersLabel.Size = new System.Drawing.Size(38, 13); + this.OrdersLabel.TabIndex = 1; + this.OrdersLabel.Text = "Orders"; + // + // StarbucksCashier + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(582, 330); + this.Controls.Add(this.OrdersLabel); + this.Controls.Add(this.OrdersListBox); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.Name = "StarbucksCashier"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Starbucks Cashier Monitor 2000 - Ultimate Edition"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.ListBox OrdersListBox; + private System.Windows.Forms.Label OrdersLabel; + } +} + diff --git a/Samples/Starbucks/Cashier/StarbucksCashier.cs b/Samples/Starbucks/Cashier/StarbucksCashier.cs index fe02d82db8a..91eab9cc188 100644 --- a/Samples/Starbucks/Cashier/StarbucksCashier.cs +++ b/Samples/Starbucks/Cashier/StarbucksCashier.cs @@ -1,56 +1,56 @@ -using System; -using System.Windows.Forms; -using Cashier.ViewData; - -namespace Cashier -{ - public interface IStarbucksCashierView - { - void CustomerRefusesToPay(CustomerRefusesToPayView view); - void NewOrder(NewOrderView view); - void ReceivedFullPayment(ReceivedFullPaymentView view); - void Start(); - } - - public partial class StarbucksCashier : Form, IStarbucksCashierView - { - public StarbucksCashier() - { - InitializeComponent(); - } - - public void CustomerRefusesToPay(CustomerRefusesToPayView view) - { - var logItem = String.Format("Customer {0} refuses to pay {1} for its order ({2} - {3}).", - view.CustomerName, view.Amount, view.Drink, view.DrinkSize); - - Invoke(new Action(Log), logItem); - } - - public void NewOrder(NewOrderView view) - { - var logItem = String.Format("Customer {0} ordered {1} - {2}.", - view.CustomerName, view.Drink, view.DrinkSize); - - Invoke(new Action(Log), logItem); - } - - public void ReceivedFullPayment(ReceivedFullPaymentView view) - { - var logItem = String.Format("Customer {0} paid for its order ({1} - {2}).", - view.CustomerName, view.Drink, view.DrinkSize); - - Invoke(new Action(Log), logItem); - } - - public void Start() - { - Application.Run(this); - } - - private void Log(String logItem) - { - OrdersListBox.Items.Add(logItem); - } - } -} +using System; +using System.Windows.Forms; +using Cashier.ViewData; + +namespace Cashier +{ + public interface IStarbucksCashierView + { + void CustomerRefusesToPay(CustomerRefusesToPayView view); + void NewOrder(NewOrderView view); + void ReceivedFullPayment(ReceivedFullPaymentView view); + void Start(); + } + + public partial class StarbucksCashier : Form, IStarbucksCashierView + { + public StarbucksCashier() + { + InitializeComponent(); + } + + public void CustomerRefusesToPay(CustomerRefusesToPayView view) + { + var logItem = String.Format("Customer {0} refuses to pay {1} for its order ({2} - {3}).", + view.CustomerName, view.Amount, view.Drink, view.DrinkSize); + + Invoke(new Action(Log), logItem); + } + + public void NewOrder(NewOrderView view) + { + var logItem = String.Format("Customer {0} ordered {1} - {2}.", + view.CustomerName, view.Drink, view.DrinkSize); + + Invoke(new Action(Log), logItem); + } + + public void ReceivedFullPayment(ReceivedFullPaymentView view) + { + var logItem = String.Format("Customer {0} paid for its order ({1} - {2}).", + view.CustomerName, view.Drink, view.DrinkSize); + + Invoke(new Action(Log), logItem); + } + + public void Start() + { + Application.Run(this); + } + + private void Log(String logItem) + { + OrdersListBox.Items.Add(logItem); + } + } +} diff --git a/Samples/Starbucks/Cashier/StarbucksCashier.resx b/Samples/Starbucks/Cashier/StarbucksCashier.resx index 11113e43986..194da1e4138 100644 --- a/Samples/Starbucks/Cashier/StarbucksCashier.resx +++ b/Samples/Starbucks/Cashier/StarbucksCashier.resx @@ -1,120 +1,120 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + diff --git a/Samples/Starbucks/Cashier/ViewData/CustomerRefusesToPayView.cs b/Samples/Starbucks/Cashier/ViewData/CustomerRefusesToPayView.cs index b0eb63bd298..203c357ee94 100644 --- a/Samples/Starbucks/Cashier/ViewData/CustomerRefusesToPayView.cs +++ b/Samples/Starbucks/Cashier/ViewData/CustomerRefusesToPayView.cs @@ -1,21 +1,21 @@ -using System; -using CashierContracts; - -namespace Cashier.ViewData -{ - public class CustomerRefusesToPayView - { - public Decimal Amount { get; private set; } - public String CustomerName { get; private set; } - public String Drink { get; private set; } - public String DrinkSize { get; private set; } - - public CustomerRefusesToPayView(String customerName, Decimal amount, String drink, DrinkSize drinkSize) - { - CustomerName = customerName; - Amount = amount; - Drink = drink; - DrinkSize = drinkSize.ToString(); - } - } -} +using System; +using CashierContracts; + +namespace Cashier.ViewData +{ + public class CustomerRefusesToPayView + { + public Decimal Amount { get; private set; } + public String CustomerName { get; private set; } + public String Drink { get; private set; } + public String DrinkSize { get; private set; } + + public CustomerRefusesToPayView(String customerName, Decimal amount, String drink, DrinkSize drinkSize) + { + CustomerName = customerName; + Amount = amount; + Drink = drink; + DrinkSize = drinkSize.ToString(); + } + } +} diff --git a/Samples/Starbucks/Cashier/ViewData/NewOrderView.cs b/Samples/Starbucks/Cashier/ViewData/NewOrderView.cs index 50e7738f9d5..5d80b5a21e8 100644 --- a/Samples/Starbucks/Cashier/ViewData/NewOrderView.cs +++ b/Samples/Starbucks/Cashier/ViewData/NewOrderView.cs @@ -1,19 +1,19 @@ -using System; -using CashierContracts; - -namespace Cashier.ViewData -{ - public class NewOrderView - { - public String CustomerName { get; private set; } - public String Drink { get; private set; } - public String DrinkSize { get; private set; } - - public NewOrderView(NewOrderMessage message) - { - CustomerName = message.CustomerName; - Drink = message.Drink; - DrinkSize = message.DrinkSize.ToString(); - } - } -} +using System; +using CashierContracts; + +namespace Cashier.ViewData +{ + public class NewOrderView + { + public String CustomerName { get; private set; } + public String Drink { get; private set; } + public String DrinkSize { get; private set; } + + public NewOrderView(NewOrderMessage message) + { + CustomerName = message.CustomerName; + Drink = message.Drink; + DrinkSize = message.DrinkSize.ToString(); + } + } +} diff --git a/Samples/Starbucks/Cashier/ViewData/ReceivedFullPaymentView.cs b/Samples/Starbucks/Cashier/ViewData/ReceivedFullPaymentView.cs index 462d2d21e96..f02fde49959 100644 --- a/Samples/Starbucks/Cashier/ViewData/ReceivedFullPaymentView.cs +++ b/Samples/Starbucks/Cashier/ViewData/ReceivedFullPaymentView.cs @@ -1,19 +1,19 @@ -using System; -using CashierContracts; - -namespace Cashier.ViewData -{ - public class ReceivedFullPaymentView - { - public String CustomerName { get; private set; } - public String Drink { get; private set; } - public String DrinkSize { get; private set; } - - public ReceivedFullPaymentView(String customerName, String drink, DrinkSize drinkSize) - { - CustomerName = customerName; - Drink = drink; - DrinkSize = drinkSize.ToString(); - } - } -} +using System; +using CashierContracts; + +namespace Cashier.ViewData +{ + public class ReceivedFullPaymentView + { + public String CustomerName { get; private set; } + public String Drink { get; private set; } + public String DrinkSize { get; private set; } + + public ReceivedFullPaymentView(String customerName, String drink, DrinkSize drinkSize) + { + CustomerName = customerName; + Drink = drink; + DrinkSize = drinkSize.ToString(); + } + } +} diff --git a/Samples/Starbucks/CashierContracts/CashierContracts.csproj b/Samples/Starbucks/CashierContracts/CashierContracts.csproj index aee10e145e3..78c3e2b5d6b 100644 --- a/Samples/Starbucks/CashierContracts/CashierContracts.csproj +++ b/Samples/Starbucks/CashierContracts/CashierContracts.csproj @@ -1,58 +1,58 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {3963D354-2888-4005-8763-6E54A4D6BFCC} - Library - Properties - CashierContracts - CashierContracts - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - - - - False - ..\..\..\binaries\NServiceBus.dll - - - - - - - - - - - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {3963D354-2888-4005-8763-6E54A4D6BFCC} + Library + Properties + CashierContracts + CashierContracts + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + true + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + true + + + + False + ..\..\..\binaries\NServiceBus.dll + + + + + + + + + + + + + + diff --git a/Samples/Starbucks/CashierContracts/DrinkSize.cs b/Samples/Starbucks/CashierContracts/DrinkSize.cs index 65e224fbee0..24c5666bd98 100644 --- a/Samples/Starbucks/CashierContracts/DrinkSize.cs +++ b/Samples/Starbucks/CashierContracts/DrinkSize.cs @@ -1,9 +1,9 @@ -namespace CashierContracts -{ - public enum DrinkSize - { - Tall, - Grande, - Venti - } -} +namespace CashierContracts +{ + public enum DrinkSize + { + Tall, + Grande, + Venti + } +} diff --git a/Samples/Starbucks/CashierContracts/NewOrderMessage.cs b/Samples/Starbucks/CashierContracts/NewOrderMessage.cs index e96eccdf5a6..029f3aa88bc 100644 --- a/Samples/Starbucks/CashierContracts/NewOrderMessage.cs +++ b/Samples/Starbucks/CashierContracts/NewOrderMessage.cs @@ -1,22 +1,22 @@ -using System; -using NServiceBus; - -namespace CashierContracts -{ - [Serializable] - public class NewOrderMessage : IMessage - { - public String CustomerName { get; private set; } - public String Drink { get; private set; } - public DrinkSize DrinkSize { get; private set; } - public Guid OrderId { get; private set; } - - public NewOrderMessage(String customerName, String drink, DrinkSize drinkSize) - { - CustomerName = customerName; - Drink = drink; - DrinkSize = drinkSize; - OrderId = Guid.NewGuid(); - } - } -} +using System; +using NServiceBus; + +namespace CashierContracts +{ + [Serializable] + public class NewOrderMessage : IMessage + { + public String CustomerName { get; private set; } + public String Drink { get; private set; } + public DrinkSize DrinkSize { get; private set; } + public Guid OrderId { get; private set; } + + public NewOrderMessage(String customerName, String drink, DrinkSize drinkSize) + { + CustomerName = customerName; + Drink = drink; + DrinkSize = drinkSize; + OrderId = Guid.NewGuid(); + } + } +} diff --git a/Samples/Starbucks/CashierContracts/PaymentCompleteMessage.cs b/Samples/Starbucks/CashierContracts/PaymentCompleteMessage.cs index 994a10ebcd9..42021f42683 100644 --- a/Samples/Starbucks/CashierContracts/PaymentCompleteMessage.cs +++ b/Samples/Starbucks/CashierContracts/PaymentCompleteMessage.cs @@ -1,16 +1,16 @@ -using System; -using NServiceBus; - -namespace CashierContracts -{ - [Serializable] - public class PaymentCompleteMessage : IMessage - { - public Guid OrderId { get; private set; } - - public PaymentCompleteMessage(Guid orderId) - { - OrderId = orderId; - } - } -} +using System; +using NServiceBus; + +namespace CashierContracts +{ + [Serializable] + public class PaymentCompleteMessage : IMessage + { + public Guid OrderId { get; private set; } + + public PaymentCompleteMessage(Guid orderId) + { + OrderId = orderId; + } + } +} diff --git a/Samples/Starbucks/CashierContracts/PaymentMessage.cs b/Samples/Starbucks/CashierContracts/PaymentMessage.cs index 1e15aadab6e..f30ea867bd5 100644 --- a/Samples/Starbucks/CashierContracts/PaymentMessage.cs +++ b/Samples/Starbucks/CashierContracts/PaymentMessage.cs @@ -1,18 +1,18 @@ -using System; -using NServiceBus; - -namespace CashierContracts -{ - [Serializable] - public class PaymentMessage : IMessage - { - public Decimal Amount { get; private set; } - public Guid OrderId { get; private set; } - - public PaymentMessage(Decimal amount, Guid orderId) - { - Amount = amount; - OrderId = orderId; - } - } -} +using System; +using NServiceBus; + +namespace CashierContracts +{ + [Serializable] + public class PaymentMessage : IMessage + { + public Decimal Amount { get; private set; } + public Guid OrderId { get; private set; } + + public PaymentMessage(Decimal amount, Guid orderId) + { + Amount = amount; + OrderId = orderId; + } + } +} diff --git a/Samples/Starbucks/CashierContracts/PrepareOrderMessage.cs b/Samples/Starbucks/CashierContracts/PrepareOrderMessage.cs index e7e1054b0cf..383ca9503b2 100644 --- a/Samples/Starbucks/CashierContracts/PrepareOrderMessage.cs +++ b/Samples/Starbucks/CashierContracts/PrepareOrderMessage.cs @@ -1,22 +1,22 @@ -using System; -using NServiceBus; - -namespace CashierContracts -{ - [Serializable] - public class PrepareOrderMessage : IMessage - { - public String CustomerName { get; private set; } - public String Drink { get; private set; } - public DrinkSize DrinkSize { get; private set; } - public Guid OrderId { get; private set; } - - public PrepareOrderMessage(String customerName, String drink, DrinkSize size, Guid orderId) - { - CustomerName = customerName; - Drink = drink; - DrinkSize = size; - OrderId = orderId; - } - } -} +using System; +using NServiceBus; + +namespace CashierContracts +{ + [Serializable] + public class PrepareOrderMessage : IMessage + { + public String CustomerName { get; private set; } + public String Drink { get; private set; } + public DrinkSize DrinkSize { get; private set; } + public Guid OrderId { get; private set; } + + public PrepareOrderMessage(String customerName, String drink, DrinkSize size, Guid orderId) + { + CustomerName = customerName; + Drink = drink; + DrinkSize = size; + OrderId = orderId; + } + } +} diff --git a/Samples/Starbucks/CashierContracts/Properties/AssemblyInfo.cs b/Samples/Starbucks/CashierContracts/Properties/AssemblyInfo.cs index 586a289387c..d7fd0632540 100644 --- a/Samples/Starbucks/CashierContracts/Properties/AssemblyInfo.cs +++ b/Samples/Starbucks/CashierContracts/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("CashierContracts")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("CashierContracts")] -[assembly: AssemblyCopyright("Copyright 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("15e01ae1-e78d-4467-95a1-b5ce66f67de0")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("CashierContracts")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("CashierContracts")] +[assembly: AssemblyCopyright("Copyright 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("15e01ae1-e78d-4467-95a1-b5ce66f67de0")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/Starbucks/Customer/App.config b/Samples/Starbucks/Customer/App.config index 46c9a82e567..d8013216587 100644 --- a/Samples/Starbucks/Customer/App.config +++ b/Samples/Starbucks/Customer/App.config @@ -1,18 +1,18 @@ - - - -
-
- - - - - - - - - - + + + +
+
+ + + + + + + + + + diff --git a/Samples/Starbucks/Customer/Bootstrapper.cs b/Samples/Starbucks/Customer/Bootstrapper.cs index 2202ddb7061..8702199abb4 100644 --- a/Samples/Starbucks/Customer/Bootstrapper.cs +++ b/Samples/Starbucks/Customer/Bootstrapper.cs @@ -1,40 +1,40 @@ -using Cashier; -using NServiceBus; -using StructureMap; - -namespace Customer -{ - public class Bootstrapper - { - private Bootstrapper() - {} - - public static void Bootstrap() - { - BootstrapStructureMap(); - BootstrapNServiceBus(); - } - - private static void BootstrapStructureMap() - { - ObjectFactory.Initialize(x => x.AddRegistry(new CustomerRegistry())); - } - - private static void BootstrapNServiceBus() - { - Configure.With() - .Log4Net() - .StructureMapBuilder(ObjectFactory.Container) - .MsmqSubscriptionStorage() - .XmlSerializer() - .MsmqTransport() - .IsTransactional(true) - .PurgeOnStartup(false) - .UnicastBus() - .ImpersonateSender(false) - .LoadMessageHandlers() - .CreateBus() - .Start(); - } - } -} +using Cashier; +using NServiceBus; +using StructureMap; + +namespace Customer +{ + public class Bootstrapper + { + private Bootstrapper() + {} + + public static void Bootstrap() + { + BootstrapStructureMap(); + BootstrapNServiceBus(); + } + + private static void BootstrapStructureMap() + { + ObjectFactory.Initialize(x => x.AddRegistry(new CustomerRegistry())); + } + + private static void BootstrapNServiceBus() + { + Configure.With() + .Log4Net() + .StructureMapBuilder(ObjectFactory.Container) + .MsmqSubscriptionStorage() + .XmlSerializer() + .MsmqTransport() + .IsTransactional(true) + .PurgeOnStartup(false) + .UnicastBus() + .ImpersonateSender(false) + .LoadMessageHandlers() + .CreateBus() + .Start(); + } + } +} diff --git a/Samples/Starbucks/Customer/Customer.csproj b/Samples/Starbucks/Customer/Customer.csproj index be69f5517f1..cfb15ad0ead 100644 --- a/Samples/Starbucks/Customer/Customer.csproj +++ b/Samples/Starbucks/Customer/Customer.csproj @@ -1,104 +1,104 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {88B4585B-A73D-4EFC-9FA4-14B33FBBBE79} - WinExe - Properties - Customer - Customer - v4.0 - 512 - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - - - - False - ..\..\..\lib\log4net.dll - - - False - ..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\binaries\NServiceBus.Core.dll - - - False - ..\..\..\binaries\containers\structuremap\NServiceBus.ObjectBuilder.StructureMap.dll - - - False - ..\..\..\binaries\containers\structuremap\StructureMap.dll - - - - - - - - - - - - - - Form - - - CustomerOrder.cs - - - - - - - CustomerOrder.cs - - - - - - - - {3963D354-2888-4005-8763-6E54A4D6BFCC} - CashierContracts - - - {05882666-3DBD-4B8D-ADAE-439CABDD7DFB} - CustomerContracts - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {88B4585B-A73D-4EFC-9FA4-14B33FBBBE79} + WinExe + Properties + Customer + Customer + v4.0 + 512 + + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + true + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + true + + + + False + ..\..\..\lib\log4net.dll + + + False + ..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\binaries\NServiceBus.Core.dll + + + False + ..\..\..\binaries\containers\structuremap\NServiceBus.ObjectBuilder.StructureMap.dll + + + False + ..\..\..\binaries\containers\structuremap\StructureMap.dll + + + + + + + + + + + + + + Form + + + CustomerOrder.cs + + + + + + + CustomerOrder.cs + + + + + + + + {3963D354-2888-4005-8763-6E54A4D6BFCC} + CashierContracts + + + {05882666-3DBD-4B8D-ADAE-439CABDD7DFB} + CustomerContracts + + + + \ No newline at end of file diff --git a/Samples/Starbucks/Customer/CustomerOrder.Designer.cs b/Samples/Starbucks/Customer/CustomerOrder.Designer.cs index 477b39642df..880a72c6629 100644 --- a/Samples/Starbucks/Customer/CustomerOrder.Designer.cs +++ b/Samples/Starbucks/Customer/CustomerOrder.Designer.cs @@ -1,145 +1,145 @@ -namespace Customer -{ - partial class CustomerOrder - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if(disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.OrderButton = new System.Windows.Forms.Button(); - this.NameLabel = new System.Windows.Forms.Label(); - this.NameTextBox = new System.Windows.Forms.TextBox(); - this.DrinkLabel = new System.Windows.Forms.Label(); - this.SizeLabel = new System.Windows.Forms.Label(); - this.DrinkComboBox = new System.Windows.Forms.ComboBox(); - this.SizeComboBox = new System.Windows.Forms.ComboBox(); - this.SuspendLayout(); - // - // OrderButton - // - this.OrderButton.Location = new System.Drawing.Point(127, 164); - this.OrderButton.Name = "OrderButton"; - this.OrderButton.Size = new System.Drawing.Size(75, 23); - this.OrderButton.TabIndex = 3; - this.OrderButton.Text = "Order"; - this.OrderButton.UseVisualStyleBackColor = true; - this.OrderButton.Click += new System.EventHandler(this.OrderButton_Click); - // - // NameLabel - // - this.NameLabel.AutoSize = true; - this.NameLabel.Location = new System.Drawing.Point(12, 9); - this.NameLabel.Name = "NameLabel"; - this.NameLabel.Size = new System.Drawing.Size(58, 13); - this.NameLabel.TabIndex = 1; - this.NameLabel.Text = "Your name"; - // - // NameTextBox - // - this.NameTextBox.Location = new System.Drawing.Point(15, 25); - this.NameTextBox.Name = "NameTextBox"; - this.NameTextBox.Size = new System.Drawing.Size(187, 20); - this.NameTextBox.TabIndex = 0; - // - // DrinkLabel - // - this.DrinkLabel.AutoSize = true; - this.DrinkLabel.Location = new System.Drawing.Point(12, 59); - this.DrinkLabel.Name = "DrinkLabel"; - this.DrinkLabel.Size = new System.Drawing.Size(32, 13); - this.DrinkLabel.TabIndex = 3; - this.DrinkLabel.Text = "Drink"; - // - // SizeLabel - // - this.SizeLabel.AutoSize = true; - this.SizeLabel.Location = new System.Drawing.Point(12, 109); - this.SizeLabel.Name = "SizeLabel"; - this.SizeLabel.Size = new System.Drawing.Size(27, 13); - this.SizeLabel.TabIndex = 4; - this.SizeLabel.Text = "Size"; - // - // DrinkComboBox - // - this.DrinkComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.DrinkComboBox.FormattingEnabled = true; - this.DrinkComboBox.Items.AddRange(new object[] { - "Caramel Macchiato", - "Mocha", - "Americano", - "Latte", - "Cuban", - "Frapachappaccino"}); - this.DrinkComboBox.Location = new System.Drawing.Point(15, 75); - this.DrinkComboBox.Name = "DrinkComboBox"; - this.DrinkComboBox.Size = new System.Drawing.Size(187, 21); - this.DrinkComboBox.TabIndex = 1; - // - // SizeComboBox - // - this.SizeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.SizeComboBox.FormattingEnabled = true; - this.SizeComboBox.Items.AddRange(new object[] { - "Tall", - "Grande", - "Venti"}); - this.SizeComboBox.Location = new System.Drawing.Point(15, 125); - this.SizeComboBox.Name = "SizeComboBox"; - this.SizeComboBox.Size = new System.Drawing.Size(187, 21); - this.SizeComboBox.TabIndex = 2; - // - // CustomerOrder - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(217, 196); - this.Controls.Add(this.SizeComboBox); - this.Controls.Add(this.DrinkComboBox); - this.Controls.Add(this.SizeLabel); - this.Controls.Add(this.DrinkLabel); - this.Controls.Add(this.NameTextBox); - this.Controls.Add(this.NameLabel); - this.Controls.Add(this.OrderButton); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; - this.Name = "CustomerOrder"; - this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "Order @ Starbucks"; - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Button OrderButton; - private System.Windows.Forms.Label NameLabel; - private System.Windows.Forms.TextBox NameTextBox; - private System.Windows.Forms.Label DrinkLabel; - private System.Windows.Forms.Label SizeLabel; - private System.Windows.Forms.ComboBox DrinkComboBox; - private System.Windows.Forms.ComboBox SizeComboBox; - - } -} +namespace Customer +{ + partial class CustomerOrder + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if(disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.OrderButton = new System.Windows.Forms.Button(); + this.NameLabel = new System.Windows.Forms.Label(); + this.NameTextBox = new System.Windows.Forms.TextBox(); + this.DrinkLabel = new System.Windows.Forms.Label(); + this.SizeLabel = new System.Windows.Forms.Label(); + this.DrinkComboBox = new System.Windows.Forms.ComboBox(); + this.SizeComboBox = new System.Windows.Forms.ComboBox(); + this.SuspendLayout(); + // + // OrderButton + // + this.OrderButton.Location = new System.Drawing.Point(127, 164); + this.OrderButton.Name = "OrderButton"; + this.OrderButton.Size = new System.Drawing.Size(75, 23); + this.OrderButton.TabIndex = 3; + this.OrderButton.Text = "Order"; + this.OrderButton.UseVisualStyleBackColor = true; + this.OrderButton.Click += new System.EventHandler(this.OrderButton_Click); + // + // NameLabel + // + this.NameLabel.AutoSize = true; + this.NameLabel.Location = new System.Drawing.Point(12, 9); + this.NameLabel.Name = "NameLabel"; + this.NameLabel.Size = new System.Drawing.Size(58, 13); + this.NameLabel.TabIndex = 1; + this.NameLabel.Text = "Your name"; + // + // NameTextBox + // + this.NameTextBox.Location = new System.Drawing.Point(15, 25); + this.NameTextBox.Name = "NameTextBox"; + this.NameTextBox.Size = new System.Drawing.Size(187, 20); + this.NameTextBox.TabIndex = 0; + // + // DrinkLabel + // + this.DrinkLabel.AutoSize = true; + this.DrinkLabel.Location = new System.Drawing.Point(12, 59); + this.DrinkLabel.Name = "DrinkLabel"; + this.DrinkLabel.Size = new System.Drawing.Size(32, 13); + this.DrinkLabel.TabIndex = 3; + this.DrinkLabel.Text = "Drink"; + // + // SizeLabel + // + this.SizeLabel.AutoSize = true; + this.SizeLabel.Location = new System.Drawing.Point(12, 109); + this.SizeLabel.Name = "SizeLabel"; + this.SizeLabel.Size = new System.Drawing.Size(27, 13); + this.SizeLabel.TabIndex = 4; + this.SizeLabel.Text = "Size"; + // + // DrinkComboBox + // + this.DrinkComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.DrinkComboBox.FormattingEnabled = true; + this.DrinkComboBox.Items.AddRange(new object[] { + "Caramel Macchiato", + "Mocha", + "Americano", + "Latte", + "Cuban", + "Frapachappaccino"}); + this.DrinkComboBox.Location = new System.Drawing.Point(15, 75); + this.DrinkComboBox.Name = "DrinkComboBox"; + this.DrinkComboBox.Size = new System.Drawing.Size(187, 21); + this.DrinkComboBox.TabIndex = 1; + // + // SizeComboBox + // + this.SizeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.SizeComboBox.FormattingEnabled = true; + this.SizeComboBox.Items.AddRange(new object[] { + "Tall", + "Grande", + "Venti"}); + this.SizeComboBox.Location = new System.Drawing.Point(15, 125); + this.SizeComboBox.Name = "SizeComboBox"; + this.SizeComboBox.Size = new System.Drawing.Size(187, 21); + this.SizeComboBox.TabIndex = 2; + // + // CustomerOrder + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(217, 196); + this.Controls.Add(this.SizeComboBox); + this.Controls.Add(this.DrinkComboBox); + this.Controls.Add(this.SizeLabel); + this.Controls.Add(this.DrinkLabel); + this.Controls.Add(this.NameTextBox); + this.Controls.Add(this.NameLabel); + this.Controls.Add(this.OrderButton); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; + this.Name = "CustomerOrder"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Order @ Starbucks"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button OrderButton; + private System.Windows.Forms.Label NameLabel; + private System.Windows.Forms.TextBox NameTextBox; + private System.Windows.Forms.Label DrinkLabel; + private System.Windows.Forms.Label SizeLabel; + private System.Windows.Forms.ComboBox DrinkComboBox; + private System.Windows.Forms.ComboBox SizeComboBox; + + } +} diff --git a/Samples/Starbucks/Customer/CustomerOrder.cs b/Samples/Starbucks/Customer/CustomerOrder.cs index f9704dd4404..d2d788370c2 100644 --- a/Samples/Starbucks/Customer/CustomerOrder.cs +++ b/Samples/Starbucks/Customer/CustomerOrder.cs @@ -1,46 +1,46 @@ -using System; -using System.Windows.Forms; -using CashierContracts; -using CustomerContracts; -using NServiceBus; - -namespace Customer -{ - public partial class CustomerOrder : Form, - IHandleMessages, - IHandleMessages - { - private readonly IBus _bus; - - public CustomerOrder(IBus bus) - { - _bus = bus; - InitializeComponent(); - } - - private void OrderButton_Click(Object sender, EventArgs e) - { - var customerName = NameTextBox.Text; - var drink = DrinkComboBox.Text; - var drinkSize = (DrinkSize) Enum.Parse(typeof(DrinkSize), SizeComboBox.Text); - - var newOrder = new NewOrderMessage(customerName, drink, drinkSize); - _bus.Send(newOrder); - } - - public new void Handle(PaymentRequestMessage message) - { - var text = String.Format("Hi {0}, thanks for your order. That'll be {1} please.", message.CustomerName, message.Amount); - var result = MessageBox.Show(text, "Request payment", MessageBoxButtons.YesNo); - - var amount = (DialogResult.Yes == result) ? message.Amount : 0.0m; - _bus.Reply(new PaymentMessage(amount, message.OrderId)); - } - - public new void Handle(OrderReadyMessage message) - { - var text = String.Format("Here you go {0}, enjoy your {1}. Thank you, come again.", message.CustomerName, message.Drink); - MessageBox.Show(text); - } - } -} +using System; +using System.Windows.Forms; +using CashierContracts; +using CustomerContracts; +using NServiceBus; + +namespace Customer +{ + public partial class CustomerOrder : Form, + IHandleMessages, + IHandleMessages + { + private readonly IBus _bus; + + public CustomerOrder(IBus bus) + { + _bus = bus; + InitializeComponent(); + } + + private void OrderButton_Click(Object sender, EventArgs e) + { + var customerName = NameTextBox.Text; + var drink = DrinkComboBox.Text; + var drinkSize = (DrinkSize) Enum.Parse(typeof(DrinkSize), SizeComboBox.Text); + + var newOrder = new NewOrderMessage(customerName, drink, drinkSize); + _bus.Send(newOrder); + } + + public new void Handle(PaymentRequestMessage message) + { + var text = String.Format("Hi {0}, thanks for your order. That'll be {1} please.", message.CustomerName, message.Amount); + var result = MessageBox.Show(text, "Request payment", MessageBoxButtons.YesNo); + + var amount = (DialogResult.Yes == result) ? message.Amount : 0.0m; + _bus.Reply(new PaymentMessage(amount, message.OrderId)); + } + + public new void Handle(OrderReadyMessage message) + { + var text = String.Format("Here you go {0}, enjoy your {1}. Thank you, come again.", message.CustomerName, message.Drink); + MessageBox.Show(text); + } + } +} diff --git a/Samples/Starbucks/Customer/CustomerOrder.resx b/Samples/Starbucks/Customer/CustomerOrder.resx index 11113e43986..194da1e4138 100644 --- a/Samples/Starbucks/Customer/CustomerOrder.resx +++ b/Samples/Starbucks/Customer/CustomerOrder.resx @@ -1,120 +1,120 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + diff --git a/Samples/Starbucks/Customer/CustomerRegistry.cs b/Samples/Starbucks/Customer/CustomerRegistry.cs index bb5db01f5be..15e1a59718a 100644 --- a/Samples/Starbucks/Customer/CustomerRegistry.cs +++ b/Samples/Starbucks/Customer/CustomerRegistry.cs @@ -1,13 +1,13 @@ -using Customer; -using StructureMap.Configuration.DSL; - -namespace Cashier -{ - public class CustomerRegistry : Registry - { - public CustomerRegistry() - { - - } - } -} +using Customer; +using StructureMap.Configuration.DSL; + +namespace Cashier +{ + public class CustomerRegistry : Registry + { + public CustomerRegistry() + { + + } + } +} diff --git a/Samples/Starbucks/Customer/Program.cs b/Samples/Starbucks/Customer/Program.cs index 2b45f58f861..d3fbd980ba3 100644 --- a/Samples/Starbucks/Customer/Program.cs +++ b/Samples/Starbucks/Customer/Program.cs @@ -1,24 +1,24 @@ -using System; -using System.Windows.Forms; -using StructureMap; - -namespace Customer -{ - internal static class Program - { - /// - /// The main entry point for the application. - /// - [STAThread] - private static void Main() - { - Bootstrapper.Bootstrap(); - - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - - var startupDialog = ObjectFactory.GetInstance(); - Application.Run(startupDialog); - } - } -} +using System; +using System.Windows.Forms; +using StructureMap; + +namespace Customer +{ + internal static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + private static void Main() + { + Bootstrapper.Bootstrap(); + + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + + var startupDialog = ObjectFactory.GetInstance(); + Application.Run(startupDialog); + } + } +} diff --git a/Samples/Starbucks/Customer/Properties/AssemblyInfo.cs b/Samples/Starbucks/Customer/Properties/AssemblyInfo.cs index c9b3fa31f79..43f37b2f34e 100644 --- a/Samples/Starbucks/Customer/Properties/AssemblyInfo.cs +++ b/Samples/Starbucks/Customer/Properties/AssemblyInfo.cs @@ -1,35 +1,35 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Starbucks")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Starbucks")] -[assembly: AssemblyCopyright("Copyright 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("95d68a80-2651-4438-99f3-dcc3b6ff8fa2")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Starbucks")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Starbucks")] +[assembly: AssemblyCopyright("Copyright 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("95d68a80-2651-4438-99f3-dcc3b6ff8fa2")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/Starbucks/CustomerContracts/CustomerContracts.csproj b/Samples/Starbucks/CustomerContracts/CustomerContracts.csproj index 461a98878f9..9d0309a7b85 100644 --- a/Samples/Starbucks/CustomerContracts/CustomerContracts.csproj +++ b/Samples/Starbucks/CustomerContracts/CustomerContracts.csproj @@ -1,58 +1,58 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {05882666-3DBD-4B8D-ADAE-439CABDD7DFB} - Library - Properties - CustomerContracts - CustomerContracts - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - true - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - true - - - - False - ..\..\..\binaries\NServiceBus.dll - - - - - - - - - - - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {05882666-3DBD-4B8D-ADAE-439CABDD7DFB} + Library + Properties + CustomerContracts + CustomerContracts + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + true + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + true + + + + False + ..\..\..\binaries\NServiceBus.dll + + + + + + + + + + + + + + diff --git a/Samples/Starbucks/CustomerContracts/OrderReadyMessage.cs b/Samples/Starbucks/CustomerContracts/OrderReadyMessage.cs index 14a263452b1..cdd44cab897 100644 --- a/Samples/Starbucks/CustomerContracts/OrderReadyMessage.cs +++ b/Samples/Starbucks/CustomerContracts/OrderReadyMessage.cs @@ -1,18 +1,18 @@ -using System; -using NServiceBus; - -namespace CustomerContracts -{ - [Serializable] - public class OrderReadyMessage : IMessage - { - public String CustomerName { get; set; } - public String Drink { get; set; } - - public OrderReadyMessage(String customerName, String drink) - { - CustomerName = customerName; - Drink = drink; - } - } -} +using System; +using NServiceBus; + +namespace CustomerContracts +{ + [Serializable] + public class OrderReadyMessage : IMessage + { + public String CustomerName { get; set; } + public String Drink { get; set; } + + public OrderReadyMessage(String customerName, String drink) + { + CustomerName = customerName; + Drink = drink; + } + } +} diff --git a/Samples/Starbucks/CustomerContracts/PaymentRequestMessage.cs b/Samples/Starbucks/CustomerContracts/PaymentRequestMessage.cs index 7835ac906ec..c09d15112ae 100644 --- a/Samples/Starbucks/CustomerContracts/PaymentRequestMessage.cs +++ b/Samples/Starbucks/CustomerContracts/PaymentRequestMessage.cs @@ -1,20 +1,20 @@ -using System; -using NServiceBus; - -namespace CustomerContracts -{ - [Serializable] - public class PaymentRequestMessage : IMessage - { - public Decimal Amount { get; private set; } - public String CustomerName { get; private set; } - public Guid OrderId { get; private set; } - - public PaymentRequestMessage(Decimal amount, String customerName, Guid orderId) - { - Amount = amount; - CustomerName = customerName; - OrderId = orderId; - } - } -} +using System; +using NServiceBus; + +namespace CustomerContracts +{ + [Serializable] + public class PaymentRequestMessage : IMessage + { + public Decimal Amount { get; private set; } + public String CustomerName { get; private set; } + public Guid OrderId { get; private set; } + + public PaymentRequestMessage(Decimal amount, String customerName, Guid orderId) + { + Amount = amount; + CustomerName = customerName; + OrderId = orderId; + } + } +} diff --git a/Samples/Starbucks/CustomerContracts/Properties/AssemblyInfo.cs b/Samples/Starbucks/CustomerContracts/Properties/AssemblyInfo.cs index 725c3fd347d..6306bcc9b34 100644 --- a/Samples/Starbucks/CustomerContracts/Properties/AssemblyInfo.cs +++ b/Samples/Starbucks/CustomerContracts/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("CustomerContracts")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("CustomerContracts")] -[assembly: AssemblyCopyright("Copyright 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("b661ecb2-d7f2-4346-94a8-198ec4b10b3b")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("CustomerContracts")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("CustomerContracts")] +[assembly: AssemblyCopyright("Copyright 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("b661ecb2-d7f2-4346-94a8-198ec4b10b3b")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/Starbucks/Starbucks.sln b/Samples/Starbucks/Starbucks.sln index f8142439db7..a4a249d177a 100644 --- a/Samples/Starbucks/Starbucks.sln +++ b/Samples/Starbucks/Starbucks.sln @@ -1,44 +1,44 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cashier", "Cashier\Cashier.csproj", "{DCCBF183-A703-4999-BB10-046E6C2800B9}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Customer", "Customer\Customer.csproj", "{88B4585B-A73D-4EFC-9FA4-14B33FBBBE79}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CashierContracts", "CashierContracts\CashierContracts.csproj", "{3963D354-2888-4005-8763-6E54A4D6BFCC}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomerContracts", "CustomerContracts\CustomerContracts.csproj", "{05882666-3DBD-4B8D-ADAE-439CABDD7DFB}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Barista", "Barista\Barista.csproj", "{F5C48D42-06F2-4CCA-88B5-6C49F2A09065}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {DCCBF183-A703-4999-BB10-046E6C2800B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DCCBF183-A703-4999-BB10-046E6C2800B9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DCCBF183-A703-4999-BB10-046E6C2800B9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DCCBF183-A703-4999-BB10-046E6C2800B9}.Release|Any CPU.Build.0 = Release|Any CPU - {88B4585B-A73D-4EFC-9FA4-14B33FBBBE79}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {88B4585B-A73D-4EFC-9FA4-14B33FBBBE79}.Debug|Any CPU.Build.0 = Debug|Any CPU - {88B4585B-A73D-4EFC-9FA4-14B33FBBBE79}.Release|Any CPU.ActiveCfg = Release|Any CPU - {88B4585B-A73D-4EFC-9FA4-14B33FBBBE79}.Release|Any CPU.Build.0 = Release|Any CPU - {3963D354-2888-4005-8763-6E54A4D6BFCC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3963D354-2888-4005-8763-6E54A4D6BFCC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3963D354-2888-4005-8763-6E54A4D6BFCC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3963D354-2888-4005-8763-6E54A4D6BFCC}.Release|Any CPU.Build.0 = Release|Any CPU - {05882666-3DBD-4B8D-ADAE-439CABDD7DFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {05882666-3DBD-4B8D-ADAE-439CABDD7DFB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {05882666-3DBD-4B8D-ADAE-439CABDD7DFB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {05882666-3DBD-4B8D-ADAE-439CABDD7DFB}.Release|Any CPU.Build.0 = Release|Any CPU - {F5C48D42-06F2-4CCA-88B5-6C49F2A09065}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F5C48D42-06F2-4CCA-88B5-6C49F2A09065}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F5C48D42-06F2-4CCA-88B5-6C49F2A09065}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F5C48D42-06F2-4CCA-88B5-6C49F2A09065}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cashier", "Cashier\Cashier.csproj", "{DCCBF183-A703-4999-BB10-046E6C2800B9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Customer", "Customer\Customer.csproj", "{88B4585B-A73D-4EFC-9FA4-14B33FBBBE79}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CashierContracts", "CashierContracts\CashierContracts.csproj", "{3963D354-2888-4005-8763-6E54A4D6BFCC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomerContracts", "CustomerContracts\CustomerContracts.csproj", "{05882666-3DBD-4B8D-ADAE-439CABDD7DFB}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Barista", "Barista\Barista.csproj", "{F5C48D42-06F2-4CCA-88B5-6C49F2A09065}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DCCBF183-A703-4999-BB10-046E6C2800B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DCCBF183-A703-4999-BB10-046E6C2800B9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DCCBF183-A703-4999-BB10-046E6C2800B9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DCCBF183-A703-4999-BB10-046E6C2800B9}.Release|Any CPU.Build.0 = Release|Any CPU + {88B4585B-A73D-4EFC-9FA4-14B33FBBBE79}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {88B4585B-A73D-4EFC-9FA4-14B33FBBBE79}.Debug|Any CPU.Build.0 = Debug|Any CPU + {88B4585B-A73D-4EFC-9FA4-14B33FBBBE79}.Release|Any CPU.ActiveCfg = Release|Any CPU + {88B4585B-A73D-4EFC-9FA4-14B33FBBBE79}.Release|Any CPU.Build.0 = Release|Any CPU + {3963D354-2888-4005-8763-6E54A4D6BFCC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3963D354-2888-4005-8763-6E54A4D6BFCC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3963D354-2888-4005-8763-6E54A4D6BFCC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3963D354-2888-4005-8763-6E54A4D6BFCC}.Release|Any CPU.Build.0 = Release|Any CPU + {05882666-3DBD-4B8D-ADAE-439CABDD7DFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {05882666-3DBD-4B8D-ADAE-439CABDD7DFB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {05882666-3DBD-4B8D-ADAE-439CABDD7DFB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {05882666-3DBD-4B8D-ADAE-439CABDD7DFB}.Release|Any CPU.Build.0 = Release|Any CPU + {F5C48D42-06F2-4CCA-88B5-6C49F2A09065}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F5C48D42-06F2-4CCA-88B5-6C49F2A09065}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F5C48D42-06F2-4CCA-88B5-6C49F2A09065}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F5C48D42-06F2-4CCA-88B5-6C49F2A09065}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Samples/Versioning/V1.Messages/Properties/AssemblyInfo.cs b/Samples/Versioning/V1.Messages/Properties/AssemblyInfo.cs index f8097fb753c..088d0808492 100644 --- a/Samples/Versioning/V1.Messages/Properties/AssemblyInfo.cs +++ b/Samples/Versioning/V1.Messages/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("V1.Messages")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("V1.Messages")] -[assembly: AssemblyCopyright("Copyright © 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("8cb47027-5c02-440a-ac79-b1473f8bf5ac")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("V1.Messages")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("V1.Messages")] +[assembly: AssemblyCopyright("Copyright © 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("8cb47027-5c02-440a-ac79-b1473f8bf5ac")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/Versioning/V1.Messages/SomethingHappened.cs b/Samples/Versioning/V1.Messages/SomethingHappened.cs index 07df2ec2cac..1ea39554330 100644 --- a/Samples/Versioning/V1.Messages/SomethingHappened.cs +++ b/Samples/Versioning/V1.Messages/SomethingHappened.cs @@ -1,9 +1,9 @@ -using NServiceBus; - -namespace V1.Messages -{ - public interface SomethingHappened : IMessage - { - int SomeData { get; set; } - } -} +using NServiceBus; + +namespace V1.Messages +{ + public interface SomethingHappened : IMessage + { + int SomeData { get; set; } + } +} diff --git a/Samples/Versioning/V1.Messages/V1.Messages.csproj b/Samples/Versioning/V1.Messages/V1.Messages.csproj index 983e07634b0..af221d66acc 100644 --- a/Samples/Versioning/V1.Messages/V1.Messages.csproj +++ b/Samples/Versioning/V1.Messages/V1.Messages.csproj @@ -1,94 +1,94 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {9D27D517-B938-4594-8836-CE06A2955FFD} - Library - Properties - V1.Messages - V1.Messages - v4.0 - 512 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\binaries\NServiceBus.dll - - - - - - - - - - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {9D27D517-B938-4594-8836-CE06A2955FFD} + Library + Properties + V1.Messages + V1.Messages + v4.0 + 512 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\binaries\NServiceBus.dll + + + + + + + + + + + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + \ No newline at end of file diff --git a/Samples/Versioning/V1Subscriber/App.config b/Samples/Versioning/V1Subscriber/App.config index 434482c130e..1e0c089f314 100644 --- a/Samples/Versioning/V1Subscriber/App.config +++ b/Samples/Versioning/V1Subscriber/App.config @@ -1,26 +1,26 @@ - - - -
-
- - - - - - - - - - - - - + + + +
+
+ + + + + + + + + + + + + diff --git a/Samples/Versioning/V1Subscriber/Properties/AssemblyInfo.cs b/Samples/Versioning/V1Subscriber/Properties/AssemblyInfo.cs index 86e6bf867eb..021cbd1871d 100644 --- a/Samples/Versioning/V1Subscriber/Properties/AssemblyInfo.cs +++ b/Samples/Versioning/V1Subscriber/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("V1Subscriber")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("V1Subscriber")] -[assembly: AssemblyCopyright("Copyright © 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("8d2802a8-703c-4b6d-82fa-81efe8612eed")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("V1Subscriber")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("V1Subscriber")] +[assembly: AssemblyCopyright("Copyright © 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("8d2802a8-703c-4b6d-82fa-81efe8612eed")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/Versioning/V1Subscriber/SomethingHappenedHandler.cs b/Samples/Versioning/V1Subscriber/SomethingHappenedHandler.cs index d90ca9464bf..06ba77e93c0 100644 --- a/Samples/Versioning/V1Subscriber/SomethingHappenedHandler.cs +++ b/Samples/Versioning/V1Subscriber/SomethingHappenedHandler.cs @@ -1,16 +1,16 @@ -using System; -using NServiceBus; -using V1.Messages; - -namespace V1Subscriber -{ - public class SomethingHappenedHandler : IHandleMessages - { - public void Handle(SomethingHappened message) - { - Console.WriteLine("======================================================================"); - - Console.WriteLine("Something happened with some data {0} and no more info", message.SomeData); - } - } -} +using System; +using NServiceBus; +using V1.Messages; + +namespace V1Subscriber +{ + public class SomethingHappenedHandler : IHandleMessages + { + public void Handle(SomethingHappened message) + { + Console.WriteLine("======================================================================"); + + Console.WriteLine("Something happened with some data {0} and no more info", message.SomeData); + } + } +} diff --git a/Samples/Versioning/V1Subscriber/V1Subscriber.csproj b/Samples/Versioning/V1Subscriber/V1Subscriber.csproj index 3eefda864bc..88989dd0f95 100644 --- a/Samples/Versioning/V1Subscriber/V1Subscriber.csproj +++ b/Samples/Versioning/V1Subscriber/V1Subscriber.csproj @@ -1,122 +1,122 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {FBA8997D-01C8-458D-ACE6-28DC7BC32711} - Library - Properties - V1Subscriber - V1Subscriber - v4.0 - 512 - - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\binaries\log4net.dll - - - False - ..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\binaries\NServiceBus.Core.dll - - - False - ..\..\..\binaries\NServiceBus.Host.exe - - - - - - - - - - - - - - - - - - - {9D27D517-B938-4594-8836-CE06A2955FFD} - V1.Messages - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - Program - $(ProjectDir)$(OutputPath)NServiceBus.Host.exe - AllRules.ruleset - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {FBA8997D-01C8-458D-ACE6-28DC7BC32711} + Library + Properties + V1Subscriber + V1Subscriber + v4.0 + 512 + + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\binaries\log4net.dll + + + False + ..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\binaries\NServiceBus.Core.dll + + + False + ..\..\..\binaries\NServiceBus.Host.exe + + + + + + + + + + + + + + + + + + + {9D27D517-B938-4594-8836-CE06A2955FFD} + V1.Messages + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + Program + $(ProjectDir)$(OutputPath)NServiceBus.Host.exe + AllRules.ruleset + \ No newline at end of file diff --git a/Samples/Versioning/V1Subscriber/V1SubscriberEndpoint.cs b/Samples/Versioning/V1Subscriber/V1SubscriberEndpoint.cs index 826983aba28..cd8a03ca769 100644 --- a/Samples/Versioning/V1Subscriber/V1SubscriberEndpoint.cs +++ b/Samples/Versioning/V1Subscriber/V1SubscriberEndpoint.cs @@ -1,6 +1,6 @@ -using NServiceBus; - -namespace V1Subscriber -{ - public class V1SubscriberEndpoint : IConfigureThisEndpoint, AsA_Server { } +using NServiceBus; + +namespace V1Subscriber +{ + public class V1SubscriberEndpoint : IConfigureThisEndpoint, AsA_Server { } } \ No newline at end of file diff --git a/Samples/Versioning/V2.Messages/Properties/AssemblyInfo.cs b/Samples/Versioning/V2.Messages/Properties/AssemblyInfo.cs index 7ef9540b808..9c0609dd4f2 100644 --- a/Samples/Versioning/V2.Messages/Properties/AssemblyInfo.cs +++ b/Samples/Versioning/V2.Messages/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("V2.Messages")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("V2.Messages")] -[assembly: AssemblyCopyright("Copyright © 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("72d32ed7-2bb2-4149-adc1-df0370fe72fd")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("V2.Messages")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("V2.Messages")] +[assembly: AssemblyCopyright("Copyright © 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("72d32ed7-2bb2-4149-adc1-df0370fe72fd")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/Versioning/V2.Messages/SomethingHappened.cs b/Samples/Versioning/V2.Messages/SomethingHappened.cs index 8be392776db..426e2ab5efc 100644 --- a/Samples/Versioning/V2.Messages/SomethingHappened.cs +++ b/Samples/Versioning/V2.Messages/SomethingHappened.cs @@ -1,7 +1,7 @@ -namespace V2.Messages -{ - public interface SomethingHappened : V1.Messages.SomethingHappened - { - string MoreInfo { get; set; } - } -} +namespace V2.Messages +{ + public interface SomethingHappened : V1.Messages.SomethingHappened + { + string MoreInfo { get; set; } + } +} diff --git a/Samples/Versioning/V2.Messages/V2.Messages.csproj b/Samples/Versioning/V2.Messages/V2.Messages.csproj index e78fb1ee4b0..c5669f740f5 100644 --- a/Samples/Versioning/V2.Messages/V2.Messages.csproj +++ b/Samples/Versioning/V2.Messages/V2.Messages.csproj @@ -1,100 +1,100 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {D22F0CFF-D47F-4541-BD6D-3F07808EE468} - Library - Properties - V2.Messages - V2.Messages - v4.0 - 512 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\binaries\NServiceBus.dll - - - - - - - - - - - - - - - - - - {9D27D517-B938-4594-8836-CE06A2955FFD} - V1.Messages - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {D22F0CFF-D47F-4541-BD6D-3F07808EE468} + Library + Properties + V2.Messages + V2.Messages + v4.0 + 512 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\binaries\NServiceBus.dll + + + + + + + + + + + + + + + + + + {9D27D517-B938-4594-8836-CE06A2955FFD} + V1.Messages + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + \ No newline at end of file diff --git a/Samples/Versioning/V2Publisher/App.config b/Samples/Versioning/V2Publisher/App.config index 9647b11064a..67d956d01d8 100644 --- a/Samples/Versioning/V2Publisher/App.config +++ b/Samples/Versioning/V2Publisher/App.config @@ -1,28 +1,28 @@ - - - -
-
-
- - - - - - - - - - - - - - + + + +
+
+
+ + + + + + + + + + + + + + diff --git a/Samples/Versioning/V2Publisher/EndpointConfig.cs b/Samples/Versioning/V2Publisher/EndpointConfig.cs index 610e92d7802..4fd7e133886 100644 --- a/Samples/Versioning/V2Publisher/EndpointConfig.cs +++ b/Samples/Versioning/V2Publisher/EndpointConfig.cs @@ -1,6 +1,6 @@ -using NServiceBus; - -namespace V2Publisher -{ - class EndpointConfig : IConfigureThisEndpoint, AsA_Publisher { } -} +using NServiceBus; + +namespace V2Publisher +{ + class EndpointConfig : IConfigureThisEndpoint, AsA_Publisher { } +} diff --git a/Samples/Versioning/V2Publisher/Properties/AssemblyInfo.cs b/Samples/Versioning/V2Publisher/Properties/AssemblyInfo.cs index c8579a7f9bd..b6bfc845e9e 100644 --- a/Samples/Versioning/V2Publisher/Properties/AssemblyInfo.cs +++ b/Samples/Versioning/V2Publisher/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("V2Publisher")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("V2Publisher")] -[assembly: AssemblyCopyright("Copyright © 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("cd90d941-dc63-48f4-a327-a9a8c1352e6a")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("V2Publisher")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("V2Publisher")] +[assembly: AssemblyCopyright("Copyright © 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("cd90d941-dc63-48f4-a327-a9a8c1352e6a")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/Versioning/V2Publisher/V2Publisher.csproj b/Samples/Versioning/V2Publisher/V2Publisher.csproj index cc488eb6bb9..17bbcc5e8a3 100644 --- a/Samples/Versioning/V2Publisher/V2Publisher.csproj +++ b/Samples/Versioning/V2Publisher/V2Publisher.csproj @@ -1,119 +1,119 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {CCC62E59-19DD-44B7-B565-CEA7AE8A83EC} - Library - Properties - V2Publisher - V2Publisher - v4.0 - 512 - - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\binaries\log4net.dll - - - False - ..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\binaries\NServiceBus.Core.dll - - - False - ..\..\..\binaries\NServiceBus.Host.exe - - - - - - - - - - - - - - - - - - - {9D27D517-B938-4594-8836-CE06A2955FFD} - V1.Messages - - - {D22F0CFF-D47F-4541-BD6D-3F07808EE468} - V2.Messages - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - Program - $(ProjectDir)$(OutputPath)NServiceBus.Host.exe - AllRules.ruleset - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {CCC62E59-19DD-44B7-B565-CEA7AE8A83EC} + Library + Properties + V2Publisher + V2Publisher + v4.0 + 512 + + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\binaries\log4net.dll + + + False + ..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\binaries\NServiceBus.Core.dll + + + False + ..\..\..\binaries\NServiceBus.Host.exe + + + + + + + + + + + + + + + + + + + {9D27D517-B938-4594-8836-CE06A2955FFD} + V1.Messages + + + {D22F0CFF-D47F-4541-BD6D-3F07808EE468} + V2.Messages + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + Program + $(ProjectDir)$(OutputPath)NServiceBus.Host.exe + AllRules.ruleset + \ No newline at end of file diff --git a/Samples/Versioning/V2Publisher/V2PublisherEndpoint.cs b/Samples/Versioning/V2Publisher/V2PublisherEndpoint.cs index 8d3801ae284..32426323974 100644 --- a/Samples/Versioning/V2Publisher/V2PublisherEndpoint.cs +++ b/Samples/Versioning/V2Publisher/V2PublisherEndpoint.cs @@ -1,31 +1,31 @@ -using System; -using NServiceBus; - -namespace V2Publisher -{ - public class V2PublisherEndpoint : IWantToRunAtStartup - { - public IBus Bus { get; set; } - - public void Run() - { - Console.WriteLine("Press 'Enter' to publish a message, Ctrl + C to exit."); - - while (Console.ReadLine() != null) - { - Bus.Publish(sh => - { - sh.SomeData = 1; - sh.MoreInfo = "It's a secret."; - }); - - Console.WriteLine("Published event."); - Console.WriteLine("======================================================================"); - } - } - - public void Stop() - { - } - } +using System; +using NServiceBus; + +namespace V2Publisher +{ + public class V2PublisherEndpoint : IWantToRunAtStartup + { + public IBus Bus { get; set; } + + public void Run() + { + Console.WriteLine("Press 'Enter' to publish a message, Ctrl + C to exit."); + + while (Console.ReadLine() != null) + { + Bus.Publish(sh => + { + sh.SomeData = 1; + sh.MoreInfo = "It's a secret."; + }); + + Console.WriteLine("Published event."); + Console.WriteLine("======================================================================"); + } + } + + public void Stop() + { + } + } } \ No newline at end of file diff --git a/Samples/Versioning/V2Subscriber/App.config b/Samples/Versioning/V2Subscriber/App.config index 47c80c2023a..a0171b447a3 100644 --- a/Samples/Versioning/V2Subscriber/App.config +++ b/Samples/Versioning/V2Subscriber/App.config @@ -1,26 +1,26 @@ - - - -
-
- - - - - - - - - - - - - + + + +
+
+ + + + + + + + + + + + + diff --git a/Samples/Versioning/V2Subscriber/Properties/AssemblyInfo.cs b/Samples/Versioning/V2Subscriber/Properties/AssemblyInfo.cs index 13f05a5d61a..892c271432f 100644 --- a/Samples/Versioning/V2Subscriber/Properties/AssemblyInfo.cs +++ b/Samples/Versioning/V2Subscriber/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("V2Subscriber")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("V2Subscriber")] -[assembly: AssemblyCopyright("Copyright © 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("dbcc73b3-ca40-41d1-a4cb-0fb3f2eaaf6d")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("V2Subscriber")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("V2Subscriber")] +[assembly: AssemblyCopyright("Copyright © 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("dbcc73b3-ca40-41d1-a4cb-0fb3f2eaaf6d")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/Versioning/V2Subscriber/SomethingHappenedHandler.cs b/Samples/Versioning/V2Subscriber/SomethingHappenedHandler.cs index 89f0c3f00cc..7b4ad8a09e1 100644 --- a/Samples/Versioning/V2Subscriber/SomethingHappenedHandler.cs +++ b/Samples/Versioning/V2Subscriber/SomethingHappenedHandler.cs @@ -1,16 +1,16 @@ -using System; -using V2.Messages; -using NServiceBus; - -namespace V2Subscriber -{ - public class SomethingHappenedHandler : IHandleMessages - { - public void Handle(SomethingHappened message) - { - Console.WriteLine("======================================================================"); - - Console.WriteLine("Something happened with some data {0} and more info {1}", message.SomeData, message.MoreInfo); - } - } -} +using System; +using V2.Messages; +using NServiceBus; + +namespace V2Subscriber +{ + public class SomethingHappenedHandler : IHandleMessages + { + public void Handle(SomethingHappened message) + { + Console.WriteLine("======================================================================"); + + Console.WriteLine("Something happened with some data {0} and more info {1}", message.SomeData, message.MoreInfo); + } + } +} diff --git a/Samples/Versioning/V2Subscriber/V2Subscriber.csproj b/Samples/Versioning/V2Subscriber/V2Subscriber.csproj index e9aa2f42003..17b4ccead1c 100644 --- a/Samples/Versioning/V2Subscriber/V2Subscriber.csproj +++ b/Samples/Versioning/V2Subscriber/V2Subscriber.csproj @@ -1,126 +1,126 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {DCFE28B5-245F-4C28-869B-C42C73E816E5} - Library - Properties - V2Subscriber - V2Subscriber - v4.0 - 512 - - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\binaries\log4net.dll - - - False - ..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\binaries\NServiceBus.Core.dll - - - False - ..\..\..\binaries\NServiceBus.Host.exe - - - - - - - - - - - - - - - - - - - - - - {9D27D517-B938-4594-8836-CE06A2955FFD} - V1.Messages - - - {D22F0CFF-D47F-4541-BD6D-3F07808EE468} - V2.Messages - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - Program - $(ProjectDir)$(OutputPath)NServiceBus.Host.exe - AllRules.ruleset - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {DCFE28B5-245F-4C28-869B-C42C73E816E5} + Library + Properties + V2Subscriber + V2Subscriber + v4.0 + 512 + + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\binaries\log4net.dll + + + False + ..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\binaries\NServiceBus.Core.dll + + + False + ..\..\..\binaries\NServiceBus.Host.exe + + + + + + + + + + + + + + + + + + + + + + {9D27D517-B938-4594-8836-CE06A2955FFD} + V1.Messages + + + {D22F0CFF-D47F-4541-BD6D-3F07808EE468} + V2.Messages + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + Program + $(ProjectDir)$(OutputPath)NServiceBus.Host.exe + AllRules.ruleset + \ No newline at end of file diff --git a/Samples/Versioning/V2Subscriber/V2SubscriberEndpoint.cs b/Samples/Versioning/V2Subscriber/V2SubscriberEndpoint.cs index c2f2e3f16ea..53188b1f559 100644 --- a/Samples/Versioning/V2Subscriber/V2SubscriberEndpoint.cs +++ b/Samples/Versioning/V2Subscriber/V2SubscriberEndpoint.cs @@ -1,6 +1,6 @@ -using NServiceBus; - -namespace V2Subscriber -{ - public class V2SubscriberEndpoint : IConfigureThisEndpoint, AsA_Server { } +using NServiceBus; + +namespace V2Subscriber +{ + public class V2SubscriberEndpoint : IConfigureThisEndpoint, AsA_Server { } } \ No newline at end of file diff --git a/Samples/Versioning/Versioning.sln b/Samples/Versioning/Versioning.sln index 16fb0783f4a..130a68e53c0 100644 --- a/Samples/Versioning/Versioning.sln +++ b/Samples/Versioning/Versioning.sln @@ -1,44 +1,44 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "V1.Messages", "V1.Messages\V1.Messages.csproj", "{9D27D517-B938-4594-8836-CE06A2955FFD}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "V2.Messages", "V2.Messages\V2.Messages.csproj", "{D22F0CFF-D47F-4541-BD6D-3F07808EE468}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "V2Publisher", "V2Publisher\V2Publisher.csproj", "{CCC62E59-19DD-44B7-B565-CEA7AE8A83EC}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "V2Subscriber", "V2Subscriber\V2Subscriber.csproj", "{DCFE28B5-245F-4C28-869B-C42C73E816E5}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "V1Subscriber", "V1Subscriber\V1Subscriber.csproj", "{FBA8997D-01C8-458D-ACE6-28DC7BC32711}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {9D27D517-B938-4594-8836-CE06A2955FFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9D27D517-B938-4594-8836-CE06A2955FFD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9D27D517-B938-4594-8836-CE06A2955FFD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9D27D517-B938-4594-8836-CE06A2955FFD}.Release|Any CPU.Build.0 = Release|Any CPU - {D22F0CFF-D47F-4541-BD6D-3F07808EE468}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D22F0CFF-D47F-4541-BD6D-3F07808EE468}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D22F0CFF-D47F-4541-BD6D-3F07808EE468}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D22F0CFF-D47F-4541-BD6D-3F07808EE468}.Release|Any CPU.Build.0 = Release|Any CPU - {CCC62E59-19DD-44B7-B565-CEA7AE8A83EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CCC62E59-19DD-44B7-B565-CEA7AE8A83EC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CCC62E59-19DD-44B7-B565-CEA7AE8A83EC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CCC62E59-19DD-44B7-B565-CEA7AE8A83EC}.Release|Any CPU.Build.0 = Release|Any CPU - {DCFE28B5-245F-4C28-869B-C42C73E816E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DCFE28B5-245F-4C28-869B-C42C73E816E5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DCFE28B5-245F-4C28-869B-C42C73E816E5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DCFE28B5-245F-4C28-869B-C42C73E816E5}.Release|Any CPU.Build.0 = Release|Any CPU - {FBA8997D-01C8-458D-ACE6-28DC7BC32711}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FBA8997D-01C8-458D-ACE6-28DC7BC32711}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FBA8997D-01C8-458D-ACE6-28DC7BC32711}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FBA8997D-01C8-458D-ACE6-28DC7BC32711}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "V1.Messages", "V1.Messages\V1.Messages.csproj", "{9D27D517-B938-4594-8836-CE06A2955FFD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "V2.Messages", "V2.Messages\V2.Messages.csproj", "{D22F0CFF-D47F-4541-BD6D-3F07808EE468}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "V2Publisher", "V2Publisher\V2Publisher.csproj", "{CCC62E59-19DD-44B7-B565-CEA7AE8A83EC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "V2Subscriber", "V2Subscriber\V2Subscriber.csproj", "{DCFE28B5-245F-4C28-869B-C42C73E816E5}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "V1Subscriber", "V1Subscriber\V1Subscriber.csproj", "{FBA8997D-01C8-458D-ACE6-28DC7BC32711}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9D27D517-B938-4594-8836-CE06A2955FFD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9D27D517-B938-4594-8836-CE06A2955FFD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9D27D517-B938-4594-8836-CE06A2955FFD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9D27D517-B938-4594-8836-CE06A2955FFD}.Release|Any CPU.Build.0 = Release|Any CPU + {D22F0CFF-D47F-4541-BD6D-3F07808EE468}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D22F0CFF-D47F-4541-BD6D-3F07808EE468}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D22F0CFF-D47F-4541-BD6D-3F07808EE468}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D22F0CFF-D47F-4541-BD6D-3F07808EE468}.Release|Any CPU.Build.0 = Release|Any CPU + {CCC62E59-19DD-44B7-B565-CEA7AE8A83EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CCC62E59-19DD-44B7-B565-CEA7AE8A83EC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CCC62E59-19DD-44B7-B565-CEA7AE8A83EC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CCC62E59-19DD-44B7-B565-CEA7AE8A83EC}.Release|Any CPU.Build.0 = Release|Any CPU + {DCFE28B5-245F-4C28-869B-C42C73E816E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DCFE28B5-245F-4C28-869B-C42C73E816E5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DCFE28B5-245F-4C28-869B-C42C73E816E5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DCFE28B5-245F-4C28-869B-C42C73E816E5}.Release|Any CPU.Build.0 = Release|Any CPU + {FBA8997D-01C8-458D-ACE6-28DC7BC32711}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FBA8997D-01C8-458D-ACE6-28DC7BC32711}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FBA8997D-01C8-458D-ACE6-28DC7BC32711}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FBA8997D-01C8-458D-ACE6-28DC7BC32711}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Samples/WcfIntegration/Client/Client.csproj b/Samples/WcfIntegration/Client/Client.csproj index bbe1de1e568..4be17614771 100644 --- a/Samples/WcfIntegration/Client/Client.csproj +++ b/Samples/WcfIntegration/Client/Client.csproj @@ -1,68 +1,68 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {C6D39475-05EF-4EF5-87F7-BE4C99A7BC8A} - Exe - Properties - Client - Client - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\build\output\NServiceBus.dll - - - - 3.0 - - - 3.0 - - - - - - - - - - - - - {174344DB-E395-4B4E-8385-4F14926E8948} - Messages - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {C6D39475-05EF-4EF5-87F7-BE4C99A7BC8A} + Exe + Properties + Client + Client + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\build\output\NServiceBus.dll + + + + 3.0 + + + 3.0 + + + + + + + + + + + + + {174344DB-E395-4B4E-8385-4F14926E8948} + Messages + + + + \ No newline at end of file diff --git a/Samples/WcfIntegration/Client/Program.cs b/Samples/WcfIntegration/Client/Program.cs index 00b689b01c3..a4f00b629d5 100644 --- a/Samples/WcfIntegration/Client/Program.cs +++ b/Samples/WcfIntegration/Client/Program.cs @@ -1,49 +1,49 @@ -using System; -using System.ServiceModel; -using System.ServiceModel.Channels; -using Messages; - -namespace Client -{ - internal class Program - { - private static readonly ChannelFactory ChannelFactory = new ChannelFactory(""); - - private static void Main() - { - Console.WriteLine("This will send requests to the CancelOrder WCF service"); - Console.WriteLine("Press 'Enter' to send a message.To exit, Ctrl + C"); - - ICancelOrderService client = ChannelFactory.CreateChannel(); - int orderId = 1; - - try - { - while (Console.ReadLine() != null) - { - var message = new CancelOrder - { - OrderId = orderId++ - }; - - Console.WriteLine("Sending message with OrderId {0}.", message.OrderId); - - ErrorCodes returnCode = client.Process(message); - - Console.WriteLine("Error code returned: " + returnCode); - } - } - finally - { - try - { - ((IChannel) client).Close(); - } - catch - { - ((IChannel)client).Abort(); - } - } - } - } +using System; +using System.ServiceModel; +using System.ServiceModel.Channels; +using Messages; + +namespace Client +{ + internal class Program + { + private static readonly ChannelFactory ChannelFactory = new ChannelFactory(""); + + private static void Main() + { + Console.WriteLine("This will send requests to the CancelOrder WCF service"); + Console.WriteLine("Press 'Enter' to send a message.To exit, Ctrl + C"); + + ICancelOrderService client = ChannelFactory.CreateChannel(); + int orderId = 1; + + try + { + while (Console.ReadLine() != null) + { + var message = new CancelOrder + { + OrderId = orderId++ + }; + + Console.WriteLine("Sending message with OrderId {0}.", message.OrderId); + + ErrorCodes returnCode = client.Process(message); + + Console.WriteLine("Error code returned: " + returnCode); + } + } + finally + { + try + { + ((IChannel) client).Close(); + } + catch + { + ((IChannel)client).Abort(); + } + } + } + } } \ No newline at end of file diff --git a/Samples/WcfIntegration/Client/Properties/AssemblyInfo.cs b/Samples/WcfIntegration/Client/Properties/AssemblyInfo.cs index 739b3691913..a2b1091d673 100644 --- a/Samples/WcfIntegration/Client/Properties/AssemblyInfo.cs +++ b/Samples/WcfIntegration/Client/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Client")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("Client")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("8191ce3c-3721-4094-b239-17ca43723e78")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Client")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Client")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("8191ce3c-3721-4094-b239-17ca43723e78")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/WcfIntegration/Client/app.config b/Samples/WcfIntegration/Client/app.config index b881578d911..1bf44c7a2eb 100644 --- a/Samples/WcfIntegration/Client/app.config +++ b/Samples/WcfIntegration/Client/app.config @@ -1,9 +1,9 @@ - - - - - - - + + + + + + + \ No newline at end of file diff --git a/Samples/WcfIntegration/Messages/CancelOrder.cs b/Samples/WcfIntegration/Messages/CancelOrder.cs index d07a8febbdf..2c7baa5fb25 100644 --- a/Samples/WcfIntegration/Messages/CancelOrder.cs +++ b/Samples/WcfIntegration/Messages/CancelOrder.cs @@ -1,9 +1,9 @@ -using NServiceBus; - -namespace Messages -{ - public class CancelOrder : IMessage - { - public int OrderId { get; set; } - } +using NServiceBus; + +namespace Messages +{ + public class CancelOrder : IMessage + { + public int OrderId { get; set; } + } } \ No newline at end of file diff --git a/Samples/WcfIntegration/Messages/ErrorCodes.cs b/Samples/WcfIntegration/Messages/ErrorCodes.cs index 895930f2545..c010676e7e5 100644 --- a/Samples/WcfIntegration/Messages/ErrorCodes.cs +++ b/Samples/WcfIntegration/Messages/ErrorCodes.cs @@ -1,8 +1,8 @@ -namespace Messages -{ - public enum ErrorCodes - { - None, - Fail - } -} +namespace Messages +{ + public enum ErrorCodes + { + None, + Fail + } +} diff --git a/Samples/WcfIntegration/Messages/ICancelOrderService.cs b/Samples/WcfIntegration/Messages/ICancelOrderService.cs index 4c8d3c22d77..7ebaa505d01 100644 --- a/Samples/WcfIntegration/Messages/ICancelOrderService.cs +++ b/Samples/WcfIntegration/Messages/ICancelOrderService.cs @@ -1,19 +1,19 @@ -using System.ServiceModel; - -namespace Messages -{ - /// - /// This is an example of using a service contract interface - /// instead of a service reference. Make sure to include the - /// Action / ReplyAction values that correspond to your - /// service inputs and outputs. A simple way to find out these - /// values is to host the service and inspect the auto-generated - /// WSDL by appending ?wsdl to the URL of the service. - /// - [ServiceContract] - public interface ICancelOrderService - { - [OperationContract(Action = "http://tempuri.org/IWcfServiceOf_CancelOrder_ErrorCodes/Process", ReplyAction = "http://tempuri.org/IWcfServiceOf_CancelOrder_ErrorCodes/ProcessResponse")] - ErrorCodes Process(CancelOrder request); - } +using System.ServiceModel; + +namespace Messages +{ + /// + /// This is an example of using a service contract interface + /// instead of a service reference. Make sure to include the + /// Action / ReplyAction values that correspond to your + /// service inputs and outputs. A simple way to find out these + /// values is to host the service and inspect the auto-generated + /// WSDL by appending ?wsdl to the URL of the service. + /// + [ServiceContract] + public interface ICancelOrderService + { + [OperationContract(Action = "http://tempuri.org/IWcfServiceOf_CancelOrder_ErrorCodes/Process", ReplyAction = "http://tempuri.org/IWcfServiceOf_CancelOrder_ErrorCodes/ProcessResponse")] + ErrorCodes Process(CancelOrder request); + } } \ No newline at end of file diff --git a/Samples/WcfIntegration/Messages/Messages.csproj b/Samples/WcfIntegration/Messages/Messages.csproj index 437cf3dc644..957c592772a 100644 --- a/Samples/WcfIntegration/Messages/Messages.csproj +++ b/Samples/WcfIntegration/Messages/Messages.csproj @@ -1,57 +1,57 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {174344DB-E395-4B4E-8385-4F14926E8948} - Library - Properties - Messages - Messages - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\binaries\NServiceBus.dll - - - - 3.0 - - - - - - - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {174344DB-E395-4B4E-8385-4F14926E8948} + Library + Properties + Messages + Messages + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\binaries\NServiceBus.dll + + + + 3.0 + + + + + + + + + + \ No newline at end of file diff --git a/Samples/WcfIntegration/Messages/Properties/AssemblyInfo.cs b/Samples/WcfIntegration/Messages/Properties/AssemblyInfo.cs index 63850574ab5..02941980b40 100644 --- a/Samples/WcfIntegration/Messages/Properties/AssemblyInfo.cs +++ b/Samples/WcfIntegration/Messages/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Messages")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("Messages")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("f055d385-494a-4d2d-aae7-9933f98a28ae")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Messages")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Messages")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("f055d385-494a-4d2d-aae7-9933f98a28ae")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/WcfIntegration/Server/EndpointConfig.cs b/Samples/WcfIntegration/Server/EndpointConfig.cs index a8681f446f1..f4e0f2b27f1 100644 --- a/Samples/WcfIntegration/Server/EndpointConfig.cs +++ b/Samples/WcfIntegration/Server/EndpointConfig.cs @@ -1,8 +1,8 @@ -using NServiceBus; - -namespace Server -{ - internal class EndpointConfig : IConfigureThisEndpoint, AsA_Publisher - { - } +using NServiceBus; + +namespace Server +{ + internal class EndpointConfig : IConfigureThisEndpoint, AsA_Publisher + { + } } \ No newline at end of file diff --git a/Samples/WcfIntegration/Server/Handlers/CancelOrderHandler.cs b/Samples/WcfIntegration/Server/Handlers/CancelOrderHandler.cs index c41165bd88c..a9c60512623 100644 --- a/Samples/WcfIntegration/Server/Handlers/CancelOrderHandler.cs +++ b/Samples/WcfIntegration/Server/Handlers/CancelOrderHandler.cs @@ -1,26 +1,26 @@ -using System; -using Messages; -using NServiceBus; - -namespace Server.Handlers -{ - public class CancelOrderHandler : IHandleMessages - { - private readonly IBus bus; - - public CancelOrderHandler(IBus bus) - { - this.bus = bus; - } - - public void Handle(CancelOrder message) - { - Console.WriteLine("======================================================================"); - - if (message.OrderId % 2 == 0) - bus.Return((int) ErrorCodes.Fail); - else - bus.Return((int) ErrorCodes.None); - } - } +using System; +using Messages; +using NServiceBus; + +namespace Server.Handlers +{ + public class CancelOrderHandler : IHandleMessages + { + private readonly IBus bus; + + public CancelOrderHandler(IBus bus) + { + this.bus = bus; + } + + public void Handle(CancelOrder message) + { + Console.WriteLine("======================================================================"); + + if (message.OrderId % 2 == 0) + bus.Return((int) ErrorCodes.Fail); + else + bus.Return((int) ErrorCodes.None); + } + } } \ No newline at end of file diff --git a/Samples/WcfIntegration/Server/Properties/AssemblyInfo.cs b/Samples/WcfIntegration/Server/Properties/AssemblyInfo.cs index 3f6d7afc628..61fceb16f25 100644 --- a/Samples/WcfIntegration/Server/Properties/AssemblyInfo.cs +++ b/Samples/WcfIntegration/Server/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Server")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("Server")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("7a8121eb-0421-493f-aa96-03790e86e0be")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Server")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Server")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("7a8121eb-0421-493f-aa96-03790e86e0be")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/WcfIntegration/Server/Server.csproj b/Samples/WcfIntegration/Server/Server.csproj index 1b32b38d869..7cc1bd782bc 100644 --- a/Samples/WcfIntegration/Server/Server.csproj +++ b/Samples/WcfIntegration/Server/Server.csproj @@ -1,79 +1,79 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {86C621B1-CB00-4555-ABB2-A68191BD8D73} - Library - Properties - Server - Server - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\binaries\NServiceBus.Core.dll - - - False - ..\..\..\binaries\NServiceBus.Host.exe - - - - - - - - - - - - - - - - - - {174344DB-E395-4B4E-8385-4F14926E8948} - Messages - - - - - - Program - $(ProjectDir)$(OutputPath)NServiceBus.Host.exe - NServiceBus.Lite - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {86C621B1-CB00-4555-ABB2-A68191BD8D73} + Library + Properties + Server + Server + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\binaries\NServiceBus.Core.dll + + + False + ..\..\..\binaries\NServiceBus.Host.exe + + + + + + + + + + + + + + + + + + {174344DB-E395-4B4E-8385-4F14926E8948} + Messages + + + + + + Program + $(ProjectDir)$(OutputPath)NServiceBus.Host.exe + NServiceBus.Lite + \ No newline at end of file diff --git a/Samples/WcfIntegration/Server/WebServices/CancelOrderService.cs b/Samples/WcfIntegration/Server/WebServices/CancelOrderService.cs index 036546d90c8..e91815ff9e6 100644 --- a/Samples/WcfIntegration/Server/WebServices/CancelOrderService.cs +++ b/Samples/WcfIntegration/Server/WebServices/CancelOrderService.cs @@ -1,9 +1,9 @@ -using Messages; -using NServiceBus; - -namespace Server.WebServices -{ - public class CancelOrderService : WcfService - { - } +using Messages; +using NServiceBus; + +namespace Server.WebServices +{ + public class CancelOrderService : WcfService + { + } } \ No newline at end of file diff --git a/Samples/WcfIntegration/Server/app.config b/Samples/WcfIntegration/Server/app.config index 1af8eb983c4..643268d1ef0 100644 --- a/Samples/WcfIntegration/Server/app.config +++ b/Samples/WcfIntegration/Server/app.config @@ -1,56 +1,56 @@ - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Samples/WcfIntegration/WcfIntegration.sln b/Samples/WcfIntegration/WcfIntegration.sln index 00c2e98945f..58f87a696ce 100644 --- a/Samples/WcfIntegration/WcfIntegration.sln +++ b/Samples/WcfIntegration/WcfIntegration.sln @@ -1,32 +1,32 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Client", "Client\Client.csproj", "{C6D39475-05EF-4EF5-87F7-BE4C99A7BC8A}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Messages", "Messages\Messages.csproj", "{174344DB-E395-4B4E-8385-4F14926E8948}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server", "Server\Server.csproj", "{86C621B1-CB00-4555-ABB2-A68191BD8D73}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C6D39475-05EF-4EF5-87F7-BE4C99A7BC8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C6D39475-05EF-4EF5-87F7-BE4C99A7BC8A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C6D39475-05EF-4EF5-87F7-BE4C99A7BC8A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C6D39475-05EF-4EF5-87F7-BE4C99A7BC8A}.Release|Any CPU.Build.0 = Release|Any CPU - {174344DB-E395-4B4E-8385-4F14926E8948}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {174344DB-E395-4B4E-8385-4F14926E8948}.Debug|Any CPU.Build.0 = Debug|Any CPU - {174344DB-E395-4B4E-8385-4F14926E8948}.Release|Any CPU.ActiveCfg = Release|Any CPU - {174344DB-E395-4B4E-8385-4F14926E8948}.Release|Any CPU.Build.0 = Release|Any CPU - {86C621B1-CB00-4555-ABB2-A68191BD8D73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {86C621B1-CB00-4555-ABB2-A68191BD8D73}.Debug|Any CPU.Build.0 = Debug|Any CPU - {86C621B1-CB00-4555-ABB2-A68191BD8D73}.Release|Any CPU.ActiveCfg = Release|Any CPU - {86C621B1-CB00-4555-ABB2-A68191BD8D73}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Client", "Client\Client.csproj", "{C6D39475-05EF-4EF5-87F7-BE4C99A7BC8A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Messages", "Messages\Messages.csproj", "{174344DB-E395-4B4E-8385-4F14926E8948}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server", "Server\Server.csproj", "{86C621B1-CB00-4555-ABB2-A68191BD8D73}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C6D39475-05EF-4EF5-87F7-BE4C99A7BC8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C6D39475-05EF-4EF5-87F7-BE4C99A7BC8A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C6D39475-05EF-4EF5-87F7-BE4C99A7BC8A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C6D39475-05EF-4EF5-87F7-BE4C99A7BC8A}.Release|Any CPU.Build.0 = Release|Any CPU + {174344DB-E395-4B4E-8385-4F14926E8948}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {174344DB-E395-4B4E-8385-4F14926E8948}.Debug|Any CPU.Build.0 = Debug|Any CPU + {174344DB-E395-4B4E-8385-4F14926E8948}.Release|Any CPU.ActiveCfg = Release|Any CPU + {174344DB-E395-4B4E-8385-4F14926E8948}.Release|Any CPU.Build.0 = Release|Any CPU + {86C621B1-CB00-4555-ABB2-A68191BD8D73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {86C621B1-CB00-4555-ABB2-A68191BD8D73}.Debug|Any CPU.Build.0 = Debug|Any CPU + {86C621B1-CB00-4555-ABB2-A68191BD8D73}.Release|Any CPU.ActiveCfg = Release|Any CPU + {86C621B1-CB00-4555-ABB2-A68191BD8D73}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Samples/WebServiceBridge/Messages/Command.cs b/Samples/WebServiceBridge/Messages/Command.cs index 5663fd4de0d..be564d830cb 100644 --- a/Samples/WebServiceBridge/Messages/Command.cs +++ b/Samples/WebServiceBridge/Messages/Command.cs @@ -1,11 +1,11 @@ -using System; -using NServiceBus; - -namespace Messages -{ - [Serializable] - public class Command : IMessage - { - public int Id { get; set; } - } +using System; +using NServiceBus; + +namespace Messages +{ + [Serializable] + public class Command : IMessage + { + public int Id { get; set; } + } } \ No newline at end of file diff --git a/Samples/WebServiceBridge/Messages/ErrorCodes.cs b/Samples/WebServiceBridge/Messages/ErrorCodes.cs index 895930f2545..c010676e7e5 100644 --- a/Samples/WebServiceBridge/Messages/ErrorCodes.cs +++ b/Samples/WebServiceBridge/Messages/ErrorCodes.cs @@ -1,8 +1,8 @@ -namespace Messages -{ - public enum ErrorCodes - { - None, - Fail - } -} +namespace Messages +{ + public enum ErrorCodes + { + None, + Fail + } +} diff --git a/Samples/WebServiceBridge/Messages/Messages.csproj b/Samples/WebServiceBridge/Messages/Messages.csproj index 551a3366882..ed2ea75c648 100644 --- a/Samples/WebServiceBridge/Messages/Messages.csproj +++ b/Samples/WebServiceBridge/Messages/Messages.csproj @@ -1,95 +1,95 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {ED855B92-C7EB-4BE7-9072-5C2260C329FC} - Library - Properties - Messages - Messages - - - - - - v4.0 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\binaries\NServiceBus.dll - - - - - - - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {ED855B92-C7EB-4BE7-9072-5C2260C329FC} + Library + Properties + Messages + Messages + + + + + + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\binaries\NServiceBus.dll + + + + + + + + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + \ No newline at end of file diff --git a/Samples/WebServiceBridge/Messages/Properties/AssemblyInfo.cs b/Samples/WebServiceBridge/Messages/Properties/AssemblyInfo.cs index cb5949d7b0e..eaafe2c314d 100644 --- a/Samples/WebServiceBridge/Messages/Properties/AssemblyInfo.cs +++ b/Samples/WebServiceBridge/Messages/Properties/AssemblyInfo.cs @@ -1,35 +1,35 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Messages")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Messages")] -[assembly: AssemblyCopyright("Copyright © 2007")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("58f0c0ae-d27c-4548-886b-077b7cab2376")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Messages")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Messages")] +[assembly: AssemblyCopyright("Copyright © 2007")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("58f0c0ae-d27c-4548-886b-077b7cab2376")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/WebServiceBridge/Server/App.config b/Samples/WebServiceBridge/Server/App.config index e07bb14cb48..e57cb68a17f 100644 --- a/Samples/WebServiceBridge/Server/App.config +++ b/Samples/WebServiceBridge/Server/App.config @@ -1,19 +1,19 @@ - - - -
- - - - - - - + + + +
+ + + + + + + diff --git a/Samples/WebServiceBridge/Server/CommandMessageHandler.cs b/Samples/WebServiceBridge/Server/CommandMessageHandler.cs index 60efa0a37ae..ca5d67a6185 100644 --- a/Samples/WebServiceBridge/Server/CommandMessageHandler.cs +++ b/Samples/WebServiceBridge/Server/CommandMessageHandler.cs @@ -1,21 +1,21 @@ -using System; -using Messages; -using NServiceBus; - -namespace Server -{ - public class CommandMessageHandler : IHandleMessages - { - public IBus Bus { get; set; } - - public void Handle(Command message) - { - Console.WriteLine("======================================================================"); - - if (message.Id % 2 == 0) - Bus.Return((int)ErrorCodes.Fail); - else - Bus.Return((int)ErrorCodes.None); - } - } -} +using System; +using Messages; +using NServiceBus; + +namespace Server +{ + public class CommandMessageHandler : IHandleMessages + { + public IBus Bus { get; set; } + + public void Handle(Command message) + { + Console.WriteLine("======================================================================"); + + if (message.Id % 2 == 0) + Bus.Return((int)ErrorCodes.Fail); + else + Bus.Return((int)ErrorCodes.None); + } + } +} diff --git a/Samples/WebServiceBridge/Server/Properties/AssemblyInfo.cs b/Samples/WebServiceBridge/Server/Properties/AssemblyInfo.cs index 58ed41b6e91..e1c67ec7577 100644 --- a/Samples/WebServiceBridge/Server/Properties/AssemblyInfo.cs +++ b/Samples/WebServiceBridge/Server/Properties/AssemblyInfo.cs @@ -1,33 +1,33 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Server")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Server")] -[assembly: AssemblyCopyright("Copyright © 2007")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("6d0a1864-1cf8-4f8a-90ae-bc3fda6179d9")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Server")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Server")] +[assembly: AssemblyCopyright("Copyright © 2007")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("6d0a1864-1cf8-4f8a-90ae-bc3fda6179d9")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/WebServiceBridge/Server/Server.csproj b/Samples/WebServiceBridge/Server/Server.csproj index 4bb2376cb6c..a4a6c50068a 100644 --- a/Samples/WebServiceBridge/Server/Server.csproj +++ b/Samples/WebServiceBridge/Server/Server.csproj @@ -1,115 +1,115 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {E259AE1E-613E-41D8-B36A-F80343239363} - Library - Properties - Server - Server - - - - - - v4.0 - - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\binaries\log4net.dll - - - False - ..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\binaries\NServiceBus.Core.dll - - - False - ..\..\..\binaries\NServiceBus.Host.exe - - - - - - - - - - - - - - - - - - {ED855B92-C7EB-4BE7-9072-5C2260C329FC} - Messages %28Samples\WebServiceBridge\Messages%29 - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - Program - $(ProjectDir)$(OutputPath)NServiceBus.Host.exe - AllRules.ruleset - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {E259AE1E-613E-41D8-B36A-F80343239363} + Library + Properties + Server + Server + + + + + + v4.0 + + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\binaries\log4net.dll + + + False + ..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\binaries\NServiceBus.Core.dll + + + False + ..\..\..\binaries\NServiceBus.Host.exe + + + + + + + + + + + + + + + + + + {ED855B92-C7EB-4BE7-9072-5C2260C329FC} + Messages %28Samples\WebServiceBridge\Messages%29 + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + Program + $(ProjectDir)$(OutputPath)NServiceBus.Host.exe + AllRules.ruleset + \ No newline at end of file diff --git a/Samples/WebServiceBridge/Server/ServerEndpoint.cs b/Samples/WebServiceBridge/Server/ServerEndpoint.cs index cef26b14003..bfa0d145117 100644 --- a/Samples/WebServiceBridge/Server/ServerEndpoint.cs +++ b/Samples/WebServiceBridge/Server/ServerEndpoint.cs @@ -1,6 +1,6 @@ -using NServiceBus; - -namespace Server -{ - public class ServerEndpoint : IConfigureThisEndpoint, AsA_Server { } +using NServiceBus; + +namespace Server +{ + public class ServerEndpoint : IConfigureThisEndpoint, AsA_Server { } } \ No newline at end of file diff --git a/Samples/WebServiceBridge/WebApplication1/Default.aspx b/Samples/WebServiceBridge/WebApplication1/Default.aspx index 47f7e95fc03..ff8d8fc4780 100644 --- a/Samples/WebServiceBridge/WebApplication1/Default.aspx +++ b/Samples/WebServiceBridge/WebApplication1/Default.aspx @@ -1,21 +1,21 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" %> - - - - - - Untitled Page - - -
-
- Enter a number below and click "Go".
- If the number is even, the result will be "Fail", otherwise "None". -

- - - -
-
- - +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" %> + + + + + + Untitled Page + + +
+
+ Enter a number below and click "Go".
+ If the number is even, the result will be "Fail", otherwise "None". +

+ + + +
+
+ + diff --git a/Samples/WebServiceBridge/WebApplication1/Default.aspx.cs b/Samples/WebServiceBridge/WebApplication1/Default.aspx.cs index 6bb33b3d4c2..5a6f7515f14 100644 --- a/Samples/WebServiceBridge/WebApplication1/Default.aspx.cs +++ b/Samples/WebServiceBridge/WebApplication1/Default.aspx.cs @@ -1,25 +1,25 @@ -using System; -using System.Web.UI; -using WebApplication1.localhost; - -namespace WebApplication1 -{ - public partial class _Default : Page - { - protected void Page_Load(object sender, EventArgs e) - { - - } - - protected void Button1_Click(object sender, EventArgs e) - { - int number = int.Parse(TextBox1.Text); - var command = new Command {Id = number}; - - var service = new Service1(); - var result = service.Process(command); - - Label1.Text = Enum.GetName(typeof (ErrorCodes), result); - } - } -} +using System; +using System.Web.UI; +using WebApplication1.localhost; + +namespace WebApplication1 +{ + public partial class _Default : Page + { + protected void Page_Load(object sender, EventArgs e) + { + + } + + protected void Button1_Click(object sender, EventArgs e) + { + int number = int.Parse(TextBox1.Text); + var command = new Command {Id = number}; + + var service = new Service1(); + var result = service.Process(command); + + Label1.Text = Enum.GetName(typeof (ErrorCodes), result); + } + } +} diff --git a/Samples/WebServiceBridge/WebApplication1/Default.aspx.designer.cs b/Samples/WebServiceBridge/WebApplication1/Default.aspx.designer.cs index d386cc6b98a..09ec9eeddcb 100644 --- a/Samples/WebServiceBridge/WebApplication1/Default.aspx.designer.cs +++ b/Samples/WebServiceBridge/WebApplication1/Default.aspx.designer.cs @@ -1,52 +1,52 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.3053 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace WebApplication1 { - - - public partial class _Default { - - /// - /// form1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlForm form1; - - /// - /// TextBox1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox TextBox1; - - /// - /// Button1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button Button1; - - /// - /// Label1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label Label1; - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.3053 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WebApplication1 { + + + public partial class _Default { + + /// + /// form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// TextBox1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.TextBox TextBox1; + + /// + /// Button1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Button Button1; + + /// + /// Label1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.WebControls.Label Label1; + } +} diff --git a/Samples/WebServiceBridge/WebApplication1/Properties/AssemblyInfo.cs b/Samples/WebServiceBridge/WebApplication1/Properties/AssemblyInfo.cs index e729abac68c..d5224c73902 100644 --- a/Samples/WebServiceBridge/WebApplication1/Properties/AssemblyInfo.cs +++ b/Samples/WebServiceBridge/WebApplication1/Properties/AssemblyInfo.cs @@ -1,35 +1,35 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("WebApplication1")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("WebApplication1")] -[assembly: AssemblyCopyright("Copyright © 2007")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("3d5900ae-111a-45be-96b3-d9e4606ca793")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("WebApplication1")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("WebApplication1")] +[assembly: AssemblyCopyright("Copyright © 2007")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("3d5900ae-111a-45be-96b3-d9e4606ca793")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/WebServiceBridge/WebApplication1/Properties/Settings.Designer.cs b/Samples/WebServiceBridge/WebApplication1/Properties/Settings.Designer.cs index d104066884a..f4eff16dbd2 100644 --- a/Samples/WebServiceBridge/WebApplication1/Properties/Settings.Designer.cs +++ b/Samples/WebServiceBridge/WebApplication1/Properties/Settings.Designer.cs @@ -1,36 +1,36 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.1 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace WebApplication1.Properties { - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default { - get { - return defaultInstance; - } - } - - [global::System.Configuration.ApplicationScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)] - [global::System.Configuration.DefaultSettingValueAttribute("http://localhost:21612/Service1.asmx")] - public string WebApplication1_localhost_Service1 { - get { - return ((string)(this["WebApplication1_localhost_Service1"])); - } - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.1 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WebApplication1.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)] + [global::System.Configuration.DefaultSettingValueAttribute("http://localhost:21612/Service1.asmx")] + public string WebApplication1_localhost_Service1 { + get { + return ((string)(this["WebApplication1_localhost_Service1"])); + } + } + } +} diff --git a/Samples/WebServiceBridge/WebApplication1/Properties/Settings.settings b/Samples/WebServiceBridge/WebApplication1/Properties/Settings.settings index 750195734a0..ab1c317fac2 100644 --- a/Samples/WebServiceBridge/WebApplication1/Properties/Settings.settings +++ b/Samples/WebServiceBridge/WebApplication1/Properties/Settings.settings @@ -1,9 +1,9 @@ - - - - - - http://localhost:21612/Service1.asmx - - + + + + + + http://localhost:21612/Service1.asmx + + \ No newline at end of file diff --git a/Samples/WebServiceBridge/WebApplication1/Web References/localhost/ErrorCodes.datasource b/Samples/WebServiceBridge/WebApplication1/Web References/localhost/ErrorCodes.datasource index 19101a28df1..8b19502a131 100644 --- a/Samples/WebServiceBridge/WebApplication1/Web References/localhost/ErrorCodes.datasource +++ b/Samples/WebServiceBridge/WebApplication1/Web References/localhost/ErrorCodes.datasource @@ -1,10 +1,10 @@ - - - - WebApplication1.localhost.ErrorCodes, Web References.localhost.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + + + + WebApplication1.localhost.ErrorCodes, Web References.localhost.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null \ No newline at end of file diff --git a/Samples/WebServiceBridge/WebApplication1/Web References/localhost/Reference.cs b/Samples/WebServiceBridge/WebApplication1/Web References/localhost/Reference.cs index cd42d974410..f0413ea008e 100644 --- a/Samples/WebServiceBridge/WebApplication1/Web References/localhost/Reference.cs +++ b/Samples/WebServiceBridge/WebApplication1/Web References/localhost/Reference.cs @@ -1,184 +1,184 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.1 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -// -// This source code was auto-generated by Microsoft.VSDesigner, Version 4.0.30319.1. -// -#pragma warning disable 1591 - -namespace WebApplication1.localhost { - using System; - using System.Web.Services; - using System.Diagnostics; - using System.Web.Services.Protocols; - using System.ComponentModel; - using System.Xml.Serialization; - - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Web.Services.WebServiceBindingAttribute(Name="Service1Soap", Namespace="http://tempuri.org/")] - public partial class Service1 : System.Web.Services.Protocols.SoapHttpClientProtocol { - - private System.Threading.SendOrPostCallback ProcessOperationCompleted; - - private bool useDefaultCredentialsSetExplicitly; - - /// - public Service1() { - this.Url = global::WebApplication1.Properties.Settings.Default.WebApplication1_localhost_Service1; - if ((this.IsLocalFileSystemWebService(this.Url) == true)) { - this.UseDefaultCredentials = true; - this.useDefaultCredentialsSetExplicitly = false; - } - else { - this.useDefaultCredentialsSetExplicitly = true; - } - } - - public new string Url { - get { - return base.Url; - } - set { - if ((((this.IsLocalFileSystemWebService(base.Url) == true) - && (this.useDefaultCredentialsSetExplicitly == false)) - && (this.IsLocalFileSystemWebService(value) == false))) { - base.UseDefaultCredentials = false; - } - base.Url = value; - } - } - - public new bool UseDefaultCredentials { - get { - return base.UseDefaultCredentials; - } - set { - base.UseDefaultCredentials = value; - this.useDefaultCredentialsSetExplicitly = true; - } - } - - /// - public event ProcessCompletedEventHandler ProcessCompleted; - - /// - [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/Process", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] - public ErrorCodes Process(Command request) { - object[] results = this.Invoke("Process", new object[] { - request}); - return ((ErrorCodes)(results[0])); - } - - /// - public void ProcessAsync(Command request) { - this.ProcessAsync(request, null); - } - - /// - public void ProcessAsync(Command request, object userState) { - if ((this.ProcessOperationCompleted == null)) { - this.ProcessOperationCompleted = new System.Threading.SendOrPostCallback(this.OnProcessOperationCompleted); - } - this.InvokeAsync("Process", new object[] { - request}, this.ProcessOperationCompleted, userState); - } - - private void OnProcessOperationCompleted(object arg) { - if ((this.ProcessCompleted != null)) { - System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); - this.ProcessCompleted(this, new ProcessCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); - } - } - - /// - public new void CancelAsync(object userState) { - base.CancelAsync(userState); - } - - private bool IsLocalFileSystemWebService(string url) { - if (((url == null) - || (url == string.Empty))) { - return false; - } - System.Uri wsUri = new System.Uri(url); - if (((wsUri.Port >= 1024) - && (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) { - return true; - } - return false; - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.1")] - [System.SerializableAttribute()] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/")] - public partial class Command { - - private int idField; - - /// - public int Id { - get { - return this.idField; - } - set { - this.idField = value; - } - } - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.1")] - [System.SerializableAttribute()] - [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/")] - public enum ErrorCodes { - - /// - None, - - /// - Fail, - } - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")] - public delegate void ProcessCompletedEventHandler(object sender, ProcessCompletedEventArgs e); - - /// - [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")] - [System.Diagnostics.DebuggerStepThroughAttribute()] - [System.ComponentModel.DesignerCategoryAttribute("code")] - public partial class ProcessCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { - - private object[] results; - - internal ProcessCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : - base(exception, cancelled, userState) { - this.results = results; - } - - /// - public ErrorCodes Result { - get { - this.RaiseExceptionIfNecessary(); - return ((ErrorCodes)(this.results[0])); - } - } - } -} - +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.1 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// +// This source code was auto-generated by Microsoft.VSDesigner, Version 4.0.30319.1. +// +#pragma warning disable 1591 + +namespace WebApplication1.localhost { + using System; + using System.Web.Services; + using System.Diagnostics; + using System.Web.Services.Protocols; + using System.ComponentModel; + using System.Xml.Serialization; + + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Web.Services.WebServiceBindingAttribute(Name="Service1Soap", Namespace="http://tempuri.org/")] + public partial class Service1 : System.Web.Services.Protocols.SoapHttpClientProtocol { + + private System.Threading.SendOrPostCallback ProcessOperationCompleted; + + private bool useDefaultCredentialsSetExplicitly; + + /// + public Service1() { + this.Url = global::WebApplication1.Properties.Settings.Default.WebApplication1_localhost_Service1; + if ((this.IsLocalFileSystemWebService(this.Url) == true)) { + this.UseDefaultCredentials = true; + this.useDefaultCredentialsSetExplicitly = false; + } + else { + this.useDefaultCredentialsSetExplicitly = true; + } + } + + public new string Url { + get { + return base.Url; + } + set { + if ((((this.IsLocalFileSystemWebService(base.Url) == true) + && (this.useDefaultCredentialsSetExplicitly == false)) + && (this.IsLocalFileSystemWebService(value) == false))) { + base.UseDefaultCredentials = false; + } + base.Url = value; + } + } + + public new bool UseDefaultCredentials { + get { + return base.UseDefaultCredentials; + } + set { + base.UseDefaultCredentials = value; + this.useDefaultCredentialsSetExplicitly = true; + } + } + + /// + public event ProcessCompletedEventHandler ProcessCompleted; + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/Process", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public ErrorCodes Process(Command request) { + object[] results = this.Invoke("Process", new object[] { + request}); + return ((ErrorCodes)(results[0])); + } + + /// + public void ProcessAsync(Command request) { + this.ProcessAsync(request, null); + } + + /// + public void ProcessAsync(Command request, object userState) { + if ((this.ProcessOperationCompleted == null)) { + this.ProcessOperationCompleted = new System.Threading.SendOrPostCallback(this.OnProcessOperationCompleted); + } + this.InvokeAsync("Process", new object[] { + request}, this.ProcessOperationCompleted, userState); + } + + private void OnProcessOperationCompleted(object arg) { + if ((this.ProcessCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.ProcessCompleted(this, new ProcessCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + public new void CancelAsync(object userState) { + base.CancelAsync(userState); + } + + private bool IsLocalFileSystemWebService(string url) { + if (((url == null) + || (url == string.Empty))) { + return false; + } + System.Uri wsUri = new System.Uri(url); + if (((wsUri.Port >= 1024) + && (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) { + return true; + } + return false; + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.1")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/")] + public partial class Command { + + private int idField; + + /// + public int Id { + get { + return this.idField; + } + set { + this.idField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.1")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://tempuri.org/")] + public enum ErrorCodes { + + /// + None, + + /// + Fail, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")] + public delegate void ProcessCompletedEventHandler(object sender, ProcessCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.1")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class ProcessCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal ProcessCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public ErrorCodes Result { + get { + this.RaiseExceptionIfNecessary(); + return ((ErrorCodes)(this.results[0])); + } + } + } +} + #pragma warning restore 1591 \ No newline at end of file diff --git a/Samples/WebServiceBridge/WebApplication1/Web References/localhost/Reference.map b/Samples/WebServiceBridge/WebApplication1/Web References/localhost/Reference.map index ad3d72088e6..2d668257898 100644 --- a/Samples/WebServiceBridge/WebApplication1/Web References/localhost/Reference.map +++ b/Samples/WebServiceBridge/WebApplication1/Web References/localhost/Reference.map @@ -1,7 +1,7 @@ - - - - - - + + + + + + \ No newline at end of file diff --git a/Samples/WebServiceBridge/WebApplication1/Web References/localhost/Service1.disco b/Samples/WebServiceBridge/WebApplication1/Web References/localhost/Service1.disco index cfa10ec52fc..ba626e48c4f 100644 --- a/Samples/WebServiceBridge/WebApplication1/Web References/localhost/Service1.disco +++ b/Samples/WebServiceBridge/WebApplication1/Web References/localhost/Service1.disco @@ -1,6 +1,6 @@ - - - - - + + + + + \ No newline at end of file diff --git a/Samples/WebServiceBridge/WebApplication1/Web References/localhost/Service1.wsdl b/Samples/WebServiceBridge/WebApplication1/Web References/localhost/Service1.wsdl index 8246f40ce7f..fc88ac16af6 100644 --- a/Samples/WebServiceBridge/WebApplication1/Web References/localhost/Service1.wsdl +++ b/Samples/WebServiceBridge/WebApplication1/Web References/localhost/Service1.wsdl @@ -1,76 +1,76 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Samples/WebServiceBridge/WebApplication1/WebApplication1.csproj b/Samples/WebServiceBridge/WebApplication1/WebApplication1.csproj index 8bb7276630b..ea66ef91b55 100644 --- a/Samples/WebServiceBridge/WebApplication1/WebApplication1.csproj +++ b/Samples/WebServiceBridge/WebApplication1/WebApplication1.csproj @@ -1,136 +1,136 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {FE207907-5E5A-4E6C-BF00-9C1C9858F258} - {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} - Library - Properties - WebApplication1 - WebApplication1 - - - - - - v4.0 - - - true - full - false - bin\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\ - TRACE - prompt - 4 - AllRules.ruleset - - - - - - - - - - - - - - - - - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - Reference.map - - - MSDiscoCodeGenerator - Reference.cs - - - - - - - - ASPXCodeBehind - Default.aspx - - - Default.aspx - - - - True - True - Settings.settings - - - True - True - Reference.map - - - - - - - - Dynamic - Web References\localhost\ - http://localhost:21612/Service1.asmx - - - - - Settings - WebApplication1_localhost_Service1 - - - - - - - - - - False - True - 38422 - / - - - False - False - - - False - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {FE207907-5E5A-4E6C-BF00-9C1C9858F258} + {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + WebApplication1 + WebApplication1 + + + + + + v4.0 + + + true + full + false + bin\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\ + TRACE + prompt + 4 + AllRules.ruleset + + + + + + + + + + + + + + + + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + Reference.map + + + MSDiscoCodeGenerator + Reference.cs + + + + + + + + ASPXCodeBehind + Default.aspx + + + Default.aspx + + + + True + True + Settings.settings + + + True + True + Reference.map + + + + + + + + Dynamic + Web References\localhost\ + http://localhost:21612/Service1.asmx + + + + + Settings + WebApplication1_localhost_Service1 + + + + + + + + + + False + True + 38422 + / + + + False + False + + + False + + + + \ No newline at end of file diff --git a/Samples/WebServiceBridge/WebApplication1/web.config b/Samples/WebServiceBridge/WebApplication1/web.config index 3f8a352aa71..73ac74c4e08 100644 --- a/Samples/WebServiceBridge/WebApplication1/web.config +++ b/Samples/WebServiceBridge/WebApplication1/web.config @@ -1,90 +1,90 @@ - - - - -
- - - -
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - http://localhost:21612/Service1.asmx - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + +
+ + + +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + http://localhost:21612/Service1.asmx + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Samples/WebServiceBridge/WebService1/Global.asax b/Samples/WebServiceBridge/WebService1/Global.asax index d28e6dde435..b16057cdca9 100644 --- a/Samples/WebServiceBridge/WebService1/Global.asax +++ b/Samples/WebServiceBridge/WebService1/Global.asax @@ -1 +1 @@ -<%@ Application Codebehind="Global.asax.cs" Inherits="WebService1.Global" Language="C#" %> +<%@ Application Codebehind="Global.asax.cs" Inherits="WebService1.Global" Language="C#" %> diff --git a/Samples/WebServiceBridge/WebService1/Global.asax.cs b/Samples/WebServiceBridge/WebService1/Global.asax.cs index 1ef0cc1e5cf..9ece0d2f324 100644 --- a/Samples/WebServiceBridge/WebService1/Global.asax.cs +++ b/Samples/WebServiceBridge/WebService1/Global.asax.cs @@ -1,27 +1,27 @@ -using System; -using NServiceBus; - -namespace WebService1 -{ - public class Global : System.Web.HttpApplication - { - public static IBus Bus { get; private set; } - - protected void Application_Start(object sender, EventArgs e) - { - Bus = Configure.WithWeb() - .Log4Net() - .DefaultBuilder() - .XmlSerializer() - .MsmqTransport() - .UnicastBus() - .LoadMessageHandlers() - .CreateBus() - .Start(); - } - - protected void Application_End(object sender, EventArgs e) - { - } - } +using System; +using NServiceBus; + +namespace WebService1 +{ + public class Global : System.Web.HttpApplication + { + public static IBus Bus { get; private set; } + + protected void Application_Start(object sender, EventArgs e) + { + Bus = Configure.WithWeb() + .Log4Net() + .DefaultBuilder() + .XmlSerializer() + .MsmqTransport() + .UnicastBus() + .LoadMessageHandlers() + .CreateBus() + .Start(); + } + + protected void Application_End(object sender, EventArgs e) + { + } + } } \ No newline at end of file diff --git a/Samples/WebServiceBridge/WebService1/Properties/AssemblyInfo.cs b/Samples/WebServiceBridge/WebService1/Properties/AssemblyInfo.cs index 76312e65875..7cb557820cc 100644 --- a/Samples/WebServiceBridge/WebService1/Properties/AssemblyInfo.cs +++ b/Samples/WebServiceBridge/WebService1/Properties/AssemblyInfo.cs @@ -1,35 +1,35 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("WebService1")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("WebService1")] -[assembly: AssemblyCopyright("Copyright © 2007")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("3d5900ae-111a-45be-96b3-d9e4606ca793")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("WebService1")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("WebService1")] +[assembly: AssemblyCopyright("Copyright © 2007")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("3d5900ae-111a-45be-96b3-d9e4606ca793")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Samples/WebServiceBridge/WebService1/Service1.asmx.cs b/Samples/WebServiceBridge/WebService1/Service1.asmx.cs index 90254c73466..ccaa8ac450f 100644 --- a/Samples/WebServiceBridge/WebService1/Service1.asmx.cs +++ b/Samples/WebServiceBridge/WebService1/Service1.asmx.cs @@ -1,15 +1,15 @@ -using System.Web.Services; -using System.ComponentModel; -using Messages; -using NServiceBus; - -namespace WebService1 -{ - [WebService(Namespace = "http://tempuri.org/")] - [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] - [ToolboxItem(false)] - public class Service1 : NServiceBus.Webservice - { - } -} - +using System.Web.Services; +using System.ComponentModel; +using Messages; +using NServiceBus; + +namespace WebService1 +{ + [WebService(Namespace = "http://tempuri.org/")] + [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] + [ToolboxItem(false)] + public class Service1 : NServiceBus.Webservice + { + } +} + diff --git a/Samples/WebServiceBridge/WebService1/Web.config b/Samples/WebServiceBridge/WebService1/Web.config index e806b5daa54..09d86b0abe8 100644 --- a/Samples/WebServiceBridge/WebService1/Web.config +++ b/Samples/WebServiceBridge/WebService1/Web.config @@ -1,108 +1,108 @@ - - - -
-
-
- - -
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + +
+
+
+ + +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Samples/WebServiceBridge/WebService1/WebService1.csproj b/Samples/WebServiceBridge/WebService1/WebService1.csproj index aeb13f68189..94a688954e7 100644 --- a/Samples/WebServiceBridge/WebService1/WebService1.csproj +++ b/Samples/WebServiceBridge/WebService1/WebService1.csproj @@ -1,115 +1,115 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {20EE4282-E399-4253-81DF-F99A508DEE0D} - {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} - Library - Properties - WebService1 - WebService1 - - - - - - v4.0 - - - true - full - false - bin\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\binaries\log4net.dll - - - False - ..\..\..\binaries\NServiceBus.dll - - - False - ..\..\..\binaries\NServiceBus.Core.dll - - - - - - - - - - - - - - - - - - - - - - - Global.asax - - - Service1.asmx - Component - - - - - - {ED855B92-C7EB-4BE7-9072-5C2260C329FC} - Messages %28Samples\WebServiceBridge\Messages%29 - - - - - - - - - - False - True - 21612 - / - http://localhost/WebService1 - False - False - - - False - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {20EE4282-E399-4253-81DF-F99A508DEE0D} + {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} + Library + Properties + WebService1 + WebService1 + + + + + + v4.0 + + + true + full + false + bin\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\binaries\log4net.dll + + + False + ..\..\..\binaries\NServiceBus.dll + + + False + ..\..\..\binaries\NServiceBus.Core.dll + + + + + + + + + + + + + + + + + + + + + + + Global.asax + + + Service1.asmx + Component + + + + + + {ED855B92-C7EB-4BE7-9072-5C2260C329FC} + Messages %28Samples\WebServiceBridge\Messages%29 + + + + + + + + + + False + True + 21612 + / + http://localhost/WebService1 + False + False + + + False + + + + \ No newline at end of file diff --git a/Samples/WebServiceBridge/WebServiceBridge.sln b/Samples/WebServiceBridge/WebServiceBridge.sln index 9abcd135511..cbf29d0c477 100644 --- a/Samples/WebServiceBridge/WebServiceBridge.sln +++ b/Samples/WebServiceBridge/WebServiceBridge.sln @@ -1,42 +1,42 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebService1", "WebService1\WebService1.csproj", "{20EE4282-E399-4253-81DF-F99A508DEE0D}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Messages", "Messages\Messages.csproj", "{ED855B92-C7EB-4BE7-9072-5C2260C329FC}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server", "Server\Server.csproj", "{E259AE1E-613E-41D8-B36A-F80343239363}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebApplication1", "WebApplication1\WebApplication1.csproj", "{FE207907-5E5A-4E6C-BF00-9C1C9858F258}" -EndProject -Global - GlobalSection(SubversionScc) = preSolution - Svn-Managed = True - Manager = AnkhSVN - Subversion Support for Visual Studio - EndGlobalSection - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {20EE4282-E399-4253-81DF-F99A508DEE0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {20EE4282-E399-4253-81DF-F99A508DEE0D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {20EE4282-E399-4253-81DF-F99A508DEE0D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {20EE4282-E399-4253-81DF-F99A508DEE0D}.Release|Any CPU.Build.0 = Release|Any CPU - {ED855B92-C7EB-4BE7-9072-5C2260C329FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {ED855B92-C7EB-4BE7-9072-5C2260C329FC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {ED855B92-C7EB-4BE7-9072-5C2260C329FC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {ED855B92-C7EB-4BE7-9072-5C2260C329FC}.Release|Any CPU.Build.0 = Release|Any CPU - {E259AE1E-613E-41D8-B36A-F80343239363}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E259AE1E-613E-41D8-B36A-F80343239363}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E259AE1E-613E-41D8-B36A-F80343239363}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E259AE1E-613E-41D8-B36A-F80343239363}.Release|Any CPU.Build.0 = Release|Any CPU - {FE207907-5E5A-4E6C-BF00-9C1C9858F258}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FE207907-5E5A-4E6C-BF00-9C1C9858F258}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FE207907-5E5A-4E6C-BF00-9C1C9858F258}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FE207907-5E5A-4E6C-BF00-9C1C9858F258}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebService1", "WebService1\WebService1.csproj", "{20EE4282-E399-4253-81DF-F99A508DEE0D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Messages", "Messages\Messages.csproj", "{ED855B92-C7EB-4BE7-9072-5C2260C329FC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Server", "Server\Server.csproj", "{E259AE1E-613E-41D8-B36A-F80343239363}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebApplication1", "WebApplication1\WebApplication1.csproj", "{FE207907-5E5A-4E6C-BF00-9C1C9858F258}" +EndProject +Global + GlobalSection(SubversionScc) = preSolution + Svn-Managed = True + Manager = AnkhSVN - Subversion Support for Visual Studio + EndGlobalSection + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {20EE4282-E399-4253-81DF-F99A508DEE0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {20EE4282-E399-4253-81DF-F99A508DEE0D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {20EE4282-E399-4253-81DF-F99A508DEE0D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {20EE4282-E399-4253-81DF-F99A508DEE0D}.Release|Any CPU.Build.0 = Release|Any CPU + {ED855B92-C7EB-4BE7-9072-5C2260C329FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ED855B92-C7EB-4BE7-9072-5C2260C329FC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ED855B92-C7EB-4BE7-9072-5C2260C329FC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ED855B92-C7EB-4BE7-9072-5C2260C329FC}.Release|Any CPU.Build.0 = Release|Any CPU + {E259AE1E-613E-41D8-B36A-F80343239363}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E259AE1E-613E-41D8-B36A-F80343239363}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E259AE1E-613E-41D8-B36A-F80343239363}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E259AE1E-613E-41D8-B36A-F80343239363}.Release|Any CPU.Build.0 = Release|Any CPU + {FE207907-5E5A-4E6C-BF00-9C1C9858F258}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FE207907-5E5A-4E6C-BF00-9C1C9858F258}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FE207907-5E5A-4E6C-BF00-9C1C9858F258}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FE207907-5E5A-4E6C-BF00-9C1C9858F258}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/acknowledgements.txt b/acknowledgements.txt index 5ff7b736882..36fb75f20e8 100644 --- a/acknowledgements.txt +++ b/acknowledgements.txt @@ -1,12 +1,12 @@ -NServiceBus uses multiple existing open source projects that have been invaluable resources and made creating NServiceBus possible. - -The NServiceBus team gives its thanks to: - -Spring Framework .NET (http://springframework.net/) -The Castle Project (http://castleproject.org/) -Rhino Mocks (http://groups.google.com/group/RhinoMocks/) -StructureMap (http://structuremap.sourceforge.net) -NHibernate (http://www.hibernate.org/343.html) -FluentNHibernate (http://wiki.fluentnhibernate.org) -Topshelf (http://code.google.com/p/topshelf/) - +NServiceBus uses multiple existing open source projects that have been invaluable resources and made creating NServiceBus possible. + +The NServiceBus team gives its thanks to: + +Spring Framework .NET (http://springframework.net/) +The Castle Project (http://castleproject.org/) +Rhino Mocks (http://groups.google.com/group/RhinoMocks/) +StructureMap (http://structuremap.sourceforge.net) +NHibernate (http://www.hibernate.org/343.html) +FluentNHibernate (http://wiki.fluentnhibernate.org) +Topshelf (http://code.google.com/p/topshelf/) + diff --git a/docs/NServiceBus_Code_Snippets.snippet b/docs/NServiceBus_Code_Snippets.snippet index 5554bda04cc..e62e953473f 100644 --- a/docs/NServiceBus_Code_Snippets.snippet +++ b/docs/NServiceBus_Code_Snippets.snippet @@ -1,31 +1,31 @@ - - - -
- NServiceBus Message Handler - handler -
- - - - Message - Message type - MessageType - - - - - { - public void Handle($Message$ message) - { - - } - - public IBus Bus { get; set; } - } - ]]> - - -
+ + + +
+ NServiceBus Message Handler + handler +
+ + + + Message + Message type + MessageType + + + + + { + public void Handle($Message$ message) + { + + } + + public IBus Bus { get; set; } + } + ]]> + + +
\ No newline at end of file diff --git a/docs/NServiceBus_Code_Snippets.vscontent b/docs/NServiceBus_Code_Snippets.vscontent index 2fdcfb7e866..4ab40408885 100644 --- a/docs/NServiceBus_Code_Snippets.vscontent +++ b/docs/NServiceBus_Code_Snippets.vscontent @@ -1,12 +1,12 @@ - - - NServiceBus_Code_Snippets.snippet - NServiceBus Core Snippets - A set of code snippets to make nServiceBus development easier. - Code Snippet - 1.0 - - - - + + + NServiceBus_Code_Snippets.snippet + NServiceBus Core Snippets + A set of code snippets to make nServiceBus development easier. + Code Snippet + 1.0 + + + + \ No newline at end of file diff --git a/ilmerge.exclude b/ilmerge.exclude index b80fd0fe1ee..4e1c3fcaf03 100644 --- a/ilmerge.exclude +++ b/ilmerge.exclude @@ -1,6 +1,6 @@ -NServiceBus* -Spring.Reflection.Dynamic -Rhino.Mocks.* -Castle.Core.Interceptor.IProxyTargetAccessor -Castle.DynamicProxy.AbstractInvocation +NServiceBus* +Spring.Reflection.Dynamic +Rhino.Mocks.* +Castle.Core.Interceptor.IProxyTargetAccessor +Castle.DynamicProxy.AbstractInvocation NHibernate.Cfg.MappingSchema.* \ No newline at end of file diff --git a/lib/Autofac License.txt b/lib/Autofac License.txt index 7d4fc895bbd..237f4499e47 100644 --- a/lib/Autofac License.txt +++ b/lib/Autofac License.txt @@ -1,27 +1,27 @@ -Autofac IoC Container -Copyright (c) 2007-2008 Autofac Contributors -http://code.google.com/p/autofac/wiki/Contributing - -Other software included in this distribution is owned and -licensed separately, see the included license files for details. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +Autofac IoC Container +Copyright (c) 2007-2008 Autofac Contributors +http://code.google.com/p/autofac/wiki/Contributing + +Other software included in this distribution is owned and +licensed separately, see the included license files for details. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/lib/Autofac.XML b/lib/Autofac.XML index 5e2e53cf1b8..711fbf4dae4 100644 --- a/lib/Autofac.XML +++ b/lib/Autofac.XML @@ -1,5072 +1,5072 @@ - - - - Autofac - - - - - Reflection activator data for concrete types. - - - - - Builder for reflection-based activators. - - - - - Specify a reflection activator for the given type. - - Type that will be activated. - - - - Get the implementation type. - - - - - The constructor finder for the registration. - - - - - The constructor selector for the registration. - - - - - The explicitly bound constructor parameters. - - - - - The explicitly bound properties. - - - - - Activator data that can provide an IInstanceActivator instance. - - - - - The instance activator based on the provided data. - - - - - Specify a reflection activator for the given type. - - Type that will be activated. - - - - The instance activator based on the provided data. - - - - - Data structure used to construct registrations. - - The most specific type to which instances of the registration - can be cast. - Activator builder type. - Registration style type. - - - - Configure the component so that instances are never disposed by the container. - - A registration builder allowing further configuration of the component. - - - - Configure the component so that instances that support IDisposable are - disposed by the container (default.) - - A registration builder allowing further configuration of the component. - - - - Configure the component so that every dependent component or call to Resolve() - gets a new, unique instance (default.) - - A registration builder allowing further configuration of the component. - - - - Configure the component so that every dependent component or call to Resolve() - gets the same, shared instance. - - A registration builder allowing further configuration of the component. - - - - Configure the component so that every dependent component or call to Resolve() - within a single ILifetimeScope gets the same, shared instance. Dependent components in - different lifetime scopes will get different instances. - - A registration builder allowing further configuration of the component. - - - - Configure the component so that every dependent component or call to Resolve() - within a ILifetimeScope tagged with the provided tag value gets the same, shared instance. - Dependent components in lifetime scopes that are children of the tagged scope will - share the parent's instance. If no appropriately tagged scope can be found in the - hierarchy an is thrown. - - Tag applied to matching lifetime scopes. - A registration builder allowing further configuration of the component. - - - - Configure the services that the component will provide. The generic parameter(s) to As() - will be exposed as TypedService instances. - - Service type. - A registration builder allowing further configuration of the component. - - - - Configure the services that the component will provide. The generic parameter(s) to As() - will be exposed as TypedService instances. - - Service type. - Service type. - A registration builder allowing further configuration of the component. - - - - Configure the services that the component will provide. The generic parameter(s) to As() - will be exposed as TypedService instances. - - Service type. - Service type. - Service type. - A registration builder allowing further configuration of the component. - - - - Configure the services that the component will provide. - - Service types to expose. - A registration builder allowing further configuration of the component. - - - - Configure the services that the component will provide. - - Services to expose. - A registration builder allowing further configuration of the component. - - - - Provide a textual name that can be used to retrieve the component. - - Named service to associate with the component. - The service type provided by the component. - A registration builder allowing further configuration of the component. - - - - Provide a textual name that can be used to retrieve the component. - - Named service to associate with the component. - The service type provided by the component. - A registration builder allowing further configuration of the component. - - - - Provide a key that can be used to retrieve the component. - - Key to associate with the component. - The service type provided by the component. - A registration builder allowing further configuration of the component. - - - - Provide a key that can be used to retrieve the component. - - Key to associate with the component. - The service type provided by the component. - A registration builder allowing further configuration of the component. - - - - Add a handler for the Preparing event. This event allows manipulating of the parameters - that will be provided to the component. - - The event handler. - A registration builder allowing further configuration of the component. - - - - Add a handler for the Activating event. - - The event handler. - A registration builder allowing further configuration of the component. - - - - Add a handler for the Activated event. - - The event handler. - A registration builder allowing further configuration of the component. - - - - Configure the component so that any properties whose types are registered in the - container will be wired to instances of the appropriate service. - - A registration builder allowing further configuration of the component. - - - - Configure the component so that any properties whose types are registered in the - container will be wired to instances of the appropriate service. - - If set to true, the properties won't be wired until - after the component has been activated. This allows property-property and constructor-property - circularities in the dependency graph. - A registration builder allowing further configuration of the component. - - - - Associates data with the component. - - Key by which the data can be located. - The data value. - A registration builder allowing further configuration of the component. - - - - Associates data with the component. - - The extended properties to associate with the component. - A registration builder allowing further configuration of the component. - - - - Associates data with the component. - - A type with properties whose names correspond to the - property names to configure. - A registration builder allowing further configuration of the component. - - - - The activator data. - - - - - The registration style. - - - - - The registration data. - - - - - Used with the WithMetadata configuration method to - associate key-value pairs with an . - - Interface with properties whose names correspond to - the property keys. - This feature was suggested by OJ Reeves (@TheColonial). - - - - Set one of the property values. - - The type of the property. - An expression that accesses the property to set. - The property value to set. - - - - Static factory methods to simplify the creation and handling of IRegistrationBuilder{L,A,R}. - - - To create an for a specific type, use: - - var cr = RegistrationBuilder.ForType(t).CreateRegistration(); - - The full builder syntax is supported: - - var cr = RegistrationBuilder.ForType(t).Named("foo").ExternallyOwned().CreateRegistration(); - - - - - - Creates a registration builder for the provided delegate. - - Instance type returned by delegate. - Delegate to register. - A registration builder. - - - - Creates a registration builder for the provided delegate. - - Delegate to register. - Most specific type return value of delegate can be cast to. - A registration builder. - - - - Creates a registration builder for the provided type. - - Implementation type to register. - A registration builder. - - - - Creates a registration builder for the provided type. - - Implementation type to register. - A registration builder. - - - - Create an from a . - (There is no need to call - this method when registering components through a .) - - - When called on the result of one of the methods, - the returned registration will be different from the one the builder itself registers - in the container. - - - - var registration = RegistrationBuilder.ForType<Foo>().CreateRegistration(); - - - - - - The registration builder. - An IComponentRegistration. - - - - Create an IComponentRegistration from data. - - Id of the registration. - Registration data. - Activator. - Services provided by the registration. - An IComponentRegistration. - - - - Create an IComponentRegistration from data. - - Id of the registration. - Registration data. - Activator. - Services provided by the registration. - Optional; target registration. - An IComponentRegistration. - - - - Register a component in the component registry. This helper method is necessary - in order to execute OnRegistered hooks and respect PreserveDefaults. - - Hoping to refactor this out. - - - - Component registry to make registration in. - Registration builder with data for new registration. - - - - A strongly-typed resource class, for looking up localized strings, etc. - - - - - Returns the cached ResourceManager instance used by this class. - - - - - Overrides the current thread's CurrentUICulture property for all - resource lookups using this strongly typed resource class. - - - - - Looks up a localized string similar to The type '{0}' is not assignable to service '{1}'.. - - - - - Adds registration syntax for less commonly-used features. - - - These features are in this namespace because they will remain accessible to - applications originally written against Autofac 1.4. In Autofac 2, this functionality - is implicitly provided and thus making explicit registrations is rarely necessary. - - - - - Registers a factory delegate. - - Container builder. - Factory type to generate. - Registration builder allowing the registration to be configured. - Factory delegates are provided automatically in Autofac 2, - and this method is generally not required. - - - - Registers a factory delegate. - - Container builder. - Factory type to generate. - The service that the delegate will return instances of. - Registration builder allowing the registration to be configured. - Factory delegates are provided automatically in Autofac 2, and - this method is generally not required. - - - - Registers a factory delegate. - - The type of the delegate. - Container builder. - The service that the delegate will return instances of. - Registration builder allowing the registration to be configured. - Factory delegates are provided automatically in Autofac 2, - and this method is generally not required. - - - - Registers a factory delegate. - - The type of the delegate. - Container builder. - Registration builder allowing the registration to be configured. - Factory delegates are provided automatically in Autofac 2, - and this method is generally not required. - - - - Changes the parameter mapping mode of the supplied delegate type to match - parameters by name. - - Factory delegate type - Activator data type - Registration style - Registration to change parameter mapping mode of. - Registration builder allowing the registration to be configured. - - - - Changes the parameter mapping mode of the supplied delegate type to match - parameters by position. - - Factory delegate type - Activator data type - Registration style - Registration to change parameter mapping mode of. - Registration builder allowing the registration to be configured. - - - - Changes the parameter mapping mode of the supplied delegate type to match - parameters by type. - - Factory delegate type - Activator data type - Registration style - Registration to change parameter mapping mode of. - Registration builder allowing the registration to be configured. - - - - Registers the type as a collection. If no services or names are specified, the - default services will be IList<T>, ICollection<T>, and IEnumerable<T> - - The type of the collection elements. - Container builder. - A unique name for the collection that can be passed to MemberOf(). - Registration builder allowing the registration to be configured. - Collections are provided automatically in Autofac 2, - and this method is generally not required. - - - - Registers the type as a collection. If no services or names are specified, the - default services will be IList<T>, ICollection<T>, and IEnumerable<T> - - The type of the collection elements. - Container builder. - A unique name for the collection that can be passed to MemberOf(). - Registration builder allowing the registration to be configured. - Collections are provided automatically in Autofac 2, - and this method is generally not required. - - - - Include the element explicitly in a collection configured using RegisterCollection. - - Registration limit type. - Registration style. - Activator data type. - Registration to export. - The collection name, as passed to RegisterCollection. - A registration builder allowing further configuration of the component. - - - - A strongly-typed resource class, for looking up localized strings, etc. - - - - - Returns the cached ResourceManager instance used by this class. - - - - - Overrides the current thread's CurrentUICulture property for all - resource lookups using this strongly typed resource class. - - - - - Looks up a localized string similar to A delegate registered to create instances of '{0}' returned null.. - - - - - A strongly-typed resource class, for looking up localized strings, etc. - - - - - Returns the cached ResourceManager instance used by this class. - - - - - Overrides the current thread's CurrentUICulture property for all - resource lookups using this strongly typed resource class. - - - - - Looks up a localized string similar to Bound constructor '{0}'.. - - - - - Looks up a localized string similar to Constructor '{0}' parameter resolution failed at parameter '{1}'.. - - - - - Provides parameters that have a default value, set with an optional parameter - declaration in C# or VB. - - - - - Used in order to provide a value to a constructor parameter or property on an instance - being created by the container. - - - Not all parameters can be applied to all sites. - - - - - Returns true if the parameter is able to provide a value to a particular site. - - Constructor, method, or property-mutator parameter. - The component context in which the value is being provided. - If the result is true, the valueProvider parameter will - be set to a function that will lazily retrieve the parameter value. If the result is false, - will be set to null. - True if a value can be supplied; otherwise, false. - - - - Returns true if the parameter is able to provide a value to a particular site. - - Constructor, method, or property-mutator parameter. - The component context in which the value is being provided. - If the result is true, the valueProvider parameter will - be set to a function that will lazily retrieve the parameter value. If the result is false, - will be set to null. - True if a value can be supplied; otherwise, false. - - - - Fired when the activation process for a new instance is complete. - - - - - The context in which the activation occurred. - - - - - The component providing the instance. - - - - - The paramters provided when resolved. - - - - - The instance that will be used to satisfy the request. - - - - - Fired after the construction of an instance but before that instance - is shared with any other or any members are invoked on it. - - - - - The instance can be replaced if needed, e.g. by an interface proxy. - - The object to use instead of the activated instance. - - - - The context in which the activation occurred. - - - - - The component providing the instance. - - - - - The instance that will be used to satisfy the request. - - - - - The parameters supplied to the activator. - - - - - Interface supported by services that carry type information. - - - - - Return a new service of the same kind, but carrying - as the . - - The new service type. - A new service with the service type. - - - - Gets the type of the service. - - The type of the service. - - - - Identifies a service using a key in addition to its type. - - - - - Services are the lookup keys used to locate component instances. - - - - - Returns a that represents the current . - - - A that represents the current . - - - - - Implements the operator ==. - - The LHS. - The RHS. - The result of the operator. - - - - Implements the operator !=. - - The LHS. - The RHS. - The result of the operator. - - - - Determines whether the specified is equal to the current . - - The to compare with the current . - - true if the specified is equal to the current ; otherwise, false. - - The parameter is null. - - - - Serves as a hash function for a particular type. - - - A hash code for the current . - - - - - Gets a human-readable description of the service. - - The description. - - - - Initializes a new instance of the class. - - Key of the service. - Type of the service. - - - - Determines whether the specified is equal to the current . - - The to compare with the current . - - true if the specified is equal to the current ; otherwise, false. - - The parameter is null. - - - - Serves as a hash function for a particular type. - - - A hash code for the current . - - - - - Return a new service of the same kind, but carrying - as the . - - The new service type. - A new service with the service type. - - - - Gets or sets the key of the service. - - The key of the service. - - - - Gets the type of the service. - - The type of the service. - - - - Gets a human-readable description of the service. - - The description. - - - - Wraps a component registration, switching its lifetime. - - - - - Base class for disposable objects. - - - - - Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - - - - - Releases unmanaged and - optionally - managed resources - - true to release both managed and unmanaged resources; false to release only unmanaged resources. - - - - Describes a logical component within the container. - - - - - Called by the container when an instance is required. - - The context in which the instance will be activated. - Parameters for activation. These may be modified by the event handler. - - - - Called by the container once an instance has been constructed. - - The context in which the instance was activated. - The parameters supplied to the activator. - The instance. - - - - Called by the container once an instance has been fully constructed, including - any requested objects that depend on the instance. - - The context in which the instance was activated. - The parameters supplied to the activator. - The instance. - - - - A unique identifier for this component (shared in all sub-contexts.) - This value also appears in Services. - - - - - The activator used to create instances. - - - - - The lifetime associated with the component. - - - - - Whether the component instances are shared or not. - - - - - Whether the instances of the component should be disposed by the container. - - - - - The services provided by the component. - - - - - Additional data associated with the component. - - - - - The component registration upon which this registration is based. - - - - - Fired when a new instance is required. The instance can be - provided in order to skip the regular activator, by setting the Instance property in - the provided event arguments. - - - - - Fired when a new instance is being activated. The instance can be - wrapped or switched at this time by setting the Instance property in - the provided event arguments. - - - - - Fired when the activation process for a new instance is complete. - - - - - A strongly-typed resource class, for looking up localized strings, etc. - - - - - Returns the cached ResourceManager instance used by this class. - - - - - Overrides the current thread's CurrentUICulture property for all - resource lookups using this strongly typed resource class. - - - - - Looks up a localized string similar to Activator = {0}, Services = [{1}], Lifetime = {2}, Sharing = {3}, Ownership = {4}. - - - - - Pulls registrations from another component registry. - Excludes most auto-generated registrations - currently has issues with - collection registrations. - - - - - Allows registrations to be made on-the-fly when unregistered - services are requested (lazy registrations.) - - - - - Retrieve registrations for an unregistered service, to be used - by the container. - - The service that was requested. - A function that will return existing registrations for a service. - Registrations providing the service. - - - - Gets whether the registrations provided by this source are 1:1 adapters on top - of other components (I.e. like Meta, Func or Owned.) - - - - - Create an external registry source that draws components from - . - - Component registry to pull registrations from. - - - - Retrieve registrations for an unregistered service, to be used - by the container. - - The service that was requested. - A function that will return existing registrations for a service. - Registrations providing the service. - - - - In this case because the components that are adapted do not come from the same - logical scope, we must return false to avoid duplicating them. - - - - - Switches components with a RootScopeLifetime (singletons) with - decorators exposing MatchingScopeLifetime targeting the specified scope. - - - - - Maps services onto the components that provide them. - - - The component registry provides services directly from components, - and also uses to generate components - on-the-fly or as adapters for other components. A component registry - is normally used through a , and not - directly by application code. - - - - - Provides component registrations according to the services they provide. - - - - - Attempts to find a default registration for the specified service. - - The service to look up. - The default registration for the service. - True if a registration exists. - - - - Determines whether the specified service is registered. - - The service to test. - True if the service is registered. - - - - Register a component. - - The component registration. - - - - Register a component. - - The component registration. - If true, existing defaults for the services provided by the - component will not be changed. - - - - Selects from the available registrations after ensuring that any - dynamic registration sources that may provide - have been invoked. - - The service for which registrations are sought. - Registrations supporting . - - - - Add a registration source that will provide registrations on-the-fly. - - The source to register. - - - - Enumerate the registered components. - - - - - Fired whenever a component is registered - either explicitly or via a - . - - - - - Gets the registration sources that are used by the registry. - - - - - Protects instance variables from concurrent access. - - - - - External registration sources. - - - - - All registrations. - - - - - Keeps track of the status of registered services. - - - - - Releases unmanaged and - optionally - managed resources - - true to release both managed and unmanaged resources; false to release only unmanaged resources. - - - - Attempts to find a default registration for the specified service. - - The service to look up. - The default registration for the service. - True if a registration exists. - - - - Determines whether the specified service is registered. - - The service to test. - True if the service is registered. - - - - Register a component. - - The component registration. - - - - Register a component. - - The component registration. - If true, existing defaults for the services provided by the - component will not be changed. - - - - Selects from the available registrations after ensuring that any - dynamic registration sources that may provide - have been invoked. - - The service for which registrations are sought. - Registrations supporting . - - - - Add a registration source that will provide registrations on-the-fly. - - The source to register. - - - - Enumerate the registered components. - - - - - Fired whenever a component is registered - either explicitly or via a - . - - - - - Gets the registration sources that are used by the registry. - - - - - Tracks the services known to the registry. - - - - - Used for bookkeeping so that the same source is not queried twice (may be null.) - - - - - Initializes a new instance of the class. - - The tracked service. - - - - The first time a service is requested, initialization (e.g. reading from sources) - happens. This value will then be set to true. Calling many methods on this type before - initialisation is an error. - - - - - The known implementations. - - - - - True if any implementations are known. - - - - - Describes the basic requirements for generating a lightweight adapter. - - - - - Create an instance of . - - The service that will be adapted from. - The adapter function. - - - - The adapter function. - - - - - The service to be adapted from. - - - - - A strongly-typed resource class, for looking up localized strings, etc. - - - - - Returns the cached ResourceManager instance used by this class. - - - - - Overrides the current thread's CurrentUICulture property for all - resource lookups using this strongly typed resource class. - - - - - Looks up a localized string similar to The service {0} cannot be both the adapter's from and to parameters - these must differ.. - - - - - Internal implementation of the RegisterCollection/MemberOf-style collection feature. - - - - - Registration style for dynamic registrations. - - - - - Data used to create factory activators. - - - - - Create a new GeneratedFactoryActivatorData - - The type of the factory. - The service used to provide the products of the factory. - - - - Determines how the parameters of the delegate type are passed on - to the generated Resolve() call as Parameter objects. - For Func-based delegates, this defaults to ByType. Otherwise, the - parameters will be mapped by name. - - - - - Activator data that can provide an IInstanceActivator instance. - - - - - Hides standard Object members to make fluent interfaces - easier to read. - Based on blog post by @kzu here: - http://www.clariusconsulting.net/blogs/kzu/archive/2008/03/10/58301.aspx - - - - - Standard System.Object member. - - Standard result. - - - - Standard System.Object member. - - Standard result. - - - - Standard System.Object member. - - Standard result. - - - - Standard System.Object member. - - The other. - Standard result. - - - - Determines how the parameters of the delegate type are passed on - to the generated Resolve() call as Parameter objects. - - - - - Chooses parameter mapping based on the factory type. - For Func-based factories this is equivalent to ByType, for all - others ByName will be used. - - - - - Pass the parameters supplied to the delegate through to the - underlying registration as NamedParameters based on the parameter - names in the delegate type's formal argument list. - - - - - Pass the parameters supplied to the delegate through to the - underlying registration as TypedParameters based on the parameter - types in the delegate type's formal argument list. - - - - - Pass the parameters supplied to the delegate through to the - underlying registration as PositionalParameters based on the parameter - indices in the delegate type's formal argument list. - - - - - Provides components by lookup operations via an index (key) type. - - The type of the index. - The service provided by the indexed components. - - Retrieving a value given a key: - - IIndex<AccountType, IRenderer> accountRenderers = // ... - var renderer = accountRenderers[AccountType.User]; - - - - - - Get the value associated with if any is available. - - The key to look up. - The retrieved value. - True if a value associated with the key exists. - - - - Get the value associated with . - - The value to retrieve. - The associated value. - - - - Support the - types automatically whenever type T is registered with the container. - Metadata values come from the component registration's metadata. - - - - - Provides a value along with a dictionary of metadata describing the value. - - The type of the value. - - - - Create a new instance. - - The value described by the instance. - The metadata describing the value. - - - - The value described by . - - - - - Metadata describing the value. - - - - - A strongly-typed resource class, for looking up localized strings, etc. - - - - - Returns the cached ResourceManager instance used by this class. - - - - - Overrides the current thread's CurrentUICulture property for all - resource lookups using this strongly typed resource class. - - - - - Looks up a localized string similar to The type {0} is not an open generic type definition.. - - - - - Provides registrations on-the-fly for any concrete type not already registered with - the container. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - A predicate that selects types the source will register. - - - - Retrieve registrations for an unregistered service, to be used - by the container. - - The service that was requested. - A function that will return existing registrations for a service. - Registrations providing the service. - - - - Gets whether the registrations provided by this source are 1:1 adapters on top - of other components (I.e. like Meta, Func or Owned.) - - - - - Activation data for types located by scanning assemblies. - - - - - Create an instance of . - - - - - The filters applied to the types from the scanned assembly. - - - - - Additional actions to be performed on the concrete type registrations. - - - - - Actions to be called once the scanning operation is complete. - - - - - Fired when the activation process for a new instance is complete. - - - - - Initializes a new instance of the class. - - The context. - The component. - The parameters. - The instance. - - - - The context in which the activation occurred. - - - - - The component providing the instance. - - - - - The paramters provided when resolved. - - - - - The instance that will be used to satisfy the request. - - - - - Fired after the construction of an instance but before that instance - is shared with any other or any members are invoked on it. - - - - - Initializes a new instance of the class. - - The context. - The component. - The parameters. - The instance. - - - - The instance can be replaced if needed, e.g. by an interface proxy. - - The object to use instead of the activated instance. - - - - The context in which the activation occurred. - - - - - The component providing the instance. - - - - - The instance that will be used to satisfy the request. - - - The instance can be replaced if needed, e.g. by an interface proxy. - - - - - The parameters supplied to the activator. - - - - - Activate instances using a delegate. - - - - - Base class for instance activators. - - - - - Create an instance activator that will return instances compatible - with . - - Most derived type to which instances can be cast. - - - - Gets a string representation of the activator. - - A string describing the activator. - - - - The most specific type that the component instances are known to be castable to. - - - - - Activates component instances. - - - - - Activate an instance in the provided context. - - Context in which to activate instances. - Parameters to the instance. - The activated instance. - - The context parameter here should probably be ILifetimeScope in order to reveal Disposer, - but will wait until implementing a concrete use case to make the decision - - - - - The most specific type that the component instances are known to be castable to. - - - - - Create a delegate activator. - - The most specific type to which activated instances can be cast. - Activation delegate. - - - - Activate an instance in the provided context. - - Context in which to activate instances. - Parameters to the instance. - The activated instance. - - The context parameter here should probably be ILifetimeScope in order to reveal Disposer, - but will wait until implementing a concrete use case to make the decision - - - - - Provides a pre-constructed instance. - - - - - Provide the specified instance. - - The instance to provide. - - - - Activate an instance in the provided context. - - Context in which to activate instances. - Parameters to the instance. - The activated instance. - - The context parameter here should probably be ILifetimeScope in order to reveal Disposer, - but will wait until implementing a concrete use case to make the decision - - - - - Releases unmanaged and - optionally - managed resources - - true to release both managed and unmanaged resources; false to release only unmanaged resources. - - - - Determines whether the activator disposes the instance that it holds. - Necessary because otherwise instances that are never resolved will never be - disposed. - - - - - A strongly-typed resource class, for looking up localized strings, etc. - - - - - Returns the cached ResourceManager instance used by this class. - - - - - Overrides the current thread's CurrentUICulture property for all - resource lookups using this strongly typed resource class. - - - - - Looks up a localized string similar to The provided instance has already been used in an activation request. Did you combine a provided instance with non-root/single-instance lifetime/sharing?. - - - - - Supplies values based on the target parameter type. - - - - - Returns true if the parameter is able to provide a value to a particular site. - - Constructor, method, or property-mutator parameter. - The component context in which the value is being provided. - If the result is true, the valueProvider parameter will - be set to a function that will lazily retrieve the parameter value. If the result is false, - will be set to null. - True if a value can be supplied; otherwise, false. - - - - Finds constructors based on their binding flags. - - - - - Find suitable constructors from which to select. - - - - - Finds suitable constructors on the target type. - - Type to search for constructors. - Suitable constructors. - - - - Create an instance matching constructors with the supplied binding flags. - - Binding flags to match. - - - - Finds suitable constructors on the target type. - - Type to search for constructors. - Suitable constructors. - - - - Binds a constructor to the parameters that will be used when it is invoked. - - - - - Construct a new ConstructorParameterBinding. - - ConstructorInfo to bind. - Available parameters. - Context in which to construct instance. - - - - Invoke the constructor with the parameter bindings. - - The constructed instance. - - - Returns a System.String that represents the current System.Object. - A System.String that represents the current System.Object. - - - - The constructor on the target type. The actual constructor used - might differ, e.g. if using a dynamic proxy. - - - - - True if the binding is valid. - - - - - Describes the constructor parameter binding. - - - - - Selects the best constructor from a set of available constructors. - - - - - Selects the best constructor from the available constructors. - - Available constructors. - The best constructor. - - - - Selects a constructor based on its signature. - - - - - Match constructors with the provided signature. - - Signature to match. - - - - Selects the best constructor from the available constructors. - - Available constructors. - The best constructor. - - - - A strongly-typed resource class, for looking up localized strings, etc. - - - - - Returns the cached ResourceManager instance used by this class. - - - - - Overrides the current thread's CurrentUICulture property for all - resource lookups using this strongly typed resource class. - - - - - Looks up a localized string similar to The required constructor is unavailable.. - - - - - Looks up a localized string similar to More than one constructor matches the selection policy.. - - - - - Selects the constructor with the most parameters. - - - - - Selects the best constructor from the available constructors. - - Available constructors. - The best constructor. - - - - Uses reflection to activate instances of a type. - - - - - Create an activator for the provided type. - - Type to activate. - Constructor finder. - Constructor selector. - Parameters configured explicitly for this instance. - Properties configured explicitly for this instance. - - - - Activate an instance in the provided context. - - Context in which to activate instances. - Parameters to the instance. - The activated instance. - - The context parameter here should probably be ILifetimeScope in order to reveal Disposer, - but will wait until implementing a concrete use case to make the decision - - - - - The constructor finder. - - - - - The constructor selector. - - - - - A strongly-typed resource class, for looking up localized strings, etc. - - - - - Returns the cached ResourceManager instance used by this class. - - - - - Overrides the current thread's CurrentUICulture property for all - resource lookups using this strongly typed resource class. - - - - - Looks up a localized string similar to No constructors matching the constructor-finding policy can be found on the target type.. - - - - - Looks up a localized string similar to None of the constructors found with policy '{0}' on type '{1}' can be invoked with the available services and parameters:{2}. - - - - - Base class for parameters that provide a constant value. - - - - - Create a constant parameter that will apply to parameters matching - the supplied predicate. - - - - - - - Returns true if the parameter is able to provide a value to a particular site. - - Constructor, method, or property-mutator parameter. - The component context in which the value is being provided. - If the result is true, the valueProvider parameter will - be set to a function that will lazily retrieve the parameter value. If the result is false, - will be set to null. - True if a value can be supplied; otherwise, false. - - - - The value of the parameter. - - - - - Standard container implementation. - - - - - Creates, wires dependencies and manages lifetime for a set of components. - Most instances of are created - by a . - - - - // See ContainerBuilder for the definition of the builder variable - using (var container = builder.Build()) - { - var program = container.Resolve<Program>(); - program.Run(); - } - - - - Most functionality is provided by extension methods - on the inherited interface. - - - - - - - - - An tracks the instantiation of component instances. - It defines a boundary in which instances are shared and configured. - Disposing an will dispose the components that were - resolved through it. - - - - // See IContainer for definition of the container variable - using (var requestScope = container.BeginLifetimeScope()) - { - // Note that handler is resolved from requestScope, not - // from the container: - - var handler = requestScope.Resolve<IRequestHandler>(); - handler.Handle(request); - - // When requestScope is disposed, all resources used in processing - // the request will be released. - } - - - - All long-running applications should resolve components via an - . Choosing the duration of the lifetime is application- - specific. The standard Autofac WCF and ASP.NET/MVC integrations are already configured - to create and release s as appropriate. For example, the - ASP.NET integration will create and release an per HTTP - request. - Most functionality is provided by extension methods - on the inherited interface. - - - - - - - - - - - The context in which a service can be accessed or a component's - dependencies resolved. Disposal of a context will dispose any owned - components. - - - - - Resolve an instance of the provided registration within the context. - - The registration. - Parameters for the instance. - - The component instance. - - - - - - - Associates services with the components that provide them. - - - - - Begin a new nested scope. Component instances created via the new scope - will be disposed along with it. - - A new lifetime scope. - - - - Begin a new nested scope. Component instances created via the new scope - will be disposed along with it. - - The tag applied to the . - A new lifetime scope. - - - - Begin a new nested scope, with additional components available to it. - Component instances created via the new scope - will be disposed along with it. - - - The components registered in the sub-scope will be treated as though they were - registered in the root scope, i.e., SingleInstance() components will live as long - as the root scope. - - Action on a - that adds component registations visible only in the new scope. - A new lifetime scope. - - - - Begin a new nested scope, with additional components available to it. - Component instances created via the new scope - will be disposed along with it. - - - The components registered in the sub-scope will be treated as though they were - registered in the root scope, i.e., SingleInstance() components will live as long - as the root scope. - - The tag applied to the . - Action on a - that adds component registations visible only in the new scope. - A new lifetime scope. - - - - The disposer associated with this . - Component instances can be associated with it manually if required. - - Typical usage does not require interaction with this member- it - is used when extending the container. - - - - The tag applied to the . - - Tags allow a level in the lifetime hierarchy to be identified. - In most applications, tags are not necessary. - - - - - An empty container. - - - - - Create a new container. - - - - - Begin a new sub-scope. Instances created via the sub-scope - will be disposed along with it. - - A new lifetime scope. - - - - Begin a new sub-scope. Instances created via the sub-scope - will be disposed along with it. - - The tag applied to the . - A new lifetime scope. - - - - Begin a new nested scope, with additional components available to it. - Component instances created via the new scope - will be disposed along with it. - - Action on a - that adds component registations visible only in the new scope. - A new lifetime scope. - - - - Begin a new nested scope, with additional components available to it. - Component instances created via the new scope - will be disposed along with it. - - The tag applied to the . - Action on a - that adds component registations visible only in the new scope. - A new lifetime scope. - - - - Resolve an instance of the provided registration within the context. - - The registration. - Parameters for the instance. - - The component instance. - - - - - - - Releases unmanaged and - optionally - managed resources - - true to release both managed and unmanaged resources; false to release only unmanaged resources. - - - - Gets the service object of the specified type. - - An object that specifies the type of service object - to get. - - A service object of type .-or- null if there is - no service object of type . - - - - - The disposer associated with this container. Instances can be associated - with it manually if required. - - - - - Tag applied to the lifetime scope. - - The tag applied to this scope and the contexts generated when - it resolves component dependencies. - - - - Associates services with the components that provide them. - - - - - Problem resolving dependencies, e.g. circular references, no callable constructor etc. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The message. - - - - Initializes a new instance of the class. - - The message. - The inner exception. - - - - Initializes a new instance of the class. - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - The parameter is null. - The class name is null or is zero (0). - - - - A strongly-typed resource class, for looking up localized strings, etc. - - - - - Returns the cached ResourceManager instance used by this class. - - - - - Overrides the current thread's CurrentUICulture property for all - resource lookups using this strongly typed resource class. - - - - - Looks up a localized string similar to A required component could not be created.. - - - - - Maintains a set of objects to dispose, and disposes them in the reverse order - from which they were added when the Disposer is itself disposed. - - - - - Provided on an object that will dispose of other objects when it is - itself disposed. - - - - - Adds an object to the disposer. When the disposer is - disposed, so will the object be. - - The instance. - - - - Contents all implement IDisposable. - - - - - Releases unmanaged and - optionally - managed resources - - true to release both managed and unmanaged resources; false to release only unmanaged resources. - - - - Adds an object to the disposer. When the disposer is - disposed, so will the object be. - - The instance. - - - - Locates the lifetime to which instances of a component should be attached. - - - - - Given the most nested scope visible within the resolve operation, find - the scope for the component. - - The most nested visible scope. - The scope for the component. - - - - Represents a set of components and related functionality - packaged together. - - - - - Apply the module to the component registry. - - Component registry to apply configuration to. - - - - Determines when instances supporting IDisposable are disposed. - - - - - The lifetime scope does not dispose the instances. - - - - - The instances are disposed when the lifetime scope is disposed. - - - - - Determines whether instances are shared within a lifetime scope. - - - - - Each request for an instance will return a new object. - - - - - Each request for an instance will return the same object. - - - - - Defines a nested structure of lifetimes. - - - - - Try to retrieve an instance based on a GUID key. If the instance - does not exist, invoke to create it. - - Key to look up. - Creation function. - An instance. - - - - The root of the sharing hierarchy. - - - - - The parent of this node of the hierarchy, or null. - - - - - Attaches the instance's lifetime to the current lifetime scope. - - - - - Given the most nested scope visible within the resolve operation, find - the scope for the component. - - The most nested visible scope. - The scope for the component. - - - - Lifetime scope implementation. - - - - - Protects instance variables from concurrent access. - - - - - The tag applied to root scopes when no other tag is specified. - - - - - Create a lifetime scope for the provided components and nested beneath a parent. - - The tag applied to the . - Components used in the scope. - Parent scope. - - - - Create a root lifetime scope for the provided components. - - The tag applied to the . - Components used in the scope. - - - - Create a root lifetime scope for the provided components. - - Components used in the scope. - - - - Begin a new anonymous sub-scope. Instances created via the sub-scope - will be disposed along with it. - - A new lifetime scope. - - - - Begin a new tagged sub-scope. Instances created via the sub-scope - will be disposed along with it. - - The tag applied to the . - A new lifetime scope. - - - - Begin a new anonymous sub-scope, with additional components available to it. - Component instances created via the new scope - will be disposed along with it. - - Action on a - that adds component registations visible only in the new scope. - A new lifetime scope. - - IContainer cr = // ... - using (var lifetime = cr.BeginLifetimeScope(builder => { - builder.RegisterType<Foo>(); - builder.RegisterType<Bar>().As<IBar>(); }) - { - var foo = lifetime.Resolve<Foo>(); - } - - - - - Begin a new tagged sub-scope, with additional components available to it. - Component instances created via the new scope - will be disposed along with it. - - The tag applied to the . - Action on a - that adds component registations visible only in the new scope. - A new lifetime scope. - - IContainer cr = // ... - using (var lifetime = cr.BeginLifetimeScope("unitOfWork", builder => { - builder.RegisterType<Foo>(); - builder.RegisterType<Bar>().As<IBar>(); }) - { - var foo = lifetime.Resolve<Foo>(); - } - - - - - Resolve an instance of the provided registration within the context. - - The registration. - Parameters for the instance. - - The component instance. - - - - - - - Try to retrieve an instance based on a GUID key. If the instance - does not exist, invoke to create it. - - Key to look up. - Creation function. - An instance. - - - - Releases unmanaged and - optionally - managed resources - - true to release both managed and unmanaged resources; false to release only unmanaged resources. - - - - Gets the service object of the specified type. - - An object that specifies the type of service object - to get. - - A service object of type .-or- null if there is - no service object of type . - - - - - The parent of this node of the hierarchy, or null. - - - - - The root of the sharing hierarchy. - - - - - The disposer associated with this container. Instances can be associated - with it manually if required. - - - - - Tag applied to the lifetime scope. - - The tag applied to this scope and the contexts generated when - it resolves component dependencies. - - - - Associates services with the components that provide them. - - - - - Attaches the component's lifetime to scopes matching a supplied expression. - - - - - Match scopes based on the provided expression. - - Expression describing scopes that will match. - - - - Given the most nested scope visible within the resolve operation, find - the scope for the component. - - The most nested visible scope. - The scope for the component. - - - - A strongly-typed resource class, for looking up localized strings, etc. - - - - - Returns the cached ResourceManager instance used by this class. - - - - - Overrides the current thread's CurrentUICulture property for all - resource lookups using this strongly typed resource class. - - - - - Looks up a localized string similar to No scope matching the expression '{0}' is visible from the scope in which the instance was requested.. - - - - - Attaches the component's lifetime to the root scope. - - - - - Given the most nested scope visible within the resolve operation, find - the scope for the component. - - The most nested visible scope. - The scope for the component. - - - - A property identified by name. When applied to a reflection-based - component, the name will be matched against property names. - - - - - Create a with the specified constant value. - - The name of the property. - The property value. - - - - The name of the property. - - - - - Identifies a service using a textual name in addition to its type. - - - - - Initializes a new instance of the class. - - Name of the service. - Type of the service. - - - - Determines whether the specified is equal to the current . - - The to compare with the current . - - true if the specified is equal to the current ; otherwise, false. - - The parameter is null. - - - - Serves as a hash function for a particular type. - - - A hash code for the current . - - - - - Return a new service of the same kind, but carrying - as the . - - The new service type. - A new service with the service type. - - - - Gets or sets the name of the service. - - The name of the service. - - - - Gets the type of the service. - - The type of the service. - - - - Gets a human-readable description of the service. - - The description. - - - - Fired before the activation process to allow parameters to be changed or an alternative - instance to be provided. - - - - - Initializes a new instance of the class. - - The context. - The component. - The parameters. - - - - The context in which the activation is occurring. - - - - - The component providing the instance being activated. - - - - - The parameters supplied to the activator. - - - - - A service was requested that cannot be provided - by the container. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The service. - - - - Initializes a new instance of the class. - - The service. - The inner exception. - - - - Initializes a new instance of the class. - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - The parameter is null. - The class name is null or is zero (0). - - - - A strongly-typed resource class, for looking up localized strings, etc. - - - - - Returns the cached ResourceManager instance used by this class. - - - - - Overrides the current thread's CurrentUICulture property for all - resource lookups using this strongly typed resource class. - - - - - Looks up a localized string similar to The requested service '{0}' has not been registered.. - - - - - Information about the ocurrence of a component being registered - with a container. - - - - - Create a new instance with a valid container and component registration. - - The container into which the registration - was made. - The component registration. - - - - The container into which the registration was made. - - - - - The component registration. - - - - - Describes a logical component within the container. - - - - - Create a new component registration. - - Unique identifier for the component. - Activator used to activate instances. - Determines how the component will be associated with its lifetime. - Whether the component is shared within its lifetime scope. - Whether the component instances are disposed at the end of their lifetimes. - Services the component provides. - Data associated with the component. - - - - Create a new component registration. - - Unique identifier for the component. - Activator used to activate instances. - Determines how the component will be associated with its lifetime. - Whether the component is shared within its lifetime scope. - Whether the component instances are disposed at the end of their lifetimes. - Services the component provides. - Data associated with the component. - The component registration upon which this registration is based. - - - - Called by the container when an instance is required. - - The context in which the instance will be activated. - Parameters for activation. - - - - Called by the container once an instance has been constructed. - - The context in which the instance was activated. - The parameters supplied to the activator. - The instance. - - - - Called by the container once an instance has been fully constructed, including - any requested objects that depend on the instance. - - The context in which the instance was activated. - The parameters supplied to the activator. - The instance. - - - - Describes the component in a human-readable form. - - A description of the component. - - - - Releases unmanaged and - optionally - managed resources - - true to release both managed and unmanaged resources; false to release only unmanaged resources. - - - - The component registration upon which this registration is based. - If this registration was created directly by the user, returns this. - - - - - A unique identifier for this component (shared in all sub-contexts.) - This value also appears in Services. - - - - - The activator used to create instances. - - - - - The lifetime associated with the component. - - - - - Whether the component instances are shared or not. - - - - - Whether the instances of the component should be disposed by the container. - - - - - The services provided by the component. - - - - - Additional data associated with the component. - - - - - Fired when a new instance is required. The instance can be - provided in order to skip the regular activator, by setting the Instance property in - the provided event arguments. - - - - - Fired when a new instance is being activated. The instance can be - wrapped or switched at this time by setting the Instance property in - the provided event arguments. - - - - - Fired when the activation process for a new instance is complete. - - - - - Catch circular dependencies that are triggered by post-resolve processing (e.g. 'OnActivated') - - - - - A strongly-typed resource class, for looking up localized strings, etc. - - - - - Returns the cached ResourceManager instance used by this class. - - - - - Overrides the current thread's CurrentUICulture property for all - resource lookups using this strongly typed resource class. - - - - - Looks up a localized string similar to Circular component dependency detected: {0}.. - - - - - Looks up a localized string similar to Probable circular dependency between factory-scoped components. Chain includes '{0}'. - - - - - A strongly-typed resource class, for looking up localized strings, etc. - - - - - Returns the cached ResourceManager instance used by this class. - - - - - Overrides the current thread's CurrentUICulture property for all - resource lookups using this strongly typed resource class. - - - - - Looks up a localized string similar to Probable circular dependency between factory-scoped components. Chain includes '{0}'. - - - - - Identifies a service according to a type to which it can be assigned. - - - - - Initializes a new instance of the class. - - Type of the service. - - - - Determines whether the specified is equal to the current . - - The to compare with the current . - - true if the specified is equal to the current ; otherwise, false. - - The parameter is null. - - - - Serves as a hash function for a particular type. - - - A hash code for the current . - - - - - Return a new service of the same kind, but carrying - as the . - - The new service type. - A new service with the service type. - - - - Gets the type of the service. - - The type of the service. - - - - Gets a human-readable description of the service. - - The description. - - - - A handy unique service identifier type - all instances will be regarded as unequal. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The id. - - - - Determines whether the specified is equal to the current . - - The to compare with the current . - - true if the specified is equal to the current ; otherwise, false. - - The parameter is null. - - - - Serves as a hash function for a particular type. - - - A hash code for the current . - - - - - Provides a programmer-readable description of the identifying feature of the service. - - - - - - Retrieve registrations for an unregistered service, to be used - by the container. - - The service that was requested. - A function that will return existing registrations for a service. - Registrations providing the service. - - - - Retrieve registrations for an unregistered service, to be used - by the container. - - The service that was requested. - A function that will return existing registrations for a service. - Registrations providing the service. - - - - Generates context-bound closures that represent factories from - a set of heuristics based on delegate type signatures. - - - - - Create a factory generator. - - The service that will be activated in - order to create the products of the factory. - The delegate to provide as a factory. - The parameter mapping mode to use. - - - - Create a factory generator. - - The component that will be activated in - order to create the products of the factory. - The delegate to provide as a factory. - The parameter mapping mode to use. - - - - Generates a factory delegate that closes over the provided context. - - The context in which the factory will be used. - Parameters provided to the resolve call for the factory itself. - A factory delegate that will work within the context. - - - - Generates a factory delegate that closes over the provided context. - - The context in which the factory will be used. - Parameters provided to the resolve call for the factory itself. - A factory delegate that will work within the context. - - - - Generates activators for open generic types. - - - - - Represents a dependency that can be released by the dependent component. - - The service provided by the dependency. - - - Autofac automatically provides instances of whenever the - service is registered. - - - It is not necessary for , or the underlying component, to implement . - Disposing of the object is the correct way to handle cleanup of the dependency, - as this will dispose of any other components created indirectly as well. - - - When is resolved, a new is created for the - underlying , and tagged with the service matching , - generally a . This means that shared instances can be tied to this - scope by registering them as InstancePerMatchingLifetimeScope(new TypedService(typeof(T))). - - - - The component D below is disposable and implements IService: - - public class D : IService, IDisposable - { - // ... - } - - The dependent component C can dispose of the D instance whenever required by taking a dependency on - : - - public class C - { - IService _service; - - public C(Owned<IService> service) - { - _service = service; - } - - void DoWork() - { - _service.Value.DoSomething(); - } - - void OnFinished() - { - _service.Dispose(); - } - } - - In general, rather than depending on directly, components will depend on - System.Func<Owned<T>> in order to create and dispose of other components as required. - - - - - Create an instance of . - - The value representing the instance. - An IDisposable interface through which ownership can be released. - - - - Releases unmanaged and - optionally - managed resources - - true to release both managed and unmanaged resources; false to release only unmanaged resources. - - - - The owned value. - - - - - Generates registrations for services of type whenever the service - T is available. - - - - - Retrieve registrations for an unregistered service, to be used - by the container. - - The service that was requested. - A function that will return existing registrations for a service. - Registrations providing the service. - - - Determines whether the candidate type supports any base or interface that closes the - provided generic service type. - The type that is being checked for the interface. - The open generic type to locate. - True if an interface was found; otherwise false. - - - Returns the first concrete interface supported by the candidate type that - closes the provided open generic service type. - The type that is being checked for the interface. - The open generic type to locate. - The type of the interface. - - - - Looks for an interface on the candidate type that closes the provided open generic interface type. - - The type that is being checked for the interface. - The open generic service type to locate. - True if a closed implementation was found; otherwise false. - - - - A strongly-typed resource class, for looking up localized strings, etc. - - - - - Returns the cached ResourceManager instance used by this class. - - - - - Overrides the current thread's CurrentUICulture property for all - resource lookups using this strongly typed resource class. - - - - - Looks up a localized string similar to The type '{0}' is not an open generic class or interface type.. - - - - - Base class for user-defined modules. Modules can add a set of releated components - to a container () or attach cross-cutting functionality - to other components (. - Modules are given special support in the XML configuration feature - see - http://code.google.com/p/autofac/wiki/StructuringWithModules. - - Provides a user-friendly way to implement - via . - - Defining a module: - - public class DataAccessModule : Module - { - public string ConnectionString { get; set; } - - public override void Load(ContainerBuilder moduleBuilder) - { - moduleBuilder.RegisterGeneric(typeof(MyRepository<>)) - .As(typeof(IRepository<>)) - .InstancePerMatchingLifetimeScope(WebLifetime.Request); - - moduleBuilder.Register(c => new MyDbConnection(ConnectionString)) - .As<IDbConnection>() - .InstancePerMatchingLifetimeScope(WebLifetime.Request); - } - } - - Using the module: - - var builder = new ContainerBuilder(); - builder.RegisterModule(new DataAccessModule { ConnectionString = "..." }); - var container = builder.Build(); - var customers = container.Resolve<IRepository<Customer>>(); - - - - - - Apply the module to the component registry. - - Component registry to apply configuration to. - - - - Override to add registrations to the container. - - - Note that the ContainerBuilder parameter is unique to this module. - - The builder through which components can be - registered. - - - - Override to attach module-specific functionality to a - component registration. - - This method will be called for all existing and future component - registrations - ordering is not important. - The component registry. - The registration to attach functionality to. - - - - Configure the component so that instances are never disposed by the container. - - A registration builder allowing further configuration of the component. - - - - Configure the component so that instances that support IDisposable are - disposed by the container (default.) - - A registration builder allowing further configuration of the component. - - - - Configure the component so that every dependent component or call to Resolve() - gets a new, unique instance (default.) - - A registration builder allowing further configuration of the component. - - - - Configure the component so that every dependent component or call to Resolve() - gets the same, shared instance. - - A registration builder allowing further configuration of the component. - - - - Configure the component so that every dependent component or call to Resolve() - within a single ILifetimeScope gets the same, shared instance. Dependent components in - different lifetime scopes will get different instances. - - A registration builder allowing further configuration of the component. - - - - Configure the component so that every dependent component or call to Resolve() - within a ILifetimeScope tagged with the provided tag value gets the same, shared instance. - Dependent components in lifetime scopes that are children of the tagged scope will - share the parent's instance. If no appropriately tagged scope can be found in the - hierarchy an is thrown. - - Tag applied to matching lifetime scopes. - A registration builder allowing further configuration of the component. - - - - Configure the services that the component will provide. The generic parameter(s) to As() - will be exposed as TypedService instances. - - Service type. - A registration builder allowing further configuration of the component. - - - - Configure the services that the component will provide. The generic parameter(s) to As() - will be exposed as TypedService instances. - - Service type. - Service type. - A registration builder allowing further configuration of the component. - - - - Configure the services that the component will provide. The generic parameter(s) to As() - will be exposed as TypedService instances. - - Service type. - Service type. - Service type. - A registration builder allowing further configuration of the component. - - - - Configure the services that the component will provide. - - Service types to expose. - A registration builder allowing further configuration of the component. - - - - Configure the services that the component will provide. - - Services to expose. - A registration builder allowing further configuration of the component. - - - - Provide a textual name that can be used to retrieve the component. - - Named service to associate with the component. - The service type provided by the component. - A registration builder allowing further configuration of the component. - - - - Provide a textual name that can be used to retrieve the component. - - Named service to associate with the component. - The service type provided by the component. - A registration builder allowing further configuration of the component. - - - - Provide a key that can be used to retrieve the component. - - Key to associate with the component. - The service type provided by the component. - A registration builder allowing further configuration of the component. - - - - Provide a key that can be used to retrieve the component. - - Key to associate with the component. - The service type provided by the component. - A registration builder allowing further configuration of the component. - - - - Add a handler for the Preparing event. This event allows manipulating of the parameters - that will be provided to the component. - - The event handler. - A registration builder allowing further configuration of the component. - - - - Add a handler for the Activating event. - - The event handler. - A registration builder allowing further configuration of the component. - - - - Add a handler for the Activated event. - - The event handler. - A registration builder allowing further configuration of the component. - - - - Configure the component so that any properties whose types are registered in the - container will be wired to instances of the appropriate service. - - A registration builder allowing further configuration of the component. - - - - Configure the component so that any properties whose types are registered in the - container will be wired to instances of the appropriate service. - - If set to true, the properties won't be wired until - after the component has been activated. This allows property-property and constructor-property - circularities in the dependency graph. - A registration builder allowing further configuration of the component. - - - - Associates data with the component. - - Key by which the data can be located. - The data value. - A registration builder allowing further configuration of the component. - - - - Associates data with the component. - - The extended properties to associate with the component. - A registration builder allowing further configuration of the component. - - - - Associates data with the component. - - A type with properties whose names correspond to the - property names to configure. - A registration builder allowing further configuration of the component. - - - - The activator data. - - - - - The registration style. - - - - - The registration data. - - - - - Data common to all registrations made in the container, both direct (IComponentRegistration) - and dynamic (IRegistrationSource.) - - - - - Construct a RegistrationData instance. - - The default service that will be used if no others - are added. - - - - Add multiple services for the registration, overriding the default. - - The services to add. - If an empty collection is specified, this will still - clear the default service. - - - - Add a service to the registration, overriding the default. - - The service to add. - - - - Copies the contents of another RegistrationData object into this one. - - The data to copy. - When true, the default service - will be changed to that of the other. - - - - Empties the configured services. - - - - - The services explicitly assigned to the component. - - - - - The instance ownership assigned to the component. - - - - - The lifetime assigned to the component. - - - - - The sharing mode assigned to the component. - - - - - Extended properties assigned to the component. - - - - - Handlers for the Preparing event. - - - - - Handlers for the Activating event. - - - - - Handlers for the Activated event. - - - - - Adds registration syntax to the type. - - - - - Add a module to the container. - - The builder to register the module with. - The module to add. - - - - Add a module to the container. - - The builder to register the module with. - The module to add. - - - - Add a component to the container. - - The builder to register the component with. - The component to add. - - - - Add a registration source to the container. - - The builder to register the registration source via. - The registration source to add. - - - - Register an instance as a component. - - The type of the instance. - Container builder. - The instance to register. - Registration builder allowing the registration to be configured. - If no services are explicitly specified for the instance, the - static type will be used as the default service (i.e. *not* instance.GetType()). - - - - Register a component to be created through reflection. - - The type of the component implementation. - Container builder. - Registration builder allowing the registration to be configured. - - - - Register a component to be created through reflection. - - The type of the component implementation. - Container builder. - Registration builder allowing the registration to be configured. - - - - Register a delegate as a component. - - The type of the instance. - Container builder. - The delegate to register. - Registration builder allowing the registration to be configured. - - - - Register a delegate as a component. - - The type of the instance. - Container builder. - The delegate to register. - Registration builder allowing the registration to be configured. - - - - Register an un-parameterised generic type, e.g. Repository<>. - Concrete types will be made as they are requested, e.g. with Resolve<Repository<int>>(). - - Container builder. - The open generic implementation type. - Registration builder allowing the registration to be configured. - - - - Specifies that the component being registered should only be made the default for services - that have not already been registered. - - Registration limit type. - Registration style. - Activator data type. - Registration to set service mapping on. - Registration builder allowing the registration to be configured. - - - - Register the types in an assembly. - - Container builder. - The assemblies from which to register types. - Registration builder allowing the registration to be configured. - - - - Specifies a subset of types to register from a scanned assembly. - - Registration limit type. - Registration style. - Activator data type. - Registration to filter types from. - Predicate that returns true for types to register. - Registration builder allowing the registration to be configured. - - - - Specifies how a type from a scanned assembly is mapped to a service. - - Registration limit type. - Registration style. - Activator data type. - Registration to set service mapping on. - Function mapping types to services. - Registration builder allowing the registration to be configured. - - - - Specifies how a type from a scanned assembly is mapped to a service. - - Registration limit type. - Registration style. - Activator data type. - Registration to set service mapping on. - Function mapping types to services. - Registration builder allowing the registration to be configured. - - - - Specifies how a type from a scanned assembly is mapped to a service. - - Registration limit type. - Registration style. - Activator data type. - Registration to set service mapping on. - Function mapping types to services. - Registration builder allowing the registration to be configured. - - - - Specifies that a type from a scanned assembly provides its own concrete type as a service. - - Registration limit type. - Registration style. - Activator data type. - Registration to set service mapping on. - Registration builder allowing the registration to be configured. - - - - Specify how a type from a scanned assembly provides metadata. - - Registration limit type. - Registration style. - Activator data type. - Registration to set service mapping on. - A function mapping the type to a list of metadata items. - Registration builder allowing the registration to be configured. - - - - Specify how a type from a scanned assembly provides metadata. - - Registration limit type. - Registration style. - Activator data type. - Registration to set service mapping on. - Key of the metadata item. - A function retrieving the value of the item from the component type. - Registration builder allowing the registration to be configured. - - - - Specifies how a type from a scanned assembly is mapped to a service. - - Registration limit type. - Registration style. - Activator data type. - Registration to set service mapping on. - Service type provided by the component. - Function mapping types to service names. - Registration builder allowing the registration to be configured. - - - - Specifies that a type from a scanned assembly is registered as providing all of its - implemented interfaces. - - Registration limit type. - Registration style. - Activator data type. - Registration to set service mapping on. - Registration builder allowing the registration to be configured. - - - - Set the policy used to find candidate constructors on the implementation type. - - Registration limit type. - Activator data type. - Registration style. - Registration to set policy on. - Binding flags used when searching for constructors. - A registration builder allowing further configuration of the component. - - - - Set the policy used to find candidate constructors on the implementation type. - - Registration limit type. - Activator data type. - Registration style. - Registration to set policy on. - Policy to be used when searching for constructors. - A registration builder allowing further configuration of the component. - - - - Set the policy used to select from available constructors on the implementation type. - - Registration limit type. - Activator data type. - Registration style. - Registration to set policy on. - Constructor signature to match. - A registration builder allowing further configuration of the component. - - - - Set the policy used to select from available constructors on the implementation type. - - Registration limit type. - Registration style. - Activator data type. - Registration to set policy on. - Policy to be used when selecting a constructor. - A registration builder allowing further configuration of the component. - - - - Configure an explicit value for a constructor parameter. - - Registration limit type. - Registration style. - Activator data type. - Registration to set parameter on. - Name of a constructor parameter on the target type. - Value to supply to the parameter. - A registration builder allowing further configuration of the component. - - - - Configure an explicit value for a constructor parameter. - - Registration limit type. - Registration style. - Activator data type. - Registration to set parameter on. - The parameter to supply to the constructor. - A registration builder allowing further configuration of the component. - - - - Configure explicit values for constructor parameters. - - Registration limit type. - Registration style. - Activator data type. - Registration to set parameter on. - The parameters to supply to the constructor. - A registration builder allowing further configuration of the component. - - - - Configure an explicit value for a property. - - Registration limit type. - Registration style. - Activator data type. - Registration to set property on. - Name of a property on the target type. - Value to supply to the property. - A registration builder allowing further configuration of the component. - - - - Configure an explicit value for a property. - - Registration limit type. - Registration style. - Activator data type. - Registration to set parameter on. - The property to supply. - A registration builder allowing further configuration of the component. - - - - Configure explicit values for properties. - - Registration limit type. - Registration style. - Activator data type. - Registration to set parameter on. - The properties to supply. - A registration builder allowing further configuration of the component. - - - - Sets the target of the registration (used for metadata generation.) - - The type of the limit. - The type of the activator data. - Registration style - Registration to set target for. - The target. - - Registration builder allowing the registration to be configured. - - - - - Provide a handler to be called when the component is registered. - - Registration limit type. - Registration style. - Activator data type. - Registration add handler to. - The handler. - Registration builder allowing the registration to be configured. - - - - Provide a handler to be called when the component is registred. - - Registration limit type. - Registration style. - Registration add handler to. - The handler. - Registration builder allowing the registration to be configured. - - - - Specifies that a type from a scanned assembly is registered if it implements an interface - that closes the provided open generic interface type. - - Registration limit type. - Registration style. - Activator data type. - Registration to set service mapping on. - The open generic interface or base class type for which implementations will be found. - Registration builder allowing the registration to be configured. - - - - Filters the scanned types to include only those assignable to the provided - type. - - Registration limit type. - Registration style. - Activator data type. - Registration to filter types from. - The type or interface which all classes must be assignable from. - Registration builder allowing the registration to be configured. - - - - Filters the scanned types to include only those assignable to the provided - type. - - Registration to filter types from. - The type or interface which all classes must be assignable from. - Registration builder allowing the registration to be configured. - - - - Filters the scanned types to exclude the provided type. - - Registration to filter types from. - The concrete type to exclude. - Registration builder allowing the registration to be configured. - - - - Filters the scanned types to exclude the provided type, providing specific configuration for - the excluded type. - - Registration to filter types from. - Registration for the excepted type. - The concrete type to exclude. - Registration builder allowing the registration to be configured. - - - - Filters the scanned types to include only those in the namespace of the provided type - or one of its sub-namespaces. - - Registration to filter types from. - A type in the target namespace. - Registration builder allowing the registration to be configured. - - - - Filters the scanned types to include only those in the provided namespace - or one of its sub-namespaces. - - Registration limit type. - Registration style. - Activator data type. - Registration to filter types from. - The namespace from which types will be selected. - Registration builder allowing the registration to be configured. - - - - Adapt all components implementing service - to provide using the provided - function. - - Service type to adapt from. - Service type to adapt to. Must not be the - same as . - Container builder. - Function adapting to - service , given the context and parameters. - - - - Adapt all components implementing service - to provide using the provided - function. - - Service type to adapt from. - Service type to adapt to. Must not be the - same as . - Container builder. - Function adapting to - service , given the context. - - - - Adapt all components implementing service - to provide using the provided - function. - - Service type to adapt from. - Service type to adapt to. Must not be the - same as . - Container builder. - Function adapting to - service . - - - - A strongly-typed resource class, for looking up localized strings, etc. - - - - - Returns the cached ResourceManager instance used by this class. - - - - - Overrides the current thread's CurrentUICulture property for all - resource lookups using this strongly typed resource class. - - - - - Looks up a localized string similar to The instance registration '{0}' can support SingleInstance() sharing only.. - - - - - Looks up a localized string similar to No matching constructor exists on type '{0}'.. - - - - - An activator builder with no parameters. - - - - - Return the provided activator. - - The activator to return. - - - - Gets the activator. - - - - - Registration style for individual components. - - - - - The id used for the registration. - - - - - Handlers to notify of the component registration event. - - - - - By default, new registrations override existing registrations as defaults. - If set to true, new registrations will not change existing defaults. - - - - - The component upon which this registration is based. - - - - - Used to build an from component registrations. - - - - var builder = new ContainerBuilder(); - - builder.RegisterType<Logger>() - .As<ILogger>() - .SingleInstance(); - - builder.Register(c => new MessageHandler(c.Resolve<ILogger>())); - - var container = builder.Build(); - // resolve components from container... - - - Most functionality is accessed - via extension methods in . - - - - - - Register a callback that will be invoked when the container is configured. - - This is primarily for extending the builder syntax. - Callback to execute. - - - - Create a new container with the component registrations that have been made. - - - Build can only be called once per - - this prevents ownership issues for provided instances. - Build enables support for the relationship types that come with Autofac (e.g. - Func, Owned, Meta, Lazy, IEnumerable.) To exclude support for these types, - first create the container, then call Update() on the builder. - - A new container with the configured component registrations. - - - - Configure an existing container with the component registrations - that have been made. - - - Update can only be called once per - - this prevents ownership issues for provided instances. - - An existing container to make the registrations in. - - - - Configure an existing registry with the component registrations - that have been made. - - - Update can only be called once per - - this prevents ownership issues for provided instances. - - An existing registry to make the registrations in. - - - - A parameter identified by name. When applied to a reflection-based - component, will be matched against - the name of the component's constructor arguments. When applied to - a delegate-based component, the parameter can be accessed using - . - - - Component with parameter: - - public class MyComponent - { - public MyComponent(int amount) { ... } - } - - Providing the parameter: - - var builder = new ContainerBuilder(); - builder.RegisterType<MyComponent>(); - var container = builder.Build(); - var myComponent = container.Resolve<MyComponent>(new NamedParameter("amount", 123)); - - - - - - Create a with the specified constant value. - - The name of the parameter. - The parameter value. - - - - The name of the parameter. - - - - - Extension methods that simplify extraction of parameter values from - an where T is . - Each method returns the first matching parameter value, or throws an exception if - none is provided. - - - At configuration time, delegate registrations can retrieve parameter values using - the methods , and : - - builder.Register((c, p) => new FtpClient(p.Named<string>("server"))); - - These parameters can be provided at resolution time: - - container.Resolve<FtpClient>(new NamedParameter("server", "ftp.example.com")); - - Alternatively, the parameters can be provided via a Generated Factory - http://code.google.com/p/autofac/wiki/DelegateFactories. - - - - - Retrieve a named parameter value from a instance. - - The type to which the returned value will be cast. - The available parameters to choose from. - The name of the parameter to select. - The value of the selected parameter. - - - - - Retrieve a positional parameter value from a instance. - - The type to which the returned value will be cast. - The available parameters to choose from. - The zero-based position of the parameter to select. - The value of the selected parameter. - The position value is the one associated with the parameter when - it was constructed, not its index into the - sequence. - - - - - Retrieve a typed parameter value from a instance. - - The type to which the returned value will be cast. - The available parameters to choose from. - The value of the selected parameter. - - - - - A parameter that is identified according to an integer representing its - position in an argument list. When applied to a reflection-based - component, will be matched against - the indices of the component's constructor arguments. When applied to - a delegate-based component, the parameter can be accessed using - . - - - Component with parameter: - - public class MyComponent - { - public MyComponent(int amount) { ... } - } - - Providing the parameter: - - var builder = new ContainerBuilder(); - builder.RegisterType<MyComponent>(); - var container = builder.Build(); - var myComponent = container.Resolve<MyComponent>(new PositionalParameter(0, 123)); - - - - - - Construct a positional parameter with the specified constant value. - - The zero-based position of the parameter. - The parameter value. - - - - The zero-based position of the parameter. - - - - - Adds syntactic convenience methods to the interface. - - - - - Set any properties on that can be - resolved in the context. - - Type of instance. Used only to provide method chaining. - The context from which to resolve the service. - The instance to inject properties into. - . - - - - Set any null-valued properties on that can be - resolved by the container. - - Type of instance. Used only to provide method chaining. - The context from which to resolve the service. - The instance to inject properties into. - . - - - - Retrieve a service from the context. - - The type to which the result will be cast. - The context from which to resolve the service. - Identity of the registration providing the service. - - The component instance that provides the service. - - - - - - - Retrieve a service from the context. - - The type to which the result will be cast. - The context from which to resolve the service. - Identity of the registration providing the service. - The parameters. - - The component instance that provides the service. - - - - - - - Retrieve a service from the context. - - The type to which the result will be cast. - The context from which to resolve the service. - Identity of the registration providing the service. - The parameters. - - The component instance that provides the service. - - - - - - - Retrieve a service from the context. - - The type to which the result will be cast. - The context from which to resolve the service. - Name of the service. - - The component instance that provides the service. - - - - - - - Retrieve a service from the context. - - The type to which the result will be cast. - The context from which to resolve the service. - Name of the service. - The parameters. - - The component instance that provides the service. - - - - - - - Retrieve a service from the context. - - The type to which the result will be cast. - The context from which to resolve the service. - Name of the service. - The parameters. - - The component instance that provides the service. - - - - - - - Retrieve a service from the context. - - The type to which the result will be cast. - The context from which to resolve the service. - Key of the service. - - The component instance that provides the service. - - - - - - - Retrieve a service from the context. - - The type to which the result will be cast. - The context from which to resolve the service. - Key of the service. - The parameters. - - The component instance that provides the service. - - - - - - - Retrieve a service from the context. - - The type to which the result will be cast. - The context from which to resolve the service. - Key of the service. - The parameters. - - The component instance that provides the service. - - - - - - - Retrieve a service from the context. - - The service to retrieve. - The context from which to resolve the service. - The component instance that provides the service. - - - - - - Retrieve a service from the context. - - The type to which the result will be cast. - The context from which to resolve the service. - Parameters for the service. - - The component instance that provides the service. - - - - - - - Retrieve a service from the context. - - The type to which the result will be cast. - The context from which to resolve the service. - Parameters for the service. - - The component instance that provides the service. - - - - - - - Retrieve a service from the context. - - The context from which to resolve the service. - The service type. - - The component instance that provides the service. - - - - - - - Retrieve a service from the context. - - The context from which to resolve the service. - Parameters for the service. - The service type. - - The component instance that provides the service. - - - - - - - Retrieve a service from the context. - - The context from which to resolve the service. - Parameters for the service. - The service type. - - The component instance that provides the service. - - - - - - - Retrieve a service from the context. - - The context from which to resolve the service. - The service name. - Type of the service. - - The component instance that provides the service. - - - - - - - Retrieve a service from the context. - - The context from which to resolve the service. - Parameters for the service. - The service name. - Type of the service. - - The component instance that provides the service. - - - - - - - Retrieve a service from the context. - - The context from which to resolve the service. - Parameters for the service. - The service name. - Type of the service. - - The component instance that provides the service. - - - - - - - Retrieve a service from the context. - - The context from which to resolve the service. - The service to resolve. - - The component instance that provides the service. - - - - - - - Retrieve a service from the context. - - The context from which to resolve the service. - Parameters for the service. - The service to resolve. - - The component instance that provides the service. - - - - - - - Retrieve a service from the context. - - The context from which to resolve the service. - Parameters for the service. - The service to resolve. - - The component instance that provides the service. - - - - - - - Retrieve a service from the context, or null if the service is not - registered. - - The context from which to resolve the service. - The service to resolve. - - The component instance that provides the service, or null. - - - - - - Retrieve a service from the context, or null if the service is not - registered. - - The context from which to resolve the service. - Parameters for the service. - The service to resolve. - - The component instance that provides the service, or null. - - - - - - Retrieve a service from the context, or null if the service is not - registered. - - The context from which to resolve the service. - Parameters for the service. - The service to resolve. - - The component instance that provides the service, or null. - - - - - - Retrieve a service from the context, or null if the service is not - registered. - - The context from which to resolve the service. - The name of the service. - The service to resolve. - - The component instance that provides the service, or null. - - - - - - Retrieve a service from the context, or null if the service is not - registered. - - The context from which to resolve the service. - Parameters for the service. - The name of the service. - The service to resolve. - - The component instance that provides the service, or null. - - - - - - Retrieve a service from the context, or null if the service is not - registered. - - The context from which to resolve the service. - Parameters for the service. - The name of the service. - The service to resolve. - - The component instance that provides the service, or null. - - - - - - Retrieve a service from the context, or null if the service is not - registered. - - The context from which to resolve the service. - The type of the service. - - The component instance that provides the service, or null. - - - - - - Retrieve a service from the context, or null if the service is not - registered. - - The context from which to resolve the service. - Parameters for the service. - The type of the service. - - The component instance that provides the service, or null. - - - - - - Retrieve a service from the context, or null if the service is not - registered. - - The context from which to resolve the service. - Parameters for the service. - The type of the service. - - The component instance that provides the service, or null. - - - - - - Retrieve a service from the context, or null if the service is not - registered. - - The context from which to resolve the service. - The service. - - The component instance that provides the service, or null. - - - - - - Retrieve a service from the context, or null if the service is not - registered. - - The context from which to resolve the service. - The service. - Parameters for the service. - - The component instance that provides the service, or null. - - - - - - Retrieve a service from the context, or null if the service is not - registered. - - The context from which to resolve the service. - The service. - Parameters for the service. - - The component instance that provides the service, or null. - - - - - - Determine whether the specified service is available in the context. - - The context from which to resolve the service. - The service to test for the registration of. - True if the service is registered. - - - - Determine whether the specified service is available in the context. - - The context from which to resolve the service. - The service to test for the registration of. - True if the service is registered. - - - - Determine whether the specified service is available in the context. - - The context from which to resolve the service. - The name of the service to test for the registration of. - Type type of the service to test for the registration of. - True if the service is registered. - - - - Determine whether the specified service is available in the context. - - The context from which to resolve the service. - The name of the service to test for the registration of. - Type type of the service to test for the registration of. - True if the service is registered. - - - - Determine whether the specified service is available in the context. - - The context from which to resolve the service. - The service to test for the registration of. - True if the service is registered. - - - - Try to retrieve a service from the context. - - The context from which to resolve the service. - The service to resolve. - The resulting component instance providing the service, or null. - The parameters. - - True if a component providing the service is available. - - - - - - Try to retrieve a service from the context. - - The context from which to resolve the service. - The service to resolve. - The resulting component instance providing the service, or null. - - True if a component providing the service is available. - - - - - - Try to retrieve a service from the context. - - The context from which to resolve the service. - The service type to resolve. - The resulting component instance providing the service, or null. - - True if a component providing the service is available. - - - - - - Try to retrieve a service from the context. - - The service type to resolve. - The context from which to resolve the service. - The resulting component instance providing the service, or default(T). - - True if a component providing the service is available. - - - - - - Try to retrieve a service from the context. - - The context from which to resolve the service. - The name of the service to resolve. - The type of the service to resolve. - The resulting component instance providing the service, or null. - - True if a component providing the service is available. - - - - - - Try to retrieve a service from the context. - - The context from which to resolve the service. - The key of the service to resolve. - The type of the service to resolve. - The resulting component instance providing the service, or null. - - True if a component providing the service is available. - - - - - - Flexible parameter type allows arbitrary values to be retrieved - from the resolution context. - - - - - Create an instance of the ResolvedParameter class. - - A predicate that determines which parameters on a constructor will be supplied by this instance. - A function that supplies the parameter value given the context. - - - - Returns true if the parameter is able to provide a value to a particular site. - - Constructor, method, or property-mutator parameter. - The component context in which the value is being provided. - If the result is true, the valueProvider parameter will - be set to a function that will lazily retrieve the parameter value. If the result is false, - will be set to null. - True if a value can be supplied; otherwise, false. - - - - A parameter that can supply values to sites that exactly - match a specified type. When applied to a reflection-based - component, will be matched against - the types of the component's constructor arguments. When applied to - a delegate-based component, the parameter can be accessed using - . - - - Component with parameter: - - public class MyComponent - { - public MyComponent(int amount) { ... } - } - - Providing the parameter: - - var builder = new ContainerBuilder(); - builder.RegisterType<MyComponent>(); - var container = builder.Build(); - var myComponent = container.Resolve<MyComponent>(new TypedParameter(typeof(int), 123)); - - - - - - Create a typed parameter with the specified constant value. - - The exact type to match. - The parameter value. - - - - Shortcut for creating - by using the - - type to be used for the parameter - The parameter value. - new typed parameter - - - - The type against which targets are matched. - - - - - Helper methods used throughout the codebase. - - - - - Enforce that an argument is not null. Returns the - value if valid so that it can be used inline in - base initialiser syntax. - - - - - - - - - Enforce that sequence does not contain null. Returns the - value if valid so that it can be used inline in - base initialiser syntax. - - - The value. - The name. - - - - - Enforces that the provided object is non-null. - - - The value. - - - - - Enforce that an argument is not null or empty. Returns the - value if valid so that it can be used inline in - base initialiser syntax. - - The value. - The description. - - - - - Enforce that the argument is a delegate type. - - The type to test. - - - - A strongly-typed resource class, for looking up localized strings, etc. - - - - - Returns the cached ResourceManager instance used by this class. - - - - - Overrides the current thread's CurrentUICulture property for all - resource lookups using this strongly typed resource class. - - - - - Looks up a localized string similar to The argument '{0}' cannot be empty.. - - - - - Looks up a localized string similar to The object of type '{0}' cannot be null.. - - - - - Looks up a localized string similar to Type {0} returns void.. - - - - - Looks up a localized string similar to The sequence provided as argument '{0}' cannot contain null elements.. - - - - - Looks up a localized string similar to Type {0} is not a delegate type.. - - - - - Extension methods for reflection-related types. - - - - - Maps from a property-set-value parameter to the declaring property. - - Parameter to the property setter. - The property info on which the setter is specified. - True if the parameter is a property setter. - - - - Get a PropertyInfo object from an expression of the form - x => x.P. - - Type declaring the property. - The type of the property. - Expression mapping an instance of the - declaring type to the property value. - Property info. - - - - A strongly-typed resource class, for looking up localized strings, etc. - - - - - Returns the cached ResourceManager instance used by this class. - - - - - Overrides the current thread's CurrentUICulture property for all - resource lookups using this strongly typed resource class. - - - - - Looks up a localized string similar to The provided expression must be of the form x =>x.P, but the provided expression was {0}.. - - - - - Joins the strings into one single string interspersing the elements with the separator (a-la - System.String.Join()). - - The elements. - The separator. - The joined string. - - - - Appends the item to the specified sequence. - - - The sequence. - The trailing item. - - - - - Prepends the item to the specified sequence. - - - The sequence. - The leading item. - - - - + + + + Autofac + + + + + Reflection activator data for concrete types. + + + + + Builder for reflection-based activators. + + + + + Specify a reflection activator for the given type. + + Type that will be activated. + + + + Get the implementation type. + + + + + The constructor finder for the registration. + + + + + The constructor selector for the registration. + + + + + The explicitly bound constructor parameters. + + + + + The explicitly bound properties. + + + + + Activator data that can provide an IInstanceActivator instance. + + + + + The instance activator based on the provided data. + + + + + Specify a reflection activator for the given type. + + Type that will be activated. + + + + The instance activator based on the provided data. + + + + + Data structure used to construct registrations. + + The most specific type to which instances of the registration + can be cast. + Activator builder type. + Registration style type. + + + + Configure the component so that instances are never disposed by the container. + + A registration builder allowing further configuration of the component. + + + + Configure the component so that instances that support IDisposable are + disposed by the container (default.) + + A registration builder allowing further configuration of the component. + + + + Configure the component so that every dependent component or call to Resolve() + gets a new, unique instance (default.) + + A registration builder allowing further configuration of the component. + + + + Configure the component so that every dependent component or call to Resolve() + gets the same, shared instance. + + A registration builder allowing further configuration of the component. + + + + Configure the component so that every dependent component or call to Resolve() + within a single ILifetimeScope gets the same, shared instance. Dependent components in + different lifetime scopes will get different instances. + + A registration builder allowing further configuration of the component. + + + + Configure the component so that every dependent component or call to Resolve() + within a ILifetimeScope tagged with the provided tag value gets the same, shared instance. + Dependent components in lifetime scopes that are children of the tagged scope will + share the parent's instance. If no appropriately tagged scope can be found in the + hierarchy an is thrown. + + Tag applied to matching lifetime scopes. + A registration builder allowing further configuration of the component. + + + + Configure the services that the component will provide. The generic parameter(s) to As() + will be exposed as TypedService instances. + + Service type. + A registration builder allowing further configuration of the component. + + + + Configure the services that the component will provide. The generic parameter(s) to As() + will be exposed as TypedService instances. + + Service type. + Service type. + A registration builder allowing further configuration of the component. + + + + Configure the services that the component will provide. The generic parameter(s) to As() + will be exposed as TypedService instances. + + Service type. + Service type. + Service type. + A registration builder allowing further configuration of the component. + + + + Configure the services that the component will provide. + + Service types to expose. + A registration builder allowing further configuration of the component. + + + + Configure the services that the component will provide. + + Services to expose. + A registration builder allowing further configuration of the component. + + + + Provide a textual name that can be used to retrieve the component. + + Named service to associate with the component. + The service type provided by the component. + A registration builder allowing further configuration of the component. + + + + Provide a textual name that can be used to retrieve the component. + + Named service to associate with the component. + The service type provided by the component. + A registration builder allowing further configuration of the component. + + + + Provide a key that can be used to retrieve the component. + + Key to associate with the component. + The service type provided by the component. + A registration builder allowing further configuration of the component. + + + + Provide a key that can be used to retrieve the component. + + Key to associate with the component. + The service type provided by the component. + A registration builder allowing further configuration of the component. + + + + Add a handler for the Preparing event. This event allows manipulating of the parameters + that will be provided to the component. + + The event handler. + A registration builder allowing further configuration of the component. + + + + Add a handler for the Activating event. + + The event handler. + A registration builder allowing further configuration of the component. + + + + Add a handler for the Activated event. + + The event handler. + A registration builder allowing further configuration of the component. + + + + Configure the component so that any properties whose types are registered in the + container will be wired to instances of the appropriate service. + + A registration builder allowing further configuration of the component. + + + + Configure the component so that any properties whose types are registered in the + container will be wired to instances of the appropriate service. + + If set to true, the properties won't be wired until + after the component has been activated. This allows property-property and constructor-property + circularities in the dependency graph. + A registration builder allowing further configuration of the component. + + + + Associates data with the component. + + Key by which the data can be located. + The data value. + A registration builder allowing further configuration of the component. + + + + Associates data with the component. + + The extended properties to associate with the component. + A registration builder allowing further configuration of the component. + + + + Associates data with the component. + + A type with properties whose names correspond to the + property names to configure. + A registration builder allowing further configuration of the component. + + + + The activator data. + + + + + The registration style. + + + + + The registration data. + + + + + Used with the WithMetadata configuration method to + associate key-value pairs with an . + + Interface with properties whose names correspond to + the property keys. + This feature was suggested by OJ Reeves (@TheColonial). + + + + Set one of the property values. + + The type of the property. + An expression that accesses the property to set. + The property value to set. + + + + Static factory methods to simplify the creation and handling of IRegistrationBuilder{L,A,R}. + + + To create an for a specific type, use: + + var cr = RegistrationBuilder.ForType(t).CreateRegistration(); + + The full builder syntax is supported: + + var cr = RegistrationBuilder.ForType(t).Named("foo").ExternallyOwned().CreateRegistration(); + + + + + + Creates a registration builder for the provided delegate. + + Instance type returned by delegate. + Delegate to register. + A registration builder. + + + + Creates a registration builder for the provided delegate. + + Delegate to register. + Most specific type return value of delegate can be cast to. + A registration builder. + + + + Creates a registration builder for the provided type. + + Implementation type to register. + A registration builder. + + + + Creates a registration builder for the provided type. + + Implementation type to register. + A registration builder. + + + + Create an from a . + (There is no need to call + this method when registering components through a .) + + + When called on the result of one of the methods, + the returned registration will be different from the one the builder itself registers + in the container. + + + + var registration = RegistrationBuilder.ForType<Foo>().CreateRegistration(); + + + + + + The registration builder. + An IComponentRegistration. + + + + Create an IComponentRegistration from data. + + Id of the registration. + Registration data. + Activator. + Services provided by the registration. + An IComponentRegistration. + + + + Create an IComponentRegistration from data. + + Id of the registration. + Registration data. + Activator. + Services provided by the registration. + Optional; target registration. + An IComponentRegistration. + + + + Register a component in the component registry. This helper method is necessary + in order to execute OnRegistered hooks and respect PreserveDefaults. + + Hoping to refactor this out. + + + + Component registry to make registration in. + Registration builder with data for new registration. + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to The type '{0}' is not assignable to service '{1}'.. + + + + + Adds registration syntax for less commonly-used features. + + + These features are in this namespace because they will remain accessible to + applications originally written against Autofac 1.4. In Autofac 2, this functionality + is implicitly provided and thus making explicit registrations is rarely necessary. + + + + + Registers a factory delegate. + + Container builder. + Factory type to generate. + Registration builder allowing the registration to be configured. + Factory delegates are provided automatically in Autofac 2, + and this method is generally not required. + + + + Registers a factory delegate. + + Container builder. + Factory type to generate. + The service that the delegate will return instances of. + Registration builder allowing the registration to be configured. + Factory delegates are provided automatically in Autofac 2, and + this method is generally not required. + + + + Registers a factory delegate. + + The type of the delegate. + Container builder. + The service that the delegate will return instances of. + Registration builder allowing the registration to be configured. + Factory delegates are provided automatically in Autofac 2, + and this method is generally not required. + + + + Registers a factory delegate. + + The type of the delegate. + Container builder. + Registration builder allowing the registration to be configured. + Factory delegates are provided automatically in Autofac 2, + and this method is generally not required. + + + + Changes the parameter mapping mode of the supplied delegate type to match + parameters by name. + + Factory delegate type + Activator data type + Registration style + Registration to change parameter mapping mode of. + Registration builder allowing the registration to be configured. + + + + Changes the parameter mapping mode of the supplied delegate type to match + parameters by position. + + Factory delegate type + Activator data type + Registration style + Registration to change parameter mapping mode of. + Registration builder allowing the registration to be configured. + + + + Changes the parameter mapping mode of the supplied delegate type to match + parameters by type. + + Factory delegate type + Activator data type + Registration style + Registration to change parameter mapping mode of. + Registration builder allowing the registration to be configured. + + + + Registers the type as a collection. If no services or names are specified, the + default services will be IList<T>, ICollection<T>, and IEnumerable<T> + + The type of the collection elements. + Container builder. + A unique name for the collection that can be passed to MemberOf(). + Registration builder allowing the registration to be configured. + Collections are provided automatically in Autofac 2, + and this method is generally not required. + + + + Registers the type as a collection. If no services or names are specified, the + default services will be IList<T>, ICollection<T>, and IEnumerable<T> + + The type of the collection elements. + Container builder. + A unique name for the collection that can be passed to MemberOf(). + Registration builder allowing the registration to be configured. + Collections are provided automatically in Autofac 2, + and this method is generally not required. + + + + Include the element explicitly in a collection configured using RegisterCollection. + + Registration limit type. + Registration style. + Activator data type. + Registration to export. + The collection name, as passed to RegisterCollection. + A registration builder allowing further configuration of the component. + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to A delegate registered to create instances of '{0}' returned null.. + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Bound constructor '{0}'.. + + + + + Looks up a localized string similar to Constructor '{0}' parameter resolution failed at parameter '{1}'.. + + + + + Provides parameters that have a default value, set with an optional parameter + declaration in C# or VB. + + + + + Used in order to provide a value to a constructor parameter or property on an instance + being created by the container. + + + Not all parameters can be applied to all sites. + + + + + Returns true if the parameter is able to provide a value to a particular site. + + Constructor, method, or property-mutator parameter. + The component context in which the value is being provided. + If the result is true, the valueProvider parameter will + be set to a function that will lazily retrieve the parameter value. If the result is false, + will be set to null. + True if a value can be supplied; otherwise, false. + + + + Returns true if the parameter is able to provide a value to a particular site. + + Constructor, method, or property-mutator parameter. + The component context in which the value is being provided. + If the result is true, the valueProvider parameter will + be set to a function that will lazily retrieve the parameter value. If the result is false, + will be set to null. + True if a value can be supplied; otherwise, false. + + + + Fired when the activation process for a new instance is complete. + + + + + The context in which the activation occurred. + + + + + The component providing the instance. + + + + + The paramters provided when resolved. + + + + + The instance that will be used to satisfy the request. + + + + + Fired after the construction of an instance but before that instance + is shared with any other or any members are invoked on it. + + + + + The instance can be replaced if needed, e.g. by an interface proxy. + + The object to use instead of the activated instance. + + + + The context in which the activation occurred. + + + + + The component providing the instance. + + + + + The instance that will be used to satisfy the request. + + + + + The parameters supplied to the activator. + + + + + Interface supported by services that carry type information. + + + + + Return a new service of the same kind, but carrying + as the . + + The new service type. + A new service with the service type. + + + + Gets the type of the service. + + The type of the service. + + + + Identifies a service using a key in addition to its type. + + + + + Services are the lookup keys used to locate component instances. + + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Implements the operator ==. + + The LHS. + The RHS. + The result of the operator. + + + + Implements the operator !=. + + The LHS. + The RHS. + The result of the operator. + + + + Determines whether the specified is equal to the current . + + The to compare with the current . + + true if the specified is equal to the current ; otherwise, false. + + The parameter is null. + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + Gets a human-readable description of the service. + + The description. + + + + Initializes a new instance of the class. + + Key of the service. + Type of the service. + + + + Determines whether the specified is equal to the current . + + The to compare with the current . + + true if the specified is equal to the current ; otherwise, false. + + The parameter is null. + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + Return a new service of the same kind, but carrying + as the . + + The new service type. + A new service with the service type. + + + + Gets or sets the key of the service. + + The key of the service. + + + + Gets the type of the service. + + The type of the service. + + + + Gets a human-readable description of the service. + + The description. + + + + Wraps a component registration, switching its lifetime. + + + + + Base class for disposable objects. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Releases unmanaged and - optionally - managed resources + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Describes a logical component within the container. + + + + + Called by the container when an instance is required. + + The context in which the instance will be activated. + Parameters for activation. These may be modified by the event handler. + + + + Called by the container once an instance has been constructed. + + The context in which the instance was activated. + The parameters supplied to the activator. + The instance. + + + + Called by the container once an instance has been fully constructed, including + any requested objects that depend on the instance. + + The context in which the instance was activated. + The parameters supplied to the activator. + The instance. + + + + A unique identifier for this component (shared in all sub-contexts.) + This value also appears in Services. + + + + + The activator used to create instances. + + + + + The lifetime associated with the component. + + + + + Whether the component instances are shared or not. + + + + + Whether the instances of the component should be disposed by the container. + + + + + The services provided by the component. + + + + + Additional data associated with the component. + + + + + The component registration upon which this registration is based. + + + + + Fired when a new instance is required. The instance can be + provided in order to skip the regular activator, by setting the Instance property in + the provided event arguments. + + + + + Fired when a new instance is being activated. The instance can be + wrapped or switched at this time by setting the Instance property in + the provided event arguments. + + + + + Fired when the activation process for a new instance is complete. + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Activator = {0}, Services = [{1}], Lifetime = {2}, Sharing = {3}, Ownership = {4}. + + + + + Pulls registrations from another component registry. + Excludes most auto-generated registrations - currently has issues with + collection registrations. + + + + + Allows registrations to be made on-the-fly when unregistered + services are requested (lazy registrations.) + + + + + Retrieve registrations for an unregistered service, to be used + by the container. + + The service that was requested. + A function that will return existing registrations for a service. + Registrations providing the service. + + + + Gets whether the registrations provided by this source are 1:1 adapters on top + of other components (I.e. like Meta, Func or Owned.) + + + + + Create an external registry source that draws components from + . + + Component registry to pull registrations from. + + + + Retrieve registrations for an unregistered service, to be used + by the container. + + The service that was requested. + A function that will return existing registrations for a service. + Registrations providing the service. + + + + In this case because the components that are adapted do not come from the same + logical scope, we must return false to avoid duplicating them. + + + + + Switches components with a RootScopeLifetime (singletons) with + decorators exposing MatchingScopeLifetime targeting the specified scope. + + + + + Maps services onto the components that provide them. + + + The component registry provides services directly from components, + and also uses to generate components + on-the-fly or as adapters for other components. A component registry + is normally used through a , and not + directly by application code. + + + + + Provides component registrations according to the services they provide. + + + + + Attempts to find a default registration for the specified service. + + The service to look up. + The default registration for the service. + True if a registration exists. + + + + Determines whether the specified service is registered. + + The service to test. + True if the service is registered. + + + + Register a component. + + The component registration. + + + + Register a component. + + The component registration. + If true, existing defaults for the services provided by the + component will not be changed. + + + + Selects from the available registrations after ensuring that any + dynamic registration sources that may provide + have been invoked. + + The service for which registrations are sought. + Registrations supporting . + + + + Add a registration source that will provide registrations on-the-fly. + + The source to register. + + + + Enumerate the registered components. + + + + + Fired whenever a component is registered - either explicitly or via a + . + + + + + Gets the registration sources that are used by the registry. + + + + + Protects instance variables from concurrent access. + + + + + External registration sources. + + + + + All registrations. + + + + + Keeps track of the status of registered services. + + + + + Releases unmanaged and - optionally - managed resources + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Attempts to find a default registration for the specified service. + + The service to look up. + The default registration for the service. + True if a registration exists. + + + + Determines whether the specified service is registered. + + The service to test. + True if the service is registered. + + + + Register a component. + + The component registration. + + + + Register a component. + + The component registration. + If true, existing defaults for the services provided by the + component will not be changed. + + + + Selects from the available registrations after ensuring that any + dynamic registration sources that may provide + have been invoked. + + The service for which registrations are sought. + Registrations supporting . + + + + Add a registration source that will provide registrations on-the-fly. + + The source to register. + + + + Enumerate the registered components. + + + + + Fired whenever a component is registered - either explicitly or via a + . + + + + + Gets the registration sources that are used by the registry. + + + + + Tracks the services known to the registry. + + + + + Used for bookkeeping so that the same source is not queried twice (may be null.) + + + + + Initializes a new instance of the class. + + The tracked service. + + + + The first time a service is requested, initialization (e.g. reading from sources) + happens. This value will then be set to true. Calling many methods on this type before + initialisation is an error. + + + + + The known implementations. + + + + + True if any implementations are known. + + + + + Describes the basic requirements for generating a lightweight adapter. + + + + + Create an instance of . + + The service that will be adapted from. + The adapter function. + + + + The adapter function. + + + + + The service to be adapted from. + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to The service {0} cannot be both the adapter's from and to parameters - these must differ.. + + + + + Internal implementation of the RegisterCollection/MemberOf-style collection feature. + + + + + Registration style for dynamic registrations. + + + + + Data used to create factory activators. + + + + + Create a new GeneratedFactoryActivatorData + + The type of the factory. + The service used to provide the products of the factory. + + + + Determines how the parameters of the delegate type are passed on + to the generated Resolve() call as Parameter objects. + For Func-based delegates, this defaults to ByType. Otherwise, the + parameters will be mapped by name. + + + + + Activator data that can provide an IInstanceActivator instance. + + + + + Hides standard Object members to make fluent interfaces + easier to read. + Based on blog post by @kzu here: + http://www.clariusconsulting.net/blogs/kzu/archive/2008/03/10/58301.aspx + + + + + Standard System.Object member. + + Standard result. + + + + Standard System.Object member. + + Standard result. + + + + Standard System.Object member. + + Standard result. + + + + Standard System.Object member. + + The other. + Standard result. + + + + Determines how the parameters of the delegate type are passed on + to the generated Resolve() call as Parameter objects. + + + + + Chooses parameter mapping based on the factory type. + For Func-based factories this is equivalent to ByType, for all + others ByName will be used. + + + + + Pass the parameters supplied to the delegate through to the + underlying registration as NamedParameters based on the parameter + names in the delegate type's formal argument list. + + + + + Pass the parameters supplied to the delegate through to the + underlying registration as TypedParameters based on the parameter + types in the delegate type's formal argument list. + + + + + Pass the parameters supplied to the delegate through to the + underlying registration as PositionalParameters based on the parameter + indices in the delegate type's formal argument list. + + + + + Provides components by lookup operations via an index (key) type. + + The type of the index. + The service provided by the indexed components. + + Retrieving a value given a key: + + IIndex<AccountType, IRenderer> accountRenderers = // ... + var renderer = accountRenderers[AccountType.User]; + + + + + + Get the value associated with if any is available. + + The key to look up. + The retrieved value. + True if a value associated with the key exists. + + + + Get the value associated with . + + The value to retrieve. + The associated value. + + + + Support the + types automatically whenever type T is registered with the container. + Metadata values come from the component registration's metadata. + + + + + Provides a value along with a dictionary of metadata describing the value. + + The type of the value. + + + + Create a new instance. + + The value described by the instance. + The metadata describing the value. + + + + The value described by . + + + + + Metadata describing the value. + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to The type {0} is not an open generic type definition.. + + + + + Provides registrations on-the-fly for any concrete type not already registered with + the container. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + A predicate that selects types the source will register. + + + + Retrieve registrations for an unregistered service, to be used + by the container. + + The service that was requested. + A function that will return existing registrations for a service. + Registrations providing the service. + + + + Gets whether the registrations provided by this source are 1:1 adapters on top + of other components (I.e. like Meta, Func or Owned.) + + + + + Activation data for types located by scanning assemblies. + + + + + Create an instance of . + + + + + The filters applied to the types from the scanned assembly. + + + + + Additional actions to be performed on the concrete type registrations. + + + + + Actions to be called once the scanning operation is complete. + + + + + Fired when the activation process for a new instance is complete. + + + + + Initializes a new instance of the class. + + The context. + The component. + The parameters. + The instance. + + + + The context in which the activation occurred. + + + + + The component providing the instance. + + + + + The paramters provided when resolved. + + + + + The instance that will be used to satisfy the request. + + + + + Fired after the construction of an instance but before that instance + is shared with any other or any members are invoked on it. + + + + + Initializes a new instance of the class. + + The context. + The component. + The parameters. + The instance. + + + + The instance can be replaced if needed, e.g. by an interface proxy. + + The object to use instead of the activated instance. + + + + The context in which the activation occurred. + + + + + The component providing the instance. + + + + + The instance that will be used to satisfy the request. + + + The instance can be replaced if needed, e.g. by an interface proxy. + + + + + The parameters supplied to the activator. + + + + + Activate instances using a delegate. + + + + + Base class for instance activators. + + + + + Create an instance activator that will return instances compatible + with . + + Most derived type to which instances can be cast. + + + + Gets a string representation of the activator. + + A string describing the activator. + + + + The most specific type that the component instances are known to be castable to. + + + + + Activates component instances. + + + + + Activate an instance in the provided context. + + Context in which to activate instances. + Parameters to the instance. + The activated instance. + + The context parameter here should probably be ILifetimeScope in order to reveal Disposer, + but will wait until implementing a concrete use case to make the decision + + + + + The most specific type that the component instances are known to be castable to. + + + + + Create a delegate activator. + + The most specific type to which activated instances can be cast. + Activation delegate. + + + + Activate an instance in the provided context. + + Context in which to activate instances. + Parameters to the instance. + The activated instance. + + The context parameter here should probably be ILifetimeScope in order to reveal Disposer, + but will wait until implementing a concrete use case to make the decision + + + + + Provides a pre-constructed instance. + + + + + Provide the specified instance. + + The instance to provide. + + + + Activate an instance in the provided context. + + Context in which to activate instances. + Parameters to the instance. + The activated instance. + + The context parameter here should probably be ILifetimeScope in order to reveal Disposer, + but will wait until implementing a concrete use case to make the decision + + + + + Releases unmanaged and - optionally - managed resources + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Determines whether the activator disposes the instance that it holds. + Necessary because otherwise instances that are never resolved will never be + disposed. + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to The provided instance has already been used in an activation request. Did you combine a provided instance with non-root/single-instance lifetime/sharing?. + + + + + Supplies values based on the target parameter type. + + + + + Returns true if the parameter is able to provide a value to a particular site. + + Constructor, method, or property-mutator parameter. + The component context in which the value is being provided. + If the result is true, the valueProvider parameter will + be set to a function that will lazily retrieve the parameter value. If the result is false, + will be set to null. + True if a value can be supplied; otherwise, false. + + + + Finds constructors based on their binding flags. + + + + + Find suitable constructors from which to select. + + + + + Finds suitable constructors on the target type. + + Type to search for constructors. + Suitable constructors. + + + + Create an instance matching constructors with the supplied binding flags. + + Binding flags to match. + + + + Finds suitable constructors on the target type. + + Type to search for constructors. + Suitable constructors. + + + + Binds a constructor to the parameters that will be used when it is invoked. + + + + + Construct a new ConstructorParameterBinding. + + ConstructorInfo to bind. + Available parameters. + Context in which to construct instance. + + + + Invoke the constructor with the parameter bindings. + + The constructed instance. + + + Returns a System.String that represents the current System.Object. + A System.String that represents the current System.Object. + + + + The constructor on the target type. The actual constructor used + might differ, e.g. if using a dynamic proxy. + + + + + True if the binding is valid. + + + + + Describes the constructor parameter binding. + + + + + Selects the best constructor from a set of available constructors. + + + + + Selects the best constructor from the available constructors. + + Available constructors. + The best constructor. + + + + Selects a constructor based on its signature. + + + + + Match constructors with the provided signature. + + Signature to match. + + + + Selects the best constructor from the available constructors. + + Available constructors. + The best constructor. + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to The required constructor is unavailable.. + + + + + Looks up a localized string similar to More than one constructor matches the selection policy.. + + + + + Selects the constructor with the most parameters. + + + + + Selects the best constructor from the available constructors. + + Available constructors. + The best constructor. + + + + Uses reflection to activate instances of a type. + + + + + Create an activator for the provided type. + + Type to activate. + Constructor finder. + Constructor selector. + Parameters configured explicitly for this instance. + Properties configured explicitly for this instance. + + + + Activate an instance in the provided context. + + Context in which to activate instances. + Parameters to the instance. + The activated instance. + + The context parameter here should probably be ILifetimeScope in order to reveal Disposer, + but will wait until implementing a concrete use case to make the decision + + + + + The constructor finder. + + + + + The constructor selector. + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to No constructors matching the constructor-finding policy can be found on the target type.. + + + + + Looks up a localized string similar to None of the constructors found with policy '{0}' on type '{1}' can be invoked with the available services and parameters:{2}. + + + + + Base class for parameters that provide a constant value. + + + + + Create a constant parameter that will apply to parameters matching + the supplied predicate. + + + + + + + Returns true if the parameter is able to provide a value to a particular site. + + Constructor, method, or property-mutator parameter. + The component context in which the value is being provided. + If the result is true, the valueProvider parameter will + be set to a function that will lazily retrieve the parameter value. If the result is false, + will be set to null. + True if a value can be supplied; otherwise, false. + + + + The value of the parameter. + + + + + Standard container implementation. + + + + + Creates, wires dependencies and manages lifetime for a set of components. + Most instances of are created + by a . + + + + // See ContainerBuilder for the definition of the builder variable + using (var container = builder.Build()) + { + var program = container.Resolve<Program>(); + program.Run(); + } + + + + Most functionality is provided by extension methods + on the inherited interface. + + + + + + + + + An tracks the instantiation of component instances. + It defines a boundary in which instances are shared and configured. + Disposing an will dispose the components that were + resolved through it. + + + + // See IContainer for definition of the container variable + using (var requestScope = container.BeginLifetimeScope()) + { + // Note that handler is resolved from requestScope, not + // from the container: + + var handler = requestScope.Resolve<IRequestHandler>(); + handler.Handle(request); + + // When requestScope is disposed, all resources used in processing + // the request will be released. + } + + + + All long-running applications should resolve components via an + . Choosing the duration of the lifetime is application- + specific. The standard Autofac WCF and ASP.NET/MVC integrations are already configured + to create and release s as appropriate. For example, the + ASP.NET integration will create and release an per HTTP + request. + Most functionality is provided by extension methods + on the inherited interface. + + + + + + + + + + + The context in which a service can be accessed or a component's + dependencies resolved. Disposal of a context will dispose any owned + components. + + + + + Resolve an instance of the provided registration within the context. + + The registration. + Parameters for the instance. + + The component instance. + + + + + + + Associates services with the components that provide them. + + + + + Begin a new nested scope. Component instances created via the new scope + will be disposed along with it. + + A new lifetime scope. + + + + Begin a new nested scope. Component instances created via the new scope + will be disposed along with it. + + The tag applied to the . + A new lifetime scope. + + + + Begin a new nested scope, with additional components available to it. + Component instances created via the new scope + will be disposed along with it. + + + The components registered in the sub-scope will be treated as though they were + registered in the root scope, i.e., SingleInstance() components will live as long + as the root scope. + + Action on a + that adds component registations visible only in the new scope. + A new lifetime scope. + + + + Begin a new nested scope, with additional components available to it. + Component instances created via the new scope + will be disposed along with it. + + + The components registered in the sub-scope will be treated as though they were + registered in the root scope, i.e., SingleInstance() components will live as long + as the root scope. + + The tag applied to the . + Action on a + that adds component registations visible only in the new scope. + A new lifetime scope. + + + + The disposer associated with this . + Component instances can be associated with it manually if required. + + Typical usage does not require interaction with this member- it + is used when extending the container. + + + + The tag applied to the . + + Tags allow a level in the lifetime hierarchy to be identified. + In most applications, tags are not necessary. + + + + + An empty container. + + + + + Create a new container. + + + + + Begin a new sub-scope. Instances created via the sub-scope + will be disposed along with it. + + A new lifetime scope. + + + + Begin a new sub-scope. Instances created via the sub-scope + will be disposed along with it. + + The tag applied to the . + A new lifetime scope. + + + + Begin a new nested scope, with additional components available to it. + Component instances created via the new scope + will be disposed along with it. + + Action on a + that adds component registations visible only in the new scope. + A new lifetime scope. + + + + Begin a new nested scope, with additional components available to it. + Component instances created via the new scope + will be disposed along with it. + + The tag applied to the . + Action on a + that adds component registations visible only in the new scope. + A new lifetime scope. + + + + Resolve an instance of the provided registration within the context. + + The registration. + Parameters for the instance. + + The component instance. + + + + + + + Releases unmanaged and - optionally - managed resources + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Gets the service object of the specified type. + + An object that specifies the type of service object + to get. + + A service object of type .-or- null if there is + no service object of type . + + + + + The disposer associated with this container. Instances can be associated + with it manually if required. + + + + + Tag applied to the lifetime scope. + + The tag applied to this scope and the contexts generated when + it resolves component dependencies. + + + + Associates services with the components that provide them. + + + + + Problem resolving dependencies, e.g. circular references, no callable constructor etc. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner exception. + + + + Initializes a new instance of the class. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + The parameter is null. + The class name is null or is zero (0). + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to A required component could not be created.. + + + + + Maintains a set of objects to dispose, and disposes them in the reverse order + from which they were added when the Disposer is itself disposed. + + + + + Provided on an object that will dispose of other objects when it is + itself disposed. + + + + + Adds an object to the disposer. When the disposer is + disposed, so will the object be. + + The instance. + + + + Contents all implement IDisposable. + + + + + Releases unmanaged and - optionally - managed resources + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Adds an object to the disposer. When the disposer is + disposed, so will the object be. + + The instance. + + + + Locates the lifetime to which instances of a component should be attached. + + + + + Given the most nested scope visible within the resolve operation, find + the scope for the component. + + The most nested visible scope. + The scope for the component. + + + + Represents a set of components and related functionality + packaged together. + + + + + Apply the module to the component registry. + + Component registry to apply configuration to. + + + + Determines when instances supporting IDisposable are disposed. + + + + + The lifetime scope does not dispose the instances. + + + + + The instances are disposed when the lifetime scope is disposed. + + + + + Determines whether instances are shared within a lifetime scope. + + + + + Each request for an instance will return a new object. + + + + + Each request for an instance will return the same object. + + + + + Defines a nested structure of lifetimes. + + + + + Try to retrieve an instance based on a GUID key. If the instance + does not exist, invoke to create it. + + Key to look up. + Creation function. + An instance. + + + + The root of the sharing hierarchy. + + + + + The parent of this node of the hierarchy, or null. + + + + + Attaches the instance's lifetime to the current lifetime scope. + + + + + Given the most nested scope visible within the resolve operation, find + the scope for the component. + + The most nested visible scope. + The scope for the component. + + + + Lifetime scope implementation. + + + + + Protects instance variables from concurrent access. + + + + + The tag applied to root scopes when no other tag is specified. + + + + + Create a lifetime scope for the provided components and nested beneath a parent. + + The tag applied to the . + Components used in the scope. + Parent scope. + + + + Create a root lifetime scope for the provided components. + + The tag applied to the . + Components used in the scope. + + + + Create a root lifetime scope for the provided components. + + Components used in the scope. + + + + Begin a new anonymous sub-scope. Instances created via the sub-scope + will be disposed along with it. + + A new lifetime scope. + + + + Begin a new tagged sub-scope. Instances created via the sub-scope + will be disposed along with it. + + The tag applied to the . + A new lifetime scope. + + + + Begin a new anonymous sub-scope, with additional components available to it. + Component instances created via the new scope + will be disposed along with it. + + Action on a + that adds component registations visible only in the new scope. + A new lifetime scope. + + IContainer cr = // ... + using (var lifetime = cr.BeginLifetimeScope(builder => { + builder.RegisterType<Foo>(); + builder.RegisterType<Bar>().As<IBar>(); }) + { + var foo = lifetime.Resolve<Foo>(); + } + + + + + Begin a new tagged sub-scope, with additional components available to it. + Component instances created via the new scope + will be disposed along with it. + + The tag applied to the . + Action on a + that adds component registations visible only in the new scope. + A new lifetime scope. + + IContainer cr = // ... + using (var lifetime = cr.BeginLifetimeScope("unitOfWork", builder => { + builder.RegisterType<Foo>(); + builder.RegisterType<Bar>().As<IBar>(); }) + { + var foo = lifetime.Resolve<Foo>(); + } + + + + + Resolve an instance of the provided registration within the context. + + The registration. + Parameters for the instance. + + The component instance. + + + + + + + Try to retrieve an instance based on a GUID key. If the instance + does not exist, invoke to create it. + + Key to look up. + Creation function. + An instance. + + + + Releases unmanaged and - optionally - managed resources + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Gets the service object of the specified type. + + An object that specifies the type of service object + to get. + + A service object of type .-or- null if there is + no service object of type . + + + + + The parent of this node of the hierarchy, or null. + + + + + The root of the sharing hierarchy. + + + + + The disposer associated with this container. Instances can be associated + with it manually if required. + + + + + Tag applied to the lifetime scope. + + The tag applied to this scope and the contexts generated when + it resolves component dependencies. + + + + Associates services with the components that provide them. + + + + + Attaches the component's lifetime to scopes matching a supplied expression. + + + + + Match scopes based on the provided expression. + + Expression describing scopes that will match. + + + + Given the most nested scope visible within the resolve operation, find + the scope for the component. + + The most nested visible scope. + The scope for the component. + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to No scope matching the expression '{0}' is visible from the scope in which the instance was requested.. + + + + + Attaches the component's lifetime to the root scope. + + + + + Given the most nested scope visible within the resolve operation, find + the scope for the component. + + The most nested visible scope. + The scope for the component. + + + + A property identified by name. When applied to a reflection-based + component, the name will be matched against property names. + + + + + Create a with the specified constant value. + + The name of the property. + The property value. + + + + The name of the property. + + + + + Identifies a service using a textual name in addition to its type. + + + + + Initializes a new instance of the class. + + Name of the service. + Type of the service. + + + + Determines whether the specified is equal to the current . + + The to compare with the current . + + true if the specified is equal to the current ; otherwise, false. + + The parameter is null. + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + Return a new service of the same kind, but carrying + as the . + + The new service type. + A new service with the service type. + + + + Gets or sets the name of the service. + + The name of the service. + + + + Gets the type of the service. + + The type of the service. + + + + Gets a human-readable description of the service. + + The description. + + + + Fired before the activation process to allow parameters to be changed or an alternative + instance to be provided. + + + + + Initializes a new instance of the class. + + The context. + The component. + The parameters. + + + + The context in which the activation is occurring. + + + + + The component providing the instance being activated. + + + + + The parameters supplied to the activator. + + + + + A service was requested that cannot be provided + by the container. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The service. + + + + Initializes a new instance of the class. + + The service. + The inner exception. + + + + Initializes a new instance of the class. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + The parameter is null. + The class name is null or is zero (0). + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to The requested service '{0}' has not been registered.. + + + + + Information about the ocurrence of a component being registered + with a container. + + + + + Create a new instance with a valid container and component registration. + + The container into which the registration + was made. + The component registration. + + + + The container into which the registration was made. + + + + + The component registration. + + + + + Describes a logical component within the container. + + + + + Create a new component registration. + + Unique identifier for the component. + Activator used to activate instances. + Determines how the component will be associated with its lifetime. + Whether the component is shared within its lifetime scope. + Whether the component instances are disposed at the end of their lifetimes. + Services the component provides. + Data associated with the component. + + + + Create a new component registration. + + Unique identifier for the component. + Activator used to activate instances. + Determines how the component will be associated with its lifetime. + Whether the component is shared within its lifetime scope. + Whether the component instances are disposed at the end of their lifetimes. + Services the component provides. + Data associated with the component. + The component registration upon which this registration is based. + + + + Called by the container when an instance is required. + + The context in which the instance will be activated. + Parameters for activation. + + + + Called by the container once an instance has been constructed. + + The context in which the instance was activated. + The parameters supplied to the activator. + The instance. + + + + Called by the container once an instance has been fully constructed, including + any requested objects that depend on the instance. + + The context in which the instance was activated. + The parameters supplied to the activator. + The instance. + + + + Describes the component in a human-readable form. + + A description of the component. + + + + Releases unmanaged and - optionally - managed resources + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + The component registration upon which this registration is based. + If this registration was created directly by the user, returns this. + + + + + A unique identifier for this component (shared in all sub-contexts.) + This value also appears in Services. + + + + + The activator used to create instances. + + + + + The lifetime associated with the component. + + + + + Whether the component instances are shared or not. + + + + + Whether the instances of the component should be disposed by the container. + + + + + The services provided by the component. + + + + + Additional data associated with the component. + + + + + Fired when a new instance is required. The instance can be + provided in order to skip the regular activator, by setting the Instance property in + the provided event arguments. + + + + + Fired when a new instance is being activated. The instance can be + wrapped or switched at this time by setting the Instance property in + the provided event arguments. + + + + + Fired when the activation process for a new instance is complete. + + + + + Catch circular dependencies that are triggered by post-resolve processing (e.g. 'OnActivated') + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Circular component dependency detected: {0}.. + + + + + Looks up a localized string similar to Probable circular dependency between factory-scoped components. Chain includes '{0}'. + + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Probable circular dependency between factory-scoped components. Chain includes '{0}'. + + + + + Identifies a service according to a type to which it can be assigned. + + + + + Initializes a new instance of the class. + + Type of the service. + + + + Determines whether the specified is equal to the current . + + The to compare with the current . + + true if the specified is equal to the current ; otherwise, false. + + The parameter is null. + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + Return a new service of the same kind, but carrying + as the . + + The new service type. + A new service with the service type. + + + + Gets the type of the service. + + The type of the service. + + + + Gets a human-readable description of the service. + + The description. + + + + A handy unique service identifier type - all instances will be regarded as unequal. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The id. + + + + Determines whether the specified is equal to the current . + + The to compare with the current . + + true if the specified is equal to the current ; otherwise, false. + + The parameter is null. + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + Provides a programmer-readable description of the identifying feature of the service. + + + + + + Retrieve registrations for an unregistered service, to be used + by the container. + + The service that was requested. + A function that will return existing registrations for a service. + Registrations providing the service. + + + + Retrieve registrations for an unregistered service, to be used + by the container. + + The service that was requested. + A function that will return existing registrations for a service. + Registrations providing the service. + + + + Generates context-bound closures that represent factories from + a set of heuristics based on delegate type signatures. + + + + + Create a factory generator. + + The service that will be activated in + order to create the products of the factory. + The delegate to provide as a factory. + The parameter mapping mode to use. + + + + Create a factory generator. + + The component that will be activated in + order to create the products of the factory. + The delegate to provide as a factory. + The parameter mapping mode to use. + + + + Generates a factory delegate that closes over the provided context. + + The context in which the factory will be used. + Parameters provided to the resolve call for the factory itself. + A factory delegate that will work within the context. + + + + Generates a factory delegate that closes over the provided context. + + The context in which the factory will be used. + Parameters provided to the resolve call for the factory itself. + A factory delegate that will work within the context. + + + + Generates activators for open generic types. + + + + + Represents a dependency that can be released by the dependent component. + + The service provided by the dependency. + + + Autofac automatically provides instances of whenever the + service is registered. + + + It is not necessary for , or the underlying component, to implement . + Disposing of the object is the correct way to handle cleanup of the dependency, + as this will dispose of any other components created indirectly as well. + + + When is resolved, a new is created for the + underlying , and tagged with the service matching , + generally a . This means that shared instances can be tied to this + scope by registering them as InstancePerMatchingLifetimeScope(new TypedService(typeof(T))). + + + + The component D below is disposable and implements IService: + + public class D : IService, IDisposable + { + // ... + } + + The dependent component C can dispose of the D instance whenever required by taking a dependency on + : + + public class C + { + IService _service; + + public C(Owned<IService> service) + { + _service = service; + } + + void DoWork() + { + _service.Value.DoSomething(); + } + + void OnFinished() + { + _service.Dispose(); + } + } + + In general, rather than depending on directly, components will depend on + System.Func<Owned<T>> in order to create and dispose of other components as required. + + + + + Create an instance of . + + The value representing the instance. + An IDisposable interface through which ownership can be released. + + + + Releases unmanaged and - optionally - managed resources + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + The owned value. + + + + + Generates registrations for services of type whenever the service + T is available. + + + + + Retrieve registrations for an unregistered service, to be used + by the container. + + The service that was requested. + A function that will return existing registrations for a service. + Registrations providing the service. + + + Determines whether the candidate type supports any base or interface that closes the + provided generic service type. + The type that is being checked for the interface. + The open generic type to locate. + True if an interface was found; otherwise false. + + + Returns the first concrete interface supported by the candidate type that + closes the provided open generic service type. + The type that is being checked for the interface. + The open generic type to locate. + The type of the interface. + + + + Looks for an interface on the candidate type that closes the provided open generic interface type. + + The type that is being checked for the interface. + The open generic service type to locate. + True if a closed implementation was found; otherwise false. + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to The type '{0}' is not an open generic class or interface type.. + + + + + Base class for user-defined modules. Modules can add a set of releated components + to a container () or attach cross-cutting functionality + to other components (. + Modules are given special support in the XML configuration feature - see + http://code.google.com/p/autofac/wiki/StructuringWithModules. + + Provides a user-friendly way to implement + via . + + Defining a module: + + public class DataAccessModule : Module + { + public string ConnectionString { get; set; } + + public override void Load(ContainerBuilder moduleBuilder) + { + moduleBuilder.RegisterGeneric(typeof(MyRepository<>)) + .As(typeof(IRepository<>)) + .InstancePerMatchingLifetimeScope(WebLifetime.Request); + + moduleBuilder.Register(c => new MyDbConnection(ConnectionString)) + .As<IDbConnection>() + .InstancePerMatchingLifetimeScope(WebLifetime.Request); + } + } + + Using the module: + + var builder = new ContainerBuilder(); + builder.RegisterModule(new DataAccessModule { ConnectionString = "..." }); + var container = builder.Build(); + var customers = container.Resolve<IRepository<Customer>>(); + + + + + + Apply the module to the component registry. + + Component registry to apply configuration to. + + + + Override to add registrations to the container. + + + Note that the ContainerBuilder parameter is unique to this module. + + The builder through which components can be + registered. + + + + Override to attach module-specific functionality to a + component registration. + + This method will be called for all existing and future component + registrations - ordering is not important. + The component registry. + The registration to attach functionality to. + + + + Configure the component so that instances are never disposed by the container. + + A registration builder allowing further configuration of the component. + + + + Configure the component so that instances that support IDisposable are + disposed by the container (default.) + + A registration builder allowing further configuration of the component. + + + + Configure the component so that every dependent component or call to Resolve() + gets a new, unique instance (default.) + + A registration builder allowing further configuration of the component. + + + + Configure the component so that every dependent component or call to Resolve() + gets the same, shared instance. + + A registration builder allowing further configuration of the component. + + + + Configure the component so that every dependent component or call to Resolve() + within a single ILifetimeScope gets the same, shared instance. Dependent components in + different lifetime scopes will get different instances. + + A registration builder allowing further configuration of the component. + + + + Configure the component so that every dependent component or call to Resolve() + within a ILifetimeScope tagged with the provided tag value gets the same, shared instance. + Dependent components in lifetime scopes that are children of the tagged scope will + share the parent's instance. If no appropriately tagged scope can be found in the + hierarchy an is thrown. + + Tag applied to matching lifetime scopes. + A registration builder allowing further configuration of the component. + + + + Configure the services that the component will provide. The generic parameter(s) to As() + will be exposed as TypedService instances. + + Service type. + A registration builder allowing further configuration of the component. + + + + Configure the services that the component will provide. The generic parameter(s) to As() + will be exposed as TypedService instances. + + Service type. + Service type. + A registration builder allowing further configuration of the component. + + + + Configure the services that the component will provide. The generic parameter(s) to As() + will be exposed as TypedService instances. + + Service type. + Service type. + Service type. + A registration builder allowing further configuration of the component. + + + + Configure the services that the component will provide. + + Service types to expose. + A registration builder allowing further configuration of the component. + + + + Configure the services that the component will provide. + + Services to expose. + A registration builder allowing further configuration of the component. + + + + Provide a textual name that can be used to retrieve the component. + + Named service to associate with the component. + The service type provided by the component. + A registration builder allowing further configuration of the component. + + + + Provide a textual name that can be used to retrieve the component. + + Named service to associate with the component. + The service type provided by the component. + A registration builder allowing further configuration of the component. + + + + Provide a key that can be used to retrieve the component. + + Key to associate with the component. + The service type provided by the component. + A registration builder allowing further configuration of the component. + + + + Provide a key that can be used to retrieve the component. + + Key to associate with the component. + The service type provided by the component. + A registration builder allowing further configuration of the component. + + + + Add a handler for the Preparing event. This event allows manipulating of the parameters + that will be provided to the component. + + The event handler. + A registration builder allowing further configuration of the component. + + + + Add a handler for the Activating event. + + The event handler. + A registration builder allowing further configuration of the component. + + + + Add a handler for the Activated event. + + The event handler. + A registration builder allowing further configuration of the component. + + + + Configure the component so that any properties whose types are registered in the + container will be wired to instances of the appropriate service. + + A registration builder allowing further configuration of the component. + + + + Configure the component so that any properties whose types are registered in the + container will be wired to instances of the appropriate service. + + If set to true, the properties won't be wired until + after the component has been activated. This allows property-property and constructor-property + circularities in the dependency graph. + A registration builder allowing further configuration of the component. + + + + Associates data with the component. + + Key by which the data can be located. + The data value. + A registration builder allowing further configuration of the component. + + + + Associates data with the component. + + The extended properties to associate with the component. + A registration builder allowing further configuration of the component. + + + + Associates data with the component. + + A type with properties whose names correspond to the + property names to configure. + A registration builder allowing further configuration of the component. + + + + The activator data. + + + + + The registration style. + + + + + The registration data. + + + + + Data common to all registrations made in the container, both direct (IComponentRegistration) + and dynamic (IRegistrationSource.) + + + + + Construct a RegistrationData instance. + + The default service that will be used if no others + are added. + + + + Add multiple services for the registration, overriding the default. + + The services to add. + If an empty collection is specified, this will still + clear the default service. + + + + Add a service to the registration, overriding the default. + + The service to add. + + + + Copies the contents of another RegistrationData object into this one. + + The data to copy. + When true, the default service + will be changed to that of the other. + + + + Empties the configured services. + + + + + The services explicitly assigned to the component. + + + + + The instance ownership assigned to the component. + + + + + The lifetime assigned to the component. + + + + + The sharing mode assigned to the component. + + + + + Extended properties assigned to the component. + + + + + Handlers for the Preparing event. + + + + + Handlers for the Activating event. + + + + + Handlers for the Activated event. + + + + + Adds registration syntax to the type. + + + + + Add a module to the container. + + The builder to register the module with. + The module to add. + + + + Add a module to the container. + + The builder to register the module with. + The module to add. + + + + Add a component to the container. + + The builder to register the component with. + The component to add. + + + + Add a registration source to the container. + + The builder to register the registration source via. + The registration source to add. + + + + Register an instance as a component. + + The type of the instance. + Container builder. + The instance to register. + Registration builder allowing the registration to be configured. + If no services are explicitly specified for the instance, the + static type will be used as the default service (i.e. *not* instance.GetType()). + + + + Register a component to be created through reflection. + + The type of the component implementation. + Container builder. + Registration builder allowing the registration to be configured. + + + + Register a component to be created through reflection. + + The type of the component implementation. + Container builder. + Registration builder allowing the registration to be configured. + + + + Register a delegate as a component. + + The type of the instance. + Container builder. + The delegate to register. + Registration builder allowing the registration to be configured. + + + + Register a delegate as a component. + + The type of the instance. + Container builder. + The delegate to register. + Registration builder allowing the registration to be configured. + + + + Register an un-parameterised generic type, e.g. Repository<>. + Concrete types will be made as they are requested, e.g. with Resolve<Repository<int>>(). + + Container builder. + The open generic implementation type. + Registration builder allowing the registration to be configured. + + + + Specifies that the component being registered should only be made the default for services + that have not already been registered. + + Registration limit type. + Registration style. + Activator data type. + Registration to set service mapping on. + Registration builder allowing the registration to be configured. + + + + Register the types in an assembly. + + Container builder. + The assemblies from which to register types. + Registration builder allowing the registration to be configured. + + + + Specifies a subset of types to register from a scanned assembly. + + Registration limit type. + Registration style. + Activator data type. + Registration to filter types from. + Predicate that returns true for types to register. + Registration builder allowing the registration to be configured. + + + + Specifies how a type from a scanned assembly is mapped to a service. + + Registration limit type. + Registration style. + Activator data type. + Registration to set service mapping on. + Function mapping types to services. + Registration builder allowing the registration to be configured. + + + + Specifies how a type from a scanned assembly is mapped to a service. + + Registration limit type. + Registration style. + Activator data type. + Registration to set service mapping on. + Function mapping types to services. + Registration builder allowing the registration to be configured. + + + + Specifies how a type from a scanned assembly is mapped to a service. + + Registration limit type. + Registration style. + Activator data type. + Registration to set service mapping on. + Function mapping types to services. + Registration builder allowing the registration to be configured. + + + + Specifies that a type from a scanned assembly provides its own concrete type as a service. + + Registration limit type. + Registration style. + Activator data type. + Registration to set service mapping on. + Registration builder allowing the registration to be configured. + + + + Specify how a type from a scanned assembly provides metadata. + + Registration limit type. + Registration style. + Activator data type. + Registration to set service mapping on. + A function mapping the type to a list of metadata items. + Registration builder allowing the registration to be configured. + + + + Specify how a type from a scanned assembly provides metadata. + + Registration limit type. + Registration style. + Activator data type. + Registration to set service mapping on. + Key of the metadata item. + A function retrieving the value of the item from the component type. + Registration builder allowing the registration to be configured. + + + + Specifies how a type from a scanned assembly is mapped to a service. + + Registration limit type. + Registration style. + Activator data type. + Registration to set service mapping on. + Service type provided by the component. + Function mapping types to service names. + Registration builder allowing the registration to be configured. + + + + Specifies that a type from a scanned assembly is registered as providing all of its + implemented interfaces. + + Registration limit type. + Registration style. + Activator data type. + Registration to set service mapping on. + Registration builder allowing the registration to be configured. + + + + Set the policy used to find candidate constructors on the implementation type. + + Registration limit type. + Activator data type. + Registration style. + Registration to set policy on. + Binding flags used when searching for constructors. + A registration builder allowing further configuration of the component. + + + + Set the policy used to find candidate constructors on the implementation type. + + Registration limit type. + Activator data type. + Registration style. + Registration to set policy on. + Policy to be used when searching for constructors. + A registration builder allowing further configuration of the component. + + + + Set the policy used to select from available constructors on the implementation type. + + Registration limit type. + Activator data type. + Registration style. + Registration to set policy on. + Constructor signature to match. + A registration builder allowing further configuration of the component. + + + + Set the policy used to select from available constructors on the implementation type. + + Registration limit type. + Registration style. + Activator data type. + Registration to set policy on. + Policy to be used when selecting a constructor. + A registration builder allowing further configuration of the component. + + + + Configure an explicit value for a constructor parameter. + + Registration limit type. + Registration style. + Activator data type. + Registration to set parameter on. + Name of a constructor parameter on the target type. + Value to supply to the parameter. + A registration builder allowing further configuration of the component. + + + + Configure an explicit value for a constructor parameter. + + Registration limit type. + Registration style. + Activator data type. + Registration to set parameter on. + The parameter to supply to the constructor. + A registration builder allowing further configuration of the component. + + + + Configure explicit values for constructor parameters. + + Registration limit type. + Registration style. + Activator data type. + Registration to set parameter on. + The parameters to supply to the constructor. + A registration builder allowing further configuration of the component. + + + + Configure an explicit value for a property. + + Registration limit type. + Registration style. + Activator data type. + Registration to set property on. + Name of a property on the target type. + Value to supply to the property. + A registration builder allowing further configuration of the component. + + + + Configure an explicit value for a property. + + Registration limit type. + Registration style. + Activator data type. + Registration to set parameter on. + The property to supply. + A registration builder allowing further configuration of the component. + + + + Configure explicit values for properties. + + Registration limit type. + Registration style. + Activator data type. + Registration to set parameter on. + The properties to supply. + A registration builder allowing further configuration of the component. + + + + Sets the target of the registration (used for metadata generation.) + + The type of the limit. + The type of the activator data. + Registration style + Registration to set target for. + The target. + + Registration builder allowing the registration to be configured. + + + + + Provide a handler to be called when the component is registered. + + Registration limit type. + Registration style. + Activator data type. + Registration add handler to. + The handler. + Registration builder allowing the registration to be configured. + + + + Provide a handler to be called when the component is registred. + + Registration limit type. + Registration style. + Registration add handler to. + The handler. + Registration builder allowing the registration to be configured. + + + + Specifies that a type from a scanned assembly is registered if it implements an interface + that closes the provided open generic interface type. + + Registration limit type. + Registration style. + Activator data type. + Registration to set service mapping on. + The open generic interface or base class type for which implementations will be found. + Registration builder allowing the registration to be configured. + + + + Filters the scanned types to include only those assignable to the provided + type. + + Registration limit type. + Registration style. + Activator data type. + Registration to filter types from. + The type or interface which all classes must be assignable from. + Registration builder allowing the registration to be configured. + + + + Filters the scanned types to include only those assignable to the provided + type. + + Registration to filter types from. + The type or interface which all classes must be assignable from. + Registration builder allowing the registration to be configured. + + + + Filters the scanned types to exclude the provided type. + + Registration to filter types from. + The concrete type to exclude. + Registration builder allowing the registration to be configured. + + + + Filters the scanned types to exclude the provided type, providing specific configuration for + the excluded type. + + Registration to filter types from. + Registration for the excepted type. + The concrete type to exclude. + Registration builder allowing the registration to be configured. + + + + Filters the scanned types to include only those in the namespace of the provided type + or one of its sub-namespaces. + + Registration to filter types from. + A type in the target namespace. + Registration builder allowing the registration to be configured. + + + + Filters the scanned types to include only those in the provided namespace + or one of its sub-namespaces. + + Registration limit type. + Registration style. + Activator data type. + Registration to filter types from. + The namespace from which types will be selected. + Registration builder allowing the registration to be configured. + + + + Adapt all components implementing service + to provide using the provided + function. + + Service type to adapt from. + Service type to adapt to. Must not be the + same as . + Container builder. + Function adapting to + service , given the context and parameters. + + + + Adapt all components implementing service + to provide using the provided + function. + + Service type to adapt from. + Service type to adapt to. Must not be the + same as . + Container builder. + Function adapting to + service , given the context. + + + + Adapt all components implementing service + to provide using the provided + function. + + Service type to adapt from. + Service type to adapt to. Must not be the + same as . + Container builder. + Function adapting to + service . + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to The instance registration '{0}' can support SingleInstance() sharing only.. + + + + + Looks up a localized string similar to No matching constructor exists on type '{0}'.. + + + + + An activator builder with no parameters. + + + + + Return the provided activator. + + The activator to return. + + + + Gets the activator. + + + + + Registration style for individual components. + + + + + The id used for the registration. + + + + + Handlers to notify of the component registration event. + + + + + By default, new registrations override existing registrations as defaults. + If set to true, new registrations will not change existing defaults. + + + + + The component upon which this registration is based. + + + + + Used to build an from component registrations. + + + + var builder = new ContainerBuilder(); + + builder.RegisterType<Logger>() + .As<ILogger>() + .SingleInstance(); + + builder.Register(c => new MessageHandler(c.Resolve<ILogger>())); + + var container = builder.Build(); + // resolve components from container... + + + Most functionality is accessed + via extension methods in . + + + + + + Register a callback that will be invoked when the container is configured. + + This is primarily for extending the builder syntax. + Callback to execute. + + + + Create a new container with the component registrations that have been made. + + + Build can only be called once per + - this prevents ownership issues for provided instances. + Build enables support for the relationship types that come with Autofac (e.g. + Func, Owned, Meta, Lazy, IEnumerable.) To exclude support for these types, + first create the container, then call Update() on the builder. + + A new container with the configured component registrations. + + + + Configure an existing container with the component registrations + that have been made. + + + Update can only be called once per + - this prevents ownership issues for provided instances. + + An existing container to make the registrations in. + + + + Configure an existing registry with the component registrations + that have been made. + + + Update can only be called once per + - this prevents ownership issues for provided instances. + + An existing registry to make the registrations in. + + + + A parameter identified by name. When applied to a reflection-based + component, will be matched against + the name of the component's constructor arguments. When applied to + a delegate-based component, the parameter can be accessed using + . + + + Component with parameter: + + public class MyComponent + { + public MyComponent(int amount) { ... } + } + + Providing the parameter: + + var builder = new ContainerBuilder(); + builder.RegisterType<MyComponent>(); + var container = builder.Build(); + var myComponent = container.Resolve<MyComponent>(new NamedParameter("amount", 123)); + + + + + + Create a with the specified constant value. + + The name of the parameter. + The parameter value. + + + + The name of the parameter. + + + + + Extension methods that simplify extraction of parameter values from + an where T is . + Each method returns the first matching parameter value, or throws an exception if + none is provided. + + + At configuration time, delegate registrations can retrieve parameter values using + the methods , and : + + builder.Register((c, p) => new FtpClient(p.Named<string>("server"))); + + These parameters can be provided at resolution time: + + container.Resolve<FtpClient>(new NamedParameter("server", "ftp.example.com")); + + Alternatively, the parameters can be provided via a Generated Factory - http://code.google.com/p/autofac/wiki/DelegateFactories. + + + + + Retrieve a named parameter value from a instance. + + The type to which the returned value will be cast. + The available parameters to choose from. + The name of the parameter to select. + The value of the selected parameter. + + + + + Retrieve a positional parameter value from a instance. + + The type to which the returned value will be cast. + The available parameters to choose from. + The zero-based position of the parameter to select. + The value of the selected parameter. + The position value is the one associated with the parameter when + it was constructed, not its index into the + sequence. + + + + + Retrieve a typed parameter value from a instance. + + The type to which the returned value will be cast. + The available parameters to choose from. + The value of the selected parameter. + + + + + A parameter that is identified according to an integer representing its + position in an argument list. When applied to a reflection-based + component, will be matched against + the indices of the component's constructor arguments. When applied to + a delegate-based component, the parameter can be accessed using + . + + + Component with parameter: + + public class MyComponent + { + public MyComponent(int amount) { ... } + } + + Providing the parameter: + + var builder = new ContainerBuilder(); + builder.RegisterType<MyComponent>(); + var container = builder.Build(); + var myComponent = container.Resolve<MyComponent>(new PositionalParameter(0, 123)); + + + + + + Construct a positional parameter with the specified constant value. + + The zero-based position of the parameter. + The parameter value. + + + + The zero-based position of the parameter. + + + + + Adds syntactic convenience methods to the interface. + + + + + Set any properties on that can be + resolved in the context. + + Type of instance. Used only to provide method chaining. + The context from which to resolve the service. + The instance to inject properties into. + . + + + + Set any null-valued properties on that can be + resolved by the container. + + Type of instance. Used only to provide method chaining. + The context from which to resolve the service. + The instance to inject properties into. + . + + + + Retrieve a service from the context. + + The type to which the result will be cast. + The context from which to resolve the service. + Identity of the registration providing the service. + + The component instance that provides the service. + + + + + + + Retrieve a service from the context. + + The type to which the result will be cast. + The context from which to resolve the service. + Identity of the registration providing the service. + The parameters. + + The component instance that provides the service. + + + + + + + Retrieve a service from the context. + + The type to which the result will be cast. + The context from which to resolve the service. + Identity of the registration providing the service. + The parameters. + + The component instance that provides the service. + + + + + + + Retrieve a service from the context. + + The type to which the result will be cast. + The context from which to resolve the service. + Name of the service. + + The component instance that provides the service. + + + + + + + Retrieve a service from the context. + + The type to which the result will be cast. + The context from which to resolve the service. + Name of the service. + The parameters. + + The component instance that provides the service. + + + + + + + Retrieve a service from the context. + + The type to which the result will be cast. + The context from which to resolve the service. + Name of the service. + The parameters. + + The component instance that provides the service. + + + + + + + Retrieve a service from the context. + + The type to which the result will be cast. + The context from which to resolve the service. + Key of the service. + + The component instance that provides the service. + + + + + + + Retrieve a service from the context. + + The type to which the result will be cast. + The context from which to resolve the service. + Key of the service. + The parameters. + + The component instance that provides the service. + + + + + + + Retrieve a service from the context. + + The type to which the result will be cast. + The context from which to resolve the service. + Key of the service. + The parameters. + + The component instance that provides the service. + + + + + + + Retrieve a service from the context. + + The service to retrieve. + The context from which to resolve the service. + The component instance that provides the service. + + + + + + Retrieve a service from the context. + + The type to which the result will be cast. + The context from which to resolve the service. + Parameters for the service. + + The component instance that provides the service. + + + + + + + Retrieve a service from the context. + + The type to which the result will be cast. + The context from which to resolve the service. + Parameters for the service. + + The component instance that provides the service. + + + + + + + Retrieve a service from the context. + + The context from which to resolve the service. + The service type. + + The component instance that provides the service. + + + + + + + Retrieve a service from the context. + + The context from which to resolve the service. + Parameters for the service. + The service type. + + The component instance that provides the service. + + + + + + + Retrieve a service from the context. + + The context from which to resolve the service. + Parameters for the service. + The service type. + + The component instance that provides the service. + + + + + + + Retrieve a service from the context. + + The context from which to resolve the service. + The service name. + Type of the service. + + The component instance that provides the service. + + + + + + + Retrieve a service from the context. + + The context from which to resolve the service. + Parameters for the service. + The service name. + Type of the service. + + The component instance that provides the service. + + + + + + + Retrieve a service from the context. + + The context from which to resolve the service. + Parameters for the service. + The service name. + Type of the service. + + The component instance that provides the service. + + + + + + + Retrieve a service from the context. + + The context from which to resolve the service. + The service to resolve. + + The component instance that provides the service. + + + + + + + Retrieve a service from the context. + + The context from which to resolve the service. + Parameters for the service. + The service to resolve. + + The component instance that provides the service. + + + + + + + Retrieve a service from the context. + + The context from which to resolve the service. + Parameters for the service. + The service to resolve. + + The component instance that provides the service. + + + + + + + Retrieve a service from the context, or null if the service is not + registered. + + The context from which to resolve the service. + The service to resolve. + + The component instance that provides the service, or null. + + + + + + Retrieve a service from the context, or null if the service is not + registered. + + The context from which to resolve the service. + Parameters for the service. + The service to resolve. + + The component instance that provides the service, or null. + + + + + + Retrieve a service from the context, or null if the service is not + registered. + + The context from which to resolve the service. + Parameters for the service. + The service to resolve. + + The component instance that provides the service, or null. + + + + + + Retrieve a service from the context, or null if the service is not + registered. + + The context from which to resolve the service. + The name of the service. + The service to resolve. + + The component instance that provides the service, or null. + + + + + + Retrieve a service from the context, or null if the service is not + registered. + + The context from which to resolve the service. + Parameters for the service. + The name of the service. + The service to resolve. + + The component instance that provides the service, or null. + + + + + + Retrieve a service from the context, or null if the service is not + registered. + + The context from which to resolve the service. + Parameters for the service. + The name of the service. + The service to resolve. + + The component instance that provides the service, or null. + + + + + + Retrieve a service from the context, or null if the service is not + registered. + + The context from which to resolve the service. + The type of the service. + + The component instance that provides the service, or null. + + + + + + Retrieve a service from the context, or null if the service is not + registered. + + The context from which to resolve the service. + Parameters for the service. + The type of the service. + + The component instance that provides the service, or null. + + + + + + Retrieve a service from the context, or null if the service is not + registered. + + The context from which to resolve the service. + Parameters for the service. + The type of the service. + + The component instance that provides the service, or null. + + + + + + Retrieve a service from the context, or null if the service is not + registered. + + The context from which to resolve the service. + The service. + + The component instance that provides the service, or null. + + + + + + Retrieve a service from the context, or null if the service is not + registered. + + The context from which to resolve the service. + The service. + Parameters for the service. + + The component instance that provides the service, or null. + + + + + + Retrieve a service from the context, or null if the service is not + registered. + + The context from which to resolve the service. + The service. + Parameters for the service. + + The component instance that provides the service, or null. + + + + + + Determine whether the specified service is available in the context. + + The context from which to resolve the service. + The service to test for the registration of. + True if the service is registered. + + + + Determine whether the specified service is available in the context. + + The context from which to resolve the service. + The service to test for the registration of. + True if the service is registered. + + + + Determine whether the specified service is available in the context. + + The context from which to resolve the service. + The name of the service to test for the registration of. + Type type of the service to test for the registration of. + True if the service is registered. + + + + Determine whether the specified service is available in the context. + + The context from which to resolve the service. + The name of the service to test for the registration of. + Type type of the service to test for the registration of. + True if the service is registered. + + + + Determine whether the specified service is available in the context. + + The context from which to resolve the service. + The service to test for the registration of. + True if the service is registered. + + + + Try to retrieve a service from the context. + + The context from which to resolve the service. + The service to resolve. + The resulting component instance providing the service, or null. + The parameters. + + True if a component providing the service is available. + + + + + + Try to retrieve a service from the context. + + The context from which to resolve the service. + The service to resolve. + The resulting component instance providing the service, or null. + + True if a component providing the service is available. + + + + + + Try to retrieve a service from the context. + + The context from which to resolve the service. + The service type to resolve. + The resulting component instance providing the service, or null. + + True if a component providing the service is available. + + + + + + Try to retrieve a service from the context. + + The service type to resolve. + The context from which to resolve the service. + The resulting component instance providing the service, or default(T). + + True if a component providing the service is available. + + + + + + Try to retrieve a service from the context. + + The context from which to resolve the service. + The name of the service to resolve. + The type of the service to resolve. + The resulting component instance providing the service, or null. + + True if a component providing the service is available. + + + + + + Try to retrieve a service from the context. + + The context from which to resolve the service. + The key of the service to resolve. + The type of the service to resolve. + The resulting component instance providing the service, or null. + + True if a component providing the service is available. + + + + + + Flexible parameter type allows arbitrary values to be retrieved + from the resolution context. + + + + + Create an instance of the ResolvedParameter class. + + A predicate that determines which parameters on a constructor will be supplied by this instance. + A function that supplies the parameter value given the context. + + + + Returns true if the parameter is able to provide a value to a particular site. + + Constructor, method, or property-mutator parameter. + The component context in which the value is being provided. + If the result is true, the valueProvider parameter will + be set to a function that will lazily retrieve the parameter value. If the result is false, + will be set to null. + True if a value can be supplied; otherwise, false. + + + + A parameter that can supply values to sites that exactly + match a specified type. When applied to a reflection-based + component, will be matched against + the types of the component's constructor arguments. When applied to + a delegate-based component, the parameter can be accessed using + . + + + Component with parameter: + + public class MyComponent + { + public MyComponent(int amount) { ... } + } + + Providing the parameter: + + var builder = new ContainerBuilder(); + builder.RegisterType<MyComponent>(); + var container = builder.Build(); + var myComponent = container.Resolve<MyComponent>(new TypedParameter(typeof(int), 123)); + + + + + + Create a typed parameter with the specified constant value. + + The exact type to match. + The parameter value. + + + + Shortcut for creating + by using the + + type to be used for the parameter + The parameter value. + new typed parameter + + + + The type against which targets are matched. + + + + + Helper methods used throughout the codebase. + + + + + Enforce that an argument is not null. Returns the + value if valid so that it can be used inline in + base initialiser syntax. + + + + + + + + + Enforce that sequence does not contain null. Returns the + value if valid so that it can be used inline in + base initialiser syntax. + + + The value. + The name. + + + + + Enforces that the provided object is non-null. + + + The value. + + + + + Enforce that an argument is not null or empty. Returns the + value if valid so that it can be used inline in + base initialiser syntax. + + The value. + The description. + + + + + Enforce that the argument is a delegate type. + + The type to test. + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to The argument '{0}' cannot be empty.. + + + + + Looks up a localized string similar to The object of type '{0}' cannot be null.. + + + + + Looks up a localized string similar to Type {0} returns void.. + + + + + Looks up a localized string similar to The sequence provided as argument '{0}' cannot contain null elements.. + + + + + Looks up a localized string similar to Type {0} is not a delegate type.. + + + + + Extension methods for reflection-related types. + + + + + Maps from a property-set-value parameter to the declaring property. + + Parameter to the property setter. + The property info on which the setter is specified. + True if the parameter is a property setter. + + + + Get a PropertyInfo object from an expression of the form + x => x.P. + + Type declaring the property. + The type of the property. + Expression mapping an instance of the + declaring type to the property value. + Property info. + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to The provided expression must be of the form x =>x.P, but the provided expression was {0}.. + + + + + Joins the strings into one single string interspersing the elements with the separator (a-la + System.String.Join()). + + The elements. + The separator. + The joined string. + + + + Appends the item to the specified sequence. + + + The sequence. + The trailing item. + + + + + Prepends the item to the specified sequence. + + + The sequence. + The leading item. + + + + diff --git a/lib/Azure/Microsoft.WindowsAzure.CloudDrive.xml b/lib/Azure/Microsoft.WindowsAzure.CloudDrive.xml index eb4b23c3c1c..58a7d5b6755 100644 --- a/lib/Azure/Microsoft.WindowsAzure.CloudDrive.xml +++ b/lib/Azure/Microsoft.WindowsAzure.CloudDrive.xml @@ -1,236 +1,236 @@ - - - - Microsoft.WindowsAzure.CloudDrive - - - - - Defines extension methods for creating Windows Azure drives from storage account credentials. - - - - - Create a new instance of a object from a storage account. - - The name of the storage account where the drive's data - is to be stored. - The path to the page blob where the drive's data - is to be stored. - - - - - Represents a Windows Azure drive. - - - - A Windows Azure drive acts as a local drive mounted on the file system and is accessible - to code running in a role. The data written to a Windows Azure drive is stored in a page blob - defined within the Windows Azure Blob service, and cached on the local file system. Because - data written to the drive is stored in a page blob, the data is maintained across the - lifecycle of the role instance. - - - - - - Creates a new instance of a object. - - A URI that identifies the page blob where the drive's data will be stored. - Credentials for the storage account that will contain the page blob. - - - - Creates an NTFS-formatted Windows Azure drive and its associated page blob. The page blob - is created at the URI specified for this object. - - The size of the drive to create. The minimum size permitted is 16 MB. - - - - Creates a snapshot of the page blob associated with this Windows Azure drive. - - Returns a URI to the newly created snapshot. - - - - Copies the data in this Windows Azure drive to a new page blob. - - The URI of the destination blob. - The copy operation takes place entirely within the Windows Azure Blob service and does not involve the client. - - - - Deletes the Windows Azure drive and its associated page blob. - - - If the page blob behind this Windows Azure drive has associated snapshots, you must - delete the snapshots using the Windows Azure Managed API before deleting the drive. - - - - - Mounts the Windows Azure drive and returns a path to the drive on the local file system. - - The size of the read cache for this mounted drive. Set this - parameter to 0 for unbuffered access to the drive. - The set of for mounting the drive. - The local path to the mounted drive. - - - A Windows Azure drive may be mounted as a writable drive, or as a read-only drive if it is created - from a snapshot of a page blob. - - - Note that before a role instance mounts a drive for the first time, it must initialize the cache - by calling the method. - - - To create a writable drive, create a new instance of the object, specifying - the desired URI for the page blob. Call the method, then call the Mount - method to mount the drive. - - - To create a read-only drive, call the method to create a new snapshot and - return the snapshot's URI, then create a new instance of the object from the snapshot's URI - and mount the drive. - - - When a role instance mounts a writable drive, it acquires an exclusive-write lease on the associated page - blob that it retains as long as the drive is mounted. If the same role instance attempts to mount a drive - with the same URI a second time, the operation is ignored and the Mount method returns the local path to the - existing drive. - - - If a role instance other than the one that has mounted the drive and acquired the lease attempts - to mount a drive with the same URI, the operation fails with a . Only one - instance at a time may mount a writable drive and acquire its lease. Once the drive has been unmounted, another instance may - mount the drive and successfully acquire its lease. - - - If a role instance mounts a read-only drive, there is no associated lease, as snapshots cannot be leased. - Multiple role instances can mount and access the same read-only drive. - - - - - - - Unmounts the drive and releases any lease associated with it. - - - Note that when you unmount a drive, its contents are not deleted. To delete the contents of - a drive, call the method. - - - - - Initializes the read cache for any subsequently mounted drives associated with the role instance. - - The local file system path to the directory containing the cache. - If the directory does not exist, it will be created. - The total cache size, in megabytes. - - - Before you mount a drive, you must call the InitializeCache method to initialize a cache for the drive. - If a role instance attempts to mount a drive before a cache has been initialized, a - is thrown. - - - When a drive is mounted, it stores cache data in the cache defined by the most recent call to InitializeCache. - In other words, if a role instance calls the InitializeCache method a second time with different arguments, - any drives mounted subsequently will store cache data in the newly defined cache. Any previously mounted drives - continue to store cache data in the cache that was defined before those drives were mounted. - - - - - - Returns a mapping of local file system paths for mounted drives to page blob URIs for the current role instance. - - A read-only dictionary that maps local paths to page blob URIs. - - - - Gets the credentials for the storage account where this drive's data is stored. - - - - - Gets the local file system path to the mounted drive. Returns null if no drive is currently mounted. - - - - - Gets the URI of the page blob where this drive's data is stored. - - - - - Defines an exception that may be thrown on operations on Windows Azure drives. - - - - - Initializes a new instance of the class. - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - - The parameter is null. - - - The class name is null or is zero (0). - - - - - Appends a path to a Uri correctly using "/" as separator - - AppendPathToUri(new Uri("http://test.blob.core.windows.net/test", "abc") - => new Uri("http://test.blob.core.windows.net/test/abc") - - AppendPathToUri(new Uri("http://test.blob.core.windows.net/test"), "http://test.blob.core.windows.net/test/abc") - => new Uri("http://test.blob.core.windows.net/test/abc") - - - - - - - - Append a relative path to a URI, handling trailing slashes appropriately. - - - - - - - - - Specifies options for mounting a Windows Azure drive. - - - - - No options specified for mounting the drive. - - - - - Acquires the lease for this instance and forces the drive to be mounted. - - - - - Attempts to fix file system errors. Note may result in loss of data. See remarks. - - - Setting this flag calls chkdsk /F on the mounted drive. - To avoid any potential data-loss it is recommed a snapshot of the drive is taken first before - attempting to fix file system errors. - - - - + + + + Microsoft.WindowsAzure.CloudDrive + + + + + Defines extension methods for creating Windows Azure drives from storage account credentials. + + + + + Create a new instance of a object from a storage account. + + The name of the storage account where the drive's data + is to be stored. + The path to the page blob where the drive's data + is to be stored. + + + + + Represents a Windows Azure drive. + + + + A Windows Azure drive acts as a local drive mounted on the file system and is accessible + to code running in a role. The data written to a Windows Azure drive is stored in a page blob + defined within the Windows Azure Blob service, and cached on the local file system. Because + data written to the drive is stored in a page blob, the data is maintained across the + lifecycle of the role instance. + + + + + + Creates a new instance of a object. + + A URI that identifies the page blob where the drive's data will be stored. + Credentials for the storage account that will contain the page blob. + + + + Creates an NTFS-formatted Windows Azure drive and its associated page blob. The page blob + is created at the URI specified for this object. + + The size of the drive to create. The minimum size permitted is 16 MB. + + + + Creates a snapshot of the page blob associated with this Windows Azure drive. + + Returns a URI to the newly created snapshot. + + + + Copies the data in this Windows Azure drive to a new page blob. + + The URI of the destination blob. + The copy operation takes place entirely within the Windows Azure Blob service and does not involve the client. + + + + Deletes the Windows Azure drive and its associated page blob. + + + If the page blob behind this Windows Azure drive has associated snapshots, you must + delete the snapshots using the Windows Azure Managed API before deleting the drive. + + + + + Mounts the Windows Azure drive and returns a path to the drive on the local file system. + + The size of the read cache for this mounted drive. Set this + parameter to 0 for unbuffered access to the drive. + The set of for mounting the drive. + The local path to the mounted drive. + + + A Windows Azure drive may be mounted as a writable drive, or as a read-only drive if it is created + from a snapshot of a page blob. + + + Note that before a role instance mounts a drive for the first time, it must initialize the cache + by calling the method. + + + To create a writable drive, create a new instance of the object, specifying + the desired URI for the page blob. Call the method, then call the Mount + method to mount the drive. + + + To create a read-only drive, call the method to create a new snapshot and + return the snapshot's URI, then create a new instance of the object from the snapshot's URI + and mount the drive. + + + When a role instance mounts a writable drive, it acquires an exclusive-write lease on the associated page + blob that it retains as long as the drive is mounted. If the same role instance attempts to mount a drive + with the same URI a second time, the operation is ignored and the Mount method returns the local path to the + existing drive. + + + If a role instance other than the one that has mounted the drive and acquired the lease attempts + to mount a drive with the same URI, the operation fails with a . Only one + instance at a time may mount a writable drive and acquire its lease. Once the drive has been unmounted, another instance may + mount the drive and successfully acquire its lease. + + + If a role instance mounts a read-only drive, there is no associated lease, as snapshots cannot be leased. + Multiple role instances can mount and access the same read-only drive. + + + + + + + Unmounts the drive and releases any lease associated with it. + + + Note that when you unmount a drive, its contents are not deleted. To delete the contents of + a drive, call the method. + + + + + Initializes the read cache for any subsequently mounted drives associated with the role instance. + + The local file system path to the directory containing the cache. + If the directory does not exist, it will be created. + The total cache size, in megabytes. + + + Before you mount a drive, you must call the InitializeCache method to initialize a cache for the drive. + If a role instance attempts to mount a drive before a cache has been initialized, a + is thrown. + + + When a drive is mounted, it stores cache data in the cache defined by the most recent call to InitializeCache. + In other words, if a role instance calls the InitializeCache method a second time with different arguments, + any drives mounted subsequently will store cache data in the newly defined cache. Any previously mounted drives + continue to store cache data in the cache that was defined before those drives were mounted. + + + + + + Returns a mapping of local file system paths for mounted drives to page blob URIs for the current role instance. + + A read-only dictionary that maps local paths to page blob URIs. + + + + Gets the credentials for the storage account where this drive's data is stored. + + + + + Gets the local file system path to the mounted drive. Returns null if no drive is currently mounted. + + + + + Gets the URI of the page blob where this drive's data is stored. + + + + + Defines an exception that may be thrown on operations on Windows Azure drives. + + + + + Initializes a new instance of the class. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + + The parameter is null. + + + The class name is null or is zero (0). + + + + + Appends a path to a Uri correctly using "/" as separator + + AppendPathToUri(new Uri("http://test.blob.core.windows.net/test", "abc") + => new Uri("http://test.blob.core.windows.net/test/abc") + + AppendPathToUri(new Uri("http://test.blob.core.windows.net/test"), "http://test.blob.core.windows.net/test/abc") + => new Uri("http://test.blob.core.windows.net/test/abc") + + + + + + + + Append a relative path to a URI, handling trailing slashes appropriately. + + + + + + + + + Specifies options for mounting a Windows Azure drive. + + + + + No options specified for mounting the drive. + + + + + Acquires the lease for this instance and forces the drive to be mounted. + + + + + Attempts to fix file system errors. Note may result in loss of data. See remarks. + + + Setting this flag calls chkdsk /F on the mounted drive. + To avoid any potential data-loss it is recommed a snapshot of the drive is taken first before + attempting to fix file system errors. + + + + diff --git a/lib/Azure/Microsoft.WindowsAzure.Diagnostics.xml b/lib/Azure/Microsoft.WindowsAzure.Diagnostics.xml index ed8cb710498..53c32f0da78 100644 --- a/lib/Azure/Microsoft.WindowsAzure.Diagnostics.xml +++ b/lib/Azure/Microsoft.WindowsAzure.Diagnostics.xml @@ -1,1487 +1,1487 @@ - - - - Microsoft.WindowsAzure.Diagnostics - - - - - Provides extension methods to the class. - - - - - Creates a new instance of the class for the specified deployment. - - A object. - The deployment ID for the current deployment. - A object. - - - - Creates an new instance of the class for the specified deployment, role, - and instance. - - A object. - The deployment ID for the current deployment. - The name of the role in the specified deployment. - The role instance ID. - A object. - - - - Determines if a URI requires path style addressing - - - - - - - Advanced class used to explicitly configure the monitoring agent. - - - - - Creates an inital configuration for the diagnostic monitor. - - - - - Gets or sets the storage account to which logs are transferred. - - - - - Gets or sets the deployment ID of the role instance for which this diagnostic monitor is running. - - - - - Gets or sets the role instance ID. - - - - - Gets or sets the name of the role. - - - - - Gets or sets the name of the local directory where diagnostic monitor state is written. - - - - - Gets or sets the diagnostic monitor tools directory. - - - - - Gets or sets the polling interval for the diagnostic monitor. - - - - - Represents the configuation for performance counter data sources. - - - - - Gets or sets the rate at which to sample the performance counter, rounded up to the nearest second. - - - - - Gets or sets a performance counter specifier using standard Windows counter syntax. - - - See Specifying a Counter Path - for more information on performance counters. - - - - - Class to configure data buffers used to store diagnostic information. - - - - - Gets or sets the interval between scheduled transfers for this data buffer, in minutes. - - - This value is rounded up to the nearest minute. A value of TimeSpan.Zero disables any scheduled - data transfer. - - - - - Gets or sets the maximum amount of file system storage available to the specified data buffer. - - - By default buffer sizes are automatically allocated by Windows Azure. You can set this property - if you need to manage the buffer size explicitly. - - - - - Configuration class for data buffers that contain file-based logs. - - - Represents the configuration for file-based data buffers. - - - - - Gets a list of configured directories for file-based logs. - - - - - Configuation class for data buffers that hold performance counter information. - - - Represents the buffer configuration for performance counters. - - - - - Gets a list of configurations for performance counters that are being collected. - - - - - Configuration class for buffers used to hold information gathered from the Windows event logs. - - - Represents the buffer configuration for Windows event logs. - - - - - Gets a list of configured data sources for Windows event logs. - - - - - Specifies a logging level by which to filter records when performing a scheduled transfer. - - - When this property is set to LogLevel.Undefined, no filter is applied and all logging events at all levels are transferred. - - - - - Represents the configuration for a set of standard fixed data buffers for logging and diagnostic information. - - - - - Gets or sets the interval at which the diagnostic monitor polls for diagnostic configuration changes. - - - - Increasing the rate at which your service polls for configuration changes may affect your - storage costs. For more information, see . - - - Note that the configuration change polling interval cannot be set remotely. - - - - - - Gets or sets the total amount of file system storage allocated for all logging buffers. - - - - - Gets or sets the buffer configuration for basic Windows Azure logs. - - - - - - Gets or sets the buffer configuration for the logs generated by the underlying diagnostics infrastructure. - The diagnostic infrastructure logs are useful for troubleshooting the diagnostics system itself. - - - - - Gets or sets the buffer configuration for performance counter data. - - - - - Gets or sets the buffer configuration for Windows event logs. - - - - - Gets or sets the buffer configuration for file-based logs defined by the developer. - - - - - Represents information about ongoing data transfers from the local logs to a Windows Azure storage account. - - - - - Constructs an OnDemandTransferInfo object from queue messages sent by a diagnostic monitor on completion of an on-demand - transfer. - - The queue message. - An object. - - - - Gets or sets the unique ID for a given transfer request. - - - - - Gets or sets the deployment ID from which the source data is being transferred. - - - - - Gets or sets the name of the role from which the source data is being transferred. - - - - - Gets or sets the ID of the role instance from which the source data is being transferred. - - - - - Gets or sets the name of a queue where a completion message will be enqueued to provide information - about this transfer. - - - If notification of completion is requested, a single message will - be placed in the specified queue to signal completion. - - - - - Enumeration of a standard set of data buffers for logging. - - - - - Basic Windows Azure logs - - - - - Diagnostic infrastructure logs - - - - - Performance counters - - - - - Windows event logs - - - - - File-based logs defined by the developer. - - - IIS logs, Failed Request logs, and application crash dumps are a special case of file-based logs that are automatically - configured for the service. - - - - - Describes the configuration of a directory to which file-based logs are written. - - - IIS logs, Failed Request logs, and application crash dumps are a special case of file-based logs that are automatically - configured for the service. - - - - - Gets or sets the absolute path for the local directory to which file-based logs are being written. - - - - - Gets or sets the name of a container defined in a storage account where the - contents of file-based logs are to be transferred. - - - - A container is a resource defined by the Blob service under which blob data is stored. File-based logs are - copied from the local directory to blobs within this container when a scheduled or on-demand transfer is performed. - - - The Blob service endpoint is determined by the cloud storage account used to initialize the - for the role instance. - - - The directory from which file-based logs are transferred is the directory defined by the property - for this object. - - - - - - Gets or sets the maximum size of the directory defined by the property to which - file-based logs are written. - - - - - Defines a standard set of logging levels. - - - - - Logs all events at all levels. - - - - - Logs a critical alert. - - - - - Logs an error. - - - - - Logs a warning. - - - - - Logs an informational message. - - - - - Logs a verbose message. - - - - - Represents the buffer configuration for basic Windows Azure logs. - - - - - Gets or sets the logging level by which to filter records when performing a scheduled transfer. - - - When this property is set to LogLevel.Undefined, no filter is applied and all logging events at all levels are transferred. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Represents an active instance of a diagnostic monitor. - - - - - Returns the default initial diagnostic monitor configuration for the current role instance. - - A object. - - - Call this method to retrieve the initial configuration for all logging and diagnostic parameters for the current - role instance. Once you retrieve the initial configuration, you can modify configuration parameters and - update the configuration for the current instance. - - - By default, the overall quota for file system storage for all logging buffers is approximately 4 GB. This - storage space is automatically allocated across the various logging buffers in a dynamic fashion. - You can also configure individual buffer quotas if you prefer to manage them yourself. - - - The size of the overall quota for logging buffers is limited by the size of the DiagnosticStore local resource. - To increase the size of the overall quota, first increase the size of the DiagnosticStore resource. - - - - - - Starts a diagnostic monitor. - - The name of a configuration setting that - provides a connection string to a storage account. - - A object. - - - This method starts a diagnostic monitor with the default initial configuration. - Data buffers are written to the storage account indicated by the specified configuration setting. The storage - account may be the well-known development storage account, or a Windows Azure storage account in the cloud. - - - See Configuring Connection Strings for more information - about how to construct a connection string to a storage account. - - - This method also registers for notification of changes to configuration settings. - If the value of the connection string is changed, the diagnostic monitor will be - automatically reconfigured to use the new connection. - - - See Configuring Connection Strings for more information - about how to construct a connection string to a storage account. - - - - - - Starts a diagnostic monitor with a user-defined initial configuration. - - The name of a configuration setting that - provides a connection string to a storage account. - A object that - provides a custom initial configuration. - A object. - - - This method starts a diagnostic monitor with the specified initial configuration. - Data buffers are written to the storage account indicated by the specified configuration setting. The storage - account may be the well-known development storage account, or a Windows Azure storage account in the cloud. - - - This method also registers for notification of changes to configuration settings. - If the value of the connection string is changed, the monitoring agent will be - automatically reconfigured to use the new connection. - - - See Configuring Connection Strings for more information - about how to construct a connection string to a storage account. - - - - - - Starts a diagnostic monitor with a user-defined initial configuration. - - A object. - A object that - provides a custom initial configuration. - - A object. - - - - This method starts a diagnostic monitor with the specified storage account and initial configuration. - Data buffers are written to the specified storage account. - - - This method also registers for notification of changes to configuration settings. - If the value of the connection string is changed, the monitoring agent will be - automatically reconfigured to use the new connection. - - - See Configuring Connection Strings for more information - about how to construct a connection string to a storage account. - - - - - - Updates the storage account information for the current diagnostic monitor. - - A object. - - - - Stops the diagnostic monitor. - - - - - Specifies that the diagnostic monitor may use non-secure (HTTP) connections to - communicate with the storage account. - - - true if [allow insecure remote connections]; otherwise, false. - - - - This property should be set to true only in debugging - scenarios. In a production environment, the default connection used by the diagnostic monitor is secure (HTTPS). - When the diagnostic monitor is configured to use the development storage account, this property is ignored. - - - - - - Gets the local directory where state information for the diagnostic monitor is stored. - - - - - Represents the application crash dumps. - - - - - Enables collection of application crash dumps (mini dumps or full dumps) for this process. - - if set to true [enable full dumps]; if false, collect mini dumps only. - - - When you enable collection of crash dumps with this method, crash dumps are written to the crash dumps - directory (named "CrashDumps") in the default diagnostic store. The default diagnostic store is a local - resource that is automatically configured for the role and is named "DiagnosticStore". - You can retrieve the default diagnostic store by calling the - method. - - - - - - Enables collection of crash dumps (mini dumps or full dumps) for this process to a specified local directory. - - The absolute path to the local directory. - if set to true [enable full dumps]; if false, collect mini dumps only. - - - - Provides a class for managing the configuration of diagnostic monitors remotely. - - - - - Creates a new instance of the class. - - A connection string for a storage account. - The deployment ID. - - - See Configuring Connection Strings for more information - about how to construct a connection string to a storage account. - - - - - - Creates a new instance of the class. - - A object. - The deployment ID. - - - - Lists the set of roles which have successfully started at least one diagnostic monitor. - - A list of role names. - This method does not return a list of all roles in a deployment, but only the roles for which there is currently at least - once instance running a diagnostic monitor. - - - - Returns a list of IDs of active role instances that have a diagnostic monitor running. - - The name of the role. - A list of role instance IDs. - - - - Returns the list of role instance diagnostic managers for the specified role. - - The name of the role. - A list of objects. - - - - Returns the for the specified role instance. - - The name of the role. - The role instance ID. - A object. - - - - Specifies that the deployment diagnostic manager may use non-secure (HTTP) connections to - communicate with the storage account. - - - true if [allow insecure remote connections]; otherwise, false. - - - - This property should be set to true only in debugging - scenarios. In a production environment, the default connection used by the deployment diagnostic manager is secure (HTTPS). - When the deployment diagnostic manager is configured to use the development storage account, this property is ignored. - - - - - - Specifies options for an on-demand transfer. - - - - - Gets or sets the start of the time window for which event data is to be transferred. - - - - - Gets or sets the end of the time window for which event data is to be transferred. - - - - - Gets or sets the filter level for event data that has been logged with level information. - - - If the logging level is set to LogLevel.Undefined, all data is transferred regardless of logging level. - - - - - Gets or sets the name of the queue where transfer completion notification can optionally be sent. - - - - - Class for remotely mananging the configruation and diagnostic data for a given role instnace. - - - - - Initializes a new instance of the class. - - A object. - The deployment ID. - The name of the role. - The role instance ID. - - - - Gets the current diagnostic monitor configuration. - - A object. - - - - Sets the configuration for the diagnostic monitor. - - A object representing the new configuration. - - Setting the current configuration while on-demand transfers are pending results in an error. - - - - - Returns the set of active transfers, with associated transfer information. - - A Dictionary of data buffers and their associated on-demand transfer information. - - - - Begins an on-demand transfer of the specified data buffer. - - The name of the source buffer. - A request ID identifying the transfer. - - - - Begins an on-demand transfer of the specified data buffer. - - The name of the source buffer. - Options for the on-demand transfer. - A request ID identifying the transfer. - - - - Cancel all on-demand transfers that are currently in progress, returning the request ID for each transfer. - - Name of the data buffer. - A list of request IDs for the on-demand transfers that are in progress. - Currently there can be at most one active transfer per data buffer. - - - - Stops an on-demand transfer based on its request ID. - - The request ID. - - A boolean indicating whether the on-demand transfer was stopped. This method - may return false if the there is no active tranfer with the given request ID. - - - - - Specifies that the role instance diagnostic manager may use non-secure (HTTP) connections to - communicate with the storage account. - - - true if [allow insecure remote connections]; otherwise, false. - - - - This property should be set to true only in debugging - scenarios. In a production environment, the default connection used by the role instance diagnostic manager is secure (HTTPS). - When the role instance diagnostic manager is configured to use the development storage account, this property is ignored. - - - - - - Gets the deployment ID of this role instance. - - - - - Gets the name of the role for this role instance. - - - - - Gets the ID of this role instance. - - - - - Represents the trace listener used for basic Windows Azure logs. - - - - - Constructor for the class. - - - - - Releases the unmanaged resources used by the and optionally releases the managed resources. - - true to release both managed and unmanaged resources; false to release only unmanaged resources. - - - - When overridden in a derived class, writes the specified message to the listener you create in the derived class. - - The message to write. - - - - When overridden in a derived class, writes a message to the listener you create in the derived class, followed by a line terminator. - - A message to write. - - - - Writes trace and event information to the listener specific output. - - A object that contains the current process ID, thread ID, and stack trace information. - A name used to identify the output, typically the name of the application that generated the trace event. - One of the values specifying the type of event that has caused the trace. - A numeric identifier for the event. - - - - - - - - Writes trace information, a message, and event information to the listener specific output. - - A object that contains the current process ID, thread ID, and stack trace information. - A name used to identify the output, typically the name of the application that generated the trace event. - One of the values specifying the type of event that has caused the trace. - A numeric identifier for the event. - A message to write. - - - - - - - - Writes trace information, a formatted array of objects and event information to the listener specific output. - - A object that contains the current process ID, thread ID, and stack trace information. - A name used to identify the output, typically the name of the application that generated the trace event. - One of the values specifying the type of event that has caused the trace. - A numeric identifier for the event. - A format string that contains zero or more format items, which correspond to objects in the array. - An object array containing zero or more objects to format. - - - - - - - - Writes trace information, an array of data objects and event information to the listener specific output. - - A object that contains the current process ID, thread ID, and stack trace information. - A name used to identify the output, typically the name of the application that generated the trace event. - One of the values specifying the type of event that has caused the trace. - A numeric identifier for the event. - An array of objects to emit as data. - - - - - - - - Writes trace information, a data object and event information to the listener specific output. - - A object that contains the current process ID, thread ID, and stack trace information. - A name used to identify the output, typically the name of the application that generated the trace event. - One of the values specifying the type of event that has caused the trace. - A numeric identifier for the event. - The trace data to emit. - - - - - - - - Indicates whether the diagnostic monitor trace listener is thread-safe. - - - - + + + + Microsoft.WindowsAzure.Diagnostics + + + + + Provides extension methods to the class. + + + + + Creates a new instance of the class for the specified deployment. + + A object. + The deployment ID for the current deployment. + A object. + + + + Creates an new instance of the class for the specified deployment, role, + and instance. + + A object. + The deployment ID for the current deployment. + The name of the role in the specified deployment. + The role instance ID. + A object. + + + + Determines if a URI requires path style addressing + + + + + + + Advanced class used to explicitly configure the monitoring agent. + + + + + Creates an inital configuration for the diagnostic monitor. + + + + + Gets or sets the storage account to which logs are transferred. + + + + + Gets or sets the deployment ID of the role instance for which this diagnostic monitor is running. + + + + + Gets or sets the role instance ID. + + + + + Gets or sets the name of the role. + + + + + Gets or sets the name of the local directory where diagnostic monitor state is written. + + + + + Gets or sets the diagnostic monitor tools directory. + + + + + Gets or sets the polling interval for the diagnostic monitor. + + + + + Represents the configuation for performance counter data sources. + + + + + Gets or sets the rate at which to sample the performance counter, rounded up to the nearest second. + + + + + Gets or sets a performance counter specifier using standard Windows counter syntax. + + + See Specifying a Counter Path + for more information on performance counters. + + + + + Class to configure data buffers used to store diagnostic information. + + + + + Gets or sets the interval between scheduled transfers for this data buffer, in minutes. + + + This value is rounded up to the nearest minute. A value of TimeSpan.Zero disables any scheduled + data transfer. + + + + + Gets or sets the maximum amount of file system storage available to the specified data buffer. + + + By default buffer sizes are automatically allocated by Windows Azure. You can set this property + if you need to manage the buffer size explicitly. + + + + + Configuration class for data buffers that contain file-based logs. + + + Represents the configuration for file-based data buffers. + + + + + Gets a list of configured directories for file-based logs. + + + + + Configuation class for data buffers that hold performance counter information. + + + Represents the buffer configuration for performance counters. + + + + + Gets a list of configurations for performance counters that are being collected. + + + + + Configuration class for buffers used to hold information gathered from the Windows event logs. + + + Represents the buffer configuration for Windows event logs. + + + + + Gets a list of configured data sources for Windows event logs. + + + + + Specifies a logging level by which to filter records when performing a scheduled transfer. + + + When this property is set to LogLevel.Undefined, no filter is applied and all logging events at all levels are transferred. + + + + + Represents the configuration for a set of standard fixed data buffers for logging and diagnostic information. + + + + + Gets or sets the interval at which the diagnostic monitor polls for diagnostic configuration changes. + + + + Increasing the rate at which your service polls for configuration changes may affect your + storage costs. For more information, see . + + + Note that the configuration change polling interval cannot be set remotely. + + + + + + Gets or sets the total amount of file system storage allocated for all logging buffers. + + + + + Gets or sets the buffer configuration for basic Windows Azure logs. + + + + + + Gets or sets the buffer configuration for the logs generated by the underlying diagnostics infrastructure. + The diagnostic infrastructure logs are useful for troubleshooting the diagnostics system itself. + + + + + Gets or sets the buffer configuration for performance counter data. + + + + + Gets or sets the buffer configuration for Windows event logs. + + + + + Gets or sets the buffer configuration for file-based logs defined by the developer. + + + + + Represents information about ongoing data transfers from the local logs to a Windows Azure storage account. + + + + + Constructs an OnDemandTransferInfo object from queue messages sent by a diagnostic monitor on completion of an on-demand + transfer. + + The queue message. + An object. + + + + Gets or sets the unique ID for a given transfer request. + + + + + Gets or sets the deployment ID from which the source data is being transferred. + + + + + Gets or sets the name of the role from which the source data is being transferred. + + + + + Gets or sets the ID of the role instance from which the source data is being transferred. + + + + + Gets or sets the name of a queue where a completion message will be enqueued to provide information + about this transfer. + + + If notification of completion is requested, a single message will + be placed in the specified queue to signal completion. + + + + + Enumeration of a standard set of data buffers for logging. + + + + + Basic Windows Azure logs + + + + + Diagnostic infrastructure logs + + + + + Performance counters + + + + + Windows event logs + + + + + File-based logs defined by the developer. + + + IIS logs, Failed Request logs, and application crash dumps are a special case of file-based logs that are automatically + configured for the service. + + + + + Describes the configuration of a directory to which file-based logs are written. + + + IIS logs, Failed Request logs, and application crash dumps are a special case of file-based logs that are automatically + configured for the service. + + + + + Gets or sets the absolute path for the local directory to which file-based logs are being written. + + + + + Gets or sets the name of a container defined in a storage account where the + contents of file-based logs are to be transferred. + + + + A container is a resource defined by the Blob service under which blob data is stored. File-based logs are + copied from the local directory to blobs within this container when a scheduled or on-demand transfer is performed. + + + The Blob service endpoint is determined by the cloud storage account used to initialize the + for the role instance. + + + The directory from which file-based logs are transferred is the directory defined by the property + for this object. + + + + + + Gets or sets the maximum size of the directory defined by the property to which + file-based logs are written. + + + + + Defines a standard set of logging levels. + + + + + Logs all events at all levels. + + + + + Logs a critical alert. + + + + + Logs an error. + + + + + Logs a warning. + + + + + Logs an informational message. + + + + + Logs a verbose message. + + + + + Represents the buffer configuration for basic Windows Azure logs. + + + + + Gets or sets the logging level by which to filter records when performing a scheduled transfer. + + + When this property is set to LogLevel.Undefined, no filter is applied and all logging events at all levels are transferred. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Represents an active instance of a diagnostic monitor. + + + + + Returns the default initial diagnostic monitor configuration for the current role instance. + + A object. + + + Call this method to retrieve the initial configuration for all logging and diagnostic parameters for the current + role instance. Once you retrieve the initial configuration, you can modify configuration parameters and + update the configuration for the current instance. + + + By default, the overall quota for file system storage for all logging buffers is approximately 4 GB. This + storage space is automatically allocated across the various logging buffers in a dynamic fashion. + You can also configure individual buffer quotas if you prefer to manage them yourself. + + + The size of the overall quota for logging buffers is limited by the size of the DiagnosticStore local resource. + To increase the size of the overall quota, first increase the size of the DiagnosticStore resource. + + + + + + Starts a diagnostic monitor. + + The name of a configuration setting that + provides a connection string to a storage account. + + A object. + + + This method starts a diagnostic monitor with the default initial configuration. + Data buffers are written to the storage account indicated by the specified configuration setting. The storage + account may be the well-known development storage account, or a Windows Azure storage account in the cloud. + + + See Configuring Connection Strings for more information + about how to construct a connection string to a storage account. + + + This method also registers for notification of changes to configuration settings. + If the value of the connection string is changed, the diagnostic monitor will be + automatically reconfigured to use the new connection. + + + See Configuring Connection Strings for more information + about how to construct a connection string to a storage account. + + + + + + Starts a diagnostic monitor with a user-defined initial configuration. + + The name of a configuration setting that + provides a connection string to a storage account. + A object that + provides a custom initial configuration. + A object. + + + This method starts a diagnostic monitor with the specified initial configuration. + Data buffers are written to the storage account indicated by the specified configuration setting. The storage + account may be the well-known development storage account, or a Windows Azure storage account in the cloud. + + + This method also registers for notification of changes to configuration settings. + If the value of the connection string is changed, the monitoring agent will be + automatically reconfigured to use the new connection. + + + See Configuring Connection Strings for more information + about how to construct a connection string to a storage account. + + + + + + Starts a diagnostic monitor with a user-defined initial configuration. + + A object. + A object that + provides a custom initial configuration. + + A object. + + + + This method starts a diagnostic monitor with the specified storage account and initial configuration. + Data buffers are written to the specified storage account. + + + This method also registers for notification of changes to configuration settings. + If the value of the connection string is changed, the monitoring agent will be + automatically reconfigured to use the new connection. + + + See Configuring Connection Strings for more information + about how to construct a connection string to a storage account. + + + + + + Updates the storage account information for the current diagnostic monitor. + + A object. + + + + Stops the diagnostic monitor. + + + + + Specifies that the diagnostic monitor may use non-secure (HTTP) connections to + communicate with the storage account. + + + true if [allow insecure remote connections]; otherwise, false. + + + + This property should be set to true only in debugging + scenarios. In a production environment, the default connection used by the diagnostic monitor is secure (HTTPS). + When the diagnostic monitor is configured to use the development storage account, this property is ignored. + + + + + + Gets the local directory where state information for the diagnostic monitor is stored. + + + + + Represents the application crash dumps. + + + + + Enables collection of application crash dumps (mini dumps or full dumps) for this process. + + if set to true [enable full dumps]; if false, collect mini dumps only. + + + When you enable collection of crash dumps with this method, crash dumps are written to the crash dumps + directory (named "CrashDumps") in the default diagnostic store. The default diagnostic store is a local + resource that is automatically configured for the role and is named "DiagnosticStore". + You can retrieve the default diagnostic store by calling the + method. + + + + + + Enables collection of crash dumps (mini dumps or full dumps) for this process to a specified local directory. + + The absolute path to the local directory. + if set to true [enable full dumps]; if false, collect mini dumps only. + + + + Provides a class for managing the configuration of diagnostic monitors remotely. + + + + + Creates a new instance of the class. + + A connection string for a storage account. + The deployment ID. + + + See Configuring Connection Strings for more information + about how to construct a connection string to a storage account. + + + + + + Creates a new instance of the class. + + A object. + The deployment ID. + + + + Lists the set of roles which have successfully started at least one diagnostic monitor. + + A list of role names. + This method does not return a list of all roles in a deployment, but only the roles for which there is currently at least + once instance running a diagnostic monitor. + + + + Returns a list of IDs of active role instances that have a diagnostic monitor running. + + The name of the role. + A list of role instance IDs. + + + + Returns the list of role instance diagnostic managers for the specified role. + + The name of the role. + A list of objects. + + + + Returns the for the specified role instance. + + The name of the role. + The role instance ID. + A object. + + + + Specifies that the deployment diagnostic manager may use non-secure (HTTP) connections to + communicate with the storage account. + + + true if [allow insecure remote connections]; otherwise, false. + + + + This property should be set to true only in debugging + scenarios. In a production environment, the default connection used by the deployment diagnostic manager is secure (HTTPS). + When the deployment diagnostic manager is configured to use the development storage account, this property is ignored. + + + + + + Specifies options for an on-demand transfer. + + + + + Gets or sets the start of the time window for which event data is to be transferred. + + + + + Gets or sets the end of the time window for which event data is to be transferred. + + + + + Gets or sets the filter level for event data that has been logged with level information. + + + If the logging level is set to LogLevel.Undefined, all data is transferred regardless of logging level. + + + + + Gets or sets the name of the queue where transfer completion notification can optionally be sent. + + + + + Class for remotely mananging the configruation and diagnostic data for a given role instnace. + + + + + Initializes a new instance of the class. + + A object. + The deployment ID. + The name of the role. + The role instance ID. + + + + Gets the current diagnostic monitor configuration. + + A object. + + + + Sets the configuration for the diagnostic monitor. + + A object representing the new configuration. + + Setting the current configuration while on-demand transfers are pending results in an error. + + + + + Returns the set of active transfers, with associated transfer information. + + A Dictionary of data buffers and their associated on-demand transfer information. + + + + Begins an on-demand transfer of the specified data buffer. + + The name of the source buffer. + A request ID identifying the transfer. + + + + Begins an on-demand transfer of the specified data buffer. + + The name of the source buffer. + Options for the on-demand transfer. + A request ID identifying the transfer. + + + + Cancel all on-demand transfers that are currently in progress, returning the request ID for each transfer. + + Name of the data buffer. + A list of request IDs for the on-demand transfers that are in progress. + Currently there can be at most one active transfer per data buffer. + + + + Stops an on-demand transfer based on its request ID. + + The request ID. + + A boolean indicating whether the on-demand transfer was stopped. This method + may return false if the there is no active tranfer with the given request ID. + + + + + Specifies that the role instance diagnostic manager may use non-secure (HTTP) connections to + communicate with the storage account. + + + true if [allow insecure remote connections]; otherwise, false. + + + + This property should be set to true only in debugging + scenarios. In a production environment, the default connection used by the role instance diagnostic manager is secure (HTTPS). + When the role instance diagnostic manager is configured to use the development storage account, this property is ignored. + + + + + + Gets the deployment ID of this role instance. + + + + + Gets the name of the role for this role instance. + + + + + Gets the ID of this role instance. + + + + + Represents the trace listener used for basic Windows Azure logs. + + + + + Constructor for the class. + + + + + Releases the unmanaged resources used by the and optionally releases the managed resources. + + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + When overridden in a derived class, writes the specified message to the listener you create in the derived class. + + The message to write. + + + + When overridden in a derived class, writes a message to the listener you create in the derived class, followed by a line terminator. + + A message to write. + + + + Writes trace and event information to the listener specific output. + + A object that contains the current process ID, thread ID, and stack trace information. + A name used to identify the output, typically the name of the application that generated the trace event. + One of the values specifying the type of event that has caused the trace. + A numeric identifier for the event. + + + + + + + + Writes trace information, a message, and event information to the listener specific output. + + A object that contains the current process ID, thread ID, and stack trace information. + A name used to identify the output, typically the name of the application that generated the trace event. + One of the values specifying the type of event that has caused the trace. + A numeric identifier for the event. + A message to write. + + + + + + + + Writes trace information, a formatted array of objects and event information to the listener specific output. + + A object that contains the current process ID, thread ID, and stack trace information. + A name used to identify the output, typically the name of the application that generated the trace event. + One of the values specifying the type of event that has caused the trace. + A numeric identifier for the event. + A format string that contains zero or more format items, which correspond to objects in the array. + An object array containing zero or more objects to format. + + + + + + + + Writes trace information, an array of data objects and event information to the listener specific output. + + A object that contains the current process ID, thread ID, and stack trace information. + A name used to identify the output, typically the name of the application that generated the trace event. + One of the values specifying the type of event that has caused the trace. + A numeric identifier for the event. + An array of objects to emit as data. + + + + + + + + Writes trace information, a data object and event information to the listener specific output. + + A object that contains the current process ID, thread ID, and stack trace information. + A name used to identify the output, typically the name of the application that generated the trace event. + One of the values specifying the type of event that has caused the trace. + A numeric identifier for the event. + The trace data to emit. + + + + + + + + Indicates whether the diagnostic monitor trace listener is thread-safe. + + + + diff --git a/lib/Azure/Microsoft.WindowsAzure.ServiceRuntime.xml b/lib/Azure/Microsoft.WindowsAzure.ServiceRuntime.xml index 64a3ce77962..19bb8d3f47f 100644 --- a/lib/Azure/Microsoft.WindowsAzure.ServiceRuntime.xml +++ b/lib/Azure/Microsoft.WindowsAzure.ServiceRuntime.xml @@ -1,725 +1,725 @@ - - - - Microsoft.WindowsAzure.ServiceRuntime - - - - - Undocumented - - - - - Undocumented - - - - - Undocumented - - - - - Undocumented - - - - - Undocumented - - - - - Represents the Windows Azure environment in which an instance of a role is running. - - - - - Retrieves the value of a setting in the service configuration file. - - The name of the configuration setting. - A String containing the value of the configuration setting. - - A role's configuration settings are defined in the service definition file. Values for configuration settings - are set in the service configuration file. - - - - - Populates the role information. - - - - - Reads the static role data. - - - Note that instance-level information is not populated. - - - - - - Requests that the current role instance be stopped and restarted. - - - - Before the role instance is recycled, the Windows Azure load balancer takes the role instance out of rotation. - This ensures that no new requests are routed to the instance while it is restarting. - - - A call to RequestRecycle initiates the normal shutdown cycle. Windows Azure raises the event - and calls the method so that you can - execute the necessary code to prepare the instance to be recycled. - - - - - - Static method called by the loader to initialize the runtime singelton element and start a role. - - - - - Initializes the role. - - - Called from the RoleRuntimeBridge. - - - - - Initializes the Role. - - - - - Starts the role. - - - Called from the RoleRuntimeBridge. - - - - - Stops the role. - - - - - Creates the entrypoint instance. - - - The type is discovered with the entrypoint assembly. The assembly information - is conveyed by the SDK using a file called __entrypoint.txt. - - - - - - - Retrieves a named local storage resource. - - The name of the local resource, as declared in the service definiton file. - A object that represents the local storage resource. - - - - Occurs before a change to the service configuration is applied to the running instances of the role. - - - - Service configuration changes are applied on-the-fly to running role instances. Configuration changes include - changes to the service configuration changes and changes to the number of instances in the service. - - - This event occurs after the new configuration file has been submitted to Windows Azure but - before the changes have been applied to each running role instance. This event can be cancelled - for a given instance to prevent the configuration change. - - - Note that cancelling this event causes the instance to be automatically recycled. When the instance is recycled, - the configuration change is applied when it restarts. - - - - - - Occurs after a change to the service configuration has been applied to the running instances of the role. - - - - - Gets the set of objects defined for your service. - - - Roles are defined in the service definition file. - - - - - Gets a object representing the role instance in which this code is currently executing. - - - - - Indicates the status of the role instance. - - - An instance may indicate that it is in one of two states: Ready or Busy. - If an instance's state is Ready, it is prepared to receive requests from the load balancer. If the instance's state is Busy, - it will not receive requests from the load balancer. - - - - - Indicates whether the role instance is running in the Windows Azure environment. - - - true if this instance is running in the development fabric or in the - Windows Azure environment in the cloud; otherwise, false. - - - - - Occurs when the role instance is about to be stopped. - - - This event is raised after the instance has been taken out of the load balancer's rotation - before the OnStop method is called. You can use this event - to execute code that is required for the role instance to shut down in an orderly fashion. - - - - - Gets the deployment ID, a string value that uniquely identifies the deployment in which this role instance is running. - - The deployment ID. - - - - Provides callbacks to initialize, run, and stop instances of the role. - - - - All worker roles must extend RoleEntryPoint. - - - Web roles can optionally extend RoleEntryPoint, or can use the ASP.NET lifecycle management - methods to handle the role's startup and stopping sequences. - - - All exceptions that occur within the methods of the RoleEntryPoint class are unhandled exceptions. - - - - - - Called by Windows Azure to initialize the role instance. - - True if initialization succeeds, False if it fails. The default implementation returns True. - - - Override the OnStart method to run initialization code for your role. - - - Before the OnStart method returns, the instance's status is set to Busy and the instance is not available - for requests via the load balancer. - - - If the OnStart method returns false, the instance is immediately stopped. If the method - returns true, then Windows Azure starts the role by calling the method. - - - A web role can include initialization code in the ASP.NET Application_Start method instead of the OnStart method. - Application_Start is called after the OnStart method. - - - Any exception that occurs within the OnStart method is an unhandled exception. - - - - - - Called by Windows Azure after the role instance has been initialized. This method serves as the - main thread of execution for your role. - - - - Override the Run method to implement your own code to manage the role's execution. The Run method should implement - a long-running thread that carries out operations for the role. The default implementation sleeps for an infinite - period, blocking return indefinitely. - - - The role recycles when the Run method returns. - - - Any exception that occurs within the Run method is an unhandled exception. - - - - - - Called by Windows Azure when the role instance is to be stopped. - - - - Override the OnStop method to implement any code your role requires to shut down in an orderly fashion. - - - This method must return within certain period of time. If it does not, Windows Azure - will stop the role instance. - - - A web role can include shutdown sequence code in the ASP.NET Application_End method instead of the OnStop method. - Application_End is called before the Stopping event is raised or the OnStop method is called. - - - Any exception that occurs within the OnStop method is an unhandled exception. - - - - - - Represents a local storage resource reserved for a service. - - - - - Gets the maximum size in megabytes allocated for the local storage resource, as defined in the service definition file. - - - - - Gets the name of the local store as declared in the service definition file. - - - - - Gets the full directory path to the local storage resource. - - - - - Arguments for the event, which occurs before a configuration change is applied to a role instance. - - - Set the Cancel property to cancel the configuration change. - Cancellation causes the role instance to be immediately recycled. The configuration changes are applied when the instance restarts. - - - - - Gets a collection of the configuration changes that are about to be applied to the role instance. - - - - - Arguments for the event, which occurs after a configuration change has been applied to a role instance. - - - - - Gets a collection of the configuration changes that were applied to the role instance. - - - - - Represents a change to the service's configuration. - - - - - Represents a change to the topology of the service. The service's topology refers to the number of instances - deployed for each role that the service defines. - - - - - Indicates whether two environment changes are equivalent. - - - - - Indicates whether two environment changes are equivalent. - - - - - Gets the hash code corresponding to this object. - - - - - Gets the name of the affected role. - - - - - Represents a change to a configuration setting. - - - - - Indicates whether two environment changes are equivalent. - - - - - Determines whether two changes are equivalent. - - - - - Gets the hash code corresponding to this object. - - - - - Gets the name of the configuration setting that has been changed. - - - - - Utility method used to translate an HRESULT into - exception. - - - - - Utility method used to look-up complete strong name of an assembly - from GAC. - - - - - Private utility methods used to retrieve the full name of - assembly. - - - - - PInvoke definition of IAssemblyName interface. - - - - - Represents access to the Windows Azure runtime environment. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - RdRuntimeBootstrapHttpModule is a request based module - and it hooks the BeginRequest event in HTTP pipeline. - It is responsible for warming up ASP.NET. - - - - - - Represents a role that is defined as part of a hosted service. - - - - - Gets the name of the role as it is declared in the service definition file. - - - - - Gets the collection of instances for the role. - - - - The number of instances of a role to be deployed to Windows Azure is specified in the service's configuration file. - - - A role must define at least one internal endpoint in order for its set of instances to be known at runtime. - - - - - - Represents a logical endpoint on a role. - - - - - Gets the name of the role endpoint. - - - - - Gets a list of all endpoints defined for a role instance. - - - - - Represents an instance of a role. - - - - - Gets the ID of this instance. - - - - - Gets an integer value that indicates the update domain in which this instance resides. - - - - - Gets an integer value that indicates the fault domain in which this instance resides. - - - - - Gets the object associated with this instance. - - - - - Gets the set of endpoints associated with this role instance. - - - - - Represents an endpoint associated with a role instance. - - - - - Gets an object for this role instance endpoint. The object - provides the IP address and port number for the endpoint. - - - - - Gets the object associated with this endpoint. - - - - - Represents a role. - - - - - Populates the instance data associated with each role. - - The current role instance data. - The list of static role data. - - - - Represents a role instance. - - - A role instance can represent either the current instance or some other instance discovered - via an endpoint; a subclass exists for each purpose. - - - - - Creates a role instance corresponding to the current instance. - - - - - Gets or sets the deployment ID, a value which uniquely identifies the deployment in which the role instance is running. - - The deployment ID. - - - - Represents a role endpoint. - - - - - Populates the instance information for the current endpoint. - - - Is additionally responsible for closing the graph between RoleEndPointInstance and RoleInstance. - - The current role instance for reference. - The map of known instances. - - - - Represents a role instance endpoint. - - - - - Arguments for the event. - - - - - Specifies that the instance's status is Busy and that it should not receive requests from the load balancer at this time. - - - When you call SetBusy, the instance's status remains Busy for a period of 10 seconds. To extend the Busy period, call SetBusy again - after this time interval has elapsed. - - - - - Gets a value indicating the status of the role instance. - - - - Event handlers can invoke the SetBusy method to change the status of a role instance. - - - If an instance's status is Ready, it is prepared to receive requests from the load balancer. If the instance's status is Busy, - it will not receive requests from the load balancer. - - - - - - Arguments for the event. - - - - - Exceptions - - - - - This class is reserved for internal use and is not intended to be used in your code. - - - - - Creates a new runtime bridge. - - - - - Initializes the lifetime service. - - - - - Initializes the runtime setting the specified configuration settings. - - Arguments to be passed to the runtime - - - - Initializes the runtime role. - - The amount of time to block on completion of role initialization. - An indication of whether the timeout occurred. - - - - Starts the runtime role. - - The amount of time to block on completion of role startup. - An indication of whether the timeout occurred. - - - - Stops the runtime role. - - The amount of time to block on completion of role shutdown. - An indication of whether the timeout occurred. - - - - Gets or sets the type of role that is expected. - - - - - Status of a given role instance - - - - - The role instance is ready to accept requests. - - - - - The role instance is unavailable for requests. - - - - + + + + Microsoft.WindowsAzure.ServiceRuntime + + + + + Undocumented + + + + + Undocumented + + + + + Undocumented + + + + + Undocumented + + + + + Undocumented + + + + + Represents the Windows Azure environment in which an instance of a role is running. + + + + + Retrieves the value of a setting in the service configuration file. + + The name of the configuration setting. + A String containing the value of the configuration setting. + + A role's configuration settings are defined in the service definition file. Values for configuration settings + are set in the service configuration file. + + + + + Populates the role information. + + + + + Reads the static role data. + + + Note that instance-level information is not populated. + + + + + + Requests that the current role instance be stopped and restarted. + + + + Before the role instance is recycled, the Windows Azure load balancer takes the role instance out of rotation. + This ensures that no new requests are routed to the instance while it is restarting. + + + A call to RequestRecycle initiates the normal shutdown cycle. Windows Azure raises the event + and calls the method so that you can + execute the necessary code to prepare the instance to be recycled. + + + + + + Static method called by the loader to initialize the runtime singelton element and start a role. + + + + + Initializes the role. + + + Called from the RoleRuntimeBridge. + + + + + Initializes the Role. + + + + + Starts the role. + + + Called from the RoleRuntimeBridge. + + + + + Stops the role. + + + + + Creates the entrypoint instance. + + + The type is discovered with the entrypoint assembly. The assembly information + is conveyed by the SDK using a file called __entrypoint.txt. + + + + + + + Retrieves a named local storage resource. + + The name of the local resource, as declared in the service definiton file. + A object that represents the local storage resource. + + + + Occurs before a change to the service configuration is applied to the running instances of the role. + + + + Service configuration changes are applied on-the-fly to running role instances. Configuration changes include + changes to the service configuration changes and changes to the number of instances in the service. + + + This event occurs after the new configuration file has been submitted to Windows Azure but + before the changes have been applied to each running role instance. This event can be cancelled + for a given instance to prevent the configuration change. + + + Note that cancelling this event causes the instance to be automatically recycled. When the instance is recycled, + the configuration change is applied when it restarts. + + + + + + Occurs after a change to the service configuration has been applied to the running instances of the role. + + + + + Gets the set of objects defined for your service. + + + Roles are defined in the service definition file. + + + + + Gets a object representing the role instance in which this code is currently executing. + + + + + Indicates the status of the role instance. + + + An instance may indicate that it is in one of two states: Ready or Busy. + If an instance's state is Ready, it is prepared to receive requests from the load balancer. If the instance's state is Busy, + it will not receive requests from the load balancer. + + + + + Indicates whether the role instance is running in the Windows Azure environment. + + + true if this instance is running in the development fabric or in the + Windows Azure environment in the cloud; otherwise, false. + + + + + Occurs when the role instance is about to be stopped. + + + This event is raised after the instance has been taken out of the load balancer's rotation + before the OnStop method is called. You can use this event + to execute code that is required for the role instance to shut down in an orderly fashion. + + + + + Gets the deployment ID, a string value that uniquely identifies the deployment in which this role instance is running. + + The deployment ID. + + + + Provides callbacks to initialize, run, and stop instances of the role. + + + + All worker roles must extend RoleEntryPoint. + + + Web roles can optionally extend RoleEntryPoint, or can use the ASP.NET lifecycle management + methods to handle the role's startup and stopping sequences. + + + All exceptions that occur within the methods of the RoleEntryPoint class are unhandled exceptions. + + + + + + Called by Windows Azure to initialize the role instance. + + True if initialization succeeds, False if it fails. The default implementation returns True. + + + Override the OnStart method to run initialization code for your role. + + + Before the OnStart method returns, the instance's status is set to Busy and the instance is not available + for requests via the load balancer. + + + If the OnStart method returns false, the instance is immediately stopped. If the method + returns true, then Windows Azure starts the role by calling the method. + + + A web role can include initialization code in the ASP.NET Application_Start method instead of the OnStart method. + Application_Start is called after the OnStart method. + + + Any exception that occurs within the OnStart method is an unhandled exception. + + + + + + Called by Windows Azure after the role instance has been initialized. This method serves as the + main thread of execution for your role. + + + + Override the Run method to implement your own code to manage the role's execution. The Run method should implement + a long-running thread that carries out operations for the role. The default implementation sleeps for an infinite + period, blocking return indefinitely. + + + The role recycles when the Run method returns. + + + Any exception that occurs within the Run method is an unhandled exception. + + + + + + Called by Windows Azure when the role instance is to be stopped. + + + + Override the OnStop method to implement any code your role requires to shut down in an orderly fashion. + + + This method must return within certain period of time. If it does not, Windows Azure + will stop the role instance. + + + A web role can include shutdown sequence code in the ASP.NET Application_End method instead of the OnStop method. + Application_End is called before the Stopping event is raised or the OnStop method is called. + + + Any exception that occurs within the OnStop method is an unhandled exception. + + + + + + Represents a local storage resource reserved for a service. + + + + + Gets the maximum size in megabytes allocated for the local storage resource, as defined in the service definition file. + + + + + Gets the name of the local store as declared in the service definition file. + + + + + Gets the full directory path to the local storage resource. + + + + + Arguments for the event, which occurs before a configuration change is applied to a role instance. + + + Set the Cancel property to cancel the configuration change. + Cancellation causes the role instance to be immediately recycled. The configuration changes are applied when the instance restarts. + + + + + Gets a collection of the configuration changes that are about to be applied to the role instance. + + + + + Arguments for the event, which occurs after a configuration change has been applied to a role instance. + + + + + Gets a collection of the configuration changes that were applied to the role instance. + + + + + Represents a change to the service's configuration. + + + + + Represents a change to the topology of the service. The service's topology refers to the number of instances + deployed for each role that the service defines. + + + + + Indicates whether two environment changes are equivalent. + + + + + Indicates whether two environment changes are equivalent. + + + + + Gets the hash code corresponding to this object. + + + + + Gets the name of the affected role. + + + + + Represents a change to a configuration setting. + + + + + Indicates whether two environment changes are equivalent. + + + + + Determines whether two changes are equivalent. + + + + + Gets the hash code corresponding to this object. + + + + + Gets the name of the configuration setting that has been changed. + + + + + Utility method used to translate an HRESULT into + exception. + + + + + Utility method used to look-up complete strong name of an assembly + from GAC. + + + + + Private utility methods used to retrieve the full name of + assembly. + + + + + PInvoke definition of IAssemblyName interface. + + + + + Represents access to the Windows Azure runtime environment. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RdRuntimeBootstrapHttpModule is a request based module + and it hooks the BeginRequest event in HTTP pipeline. + It is responsible for warming up ASP.NET. + + + + + + Represents a role that is defined as part of a hosted service. + + + + + Gets the name of the role as it is declared in the service definition file. + + + + + Gets the collection of instances for the role. + + + + The number of instances of a role to be deployed to Windows Azure is specified in the service's configuration file. + + + A role must define at least one internal endpoint in order for its set of instances to be known at runtime. + + + + + + Represents a logical endpoint on a role. + + + + + Gets the name of the role endpoint. + + + + + Gets a list of all endpoints defined for a role instance. + + + + + Represents an instance of a role. + + + + + Gets the ID of this instance. + + + + + Gets an integer value that indicates the update domain in which this instance resides. + + + + + Gets an integer value that indicates the fault domain in which this instance resides. + + + + + Gets the object associated with this instance. + + + + + Gets the set of endpoints associated with this role instance. + + + + + Represents an endpoint associated with a role instance. + + + + + Gets an object for this role instance endpoint. The object + provides the IP address and port number for the endpoint. + + + + + Gets the object associated with this endpoint. + + + + + Represents a role. + + + + + Populates the instance data associated with each role. + + The current role instance data. + The list of static role data. + + + + Represents a role instance. + + + A role instance can represent either the current instance or some other instance discovered + via an endpoint; a subclass exists for each purpose. + + + + + Creates a role instance corresponding to the current instance. + + + + + Gets or sets the deployment ID, a value which uniquely identifies the deployment in which the role instance is running. + + The deployment ID. + + + + Represents a role endpoint. + + + + + Populates the instance information for the current endpoint. + + + Is additionally responsible for closing the graph between RoleEndPointInstance and RoleInstance. + + The current role instance for reference. + The map of known instances. + + + + Represents a role instance endpoint. + + + + + Arguments for the event. + + + + + Specifies that the instance's status is Busy and that it should not receive requests from the load balancer at this time. + + + When you call SetBusy, the instance's status remains Busy for a period of 10 seconds. To extend the Busy period, call SetBusy again + after this time interval has elapsed. + + + + + Gets a value indicating the status of the role instance. + + + + Event handlers can invoke the SetBusy method to change the status of a role instance. + + + If an instance's status is Ready, it is prepared to receive requests from the load balancer. If the instance's status is Busy, + it will not receive requests from the load balancer. + + + + + + Arguments for the event. + + + + + Exceptions + + + + + This class is reserved for internal use and is not intended to be used in your code. + + + + + Creates a new runtime bridge. + + + + + Initializes the lifetime service. + + + + + Initializes the runtime setting the specified configuration settings. + + Arguments to be passed to the runtime + + + + Initializes the runtime role. + + The amount of time to block on completion of role initialization. + An indication of whether the timeout occurred. + + + + Starts the runtime role. + + The amount of time to block on completion of role startup. + An indication of whether the timeout occurred. + + + + Stops the runtime role. + + The amount of time to block on completion of role shutdown. + An indication of whether the timeout occurred. + + + + Gets or sets the type of role that is expected. + + + + + Status of a given role instance + + + + + The role instance is ready to accept requests. + + + + + The role instance is unavailable for requests. + + + + diff --git a/lib/Azure/Microsoft.WindowsAzure.StorageClient.xml b/lib/Azure/Microsoft.WindowsAzure.StorageClient.xml index 47c37e4a903..80b24398270 100644 --- a/lib/Azure/Microsoft.WindowsAzure.StorageClient.xml +++ b/lib/Azure/Microsoft.WindowsAzure.StorageClient.xml @@ -1,12746 +1,12746 @@ - - - - Microsoft.WindowsAzure.StorageClient - - - - - Class that provides methods for conveniently managing account information for storage services. - - - - - The setting name for using the development storage. - - - - - The setting name for specifying a development storage proxy Uri. - - - - - The setting name for using the default storage endpoints with the specified protocol. - - - - - The setting name for the account name. - - - - - The setting name for the account key. - - - - - The setting name for a custom blob storage endpoint. - - - - - The setting name for a custom queue endpoint. - - - - - The setting name for a custom table storage endpoint. - - - - - The setting name for a shared access key. - - - - - The default account name for the development storage. - - - - - The default account key for the development storage. - - - - - The credentials string used to test for the development storage credentials. - - - - - The root blob storage DNS name. - - - - - The root queue DNS name. - - - - - The root table storage DNS name. - - - - - Validator for the UseDevelopmentStorage setting. Must be "true". - - - - - Validator for the DevelopmentStorageProxyUri setting. Must be a valid Uri. - - - - - Validator for the DefaultEndpointsProtocol setting. Must be either "http" or "https". - - - - - Validator for the AccountName setting. No restrictions. - - - - - Validator for the AccountKey setting. Must be a valid base64 string. - - - - - Validator for the BlobEndpoint setting. Must be a valid Uri. - - - - - Validator for the QueueEndpoint setting. Must be a valid Uri. - - - - - Validator for the TableEndpoint setting. Must be a valid Uri. - - - - - Validator for the SharedAccessSignature setting. No restrictions. - - - - - Stores the user-specified configuration setting publisher. - - - - - Singleton instance for the development storage account. - - - - - Initializes a new instance of the class. - - A object. - The Blob service endpoint. - The Queue service endpoint. - The Table service endpoint. - - - - Initializes a new instance of the class. - - The account name and account key for the storage account. - Set to true to use HTTPS. - - This constructor returns a object for which all service endpoints - are configured as the default service endpoints. - - - - - Parses a connection string and returns a object based on - the connection string. - - The connection string to parse. - A object. - Thrown if is null or empty - Thrown if is not a valid connection string. - Thrown if is not parseable. - - - - Create a new instance of a from a configuration setting. - - Name of the configuration setting. - A . - Thrown if the service configuration file - is not available. - - - - Attempts to parse a configuration string into a object. - - The string to parse. - A object to construct from the parsed string. - true if the string was successfully parsed; otherwise false. - - - - Sets the global configuration setting publisher for the object. - - The configuration setting publisher. - - - This method supports changing storage keys dynamically. For further details, - see the Thumbnails sample included with the Windows Azure SDK. - - - - - - Returns a string representation of storage account information. - - - A that represents this instance. - - - Returned string omits any sensitive information such as account key data. - - - - - Returns a string representation of storage account information. - - If set to true, the string will include private data such as account key or shared access tokens in the resulting value. - The default value is false. - - A that represents this instance. - - - - - Returns a with development storage credentials using the specified proxy Uri. - - The proxy endpoint to use. - The new . - - - - Internal implementation of Parse/TryParse. - - The string to parse. - The to return. - A callback for reporting errors. - If true, the parse was successful. Otherwise, false. - - - - Tokenizes input and stores name/value pairs in a NameValueCollection. - - The string to parse. - Error reporting delegate. - Tokenized collection. - - - - Encapsulates a validation rule for an enumeration based account setting. - - The name of the setting. - A list of valid values for the setting. - An representing the enumeration constraint. - - - - Encapsulates a validation rule using a func. - - The name of the setting. - A func that determines if the value is valid. - An representing the constraint. - - - - Determines whether the specified setting value is a valid base64 string. - - The setting value. - - Returns true if the specified setting value is a valid base64 string; otherwise, false. - - - - - Validation function that validates Uris. - - Value to validate. - - Returns true if the specified setting value is a valid Uri; otherwise, false. - - - - - Settings filter that requires all specified settings be present and valid. - - A list of settings that must be present. - The remaining settings or null if the filter's requirement is not satisfied. - - - - Settings filter that removes optional values. - - A list of settings that are optional. - The remaining settings or null if the filter's requirement is not satisfied. - - - - Settings filter that ensures that at least one setting is present. - - A list of settings of which one must be present. - The remaining settings or null if the filter's requirement is not satisfied. - - - - Settings filter that ensures that a valid combination of credentials is present. - - The remaining settings or null if the filter's requirement is not satisfied. - - - - Tests to see if a given list of settings matches a set of filters exactly. - - The settings to check. - A list of filters to check. - - If any filter returns null, false. - If there are any settings left over after all filters are processed, false. - Otherwise true. - - - - - Gets a StorageCredentials object corresponding to whatever credentials are supplied in the given settings. - - The settings to check. - The StorageCredentials object specified in the settings. - - - - Gets the default blob endpoint using specified settings. - - The settings to use. - The default blob endpoint. - - - - Gets the default blob endpoint using the specified protocol and account name. - - The protocol to use. - The name of the storage account. - The default blob endpoint. - - - - Gets the default queue endpoint using the specified settings. - - The settings. - The default queue endpoint. - - - - Gets the default queue endpoint using the specified protocol and account name. - - The protocol to use. - The name of the storage account. - The default queue endpoint. - - - - Gets the default table endpoint using the specified settings. - - The settings. - The default table endpoint. - - - - Gets the default table endpoint using the specified protocol and account name. - - The protocol to use. - The name of the storage account. - The default table endpoint. - - - - Gets the default configuration information for the development storage account. - - The development storage account. - - - - Gets the endpoint for the Blob service as configured for the storage account. - - The blob endpoint. - - - - Gets the endpoint for the Queue service as configured for the storage account. - - The queue endpoint. - - - - Gets the endpoint for the Table service as configured for the storage account. - - The table endpoint. - - - - Gets the storage credentials to use to access the storage account. - - The storage credentials. - - - - Encapsulates a mutable storage credentials object. - - - - - Stores the mutable storage credentials. - - - - - Initializes a new instance of the class. - - Name of the configuration setting. - - - - Sets the configuration value. - - The value. - true if the value was set; otherwise, false. - - - - Gets or sets the name of the configuration setting from which we retrieve storage account information. - - - - - Gets or sets the cloud storage account. - - The cloud storage account. - - - - Represents a object that is mutable to support key rotation. - - - - - Represents credentials to authenticate access to the Windows Azure storage services via a storage account. - - - - The Windows Azure storage services include the Blob, Queue, and Table services. - - - For additional information about the Windows Azure storage services, see - Windows Azure Storage Services API Reference. - For detailed information on request authentication, see - Authentication Schemes. - - - - - - Transforms a resource Uri for signing purposes. - The transformation may append to the string. - - The resource Uri to be transformed. - The new resource Uri that includes any transformations required for signing. - - - - Signs a request using the specified credentials under the Shared Key authentication scheme. - - The request to be signed. - - - - Signs a request using the specified credentials under the Shared Key Lite authentication scheme. - - The request to be signed. - - - - Encodes the signature string by using the HMAC-SHA256 algorithm over - the UTF-8-encoded string-to-sign. - - The UTF-8-encoded string-to-sign. - The HMAC-encoded signature string. - - - - Performs the computation of the signature based on the private key. - - The string to be signed. - The signature for the string. - Need for D-SAS not public. - - - - Returns a that represents this instance. - - If set to true exports secrets. - - A that represents this instance. - - - - - Gets the name of the storage account associated with the specified credentials. - - The name of the account. - - - - Gets a value indicating whether the method must be called - before generating a signature string with the specified credentials. - - Is true if [needs transform Uri]; otherwise, false. If false, - calling returns the original, unmodified Uri. - - - - Gets a value indicating whether a request can be signed under the Shared Key authentication - scheme using the specified credentials. - - - Is true if a request can be signed with these credentials; otherwise, false. - - - - - Gets a value indicating whether a request can be signed under the Shared Key Lite authentication - scheme using the specified credentials. - - - Is true if a request can be signed with these credentials; otherwise, false. - - - - - Gets a value indicating whether the method will return a valid - HMAC-encoded signature string when called with the specified credentials. - - - Is true if these credentials will yield a valid signature string; otherwise, false. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The initial credentials. - - - - Updates the object with new credentials. - - The new credentials. - - - - Computes the HMAC signature of the specified string. - - The string to sign. - The computed signature. - - - - Signs a request using the specified credentials under the Shared Key authentication scheme. - - The request to be signed. - - - - Signs a request using the specified credentials under the Shared Key Lite authentication scheme. - - The request to be signed. - - - - Transforms the Uri. - - The resource Uri. - The transformed Uri. - - - - Computes the 512-bit HMAC signature of the specified string. - - The string to sign. - The computed signature. - - - - Returns a that represents this instance. - - If set to true the string exposes key information. - - A that represents this instance. - - - - - Gets the name of the storage account associated with the specified credentials. - - The account name. - - - - Gets a value indicating whether the method will return a valid - HMAC-encoded signature string when called with the specified credentials. - - - Returns true if these credentials will yield a valid signature string; otherwise, false. - - - - - Gets a value indicating whether a request can be signed under the Shared Key authentication - scheme using the specified credentials. - - - Returns true if a request can be signed with these credentials; otherwise, false. - - - - - Gets a value indicating whether a request can be signed under the Shared Key Lite authentication - scheme using the specified credentials. - - - Returns true if a request can be signed with these credentials; otherwise, false. - - - - - Gets a value indicating whether the method must be called - before generating a signature string with the specified credentials. - - - Returns true if [needs transform Uri]; otherwise, false. If false, - calling returns the original, unmodified Uri. - - - - - Gets or sets the current object that this instance represents. - - - - - Contains helper methods for implementing shared access signatures. - - - - - Get the signature hash embedded inside the Shared Access Signature. - - The shared access policy to hash. - An optional identifier for the policy. - Either "b" for blobs or "c" for containers. - The client whose credentials are to be used for signing. - The signed hash. - - - - Get the complete query builder for creating the Shared Access Signature query. - - The shared access policy to hash. - An optional identifier for the policy. - Either "b" for blobs or "c" for containers. - The signature to use. - The finished query builder. - - - - Converts the specified value to either a string representation or . - - The value to convert. - A string representing the specified value. - - - - Converts the specified value to either a string representation or null. - - The value to convert. - A string representing the specified value. - - - - Escapes and adds the specified name/value pair to the query builder if it is not null. - - The builder to add the value to. - The name of the pair. - The value to be escaped. - - - - Parses the query. - - The query parameters. - The credentials. - - - - A strongly-typed resource class, for looking up localized strings, etc. - - - - - Returns the cached ResourceManager instance used by this class. - - - - - Overrides the current thread's CurrentUICulture property for all - resource lookups using this strongly typed resource class. - - - - - Looks up a localized string similar to The argument must not be empty string.. - - - - - Looks up a localized string similar to The argument is out of range. - - - - - Looks up a localized string similar to The argument '{0}' is larger than maximum of '{1}'. - - - - - Looks up a localized string similar to The argument '{0}' is smaller than minimum of '{1}'. - - - - - Looks up a localized string similar to Cannot attach to a TableStorageDataServiceContext object. These objects already contain the functionality for accessing the table storage service.. - - - - - Looks up a localized string similar to "Versions before 2009-09-19 do not support Shared Key Lite for Blob And Queue, current target version '{0}'". - - - - - Looks up a localized string similar to Cannot change size below currently written size. - - - - - Looks up a localized string similar to A stream blob must have a blob size of 0.. - - - - - Looks up a localized string similar to The blob is larger than maximum supported size '{0}'. - - - - - Looks up a localized string similar to Data already uploaded. - - - - - Looks up a localized string similar to The block size must be positive value. - - - - - Looks up a localized string similar to Block size can not be larger than '{0}'. - - - - - Looks up a localized string similar to Cannot create Shared Access Signature for snapshots. Perform the operation on the root blob instead.. - - - - - Looks up a localized string similar to Cannot create Shared Access Signature as the credentials does not have account name information. Please check that the credentials used support creating Shared Access Signature.. - - - - - Looks up a localized string similar to Cannot create Shared Access Signature unless the Account Key credentials are used by the BlobServiceClient.. - - - - - Looks up a localized string similar to Cannot perform this operation on a blob representing a snapshot.. - - - - - Looks up a localized string similar to Server operation did not finish within user specified timeout '{0}' seconds, check if operation is valid or try increasing the timeout.. - - - - - Looks up a localized string similar to If-Modified-Since and If-Unmodified-Since require a DateTime value.. - - - - - Looks up a localized string similar to If-Match and If-None-Match require an ETag value.. - - - - - Looks up a localized string similar to The conditionals specified for this operation did not match server.. - - - - - Looks up a localized string similar to SetConfigurationSettingPublisher needs to be called before FromConfigurationSetting can be used. - - - - - Looks up a localized string similar to The supplied credentials '{0'} cannot be used to sign request. - - - - - Looks up a localized string similar to The option '{0}' must be 'None' to delete a specific snapshot specified by '{1}'. - - - - - Looks up a localized string similar to Cannot combine incompatible absolute Uris base '{0}' relative '{1}'.When trying to combine 2 absolute Uris, the base uri should be a valid base of the relative Uri.. - - - - - Looks up a localized string similar to Invalid acl public access type returned '{0}'. Expected blob or container.. - - - - - Looks up a localized string similar to The continuation type passed in is unexpected. Please verify that the correct continuation type is passed in. Expected {0}, found {1}. - - - - - Looks up a localized string similar to Invalid query parameters inside Blob address '{0}'.. - - - - - Looks up a localized string similar to Listing snapshots is only supported in flat mode (no delimiter). Consider setting BlobRequestOptions.UseFlatBlobListing property to true.. - - - - - Looks up a localized string similar to Calculated MD5 does not match existing property. - - - - - Looks up a localized string similar to Messages cannot be larger than {0} bytes.. - - - - - Looks up a localized string similar to Cannot find account information inside Uri '{0}'. - - - - - Looks up a localized string similar to Invalid blob address '{0}', missing container information. - - - - - Looks up a localized string similar to Missing mandatory parameters for valid Shared Access Signature. - - - - - Looks up a localized string similar to Canonicalization did not find a non empty x-ms-date header in the WebRequest. Please use a WebRequest with a valid x-ms-date header in RFC 123 format (example request.Headers["x-ms-date"] = DateTime.UtcNow.ToString("R", CultureInfo.InvariantCulture)). - - - - - Looks up a localized string similar to Cannot provide credentials as part of the address and as constructor parameter. Either pass in the address or use a different constructor.. - - - - - Looks up a localized string similar to Multiple different snapshot times provided as part of query '{0}' and as constructor parameter '{1}'.. - - - - - Looks up a localized string similar to EndMoveNextSegment must be called before the Current property can be accessed.. - - - - - Looks up a localized string similar to The segment cursor has no more results.. - - - - - Looks up a localized string similar to This operation is not supported for creating a PageBlob. Use other operations to create a PageBlob.. - - - - - Looks up a localized string similar to Missing account name information inside path style uri. Path style Uris should be of the form http://<IPAddressPlusPort>/<accountName>. - - - - - Looks up a localized string similar to Address '{0}' is not an absolute address. Relative addresses are not permitted in here.. - - - - - Looks up a localized string similar to Attempting to seek past the end of the stream. - - - - - Looks up a localized string similar to Attempting to seek before the start of the stream. - - - - - Looks up a localized string similar to Server returned more that MaxResults requested. - - - - - Looks up a localized string similar to '{0}' is not a valid table name.. - - - - - Looks up a localized string similar to The number of blocks is larger than the maximum of '{0}'. - - - - - Looks up a localized string similar to Too many '{0}' shared access policy identifiers provided. Server does not support setting more than '{1}' on a single container.. - - - - - Looks up a localized string similar to The blob type cannot be undefined.. - - - - - Represents a set of access conditions to be used for operations against the storage services. - - - - - Indicates that no access condition is set. - - - - - Creates an access condition for the IfModifiedSince condition. - - The last-modified time, expressed as UTC time. - An object with the If-Modified-Since condition set. - - Setting this access condition modifies the request to include the HTTP If-Modified-Since conditional header. - If this access condition is set, the operation is performed only if the resource has been modified since the specified time. - See Specifying Conditional Headers for Blob Service Operations - for more information. - - - - - Creates an access condition for the IfNotModifiedSince condition. - - The last-modified time, expressed as UTC time. - An object with the IfNotModifiedSince condition set. - - Setting this access condition modifies the request to include the HTTP If-Unmodified-Since conditional header. - If this access condition is set, the operation is performed only if the resource has not been modified since the specified time. - See Specifying Conditional Headers for Blob Service Operations - for more information. - - - - - Creates an access condition for the IfMatch condition. - - The ETag to match. - An object with the IfMatch condition set. - - Setting this access condition modifies the request to include the HTTP If-Match conditional header. - If this access condition is set, the operation is performed only if the ETag of the resource - matches the specified ETag. - See Specifying Conditional Headers for Blob Service Operations - for more information. - - - - - Creates an access condition for the IfNoneMatch condition. - - The ETag to match. - An object with the IfNoneMatch condition set. - - Setting this access condition modifies the request to include the HTTP If-None-Match conditional header. - If this access condition is set, the operation is performed only if the ETag of the resource - does not match the specified ETag. - See Specifying Conditional Headers for Blob Service Operations - for more information. - - - - - Converts AccessCondition into a type for use as a source conditional to Copy. - - The original condition. - The resulting header for the condition. - The value for the condition. - - - - Applies the condition to the web request. - - The request to be modified. - - - - Verifies the condition is satisfied. - - The ETag to check. - The last modified time UTC. - true if the condition is satisfied, otherwise false. - - - - Gets or sets the header of the request to be set. - - The access condition header. - - - - Gets or sets the value of the access condition header. - - The access condition header value. - - - - Represents a set of attributes (properties and metadata) for a blob. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The blob attributes to clone. - - - - Gets the system properties for the blob. - - The blob properties. - The value of this property is never null. - - - - Gets the user-defined metadata for the blob. - - The blob metadata. - The value of this property is never null. - - - - Gets the Uri of the blob. - - The blob's Uri. - - - - Gets the date and time the snapshot was taken. - - The blob's snapshot time if the blob is a snapshot; otherwise, null. - - If the blob is not a snapshot, the value of this property is null. - - - - - Represents a set of attributes (properties and metadata) for a blob container. - - - - - Initializes a new instance of the class. - - - - - Gets the user-defined metadata for the container. - - The container's metadata. - The value of this property is never null. - - - - Gets the system properties for the container. - - The container's properties. - The value of this property is never null. - - - - Gets the name of the container. - - The container's name. - - - - Gets the Uri of the container. - - The container's Uri. - - - - Represents the permissions on the container. - - - - - Initializes a new instance of the class. - - - - - Gets or sets the public access level. - - The public access type of the container. - - - - Gets the set of container-level access policies for the container. - - The shared access policies of the container. - - - - Represents the system properties for a container. - - - - - Gets the ETag of the container. - - The container's etag. - - - - Gets the container's last-modified time, in UTC format. - - The container's last modified time in UTC format. - - - - The level of public access that is allowed on the container. - - - - - No public access. Only the account owner can read resources in this container. - - - - - Container-level public access. Anonymous clients can read container and blob data. - - - - - Blob-level public access. Anonymous clients can read blob data only within this container. - - - - - Error code strings that are specific to the blob service. - - - - - Stores the error code for invalid block ID errors. - - - - - Stores the error code for blob not found errors. - - - - - Stores the error code for blob already exists errors. - - - - - Stores the error code for invalid blob or block errors. - - - - - Stores the error code for invalid block list errors. - - - - - Specifies which details to include when listing the blobs in this container. - - - - - No additional details. - - - - - Include snapshots. - - - - - Include blob metadata. - - - - - Include uncommitted blobs. - - - - - Include all available details. - - - - - Represents the system properties for the blob. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class based on an existing instance. - - The instance of the class to clone. - - - - Gets or sets the cache-control header for the blob. - - The blob's cache control value. - - - - Gets or sets the content-encoding header for the blob. - - The blob's content encoding. - - If this property has not been set for the blob, it returns null. - - - - - Gets or sets the content-language header for the blob. - - The blob's content language. - - If this property has not been set for the blob, it returns null. - - - - - Gets the size of the blob. - - The blob's length. - - - - Gets or sets the content-MD5 header for the blob. - - The blob's MD5 hash. - - - - Gets or sets the content-type header for the blob. - - The blob's content type. - - If this property has not been set for the blob, it returns null. - - - - - Gets the blob's ETag. - - The blob's ETag. - - The ETag is an identifier assigned to the blob by the Blob service. It is updated - on write operations to the blob. It may be used in conditional operations employing - If-Match or If-None-Match conditions to determine whether the operation should be performed. - - - - - Gets the the last-modified time for the blob, in UTC format. - - The blob's last modified time in UTC format. - - - - Gets the type of the blob. - - The type of the blob. - - - - Gets the blob's lease status. - - The blob's lease status. - - - - This class represents a seekable, read-only stream on a blob. - - - - - Represents a stream for reading and writing to a blob. - - - - - Aborts the operation to write to the blob. - - - - - Begins an asynchronous operation to commit a blob. - - An optional asynchronous callback, to be called when the commit is complete. - A user-provided object that distinguishes this particular asynchronous commit request from other requests. - An object of type that represents the asynchronous commit, which may still be pending. - - - - Ends an asynchronous operation to commit the blob. - - An object of type that references the asynchronous operation. - asyncResult is null - Only supported if stream's property CanWrite is true - - - - Commits the blob. - - Only supported if stream's property CanWrite is true - - - - Gets a reference to the blob on which the stream is opened. - - The blob this stream accesses. - - - - Gets a value indicating whether the signature of each block should be verified. - - - Returns true if integrity control verification is enabled; otherwise, false. - - - - - Gets or sets the number of bytes to read ahead. - - The size of the read ahead. - Only supported if stream's property CanRead is true - - - - Gets or sets the block size. - - The size of the block. - Only supported if stream's property CanWrite is true - - - - The threshold beyond which we start a new read-Ahead. - - - - - The current position with the stream. - - - - - The number of bytes to read forward on every request. - - - - - The options applied to the stream. - - - - - True if the AccessCondition has been changed to match a single ETag. - - - - - The list of blocks for this blob. - - - - - The already available blocks for reading. This member is the only possible point of thread contention between the user's requests and ReadAhead async work. - At any particular time, the ReadAhead thread may be adding more items into the list. The second thread will never remove/modify an existing item within the list. - - - - - A handle to the parallel download of data for ReadAhead. - - - - - Initializes a new instance of the BlobReadStream class. - - The blob used for downloads. - Modifiers to be applied to the blob. After first request, the ETag is always applied. - The number of bytes to read ahead. - Controls whether block's signatures are verified. - - - - Setting the length of the blob is not supported. - - The desired length. - Always thrown. - - - - Write is not supported. - - An array of bytes. This method copies count bytes from buffer to the current stream. - The zero-based byte offset in buffer at which to begin copying bytes to the current stream. - The number of bytes to be written to the current stream. - - - - Flush is not supported on read-only stream. - - - - - Seeks to the desired position. Any seek outside of the buffered/read-ahead data will cancel read-ahead and clear the buffered data. - - A byte offset relative to the origin parameter. - A value of type System.IO.SeekOrigin indicating the reference point used to obtain the new position. - The new position within the current stream. - Thrown if offset is invalid for SeekOrigin - - - - Copies the specified amount of data from internal buffers to the buffer and advances the position. - - An array of bytes. When this method returns, the buffer contains the specified byte array with the values - between offset and (offset + count - 1) replaced by the bytes read from the current source. - The zero-based byte offset in buffer at which to begin storing the data read from the current stream. - The maximum number of bytes to be read from the current stream. - The total number of bytes read into the buffer. This can be less than the number of bytes requested - if that many bytes are not currently available, or zero (0) if the end of the stream has been reached. - - The sum of offset and count is larger than the buffer length. - The buffer parameter is null. - The offset or count parameters are negative. - An I/O error occurs. - - - - Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream. - - The unsigned byte cast to an Int32, or -1 if at the end of the stream. - - - - Begins an asynchronous read operation. - - The buffer to read the data into. - The byte offset in at which to begin writing data read from the stream. - The maximum number of bytes to read. - An optional asynchronous callback, to be called when the read is complete. - A user-provided object that distinguishes this particular asynchronous read request from other requests. - - An that represents the asynchronous read, which could still be pending. - - - Attempted an asynchronous read past the end of the stream, or a disk error occurs. - - - One or more of the arguments is invalid. - - - Methods were called after the stream was closed. - - - The current Stream implementation does not support the read operation. - - - - - Ends an asynchronous read operation. - - The reference to the pending asynchronous request to finish. - - The number of bytes read from the stream, between zero (0) and the number of bytes you requested. - Streams return zero (0) only at the end of the stream, otherwise, they should block until at least one byte is available. - - - is null. - - - did not originate from a method on the current stream. - - - The stream is closed or an internal error has occurred. - - - - - Wraps the Read operation to remap any exceptions into IOException. - - The buffer to read the data into. - The zero-based byte offset in buffer at which to begin storing the data read from the current stream. - The maximum number of bytes to be read from the current stream. - The action to be done upon completion to return the number of bytes read. - A task sequence representing the operation. - The sum of offset and count is larger than the buffer length. - The buffer parameter is null. - The offset or count parameters are negative - An I/O error occurs. - - - - Performs the read operation. - - The buffer to read the data into. - The zero-based byte offset in buffer at which to begin storing the data read from the current stream. - The maximum number of bytes to be read from the current stream. - The action to be done upon completion to return the number of bytes read. - A task sequence representing the operation. - - If verification is on, retrieve the blocklist. - If there are downloaded blocks, read from there. - Otherwise, if there's an outstanding request, wait for completion and read from there. - Otherwise perform a new request. - - - - - Locks download to a specific ETag. - - - - - Reads the data from the service starting at the specified location. Verifies the block's signature (if required) and adds it to the buffered data. - - The starting position of the read-ahead. - The number of bytes to read ahead. - An TaskSequence that represents the asynchronous read action. - - - - Ends an asynchronous read-ahead operation. - - An object of type that references the asynchronous operation. - asyncResult is null - - - - Retrieves the size of the blob. - - If verification is on, it will retrieve the blocklist as well - - - - Verifies if the blocks are in expected format. Disables the integrity control if they are not appropriate for validation. - - - - - Calculates the ReadAhead bounds (start and count) as required by the existing data. - - The desired start position. - The end of the existing gap. - The desired number of bytes. - The start position rounded down to the nearest block start. - The number of bytes with readAheadSize included and rounded up to the end of the nearest block. - This calculates the bounds based on the blocklist, not any existing data. - - - - Reads from the verified blocks as much data as is available and needed. - - The buffer to read the data into. - The zero-based byte offset in buffer at which to begin storing the data read from the current stream. - The maximum number of bytes to be read from the current stream. - True if there was any data read. - - - - Calculates if the currently held data is less than percentage depleted. - - The start position for any ReadAhead based on the last block. - True if more data is needed. - - - - Verifies if the given offset is within the bounds of the stream. - - The offset to be checked. - This may do a server round-trip if the length is not known. - - - - Gets a value indicating whether the current stream supports reading. - - Returns true if the stream supports reading; otherwise, false. - - - - Gets a value indicating whether the current stream supports seeking. - - Returns true if the stream supports seeking; otherwise, false. - - - - Gets a value indicating whether the current stream supports writing. - - Returns true if the stream supports writing; otherwise, false. - - - - Gets a value indicating whether the current stream can time out. - - A value that determines whether the current stream can time out. - - - - Gets or sets a value, in miliseconds, that determines how long the stream will attempt to read before timing out. - - A value, in miliseconds, that determines how long the stream will attempt to read before timing out. - - - - Gets the length of the blob. - - May need to do a roundtrip to retrieve it. - - - - Gets or sets the position within the stream. - - - - - Gets or sets the number of bytes to read ahead. - - - - - Gets a value indicating whether the signature of each downloaded block should be verified. - - This requires having a blocklist, having blockIDs to be in the appropriate format. This causes all reads to be rounded to the nearest block. - - - - Gets a value indicating whether length is available. - - - - - Represents a single block of data that was downloaded. - - - - - Initializes a new instance of the class. - - The start offset. - The content. - - - - Gets the starting location of the block. - - - - - Gets the content of the block. - - - - - Encapsulates the collection of downloaded blocks and provides appropriate locking mechanism. - - - - - Holds the downloaded blocks. - - - - - Finds the block that contains the data for the . - - The position which is requested. - A block that contains the data for the or null. - - - - Removes any downloaded blocks that are outside the current bounds (position and readAheadSize). - - The position before which all blocks should be purged. - Size of the read-ahead beyond position for blocks to be kept. - - - - Calculates the length of the gap relative to . - - The position from which to find the gap. - Size of the desired. - The gap start. - The gap end. - - - - Tells if there are any blocks available. - - Returns true if there are any blocks; otherwise, false. - - - - Adds the specified downloaded block. - - The downloaded block. - - - - Removes the specified block based on the startOffset key. - - The key for the block. - - - - Represents a set of behavior options for a specific request. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class based on the parameters of an - existing instance. - - The instance of the class to clone. - - - - Initializes a new instance of the class. - - The Blob service client. - - - - Creates the full modifier. - - The type of the options. - The service. - The options. - A full modifier of the requested type. - - - - Clones this instance. - - A clone of the instance. - - - - Applies the defaults. - - The service. - - - - Gets or sets the retry policy. - - The retry policy. - - - - Gets or sets the timeout for the request. - - The request timeout. - - For more information about setting server timeouts, see - Setting Server Timeouts for Blob Service Operations. - - - - - Gets or sets the access condition for the request. - - The access condition. - - - - Gets or sets the access condition on the source blob, for the Copy Blob operation. - - The copy source access condition. - - This property is applicable only for a Copy Blob operation. - - - - - Gets or sets options for deleting snapshots dUring the Delete Blob operation. - - The delete snapshots option. - - This property is applicable only for a Delete Blob operation. - - - - - Gets or sets a object that indicates which blob details are - listed by a List Blobs operation. - - The blob listing details. - - This property is applicable only for a List Blobs operation. - - - - - Gets or sets a value indicating whether to blob listing operation will list and - or expand all into the contained in them. - - - Returns true if only a flat listing is desired; false if listing should include . - - - This property is applicable only for a List Blobs operation. - - if the containers contain the following blob items ("mycontainer/foo/a", "mycontainer/foo/b/c", "mycontainer/foo/b/d", "mycontainer/bar"), - then listing blobs under "mycontainer/foo/" will result in {blob "mycontainer/foo/a", blobdirectory "mycontainer/foo/b/"} if this flag is set to false and - - and {"mycontainer/foo/a", "mycontainer/foo/b/c", "mycontainer/foo/b/d"} if the flag is set to true. - - - - The type of a blob. - - - - - Not specified. - - - - - A page blob. - - - - - A block blob. - - - - - The class is an append-only stream for writing into storage. - - - - - The stream is writable until committed/close. - - - - - The current position within the blob. - - - - - The size of the blocks to use. - - - - - The list of uploaded blocks. - - - - - A memory stream holding the current block information. - - - - - The hash of the current block. - - - - - The ongoing blob hash. - - - - - The set of options applying to the current blob. - - - - - Initializes a new instance of the BlobWriteStream class. - - The blob used for uploads. - The options used for the stream. - The size of the blocks to use. - - - - The stream does not support reading. - - An array of bytes. When this method returns, the buffer contains the specified byte array with the values - between offset and (offset + count - 1) replaced by the bytes read from the current source. - The zero-based byte offset in buffer at which to begin storing the data read from the current stream. - The maximum number of bytes to be read from the current stream. - The total number of bytes read into the buffer. This can be less than the number of bytes requested - if that many bytes are not currently available, or zero (0) if the end of the stream has been reached. - - Not supported operation as this is a write-only stream - - - - The stream does not support seeking. - - A byte offset relative to the origin parameter. - A value of type System.IO.SeekOrigin indicating the reference point used to obtain the new position. - The new position within the current stream. - Not supported operation as this is a write-only stream - - - - The stream does not support setting of length. - - The desired length of the current stream in bytes. - Growing a stream is not possible without writing. - - - - Write the provided data into the underlying stream. - - An array of bytes. This method copies count bytes from buffer to the current stream. - The zero-based byte offset in buffer at which to begin copying bytes to the current stream. - The number of bytes to be written to the current stream. - is null. - offset or count is negative. - Thrown if blob is already committed/closed - - - - Copies a single byte into the stream. - - The byte of data to be written. - - - - Begins an asynchronous write operation. - - The buffer to write data from. - The byte offset in buffer from which to begin writing. - The number of bytes to write. - An optional asynchronous callback, to be called when the write is complete. - A user-provided object that distinguishes this particular asynchronous write request from other requests. - An IAsyncResult that represents the asynchronous write, which could still be pending. - is null. - offset or count is negative. - Thrown if blob is already committed/closed - The operation will be completed synchronously if the buffer is not filled - - - B - Ends an asynchronous write operation. - - An object of type that references the asynchronous operation. - asyncResult is null - - - - Causes any buffered data to be written to the remote storage. If the blob is not using blocks, the blob is fully committed. - - An I/O error occurs while writing to storage. - - - - Aborts the upload of the blob. - - - - - Begins an asynchronous operation to commit the blob. - - An optional asynchronous callback, to be called when the commit is complete. - A user-provided object that distinguishes this particular asynchronous commit request from other requests. - An IAsyncResult that represents the asynchronous commit, which could still be pending. - - - - Ends an asynchronous operation to commit the blob. - - An object of type that references the asynchronous operation. - asyncResult is null - - - - Commits the blob on the server. - - - - - Implements the disposing logic of committing the blob. - - True to release both managed and unmanaged resources; false to release only unmanaged resources. - - - - Creates a blockID using the block's hash and a prefix. - - The base64 encoded blockID. - - - - Implements the block writing task. - - The buffer to write data from. - The byte offset in buffer from which to begin writing. - The number of bytes to write. - The sequence representing the uploading of the blocks. - - - - Creates a task that writes data for a full blob. - - The buffer to write data from. - The byte offset in buffer from which to begin writing. - The number of bytes to write. - The (synchronous) sequence that copies the data into a buffer. - Thrown if the buffer is larger than maximum blob size. - Since a non-block based blob is always fully buffered before upload, this task is a synchronous copy. - - - - Implements the flushing sequence. - - The sequence of events for a flush. - - - - Commits the blob by uploading any remaining data and the blocklist asynchronously. - - A sequence of events required for commit. - - - - Implements a sequence of events to upload a full blob. - - The sequence of events required to upload the blob. - - - - Sets the MD5 of the blob. - - - - - Implements a sequence to upload a block. - - The sequence of events for upload. - - - - Verifies that the blob is in writable state. - - Thrown if stream is non-writable. - - - - Resets the block and the block hash. - - - - - Creates the new block and the block hash. - - - - - Gets a value indicating whether the current stream supports reading. - - Returns true if the stream supports reading; otherwise, false. - - - - Gets a value indicating whether the current stream supports seeking. - - Returns true if the stream supports seeking; otherwise, false. - - - - Gets a value indicating whether the current stream supports writing. - - Returns true if the stream supports writing; otherwise, false. - - - - Gets a value indicating whether the current stream can time out. - - A value that determines whether the current stream can time out. - - - - Gets or sets a value, in milliseconds, that determines how long the stream will attempt to write before timing out. - - - - - Gets the current length (equal to the position). - - - A long value representing the length of the stream in bytes. - - - A class derived from Stream does not support seeking. - - - Methods were called after the stream was closed. - - - - - Gets or sets the current position. - - - The current position within the stream. - - - An I/O error occurs. - - - The stream does not support seeking. - - - Methods were called after the stream was closed. - - - - - Gets or sets the block size. - - - - - Gets a value indicating whether the upload is done in blocks. - - Returns true if blocks are to be used; otherwise, false. - - - - Indicates whether to list only committed blocks, only uncommitted blocks, or all blocks. - - - - - Include only the committed blocks. - - - - - Include only the uncommitted blocks. - - - - - Include all blocks. - - - - - Represents a Windows Azure blob. - - - - - Interface for an item returned from a List Blobs operation. - - - - - Gets the Uri. - - The item's Uri. - - - - Gets the parent. - - The item's parent. - - - - Gets the container. - - The item's container. - - - - Stores the blob's attributes. - - - - - Stores the that contains this blob. - - - - - Stores the blob's parent . - - - - - Stores the blob's transformed address. - - - - - Initializes a new instance of the class using the specified base Uri. - - The absolute Uri to the blob. - - Any authentication information inside the address will be used to set the blob's credentials. - Otherwise a blob for anonymous access is created. - Any snapshot information as part of the address will indicate that this blob is a snapshot. - - - - - Initializes a new instance of the class representing the blob at the specified Uri. - - The absolute Uri to the blob. - Storage account credentials. - - - - Initializes a new instance of the class representing the blob at the specified Uri. - - A relative Uri to the blob. - A object that specifies the endpoint for the Blob service. - - - - Initializes a new instance of the class using the information specified in an existing instance. - - A object. - - - - Initializes a new instance of the class. - - Absolute Uri. - True to use path style Uri. - - Any authentication information inside the address will be used. - Otherwise a blob for anonymous access is created. - Any snapshot information as part of the address will be recorded - Explicity specify whether to use host style or path style Uri - - - - - Initializes a new instance of the class creating a new service client. - - Complete Uri. - Storage credentials. - True to use path style Uris. - - - - Initializes a new instance of the class with the given absolute Uri. - - True to use path style Uris. - The absolute blob Uri. - - - - Initializes a new instance of the class with existing attributes. - - The attributes (NOTE: Saved by reference, does not make a copy). - The service client. - The snapshot time. - - - - Retrieves properties and metadata for this blob. - - - - - Retrieves properties and metadata for this blob. - - A object indicating any additional options to be specified on the request. - - - - Begins an asynchronous operation to retrieve the blob's metadata and properties. - - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Begins an asynchronous operation to retrieve the blob's metadata and properties. - - A object indicating any additional options to be specified on the request. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Ends an asynchronous operation to retrieve the blob's metadata and properties. - - An object of type that references the asynchronous operation. - - - - Updates the blob's metadata. - - - - - Updates the blob's metadata. - - A object indicating any additional options to be specified on the request. - - - - Begins an asynchronous operation to update the blob's metadata. - - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Begins an asynchronous operation to update the blob's metadata. - - A object indicating any additional options to be specified on the request. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Ends an asynchronous operation to update the blob's metadata. - - An object of type that references the asynchronous operation. - - - - Updates the blob's properties. - - - - - Updates the blob's properties. - - A object indicating any additional options to be specified on the request. - - - - Begins an asynchronous operation to update the blob's properties. - - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Begins an asynchronous operation to update the blob's properties. - - A object indicating any additional options to be specified on the request. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Ends an asynchronous operation to update the blob's properties. - - An object of type that references the asynchronous operation. - - - - Copy blob contents and properties from another blob. - - Source blob to copy from. - - - - Copy blob contents and properties from another blob. - - Source blob to copy from. - A object indicating any additional options to be specified on the request. - - - - Begins an asynchronous Copy Blob operation. - - The source blob. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Begins an asynchronous Copy Blob operation. - - The source blob. - A object indicating any additional options to be specified on the request. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Ends an asynchronous Copy Blob operation. - - An object of type that references the asynchronous operation. - - - - Deletes the blob. - - - - - Deletes the blob. - - A object indicating any additional options to be specified on the request. - - - - Begins an asynchronous operation to delete the blob. - - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Begins an asynchronous operation to delete the blob. - - A object indicating any additional options to be specified on the request. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Ends an asynchronous operation to delete the blob. - - An object of type that references the asynchronous operation. - - - - Deletes the blob if it exists. - - True if the blob was deleted. - - - - Deletes the blob if it exists. - - A object indicating any additional options to be specified on the request. - True if the blob was deleted. - - - - Begins an asynchronous operation to delete the blob if it exists. - - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Begins an asynchronous operation to delete the blob if it exists. - - A object indicating any additional options to be specified on the request. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Ends an asynchronous operation to delete the blob. - - An object of type that references the asynchronous operation. - true if the blob was successfully deleted. - - - - Creates a stream for writing to the blob. - - A used for writing to the blob. - - - - Creates a stream for writing to the blob. - - A object indicating any additional options to be specified on the request. - A used for writing to the blob. - - - - Uploads a blob from a stream. - - The data stream to be uploaded. - - - - Uploads a blob from a stream. - - The data stream to be uploaded. - The options to be used for the current request to override the default behavior. - - - - Begins an asynchronous operation to upload a blob from a stream. - - The data stream to be uploaded. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Begins an asynchronous operation to upload a blob from a stream. - - The data stream to be uploaded. - A object indicating any additional options to be specified on the request. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Ends an asynchronous operation to upload a blob from a stream. - - An object of type that references the asynchronous operation. - - - - Uploads a string of text to a file. - - The content to be upload. - This method assumes that the string is encoded as UTF-8. - - - - Uploads a string of text to a file. - - The content to be uploaded. - The encoding to be used. - A object indicating any additional options to be specified on the request. - - - - Uploads a file from the file system to a blob. - - The file to be uploaded. - - - - Uploads a file from the file system to a blob. - - The file to be uploaded. - A object indicating any additional options to be specified on the request. - - - - Uploads an array of bytes to a blob. - - The array of bytes to be uploaded. - - - - Uploads an array of bytes to a blob. - - The array of bytes to be uploaded. - A object indicating any additional options to be specified on the request. - - - - Gets a stream for reading the blob's contents. - - A used for reading from the blob. - - - - Gets a stream for reading the blob's contents. - - A object indicating any additional options to be specified on the request. - A used for reading from the blob. - - - - Downloads the blob contents to a stream. - - The target stream. - - - - Downloads the blob contents to a stream. - - The target stream. - A object indicating any additional options to be specified on the request. - - - - Begins an asynchronous operation to download the blob's contents to a stream. - - The target stream. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Begins an asynchronous operation to download the blob's contents to a stream. - - The target stream. - A object indicating any additional options to be specified on the request. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Ends an asynchronous operation to download the blob's contents to a stream. - - An object of type that references the asynchronous operation. - - - - Downloads the blob contents as a string. - - The contents of the blob. - - - - Downloads the blob contents as a string. - - A object indicating any additional options to be specified on the request. - The contents of the blob. - - - - Downloads the blob contents to a file. - - Name of the file. - - - - Downloads the blob contents to a file. - - Name of the file. - A object indicating any additional options to be specified on the request. - - - - Downloads the blob contents as an array of bytes. - - The contents of the blob. - - - - Downloads the blob contents as an array of bytes. - - A object indicating any additional options to be specified on the request. - The contents of the blob. - - - - Creates a snapshot of this blob. - - A object representing the snapshot. - - - - Creates a snapshot of this blob. - - A object indicating any additional options to be specified on the request. - A object representing the snapshot. - - - - Begins an asynchronous operation to create a snapshot of this blob. - - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Begins an asynchronous operation to create a snapshot of this blob. - - A object indicating any additional options to be specified on the request. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Ends an asynchronous operation to create a snapshot of this blob. - - An object of type that references the asynchronous operation. - A object representing the snapshot. - - - - Constructs the signature string for creating a Shared Access Signature for this blob. - - Describe the shared access permission details. - Query parameter string representing the signature. - - - - Constructs the signature string for creating a Shared Access Signature for this blob. - - A policy describing container-level permissions. - The identifier for a container-level access policy associated with this signature. - Query parameter string representing the signature. - Thrown if the current credentials don't support signing. - Thrown if blob is a snapshot. - - - - Dispatches the stream upload to a specific implementation method. - - The source stream. - The request options. - A that uploads the stream. - - - - Uploads the blob with buffering. - - The source stream. - The request options. - The size of the block. - A that uploads the blob. - - - - Uploads the full blob with retry. - - The source stream. - The request options. - A that uploads the blob. - - - - Uploads the full blob. - - The source stream. - The request options. - A that uploads the blob. - - - - Uploads the blob in parallel with blocks. - - The source stream. - The size of the block. - The request options. - A that uploads the blob. - - - - Uploads the block with retry. - - The source stream. - The block IS. - The content MD5. - The requestoptions. - A that uploads the block. - - - - Uploads the block. - - The source stream. - The block ID. - The content MD5. - The request options. - A that uploads the block. - - - - Uploads the data into the web request. - - The request that is setup for a put. - The source of data. - The response from the server. - The sequence used for uploading data. - - - - Implements the FetchAttributes method. - - The request options. - A that fetches the attributes. - - - - Implements the DownloadToStream method. - - The target stream. - The request options. - A that downloads the blob to the stream. - - - - Implements getting the stream. - - The options. - The offset. - The count. - The set result. - A that gets the stream. - - - - Retreive ETag and LastModified date time from response. - - The response to parse. - - - - Parses the blob address query and returns snapshot and SAS. - - The query to parse. - The snapshot value, if any. - The SAS credentials. - - - - Gets the default encoding for the blob, which is UTF-8. - - The default object. - - - - Used by both Shared Access and Copy blob operation. - - The canonical name of the blob. - - - - Uploads a stream that doesn't have a known length. In this case we can't do any optimizations like creating a request before we read all of the data. - - The stream that is the source of data. - The options to control the upload behavior. - The block size to be used (null - no blocks). - A sequence that represents uploading the blob. - This is implemented by creating a BlobStream and using that to buffer data until we have sufficient amount to be sent. - - - - Uploads the blob with blocks. - - The source stream. - The request options. - The size of the block. - A that uploads the blob. - - - - Uploads the full blob with a retry sequence. - - The source stream. - The request options. - A that uploads the blob. - - - - Implementation of the CopyFromBlob method. - - The source blob. - The request options. - A that copies the blob. - - - - Implements the DeleteBlob method. - - The request options. - A that deletes the blob. - - - - Implementation for the DeleteIfExists method. - - The options. - The set result. - A that deletes the blob if it exists. - - - - Implementation for the CreateSnapshot method. - - The request options. - The result report delegate. - A that creates the snapshot. - - - - Implementation for the SetMetadata method. - - The request options. - A that sets the metadata. - - - - Implementation for the SetProperties method. - - The request options. - A that sets the properties. - - - - Verifies that write operation is not done for snapshot. - - - - - Parses the snapshot time. - - The snapshot time. - The parsed snapshot time. - - - - Parse Uri for any snapshot and SAS (Shared access signature) information. Validate that no other query parameters are passed in. - - The complete Uri. - The existing blob client. - True to use path style Uris. - - Any snapshot information will be saved. - Any SAS information will be recorded as corresponding credentials instance. - If existingClient is passed in, any SAS information found will not be supported. - Otherwise a new client is created based on SAS information or as anonymous credentials. - - - - - Gets the DateTime value that uniquely identifies the snapshot, if this blob is a snapshot. - - The snapshot time. - - If the blob is not a snapshot, this property returns null. - - - - - Gets the object that represents the Blob service. - - The service client. - - - - Gets the Uri for the blob. - - The blob's Uri. - - - - Gets the blob's attributes. - - The blob's attributes. - - - - Gets the blob's user-defined metadata. - - The blob's metadata. - - - - Gets the blob's properties. - - The blob's properties. - - - - Gets a object representing the blob's container. - - The blob's container. - - - - Gets the object representing the - virtual parent directory for the blob. - - The blob's parent. - - - - Gets a object based on this blob. - - A object based on this blob.. - - - - Gets a object based on this blob. - - A object based on this blob. - - - - Gets the Uri after applying authentication transformation. - - The transformed address. - - - - Represents a client for accessing the Windows Azure blob service. - - - - - Stores the default delimiter. - - - - - Stores the parallelism factor. - - - - - Initializes a new instance of the class used for anonymous access. - - Complete Uri. - - - - Initializes a new instance of the class using the specified base address and credentials. - - The base Blob service address. - Access credentials. - - - - Initializes a new instance of the class using the specified base address and credentials. - - The base Blob service Uri. - Access credentials. - - - - Initializes a new instance of the class. - - True to use path style Uris. - The base Uri. - The credentials. - - - - Returns a for a blob with the specified address. - - The address of the blob. - A object representing the blob. - - - - Returns a for a blob with the specified address. - - The address of the blob. - A object representing the blob. - - - - Returns a for a blob with the specified address. - - The address of the blob. - A object representing the blob. - - - - Returns a for a blob with the specified address. - - The address of the blob. - A object representing the blob. - - - - Returns a for a blob with the specified address. - - The address of the blob. - A object representing the blob. - - - - Returns a for a container with the specified address. - - The address of the container. - A object representing the container. - - - - Returns a for a directory with the specified address. - - The address of the directory. - A object representing the directory. - - - - Lists all of the containers in the storage account. - - A list of containers. - - - - Lists the containers whose names begin with the specified prefix. - - The prefix to match. - A list of containers. - - - - Lists the containers whose names begin with the specified prefix. - - The prefix to match. - The details to include in the listing. - A list of containers. - - - - Lists all of the containers in the storage account. - - A result segment of containers. - - - - Lists the containers whose names begin with the specified prefix in sets of pages. - - The prefix to match. - A result segment of containers. - - - - Lists the containers whose names begin with the specified prefix. - - The prefix to match. - The details to include in the listing. - Non negative value which indicates the maximum number of results that should be returned at a time. Zero means no limit. - Note the returned ResultSegment.Results may still have less than the maxResults number of results. - Use to return the remaining results. - Optional continuationToken from previous ResultSegment for continuing listing operation. - A result segment of containers. - - - - Begins an asynchronous request to list containers. - - The delegate. - An object containing state information for this asynchronous request. - An that references the asynchronous request. - - - - Begins an asynchronous request to list containers with a matching prefix. - - The prefix to match. - The delegate. - An object containing state information for this asynchronous request. - An that references the asynchronous request. - - - - Begins an asynchronous request to list containers with a matching prefix. - - The prefix to match. - The details to include in the listing. - The delegate. - An object containing state information for this asynchronous request. - An that references the asynchronous request. - - - - Begins an asynchronous request to list containers with a matching prefix. - - The prefix to match. - The details to include in the listing. - Non negative value which indicates the maximum number of results that should be returned at a time. Zero means no limit. - Note the returned ResultSegment.Results may still have less than the maxResults number of results. - Use to return the remaining results. - Optional continuationToken from previous ResultSegment for continuing listing operation. - The delegate. - An object containing state information for this asynchronous request. - An that references the asynchronous request. - - - - Returns a containing all or part of the list of containers. - - A reference to the pending asynchronous request. - A result segment for the containers returned from the request. - - - - List the blobs whose names begin with the specified prefix. - - The prefix to match. - The list of blobs. - - - - List the blobs whose names begin with the specified prefix. - - The prefix to match. - The request options. - The list of blobs. - - - - Begins an asynchronous request to list blobs whose names begin with the specified prefix. - - The blob prefix to list. - A that contains all or part of the set of blobs. - - - - Begins an asynchronous request to list blobs whose names begin with the specified prefix. - - The blob prefix to list. - The request options. - - A that contains all or part of the set of blobs. - - - - - Begins an asynchronous request to list blobs whose names begin with the specified prefix. - - The blob prefix to list. - Non negative value which indicates the maximum number of results that should be returned at a time. Zero means no limit. - Note the returned ResultSegment.Results may still have less than the maxResults number of results. - Use to return the remaining results. - Optional continuationToken from previous ResultSegment for continuing listing operation. - - A that contains all or part of the set of blobs. - - - - - Begins an asynchronous request to list blobs whose names begin with the specified prefix. - - The blob prefix to list. - Non negative value which indicates the maximum number of results that should be returned at a time. Zero means no limit. - Note the returned ResultSegment.Results may still have less than the maxResults number of results. - Use to return the remaining results. - Optional continuationToken from previous ResultSegment for continuing listing operation. - The request options. - - A that contains all or part of the set of blobs. - - - - - Begins an asynchronous request to list blobs whose names begin with the specified prefix. - - The blob prefix to list. - The delegate. - An object containing state information for this asynchronous request. - An that references the asynchronous request. - - - - Begins an asynchronous request to list blobs whose names begin with the specified prefix. - - The blob prefix to list. - Non negative value which indicates the maximum number of results that should be returned at a time. Zero means no limit. - Note the returned ResultSegment.Results may still have less than the maxResults number of results. - Use to return the remaining results. - Optional continuationToken from previous ResultSegment for continuing listing operation. - The delegate. - An object containing state information for this asynchronous request. - An that references the asynchronous request. - - - - Returns a containing all or part of the set of blobs whose names begin with the specified prefix. - - A reference to the pending asynchronous request. - A that contains all or part of the set of blobs. - - - - Selects the protocol response. - - The protocol item. - The service. - The container. - The parsed . - - - - Ends the asynchronous GetResponse operation. - - The asynchronous operation result. - The request to end the operation on. - The from the asynchronous request. - - - - Parses the user prefix. - - The prefix. - Name of the container. - The listing prefix. - - - - Converts the date time to snapshot string. - - The snapshot time to convert. - A string representing the snapshot time. - - - - Implementation for the ListContainers method. - - The container prefix. - The details included. - The continuation token. - The maximum results to return. - The result report delegate. - A that lists the containers. - - - - Core implementation for the ListContainers method. - - The container prefix. - The details included. - The continuation token. - The pagination. - The result report delegate. - A that lists the containers. - - - - Implementation for the ListBlobs method. - - The blob prefix. - The continuation token. - The max results. - The request options. - The result report delegate. - - A that lists the blobs. - - - - - Occurs when a response is received from the server. - - - - - Gets the credentials used by the Blob service client. - - The credentials. - - - - Gets the base Uri for the Blob service client. - - The client's base Uri. - - - - Gets or sets the retry policy for all requests by the Blob service client. - - The retry policy. - - - - Gets or sets the timeout for all requests by the Blob service client. - - The request timeout. - - - - Gets or sets the default delimiter for blobs for the Blob service client. - - The default delimiter. - - - - Gets or sets the size of the blocks to be written to a block blob. - - The write block size in bytes. - - - - Gets or sets the amount of data to pre-fetch while reading a stream. - - The read ahead in bytes. - - - - Gets or sets a value indicating whether the integrity of each block should be verified when reading from a stream. - - - Returns true if using integrity control for stream reading; otherwise, false. - - Setting this property causes all downloads to be rounded to the nearest block size. - - - - Gets or sets a positive number representing the parallelism factor in certain - Blob service operations. - - The parallel operation thread count. - - - - Gets a value indicating whether the service client is used with Path style or Host style. - - Is true if use path style uris; otherwise, false. - - - - Represents a container in Windows Azure blob storage. - - - - - Stores the transformed address. - - - - - Initializes a new instance of the class. - - The container address. - - - - Initializes a new instance of the class. - - The container address. - The credentials. - - - - Initializes a new instance of the class. - - The container address as a relative Uri. - The Blob service client. - - - - Initializes a new instance of the class with the given address and path style Uri preference. - - The container's address. - True to use path style Uris. - - - - Initializes a new instance of the class. - - The container address. - The credentials. - If set to true path style Uris are used. - - - - Initializes a new instance of the class. - - The attributes for the container (NOTE: Stored by reference). - The client to be used. - - - - Initializes a new instance of the class. - - True to use path style Uris. - The container's address. - - - - Gets the specified blob. - - Uri of the blob relative to the container. - A reference for the specified blob. - - - - Gets the specified page blob. - - Uri of the blob relative to the container. - A reference for the specified blob. - - - - Gets the specified block blob. - - Uri of the blob relative to the container. - A reference for the specified blob. - - - - Gets the specified virtual blob directory. - - Relative address of the blob virtual directory. - A reference for the specified blob. - - - - Returns a list of all the blobs in the container. - - An of all the blobs in the container. - - - - Returns a list of all the blobs in the container. - - The to use when making requests. - An of all the blobs in the container. - - - - Returns a list of all the blobs in the container in sets of pages. - - The to use when making requests. - A that contains the first segment of blobs. - - - - Returns a list of all the blobs in the container in sets of pages. - - Non negative value which indicates the maximum number of results that should be returned at a time. Zero means no limit. - Note the returned ResultSegment.Results may still have less than the maxResults number of results. - Use to return the remaining results. - Optional continuationToken from previous ResultSegment for continuing listing operation. - The to use when making requests. - A that contains the first segment of blobs. - - - - Begins an asynchronous request to list the first segment of blobs in the container. - - The delegate. - An object containing state information for this asynchronous request. - An that references the asynchronous request. - - - - Begins an asynchronous request to list the first segment of blobs in the container. - - The to use when making the request. - The delegate. - An object containing state information for this asynchronous request. - An that references the asynchronous request. - - - - Begins an asynchronous request to list the first segment of blobs in the container using paging. - - Non negative value which indicates the maximum number of results that should be returned at a time. Zero means no limit. - Note the returned ResultSegment.Results may still have less than the maxResults number of results. - Use to return the remaining results. - Optional continuationToken from previous ResultSegment for continuing listing operation. - The to use when making the request. - The delegate. - An object containing state information for this asynchronous request. - An that references the asynchronous request. - - - - Returns a containing the first segment of blobs in the container. - - An object of type that references the asynchronous operation. - A that contains the first segment of blobs. - - - - Creates the container. - - - - - Creates the container. - - The to use when making the request. - - - - Begins an asynchronous operation to create a container. - - The delegate. - An object containing state information for this asynchronous request. - An that references the asynchronous request. - - - - Begins an asynchronous operation to create a container. - - The to use when making the request. - The delegate. - An object containing state information for this asynchronous request. - An that references the asynchronous request. - - - - Ends an asynchronous operation to create a container. - - An object of type that references the asynchronous operation. - - - - Creates the container if it does not already exist. - - Returns true if the container did not already exist and was created; otherwise false. - - - - Creates the container if it does not already exist. - - The to use when making the request. - Returns true if the container did not already exist and was created; otherwise false. - - - - Begins an asynchronous request to create the container if it does not already exist. - - The delegate. - An object containing state information for this asynchronous request. - An that references the asynchronous request. - - - - Begins an asynchronous request to create the container if it does not already exist. - - The to use when making the request. - The delegate. - An object containing state information for this asynchronous request. - An that references the asynchronous request. - - - - Returns the result of the asynchronous request to create the container if it does not already exist. - - An object of type that references the asynchronous operation. - Returns true if the container did not already exist and was created; otherwise false. - - - - Deletes the container. - - - - - Deletes the container. - - The to use when making the request. - - - - Begins an asynchronous operation to delete a container. - - The delegate. - An object containing state information for this asynchronous request. - An that references the asynchronous request. - - - - Begins an asynchronous operation to delete a container. - - The to use when making the request. - The delegate. - An object containing state information for this asynchronous request. - An that references the asynchronous request. - - - - Ends an asynchronous operation to delete a container. - - An object of type that references the asynchronous operation. - - - - Sets the permissions for the container. - - The set of permissions to apply to the container. - - - - Sets the permissions for the container. - - The set of permissions to apply to the container. - The to use when making the request. - - - - Begins an asynchronous request to set the permissions of the container. - - The set of permissions to apply to the container. - The delegate. - An object containing state information for this asynchronous request. - An that references the asynchronous request. - - - - Begins an asynchronous request to set the permissions of the container. - - The set of permissions to apply to the container. - The to use when making the request. - The delegate. - An object containing state information for this asynchronous request. - An that references the asynchronous request. - - - - Returns the result of the asynchronous request to set the permissions of the container. - - An object of type that references the asynchronous operation. - - - - Gets the permissions on the container. - - The container's permissions. - - - - Gets the permissions on the container. - - The to use when making the request. - The container's permissions. - - - - Begins an asynchronous request to get the permissions on the container. - - The delegate. - An object containing state information for this asynchronous request. - An that references the asynchronous request. - - - - Begins an asynchronous request to get the permissions on the container. - - The to use when making the request. - The delegate. - An object containing state information for this asynchronous request. - An that references the asynchronous request. - - - - Returns the asynchronous result of the request to get the permissions on the container. - - An object of type that references the asynchronous operation. - A object containing the permissions on the container. - - - - Retrieves container metadata and properties. - - - - - Retrieves container metadata and properties. - - The to use when making the request. - - - - Begins an asynchronous operation retrieve container metadata and properties. - - The delegate. - An object containing state information for this asynchronous request. - An that references the asynchronous request. - - - - Begins an asynchronous operation retrieve container metadata and properties. - - The to use when making the request. - The delegate. - An object containing state information for this asynchronous request. - An that references the asynchronous request. - - - - Ends an asynchronous operation retrieve container metadata and properties. - - An object of type that references the asynchronous operation. - - - - Sets the container metadata. - - - - - Sets the container metadata. - - The to use when making the request. - - - - Begins an asynchronous operation to set container metadata. - - The delegate. - An object containing state information for this asynchronous request. - An that references the asynchronous request. - - - - Begins an asynchronous operation to set container metadata. - - The to use when making the request. - The delegate. - An object containing state information for this asynchronous request. - An that references the asynchronous request. - - - - Ends an asynchronous request operation to set container metadata. - - An object of type that references the asynchronous operation. - - - - Constructs the shared access signature. - - The shared access policy. - The constructed shared access signature. - Precondition: current credential of the client is (Account, Key). - - - - Constructs the shared access signature. - - The shared access policy. - The group policy identifier. - The constructed shared access signature. - - - - Implementation for the ListBlobs method. - - The blob prefix. - The request options. - The continuation token. - The maximum result size. - The result report delegate. - A that lists the blobs. - - - - Converts the ACL string to a object. - - The string to convert. - The resulting object. - - - - Parse Uri for SAS (Shared access signature) information. - - The complete Uri. - The client to use. - If true, path style Uris are used. - - Validate that no other query parameters are passed in. - Any SAS information will be recorded as corresponding credentials instance. - If existingClient is passed in, any SAS information found will not be supported. - Otherwise a new client is created based on SAS information or as anonymous credentials. - - - - - Returns the canonical name for shared access. - - The canonical name. - - - - Gets the absolute Uri of the blob. - - Name of the blob. - The blob's absolute Uri. - - - - Core implementation of the ListBlobs method. - - The blob prefix. - The request options. - The continuation token. - The pagination. - The result report delegate. - A that lists the blobs. - - - - Implementation for the Create method. - - The options. - A that creates the container. - - - - Implementation for the CreateIfNotExist method. - - The options. - The set result. - A that creates the container if it does not exist. - - - - Implementation for the Delete method. - - The request options. - A that deletes the container. - - - - Implementation for the FetchAttributes method. - - The options. - A that fetches the attributes. - - - - Implementation for the SetMetadata method. - - The request options. - A that sets the metadata. - - - - Implementation for the SetPermissions method. - - The permissions to set. - The request options. - A that sets the permissions. - - - - Implementation for the GetPermissions method. - - The request options. - The result report delegate. - A that gets the permissions. - - - - Gets the for this container. - - The service client. - - - - Gets the of the container. - - The container's Uri. - - - - Gets the name of the container. - - The container name. - - - - Gets a of metadata for the container. - - The container's metadata. - - - - Gets the container's attributes. - - The container's attributes. - - - - Gets the for the container. - - The container's properties. - - - - Gets the Uri after applying authentication transformation. - - - - - Represents a virtual collection of blobs with a given prefix. - - - - - Stores the parent directory. - - - - - Stores the parent container. - - - - - Stores the prefix this directory represents. - - - - - Initializes a new instance of the class given an address and a client. - - The blob directory's address. - The client to use. - - - - Returns a object representing a blob in this directory with the specified name. - - The name of the blob. - A object representing the blob. - - - - Returns a representing a blob in this directory with the specified name. - - The name of the blob. - A object representing the blob. - - - - Returns a representing a blob in this directory with the specified name. - - The name of the blob. - A object representing the blob. - - - - Returns a representing a subdirectory with the specified name. - - The name of the subdirectory. - A object representing the subdirectory. - - - - Returns the list of blobs and subdirectories in this directory. - - The to use when making requests. - An of all the blobs in the container. - - - - Returns the list of blobs and subdirectories in this directory. - - An of all the blobs in the container. - - - - Returns a list of all the blobs in the container in sets of pages. - - The to use when making requests. - A that contains the first segment of blobs. - - - - Returns a list of all the blobs in the container in sets of pages. - - Non negative value which indicates the maximum number of results that should be returned at a time. Zero means no limit. - Note the returned ResultSegment.Results may still have less than the maxResults number of results. - Use HasNext and GetNext members to return the remaining results. - Optional continuationToken from previous ResultSegment for continuing listing operation. - The to use when making requests. - A that contains the first segment of blobs. - - - - Begins an asynchronous request to list the first segment of blobs in the container. - - The delegate. - An object containing state information for this asynchronous request. - An that references the asynchronous request. - - - - Begins an asynchronous request to list the first segment of blobs in the container. - - The to use when making the request. - The delegate. - An object containing state information for this asynchronous request. - An that references the asynchronous request. - - - - Begins an asynchronous request to list the first segment of blobs in the container using paging. - - Non negative value which indicates the maximum number of results that should be returned at a time. Zero means no limit. - Note the returned ResultSegment.Results may still have less than the maxResults number of results. - Use to return the remaining results. - Optional continuationToken from previous ResultSegment for continuing listing operation. - The to use when making the request. - The delegate. - An object containing state information for this asynchronous request. - An that references the asynchronous request. - - - - Returns a containing the first segment of blobs and directories in the directory. - - The reference to the pending asynchronous request to finish. - A that contains the first segment of blobs. - - - - Initializes the prefix. - - - - - Gets the object for this directory. - - The service client. - - - - Gets the of this directory. - - The directory's Uri. - - - - Gets the container. - - The directory's container. - - - - Gets the parent directory. - - The directory's parent directory. - - - - Gets the prefix. - - The prefix. - - - - This class represents a blob that is made out of blocks and provides APIs to directly access it. - - - - - Initializes a new instance of the class. - - The absolute Uri to the blob. - Storage credentials. - - - - Initializes a new instance of the class. - - Relative Uri to the blob. - Existing Blob service client which provides the base address. - - - - Initializes a new instance of the class. - - Absolute Uri to the blob. - - - - Initializes a new instance of the class. - - Absolute Uri to the blob. - Storage credentials. - If set to true, use path style Uris. - - - - Initializes a new instance of the class. - - The blob absolute Uri. - If set to true, use path style Uris. - - - - Initializes a new instance of the class. - - The cloud blob. - - - - Initializes a new instance of the class. - - The attributes. - The service client. - The snapshot time. - - - - Retrieves the committed blocklist for the blob. - - The committed blocks. - - - - Retrieves the committed blocklist for the blob. - - The options to be used for the current request to override the default behavior. - The committed blocks. - - - - Retrieves the blocklist consisting of type of blocks. - - The type of blocks that should be retrieved. - The list of blocks for this blob of type. - - - - Retrieves the blocklist consisting of type of blocks. - - The type of blocks that should be retrieved. - The options to be used for the current request to override the default behavior. - The list of blocks for this blob of type. - - - - Retrieves the blocklist consisting of type of blocks. - - The type of blocks that should be retrieved. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An IAsyncResult that represents the asynchronous DownloadBlockList, which could still be pending. - - - - Retrieves the blocklist consisting of type of blocks. - - The type of blocks that should be retrieved. - The options to be used for the current request to override the default behavior. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Ends the asynchronous operation to download the block list. - - An object of type that references the asynchronous operation. - - The block list for this blob. - - - - - Uploads a single block with a given . - - The base64 encoded block ID to be associated with the data. - The stream containing the data for the block. Must support the Size property. - Optional content-MD5 header value to be used with the request. - Null or empty value will be ignored and no Content-MD5 header will be set. - - - - Uploads a single block with a given . - - The base64 encoded block ID to be associated with the data. - The stream containing the data for the block. Must support the Size property. - Optional content-MD5 header value to be used with the request. - Null or empty value will be ignored and no Content-MD5 header will be set. - The options to be used for the current request to override the default behavior. - - - - Begins an operation to upload a single block with a given . - - The base64 encoded block ID to be associated with the data. - The stream containing the data for the block. Must support the Size property. - Optional content-MD5 header value to be used with the request. - Null or empty value will be ignored and no Content-MD5 header will be set. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Begins an operation to upload a single block with a given . - - The base64 encoded block ID to be associated with the data. - The stream containing the data for the block. Must support the Size property. - Optional content-MD5 header value to be used with the request. - Null or empty value will be ignored and no Content-MD5 header will be set. - The options to be used for the current request to override the default behavior. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Ends an operation to upload a single block with a given . - - An object of type that references the asynchronous operation. - - - - Uploads the list of blocks to be committed as a blob. - - The list of block IDs (base64 encoded). - - - - Uploads the list of blocks to be committed as a blob. - - The list of block IDs (base64 encoded). - A object indicating any additional options to be specified on the request. - - - - Begins an asynchronous operation to upload a list of blocks. - - The list of block IDs (base64-encoded). - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Begins an asynchronous operation to upload a list of blocks. - - The list of block IDs (base64-encoded). - The options to be used for the current request to override the default behavior. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Ends an asynchronous operation to upload a list of blocks. - - An object of type that references the asynchronous operation. - - - - Uploads the block list. - - The blocks to upload. - The request options. - A that uploads the block list. - - - - Gets the download block list. - - The types of blocks. - The request options. - The result report delegate. - A that gets the download block list. - - - - Parses the response. - - The block list response. - An enumerable list of objects. - - - - A class representing a page blob. - - - - - Initializes a new instance of the class. - - The blob address. - The credentials. - - - - Initializes a new instance of the class. - - The blob address. - - - - Initializes a new instance of the class. - - The blob address. - The service client. - - - - Initializes a new instance of the class. - - The cloud blob. - - - - Initializes a new instance of the class. - - The attributes. - The service client. - The snapshot time. - - - - Initializes a new instance of the class. - - The blob address. - The credentials. - If set to true, use path style Uris. - - - - Initializes a new instance of the class. - - The blob address. - If set to true, use path style Uris. - - - - Create the page blob. - - The size of the blob in bytes. - - - - Create the page blob. - - The size of the blob in bytes. - The request options. - - - - Begins an asynchronous operation to create a page blob. - - The maximum size of the page blob, in bytes. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Begins an asynchronous operation to create a page blob. - - The size of the blob in bytes. - A object indicating any additional options to be specified on the request. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Ends an asynchronous operation to create a page blob . - - An object of type that references the asynchronous operation. - - - - Writes page data to a page blob. - - The page data. - The start offset. - - - - Writes page data to a page blob. - - The page data. - The start offset. - A object indicating any additional options to be specified on the request. - - - - Begins an asynchronous operation to write pages to a page blob. - - The page data. - The start offset. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Begins an asynchronous operation to write pages to a page blob. - - The page data. - The start offset. - A object indicating any additional options to be specified on the request. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Ends an asynchronous operation to write pages to a page blob. - - An object of type that references the asynchronous operation. - - - - Gets a list of valid page ranges and their starting and ending bytes. - - A list of page ranges. - - - - Gets a list of valid page ranges and their starting and ending bytes. - - A object indicating any additional options to be specified on the request. - A list of page ranges. - - - - Begins an asynchronous operation to return the list of valid page ranges and their starting and ending bytes. - - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Begins an asynchronous operation to return the list of valid page ranges and their starting and ending bytes. - - A object indicating any additional options to be specified on the request. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Ends an asynchronous operation to return page ranges and their starting and ending bytes. - - An object of type that references the asynchronous operation. - A list of page ranges. - - - - Creates a stream for writing to the blob using Stream interface with automatic buffering. - - The stream to be used for writing. - This operation is not supported on PageBlob. - - - - Creates a stream for writing to the blob using Stream interface with automatic buffering. - - The options to control the upload behavior. - The stream to be used for writing. - This operation is not supported on PageBlob. - - - - Uploads a blob from a stream. - - The data stream to be uploaded. - This uses the currently set Properties/Metadata for the blob, so they need to be set before calling this API. - For optimum performance, the stream should support a length. - This operation is not supported on PageBlob. - - - - Uploads a blob from a stream. - - The data stream to be uploaded. - The options to be used for the current request to override the default behavior. - This uses the currently set Properties/Metadata for the blob, so they need to be set before calling this API. - For optimum performance, the stream should support a length. - This operation is not supported on PageBlob. - - - - Uploads a blob from a stream asynchronously. - - The data stream to be uploaded. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - - An IAsyncResult that represents the asynchronous UploadFromStream, which could still be pending. - - This uses the currently set Properties/Metadata for the blob, so they need to be set before calling this API. - For optimum performance, the stream should support a length. - This operation is not supported on PageBlob. - - - - Uploads a blob from a stream asynchronously. - - The data stream to be uploaded. - The options to be used for the current request to override the default behavior. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - - An IAsyncResult that represents the asynchronous UploadFromStream, which could still be pending. - - This uses the currently set Properties/Metadata for the blob, so they need to be set before calling this API. - For optimum performance, the stream should support a length. - This operation is not supported on PageBlob. - - - - Completes the asynchronous UploadFromStream request. Throws any exceptions provided by the server. - - A reference to the outstanding asynchronous request. - This operation is not supported on PageBlob. - - - - A convenience function to upload a string of text to a file. - - The content to be upload. - Assumes a UTF8 encoding. - This operation is not supported on PageBlob. - - - - A convenience function to upload a string of text to a file. - - The content to be upload. - The encoding to be used. - The options to control the upload behavior. - This operation is not supported on PageBlob. - - - - A convenience function to upload a file from a file system to a blob. - - The file to be uploaded. - This operation is not supported on PageBlob. - - - - A convenience function to upload a file from a file system to a blob. - - The file to be uploaded. - The options to control the upload behavior. - This operation is not supported on PageBlob. - - - - A convenience function to upload a set of bytes. - - The bytes to be uploaded. - This operation is not supported on PageBlob. - - - - A convenience function to upload a set of bytes. - - The bytes to be uploaded. - The options to control the upload behavior. - This operation is not supported on PageBlob. - - - - Creates an exception reporting that the creation method is not supported. - - The created exception. - - - - Implements the Create method. - - A object indicating any additional options to be specified on the request. - The size in bytes. - A that creates the blob. - - - - Gets the page ranges impl. - - A object indicating any additional options to be specified on the request. - The set result. - A for getting the page ranges. - - - - Implementation method for the WritePage methods. - - The page data. - The start offset. - A object indicating any additional options to be specified on the request. - A that writes the pages. - - - - Represents a Windows Azure queue. - - - - - Stores the queue attributes. - - - - - Uri for the messages. - - - - - The last time count was retrieved. - - - - - Initializes a new instance of the class with the given relative address and credentials. - - The relative address. - The storage account credentials. - - - - Initializes a new instance of the class. - - The relative address. - The storage account credentials. - If set to true, use path style Uris. - - - - Initializes a new instance of the class. - - True to use path style Uris. - The address. - The credentials. - - - - Initializes a new instance of the class. - - The queue address. - The client. - - - - Initializes a new instance of the class. - - The attributes of the queue. - The client. - - - - Creates a queue. - - - - - Begins an asynchronous operation to create a queue. - - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Ends an asynchronous operation to create a queue. - - An object of type that references the asynchronous operation. - - - - Creates the queue if it does not exist. - - true if the container did not exist and was created; otherwise false. - - - - Begins an asynchronous operation to create the queue if it does not exist. - - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Ends an asynchronous operation to create the queue if it does not exist. - - An object of type that references the asynchronous operation. - Returns true if the creation succeeded; otherwise, false. - - - - Deletes the queue. - - - - - Begins an asynchronous operation to delete the queue. - - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Ends an asynchronous operation to delete the queue. - - An object of type that references the asynchronous operation. - - - - Determines if the queue exists. - - Returns true if the queue exists; otherwise false. - - - - Begins an asynchronous operation to determine whether the queue exists. - - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Ends an asynchronous operation to determine whether the queue exists. - - An object of type that references the asynchronous operation. - Returns true if the queue exists; otherwise, false. - - - - Fetches queue attributes. - - - - - Begins an asynchronous operation to fetch queue attributes. - - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Ends an asynchronous operation to fetch queue attributes. - - An object of type that references the asynchronous operation. - - - - Sets queue metadata. - - - - - Begins an asynchronous operation to set queue metadata. - - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Ends an asynchronous operation to set queue metadata. - - An object of type that references the asynchronous operation. - - - - Retrieves the approximate message count. - - The approximate message count. - - - - Adds a message to the queue. - - The message. - - - - Adds a message to the queue. - - The message. - The message time-to-live. - - - - Begins an asynchronous operation to add a message to the queue. - - The message. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Begins an asynchronous operation to add a message to the queue. - - The message. - The message time-to-live. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Ends an asynchronous operation to add a message to the queue. - - An object of type that references the asynchronous operation. - - - - Gets a list of messages from the queue. - - The number of messages to retrieve. - A list of the messages retrieved. - - - - Gets a list of messages from the queue. - - The number of messages to retrieve. - The visibility timeout. - A list of the messages retrieved. - - - - Begins an asynchronous operation to get messages from the queue. - - The number of messages to retrieve. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Begins an asynchronous operation to get messages from the queue. - - The number of messages to retrieve. - The visibility timeout. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Ends an asynchronous operation to get messages from the queue. - - An object of type that references the asynchronous operation. - A list of the messages retrieved. - - - - Gets a single message from the queue. - - The retrieved message. - - - - Gets a single message from the queue. - - The visibility time out. - The retrieved message. - - - - Begins an asynchronous operation to get a single message from the queue. - - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An asynchronous result that represents the operation. - - - - Begins an asynchronous operation to get a single message from the queue. - - The visibility timeout. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Ends an asynchronous operation to get a single message from the queue. - - An object of type that references the asynchronous operation. - The retrieved message. - - - - Gets a message from the queue, but does not alter the visibility of the message. - - The peeked message. - - - - Begins an asynchronous operation to peek a message. - - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Ends an asynchronous operation to peek a message. - - An object of type that references the asynchronous operation. - The peeked message. - - - - Gets a list of messages from the queue, but does not alter the visibility of the messages. - - The number of messages to retrieve. - A list of peeked messages. - - - - Begins an asynchronous operation to peek messages. - - The number of messages to retrieve. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Ends an asynchronous operation to peek messages. - - An object of type that references the asynchronous operation. - A list of peeked messages. - - - - Deletes the message. - - The message. - - - - Deletes the message. - - The message id. - The pop receipt. - - - - Begins an asynchronous operation to delete the message. - - The message. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Begins an asynchronous operation to delete the message. - - The message id. - The pop receipt. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Ends an asynchronous operation to delete the message. - - An object of type that references the asynchronous operation. - - - - Clears all messages from the queue. - - - - - Begins an asynchronous operation to clear messages from the queue. - - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An object of type that references the asynchronous operation. - - - - Ends an asynchronous operation to clear messages from the queue. - - An object of type that references the asynchronous operation. - - - - Gets the individual message address. - - The message id. - The Uri of the message. - - - - Materialize results so that we can close the response object. - - List of response objects from the Protocol layer. - Projection function. - A materialized list of messages. - - - - Selects the get message response. - - The protocol message. - The parsed message. - - - - Selects the peek message response. - - The protocol message. - The parsed message. - - - - Gets the message internal. - - The visibility timeout. - The retrieved message. - - - - Gets the messages internal. - - The number of messages. - The visibility timeout. - A list of retrieved messages. - - - - Begins the get messages internal. - - The number of mesages. - The visibility timeout. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An asynchronous result that represents the operation. - - - - Existses the impl. - - The set result. - A that detects whether the queue exists. - - - - Sets the metadata impl. - - A that sets the metadata. - - - - Fetches the metadata and properties impl. - - A that fetches the attributes. - - - - Creates the impl. - - A that creates the queue. - - - - Creates if not exist impl. - - The set result. - A that creates the queue if it doesn't exist. - - - - Deletes the impl. - - A that deletes the queue. - - - - Clears the messages impl. - - A that clears the messages in the queue. - - - - Adds the message impl. - - The message. - The time to live. - A that adds the message. - - - - Peeks the messages impl. - - The number of messages. - The set result. - A that returns the peeked messages. - - - - Deletes the message impl. - - The message id. - The pop receipt. - A that deletes the message. - - - - Gets the messages impl. - - The number of messages. - The visibility timeout. - The set result. - A that gets the message. - - - - Gets the properties and metadata from response. - - The web response. - - - - Gets the object that represents the Queue service. - - The service client. - - - - Gets the queue name. - - The queue name. - - - - Gets the Uri for the queue. - - The queue's Uri. - - - - Gets the attributes of the queue. - - The queue's attributes. - - - - Gets user-defined metadata for the queue. - - The queue's metadata. - - - - Gets the approximate message count. - - The approximate message count. - - - - Gets the Uri for general message operations. - - - - - A client for accessing Windows Azure queue service. - - - - - Initializes a new instance of the class with the given base address and credentials. - - The base address. - The credentials. - - - - Initializes a new instance of the class. - - The base address Uri. - The credentials. - - - - Initializes a new instance of the class. - - The base address. - The credentials. - If set to true [use path style Uris]. - - - - Initializes a new instance of the class. - - The base address Uri. - The credentials. - If set to true [use path style Uris]. - - - - Initializes a new instance of the class. - - True to use path style Uris. - The base address Uri. - The credentials. - - - - Gets a object representing the queue. - - The relative Uri to the queue. - - A object representing the queue. - - - - - Lists all of the queues in the storage account. - - A list of queues. - - - - Lists the queues whose name begin with the specified prefix. - - The prefix to match. - A list of containers. - - - - Lists the queues whose name begin with the specified prefix. - - The prefix to match. - The details to include in the listing. - A list of queues. - - - - Lists all of the queues in the storage account. - - A that contains the first segment of queues. - - - - Lists the queues whose name begin with the specified prefix as a set of pages. - - The prefix to match. - The details to include in the listing. - A that contains the first segment of queues. - - - - Lists the queues whose name begin with the specified prefix as a set of pages. - - The prefix to match. - The details to include in the listing. - Non negative value which indicates the maximum number of results that should be returned at a time. Zero means no limit. - Note the returned ResultSegment.Results may still have less than the maxResults number of results. - Use to return the remaining results. - Optional continuationToken from previous ResultSegment for continuing listing operation. - A that contains the first segment of queues. - - - - Begins an asynchronous request for the first segment of the list of all queues in the storage account. - - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An that references the asynchronous request. - - - - Begins an asynchronous request for the first segment of the list of queues whose names begins with the specified prefix. - - The prefix to match. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An that references the asynchronous request. - - - - Begins an asynchronous request for the first segment of the list of queues whose names begins with the specified prefix. - - The prefix to match. - The details to include in the listing. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An that references the asynchronous request. - - - - Begins an asynchronous request for the first segment of the list of queues whose names begins with the specified prefix. - - The prefix to match. - The details to include in the listing. - Non negative value which indicates the maximum number of results that should be returned at a time. Zero means no limit. - Note the returned ResultSegment.Results may still have less than the maxResults number of results. - Use to return the remaining results. - Optional continuationToken from previous ResultSegment for continuing listing operation. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An that references the asynchronous request. - - - - Returns a containing the first segment of the list of queues. - - An object of type that references the asynchronous operation. - A result segment containing the results of the first request. - - - - Ends the get response. - - The asynchronous result. - The request. - The web response. - - - - Lists the queues impl. - - The prefix. - The details included. - The continuation token. - The max results. - The set result. - A for listing the queues. - - - - Lists the queues impl core. - - The prefix. - The details included. - The continuation token. - The pagination. - The set result. - A for listing the queues. - - - - Selects the response. - - The item to parse. - A object representing the item. - - - - Occurs when a response is received from the server. - - - - - Gets or sets the retry policy. - - The retry policy. - - - - Gets or sets the timeout. - - The request timeout. - - - - Gets or sets the length of the approximate message count cache. - - The length of the approximate message count cache. - - - - Gets a value indicating whether path style Uris are used. - - - Is true if using path style Uris; otherwise, false. - - - - - Gets the storage account credentials to use for the queue. - - The storage credentials. - - - - Gets or sets the base Uri. - - The base Uri. - - - - Represents a message in a queue. - - - - - The maximum message size in bytes. - - - - - The maximum amount of time a message is kept in the queue. - - - - - Maximum number of messages that can be peeked at a time. - - - - - The message content. - - - - - Initializes a new instance of the class with the given content. - - Message content. - - Regardless of whether the message content is XML or binary data, message contents are - converted to Base64 before adding the message to the queue. - Keep in mind that the size of the Base64-encoded message must be less than or equal to - the value of . - - - - - Initializes a new instance of the class with the given UTF-8 content. - - UTF-8 encoded message content. - - In this implementation, regardless of whether an XML or binary data is passed into this - function, message contents are converted to base64 before passing the data to the queue service. - When calculating the size of the message, the size of the base64 encoding is thus the important. - - - - - Gets content as bytes. - - The content as bytes. - - - - Gets the ID. - - The message ID. - - - - Gets the pop receipt. - - The pop receipt. - - - - Gets the insertion time. - - The insertion time. - - - - Gets the expiration time. - - The expiration time. - - - - Gets the next visible time. - - The next visible time. - - - - Gets the content as string. - - The message content. - - - - Gets the number of times this message has been dequeued. - - The dequeue count. - - - - A set of extensions to the to generate client objects for - the storage services. - - - - - Creates a new Blob service client. - - The storage account. - A based on the . - - - - Creates a new Queue service client. - - The storage account. - A based on the . - - - - Creates the Table service client. - - The storage account. - A based on the . - - - - A client for accessing the Windows Azure Table service. - - - - - Initializes a new instance of the class. - - The base address. - The credentials. - - - - Creates the tables needed for the specified custom TableServiceContext. - - Type of the service context. - The base address. - The credentials. - - - - Creates a new for performing operations against table storage. - - - A new for performing operations against table storage. - - - - - Attaches to the specified service context. - - The service context. - - - - Begins an asychronous operation to create a table. - - Name of the table. - The delegate. - An object containing state information for this asynchronous request. - An that references the asynchronous request. - - - - Ends an asychronous operation to create a table. - - An object of type that references the asynchronous operation. - - - - Creates the table with specified name. - - Name of the table to create. - - - - Begins an asynchronous operation to create a table with the specified name if it does not already exist. - - Name of the table. - The delegate. - An object containing state information for this asynchronous request. - An that references the asynchronous request. - - - - Ends an asynchronous operation to create a table with the specified name if it does not already exist. - - An object of type that references the asynchronous operation. - Returns true, if table was created, false otherwise. - - - - Creates the table if it does not exist. - - Name of the table. - Returns true if table was created, false otherwise. - - - - Begins an asynchronous operation to determine whether or not a table exists. - - Name of the table. - The delegate. - An object containing state information for this asynchronous request. - An that references the asynchronous request. - - - - Ends the asynchronous operation to verify if table exists. - - An object of type that references the asynchronous operation. - Returns true, if table exists, false otherwise. - - - - Checks whether the table exists. - - Name of the table. - - Returns true, if table exists, false otherwise. - - - - - Lists the tables in the storage account. - - A list of table names. - - - - Lists the tables which begin with particular prefix. - - The prefix. - A list of table names. - - - - Lists the tables as a set of pages. - - A list of table names. - - - - Lists the tables as a set of pages. - - Non negative value which indicates the maximum number of results that should be returned at a time. Zero means no limit. - Note the returned ResultSegment.Results may still have less than the maxResults number of results. - Use to return the remaining results. - Optional continuationToken from previous ResultSegment for continuing listing operation. - A list of table names. - - - - Lists the tables which begin with particular prefix as a set of pages. - - The prefix. - Non negative value which indicates the maximum number of results that should be returned at a time. Zero means no limit. - Note the returned ResultSegment.Results may still have less than the maxResults number of results. - Use to return the remaining results. - Optional continuationToken from previous ResultSegment for continuing listing operation. - A list of table names. - - - - Begins the asynchronous operation to list tables. - - A callback method that is called when the asynchronous operation completes. - The user-provided state. - An that references the asynchronous request. - - - - Begins the asynchronous operation to list tables. - - The prefix. - A callback method that is called when the asynchronous operation completes. - The user-provided state. - - An that references the asynchronous request. - - - - - Begins the asynchronous operation to list tables. - - The prefix. - Non negative value which indicates the maximum number of results that should be returned at a time. Zero means no limit. - Note the returned ResultSegment.Results may still have less than the maxResults number of results. - Use to return the remaining results. - Optional continuationToken from previous ResultSegment for continuing listing operation. - A callback method that is called when the asynchronous operation completes. - The user-provided state. - - An that references the asynchronous request. - - - - - Ends the asynchronous operation to list tables. - - An object of type that references the asynchronous operation. - A segment containing current results and information to retrieve additional results. - - - - Begins the asynchronous operation to delete a table. - - Name of the table. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - - An that references the asynchronous request. - - - - - Ends an asynchronous operation to delete a table. - - An object of type that references the asynchronous operation. - - - - Deletes the table. - - Name of the table. - - - - Begins the asynchronous operation to delete the tables if it exists. - - Name of the table. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - - An that references the asynchronous request. - - - - - Ends the asynchronous operation to delete the tables if it exists. - - An object of type that references the asynchronous operation. - Returns true, if the table was deleted, false otherwise. - - - - Deletes the table if it exists. - - Name of the table. - Returns true, if the table was deleted, false otherwise. - - - - Gets the result or default. - - The type of the result. - The task to retrieve the result from. - Receives result of the task. - Returns true if the result was returned; otherwise, false. - - - - Creates the table implementation. - - Name of the table. - A sequence of tasks to do the operation. - - - - Creates the table if not exist implementation. - - Name of the table. - The set result. - A sequence of tasks to do the operation. - - - - Verifies whether the table exist implementation. - - Name of the table. - The set result. - A sequence of tasks to do the operation. - - - - Lists the tables segmented impl. - - The prefix. - The max results. - The continuation token. - The set result. - A that lists the tables. - - - - Lists the tables segmented implementation. - - The prefix. - The continuation token. - The pagination. - The last result. - The set result. - A sequence of tasks to do the operation. - - - - Delete table implementation. - - Name of the table. - A sequence of tasks to do the operation. - - - - Deletes table if exists implementation. - - Name of the table. - The set result. - A sequence of tasks to do the operation. - - - - Gets the base Uri for the Table service. - - The base Uri. - - - - Gets or sets the retry policy for all of the requests by the service client. - - The retry policy. - - - - Gets or sets the timeout for all of the requests by the service client. - - The request timeout. - - - - Gets the credentials used by the client. - - The credentials. - - - - Represents a single query request to the Windows Azure Table service. - - The type of the query result. - - - - Stores the header prefix for continuation information. - - - - - Stores the header suffix for the next partition key. - - - - - Stores the header suffix for the next row key. - - - - - Stores the table suffix for the next table name. - - - - - Stores the maximum results the table service can return. - - - - - Stores the pagination options. - - - - - Stores the wrapped . - - - - - Initializes a new instance of the class with the specified . - - The object to wrap. - - - - Initializes a new instance of the class with the specified and . - - The object to wrap. - The to use when retrying requests. - - - - Executes the query with retries and returns the results. - - The results of the query. - The method makes one request when it is called and further requests as elements are read from the returned result. - - - - Executes the query with retries and returns the results. - - Optional continuationToken from previous ResultSegment for continuing listing operation. - The results of the query. - The method makes one request when it is called and further requests as elements are read from the returned result. - - - - Begins an asynchronous request for the first segment of results of a query. - - The delegate. - An object containing state information for this asynchronous request. - An that references the asynchronous request. - - - - Begins an asynchronous request for the first segment of results of a query. - - Optional continuationToken from previous ResultSegment for continuing listing operation. - The delegate. - An object containing state information for this asynchronous request. - An that references the asynchronous request. - - - - Returns the first segment of results of an asynchronous request to execute a query. - - The reference to the pending asynchronous request to finish. - A that contains the first segment of results. - - - - Expands the specified path. - - The path to expand. - A new query with the expanded path. - - - - Returns an enumerator that iterates through the collection. - - - A that can be used to iterate through the collection. - - - - - Returns a that represents this instance. - - - A that represents this instance. - - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Executes the segmented impl. - - The continuation token. - The set result. - A that executes the query and returns the first segment of results. - - - - Rewrites the query for take count. - - The local query. - The pagination. - The rewritten query. - - - - Applies the continuation to query. - - The continuation token. - The local query. - The modified query. - - - - Gets the query take count. - - The query. - The take count of the query, if any. - - - - Gets the table continuation from response. - - The response. - The continuation. - - - - Gets or sets the to use when retrying requests. - - The retry policy. - - - - Gets the type of the element(s) that are returned when the expression tree associated with this instance of is executed. - - - A that represents the type of the element(s) that are returned when the expression tree associated with this object is executed. - - - - - Gets the expression tree that is associated with the instance of . - - - The that is associated with this instance of . - - - - - Gets the query provider that is associated with this data source. - - - The that is associated with this data source. - - - - - A set of common utilities for use in verfication. - - - - - Throws an exception if the string is empty or null. - - The name of the parameter. - The value of the parameter. - Thrown if value is empty. - Thrown if value is null. - - - - Throw an exception if the value is null. - - The name of the parameter. - The value of the parameter. - Thrown if value is null. - - - - Throw an exception indicating argument is out of range. - - The name of the parameter. - The value of the parameter. - - - - Throw an exception if the argument is out of bounds. - - The type of the value. - The name of the parameter. - The value of the parameter. - The minimum value for the parameter. - The maximum value for the parameter. - - - - Combines AssertNotNullOrEmpty and AssertInBounds for convenience. - - The name of the parameter. - Turns on or off null/empty checking. - The value of the parameter. - The maximum size of value. - - - - Throws if the result segment does not have more results. - - The type of the batch context. - The result segment to check. - - - - Determines if a Uri requires path style addressing. - - The Uri to check. - Returns true if the Uri uses path style addressing; otherwise, false. - - - - Asserts the segment result not empty. - - The type of the result segment. - The result. - - - - Performs a 'magic enumerator' lazy segmented enumeration. - - The type of the result. - The task sequence generator that produces the first segment. - The retry policy to use. - A 'magic enumerator' that makes requests when needed and chains segments accordingly. - - - - Rounds up to seconds. - - The time span. - The time rounded to seconds. - - - - Rounds up to seconds. - - The time span. - The time rounded to seconds. - - - - Rounds up to milliseconds. - - The time span. - The time rounded to milliseconds. - - - - Rounds up to milliseconds. - - The time span. - The time rounded to milliseconds. - - - - When calling the Get() operation on a queue, the content of messages - returned in the REST protocol are represented as Base64-encoded strings. - This internal function transforms the Base64 representation into a byte array. - - The Base64-encoded string. - The decoded bytes. - - - - Applies the request optimizations such as disabling buffering and 100 continue. - - The request to be modified. - The length of the content, -1 if the content length is not settable. - - - - Look for an inner exception of type DataServiceClientException. Different versions of Sytem.Data.Services.Client - have different levels of wrapping of a DataServiceClientException. - - The exception. - The found exception or null. - - - - Asserts the type of the continuation. - - The continuation token. - Type of the continuation. - - - - Specifies which details to include when listing the containers in this storage account. - - - - - No additional details. - - - - - Include container metadata. - - - - - Include all available details. - - - - - The set of options describing delete operation. - - - - - Don't delete snapshots. - - - - - Delete the blob and its snapshots. - - - - - Delete the blob's snapshots only. - - - - - Contains methods for dealing with events. - - - - - This sets the event handler with request and response data and - translates storage exceptions. - - The request. - The async result. - The handler. - The sender. - The processed response. - - - - Set the event handler. - - The request. - The web response. - The event handler. - The sender. - The exception. - - - - The lease status of the blob. - - - - - The lease status is not specified. - - - - - The blob is locked for exclusive-write access. - - - - - The blob is not locked for exclusive-write access. - - - - - Represents a block retrieved from the blob's block list. - - - - - Gets the name of the block. - - The block name. - - - - Gets the size of block in bytes. - - The block size. - - - - Gets a value indicating whether the BlockListItem returned is committed or uncommitted. - - Is true if committed; otherwise, false. - - - - Contains methods for dealing with navigation. - - - - - Used in address parsing. - - - - - Used in address parsing. - - - - - Used in address parsing. - - - - - Used to split string on slash. - - - - - Used to split hostname. - - - - - Retrieves the container part of a storage Uri. - - The BLOB address. - True to use path style Uris. - Name of the container. - - Any trailing slash is always removed. - - GetContainerName(new Uri("http://test.blob.core.windows.net/mycontainer/myfolder/myblob")) will return "mycontainer" - GetConatinerName(new Uri("http://test.blob.core.windows.net/mycontainer")) will return "mycontainer" - GetConatinerName(new Uri("http://test.blob.core.windows.net/")) will throw ArgumentException - - - - - - Retreives the complete container address from a storage Uri - Example GetContainerAddress(new Uri("http://test.blob.core.windows.net/mycontainer/myfolder/myblob")) - will return http://test.blob.core.windows.net/mycontainer. - - The BLOB address. - True to use path style Uris. - Uri of the container. - - - - Retreives the parent name from a storage Uri. - - The BLOB address. - The delimiter. - If set to true use path style Uris. - The name of the parent. - - Adds the trailing delimiter as the prefix returned by the storage REST api always contains the delimiter. - - - GetParentName(new Uri("http://test.blob.core.windows.net/mycontainer/myfolder/myblob", "/")) will return "/mycontainer/myfolder/" - GetParentName(new Uri("http://test.blob.core.windows.net/mycontainer/myfolder|myblob", "|") will return "/mycontainer/myfolder|" - GetParentName(new Uri("http://test.blob.core.windows.net/mycontainer/myblob", "/") will return "/mycontainer/" - GetParentName(new Uri("http://test.blob.core.windows.net/mycontainer", "/") will return "/mycontainer/" - - - - - Retrieves the parent address for a blob Uri. - - The BLOB address. - The delimiter. - If set to true use path style Uris. - The address of the parent. - - GetParentName(new Uri("http://test.blob.core.windows.net/mycontainer/myfolder/myblob", null)) - will return "http://test.blob.core.windows.net/mycontainer/myfolder/" - - - - - Get service client address from a complete Uri. - - Complete address of the resource. - True to use path style Uris. - Uri of the service client. - - GetServiceClientBaseAddress("http://testaccount.blob.core.windows.net/testconatiner/blob1") - returns "http://testaccount.blob.core.windows.net" - - - - - Gets the service client base address. - - The address Uri. - The use path style Uris. - The base address of the client. - - - - Appends a path to a Uri correctly using "/" as separator. - - The base Uri. - The relative or absloute URI. - The appended Uri. - - AppendPathToUri(new Uri("http://test.blob.core.windows.net/test", "abc") - will return "http://test.blob.core.windows.net/test/abc" - AppendPathToUri(new Uri("http://test.blob.core.windows.net/test"), "http://test.blob.core.windows.net/test/abc") - will return "http://test.blob.core.windows.net/test/abc" - - - - - Append a relative path to a Uri, handling traling slashes appropiately. - - The base Uri. - The relative or absloute URI. - The seperator. - The appended Uri. - - - - Get container name from address for styles of paths - Eg: http://test.blob.core.windows.net/container/blob => container - http://127.0.0.1:10000/test/container/blob => container. - - The container Uri. - If set to true use path style Uris. - The container name. - - - - Gets the canonical path from creds. - - The credentials. - The absolute path. - The canonical path. - - - - Similar to getting container name from Uri. - - The queue Uri. - If set to true use path style Uris. - The queue name. - - - - Retrieve the container address and address. - - The BLOB address. - True to use path style Uris. - Name of the container. - The container URI. - - - - Represents a range of pages. - - - - - Initializes a new instance of the class. - - The start offset. - The end offset. - - - - Returns a that represents this instance. - - - A that represents this instance. - - - - - Gets the start offset of the page range. - - The start offset. - - - - Gets the end offset of the page range. - - The end offset. - - - - Class used to upload blocks for a blob in parallel. - - The parallelism factor is configurable at the CloudBlobClient. - - - - Stores the block size. - - - - - Stores the blob we're uploading. - - - - - Stores the request options to use. - - - - - Stores the blob's hash. - - - - - Stores the source stream to upload from. - - - - - Stores the dispensized stream size. - - - - - Bound on number of parallel active tasks (threads). - - - - - The list of uploaded blocks. - - - - - Number of block creation tasks. - - - - - Number of block upload tasks created. - - - - - Number of dispenser calls. - - - - - Initializes a new instance of the class. - - The source stream. - The request options. - The block size to use. - The blob to upload to. - - - - Perform a parallel upload of blocks for a blob from a given stream. - - The upload func. - A that uploads the blob in parallel. - - The operation is done as a series of alternate producer and consumer tasks. The producer tasks dispense out - chunks of source stream as fixed size blocks. This is done in serial order on a thread using InvokeTaskSequence's - serial execution. The consumer tasks upload each block in parallel on multiple thread. The producer thread waits - for at least one consumer task to finish before adding more producer tasks. The producer thread quits when no - more data can be read from the stream and no other pending consumer tasks. - - - - - Completes the asyncresult. - - The async results. - The index. - - - - Gets the wait timeout. - - The options. - The wait timeout. - - - - Upload a single block. This can happen on parallel threads. - - The set result. - A that dispenses a block stream. - - - - Gets the parallelism factor. - - The parallelism factor. - - - - As a final step upload the block list to commit the blob. - - A that commits the blob. - - - - Assists in protocol implementation. - - - - - Gets the web request. - - The service client. - The options. - The retrieve request. - The web request. - - - - Parses the response XML from a Set Container ACL operation to retrieve container-level access policy data. - - - - - A base class to parse XML streams from the storage services. - - The type to be parsed. - - - - Used to designate when all parsable objects are consumed. - - - - - Stores any parsed objects that haven't been returned to the user due to specific requirement. - - - - - The reader used for parsing. - - - - - The IEnumerator over the parsed content. - - - - - Used to make sure that parsing is only done once, since a stream is not re-entrant. - - - - - Initializes a new instance of the ResponseParsingBase class. - - The stream to be parsed. - - - - Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - - - - - Parses the XML by using an overriden parsing function that will perform the specific parsing and flag setting. - - A list of enumerable objects in the XML. - - - - Releases unmanaged and - optionally - managed resources. - - Specify true to release both managed and unmanaged resources; false to release only unmanaged resources. - - - - All other properties will be some variable type such as a string or int. We don't really care about the resulting value in - the base, but this logic will control how far we parse. There can be an arbitrary number of these flags in the ParseXml() method, - so we pass them in by reference here. - - When set to true the value is now consumable. - - - - Parses the XML and close. - - A list of parsed results. - - - - Gets the parsable objects: For each class that inherits from this base, there is exactly one property the is an IEnumerable. This is - what should be returned in that case. - - The objects to parse. - - - - Initializes a new instance of the class. - - The stream to be parsed. - - - - Parses the response XML from a Set Container ACL operation to retrieve container-level access policy data. - - A list of enumerable key-value pairs. - - - - Gets the container-level access policy identifiers. - - The access identifiers. - - - - Represents a container item returned in the XML response for a List Containers operation. - - - - - Initializes a new instance of the class. - - - - - Gets the attributes for this container item. - - The attributes. - - - - Represents a blob item returned in the XML response for a List Blobs operation. - - - - - Interface for items that appear in the Blobs section of the XML response for a List Blobs operation. - - - - - Initializes a new instance of the class. - - The name of the blob. - The blob's attributes. - - - - Gets the attributes for this blob item. - - The blob's attributes. - - - - Gets the name of the blob. - - The name of the blob. - - - - Provides context for the List Blobs operation. - - - - - Represents the listing context for enumeration operations. - - - - - Initializes a new instance of the class. - - Optional. Filters the results to return only blobs whose names - begin with the specified prefix. - Optional. Specifies the maximum number of blobs to return, - including all BlobPrefix elements. - - If maxresults is not specified, the server will - return up to 5,000 items. Setting maxresults to a value greater than 5,000 results - in error response code 400 (Bad Request). - - - - - Gets or sets the prefix string. - - The prefix. - - Including a prefix string on the request filters the results to return only blobs whose names - begin with the specified prefix. - - - - - Gets or sets the max results. - - The max results. - - Specifies the maximum number of blobs to return, including all BlobPrefix elements. - If maxresults is not specified, the server will return up to 5,000 items. Setting - maxresults to a value greater than 5,000 results in error response code 400 (Bad Request). - - - - - Gets or sets the marker. - - - A string value that identifies the portion of the - list to be returned with the next list operation. The operation returns a marker - value within the response body if the list returned was not complete. The marker - value may then be used in a subsequent call to request the next set of list items. - - The marker. - - - - Initializes a new instance of the class. - - The blob prefix. - The maximum number of results to return. - The blob delimiter. - The include parameter. - - - - Gets or sets the delimiter for a List Blobs operation. - - The delimiter. - - The delimiter parameter enables the caller to traverse the blob namespace by using a user-configured delimiter. - Using this parameter, it is possible to traverse a virtual hierarchy of blobs as though it were a file system. - - - - - Gets or sets the value of the include parameter. - - The include parameter. - - The include parameter specifies that the response should include one or more of the following subsets: snapshots, - metadata, uncommitted blobs. - - - - - The blob prefix, as returned in the Blobs section of the XML response for a List Blobs operation. - - - - - Gets the prefix string. - - The prefix string. - - - - Provides an implementation of the class for blobs and queues - for the Shared Key authentication scheme. - - - - - Describes the base canonicalization used for a request. - - - - - Canonicalizes the HTTP request based on the specified strategy. - - The request to canonicalize. - Name of the account. - Canonicalization of the request fields. - - - - Create a canonicalized string out of HTTP request header contents for signing - Blob or Queue servoce requests under the Shared Key Lite authentication scheme. - - The Uri address of the HTTP request. - The storage account name. - The method of the HTTP request (GET/PUT, etc.). - The content type of the HTTP request. - The date/time specification for the HTTP request. - Additional headers specified on the HTTP request. - A canonicalized string. - - - - Create a canonicalized string out of HTTP request header contents for signing - Blob or Queue service requests under the Shared Authentication scheme. - - The Uri address of the HTTP request. - The storage account name. - The method of the HTTP request (GET/PUT, etc.). - The content type of the HTTP request. - The length of the HTTP request in bytes. - The date/time specification for the HTTP request. - Additional headers specified on the HTTP request. - - The canonicalized string. - - - - - Gets the standard HTTP header value. - - The collection of headers. - The name of the header. - The header value. - - - - A helper function for extracting HTTP header values from a NameValueCollection object. - - A NameValueCollection object that should contain HTTP header name-values pairs. - Name of the header. - A array list of values for the header. The values are in the same order as they are stored in the NameValueCollection object. - - - - Appends a string to the canonicalized resource string. - - The canonicalized string. - The string to append. - The modified canonicalized resource string. - - - - Gets the canonicalized resource for the Shared Key Lite authentication scheme. - - The resource address. - The name of the storage account. - The canonicalized resource string. - - - - Gets the canonicalized resource for the Shared Key authentication scheme. - - The resource address. - The name of the storage account. - The canonicalized resource string. - - - - Adds the canonicalized resource for version 2. - - The address. - Name of the account. - The canonicalized string. - - - - Add the resource name. - - The address. - Name of the account. - The canonicalized string. - - - - Add x-ms- prefixed headers in a fixed order. - - The headers. - The canonicalized string. - - - - Canonicalizes the HTTP request. - - An HttpWebRequest object. - Name of the storage account. - - The canonicalized string for the request. - - - - - Provides an implementation of the class for blobs and queues - for the Shared Key Lite authentication scheme. - - - - - Canonicalizes the HTTP request. - - An HttpWebRequest object. - Name of the storage account. - - The canonicalized string for the request. - - - - - A factory class for constructing blob requests. - - - - - Creates a new block blob or page blob, or updates the content of an existing block blob. - - The Uri for the blob. - The timeout for operation. - The properties for blob. - Type of the blob. - The lease ID, if the blob has an active lease. - Size of the blob for page blobs; for block blobs this parameter is ignored. - A web request for performing the operation. - - - - Returns an object to delete the specified blob. - - The resource Uri. - The operation timeout. - The snapshot version, if the blob is a snapshot. - A object indicating whether to delete snapshots. - The lease ID. Required if the blob has an active lease. - A web request for performing the operation. - - - - Returns the user-defined metadata for this blob. - - The blob's Uri. - The operation timeout. - The snapshot time. - The lease ID, if the blob has an active lease. - A web request for performing the operiaton. - - - - Sets user-defined metadata for the blob. - - The blob's Uri. - The operation timeout. - The lease ID, if the blob has an active lease. - - A web request for performing the operation. - - - - - Signs the request. - - The request. - The credentials. - - - - Adds user-defined metadata to the blob. - - The request. - The metadata. - - - - Adds user-defined metadata to the blob. - - The request to modify. - The metadata name. - The metadata value. - - - - Returns user-defined metadata for this blob. - - The blob's Uri. - The operation timeout. - The snapshot time. - The lease ID. - - A web request for performing the operation. - - - - - Signs the request for shared key lite. - - The request. - The credentials. - - - - Adds a conditional header. - - The request. - The conditional header. - The blob's ETag. - - - - Adds a conditional header. - - The request. - The conditional header. - The date and time specification for the request. - - - - Returns the list of all blobs under this container. - - The blob's Uri. - The operation timeout. - The listing context. - A web request for performing the operation. - - - - Returns an object to copy a blob. - - The resource Uri. - The operation timeout. - The source blob. - The snapshot version, if the source blob is a snapshot. - A condition on the source blob. - The value of the condition. - The lease ID for the source blob. - A web request for performing the operation. - - - - Returns an object to get the blob's content, properties, and metadata. - - The resource Uri. - The operation timeout. - The snapshot version, if the blob is a snapshot. - The lease ID. Optional. - - A web request for performing the operation. - - - - - Returns a portion (range) of the blob's content with properties and metadata. - - The blob's Uri. - The operation timeout. - The snapshot. - The offset at which request starts. - The number of bytes to download. - Optional lease ID. - A web request for performing the operation. - - - - Returns the list of blocks for the List blob. - - The blob's Uri. - The operation timeout. - The snapshot time. - Type of the blocks included in the list. - Optional lease ID. - A web request for performing the operation. - - - - Return a list of active page ranges for the page blob. - - The blob's Uri. - The operation timeout. - The snapshot time. - The lease ID, if the blob has an active lease. - A web request for performing the operation. - - - - Acquires, renews, releases or breaks the lease for the blob. - - The blob's Uri. - The operation timeout. - The action to perform. - The lease ID, if the blob has an active lease. - A web request for performing the operation. - - - - Writes a block that will be part of a blob. - - The blob's Uri. - The operation timeout. - The block ID. - Optional lease ID. - A web request for performing the operation. - - - - Commits a blob by specifying the list of block IDs that make up the blob. - - The blob's Uri. - The operation timeout. - The properties. - The lease ID, if the blob has an active lease. - - A web request for performing the operation. - - - - - Writes the block list body. - - The blocks. - The output stream. - - - - Writes or Clear range of pages into Blob. - - The blob's Uri. - The operation timeout. - The blob's properties. - The lease ID, if the blob has an active lease. - A web request for performing the operation. - - - - Set the user-defined properties for a blob. - - The blob's Uri. - The operation timeout. - The blob's properties. - The lease ID, if the blob has an active lease. - The new blob size if non-null; only applicable to page blob under the current protocol. - A web request for performing the operation. - - - - Create a snapshot for the blob. - - The blob's Uri. - The operation timeout. - A web request for performing the operation. - - - - Adds the snapshot. - - The builder. - The snapshot. - - - - Creates the web request. - - The Uri of the resource. - The timeout to apply. - The query builder to use. - The resulting . - - - - Provides a starting point for parsing any blob responses. - - - - - Parses the error response. - - The response from server. - A containing information about the response. - - - - Gets the metadata from the response. - - The response from server. - A containing all of the user-defined metadata. - - - - Gets the metadata for a specific name. - - The response received from server. - The name of the specific metadata header. - An array of metadata values. - - - - Gets the properties and metadata from server request. - - The response from the server. - The properties and metadata returned from the server. - - - - Gets the request id from response. - - The response from server. - The request ID from ther server. - - - - Gets the snapshot time from the snapshot request. - - The response for a snapshot request. - A string representation of the DateTime of the snapshot. - - - - Parses the ListBlobs response. - - The stream for the response. - A class used for parsing out details of the ListBlobs operation. - - - - Parses the ListBlobs response. - - The response from server. - A class used for parsing out details of the ListBlobs operation. - - - - Parses the GetBlockList response. - - The stream for the response. - A class used for parsing out details of the GetBlockList operation. - - - - Parses the GetBlockList response. - - The response of the operation. - A class used for parsing out details of the GetBlockList operation. - - - - Parses the GetPageRanges response. - - The stream for the response. - A class used for parsing out details of the GetPageRanges operation. - - - - Parses the GetPageRanges response. - - The response of the request. - A class used for parsing out details of the GetPageRanges operation. - - - - The block lists to search for blocks specified by a Put Block List operation. - - - - - Committed blocks only. - - - - - Uncommitted blocks only. - - - - - Latest available. - - - - - Retrieve appropriate version of CanonicalizationStrategy based on the webrequest - for Blob Queue and Table. - - - - - Stores the version 1 blob/queue full signing strategy. - - - - - Stores the version 1 table lite signing strategy. - - - - - Stores the version 2 blob/queue full signing strategy. - - - - - Stores the version 1 table full signing strategy. - - - - - Gets canonicalization strategy for Blob and Queue SharedKey Authentication. - - The request. - The canonicalization strategy. - - - - Get canonicalization strategy for Tables for SharedKeyLite Authentication. - - The request. - The canonicalization strategy. - - - - Gets the table full canonicalization strategy. - - The request. - The canonicalization strategy. - - - - Gets the BLOB queue lite canonicalization strategy. - - The request. - The canonicalization strategy. - - - - Determines whether [is target version2] [the specified request]. - - The request. - - Returns true if [is target version2] [the specified request]; otherwise, false. - - - - - Gets the BLOB queue full ver1. - - The BLOB queue full ver1. - - - - Gets the table lite ver1. - - The table lite ver1. - - - - Gets the table full ver1. - - The table full ver1. - - - - Gets the BLOB queue full ver2. - - The BLOB queue full ver2. - - - - An internal class that stores the canonicalized string version of an HTTP request. - - - - - Stores the internal that holds the canonicalized string. - - - - - Initializes a new instance of the class. - - The first canonicalized element to start the string with. - - - - Append additional canonicalized element to the string. - - An additional canonicalized element to append to the string. - - - - Gets the canonicalized string. - - - - - Conditional headers. - - - - - No conditions. - - - - - If the resource has not been modified since the specified time. - - - - - If the specified ETag matches the value stored by the service. - - - - - If the resource has been modified since the specified time. - - - - - If the specified ETag does not match the value stored by the service. - - - - - Contains storage constants. - - - - - Maximum number of shared access policy identifiers supported by server. - - - - - Default Write Block Size used by Blob stream. - - - - - Default Read Ahead Size used by Blob stream. - - - - - The maximum size of a blob before it must be separated into blocks. - - - - - The maximum size of a blob with blocks. - - - - - The maximum size of a single block. - - - - - The maximum number of blocks. - - - - - Default size of buffer for unknown sized requests. - - - - - The size of a page in a PageBlob. - - - - - A constant representing a kilo-byte (Non-SI version). - - - - - A constant representing a megabyte (Non-SI version). - - - - - A constant representing a megabyte (Non-SI version). - - - - - XML element for committed blocks. - - - - - XML element for uncommitted blocks. - - - - - XML element for blocks. - - - - - XML element for names. - - - - - XML element for sizes. - - - - - XML element for block lists. - - - - - XML element for queue message lists. - - - - - XML element for queue messages. - - - - - XML element for message IDs. - - - - - XML element for insertion times. - - - - - XML element for expiration times. - - - - - XML element for pop receipts. - - - - - XML element for the time next visible fields. - - - - - XML element for message texts. - - - - - XML element for dequeue counts. - - - - - XML element for page ranges. - - - - - XML element for page list elements. - - - - - XML element for page range start elements. - - - - - XML element for page range end elements. - - - - - XML element for delimiters. - - - - - XML element for blob prefixes. - - - - - XML element for content type fields. - - - - - XML element for content encoding fields. - - - - - XML element for content language fields. - - - - - XML element for content length fields. - - - - - XML element for blobs. - - - - - XML element for prefixes. - - - - - XML element for maximum results. - - - - - XML element for markers. - - - - - XML element for the next marker. - - - - - XML element for the ETag. - - - - - XML element for the last modified date. - - - - - XML element for the Url. - - - - - XML element for blobs. - - - - - Constant signalling a page blob. - - - - - Constant signalling a block blob. - - - - - Constant signalling the blob is locked. - - - - - Constant signalling the blob is unlocked. - - - - - XML element for blob types. - - - - - XML element for the lease status. - - - - - XML element for snapshots. - - - - - XML element for containers. - - - - - XML element for a container. - - - - - XML element for queues. - - - - - XML element for the queue name. - - - - - Version 2 of the XML element for the queue name. - - - - - XML element for the queue. - - - - - XML element for the metadata. - - - - - XML element for an invalid metadata name. - - - - - XPath query for error codes. - - - - - XPath query for error messages. - - - - - XML element for maximum results. - - - - - XML element for committed blocks. - - - - - XML element for uncommitted blocks. - - - - - XML element for the latest. - - - - - XML element for signed identifiers. - - - - - XML element for a signed identifier. - - - - - XML element for access policies. - - - - - XML attribute for IDs. - - - - - XML element for the start time of an access policy. - - - - - XML element for the end of an access policy. - - - - - XML element for the permissions of an access policy. - - - - - The maximum size of a string property for the table service in bytes. - - - - - The maximum size of a string property for the table service in chars. - - - - - The name of the special table used to store tables. - - - - - The Uri path component to access the messages in a queue. - - - - - XML root element for errors. - - - - - XML element for error codes. - - - - - XML element for error messages. - - - - - XML element for exception details. - - - - - XML element for exception messages. - - - - - XML element for stack traces. - - - - - XML element for the authentication error details. - - - - - XML namespace for the WCF Data Services metadata. - - - - - XML element for table error codes. - - - - - XML element for table error messages. - - - - - Default client side timeout for all service clients. - - - - - This is used to create BlockIDs. The prefix must be Base64 compatible. - - - - - The minimum supported value for the table service. - - - - - The timeout after which the WCF Data Services bug workaround kicks in. - - - - - Constants for HTTP headers. - - - - - Master Windows Azure Storage header prefix. - - - - - Header prefix for properties. - - - - - Header prefix for metadata. - - - - - Header for data ranges. - - - - - Header for storage version. - - - - - Header for copy source. - - - - - Header for the If-Match condition. - - - - - Header for the If-Modified-Since condition. - - - - - Header for the If-None-Match condition. - - - - - Header for the If-Unmodified-Since condition. - - - - - Header for the blob content length. - - - - - Header for the blob type. - - - - - Header for snapshots. - - - - - Header to delete snapshots. - - - - - Header that specifies approximate message count of a queue. - - - - - Header that specifies a range. - - - - - Header that specifies blob caching control. - - - - - Header that specifies blob content encoding. - - - - - Header that specifies blob content language. - - - - - Header that specifies blob content MD5. - - - - - Header that specifies blob content type. - - - - - Header that specifies blob content length. - - - - - Header that specifies lease ID. - - - - - Header that specifies page write mode. - - - - - Header that specifies the date. - - - - - Header indicating the request ID. - - - - - Header that specifies public access to blobs. - - - - - Format string for specifying ranges. - - - - - Current storage version header value. - - - - - Specifies the page blob type. - - - - - Specifies the block blob type. - - - - - Specifies only snapshots are to be included. - - - - - Specifies snapshots are to be included. - - - - - Constants for query strings. - - - - - Query component for snapshot time. - - - - - Query component for the signed SAS start time. - - - - - Query component for the signed SAS expiry time. - - - - - Query component for the signed SAS resource. - - - - - Query component for the signed SAS permissions. - - - - - Query component for the signed SAS identifier. - - - - - Query component for the signed SAS version. - - - - - Query component for SAS signature. - - - - - Factory class for generating blob container requests. - - - - - Creates a new container. - - The container's Uri. - The operation timeout. - - A web request for performing the operation. - - - - - Deletes the container and all of its blobs. - - The container's Uri. - The operation timeout. - - A web request for performing the operation. - - - - - Retrieves metadata headers on the container. - - The container's Uri. - The operation timeout. - - A web request for performing the operation. - - - - - Returns the user-defined metadata for this container. - - The container Uri. - The timeout. - - A web request for performing the operation. - - - - - Sets user-defined metadata for the container. - - The container's Uri. - The operation timeout. - - A web request for performing the operation. - - - - - Signs the request. - - The request. - The credentials. - - - - Adds the metadata. - - The request. - The metadata. - - - - Adds the metadata. - - The web request. - The metadata name. - The metadata value. - - - - Signs the request for shared key lite. - - The request. - The credentials. - - - - Adds the conditional. - - The web request. - The header to modify. - The ETag to use. - - - - Adds the conditional. - - The request. - The header. - The date time. - - - - Returns the list of all containers under this storage account. - - The account's Uri. - The operation timeout. - The listing context. - Extra details to include in the listing. - A web request for the specified operation. - - - - Returns the ACL for this container. - - The container Uri. - The timeout. - A web request for performing the operation. - - - - Sets the ACL for the container. - - The container Uri. - The timeout. - Set to "container" or "blob" to set or use empty to clear it. - A web request for performing the operation. - - - - Writes the shared access identifiers. - - The shared access policy set. - The output stream. - - - - Gets the container Uri query builder. - - A for the container. - - - - Creates the web request. - - The container's Uri. - The operation timeout. - The query builder to use. - A web request for performing the operation. - - - - Used to parse the HttpWebResponse of a ContainerRequest. - - - - - Parses the error response. - - The response from server. - A containing information about the response. - - - - Gets the metadata from the response. - - The response from server. - A containing all of the user-defined metadata. - - - - Gets the metadata for a specific name. - - The response received from server. - The name of the specific metadata header. - An array of metadata values. - - - - Gets the properties and metadata from server request. - - The response from the server. - The properties and metadata returned from the server. - - - - Gets the request id from response. - - The response from server. - The request ID from the server. - - - - Gets the acl for the container. - - The response for the GetAcl request. - A string representing the level of ACL. - - - - Parses a List containers request's response. - - The response from server. - A for parsing ListContainers request. - - - - Credentials used to sign a request against the storage services. - - - - - Initializes a new instance of the class. - - The storage account name. - The storage account key. - - - - Initializes a new instance of the class. - - The storage account name. - The account key as a Base64-encoded string. - - - - Retrieve the account key. - - A copy of the account key. - - - - Retrieve the key in base64 encoded form. - - The account key as a base64 encoded string. - - - - Gets the account name used in signing request. - - The name of the account. - - - - Gets the key used in signing request. - - - - - Parses the XML response for a Get Block List operation. - - - - - Initializes a new instance of the class. - - The stream to be parsed. - - - - Parses the XML response returned by a Get Block List operation. - - A list of blocks. - - - - Gets a list of blocks from the response. - - The list of blocks. - - - - Parses the XML response for a Get Messages operation. - - - - - Initializes a new instance of the class. - - The stream of messages to parse. - - - - Parses the response XML for a Get Messages operation. - - A list of objects in the response XML. - - - - Gets a list of messages from the response. - - The messages. - - - - Parse the XML response for a Get Page Ranges operation. - - - - - Initializes a new instance of the class. - - The stream of page ranges to be parsed. - - - - Parses the XML response for a Get Page Ranges operation. - - A list of enumerable objects in the XML. - - - - Gets a list of page ranges. - - The page ranges. - - - - Actions that can be performed on a lease. - - - - - Acquire the lease. - - - - - Renew the lease. - - - - - Release the lease. - - - - - Break the lease. - - - - - Parses the response XML for a List Blobs operation. - - - - - Stores the blob prefix. - - - - - Signals when the blob prefix can be consumed. - - - - - Stores the marker. - - - - - Signals when the marker can be consumed. - - - - - Stores the blob delimiter. - - - - - Signals when the blob delimiter can be consumed. - - - - - Stores the max results. - - - - - Signals when the max results can be consumed. - - - - - Stores the next marker. - - - - - Signals when the next marker can be consumed. - - - - - Initializes a new instance of the class. - - The stream to be parsed. - - - - Parses the response XML for a List Blobs operation. - - A list of enumerable objects in the XML. - - - - Gets the listing context from the XML response. - - The listing context. - - - - Gets a list of blobs from the XML response. - - The blobs. - - - - Gets the prefix from the XML response. - - The prefix. - - - - Gets the marker from the XML response. - - The marker. - - - - Gets the delimiter from the XML response. - - The delimiter. - - - - Gets the maximum results value from the XML response. - - The max results. - - - - Gets the next marker value from the XML response. - - The next marker. - - - - Parses the response XML for a List Containers operation. - - - - - Stores the container prefix. - - - - - Signals when the container prefix can be consumed. - - - - - Stores the marker. - - - - - Signals when the marker can be consumed. - - - - - Stores the max results. - - - - - Signals when the max results can be consumed. - - - - - Stores the next marker. - - - - - Signals when the next marker can be consumed. - - - - - Initializes a new instance of the class. - - The stream to be parsed. - - - - Parses the XML response for a List Containers operation. - - This may return a null for an object if it parses non-BlobContainer item (such a property). - A list of enumerable objects in the XML. - - - - Gets the listing context from the XML response. - - The listing context. - - - - Gets the list of containers from the XML response. - - The containers. - - - - Gets the prefix from the XML response. - - The prefix. - - - - Gets the marker from the XML response. - - The marker. - - - - Gets the maximum results value from the XML response. - - The max results. - - - - Gets the next marker value from the XML response. - - The next marker. - - - - Parses the XML response for a List Queues operation. - - - - - Stores the prefix. - - - - - Signals when the prefix can be consumed. - - - - - Stores the marker. - - - - - Signals when the marker can be consumed. - - - - - Stores the max results. - - - - - Signals when the max results can be consumed. - - - - - Stores the next marker. - - - - - Signals when the next marker can be consumed. - - - - - Initializes a new instance of the class. - - The stream to be parsed. - - - - Parses the XML response for a List Queues operation. - - A list of enumerable objects in the XML. - - - - Gets the listing context. - - The listing context. - - - - Gets a list of queues. - - The queues. - - - - Gets the prefix used for enumeration. - - The prefix. - - - - Gets the marker used for continuations. - - The marker. - - - - Gets the max results setting. - - The max results. - - - - Gets the next marker for use in continuations. - - The next marker. - - - - Actions used for writing a page. - - - - - Update the page with new data. - - - - - Clear the page. - - - - - A class to help with parsing. - - - - - Converts a string to UTC time. - - The string to convert. - A UTC representation of the string. - - - - Parses the response XML for a Peek Messages operation. - - - - - Initializes a new instance of the class. - - The stream to be parsed. - - - - Parses the response XML for a Peek Messages operation. - - A list of enumerable objects in the XML. - - - - Gets a list of the message. - - The messages. - - - - Represents a block in a block list. - - - - - Initializes a new instance of the class. - - The block ID. - The block lists to search. - - - - Gets the block ID. - - The block ID. - - - - Gets the search mode. - - The search mode. - - - - Represents properties for writing to a page blob. - - - - - Initializes a new instance of the class. - - - - - Gets or sets the range of bytes to write to. - - The page range. - - - - Gets or sets the type of write operation. - - The page write. - - - - Represents a queue item returned in the XML response for a List Queues operation. - - - - - Initializes a new instance of the class. - - The name of the queue. - The queue's attributes. - - - - Gets the name of the queue. - - The queue name. - - - - Gets the queue's attributes. - - The attributes. - - - - Represents a message retrieved from a queue. - - - - - Initializes a new instance of the class. - - - - - Gets the message expiration time. - - The expiration time. - - - - Gets the message ID. - - The message ID. - - - - Gets the time the message was added to the queue. - - The insertion time. - - - - Gets the time the message is next visible. - - The time next visible. - - - - Gets the pop receipt for the message. - - The pop receipt. - - - - Gets the text of the message. - - The message text. - - - - Gets the number of times this message has been dequeued. - - The dequeue count. - - - - Represents a factory for the requests against Queue. - - - - - Creates the specified Uri. - - The queue's Uri. - The operation timeout. - A web request for performing the operation. - - - - Creates a request to delete the specified queue. - - The Uri for queue. - The timeout for operation. - A web request for performing the operation. - - - - Returns the user-defined metadata for this queue. - - The queue Uri. - The timeout. - - A web request for performing the operation. - - - - - Sets user-defined metadata for the queue. - - The queue's Uri. - The operation timeout. - A web request for performing the operation. - - - - Signs the request. - - The request. - The credentials. - - - - Adds the metadata. - - The request. - The metadata. - - - - Adds the metadata. - - The web request. - The metadata name. - The metadata value. - - - - Signs the request for shared key lite. - - The request. - The credentials. - - - - Returns the list of all queues under this storage account. - - The account's Uri. - The operation timeout. - The listing context. - Queue details to include in the listing. - A web request for the specified operation. - - - - Clears all messages in the queue. - - The queue's Uri. - The operation timeout. - A web request for the specified operation. - - - - Deletes the specified message. - - The queue's Uri. - The operation timeout. - The pop receipt. - A web request for the specified operation. - - - - Gets a specified number of messages. - - The queue's Uri. - The operation timeout. - The number of messages. - The visibility timeout. - A web request for the specified operation. - - - - Gets a specified number of messages without changing their visibility. - - The queue's Uri. - The operation timeout. - The number of messages. - A web request for performing the specified operation. - - - - Adds the message to the queue. - - The queue's Uri. - The operation timeout. - The message time-to-live. - A web request for the specified operation. - - - - Generates the message request body from a string containing the message. - - The message. - An array of bytes. - - - - - Creates the web request. - - The queue's Uri. - The operation timeout. - The query. - A web request for performing the operation. - - - - Provides parsing for Queue responses. - - - - - Parses the error response. - - The response from server. - A containing information about the response. - - - - Gets the metadata from the response. - - The response from server. - A containing all of the user-defined metadata. - - - - Gets the metadata for a specific name. - - The response received from server. - The name of the specific metadata header. - An array of metadata values. - - - - Gets the request id from response. - - The response from server. - The request ID from ther server. - - - - Gets the approximate message count. - - The response from server. - The approximate count returned from server. - - - - Parses the GetMessages request. - - The stream to parse. - A class to parse the response. - - - - Parses the GetMessages request. - - The response from the server. - A class to parse the response. - - - - Parses the List Queues request. - - The response stream from the server. - A class to parse the response. - - - - Parses the List Queues request. - - The response from the server. - A class to parse the response. - - - - Parses the PeekMessages request. - - The response stream from the server. - A class to parse the response. - - - - Parses the PeekMessages request. - - The response from the server. - A class to parse the response. - - - - Factory class for creating requests internally. - - - - - Internal override for the storage version string. - - - - - Creates the web request. - - The request Uri. - The timeout. - The builder. - A web request for performing the operation. - - - - Creates the specified Uri. - - The Uri to create. - The timeout. - The builder. - A web request for performing the operation. - - - - Deletes the specified Uri. - - The Uri to delete. - The timeout. - The builder. - A web request for performing the operation. - - - - Gets the metadata. - - The blob Uri. - The timeout. - The builder. - A web request for performing the operation. - - - - Gets the properties. - - The Uri to query. - The timeout. - The builder. - A web request for performing the operation. - - - - Sets the metadata. - - The blob Uri. - The timeout. - The builder. - A web request for performing the operation. - - - - Signs the request appropriately to make it an authenticated request for Blob and Queue. - - The request. - The credentials. - - - - Signs requests using the SharedKey authentication scheme for the table storage service. - - The request. - The credentials. - - - - Adds the metadata. - - The request. - The metadata. - - - - Adds the metadata. - - The request. - The metadata name. - The metadata value. - - - - Signs requests using the SharedKeyLite authentication scheme with is used for the table storage service. - - The request. - The credentials. - - - - Signs requests using the SharedKeyLite authentication scheme with is used for the table storage service. - Currently we only support for table. - - The request. - The credentials. - - - - Adds the lease id. - - The request. - The lease id. - - - - Adds the optional header. - - The web request. - The metadata name. - The metadata value. - - - - Adds the conditional. - - The request. - The header. - The resource ETag. - - - - Adds the conditional. - - The request. - The header. - The date time. - - - - Creates a standard datetime string for the shared key lite authentication scheme. - - DateTime value to convert to a string in the expected format. - The converted DateTime. - - - - Gets the target version. - - The target version. - - - - Converts the date time to snapshot string. - - The date time. - The converted string. - - - - The exception thrown if the client attempts to parse the response a second time. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The message for the exception. - - - - Initializes a new instance of the class. - - The message for the exception. - The inner exception. - - - - Initializes a new instance of the class. - - The serialization info. - The context for serialization. - - - - Implements the common parsing between all the responses. - - - - - Gets the error details from the response object. - - The response from server. - An extended error information parsed from the input. - - - - Gets the headers (metadata or properties). - - The response from sever. - A of all the headers. - - - - Gets the user-defined metadata. - - The response from server. - A of the metadata. - - - - Gets a specific user-defined metadata. - - The response from server. - The metadata header requested. - An array of the values for the metadata. - - - - Parses the metadata. - - The reader. - A of metadata. - - Precondition: reader at <Metadata> - Postcondition: reader after </Metadata> (<Metadata/> consumed) - - - - - Gets the storage properties. - - The response from server. - A of the properties. - - - - Gets a specific storage property. - - The response from server. - The property requested. - An array of the values for the property. - - - - Gets the request id. - - The response from server. - The request ID. - - - - Gets the metadata or properties. - - The response from server. - The prefix for all the headers. - A of the headers with the prefix. - - - - Container for storage key. - - - May eventually use native APIs to keep key pinned and not memory. - - - - - Initializes a new instance of the class. - - The storage key. - - - - Computes the mac sha256. - - The storage key. - The canonicalized string. - The computed hash. - - - - Computes the mac sha512. - - The storage key. - The canonicalized string. - The computed hash. - - - - Gets the base64 encoded key. - - The base64 encoded key. - - - - Gets the key. - - The storage key. - - - - Gets or sets the key. - - The storage key. - - - - Provides an implementation of the class for tables - for the Shared Key authentication scheme. - - - - - Canonicalizes the HTTP request. - - An HttpWebRequest object. - Name of the storage account. - - The canonicalized string for the request. - - - - - Provides an implementation of the class for tables - for the Shared Key Lite authentication scheme. - - - - - Canonicalizes the HTTP request. - - An HttpWebRequest object. - Name of the storage account. - - The canonicalized string for the request. - - - - - A style class for creating Uri query strings. - - - - - Stores the query parameters. - - - - - Add the value with Uri escaping. - - The query name. - The query value. - - - - Returns a that represents this instance. - - - A that represents this instance. - - - - - Add query parameter to an existing Uri. This takes care of any existing query parameters in the Uri. - - Original Uri which may contain query parameters already. - The appended Uri. - - - - Represents a set of attributes for a queue. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The attributes to clone. - - - - Gets user-defined metadata for the queue. - - The metadata. - - - - Gets the Uri for the queue. - - The queue's Uri. - - - - Error code strings that are specific to the Queue service. - - - - - The specified queue was not found. - - - - - The specified queue is disabled. - - - - - The specified queue already exists. - - - - - The specified queue is not empty. - - - - - The specified queue is being deleted. - - - - - The specified pop receipt does not match. - - - - - One or more of the specified parameters are invalid. - - - - - The specified message was not found. - - - - - The specified message is too large. - - - - - The specified marker is invalid. - - - - - Specifies which details to include when listing queues. - - - - - No extra details. - - - - - Include metadata. - - - - - Include all available details. - - - - - Utility functions that does the heavy lifting of carrying out retries on a IRetrayableRequest. - - - Both synchrous and asynchrous request styles are supported. - They are used to implement the corresponding XXX, BeginXXX, EndXXX calls where XXX - is something like GetBlobInfo. - State passing for return value in the sync call (GetBlobInfo) and out parameters for the async calls - (EndBlobInfo) is achieved by member variables in the implementation class of IRetryableRequest. - - - - - Synchronouses the request with retry. - - The result type of the task. - The oracle to use. - The task implementation. - The result of the task. - - - - Begins the asynchronous request with retry. - - The result type of the task. - The oracle to use. - The task implementation. - The asynchronous callback. - The asynchronous state. - An that represents the asynchronous operation. - - - - Ends the asynchronous request with retry. - - The result type of the task. - The asynchronous result. - The result of the completed task. - - - - Implementation of the *RequestWithRetry methods. - - The result type of the task. - The retry oracle. - The task implementation. - The result report delegate. - A that performs the request with retries. - - - - The arguments for the ResponseReceived event. - - - - - Gets the request id. - - The request id. - - - - Gets the request headers. - - The request headers. - Modifying the name-value collection may result in unexpected behavior. - - - - Gets the request Uri. - - The request URI. - - - - Gets the response headers. - - The response headers. - Modifying the name-value collection may result in unexpected behavior. - - - - Gets the status code. - - The status code. - - - - Gets the status description. - - The status description. - - - - Gets the exception. - - The exception. - - - - Manage continuation information for various listing operation. - Can be serialized using XmlSerialization. - - - - - XML element for the next marker. - - - - - XML element for the next partition key. - - - - - XML element for the next row key. - - - - - XML element for the next table name. - - - - - XML element for the token version. - - - - - Stores the current token version value. - - - - - XML element for the token type. - - - - - Initializes a new instance of the class. - - - - - This method is reserved and should not be used. When implementing the IXmlSerializable interface, you should return null (Nothing in Visual Basic) from this method, and instead, if specifying a custom schema is required, apply the to the class. - - - An that describes the XML representation of the object that is produced by the method and consumed by the method. - - - - - Generates an object from its XML representation. - - The stream from which the object is deserialized. - - - - Converts an object into its XML representation. - - The stream to which the object is serialized. - - - - Gets or sets the NextPartitionKey for TableServiceEntity enumeration operations. - - - - - Gets or sets the NextRowKey for TableServiceEntity enumeration operations. - - The next row key. - - - - Gets or sets the NextTableName for Table enumeration operations. - - The name of the next table. - - - - Gets or sets the NextMarker for continuing results for CloudBlob and CloudBlobContainer and CloudQueue enumeration operations. - - The next marker. - - - - Gets a value indicating whether there is continuation information present. - - - - - - Gets or sets the type. - - The continuation type. - - - - Specifies the type of a continuation token. - - - - - Default for no continuation. - - - - - The token is a blob listing continuation token. - - - - - The token is a queue listing continuation token. - - - - - The token is a container listing continuation token. - - - - - The token is a table query continuation token. - - - - - Represents a class which manages pagination of results. - - - - - Stores the results remaining in the current page. - - - - - Stores the page size. - - - - - Initializes a new instance of the class. - - Number of results to be returned as a page. - maxResults of 0 or less means no paging. - - - - Gets the size for next request to pass in parameter like MaxResults. - - Postive value indicating size of a result page if using paging. - Else null is returned. - - - - Update pagination paramters for new result set returned. - - The current result count. - - - - Gets the maxResults in use for the current Pagination instance - Returns zero if paging is not in use. - - The size of the effective page. - - - - Gets a value indicating whether paging is enabled with a valid postive page size. - An instance with a non positive page size will return false. - - - - - Gets a value indicating whether there are no more remaining results in the current page. - Will return false if paging is not enabled. - - - - - Represents a segment that was retrieved from the total set of possible results. - - The type of the element. - - - - Stores the continuation token used to retrieve the next segment of results. - - - - - Stores the closure used to retrieve the next set of results. - - - - - Stores the used for requests. - - - - - Initializes a new instance of the ResultSegment class. - - The result. - If set to true there are more results. - The next result segment. - The retry policy. - - - - Begins the asynchronous operation to get the next set of results. - - A callback method that is called when the asynchronous operation completes. - The user-provided state. - An object of type that references the asynchronous operation. - - - - Ends the asynchronous operation to get the next set of results. - - An object of type that references the asynchronous operation. - - The next segment. - - - - - Gets the next segment synchronously. - - A result segment of the next result. - - - - Implementation of GetNext (For symmetry with normal tasks. - - The action to set the results. - A representing the operation to get the next set of results. - - - - Gets the results. - - The results. - - - - Gets a value indicating whether this instance has more results. - - - Is true if this instance has more results; otherwise, false. - - - - - Gets the continuation information for continuing the operation. - - The continuation token. - - - - Gets or sets the pagination information for Results. - - The pagination. - - - - Gets the retry policy. - - The retry policy. - - - - Represents a helper class to support additional operations on ResultSegments - such as grouping of results into pages. - - - - - Checks if the result segment has more results in the current page if pagination is used. - If pagination is not used, it checks if a valid continuation is present. - - The pagination. - The continuation token. - - Returns true if there are more results in the page; otherwise, false. - - - - - Create a result segment from the result result. - - The type of the result. - The set result. - The result list. - The continuation token. - The pagination. - The retry policy. - The continuation function. - - - - Checks if the result segment passed in has a valid continuation token. - - The continuation. - - Returns true if the specified continuation has continuation; otherwise, false. - - - - - Provides definitions for some standard retry policies. - - - - - Default minimum backoff value for RetryExponential(int, TimeSpan) - To use a specific maximum backoff value use RetryExponential(int, TimeSpan, TimeSpan, TimeSpan). - - - - - Default maximum backoff value for RetryExponential(int, TimeSpan) - To use a specific maximum backoff value use RetryExponential(int, TimeSpan, TimeSpan, TimeSpan). - - - - - Configurable defaults used by the service clients in creating the default retry policy as - RetryExponential(DefaultClientRetryCount, DefaultClientBackoff). - - - - - Configurable defaults used by the service clients in creating the default retry policy as - RetryExponential(DefaultClientRetryCount, DefaultClientBackoff). - - - - - Policy that does no retries i.e., it just invokes exactly once. - - The above retry policy. - - - - Policy that retries a specified number of times with a specified fixed time interval between retries. - - The number of times to retry. Should be a non-negative number. - The time interval between retries. Use TimeSpan.Zero to specify immediate - retries. - The above retry policy. - When is 0 and is - TimeSpan.Zero this policy is equivalent to the NoRetry policy. - - - - Policy that retries a specified number of times with a randomized exponential backoff scheme. - - The number of times to retry. Should be a non-negative number. - The multiplier in the exponential backoff scheme. - The above retry policy. - For this retry policy, the minimum amount of milliseconds between retries is given by the - DefaultMinBackoff constant, and the maximum backoff is predefined by the DefaultMaxBackoff constant. - Otherwise, the backoff is calculated as - DefaultMinBackoff + (2^currentRetry - 1) * random (deltaBackoff *0.8, deltabackoff * 1.2). - - - - Policy that retries a specified number of times with a randomized exponential backoff scheme. - - The number of times to retry. Should be a non-negative number. - The minimum backoff interval. - The maximum backoff interval. - The multiplier in the exponential backoff scheme. - The above retry policy. - For this retry policy, the minimum amount of milliseconds between retries is given by the - minBackoff parameter, and the maximum backoff is predefined by the maxBackoff parameter. - Otherwise, the backoff is calculated as - minBackoff + (2^currentRetry - 1) * random (deltaBackoff *0.8, deltabackoff * 1.2). - - - - - Decides whether to retry a request, based on how many times the - request has been made and the reason for the last failure. - - - A delegate that can be used for determining whether or not to retry. - - - - - The set of permissions for a container-level access policy. - - - - - No shared access granted. - - - - - Read access granted. - - - - - Write access granted. - - - - - Delete access granted. - - - - - List access granted. - - - - - The set of container-level access policies for this container. - - - - - Represents a container-level access policy which may govern one or more Shared Access Signatures. - - - - - Initializes a new instance of the class. - - - - - Converts the permissions specified as part of the access policy to a string. - - The permissions. - The converted string. - - - - Constructs a object from a permissions string. - - The permissions string. - A set of permissions. - - - - Gets or sets the start time for a Shared Access Signature associated with this policy. - - The shared access start time. - - This value must be set either on the container-level access policy or on the Shared Access - Signature URL, but may not be set in both places. - - - - - Gets or sets the expiry time for a Shared Access Signature associated with this policy. - - The shared access expiry time. - - This value must be set either on the container-level access policy or on the Shared Access - Signature URL, but may not be set in both places. - - - - - Gets or sets the permissions for a Shared Access Signature associated with this policy. - - The permissions. - - This value must be set either on the container-level access policy or on the Shared Access - Signature URL, but may not be set in both places. - - - - - Decides whether to retry a request, based on how many times the - request has been made and the reason for the last failure. - - The number of times the request has been made. - The exception raised by the most recent web request or parsing attempt. - An optional delay which specifies how long to wait before reissuing requests. - RetUring less than or equal to TimeSpan.Zero means use no delay. - - true if the request should be retried. - - - - This class provides MemoryStream-like behavior but uses a list of blocks rather than a single piece of bufferBlocks. - - - - - The default block size. - - - - - The size of the block. - - - - - The underlying bufferBlocks for the stream. - - - - - The currently used length. - - - - - The total capacity of the stream. - - - - - The current position. - - - - - Initializes a new instance of the SmallBlockMemoryStream class with default 64KB block size and no reserved space. - - - - - Initializes a new instance of the SmallBlockMemoryStream class with provided block size and no reserved space. - - The size of blocks to use. - - - - Initializes a new instance of the SmallBlockMemoryStream class. - - The size of blocks to use. - The amount of memory to reserve. - Thrown if is zero or negative. - - - - Copies the specified amount of data from internal buffers to the buffer and advances the position. - - An array of bytes. When this method returns, the buffer contains the specified byte array with the values - between offset and (offset + count - 1) replaced by the bytes read from the current source. - The zero-based byte offset in buffer at which to begin storing the data read from the current stream. - The maximum number of bytes to be read from the current stream. - The total number of bytes read into the buffer. This can be less than the number of bytes requested - if that many bytes are not currently available, or zero (0) if the end of the stream has been reached. - - The offset subtracted from the buffer length is less than count. - The buffer is null. - The offset or count is negative. - - - - Sets the position within the current stream. - - A byte offset relative to the origin parameter. - A value of type System.IO.SeekOrigin indicating the reference point used to obtain the new position. - The new position within the current stream. - Thrown if is invalid for SeekOrigin. - - - - Sets the length of the current stream. (preallocating the bufferBlocks). - - The desired length of the current stream in bytes. - If the is negative. - - - - Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. - - An array of bytes. This method copies count bytes from buffer to the current stream. - The zero-based byte offset in buffer at which to begin copying bytes to the current stream. - The number of bytes to be written to the current stream. - Offset subtracted from the buffer length is less than count. - Thrown if is null - Thrown if or is negative - - - - Does not perform any operation as it's an in-memory stream. - - - - - Ensures that the amount of bufferBlocks is greater than or equal to the required size. - Does not trim the size. - - The required size. - If the is negative. - - - - Adds another block to the underlying bufferBlocks. - - - - - Copies the specified amount of data from internal buffers to the buffer and advances the position. - - An array of bytes. When this method returns, the buffer contains the specified byte array with the values - between offset and (offset + count - 1) replaced by the bytes read from the current source. - The zero-based byte offset in buffer at which to begin storing the data read from the current stream. - The maximum number of bytes to be read from the current stream. - The total number of bytes read into the buffer. This can be less than the number of bytes requested - if that many bytes are not currently available, or zero (0) if the end of the stream has been reached. - - - - - Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. - (Requires the stream to be of sufficient size for writing). - - An array of bytes. This method copies count bytes from buffer to the current stream. - The zero-based byte offset in buffer at which to begin copying bytes to the current stream. - The number of bytes to be written to the current stream. - - - - Advances the current position of the stream and adjust the offset and remainder based on the amount completed. - - The current offset in the external buffer. - The amount of data left to process. - The amount of data processed. - - - - Calculate the block for the current position. - - The position within a block. - The block reference itself. - - - - Gets a value indicating whether the current stream supports reading. - - Is true if the stream supports reading; otherwise, false. - - - - Gets a value indicating whether the current stream supports seeking. - - Is true if the stream supports seeking; otherwise, false. - - - - Gets a value indicating whether the current stream supports writing. - - Is true if the stream supports writing; otherwise, false. - - - - Gets the currently written length. - - - - - Represents the current position in the stream. - - Thrown if position is outside the stream size - - - - Represents a storage client exception. - - - Client-side exceptions are due to incorrect parameters on the request. - These requests should not be retried with the same parameters. - - - - - The base class for storage service exceptions. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The error code. - The message. - The status code. - The extended error info. - The inner exception. - - - - Initializes a new instance of the class with - serialized data. - - The object that contains serialized object - data about the exception being thrown. - The object that contains contextual information - about the source or destionation. - - - - Sets the object with additional exception information. - - The object that holds the - serialized object data. - The object that contains contextual information - about the source or destionation. - - - - Gets the Http status code returned by the storage service. - - The status code. - - - - Gets the specific error code returned by the storage service. - - The error code. - - - - Gets the extended error information returned by the storage service. - - The extended error information. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The error code. - The message. - The status code. - The extended error info. - The inner exception. - - - - Initializes a new instance of the class with - serialized data. - - The object that contains serialized object - data about the exception being thrown. - The object that contains contextual information - about the source or destionation. - - - - Error codes that can be returned by the storage service or the client library. - These are divided into server errors and client errors depending on which side - the error can be attributed to. - - - - - No error specified. - - - - - Server internal error. Server-side error. - - - - - Service timeout error. Server-side error. - - - - - Service integrity check failed error. Server-side error. - - - - - Transport error. Server-side error. - - - - - Service bad response error. Server-side error. - - - - - The specified resource was not found. Client-side error. - - - - - The specified account was not found. Client-side error. - - - - - The specified container was not found. Client-side error. - - - - - The specified blob was not found. Client-side error. - - - - - An authentication error occurred. Client-side error. - - - - - Access was denied. Client-side error. - - - - - The specified resource already exists. Client-side error. - - - - - The specified container already exists. Client-side error. - - - - - The specified blob already exists. Client-side error. - - - - - The request was incorrect or badly formed. Client-side error. - - - - - The specified condition failed. Client-side error. - - - - - There was an error with the gateway used for the request. Client-side error. - - - - - Error code strings that are common to all storage services. - - - - - The specified HTTP verb is not supported. - - - - - The Content-Length header is required for this request. - - - - - A required header was missing. - - - - - A required XML node was missing. - - - - - One or more header values are not supported. - - - - - One or more XML nodes are not supported. - - - - - One or more header values were invalid. - - - - - One or more XML node values were invalid. - - - - - A required query parameter was missing. - - - - - One or more query parameters is not supported. - - - - - One or more query parameters are invalid. - - - - - One or more query parameters are out of range. - - - - - Invalid Uri. - - - - - Invalid HTTP verb. - - - - - The metadata key was empty. - - - - - The request body was too large. - - - - - The specified XML document was invalid. - - - - - There was an internal error. - - - - - Authentication failed. - - - - - The specified MD5 hash does not match. - - - - - The specified MD5 hash was invalid. - - - - - The input is out of range. - - - - - The input is invalid. - - - - - The operation timed out. - - - - - The specified resource was not found. - - - - - The specified metadata was invalid. - - - - - The specified metadata was too large. - - - - - The specified condition was not met. - - - - - The specified range was invalid. - - - - - The specified container was not found. - - - - - The specified container already exists. - - - - - The specified container is disabled. - - - - - The specified container is being deleted. - - - - - The server is busy. - - - - - Represents extended error information returned by the storage service. - - - - - Gets the error code. - - The error code. - - - - Gets the error message. - - The error message. - - - - Gets additional error details. - - The additional error details. - - - - Represents an exception due to a problem with a storage service server. - - - Server exceptions are those due to server-side problems. - These may be transient and requests resulting in such exceptions - can be retried with the same parameters. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The error code. - The message. - The status code. - The inner exception. - - - - Initializes a new instance of the class. - - The error code. - The message. - The status code. - The extended error info. - The inner exception. - - - - Initializes a new instance of the class with - serialized data. - - The object that contains serialized object - data about the exception being thrown. - The object that contains contextual information - about the source or destionation. - - - - A class containing common functionality across the two blob streams. - - - - - Verifies the parameters to a read/write operation. - - An array of bytes. - The zero-based byte offset in . - The maximum number of bytes to be access in . /// The sum of offset and count is greater than the buffer length. - is null. - offset or count is negative. - - - - Calculates an ongoing hash. - - The data to calculate the hash on. - The offset in the input buffer to calculate from. - The number of bytes to use from input. - The hash algorithm to use. - - - - Retrieves the string representation of the hash. (Completes the creation of the hash). - - The hashing object. - A string that is the content of the hash. - - - - Error code strings that are specific to the Table service. - - - - - The request uses X-HTTP-Method with an HTTP verb other than POST. - - - - - The specified X-HTTP-Method is invalid. - - - - - More than one X-HTTP-Method is specified. - - - - - The specified table has no properties. - - - - - One or more duplicate properties were specified. - - - - - The specified table has no such property. - - - - - A duplicate key property was specified. - - - - - The specified table already exists. - - - - - The specified table was not found. - - - - - The specified entity was not found. - - - - - The specified entity already exists. - - - - - The partition key was not specified. - - - - - One or more specified operators are invalid. - - - - - The specified update condition was not satsified. - - - - - All properties require values. - - - - - The partition key property cannot be updated. - - - - - The specified entity has too many properties. - - - - - The specified entity is too large. - - - - - One or more property values are too large. - - - - - One or more value types are invalid. - - - - - The specified table is being deleted. - - - - - The table server is out of memory. - - - - - The type of the primary key property is invalid. - - - - - One or more property names are too long. - - - - - One or more property names are invalid. - - - - - Batch operations are not supported for this operation type. - - - - - The JSON format is not supported. - - - - - The specified method is not allowed. - - - - - The specified operation is not implemented. - - - - - A version of to work on Windows Azure Table service. - - - - - Initializes a new instance of the class. - - The base address. - The credentials. - - - - Begins the asynchronous operation to save changes while applying the retry policy. - - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - An that references the asynchronous request. - - - - Begins the asynchronous operation to save changes while applying the retry policy. - - The options for saving changes. - A callback method that is called when the asynchronous operation completes. - A user-defined object that contains information about the asynchronous operation. - - An that references the asynchronous request. - - - - - Ends the asynchronous operation to save changes while applying the retry policy. - - An object of type that references the asynchronous operation. - A that represents the result of the operation. - - - - Saves changes while applying the retry policy. - - A that represents the result of the operation. - - - - Saves changes while applying the retry policy. - - The options for saving changes. - A that represents the result of the operation. - - - - Saves the changes with retries implementation. - - The options for saving changes. - The action to set result. - A sequence of tasks to perform the operation. - - - - Callback on DataContext object sending request. - - The sender. - The instance containing the event data. - - - - Gets or sets the retry policy for all of the requests by the service client. - - The retry policy. - - - - Gets the storage account credentials used by the client. - - The storage credentials. - - - - Represents an entity in a table. - - - - - Initializes a new instance of the class. - - The partition key. - The row key. - - - - Initializes a new instance of the class. - - - - - Gets or sets the timestamp. - - The timestamp. - - - - Gets or sets the partition key of a table entity. - - The partition key. - - The concatenation of the partition key - and row key must be unique within the table. - - - - - Gets or sets the row key of a table entity. - - The row key. - - - - A class for adding useful methods for the Table service. - - - - - Converts the query into a object that supports - additional operations like retries. - - The type of the element. - The query. - - The converted query. - - - - - Internal table service entity for creating tables. - - - - - Stores the table name. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class with the specified name. - - The name of the table. - - - - Determines whether the specified is equal to this instance. - - The to compare with this instance. - - Returns true if the specified is equal to this instance; otherwise, false. - - - The parameter is null. - - - - - Returns a hash code for this instance. - - - A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. - - - - - Gets or sets the table name. - - The name of the table. - - - - Helper functions for table service. - - - - - Regular expression for valid table names. - - - - - Determines whether the type is an entity type. - - The type to check. - Type of the context. - - Returns true if the type is an entity type; otherwise, false. - - - - - Determines whether the specified property is a key column. - - The property. - - Returns true if the specified property is a key column; otherwise, false. - - - - - Enumerates the entity set properties. - - Type of the context. - A list of the entity set properties. - - - - Enumerates the entity set names. - - Type of the context. - A list of entity set names. - - - - Checks the name of the table. - - Name of the table. - Name of the arg. - - - - Determines whether the specified name is a valid table name. - - The table name. - - Returns true if the specified name is a valid table name; otherwise, false. - - - - - Implementation helper for task sequences. - - - - - Executes the impl. - - The result type. - The task implementation. - The result of the task. - - - - Begins the impl. - - The result type. - The task implementation. - The callback. - The state. - An asynchronous result representing the operation. - - - - Ends the impl. - - The result type. - The async result. - The task result. - - - - Executes the impl. - - The task implemenetaion. - - - - Begins the impl. - - The task implementation. - The callback. - The state. - An asynchronous result representing the operation. - - - - Ends the impl. - - The async result. - - - - Executes the impl with retry. - - The result type. - The task implementation. - The policy. - The task result. - - - - Begins the impl with retry. - - The result type. - The task implementation. - The policy. - The callback. - The state. - An asynchronous result representing the operation. - - - - Ends the impl with retry. - - The result type. - The async result. - The task result. - - - - Executes the impl with retry. - - The task implementation. - The policy. - - - - Begins the impl with retry. - - The task implementation. - The policy. - The callback. - The state. - An asynchronous result representing the operation. - - - - Ends the impl with retry. - - The async result. - - - - Gets the retryable async task. - - The result type. - The task implementation. - The policy. - The retryable task. - - - - Gets the retryable async task. - - The task implementation. - The policy. - The retryable task. - - - - Gets the task from async result. - - The type of the result. - The async result. - The asynchronous result. - - - - A task that implements the conventional BeginXX(), EndXX() pattern. - - - - - A task that implements the conventional BeginXX(), EndXX() pattern. - - The return type of the task. - - - - Represents an asynchronous computation that yields a result of type T. - - The type of the result of the operation. - - By this contract we: - 1) guarantee that the completion routine is performed, regardless of the outcome of ExecuteStep. - 2) insist that the completion routine does not throw an exception. - 3) insists that the abort routine does not throw an exception. - - - - - An asynchronous computation. - - - - - Perform the next async step. - - The action to be performed on completion. - - - - Abort the task operation. - - - - - Gets a value indicating whether the task has completed synchronously. - - - Is true if completed synchronously; otherwise, false. - - - - - Gets exception raised by this task (if any). - - The exception. - - - - Provides information if the task completed synchronously and therefore on the main thread. - - - - - Contains any exceptions raised by the task. - - - - - The action to call once the operation is completed. - - - - - The result of the operation. - - - - - Executes the tasks and waits for the result. - - The result of the operation. - - - - Executes a single step of the task. (Delegates to the concrete implemetation for specific step). - - The completion function to be called. - - - - Implements an abort routine that fulfills the contract. - - - - - The specific implementation of the task's step. - - - - - Implements a safe way to obtain the result. - - The function used to get the result value. - - - - The task-specific abort that should be called. - - - - - The completion return that needs to be called whenever operation completes. - - Whether the underlying operation completed synchrnously. - - - - Gets or sets the result of the operation and throws any exceptions raised by the operation. - - - - - Gets or sets a value indicating whether the operation was completed synchronously and therefore on main thread. - - - - - Gets or sets any exceptions raised during execution. - - - - - Gets or sets a value indicating whether the task is completed. - - - - - Initializes a new instance of the APMTask class for use with normal APM. - - The APM function to begin operation. - The APM functon to end the operation. - - - - Initializes a new instance of the APMTask class for use with normal APM. - - The APM function to begin operation. - The APM functon to end the operation. - The function used for aborting an operation. - - - - Implementation of the library execution. Performs the APM operation. - - - - - Implements the abort functionality. - - - - - Callback for the APM function. - - The async result for the APM model. - - - - Gets or sets the begin function. - - The begin func. - - - - Gets or sets the end function. - - The end func. - - - - Gets or sets the abort function. - - The abort func. - - - - Initializes a new instance of the APMTask class for sequence without any return value. - - The APM function to begin operation. - The APM functon to end the operation. - - - - A class to extend a normal task. - - - - - Converts a Task to an a TaskAsyncResult to allow for exposing Tasks as IAsyncResult. - - The return type of the task. - The task to be converted. - The callback to be called at the end of the task. - The callback's state. - A TaskAsyncResult that implements IAsyncResult. - - - - Converts a Task to an a TaskAsyncResult to allow for exposing Tasks as IAsyncResut. - - The task to be converted. - The callback to be called at the end of the task. - The callback's state. - A TaskAsyncResult that implements IAsyncResult. - - - - A task class that implements a fixed delay. - - - - - Indicates whether this object has been disposed. - - - - - Stores the length of the delay. - - - - - Stores the native timer used to trigger after the specified delay. - - - - - Initializes a new instance of the class. - - Should be between TimeSpan.Zero and TimeSpan.MaxValue. - - - - Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - - - - - Releases unmanaged and - optionally - managed resources. - - Set to true to release both managed and unmanaged resources; false to release only unmanaged resources. - - - - The specific implementation of the task's step. - - - - - The task-specific abort that should be called. - - - - - Begins the delay. - - - - - Ends the delay. - - - - - Invokes a sequence with no return value. - - - - - Invokes a sequence of tasks. - - The type of the result of the operation. - - - - Contains the function that generates a squence of tasks to be invoked. - - - - - The current task that is being invoked. - - - - - Controls whether the abort was called. - - - - - Initializes a new instance of the InvokeTaskSequenceTask class with a task sequence that returns a value. - - The sequence of actions to be invoked. - - - - Implements the abort logic by aborting the current task. - - - - - The starting point for executing a task sequence. - - - - - Executes a task sequence by iterating over all of the items and executing them. - - The sequence of tasks to execute. - Whether the sequence so far has completed synchronously. - - - - Initializes a new instance of the InvokeTaskSequenceTask class for sequence without any return value. - - The sequence of actions to be invoked. - - - - A NullTaskReturn type. - - - - - Represents a no-return from a task. - - - - - Prevents a default instance of the class from being created. - - - - - Facilitates a scenario where numerous simultaneous tasks are active, and only the first to complete should continue. - - The type of the result of the operation. - - - - Stores the abort flag. - - - - - Stores the racing tasks. - - - - - Initializes a new instance of the class. - - The tasks. - - - - The specific implementation of the task's step. - - - - - The task-specific abort that should be called. - - - - - Called when complete. - - The winning task. - - - - Provides extensions for the stream object to support asynchronous operations. - - - - - Asynchronously reads data from a stream using BeginRead. - - The stream on which the method is called. - The buffer to read the data into. - Byte offset in the buffer. - Maximum number of bytes to read. - Returns non-zero if there are still some data to read. - - - - Reads asynchronously the entire content of the stream and returns it - as a string using StreamReader. - - The stream on which the method is called. - The text encoding used for converting bytes read into string. - The action to be performed with the resulting string. - Returns a task sequence that must be performed to get result string using the 'Result' callback. - - - - Asynchronously writes data from a stream using BeginWrite. - - The stream on which the method is called. - The buffer to write the data from. - Byte offset in the buffer. - Maximum number of bytes to write. - A task with no return value. - - - - Reads asynchronously the entire content of the stream and writes it to the given output stream. - - The origin stream. - The destination stream. - The sequence that when invoked results in an asynchronous copy. - - - - Reads asynchronously the entire content of the stream and writes it to the given output stream. - Closes the output stream at the end. - - The origin stream. - The destination stream. - The sequence that when invoked results in an asynchronous copy. - - - - A task that obtains a result synchronously. - - - - - A task that obtains a result synchronously. - - The type of the result of the operation. - - - - The function to be executed. - - - - - Initializes a new instance of the SynchronousTask class. - - The function to execute. - - - - Performs the task and marks it as completed. - - - - - Implements abort as NoOp. - - - - - Initializes a new instance of the SynchronousTask class. - - The function to execute. - - - - A set of extension methods for table service classes. - - - - - Converts a DataServiceQuery execution into an APMTask. - - The result type of the query. - The query to convert. - The wrapped task. - - - - Converts the SaveChanges method into an APMTask. - - The target context. - The wrapped task. - - - - Converts the SaveChanges method to an APMTask. - - The target context. - The options to pass to SaveChanges. - A task that saves changes asynchronously. - - - - Gets the unexpected internal client error wrapped task. - - The result type. - The timeout. - The original task. - The wrapped task. - - - - Gets the unexpected internal client error task sequence. - - The result type. - The timeout. - The set result. - A for the unexpected error. - - - - An implementation of IAsyncResult that encapsulates a task. - - The type of the resulting value. - Refer to http://csdweb/sites/oslo/engsys/DesignGuidelines/Wiki%20Pages/IAsyncResult.aspx and - http://www.bluebytesoftware.com/blog/2006/05/31/ImplementingAHighperfIAsyncResultLockfreeLazyAllocation.aspx for IAsyncResult details - - - - The underlying task for the async operation. - - - - - The callback provided by the user. - - - - - The state for the callback. - - - - - Indicates whether a task is completed. - - - - - Indicates whether task completed synchronously. - - - - - The event for blocking on this task's completion. - - - - - Initializes a new instance of the TaskAsyncResult class. - - The task to be executed. - The callback method to be used on completion. - The state for the callback. - - - - Provides a convenient function for waiting for completion and getting the result. - - The result of the operation. - - - - We implement the dispose only to allow the explicit closing of the event. - - - - - Releases unmanaged and - optionally - managed resources. - - Set to true to release both managed and unmanaged resources; false to release only unmanaged resources. - - - - Provides the lazy initialization of the WaitHandle (based on Joe Duffy's blog). - - The WaitHandle to use for waiting on completion. - - - - Called on completion of the async operation to notify the user - (Based on Joe Duffy's lockless design). - - - - - Gets A user-defined object that contains information about the asynchronous operation. - - - - - Gets a System.Threading.WaitHandle that is used to wait for an asynchronous operation to complete. - - - - - Gets a value indicating whether the asynchronous operation completed synchronously. - - - - - Gets a value indicating whether the asynchronous operation has completed. - - - - - Encapsulates methods for wrapping tasks in timeouts. - - - - - Gets a timeout wrapped task. - - The type of the result. - The timeout. - The original task. - A that has been wrapped with a timeout if specified. - - - - Creates a localized timeout exception object. - - The timeout. - A localized object. - - - - Gets a timeout task sequence. - - The type of the result. - The timeout. - The set result. - A that has been wrapped with a timeout if specified. - - - - A set of extension methods for a webrequest. - - - - - Gets an asynchronous response to a given Web request. - - The requested that is used for operation. - The service. - The timeout. - A task that yields the response. - - - - Gets an asynchronous response to a given Web request. - - The requested that is used for operation. - The service. - The timeout. - A task that yields the response. - - - - Gets an asynchronous request stream for a given Web request. - - The requested that is used for operation. - A task that yields a stream. - - - - Gets an asynchronous response to a given Web request. - - The requested that is used for operation. - The service. - A task that yields the response. - - - - Gets an asynchronous response to a given Web request. - - The requested that is used for operation. - The service. - A task that yields the response. - - - - Tracing helper class. - - - - - Internal format string for trace messages. - - - - - Internal flag for turning on tracing. - - - - - Writes the line. - - The format. - The arguments. - - - - Writes the line internal. - - The format. - The arguments. - - - - General purpose utility methods. - - - - - This is the limit where we allow for the error message returned by the server. - Messages longer than that will be truncated. - - - - - Processes the unexpected status code. - - The response. - - - - Translates the data service client exception. - - The exception. - The translated exception. - - - - Translates the web exception. - - The exception. - The translated exception. - - - - Gets the extended error details from response. - - The HTTP response stream. - Length of the content. - The extended error information. - - - - Gets the extended error from XML message. - - The XML error message. - The extended error information. - - - - Copies the stream to buffer. - - The source stream. - The buffer. - The bytes to read. - The number of bytes copied. - - - - Translates from HTTP status. - - The status code. - The status description. - The details. - The inner. - The translated exception. - - - - Translates the extended error. - - The details. - The status code. - The status description. - The inner exception. - The translated exception. - - - - Gets the error details from stream. - - The input stream. - The error details. - - - - Represents storage account credentials for accessing the Blob, Queue, and Table services - using the Shared Key authentication scheme. - - - - - Initializes a new instance of the class. - - Name of the account. - The account key, as an array of bytes. - - - - Initializes a new instance of the class. - - Name of the account. - The account key, as a Base64-encoded string. - - - - Transforms a resource Uri for signing purposes. - The transformation may append to the string. - - The resource Uri to be transformed. - - The new resource Uri that includes any transformations required for signing. - - - - - Signs a request using the specified credentials under the Shared Key authentication scheme. - - The request to be signed. - - - - Signs a request using the specified credentials under the Shared Key Lite authentication scheme. - - The request to be signed. - - - - Encodes the signature string by using the HMAC-SHA256 algorithm over - the UTF-8-encoded string-to-sign. - - The UTF-8-encoded string-to-sign. - The HMAC-encoded signature string. - - - - Gets the base64 encoded key. - - The base64 encoded key. - - - - Performs the computation of the signature based on the private key. - - The string that should be signed. - The signature for the string. - - - - Returns a that represents this instance. - - If set to true exports secrets. - - A that represents this instance. - - - - - Gets a object that stores the protocol-level credentials. - - The credentials. - - - - Gets the name of the storage account associated with the specified credentials. - - The name of the account. - - - - Gets a value indicating whether the method must be called - before generating a signature string with the specified credentials. - - - Is true if [needs transform Uri]; otherwise, false. If false, - calling returns the original, unmodified Uri. - - - - - Gets a value indicating whether a request can be signed under the Shared Key authentication - scheme using the specified credentials. - - - Is true if a request can be signed with these credentials; otherwise, false. - - - - - Gets a value indicating whether a request can be signed under the Shared Key Lite authentication - scheme using the specified credentials. - - - Is true if a request can be signed with these credentials; otherwise, false. - - - - - Gets a value indicating whether the method will return a valid - HMAC-encoded signature string when called with the specified credentials. - - - Returns true if these credentials will yield a valid signature string; otherwise, false. - - - - - Class that represents credentials for anonymous access. Used by internal implementaion. - - - - - Stores the singleton instance of this class. - - - - - Prevents a default instance of the class from being created. - - - - - A potential transformation to the Uri for signing purposes. The transformation may append to the string. - - The resource Uri to be transformed. - The new resource Uri that includes any transformations required for signing. - Identity operation for anonymous access. - - - - An operation that may add any required authentication headers based for the credential type. (SharedKey algorithm). - - The request that needs to be signed. - No op for anonymous access. - - - - An operation that may add any required authentication headers based for the credential type. (SharedKeyLite algorithm used for LINQ for Tables). - - The request that needs to be signed. - No op for anonymous access. - - - - Performs the computation of the signature based on the private key. - - The string that should be signed. - The signature for the string. - Returns null representing no op. - - - - Performs the computation of the signature based on the private key. - - The string to be signed. - The signature for the string. - Need for D-SAS not public. - - - - Returns a that represents this instance. - - If set to true exports secrets. - - A that represents this instance. - - - - - Gets account name information if available. Else returns null. - - - - - Gets a value indicating whether the method must be called - before generating a signature string with the specified credentials. - - - Is true if needs transform Uri; otherwise, false. If false, - calling returns the original, unmodified Uri. - - - - - Gets a value indicating whether SignRequest will perform signing when using this credentials. - False means SignRequest will not do anything. - - - Is true if a request can be signed with these credentials; otherwise, false. - - - - - Returns whether SignRequestLite will perform signing when using this credentials. - False means SignRequestLite will not do anything. - - - - - Returns whether ComputeHMAC will return a valid HMAC when using this credentials. - False means ComputeHmac will return null. - - - Returns true if these credentials will yield a valid signature string; otherwise, false. - - - - - Represents storage credentials for constructing a Shared Access Signature - for delegated access to Blob service resources. - - - - - Stores the shared access signature token. - - - - - Stores the internal used to transform Uris. - - - - - Initializes a new instance of the class with the given token. - - A string token representing the shared access signature. - - - - Transforms a resource Uri for signing purposes. - The transformation may append to the string. - - The resource Uri to be transformed. - - The new resource Uri that includes any transformations required for signing. - - - - - An operation that may add any required authentication headers based for the credential type. (SharedKey algorithm). - - The request to be signed. - - - - An operation that may add any required authentication headers based for the credential type. (SharedKeyLite algorithm used for LINQ for Tables). - - The request to be signed. - - - - Encodes the signature string by using the HMAC-SHA-256 algorithm over - the UTF-8-encoded string-to-sign. - - The UTF-8-encoded string-to-sign. - The HMAC-encoded signature string. - - - - Encodes the signature string by using the HMAC-SHA-512 algorithm over - the UTF-8-encoded string-to-sign. - - The UTF-8-encoded string-to-sign. - The HMAC-encoded signature string. - - - - Returns a that represents this instance. - - If set to true exports secrets. - - A that represents this instance. - - - - - Gets the name of the storage account associated with the specified credentials. - - The name of the account. - - - - Indicates whether the method must be called - before generating a signature string with the specified credentials. - - - Is true if needs transform Uri; otherwise, false. If false, - calling returns the original, unmodified Uri. - - - - - Indicates whether a request can be signed under the Shared Key authentication - scheme using the specified credentials. - - - Is true if a request can be signed with these credentials; otherwise, false. - - - - - Indicates whether a request can be signed under the Shared Key Lite authentication - scheme using the specified credentials. - - - Is true if a request can be signed with these credentials; otherwise, false. - - - - - Indicates whether the method will return a valid - HMAC-encoded signature string when called with the specified credentials. - - - Is true if these credentials will yield a valid signature string; otherwise, false. - - - - - Gets the token. - - The token. - - - + + + + Microsoft.WindowsAzure.StorageClient + + + + + Class that provides methods for conveniently managing account information for storage services. + + + + + The setting name for using the development storage. + + + + + The setting name for specifying a development storage proxy Uri. + + + + + The setting name for using the default storage endpoints with the specified protocol. + + + + + The setting name for the account name. + + + + + The setting name for the account key. + + + + + The setting name for a custom blob storage endpoint. + + + + + The setting name for a custom queue endpoint. + + + + + The setting name for a custom table storage endpoint. + + + + + The setting name for a shared access key. + + + + + The default account name for the development storage. + + + + + The default account key for the development storage. + + + + + The credentials string used to test for the development storage credentials. + + + + + The root blob storage DNS name. + + + + + The root queue DNS name. + + + + + The root table storage DNS name. + + + + + Validator for the UseDevelopmentStorage setting. Must be "true". + + + + + Validator for the DevelopmentStorageProxyUri setting. Must be a valid Uri. + + + + + Validator for the DefaultEndpointsProtocol setting. Must be either "http" or "https". + + + + + Validator for the AccountName setting. No restrictions. + + + + + Validator for the AccountKey setting. Must be a valid base64 string. + + + + + Validator for the BlobEndpoint setting. Must be a valid Uri. + + + + + Validator for the QueueEndpoint setting. Must be a valid Uri. + + + + + Validator for the TableEndpoint setting. Must be a valid Uri. + + + + + Validator for the SharedAccessSignature setting. No restrictions. + + + + + Stores the user-specified configuration setting publisher. + + + + + Singleton instance for the development storage account. + + + + + Initializes a new instance of the class. + + A object. + The Blob service endpoint. + The Queue service endpoint. + The Table service endpoint. + + + + Initializes a new instance of the class. + + The account name and account key for the storage account. + Set to true to use HTTPS. + + This constructor returns a object for which all service endpoints + are configured as the default service endpoints. + + + + + Parses a connection string and returns a object based on + the connection string. + + The connection string to parse. + A object. + Thrown if is null or empty + Thrown if is not a valid connection string. + Thrown if is not parseable. + + + + Create a new instance of a from a configuration setting. + + Name of the configuration setting. + A . + Thrown if the service configuration file + is not available. + + + + Attempts to parse a configuration string into a object. + + The string to parse. + A object to construct from the parsed string. + true if the string was successfully parsed; otherwise false. + + + + Sets the global configuration setting publisher for the object. + + The configuration setting publisher. + + + This method supports changing storage keys dynamically. For further details, + see the Thumbnails sample included with the Windows Azure SDK. + + + + + + Returns a string representation of storage account information. + + + A that represents this instance. + + + Returned string omits any sensitive information such as account key data. + + + + + Returns a string representation of storage account information. + + If set to true, the string will include private data such as account key or shared access tokens in the resulting value. + The default value is false. + + A that represents this instance. + + + + + Returns a with development storage credentials using the specified proxy Uri. + + The proxy endpoint to use. + The new . + + + + Internal implementation of Parse/TryParse. + + The string to parse. + The to return. + A callback for reporting errors. + If true, the parse was successful. Otherwise, false. + + + + Tokenizes input and stores name/value pairs in a NameValueCollection. + + The string to parse. + Error reporting delegate. + Tokenized collection. + + + + Encapsulates a validation rule for an enumeration based account setting. + + The name of the setting. + A list of valid values for the setting. + An representing the enumeration constraint. + + + + Encapsulates a validation rule using a func. + + The name of the setting. + A func that determines if the value is valid. + An representing the constraint. + + + + Determines whether the specified setting value is a valid base64 string. + + The setting value. + + Returns true if the specified setting value is a valid base64 string; otherwise, false. + + + + + Validation function that validates Uris. + + Value to validate. + + Returns true if the specified setting value is a valid Uri; otherwise, false. + + + + + Settings filter that requires all specified settings be present and valid. + + A list of settings that must be present. + The remaining settings or null if the filter's requirement is not satisfied. + + + + Settings filter that removes optional values. + + A list of settings that are optional. + The remaining settings or null if the filter's requirement is not satisfied. + + + + Settings filter that ensures that at least one setting is present. + + A list of settings of which one must be present. + The remaining settings or null if the filter's requirement is not satisfied. + + + + Settings filter that ensures that a valid combination of credentials is present. + + The remaining settings or null if the filter's requirement is not satisfied. + + + + Tests to see if a given list of settings matches a set of filters exactly. + + The settings to check. + A list of filters to check. + + If any filter returns null, false. + If there are any settings left over after all filters are processed, false. + Otherwise true. + + + + + Gets a StorageCredentials object corresponding to whatever credentials are supplied in the given settings. + + The settings to check. + The StorageCredentials object specified in the settings. + + + + Gets the default blob endpoint using specified settings. + + The settings to use. + The default blob endpoint. + + + + Gets the default blob endpoint using the specified protocol and account name. + + The protocol to use. + The name of the storage account. + The default blob endpoint. + + + + Gets the default queue endpoint using the specified settings. + + The settings. + The default queue endpoint. + + + + Gets the default queue endpoint using the specified protocol and account name. + + The protocol to use. + The name of the storage account. + The default queue endpoint. + + + + Gets the default table endpoint using the specified settings. + + The settings. + The default table endpoint. + + + + Gets the default table endpoint using the specified protocol and account name. + + The protocol to use. + The name of the storage account. + The default table endpoint. + + + + Gets the default configuration information for the development storage account. + + The development storage account. + + + + Gets the endpoint for the Blob service as configured for the storage account. + + The blob endpoint. + + + + Gets the endpoint for the Queue service as configured for the storage account. + + The queue endpoint. + + + + Gets the endpoint for the Table service as configured for the storage account. + + The table endpoint. + + + + Gets the storage credentials to use to access the storage account. + + The storage credentials. + + + + Encapsulates a mutable storage credentials object. + + + + + Stores the mutable storage credentials. + + + + + Initializes a new instance of the class. + + Name of the configuration setting. + + + + Sets the configuration value. + + The value. + true if the value was set; otherwise, false. + + + + Gets or sets the name of the configuration setting from which we retrieve storage account information. + + + + + Gets or sets the cloud storage account. + + The cloud storage account. + + + + Represents a object that is mutable to support key rotation. + + + + + Represents credentials to authenticate access to the Windows Azure storage services via a storage account. + + + + The Windows Azure storage services include the Blob, Queue, and Table services. + + + For additional information about the Windows Azure storage services, see + Windows Azure Storage Services API Reference. + For detailed information on request authentication, see + Authentication Schemes. + + + + + + Transforms a resource Uri for signing purposes. + The transformation may append to the string. + + The resource Uri to be transformed. + The new resource Uri that includes any transformations required for signing. + + + + Signs a request using the specified credentials under the Shared Key authentication scheme. + + The request to be signed. + + + + Signs a request using the specified credentials under the Shared Key Lite authentication scheme. + + The request to be signed. + + + + Encodes the signature string by using the HMAC-SHA256 algorithm over + the UTF-8-encoded string-to-sign. + + The UTF-8-encoded string-to-sign. + The HMAC-encoded signature string. + + + + Performs the computation of the signature based on the private key. + + The string to be signed. + The signature for the string. + Need for D-SAS not public. + + + + Returns a that represents this instance. + + If set to true exports secrets. + + A that represents this instance. + + + + + Gets the name of the storage account associated with the specified credentials. + + The name of the account. + + + + Gets a value indicating whether the method must be called + before generating a signature string with the specified credentials. + + Is true if [needs transform Uri]; otherwise, false. If false, + calling returns the original, unmodified Uri. + + + + Gets a value indicating whether a request can be signed under the Shared Key authentication + scheme using the specified credentials. + + + Is true if a request can be signed with these credentials; otherwise, false. + + + + + Gets a value indicating whether a request can be signed under the Shared Key Lite authentication + scheme using the specified credentials. + + + Is true if a request can be signed with these credentials; otherwise, false. + + + + + Gets a value indicating whether the method will return a valid + HMAC-encoded signature string when called with the specified credentials. + + + Is true if these credentials will yield a valid signature string; otherwise, false. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The initial credentials. + + + + Updates the object with new credentials. + + The new credentials. + + + + Computes the HMAC signature of the specified string. + + The string to sign. + The computed signature. + + + + Signs a request using the specified credentials under the Shared Key authentication scheme. + + The request to be signed. + + + + Signs a request using the specified credentials under the Shared Key Lite authentication scheme. + + The request to be signed. + + + + Transforms the Uri. + + The resource Uri. + The transformed Uri. + + + + Computes the 512-bit HMAC signature of the specified string. + + The string to sign. + The computed signature. + + + + Returns a that represents this instance. + + If set to true the string exposes key information. + + A that represents this instance. + + + + + Gets the name of the storage account associated with the specified credentials. + + The account name. + + + + Gets a value indicating whether the method will return a valid + HMAC-encoded signature string when called with the specified credentials. + + + Returns true if these credentials will yield a valid signature string; otherwise, false. + + + + + Gets a value indicating whether a request can be signed under the Shared Key authentication + scheme using the specified credentials. + + + Returns true if a request can be signed with these credentials; otherwise, false. + + + + + Gets a value indicating whether a request can be signed under the Shared Key Lite authentication + scheme using the specified credentials. + + + Returns true if a request can be signed with these credentials; otherwise, false. + + + + + Gets a value indicating whether the method must be called + before generating a signature string with the specified credentials. + + + Returns true if [needs transform Uri]; otherwise, false. If false, + calling returns the original, unmodified Uri. + + + + + Gets or sets the current object that this instance represents. + + + + + Contains helper methods for implementing shared access signatures. + + + + + Get the signature hash embedded inside the Shared Access Signature. + + The shared access policy to hash. + An optional identifier for the policy. + Either "b" for blobs or "c" for containers. + The client whose credentials are to be used for signing. + The signed hash. + + + + Get the complete query builder for creating the Shared Access Signature query. + + The shared access policy to hash. + An optional identifier for the policy. + Either "b" for blobs or "c" for containers. + The signature to use. + The finished query builder. + + + + Converts the specified value to either a string representation or . + + The value to convert. + A string representing the specified value. + + + + Converts the specified value to either a string representation or null. + + The value to convert. + A string representing the specified value. + + + + Escapes and adds the specified name/value pair to the query builder if it is not null. + + The builder to add the value to. + The name of the pair. + The value to be escaped. + + + + Parses the query. + + The query parameters. + The credentials. + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to The argument must not be empty string.. + + + + + Looks up a localized string similar to The argument is out of range. + + + + + Looks up a localized string similar to The argument '{0}' is larger than maximum of '{1}'. + + + + + Looks up a localized string similar to The argument '{0}' is smaller than minimum of '{1}'. + + + + + Looks up a localized string similar to Cannot attach to a TableStorageDataServiceContext object. These objects already contain the functionality for accessing the table storage service.. + + + + + Looks up a localized string similar to "Versions before 2009-09-19 do not support Shared Key Lite for Blob And Queue, current target version '{0}'". + + + + + Looks up a localized string similar to Cannot change size below currently written size. + + + + + Looks up a localized string similar to A stream blob must have a blob size of 0.. + + + + + Looks up a localized string similar to The blob is larger than maximum supported size '{0}'. + + + + + Looks up a localized string similar to Data already uploaded. + + + + + Looks up a localized string similar to The block size must be positive value. + + + + + Looks up a localized string similar to Block size can not be larger than '{0}'. + + + + + Looks up a localized string similar to Cannot create Shared Access Signature for snapshots. Perform the operation on the root blob instead.. + + + + + Looks up a localized string similar to Cannot create Shared Access Signature as the credentials does not have account name information. Please check that the credentials used support creating Shared Access Signature.. + + + + + Looks up a localized string similar to Cannot create Shared Access Signature unless the Account Key credentials are used by the BlobServiceClient.. + + + + + Looks up a localized string similar to Cannot perform this operation on a blob representing a snapshot.. + + + + + Looks up a localized string similar to Server operation did not finish within user specified timeout '{0}' seconds, check if operation is valid or try increasing the timeout.. + + + + + Looks up a localized string similar to If-Modified-Since and If-Unmodified-Since require a DateTime value.. + + + + + Looks up a localized string similar to If-Match and If-None-Match require an ETag value.. + + + + + Looks up a localized string similar to The conditionals specified for this operation did not match server.. + + + + + Looks up a localized string similar to SetConfigurationSettingPublisher needs to be called before FromConfigurationSetting can be used. + + + + + Looks up a localized string similar to The supplied credentials '{0'} cannot be used to sign request. + + + + + Looks up a localized string similar to The option '{0}' must be 'None' to delete a specific snapshot specified by '{1}'. + + + + + Looks up a localized string similar to Cannot combine incompatible absolute Uris base '{0}' relative '{1}'.When trying to combine 2 absolute Uris, the base uri should be a valid base of the relative Uri.. + + + + + Looks up a localized string similar to Invalid acl public access type returned '{0}'. Expected blob or container.. + + + + + Looks up a localized string similar to The continuation type passed in is unexpected. Please verify that the correct continuation type is passed in. Expected {0}, found {1}. + + + + + Looks up a localized string similar to Invalid query parameters inside Blob address '{0}'.. + + + + + Looks up a localized string similar to Listing snapshots is only supported in flat mode (no delimiter). Consider setting BlobRequestOptions.UseFlatBlobListing property to true.. + + + + + Looks up a localized string similar to Calculated MD5 does not match existing property. + + + + + Looks up a localized string similar to Messages cannot be larger than {0} bytes.. + + + + + Looks up a localized string similar to Cannot find account information inside Uri '{0}'. + + + + + Looks up a localized string similar to Invalid blob address '{0}', missing container information. + + + + + Looks up a localized string similar to Missing mandatory parameters for valid Shared Access Signature. + + + + + Looks up a localized string similar to Canonicalization did not find a non empty x-ms-date header in the WebRequest. Please use a WebRequest with a valid x-ms-date header in RFC 123 format (example request.Headers["x-ms-date"] = DateTime.UtcNow.ToString("R", CultureInfo.InvariantCulture)). + + + + + Looks up a localized string similar to Cannot provide credentials as part of the address and as constructor parameter. Either pass in the address or use a different constructor.. + + + + + Looks up a localized string similar to Multiple different snapshot times provided as part of query '{0}' and as constructor parameter '{1}'.. + + + + + Looks up a localized string similar to EndMoveNextSegment must be called before the Current property can be accessed.. + + + + + Looks up a localized string similar to The segment cursor has no more results.. + + + + + Looks up a localized string similar to This operation is not supported for creating a PageBlob. Use other operations to create a PageBlob.. + + + + + Looks up a localized string similar to Missing account name information inside path style uri. Path style Uris should be of the form http://<IPAddressPlusPort>/<accountName>. + + + + + Looks up a localized string similar to Address '{0}' is not an absolute address. Relative addresses are not permitted in here.. + + + + + Looks up a localized string similar to Attempting to seek past the end of the stream. + + + + + Looks up a localized string similar to Attempting to seek before the start of the stream. + + + + + Looks up a localized string similar to Server returned more that MaxResults requested. + + + + + Looks up a localized string similar to '{0}' is not a valid table name.. + + + + + Looks up a localized string similar to The number of blocks is larger than the maximum of '{0}'. + + + + + Looks up a localized string similar to Too many '{0}' shared access policy identifiers provided. Server does not support setting more than '{1}' on a single container.. + + + + + Looks up a localized string similar to The blob type cannot be undefined.. + + + + + Represents a set of access conditions to be used for operations against the storage services. + + + + + Indicates that no access condition is set. + + + + + Creates an access condition for the IfModifiedSince condition. + + The last-modified time, expressed as UTC time. + An object with the If-Modified-Since condition set. + + Setting this access condition modifies the request to include the HTTP If-Modified-Since conditional header. + If this access condition is set, the operation is performed only if the resource has been modified since the specified time. + See Specifying Conditional Headers for Blob Service Operations + for more information. + + + + + Creates an access condition for the IfNotModifiedSince condition. + + The last-modified time, expressed as UTC time. + An object with the IfNotModifiedSince condition set. + + Setting this access condition modifies the request to include the HTTP If-Unmodified-Since conditional header. + If this access condition is set, the operation is performed only if the resource has not been modified since the specified time. + See Specifying Conditional Headers for Blob Service Operations + for more information. + + + + + Creates an access condition for the IfMatch condition. + + The ETag to match. + An object with the IfMatch condition set. + + Setting this access condition modifies the request to include the HTTP If-Match conditional header. + If this access condition is set, the operation is performed only if the ETag of the resource + matches the specified ETag. + See Specifying Conditional Headers for Blob Service Operations + for more information. + + + + + Creates an access condition for the IfNoneMatch condition. + + The ETag to match. + An object with the IfNoneMatch condition set. + + Setting this access condition modifies the request to include the HTTP If-None-Match conditional header. + If this access condition is set, the operation is performed only if the ETag of the resource + does not match the specified ETag. + See Specifying Conditional Headers for Blob Service Operations + for more information. + + + + + Converts AccessCondition into a type for use as a source conditional to Copy. + + The original condition. + The resulting header for the condition. + The value for the condition. + + + + Applies the condition to the web request. + + The request to be modified. + + + + Verifies the condition is satisfied. + + The ETag to check. + The last modified time UTC. + true if the condition is satisfied, otherwise false. + + + + Gets or sets the header of the request to be set. + + The access condition header. + + + + Gets or sets the value of the access condition header. + + The access condition header value. + + + + Represents a set of attributes (properties and metadata) for a blob. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The blob attributes to clone. + + + + Gets the system properties for the blob. + + The blob properties. + The value of this property is never null. + + + + Gets the user-defined metadata for the blob. + + The blob metadata. + The value of this property is never null. + + + + Gets the Uri of the blob. + + The blob's Uri. + + + + Gets the date and time the snapshot was taken. + + The blob's snapshot time if the blob is a snapshot; otherwise, null. + + If the blob is not a snapshot, the value of this property is null. + + + + + Represents a set of attributes (properties and metadata) for a blob container. + + + + + Initializes a new instance of the class. + + + + + Gets the user-defined metadata for the container. + + The container's metadata. + The value of this property is never null. + + + + Gets the system properties for the container. + + The container's properties. + The value of this property is never null. + + + + Gets the name of the container. + + The container's name. + + + + Gets the Uri of the container. + + The container's Uri. + + + + Represents the permissions on the container. + + + + + Initializes a new instance of the class. + + + + + Gets or sets the public access level. + + The public access type of the container. + + + + Gets the set of container-level access policies for the container. + + The shared access policies of the container. + + + + Represents the system properties for a container. + + + + + Gets the ETag of the container. + + The container's etag. + + + + Gets the container's last-modified time, in UTC format. + + The container's last modified time in UTC format. + + + + The level of public access that is allowed on the container. + + + + + No public access. Only the account owner can read resources in this container. + + + + + Container-level public access. Anonymous clients can read container and blob data. + + + + + Blob-level public access. Anonymous clients can read blob data only within this container. + + + + + Error code strings that are specific to the blob service. + + + + + Stores the error code for invalid block ID errors. + + + + + Stores the error code for blob not found errors. + + + + + Stores the error code for blob already exists errors. + + + + + Stores the error code for invalid blob or block errors. + + + + + Stores the error code for invalid block list errors. + + + + + Specifies which details to include when listing the blobs in this container. + + + + + No additional details. + + + + + Include snapshots. + + + + + Include blob metadata. + + + + + Include uncommitted blobs. + + + + + Include all available details. + + + + + Represents the system properties for the blob. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class based on an existing instance. + + The instance of the class to clone. + + + + Gets or sets the cache-control header for the blob. + + The blob's cache control value. + + + + Gets or sets the content-encoding header for the blob. + + The blob's content encoding. + + If this property has not been set for the blob, it returns null. + + + + + Gets or sets the content-language header for the blob. + + The blob's content language. + + If this property has not been set for the blob, it returns null. + + + + + Gets the size of the blob. + + The blob's length. + + + + Gets or sets the content-MD5 header for the blob. + + The blob's MD5 hash. + + + + Gets or sets the content-type header for the blob. + + The blob's content type. + + If this property has not been set for the blob, it returns null. + + + + + Gets the blob's ETag. + + The blob's ETag. + + The ETag is an identifier assigned to the blob by the Blob service. It is updated + on write operations to the blob. It may be used in conditional operations employing + If-Match or If-None-Match conditions to determine whether the operation should be performed. + + + + + Gets the the last-modified time for the blob, in UTC format. + + The blob's last modified time in UTC format. + + + + Gets the type of the blob. + + The type of the blob. + + + + Gets the blob's lease status. + + The blob's lease status. + + + + This class represents a seekable, read-only stream on a blob. + + + + + Represents a stream for reading and writing to a blob. + + + + + Aborts the operation to write to the blob. + + + + + Begins an asynchronous operation to commit a blob. + + An optional asynchronous callback, to be called when the commit is complete. + A user-provided object that distinguishes this particular asynchronous commit request from other requests. + An object of type that represents the asynchronous commit, which may still be pending. + + + + Ends an asynchronous operation to commit the blob. + + An object of type that references the asynchronous operation. + asyncResult is null + Only supported if stream's property CanWrite is true + + + + Commits the blob. + + Only supported if stream's property CanWrite is true + + + + Gets a reference to the blob on which the stream is opened. + + The blob this stream accesses. + + + + Gets a value indicating whether the signature of each block should be verified. + + + Returns true if integrity control verification is enabled; otherwise, false. + + + + + Gets or sets the number of bytes to read ahead. + + The size of the read ahead. + Only supported if stream's property CanRead is true + + + + Gets or sets the block size. + + The size of the block. + Only supported if stream's property CanWrite is true + + + + The threshold beyond which we start a new read-Ahead. + + + + + The current position with the stream. + + + + + The number of bytes to read forward on every request. + + + + + The options applied to the stream. + + + + + True if the AccessCondition has been changed to match a single ETag. + + + + + The list of blocks for this blob. + + + + + The already available blocks for reading. This member is the only possible point of thread contention between the user's requests and ReadAhead async work. + At any particular time, the ReadAhead thread may be adding more items into the list. The second thread will never remove/modify an existing item within the list. + + + + + A handle to the parallel download of data for ReadAhead. + + + + + Initializes a new instance of the BlobReadStream class. + + The blob used for downloads. + Modifiers to be applied to the blob. After first request, the ETag is always applied. + The number of bytes to read ahead. + Controls whether block's signatures are verified. + + + + Setting the length of the blob is not supported. + + The desired length. + Always thrown. + + + + Write is not supported. + + An array of bytes. This method copies count bytes from buffer to the current stream. + The zero-based byte offset in buffer at which to begin copying bytes to the current stream. + The number of bytes to be written to the current stream. + + + + Flush is not supported on read-only stream. + + + + + Seeks to the desired position. Any seek outside of the buffered/read-ahead data will cancel read-ahead and clear the buffered data. + + A byte offset relative to the origin parameter. + A value of type System.IO.SeekOrigin indicating the reference point used to obtain the new position. + The new position within the current stream. + Thrown if offset is invalid for SeekOrigin + + + + Copies the specified amount of data from internal buffers to the buffer and advances the position. + + An array of bytes. When this method returns, the buffer contains the specified byte array with the values + between offset and (offset + count - 1) replaced by the bytes read from the current source. + The zero-based byte offset in buffer at which to begin storing the data read from the current stream. + The maximum number of bytes to be read from the current stream. + The total number of bytes read into the buffer. This can be less than the number of bytes requested + if that many bytes are not currently available, or zero (0) if the end of the stream has been reached. + + The sum of offset and count is larger than the buffer length. + The buffer parameter is null. + The offset or count parameters are negative. + An I/O error occurs. + + + + Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream. + + The unsigned byte cast to an Int32, or -1 if at the end of the stream. + + + + Begins an asynchronous read operation. + + The buffer to read the data into. + The byte offset in at which to begin writing data read from the stream. + The maximum number of bytes to read. + An optional asynchronous callback, to be called when the read is complete. + A user-provided object that distinguishes this particular asynchronous read request from other requests. + + An that represents the asynchronous read, which could still be pending. + + + Attempted an asynchronous read past the end of the stream, or a disk error occurs. + + + One or more of the arguments is invalid. + + + Methods were called after the stream was closed. + + + The current Stream implementation does not support the read operation. + + + + + Ends an asynchronous read operation. + + The reference to the pending asynchronous request to finish. + + The number of bytes read from the stream, between zero (0) and the number of bytes you requested. + Streams return zero (0) only at the end of the stream, otherwise, they should block until at least one byte is available. + + + is null. + + + did not originate from a method on the current stream. + + + The stream is closed or an internal error has occurred. + + + + + Wraps the Read operation to remap any exceptions into IOException. + + The buffer to read the data into. + The zero-based byte offset in buffer at which to begin storing the data read from the current stream. + The maximum number of bytes to be read from the current stream. + The action to be done upon completion to return the number of bytes read. + A task sequence representing the operation. + The sum of offset and count is larger than the buffer length. + The buffer parameter is null. + The offset or count parameters are negative + An I/O error occurs. + + + + Performs the read operation. + + The buffer to read the data into. + The zero-based byte offset in buffer at which to begin storing the data read from the current stream. + The maximum number of bytes to be read from the current stream. + The action to be done upon completion to return the number of bytes read. + A task sequence representing the operation. + + If verification is on, retrieve the blocklist. + If there are downloaded blocks, read from there. + Otherwise, if there's an outstanding request, wait for completion and read from there. + Otherwise perform a new request. + + + + + Locks download to a specific ETag. + + + + + Reads the data from the service starting at the specified location. Verifies the block's signature (if required) and adds it to the buffered data. + + The starting position of the read-ahead. + The number of bytes to read ahead. + An TaskSequence that represents the asynchronous read action. + + + + Ends an asynchronous read-ahead operation. + + An object of type that references the asynchronous operation. + asyncResult is null + + + + Retrieves the size of the blob. + + If verification is on, it will retrieve the blocklist as well + + + + Verifies if the blocks are in expected format. Disables the integrity control if they are not appropriate for validation. + + + + + Calculates the ReadAhead bounds (start and count) as required by the existing data. + + The desired start position. + The end of the existing gap. + The desired number of bytes. + The start position rounded down to the nearest block start. + The number of bytes with readAheadSize included and rounded up to the end of the nearest block. + This calculates the bounds based on the blocklist, not any existing data. + + + + Reads from the verified blocks as much data as is available and needed. + + The buffer to read the data into. + The zero-based byte offset in buffer at which to begin storing the data read from the current stream. + The maximum number of bytes to be read from the current stream. + True if there was any data read. + + + + Calculates if the currently held data is less than percentage depleted. + + The start position for any ReadAhead based on the last block. + True if more data is needed. + + + + Verifies if the given offset is within the bounds of the stream. + + The offset to be checked. + This may do a server round-trip if the length is not known. + + + + Gets a value indicating whether the current stream supports reading. + + Returns true if the stream supports reading; otherwise, false. + + + + Gets a value indicating whether the current stream supports seeking. + + Returns true if the stream supports seeking; otherwise, false. + + + + Gets a value indicating whether the current stream supports writing. + + Returns true if the stream supports writing; otherwise, false. + + + + Gets a value indicating whether the current stream can time out. + + A value that determines whether the current stream can time out. + + + + Gets or sets a value, in miliseconds, that determines how long the stream will attempt to read before timing out. + + A value, in miliseconds, that determines how long the stream will attempt to read before timing out. + + + + Gets the length of the blob. + + May need to do a roundtrip to retrieve it. + + + + Gets or sets the position within the stream. + + + + + Gets or sets the number of bytes to read ahead. + + + + + Gets a value indicating whether the signature of each downloaded block should be verified. + + This requires having a blocklist, having blockIDs to be in the appropriate format. This causes all reads to be rounded to the nearest block. + + + + Gets a value indicating whether length is available. + + + + + Represents a single block of data that was downloaded. + + + + + Initializes a new instance of the class. + + The start offset. + The content. + + + + Gets the starting location of the block. + + + + + Gets the content of the block. + + + + + Encapsulates the collection of downloaded blocks and provides appropriate locking mechanism. + + + + + Holds the downloaded blocks. + + + + + Finds the block that contains the data for the . + + The position which is requested. + A block that contains the data for the or null. + + + + Removes any downloaded blocks that are outside the current bounds (position and readAheadSize). + + The position before which all blocks should be purged. + Size of the read-ahead beyond position for blocks to be kept. + + + + Calculates the length of the gap relative to . + + The position from which to find the gap. + Size of the desired. + The gap start. + The gap end. + + + + Tells if there are any blocks available. + + Returns true if there are any blocks; otherwise, false. + + + + Adds the specified downloaded block. + + The downloaded block. + + + + Removes the specified block based on the startOffset key. + + The key for the block. + + + + Represents a set of behavior options for a specific request. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class based on the parameters of an + existing instance. + + The instance of the class to clone. + + + + Initializes a new instance of the class. + + The Blob service client. + + + + Creates the full modifier. + + The type of the options. + The service. + The options. + A full modifier of the requested type. + + + + Clones this instance. + + A clone of the instance. + + + + Applies the defaults. + + The service. + + + + Gets or sets the retry policy. + + The retry policy. + + + + Gets or sets the timeout for the request. + + The request timeout. + + For more information about setting server timeouts, see + Setting Server Timeouts for Blob Service Operations. + + + + + Gets or sets the access condition for the request. + + The access condition. + + + + Gets or sets the access condition on the source blob, for the Copy Blob operation. + + The copy source access condition. + + This property is applicable only for a Copy Blob operation. + + + + + Gets or sets options for deleting snapshots dUring the Delete Blob operation. + + The delete snapshots option. + + This property is applicable only for a Delete Blob operation. + + + + + Gets or sets a object that indicates which blob details are + listed by a List Blobs operation. + + The blob listing details. + + This property is applicable only for a List Blobs operation. + + + + + Gets or sets a value indicating whether to blob listing operation will list and + or expand all into the contained in them. + + + Returns true if only a flat listing is desired; false if listing should include . + + + This property is applicable only for a List Blobs operation. + + if the containers contain the following blob items ("mycontainer/foo/a", "mycontainer/foo/b/c", "mycontainer/foo/b/d", "mycontainer/bar"), + then listing blobs under "mycontainer/foo/" will result in {blob "mycontainer/foo/a", blobdirectory "mycontainer/foo/b/"} if this flag is set to false and + + and {"mycontainer/foo/a", "mycontainer/foo/b/c", "mycontainer/foo/b/d"} if the flag is set to true. + + + + The type of a blob. + + + + + Not specified. + + + + + A page blob. + + + + + A block blob. + + + + + The class is an append-only stream for writing into storage. + + + + + The stream is writable until committed/close. + + + + + The current position within the blob. + + + + + The size of the blocks to use. + + + + + The list of uploaded blocks. + + + + + A memory stream holding the current block information. + + + + + The hash of the current block. + + + + + The ongoing blob hash. + + + + + The set of options applying to the current blob. + + + + + Initializes a new instance of the BlobWriteStream class. + + The blob used for uploads. + The options used for the stream. + The size of the blocks to use. + + + + The stream does not support reading. + + An array of bytes. When this method returns, the buffer contains the specified byte array with the values + between offset and (offset + count - 1) replaced by the bytes read from the current source. + The zero-based byte offset in buffer at which to begin storing the data read from the current stream. + The maximum number of bytes to be read from the current stream. + The total number of bytes read into the buffer. This can be less than the number of bytes requested + if that many bytes are not currently available, or zero (0) if the end of the stream has been reached. + + Not supported operation as this is a write-only stream + + + + The stream does not support seeking. + + A byte offset relative to the origin parameter. + A value of type System.IO.SeekOrigin indicating the reference point used to obtain the new position. + The new position within the current stream. + Not supported operation as this is a write-only stream + + + + The stream does not support setting of length. + + The desired length of the current stream in bytes. + Growing a stream is not possible without writing. + + + + Write the provided data into the underlying stream. + + An array of bytes. This method copies count bytes from buffer to the current stream. + The zero-based byte offset in buffer at which to begin copying bytes to the current stream. + The number of bytes to be written to the current stream. + is null. + offset or count is negative. + Thrown if blob is already committed/closed + + + + Copies a single byte into the stream. + + The byte of data to be written. + + + + Begins an asynchronous write operation. + + The buffer to write data from. + The byte offset in buffer from which to begin writing. + The number of bytes to write. + An optional asynchronous callback, to be called when the write is complete. + A user-provided object that distinguishes this particular asynchronous write request from other requests. + An IAsyncResult that represents the asynchronous write, which could still be pending. + is null. + offset or count is negative. + Thrown if blob is already committed/closed + The operation will be completed synchronously if the buffer is not filled + + + B + Ends an asynchronous write operation. + + An object of type that references the asynchronous operation. + asyncResult is null + + + + Causes any buffered data to be written to the remote storage. If the blob is not using blocks, the blob is fully committed. + + An I/O error occurs while writing to storage. + + + + Aborts the upload of the blob. + + + + + Begins an asynchronous operation to commit the blob. + + An optional asynchronous callback, to be called when the commit is complete. + A user-provided object that distinguishes this particular asynchronous commit request from other requests. + An IAsyncResult that represents the asynchronous commit, which could still be pending. + + + + Ends an asynchronous operation to commit the blob. + + An object of type that references the asynchronous operation. + asyncResult is null + + + + Commits the blob on the server. + + + + + Implements the disposing logic of committing the blob. + + True to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Creates a blockID using the block's hash and a prefix. + + The base64 encoded blockID. + + + + Implements the block writing task. + + The buffer to write data from. + The byte offset in buffer from which to begin writing. + The number of bytes to write. + The sequence representing the uploading of the blocks. + + + + Creates a task that writes data for a full blob. + + The buffer to write data from. + The byte offset in buffer from which to begin writing. + The number of bytes to write. + The (synchronous) sequence that copies the data into a buffer. + Thrown if the buffer is larger than maximum blob size. + Since a non-block based blob is always fully buffered before upload, this task is a synchronous copy. + + + + Implements the flushing sequence. + + The sequence of events for a flush. + + + + Commits the blob by uploading any remaining data and the blocklist asynchronously. + + A sequence of events required for commit. + + + + Implements a sequence of events to upload a full blob. + + The sequence of events required to upload the blob. + + + + Sets the MD5 of the blob. + + + + + Implements a sequence to upload a block. + + The sequence of events for upload. + + + + Verifies that the blob is in writable state. + + Thrown if stream is non-writable. + + + + Resets the block and the block hash. + + + + + Creates the new block and the block hash. + + + + + Gets a value indicating whether the current stream supports reading. + + Returns true if the stream supports reading; otherwise, false. + + + + Gets a value indicating whether the current stream supports seeking. + + Returns true if the stream supports seeking; otherwise, false. + + + + Gets a value indicating whether the current stream supports writing. + + Returns true if the stream supports writing; otherwise, false. + + + + Gets a value indicating whether the current stream can time out. + + A value that determines whether the current stream can time out. + + + + Gets or sets a value, in milliseconds, that determines how long the stream will attempt to write before timing out. + + + + + Gets the current length (equal to the position). + + + A long value representing the length of the stream in bytes. + + + A class derived from Stream does not support seeking. + + + Methods were called after the stream was closed. + + + + + Gets or sets the current position. + + + The current position within the stream. + + + An I/O error occurs. + + + The stream does not support seeking. + + + Methods were called after the stream was closed. + + + + + Gets or sets the block size. + + + + + Gets a value indicating whether the upload is done in blocks. + + Returns true if blocks are to be used; otherwise, false. + + + + Indicates whether to list only committed blocks, only uncommitted blocks, or all blocks. + + + + + Include only the committed blocks. + + + + + Include only the uncommitted blocks. + + + + + Include all blocks. + + + + + Represents a Windows Azure blob. + + + + + Interface for an item returned from a List Blobs operation. + + + + + Gets the Uri. + + The item's Uri. + + + + Gets the parent. + + The item's parent. + + + + Gets the container. + + The item's container. + + + + Stores the blob's attributes. + + + + + Stores the that contains this blob. + + + + + Stores the blob's parent . + + + + + Stores the blob's transformed address. + + + + + Initializes a new instance of the class using the specified base Uri. + + The absolute Uri to the blob. + + Any authentication information inside the address will be used to set the blob's credentials. + Otherwise a blob for anonymous access is created. + Any snapshot information as part of the address will indicate that this blob is a snapshot. + + + + + Initializes a new instance of the class representing the blob at the specified Uri. + + The absolute Uri to the blob. + Storage account credentials. + + + + Initializes a new instance of the class representing the blob at the specified Uri. + + A relative Uri to the blob. + A object that specifies the endpoint for the Blob service. + + + + Initializes a new instance of the class using the information specified in an existing instance. + + A object. + + + + Initializes a new instance of the class. + + Absolute Uri. + True to use path style Uri. + + Any authentication information inside the address will be used. + Otherwise a blob for anonymous access is created. + Any snapshot information as part of the address will be recorded + Explicity specify whether to use host style or path style Uri + + + + + Initializes a new instance of the class creating a new service client. + + Complete Uri. + Storage credentials. + True to use path style Uris. + + + + Initializes a new instance of the class with the given absolute Uri. + + True to use path style Uris. + The absolute blob Uri. + + + + Initializes a new instance of the class with existing attributes. + + The attributes (NOTE: Saved by reference, does not make a copy). + The service client. + The snapshot time. + + + + Retrieves properties and metadata for this blob. + + + + + Retrieves properties and metadata for this blob. + + A object indicating any additional options to be specified on the request. + + + + Begins an asynchronous operation to retrieve the blob's metadata and properties. + + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Begins an asynchronous operation to retrieve the blob's metadata and properties. + + A object indicating any additional options to be specified on the request. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Ends an asynchronous operation to retrieve the blob's metadata and properties. + + An object of type that references the asynchronous operation. + + + + Updates the blob's metadata. + + + + + Updates the blob's metadata. + + A object indicating any additional options to be specified on the request. + + + + Begins an asynchronous operation to update the blob's metadata. + + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Begins an asynchronous operation to update the blob's metadata. + + A object indicating any additional options to be specified on the request. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Ends an asynchronous operation to update the blob's metadata. + + An object of type that references the asynchronous operation. + + + + Updates the blob's properties. + + + + + Updates the blob's properties. + + A object indicating any additional options to be specified on the request. + + + + Begins an asynchronous operation to update the blob's properties. + + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Begins an asynchronous operation to update the blob's properties. + + A object indicating any additional options to be specified on the request. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Ends an asynchronous operation to update the blob's properties. + + An object of type that references the asynchronous operation. + + + + Copy blob contents and properties from another blob. + + Source blob to copy from. + + + + Copy blob contents and properties from another blob. + + Source blob to copy from. + A object indicating any additional options to be specified on the request. + + + + Begins an asynchronous Copy Blob operation. + + The source blob. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Begins an asynchronous Copy Blob operation. + + The source blob. + A object indicating any additional options to be specified on the request. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Ends an asynchronous Copy Blob operation. + + An object of type that references the asynchronous operation. + + + + Deletes the blob. + + + + + Deletes the blob. + + A object indicating any additional options to be specified on the request. + + + + Begins an asynchronous operation to delete the blob. + + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Begins an asynchronous operation to delete the blob. + + A object indicating any additional options to be specified on the request. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Ends an asynchronous operation to delete the blob. + + An object of type that references the asynchronous operation. + + + + Deletes the blob if it exists. + + True if the blob was deleted. + + + + Deletes the blob if it exists. + + A object indicating any additional options to be specified on the request. + True if the blob was deleted. + + + + Begins an asynchronous operation to delete the blob if it exists. + + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Begins an asynchronous operation to delete the blob if it exists. + + A object indicating any additional options to be specified on the request. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Ends an asynchronous operation to delete the blob. + + An object of type that references the asynchronous operation. + true if the blob was successfully deleted. + + + + Creates a stream for writing to the blob. + + A used for writing to the blob. + + + + Creates a stream for writing to the blob. + + A object indicating any additional options to be specified on the request. + A used for writing to the blob. + + + + Uploads a blob from a stream. + + The data stream to be uploaded. + + + + Uploads a blob from a stream. + + The data stream to be uploaded. + The options to be used for the current request to override the default behavior. + + + + Begins an asynchronous operation to upload a blob from a stream. + + The data stream to be uploaded. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Begins an asynchronous operation to upload a blob from a stream. + + The data stream to be uploaded. + A object indicating any additional options to be specified on the request. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Ends an asynchronous operation to upload a blob from a stream. + + An object of type that references the asynchronous operation. + + + + Uploads a string of text to a file. + + The content to be upload. + This method assumes that the string is encoded as UTF-8. + + + + Uploads a string of text to a file. + + The content to be uploaded. + The encoding to be used. + A object indicating any additional options to be specified on the request. + + + + Uploads a file from the file system to a blob. + + The file to be uploaded. + + + + Uploads a file from the file system to a blob. + + The file to be uploaded. + A object indicating any additional options to be specified on the request. + + + + Uploads an array of bytes to a blob. + + The array of bytes to be uploaded. + + + + Uploads an array of bytes to a blob. + + The array of bytes to be uploaded. + A object indicating any additional options to be specified on the request. + + + + Gets a stream for reading the blob's contents. + + A used for reading from the blob. + + + + Gets a stream for reading the blob's contents. + + A object indicating any additional options to be specified on the request. + A used for reading from the blob. + + + + Downloads the blob contents to a stream. + + The target stream. + + + + Downloads the blob contents to a stream. + + The target stream. + A object indicating any additional options to be specified on the request. + + + + Begins an asynchronous operation to download the blob's contents to a stream. + + The target stream. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Begins an asynchronous operation to download the blob's contents to a stream. + + The target stream. + A object indicating any additional options to be specified on the request. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Ends an asynchronous operation to download the blob's contents to a stream. + + An object of type that references the asynchronous operation. + + + + Downloads the blob contents as a string. + + The contents of the blob. + + + + Downloads the blob contents as a string. + + A object indicating any additional options to be specified on the request. + The contents of the blob. + + + + Downloads the blob contents to a file. + + Name of the file. + + + + Downloads the blob contents to a file. + + Name of the file. + A object indicating any additional options to be specified on the request. + + + + Downloads the blob contents as an array of bytes. + + The contents of the blob. + + + + Downloads the blob contents as an array of bytes. + + A object indicating any additional options to be specified on the request. + The contents of the blob. + + + + Creates a snapshot of this blob. + + A object representing the snapshot. + + + + Creates a snapshot of this blob. + + A object indicating any additional options to be specified on the request. + A object representing the snapshot. + + + + Begins an asynchronous operation to create a snapshot of this blob. + + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Begins an asynchronous operation to create a snapshot of this blob. + + A object indicating any additional options to be specified on the request. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Ends an asynchronous operation to create a snapshot of this blob. + + An object of type that references the asynchronous operation. + A object representing the snapshot. + + + + Constructs the signature string for creating a Shared Access Signature for this blob. + + Describe the shared access permission details. + Query parameter string representing the signature. + + + + Constructs the signature string for creating a Shared Access Signature for this blob. + + A policy describing container-level permissions. + The identifier for a container-level access policy associated with this signature. + Query parameter string representing the signature. + Thrown if the current credentials don't support signing. + Thrown if blob is a snapshot. + + + + Dispatches the stream upload to a specific implementation method. + + The source stream. + The request options. + A that uploads the stream. + + + + Uploads the blob with buffering. + + The source stream. + The request options. + The size of the block. + A that uploads the blob. + + + + Uploads the full blob with retry. + + The source stream. + The request options. + A that uploads the blob. + + + + Uploads the full blob. + + The source stream. + The request options. + A that uploads the blob. + + + + Uploads the blob in parallel with blocks. + + The source stream. + The size of the block. + The request options. + A that uploads the blob. + + + + Uploads the block with retry. + + The source stream. + The block IS. + The content MD5. + The requestoptions. + A that uploads the block. + + + + Uploads the block. + + The source stream. + The block ID. + The content MD5. + The request options. + A that uploads the block. + + + + Uploads the data into the web request. + + The request that is setup for a put. + The source of data. + The response from the server. + The sequence used for uploading data. + + + + Implements the FetchAttributes method. + + The request options. + A that fetches the attributes. + + + + Implements the DownloadToStream method. + + The target stream. + The request options. + A that downloads the blob to the stream. + + + + Implements getting the stream. + + The options. + The offset. + The count. + The set result. + A that gets the stream. + + + + Retreive ETag and LastModified date time from response. + + The response to parse. + + + + Parses the blob address query and returns snapshot and SAS. + + The query to parse. + The snapshot value, if any. + The SAS credentials. + + + + Gets the default encoding for the blob, which is UTF-8. + + The default object. + + + + Used by both Shared Access and Copy blob operation. + + The canonical name of the blob. + + + + Uploads a stream that doesn't have a known length. In this case we can't do any optimizations like creating a request before we read all of the data. + + The stream that is the source of data. + The options to control the upload behavior. + The block size to be used (null - no blocks). + A sequence that represents uploading the blob. + This is implemented by creating a BlobStream and using that to buffer data until we have sufficient amount to be sent. + + + + Uploads the blob with blocks. + + The source stream. + The request options. + The size of the block. + A that uploads the blob. + + + + Uploads the full blob with a retry sequence. + + The source stream. + The request options. + A that uploads the blob. + + + + Implementation of the CopyFromBlob method. + + The source blob. + The request options. + A that copies the blob. + + + + Implements the DeleteBlob method. + + The request options. + A that deletes the blob. + + + + Implementation for the DeleteIfExists method. + + The options. + The set result. + A that deletes the blob if it exists. + + + + Implementation for the CreateSnapshot method. + + The request options. + The result report delegate. + A that creates the snapshot. + + + + Implementation for the SetMetadata method. + + The request options. + A that sets the metadata. + + + + Implementation for the SetProperties method. + + The request options. + A that sets the properties. + + + + Verifies that write operation is not done for snapshot. + + + + + Parses the snapshot time. + + The snapshot time. + The parsed snapshot time. + + + + Parse Uri for any snapshot and SAS (Shared access signature) information. Validate that no other query parameters are passed in. + + The complete Uri. + The existing blob client. + True to use path style Uris. + + Any snapshot information will be saved. + Any SAS information will be recorded as corresponding credentials instance. + If existingClient is passed in, any SAS information found will not be supported. + Otherwise a new client is created based on SAS information or as anonymous credentials. + + + + + Gets the DateTime value that uniquely identifies the snapshot, if this blob is a snapshot. + + The snapshot time. + + If the blob is not a snapshot, this property returns null. + + + + + Gets the object that represents the Blob service. + + The service client. + + + + Gets the Uri for the blob. + + The blob's Uri. + + + + Gets the blob's attributes. + + The blob's attributes. + + + + Gets the blob's user-defined metadata. + + The blob's metadata. + + + + Gets the blob's properties. + + The blob's properties. + + + + Gets a object representing the blob's container. + + The blob's container. + + + + Gets the object representing the + virtual parent directory for the blob. + + The blob's parent. + + + + Gets a object based on this blob. + + A object based on this blob.. + + + + Gets a object based on this blob. + + A object based on this blob. + + + + Gets the Uri after applying authentication transformation. + + The transformed address. + + + + Represents a client for accessing the Windows Azure blob service. + + + + + Stores the default delimiter. + + + + + Stores the parallelism factor. + + + + + Initializes a new instance of the class used for anonymous access. + + Complete Uri. + + + + Initializes a new instance of the class using the specified base address and credentials. + + The base Blob service address. + Access credentials. + + + + Initializes a new instance of the class using the specified base address and credentials. + + The base Blob service Uri. + Access credentials. + + + + Initializes a new instance of the class. + + True to use path style Uris. + The base Uri. + The credentials. + + + + Returns a for a blob with the specified address. + + The address of the blob. + A object representing the blob. + + + + Returns a for a blob with the specified address. + + The address of the blob. + A object representing the blob. + + + + Returns a for a blob with the specified address. + + The address of the blob. + A object representing the blob. + + + + Returns a for a blob with the specified address. + + The address of the blob. + A object representing the blob. + + + + Returns a for a blob with the specified address. + + The address of the blob. + A object representing the blob. + + + + Returns a for a container with the specified address. + + The address of the container. + A object representing the container. + + + + Returns a for a directory with the specified address. + + The address of the directory. + A object representing the directory. + + + + Lists all of the containers in the storage account. + + A list of containers. + + + + Lists the containers whose names begin with the specified prefix. + + The prefix to match. + A list of containers. + + + + Lists the containers whose names begin with the specified prefix. + + The prefix to match. + The details to include in the listing. + A list of containers. + + + + Lists all of the containers in the storage account. + + A result segment of containers. + + + + Lists the containers whose names begin with the specified prefix in sets of pages. + + The prefix to match. + A result segment of containers. + + + + Lists the containers whose names begin with the specified prefix. + + The prefix to match. + The details to include in the listing. + Non negative value which indicates the maximum number of results that should be returned at a time. Zero means no limit. + Note the returned ResultSegment.Results may still have less than the maxResults number of results. + Use to return the remaining results. + Optional continuationToken from previous ResultSegment for continuing listing operation. + A result segment of containers. + + + + Begins an asynchronous request to list containers. + + The delegate. + An object containing state information for this asynchronous request. + An that references the asynchronous request. + + + + Begins an asynchronous request to list containers with a matching prefix. + + The prefix to match. + The delegate. + An object containing state information for this asynchronous request. + An that references the asynchronous request. + + + + Begins an asynchronous request to list containers with a matching prefix. + + The prefix to match. + The details to include in the listing. + The delegate. + An object containing state information for this asynchronous request. + An that references the asynchronous request. + + + + Begins an asynchronous request to list containers with a matching prefix. + + The prefix to match. + The details to include in the listing. + Non negative value which indicates the maximum number of results that should be returned at a time. Zero means no limit. + Note the returned ResultSegment.Results may still have less than the maxResults number of results. + Use to return the remaining results. + Optional continuationToken from previous ResultSegment for continuing listing operation. + The delegate. + An object containing state information for this asynchronous request. + An that references the asynchronous request. + + + + Returns a containing all or part of the list of containers. + + A reference to the pending asynchronous request. + A result segment for the containers returned from the request. + + + + List the blobs whose names begin with the specified prefix. + + The prefix to match. + The list of blobs. + + + + List the blobs whose names begin with the specified prefix. + + The prefix to match. + The request options. + The list of blobs. + + + + Begins an asynchronous request to list blobs whose names begin with the specified prefix. + + The blob prefix to list. + A that contains all or part of the set of blobs. + + + + Begins an asynchronous request to list blobs whose names begin with the specified prefix. + + The blob prefix to list. + The request options. + + A that contains all or part of the set of blobs. + + + + + Begins an asynchronous request to list blobs whose names begin with the specified prefix. + + The blob prefix to list. + Non negative value which indicates the maximum number of results that should be returned at a time. Zero means no limit. + Note the returned ResultSegment.Results may still have less than the maxResults number of results. + Use to return the remaining results. + Optional continuationToken from previous ResultSegment for continuing listing operation. + + A that contains all or part of the set of blobs. + + + + + Begins an asynchronous request to list blobs whose names begin with the specified prefix. + + The blob prefix to list. + Non negative value which indicates the maximum number of results that should be returned at a time. Zero means no limit. + Note the returned ResultSegment.Results may still have less than the maxResults number of results. + Use to return the remaining results. + Optional continuationToken from previous ResultSegment for continuing listing operation. + The request options. + + A that contains all or part of the set of blobs. + + + + + Begins an asynchronous request to list blobs whose names begin with the specified prefix. + + The blob prefix to list. + The delegate. + An object containing state information for this asynchronous request. + An that references the asynchronous request. + + + + Begins an asynchronous request to list blobs whose names begin with the specified prefix. + + The blob prefix to list. + Non negative value which indicates the maximum number of results that should be returned at a time. Zero means no limit. + Note the returned ResultSegment.Results may still have less than the maxResults number of results. + Use to return the remaining results. + Optional continuationToken from previous ResultSegment for continuing listing operation. + The delegate. + An object containing state information for this asynchronous request. + An that references the asynchronous request. + + + + Returns a containing all or part of the set of blobs whose names begin with the specified prefix. + + A reference to the pending asynchronous request. + A that contains all or part of the set of blobs. + + + + Selects the protocol response. + + The protocol item. + The service. + The container. + The parsed . + + + + Ends the asynchronous GetResponse operation. + + The asynchronous operation result. + The request to end the operation on. + The from the asynchronous request. + + + + Parses the user prefix. + + The prefix. + Name of the container. + The listing prefix. + + + + Converts the date time to snapshot string. + + The snapshot time to convert. + A string representing the snapshot time. + + + + Implementation for the ListContainers method. + + The container prefix. + The details included. + The continuation token. + The maximum results to return. + The result report delegate. + A that lists the containers. + + + + Core implementation for the ListContainers method. + + The container prefix. + The details included. + The continuation token. + The pagination. + The result report delegate. + A that lists the containers. + + + + Implementation for the ListBlobs method. + + The blob prefix. + The continuation token. + The max results. + The request options. + The result report delegate. + + A that lists the blobs. + + + + + Occurs when a response is received from the server. + + + + + Gets the credentials used by the Blob service client. + + The credentials. + + + + Gets the base Uri for the Blob service client. + + The client's base Uri. + + + + Gets or sets the retry policy for all requests by the Blob service client. + + The retry policy. + + + + Gets or sets the timeout for all requests by the Blob service client. + + The request timeout. + + + + Gets or sets the default delimiter for blobs for the Blob service client. + + The default delimiter. + + + + Gets or sets the size of the blocks to be written to a block blob. + + The write block size in bytes. + + + + Gets or sets the amount of data to pre-fetch while reading a stream. + + The read ahead in bytes. + + + + Gets or sets a value indicating whether the integrity of each block should be verified when reading from a stream. + + + Returns true if using integrity control for stream reading; otherwise, false. + + Setting this property causes all downloads to be rounded to the nearest block size. + + + + Gets or sets a positive number representing the parallelism factor in certain + Blob service operations. + + The parallel operation thread count. + + + + Gets a value indicating whether the service client is used with Path style or Host style. + + Is true if use path style uris; otherwise, false. + + + + Represents a container in Windows Azure blob storage. + + + + + Stores the transformed address. + + + + + Initializes a new instance of the class. + + The container address. + + + + Initializes a new instance of the class. + + The container address. + The credentials. + + + + Initializes a new instance of the class. + + The container address as a relative Uri. + The Blob service client. + + + + Initializes a new instance of the class with the given address and path style Uri preference. + + The container's address. + True to use path style Uris. + + + + Initializes a new instance of the class. + + The container address. + The credentials. + If set to true path style Uris are used. + + + + Initializes a new instance of the class. + + The attributes for the container (NOTE: Stored by reference). + The client to be used. + + + + Initializes a new instance of the class. + + True to use path style Uris. + The container's address. + + + + Gets the specified blob. + + Uri of the blob relative to the container. + A reference for the specified blob. + + + + Gets the specified page blob. + + Uri of the blob relative to the container. + A reference for the specified blob. + + + + Gets the specified block blob. + + Uri of the blob relative to the container. + A reference for the specified blob. + + + + Gets the specified virtual blob directory. + + Relative address of the blob virtual directory. + A reference for the specified blob. + + + + Returns a list of all the blobs in the container. + + An of all the blobs in the container. + + + + Returns a list of all the blobs in the container. + + The to use when making requests. + An of all the blobs in the container. + + + + Returns a list of all the blobs in the container in sets of pages. + + The to use when making requests. + A that contains the first segment of blobs. + + + + Returns a list of all the blobs in the container in sets of pages. + + Non negative value which indicates the maximum number of results that should be returned at a time. Zero means no limit. + Note the returned ResultSegment.Results may still have less than the maxResults number of results. + Use to return the remaining results. + Optional continuationToken from previous ResultSegment for continuing listing operation. + The to use when making requests. + A that contains the first segment of blobs. + + + + Begins an asynchronous request to list the first segment of blobs in the container. + + The delegate. + An object containing state information for this asynchronous request. + An that references the asynchronous request. + + + + Begins an asynchronous request to list the first segment of blobs in the container. + + The to use when making the request. + The delegate. + An object containing state information for this asynchronous request. + An that references the asynchronous request. + + + + Begins an asynchronous request to list the first segment of blobs in the container using paging. + + Non negative value which indicates the maximum number of results that should be returned at a time. Zero means no limit. + Note the returned ResultSegment.Results may still have less than the maxResults number of results. + Use to return the remaining results. + Optional continuationToken from previous ResultSegment for continuing listing operation. + The to use when making the request. + The delegate. + An object containing state information for this asynchronous request. + An that references the asynchronous request. + + + + Returns a containing the first segment of blobs in the container. + + An object of type that references the asynchronous operation. + A that contains the first segment of blobs. + + + + Creates the container. + + + + + Creates the container. + + The to use when making the request. + + + + Begins an asynchronous operation to create a container. + + The delegate. + An object containing state information for this asynchronous request. + An that references the asynchronous request. + + + + Begins an asynchronous operation to create a container. + + The to use when making the request. + The delegate. + An object containing state information for this asynchronous request. + An that references the asynchronous request. + + + + Ends an asynchronous operation to create a container. + + An object of type that references the asynchronous operation. + + + + Creates the container if it does not already exist. + + Returns true if the container did not already exist and was created; otherwise false. + + + + Creates the container if it does not already exist. + + The to use when making the request. + Returns true if the container did not already exist and was created; otherwise false. + + + + Begins an asynchronous request to create the container if it does not already exist. + + The delegate. + An object containing state information for this asynchronous request. + An that references the asynchronous request. + + + + Begins an asynchronous request to create the container if it does not already exist. + + The to use when making the request. + The delegate. + An object containing state information for this asynchronous request. + An that references the asynchronous request. + + + + Returns the result of the asynchronous request to create the container if it does not already exist. + + An object of type that references the asynchronous operation. + Returns true if the container did not already exist and was created; otherwise false. + + + + Deletes the container. + + + + + Deletes the container. + + The to use when making the request. + + + + Begins an asynchronous operation to delete a container. + + The delegate. + An object containing state information for this asynchronous request. + An that references the asynchronous request. + + + + Begins an asynchronous operation to delete a container. + + The to use when making the request. + The delegate. + An object containing state information for this asynchronous request. + An that references the asynchronous request. + + + + Ends an asynchronous operation to delete a container. + + An object of type that references the asynchronous operation. + + + + Sets the permissions for the container. + + The set of permissions to apply to the container. + + + + Sets the permissions for the container. + + The set of permissions to apply to the container. + The to use when making the request. + + + + Begins an asynchronous request to set the permissions of the container. + + The set of permissions to apply to the container. + The delegate. + An object containing state information for this asynchronous request. + An that references the asynchronous request. + + + + Begins an asynchronous request to set the permissions of the container. + + The set of permissions to apply to the container. + The to use when making the request. + The delegate. + An object containing state information for this asynchronous request. + An that references the asynchronous request. + + + + Returns the result of the asynchronous request to set the permissions of the container. + + An object of type that references the asynchronous operation. + + + + Gets the permissions on the container. + + The container's permissions. + + + + Gets the permissions on the container. + + The to use when making the request. + The container's permissions. + + + + Begins an asynchronous request to get the permissions on the container. + + The delegate. + An object containing state information for this asynchronous request. + An that references the asynchronous request. + + + + Begins an asynchronous request to get the permissions on the container. + + The to use when making the request. + The delegate. + An object containing state information for this asynchronous request. + An that references the asynchronous request. + + + + Returns the asynchronous result of the request to get the permissions on the container. + + An object of type that references the asynchronous operation. + A object containing the permissions on the container. + + + + Retrieves container metadata and properties. + + + + + Retrieves container metadata and properties. + + The to use when making the request. + + + + Begins an asynchronous operation retrieve container metadata and properties. + + The delegate. + An object containing state information for this asynchronous request. + An that references the asynchronous request. + + + + Begins an asynchronous operation retrieve container metadata and properties. + + The to use when making the request. + The delegate. + An object containing state information for this asynchronous request. + An that references the asynchronous request. + + + + Ends an asynchronous operation retrieve container metadata and properties. + + An object of type that references the asynchronous operation. + + + + Sets the container metadata. + + + + + Sets the container metadata. + + The to use when making the request. + + + + Begins an asynchronous operation to set container metadata. + + The delegate. + An object containing state information for this asynchronous request. + An that references the asynchronous request. + + + + Begins an asynchronous operation to set container metadata. + + The to use when making the request. + The delegate. + An object containing state information for this asynchronous request. + An that references the asynchronous request. + + + + Ends an asynchronous request operation to set container metadata. + + An object of type that references the asynchronous operation. + + + + Constructs the shared access signature. + + The shared access policy. + The constructed shared access signature. + Precondition: current credential of the client is (Account, Key). + + + + Constructs the shared access signature. + + The shared access policy. + The group policy identifier. + The constructed shared access signature. + + + + Implementation for the ListBlobs method. + + The blob prefix. + The request options. + The continuation token. + The maximum result size. + The result report delegate. + A that lists the blobs. + + + + Converts the ACL string to a object. + + The string to convert. + The resulting object. + + + + Parse Uri for SAS (Shared access signature) information. + + The complete Uri. + The client to use. + If true, path style Uris are used. + + Validate that no other query parameters are passed in. + Any SAS information will be recorded as corresponding credentials instance. + If existingClient is passed in, any SAS information found will not be supported. + Otherwise a new client is created based on SAS information or as anonymous credentials. + + + + + Returns the canonical name for shared access. + + The canonical name. + + + + Gets the absolute Uri of the blob. + + Name of the blob. + The blob's absolute Uri. + + + + Core implementation of the ListBlobs method. + + The blob prefix. + The request options. + The continuation token. + The pagination. + The result report delegate. + A that lists the blobs. + + + + Implementation for the Create method. + + The options. + A that creates the container. + + + + Implementation for the CreateIfNotExist method. + + The options. + The set result. + A that creates the container if it does not exist. + + + + Implementation for the Delete method. + + The request options. + A that deletes the container. + + + + Implementation for the FetchAttributes method. + + The options. + A that fetches the attributes. + + + + Implementation for the SetMetadata method. + + The request options. + A that sets the metadata. + + + + Implementation for the SetPermissions method. + + The permissions to set. + The request options. + A that sets the permissions. + + + + Implementation for the GetPermissions method. + + The request options. + The result report delegate. + A that gets the permissions. + + + + Gets the for this container. + + The service client. + + + + Gets the of the container. + + The container's Uri. + + + + Gets the name of the container. + + The container name. + + + + Gets a of metadata for the container. + + The container's metadata. + + + + Gets the container's attributes. + + The container's attributes. + + + + Gets the for the container. + + The container's properties. + + + + Gets the Uri after applying authentication transformation. + + + + + Represents a virtual collection of blobs with a given prefix. + + + + + Stores the parent directory. + + + + + Stores the parent container. + + + + + Stores the prefix this directory represents. + + + + + Initializes a new instance of the class given an address and a client. + + The blob directory's address. + The client to use. + + + + Returns a object representing a blob in this directory with the specified name. + + The name of the blob. + A object representing the blob. + + + + Returns a representing a blob in this directory with the specified name. + + The name of the blob. + A object representing the blob. + + + + Returns a representing a blob in this directory with the specified name. + + The name of the blob. + A object representing the blob. + + + + Returns a representing a subdirectory with the specified name. + + The name of the subdirectory. + A object representing the subdirectory. + + + + Returns the list of blobs and subdirectories in this directory. + + The to use when making requests. + An of all the blobs in the container. + + + + Returns the list of blobs and subdirectories in this directory. + + An of all the blobs in the container. + + + + Returns a list of all the blobs in the container in sets of pages. + + The to use when making requests. + A that contains the first segment of blobs. + + + + Returns a list of all the blobs in the container in sets of pages. + + Non negative value which indicates the maximum number of results that should be returned at a time. Zero means no limit. + Note the returned ResultSegment.Results may still have less than the maxResults number of results. + Use HasNext and GetNext members to return the remaining results. + Optional continuationToken from previous ResultSegment for continuing listing operation. + The to use when making requests. + A that contains the first segment of blobs. + + + + Begins an asynchronous request to list the first segment of blobs in the container. + + The delegate. + An object containing state information for this asynchronous request. + An that references the asynchronous request. + + + + Begins an asynchronous request to list the first segment of blobs in the container. + + The to use when making the request. + The delegate. + An object containing state information for this asynchronous request. + An that references the asynchronous request. + + + + Begins an asynchronous request to list the first segment of blobs in the container using paging. + + Non negative value which indicates the maximum number of results that should be returned at a time. Zero means no limit. + Note the returned ResultSegment.Results may still have less than the maxResults number of results. + Use to return the remaining results. + Optional continuationToken from previous ResultSegment for continuing listing operation. + The to use when making the request. + The delegate. + An object containing state information for this asynchronous request. + An that references the asynchronous request. + + + + Returns a containing the first segment of blobs and directories in the directory. + + The reference to the pending asynchronous request to finish. + A that contains the first segment of blobs. + + + + Initializes the prefix. + + + + + Gets the object for this directory. + + The service client. + + + + Gets the of this directory. + + The directory's Uri. + + + + Gets the container. + + The directory's container. + + + + Gets the parent directory. + + The directory's parent directory. + + + + Gets the prefix. + + The prefix. + + + + This class represents a blob that is made out of blocks and provides APIs to directly access it. + + + + + Initializes a new instance of the class. + + The absolute Uri to the blob. + Storage credentials. + + + + Initializes a new instance of the class. + + Relative Uri to the blob. + Existing Blob service client which provides the base address. + + + + Initializes a new instance of the class. + + Absolute Uri to the blob. + + + + Initializes a new instance of the class. + + Absolute Uri to the blob. + Storage credentials. + If set to true, use path style Uris. + + + + Initializes a new instance of the class. + + The blob absolute Uri. + If set to true, use path style Uris. + + + + Initializes a new instance of the class. + + The cloud blob. + + + + Initializes a new instance of the class. + + The attributes. + The service client. + The snapshot time. + + + + Retrieves the committed blocklist for the blob. + + The committed blocks. + + + + Retrieves the committed blocklist for the blob. + + The options to be used for the current request to override the default behavior. + The committed blocks. + + + + Retrieves the blocklist consisting of type of blocks. + + The type of blocks that should be retrieved. + The list of blocks for this blob of type. + + + + Retrieves the blocklist consisting of type of blocks. + + The type of blocks that should be retrieved. + The options to be used for the current request to override the default behavior. + The list of blocks for this blob of type. + + + + Retrieves the blocklist consisting of type of blocks. + + The type of blocks that should be retrieved. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An IAsyncResult that represents the asynchronous DownloadBlockList, which could still be pending. + + + + Retrieves the blocklist consisting of type of blocks. + + The type of blocks that should be retrieved. + The options to be used for the current request to override the default behavior. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Ends the asynchronous operation to download the block list. + + An object of type that references the asynchronous operation. + + The block list for this blob. + + + + + Uploads a single block with a given . + + The base64 encoded block ID to be associated with the data. + The stream containing the data for the block. Must support the Size property. + Optional content-MD5 header value to be used with the request. + Null or empty value will be ignored and no Content-MD5 header will be set. + + + + Uploads a single block with a given . + + The base64 encoded block ID to be associated with the data. + The stream containing the data for the block. Must support the Size property. + Optional content-MD5 header value to be used with the request. + Null or empty value will be ignored and no Content-MD5 header will be set. + The options to be used for the current request to override the default behavior. + + + + Begins an operation to upload a single block with a given . + + The base64 encoded block ID to be associated with the data. + The stream containing the data for the block. Must support the Size property. + Optional content-MD5 header value to be used with the request. + Null or empty value will be ignored and no Content-MD5 header will be set. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Begins an operation to upload a single block with a given . + + The base64 encoded block ID to be associated with the data. + The stream containing the data for the block. Must support the Size property. + Optional content-MD5 header value to be used with the request. + Null or empty value will be ignored and no Content-MD5 header will be set. + The options to be used for the current request to override the default behavior. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Ends an operation to upload a single block with a given . + + An object of type that references the asynchronous operation. + + + + Uploads the list of blocks to be committed as a blob. + + The list of block IDs (base64 encoded). + + + + Uploads the list of blocks to be committed as a blob. + + The list of block IDs (base64 encoded). + A object indicating any additional options to be specified on the request. + + + + Begins an asynchronous operation to upload a list of blocks. + + The list of block IDs (base64-encoded). + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Begins an asynchronous operation to upload a list of blocks. + + The list of block IDs (base64-encoded). + The options to be used for the current request to override the default behavior. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Ends an asynchronous operation to upload a list of blocks. + + An object of type that references the asynchronous operation. + + + + Uploads the block list. + + The blocks to upload. + The request options. + A that uploads the block list. + + + + Gets the download block list. + + The types of blocks. + The request options. + The result report delegate. + A that gets the download block list. + + + + Parses the response. + + The block list response. + An enumerable list of objects. + + + + A class representing a page blob. + + + + + Initializes a new instance of the class. + + The blob address. + The credentials. + + + + Initializes a new instance of the class. + + The blob address. + + + + Initializes a new instance of the class. + + The blob address. + The service client. + + + + Initializes a new instance of the class. + + The cloud blob. + + + + Initializes a new instance of the class. + + The attributes. + The service client. + The snapshot time. + + + + Initializes a new instance of the class. + + The blob address. + The credentials. + If set to true, use path style Uris. + + + + Initializes a new instance of the class. + + The blob address. + If set to true, use path style Uris. + + + + Create the page blob. + + The size of the blob in bytes. + + + + Create the page blob. + + The size of the blob in bytes. + The request options. + + + + Begins an asynchronous operation to create a page blob. + + The maximum size of the page blob, in bytes. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Begins an asynchronous operation to create a page blob. + + The size of the blob in bytes. + A object indicating any additional options to be specified on the request. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Ends an asynchronous operation to create a page blob . + + An object of type that references the asynchronous operation. + + + + Writes page data to a page blob. + + The page data. + The start offset. + + + + Writes page data to a page blob. + + The page data. + The start offset. + A object indicating any additional options to be specified on the request. + + + + Begins an asynchronous operation to write pages to a page blob. + + The page data. + The start offset. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Begins an asynchronous operation to write pages to a page blob. + + The page data. + The start offset. + A object indicating any additional options to be specified on the request. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Ends an asynchronous operation to write pages to a page blob. + + An object of type that references the asynchronous operation. + + + + Gets a list of valid page ranges and their starting and ending bytes. + + A list of page ranges. + + + + Gets a list of valid page ranges and their starting and ending bytes. + + A object indicating any additional options to be specified on the request. + A list of page ranges. + + + + Begins an asynchronous operation to return the list of valid page ranges and their starting and ending bytes. + + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Begins an asynchronous operation to return the list of valid page ranges and their starting and ending bytes. + + A object indicating any additional options to be specified on the request. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Ends an asynchronous operation to return page ranges and their starting and ending bytes. + + An object of type that references the asynchronous operation. + A list of page ranges. + + + + Creates a stream for writing to the blob using Stream interface with automatic buffering. + + The stream to be used for writing. + This operation is not supported on PageBlob. + + + + Creates a stream for writing to the blob using Stream interface with automatic buffering. + + The options to control the upload behavior. + The stream to be used for writing. + This operation is not supported on PageBlob. + + + + Uploads a blob from a stream. + + The data stream to be uploaded. + This uses the currently set Properties/Metadata for the blob, so they need to be set before calling this API. + For optimum performance, the stream should support a length. + This operation is not supported on PageBlob. + + + + Uploads a blob from a stream. + + The data stream to be uploaded. + The options to be used for the current request to override the default behavior. + This uses the currently set Properties/Metadata for the blob, so they need to be set before calling this API. + For optimum performance, the stream should support a length. + This operation is not supported on PageBlob. + + + + Uploads a blob from a stream asynchronously. + + The data stream to be uploaded. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + + An IAsyncResult that represents the asynchronous UploadFromStream, which could still be pending. + + This uses the currently set Properties/Metadata for the blob, so they need to be set before calling this API. + For optimum performance, the stream should support a length. + This operation is not supported on PageBlob. + + + + Uploads a blob from a stream asynchronously. + + The data stream to be uploaded. + The options to be used for the current request to override the default behavior. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + + An IAsyncResult that represents the asynchronous UploadFromStream, which could still be pending. + + This uses the currently set Properties/Metadata for the blob, so they need to be set before calling this API. + For optimum performance, the stream should support a length. + This operation is not supported on PageBlob. + + + + Completes the asynchronous UploadFromStream request. Throws any exceptions provided by the server. + + A reference to the outstanding asynchronous request. + This operation is not supported on PageBlob. + + + + A convenience function to upload a string of text to a file. + + The content to be upload. + Assumes a UTF8 encoding. + This operation is not supported on PageBlob. + + + + A convenience function to upload a string of text to a file. + + The content to be upload. + The encoding to be used. + The options to control the upload behavior. + This operation is not supported on PageBlob. + + + + A convenience function to upload a file from a file system to a blob. + + The file to be uploaded. + This operation is not supported on PageBlob. + + + + A convenience function to upload a file from a file system to a blob. + + The file to be uploaded. + The options to control the upload behavior. + This operation is not supported on PageBlob. + + + + A convenience function to upload a set of bytes. + + The bytes to be uploaded. + This operation is not supported on PageBlob. + + + + A convenience function to upload a set of bytes. + + The bytes to be uploaded. + The options to control the upload behavior. + This operation is not supported on PageBlob. + + + + Creates an exception reporting that the creation method is not supported. + + The created exception. + + + + Implements the Create method. + + A object indicating any additional options to be specified on the request. + The size in bytes. + A that creates the blob. + + + + Gets the page ranges impl. + + A object indicating any additional options to be specified on the request. + The set result. + A for getting the page ranges. + + + + Implementation method for the WritePage methods. + + The page data. + The start offset. + A object indicating any additional options to be specified on the request. + A that writes the pages. + + + + Represents a Windows Azure queue. + + + + + Stores the queue attributes. + + + + + Uri for the messages. + + + + + The last time count was retrieved. + + + + + Initializes a new instance of the class with the given relative address and credentials. + + The relative address. + The storage account credentials. + + + + Initializes a new instance of the class. + + The relative address. + The storage account credentials. + If set to true, use path style Uris. + + + + Initializes a new instance of the class. + + True to use path style Uris. + The address. + The credentials. + + + + Initializes a new instance of the class. + + The queue address. + The client. + + + + Initializes a new instance of the class. + + The attributes of the queue. + The client. + + + + Creates a queue. + + + + + Begins an asynchronous operation to create a queue. + + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Ends an asynchronous operation to create a queue. + + An object of type that references the asynchronous operation. + + + + Creates the queue if it does not exist. + + true if the container did not exist and was created; otherwise false. + + + + Begins an asynchronous operation to create the queue if it does not exist. + + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Ends an asynchronous operation to create the queue if it does not exist. + + An object of type that references the asynchronous operation. + Returns true if the creation succeeded; otherwise, false. + + + + Deletes the queue. + + + + + Begins an asynchronous operation to delete the queue. + + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Ends an asynchronous operation to delete the queue. + + An object of type that references the asynchronous operation. + + + + Determines if the queue exists. + + Returns true if the queue exists; otherwise false. + + + + Begins an asynchronous operation to determine whether the queue exists. + + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Ends an asynchronous operation to determine whether the queue exists. + + An object of type that references the asynchronous operation. + Returns true if the queue exists; otherwise, false. + + + + Fetches queue attributes. + + + + + Begins an asynchronous operation to fetch queue attributes. + + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Ends an asynchronous operation to fetch queue attributes. + + An object of type that references the asynchronous operation. + + + + Sets queue metadata. + + + + + Begins an asynchronous operation to set queue metadata. + + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Ends an asynchronous operation to set queue metadata. + + An object of type that references the asynchronous operation. + + + + Retrieves the approximate message count. + + The approximate message count. + + + + Adds a message to the queue. + + The message. + + + + Adds a message to the queue. + + The message. + The message time-to-live. + + + + Begins an asynchronous operation to add a message to the queue. + + The message. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Begins an asynchronous operation to add a message to the queue. + + The message. + The message time-to-live. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Ends an asynchronous operation to add a message to the queue. + + An object of type that references the asynchronous operation. + + + + Gets a list of messages from the queue. + + The number of messages to retrieve. + A list of the messages retrieved. + + + + Gets a list of messages from the queue. + + The number of messages to retrieve. + The visibility timeout. + A list of the messages retrieved. + + + + Begins an asynchronous operation to get messages from the queue. + + The number of messages to retrieve. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Begins an asynchronous operation to get messages from the queue. + + The number of messages to retrieve. + The visibility timeout. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Ends an asynchronous operation to get messages from the queue. + + An object of type that references the asynchronous operation. + A list of the messages retrieved. + + + + Gets a single message from the queue. + + The retrieved message. + + + + Gets a single message from the queue. + + The visibility time out. + The retrieved message. + + + + Begins an asynchronous operation to get a single message from the queue. + + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An asynchronous result that represents the operation. + + + + Begins an asynchronous operation to get a single message from the queue. + + The visibility timeout. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Ends an asynchronous operation to get a single message from the queue. + + An object of type that references the asynchronous operation. + The retrieved message. + + + + Gets a message from the queue, but does not alter the visibility of the message. + + The peeked message. + + + + Begins an asynchronous operation to peek a message. + + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Ends an asynchronous operation to peek a message. + + An object of type that references the asynchronous operation. + The peeked message. + + + + Gets a list of messages from the queue, but does not alter the visibility of the messages. + + The number of messages to retrieve. + A list of peeked messages. + + + + Begins an asynchronous operation to peek messages. + + The number of messages to retrieve. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Ends an asynchronous operation to peek messages. + + An object of type that references the asynchronous operation. + A list of peeked messages. + + + + Deletes the message. + + The message. + + + + Deletes the message. + + The message id. + The pop receipt. + + + + Begins an asynchronous operation to delete the message. + + The message. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Begins an asynchronous operation to delete the message. + + The message id. + The pop receipt. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Ends an asynchronous operation to delete the message. + + An object of type that references the asynchronous operation. + + + + Clears all messages from the queue. + + + + + Begins an asynchronous operation to clear messages from the queue. + + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An object of type that references the asynchronous operation. + + + + Ends an asynchronous operation to clear messages from the queue. + + An object of type that references the asynchronous operation. + + + + Gets the individual message address. + + The message id. + The Uri of the message. + + + + Materialize results so that we can close the response object. + + List of response objects from the Protocol layer. + Projection function. + A materialized list of messages. + + + + Selects the get message response. + + The protocol message. + The parsed message. + + + + Selects the peek message response. + + The protocol message. + The parsed message. + + + + Gets the message internal. + + The visibility timeout. + The retrieved message. + + + + Gets the messages internal. + + The number of messages. + The visibility timeout. + A list of retrieved messages. + + + + Begins the get messages internal. + + The number of mesages. + The visibility timeout. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An asynchronous result that represents the operation. + + + + Existses the impl. + + The set result. + A that detects whether the queue exists. + + + + Sets the metadata impl. + + A that sets the metadata. + + + + Fetches the metadata and properties impl. + + A that fetches the attributes. + + + + Creates the impl. + + A that creates the queue. + + + + Creates if not exist impl. + + The set result. + A that creates the queue if it doesn't exist. + + + + Deletes the impl. + + A that deletes the queue. + + + + Clears the messages impl. + + A that clears the messages in the queue. + + + + Adds the message impl. + + The message. + The time to live. + A that adds the message. + + + + Peeks the messages impl. + + The number of messages. + The set result. + A that returns the peeked messages. + + + + Deletes the message impl. + + The message id. + The pop receipt. + A that deletes the message. + + + + Gets the messages impl. + + The number of messages. + The visibility timeout. + The set result. + A that gets the message. + + + + Gets the properties and metadata from response. + + The web response. + + + + Gets the object that represents the Queue service. + + The service client. + + + + Gets the queue name. + + The queue name. + + + + Gets the Uri for the queue. + + The queue's Uri. + + + + Gets the attributes of the queue. + + The queue's attributes. + + + + Gets user-defined metadata for the queue. + + The queue's metadata. + + + + Gets the approximate message count. + + The approximate message count. + + + + Gets the Uri for general message operations. + + + + + A client for accessing Windows Azure queue service. + + + + + Initializes a new instance of the class with the given base address and credentials. + + The base address. + The credentials. + + + + Initializes a new instance of the class. + + The base address Uri. + The credentials. + + + + Initializes a new instance of the class. + + The base address. + The credentials. + If set to true [use path style Uris]. + + + + Initializes a new instance of the class. + + The base address Uri. + The credentials. + If set to true [use path style Uris]. + + + + Initializes a new instance of the class. + + True to use path style Uris. + The base address Uri. + The credentials. + + + + Gets a object representing the queue. + + The relative Uri to the queue. + + A object representing the queue. + + + + + Lists all of the queues in the storage account. + + A list of queues. + + + + Lists the queues whose name begin with the specified prefix. + + The prefix to match. + A list of containers. + + + + Lists the queues whose name begin with the specified prefix. + + The prefix to match. + The details to include in the listing. + A list of queues. + + + + Lists all of the queues in the storage account. + + A that contains the first segment of queues. + + + + Lists the queues whose name begin with the specified prefix as a set of pages. + + The prefix to match. + The details to include in the listing. + A that contains the first segment of queues. + + + + Lists the queues whose name begin with the specified prefix as a set of pages. + + The prefix to match. + The details to include in the listing. + Non negative value which indicates the maximum number of results that should be returned at a time. Zero means no limit. + Note the returned ResultSegment.Results may still have less than the maxResults number of results. + Use to return the remaining results. + Optional continuationToken from previous ResultSegment for continuing listing operation. + A that contains the first segment of queues. + + + + Begins an asynchronous request for the first segment of the list of all queues in the storage account. + + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An that references the asynchronous request. + + + + Begins an asynchronous request for the first segment of the list of queues whose names begins with the specified prefix. + + The prefix to match. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An that references the asynchronous request. + + + + Begins an asynchronous request for the first segment of the list of queues whose names begins with the specified prefix. + + The prefix to match. + The details to include in the listing. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An that references the asynchronous request. + + + + Begins an asynchronous request for the first segment of the list of queues whose names begins with the specified prefix. + + The prefix to match. + The details to include in the listing. + Non negative value which indicates the maximum number of results that should be returned at a time. Zero means no limit. + Note the returned ResultSegment.Results may still have less than the maxResults number of results. + Use to return the remaining results. + Optional continuationToken from previous ResultSegment for continuing listing operation. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An that references the asynchronous request. + + + + Returns a containing the first segment of the list of queues. + + An object of type that references the asynchronous operation. + A result segment containing the results of the first request. + + + + Ends the get response. + + The asynchronous result. + The request. + The web response. + + + + Lists the queues impl. + + The prefix. + The details included. + The continuation token. + The max results. + The set result. + A for listing the queues. + + + + Lists the queues impl core. + + The prefix. + The details included. + The continuation token. + The pagination. + The set result. + A for listing the queues. + + + + Selects the response. + + The item to parse. + A object representing the item. + + + + Occurs when a response is received from the server. + + + + + Gets or sets the retry policy. + + The retry policy. + + + + Gets or sets the timeout. + + The request timeout. + + + + Gets or sets the length of the approximate message count cache. + + The length of the approximate message count cache. + + + + Gets a value indicating whether path style Uris are used. + + + Is true if using path style Uris; otherwise, false. + + + + + Gets the storage account credentials to use for the queue. + + The storage credentials. + + + + Gets or sets the base Uri. + + The base Uri. + + + + Represents a message in a queue. + + + + + The maximum message size in bytes. + + + + + The maximum amount of time a message is kept in the queue. + + + + + Maximum number of messages that can be peeked at a time. + + + + + The message content. + + + + + Initializes a new instance of the class with the given content. + + Message content. + + Regardless of whether the message content is XML or binary data, message contents are + converted to Base64 before adding the message to the queue. + Keep in mind that the size of the Base64-encoded message must be less than or equal to + the value of . + + + + + Initializes a new instance of the class with the given UTF-8 content. + + UTF-8 encoded message content. + + In this implementation, regardless of whether an XML or binary data is passed into this + function, message contents are converted to base64 before passing the data to the queue service. + When calculating the size of the message, the size of the base64 encoding is thus the important. + + + + + Gets content as bytes. + + The content as bytes. + + + + Gets the ID. + + The message ID. + + + + Gets the pop receipt. + + The pop receipt. + + + + Gets the insertion time. + + The insertion time. + + + + Gets the expiration time. + + The expiration time. + + + + Gets the next visible time. + + The next visible time. + + + + Gets the content as string. + + The message content. + + + + Gets the number of times this message has been dequeued. + + The dequeue count. + + + + A set of extensions to the to generate client objects for + the storage services. + + + + + Creates a new Blob service client. + + The storage account. + A based on the . + + + + Creates a new Queue service client. + + The storage account. + A based on the . + + + + Creates the Table service client. + + The storage account. + A based on the . + + + + A client for accessing the Windows Azure Table service. + + + + + Initializes a new instance of the class. + + The base address. + The credentials. + + + + Creates the tables needed for the specified custom TableServiceContext. + + Type of the service context. + The base address. + The credentials. + + + + Creates a new for performing operations against table storage. + + + A new for performing operations against table storage. + + + + + Attaches to the specified service context. + + The service context. + + + + Begins an asychronous operation to create a table. + + Name of the table. + The delegate. + An object containing state information for this asynchronous request. + An that references the asynchronous request. + + + + Ends an asychronous operation to create a table. + + An object of type that references the asynchronous operation. + + + + Creates the table with specified name. + + Name of the table to create. + + + + Begins an asynchronous operation to create a table with the specified name if it does not already exist. + + Name of the table. + The delegate. + An object containing state information for this asynchronous request. + An that references the asynchronous request. + + + + Ends an asynchronous operation to create a table with the specified name if it does not already exist. + + An object of type that references the asynchronous operation. + Returns true, if table was created, false otherwise. + + + + Creates the table if it does not exist. + + Name of the table. + Returns true if table was created, false otherwise. + + + + Begins an asynchronous operation to determine whether or not a table exists. + + Name of the table. + The delegate. + An object containing state information for this asynchronous request. + An that references the asynchronous request. + + + + Ends the asynchronous operation to verify if table exists. + + An object of type that references the asynchronous operation. + Returns true, if table exists, false otherwise. + + + + Checks whether the table exists. + + Name of the table. + + Returns true, if table exists, false otherwise. + + + + + Lists the tables in the storage account. + + A list of table names. + + + + Lists the tables which begin with particular prefix. + + The prefix. + A list of table names. + + + + Lists the tables as a set of pages. + + A list of table names. + + + + Lists the tables as a set of pages. + + Non negative value which indicates the maximum number of results that should be returned at a time. Zero means no limit. + Note the returned ResultSegment.Results may still have less than the maxResults number of results. + Use to return the remaining results. + Optional continuationToken from previous ResultSegment for continuing listing operation. + A list of table names. + + + + Lists the tables which begin with particular prefix as a set of pages. + + The prefix. + Non negative value which indicates the maximum number of results that should be returned at a time. Zero means no limit. + Note the returned ResultSegment.Results may still have less than the maxResults number of results. + Use to return the remaining results. + Optional continuationToken from previous ResultSegment for continuing listing operation. + A list of table names. + + + + Begins the asynchronous operation to list tables. + + A callback method that is called when the asynchronous operation completes. + The user-provided state. + An that references the asynchronous request. + + + + Begins the asynchronous operation to list tables. + + The prefix. + A callback method that is called when the asynchronous operation completes. + The user-provided state. + + An that references the asynchronous request. + + + + + Begins the asynchronous operation to list tables. + + The prefix. + Non negative value which indicates the maximum number of results that should be returned at a time. Zero means no limit. + Note the returned ResultSegment.Results may still have less than the maxResults number of results. + Use to return the remaining results. + Optional continuationToken from previous ResultSegment for continuing listing operation. + A callback method that is called when the asynchronous operation completes. + The user-provided state. + + An that references the asynchronous request. + + + + + Ends the asynchronous operation to list tables. + + An object of type that references the asynchronous operation. + A segment containing current results and information to retrieve additional results. + + + + Begins the asynchronous operation to delete a table. + + Name of the table. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + + An that references the asynchronous request. + + + + + Ends an asynchronous operation to delete a table. + + An object of type that references the asynchronous operation. + + + + Deletes the table. + + Name of the table. + + + + Begins the asynchronous operation to delete the tables if it exists. + + Name of the table. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + + An that references the asynchronous request. + + + + + Ends the asynchronous operation to delete the tables if it exists. + + An object of type that references the asynchronous operation. + Returns true, if the table was deleted, false otherwise. + + + + Deletes the table if it exists. + + Name of the table. + Returns true, if the table was deleted, false otherwise. + + + + Gets the result or default. + + The type of the result. + The task to retrieve the result from. + Receives result of the task. + Returns true if the result was returned; otherwise, false. + + + + Creates the table implementation. + + Name of the table. + A sequence of tasks to do the operation. + + + + Creates the table if not exist implementation. + + Name of the table. + The set result. + A sequence of tasks to do the operation. + + + + Verifies whether the table exist implementation. + + Name of the table. + The set result. + A sequence of tasks to do the operation. + + + + Lists the tables segmented impl. + + The prefix. + The max results. + The continuation token. + The set result. + A that lists the tables. + + + + Lists the tables segmented implementation. + + The prefix. + The continuation token. + The pagination. + The last result. + The set result. + A sequence of tasks to do the operation. + + + + Delete table implementation. + + Name of the table. + A sequence of tasks to do the operation. + + + + Deletes table if exists implementation. + + Name of the table. + The set result. + A sequence of tasks to do the operation. + + + + Gets the base Uri for the Table service. + + The base Uri. + + + + Gets or sets the retry policy for all of the requests by the service client. + + The retry policy. + + + + Gets or sets the timeout for all of the requests by the service client. + + The request timeout. + + + + Gets the credentials used by the client. + + The credentials. + + + + Represents a single query request to the Windows Azure Table service. + + The type of the query result. + + + + Stores the header prefix for continuation information. + + + + + Stores the header suffix for the next partition key. + + + + + Stores the header suffix for the next row key. + + + + + Stores the table suffix for the next table name. + + + + + Stores the maximum results the table service can return. + + + + + Stores the pagination options. + + + + + Stores the wrapped . + + + + + Initializes a new instance of the class with the specified . + + The object to wrap. + + + + Initializes a new instance of the class with the specified and . + + The object to wrap. + The to use when retrying requests. + + + + Executes the query with retries and returns the results. + + The results of the query. + The method makes one request when it is called and further requests as elements are read from the returned result. + + + + Executes the query with retries and returns the results. + + Optional continuationToken from previous ResultSegment for continuing listing operation. + The results of the query. + The method makes one request when it is called and further requests as elements are read from the returned result. + + + + Begins an asynchronous request for the first segment of results of a query. + + The delegate. + An object containing state information for this asynchronous request. + An that references the asynchronous request. + + + + Begins an asynchronous request for the first segment of results of a query. + + Optional continuationToken from previous ResultSegment for continuing listing operation. + The delegate. + An object containing state information for this asynchronous request. + An that references the asynchronous request. + + + + Returns the first segment of results of an asynchronous request to execute a query. + + The reference to the pending asynchronous request to finish. + A that contains the first segment of results. + + + + Expands the specified path. + + The path to expand. + A new query with the expanded path. + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Executes the segmented impl. + + The continuation token. + The set result. + A that executes the query and returns the first segment of results. + + + + Rewrites the query for take count. + + The local query. + The pagination. + The rewritten query. + + + + Applies the continuation to query. + + The continuation token. + The local query. + The modified query. + + + + Gets the query take count. + + The query. + The take count of the query, if any. + + + + Gets the table continuation from response. + + The response. + The continuation. + + + + Gets or sets the to use when retrying requests. + + The retry policy. + + + + Gets the type of the element(s) that are returned when the expression tree associated with this instance of is executed. + + + A that represents the type of the element(s) that are returned when the expression tree associated with this object is executed. + + + + + Gets the expression tree that is associated with the instance of . + + + The that is associated with this instance of . + + + + + Gets the query provider that is associated with this data source. + + + The that is associated with this data source. + + + + + A set of common utilities for use in verfication. + + + + + Throws an exception if the string is empty or null. + + The name of the parameter. + The value of the parameter. + Thrown if value is empty. + Thrown if value is null. + + + + Throw an exception if the value is null. + + The name of the parameter. + The value of the parameter. + Thrown if value is null. + + + + Throw an exception indicating argument is out of range. + + The name of the parameter. + The value of the parameter. + + + + Throw an exception if the argument is out of bounds. + + The type of the value. + The name of the parameter. + The value of the parameter. + The minimum value for the parameter. + The maximum value for the parameter. + + + + Combines AssertNotNullOrEmpty and AssertInBounds for convenience. + + The name of the parameter. + Turns on or off null/empty checking. + The value of the parameter. + The maximum size of value. + + + + Throws if the result segment does not have more results. + + The type of the batch context. + The result segment to check. + + + + Determines if a Uri requires path style addressing. + + The Uri to check. + Returns true if the Uri uses path style addressing; otherwise, false. + + + + Asserts the segment result not empty. + + The type of the result segment. + The result. + + + + Performs a 'magic enumerator' lazy segmented enumeration. + + The type of the result. + The task sequence generator that produces the first segment. + The retry policy to use. + A 'magic enumerator' that makes requests when needed and chains segments accordingly. + + + + Rounds up to seconds. + + The time span. + The time rounded to seconds. + + + + Rounds up to seconds. + + The time span. + The time rounded to seconds. + + + + Rounds up to milliseconds. + + The time span. + The time rounded to milliseconds. + + + + Rounds up to milliseconds. + + The time span. + The time rounded to milliseconds. + + + + When calling the Get() operation on a queue, the content of messages + returned in the REST protocol are represented as Base64-encoded strings. + This internal function transforms the Base64 representation into a byte array. + + The Base64-encoded string. + The decoded bytes. + + + + Applies the request optimizations such as disabling buffering and 100 continue. + + The request to be modified. + The length of the content, -1 if the content length is not settable. + + + + Look for an inner exception of type DataServiceClientException. Different versions of Sytem.Data.Services.Client + have different levels of wrapping of a DataServiceClientException. + + The exception. + The found exception or null. + + + + Asserts the type of the continuation. + + The continuation token. + Type of the continuation. + + + + Specifies which details to include when listing the containers in this storage account. + + + + + No additional details. + + + + + Include container metadata. + + + + + Include all available details. + + + + + The set of options describing delete operation. + + + + + Don't delete snapshots. + + + + + Delete the blob and its snapshots. + + + + + Delete the blob's snapshots only. + + + + + Contains methods for dealing with events. + + + + + This sets the event handler with request and response data and + translates storage exceptions. + + The request. + The async result. + The handler. + The sender. + The processed response. + + + + Set the event handler. + + The request. + The web response. + The event handler. + The sender. + The exception. + + + + The lease status of the blob. + + + + + The lease status is not specified. + + + + + The blob is locked for exclusive-write access. + + + + + The blob is not locked for exclusive-write access. + + + + + Represents a block retrieved from the blob's block list. + + + + + Gets the name of the block. + + The block name. + + + + Gets the size of block in bytes. + + The block size. + + + + Gets a value indicating whether the BlockListItem returned is committed or uncommitted. + + Is true if committed; otherwise, false. + + + + Contains methods for dealing with navigation. + + + + + Used in address parsing. + + + + + Used in address parsing. + + + + + Used in address parsing. + + + + + Used to split string on slash. + + + + + Used to split hostname. + + + + + Retrieves the container part of a storage Uri. + + The BLOB address. + True to use path style Uris. + Name of the container. + + Any trailing slash is always removed. + + GetContainerName(new Uri("http://test.blob.core.windows.net/mycontainer/myfolder/myblob")) will return "mycontainer" + GetConatinerName(new Uri("http://test.blob.core.windows.net/mycontainer")) will return "mycontainer" + GetConatinerName(new Uri("http://test.blob.core.windows.net/")) will throw ArgumentException + + + + + + Retreives the complete container address from a storage Uri + Example GetContainerAddress(new Uri("http://test.blob.core.windows.net/mycontainer/myfolder/myblob")) + will return http://test.blob.core.windows.net/mycontainer. + + The BLOB address. + True to use path style Uris. + Uri of the container. + + + + Retreives the parent name from a storage Uri. + + The BLOB address. + The delimiter. + If set to true use path style Uris. + The name of the parent. + + Adds the trailing delimiter as the prefix returned by the storage REST api always contains the delimiter. + + + GetParentName(new Uri("http://test.blob.core.windows.net/mycontainer/myfolder/myblob", "/")) will return "/mycontainer/myfolder/" + GetParentName(new Uri("http://test.blob.core.windows.net/mycontainer/myfolder|myblob", "|") will return "/mycontainer/myfolder|" + GetParentName(new Uri("http://test.blob.core.windows.net/mycontainer/myblob", "/") will return "/mycontainer/" + GetParentName(new Uri("http://test.blob.core.windows.net/mycontainer", "/") will return "/mycontainer/" + + + + + Retrieves the parent address for a blob Uri. + + The BLOB address. + The delimiter. + If set to true use path style Uris. + The address of the parent. + + GetParentName(new Uri("http://test.blob.core.windows.net/mycontainer/myfolder/myblob", null)) + will return "http://test.blob.core.windows.net/mycontainer/myfolder/" + + + + + Get service client address from a complete Uri. + + Complete address of the resource. + True to use path style Uris. + Uri of the service client. + + GetServiceClientBaseAddress("http://testaccount.blob.core.windows.net/testconatiner/blob1") + returns "http://testaccount.blob.core.windows.net" + + + + + Gets the service client base address. + + The address Uri. + The use path style Uris. + The base address of the client. + + + + Appends a path to a Uri correctly using "/" as separator. + + The base Uri. + The relative or absloute URI. + The appended Uri. + + AppendPathToUri(new Uri("http://test.blob.core.windows.net/test", "abc") + will return "http://test.blob.core.windows.net/test/abc" + AppendPathToUri(new Uri("http://test.blob.core.windows.net/test"), "http://test.blob.core.windows.net/test/abc") + will return "http://test.blob.core.windows.net/test/abc" + + + + + Append a relative path to a Uri, handling traling slashes appropiately. + + The base Uri. + The relative or absloute URI. + The seperator. + The appended Uri. + + + + Get container name from address for styles of paths + Eg: http://test.blob.core.windows.net/container/blob => container + http://127.0.0.1:10000/test/container/blob => container. + + The container Uri. + If set to true use path style Uris. + The container name. + + + + Gets the canonical path from creds. + + The credentials. + The absolute path. + The canonical path. + + + + Similar to getting container name from Uri. + + The queue Uri. + If set to true use path style Uris. + The queue name. + + + + Retrieve the container address and address. + + The BLOB address. + True to use path style Uris. + Name of the container. + The container URI. + + + + Represents a range of pages. + + + + + Initializes a new instance of the class. + + The start offset. + The end offset. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Gets the start offset of the page range. + + The start offset. + + + + Gets the end offset of the page range. + + The end offset. + + + + Class used to upload blocks for a blob in parallel. + + The parallelism factor is configurable at the CloudBlobClient. + + + + Stores the block size. + + + + + Stores the blob we're uploading. + + + + + Stores the request options to use. + + + + + Stores the blob's hash. + + + + + Stores the source stream to upload from. + + + + + Stores the dispensized stream size. + + + + + Bound on number of parallel active tasks (threads). + + + + + The list of uploaded blocks. + + + + + Number of block creation tasks. + + + + + Number of block upload tasks created. + + + + + Number of dispenser calls. + + + + + Initializes a new instance of the class. + + The source stream. + The request options. + The block size to use. + The blob to upload to. + + + + Perform a parallel upload of blocks for a blob from a given stream. + + The upload func. + A that uploads the blob in parallel. + + The operation is done as a series of alternate producer and consumer tasks. The producer tasks dispense out + chunks of source stream as fixed size blocks. This is done in serial order on a thread using InvokeTaskSequence's + serial execution. The consumer tasks upload each block in parallel on multiple thread. The producer thread waits + for at least one consumer task to finish before adding more producer tasks. The producer thread quits when no + more data can be read from the stream and no other pending consumer tasks. + + + + + Completes the asyncresult. + + The async results. + The index. + + + + Gets the wait timeout. + + The options. + The wait timeout. + + + + Upload a single block. This can happen on parallel threads. + + The set result. + A that dispenses a block stream. + + + + Gets the parallelism factor. + + The parallelism factor. + + + + As a final step upload the block list to commit the blob. + + A that commits the blob. + + + + Assists in protocol implementation. + + + + + Gets the web request. + + The service client. + The options. + The retrieve request. + The web request. + + + + Parses the response XML from a Set Container ACL operation to retrieve container-level access policy data. + + + + + A base class to parse XML streams from the storage services. + + The type to be parsed. + + + + Used to designate when all parsable objects are consumed. + + + + + Stores any parsed objects that haven't been returned to the user due to specific requirement. + + + + + The reader used for parsing. + + + + + The IEnumerator over the parsed content. + + + + + Used to make sure that parsing is only done once, since a stream is not re-entrant. + + + + + Initializes a new instance of the ResponseParsingBase class. + + The stream to be parsed. + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Parses the XML by using an overriden parsing function that will perform the specific parsing and flag setting. + + A list of enumerable objects in the XML. + + + + Releases unmanaged and - optionally - managed resources. + + Specify true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + All other properties will be some variable type such as a string or int. We don't really care about the resulting value in + the base, but this logic will control how far we parse. There can be an arbitrary number of these flags in the ParseXml() method, + so we pass them in by reference here. + + When set to true the value is now consumable. + + + + Parses the XML and close. + + A list of parsed results. + + + + Gets the parsable objects: For each class that inherits from this base, there is exactly one property the is an IEnumerable. This is + what should be returned in that case. + + The objects to parse. + + + + Initializes a new instance of the class. + + The stream to be parsed. + + + + Parses the response XML from a Set Container ACL operation to retrieve container-level access policy data. + + A list of enumerable key-value pairs. + + + + Gets the container-level access policy identifiers. + + The access identifiers. + + + + Represents a container item returned in the XML response for a List Containers operation. + + + + + Initializes a new instance of the class. + + + + + Gets the attributes for this container item. + + The attributes. + + + + Represents a blob item returned in the XML response for a List Blobs operation. + + + + + Interface for items that appear in the Blobs section of the XML response for a List Blobs operation. + + + + + Initializes a new instance of the class. + + The name of the blob. + The blob's attributes. + + + + Gets the attributes for this blob item. + + The blob's attributes. + + + + Gets the name of the blob. + + The name of the blob. + + + + Provides context for the List Blobs operation. + + + + + Represents the listing context for enumeration operations. + + + + + Initializes a new instance of the class. + + Optional. Filters the results to return only blobs whose names + begin with the specified prefix. + Optional. Specifies the maximum number of blobs to return, + including all BlobPrefix elements. + + If maxresults is not specified, the server will + return up to 5,000 items. Setting maxresults to a value greater than 5,000 results + in error response code 400 (Bad Request). + + + + + Gets or sets the prefix string. + + The prefix. + + Including a prefix string on the request filters the results to return only blobs whose names + begin with the specified prefix. + + + + + Gets or sets the max results. + + The max results. + + Specifies the maximum number of blobs to return, including all BlobPrefix elements. + If maxresults is not specified, the server will return up to 5,000 items. Setting + maxresults to a value greater than 5,000 results in error response code 400 (Bad Request). + + + + + Gets or sets the marker. + + + A string value that identifies the portion of the + list to be returned with the next list operation. The operation returns a marker + value within the response body if the list returned was not complete. The marker + value may then be used in a subsequent call to request the next set of list items. + + The marker. + + + + Initializes a new instance of the class. + + The blob prefix. + The maximum number of results to return. + The blob delimiter. + The include parameter. + + + + Gets or sets the delimiter for a List Blobs operation. + + The delimiter. + + The delimiter parameter enables the caller to traverse the blob namespace by using a user-configured delimiter. + Using this parameter, it is possible to traverse a virtual hierarchy of blobs as though it were a file system. + + + + + Gets or sets the value of the include parameter. + + The include parameter. + + The include parameter specifies that the response should include one or more of the following subsets: snapshots, + metadata, uncommitted blobs. + + + + + The blob prefix, as returned in the Blobs section of the XML response for a List Blobs operation. + + + + + Gets the prefix string. + + The prefix string. + + + + Provides an implementation of the class for blobs and queues + for the Shared Key authentication scheme. + + + + + Describes the base canonicalization used for a request. + + + + + Canonicalizes the HTTP request based on the specified strategy. + + The request to canonicalize. + Name of the account. + Canonicalization of the request fields. + + + + Create a canonicalized string out of HTTP request header contents for signing + Blob or Queue servoce requests under the Shared Key Lite authentication scheme. + + The Uri address of the HTTP request. + The storage account name. + The method of the HTTP request (GET/PUT, etc.). + The content type of the HTTP request. + The date/time specification for the HTTP request. + Additional headers specified on the HTTP request. + A canonicalized string. + + + + Create a canonicalized string out of HTTP request header contents for signing + Blob or Queue service requests under the Shared Authentication scheme. + + The Uri address of the HTTP request. + The storage account name. + The method of the HTTP request (GET/PUT, etc.). + The content type of the HTTP request. + The length of the HTTP request in bytes. + The date/time specification for the HTTP request. + Additional headers specified on the HTTP request. + + The canonicalized string. + + + + + Gets the standard HTTP header value. + + The collection of headers. + The name of the header. + The header value. + + + + A helper function for extracting HTTP header values from a NameValueCollection object. + + A NameValueCollection object that should contain HTTP header name-values pairs. + Name of the header. + A array list of values for the header. The values are in the same order as they are stored in the NameValueCollection object. + + + + Appends a string to the canonicalized resource string. + + The canonicalized string. + The string to append. + The modified canonicalized resource string. + + + + Gets the canonicalized resource for the Shared Key Lite authentication scheme. + + The resource address. + The name of the storage account. + The canonicalized resource string. + + + + Gets the canonicalized resource for the Shared Key authentication scheme. + + The resource address. + The name of the storage account. + The canonicalized resource string. + + + + Adds the canonicalized resource for version 2. + + The address. + Name of the account. + The canonicalized string. + + + + Add the resource name. + + The address. + Name of the account. + The canonicalized string. + + + + Add x-ms- prefixed headers in a fixed order. + + The headers. + The canonicalized string. + + + + Canonicalizes the HTTP request. + + An HttpWebRequest object. + Name of the storage account. + + The canonicalized string for the request. + + + + + Provides an implementation of the class for blobs and queues + for the Shared Key Lite authentication scheme. + + + + + Canonicalizes the HTTP request. + + An HttpWebRequest object. + Name of the storage account. + + The canonicalized string for the request. + + + + + A factory class for constructing blob requests. + + + + + Creates a new block blob or page blob, or updates the content of an existing block blob. + + The Uri for the blob. + The timeout for operation. + The properties for blob. + Type of the blob. + The lease ID, if the blob has an active lease. + Size of the blob for page blobs; for block blobs this parameter is ignored. + A web request for performing the operation. + + + + Returns an object to delete the specified blob. + + The resource Uri. + The operation timeout. + The snapshot version, if the blob is a snapshot. + A object indicating whether to delete snapshots. + The lease ID. Required if the blob has an active lease. + A web request for performing the operation. + + + + Returns the user-defined metadata for this blob. + + The blob's Uri. + The operation timeout. + The snapshot time. + The lease ID, if the blob has an active lease. + A web request for performing the operiaton. + + + + Sets user-defined metadata for the blob. + + The blob's Uri. + The operation timeout. + The lease ID, if the blob has an active lease. + + A web request for performing the operation. + + + + + Signs the request. + + The request. + The credentials. + + + + Adds user-defined metadata to the blob. + + The request. + The metadata. + + + + Adds user-defined metadata to the blob. + + The request to modify. + The metadata name. + The metadata value. + + + + Returns user-defined metadata for this blob. + + The blob's Uri. + The operation timeout. + The snapshot time. + The lease ID. + + A web request for performing the operation. + + + + + Signs the request for shared key lite. + + The request. + The credentials. + + + + Adds a conditional header. + + The request. + The conditional header. + The blob's ETag. + + + + Adds a conditional header. + + The request. + The conditional header. + The date and time specification for the request. + + + + Returns the list of all blobs under this container. + + The blob's Uri. + The operation timeout. + The listing context. + A web request for performing the operation. + + + + Returns an object to copy a blob. + + The resource Uri. + The operation timeout. + The source blob. + The snapshot version, if the source blob is a snapshot. + A condition on the source blob. + The value of the condition. + The lease ID for the source blob. + A web request for performing the operation. + + + + Returns an object to get the blob's content, properties, and metadata. + + The resource Uri. + The operation timeout. + The snapshot version, if the blob is a snapshot. + The lease ID. Optional. + + A web request for performing the operation. + + + + + Returns a portion (range) of the blob's content with properties and metadata. + + The blob's Uri. + The operation timeout. + The snapshot. + The offset at which request starts. + The number of bytes to download. + Optional lease ID. + A web request for performing the operation. + + + + Returns the list of blocks for the List blob. + + The blob's Uri. + The operation timeout. + The snapshot time. + Type of the blocks included in the list. + Optional lease ID. + A web request for performing the operation. + + + + Return a list of active page ranges for the page blob. + + The blob's Uri. + The operation timeout. + The snapshot time. + The lease ID, if the blob has an active lease. + A web request for performing the operation. + + + + Acquires, renews, releases or breaks the lease for the blob. + + The blob's Uri. + The operation timeout. + The action to perform. + The lease ID, if the blob has an active lease. + A web request for performing the operation. + + + + Writes a block that will be part of a blob. + + The blob's Uri. + The operation timeout. + The block ID. + Optional lease ID. + A web request for performing the operation. + + + + Commits a blob by specifying the list of block IDs that make up the blob. + + The blob's Uri. + The operation timeout. + The properties. + The lease ID, if the blob has an active lease. + + A web request for performing the operation. + + + + + Writes the block list body. + + The blocks. + The output stream. + + + + Writes or Clear range of pages into Blob. + + The blob's Uri. + The operation timeout. + The blob's properties. + The lease ID, if the blob has an active lease. + A web request for performing the operation. + + + + Set the user-defined properties for a blob. + + The blob's Uri. + The operation timeout. + The blob's properties. + The lease ID, if the blob has an active lease. + The new blob size if non-null; only applicable to page blob under the current protocol. + A web request for performing the operation. + + + + Create a snapshot for the blob. + + The blob's Uri. + The operation timeout. + A web request for performing the operation. + + + + Adds the snapshot. + + The builder. + The snapshot. + + + + Creates the web request. + + The Uri of the resource. + The timeout to apply. + The query builder to use. + The resulting . + + + + Provides a starting point for parsing any blob responses. + + + + + Parses the error response. + + The response from server. + A containing information about the response. + + + + Gets the metadata from the response. + + The response from server. + A containing all of the user-defined metadata. + + + + Gets the metadata for a specific name. + + The response received from server. + The name of the specific metadata header. + An array of metadata values. + + + + Gets the properties and metadata from server request. + + The response from the server. + The properties and metadata returned from the server. + + + + Gets the request id from response. + + The response from server. + The request ID from ther server. + + + + Gets the snapshot time from the snapshot request. + + The response for a snapshot request. + A string representation of the DateTime of the snapshot. + + + + Parses the ListBlobs response. + + The stream for the response. + A class used for parsing out details of the ListBlobs operation. + + + + Parses the ListBlobs response. + + The response from server. + A class used for parsing out details of the ListBlobs operation. + + + + Parses the GetBlockList response. + + The stream for the response. + A class used for parsing out details of the GetBlockList operation. + + + + Parses the GetBlockList response. + + The response of the operation. + A class used for parsing out details of the GetBlockList operation. + + + + Parses the GetPageRanges response. + + The stream for the response. + A class used for parsing out details of the GetPageRanges operation. + + + + Parses the GetPageRanges response. + + The response of the request. + A class used for parsing out details of the GetPageRanges operation. + + + + The block lists to search for blocks specified by a Put Block List operation. + + + + + Committed blocks only. + + + + + Uncommitted blocks only. + + + + + Latest available. + + + + + Retrieve appropriate version of CanonicalizationStrategy based on the webrequest + for Blob Queue and Table. + + + + + Stores the version 1 blob/queue full signing strategy. + + + + + Stores the version 1 table lite signing strategy. + + + + + Stores the version 2 blob/queue full signing strategy. + + + + + Stores the version 1 table full signing strategy. + + + + + Gets canonicalization strategy for Blob and Queue SharedKey Authentication. + + The request. + The canonicalization strategy. + + + + Get canonicalization strategy for Tables for SharedKeyLite Authentication. + + The request. + The canonicalization strategy. + + + + Gets the table full canonicalization strategy. + + The request. + The canonicalization strategy. + + + + Gets the BLOB queue lite canonicalization strategy. + + The request. + The canonicalization strategy. + + + + Determines whether [is target version2] [the specified request]. + + The request. + + Returns true if [is target version2] [the specified request]; otherwise, false. + + + + + Gets the BLOB queue full ver1. + + The BLOB queue full ver1. + + + + Gets the table lite ver1. + + The table lite ver1. + + + + Gets the table full ver1. + + The table full ver1. + + + + Gets the BLOB queue full ver2. + + The BLOB queue full ver2. + + + + An internal class that stores the canonicalized string version of an HTTP request. + + + + + Stores the internal that holds the canonicalized string. + + + + + Initializes a new instance of the class. + + The first canonicalized element to start the string with. + + + + Append additional canonicalized element to the string. + + An additional canonicalized element to append to the string. + + + + Gets the canonicalized string. + + + + + Conditional headers. + + + + + No conditions. + + + + + If the resource has not been modified since the specified time. + + + + + If the specified ETag matches the value stored by the service. + + + + + If the resource has been modified since the specified time. + + + + + If the specified ETag does not match the value stored by the service. + + + + + Contains storage constants. + + + + + Maximum number of shared access policy identifiers supported by server. + + + + + Default Write Block Size used by Blob stream. + + + + + Default Read Ahead Size used by Blob stream. + + + + + The maximum size of a blob before it must be separated into blocks. + + + + + The maximum size of a blob with blocks. + + + + + The maximum size of a single block. + + + + + The maximum number of blocks. + + + + + Default size of buffer for unknown sized requests. + + + + + The size of a page in a PageBlob. + + + + + A constant representing a kilo-byte (Non-SI version). + + + + + A constant representing a megabyte (Non-SI version). + + + + + A constant representing a megabyte (Non-SI version). + + + + + XML element for committed blocks. + + + + + XML element for uncommitted blocks. + + + + + XML element for blocks. + + + + + XML element for names. + + + + + XML element for sizes. + + + + + XML element for block lists. + + + + + XML element for queue message lists. + + + + + XML element for queue messages. + + + + + XML element for message IDs. + + + + + XML element for insertion times. + + + + + XML element for expiration times. + + + + + XML element for pop receipts. + + + + + XML element for the time next visible fields. + + + + + XML element for message texts. + + + + + XML element for dequeue counts. + + + + + XML element for page ranges. + + + + + XML element for page list elements. + + + + + XML element for page range start elements. + + + + + XML element for page range end elements. + + + + + XML element for delimiters. + + + + + XML element for blob prefixes. + + + + + XML element for content type fields. + + + + + XML element for content encoding fields. + + + + + XML element for content language fields. + + + + + XML element for content length fields. + + + + + XML element for blobs. + + + + + XML element for prefixes. + + + + + XML element for maximum results. + + + + + XML element for markers. + + + + + XML element for the next marker. + + + + + XML element for the ETag. + + + + + XML element for the last modified date. + + + + + XML element for the Url. + + + + + XML element for blobs. + + + + + Constant signalling a page blob. + + + + + Constant signalling a block blob. + + + + + Constant signalling the blob is locked. + + + + + Constant signalling the blob is unlocked. + + + + + XML element for blob types. + + + + + XML element for the lease status. + + + + + XML element for snapshots. + + + + + XML element for containers. + + + + + XML element for a container. + + + + + XML element for queues. + + + + + XML element for the queue name. + + + + + Version 2 of the XML element for the queue name. + + + + + XML element for the queue. + + + + + XML element for the metadata. + + + + + XML element for an invalid metadata name. + + + + + XPath query for error codes. + + + + + XPath query for error messages. + + + + + XML element for maximum results. + + + + + XML element for committed blocks. + + + + + XML element for uncommitted blocks. + + + + + XML element for the latest. + + + + + XML element for signed identifiers. + + + + + XML element for a signed identifier. + + + + + XML element for access policies. + + + + + XML attribute for IDs. + + + + + XML element for the start time of an access policy. + + + + + XML element for the end of an access policy. + + + + + XML element for the permissions of an access policy. + + + + + The maximum size of a string property for the table service in bytes. + + + + + The maximum size of a string property for the table service in chars. + + + + + The name of the special table used to store tables. + + + + + The Uri path component to access the messages in a queue. + + + + + XML root element for errors. + + + + + XML element for error codes. + + + + + XML element for error messages. + + + + + XML element for exception details. + + + + + XML element for exception messages. + + + + + XML element for stack traces. + + + + + XML element for the authentication error details. + + + + + XML namespace for the WCF Data Services metadata. + + + + + XML element for table error codes. + + + + + XML element for table error messages. + + + + + Default client side timeout for all service clients. + + + + + This is used to create BlockIDs. The prefix must be Base64 compatible. + + + + + The minimum supported value for the table service. + + + + + The timeout after which the WCF Data Services bug workaround kicks in. + + + + + Constants for HTTP headers. + + + + + Master Windows Azure Storage header prefix. + + + + + Header prefix for properties. + + + + + Header prefix for metadata. + + + + + Header for data ranges. + + + + + Header for storage version. + + + + + Header for copy source. + + + + + Header for the If-Match condition. + + + + + Header for the If-Modified-Since condition. + + + + + Header for the If-None-Match condition. + + + + + Header for the If-Unmodified-Since condition. + + + + + Header for the blob content length. + + + + + Header for the blob type. + + + + + Header for snapshots. + + + + + Header to delete snapshots. + + + + + Header that specifies approximate message count of a queue. + + + + + Header that specifies a range. + + + + + Header that specifies blob caching control. + + + + + Header that specifies blob content encoding. + + + + + Header that specifies blob content language. + + + + + Header that specifies blob content MD5. + + + + + Header that specifies blob content type. + + + + + Header that specifies blob content length. + + + + + Header that specifies lease ID. + + + + + Header that specifies page write mode. + + + + + Header that specifies the date. + + + + + Header indicating the request ID. + + + + + Header that specifies public access to blobs. + + + + + Format string for specifying ranges. + + + + + Current storage version header value. + + + + + Specifies the page blob type. + + + + + Specifies the block blob type. + + + + + Specifies only snapshots are to be included. + + + + + Specifies snapshots are to be included. + + + + + Constants for query strings. + + + + + Query component for snapshot time. + + + + + Query component for the signed SAS start time. + + + + + Query component for the signed SAS expiry time. + + + + + Query component for the signed SAS resource. + + + + + Query component for the signed SAS permissions. + + + + + Query component for the signed SAS identifier. + + + + + Query component for the signed SAS version. + + + + + Query component for SAS signature. + + + + + Factory class for generating blob container requests. + + + + + Creates a new container. + + The container's Uri. + The operation timeout. + + A web request for performing the operation. + + + + + Deletes the container and all of its blobs. + + The container's Uri. + The operation timeout. + + A web request for performing the operation. + + + + + Retrieves metadata headers on the container. + + The container's Uri. + The operation timeout. + + A web request for performing the operation. + + + + + Returns the user-defined metadata for this container. + + The container Uri. + The timeout. + + A web request for performing the operation. + + + + + Sets user-defined metadata for the container. + + The container's Uri. + The operation timeout. + + A web request for performing the operation. + + + + + Signs the request. + + The request. + The credentials. + + + + Adds the metadata. + + The request. + The metadata. + + + + Adds the metadata. + + The web request. + The metadata name. + The metadata value. + + + + Signs the request for shared key lite. + + The request. + The credentials. + + + + Adds the conditional. + + The web request. + The header to modify. + The ETag to use. + + + + Adds the conditional. + + The request. + The header. + The date time. + + + + Returns the list of all containers under this storage account. + + The account's Uri. + The operation timeout. + The listing context. + Extra details to include in the listing. + A web request for the specified operation. + + + + Returns the ACL for this container. + + The container Uri. + The timeout. + A web request for performing the operation. + + + + Sets the ACL for the container. + + The container Uri. + The timeout. + Set to "container" or "blob" to set or use empty to clear it. + A web request for performing the operation. + + + + Writes the shared access identifiers. + + The shared access policy set. + The output stream. + + + + Gets the container Uri query builder. + + A for the container. + + + + Creates the web request. + + The container's Uri. + The operation timeout. + The query builder to use. + A web request for performing the operation. + + + + Used to parse the HttpWebResponse of a ContainerRequest. + + + + + Parses the error response. + + The response from server. + A containing information about the response. + + + + Gets the metadata from the response. + + The response from server. + A containing all of the user-defined metadata. + + + + Gets the metadata for a specific name. + + The response received from server. + The name of the specific metadata header. + An array of metadata values. + + + + Gets the properties and metadata from server request. + + The response from the server. + The properties and metadata returned from the server. + + + + Gets the request id from response. + + The response from server. + The request ID from the server. + + + + Gets the acl for the container. + + The response for the GetAcl request. + A string representing the level of ACL. + + + + Parses a List containers request's response. + + The response from server. + A for parsing ListContainers request. + + + + Credentials used to sign a request against the storage services. + + + + + Initializes a new instance of the class. + + The storage account name. + The storage account key. + + + + Initializes a new instance of the class. + + The storage account name. + The account key as a Base64-encoded string. + + + + Retrieve the account key. + + A copy of the account key. + + + + Retrieve the key in base64 encoded form. + + The account key as a base64 encoded string. + + + + Gets the account name used in signing request. + + The name of the account. + + + + Gets the key used in signing request. + + + + + Parses the XML response for a Get Block List operation. + + + + + Initializes a new instance of the class. + + The stream to be parsed. + + + + Parses the XML response returned by a Get Block List operation. + + A list of blocks. + + + + Gets a list of blocks from the response. + + The list of blocks. + + + + Parses the XML response for a Get Messages operation. + + + + + Initializes a new instance of the class. + + The stream of messages to parse. + + + + Parses the response XML for a Get Messages operation. + + A list of objects in the response XML. + + + + Gets a list of messages from the response. + + The messages. + + + + Parse the XML response for a Get Page Ranges operation. + + + + + Initializes a new instance of the class. + + The stream of page ranges to be parsed. + + + + Parses the XML response for a Get Page Ranges operation. + + A list of enumerable objects in the XML. + + + + Gets a list of page ranges. + + The page ranges. + + + + Actions that can be performed on a lease. + + + + + Acquire the lease. + + + + + Renew the lease. + + + + + Release the lease. + + + + + Break the lease. + + + + + Parses the response XML for a List Blobs operation. + + + + + Stores the blob prefix. + + + + + Signals when the blob prefix can be consumed. + + + + + Stores the marker. + + + + + Signals when the marker can be consumed. + + + + + Stores the blob delimiter. + + + + + Signals when the blob delimiter can be consumed. + + + + + Stores the max results. + + + + + Signals when the max results can be consumed. + + + + + Stores the next marker. + + + + + Signals when the next marker can be consumed. + + + + + Initializes a new instance of the class. + + The stream to be parsed. + + + + Parses the response XML for a List Blobs operation. + + A list of enumerable objects in the XML. + + + + Gets the listing context from the XML response. + + The listing context. + + + + Gets a list of blobs from the XML response. + + The blobs. + + + + Gets the prefix from the XML response. + + The prefix. + + + + Gets the marker from the XML response. + + The marker. + + + + Gets the delimiter from the XML response. + + The delimiter. + + + + Gets the maximum results value from the XML response. + + The max results. + + + + Gets the next marker value from the XML response. + + The next marker. + + + + Parses the response XML for a List Containers operation. + + + + + Stores the container prefix. + + + + + Signals when the container prefix can be consumed. + + + + + Stores the marker. + + + + + Signals when the marker can be consumed. + + + + + Stores the max results. + + + + + Signals when the max results can be consumed. + + + + + Stores the next marker. + + + + + Signals when the next marker can be consumed. + + + + + Initializes a new instance of the class. + + The stream to be parsed. + + + + Parses the XML response for a List Containers operation. + + This may return a null for an object if it parses non-BlobContainer item (such a property). + A list of enumerable objects in the XML. + + + + Gets the listing context from the XML response. + + The listing context. + + + + Gets the list of containers from the XML response. + + The containers. + + + + Gets the prefix from the XML response. + + The prefix. + + + + Gets the marker from the XML response. + + The marker. + + + + Gets the maximum results value from the XML response. + + The max results. + + + + Gets the next marker value from the XML response. + + The next marker. + + + + Parses the XML response for a List Queues operation. + + + + + Stores the prefix. + + + + + Signals when the prefix can be consumed. + + + + + Stores the marker. + + + + + Signals when the marker can be consumed. + + + + + Stores the max results. + + + + + Signals when the max results can be consumed. + + + + + Stores the next marker. + + + + + Signals when the next marker can be consumed. + + + + + Initializes a new instance of the class. + + The stream to be parsed. + + + + Parses the XML response for a List Queues operation. + + A list of enumerable objects in the XML. + + + + Gets the listing context. + + The listing context. + + + + Gets a list of queues. + + The queues. + + + + Gets the prefix used for enumeration. + + The prefix. + + + + Gets the marker used for continuations. + + The marker. + + + + Gets the max results setting. + + The max results. + + + + Gets the next marker for use in continuations. + + The next marker. + + + + Actions used for writing a page. + + + + + Update the page with new data. + + + + + Clear the page. + + + + + A class to help with parsing. + + + + + Converts a string to UTC time. + + The string to convert. + A UTC representation of the string. + + + + Parses the response XML for a Peek Messages operation. + + + + + Initializes a new instance of the class. + + The stream to be parsed. + + + + Parses the response XML for a Peek Messages operation. + + A list of enumerable objects in the XML. + + + + Gets a list of the message. + + The messages. + + + + Represents a block in a block list. + + + + + Initializes a new instance of the class. + + The block ID. + The block lists to search. + + + + Gets the block ID. + + The block ID. + + + + Gets the search mode. + + The search mode. + + + + Represents properties for writing to a page blob. + + + + + Initializes a new instance of the class. + + + + + Gets or sets the range of bytes to write to. + + The page range. + + + + Gets or sets the type of write operation. + + The page write. + + + + Represents a queue item returned in the XML response for a List Queues operation. + + + + + Initializes a new instance of the class. + + The name of the queue. + The queue's attributes. + + + + Gets the name of the queue. + + The queue name. + + + + Gets the queue's attributes. + + The attributes. + + + + Represents a message retrieved from a queue. + + + + + Initializes a new instance of the class. + + + + + Gets the message expiration time. + + The expiration time. + + + + Gets the message ID. + + The message ID. + + + + Gets the time the message was added to the queue. + + The insertion time. + + + + Gets the time the message is next visible. + + The time next visible. + + + + Gets the pop receipt for the message. + + The pop receipt. + + + + Gets the text of the message. + + The message text. + + + + Gets the number of times this message has been dequeued. + + The dequeue count. + + + + Represents a factory for the requests against Queue. + + + + + Creates the specified Uri. + + The queue's Uri. + The operation timeout. + A web request for performing the operation. + + + + Creates a request to delete the specified queue. + + The Uri for queue. + The timeout for operation. + A web request for performing the operation. + + + + Returns the user-defined metadata for this queue. + + The queue Uri. + The timeout. + + A web request for performing the operation. + + + + + Sets user-defined metadata for the queue. + + The queue's Uri. + The operation timeout. + A web request for performing the operation. + + + + Signs the request. + + The request. + The credentials. + + + + Adds the metadata. + + The request. + The metadata. + + + + Adds the metadata. + + The web request. + The metadata name. + The metadata value. + + + + Signs the request for shared key lite. + + The request. + The credentials. + + + + Returns the list of all queues under this storage account. + + The account's Uri. + The operation timeout. + The listing context. + Queue details to include in the listing. + A web request for the specified operation. + + + + Clears all messages in the queue. + + The queue's Uri. + The operation timeout. + A web request for the specified operation. + + + + Deletes the specified message. + + The queue's Uri. + The operation timeout. + The pop receipt. + A web request for the specified operation. + + + + Gets a specified number of messages. + + The queue's Uri. + The operation timeout. + The number of messages. + The visibility timeout. + A web request for the specified operation. + + + + Gets a specified number of messages without changing their visibility. + + The queue's Uri. + The operation timeout. + The number of messages. + A web request for performing the specified operation. + + + + Adds the message to the queue. + + The queue's Uri. + The operation timeout. + The message time-to-live. + A web request for the specified operation. + + + + Generates the message request body from a string containing the message. + + The message. + An array of bytes. + + + + + Creates the web request. + + The queue's Uri. + The operation timeout. + The query. + A web request for performing the operation. + + + + Provides parsing for Queue responses. + + + + + Parses the error response. + + The response from server. + A containing information about the response. + + + + Gets the metadata from the response. + + The response from server. + A containing all of the user-defined metadata. + + + + Gets the metadata for a specific name. + + The response received from server. + The name of the specific metadata header. + An array of metadata values. + + + + Gets the request id from response. + + The response from server. + The request ID from ther server. + + + + Gets the approximate message count. + + The response from server. + The approximate count returned from server. + + + + Parses the GetMessages request. + + The stream to parse. + A class to parse the response. + + + + Parses the GetMessages request. + + The response from the server. + A class to parse the response. + + + + Parses the List Queues request. + + The response stream from the server. + A class to parse the response. + + + + Parses the List Queues request. + + The response from the server. + A class to parse the response. + + + + Parses the PeekMessages request. + + The response stream from the server. + A class to parse the response. + + + + Parses the PeekMessages request. + + The response from the server. + A class to parse the response. + + + + Factory class for creating requests internally. + + + + + Internal override for the storage version string. + + + + + Creates the web request. + + The request Uri. + The timeout. + The builder. + A web request for performing the operation. + + + + Creates the specified Uri. + + The Uri to create. + The timeout. + The builder. + A web request for performing the operation. + + + + Deletes the specified Uri. + + The Uri to delete. + The timeout. + The builder. + A web request for performing the operation. + + + + Gets the metadata. + + The blob Uri. + The timeout. + The builder. + A web request for performing the operation. + + + + Gets the properties. + + The Uri to query. + The timeout. + The builder. + A web request for performing the operation. + + + + Sets the metadata. + + The blob Uri. + The timeout. + The builder. + A web request for performing the operation. + + + + Signs the request appropriately to make it an authenticated request for Blob and Queue. + + The request. + The credentials. + + + + Signs requests using the SharedKey authentication scheme for the table storage service. + + The request. + The credentials. + + + + Adds the metadata. + + The request. + The metadata. + + + + Adds the metadata. + + The request. + The metadata name. + The metadata value. + + + + Signs requests using the SharedKeyLite authentication scheme with is used for the table storage service. + + The request. + The credentials. + + + + Signs requests using the SharedKeyLite authentication scheme with is used for the table storage service. + Currently we only support for table. + + The request. + The credentials. + + + + Adds the lease id. + + The request. + The lease id. + + + + Adds the optional header. + + The web request. + The metadata name. + The metadata value. + + + + Adds the conditional. + + The request. + The header. + The resource ETag. + + + + Adds the conditional. + + The request. + The header. + The date time. + + + + Creates a standard datetime string for the shared key lite authentication scheme. + + DateTime value to convert to a string in the expected format. + The converted DateTime. + + + + Gets the target version. + + The target version. + + + + Converts the date time to snapshot string. + + The date time. + The converted string. + + + + The exception thrown if the client attempts to parse the response a second time. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message for the exception. + + + + Initializes a new instance of the class. + + The message for the exception. + The inner exception. + + + + Initializes a new instance of the class. + + The serialization info. + The context for serialization. + + + + Implements the common parsing between all the responses. + + + + + Gets the error details from the response object. + + The response from server. + An extended error information parsed from the input. + + + + Gets the headers (metadata or properties). + + The response from sever. + A of all the headers. + + + + Gets the user-defined metadata. + + The response from server. + A of the metadata. + + + + Gets a specific user-defined metadata. + + The response from server. + The metadata header requested. + An array of the values for the metadata. + + + + Parses the metadata. + + The reader. + A of metadata. + + Precondition: reader at <Metadata> + Postcondition: reader after </Metadata> (<Metadata/> consumed) + + + + + Gets the storage properties. + + The response from server. + A of the properties. + + + + Gets a specific storage property. + + The response from server. + The property requested. + An array of the values for the property. + + + + Gets the request id. + + The response from server. + The request ID. + + + + Gets the metadata or properties. + + The response from server. + The prefix for all the headers. + A of the headers with the prefix. + + + + Container for storage key. + + + May eventually use native APIs to keep key pinned and not memory. + + + + + Initializes a new instance of the class. + + The storage key. + + + + Computes the mac sha256. + + The storage key. + The canonicalized string. + The computed hash. + + + + Computes the mac sha512. + + The storage key. + The canonicalized string. + The computed hash. + + + + Gets the base64 encoded key. + + The base64 encoded key. + + + + Gets the key. + + The storage key. + + + + Gets or sets the key. + + The storage key. + + + + Provides an implementation of the class for tables + for the Shared Key authentication scheme. + + + + + Canonicalizes the HTTP request. + + An HttpWebRequest object. + Name of the storage account. + + The canonicalized string for the request. + + + + + Provides an implementation of the class for tables + for the Shared Key Lite authentication scheme. + + + + + Canonicalizes the HTTP request. + + An HttpWebRequest object. + Name of the storage account. + + The canonicalized string for the request. + + + + + A style class for creating Uri query strings. + + + + + Stores the query parameters. + + + + + Add the value with Uri escaping. + + The query name. + The query value. + + + + Returns a that represents this instance. + + + A that represents this instance. + + + + + Add query parameter to an existing Uri. This takes care of any existing query parameters in the Uri. + + Original Uri which may contain query parameters already. + The appended Uri. + + + + Represents a set of attributes for a queue. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The attributes to clone. + + + + Gets user-defined metadata for the queue. + + The metadata. + + + + Gets the Uri for the queue. + + The queue's Uri. + + + + Error code strings that are specific to the Queue service. + + + + + The specified queue was not found. + + + + + The specified queue is disabled. + + + + + The specified queue already exists. + + + + + The specified queue is not empty. + + + + + The specified queue is being deleted. + + + + + The specified pop receipt does not match. + + + + + One or more of the specified parameters are invalid. + + + + + The specified message was not found. + + + + + The specified message is too large. + + + + + The specified marker is invalid. + + + + + Specifies which details to include when listing queues. + + + + + No extra details. + + + + + Include metadata. + + + + + Include all available details. + + + + + Utility functions that does the heavy lifting of carrying out retries on a IRetrayableRequest. + + + Both synchrous and asynchrous request styles are supported. + They are used to implement the corresponding XXX, BeginXXX, EndXXX calls where XXX + is something like GetBlobInfo. + State passing for return value in the sync call (GetBlobInfo) and out parameters for the async calls + (EndBlobInfo) is achieved by member variables in the implementation class of IRetryableRequest. + + + + + Synchronouses the request with retry. + + The result type of the task. + The oracle to use. + The task implementation. + The result of the task. + + + + Begins the asynchronous request with retry. + + The result type of the task. + The oracle to use. + The task implementation. + The asynchronous callback. + The asynchronous state. + An that represents the asynchronous operation. + + + + Ends the asynchronous request with retry. + + The result type of the task. + The asynchronous result. + The result of the completed task. + + + + Implementation of the *RequestWithRetry methods. + + The result type of the task. + The retry oracle. + The task implementation. + The result report delegate. + A that performs the request with retries. + + + + The arguments for the ResponseReceived event. + + + + + Gets the request id. + + The request id. + + + + Gets the request headers. + + The request headers. + Modifying the name-value collection may result in unexpected behavior. + + + + Gets the request Uri. + + The request URI. + + + + Gets the response headers. + + The response headers. + Modifying the name-value collection may result in unexpected behavior. + + + + Gets the status code. + + The status code. + + + + Gets the status description. + + The status description. + + + + Gets the exception. + + The exception. + + + + Manage continuation information for various listing operation. + Can be serialized using XmlSerialization. + + + + + XML element for the next marker. + + + + + XML element for the next partition key. + + + + + XML element for the next row key. + + + + + XML element for the next table name. + + + + + XML element for the token version. + + + + + Stores the current token version value. + + + + + XML element for the token type. + + + + + Initializes a new instance of the class. + + + + + This method is reserved and should not be used. When implementing the IXmlSerializable interface, you should return null (Nothing in Visual Basic) from this method, and instead, if specifying a custom schema is required, apply the to the class. + + + An that describes the XML representation of the object that is produced by the method and consumed by the method. + + + + + Generates an object from its XML representation. + + The stream from which the object is deserialized. + + + + Converts an object into its XML representation. + + The stream to which the object is serialized. + + + + Gets or sets the NextPartitionKey for TableServiceEntity enumeration operations. + + + + + Gets or sets the NextRowKey for TableServiceEntity enumeration operations. + + The next row key. + + + + Gets or sets the NextTableName for Table enumeration operations. + + The name of the next table. + + + + Gets or sets the NextMarker for continuing results for CloudBlob and CloudBlobContainer and CloudQueue enumeration operations. + + The next marker. + + + + Gets a value indicating whether there is continuation information present. + + + + + + Gets or sets the type. + + The continuation type. + + + + Specifies the type of a continuation token. + + + + + Default for no continuation. + + + + + The token is a blob listing continuation token. + + + + + The token is a queue listing continuation token. + + + + + The token is a container listing continuation token. + + + + + The token is a table query continuation token. + + + + + Represents a class which manages pagination of results. + + + + + Stores the results remaining in the current page. + + + + + Stores the page size. + + + + + Initializes a new instance of the class. + + Number of results to be returned as a page. + maxResults of 0 or less means no paging. + + + + Gets the size for next request to pass in parameter like MaxResults. + + Postive value indicating size of a result page if using paging. + Else null is returned. + + + + Update pagination paramters for new result set returned. + + The current result count. + + + + Gets the maxResults in use for the current Pagination instance + Returns zero if paging is not in use. + + The size of the effective page. + + + + Gets a value indicating whether paging is enabled with a valid postive page size. + An instance with a non positive page size will return false. + + + + + Gets a value indicating whether there are no more remaining results in the current page. + Will return false if paging is not enabled. + + + + + Represents a segment that was retrieved from the total set of possible results. + + The type of the element. + + + + Stores the continuation token used to retrieve the next segment of results. + + + + + Stores the closure used to retrieve the next set of results. + + + + + Stores the used for requests. + + + + + Initializes a new instance of the ResultSegment class. + + The result. + If set to true there are more results. + The next result segment. + The retry policy. + + + + Begins the asynchronous operation to get the next set of results. + + A callback method that is called when the asynchronous operation completes. + The user-provided state. + An object of type that references the asynchronous operation. + + + + Ends the asynchronous operation to get the next set of results. + + An object of type that references the asynchronous operation. + + The next segment. + + + + + Gets the next segment synchronously. + + A result segment of the next result. + + + + Implementation of GetNext (For symmetry with normal tasks. + + The action to set the results. + A representing the operation to get the next set of results. + + + + Gets the results. + + The results. + + + + Gets a value indicating whether this instance has more results. + + + Is true if this instance has more results; otherwise, false. + + + + + Gets the continuation information for continuing the operation. + + The continuation token. + + + + Gets or sets the pagination information for Results. + + The pagination. + + + + Gets the retry policy. + + The retry policy. + + + + Represents a helper class to support additional operations on ResultSegments + such as grouping of results into pages. + + + + + Checks if the result segment has more results in the current page if pagination is used. + If pagination is not used, it checks if a valid continuation is present. + + The pagination. + The continuation token. + + Returns true if there are more results in the page; otherwise, false. + + + + + Create a result segment from the result result. + + The type of the result. + The set result. + The result list. + The continuation token. + The pagination. + The retry policy. + The continuation function. + + + + Checks if the result segment passed in has a valid continuation token. + + The continuation. + + Returns true if the specified continuation has continuation; otherwise, false. + + + + + Provides definitions for some standard retry policies. + + + + + Default minimum backoff value for RetryExponential(int, TimeSpan) + To use a specific maximum backoff value use RetryExponential(int, TimeSpan, TimeSpan, TimeSpan). + + + + + Default maximum backoff value for RetryExponential(int, TimeSpan) + To use a specific maximum backoff value use RetryExponential(int, TimeSpan, TimeSpan, TimeSpan). + + + + + Configurable defaults used by the service clients in creating the default retry policy as + RetryExponential(DefaultClientRetryCount, DefaultClientBackoff). + + + + + Configurable defaults used by the service clients in creating the default retry policy as + RetryExponential(DefaultClientRetryCount, DefaultClientBackoff). + + + + + Policy that does no retries i.e., it just invokes exactly once. + + The above retry policy. + + + + Policy that retries a specified number of times with a specified fixed time interval between retries. + + The number of times to retry. Should be a non-negative number. + The time interval between retries. Use TimeSpan.Zero to specify immediate + retries. + The above retry policy. + When is 0 and is + TimeSpan.Zero this policy is equivalent to the NoRetry policy. + + + + Policy that retries a specified number of times with a randomized exponential backoff scheme. + + The number of times to retry. Should be a non-negative number. + The multiplier in the exponential backoff scheme. + The above retry policy. + For this retry policy, the minimum amount of milliseconds between retries is given by the + DefaultMinBackoff constant, and the maximum backoff is predefined by the DefaultMaxBackoff constant. + Otherwise, the backoff is calculated as + DefaultMinBackoff + (2^currentRetry - 1) * random (deltaBackoff *0.8, deltabackoff * 1.2). + + + + Policy that retries a specified number of times with a randomized exponential backoff scheme. + + The number of times to retry. Should be a non-negative number. + The minimum backoff interval. + The maximum backoff interval. + The multiplier in the exponential backoff scheme. + The above retry policy. + For this retry policy, the minimum amount of milliseconds between retries is given by the + minBackoff parameter, and the maximum backoff is predefined by the maxBackoff parameter. + Otherwise, the backoff is calculated as + minBackoff + (2^currentRetry - 1) * random (deltaBackoff *0.8, deltabackoff * 1.2). + + + + + Decides whether to retry a request, based on how many times the + request has been made and the reason for the last failure. + + + A delegate that can be used for determining whether or not to retry. + + + + + The set of permissions for a container-level access policy. + + + + + No shared access granted. + + + + + Read access granted. + + + + + Write access granted. + + + + + Delete access granted. + + + + + List access granted. + + + + + The set of container-level access policies for this container. + + + + + Represents a container-level access policy which may govern one or more Shared Access Signatures. + + + + + Initializes a new instance of the class. + + + + + Converts the permissions specified as part of the access policy to a string. + + The permissions. + The converted string. + + + + Constructs a object from a permissions string. + + The permissions string. + A set of permissions. + + + + Gets or sets the start time for a Shared Access Signature associated with this policy. + + The shared access start time. + + This value must be set either on the container-level access policy or on the Shared Access + Signature URL, but may not be set in both places. + + + + + Gets or sets the expiry time for a Shared Access Signature associated with this policy. + + The shared access expiry time. + + This value must be set either on the container-level access policy or on the Shared Access + Signature URL, but may not be set in both places. + + + + + Gets or sets the permissions for a Shared Access Signature associated with this policy. + + The permissions. + + This value must be set either on the container-level access policy or on the Shared Access + Signature URL, but may not be set in both places. + + + + + Decides whether to retry a request, based on how many times the + request has been made and the reason for the last failure. + + The number of times the request has been made. + The exception raised by the most recent web request or parsing attempt. + An optional delay which specifies how long to wait before reissuing requests. + RetUring less than or equal to TimeSpan.Zero means use no delay. + + true if the request should be retried. + + + + This class provides MemoryStream-like behavior but uses a list of blocks rather than a single piece of bufferBlocks. + + + + + The default block size. + + + + + The size of the block. + + + + + The underlying bufferBlocks for the stream. + + + + + The currently used length. + + + + + The total capacity of the stream. + + + + + The current position. + + + + + Initializes a new instance of the SmallBlockMemoryStream class with default 64KB block size and no reserved space. + + + + + Initializes a new instance of the SmallBlockMemoryStream class with provided block size and no reserved space. + + The size of blocks to use. + + + + Initializes a new instance of the SmallBlockMemoryStream class. + + The size of blocks to use. + The amount of memory to reserve. + Thrown if is zero or negative. + + + + Copies the specified amount of data from internal buffers to the buffer and advances the position. + + An array of bytes. When this method returns, the buffer contains the specified byte array with the values + between offset and (offset + count - 1) replaced by the bytes read from the current source. + The zero-based byte offset in buffer at which to begin storing the data read from the current stream. + The maximum number of bytes to be read from the current stream. + The total number of bytes read into the buffer. This can be less than the number of bytes requested + if that many bytes are not currently available, or zero (0) if the end of the stream has been reached. + + The offset subtracted from the buffer length is less than count. + The buffer is null. + The offset or count is negative. + + + + Sets the position within the current stream. + + A byte offset relative to the origin parameter. + A value of type System.IO.SeekOrigin indicating the reference point used to obtain the new position. + The new position within the current stream. + Thrown if is invalid for SeekOrigin. + + + + Sets the length of the current stream. (preallocating the bufferBlocks). + + The desired length of the current stream in bytes. + If the is negative. + + + + Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. + + An array of bytes. This method copies count bytes from buffer to the current stream. + The zero-based byte offset in buffer at which to begin copying bytes to the current stream. + The number of bytes to be written to the current stream. + Offset subtracted from the buffer length is less than count. + Thrown if is null + Thrown if or is negative + + + + Does not perform any operation as it's an in-memory stream. + + + + + Ensures that the amount of bufferBlocks is greater than or equal to the required size. + Does not trim the size. + + The required size. + If the is negative. + + + + Adds another block to the underlying bufferBlocks. + + + + + Copies the specified amount of data from internal buffers to the buffer and advances the position. + + An array of bytes. When this method returns, the buffer contains the specified byte array with the values + between offset and (offset + count - 1) replaced by the bytes read from the current source. + The zero-based byte offset in buffer at which to begin storing the data read from the current stream. + The maximum number of bytes to be read from the current stream. + The total number of bytes read into the buffer. This can be less than the number of bytes requested + if that many bytes are not currently available, or zero (0) if the end of the stream has been reached. + + + + + Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. + (Requires the stream to be of sufficient size for writing). + + An array of bytes. This method copies count bytes from buffer to the current stream. + The zero-based byte offset in buffer at which to begin copying bytes to the current stream. + The number of bytes to be written to the current stream. + + + + Advances the current position of the stream and adjust the offset and remainder based on the amount completed. + + The current offset in the external buffer. + The amount of data left to process. + The amount of data processed. + + + + Calculate the block for the current position. + + The position within a block. + The block reference itself. + + + + Gets a value indicating whether the current stream supports reading. + + Is true if the stream supports reading; otherwise, false. + + + + Gets a value indicating whether the current stream supports seeking. + + Is true if the stream supports seeking; otherwise, false. + + + + Gets a value indicating whether the current stream supports writing. + + Is true if the stream supports writing; otherwise, false. + + + + Gets the currently written length. + + + + + Represents the current position in the stream. + + Thrown if position is outside the stream size + + + + Represents a storage client exception. + + + Client-side exceptions are due to incorrect parameters on the request. + These requests should not be retried with the same parameters. + + + + + The base class for storage service exceptions. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The error code. + The message. + The status code. + The extended error info. + The inner exception. + + + + Initializes a new instance of the class with + serialized data. + + The object that contains serialized object + data about the exception being thrown. + The object that contains contextual information + about the source or destionation. + + + + Sets the object with additional exception information. + + The object that holds the + serialized object data. + The object that contains contextual information + about the source or destionation. + + + + Gets the Http status code returned by the storage service. + + The status code. + + + + Gets the specific error code returned by the storage service. + + The error code. + + + + Gets the extended error information returned by the storage service. + + The extended error information. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The error code. + The message. + The status code. + The extended error info. + The inner exception. + + + + Initializes a new instance of the class with + serialized data. + + The object that contains serialized object + data about the exception being thrown. + The object that contains contextual information + about the source or destionation. + + + + Error codes that can be returned by the storage service or the client library. + These are divided into server errors and client errors depending on which side + the error can be attributed to. + + + + + No error specified. + + + + + Server internal error. Server-side error. + + + + + Service timeout error. Server-side error. + + + + + Service integrity check failed error. Server-side error. + + + + + Transport error. Server-side error. + + + + + Service bad response error. Server-side error. + + + + + The specified resource was not found. Client-side error. + + + + + The specified account was not found. Client-side error. + + + + + The specified container was not found. Client-side error. + + + + + The specified blob was not found. Client-side error. + + + + + An authentication error occurred. Client-side error. + + + + + Access was denied. Client-side error. + + + + + The specified resource already exists. Client-side error. + + + + + The specified container already exists. Client-side error. + + + + + The specified blob already exists. Client-side error. + + + + + The request was incorrect or badly formed. Client-side error. + + + + + The specified condition failed. Client-side error. + + + + + There was an error with the gateway used for the request. Client-side error. + + + + + Error code strings that are common to all storage services. + + + + + The specified HTTP verb is not supported. + + + + + The Content-Length header is required for this request. + + + + + A required header was missing. + + + + + A required XML node was missing. + + + + + One or more header values are not supported. + + + + + One or more XML nodes are not supported. + + + + + One or more header values were invalid. + + + + + One or more XML node values were invalid. + + + + + A required query parameter was missing. + + + + + One or more query parameters is not supported. + + + + + One or more query parameters are invalid. + + + + + One or more query parameters are out of range. + + + + + Invalid Uri. + + + + + Invalid HTTP verb. + + + + + The metadata key was empty. + + + + + The request body was too large. + + + + + The specified XML document was invalid. + + + + + There was an internal error. + + + + + Authentication failed. + + + + + The specified MD5 hash does not match. + + + + + The specified MD5 hash was invalid. + + + + + The input is out of range. + + + + + The input is invalid. + + + + + The operation timed out. + + + + + The specified resource was not found. + + + + + The specified metadata was invalid. + + + + + The specified metadata was too large. + + + + + The specified condition was not met. + + + + + The specified range was invalid. + + + + + The specified container was not found. + + + + + The specified container already exists. + + + + + The specified container is disabled. + + + + + The specified container is being deleted. + + + + + The server is busy. + + + + + Represents extended error information returned by the storage service. + + + + + Gets the error code. + + The error code. + + + + Gets the error message. + + The error message. + + + + Gets additional error details. + + The additional error details. + + + + Represents an exception due to a problem with a storage service server. + + + Server exceptions are those due to server-side problems. + These may be transient and requests resulting in such exceptions + can be retried with the same parameters. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The error code. + The message. + The status code. + The inner exception. + + + + Initializes a new instance of the class. + + The error code. + The message. + The status code. + The extended error info. + The inner exception. + + + + Initializes a new instance of the class with + serialized data. + + The object that contains serialized object + data about the exception being thrown. + The object that contains contextual information + about the source or destionation. + + + + A class containing common functionality across the two blob streams. + + + + + Verifies the parameters to a read/write operation. + + An array of bytes. + The zero-based byte offset in . + The maximum number of bytes to be access in . /// The sum of offset and count is greater than the buffer length. + is null. + offset or count is negative. + + + + Calculates an ongoing hash. + + The data to calculate the hash on. + The offset in the input buffer to calculate from. + The number of bytes to use from input. + The hash algorithm to use. + + + + Retrieves the string representation of the hash. (Completes the creation of the hash). + + The hashing object. + A string that is the content of the hash. + + + + Error code strings that are specific to the Table service. + + + + + The request uses X-HTTP-Method with an HTTP verb other than POST. + + + + + The specified X-HTTP-Method is invalid. + + + + + More than one X-HTTP-Method is specified. + + + + + The specified table has no properties. + + + + + One or more duplicate properties were specified. + + + + + The specified table has no such property. + + + + + A duplicate key property was specified. + + + + + The specified table already exists. + + + + + The specified table was not found. + + + + + The specified entity was not found. + + + + + The specified entity already exists. + + + + + The partition key was not specified. + + + + + One or more specified operators are invalid. + + + + + The specified update condition was not satsified. + + + + + All properties require values. + + + + + The partition key property cannot be updated. + + + + + The specified entity has too many properties. + + + + + The specified entity is too large. + + + + + One or more property values are too large. + + + + + One or more value types are invalid. + + + + + The specified table is being deleted. + + + + + The table server is out of memory. + + + + + The type of the primary key property is invalid. + + + + + One or more property names are too long. + + + + + One or more property names are invalid. + + + + + Batch operations are not supported for this operation type. + + + + + The JSON format is not supported. + + + + + The specified method is not allowed. + + + + + The specified operation is not implemented. + + + + + A version of to work on Windows Azure Table service. + + + + + Initializes a new instance of the class. + + The base address. + The credentials. + + + + Begins the asynchronous operation to save changes while applying the retry policy. + + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + An that references the asynchronous request. + + + + Begins the asynchronous operation to save changes while applying the retry policy. + + The options for saving changes. + A callback method that is called when the asynchronous operation completes. + A user-defined object that contains information about the asynchronous operation. + + An that references the asynchronous request. + + + + + Ends the asynchronous operation to save changes while applying the retry policy. + + An object of type that references the asynchronous operation. + A that represents the result of the operation. + + + + Saves changes while applying the retry policy. + + A that represents the result of the operation. + + + + Saves changes while applying the retry policy. + + The options for saving changes. + A that represents the result of the operation. + + + + Saves the changes with retries implementation. + + The options for saving changes. + The action to set result. + A sequence of tasks to perform the operation. + + + + Callback on DataContext object sending request. + + The sender. + The instance containing the event data. + + + + Gets or sets the retry policy for all of the requests by the service client. + + The retry policy. + + + + Gets the storage account credentials used by the client. + + The storage credentials. + + + + Represents an entity in a table. + + + + + Initializes a new instance of the class. + + The partition key. + The row key. + + + + Initializes a new instance of the class. + + + + + Gets or sets the timestamp. + + The timestamp. + + + + Gets or sets the partition key of a table entity. + + The partition key. + + The concatenation of the partition key + and row key must be unique within the table. + + + + + Gets or sets the row key of a table entity. + + The row key. + + + + A class for adding useful methods for the Table service. + + + + + Converts the query into a object that supports + additional operations like retries. + + The type of the element. + The query. + + The converted query. + + + + + Internal table service entity for creating tables. + + + + + Stores the table name. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with the specified name. + + The name of the table. + + + + Determines whether the specified is equal to this instance. + + The to compare with this instance. + + Returns true if the specified is equal to this instance; otherwise, false. + + + The parameter is null. + + + + + Returns a hash code for this instance. + + + A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + + + + + Gets or sets the table name. + + The name of the table. + + + + Helper functions for table service. + + + + + Regular expression for valid table names. + + + + + Determines whether the type is an entity type. + + The type to check. + Type of the context. + + Returns true if the type is an entity type; otherwise, false. + + + + + Determines whether the specified property is a key column. + + The property. + + Returns true if the specified property is a key column; otherwise, false. + + + + + Enumerates the entity set properties. + + Type of the context. + A list of the entity set properties. + + + + Enumerates the entity set names. + + Type of the context. + A list of entity set names. + + + + Checks the name of the table. + + Name of the table. + Name of the arg. + + + + Determines whether the specified name is a valid table name. + + The table name. + + Returns true if the specified name is a valid table name; otherwise, false. + + + + + Implementation helper for task sequences. + + + + + Executes the impl. + + The result type. + The task implementation. + The result of the task. + + + + Begins the impl. + + The result type. + The task implementation. + The callback. + The state. + An asynchronous result representing the operation. + + + + Ends the impl. + + The result type. + The async result. + The task result. + + + + Executes the impl. + + The task implemenetaion. + + + + Begins the impl. + + The task implementation. + The callback. + The state. + An asynchronous result representing the operation. + + + + Ends the impl. + + The async result. + + + + Executes the impl with retry. + + The result type. + The task implementation. + The policy. + The task result. + + + + Begins the impl with retry. + + The result type. + The task implementation. + The policy. + The callback. + The state. + An asynchronous result representing the operation. + + + + Ends the impl with retry. + + The result type. + The async result. + The task result. + + + + Executes the impl with retry. + + The task implementation. + The policy. + + + + Begins the impl with retry. + + The task implementation. + The policy. + The callback. + The state. + An asynchronous result representing the operation. + + + + Ends the impl with retry. + + The async result. + + + + Gets the retryable async task. + + The result type. + The task implementation. + The policy. + The retryable task. + + + + Gets the retryable async task. + + The task implementation. + The policy. + The retryable task. + + + + Gets the task from async result. + + The type of the result. + The async result. + The asynchronous result. + + + + A task that implements the conventional BeginXX(), EndXX() pattern. + + + + + A task that implements the conventional BeginXX(), EndXX() pattern. + + The return type of the task. + + + + Represents an asynchronous computation that yields a result of type T. + + The type of the result of the operation. + + By this contract we: + 1) guarantee that the completion routine is performed, regardless of the outcome of ExecuteStep. + 2) insist that the completion routine does not throw an exception. + 3) insists that the abort routine does not throw an exception. + + + + + An asynchronous computation. + + + + + Perform the next async step. + + The action to be performed on completion. + + + + Abort the task operation. + + + + + Gets a value indicating whether the task has completed synchronously. + + + Is true if completed synchronously; otherwise, false. + + + + + Gets exception raised by this task (if any). + + The exception. + + + + Provides information if the task completed synchronously and therefore on the main thread. + + + + + Contains any exceptions raised by the task. + + + + + The action to call once the operation is completed. + + + + + The result of the operation. + + + + + Executes the tasks and waits for the result. + + The result of the operation. + + + + Executes a single step of the task. (Delegates to the concrete implemetation for specific step). + + The completion function to be called. + + + + Implements an abort routine that fulfills the contract. + + + + + The specific implementation of the task's step. + + + + + Implements a safe way to obtain the result. + + The function used to get the result value. + + + + The task-specific abort that should be called. + + + + + The completion return that needs to be called whenever operation completes. + + Whether the underlying operation completed synchrnously. + + + + Gets or sets the result of the operation and throws any exceptions raised by the operation. + + + + + Gets or sets a value indicating whether the operation was completed synchronously and therefore on main thread. + + + + + Gets or sets any exceptions raised during execution. + + + + + Gets or sets a value indicating whether the task is completed. + + + + + Initializes a new instance of the APMTask class for use with normal APM. + + The APM function to begin operation. + The APM functon to end the operation. + + + + Initializes a new instance of the APMTask class for use with normal APM. + + The APM function to begin operation. + The APM functon to end the operation. + The function used for aborting an operation. + + + + Implementation of the library execution. Performs the APM operation. + + + + + Implements the abort functionality. + + + + + Callback for the APM function. + + The async result for the APM model. + + + + Gets or sets the begin function. + + The begin func. + + + + Gets or sets the end function. + + The end func. + + + + Gets or sets the abort function. + + The abort func. + + + + Initializes a new instance of the APMTask class for sequence without any return value. + + The APM function to begin operation. + The APM functon to end the operation. + + + + A class to extend a normal task. + + + + + Converts a Task to an a TaskAsyncResult to allow for exposing Tasks as IAsyncResult. + + The return type of the task. + The task to be converted. + The callback to be called at the end of the task. + The callback's state. + A TaskAsyncResult that implements IAsyncResult. + + + + Converts a Task to an a TaskAsyncResult to allow for exposing Tasks as IAsyncResut. + + The task to be converted. + The callback to be called at the end of the task. + The callback's state. + A TaskAsyncResult that implements IAsyncResult. + + + + A task class that implements a fixed delay. + + + + + Indicates whether this object has been disposed. + + + + + Stores the length of the delay. + + + + + Stores the native timer used to trigger after the specified delay. + + + + + Initializes a new instance of the class. + + Should be between TimeSpan.Zero and TimeSpan.MaxValue. + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + + + + Releases unmanaged and - optionally - managed resources. + + Set to true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + The specific implementation of the task's step. + + + + + The task-specific abort that should be called. + + + + + Begins the delay. + + + + + Ends the delay. + + + + + Invokes a sequence with no return value. + + + + + Invokes a sequence of tasks. + + The type of the result of the operation. + + + + Contains the function that generates a squence of tasks to be invoked. + + + + + The current task that is being invoked. + + + + + Controls whether the abort was called. + + + + + Initializes a new instance of the InvokeTaskSequenceTask class with a task sequence that returns a value. + + The sequence of actions to be invoked. + + + + Implements the abort logic by aborting the current task. + + + + + The starting point for executing a task sequence. + + + + + Executes a task sequence by iterating over all of the items and executing them. + + The sequence of tasks to execute. + Whether the sequence so far has completed synchronously. + + + + Initializes a new instance of the InvokeTaskSequenceTask class for sequence without any return value. + + The sequence of actions to be invoked. + + + + A NullTaskReturn type. + + + + + Represents a no-return from a task. + + + + + Prevents a default instance of the class from being created. + + + + + Facilitates a scenario where numerous simultaneous tasks are active, and only the first to complete should continue. + + The type of the result of the operation. + + + + Stores the abort flag. + + + + + Stores the racing tasks. + + + + + Initializes a new instance of the class. + + The tasks. + + + + The specific implementation of the task's step. + + + + + The task-specific abort that should be called. + + + + + Called when complete. + + The winning task. + + + + Provides extensions for the stream object to support asynchronous operations. + + + + + Asynchronously reads data from a stream using BeginRead. + + The stream on which the method is called. + The buffer to read the data into. + Byte offset in the buffer. + Maximum number of bytes to read. + Returns non-zero if there are still some data to read. + + + + Reads asynchronously the entire content of the stream and returns it + as a string using StreamReader. + + The stream on which the method is called. + The text encoding used for converting bytes read into string. + The action to be performed with the resulting string. + Returns a task sequence that must be performed to get result string using the 'Result' callback. + + + + Asynchronously writes data from a stream using BeginWrite. + + The stream on which the method is called. + The buffer to write the data from. + Byte offset in the buffer. + Maximum number of bytes to write. + A task with no return value. + + + + Reads asynchronously the entire content of the stream and writes it to the given output stream. + + The origin stream. + The destination stream. + The sequence that when invoked results in an asynchronous copy. + + + + Reads asynchronously the entire content of the stream and writes it to the given output stream. + Closes the output stream at the end. + + The origin stream. + The destination stream. + The sequence that when invoked results in an asynchronous copy. + + + + A task that obtains a result synchronously. + + + + + A task that obtains a result synchronously. + + The type of the result of the operation. + + + + The function to be executed. + + + + + Initializes a new instance of the SynchronousTask class. + + The function to execute. + + + + Performs the task and marks it as completed. + + + + + Implements abort as NoOp. + + + + + Initializes a new instance of the SynchronousTask class. + + The function to execute. + + + + A set of extension methods for table service classes. + + + + + Converts a DataServiceQuery execution into an APMTask. + + The result type of the query. + The query to convert. + The wrapped task. + + + + Converts the SaveChanges method into an APMTask. + + The target context. + The wrapped task. + + + + Converts the SaveChanges method to an APMTask. + + The target context. + The options to pass to SaveChanges. + A task that saves changes asynchronously. + + + + Gets the unexpected internal client error wrapped task. + + The result type. + The timeout. + The original task. + The wrapped task. + + + + Gets the unexpected internal client error task sequence. + + The result type. + The timeout. + The set result. + A for the unexpected error. + + + + An implementation of IAsyncResult that encapsulates a task. + + The type of the resulting value. + Refer to http://csdweb/sites/oslo/engsys/DesignGuidelines/Wiki%20Pages/IAsyncResult.aspx and + http://www.bluebytesoftware.com/blog/2006/05/31/ImplementingAHighperfIAsyncResultLockfreeLazyAllocation.aspx for IAsyncResult details + + + + The underlying task for the async operation. + + + + + The callback provided by the user. + + + + + The state for the callback. + + + + + Indicates whether a task is completed. + + + + + Indicates whether task completed synchronously. + + + + + The event for blocking on this task's completion. + + + + + Initializes a new instance of the TaskAsyncResult class. + + The task to be executed. + The callback method to be used on completion. + The state for the callback. + + + + Provides a convenient function for waiting for completion and getting the result. + + The result of the operation. + + + + We implement the dispose only to allow the explicit closing of the event. + + + + + Releases unmanaged and - optionally - managed resources. + + Set to true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + + Provides the lazy initialization of the WaitHandle (based on Joe Duffy's blog). + + The WaitHandle to use for waiting on completion. + + + + Called on completion of the async operation to notify the user + (Based on Joe Duffy's lockless design). + + + + + Gets A user-defined object that contains information about the asynchronous operation. + + + + + Gets a System.Threading.WaitHandle that is used to wait for an asynchronous operation to complete. + + + + + Gets a value indicating whether the asynchronous operation completed synchronously. + + + + + Gets a value indicating whether the asynchronous operation has completed. + + + + + Encapsulates methods for wrapping tasks in timeouts. + + + + + Gets a timeout wrapped task. + + The type of the result. + The timeout. + The original task. + A that has been wrapped with a timeout if specified. + + + + Creates a localized timeout exception object. + + The timeout. + A localized object. + + + + Gets a timeout task sequence. + + The type of the result. + The timeout. + The set result. + A that has been wrapped with a timeout if specified. + + + + A set of extension methods for a webrequest. + + + + + Gets an asynchronous response to a given Web request. + + The requested that is used for operation. + The service. + The timeout. + A task that yields the response. + + + + Gets an asynchronous response to a given Web request. + + The requested that is used for operation. + The service. + The timeout. + A task that yields the response. + + + + Gets an asynchronous request stream for a given Web request. + + The requested that is used for operation. + A task that yields a stream. + + + + Gets an asynchronous response to a given Web request. + + The requested that is used for operation. + The service. + A task that yields the response. + + + + Gets an asynchronous response to a given Web request. + + The requested that is used for operation. + The service. + A task that yields the response. + + + + Tracing helper class. + + + + + Internal format string for trace messages. + + + + + Internal flag for turning on tracing. + + + + + Writes the line. + + The format. + The arguments. + + + + Writes the line internal. + + The format. + The arguments. + + + + General purpose utility methods. + + + + + This is the limit where we allow for the error message returned by the server. + Messages longer than that will be truncated. + + + + + Processes the unexpected status code. + + The response. + + + + Translates the data service client exception. + + The exception. + The translated exception. + + + + Translates the web exception. + + The exception. + The translated exception. + + + + Gets the extended error details from response. + + The HTTP response stream. + Length of the content. + The extended error information. + + + + Gets the extended error from XML message. + + The XML error message. + The extended error information. + + + + Copies the stream to buffer. + + The source stream. + The buffer. + The bytes to read. + The number of bytes copied. + + + + Translates from HTTP status. + + The status code. + The status description. + The details. + The inner. + The translated exception. + + + + Translates the extended error. + + The details. + The status code. + The status description. + The inner exception. + The translated exception. + + + + Gets the error details from stream. + + The input stream. + The error details. + + + + Represents storage account credentials for accessing the Blob, Queue, and Table services + using the Shared Key authentication scheme. + + + + + Initializes a new instance of the class. + + Name of the account. + The account key, as an array of bytes. + + + + Initializes a new instance of the class. + + Name of the account. + The account key, as a Base64-encoded string. + + + + Transforms a resource Uri for signing purposes. + The transformation may append to the string. + + The resource Uri to be transformed. + + The new resource Uri that includes any transformations required for signing. + + + + + Signs a request using the specified credentials under the Shared Key authentication scheme. + + The request to be signed. + + + + Signs a request using the specified credentials under the Shared Key Lite authentication scheme. + + The request to be signed. + + + + Encodes the signature string by using the HMAC-SHA256 algorithm over + the UTF-8-encoded string-to-sign. + + The UTF-8-encoded string-to-sign. + The HMAC-encoded signature string. + + + + Gets the base64 encoded key. + + The base64 encoded key. + + + + Performs the computation of the signature based on the private key. + + The string that should be signed. + The signature for the string. + + + + Returns a that represents this instance. + + If set to true exports secrets. + + A that represents this instance. + + + + + Gets a object that stores the protocol-level credentials. + + The credentials. + + + + Gets the name of the storage account associated with the specified credentials. + + The name of the account. + + + + Gets a value indicating whether the method must be called + before generating a signature string with the specified credentials. + + + Is true if [needs transform Uri]; otherwise, false. If false, + calling returns the original, unmodified Uri. + + + + + Gets a value indicating whether a request can be signed under the Shared Key authentication + scheme using the specified credentials. + + + Is true if a request can be signed with these credentials; otherwise, false. + + + + + Gets a value indicating whether a request can be signed under the Shared Key Lite authentication + scheme using the specified credentials. + + + Is true if a request can be signed with these credentials; otherwise, false. + + + + + Gets a value indicating whether the method will return a valid + HMAC-encoded signature string when called with the specified credentials. + + + Returns true if these credentials will yield a valid signature string; otherwise, false. + + + + + Class that represents credentials for anonymous access. Used by internal implementaion. + + + + + Stores the singleton instance of this class. + + + + + Prevents a default instance of the class from being created. + + + + + A potential transformation to the Uri for signing purposes. The transformation may append to the string. + + The resource Uri to be transformed. + The new resource Uri that includes any transformations required for signing. + Identity operation for anonymous access. + + + + An operation that may add any required authentication headers based for the credential type. (SharedKey algorithm). + + The request that needs to be signed. + No op for anonymous access. + + + + An operation that may add any required authentication headers based for the credential type. (SharedKeyLite algorithm used for LINQ for Tables). + + The request that needs to be signed. + No op for anonymous access. + + + + Performs the computation of the signature based on the private key. + + The string that should be signed. + The signature for the string. + Returns null representing no op. + + + + Performs the computation of the signature based on the private key. + + The string to be signed. + The signature for the string. + Need for D-SAS not public. + + + + Returns a that represents this instance. + + If set to true exports secrets. + + A that represents this instance. + + + + + Gets account name information if available. Else returns null. + + + + + Gets a value indicating whether the method must be called + before generating a signature string with the specified credentials. + + + Is true if needs transform Uri; otherwise, false. If false, + calling returns the original, unmodified Uri. + + + + + Gets a value indicating whether SignRequest will perform signing when using this credentials. + False means SignRequest will not do anything. + + + Is true if a request can be signed with these credentials; otherwise, false. + + + + + Returns whether SignRequestLite will perform signing when using this credentials. + False means SignRequestLite will not do anything. + + + + + Returns whether ComputeHMAC will return a valid HMAC when using this credentials. + False means ComputeHmac will return null. + + + Returns true if these credentials will yield a valid signature string; otherwise, false. + + + + + Represents storage credentials for constructing a Shared Access Signature + for delegated access to Blob service resources. + + + + + Stores the shared access signature token. + + + + + Stores the internal used to transform Uris. + + + + + Initializes a new instance of the class with the given token. + + A string token representing the shared access signature. + + + + Transforms a resource Uri for signing purposes. + The transformation may append to the string. + + The resource Uri to be transformed. + + The new resource Uri that includes any transformations required for signing. + + + + + An operation that may add any required authentication headers based for the credential type. (SharedKey algorithm). + + The request to be signed. + + + + An operation that may add any required authentication headers based for the credential type. (SharedKeyLite algorithm used for LINQ for Tables). + + The request to be signed. + + + + Encodes the signature string by using the HMAC-SHA-256 algorithm over + the UTF-8-encoded string-to-sign. + + The UTF-8-encoded string-to-sign. + The HMAC-encoded signature string. + + + + Encodes the signature string by using the HMAC-SHA-512 algorithm over + the UTF-8-encoded string-to-sign. + + The UTF-8-encoded string-to-sign. + The HMAC-encoded signature string. + + + + Returns a that represents this instance. + + If set to true exports secrets. + + A that represents this instance. + + + + + Gets the name of the storage account associated with the specified credentials. + + The name of the account. + + + + Indicates whether the method must be called + before generating a signature string with the specified credentials. + + + Is true if needs transform Uri; otherwise, false. If false, + calling returns the original, unmodified Uri. + + + + + Indicates whether a request can be signed under the Shared Key authentication + scheme using the specified credentials. + + + Is true if a request can be signed with these credentials; otherwise, false. + + + + + Indicates whether a request can be signed under the Shared Key Lite authentication + scheme using the specified credentials. + + + Is true if a request can be signed with these credentials; otherwise, false. + + + + + Indicates whether the method will return a valid + HMAC-encoded signature string when called with the specified credentials. + + + Is true if these credentials will yield a valid signature string; otherwise, false. + + + + + Gets the token. + + The token. + + + diff --git a/lib/Castle.Core.xml b/lib/Castle.Core.xml index 69b0e0d2f57..ac647e6d2a6 100644 --- a/lib/Castle.Core.xml +++ b/lib/Castle.Core.xml @@ -1,3197 +1,3197 @@ - - - - Castle.Core - - - - - This attribute is usefull only when you want to register all components - on an assembly as a batch process. - By doing so, the batch register will look - for this attribute to distinguish components from other classes. - - - - - Base for Attributes that want to express lifestyle - chosen by the component. - - - - - Initializes a new instance of the class. - - The type. - - - - Gets or sets the lifestyle. - - The lifestyle. - - - - Initializes a new instance of the class. - - The key. - - - - Initializes a new instance of the class. - - The key. - The service. - - - - Initializes a new instance of the class. - - The key. - The service. - The lifestyle. - - - - Gets the service. - - The service. - - - - Gets the key. - - The key. - - - - Associates a custom component with a component - - - - - Initializes a new instance of the class. - - Type of the component activator. - - - - Gets the type of the component activator. - - The type of the component activator. - - - - Specifies the proxying behavior for a component. - - - - - Initializes a new instance of the class. - - - - - Gets or sets a value indicating whether the generated - interface proxy should inherit from . - - - - - Determines if the component requires a single interface proxy. - - true if the component requires a single interface proxy. - - - - Gets or sets the additional interfaces used during proxy generation. - - - - - Marks as property to be skipped and not be wired - by the IoC container - - - - - Used to declare that a component wants interceptors acting on it. - - - - - Constructs the InterceptorAttribute pointing to - a key to a interceptor - - - - - - Constructs the InterceptorAttribute pointing to - a service - - - - - - Indicates that the target components wants a - singleton lifestyle. - - - - - Initializes a new instance of the class. - - - - - Indicates that the target components wants a - transient lifestyle. - - - - - Initializes a new instance of the class. - - - - - Indicates that the target components wants a - per thread lifestyle. - - - - - Initializes a new instance of the class. - - - - - Indicates that the target components wants a - per web request lifestyle. - - - - - Indicates that the target components wants a - pooled lifestyle. - - - - - Initializes a new instance of the class - using the default initial pool size (5) and the max pool size (15). - - - - - Initializes a new instance of the class. - - Initial size of the pool. - Max pool size. - - - - Gets the initial size of the pool. - - The initial size of the pool. - - - - Gets the maximum pool size. - - The size of the max pool. - - - - Indicates that the target components wants a - custom lifestyle. - - - - - Initializes a new instance of the class. - - The lifestyle handler. - - - - Gets the type of the lifestyle handler. - - The type of the lifestyle handler. - - - - New interface that is going to be used by DynamicProxy 2 - - - - - New interface that is going to be used by DynamicProxy 2 - - - - - Returns the concrete instantiation of , with any generic parameters bound to real types. - - The concrete instantiation of , or if not a generic method. - Can be slower than calling . - - - - Returns the concrete instantiation of , with any generic parameters bound to real types. - - The concrete instantiation of , or if not a generic method. - Can be slower than calling . - - - - - - - - - - The generic arguments of the method, or null if not a generic method. - - - - - - - - - - For interface proxies, this will point to the - on the target class - - - - - Interceptors might implement this to receive the - ComponentModel on behalf of the component where the - interceptor is acting. - - - - - Get the proxy target (note that null is a valid target!) - - - - - - Gets the interceptors for the proxy - - - - - - Abstract representation of a vertex. - - - - - The nodes that dependes on this node - - - - - The nodes that this node depends - - - - - The node has not been visited yet - - - - - This node is in the process of being visited - - - - - This now was visited - - - - - Represents a collection of objects - which are guaranted to be unique - and holds a color for them - - - - - Holds a timestamp (integer) - for a given item - - - - - Returns the node at the specified index. - - The lookup index. - The node at the specified index. - - If the specified is greater than the - number of objects within the list. - - - - - Validates the specified index. - - The lookup index. - - If the index is invalid. - - - - - Lifecycle interface. If implemented by a component, - the method Initialized will be invoked by the container - before making the component available to the external world. - - - - - Implementors should perform any initialization logic. - - - - - Only called for components that - belongs to a pool when the component - comes back to the pool. - - - - - Implementors should perform any - initialization/clean up. - - - - - Interface for components that wish to be started by the container - - - - - Starts this instance. - - - - - Stops this instance. - - - - - Provides a factory that can produce either or - classes. - - - - - Manages the instantiation of s. - - - - - Creates a new logger, getting the logger name from the specified type. - - - - - Creates a new logger. - - - - - Creates a new logger, getting the logger name from the specified type. - - - - - Creates a new logger. - - - - - Creates a new extended logger, getting the logger name from the specified type. - - - - - Creates a new extended logger. - - - - - Creates a new extended logger, getting the logger name from the specified type. - - - - - Creates a new extended logger. - - - - - Creates a new extended logger, getting the logger name from the specified type. - - - - - Creates a new extended logger. - - - - - Creates a new extended logger, getting the logger name from the specified type. - - - - - Creates a new extended logger. - - - - - Creates a new logger, getting the logger name from the specified type. - - - - - Creates a new logger. - - - - - Creates a new logger, getting the logger name from the specified type. - - - - - Creates a new logger. - - - - - Gets the configuration file. - - i.e. log4net.config - - - - - Gets the configuration file. - - i.e. log4net.config - - - - - Summary description for ConsoleFactory. - - - - - NullLogFactory used when logging is turned off. - - - - - Creates an instance of ILogger with the specified name. - - Name. - - - - - Creates an instance of ILogger with the specified name and LoggerLevel. - - Name. - Level. - - - - - Creates outputing - to files. The name of the file is derived from the log name - plus the 'log' extension. - - - - - Used to create the TraceLogger implementation of ILogger interface. See . - - - - - The Logger sending everything to the standard output streams. - This is mainly for the cases when you have a utility that - does not have a logger to supply. - - - - - The Level Filtered Logger class. This is a base clase which - provides a LogLevel attribute and reroutes all functions into - one Log method. - - - - - Manages logging. - - - This is a facade for the different logging subsystems. - It offers a simplified interface that follows IOC patterns - and a simplified priority/level/severity abstraction. - - - - - Logs a debug message. - - The message to log - - - - Logs a debug message. - - The exception to log - The message to log - - - - Logs a debug message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The message to log - - - - Logs an info message. - - The exception to log - The message to log - - - - Logs an info message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The message to log - - - - Logs a warn message. - - The exception to log - The message to log - - - - Logs a warn message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The message to log - - - - Logs an error message. - - The exception to log - The message to log - - - - Logs an error message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The message to log - - - - Logs a fatal message. - - The exception to log - The message to log - - - - Logs a fatal message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal error message. - - The Message - - - - Logs a fatal error message. - - The Message - The Exception - - - - Logs a fatal error message. - - Message format - Array of objects to write using format - - - - Create a new child logger. - The name of the child logger is [current-loggers-name].[passed-in-name] - - The Subname of this logger. - The New ILogger instance. - If the name has an empty element name. - - - - Determines if messages of priority "debug" will be logged. - - True if "debug" messages will be logged. - - - - Determines if messages of priority "info" will be logged. - - True if "info" messages will be logged. - - - - Determines if messages of priority "warn" will be logged. - - True if "warn" messages will be logged. - - - - Determines if messages of priority "error" will be logged. - - True if "error" messages will be logged. - - - - Determines if messages of priority "fatal" will be logged. - - True if "fatal" messages will be logged. - - - - Determines if messages of priority "fatalError" will be logged. - - True if "fatalError" messages will be logged. - - - - Creates a new LevelFilteredLogger. - - - - - Keep the instance alive in a remoting scenario - - - - - - Logs a debug message. - - The message to log - - - - Logs a debug message. - - The exception to log - The message to log - - - - Logs a debug message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a debug message. - - Message format - Array of objects to write using format - - - - Logs an info message. - - The message to log - - - - Logs an info message. - - The exception to log - The message to log - - - - Logs an info message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an info message. - - Message format - Array of objects to write using format - - - - Logs a warn message. - - The message to log - - - - Logs a warn message. - - The exception to log - The message to log - - - - Logs a warn message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a warn message. - - Message format - Array of objects to write using format - - - - Logs an error message. - - The message to log - - - - Logs an error message. - - The exception to log - The message to log - - - - Logs an error message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs an error message. - - Message format - Array of objects to write using format - - - - Logs a fatal message. - - The message to log - - - - Logs a fatal message. - - The exception to log - The message to log - - - - Logs a fatal message. - - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The exception to log - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - The exception to log - The format provider to use - Format string for the message to log - Format arguments for the message to log - - - - Logs a fatal message. - - Message format - Array of objects to write using format - - - - Logs a fatal error message. - - The Message - - - - Logs a fatal error message. - - The Message - The Exception - - - - Logs a fatal error message. - - Message format - Array of objects to write using format - - - - Implementors output the log content by implementing this method only. - Note that exception can be null - - - - - - - - - The LoggerLevel that this logger - will be using. Defaults to LoggerLevel.Off - - - - - The name that this logger will be using. - Defaults to String.Empty - - - - - Determines if messages of priority "debug" will be logged. - - true if log level flags include the bit - - - - Determines if messages of priority "info" will be logged. - - true if log level flags include the bit - - - - Determines if messages of priority "warn" will be logged. - - true if log level flags include the bit - - - - Determines if messages of priority "error" will be logged. - - true if log level flags include the bit - - - - Determines if messages of priority "fatal" will be logged. - - true if log level flags include the bit - - - - Determines if messages of priority "fatal" will be logged. - - true if log level flags include the bit - - - - Creates a new ConsoleLogger with the Level - set to LoggerLevel.Debug and the Name - set to String.Empty. - - - - - Creates a new ConsoleLogger with the Name - set to String.Empty. - - The logs Level. - - - - Creates a new ConsoleLogger with the Level - set to LoggerLevel.Debug. - - The logs Name. - - - - Creates a new ConsoleLogger. - - The logs Name. - The logs Level. - - - - A Common method to log. - - The level of logging - The name of the logger - The Message - The Exception - - - - Returns a new ConsoleLogger with the name - added after this loggers name, with a dot in between. - - The added hierarchical name. - A new ConsoleLogger. - - - - The Logger using standart Diagnostics namespace. - - - - - Creates a logger based on . - - - - - - Creates a logger based on . - - - - - - - Creates a logger based on . - - - - - - - - The Null Logger class. This is useful for implementations where you need - to provide a logger to a utility class, but do not want any output from it. - It also helps when you have a utility that does not have a logger to supply. - - - - - Provides an interface that supports and - allows the storage and retrieval of Contexts. These are supported in - both log4net and NLog. - - - - - Exposes the Global Context of the extended logger. - - - - - Exposes the Thread Context of the extended logger. - - - - - Exposes the Thread Stack of the extended logger. - - - - - Creates a new NullLogger. - - - - - No-op. - - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - Ignored - Ignored - - - - No-op. - - Ignored - - - - No-op. - - Ignored - Ignored - - - - No-op. - - Ignored - Ignored - - - - Returns this NullLogger. - - Ignored - This ILogger instance. - - - - No-op. - - false - - - - No-op. - - false - - - - No-op. - - false - - - - No-op. - - false - - - - No-op. - - false - - - - No-op. - - false - - - - Returns empty context properties. - - - - - Returns empty context properties. - - - - - Returns empty context stacks. - - - - - Interface for Context Properties implementations - - - - This interface defines a basic property get set accessor. - - - Based on the ContextPropertiesBase of log4net, by Nicko Cadell. - - - - - - Gets or sets the value of a property - - - The value for the property with the specified key - - - - Gets or sets the value of a property - - - - - - The Stream Logger class. This class can stream log information - to any stream, it is suitable for storing a log file to disk, - or to a MemoryStream for testing your components. - - - This logger is not thread safe. - - - - - Creates a new StreamLogger with default encoding - and buffer size. Initial Level is set to Debug. - - - The name of the log. - - - The stream that will be used for logging, - seeking while the logger is alive - - - - - Creates a new StreamLogger with default buffer size. - Initial Level is set to Debug. - - - The name of the log. - - - The stream that will be used for logging, - seeking while the logger is alive - - - The encoding that will be used for this stream. - - - - - - Creates a new StreamLogger. - Initial Level is set to Debug. - - - The name of the log. - - - The stream that will be used for logging, - seeking while the logger is alive - - - The encoding that will be used for this stream. - - - - The buffer size that will be used for this stream. - - - - - - Creates a new StreamLogger with - Debug as default Level. - - The name of the log. - The StreamWriter the log will write to. - - - - The TraceLogger sends all logging to the System.Diagnostics.TraceSource - built into the .net framework. - - - Logging can be configured in the system.diagnostics configuration - section. - - If logger doesn't find a source name with a full match it will - use source names which match the namespace partially. For example you can - configure from all castle components by adding a source name with the - name "Castle". - - If no portion of the namespace matches the source named "Default" will - be used. - - - - - Build a new trace logger based on the named TraceSource - - The name used to locate the best TraceSource. In most cases comes from the using type's fullname. - - - - Build a new trace logger based on the named TraceSource - - The name used to locate the best TraceSource. In most cases comes from the using type's fullname. - The default logging level at which this source should write messages. In almost all cases this - default value will be overridden in the config file. - - - - Create a new child logger. - The name of the child logger is [current-loggers-name].[passed-in-name] - - The Subname of this logger. - The New ILogger instance. - - - - The WebLogger sends everything to the HttpContext.Trace - - - Trace must be enabled on the Asp.Net configuration file (web.config or machine.config) - - - - - Creates a new WebLogger with the priority set to DEBUG. - - - - - Creates a new WebLogger. - - The Log level typecode. - - - - Creates a new WebLogger. - - The Log name. - - - - Creates a new WebLogger. - - The Log name. - The Log level typecode. - - - - A Common method to log. - - The level of logging - The Log name. - The Message - The Exception - - - - Just returns this logger (WebLogger is not hierarchical). - - Ignored - This ILogger instance. - - - - Tries to get the current http context's trace context. - - The current http context's trace context or null if none is - available - - - - Supporting Logger levels. - - - - - Logging will be off - - - - - Fatal logging level - - - - - Error logging level - - - - - Warn logging level - - - - - Info logging level - - - - - Debug logging level - - - - - Pendent - - - - - Deserializes the specified node into an abstract representation of configuration. - - The node. - - - - - If a config value is an empty string we return null, this is to keep - backward compability with old code - - - - - This is an abstract implementation - that deals with methods that can be abstracted away - from underlying implementations. - - - AbstractConfiguration makes easier to implementers - to create a new version of - - - - - is a interface encapsulating a configuration node - used to retrieve configuration values. - - - - - Gets the value of the node and converts it - into specified . - - The - - The Default value returned if the convertion fails. - - The Value converted into the specified type. - - - - Gets the name of the node. - - - The Name of the node. - - - - - Gets the value of the node. - - - The Value of the node. - - - - - Gets an of - elements containing all node children. - - The Collection of child nodes. - - - - Gets an of the configuration attributes. - - - - - Gets the value of the node and converts it - into specified . - - The - - The Default value returned if the convertion fails. - - The Value converted into the specified type. - - - - Gets the name of the . - - - The Name of the . - - - - - Gets the value of . - - - The Value of the . - - - - - Gets all child nodes. - - The of child nodes. - - - - Gets node attributes. - - - All attributes of the node. - - - - - A collection of objects. - - - - - Creates a new instance of ConfigurationCollection. - - - - - Creates a new instance of ConfigurationCollection. - - - - - Summary description for MutableConfiguration. - - - - - Initializes a new instance of the class. - - The name. - - - - Gets the value of . - - - The Value of the . - - - - - Enumeration used to mark the component's lifestyle. - - - - - No lifestyle specified. - - - - - Singleton components are instantiated once, and shared - between all clients. - - - - - Thread components have a unique instance per thread. - - - - - Transient components are created on demand. - - - - - Optimization of transient components that keeps - instance in a pool instead of always creating them. - - - - - Any other logic to create/release components. - - - - - PerWebRequest components are created once per Http Request - - - - - - - - - - Represents the collection of information and - meta information collected about a component. - - - - Name (key) of the component - - - Service exposed - - - Implementation for the service - - - Extended properties - - - Lifestyle for the component - - - Custom lifestyle, if any - - - Custom activator, if any - - - Dependencies the kernel must resolve - - - All available constructors - - - All potential properties that can be setted by the kernel - - - Steps of lifecycle - - - External parameters - - - Configuration node associated - - - Interceptors associated - - - /// Custom dependencies/// - - - - Constructs a ComponentModel - - - - - Requires the selected property dependencies. - - The property selector. - - - - Requires the property dependencies of type . - - The dependency type. - - - - Sets or returns the component key - - - - - Gets or sets the service exposed. - - The service. - - - - Gets or sets the component implementation. - - The implementation. - - - - Gets or sets a value indicating whether the component requires generic arguments. - - - true if generic arguments are required; otherwise, false. - - - - - Gets or sets the extended properties. - - The extended properties. - - - - Gets the constructors candidates. - - The constructors. - - - - Gets the properties set. - - The properties. - - - - Gets or sets the configuration. - - The configuration. - - - - Gets the lifecycle steps. - - The lifecycle steps. - - - - Gets or sets the lifestyle type. - - The type of the lifestyle. - - - - Gets or sets the strategy for - inspecting public properties - on the components - - - - - Gets or sets the custom lifestyle. - - The custom lifestyle. - - - - Gets or sets the custom component activator. - - The custom component activator. - - - - Gets the interceptors. - - The interceptors. - - - - Gets the parameter collection. - - The parameters. - - - - Dependencies are kept within constructors and - properties. Others dependencies must be - registered here, so the kernel (as a matter - of fact the handler) can check them - - - - - Gets the custom dependencies. - - The custom dependencies. - - - - Represents a constructor of the component - that the container can use to initialize it properly. - - - - - Initializes a new instance of the class. - - The constructor info. - The dependencies. - - - - Gets the ConstructorInfo (from reflection). - - The constructor. - - - - Gets the dependencies this constructor candidate exposes. - - The dependencies. - - - - Collection of - - - - - Gets the fewer arguments candidate. - - The fewer arguments candidate. - - - - Represents a dependency (other component or a - fixed value available through external configuration). - - - - - Initializes a new instance of the class. - - The type. - The dependency key. - Type of the target. - if set to true [is optional]. - - - - Returns a that represents the current . - - - A that represents the current . - - - - - Serves as a hash function for a particular type, suitable - for use in hashing algorithms and data structures like a hash table. - - - A hash code for the current . - - - - - Determines whether the specified is equal to the current . - - The to compare with the current . - - if the specified is equal to the - current ; otherwise, . - - - - - Gets or sets the type of the dependency. - - The type of the dependency. - - - - Gets or sets the dependency key. - - The dependency key. - - - - Gets the type of the target. - - The type of the target. - - - - Gets or sets whether this dependency is optional. - - - true if this dependency is optional; otherwise, false. - - - - - Collection of . - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The dependencies. - - - - Represents an reference to a Interceptor component. - - - - - Initializes a new instance of the class. - - The component key. - - - - Initializes a new instance of the class. - - Type of the service. - - - - Gets an for the component key. - - The component key. - The - - - - Gets an for the service. - - The service. - The - - - - Gets an for the service. - - The service type. - The - - - - Gets the type of the service. - - The type of the service. - - - - Gets the interceptor component key. - - The component key. - - - - Gets the type of the reference. - - The type of the reference. - - - - Collection of - - - - - Adds the specified item. - - The interceptor. - - - - Adds the specified interceptor as the first. - - The interceptor. - - - - Adds the specified interceptor as the last. - - The interceptor. - - - - Inserts the specified interceptor at the specified index. - - The index. - The interceptor. - - - - When implemented by a class, copies the elements of - the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in at which copying begins. - - is . - - is less than zero. - - - is multidimensional. - -or- - - is equal to or greater than the length of . - -or- - The number of elements in the source is greater than the available space from to the end of the destination . - - The type of the source cannot be cast automatically to the type of the destination . - - - - Returns an enumerator that can iterate through a collection. - - - An - that can be used to iterate through the collection. - - - - - Adds the interceptor to the end of the interceptors list if it does not exist already. - - The interceptor reference. - - - - Gets a value indicating whether this instance has interceptors. - - - true if this instance has interceptors; otherwise, false. - - - - - Gets the number of - elements contained in the . - - - - - - Gets an object that - can be used to synchronize access to the . - - - - - - Gets a value - indicating whether access to the is synchronized - (thread-safe). - - - - - - Represents a collection of ordered lifecycle steps. - - - - - Initializes a new instance of the class. - - - - - Returns all steps for the commission phase - - - - - - Returns all steps for the decommission phase - - - - - - Adds a step to the commission or decomission phases. - - - - - - - Adds a step as the first step to execute for the commission or decomission phase. - - - - - - - Copies the elements of - the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in at which copying begins. - - is . - - is less than zero. - - - is multidimensional. - -or- - - is equal to or greater than the length of . - -or- - The number of elements in the source is greater than the available space from to the end of the destination . - - The type of the source cannot be cast automatically to the type of the destination . - - - - Returns an enumerator that can iterate through a collection. - - - An - that can be used to iterate through the collection. - - - - - Gets a value indicating whether this instance has commission steps. - - - true if this instance has commission steps; otherwise, false. - - - - - Gets a value indicating whether this instance has decommission steps. - - - true if this instance has decommission steps; otherwise, false. - - - - - Gets the number of - elements contained in the . - - - - - - Gets an object that - can be used to synchronize access to the . - - - - - - Gets a value - indicating whether access to the is synchronized - (thread-safe). - - - - - - Represents meta information associated with a method - (not yet defined) - - - - - Initializes a new instance of the class. - - The config node. - - - - Gets the config node. - - The config node. - - - - Collection of - - - - - Gets the method info2 model. - - The method info2 model. - - - - Represents a parameter. Usually the parameter - comes from the external world, ie, an external configuration. - - - - - Initializes a new instance of the class. - - The name. - The value. - - - - Initializes a new instance of the class. - - The name. - The value. - - - - Gets the name. - - The name. - - - - Gets the value. - - The value. - - - - Gets the config value. - - The config value. - - - - Collection of - - - - - Initializes a new instance of the class. - - - - - Adds the specified name. - - The name. - The value. - - - - Adds the specified name. - - The name. - The config node. - - - - Determines whether this collection contains the specified key. - - The key. - - true if yes; otherwise, false. - - - - - Adds the specified key. - - - Not implemented - - The key. - The value. - - - - Clears this instance. - - - Not implemented - - - - - Removes the specified key. - - The key. - - Not implemented - - - - - Copy the content to the specified array - - target array - target index - - Not implemented - - - - - Returns an enumerator that can iterate through a collection. - - - An - that can be used to iterate through the collection. - - - - - Gets the keys. - - The keys. - - Not implemented - - - - - Gets the values. - - The values. - - Not implemented - - - - - Gets a value indicating whether this instance is read only. - - - true if this instance is read only; otherwise, false. - - - - - Gets a value indicating whether this instance is fixed size. - - - true if this instance is fixed size; otherwise, false. - - - - - Gets the with the specified key. - - - - - - Gets the count. - - The count. - - - - Gets the sync root. - - The sync root. - - - - Gets a value indicating whether this instance is synchronized. - - - true if this instance is synchronized; otherwise, false. - - - - - Represents a property and the respective dependency. - - - - - Initializes a new instance of the class. - - The property info. - The dependency. - - - - Gets the property. - - The property. - - - - Gets the dependency. - - The dependency. - - - - Collection of - - - - - Finds a PropertySet the by PropertyInfo. - - The info. - - - - - Represents a 'streamable' resource. Can - be a file, a resource in an assembly. - - - - - Returns a reader for the stream - - - It's up to the caller to dispose the reader. - - - - - - Returns a reader for the stream - - - It's up to the caller to dispose the reader. - - - - - - - Returns an instance of - created according to the relativePath - using itself as the root. - - - - - - - - - - Only valid for resources that - can be obtained through relative paths - - - - - - - - - - This returns a new stream instance each time it is called. - It is the responsability of the caller to dispose of this stream - - - - - - - - - - Depicts the contract for resource factories. - - - - - Used to check whether the resource factory - is able to deal with the given resource - identifier. - - - Implementors should return true - only if the given identificator is supported - by the resource factory - - - - - - - Creates an instance - for the given resource identifier - - - - - - - Creates an instance - for the given resource identifier - - - - - - - - - - - - - - - - - - Adapts a static string content as an - - - - - Enable access to files on network shares - - - - - Defines that the implementation wants a - in order to - access other components. The creator must be aware - that the component might (or might not) implement - the interface. - - - Used by Castle Project components to, for example, - gather logging factories - - - - - Increments IServiceProvider with a generic service resolution operation. - - - - - This interface should be implemented by classes - that are available in a bigger context, exposing - the container to different areas in the same application. - - For example, in Web application, the (global) HttpApplication - subclasses should implement this interface to expose - the configured container - - - - - - General purpose class to represent a standard pair of values. - - Type of the first value - Type of the second value - - - - Constructs a pair with its values - - - - - - - List of utility methods related to dynamic proxy operations - - - - - Determines whether the specified type is a proxy generated by - DynamicProxy (1 or 2). - - The type. - - true if it is a proxy; otherwise, false. - - - - - Pendent - - - - - Initializes a new instance of the class. - - The target. - - - - Determines whether the object contains an element with the specified key. - - The key to locate in the object. - - true if the contains an element with the key; otherwise, false. - - - is null. - - - - Adds an element with the provided key and value to the object. - - The to use as the key of the element to add. - The to use as the value of the element to add. - - is null. - An element with the same key already exists in the object. - The is read-only.-or- The has a fixed size. - - - - Removes all elements from the object. - - The object is read-only. - - - - Returns an object for the object. - - - An object for the object. - - - - - Removes the element with the specified key from the object. - - The key of the element to remove. - - is null. - The object is read-only.-or- The has a fixed size. - - - - Copies the elements of the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in at which copying begins. - - is null. - - is less than zero. - - is multidimensional.-or- is equal to or greater than the length of .-or- The number of elements in the source is greater than the available space from to the end of the destination . - The type of the source cannot be cast automatically to the type of the destination . - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Gets or sets the with the specified key. - - - - - - Gets an object containing the keys of the object. - - - An object containing the keys of the object. - - - - Gets an object containing the values in the object. - - - An object containing the values in the object. - - - - Gets a value indicating whether the object is read-only. - - - true if the object is read-only; otherwise, false. - - - - Gets a value indicating whether the object has a fixed size. - - - true if the object has a fixed size; otherwise, false. - - - - Gets the number of elements contained in the . - - - The number of elements contained in the . - - - - Gets an object that can be used to synchronize access to the . - - - An object that can be used to synchronize access to the . - - - - Gets a value indicating whether access to the is synchronized (thread safe). - - - true if access to the is synchronized (thread safe); otherwise, false. - - - + + + + Castle.Core + + + + + This attribute is usefull only when you want to register all components + on an assembly as a batch process. + By doing so, the batch register will look + for this attribute to distinguish components from other classes. + + + + + Base for Attributes that want to express lifestyle + chosen by the component. + + + + + Initializes a new instance of the class. + + The type. + + + + Gets or sets the lifestyle. + + The lifestyle. + + + + Initializes a new instance of the class. + + The key. + + + + Initializes a new instance of the class. + + The key. + The service. + + + + Initializes a new instance of the class. + + The key. + The service. + The lifestyle. + + + + Gets the service. + + The service. + + + + Gets the key. + + The key. + + + + Associates a custom component with a component + + + + + Initializes a new instance of the class. + + Type of the component activator. + + + + Gets the type of the component activator. + + The type of the component activator. + + + + Specifies the proxying behavior for a component. + + + + + Initializes a new instance of the class. + + + + + Gets or sets a value indicating whether the generated + interface proxy should inherit from . + + + + + Determines if the component requires a single interface proxy. + + true if the component requires a single interface proxy. + + + + Gets or sets the additional interfaces used during proxy generation. + + + + + Marks as property to be skipped and not be wired + by the IoC container + + + + + Used to declare that a component wants interceptors acting on it. + + + + + Constructs the InterceptorAttribute pointing to + a key to a interceptor + + + + + + Constructs the InterceptorAttribute pointing to + a service + + + + + + Indicates that the target components wants a + singleton lifestyle. + + + + + Initializes a new instance of the class. + + + + + Indicates that the target components wants a + transient lifestyle. + + + + + Initializes a new instance of the class. + + + + + Indicates that the target components wants a + per thread lifestyle. + + + + + Initializes a new instance of the class. + + + + + Indicates that the target components wants a + per web request lifestyle. + + + + + Indicates that the target components wants a + pooled lifestyle. + + + + + Initializes a new instance of the class + using the default initial pool size (5) and the max pool size (15). + + + + + Initializes a new instance of the class. + + Initial size of the pool. + Max pool size. + + + + Gets the initial size of the pool. + + The initial size of the pool. + + + + Gets the maximum pool size. + + The size of the max pool. + + + + Indicates that the target components wants a + custom lifestyle. + + + + + Initializes a new instance of the class. + + The lifestyle handler. + + + + Gets the type of the lifestyle handler. + + The type of the lifestyle handler. + + + + New interface that is going to be used by DynamicProxy 2 + + + + + New interface that is going to be used by DynamicProxy 2 + + + + + Returns the concrete instantiation of , with any generic parameters bound to real types. + + The concrete instantiation of , or if not a generic method. + Can be slower than calling . + + + + Returns the concrete instantiation of , with any generic parameters bound to real types. + + The concrete instantiation of , or if not a generic method. + Can be slower than calling . + + + + + + + + + + The generic arguments of the method, or null if not a generic method. + + + + + + + + + + For interface proxies, this will point to the + on the target class + + + + + Interceptors might implement this to receive the + ComponentModel on behalf of the component where the + interceptor is acting. + + + + + Get the proxy target (note that null is a valid target!) + + + + + + Gets the interceptors for the proxy + + + + + + Abstract representation of a vertex. + + + + + The nodes that dependes on this node + + + + + The nodes that this node depends + + + + + The node has not been visited yet + + + + + This node is in the process of being visited + + + + + This now was visited + + + + + Represents a collection of objects + which are guaranted to be unique + and holds a color for them + + + + + Holds a timestamp (integer) + for a given item + + + + + Returns the node at the specified index. + + The lookup index. + The node at the specified index. + + If the specified is greater than the + number of objects within the list. + + + + + Validates the specified index. + + The lookup index. + + If the index is invalid. + + + + + Lifecycle interface. If implemented by a component, + the method Initialized will be invoked by the container + before making the component available to the external world. + + + + + Implementors should perform any initialization logic. + + + + + Only called for components that + belongs to a pool when the component + comes back to the pool. + + + + + Implementors should perform any + initialization/clean up. + + + + + Interface for components that wish to be started by the container + + + + + Starts this instance. + + + + + Stops this instance. + + + + + Provides a factory that can produce either or + classes. + + + + + Manages the instantiation of s. + + + + + Creates a new logger, getting the logger name from the specified type. + + + + + Creates a new logger. + + + + + Creates a new logger, getting the logger name from the specified type. + + + + + Creates a new logger. + + + + + Creates a new extended logger, getting the logger name from the specified type. + + + + + Creates a new extended logger. + + + + + Creates a new extended logger, getting the logger name from the specified type. + + + + + Creates a new extended logger. + + + + + Creates a new extended logger, getting the logger name from the specified type. + + + + + Creates a new extended logger. + + + + + Creates a new extended logger, getting the logger name from the specified type. + + + + + Creates a new extended logger. + + + + + Creates a new logger, getting the logger name from the specified type. + + + + + Creates a new logger. + + + + + Creates a new logger, getting the logger name from the specified type. + + + + + Creates a new logger. + + + + + Gets the configuration file. + + i.e. log4net.config + + + + + Gets the configuration file. + + i.e. log4net.config + + + + + Summary description for ConsoleFactory. + + + + + NullLogFactory used when logging is turned off. + + + + + Creates an instance of ILogger with the specified name. + + Name. + + + + + Creates an instance of ILogger with the specified name and LoggerLevel. + + Name. + Level. + + + + + Creates outputing + to files. The name of the file is derived from the log name + plus the 'log' extension. + + + + + Used to create the TraceLogger implementation of ILogger interface. See . + + + + + The Logger sending everything to the standard output streams. + This is mainly for the cases when you have a utility that + does not have a logger to supply. + + + + + The Level Filtered Logger class. This is a base clase which + provides a LogLevel attribute and reroutes all functions into + one Log method. + + + + + Manages logging. + + + This is a facade for the different logging subsystems. + It offers a simplified interface that follows IOC patterns + and a simplified priority/level/severity abstraction. + + + + + Logs a debug message. + + The message to log + + + + Logs a debug message. + + The exception to log + The message to log + + + + Logs a debug message. + + Format string for the message to log + Format arguments for the message to log + + + + Logs a debug message. + + Format string for the message to log + Format arguments for the message to log + + + + Logs a debug message. + + The exception to log + Format string for the message to log + Format arguments for the message to log + + + + Logs a debug message. + + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs a debug message. + + The exception to log + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs an info message. + + The message to log + + + + Logs an info message. + + The exception to log + The message to log + + + + Logs an info message. + + Format string for the message to log + Format arguments for the message to log + + + + Logs an info message. + + Format string for the message to log + Format arguments for the message to log + + + + Logs an info message. + + The exception to log + Format string for the message to log + Format arguments for the message to log + + + + Logs an info message. + + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs an info message. + + The exception to log + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs a warn message. + + The message to log + + + + Logs a warn message. + + The exception to log + The message to log + + + + Logs a warn message. + + Format string for the message to log + Format arguments for the message to log + + + + Logs a warn message. + + Format string for the message to log + Format arguments for the message to log + + + + Logs a warn message. + + The exception to log + Format string for the message to log + Format arguments for the message to log + + + + Logs a warn message. + + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs a warn message. + + The exception to log + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs an error message. + + The message to log + + + + Logs an error message. + + The exception to log + The message to log + + + + Logs an error message. + + Format string for the message to log + Format arguments for the message to log + + + + Logs an error message. + + Format string for the message to log + Format arguments for the message to log + + + + Logs an error message. + + The exception to log + Format string for the message to log + Format arguments for the message to log + + + + Logs an error message. + + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs an error message. + + The exception to log + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs a fatal message. + + The message to log + + + + Logs a fatal message. + + The exception to log + The message to log + + + + Logs a fatal message. + + Format string for the message to log + Format arguments for the message to log + + + + Logs a fatal message. + + Format string for the message to log + Format arguments for the message to log + + + + Logs a fatal message. + + The exception to log + Format string for the message to log + Format arguments for the message to log + + + + Logs a fatal message. + + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs a fatal message. + + The exception to log + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs a fatal error message. + + The Message + + + + Logs a fatal error message. + + The Message + The Exception + + + + Logs a fatal error message. + + Message format + Array of objects to write using format + + + + Create a new child logger. + The name of the child logger is [current-loggers-name].[passed-in-name] + + The Subname of this logger. + The New ILogger instance. + If the name has an empty element name. + + + + Determines if messages of priority "debug" will be logged. + + True if "debug" messages will be logged. + + + + Determines if messages of priority "info" will be logged. + + True if "info" messages will be logged. + + + + Determines if messages of priority "warn" will be logged. + + True if "warn" messages will be logged. + + + + Determines if messages of priority "error" will be logged. + + True if "error" messages will be logged. + + + + Determines if messages of priority "fatal" will be logged. + + True if "fatal" messages will be logged. + + + + Determines if messages of priority "fatalError" will be logged. + + True if "fatalError" messages will be logged. + + + + Creates a new LevelFilteredLogger. + + + + + Keep the instance alive in a remoting scenario + + + + + + Logs a debug message. + + The message to log + + + + Logs a debug message. + + The exception to log + The message to log + + + + Logs a debug message. + + Format string for the message to log + Format arguments for the message to log + + + + Logs a debug message. + + The exception to log + Format string for the message to log + Format arguments for the message to log + + + + Logs a debug message. + + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs a debug message. + + The exception to log + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs a debug message. + + Message format + Array of objects to write using format + + + + Logs an info message. + + The message to log + + + + Logs an info message. + + The exception to log + The message to log + + + + Logs an info message. + + Format string for the message to log + Format arguments for the message to log + + + + Logs an info message. + + The exception to log + Format string for the message to log + Format arguments for the message to log + + + + Logs an info message. + + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs an info message. + + The exception to log + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs an info message. + + Message format + Array of objects to write using format + + + + Logs a warn message. + + The message to log + + + + Logs a warn message. + + The exception to log + The message to log + + + + Logs a warn message. + + Format string for the message to log + Format arguments for the message to log + + + + Logs a warn message. + + The exception to log + Format string for the message to log + Format arguments for the message to log + + + + Logs a warn message. + + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs a warn message. + + The exception to log + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs a warn message. + + Message format + Array of objects to write using format + + + + Logs an error message. + + The message to log + + + + Logs an error message. + + The exception to log + The message to log + + + + Logs an error message. + + Format string for the message to log + Format arguments for the message to log + + + + Logs an error message. + + The exception to log + Format string for the message to log + Format arguments for the message to log + + + + Logs an error message. + + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs an error message. + + The exception to log + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs an error message. + + Message format + Array of objects to write using format + + + + Logs a fatal message. + + The message to log + + + + Logs a fatal message. + + The exception to log + The message to log + + + + Logs a fatal message. + + Format string for the message to log + Format arguments for the message to log + + + + Logs a fatal message. + + The exception to log + Format string for the message to log + Format arguments for the message to log + + + + Logs a fatal message. + + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs a fatal message. + + The exception to log + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs a fatal message. + + Message format + Array of objects to write using format + + + + Logs a fatal error message. + + The Message + + + + Logs a fatal error message. + + The Message + The Exception + + + + Logs a fatal error message. + + Message format + Array of objects to write using format + + + + Implementors output the log content by implementing this method only. + Note that exception can be null + + + + + + + + + The LoggerLevel that this logger + will be using. Defaults to LoggerLevel.Off + + + + + The name that this logger will be using. + Defaults to String.Empty + + + + + Determines if messages of priority "debug" will be logged. + + true if log level flags include the bit + + + + Determines if messages of priority "info" will be logged. + + true if log level flags include the bit + + + + Determines if messages of priority "warn" will be logged. + + true if log level flags include the bit + + + + Determines if messages of priority "error" will be logged. + + true if log level flags include the bit + + + + Determines if messages of priority "fatal" will be logged. + + true if log level flags include the bit + + + + Determines if messages of priority "fatal" will be logged. + + true if log level flags include the bit + + + + Creates a new ConsoleLogger with the Level + set to LoggerLevel.Debug and the Name + set to String.Empty. + + + + + Creates a new ConsoleLogger with the Name + set to String.Empty. + + The logs Level. + + + + Creates a new ConsoleLogger with the Level + set to LoggerLevel.Debug. + + The logs Name. + + + + Creates a new ConsoleLogger. + + The logs Name. + The logs Level. + + + + A Common method to log. + + The level of logging + The name of the logger + The Message + The Exception + + + + Returns a new ConsoleLogger with the name + added after this loggers name, with a dot in between. + + The added hierarchical name. + A new ConsoleLogger. + + + + The Logger using standart Diagnostics namespace. + + + + + Creates a logger based on . + + + + + + Creates a logger based on . + + + + + + + Creates a logger based on . + + + + + + + + The Null Logger class. This is useful for implementations where you need + to provide a logger to a utility class, but do not want any output from it. + It also helps when you have a utility that does not have a logger to supply. + + + + + Provides an interface that supports and + allows the storage and retrieval of Contexts. These are supported in + both log4net and NLog. + + + + + Exposes the Global Context of the extended logger. + + + + + Exposes the Thread Context of the extended logger. + + + + + Exposes the Thread Stack of the extended logger. + + + + + Creates a new NullLogger. + + + + + No-op. + + Ignored + + + + No-op. + + Ignored + Ignored + + + + No-op. + + Ignored + Ignored + + + + No-op. + + Ignored + Ignored + + + + No-op. + + Ignored + Ignored + Ignored + + + + No-op. + + Ignored + Ignored + Ignored + + + + No-op. + + Ignored + Ignored + Ignored + Ignored + + + + No-op. + + Ignored + + + + No-op. + + Ignored + Ignored + + + + No-op. + + Ignored + Ignored + + + + No-op. + + Ignored + Ignored + + + + No-op. + + Ignored + Ignored + Ignored + + + + No-op. + + Ignored + Ignored + Ignored + + + + No-op. + + Ignored + Ignored + Ignored + Ignored + + + + No-op. + + Ignored + + + + No-op. + + Ignored + Ignored + + + + No-op. + + Ignored + Ignored + + + + No-op. + + Ignored + Ignored + + + + No-op. + + Ignored + Ignored + Ignored + + + + No-op. + + Ignored + Ignored + Ignored + + + + No-op. + + Ignored + Ignored + Ignored + Ignored + + + + No-op. + + Ignored + + + + No-op. + + Ignored + Ignored + + + + No-op. + + Ignored + Ignored + + + + No-op. + + Ignored + Ignored + + + + No-op. + + Ignored + Ignored + Ignored + + + + No-op. + + Ignored + Ignored + Ignored + + + + No-op. + + Ignored + Ignored + Ignored + Ignored + + + + No-op. + + Ignored + + + + No-op. + + Ignored + Ignored + + + + No-op. + + Ignored + Ignored + + + + No-op. + + Ignored + Ignored + + + + No-op. + + Ignored + Ignored + Ignored + + + + No-op. + + Ignored + Ignored + Ignored + + + + No-op. + + Ignored + Ignored + Ignored + Ignored + + + + No-op. + + Ignored + + + + No-op. + + Ignored + Ignored + + + + No-op. + + Ignored + Ignored + + + + Returns this NullLogger. + + Ignored + This ILogger instance. + + + + No-op. + + false + + + + No-op. + + false + + + + No-op. + + false + + + + No-op. + + false + + + + No-op. + + false + + + + No-op. + + false + + + + Returns empty context properties. + + + + + Returns empty context properties. + + + + + Returns empty context stacks. + + + + + Interface for Context Properties implementations + + + + This interface defines a basic property get set accessor. + + + Based on the ContextPropertiesBase of log4net, by Nicko Cadell. + + + + + + Gets or sets the value of a property + + + The value for the property with the specified key + + + + Gets or sets the value of a property + + + + + + The Stream Logger class. This class can stream log information + to any stream, it is suitable for storing a log file to disk, + or to a MemoryStream for testing your components. + + + This logger is not thread safe. + + + + + Creates a new StreamLogger with default encoding + and buffer size. Initial Level is set to Debug. + + + The name of the log. + + + The stream that will be used for logging, + seeking while the logger is alive + + + + + Creates a new StreamLogger with default buffer size. + Initial Level is set to Debug. + + + The name of the log. + + + The stream that will be used for logging, + seeking while the logger is alive + + + The encoding that will be used for this stream. + + + + + + Creates a new StreamLogger. + Initial Level is set to Debug. + + + The name of the log. + + + The stream that will be used for logging, + seeking while the logger is alive + + + The encoding that will be used for this stream. + + + + The buffer size that will be used for this stream. + + + + + + Creates a new StreamLogger with + Debug as default Level. + + The name of the log. + The StreamWriter the log will write to. + + + + The TraceLogger sends all logging to the System.Diagnostics.TraceSource + built into the .net framework. + + + Logging can be configured in the system.diagnostics configuration + section. + + If logger doesn't find a source name with a full match it will + use source names which match the namespace partially. For example you can + configure from all castle components by adding a source name with the + name "Castle". + + If no portion of the namespace matches the source named "Default" will + be used. + + + + + Build a new trace logger based on the named TraceSource + + The name used to locate the best TraceSource. In most cases comes from the using type's fullname. + + + + Build a new trace logger based on the named TraceSource + + The name used to locate the best TraceSource. In most cases comes from the using type's fullname. + The default logging level at which this source should write messages. In almost all cases this + default value will be overridden in the config file. + + + + Create a new child logger. + The name of the child logger is [current-loggers-name].[passed-in-name] + + The Subname of this logger. + The New ILogger instance. + + + + The WebLogger sends everything to the HttpContext.Trace + + + Trace must be enabled on the Asp.Net configuration file (web.config or machine.config) + + + + + Creates a new WebLogger with the priority set to DEBUG. + + + + + Creates a new WebLogger. + + The Log level typecode. + + + + Creates a new WebLogger. + + The Log name. + + + + Creates a new WebLogger. + + The Log name. + The Log level typecode. + + + + A Common method to log. + + The level of logging + The Log name. + The Message + The Exception + + + + Just returns this logger (WebLogger is not hierarchical). + + Ignored + This ILogger instance. + + + + Tries to get the current http context's trace context. + + The current http context's trace context or null if none is + available + + + + Supporting Logger levels. + + + + + Logging will be off + + + + + Fatal logging level + + + + + Error logging level + + + + + Warn logging level + + + + + Info logging level + + + + + Debug logging level + + + + + Pendent + + + + + Deserializes the specified node into an abstract representation of configuration. + + The node. + + + + + If a config value is an empty string we return null, this is to keep + backward compability with old code + + + + + This is an abstract implementation + that deals with methods that can be abstracted away + from underlying implementations. + + + AbstractConfiguration makes easier to implementers + to create a new version of + + + + + is a interface encapsulating a configuration node + used to retrieve configuration values. + + + + + Gets the value of the node and converts it + into specified . + + The + + The Default value returned if the convertion fails. + + The Value converted into the specified type. + + + + Gets the name of the node. + + + The Name of the node. + + + + + Gets the value of the node. + + + The Value of the node. + + + + + Gets an of + elements containing all node children. + + The Collection of child nodes. + + + + Gets an of the configuration attributes. + + + + + Gets the value of the node and converts it + into specified . + + The + + The Default value returned if the convertion fails. + + The Value converted into the specified type. + + + + Gets the name of the . + + + The Name of the . + + + + + Gets the value of . + + + The Value of the . + + + + + Gets all child nodes. + + The of child nodes. + + + + Gets node attributes. + + + All attributes of the node. + + + + + A collection of objects. + + + + + Creates a new instance of ConfigurationCollection. + + + + + Creates a new instance of ConfigurationCollection. + + + + + Summary description for MutableConfiguration. + + + + + Initializes a new instance of the class. + + The name. + + + + Gets the value of . + + + The Value of the . + + + + + Enumeration used to mark the component's lifestyle. + + + + + No lifestyle specified. + + + + + Singleton components are instantiated once, and shared + between all clients. + + + + + Thread components have a unique instance per thread. + + + + + Transient components are created on demand. + + + + + Optimization of transient components that keeps + instance in a pool instead of always creating them. + + + + + Any other logic to create/release components. + + + + + PerWebRequest components are created once per Http Request + + + + + + + + + + Represents the collection of information and + meta information collected about a component. + + + + Name (key) of the component + + + Service exposed + + + Implementation for the service + + + Extended properties + + + Lifestyle for the component + + + Custom lifestyle, if any + + + Custom activator, if any + + + Dependencies the kernel must resolve + + + All available constructors + + + All potential properties that can be setted by the kernel + + + Steps of lifecycle + + + External parameters + + + Configuration node associated + + + Interceptors associated + + + /// Custom dependencies/// + + + + Constructs a ComponentModel + + + + + Requires the selected property dependencies. + + The property selector. + + + + Requires the property dependencies of type . + + The dependency type. + + + + Sets or returns the component key + + + + + Gets or sets the service exposed. + + The service. + + + + Gets or sets the component implementation. + + The implementation. + + + + Gets or sets a value indicating whether the component requires generic arguments. + + + true if generic arguments are required; otherwise, false. + + + + + Gets or sets the extended properties. + + The extended properties. + + + + Gets the constructors candidates. + + The constructors. + + + + Gets the properties set. + + The properties. + + + + Gets or sets the configuration. + + The configuration. + + + + Gets the lifecycle steps. + + The lifecycle steps. + + + + Gets or sets the lifestyle type. + + The type of the lifestyle. + + + + Gets or sets the strategy for + inspecting public properties + on the components + + + + + Gets or sets the custom lifestyle. + + The custom lifestyle. + + + + Gets or sets the custom component activator. + + The custom component activator. + + + + Gets the interceptors. + + The interceptors. + + + + Gets the parameter collection. + + The parameters. + + + + Dependencies are kept within constructors and + properties. Others dependencies must be + registered here, so the kernel (as a matter + of fact the handler) can check them + + + + + Gets the custom dependencies. + + The custom dependencies. + + + + Represents a constructor of the component + that the container can use to initialize it properly. + + + + + Initializes a new instance of the class. + + The constructor info. + The dependencies. + + + + Gets the ConstructorInfo (from reflection). + + The constructor. + + + + Gets the dependencies this constructor candidate exposes. + + The dependencies. + + + + Collection of + + + + + Gets the fewer arguments candidate. + + The fewer arguments candidate. + + + + Represents a dependency (other component or a + fixed value available through external configuration). + + + + + Initializes a new instance of the class. + + The type. + The dependency key. + Type of the target. + if set to true [is optional]. + + + + Returns a that represents the current . + + + A that represents the current . + + + + + Serves as a hash function for a particular type, suitable + for use in hashing algorithms and data structures like a hash table. + + + A hash code for the current . + + + + + Determines whether the specified is equal to the current . + + The to compare with the current . + + if the specified is equal to the + current ; otherwise, . + + + + + Gets or sets the type of the dependency. + + The type of the dependency. + + + + Gets or sets the dependency key. + + The dependency key. + + + + Gets the type of the target. + + The type of the target. + + + + Gets or sets whether this dependency is optional. + + + true if this dependency is optional; otherwise, false. + + + + + Collection of . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The dependencies. + + + + Represents an reference to a Interceptor component. + + + + + Initializes a new instance of the class. + + The component key. + + + + Initializes a new instance of the class. + + Type of the service. + + + + Gets an for the component key. + + The component key. + The + + + + Gets an for the service. + + The service. + The + + + + Gets an for the service. + + The service type. + The + + + + Gets the type of the service. + + The type of the service. + + + + Gets the interceptor component key. + + The component key. + + + + Gets the type of the reference. + + The type of the reference. + + + + Collection of + + + + + Adds the specified item. + + The interceptor. + + + + Adds the specified interceptor as the first. + + The interceptor. + + + + Adds the specified interceptor as the last. + + The interceptor. + + + + Inserts the specified interceptor at the specified index. + + The index. + The interceptor. + + + + When implemented by a class, copies the elements of + the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in at which copying begins. + + is . + + is less than zero. + + + is multidimensional. + -or- + + is equal to or greater than the length of . + -or- + The number of elements in the source is greater than the available space from to the end of the destination . + + The type of the source cannot be cast automatically to the type of the destination . + + + + Returns an enumerator that can iterate through a collection. + + + An + that can be used to iterate through the collection. + + + + + Adds the interceptor to the end of the interceptors list if it does not exist already. + + The interceptor reference. + + + + Gets a value indicating whether this instance has interceptors. + + + true if this instance has interceptors; otherwise, false. + + + + + Gets the number of + elements contained in the . + + + + + + Gets an object that + can be used to synchronize access to the . + + + + + + Gets a value + indicating whether access to the is synchronized + (thread-safe). + + + + + + Represents a collection of ordered lifecycle steps. + + + + + Initializes a new instance of the class. + + + + + Returns all steps for the commission phase + + + + + + Returns all steps for the decommission phase + + + + + + Adds a step to the commission or decomission phases. + + + + + + + Adds a step as the first step to execute for the commission or decomission phase. + + + + + + + Copies the elements of + the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in at which copying begins. + + is . + + is less than zero. + + + is multidimensional. + -or- + + is equal to or greater than the length of . + -or- + The number of elements in the source is greater than the available space from to the end of the destination . + + The type of the source cannot be cast automatically to the type of the destination . + + + + Returns an enumerator that can iterate through a collection. + + + An + that can be used to iterate through the collection. + + + + + Gets a value indicating whether this instance has commission steps. + + + true if this instance has commission steps; otherwise, false. + + + + + Gets a value indicating whether this instance has decommission steps. + + + true if this instance has decommission steps; otherwise, false. + + + + + Gets the number of + elements contained in the . + + + + + + Gets an object that + can be used to synchronize access to the . + + + + + + Gets a value + indicating whether access to the is synchronized + (thread-safe). + + + + + + Represents meta information associated with a method + (not yet defined) + + + + + Initializes a new instance of the class. + + The config node. + + + + Gets the config node. + + The config node. + + + + Collection of + + + + + Gets the method info2 model. + + The method info2 model. + + + + Represents a parameter. Usually the parameter + comes from the external world, ie, an external configuration. + + + + + Initializes a new instance of the class. + + The name. + The value. + + + + Initializes a new instance of the class. + + The name. + The value. + + + + Gets the name. + + The name. + + + + Gets the value. + + The value. + + + + Gets the config value. + + The config value. + + + + Collection of + + + + + Initializes a new instance of the class. + + + + + Adds the specified name. + + The name. + The value. + + + + Adds the specified name. + + The name. + The config node. + + + + Determines whether this collection contains the specified key. + + The key. + + true if yes; otherwise, false. + + + + + Adds the specified key. + + + Not implemented + + The key. + The value. + + + + Clears this instance. + + + Not implemented + + + + + Removes the specified key. + + The key. + + Not implemented + + + + + Copy the content to the specified array + + target array + target index + + Not implemented + + + + + Returns an enumerator that can iterate through a collection. + + + An + that can be used to iterate through the collection. + + + + + Gets the keys. + + The keys. + + Not implemented + + + + + Gets the values. + + The values. + + Not implemented + + + + + Gets a value indicating whether this instance is read only. + + + true if this instance is read only; otherwise, false. + + + + + Gets a value indicating whether this instance is fixed size. + + + true if this instance is fixed size; otherwise, false. + + + + + Gets the with the specified key. + + + + + + Gets the count. + + The count. + + + + Gets the sync root. + + The sync root. + + + + Gets a value indicating whether this instance is synchronized. + + + true if this instance is synchronized; otherwise, false. + + + + + Represents a property and the respective dependency. + + + + + Initializes a new instance of the class. + + The property info. + The dependency. + + + + Gets the property. + + The property. + + + + Gets the dependency. + + The dependency. + + + + Collection of + + + + + Finds a PropertySet the by PropertyInfo. + + The info. + + + + + Represents a 'streamable' resource. Can + be a file, a resource in an assembly. + + + + + Returns a reader for the stream + + + It's up to the caller to dispose the reader. + + + + + + Returns a reader for the stream + + + It's up to the caller to dispose the reader. + + + + + + + Returns an instance of + created according to the relativePath + using itself as the root. + + + + + + + + + + Only valid for resources that + can be obtained through relative paths + + + + + + + + + + This returns a new stream instance each time it is called. + It is the responsability of the caller to dispose of this stream + + + + + + + + + + Depicts the contract for resource factories. + + + + + Used to check whether the resource factory + is able to deal with the given resource + identifier. + + + Implementors should return true + only if the given identificator is supported + by the resource factory + + + + + + + Creates an instance + for the given resource identifier + + + + + + + Creates an instance + for the given resource identifier + + + + + + + + + + + + + + + + + + Adapts a static string content as an + + + + + Enable access to files on network shares + + + + + Defines that the implementation wants a + in order to + access other components. The creator must be aware + that the component might (or might not) implement + the interface. + + + Used by Castle Project components to, for example, + gather logging factories + + + + + Increments IServiceProvider with a generic service resolution operation. + + + + + This interface should be implemented by classes + that are available in a bigger context, exposing + the container to different areas in the same application. + + For example, in Web application, the (global) HttpApplication + subclasses should implement this interface to expose + the configured container + + + + + + General purpose class to represent a standard pair of values. + + Type of the first value + Type of the second value + + + + Constructs a pair with its values + + + + + + + List of utility methods related to dynamic proxy operations + + + + + Determines whether the specified type is a proxy generated by + DynamicProxy (1 or 2). + + The type. + + true if it is a proxy; otherwise, false. + + + + + Pendent + + + + + Initializes a new instance of the class. + + The target. + + + + Determines whether the object contains an element with the specified key. + + The key to locate in the object. + + true if the contains an element with the key; otherwise, false. + + + is null. + + + + Adds an element with the provided key and value to the object. + + The to use as the key of the element to add. + The to use as the value of the element to add. + + is null. + An element with the same key already exists in the object. + The is read-only.-or- The has a fixed size. + + + + Removes all elements from the object. + + The object is read-only. + + + + Returns an object for the object. + + + An object for the object. + + + + + Removes the element with the specified key from the object. + + The key of the element to remove. + + is null. + The object is read-only.-or- The has a fixed size. + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in at which copying begins. + + is null. + + is less than zero. + + is multidimensional.-or- is equal to or greater than the length of .-or- The number of elements in the source is greater than the available space from to the end of the destination . + The type of the source cannot be cast automatically to the type of the destination . + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Gets or sets the with the specified key. + + + + + + Gets an object containing the keys of the object. + + + An object containing the keys of the object. + + + + Gets an object containing the values in the object. + + + An object containing the values in the object. + + + + Gets a value indicating whether the object is read-only. + + + true if the object is read-only; otherwise, false. + + + + Gets a value indicating whether the object has a fixed size. + + + true if the object has a fixed size; otherwise, false. + + + + Gets the number of elements contained in the . + + + The number of elements contained in the . + + + + Gets an object that can be used to synchronize access to the . + + + An object that can be used to synchronize access to the . + + + + Gets a value indicating whether access to the is synchronized (thread safe). + + + true if access to the is synchronized (thread safe); otherwise, false. + + + diff --git a/lib/Castle.DynamicProxy2.xml b/lib/Castle.DynamicProxy2.xml index 1000887b639..9ab892a4694 100644 --- a/lib/Castle.DynamicProxy2.xml +++ b/lib/Castle.DynamicProxy2.xml @@ -1,1249 +1,1249 @@ - - - - Castle.DynamicProxy2 - - - - - Wraps a reference that is passed - ByRef and provides indirect load/store support. - - - - - Summary description for NewArrayExpression. - - - - - - - - - - Here we try to match a constructor argument to its value. - Since we can't get the values from the assembly, we use some heuristics to get it. - a/ we first try to match all the properties on the attributes by name (case insensitive) to the argument - b/ if we fail we try to match them by property type, with some smarts about convertions (i,e: can use Guid for string). - - - - - We have the following rules here. - Try to find a matching type, failing that, if the parameter is string, get the first property (under the assumption that - we can convert it. - - - - - Attributes can only accept simple types, so we return null for null, - if the value is passed as string we call to string (should help with converting), - otherwise, we use the value as is (enums, integer, etc). - - - - s - Provides appropriate Ldc.X opcode for the type of primitive value to be loaded. - - - - - Provides appropriate Ldind.X opcode for - the type of primitive value to be loaded indirectly. - - - - - Inspect the base method for generic definitions - and set the return type and the parameters - accordingly - - - - - Emits a load opcode of the appropriate kind for a constant string or - primitive value. - - - - - - - Emits a load opcode of the appropriate kind for the constant default value of a - type, such as 0 for value types and null for reference types. - - - - - Emits a load indirect opcode of the appropriate type for a value or object reference. - Pops a pointer off the evaluation stack, dereferences it and loads - a value of the specified type. - - - - - - - Emits a store indirectopcode of the appropriate type for a value or object reference. - Pops a value of the specified type and a pointer off the evaluation stack, and - stores the value. - - - - - - - Summary description for PropertiesCollection. - - - - - Provides appropriate Stind.X opcode - for the type of primitive value to be stored indirectly. - - - - - Base class that exposes the common functionalities - to proxy generation. - - - TODO: - - Add tests and fixes for 'leaking this' problem - - - - - Used by dinamically implement - - - - - - Generates a parameters constructor that initializes the proxy - state with just to make it non-null. - - This constructor is important to allow proxies to be XML serializable - - - - - - If callbackMethod is null the InvokeOnTarget implementation - is just the code to throw an exception - - - - - - - - - - - - If callbackMethod is null the InvokeOnTarget implementation - is just the code to throw an exception - - - - - - - - If true the invocation will implement the IChangeProxyTarget interface - - - - - Generates the constructor for the nested class that extends - - - - - - - - - - Improvement: this cache should be static. We should generate a - type constructor instead - - - - - Performs some basic screening and invokes the - to select methods. - - - - - - - - Checks if the method is public or protected. - - - - - - - Attributes should be replicated if they are non-inheritable, - but there are some special cases where the attributes means - something to the CLR, where they should be skipped. - - - - - Checks if the method has the same signature as a method that was marked as - one that should generate a new vtable slot. - - - - - Initializes a new instance of the class. - - Type of the target. - The interfaces. - The options. - - - - - - - - - Initializes a new instance of the class. - - The emitter. - The add method. - The remove method. - The attributes. - - - - - - - - - Finds the type of the method on target. - - The method on interface. - Type of the proxy target. - /// if set to true will check implementation on mixins. - - - - - Checks whether the given types are the same. This is - more complicated than it looks. - - - - - - - - Checks whether the given methods are the same. - - - - True if the methods are the same. - - - - This is used by the ProxyObjectReference class durin de-serialiation, to know - which generator it should use - - - - - Returns the methods implemented by a type. Use this instead of Type.GetMethods() to work around a CLR issue - where duplicate MethodInfos are returned by Type.GetMethods() after a token of a generic type's method was loaded. - - - - - Handles the deserialization of proxies. - - - - - Resets the used for deserialization to a new scope. - - This is useful for test cases. - - - - Resets the used for deserialization to a given . - - The scope to be used for deserialization. - By default, the deserialization process uses a different scope than the rest of the application, which can lead to multiple proxies - being generated for the same type. By explicitly setting the deserialization scope to the application's scope, this can be avoided. - - - - Gets the used for deserialization. - - As has no way of automatically determining the scope used by the application (and the application - might use more than one scope at the same time), uses a dedicated scope instance for deserializing proxy - types. This instance can be reset and set to a specific value via and . - - - - Used during the target type inspection process. Implementors have a chance to customize the - proxy generation process. - - - - - Invoked by the generation process to determine if the specified method should be proxied. - - The type which declares the given method. - The method to inspect. - True if the given method should be proxied; false otherwise. - - - - Invoked by the generation process to notify that a member was not marked as virtual. - - The type which declares the non-virtual member. - The non-virtual member. - - Non-virtual members cannot be proxied. This method gives an opportunity to inspect - any non-virtual member of a type that has been requested to be proxied, and if - appropriate - throw an exception to notify the caller. - - - - - Invoked by the generation process to notify that the whole process has completed. - - - - - Applied to the assemblies saved by in order to persist the cache data included in the persisted assembly. - - - - - Default implementation of interface producing in-memory proxy assemblies. - - - - - Abstracts the implementation of proxy type construction. - - - - - Creates a proxy type for given , using provided. - - The class type to proxy. - The proxy generation options. - The generated proxy type. - Thrown when is a generic type definition. - Thrown when is not public. - Note that to avoid this exception, you can mark offending type internal, and define - pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. - - - - - Creates a proxy type for given , implementing , using provided. - - The class type to proxy. - Additional interface types to proxy. - The proxy generation options. - The generated proxy type. - - Implementers should return a proxy type for the specified class and interfaces. - Additional interfaces should be only 'mark' interfaces, that is, they should work like interface proxy without target. (See method.) - - Thrown when or any of is a generic type definition. - Thrown when or any of is not public. - Note that to avoid this exception, you can mark offending type internal, and define - pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. - - - - - Creates a proxy type that proxies calls to members on , implementing , using provided. - - The interface type to proxy. - Additional interface types to proxy. - Type implementing on which calls to the interface members should be intercepted. - The proxy generation options. - The generated proxy type. - - Implementers should return a proxy type for the specified interface that 'proceeds' executions to the specified target. - Additional interfaces should be only 'mark' interfaces, that is, they should work like interface proxy without target. (See method.) - - Thrown when or any of is a generic type definition. - Thrown when or any of is not public. - Note that to avoid this exception, you can mark offending type internal, and define - pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. - - - - - Creates a proxy type for given that delegates all calls to the provided interceptors. - - The interface type to proxy. - Additional interface types to proxy. - The proxy generation options. - The generated proxy type. - - Implementers should return a proxy type for the specified interface and additional interfaces that delegate all executions to the specified interceptors. - - Thrown when or any of is a generic type definition. - Thrown when or any of is not public. - Note that to avoid this exception, you can mark offending type internal, and define - pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. - - - - - Creates a proxy type for given and that delegates all calls to the provided interceptors and allows interceptors to switch the actual target of invocation. - - The interface type to proxy. - Additional interface types to proxy. - The proxy generation options. - The generated proxy type. - - Implementers should return a proxy type for the specified interface(s) that delegate all executions to the specified interceptors - and uses an instance of the interface as their targets (i.e. ), rather than a class. All classes should then implement interface, - to allow interceptors to switch invocation target with instance of another type implementing called interface. - - Thrown when or any of is a generic type definition. - Thrown when or any of is not public. - Note that to avoid this exception, you can mark offending type internal, and define - pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. - - - - - Gets the associated with this builder. - - The module scope associated with this builder. - - - - Initializes a new instance of the class with new . - - - - - Initializes a new instance of the class. - - The module scope for generated proxy types. - - - - Provides an extension point that allows proxies to choose specific interceptors on - a per method basis. - - - - - Selects the interceptors that should intercept calls to the given . - - The type declaring the method to intercept. - The method that will be intercepted. - All interceptors registered with the proxy. - An array of interceptors to invoke upon calling the . - - This method is called only once per proxy instance, upon the first call to the - . Either an empty array or null are valid return values to indicate - that no interceptor should intercept calls to the method. Although it is not advised, it is - legal to return other implementations than these provided in - . A better way to do this, is by passing all the required - interceptors to the appropriate method of . You can use this - method to influence the order in which interceptors will be called, by reordering the array. - Returning an array containing null references (Nothing in Visual Basic) is not legal, - and will result in a runtime exception. - - - - - - Determines whether this assembly has internals visible to dynamic proxy. - - The assembly to inspect. - - - - Determines whether the specified method is internal. - - The method. - - true if the specified method is internal; otherwise, false. - - - - - Because we need to cache the types based on the mixed in mixins, we do the following here: - - Get all the mixin interfaces - - Sort them by full name - - Return them by position - - The idea is to have reproducable behavior for the case that mixins are registered in different orders. - This method is here because it is required - - - - - Summary description for ModuleScope. - - - - - The default file name used when the assembly is saved using . - - - - - The default assembly (simple) name used for the assemblies generated by a instance. - - - - - Initializes a new instance of the class; assemblies created by this instance will not be saved. - - - - - Initializes a new instance of the class, allowing to specify whether the assemblies generated by this instance - should be saved. - - If set to true saves the generated module. - - - - Initializes a new instance of the class, allowing to specify whether the assemblies generated by this instance - should be saved and what simple names are to be assigned to them. - - If set to true saves the generated module. - The simple name of the strong-named assembly generated by this . - The path and file name of the manifest module of the strong-named assembly generated by this . - The simple name of the weak-named assembly generated by this . - The path and file name of the manifest module of the weak-named assembly generated by this . - - - - Returns a type from this scope's type cache, or null if the key cannot be found. - - The key to be looked up in the cache. - The type from this scope's type cache matching the key, or null if the key cannot be found - - - - Registers a type in this scope's type cache. - - The key to be associated with the type. - The type to be stored in the cache. - - - - Gets the key pair used to sign the strong-named assembly generated by this . - - - - - - Gets the specified module generated by this scope, creating a new one if none has yet been generated. - - If set to true, a strong-named module is returned; otherwise, a weak-named module is returned. - A strong-named or weak-named module generated by this scope, as specified by the parameter. - - - - Gets the strong-named module generated by this scope, creating a new one if none has yet been generated. - - A strong-named module generated by this scope. - - - - Gets the weak-named module generated by this scope, creating a new one if none has yet been generated. - - A weak-named module generated by this scope. - - - - Saves the generated assembly with the name and directory information given when this instance was created (or with - the and current directory if none was given). - - - - This method stores the generated assembly in the directory passed as part of the module information specified when this instance was - constructed (if any, else the current directory is used). If both a strong-named and a weak-named assembly - have been generated, it will throw an exception; in this case, use the overload. - - - If this was created without indicating that the assembly should be saved, this method does nothing. - - Both a strong-named and a weak-named assembly have been generated. - The path of the generated assembly file, or null if no file has been generated. - - - - Saves the specified generated assembly with the name and directory information given when this instance was created - (or with the and current directory if none was given). - - True if the generated assembly with a strong name should be saved (see ); - false if the generated assembly without a strong name should be saved (see . - - - This method stores the specified generated assembly in the directory passed as part of the module information specified when this instance was - constructed (if any, else the current directory is used). - - - If this was created without indicating that the assembly should be saved, this method does nothing. - - - No assembly has been generated that matches the parameter. - - The path of the generated assembly file, or null if no file has been generated. - - - - Loads the generated types from the given assembly into this 's cache. - - The assembly to load types from. This assembly must have been saved via or - , or it must have the manually applied. - - This method can be used to load previously generated and persisted proxy types from disk into this scope's type cache, eg. in order - to avoid the performance hit associated with proxy generation. - - - - - Users of this should use this lock when accessing the cache. - - - - - Gets the strong-named module generated by this scope, or if none has yet been generated. - - The strong-named module generated by this scope, or if none has yet been generated. - - - - Gets the file name of the strongly named module generated by this scope. - - The file name of the strongly named module generated by this scope. - - - - Gets the directory where the strongly named module generated by this scope will be saved, or if the current directory - is used. - - The directory where the strongly named module generated by this scope will be saved when is called - (if this scope was created to save modules). - - - - Gets the weak-named module generated by this scope, or if none has yet been generated. - - The weak-named module generated by this scope, or if none has yet been generated. - - - - Gets the file name of the weakly named module generated by this scope. - - The file name of the weakly named module generated by this scope. - - - - Gets the directory where the weakly named module generated by this scope will be saved, or if the current directory - is used. - - The directory where the weakly named module generated by this scope will be saved when is called - (if this scope was created to save modules). - - - - ProxyBuilder that persists the generated type. - - - The saved assembly contains just the last generated type. - - - - - Initializes a new instance of the class. - - - - - Saves the generated assembly to a physical file. Note that this renders the unusable. - - The path of the generated assembly file, or null if no assembly has been generated. - This method does not support saving multiple files. If both a signed and an unsigned module have been generated, use the - respective methods of the . - - - - Initializes a new instance of the class. - - The hook. - - - - Initializes a new instance of the class. - - - - - Provides proxy objects for classes and interfaces. - - - - - Initializes a new instance of the class. - - Proxy types builder. - - - - Initializes a new instance of the class. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - Object proxying calls to members of on object. - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of on object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of and types on object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of and types on object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - Interceptors can use interface to provide other target for method invocation than default . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on object or alternative implementation swapped at runtime by an interceptor. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - Interceptors can use interface to provide other target for method invocation than default . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on object or alternative implementation swapped at runtime by an interceptor. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on object with given . - Interceptors can use interface to provide other target for method invocation than default . - - Type of the interface implemented by which will be proxied. - The target object, calls to which will be intercepted. - The proxy generation options used to influence generated proxy type and object. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of and types on object or alternative implementation swapped at runtime by an interceptor. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not an interface type. - Thrown when given does not implement interface. - Thrown when no default constructor exists on actual type of object. - Thrown when default constructor of actual type of throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of types on generated target object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of types on generated target object. - - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - As a result of that also at least one implementation must be provided. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The interceptor called during the invocation of proxied methods. - - Object proxying calls to members of type on generated target object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of type on generated target object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of and types on generated target object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . - - Type of the interface which will be proxied. - The proxy generation options used to influence generated proxy type and object. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - Object proxying calls to members of and types on generated target object. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given array is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not an interface type. - - Since this method uses an empty-shell implementation of to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. - They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of and types. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Arguments of constructor of type which should be used to create a new instance of that type. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no constructor exists on type with parameters matching . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of type. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given is a generic type definition. - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The proxy generation options used to influence generated proxy type and object. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of and types. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not a class type. - Thrown when no default constructor exists on type . - Thrown when default constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . - - Type of class which will be proxied. - Additional interface types. Calls to their members will be proxied as well. - The proxy generation options used to influence generated proxy type and object. - Arguments of constructor of type which should be used to create a new instance of that type. - The interceptors called during the invocation of proxied methods. - - New object of type proxying calls to virtual members of and types. - - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given object is a null reference (Nothing in Visual Basic). - Thrown when given or any of is a generic type definition. - Thrown when given is not a class type. - Thrown when no constructor exists on type with parameters matching . - Thrown when constructor of type throws an exception. - - This method uses implementation to generate a proxy type. - As such caller should expect any type of exception that given implementation may throw. - - - - - Creates the proxy type for class proxy with given class, implementing given and using provided . - - The base class for proxy type. - The interfaces that proxy type should implement. - The options for proxy generation process. - of proxy. - - - - Creates the proxy type for interface proxy with target for given interface, implementing given on given and using provided . - - The interface proxy type should implement. - The additional interfaces proxy type should implement. - Actual type that the proxy type will encompass. - The options for proxy generation process. - of proxy. - - - - Creates the proxy type for interface proxy with target interface for given interface, implementing given on given and using provided . - - The interface proxy type should implement. - The additional interfaces proxy type should implement. - Actual type that the proxy type will encompass. - The options for proxy generation process. - of proxy. - - - - Creates the proxy type for interface proxy without target for given interface, implementing given and using provided . - - The interface proxy type should implement. - The additional interfaces proxy type should implement. - The options for proxy generation process. - of proxy. - - - - Gets the proxy builder instance used to generate proxy types. - - The proxy builder. - - - - - - - - - - - - - - - For interface proxies, this will point to the - on the target class - - - - + + + + Castle.DynamicProxy2 + + + + + Wraps a reference that is passed + ByRef and provides indirect load/store support. + + + + + Summary description for NewArrayExpression. + + + + + + + + + + Here we try to match a constructor argument to its value. + Since we can't get the values from the assembly, we use some heuristics to get it. + a/ we first try to match all the properties on the attributes by name (case insensitive) to the argument + b/ if we fail we try to match them by property type, with some smarts about convertions (i,e: can use Guid for string). + + + + + We have the following rules here. + Try to find a matching type, failing that, if the parameter is string, get the first property (under the assumption that + we can convert it. + + + + + Attributes can only accept simple types, so we return null for null, + if the value is passed as string we call to string (should help with converting), + otherwise, we use the value as is (enums, integer, etc). + + + + s + Provides appropriate Ldc.X opcode for the type of primitive value to be loaded. + + + + + Provides appropriate Ldind.X opcode for + the type of primitive value to be loaded indirectly. + + + + + Inspect the base method for generic definitions + and set the return type and the parameters + accordingly + + + + + Emits a load opcode of the appropriate kind for a constant string or + primitive value. + + + + + + + Emits a load opcode of the appropriate kind for the constant default value of a + type, such as 0 for value types and null for reference types. + + + + + Emits a load indirect opcode of the appropriate type for a value or object reference. + Pops a pointer off the evaluation stack, dereferences it and loads + a value of the specified type. + + + + + + + Emits a store indirectopcode of the appropriate type for a value or object reference. + Pops a value of the specified type and a pointer off the evaluation stack, and + stores the value. + + + + + + + Summary description for PropertiesCollection. + + + + + Provides appropriate Stind.X opcode + for the type of primitive value to be stored indirectly. + + + + + Base class that exposes the common functionalities + to proxy generation. + + + TODO: + - Add tests and fixes for 'leaking this' problem + + + + + Used by dinamically implement + + + + + + Generates a parameters constructor that initializes the proxy + state with just to make it non-null. + + This constructor is important to allow proxies to be XML serializable + + + + + + If callbackMethod is null the InvokeOnTarget implementation + is just the code to throw an exception + + + + + + + + + + + + If callbackMethod is null the InvokeOnTarget implementation + is just the code to throw an exception + + + + + + + + If true the invocation will implement the IChangeProxyTarget interface + + + + + Generates the constructor for the nested class that extends + + + + + + + + + + Improvement: this cache should be static. We should generate a + type constructor instead + + + + + Performs some basic screening and invokes the + to select methods. + + + + + + + + Checks if the method is public or protected. + + + + + + + Attributes should be replicated if they are non-inheritable, + but there are some special cases where the attributes means + something to the CLR, where they should be skipped. + + + + + Checks if the method has the same signature as a method that was marked as + one that should generate a new vtable slot. + + + + + Initializes a new instance of the class. + + Type of the target. + The interfaces. + The options. + + + + + + + + + Initializes a new instance of the class. + + The emitter. + The add method. + The remove method. + The attributes. + + + + + + + + + Finds the type of the method on target. + + The method on interface. + Type of the proxy target. + /// if set to true will check implementation on mixins. + + + + + Checks whether the given types are the same. This is + more complicated than it looks. + + + + + + + + Checks whether the given methods are the same. + + + + True if the methods are the same. + + + + This is used by the ProxyObjectReference class durin de-serialiation, to know + which generator it should use + + + + + Returns the methods implemented by a type. Use this instead of Type.GetMethods() to work around a CLR issue + where duplicate MethodInfos are returned by Type.GetMethods() after a token of a generic type's method was loaded. + + + + + Handles the deserialization of proxies. + + + + + Resets the used for deserialization to a new scope. + + This is useful for test cases. + + + + Resets the used for deserialization to a given . + + The scope to be used for deserialization. + By default, the deserialization process uses a different scope than the rest of the application, which can lead to multiple proxies + being generated for the same type. By explicitly setting the deserialization scope to the application's scope, this can be avoided. + + + + Gets the used for deserialization. + + As has no way of automatically determining the scope used by the application (and the application + might use more than one scope at the same time), uses a dedicated scope instance for deserializing proxy + types. This instance can be reset and set to a specific value via and . + + + + Used during the target type inspection process. Implementors have a chance to customize the + proxy generation process. + + + + + Invoked by the generation process to determine if the specified method should be proxied. + + The type which declares the given method. + The method to inspect. + True if the given method should be proxied; false otherwise. + + + + Invoked by the generation process to notify that a member was not marked as virtual. + + The type which declares the non-virtual member. + The non-virtual member. + + Non-virtual members cannot be proxied. This method gives an opportunity to inspect + any non-virtual member of a type that has been requested to be proxied, and if + appropriate - throw an exception to notify the caller. + + + + + Invoked by the generation process to notify that the whole process has completed. + + + + + Applied to the assemblies saved by in order to persist the cache data included in the persisted assembly. + + + + + Default implementation of interface producing in-memory proxy assemblies. + + + + + Abstracts the implementation of proxy type construction. + + + + + Creates a proxy type for given , using provided. + + The class type to proxy. + The proxy generation options. + The generated proxy type. + Thrown when is a generic type definition. + Thrown when is not public. + Note that to avoid this exception, you can mark offending type internal, and define + pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. + + + + + Creates a proxy type for given , implementing , using provided. + + The class type to proxy. + Additional interface types to proxy. + The proxy generation options. + The generated proxy type. + + Implementers should return a proxy type for the specified class and interfaces. + Additional interfaces should be only 'mark' interfaces, that is, they should work like interface proxy without target. (See method.) + + Thrown when or any of is a generic type definition. + Thrown when or any of is not public. + Note that to avoid this exception, you can mark offending type internal, and define + pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. + + + + + Creates a proxy type that proxies calls to members on , implementing , using provided. + + The interface type to proxy. + Additional interface types to proxy. + Type implementing on which calls to the interface members should be intercepted. + The proxy generation options. + The generated proxy type. + + Implementers should return a proxy type for the specified interface that 'proceeds' executions to the specified target. + Additional interfaces should be only 'mark' interfaces, that is, they should work like interface proxy without target. (See method.) + + Thrown when or any of is a generic type definition. + Thrown when or any of is not public. + Note that to avoid this exception, you can mark offending type internal, and define + pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. + + + + + Creates a proxy type for given that delegates all calls to the provided interceptors. + + The interface type to proxy. + Additional interface types to proxy. + The proxy generation options. + The generated proxy type. + + Implementers should return a proxy type for the specified interface and additional interfaces that delegate all executions to the specified interceptors. + + Thrown when or any of is a generic type definition. + Thrown when or any of is not public. + Note that to avoid this exception, you can mark offending type internal, and define + pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. + + + + + Creates a proxy type for given and that delegates all calls to the provided interceptors and allows interceptors to switch the actual target of invocation. + + The interface type to proxy. + Additional interface types to proxy. + The proxy generation options. + The generated proxy type. + + Implementers should return a proxy type for the specified interface(s) that delegate all executions to the specified interceptors + and uses an instance of the interface as their targets (i.e. ), rather than a class. All classes should then implement interface, + to allow interceptors to switch invocation target with instance of another type implementing called interface. + + Thrown when or any of is a generic type definition. + Thrown when or any of is not public. + Note that to avoid this exception, you can mark offending type internal, and define + pointing to Castle Dynamic Proxy assembly, in assembly containing that type, if this is appropriate. + + + + + Gets the associated with this builder. + + The module scope associated with this builder. + + + + Initializes a new instance of the class with new . + + + + + Initializes a new instance of the class. + + The module scope for generated proxy types. + + + + Provides an extension point that allows proxies to choose specific interceptors on + a per method basis. + + + + + Selects the interceptors that should intercept calls to the given . + + The type declaring the method to intercept. + The method that will be intercepted. + All interceptors registered with the proxy. + An array of interceptors to invoke upon calling the . + + This method is called only once per proxy instance, upon the first call to the + . Either an empty array or null are valid return values to indicate + that no interceptor should intercept calls to the method. Although it is not advised, it is + legal to return other implementations than these provided in + . A better way to do this, is by passing all the required + interceptors to the appropriate method of . You can use this + method to influence the order in which interceptors will be called, by reordering the array. + Returning an array containing null references (Nothing in Visual Basic) is not legal, + and will result in a runtime exception. + + + + + + Determines whether this assembly has internals visible to dynamic proxy. + + The assembly to inspect. + + + + Determines whether the specified method is internal. + + The method. + + true if the specified method is internal; otherwise, false. + + + + + Because we need to cache the types based on the mixed in mixins, we do the following here: + - Get all the mixin interfaces + - Sort them by full name + - Return them by position + + The idea is to have reproducable behavior for the case that mixins are registered in different orders. + This method is here because it is required + + + + + Summary description for ModuleScope. + + + + + The default file name used when the assembly is saved using . + + + + + The default assembly (simple) name used for the assemblies generated by a instance. + + + + + Initializes a new instance of the class; assemblies created by this instance will not be saved. + + + + + Initializes a new instance of the class, allowing to specify whether the assemblies generated by this instance + should be saved. + + If set to true saves the generated module. + + + + Initializes a new instance of the class, allowing to specify whether the assemblies generated by this instance + should be saved and what simple names are to be assigned to them. + + If set to true saves the generated module. + The simple name of the strong-named assembly generated by this . + The path and file name of the manifest module of the strong-named assembly generated by this . + The simple name of the weak-named assembly generated by this . + The path and file name of the manifest module of the weak-named assembly generated by this . + + + + Returns a type from this scope's type cache, or null if the key cannot be found. + + The key to be looked up in the cache. + The type from this scope's type cache matching the key, or null if the key cannot be found + + + + Registers a type in this scope's type cache. + + The key to be associated with the type. + The type to be stored in the cache. + + + + Gets the key pair used to sign the strong-named assembly generated by this . + + + + + + Gets the specified module generated by this scope, creating a new one if none has yet been generated. + + If set to true, a strong-named module is returned; otherwise, a weak-named module is returned. + A strong-named or weak-named module generated by this scope, as specified by the parameter. + + + + Gets the strong-named module generated by this scope, creating a new one if none has yet been generated. + + A strong-named module generated by this scope. + + + + Gets the weak-named module generated by this scope, creating a new one if none has yet been generated. + + A weak-named module generated by this scope. + + + + Saves the generated assembly with the name and directory information given when this instance was created (or with + the and current directory if none was given). + + + + This method stores the generated assembly in the directory passed as part of the module information specified when this instance was + constructed (if any, else the current directory is used). If both a strong-named and a weak-named assembly + have been generated, it will throw an exception; in this case, use the overload. + + + If this was created without indicating that the assembly should be saved, this method does nothing. + + Both a strong-named and a weak-named assembly have been generated. + The path of the generated assembly file, or null if no file has been generated. + + + + Saves the specified generated assembly with the name and directory information given when this instance was created + (or with the and current directory if none was given). + + True if the generated assembly with a strong name should be saved (see ); + false if the generated assembly without a strong name should be saved (see . + + + This method stores the specified generated assembly in the directory passed as part of the module information specified when this instance was + constructed (if any, else the current directory is used). + + + If this was created without indicating that the assembly should be saved, this method does nothing. + + + No assembly has been generated that matches the parameter. + + The path of the generated assembly file, or null if no file has been generated. + + + + Loads the generated types from the given assembly into this 's cache. + + The assembly to load types from. This assembly must have been saved via or + , or it must have the manually applied. + + This method can be used to load previously generated and persisted proxy types from disk into this scope's type cache, eg. in order + to avoid the performance hit associated with proxy generation. + + + + + Users of this should use this lock when accessing the cache. + + + + + Gets the strong-named module generated by this scope, or if none has yet been generated. + + The strong-named module generated by this scope, or if none has yet been generated. + + + + Gets the file name of the strongly named module generated by this scope. + + The file name of the strongly named module generated by this scope. + + + + Gets the directory where the strongly named module generated by this scope will be saved, or if the current directory + is used. + + The directory where the strongly named module generated by this scope will be saved when is called + (if this scope was created to save modules). + + + + Gets the weak-named module generated by this scope, or if none has yet been generated. + + The weak-named module generated by this scope, or if none has yet been generated. + + + + Gets the file name of the weakly named module generated by this scope. + + The file name of the weakly named module generated by this scope. + + + + Gets the directory where the weakly named module generated by this scope will be saved, or if the current directory + is used. + + The directory where the weakly named module generated by this scope will be saved when is called + (if this scope was created to save modules). + + + + ProxyBuilder that persists the generated type. + + + The saved assembly contains just the last generated type. + + + + + Initializes a new instance of the class. + + + + + Saves the generated assembly to a physical file. Note that this renders the unusable. + + The path of the generated assembly file, or null if no assembly has been generated. + This method does not support saving multiple files. If both a signed and an unsigned module have been generated, use the + respective methods of the . + + + + Initializes a new instance of the class. + + The hook. + + + + Initializes a new instance of the class. + + + + + Provides proxy objects for classes and interfaces. + + + + + Initializes a new instance of the class. + + Proxy types builder. + + + + Initializes a new instance of the class. + + + + + Creates proxy object intercepting calls to members of interface on object with given . + + Type of the interface implemented by which will be proxied. + The target object, calls to which will be intercepted. + The interceptors called during the invocation of proxied methods. + Object proxying calls to members of on object. + Thrown when given object is a null reference (Nothing in Visual Basic). + Thrown when given array is a null reference (Nothing in Visual Basic). + Thrown when given is not an interface type. + Thrown when no default constructor exists on actual type of object. + Thrown when default constructor of actual type of throws an exception. + + This method uses implementation to generate a proxy type. + As such caller should expect any type of exception that given implementation may throw. + + + + + Creates proxy object intercepting calls to members of interface on object with given . + + Type of the interface implemented by which will be proxied. + The target object, calls to which will be intercepted. + The proxy generation options used to influence generated proxy type and object. + The interceptors called during the invocation of proxied methods. + + Object proxying calls to members of on object. + + Thrown when given object is a null reference (Nothing in Visual Basic). + Thrown when given array is a null reference (Nothing in Visual Basic). + Thrown when given is not an interface type. + Thrown when no default constructor exists on actual type of object. + Thrown when default constructor of actual type of throws an exception. + + This method uses implementation to generate a proxy type. + As such caller should expect any type of exception that given implementation may throw. + + + + + Creates proxy object intercepting calls to members of interface on object with given . + + Type of the interface implemented by which will be proxied. + The target object, calls to which will be intercepted. + The interceptors called during the invocation of proxied methods. + + Object proxying calls to members of type on object. + + Thrown when given object is a null reference (Nothing in Visual Basic). + Thrown when given object is a null reference (Nothing in Visual Basic). + Thrown when given array is a null reference (Nothing in Visual Basic). + Thrown when given is a generic type definition. + Thrown when given is not an interface type. + Thrown when given does not implement interface. + Thrown when no default constructor exists on actual type of object. + Thrown when default constructor of actual type of throws an exception. + + This method uses implementation to generate a proxy type. + As such caller should expect any type of exception that given implementation may throw. + + + + + Creates proxy object intercepting calls to members of interface on object with given . + + Type of the interface implemented by which will be proxied. + The target object, calls to which will be intercepted. + The proxy generation options used to influence generated proxy type and object. + The interceptors called during the invocation of proxied methods. + + Object proxying calls to members of type on object. + + Thrown when given object is a null reference (Nothing in Visual Basic). + Thrown when given object is a null reference (Nothing in Visual Basic). + Thrown when given array is a null reference (Nothing in Visual Basic). + Thrown when given is a generic type definition. + Thrown when given is not an interface type. + Thrown when given does not implement interface. + Thrown when no default constructor exists on actual type of object. + Thrown when default constructor of actual type of throws an exception. + + This method uses implementation to generate a proxy type. + As such caller should expect any type of exception that given implementation may throw. + + + + + Creates proxy object intercepting calls to members of interface on object with given . + + Type of the interface implemented by which will be proxied. + The target object, calls to which will be intercepted. + Additional interface types. Calls to their members will be proxied as well. + The interceptors called during the invocation of proxied methods. + + Object proxying calls to members of and types on object. + + Thrown when given object is a null reference (Nothing in Visual Basic). + Thrown when given object is a null reference (Nothing in Visual Basic). + Thrown when given array is a null reference (Nothing in Visual Basic). + Thrown when given or any of is a generic type definition. + Thrown when given is not an interface type. + Thrown when given does not implement interface. + Thrown when no default constructor exists on actual type of object. + Thrown when default constructor of actual type of throws an exception. + + This method uses implementation to generate a proxy type. + As such caller should expect any type of exception that given implementation may throw. + + + + + Creates proxy object intercepting calls to members of interface on object with given . + + Type of the interface implemented by which will be proxied. + The target object, calls to which will be intercepted. + The proxy generation options used to influence generated proxy type and object. + Additional interface types. Calls to their members will be proxied as well. + The interceptors called during the invocation of proxied methods. + + Object proxying calls to members of and types on object. + + Thrown when given object is a null reference (Nothing in Visual Basic). + Thrown when given object is a null reference (Nothing in Visual Basic). + Thrown when given array is a null reference (Nothing in Visual Basic). + Thrown when given or any of is a generic type definition. + Thrown when given is not an interface type. + Thrown when given does not implement interface. + Thrown when no default constructor exists on actual type of object. + Thrown when default constructor of actual type of throws an exception. + + This method uses implementation to generate a proxy type. + As such caller should expect any type of exception that given implementation may throw. + + + + + Creates proxy object intercepting calls to members of interface on object with given . + Interceptors can use interface to provide other target for method invocation than default . + + Type of the interface implemented by which will be proxied. + The target object, calls to which will be intercepted. + The interceptors called during the invocation of proxied methods. + + Object proxying calls to members of type on object or alternative implementation swapped at runtime by an interceptor. + + Thrown when given object is a null reference (Nothing in Visual Basic). + Thrown when given object is a null reference (Nothing in Visual Basic). + Thrown when given array is a null reference (Nothing in Visual Basic). + Thrown when given is a generic type definition. + Thrown when given is not an interface type. + Thrown when given does not implement interface. + Thrown when no default constructor exists on actual type of object. + Thrown when default constructor of actual type of throws an exception. + + This method uses implementation to generate a proxy type. + As such caller should expect any type of exception that given implementation may throw. + + + + + Creates proxy object intercepting calls to members of interface on object with given . + Interceptors can use interface to provide other target for method invocation than default . + + Type of the interface implemented by which will be proxied. + The target object, calls to which will be intercepted. + The proxy generation options used to influence generated proxy type and object. + The interceptors called during the invocation of proxied methods. + + Object proxying calls to members of type on object or alternative implementation swapped at runtime by an interceptor. + + Thrown when given object is a null reference (Nothing in Visual Basic). + Thrown when given object is a null reference (Nothing in Visual Basic). + Thrown when given array is a null reference (Nothing in Visual Basic). + Thrown when given is a generic type definition. + Thrown when given is not an interface type. + Thrown when given does not implement interface. + Thrown when no default constructor exists on actual type of object. + Thrown when default constructor of actual type of throws an exception. + + This method uses implementation to generate a proxy type. + As such caller should expect any type of exception that given implementation may throw. + + + + + Creates proxy object intercepting calls to members of interface on object with given . + Interceptors can use interface to provide other target for method invocation than default . + + Type of the interface implemented by which will be proxied. + The target object, calls to which will be intercepted. + The proxy generation options used to influence generated proxy type and object. + Additional interface types. Calls to their members will be proxied as well. + The interceptors called during the invocation of proxied methods. + + Object proxying calls to members of and types on object or alternative implementation swapped at runtime by an interceptor. + + Thrown when given object is a null reference (Nothing in Visual Basic). + Thrown when given object is a null reference (Nothing in Visual Basic). + Thrown when given array is a null reference (Nothing in Visual Basic). + Thrown when given or any of is a generic type definition. + Thrown when given is not an interface type. + Thrown when given does not implement interface. + Thrown when no default constructor exists on actual type of object. + Thrown when default constructor of actual type of throws an exception. + + This method uses implementation to generate a proxy type. + As such caller should expect any type of exception that given implementation may throw. + + + + + Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . + + Type of the interface which will be proxied. + The interceptors called during the invocation of proxied methods. + + Object proxying calls to members of types on generated target object. + + Thrown when given object is a null reference (Nothing in Visual Basic). + Thrown when given is not an interface type. + + Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. + They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. + This method uses implementation to generate a proxy type. + As such caller should expect any type of exception that given implementation may throw. + + + + + Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . + + Type of the interface which will be proxied. + The interceptors called during the invocation of proxied methods. + + Object proxying calls to members of types on generated target object. + + Thrown when given array is a null reference (Nothing in Visual Basic). + Thrown when given is not an interface type. + + Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. + They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. + As a result of that also at least one implementation must be provided. + This method uses implementation to generate a proxy type. + As such caller should expect any type of exception that given implementation may throw. + + + + + Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . + + Type of the interface which will be proxied. + The interceptor called during the invocation of proxied methods. + + Object proxying calls to members of type on generated target object. + + Thrown when given object is a null reference (Nothing in Visual Basic). + Thrown when given object is a null reference (Nothing in Visual Basic). + Thrown when given is a generic type definition. + Thrown when given is not an interface type. + + Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. + They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. + This method uses implementation to generate a proxy type. + As such caller should expect any type of exception that given implementation may throw. + + + + + Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . + + Type of the interface which will be proxied. + The interceptors called during the invocation of proxied methods. + + Object proxying calls to members of type on generated target object. + + Thrown when given object is a null reference (Nothing in Visual Basic). + Thrown when given array is a null reference (Nothing in Visual Basic). + Thrown when given is a generic type definition. + Thrown when given is not an interface type. + + Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. + They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. + This method uses implementation to generate a proxy type. + As such caller should expect any type of exception that given implementation may throw. + + + + + Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . + + Type of the interface which will be proxied. + Additional interface types. Calls to their members will be proxied as well. + The interceptors called during the invocation of proxied methods. + + Object proxying calls to members of and types on generated target object. + + Thrown when given object is a null reference (Nothing in Visual Basic). + Thrown when given array is a null reference (Nothing in Visual Basic). + Thrown when given or any of is a generic type definition. + Thrown when given is not an interface type. + + Since this method uses an empty-shell implementation of interfaces to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. + They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. + This method uses implementation to generate a proxy type. + As such caller should expect any type of exception that given implementation may throw. + + + + + Creates proxy object intercepting calls to members of interface on target object generated at runtime with given . + + Type of the interface which will be proxied. + The proxy generation options used to influence generated proxy type and object. + Additional interface types. Calls to their members will be proxied as well. + The interceptors called during the invocation of proxied methods. + + Object proxying calls to members of and types on generated target object. + + Thrown when given object is a null reference (Nothing in Visual Basic). + Thrown when given array is a null reference (Nothing in Visual Basic). + Thrown when given or any of is a generic type definition. + Thrown when given is not an interface type. + + Since this method uses an empty-shell implementation of to proxy generated at runtime, the actual implementation of proxied methods must be provided by given implementations. + They are responsible for setting return value (and out parameters) on proxied methods. It is also illegal for an interceptor to call , since there's no actual implementation to proceed with. + This method uses implementation to generate a proxy type. + As such caller should expect any type of exception that given implementation may throw. + + + + + Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . + + Type of class which will be proxied. + The interceptors called during the invocation of proxied methods. + + New object of type proxying calls to virtual members of type. + + Thrown when given is not a class type. + Thrown when no default constructor exists on type . + Thrown when default constructor of type throws an exception. + + This method uses implementation to generate a proxy type. + As such caller should expect any type of exception that given implementation may throw. + + + + + Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . + + Type of class which will be proxied. + The interceptors called during the invocation of proxied methods. + + New object of type proxying calls to virtual members of type. + + Thrown when given object is a null reference (Nothing in Visual Basic). + Thrown when given is a generic type definition. + Thrown when given is not a class type. + Thrown when no default constructor exists on type . + Thrown when default constructor of type throws an exception. + + This method uses implementation to generate a proxy type. + As such caller should expect any type of exception that given implementation may throw. + + + + + Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . + + Type of class which will be proxied. + Additional interface types. Calls to their members will be proxied as well. + The interceptors called during the invocation of proxied methods. + + New object of type proxying calls to virtual members of and types. + + Thrown when given object is a null reference (Nothing in Visual Basic). + Thrown when given or any of is a generic type definition. + Thrown when given is not a class type. + Thrown when no default constructor exists on type . + Thrown when default constructor of type throws an exception. + + This method uses implementation to generate a proxy type. + As such caller should expect any type of exception that given implementation may throw. + + + + + Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . + + Type of class which will be proxied. + Arguments of constructor of type which should be used to create a new instance of that type. + The interceptors called during the invocation of proxied methods. + + New object of type proxying calls to virtual members of type. + + Thrown when given object is a null reference (Nothing in Visual Basic). + Thrown when given is a generic type definition. + Thrown when given is not a class type. + Thrown when no constructor exists on type with parameters matching . + Thrown when constructor of type throws an exception. + + This method uses implementation to generate a proxy type. + As such caller should expect any type of exception that given implementation may throw. + + + + + Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . + + Type of class which will be proxied. + The proxy generation options used to influence generated proxy type and object. + The interceptors called during the invocation of proxied methods. + + New object of type proxying calls to virtual members of type. + + Thrown when given object is a null reference (Nothing in Visual Basic). + Thrown when given object is a null reference (Nothing in Visual Basic). + Thrown when given is a generic type definition. + Thrown when given is not a class type. + Thrown when no default constructor exists on type . + Thrown when default constructor of type throws an exception. + + This method uses implementation to generate a proxy type. + As such caller should expect any type of exception that given implementation may throw. + + + + + Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . + + Type of class which will be proxied. + Additional interface types. Calls to their members will be proxied as well. + The proxy generation options used to influence generated proxy type and object. + The interceptors called during the invocation of proxied methods. + + New object of type proxying calls to virtual members of and types. + + Thrown when given object is a null reference (Nothing in Visual Basic). + Thrown when given object is a null reference (Nothing in Visual Basic). + Thrown when given or any of is a generic type definition. + Thrown when given is not a class type. + Thrown when no default constructor exists on type . + Thrown when default constructor of type throws an exception. + + This method uses implementation to generate a proxy type. + As such caller should expect any type of exception that given implementation may throw. + + + + + Creates proxy object intercepting calls to virtual members of type on newly created instance of that type with given . + + Type of class which will be proxied. + Additional interface types. Calls to their members will be proxied as well. + The proxy generation options used to influence generated proxy type and object. + Arguments of constructor of type which should be used to create a new instance of that type. + The interceptors called during the invocation of proxied methods. + + New object of type proxying calls to virtual members of and types. + + Thrown when given object is a null reference (Nothing in Visual Basic). + Thrown when given object is a null reference (Nothing in Visual Basic). + Thrown when given or any of is a generic type definition. + Thrown when given is not a class type. + Thrown when no constructor exists on type with parameters matching . + Thrown when constructor of type throws an exception. + + This method uses implementation to generate a proxy type. + As such caller should expect any type of exception that given implementation may throw. + + + + + Creates the proxy type for class proxy with given class, implementing given and using provided . + + The base class for proxy type. + The interfaces that proxy type should implement. + The options for proxy generation process. + of proxy. + + + + Creates the proxy type for interface proxy with target for given interface, implementing given on given and using provided . + + The interface proxy type should implement. + The additional interfaces proxy type should implement. + Actual type that the proxy type will encompass. + The options for proxy generation process. + of proxy. + + + + Creates the proxy type for interface proxy with target interface for given interface, implementing given on given and using provided . + + The interface proxy type should implement. + The additional interfaces proxy type should implement. + Actual type that the proxy type will encompass. + The options for proxy generation process. + of proxy. + + + + Creates the proxy type for interface proxy without target for given interface, implementing given and using provided . + + The interface proxy type should implement. + The additional interfaces proxy type should implement. + The options for proxy generation process. + of proxy. + + + + Gets the proxy builder instance used to generate proxy types. + + The proxy builder. + + + + + + + + + + + + + + + For interface proxies, this will point to the + on the target class + + + + diff --git a/lib/Castle.MicroKernel.xml b/lib/Castle.MicroKernel.xml index 20319994400..457f1d8a60e 100644 --- a/lib/Castle.MicroKernel.xml +++ b/lib/Castle.MicroKernel.xml @@ -1,5484 +1,5484 @@ - - - - Castle.MicroKernel - - - - - Abstract implementation of . - The implementors must only override the InternalCreate and - InternalDestroy methods in order to perform their creation and - destruction logic. - - - - - Implements the instance creation logic. The default - implementation should rely on an ordinary call to - Activator.CreateInstance(). - - - This interface is provided in order to allow custom components - to be created using a different logic, such as using a specific factory - or builder. - - The constructor for implementation has the following signature: - - - ComponentModel model, IKernel kernel, - ComponentInstanceDelegate onCreation, - ComponentInstanceDelegate onDestruction - - - The Activator should raise the events onCreation and onDestruction - in order to correctly implement the contract. Usually the best - way of creating a custom activator is by extending the existing ones. - - - - - - - - Should return a new component instance. - - - - - - Should perform all necessary work to dispose the instance - and/or any resource related to it. - - - - - - Constructs an AbstractComponentActivator - - - - - Summary description for ComponentActivatorException. - - - - - Standard implementation of . - Handles the selection of the best constructor, fills the - writable properties the component exposes, run the commission - and decommission lifecycles, etc. - - - Custom implementors can just override the CreateInstance method. - Please note however that the activator is responsible for the proxy creation - when needed. - - - - - Initializes a new instance of the class. - - - - - - - - - Attempts to dynamically load a UserControl by invoking Page.LoadControl. - There are two uses of this class. - - 1) Add a component to the Kernel and add a VirtualPath attribute specifying - the relative path of the .ascx file for the associated UserControl. (easy) - - - - <component id="BasketView" - service="Castle.ShoppingCart.IBasketView, Castle.ShoppingCart" - type="Castle.ShoppingCart.BasketView, Castle.ShoppingCart" - lifestyle="transient" - virtualPath="~/Views/BasketView.ascx" - /> - - - - 2) Precompile a UserControl and add the pre-compiled class to the Kernel. (hard) - Has not been tested with proxies. - - - - - - Initializes a new instance of the class. - - The model. - The kernel. - The on creation. - The on destruction. - - - - Creates the instance. - - The context. - The arguments. - The signature. - - - - - - - - - - Used during a component request, passed along to the whole process. - This allow some data to be passed along the process, which is used - to detected cycled dependency graphs and now it's also being used - to provide arguments to components. - - - - - Implementors should use a strategy to obtain - valid references to properties and/or services - requested in the dependency model. - - - - - Should return an instance of a service or property values as - specified by the dependency model instance. - It is also the responsability of - to throw an exception in the case a non-optional dependency - could not be resolved. - - Creation context, which is a resolver itself - Parent resolver - normally the IHandler implementation - Model of the component that is requesting the dependency - The dependency model - The dependency resolved value or null - - - - Returns true if the resolver is able to satisfy this dependency. - - Creation context, which is a resolver itself - Parent resolver - normally the IHandler implementation - Model of the component that is requesting the dependency - The dependency model - true if the dependency can be satisfied - - - - Holds the scoped dependencies being resolved. - If a dependency appears twice on the same scope, we'd have a cycle. - - - - - The list of handlers that are used to resolve - the component. - We track that in order to try to avoid attempts to resolve a service - with itself. - - - - - Initializes a new instance of the class. - - The type to extract generic arguments. - The parent context. - - - - Initializes a new instance of the class. - - The handler. - The release policy. - The type to extract generic arguments. - The additional arguments. - The conversion manager. - - - - Initializes a new instance of the class. - - - - - Check if we are now in the middle of resolving this handler, - and as such, we shouldn't try to resolve that. - - - - Creates a new, empty instance. - A new CreationContext should be created every time, as the contexts keeps some state related to dependency resolution. - - - - Pendent - - - - - Extends adding and - information. Th MemberInfo is only useful to provide detailed information - on exceptions. - The ComponentModel is required so we can get resolve an object that takes as a parameter itself, but - with difference model. (See IoC 51 for the details) - - - - - Exception throw when a circular dependency is detected - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The message. - - - - Initializes a new instance of the class. - - The message. - The inner exception. - - - - Initializes a new instance of the class. - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - The parameter is . - The class name is or is zero (0). - - - - Exception threw when a request for a component - cannot be satisfied because the component does not - exist in the container - - - - - Initializes a new instance of the class. - - The name. - - - - Initializes a new instance of the class. - - The service. - - - - Initializes a new instance of the class. - - The object that holds the serialized object data. - The contextual information about the source or destination. - - - - Exception threw when there is a problem - registering a component - - - - - Initializes a new instance of the class. - - The message. - - - - Initializes a new instance of the class. - - The object that holds the serialized object data. - The contextual information about the source or destination. - - - - Exception threw by Kernel operations that failed - for some reason. - - - - - Initializes a new instance of the class. - - The message. - - - - Initializes a new instance of the class. - - The message. - The inner exception. - - - - Initializes a new instance of the class. - - The object that holds the serialized object data. - The contextual information about the source or destination. - - - - Exception that is thrown when a error occurs during the Event Wiring process - - - - - Base exception to be used by facilities. - - - - - Initializes a new instance of the class. - - The message. - - - - Initializes a new instance of the class. - - The message. - The inner exception. - - - - Initializes a new instance of the class. - - The object that holds the serialized object data. - The contextual information about the source or destination. - - - - Facility to allow components to dynamically subscribe to events offered by - other components. We call the component that offers events publishers and - the components that uses them, subscribers. - - - A component that wish to subscribe to an event must use the external configuration - adding a node subscribers on the publisher. This node can have multiple entries using the - subscriber node. - - - This example shows two simple components: one is the event publisher and the other is the - subscriber. The subscription will be done by the facility, using the publisher associated configuration. - The Publisher class: - - public class SimplePublisher - { - public event PublishEventHandler Event; - - public void Trigger() - { - if (Event != null) - { - Event(this, new EventArgs()); - } - } - } - - The Subscriber class: - - public class SimpleListener - { - private bool _listened; - private object _sender; - - public void OnPublish(object sender, EventArgs e) - { - _sender = sender; - _listened = sender != null; - } - - public bool Listened - { - get { return _listened; } - } - - public object Sender - { - get { return _sender; } - } - } - - The configuration file: - - - - - - - - - - - - - - - - - - ]]> - - - - - - Base class for facilities. - - - - - Unit of extension. A facility should use - the extension points offered by the kernel - to augment its functionality. - - - - - - - - - - - - - - - - - The custom initialization for the Facility. - - It must be overriden. - - - - Initializes the facility. First it performs the initialization common for all - facilities, setting the and the - . After it, the Init method is invoked - and the custom initilization is perfomed. - - - - - - - Terminates the Facility, invokes the method and sets - the Kernel to a null reference. - - - - - Performs the tasks associated with freeing, releasing, or resetting - the facility resources. - - It can be overriden. - - - - Gets the where the facility is registered. - - The . - - - - Gets the facility configuration. - - The representing - the facility configuration. - - - - Overriden. Initializes the facility, subscribing to the , - , Kernel events. - - - - - Checks if the component we're dealing is a publisher. If it is, - parses the configuration (the subscribers node) getting the event wiring info. - - The component model. - Invalid and/or a error in the configuration - - - - Checks if the component we're dealing is a publisher. If it is, - iterates the subscribers starting them and wiring the events. - - The component model. - The instance representing the component. - When the subscriber is not found -
or
- The handler method isn't found -
or
- The event isn't found -
-
- - - Represents the information about an event. - - - - - Initializes a new instance of the class. - - Name of the event. - The name of the handler method. - - - - Serves as a hash function for a particular type. - - - A hash code for the current . - - - - - Determines whether the specified is equal to the current . - - The to compare with the current . - - true if the specified is equal to the current ; otherwise, false. - - - - - Gets the name of the event. - - The name of the event. - - - - Gets the handler method name. - - The handler. - - - - - - - - - Activates a object connecting to the remote server. - - - - - Initializes a new instance of the class. - - The model. - The kernel. - The oncreation event handler. - The ondestruction event handler. - - - - Activates a client connecting to the remote server, enforcing the uri and the server activation. - - - - - Initializes a new instance of the class. - - The model. - The kernel. - The oncreation event handler. - The ondestruction event handler. - - - - Activates a client connecting to the remote server through the . - - - - - Initializes a new instance of the class. - - The model. - The kernel. - The oncreation envent handler. - The ondestruction event handler. - - - - Activates a client activated object. - - - - - Initializes a new instance of the class. - - The model. - The kernel. - The oncreation event handler. - The ondestruction event handler. - - - - Activates and publishes a server object. - - - - - Initializes a new instance of the class. - - The model. - The kernel. - The oncreation event handler. - The ondestruction event handler. - - - - Facility to allow the communication with remote kernel, using the .NET Remoting infraestructure. - - - TODO - - - TODO - - - - - Used for client side (Expand explanation) - - - - - Used for server side. - Holds the local registry - - - - - Used for client side. - Holds a remote proxy to the server registry - - - - - Constructs a RemotingFacility - - - - - Performs the tasks associated with freeing, releasing, or resetting - the facility resources. - - It can be overriden. - - - - Inspects the model looking for remote component configuration. If found, - do the component Remoting configuration. - - - - - Implementors must inspect the component for - a given information or parameter. - - - - - Usually the implementation will look in the configuration property - of the model or the service interface, or the implementation looking for - something. - - The kernel instance - The component model - - - - Initializes a new instance of the class. - - The converter. - if set to true is a server. - if set to true is a client. - The base URI. - The remote registry. - The local registry. - - - - Client components are not created by the container - so there's no point collecting constructor dependencies - - - - - - Used in case of generics: - - - - - - - For each new component registered, - some components in the WaitingDependency - state may have became valid, so we check them - - - - - Request the component instance - - - - - - Represents a concern that will be applied to a component instance - during commission or decomission phase. - - - - - Implementors should act on the instance in response to - a decomission or commission phase. - - The model. - The component. - - - - Summary description for FactoryInterceptor. - - - - - Summary description for TypedFactoryFacility. - - - - - Implements the basis of - - - - - Contract for the IHandler, which manages an - component state and coordinates its creation - and destruction (dispatching to activators, lifestyle managers) - - - - - Initializes the handler with a reference to the - kernel. - - - - - - Implementors should return a valid instance - for the component the handler is responsible. - It should throw an exception in the case the component - can't be created for some reason - - - - - - Implementors should dispose the component instance - - - - - - Dictionary of String/object used to - associate data with a component dependency. - For example, if you component SmtpServer depends on - host and port, you can add those to this - dictionary and the handler will be able to use them. - - - TODO: Document this - - - - - TODO: Document this - - - - - - TODO: Document this - - - - - - - Gets the state of the handler - - - - - Gets the model of the component being - managed by this handler. - - - - - The serivce that this handler handles - - - - - Allow to track state changes of a handler that is modified directly. - This can happen if the client calls AddCustomDependencyValue or - RemoveCustomDependencyValue - - - - - Might be implemented by a handler - so it can expose access to dependency information - which is used to construct meaningful error messages - - - - - Returns human readable list of dependencies - this handler is waiting for. - list of the dependecies that was already checked, used to avoid cycles. - - - - - Dictionary of Type to a list of - - - - - Dictionary of key (string) to - - - - - Custom dependencies values associated with the handler - - - - - Lifestyle manager instance - - - - - Constructs and initializes the handler - - - - - - Saves the kernel instance, subscribes to - event, - creates the lifestyle manager instance and computes - the handler state. - - - - - - Should be implemented by derived classes: - returns an instance of the component this handler - is responsible for - - - - - - - Should be implemented by derived classes: - disposes the component instance (or recycle it) - - - - - - TODO: Pendent - - - - - - - TODO: Pendent - - - - - - - TODO: Pendent - - - - - - Returns human readable list of dependencies - this handler is waiting for. - - - - - - Creates an implementation of based - on and invokes - to initialize the newly created manager. - - - - - - - Checks if the handler is able to, at very least, satisfy - the dependencies for the constructor with less parameters - - - For each non*optional dependency, the implementation will invoke - - - - - - Invoked by - in order to check if a dependency can be satisfied. - If not, the handler is set to a 'waiting dependency' state. - - - This method registers the dependencies within the correct collection - or dictionary and changes the handler state to - - - - - - - Invoked by the kernel - when one of registered dependencies were satisfied by - new components registered. - - - Handler for the event - - - - - - - Invoked when the container receives a parent container reference. - - - This method implementation checks whether the parent container - is able to supply the dependencies for this handler. - - - - - - - Handler for the event - - - - - - - Gets the handler state. - - - - - Gets the component model. - - - - - - - - - - Summary description for DefaultGenericHandler. - - - TODO: Consider refactoring AbstractHandler moving lifestylemanager - creation to DefaultHandler - - - - - Initializes a new instance of the class. - - - - - - Clone some of the parent componentmodel properties to the generic subhandler. - - - The following properties are copied: - - - The - - - The - - - - the subhandler - - - - Summary description for DefaultHandler. - - - - - Initializes a new instance of the class. - - - - - - Returns an instance of the component this handler - is responsible for - - - - - - - disposes the component instance (or recycle it) - - - - - - Summary description for DefaultHandlerFactory. - - - - - Extension point to allow the developer - to use his implementation of - - - - - Summary description for HandlerException. - - - - - Initializes a new instance of the class. - - The message. - - - - Initializes a new instance of the class. - - The object that holds the serialized object data. - The contextual information about the source or destination. - - - - Possible states for a IHandler instance - - - - - The component can be requested - - - - - The component can not be requested - as it still depending on a external - dependency not yet available - - - - - - - - - - - - Redirects resolution to the main resolver, and if not found uses - the parent handler. - - - - - Initializes a new instance of the class. - - The parent handler. - The child resolver. - - - - Summary description for DisposalConcern. - - - - - Summary description for InitializationConcern. - - - - - Summary description for SupportInitializeConcern. - - - - - Pool implementation contract. - - - - - Implementors should return a component instance. - - - - - - Implementors should release the instance or put it - on the pool - - - - - - Initializes the pool to a initial size by requesting - n components and then releasing them. - - - - - Summary description for AbstractLifestyleManager. - - - - - The ILifestyleManager implements - a strategy for a given lifestyle, like singleton, perthread - and transient. - - - The responsability of ILifestyleManager - is only the management of lifestyle. It should rely on - to obtain a new component instance - - - - - Initializes the ILifestyleManager with the - - - - - - - - - Implementors should return the component instance based - on the lifestyle semantic. - - - - - - Implementors should release the component instance based - on the lifestyle semantic, for example, singleton components - should not be released on a call for release, instead they should - release them when disposed is invoked. - - - - - - Summary description for PerThreadLifestyleManager. - - - - - - - - - - Implements a Lifestyle Manager for Web Apps that - create at most one object per web request. - - - - - Implements a Poolable Lifestyle Manager. - - - - - Summary description for SingletonLifestyleManager. - - - - - Summary description for TransientLifestyleManager. - - - - - Inspects the component configuration and the type looking for a - definition of component activator type. The configuration preceeds whatever - is defined in the component. - - - This inspector is not guarantee to always set up an component activator type. - If nothing could be found it wont touch the model. In this case is up to - the kernel to establish a default component activator for components. - - - - - Seaches for the component activator in the configuration and, if unsuccessful - look for the component activator attribute in the implementation type. - - The kernel instance - The model instance - - - - Reads the attribute "componentActivatorType" associated with the - component configuration and verifies it implements the - interface. - - - If the type does not implement the proper interface - - - - - - - Check if the type expose one of the component activator attributes - defined in Castle.Core namespace. - - - - - - Validates that the provide type implements IComponentActivator - - The custom component activator. - - - - Inspects the component configuration and type looking for information - that can influence the generation of a proxy for that component. - - We specifically look for useSingleInterfaceProxy and marshalByRefProxy - on the component configuration or the - attribute. - - - - - - Seaches for proxy behavior in the configuration and, if unsuccessful - look for the attribute in - the implementation type. - - - - - Reads the proxy behavior associated with the - component configuration/type and applies it to the model. - - - If the conversion fails - - - - - - - Returns a instance if the type - uses the attribute. Otherwise returns null. - - - - - - Uses the ConfigurationStore registered in the kernel to obtain - an associated with the component. - - - - - Queries the kernel's ConfigurationStore for a configuration - associated with the component name. - - - - - - - Check for a node 'parameters' within the component - configuration. For each child it, a ParameterModel is created - and added to ComponentModel's Parameters collection - - - - - Inspect the configuration associated with the component - and populates the parameter model collection accordingly - - - - - - - This implementation of - collects all available constructors and populates them in the model - as candidates. The Kernel will pick up one of the candidates - according to a heuristic. - - - - - Only to hold internal constants and get rid of - magic numbers and hardcode names. - - - - - - - - - - Inspect the component for InterceptorAttribute and - the configuration for the interceptors node - - - - - Inspects the type looking for interfaces that constitutes - lifecycle interfaces, defined in the Castle.Model namespace. - - - - - Checks if the type implements and or - interfaces. - - - - - - - Inspects the component configuration and the type looking for a - definition of lifestyle type. The configuration preceeds whatever - is defined in the component. - - - This inspector is not guarantee to always set up an lifestyle type. - If nothing could be found it wont touch the model. In this case is up to - the kernel to estabish a default lifestyle for components. - - - - - Seaches for the lifestyle in the configuration and, if unsuccessful - look for the lifestyle attribute in the implementation type. - - - - - Reads the attribute "lifestyle" associated with the - component configuration and tries to convert to - enum type. - - - - - Check if the type expose one of the lifestyle attributes - defined in Castle.Model namespace. - - - - - Base for inspectors that want configuration associated with methods. - For each child a is created - and added to ComponentModel's methods collection - - - Implementors should override the return - the name of the node to be inspected. For example: - - - - - ]]> - - - - - - This implementation of - collects all potential writable puplic properties exposed by the component - implementation and populates the model with them. - The Kernel might be able to set some of these properties when the component - is requested. - - - - - Initializes a new instance of the class. - - - - - Adds the properties as optional dependencies of this component. - - - - - - - Summary description for DefaultComponentModelBuilder. - - - - - Implementors must construct a populated - instance of ComponentModel by inspecting the component - and|or the configuration. - - - - - Constructs a new ComponentModel by invoking - the registered contributors. - - - - - - - - - - "To give or supply in common with others; give to a - common fund or for a common purpose". The contributor - should inspect the component, or even the configuration - associated with the component, to add or change information - in the model that can be used later. - - - - - Removes the specified contributor - - - - - - Initializes a new instance of the class. - - The kernel. - - - - Constructs a new ComponentModel by invoking - the registered contributors. - - - - - - - - - - "To give or supply in common with others; give to a - common fund or for a common purpose". The contributor - should inspect the component, or even the configuration - associated with the component, to add or change information - in the model that can be used later. - - - - - - Removes the specified contributor - - - - - - Initializes the default contributors. - - - - - Gets the contributors. - - The contributors. - - - - Select the appropriate interecptors based on the application specific - business logic - - - - - Select the appropriate intereceptor references. - The intereceptor references aren't neccessarily registered in the model.Intereceptors - - The model to select the interceptors for - The intereceptors for this model (in the current context) or a null reference - - If the selector is not interested in modifying the interceptors for this model, it - should return a null reference and the next selector in line would be executed (or the default - model.Interceptors). - If the selector return a non null value, this is the value that is used, and the model.Interectors are ignored, if this - is not the desirable behavior, you need to merge your interceptors with the ones in model.Interecptors yourself. - - - - - Determain whatever the specified has interecptors. - The selector should only return true from this method if it has determained that is - a model that it would likely add interceptors to. - - The model - Whatever this selector is likely to add intereceptors to the specified model - - - - Defines the contract used by the kernel - to obtain proxies for components. The implementor - must return a proxied instance that dispatch - the invocation to the registered interceptors in the model - - - - - Implementors must create a proxy based on - the information exposed by ComponentModel - - The kernel instance - The component model - The component instance to be proxy (only required in some cases) - array of parameters to the constructor (if any) - The creation context - proxy instance - - - - Implementor should check the component model - and determine if the caller must pass on the component - instance to the proxy - - The kernel instance - The component model - true if an instance must be passed to - - - - Add the selector to the list of selectors that can affect interecptors decisions - in the container. - - - - - Determains whatever we need to create a proxy for this model - - - - - - - Used during the target type inspection process. - Implementors have a chance to interfere in the - proxy generation process - - - - - Invoked by the generation process to know if - the specified member should be proxied - - - - - - - - Invoked by the generation process to notify that a - member wasn't marked as virtual. - - - - - - - Invoked by the generation process to notify - that the whole process is completed. - - - - - This is a placeholder implementation of . - - - The decision to supply no implementation for - is supported by the fact that the MicroKernel should be a thin - assembly with the minimal set of features, although extensible. - Providing the support for this interface would obligate - the user to import another assembly, even if the large majority of - simple cases, no use use of interceptors will take place. - If you want to use however, see the Windsor container. - - - - - Holds the keys used by the proxy factories. - - - - - Key used to supply custom proxy options. - - - - - Represents options to configure proxies. - - - - - Initializes a new instance of the class. - - - - - Adds the additional interfaces to proxy. - - The interfaces. - - - - Adds the additional mix ins to integrate. - - The mix ins. - - - - Equalses the specified obj. - - The obj. - true if equal. - - - - Gets the hash code. - - - - - - Gets or sets the proxy hook. - - - - - Determines if the proxied component uses a target. - - - - - Determines if the proxied component can change targets. - - - - - Determines if the proxied component should only include - the service interface. - - - - - Determines if the interface proxied component should inherit - from - - - - - Gets the additional interfaces to proxy. - - The interfaces. - - - - Gets the mix ins to integrate. - - The interfaces. - - - - Helper support for proxy configuration. - - - - - Obtains the associated with the . - - The component model. - true if the options should be created if not present. - The associated proxy options for the component model. - - - - Sets the lifestyle to the specified . - - The type. - - - - - Assign a custom lifestyle type, that implements . - - Type of the custom lifestyle. - - - - - Assign a custom lifestyle type, that implements . - - The type of the custom lifestyle - - - - - Describes a set of components to register in the kernel. - - - - - Describes all the types based on basedOn. - - The base type. - - - - - Describes all the types based on type T. - - The base type. - - - - - Describes any types that are supplied. - - - - - - Prepares to register types from an assembly. - - The assembly name. - The corresponding - - - - Prepares to register types from an assembly. - - The assembly. - The corresponding - - - - Prepares to register types from an assembly containing the type. - - The type belonging to the assembly. - The corresponding - - - - Prepares to register types from an assembly containing the type. - - The type belonging to the assembly. - The corresponding - - - - Prepares to register types from a list of types. - - The list of types. - The corresponding - - - - Prepares to register types from a list of types. - - The list of types. - The corresponding - - - - Prepares to register types from a list of types. - - The list of types. - The corresponding - - - - Describes a related group of components to register in the kernel. - - - - - Prepares to register types from an assembly. - - The assembly name. - The corresponding - - - - Prepares to register types from an assembly. - - The assembly. - The corresponding - - - - Prepares to register types from a list of types. - - The list of types. - The corresponding - - - - Prepares to register types from a list of types. - - The list of types. - The corresponding - - - - Prepares to register types from a list of types. - - The list of types. - The corresponding - - - - Delegate for custom registration configuration. - - The component registration. - Not uaed. - - - - Describes how to register a group of related types. - - - - - The contract for all registrations with the kernel. - - - - - Performs the registration in the . - - The kernel. - - - - Initializes a new instance of the BasedOnDescriptor. - - - - - Assigns a conditional predication which must be satisfied. - - The predicate to satisfy. - - - - - Assigns a conditional predication which must not be satisfied. - - The predicate not to satisify. - - - - - Allows customized configurations of each matching type. - - The configuration action. - - - - - Allows customized configurations of each matching type. - - The configuration action. - - - - - Allows customized configurations of each matching type that is - assignable to . - - The type assignable from. - The configuration action. - - - - - Allows customized configurations of each matching type that is - assignable to . - - The type assignable from. - The configuration action. - - - - - Allows a type to be registered multiple times. - - - - - Returns the descriptor for accepting a new type. - - The base type. - The descriptor for the type. - - - - Returns the descriptor for accepting a new type. - - The base type. - The descriptor for the type. - - - - Returns the descriptor for accepting a type based on a condition. - - The accepting condition. - The descriptor for the type. - - - - Gets the type all types must be based on. - - - - - Gets the service descriptor. - - - - - Describes a configuration. - - - - - Initializes a new instance of the ConfigureDescriptor. - - The - The configuration action. - - - - Initializes a new instance of the ConfigureDescriptor. - - The - The base type to match. - The configuration action. - - - - Allows customized configurations of each matching type. - - The configuration action. - - - - - Allows customized configurations of each matching type. - - The configuration action. - - - - - Allows customized configurations of each matching type that is - assignable to . - - The type assignable from. - The configuration action. - - - - - Allows customized configurations of each matching type that is - assignable to . - - The type assignable from. - The configuration action. - - - - - Performs the component configuration. - - The component registration. - - - - Selects a set of types from an assembly. - - - - - Describes the source of types to register. - - - - - Allows a type to be registered multiple times. - - - - - Returns the descriptor for accepting a type. - - The base type. - The descriptor for the type. - - - - Returns the descriptor for accepting a type. - - The base type. - The descriptor for the type. - - - - Returns the descriptor for accepting a type based on a condition. - - The accepting condition. - The descriptor for the type. - - - - Selects an existing set of types to register. - - - - - Describes how to select a types service. - - - - - Uses the base type matched on. - - - - - - Uses the first interface of a type. - - - - - - Uses to lookup the sub interface. - For example: if you have IService and - IProductService : ISomeInterface, IService, ISomeOtherInterface. - When you call FromInterface(typeof(IService)) then IProductService - will be used. Useful when you want to register _all_ your services - and but not want to specify all of them. - - - - - - - Uses base type to lookup the sub interface. - - - - - - Assigns a custom service selection strategy. - - - - - - - Assigns the supplied service types. - - - - - - - This is a workaround for a CLR bug in - which GetInterfaces() returns interfaces - with no implementations. - - Type of the service. - - - - - Constructs the descriptor with name and value. - - The attribute name. - The attribute value. - - - - Constructs the descriptor with name. - - The component. - The attribute name. - - - - Builds the with value. - - The attribute value. - The - - - - Factory for creating objects. - - - - - Creates a component registration for the - - Type of the service. - The component registration. - - - - Creates a component registration for the - - Types of the service. - The component registration.B - - - - Creates a component registration for the - - Types of the service. - The component registration.B - - - - Creates a component registration for the service type. - - The service type. - The component registration. - - - - Creates a component registration for the service types. - - The primary service type. - The forwarded type. - The component registration. - - - - Creates a component registration for the service types. - - The primary service type. - The first forwarded type. - The second forwarded type. - The component registration. - - - - Creates a component registration for the service types. - - The primary service type. - The first forwarded type. - The second forwarded type. - The third forwarded type. - The component registration. - - - - Creates a component registration for the service types. - - The primary service type. - The first forwarded type. - The second forwarded type. - The third forwarded type. - The fourth forwarded type. - The component registration. - - - - Create a component registration for an exisiting - - The component model. - The component registration. - - - - Determines if the component service is already registered. - - The kernel. - The component model. - true if the service is already registered. - - - - Creates a predicate to check if a component is in a namespace. - - The namespace. - true if the component type is in the namespace. - - - - Creates a predicate to check if a component shares a namespace with another. - - The component type to test namespace against. - true if the component is in the same namespace. - - - - Creates a predicate to check if a component shares a namespace with another. - - The component type to test namespace against. - true if the component is in the same namespace. - - - - Delegate to filter component registration. - - The kernel. - The component model. - true if accepted. - - - - Registration for a single type as a component with the kernel. - - You can create a new registration with the factory. - - The service type - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with an existing . - - - - - With the overwrite. - - - - - - Change the name of this registration. - This will be the key for the component in the kernel. - - If not set, the of the - will be used as the key to register the component. - - The name of this registration. - - - - - Sets the concrete type that implements the service to . - - If not set, the will be used as the implementation for this component. - - The type that is the implementation for the service. - - - - - Sets the concrete type that implements the service to . - - If not set, the will be used as the implementation for this component. - - The type that is the implementation for the service. - - - - - Assigns an existing instance as the component for this registration. - - The component instance. - - - - - Registers the service types on behalf of this component. - - The types to forward. - - - - - Registers the service types on behalf of this component. - - The forwarded type. - The component registration. - - - - Registers the service types on behalf of this component. - - The first forwarded type. - The second forwarded type. - The component registration. - - - - Registers the service types on behalf of this component. - - The first forwarded type. - The second forwarded type. - The third forwarded type. - The component registration. - - - - Registers the service types on behalf of this component. - - The first forwarded type. - The second forwarded type. - The third forwarded type. - The fourth forwarded type. - The component registration. - - - - Registers the service types on behalf of this component. - - The types to forward. - - - - - Set a custom which creates and destroys the component. - - - - - - Sets for this component. - - The extended properties. - - - - - Sets for this component. - - The extendend properties as key/value pairs. - - - - - Specify custom dependencies using . - - Use to specify the components - this component should be resolved with. - - The dependencies. - - - - - Uses a dictionary of key/value pairs, to specify custom dependencies. - - Use to specify the components - this component should be resolved with. - - The dependencies. - - - - - Uses an (anonymous) object as a dictionary, to specify custom dependencies. - - Use to specify the components - this component should be resolved with. - - The dependencies. - - - - - Obsolete, use instead. - - The dependencies. - - - - - Obsolete, use instead. - - The dependencies. - - - - - Obsolete, use instead. - - The dependencies. - - - - - Override (some of) the services that this component needs. - Use to create an override. - - Each key represents the service dependency of this component, for example the name of a constructor argument or a property. - The corresponding value is the key of an other component registered to the kernel, and is used to resolve the dependency. - - To specify dependencies which are not services, use - - The service overrides. - - - - - Override (some of) the services that this component needs, using a dictionary. - - Each key represents the service dependency of this component, for example the name of a constructor argument or a property. - The corresponding value is the key of an other component registered to the kernel, and is used to resolve the dependency. - - To specify dependencies which are not services, use - - The service overrides. - - - - - Override (some of) the services that this component needs, using an (anonymous) object as a dictionary. - - Each key represents the service dependency of this component, for example the name of a constructor argument or a property. - The corresponding value is the key of an other component registered to the kernel, and is used to resolve the dependency. - - To specify dependencies which are not services, use - - The service overrides. - - - - - Set configuration parameters with string or values. - - The parameters. - - - - - Creates an attribute descriptor. - - The attribute key. - - - - - Apply more complex configuration to this component registration. - - The config nodes. - - - - - Apply more complex configuration to this component registration. - - The configuration . - - - - - Set the interceptors for this component. - - The interceptors. - - - - - Marks the component as startable. - - - Be sure that you first added the - to the kernel, before registering this component. - - - - Assigns the start method for the startable. - - The start method. - - Be sure that you first added the - to the kernel, before registering this component. - - - - Assigns the stop method for the startable. - - The stop method. - - Be sure that you first added the - to the kernel, before registering this component. - - - - Marks the components with one or more actors. - - The component actors. - - - - - Assigns a conditional predication which must be satisfied. - - The component will only be registered into the kernel - if this predicate is satisfied (or not assigned at all). - - The predicate to satisfy. - - - - - Assigns a conditional predication which must not be satisfied. - - The component will only be registered into the kernel - if this predicate is not satisfied (or not assigned at all). - - The predicate not to satisify. - - - - - Registers this component with the . - - The kernel. - - - - Adds the attribute descriptor. - - The key. - The value. - - - - - Adds the descriptor. - - The descriptor. - - - - - Uses a factory method to instantiate the component. - Requires the to be installed. - - Implementation type - Factory method - - - - - Uses a factory method to instantiate the component. - Requires the to be installed. - - Implementation type - Factory method - - - - - Uses a factory to instantiate the component - - Factory type. This factory has to be registered in the kernel. - Implementation type. - Factory invocation - - - - - The name of the component. Will become the key for the component in the kernel. - - To set the name, use . - - If not set, the of the - will be used as the key to register the component. - - The name. - - - - The type of the service, the same as . - - This is the first type passed to . - - The type of the service. - - - - Gets the forwarded service types on behalf of this component. - - Add more types to forward using . - - The types of the forwarded services. - - - - The concrete type that implements the service. - - To set the implementation, use . - - The implementation of the service. - - - - Set proxy for this component. - - The proxy. - - - - Set the lifestyle of this component. - For example singleton and transient (also known as 'factory'). - - The with lifestyle. - - - - Helper wrapper around Converter - - - - - - Helper factory class - - - - - - Helper factory class - - - - - - A non-generic . - - You can create a new registration with the factory. - - - - - Represents a configuration child. - - - - - Applies the configuration node. - - The configuration. - - - - Represents a configuration attribute. - - - - - Applies the configuration node. - - The configuration. - - - - Create a with name. - - The attribute name. - The new - - - - Represents a named attribute. - - - - - Builds the with name/value. - - The attribute value. - The new - - - - Builds the with name/value. - - The attribute value. - The new - - - - Represents a configuration child. - - - - - Create a with name. - - The child name. - The new - - - - Represents a named child. - - - - - Builds the with name/value. - - The child value. - The new - - - - Builds the with name/value. - - The child value. - The new - - - - Builds the with name/config. - - The child configuration. - The new - - - - Builds the with name/config. - - The child nodes. - The new - - - - Applies the configuration node. - - The configuration. - - - - Represents a simple child node. - - - - - Applies the configuration node. - - The configuration. - - - - Represents a complex child node. - - - - - Applies the configuration node. - - The configuration. - - - - Represents a compound child node. - - - - - Applies the configuration node. - - The configuration. - - - - Represents a configuration parameter. - - - - - Create a with key. - - The parameter key. - The new - - - - Gets the parameter key. - - - - - Gets the parameter value. - - - - - Gets the parameter configuration. - - - - - Represents a parameter key. - - - - - Builds the with key/value. - - The parameter value. - The new - - - - Builds the with key/config. - - The parameter configuration. - The new - - - - The parameter key name. - - - - - Represents a key/value pair. - - - - - Create a with key. - - The property key. - The new - - - - Gets the property key. - - - - - Gets the property value. - - - - - Represents a property key. - - - - - Builds the with key/value. - - The property value. - The new - - - - The property key name. - - - - - Represents a service override. - - - - - Creates a with key. - - The service override key. - The new - - - - Gets the optional value type specifier. - - - - - Represents a service override key. - - - - - Builds the with key/value. - - The service overeride value. - The new - - - - Builds the with key/values. - - The service overeride values. - The new - - - - Builds the with key/values. - - The service overeride values. - The new - The value type. - - - - Builds the with key/values. - - The service overeride values. - The new - - - - Builds the with key/values. - - The service overeride values. - The new - The value type. - - - - Gets the service override key name. - - - - - Summary description for IReleasePolicy. - - - - - Only tracks components that have decommission steps - registered or have pooled lifestyle. - - - - - No tracking of component instances are made. - - - - - Initializes a new instance of the class. - - - - - Handle dependencies of services in the format of typed arrays. - - - This is a complimentary implementation - that is capable of satisfying dependencies of services as typed arrays. - - Note that it will take precedence over service override for arrays defined - on the configuration. - - - - In order to install the resolver: - - var kernel = new DefaultKernel(); - kernel.Resolver.AddSubResolver(new ArrayResolver(kernel)); - - - - To use it, assuming that IService is on the container: - - - - public class Component - { - public Component(IService[] services) - { - } - } - - - - - - Handle dependencies of services in the format of generic IList. - - - This is a complimentary implementation - that is capable of satisfying dependencies of services generic IList. - - Note that it will take precedence over service override for lists defined - on the configuration. - - - - In order to install the resolver: - - var kernel = new DefaultKernel(); - kernel.Resolver.AddSubResolver(new ListResolver(kernel)); - - - - To use it, assuming that IService is on the container: - - - - public class Component - { - public Component(IList<IService> services) - { - } - } - - - - - - Default implementation for . - This implementation is quite simple, but still should be useful - for 99% of situations. - - - - - Implementors should use a strategy to obtain - valid references to properties and/or services - requested in the dependency model. - - - - - This method is called with a delegate for firing the - IKernelEvents.DependencyResolving event. - - The delegate used to fire the event - - - - Registers a sub resolver instance - - The subresolver instance - - - - Unregisters a sub resolver instance previously registered - - The subresolver instance - - - - Initializes a new instance of the class. - - The kernel. - - - - Initializes this instance with the specified dependency delegate. - - The dependency delegate. - - - - Registers a sub resolver instance - - The subresolver instance - - - - Unregisters a sub resolver instance previously registered - - The subresolver instance - - - - Returns true if the resolver is able to satisfy the specified dependency. - - Creation context, which is a resolver itself - Parent resolver - Model of the component that is requesting the dependency - The dependency model - true if the dependency can be satisfied - - - - Try to resolve the dependency by checking the parameters in - the model or checking the Kernel for the requested service. - - - The dependency resolver has the following precedence order: - - - The dependency is checked within the - - - The dependency is checked within the instance for the component - - - The dependency is checked within the registered s - - - Finally the resolver tries the normal flow - which is using the configuration - or other component to satisfy the dependency - - - - Creation context, which is a resolver itself - Parent resolver - Model of the component that is requesting the dependency - The dependency model - The dependency resolved value or null - - - - Extracts the component name from the a ref strings which is - ${something} - - - - - - - - This method rebuild the context for the parameter type. - Naive implementation. - - - - - Summary description for DependencyResolverException. - - - - - Initializes a new instance of the class. - - The message. - - - - Initializes a new instance of the class. - - The object that holds the serialized object data. - The contextual information about the source or destination. - - - - This implementation of - does not try to obtain an external configuration by any means. - Its only purpose is to serve as a base class for subclasses - that might obtain the configuration node from anywhere. - - - - - A subsystem is used by the MicroKernel to deal - with a specific concern. - - - - - Initializes the subsystem - - - - - - Should perform the termination - of the subsystem instance. - - - - - The contract used by the kernel to obtain - external configuration for the components and - facilities. - - - - - Associates a configuration node with a facility key - - item key - Configuration node - - - - Associates a configuration node with a component key - - item key - Configuration node - - - - Associates a configuration node with a bootstrap component key - - item key - Configuration node - - - - Adds the child container configuration. - - The container's name. - The config. - - - - Returns the configuration node associated with - the specified child container key. Should return null - if no association exists. - - item key - - - - - Returns the configuration node associated with - the specified facility key. Should return null - if no association exists. - - item key - - - - - Returns the configuration node associated with - the specified component key. Should return null - if no association exists. - - item key - - - - - Returns the configuration node associated with - the specified component key. Should return null - if no association exists. - - item key - - - - - Returns all configuration nodes for facilities - - - - - - Returns all configuration nodes for components - - - - - - Returns all configuration nodes for bootstrap components - - - - - - Gets the child containers configuration nodes. - - - - - - - - - - - - - - Initializes a new instance of the class. - - - - - Associates a configuration node with a facility key - - item key - Configuration node - - - - Associates a configuration node with a component key - - item key - Configuration node - - - - Associates a configuration node with a bootstrap component key - - - - - Adds the child container configuration. - - The key. - The config. - - - - Returns the configuration node associated with - the specified facility key. Should return null - if no association exists. - - item key - - - - - Returns the configuration node associated with - the specified child container key. Should return null - if no association exists. - - item key - - - - - Returns the configuration node associated with - the specified component key. Should return null - if no association exists. - - item key - - - - - Returns the configuration node associated with - the specified component key. Should return null - if no association exists. - - - - - - - Returns all configuration nodes for facilities - - - - - - Returns all configuration nodes for bootstrap components - - - - - - Returns all configuration nodes for child containers - - - - - - Returns all configuration nodes for components - - - - - - Base implementation of - - - - - Implements a conversion logic to a type of a - set of types. - - - - - Returns true if this instance of ITypeConverter - is able to handle the specified type. - - - - - - - Returns true if this instance of ITypeConverter - is able to handle the specified type with the specified - configuration - - - - - - - - Should perform the conversion from the - string representation specified to the type - specified. - - - - - - - - Should perform the conversion from the - configuration node specified to the type - specified. - - - - - - - - Returns true if this instance of ITypeConverter - is able to handle the specified type with the specified - configuration - - - - - - The default behavior is to just pass it to the normal CanHadnleType - peeking into the configuration is used for some advanced functionality - - - - - Initializes a new instance of the class. - - - - - This interface is needed because we want to isolate ourself from - the generic parameters, so we can work type safe inside the implementations, - and still call from non generic types outside. - - - - - Initializes a new instance of the class. - - - - - Looks for a on the type to be converted. - If found, the TypeConverter defined by the attribute is used to perform the conversion. - - - - - Marker interface that signals that a converter - depends on IKernel to be able to perform - the conversion. - - - - - Attempts to utilize an existing for conversion - - - - - Creates the target type instance. - - The type. - The configuration. - - - - - Chooses the first non default constructor. Throws an exception if more than - one non default constructor is found - - - The chosen constructor, or null if none was found - - - - Converts the constructor parameters. - - The constructor. - The configuration. - - - - - Converts the property values. - - The instance. - The type. - The configuration. - - - - Finds the child (case insensitive). - - The config. - The name. - - - - - Gets the conversion manager. - - The conversion manager. - - - - Converts a string representation to an enum value - - - - - Implements all standard conversions. - - - - - Convert a type name to a Type instance. - - - - - Summary description for ConverterException. - - - - - Initializes a new instance of the class. - - The message. - - - - Initializes a new instance of the class. - - The message. - The inner exception. - - - - Initializes a new instance of the class. - - The object that holds the serialized object data. - The contextual information about the source or destination. - - - - Declares a type as being convertible by a and optionally defines the converter to be used - - - - - Defines the to be used to convert the type - - - - - Defines the to be used to convert the type - - - - - - Composition of all available conversion managers - - - - - Establish a composition interface and a subsystem. - Implementors should delegate the conversion to - a instance of a type converter. - - - - - Register a type converter instance. - - - - - - Method finds the next biggest node - It assumes Add puts lesser nodes on the right - - - - Node's left - - - Node's right - - - Node's parent - - - DA Linked List - - - - Creates a ComponentName using a name pattern like - "service:key=value,key2=value2" - - Complete name - - - - Creates a ComponentName with specified service and - properties. - - Service name - Property list. - - - - Serialization constructor. - - - - - - - Parses the full name extracting the service and properties. - - Full name. - - - - Sets up the service. Can be empty but can't be null. - - - - - - Parses and validate a properties list string like - "key=value,key2=value2" and so on. - - Property list. - - - - Validates a properties Hashtable. - - Property list. - - - - Default implementation. - Keeps services map as a simple hash table. - Keeps key map as a list dictionary to maintain order. - Does not support a query string. - - - - - Contract for SubSystem that wishes to keep and coordinate - component registration. - - - - - Implementors should register the key and service pointing - to the specified handler - - - - - - - Unregister the handler by the given key - - - - - - Unregister the handler by the given service - - - - - - Returns true if there is a component registered - for the specified key - - - - - - - Returns true if there is a component registered - for the specified service - - - - - - - Returns the associated with - the specified key. - - - - - - - Returns an array of that - satisfies the specified query. - - - - - - - Returns the associated with - the specified service. - - - - - Returns the associated with - the specified key with the service type. - - It is expected that this will be used mainly to resolve a generic service - by its key. - - - - - - Returns an array of associated with - the specified service. - - - - - - - Returns all registered. - - - - - - Return s where components are compatible - with the specified service. - - - - - - - List of handler by key - - - - - List of handler by service - - - - - Register a new component resolver that can take part in the decision - making about which handler to resolve - - - - - Returns the number of components registered. - - - - - Associates a with - the specified service - - - - - Associates a with - the specified key - - - - - Map(String, IHandler) to map component keys - to - Items in this dictionary are sorted in insertion order. - - - - - Map(Type, IHandler) to map a service - to . - If there is more than a single service of the type, only the first - registered services is stored in this dictionary. - It serve as a fast lookup for the common case of having a single handler for - a type. - - - - - Initializes a new instance of the class. - - - - - Implementors of this interface allow to extend the way the container perform - component resolution based on some application specific business logic. - - - This is the sibling interface to . - This is dealing strictly with root components, while the is dealing with - dependent components. - - - - - Whatever the selector has an opinion about resolving a component with the - specified service and key. - - The service key - can be null - The service interface that we want to resolve - - - - Select the appropriate handler from the list of defined handlers. - The returned handler should be a member from the array. - - The service key - can be null - The service interface that we want to resolve - The defined handlers - The selected handler, or null - - - - When requesting a component by service, KeySearchNamingSubSystem first - determines if more than one component has been registered for that service. - If not, Default resolution occurs. If so, all of the registered keys for - that service are processed through the provided Predicate to determine which - key to use for service resolution. If no Predicate matches, the default - resolution occurs. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The key predicate. - - - - Registers the given handler with the give key. - - The key. - The handler. - - - - Unregisters the handler associated with the given key - - The key. - - - - Unregisters the handler associated with the given service - - The service. - - - - Executes the Predicate against all keys for the registered service to - determine which component to return. - - The service. - - - - - Alternative implementation. - Extends the default implementation replacing the - key support with a more complete ComponentName. Supports - queries. - - - The user must register components using the following construction - - service:properties - - Where properties is a list of key value pairs (comma separated). Example: - - protocol:secure=true,version=1.2 - - The user can then query for components using the same construction: - - protocol:secure=true - - Or to return all: - - protocol:* - - - - - - Pendent - - - - - An implementation of a should - be able to return instances of - for a given resource identifier. - - - - - Holds the keys used by Kernel to register/request - a subsystem. - - - - - Key used for the configuration store subsystem - - - - - Key used for the conversion manager - - - - - Key used for the naming subsystem - - - - - Key used for the resource subsystem - - - - - Compares if the reference of two objects are equals. - - - - - Summary description for ReferenceExpressionUtil. - - - - - Default implementation of . - This implementation is complete and also support a kernel - hierarchy (sub containers). - - - Default implementation of . - This implementation is complete and also support a kernel - hierarchy (sub containers). - - - - - The IKernel interface exposes all the functionality - the MicroKernel implements. - - - It allows you to register components and - request them by the key or the service they implemented. - It also allow you to register facilities and subsystem, thus - augmenting the functionality exposed by the kernel alone to fits - your needs. - - - - - - - Summary description for IKernelEvents. - - - - - Event fired when a new component is registered - on the kernel. - - - - - Event fired when a component is removed from the kernel. - - - - - Event fired after the ComponentModel is created. - Allows customizations that may affect the handler. - - - - - Event fired when the kernel was added as child of - another kernel. - - - - - Event fired when the kernel was removed from being a child - of another kernel. - - - - - Event fired before the component is created. - - - - - Event fired when a component instance destroyed. - - - - - Event fired when a new handler is registered - (it might be in a valid or waiting dependency state) - - - - - Event fired when a dependency is being resolved, - it allows the dependency to be changed, - but the client ComponentModel must not be changed. - - - - - Registers the components provided by the s - with the . - - Create a new registration using .For() or . - - - - kernel.Register(Component.For<IService>().ImplementedBy<DefaultService>()); - - - The component registrations. - The kernel. - - - - Returns true if the specified component was - found and could be removed (i.e. no other component depends on it) - - The component's key - - - - - Returns true if the specified key was registered - - - - - - - Returns true if the specified service was registered - - - - - - - Associates objects with a component handler, - allowing it to use the specified dictionary - when resolving dependencies - - - - - - - Associates objects with a component handler, - allowing it to use the specified dictionary - when resolving dependencies - - - - - - - Associates objects with a component handler, - allowing it to use the specified dictionary - when resolving dependencies - - - - - - - Associates objects with a component handler, - allowing it to use the specified dictionary - when resolving dependencies - - - - - - - Releases a component instance. This allows - the kernel to execute the proper decomission - lifecycles on the component instance. - - - - - - Constructs an implementation of - for the given - - - - - - - Returns the - for the specified component key. - - - - - - - Returns the - for the specified service. - - - - - - - Return handlers for components that - implements the specified service. - - - - - - - Return handlers for components that - implements the specified service. - The check is made using IsAssignableFrom - - - - - - - Adds a to the kernel. - - - - - - - - Creates and adds an facility to the kernel. - - The facility type. - - - - - Creates and adds an facility to the kernel. - - The facility type. - - The callback for creation. - - - - Creates and adds an facility to the kernel. - - The facility type. - - The callback for creation. - - - - Creates and adds an facility to the kernel. - - The facility type. - - - - - Creates and adds an facility to the kernel. - - The facility type. - The callback for creation. - - - - - Creates and adds an facility to the kernel. - - The facility type. - The callback for creation. - - - - - Returns the facilities registered on the kernel. - - - - - - Adds (or replaces) an - - - - - - - Returns an implementation of - for the specified key. - - - - - - - - Support for kernel hierarchy - - - - - - Remove child kernel - - - - - - Raise the hanlder registered event, required so - dependant handlers will be notified about their dependant moving - to valid state. - - - - - - Registers the to be forwarded - to the component registered with . - - The service type that gets forwarded. - The name of the component to forward to. - - - - Register a new component resolver that can take part in the decision - making about which handler to resolve - - - - - Adds a concrete class as a component - - - - - - - Adds a concrete class - as a component with the specified . - - The key with which to index the component. - The of the component. - The specified for the component. - - If you have indicated a lifestyle for the specified using - attributes, this method will not overwrite that lifestyle. To do that, use the - method. - - - Thrown if , or - are . - - - Thrown if is . - - - - - Adds a concrete class - as a component with the specified . - - The key with which to index the component. - The of the component. - The specified for the component. - - If , then ignores all other configurations - for lifestyle and uses the value in the parameter. - - - If you have indicated a lifestyle for the specified using - attributes, this method will not overwrite that lifestyle. To do that, use the - method. - - - Thrown if or - are . - - - Thrown if is . - - - - Adds a concrete class and an interface - as a component - - The key with which to index the component. - The service that this component implements. - The of the component. - - - - Adds a concrete class and an interface - as a component with the specified . - - The key with which to index the component. - The service that this component implements. - The of the component. - The specified for the component. - - If you have indicated a lifestyle for the specified using - attributes, this method will not overwrite that lifestyle. To do that, use the - method. - - - Thrown if , , or - are . - - - Thrown if is . - - - - - Adds a concrete class and an interface - as a component with the specified . - - The key with which to index the component. - The service that this component implements. - The of the component. - The specified for the component. - - If , then ignores all other configurations - for lifestyle and uses the value in the parameter. - - - If you have indicated a lifestyle for the specified using - attributes, this method will not overwrite that lifestyle. To do that, use the - method. - - - Thrown if , , or - are . - - - Thrown if is . - - - - - Adds a concrete class as a component - - - - - Adds a concrete class - as a component with the specified . - - The specified for the component. - - If you have indicated a lifestyle for the specified T using - attributes, this method will not overwrite that lifestyle. To do that, use the - method. - - - Thrown if is . - - - - - Adds a concrete class - as a component with the specified . - - The specified for the component. - - If , then ignores all other configurations - for lifestyle and uses the value in the parameter. - - - If you have indicated a lifestyle for the specified T using - attributes, this method will not overwrite that lifestyle. To do that, use the - method. - - - Thrown if is . - - - - Adds a concrete class and an interface - as a component - - The service that this component implements. - - - - Adds a concrete class and an interface - as a component with the specified . - - The service that this component implements. - The specified for the component. - - If you have indicated a lifestyle for the specified T using - attributes, this method will not overwrite that lifestyle. To do that, use the - method. - - - are . - - - Thrown if is . - - - - - Adds a concrete class and an interface - as a component with the specified . - - The service that this component implements. - The specified for the component. - - If , then ignores all other configurations - for lifestyle and uses the value in the parameter. - - - attributes, this method will not overwrite that lifestyle. To do that, use the - method. - - - are . - - - Thrown if is . - - - - - Used mostly by facilities. Adds an instance - to be used as a component. - - - - - - Used mostly by facilities. Adds an instance - to be used as a component. - - - - - - - Adds a concrete class as a component and specify the extended properties. - Used by facilities, mostly. - - - - - - - - Adds a concrete class and an interface - as a component and specify the extended properties. - Used by facilities, mostly. - - - - - - - - - Adds a custom made . - Used by facilities. - - - - - - Used mostly by facilities. Adds an instance - to be used as a component. - - - - - - - Used mostly by facilities. Adds an instance - to be used as a component. - - - - - - - - Used mostly by facilities. Adds an instance - to be used as a component. - - - - - - - - - Returns the component instance by the service type - - - - - Returns all the valid component instances by - the service type - - The service type - - - - Returns all the valid component instances by - the service type - - The service type - Arguments to resolve the services - - - - Returns all the valid component instances by - the service type - - The service type - Arguments to resolve the services - - - - Returns the component instance by the service type - using dynamic arguments - - - - - - - - Returns the component instance by the component key - using dynamic arguments - - - - - - - - Returns the component instance by the service type - using dynamic arguments - - Service to resolve - Arguments to resolve the services - - - - - Returns the component instance by the component key - using dynamic arguments - - Key to resolve - Arguments to resolve the services - - - - - Returns a component instance by the key - - - - - - - - Returns the component instance by the service type - using dynamic arguments - - - - - - - Returns the component instance by the service type - using dynamic arguments - - Arguments to resolve the services - - - - - Returns the component instance by the component key - - - - - - Returns a component instance by the key - - Component's key - Service type - The Component instance - - - - Returns a component instance by the key - - Service type - Component's key - - The Component instance - - - - Returns component instances that implement TService - - - - - - - Returns component instances that implement TService - - - - - - - Returns component instances that implement TService - - - - - - - Returns a component instance by the key - - - - - - - - - Returns the implementation of - - - - - Returns the implementation of - - - - - Gets or sets the implementation of - - - - - Gets or sets the implementation for - - - - - Returns the implementation for - - - - - Gets or sets the implementation of - allowing different strategies for proxy creation. - - - - - Returns the parent kernel - - - - - Graph of components and iteractions. - - - - - Returns the component instance by the key - - - - - Returns the component instance by the service type - - - - - The parent kernel, if exists. - - - - - The implementation of - - - - - The implementation of - - - - - The dependency resolver. - - - - - Implements a policy to control component's - disposal that the usef forgot. - - - - - Holds the implementation of - - - - - List of registered. - - - - - Map of subsystems registered. - - - - - List of sub containers. - - - - - Constructs a DefaultKernel with no component - proxy support. - - - - - Constructs a DefaultKernel with the specified - implementation of and - - - - - - - Constructs a DefaultKernel with the specified - implementation of - - - - - Registers the components described by the s - with the . - The component registrations. - The kernel. - - - - - Returns true if the specified component was - found and could be removed (i.e. no other component depends on it) - - The component's key - - - - - Associates objects with a component handler, - allowing it to use the specified dictionary - when resolving dependencies - - - - - - - Associates objects with a component handler, - allowing it to use the specified dictionary - when resolving dependencies - - - - - - - Associates objects with a component handler, - allowing it to use the specified dictionary - when resolving dependencies - - - - - - - Associates objects with a component handler, - allowing it to use the specified dictionary - when resolving dependencies - - - - - - - Releases a component instance. This allows - the kernel to execute the proper decomission - lifecycles on the component instance. - - - - - - Return handlers for components that - implements the specified service. - - - - - - - Return handlers for components that - implements the specified service. - The check is made using IsAssignableFrom - - - - - - - Returns the facilities registered on the kernel. - - - - - - Gets the service object of the specified type. - - - - A service object of type serviceType. - - - An object that specifies the type of service object to get. - - - - Gets the service object of the specified type. - - - - A service object of type serviceType. - - - - - Starts the process of component disposal. - - - - - Adds a concrete class - as a component with the specified . - - The key with which to index the component. - The of the component. - The specified for the component. - - If you have indicated a lifestyle for the specified using - attributes, this method will not overwrite that lifestyle. To do that, use the - method. - - - Thrown if or - are . - - - Thrown if is . - - - - - Adds a concrete class - as a component with the specified . - - The key with which to index the component. - The of the component. - The specified for the component. - - If , then ignores all other configurations - for lifestyle and uses the value in the parameter. - - - If you have indicated a lifestyle for the specified using - attributes, this method will not overwrite that lifestyle. To do that, use the - method. - - - Thrown if or - are . - - - Thrown if is . - - - - Adds a concrete class and an interface - as a component with the specified . - - The key with which to index the component. - The service that this component implements. - The of the component. - The specified for the component. - - If you have indicated a lifestyle for the specified using - attributes, this method will not overwrite that lifestyle. To do that, use the - method. - - - Thrown if , , or - are . - - - Thrown if is . - - - - - Adds a concrete class and an interface - as a component with the specified . - - The key with which to index the component. - The service that this component implements. - The of the component. - The specified for the component. - - If , then ignores all other configurations - for lifestyle and uses the value in the parameter. - - - If you have indicated a lifestyle for the specified using - attributes, this method will not overwrite that lifestyle. To do that, use the - method. - - - Thrown if , , or - are . - - - Thrown if is . - - - - - - - - - - - - - - - - - - - - - - - - - - - - Used mostly by facilities. Adds an instance - to be used as a component. - - - - - - - Used mostly by facilities. Adds an instance - to be used as a component. - - - - - - - - Adds a concrete class as a component - - - - - Adds a concrete class - as a component with the specified . - - The specified for the component. - - If you have indicated a lifestyle for the specified T using - attributes, this method will not overwrite that lifestyle. To do that, use the - method. - - - Thrown if is . - - - - - Adds a concrete class - as a component with the specified . - - The specified for the component. - If , then ignores all other configurations - for lifestyle and uses the value in the parameter. - - If you have indicated a lifestyle for the specified T using - attributes, this method will not overwrite that lifestyle. To do that, use the - method. - - - Thrown if - - is - - . - - - - Adds a concrete class and an interface - as a component - - The service that this component implements. - - - - Adds a concrete class and an interface - as a component with the specified . - - The service that this component implements. - The specified for the component. - - If you have indicated a lifestyle for the specified T using - attributes, this method will not overwrite that lifestyle. To do that, use the - method. - - - are . - - - Thrown if is . - - - - - Adds a concrete class and an interface - as a component with the specified . - - The service that this component implements. - The specified for the component. - If , then ignores all other configurations - for lifestyle and uses the value in the parameter. - - attributes, this method will not overwrite that lifestyle. To do that, use the - method. - - - are . - - - Thrown if is . - - - - - Used mostly by facilities. Adds an instance - to be used as a component. - - - - - - Used mostly by facilities. Adds an instance - to be used as a component. - - - - - - - Returns the component instance by the service type - using dynamic arguments - - - - - - - Returns the component instance by the service type - using dynamic arguments - - - - - - - Returns the component instance by the component key - - - - - - Returns a component instance by the key - - Component's key - Service type - The Component instance - - - - Returns a component instance by the key - - Service type - Component's key - - The Component instance - - - - Returns the component instance by the service type - - - - - Returns all the valid component instances by - the service type - - The service type - - - - Returns all the valid component instances by - the service type - - The service type - Arguments to resolve the services - - - - Returns all the valid component instances by - the service type - - The service type - Arguments to resolve the services - - - - Returns component instances that implement TService - - - - - - - - Returns component instances that implement TService - - - - - - - - Returns the component instance by the service type - using dynamic arguments - - - - - - - - Returns the component instance by the service type - using dynamic arguments - - - - - - - - Returns the component instance by the component key - using dynamic arguments - - - - - - - - Returns the component instance by the component key - using dynamic arguments - - - - - - - - Returns a component instance by the key - - - - - - - - Returns component instances that implement TService - - - - - - - Returns a component instance by the key - - - - - - - - - Resolves the specified key. - - The key. - The service. - Type of the arguments as anonymous. - - - - - Graph of components and iteractions. - - - - - Pending - - - - - Pending - - - - - - Pending - - - - - - Pending - - - - - - Pending - - - - - - Pending - - - - - - Pending - - - - - Pending - - - - - - Represents a delegate which holds basic information about a component. - - Key which identifies the component - handler that holds this component and is capable of - creating an instance of it. - - - - - Represents a delegate which holds basic information about a component - and its instance. - - Component meta information - Component instance - - - - Represents a delegate which holds the information about the - component - - - - - Represents a delegate which holds a handler - - handler that holds a component and is capable of - creating an instance of it. - - - - - - Represents a delegate which holds dependency - resolving information. - - -
-
+ + + + Castle.MicroKernel + + + + + Abstract implementation of . + The implementors must only override the InternalCreate and + InternalDestroy methods in order to perform their creation and + destruction logic. + + + + + Implements the instance creation logic. The default + implementation should rely on an ordinary call to + Activator.CreateInstance(). + + + This interface is provided in order to allow custom components + to be created using a different logic, such as using a specific factory + or builder. + + The constructor for implementation has the following signature: + + + ComponentModel model, IKernel kernel, + ComponentInstanceDelegate onCreation, + ComponentInstanceDelegate onDestruction + + + The Activator should raise the events onCreation and onDestruction + in order to correctly implement the contract. Usually the best + way of creating a custom activator is by extending the existing ones. + + + + + + + + Should return a new component instance. + + + + + + Should perform all necessary work to dispose the instance + and/or any resource related to it. + + + + + + Constructs an AbstractComponentActivator + + + + + Summary description for ComponentActivatorException. + + + + + Standard implementation of . + Handles the selection of the best constructor, fills the + writable properties the component exposes, run the commission + and decommission lifecycles, etc. + + + Custom implementors can just override the CreateInstance method. + Please note however that the activator is responsible for the proxy creation + when needed. + + + + + Initializes a new instance of the class. + + + + + + + + + Attempts to dynamically load a UserControl by invoking Page.LoadControl. + There are two uses of this class. + + 1) Add a component to the Kernel and add a VirtualPath attribute specifying + the relative path of the .ascx file for the associated UserControl. (easy) + + + + <component id="BasketView" + service="Castle.ShoppingCart.IBasketView, Castle.ShoppingCart" + type="Castle.ShoppingCart.BasketView, Castle.ShoppingCart" + lifestyle="transient" + virtualPath="~/Views/BasketView.ascx" + /> + + + + 2) Precompile a UserControl and add the pre-compiled class to the Kernel. (hard) + Has not been tested with proxies. + + + + + + Initializes a new instance of the class. + + The model. + The kernel. + The on creation. + The on destruction. + + + + Creates the instance. + + The context. + The arguments. + The signature. + + + + + + + + + + Used during a component request, passed along to the whole process. + This allow some data to be passed along the process, which is used + to detected cycled dependency graphs and now it's also being used + to provide arguments to components. + + + + + Implementors should use a strategy to obtain + valid references to properties and/or services + requested in the dependency model. + + + + + Should return an instance of a service or property values as + specified by the dependency model instance. + It is also the responsability of + to throw an exception in the case a non-optional dependency + could not be resolved. + + Creation context, which is a resolver itself + Parent resolver - normally the IHandler implementation + Model of the component that is requesting the dependency + The dependency model + The dependency resolved value or null + + + + Returns true if the resolver is able to satisfy this dependency. + + Creation context, which is a resolver itself + Parent resolver - normally the IHandler implementation + Model of the component that is requesting the dependency + The dependency model + true if the dependency can be satisfied + + + + Holds the scoped dependencies being resolved. + If a dependency appears twice on the same scope, we'd have a cycle. + + + + + The list of handlers that are used to resolve + the component. + We track that in order to try to avoid attempts to resolve a service + with itself. + + + + + Initializes a new instance of the class. + + The type to extract generic arguments. + The parent context. + + + + Initializes a new instance of the class. + + The handler. + The release policy. + The type to extract generic arguments. + The additional arguments. + The conversion manager. + + + + Initializes a new instance of the class. + + + + + Check if we are now in the middle of resolving this handler, + and as such, we shouldn't try to resolve that. + + + + Creates a new, empty instance. + A new CreationContext should be created every time, as the contexts keeps some state related to dependency resolution. + + + + Pendent + + + + + Extends adding and + information. Th MemberInfo is only useful to provide detailed information + on exceptions. + The ComponentModel is required so we can get resolve an object that takes as a parameter itself, but + with difference model. (See IoC 51 for the details) + + + + + Exception throw when a circular dependency is detected + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner exception. + + + + Initializes a new instance of the class. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + The parameter is . + The class name is or is zero (0). + + + + Exception threw when a request for a component + cannot be satisfied because the component does not + exist in the container + + + + + Initializes a new instance of the class. + + The name. + + + + Initializes a new instance of the class. + + The service. + + + + Initializes a new instance of the class. + + The object that holds the serialized object data. + The contextual information about the source or destination. + + + + Exception threw when there is a problem + registering a component + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The object that holds the serialized object data. + The contextual information about the source or destination. + + + + Exception threw by Kernel operations that failed + for some reason. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner exception. + + + + Initializes a new instance of the class. + + The object that holds the serialized object data. + The contextual information about the source or destination. + + + + Exception that is thrown when a error occurs during the Event Wiring process + + + + + Base exception to be used by facilities. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner exception. + + + + Initializes a new instance of the class. + + The object that holds the serialized object data. + The contextual information about the source or destination. + + + + Facility to allow components to dynamically subscribe to events offered by + other components. We call the component that offers events publishers and + the components that uses them, subscribers. + + + A component that wish to subscribe to an event must use the external configuration + adding a node subscribers on the publisher. This node can have multiple entries using the + subscriber node. + + + This example shows two simple components: one is the event publisher and the other is the + subscriber. The subscription will be done by the facility, using the publisher associated configuration. + The Publisher class: + + public class SimplePublisher + { + public event PublishEventHandler Event; + + public void Trigger() + { + if (Event != null) + { + Event(this, new EventArgs()); + } + } + } + + The Subscriber class: + + public class SimpleListener + { + private bool _listened; + private object _sender; + + public void OnPublish(object sender, EventArgs e) + { + _sender = sender; + _listened = sender != null; + } + + public bool Listened + { + get { return _listened; } + } + + public object Sender + { + get { return _sender; } + } + } + + The configuration file: + + + + + + + + + + + + + + + + + + ]]> + + + + + + Base class for facilities. + + + + + Unit of extension. A facility should use + the extension points offered by the kernel + to augment its functionality. + + + + + + + + + + + + + + + + + The custom initialization for the Facility. + + It must be overriden. + + + + Initializes the facility. First it performs the initialization common for all + facilities, setting the and the + . After it, the Init method is invoked + and the custom initilization is perfomed. + + + + + + + Terminates the Facility, invokes the method and sets + the Kernel to a null reference. + + + + + Performs the tasks associated with freeing, releasing, or resetting + the facility resources. + + It can be overriden. + + + + Gets the where the facility is registered. + + The . + + + + Gets the facility configuration. + + The representing + the facility configuration. + + + + Overriden. Initializes the facility, subscribing to the , + , Kernel events. + + + + + Checks if the component we're dealing is a publisher. If it is, + parses the configuration (the subscribers node) getting the event wiring info. + + The component model. + Invalid and/or a error in the configuration + + + + Checks if the component we're dealing is a publisher. If it is, + iterates the subscribers starting them and wiring the events. + + The component model. + The instance representing the component. + When the subscriber is not found +
or
+ The handler method isn't found +
or
+ The event isn't found +
+
+ + + Represents the information about an event. + + + + + Initializes a new instance of the class. + + Name of the event. + The name of the handler method. + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + Determines whether the specified is equal to the current . + + The to compare with the current . + + true if the specified is equal to the current ; otherwise, false. + + + + + Gets the name of the event. + + The name of the event. + + + + Gets the handler method name. + + The handler. + + + + + + + + + Activates a object connecting to the remote server. + + + + + Initializes a new instance of the class. + + The model. + The kernel. + The oncreation event handler. + The ondestruction event handler. + + + + Activates a client connecting to the remote server, enforcing the uri and the server activation. + + + + + Initializes a new instance of the class. + + The model. + The kernel. + The oncreation event handler. + The ondestruction event handler. + + + + Activates a client connecting to the remote server through the . + + + + + Initializes a new instance of the class. + + The model. + The kernel. + The oncreation envent handler. + The ondestruction event handler. + + + + Activates a client activated object. + + + + + Initializes a new instance of the class. + + The model. + The kernel. + The oncreation event handler. + The ondestruction event handler. + + + + Activates and publishes a server object. + + + + + Initializes a new instance of the class. + + The model. + The kernel. + The oncreation event handler. + The ondestruction event handler. + + + + Facility to allow the communication with remote kernel, using the .NET Remoting infraestructure. + + + TODO + + + TODO + + + + + Used for client side (Expand explanation) + + + + + Used for server side. + Holds the local registry + + + + + Used for client side. + Holds a remote proxy to the server registry + + + + + Constructs a RemotingFacility + + + + + Performs the tasks associated with freeing, releasing, or resetting + the facility resources. + + It can be overriden. + + + + Inspects the model looking for remote component configuration. If found, + do the component Remoting configuration. + + + + + Implementors must inspect the component for + a given information or parameter. + + + + + Usually the implementation will look in the configuration property + of the model or the service interface, or the implementation looking for + something. + + The kernel instance + The component model + + + + Initializes a new instance of the class. + + The converter. + if set to true is a server. + if set to true is a client. + The base URI. + The remote registry. + The local registry. + + + + Client components are not created by the container + so there's no point collecting constructor dependencies + + + + + + Used in case of generics: + + + + + + + For each new component registered, + some components in the WaitingDependency + state may have became valid, so we check them + + + + + Request the component instance + + + + + + Represents a concern that will be applied to a component instance + during commission or decomission phase. + + + + + Implementors should act on the instance in response to + a decomission or commission phase. + + The model. + The component. + + + + Summary description for FactoryInterceptor. + + + + + Summary description for TypedFactoryFacility. + + + + + Implements the basis of + + + + + Contract for the IHandler, which manages an + component state and coordinates its creation + and destruction (dispatching to activators, lifestyle managers) + + + + + Initializes the handler with a reference to the + kernel. + + + + + + Implementors should return a valid instance + for the component the handler is responsible. + It should throw an exception in the case the component + can't be created for some reason + + + + + + Implementors should dispose the component instance + + + + + + Dictionary of String/object used to + associate data with a component dependency. + For example, if you component SmtpServer depends on + host and port, you can add those to this + dictionary and the handler will be able to use them. + + + TODO: Document this + + + + + TODO: Document this + + + + + + TODO: Document this + + + + + + + Gets the state of the handler + + + + + Gets the model of the component being + managed by this handler. + + + + + The serivce that this handler handles + + + + + Allow to track state changes of a handler that is modified directly. + This can happen if the client calls AddCustomDependencyValue or + RemoveCustomDependencyValue + + + + + Might be implemented by a handler + so it can expose access to dependency information + which is used to construct meaningful error messages + + + + + Returns human readable list of dependencies + this handler is waiting for. + list of the dependecies that was already checked, used to avoid cycles. + + + + + Dictionary of Type to a list of + + + + + Dictionary of key (string) to + + + + + Custom dependencies values associated with the handler + + + + + Lifestyle manager instance + + + + + Constructs and initializes the handler + + + + + + Saves the kernel instance, subscribes to + event, + creates the lifestyle manager instance and computes + the handler state. + + + + + + Should be implemented by derived classes: + returns an instance of the component this handler + is responsible for + + + + + + + Should be implemented by derived classes: + disposes the component instance (or recycle it) + + + + + + TODO: Pendent + + + + + + + TODO: Pendent + + + + + + + TODO: Pendent + + + + + + Returns human readable list of dependencies + this handler is waiting for. + + + + + + Creates an implementation of based + on and invokes + to initialize the newly created manager. + + + + + + + Checks if the handler is able to, at very least, satisfy + the dependencies for the constructor with less parameters + + + For each non*optional dependency, the implementation will invoke + + + + + + Invoked by + in order to check if a dependency can be satisfied. + If not, the handler is set to a 'waiting dependency' state. + + + This method registers the dependencies within the correct collection + or dictionary and changes the handler state to + + + + + + + Invoked by the kernel + when one of registered dependencies were satisfied by + new components registered. + + + Handler for the event + + + + + + + Invoked when the container receives a parent container reference. + + + This method implementation checks whether the parent container + is able to supply the dependencies for this handler. + + + + + + + Handler for the event + + + + + + + Gets the handler state. + + + + + Gets the component model. + + + + + + + + + + Summary description for DefaultGenericHandler. + + + TODO: Consider refactoring AbstractHandler moving lifestylemanager + creation to DefaultHandler + + + + + Initializes a new instance of the class. + + + + + + Clone some of the parent componentmodel properties to the generic subhandler. + + + The following properties are copied: + + + The + + + The + + + + the subhandler + + + + Summary description for DefaultHandler. + + + + + Initializes a new instance of the class. + + + + + + Returns an instance of the component this handler + is responsible for + + + + + + + disposes the component instance (or recycle it) + + + + + + Summary description for DefaultHandlerFactory. + + + + + Extension point to allow the developer + to use his implementation of + + + + + Summary description for HandlerException. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The object that holds the serialized object data. + The contextual information about the source or destination. + + + + Possible states for a IHandler instance + + + + + The component can be requested + + + + + The component can not be requested + as it still depending on a external + dependency not yet available + + + + + + + + + + + + Redirects resolution to the main resolver, and if not found uses + the parent handler. + + + + + Initializes a new instance of the class. + + The parent handler. + The child resolver. + + + + Summary description for DisposalConcern. + + + + + Summary description for InitializationConcern. + + + + + Summary description for SupportInitializeConcern. + + + + + Pool implementation contract. + + + + + Implementors should return a component instance. + + + + + + Implementors should release the instance or put it + on the pool + + + + + + Initializes the pool to a initial size by requesting + n components and then releasing them. + + + + + Summary description for AbstractLifestyleManager. + + + + + The ILifestyleManager implements + a strategy for a given lifestyle, like singleton, perthread + and transient. + + + The responsability of ILifestyleManager + is only the management of lifestyle. It should rely on + to obtain a new component instance + + + + + Initializes the ILifestyleManager with the + + + + + + + + + Implementors should return the component instance based + on the lifestyle semantic. + + + + + + Implementors should release the component instance based + on the lifestyle semantic, for example, singleton components + should not be released on a call for release, instead they should + release them when disposed is invoked. + + + + + + Summary description for PerThreadLifestyleManager. + + + + + + + + + + Implements a Lifestyle Manager for Web Apps that + create at most one object per web request. + + + + + Implements a Poolable Lifestyle Manager. + + + + + Summary description for SingletonLifestyleManager. + + + + + Summary description for TransientLifestyleManager. + + + + + Inspects the component configuration and the type looking for a + definition of component activator type. The configuration preceeds whatever + is defined in the component. + + + This inspector is not guarantee to always set up an component activator type. + If nothing could be found it wont touch the model. In this case is up to + the kernel to establish a default component activator for components. + + + + + Seaches for the component activator in the configuration and, if unsuccessful + look for the component activator attribute in the implementation type. + + The kernel instance + The model instance + + + + Reads the attribute "componentActivatorType" associated with the + component configuration and verifies it implements the + interface. + + + If the type does not implement the proper interface + + + + + + + Check if the type expose one of the component activator attributes + defined in Castle.Core namespace. + + + + + + Validates that the provide type implements IComponentActivator + + The custom component activator. + + + + Inspects the component configuration and type looking for information + that can influence the generation of a proxy for that component. + + We specifically look for useSingleInterfaceProxy and marshalByRefProxy + on the component configuration or the + attribute. + + + + + + Seaches for proxy behavior in the configuration and, if unsuccessful + look for the attribute in + the implementation type. + + + + + Reads the proxy behavior associated with the + component configuration/type and applies it to the model. + + + If the conversion fails + + + + + + + Returns a instance if the type + uses the attribute. Otherwise returns null. + + + + + + Uses the ConfigurationStore registered in the kernel to obtain + an associated with the component. + + + + + Queries the kernel's ConfigurationStore for a configuration + associated with the component name. + + + + + + + Check for a node 'parameters' within the component + configuration. For each child it, a ParameterModel is created + and added to ComponentModel's Parameters collection + + + + + Inspect the configuration associated with the component + and populates the parameter model collection accordingly + + + + + + + This implementation of + collects all available constructors and populates them in the model + as candidates. The Kernel will pick up one of the candidates + according to a heuristic. + + + + + Only to hold internal constants and get rid of + magic numbers and hardcode names. + + + + + + + + + + Inspect the component for InterceptorAttribute and + the configuration for the interceptors node + + + + + Inspects the type looking for interfaces that constitutes + lifecycle interfaces, defined in the Castle.Model namespace. + + + + + Checks if the type implements and or + interfaces. + + + + + + + Inspects the component configuration and the type looking for a + definition of lifestyle type. The configuration preceeds whatever + is defined in the component. + + + This inspector is not guarantee to always set up an lifestyle type. + If nothing could be found it wont touch the model. In this case is up to + the kernel to estabish a default lifestyle for components. + + + + + Seaches for the lifestyle in the configuration and, if unsuccessful + look for the lifestyle attribute in the implementation type. + + + + + Reads the attribute "lifestyle" associated with the + component configuration and tries to convert to + enum type. + + + + + Check if the type expose one of the lifestyle attributes + defined in Castle.Model namespace. + + + + + Base for inspectors that want configuration associated with methods. + For each child a is created + and added to ComponentModel's methods collection + + + Implementors should override the return + the name of the node to be inspected. For example: + + + + + ]]> + + + + + + This implementation of + collects all potential writable puplic properties exposed by the component + implementation and populates the model with them. + The Kernel might be able to set some of these properties when the component + is requested. + + + + + Initializes a new instance of the class. + + + + + Adds the properties as optional dependencies of this component. + + + + + + + Summary description for DefaultComponentModelBuilder. + + + + + Implementors must construct a populated + instance of ComponentModel by inspecting the component + and|or the configuration. + + + + + Constructs a new ComponentModel by invoking + the registered contributors. + + + + + + + + + + "To give or supply in common with others; give to a + common fund or for a common purpose". The contributor + should inspect the component, or even the configuration + associated with the component, to add or change information + in the model that can be used later. + + + + + Removes the specified contributor + + + + + + Initializes a new instance of the class. + + The kernel. + + + + Constructs a new ComponentModel by invoking + the registered contributors. + + + + + + + + + + "To give or supply in common with others; give to a + common fund or for a common purpose". The contributor + should inspect the component, or even the configuration + associated with the component, to add or change information + in the model that can be used later. + + + + + + Removes the specified contributor + + + + + + Initializes the default contributors. + + + + + Gets the contributors. + + The contributors. + + + + Select the appropriate interecptors based on the application specific + business logic + + + + + Select the appropriate intereceptor references. + The intereceptor references aren't neccessarily registered in the model.Intereceptors + + The model to select the interceptors for + The intereceptors for this model (in the current context) or a null reference + + If the selector is not interested in modifying the interceptors for this model, it + should return a null reference and the next selector in line would be executed (or the default + model.Interceptors). + If the selector return a non null value, this is the value that is used, and the model.Interectors are ignored, if this + is not the desirable behavior, you need to merge your interceptors with the ones in model.Interecptors yourself. + + + + + Determain whatever the specified has interecptors. + The selector should only return true from this method if it has determained that is + a model that it would likely add interceptors to. + + The model + Whatever this selector is likely to add intereceptors to the specified model + + + + Defines the contract used by the kernel + to obtain proxies for components. The implementor + must return a proxied instance that dispatch + the invocation to the registered interceptors in the model + + + + + Implementors must create a proxy based on + the information exposed by ComponentModel + + The kernel instance + The component model + The component instance to be proxy (only required in some cases) + array of parameters to the constructor (if any) + The creation context + proxy instance + + + + Implementor should check the component model + and determine if the caller must pass on the component + instance to the proxy + + The kernel instance + The component model + true if an instance must be passed to + + + + Add the selector to the list of selectors that can affect interecptors decisions + in the container. + + + + + Determains whatever we need to create a proxy for this model + + + + + + + Used during the target type inspection process. + Implementors have a chance to interfere in the + proxy generation process + + + + + Invoked by the generation process to know if + the specified member should be proxied + + + + + + + + Invoked by the generation process to notify that a + member wasn't marked as virtual. + + + + + + + Invoked by the generation process to notify + that the whole process is completed. + + + + + This is a placeholder implementation of . + + + The decision to supply no implementation for + is supported by the fact that the MicroKernel should be a thin + assembly with the minimal set of features, although extensible. + Providing the support for this interface would obligate + the user to import another assembly, even if the large majority of + simple cases, no use use of interceptors will take place. + If you want to use however, see the Windsor container. + + + + + Holds the keys used by the proxy factories. + + + + + Key used to supply custom proxy options. + + + + + Represents options to configure proxies. + + + + + Initializes a new instance of the class. + + + + + Adds the additional interfaces to proxy. + + The interfaces. + + + + Adds the additional mix ins to integrate. + + The mix ins. + + + + Equalses the specified obj. + + The obj. + true if equal. + + + + Gets the hash code. + + + + + + Gets or sets the proxy hook. + + + + + Determines if the proxied component uses a target. + + + + + Determines if the proxied component can change targets. + + + + + Determines if the proxied component should only include + the service interface. + + + + + Determines if the interface proxied component should inherit + from + + + + + Gets the additional interfaces to proxy. + + The interfaces. + + + + Gets the mix ins to integrate. + + The interfaces. + + + + Helper support for proxy configuration. + + + + + Obtains the associated with the . + + The component model. + true if the options should be created if not present. + The associated proxy options for the component model. + + + + Sets the lifestyle to the specified . + + The type. + + + + + Assign a custom lifestyle type, that implements . + + Type of the custom lifestyle. + + + + + Assign a custom lifestyle type, that implements . + + The type of the custom lifestyle + + + + + Describes a set of components to register in the kernel. + + + + + Describes all the types based on basedOn. + + The base type. + + + + + Describes all the types based on type T. + + The base type. + + + + + Describes any types that are supplied. + + + + + + Prepares to register types from an assembly. + + The assembly name. + The corresponding + + + + Prepares to register types from an assembly. + + The assembly. + The corresponding + + + + Prepares to register types from an assembly containing the type. + + The type belonging to the assembly. + The corresponding + + + + Prepares to register types from an assembly containing the type. + + The type belonging to the assembly. + The corresponding + + + + Prepares to register types from a list of types. + + The list of types. + The corresponding + + + + Prepares to register types from a list of types. + + The list of types. + The corresponding + + + + Prepares to register types from a list of types. + + The list of types. + The corresponding + + + + Describes a related group of components to register in the kernel. + + + + + Prepares to register types from an assembly. + + The assembly name. + The corresponding + + + + Prepares to register types from an assembly. + + The assembly. + The corresponding + + + + Prepares to register types from a list of types. + + The list of types. + The corresponding + + + + Prepares to register types from a list of types. + + The list of types. + The corresponding + + + + Prepares to register types from a list of types. + + The list of types. + The corresponding + + + + Delegate for custom registration configuration. + + The component registration. + Not uaed. + + + + Describes how to register a group of related types. + + + + + The contract for all registrations with the kernel. + + + + + Performs the registration in the . + + The kernel. + + + + Initializes a new instance of the BasedOnDescriptor. + + + + + Assigns a conditional predication which must be satisfied. + + The predicate to satisfy. + + + + + Assigns a conditional predication which must not be satisfied. + + The predicate not to satisify. + + + + + Allows customized configurations of each matching type. + + The configuration action. + + + + + Allows customized configurations of each matching type. + + The configuration action. + + + + + Allows customized configurations of each matching type that is + assignable to . + + The type assignable from. + The configuration action. + + + + + Allows customized configurations of each matching type that is + assignable to . + + The type assignable from. + The configuration action. + + + + + Allows a type to be registered multiple times. + + + + + Returns the descriptor for accepting a new type. + + The base type. + The descriptor for the type. + + + + Returns the descriptor for accepting a new type. + + The base type. + The descriptor for the type. + + + + Returns the descriptor for accepting a type based on a condition. + + The accepting condition. + The descriptor for the type. + + + + Gets the type all types must be based on. + + + + + Gets the service descriptor. + + + + + Describes a configuration. + + + + + Initializes a new instance of the ConfigureDescriptor. + + The + The configuration action. + + + + Initializes a new instance of the ConfigureDescriptor. + + The + The base type to match. + The configuration action. + + + + Allows customized configurations of each matching type. + + The configuration action. + + + + + Allows customized configurations of each matching type. + + The configuration action. + + + + + Allows customized configurations of each matching type that is + assignable to . + + The type assignable from. + The configuration action. + + + + + Allows customized configurations of each matching type that is + assignable to . + + The type assignable from. + The configuration action. + + + + + Performs the component configuration. + + The component registration. + + + + Selects a set of types from an assembly. + + + + + Describes the source of types to register. + + + + + Allows a type to be registered multiple times. + + + + + Returns the descriptor for accepting a type. + + The base type. + The descriptor for the type. + + + + Returns the descriptor for accepting a type. + + The base type. + The descriptor for the type. + + + + Returns the descriptor for accepting a type based on a condition. + + The accepting condition. + The descriptor for the type. + + + + Selects an existing set of types to register. + + + + + Describes how to select a types service. + + + + + Uses the base type matched on. + + + + + + Uses the first interface of a type. + + + + + + Uses to lookup the sub interface. + For example: if you have IService and + IProductService : ISomeInterface, IService, ISomeOtherInterface. + When you call FromInterface(typeof(IService)) then IProductService + will be used. Useful when you want to register _all_ your services + and but not want to specify all of them. + + + + + + + Uses base type to lookup the sub interface. + + + + + + Assigns a custom service selection strategy. + + + + + + + Assigns the supplied service types. + + + + + + + This is a workaround for a CLR bug in + which GetInterfaces() returns interfaces + with no implementations. + + Type of the service. + + + + + Constructs the descriptor with name and value. + + The attribute name. + The attribute value. + + + + Constructs the descriptor with name. + + The component. + The attribute name. + + + + Builds the with value. + + The attribute value. + The + + + + Factory for creating objects. + + + + + Creates a component registration for the + + Type of the service. + The component registration. + + + + Creates a component registration for the + + Types of the service. + The component registration.B + + + + Creates a component registration for the + + Types of the service. + The component registration.B + + + + Creates a component registration for the service type. + + The service type. + The component registration. + + + + Creates a component registration for the service types. + + The primary service type. + The forwarded type. + The component registration. + + + + Creates a component registration for the service types. + + The primary service type. + The first forwarded type. + The second forwarded type. + The component registration. + + + + Creates a component registration for the service types. + + The primary service type. + The first forwarded type. + The second forwarded type. + The third forwarded type. + The component registration. + + + + Creates a component registration for the service types. + + The primary service type. + The first forwarded type. + The second forwarded type. + The third forwarded type. + The fourth forwarded type. + The component registration. + + + + Create a component registration for an exisiting + + The component model. + The component registration. + + + + Determines if the component service is already registered. + + The kernel. + The component model. + true if the service is already registered. + + + + Creates a predicate to check if a component is in a namespace. + + The namespace. + true if the component type is in the namespace. + + + + Creates a predicate to check if a component shares a namespace with another. + + The component type to test namespace against. + true if the component is in the same namespace. + + + + Creates a predicate to check if a component shares a namespace with another. + + The component type to test namespace against. + true if the component is in the same namespace. + + + + Delegate to filter component registration. + + The kernel. + The component model. + true if accepted. + + + + Registration for a single type as a component with the kernel. + + You can create a new registration with the factory. + + The service type + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with an existing . + + + + + With the overwrite. + + + + + + Change the name of this registration. + This will be the key for the component in the kernel. + + If not set, the of the + will be used as the key to register the component. + + The name of this registration. + + + + + Sets the concrete type that implements the service to . + + If not set, the will be used as the implementation for this component. + + The type that is the implementation for the service. + + + + + Sets the concrete type that implements the service to . + + If not set, the will be used as the implementation for this component. + + The type that is the implementation for the service. + + + + + Assigns an existing instance as the component for this registration. + + The component instance. + + + + + Registers the service types on behalf of this component. + + The types to forward. + + + + + Registers the service types on behalf of this component. + + The forwarded type. + The component registration. + + + + Registers the service types on behalf of this component. + + The first forwarded type. + The second forwarded type. + The component registration. + + + + Registers the service types on behalf of this component. + + The first forwarded type. + The second forwarded type. + The third forwarded type. + The component registration. + + + + Registers the service types on behalf of this component. + + The first forwarded type. + The second forwarded type. + The third forwarded type. + The fourth forwarded type. + The component registration. + + + + Registers the service types on behalf of this component. + + The types to forward. + + + + + Set a custom which creates and destroys the component. + + + + + + Sets for this component. + + The extended properties. + + + + + Sets for this component. + + The extendend properties as key/value pairs. + + + + + Specify custom dependencies using . + + Use to specify the components + this component should be resolved with. + + The dependencies. + + + + + Uses a dictionary of key/value pairs, to specify custom dependencies. + + Use to specify the components + this component should be resolved with. + + The dependencies. + + + + + Uses an (anonymous) object as a dictionary, to specify custom dependencies. + + Use to specify the components + this component should be resolved with. + + The dependencies. + + + + + Obsolete, use instead. + + The dependencies. + + + + + Obsolete, use instead. + + The dependencies. + + + + + Obsolete, use instead. + + The dependencies. + + + + + Override (some of) the services that this component needs. + Use to create an override. + + Each key represents the service dependency of this component, for example the name of a constructor argument or a property. + The corresponding value is the key of an other component registered to the kernel, and is used to resolve the dependency. + + To specify dependencies which are not services, use + + The service overrides. + + + + + Override (some of) the services that this component needs, using a dictionary. + + Each key represents the service dependency of this component, for example the name of a constructor argument or a property. + The corresponding value is the key of an other component registered to the kernel, and is used to resolve the dependency. + + To specify dependencies which are not services, use + + The service overrides. + + + + + Override (some of) the services that this component needs, using an (anonymous) object as a dictionary. + + Each key represents the service dependency of this component, for example the name of a constructor argument or a property. + The corresponding value is the key of an other component registered to the kernel, and is used to resolve the dependency. + + To specify dependencies which are not services, use + + The service overrides. + + + + + Set configuration parameters with string or values. + + The parameters. + + + + + Creates an attribute descriptor. + + The attribute key. + + + + + Apply more complex configuration to this component registration. + + The config nodes. + + + + + Apply more complex configuration to this component registration. + + The configuration . + + + + + Set the interceptors for this component. + + The interceptors. + + + + + Marks the component as startable. + + + Be sure that you first added the + to the kernel, before registering this component. + + + + Assigns the start method for the startable. + + The start method. + + Be sure that you first added the + to the kernel, before registering this component. + + + + Assigns the stop method for the startable. + + The stop method. + + Be sure that you first added the + to the kernel, before registering this component. + + + + Marks the components with one or more actors. + + The component actors. + + + + + Assigns a conditional predication which must be satisfied. + + The component will only be registered into the kernel + if this predicate is satisfied (or not assigned at all). + + The predicate to satisfy. + + + + + Assigns a conditional predication which must not be satisfied. + + The component will only be registered into the kernel + if this predicate is not satisfied (or not assigned at all). + + The predicate not to satisify. + + + + + Registers this component with the . + + The kernel. + + + + Adds the attribute descriptor. + + The key. + The value. + + + + + Adds the descriptor. + + The descriptor. + + + + + Uses a factory method to instantiate the component. + Requires the to be installed. + + Implementation type + Factory method + + + + + Uses a factory method to instantiate the component. + Requires the to be installed. + + Implementation type + Factory method + + + + + Uses a factory to instantiate the component + + Factory type. This factory has to be registered in the kernel. + Implementation type. + Factory invocation + + + + + The name of the component. Will become the key for the component in the kernel. + + To set the name, use . + + If not set, the of the + will be used as the key to register the component. + + The name. + + + + The type of the service, the same as . + + This is the first type passed to . + + The type of the service. + + + + Gets the forwarded service types on behalf of this component. + + Add more types to forward using . + + The types of the forwarded services. + + + + The concrete type that implements the service. + + To set the implementation, use . + + The implementation of the service. + + + + Set proxy for this component. + + The proxy. + + + + Set the lifestyle of this component. + For example singleton and transient (also known as 'factory'). + + The with lifestyle. + + + + Helper wrapper around Converter + + + + + + Helper factory class + + + + + + Helper factory class + + + + + + A non-generic . + + You can create a new registration with the factory. + + + + + Represents a configuration child. + + + + + Applies the configuration node. + + The configuration. + + + + Represents a configuration attribute. + + + + + Applies the configuration node. + + The configuration. + + + + Create a with name. + + The attribute name. + The new + + + + Represents a named attribute. + + + + + Builds the with name/value. + + The attribute value. + The new + + + + Builds the with name/value. + + The attribute value. + The new + + + + Represents a configuration child. + + + + + Create a with name. + + The child name. + The new + + + + Represents a named child. + + + + + Builds the with name/value. + + The child value. + The new + + + + Builds the with name/value. + + The child value. + The new + + + + Builds the with name/config. + + The child configuration. + The new + + + + Builds the with name/config. + + The child nodes. + The new + + + + Applies the configuration node. + + The configuration. + + + + Represents a simple child node. + + + + + Applies the configuration node. + + The configuration. + + + + Represents a complex child node. + + + + + Applies the configuration node. + + The configuration. + + + + Represents a compound child node. + + + + + Applies the configuration node. + + The configuration. + + + + Represents a configuration parameter. + + + + + Create a with key. + + The parameter key. + The new + + + + Gets the parameter key. + + + + + Gets the parameter value. + + + + + Gets the parameter configuration. + + + + + Represents a parameter key. + + + + + Builds the with key/value. + + The parameter value. + The new + + + + Builds the with key/config. + + The parameter configuration. + The new + + + + The parameter key name. + + + + + Represents a key/value pair. + + + + + Create a with key. + + The property key. + The new + + + + Gets the property key. + + + + + Gets the property value. + + + + + Represents a property key. + + + + + Builds the with key/value. + + The property value. + The new + + + + The property key name. + + + + + Represents a service override. + + + + + Creates a with key. + + The service override key. + The new + + + + Gets the optional value type specifier. + + + + + Represents a service override key. + + + + + Builds the with key/value. + + The service overeride value. + The new + + + + Builds the with key/values. + + The service overeride values. + The new + + + + Builds the with key/values. + + The service overeride values. + The new + The value type. + + + + Builds the with key/values. + + The service overeride values. + The new + + + + Builds the with key/values. + + The service overeride values. + The new + The value type. + + + + Gets the service override key name. + + + + + Summary description for IReleasePolicy. + + + + + Only tracks components that have decommission steps + registered or have pooled lifestyle. + + + + + No tracking of component instances are made. + + + + + Initializes a new instance of the class. + + + + + Handle dependencies of services in the format of typed arrays. + + + This is a complimentary implementation + that is capable of satisfying dependencies of services as typed arrays. + + Note that it will take precedence over service override for arrays defined + on the configuration. + + + + In order to install the resolver: + + var kernel = new DefaultKernel(); + kernel.Resolver.AddSubResolver(new ArrayResolver(kernel)); + + + + To use it, assuming that IService is on the container: + + + + public class Component + { + public Component(IService[] services) + { + } + } + + + + + + Handle dependencies of services in the format of generic IList. + + + This is a complimentary implementation + that is capable of satisfying dependencies of services generic IList. + + Note that it will take precedence over service override for lists defined + on the configuration. + + + + In order to install the resolver: + + var kernel = new DefaultKernel(); + kernel.Resolver.AddSubResolver(new ListResolver(kernel)); + + + + To use it, assuming that IService is on the container: + + + + public class Component + { + public Component(IList<IService> services) + { + } + } + + + + + + Default implementation for . + This implementation is quite simple, but still should be useful + for 99% of situations. + + + + + Implementors should use a strategy to obtain + valid references to properties and/or services + requested in the dependency model. + + + + + This method is called with a delegate for firing the + IKernelEvents.DependencyResolving event. + + The delegate used to fire the event + + + + Registers a sub resolver instance + + The subresolver instance + + + + Unregisters a sub resolver instance previously registered + + The subresolver instance + + + + Initializes a new instance of the class. + + The kernel. + + + + Initializes this instance with the specified dependency delegate. + + The dependency delegate. + + + + Registers a sub resolver instance + + The subresolver instance + + + + Unregisters a sub resolver instance previously registered + + The subresolver instance + + + + Returns true if the resolver is able to satisfy the specified dependency. + + Creation context, which is a resolver itself + Parent resolver + Model of the component that is requesting the dependency + The dependency model + true if the dependency can be satisfied + + + + Try to resolve the dependency by checking the parameters in + the model or checking the Kernel for the requested service. + + + The dependency resolver has the following precedence order: + + + The dependency is checked within the + + + The dependency is checked within the instance for the component + + + The dependency is checked within the registered s + + + Finally the resolver tries the normal flow + which is using the configuration + or other component to satisfy the dependency + + + + Creation context, which is a resolver itself + Parent resolver + Model of the component that is requesting the dependency + The dependency model + The dependency resolved value or null + + + + Extracts the component name from the a ref strings which is + ${something} + + + + + + + + This method rebuild the context for the parameter type. + Naive implementation. + + + + + Summary description for DependencyResolverException. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The object that holds the serialized object data. + The contextual information about the source or destination. + + + + This implementation of + does not try to obtain an external configuration by any means. + Its only purpose is to serve as a base class for subclasses + that might obtain the configuration node from anywhere. + + + + + A subsystem is used by the MicroKernel to deal + with a specific concern. + + + + + Initializes the subsystem + + + + + + Should perform the termination + of the subsystem instance. + + + + + The contract used by the kernel to obtain + external configuration for the components and + facilities. + + + + + Associates a configuration node with a facility key + + item key + Configuration node + + + + Associates a configuration node with a component key + + item key + Configuration node + + + + Associates a configuration node with a bootstrap component key + + item key + Configuration node + + + + Adds the child container configuration. + + The container's name. + The config. + + + + Returns the configuration node associated with + the specified child container key. Should return null + if no association exists. + + item key + + + + + Returns the configuration node associated with + the specified facility key. Should return null + if no association exists. + + item key + + + + + Returns the configuration node associated with + the specified component key. Should return null + if no association exists. + + item key + + + + + Returns the configuration node associated with + the specified component key. Should return null + if no association exists. + + item key + + + + + Returns all configuration nodes for facilities + + + + + + Returns all configuration nodes for components + + + + + + Returns all configuration nodes for bootstrap components + + + + + + Gets the child containers configuration nodes. + + + + + + + + + + + + + + Initializes a new instance of the class. + + + + + Associates a configuration node with a facility key + + item key + Configuration node + + + + Associates a configuration node with a component key + + item key + Configuration node + + + + Associates a configuration node with a bootstrap component key + + + + + Adds the child container configuration. + + The key. + The config. + + + + Returns the configuration node associated with + the specified facility key. Should return null + if no association exists. + + item key + + + + + Returns the configuration node associated with + the specified child container key. Should return null + if no association exists. + + item key + + + + + Returns the configuration node associated with + the specified component key. Should return null + if no association exists. + + item key + + + + + Returns the configuration node associated with + the specified component key. Should return null + if no association exists. + + + + + + + Returns all configuration nodes for facilities + + + + + + Returns all configuration nodes for bootstrap components + + + + + + Returns all configuration nodes for child containers + + + + + + Returns all configuration nodes for components + + + + + + Base implementation of + + + + + Implements a conversion logic to a type of a + set of types. + + + + + Returns true if this instance of ITypeConverter + is able to handle the specified type. + + + + + + + Returns true if this instance of ITypeConverter + is able to handle the specified type with the specified + configuration + + + + + + + + Should perform the conversion from the + string representation specified to the type + specified. + + + + + + + + Should perform the conversion from the + configuration node specified to the type + specified. + + + + + + + + Returns true if this instance of ITypeConverter + is able to handle the specified type with the specified + configuration + + + + + + The default behavior is to just pass it to the normal CanHadnleType + peeking into the configuration is used for some advanced functionality + + + + + Initializes a new instance of the class. + + + + + This interface is needed because we want to isolate ourself from + the generic parameters, so we can work type safe inside the implementations, + and still call from non generic types outside. + + + + + Initializes a new instance of the class. + + + + + Looks for a on the type to be converted. + If found, the TypeConverter defined by the attribute is used to perform the conversion. + + + + + Marker interface that signals that a converter + depends on IKernel to be able to perform + the conversion. + + + + + Attempts to utilize an existing for conversion + + + + + Creates the target type instance. + + The type. + The configuration. + + + + + Chooses the first non default constructor. Throws an exception if more than + one non default constructor is found + + + The chosen constructor, or null if none was found + + + + Converts the constructor parameters. + + The constructor. + The configuration. + + + + + Converts the property values. + + The instance. + The type. + The configuration. + + + + Finds the child (case insensitive). + + The config. + The name. + + + + + Gets the conversion manager. + + The conversion manager. + + + + Converts a string representation to an enum value + + + + + Implements all standard conversions. + + + + + Convert a type name to a Type instance. + + + + + Summary description for ConverterException. + + + + + Initializes a new instance of the class. + + The message. + + + + Initializes a new instance of the class. + + The message. + The inner exception. + + + + Initializes a new instance of the class. + + The object that holds the serialized object data. + The contextual information about the source or destination. + + + + Declares a type as being convertible by a and optionally defines the converter to be used + + + + + Defines the to be used to convert the type + + + + + Defines the to be used to convert the type + + + + + + Composition of all available conversion managers + + + + + Establish a composition interface and a subsystem. + Implementors should delegate the conversion to + a instance of a type converter. + + + + + Register a type converter instance. + + + + + + Method finds the next biggest node + It assumes Add puts lesser nodes on the right + + + + Node's left + + + Node's right + + + Node's parent + + + DA Linked List + + + + Creates a ComponentName using a name pattern like + "service:key=value,key2=value2" + + Complete name + + + + Creates a ComponentName with specified service and + properties. + + Service name + Property list. + + + + Serialization constructor. + + + + + + + Parses the full name extracting the service and properties. + + Full name. + + + + Sets up the service. Can be empty but can't be null. + + + + + + Parses and validate a properties list string like + "key=value,key2=value2" and so on. + + Property list. + + + + Validates a properties Hashtable. + + Property list. + + + + Default implementation. + Keeps services map as a simple hash table. + Keeps key map as a list dictionary to maintain order. + Does not support a query string. + + + + + Contract for SubSystem that wishes to keep and coordinate + component registration. + + + + + Implementors should register the key and service pointing + to the specified handler + + + + + + + Unregister the handler by the given key + + + + + + Unregister the handler by the given service + + + + + + Returns true if there is a component registered + for the specified key + + + + + + + Returns true if there is a component registered + for the specified service + + + + + + + Returns the associated with + the specified key. + + + + + + + Returns an array of that + satisfies the specified query. + + + + + + + Returns the associated with + the specified service. + + + + + Returns the associated with + the specified key with the service type. + + It is expected that this will be used mainly to resolve a generic service + by its key. + + + + + + Returns an array of associated with + the specified service. + + + + + + + Returns all registered. + + + + + + Return s where components are compatible + with the specified service. + + + + + + + List of handler by key + + + + + List of handler by service + + + + + Register a new component resolver that can take part in the decision + making about which handler to resolve + + + + + Returns the number of components registered. + + + + + Associates a with + the specified service + + + + + Associates a with + the specified key + + + + + Map(String, IHandler) to map component keys + to + Items in this dictionary are sorted in insertion order. + + + + + Map(Type, IHandler) to map a service + to . + If there is more than a single service of the type, only the first + registered services is stored in this dictionary. + It serve as a fast lookup for the common case of having a single handler for + a type. + + + + + Initializes a new instance of the class. + + + + + Implementors of this interface allow to extend the way the container perform + component resolution based on some application specific business logic. + + + This is the sibling interface to . + This is dealing strictly with root components, while the is dealing with + dependent components. + + + + + Whatever the selector has an opinion about resolving a component with the + specified service and key. + + The service key - can be null + The service interface that we want to resolve + + + + Select the appropriate handler from the list of defined handlers. + The returned handler should be a member from the array. + + The service key - can be null + The service interface that we want to resolve + The defined handlers + The selected handler, or null + + + + When requesting a component by service, KeySearchNamingSubSystem first + determines if more than one component has been registered for that service. + If not, Default resolution occurs. If so, all of the registered keys for + that service are processed through the provided Predicate to determine which + key to use for service resolution. If no Predicate matches, the default + resolution occurs. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The key predicate. + + + + Registers the given handler with the give key. + + The key. + The handler. + + + + Unregisters the handler associated with the given key + + The key. + + + + Unregisters the handler associated with the given service + + The service. + + + + Executes the Predicate against all keys for the registered service to + determine which component to return. + + The service. + + + + + Alternative implementation. + Extends the default implementation replacing the + key support with a more complete ComponentName. Supports + queries. + + + The user must register components using the following construction + + service:properties + + Where properties is a list of key value pairs (comma separated). Example: + + protocol:secure=true,version=1.2 + + The user can then query for components using the same construction: + + protocol:secure=true + + Or to return all: + + protocol:* + + + + + + Pendent + + + + + An implementation of a should + be able to return instances of + for a given resource identifier. + + + + + Holds the keys used by Kernel to register/request + a subsystem. + + + + + Key used for the configuration store subsystem + + + + + Key used for the conversion manager + + + + + Key used for the naming subsystem + + + + + Key used for the resource subsystem + + + + + Compares if the reference of two objects are equals. + + + + + Summary description for ReferenceExpressionUtil. + + + + + Default implementation of . + This implementation is complete and also support a kernel + hierarchy (sub containers). + + + Default implementation of . + This implementation is complete and also support a kernel + hierarchy (sub containers). + + + + + The IKernel interface exposes all the functionality + the MicroKernel implements. + + + It allows you to register components and + request them by the key or the service they implemented. + It also allow you to register facilities and subsystem, thus + augmenting the functionality exposed by the kernel alone to fits + your needs. + + + + + + + Summary description for IKernelEvents. + + + + + Event fired when a new component is registered + on the kernel. + + + + + Event fired when a component is removed from the kernel. + + + + + Event fired after the ComponentModel is created. + Allows customizations that may affect the handler. + + + + + Event fired when the kernel was added as child of + another kernel. + + + + + Event fired when the kernel was removed from being a child + of another kernel. + + + + + Event fired before the component is created. + + + + + Event fired when a component instance destroyed. + + + + + Event fired when a new handler is registered + (it might be in a valid or waiting dependency state) + + + + + Event fired when a dependency is being resolved, + it allows the dependency to be changed, + but the client ComponentModel must not be changed. + + + + + Registers the components provided by the s + with the . + + Create a new registration using .For() or . + + + + kernel.Register(Component.For<IService>().ImplementedBy<DefaultService>()); + + + The component registrations. + The kernel. + + + + Returns true if the specified component was + found and could be removed (i.e. no other component depends on it) + + The component's key + + + + + Returns true if the specified key was registered + + + + + + + Returns true if the specified service was registered + + + + + + + Associates objects with a component handler, + allowing it to use the specified dictionary + when resolving dependencies + + + + + + + Associates objects with a component handler, + allowing it to use the specified dictionary + when resolving dependencies + + + + + + + Associates objects with a component handler, + allowing it to use the specified dictionary + when resolving dependencies + + + + + + + Associates objects with a component handler, + allowing it to use the specified dictionary + when resolving dependencies + + + + + + + Releases a component instance. This allows + the kernel to execute the proper decomission + lifecycles on the component instance. + + + + + + Constructs an implementation of + for the given + + + + + + + Returns the + for the specified component key. + + + + + + + Returns the + for the specified service. + + + + + + + Return handlers for components that + implements the specified service. + + + + + + + Return handlers for components that + implements the specified service. + The check is made using IsAssignableFrom + + + + + + + Adds a to the kernel. + + + + + + + + Creates and adds an facility to the kernel. + + The facility type. + + + + + Creates and adds an facility to the kernel. + + The facility type. + + The callback for creation. + + + + Creates and adds an facility to the kernel. + + The facility type. + + The callback for creation. + + + + Creates and adds an facility to the kernel. + + The facility type. + + + + + Creates and adds an facility to the kernel. + + The facility type. + The callback for creation. + + + + + Creates and adds an facility to the kernel. + + The facility type. + The callback for creation. + + + + + Returns the facilities registered on the kernel. + + + + + + Adds (or replaces) an + + + + + + + Returns an implementation of + for the specified key. + + + + + + + + Support for kernel hierarchy + + + + + + Remove child kernel + + + + + + Raise the hanlder registered event, required so + dependant handlers will be notified about their dependant moving + to valid state. + + + + + + Registers the to be forwarded + to the component registered with . + + The service type that gets forwarded. + The name of the component to forward to. + + + + Register a new component resolver that can take part in the decision + making about which handler to resolve + + + + + Adds a concrete class as a component + + + + + + + Adds a concrete class + as a component with the specified . + + The key with which to index the component. + The of the component. + The specified for the component. + + If you have indicated a lifestyle for the specified using + attributes, this method will not overwrite that lifestyle. To do that, use the + method. + + + Thrown if , or + are . + + + Thrown if is . + + + + + Adds a concrete class + as a component with the specified . + + The key with which to index the component. + The of the component. + The specified for the component. + + If , then ignores all other configurations + for lifestyle and uses the value in the parameter. + + + If you have indicated a lifestyle for the specified using + attributes, this method will not overwrite that lifestyle. To do that, use the + method. + + + Thrown if or + are . + + + Thrown if is . + + + + Adds a concrete class and an interface + as a component + + The key with which to index the component. + The service that this component implements. + The of the component. + + + + Adds a concrete class and an interface + as a component with the specified . + + The key with which to index the component. + The service that this component implements. + The of the component. + The specified for the component. + + If you have indicated a lifestyle for the specified using + attributes, this method will not overwrite that lifestyle. To do that, use the + method. + + + Thrown if , , or + are . + + + Thrown if is . + + + + + Adds a concrete class and an interface + as a component with the specified . + + The key with which to index the component. + The service that this component implements. + The of the component. + The specified for the component. + + If , then ignores all other configurations + for lifestyle and uses the value in the parameter. + + + If you have indicated a lifestyle for the specified using + attributes, this method will not overwrite that lifestyle. To do that, use the + method. + + + Thrown if , , or + are . + + + Thrown if is . + + + + + Adds a concrete class as a component + + + + + Adds a concrete class + as a component with the specified . + + The specified for the component. + + If you have indicated a lifestyle for the specified T using + attributes, this method will not overwrite that lifestyle. To do that, use the + method. + + + Thrown if is . + + + + + Adds a concrete class + as a component with the specified . + + The specified for the component. + + If , then ignores all other configurations + for lifestyle and uses the value in the parameter. + + + If you have indicated a lifestyle for the specified T using + attributes, this method will not overwrite that lifestyle. To do that, use the + method. + + + Thrown if is . + + + + Adds a concrete class and an interface + as a component + + The service that this component implements. + + + + Adds a concrete class and an interface + as a component with the specified . + + The service that this component implements. + The specified for the component. + + If you have indicated a lifestyle for the specified T using + attributes, this method will not overwrite that lifestyle. To do that, use the + method. + + + are . + + + Thrown if is . + + + + + Adds a concrete class and an interface + as a component with the specified . + + The service that this component implements. + The specified for the component. + + If , then ignores all other configurations + for lifestyle and uses the value in the parameter. + + + attributes, this method will not overwrite that lifestyle. To do that, use the + method. + + + are . + + + Thrown if is . + + + + + Used mostly by facilities. Adds an instance + to be used as a component. + + + + + + Used mostly by facilities. Adds an instance + to be used as a component. + + + + + + + Adds a concrete class as a component and specify the extended properties. + Used by facilities, mostly. + + + + + + + + Adds a concrete class and an interface + as a component and specify the extended properties. + Used by facilities, mostly. + + + + + + + + + Adds a custom made . + Used by facilities. + + + + + + Used mostly by facilities. Adds an instance + to be used as a component. + + + + + + + Used mostly by facilities. Adds an instance + to be used as a component. + + + + + + + + Used mostly by facilities. Adds an instance + to be used as a component. + + + + + + + + + Returns the component instance by the service type + + + + + Returns all the valid component instances by + the service type + + The service type + + + + Returns all the valid component instances by + the service type + + The service type + Arguments to resolve the services + + + + Returns all the valid component instances by + the service type + + The service type + Arguments to resolve the services + + + + Returns the component instance by the service type + using dynamic arguments + + + + + + + + Returns the component instance by the component key + using dynamic arguments + + + + + + + + Returns the component instance by the service type + using dynamic arguments + + Service to resolve + Arguments to resolve the services + + + + + Returns the component instance by the component key + using dynamic arguments + + Key to resolve + Arguments to resolve the services + + + + + Returns a component instance by the key + + + + + + + + Returns the component instance by the service type + using dynamic arguments + + + + + + + Returns the component instance by the service type + using dynamic arguments + + Arguments to resolve the services + + + + + Returns the component instance by the component key + + + + + + Returns a component instance by the key + + Component's key + Service type + The Component instance + + + + Returns a component instance by the key + + Service type + Component's key + + The Component instance + + + + Returns component instances that implement TService + + + + + + + Returns component instances that implement TService + + + + + + + Returns component instances that implement TService + + + + + + + Returns a component instance by the key + + + + + + + + + Returns the implementation of + + + + + Returns the implementation of + + + + + Gets or sets the implementation of + + + + + Gets or sets the implementation for + + + + + Returns the implementation for + + + + + Gets or sets the implementation of + allowing different strategies for proxy creation. + + + + + Returns the parent kernel + + + + + Graph of components and iteractions. + + + + + Returns the component instance by the key + + + + + Returns the component instance by the service type + + + + + The parent kernel, if exists. + + + + + The implementation of + + + + + The implementation of + + + + + The dependency resolver. + + + + + Implements a policy to control component's + disposal that the usef forgot. + + + + + Holds the implementation of + + + + + List of registered. + + + + + Map of subsystems registered. + + + + + List of sub containers. + + + + + Constructs a DefaultKernel with no component + proxy support. + + + + + Constructs a DefaultKernel with the specified + implementation of and + + + + + + + Constructs a DefaultKernel with the specified + implementation of + + + + + Registers the components described by the s + with the . + The component registrations. + The kernel. + + + + + Returns true if the specified component was + found and could be removed (i.e. no other component depends on it) + + The component's key + + + + + Associates objects with a component handler, + allowing it to use the specified dictionary + when resolving dependencies + + + + + + + Associates objects with a component handler, + allowing it to use the specified dictionary + when resolving dependencies + + + + + + + Associates objects with a component handler, + allowing it to use the specified dictionary + when resolving dependencies + + + + + + + Associates objects with a component handler, + allowing it to use the specified dictionary + when resolving dependencies + + + + + + + Releases a component instance. This allows + the kernel to execute the proper decomission + lifecycles on the component instance. + + + + + + Return handlers for components that + implements the specified service. + + + + + + + Return handlers for components that + implements the specified service. + The check is made using IsAssignableFrom + + + + + + + Returns the facilities registered on the kernel. + + + + + + Gets the service object of the specified type. + + + + A service object of type serviceType. + + + An object that specifies the type of service object to get. + + + + Gets the service object of the specified type. + + + + A service object of type serviceType. + + + + + Starts the process of component disposal. + + + + + Adds a concrete class + as a component with the specified . + + The key with which to index the component. + The of the component. + The specified for the component. + + If you have indicated a lifestyle for the specified using + attributes, this method will not overwrite that lifestyle. To do that, use the + method. + + + Thrown if or + are . + + + Thrown if is . + + + + + Adds a concrete class + as a component with the specified . + + The key with which to index the component. + The of the component. + The specified for the component. + + If , then ignores all other configurations + for lifestyle and uses the value in the parameter. + + + If you have indicated a lifestyle for the specified using + attributes, this method will not overwrite that lifestyle. To do that, use the + method. + + + Thrown if or + are . + + + Thrown if is . + + + + Adds a concrete class and an interface + as a component with the specified . + + The key with which to index the component. + The service that this component implements. + The of the component. + The specified for the component. + + If you have indicated a lifestyle for the specified using + attributes, this method will not overwrite that lifestyle. To do that, use the + method. + + + Thrown if , , or + are . + + + Thrown if is . + + + + + Adds a concrete class and an interface + as a component with the specified . + + The key with which to index the component. + The service that this component implements. + The of the component. + The specified for the component. + + If , then ignores all other configurations + for lifestyle and uses the value in the parameter. + + + If you have indicated a lifestyle for the specified using + attributes, this method will not overwrite that lifestyle. To do that, use the + method. + + + Thrown if , , or + are . + + + Thrown if is . + + + + + + + + + + + + + + + + + + + + + + + + + + + + Used mostly by facilities. Adds an instance + to be used as a component. + + + + + + + Used mostly by facilities. Adds an instance + to be used as a component. + + + + + + + + Adds a concrete class as a component + + + + + Adds a concrete class + as a component with the specified . + + The specified for the component. + + If you have indicated a lifestyle for the specified T using + attributes, this method will not overwrite that lifestyle. To do that, use the + method. + + + Thrown if is . + + + + + Adds a concrete class + as a component with the specified . + + The specified for the component. + If , then ignores all other configurations + for lifestyle and uses the value in the parameter. + + If you have indicated a lifestyle for the specified T using + attributes, this method will not overwrite that lifestyle. To do that, use the + method. + + + Thrown if + + is + + . + + + + Adds a concrete class and an interface + as a component + + The service that this component implements. + + + + Adds a concrete class and an interface + as a component with the specified . + + The service that this component implements. + The specified for the component. + + If you have indicated a lifestyle for the specified T using + attributes, this method will not overwrite that lifestyle. To do that, use the + method. + + + are . + + + Thrown if is . + + + + + Adds a concrete class and an interface + as a component with the specified . + + The service that this component implements. + The specified for the component. + If , then ignores all other configurations + for lifestyle and uses the value in the parameter. + + attributes, this method will not overwrite that lifestyle. To do that, use the + method. + + + are . + + + Thrown if is . + + + + + Used mostly by facilities. Adds an instance + to be used as a component. + + + + + + Used mostly by facilities. Adds an instance + to be used as a component. + + + + + + + Returns the component instance by the service type + using dynamic arguments + + + + + + + Returns the component instance by the service type + using dynamic arguments + + + + + + + Returns the component instance by the component key + + + + + + Returns a component instance by the key + + Component's key + Service type + The Component instance + + + + Returns a component instance by the key + + Service type + Component's key + + The Component instance + + + + Returns the component instance by the service type + + + + + Returns all the valid component instances by + the service type + + The service type + + + + Returns all the valid component instances by + the service type + + The service type + Arguments to resolve the services + + + + Returns all the valid component instances by + the service type + + The service type + Arguments to resolve the services + + + + Returns component instances that implement TService + + + + + + + + Returns component instances that implement TService + + + + + + + + Returns the component instance by the service type + using dynamic arguments + + + + + + + + Returns the component instance by the service type + using dynamic arguments + + + + + + + + Returns the component instance by the component key + using dynamic arguments + + + + + + + + Returns the component instance by the component key + using dynamic arguments + + + + + + + + Returns a component instance by the key + + + + + + + + Returns component instances that implement TService + + + + + + + Returns a component instance by the key + + + + + + + + + Resolves the specified key. + + The key. + The service. + Type of the arguments as anonymous. + + + + + Graph of components and iteractions. + + + + + Pending + + + + + Pending + + + + + + Pending + + + + + + Pending + + + + + + Pending + + + + + + Pending + + + + + + Pending + + + + + Pending + + + + + + Represents a delegate which holds basic information about a component. + + Key which identifies the component + handler that holds this component and is capable of + creating an instance of it. + + + + + Represents a delegate which holds basic information about a component + and its instance. + + Component meta information + Component instance + + + + Represents a delegate which holds the information about the + component + + + + + Represents a delegate which holds a handler + + handler that holds a component and is capable of + creating an instance of it. + + + + + + Represents a delegate which holds dependency + resolving information. + + +
+
diff --git a/lib/Castle.Windsor.xml b/lib/Castle.Windsor.xml index 4204e95f266..21ef6525fb4 100644 --- a/lib/Castle.Windsor.xml +++ b/lib/Castle.Windsor.xml @@ -1,1571 +1,1571 @@ - - - - Castle.Windsor - - - - - Implementation of that assumes ownership of the - wrapped . If this adapter is disposed, the underlying - is diposed as well. - - - - - Implementation of that does not assume ownership of the - wrapped . - - - - - Integrates the to the System.ComponentModel - and System.ComponentMode.Design infrastructure. - - - - - - - - This interface should be implemented by classes - that are available in a bigger context, exposing - the container to different areas in the same application. - - For example, in Web application, the (global) HttpApplication - subclasses should implement this interface to expose - the configured container - - - - - - Constructs an initial ContainerWrapper. - - The to adapt. - - - - Constructs an initial ContainerWrapper. - - The to adapt. - The parent . - - - - Adds the specified to the at the end of the list. - - The to add. - - - - Adds the specified to the at the end of the list, - and assigns a name to the component. - - The to add. - The unique, case-insensitive name to assign to the component, or null. - - - - Removes a component from the . - - The to remove - - - - Gets the service object of the specified type. - - The type of service. - An object inplementing service, or null. - - - - Adds the specified service to the service container. - - The type of service to add. - The instance of the service to add. - - - - Adds the specified service to the service container. - - The type of service to add. - A callback object that is used to create the service. - - - - Adds the specified service to the service container, and optionally - promotes the service to any parent service containers. - - The type of service to add. - The instance of the service to add. - true to promote this request to any parent service containers. - - - - Adds the specified service to the service container, and optionally - promotes the service to parent service containers. - - The type of service to add. - A callback object that is used to create the service. - true to promote this request to any parent service containers. - - - - Removes the specified service type from the service container. - - The type of service to remove. - - - - Removes the specified service type from the service container, - and optionally promotes the service to parent service containers. - - The type of service to remove. - true to promote this request to any parent service containers. - - - - Determins if the service type represents an intrinsic service. - - The type of service to remove. - true if the service type is an intrinsic service. - - - - Determins if the specified service type exists in the service container. - - The type of service to remove. - true if the service type exists. - - - - Releases the resources used by the component. - - - - - Releases the resources used by the component. - - true if disposing. - - - - Gets or sets the associated with the . - - - - - Event that notifies the disposal of the . - - - - - Gets all the components in the . - - - - - Gets the adapted - - - - - Constructs a default ContainerAdapter. - - - - - Constructs a chained ContainerAdapter. - - The parent . - - - - Constructs an initial ContainerAdapter. - - The to adapt. - - - - Constructs an initial ContainerAdapter. - - The to adapt. - The parent . - - - - Custom activator to create the instance on demand. - - - - - Implementation of . - Do not support configuration inheritance. - - - - - Accepts the specified node. - Check if node has the same name as the processor and the node.NodeType - is in the AcceptNodeTypes List - - The node. - - - - - Convert and return child parameter into an XmlElement - An exception will be throw in case the child node cannot be converted - - Parent node - Node to be converted - child node as XmlElement - - - - - - - - - - - - attributeValue - - propertyValue - - - - - - - Processes the specified node list. - - The node list. - The engine. - - - - Processes element attributes. - if the attribute is include will append to the element - all contents from the file. - if the attribute has a property reference the reference will be - expanded - - The element. - - - - - Properties names can contain a-zA-Z0-9_. - i.e. #!{ my_node_name } || #{ my.node.name } - spaces are trimmed - - - - - Processes the string. - - The node. - The value. - The context. - - - - Accepts the specified node. - Check if node has the same name as the processor and the node.NodeType - is in the AcceptNodeTypes List - NOTE: since the BatchRegistrationFacility already uses an include - element we will distringish between both by looking for the presence of an uri attribute - we should revisit this later by using xml-namespaces - - The node. - - - - - - - - - - - - - attributeValue - - propertyValue - - - - - - - Initializes a new instance of the class. - - Name of the environment. - - - - Initializes a new instance of the class. - - Name of the environment. - The resource sub system. - - - - Processes the element. - - The element. - - - - - Processes the element. - - The element. - - - - - Make a shallow copy of the nodeList. - - The nodeList to be copied. - - - - - Pendent - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - Name of the environment. - The resource sub system. - - - - Initializes a new instance of the class. - - - - - Provides common methods for those who wants - to implement - - - - - Interpreter of a specific language to describe - configuration nodes in a hierachical manner. - - - - - Should obtain the contents from the resource, - interpret it and populate the - accordingly. - - - - - - - Gets or sets the name of the environment. - - The name of the environment. - - - - Exposes the reference to - which the interpreter is likely to hold - - - - - Should obtain the contents from the resource, - interpret it and populate the - accordingly. - - - - - - - Exposes the reference to - which the interpreter is likely to hold - - - - - - Gets or sets the name of the environment. - - The name of the environment. - - - - Reads the configuration from a XmlFile. Sample structure: - - <configuration> - <facilities> - <facility id="myfacility"> - - </facility> - </facilities> - - <components> - <component id="component1"> - - </component> - </components> - </configuration> - - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The filename. - - - - Initializes a new instance of the class. - - The source. - - - - Gets or sets the kernel. - - The kernel. - - - - Installs all the components from the App.Config file. - - - - - - Installs all the component from the xml configuration file. - - The xml configuration file. - - - - - Installs all the component from the xml configuration. - - The xml configuration resource. - - - - - Delegate to provide environment name. - - The environment name. - - - - The contract to install components in the container. - - - - - Performs the installation in the . - - The container. - The configuration store. - - - - Initializes a new instance of the ConfigurationInstaller class. - - - - - Sets the configuration environment name. - - The environment name. - - - - - Set the configuration environment strategy. - - The environment strategy. - - - - - Default implementation. - - - - - Installs the components and facilities based on the - information on the configuration store. - - - - - Perform installation. - - Target container - Configuration store - - - - Perform installation. - - Target container - Configuration store - - - - Obtains the interceptors associated with the component. - - The kernel instance - The component model - The creation context - interceptors array - - - - This implementation of relies - on DynamicProxy to expose proxy capabilies. - - - Note that only virtual methods can be intercepted in a - concrete class. However, if the component - was registered with a service interface, we proxy - the interface and the methods don't need to be virtual, - - - - - Constructs a DefaultProxyFactory - - - - - Creates the proxy for the supplied component. - - The kernel. - The target. - The model. - The constructor arguments. - The creation context - The component proxy. - - - - Determines if the component requiries a target instance for proxying. - - The kernel. - The model. - true if an instance is required. - - - - Gets the environment information (name). Implementors should - use to define their environments and how those affect the configuration. - - - - - Gets the name of the environment. - - - - - - The IWindsorContainer interface exposes all the - functionality the Windsor implements. - - - - - Registers a facility within the container. - - The key by which the gets indexed. - The to add to the container. - - - - Creates and adds an facility to the container. - - The facility type. - - - - - - Creates and adds an facility to the container. - - The facility type. - - The callback for creation. - - - - - Creates and adds an facility to the container. - - The facility type. - - The callback for creation. - - - - - Creates and adds an facility to the container. - - The facility type. - - - - - Creates and adds an facility to the container. - - The facility type. - The callback for creation. - - - - - Creates and adds an facility to the container. - - The facility type. - The callback for creation. - - - - - Adds a component to be managed by the container - - The key by which the component gets indexed. - The to manage. - - - - Adds a component to be managed by the container - - The key by which the component gets indexed. - The service that the component implements. - The to manage. - - - - Adds a component to be managed by the container - - The key by which the component gets indexed. - The to manage. - The with which to manage the component. - - - - Adds a component to be managed by the container - - The key by which the component gets indexed. - The service that the component implements. - The to manage. - The with which to manage the component. - - - - Adds a concrete class as a component and specify the extended properties. - Used by facilities, mostly. - - - - - - - - Adds a concrete class and an interface - as a component and specify the extended properties. - Used by facilities, mostly. - - - - - - - - - Adds a component to be managed by the container. - The key to obtain the component will be the FullName of the type. - - The to manage. - - - - Adds a component to be managed by the container - - The to manage. - The key by which the component gets indexed. - - - - Adds a component to be managed by the container. - The key to obtain the component will be the FullName of the type. - - The to manage. - The with which to manage the component. - - - - Adds a component to be managed by the container - - The to manage. - The key by which the component gets indexed. - The with which to manage the component. - - - - Adds a component to be managed by the container - The key to obtain the component will be the FullName of the type. - - The service that the component implements. - The to manage. - - - - Adds a component to be managed by the container - - The service that the component implements. - The to manage. - The key by which the component gets indexed. - - - - Adds a component to be managed by the container - The key to obtain the component will be the FullName of the type. - - The service that the component implements. - The to manage. - The with which to manage the component. - - - - Adds a component to be managed by the container - - The service that the component implements. - The to manage. - The key by which the component gets indexed. - The with which to manage the component. - - - - Adds a concrete class as a component and specify the extended properties. - Used by facilities, mostly. - The key to obtain the component will be the FullName of the type. - - - - - - - Adds a concrete class as a component and specify the extended properties. - Used by facilities, mostly. - - - - - - - - Adds a concrete class and an interface - as a component and specify the extended properties. - Used by facilities, mostly. - The key to obtain the component will be the FullName of the type. - - - - - - - - Adds a concrete class and an interface - as a component and specify the extended properties. - Used by facilities, mostly. - - - - - - - - - Registers the components provided by the s - with the . - - Create a new registration using .For() or . - - - - container.Register(Component.For<IService>().ImplementedBy<DefaultService>()); - - - The component registrations. - The container. - - - - Installs the components provided by the s - with the . - The component installers. - The container. - - - - - Returns a component instance by the key - - - - - - - Returns a component instance by the key - - - - - - - - Returns a component instance by the key - - - - - - - - Returns a component instance by the key - - - - - - - - Returns a component instance by the service - - - - - - - Returns a component instance by the service - - - - - - - - Returns a component instance by the service - - - - - - - - Releases a component instance - - - - - - Registers a subcontainer. The components exposed - by this container will be accessible from subcontainers. - - - - - - Remove a child container - - - - - - Gets a child container instance by name. - - The container's name. - The child container instance or null - - - - Returns a component instance by the service - - Service type - The component instance - - - - Returns a component instance by the service - - Service type - - The component instance - - - - Returns a component instance by the service - - Service type - - The component instance - - - - Returns a component instance by the key - - Component's key - Service type - The Component instance - - - - Returns a component instance by the key - - Service type - Component's key - - The Component instance - - - - Returns a component instance by the key - - Service type - Component's key - - The Component instance - - - - Returns a component instance by the key - - - - - - - - - Returns a component instance by the key - - - - - - - - - Resolve all valid components that match this type. - - The service type - - - - Resolve all valid components that mathc this service - the service to match - - - - - Resolve all valid components that mathc this service - the service to match - Arguments to resolve the service - - - - - Resolve all valid components that mathc this service - the service to match - Arguments to resolve the service - - - - - Resolve all valid components that match this type. - The service type - Arguments to resolve the service - - - - - Resolve all valid components that match this type. - The service type - Arguments to resolve the service - - - - - Gets the container's name - - - Only useful when child containers are being used - - The container's name. - - - - Shortcut to - - - - - Shortcut to - - - - - Returns the inner instance of the MicroKernel - - - - - Gets or sets the parent container if this instance - is a sub container. - - - - - Implementation of - which delegates to implementation. - - - - - Constructs a container without any external - configuration reference - - - - - Constructs a container using the specified - implementation. - - The instance of an implementation. - - - - Constructs a container using the specified - implementation. - - The instance of an implementation. - - - - Initializes a new instance of the class. - - The interpreter. - The environment info. - - - - Initializes a new instance of the class using a - xml file to configure it. - - Equivalent to the use of new WindsorContainer(new XmlInterpreter(xmlFile)) - - - The XML file. - - - - Constructs a container using the specified - implementation. Rarely used. - - - This constructs sets the Kernel.ProxyFactory property to - Proxy.DefaultProxyFactory - - Kernel instance - Installer instance - - - - Constructs a container using the specified - implementation. Rarely used. - - - This constructs sets the Kernel.ProxyFactory property to - Proxy.DefaultProxyFactory - - Container's name - Kernel instance - Installer instance - - - - Constructs with a given . - - A instance of an . - - - - Constructs a container assigning a parent container - before starting the dependency resolution. - - The instance of an - The instance of an implementation - - - - Initializes a new instance of the class. - - The container's name. - The parent. - The interpreter. - - - - Registers a facility within the kernel. - - - - - - - Creates and adds an facility to the container. - - The facility type. - - - - - - Creates and adds an facility to the container. - - The facility type. - - The callback for creation. - - - - - Creates and adds an facility to the container. - - The facility type. - - The callback for creation. - - - - - Creates and adds an facility to the container. - - The facility type. - - - - - Creates and adds an facility to the container. - - The facility type. - The callback for creation. - - - - - Creates and adds an facility to the container. - - The facility type. - The callback for creation. - - - - - Adds a component to be managed by the container - - - - - - - Adds a component to be managed by the container - - - - - - - - Adds a component to be managed by the container - - The key by which the component gets indexed. - The to manage. - The with which to manage the component. - - - - Adds a component to be managed by the container - - The key by which the component gets indexed. - The service that the component implements. - The to manage. - The with which to manage the component. - - - - Adds a component to be managed by the container. - The key to obtain the component will be the FullName of the type. - - The to manage. - - - - Adds a component to be managed by the container - - The to manage. - The key by which the component gets indexed. - - - - Adds a component to be managed by the container. - The key to obtain the component will be the FullName of the type. - - The to manage. - The with which to manage the component. - - - - Adds a component to be managed by the container - - The service that the component implements. - The to manage. - The key by which the component gets indexed. - - - - Adds a component to be managed by the container - The key to obtain the component will be the FullName of the type. - - The service that the component implements. - The to manage. - The with which to manage the component. - - - - Adds a component to be managed by the container - - The to manage. - The key by which the component gets indexed. - The with which to manage the component. - - - - Adds a component to be managed by the container - The key to obtain the component will be the FullName of the type. - - The service that the component implements. - The to manage. - - - - Adds a component to be managed by the container - - The service that the component implements. - The to manage. - The key by which the component gets indexed. - The with which to manage the component. - - - - Adds a concrete class as a component and specify the extended properties. - Used by facilities, mostly. - The key to obtain the component will be the FullName of the type. - - - - - - - Adds a concrete class as a component and specify the extended properties. - Used by facilities, mostly. - - - - - - - - Adds a concrete class and an interface - as a component and specify the extended properties. - Used by facilities, mostly. - The key to obtain the component will be the FullName of the type. - - - - - - - - Adds a concrete class and an interface - as a component and specify the extended properties. - Used by facilities, mostly. - - - - - - - - - Registers the components described by the s - with the . - The component registrations. - The container. - - - - - Installs the components provided by the s - with the . - The component installers. - The container. - - - - - Returns a component instance by the key - - - - - - - Returns a component instance by the service - - - - - - - - Returns a component instance by the service - - - - - - - - Returns a component instance by the key - - - - - - - - Returns a component instance by the key - - - - - - - - Returns a component instance by the service - - - - - - - Resolve all valid components that match this type. - - The service type - - - - Resolve all valid components that match this type. - The service type - Arguments to resolve the service - - - - - Resolve all valid components that match this type. - The service type - Arguments to resolve the service - - - - - Returns a component instance by the key - - - - - - - - Returns a component instance by the key - - - - - - - - - Returns a component instance by the key - - - - - - - - - Returns a component instance by the service - - - - - - - - Returns a component instance by the service - - - - - - - - Returns a component instance by the key - - - - - - - - Returns a component instance by the key - - - - - - - - Returns a component instance by the service - - - - - - - Returns a component instance by the key - - - - - - - Releases a component instance - - - - - - Registers a subcontainer. The components exposed - by this container will be accessible from subcontainers. - - - - - - Removes (unregisters) a subcontainer. The components exposed by this container - will no longer be accessible to the child container. - - - - - - Gets a child container instance by name. - - The container's name. - The child container instance or null - - - - Gets the service object of the specified type. - - - A service object of type serviceType. - - An object that specifies the type of service object to get. - - - - Gets the service object of the specified type. - - - A service object of type serviceType. - - - - - Executes Dispose on underlying - - - - - Gets the container's name - - - Only useful when child containers are being used - - The container's name. - - - - Returns the inner instance of the MicroKernel - - - - - Gets or sets the parent container if this instance - is a sub container. - - - - - Shortcut to the method - - - - - Shortcut to the method - - - - + + + + Castle.Windsor + + + + + Implementation of that assumes ownership of the + wrapped . If this adapter is disposed, the underlying + is diposed as well. + + + + + Implementation of that does not assume ownership of the + wrapped . + + + + + Integrates the to the System.ComponentModel + and System.ComponentMode.Design infrastructure. + + + + + + + + This interface should be implemented by classes + that are available in a bigger context, exposing + the container to different areas in the same application. + + For example, in Web application, the (global) HttpApplication + subclasses should implement this interface to expose + the configured container + + + + + + Constructs an initial ContainerWrapper. + + The to adapt. + + + + Constructs an initial ContainerWrapper. + + The to adapt. + The parent . + + + + Adds the specified to the at the end of the list. + + The to add. + + + + Adds the specified to the at the end of the list, + and assigns a name to the component. + + The to add. + The unique, case-insensitive name to assign to the component, or null. + + + + Removes a component from the . + + The to remove + + + + Gets the service object of the specified type. + + The type of service. + An object inplementing service, or null. + + + + Adds the specified service to the service container. + + The type of service to add. + The instance of the service to add. + + + + Adds the specified service to the service container. + + The type of service to add. + A callback object that is used to create the service. + + + + Adds the specified service to the service container, and optionally + promotes the service to any parent service containers. + + The type of service to add. + The instance of the service to add. + true to promote this request to any parent service containers. + + + + Adds the specified service to the service container, and optionally + promotes the service to parent service containers. + + The type of service to add. + A callback object that is used to create the service. + true to promote this request to any parent service containers. + + + + Removes the specified service type from the service container. + + The type of service to remove. + + + + Removes the specified service type from the service container, + and optionally promotes the service to parent service containers. + + The type of service to remove. + true to promote this request to any parent service containers. + + + + Determins if the service type represents an intrinsic service. + + The type of service to remove. + true if the service type is an intrinsic service. + + + + Determins if the specified service type exists in the service container. + + The type of service to remove. + true if the service type exists. + + + + Releases the resources used by the component. + + + + + Releases the resources used by the component. + + true if disposing. + + + + Gets or sets the associated with the . + + + + + Event that notifies the disposal of the . + + + + + Gets all the components in the . + + + + + Gets the adapted + + + + + Constructs a default ContainerAdapter. + + + + + Constructs a chained ContainerAdapter. + + The parent . + + + + Constructs an initial ContainerAdapter. + + The to adapt. + + + + Constructs an initial ContainerAdapter. + + The to adapt. + The parent . + + + + Custom activator to create the instance on demand. + + + + + Implementation of . + Do not support configuration inheritance. + + + + + Accepts the specified node. + Check if node has the same name as the processor and the node.NodeType + is in the AcceptNodeTypes List + + The node. + + + + + Convert and return child parameter into an XmlElement + An exception will be throw in case the child node cannot be converted + + Parent node + Node to be converted + child node as XmlElement + + + + + + + + + + + + attributeValue + + propertyValue + + + + + + + Processes the specified node list. + + The node list. + The engine. + + + + Processes element attributes. + if the attribute is include will append to the element + all contents from the file. + if the attribute has a property reference the reference will be + expanded + + The element. + + + + + Properties names can contain a-zA-Z0-9_. + i.e. #!{ my_node_name } || #{ my.node.name } + spaces are trimmed + + + + + Processes the string. + + The node. + The value. + The context. + + + + Accepts the specified node. + Check if node has the same name as the processor and the node.NodeType + is in the AcceptNodeTypes List + NOTE: since the BatchRegistrationFacility already uses an include + element we will distringish between both by looking for the presence of an uri attribute + we should revisit this later by using xml-namespaces + + The node. + + + + + + + + + + + + + attributeValue + + propertyValue + + + + + + + Initializes a new instance of the class. + + Name of the environment. + + + + Initializes a new instance of the class. + + Name of the environment. + The resource sub system. + + + + Processes the element. + + The element. + + + + + Processes the element. + + The element. + + + + + Make a shallow copy of the nodeList. + + The nodeList to be copied. + + + + + Pendent + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Name of the environment. + The resource sub system. + + + + Initializes a new instance of the class. + + + + + Provides common methods for those who wants + to implement + + + + + Interpreter of a specific language to describe + configuration nodes in a hierachical manner. + + + + + Should obtain the contents from the resource, + interpret it and populate the + accordingly. + + + + + + + Gets or sets the name of the environment. + + The name of the environment. + + + + Exposes the reference to + which the interpreter is likely to hold + + + + + Should obtain the contents from the resource, + interpret it and populate the + accordingly. + + + + + + + Exposes the reference to + which the interpreter is likely to hold + + + + + + Gets or sets the name of the environment. + + The name of the environment. + + + + Reads the configuration from a XmlFile. Sample structure: + + <configuration> + <facilities> + <facility id="myfacility"> + + </facility> + </facilities> + + <components> + <component id="component1"> + + </component> + </components> + </configuration> + + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The filename. + + + + Initializes a new instance of the class. + + The source. + + + + Gets or sets the kernel. + + The kernel. + + + + Installs all the components from the App.Config file. + + + + + + Installs all the component from the xml configuration file. + + The xml configuration file. + + + + + Installs all the component from the xml configuration. + + The xml configuration resource. + + + + + Delegate to provide environment name. + + The environment name. + + + + The contract to install components in the container. + + + + + Performs the installation in the . + + The container. + The configuration store. + + + + Initializes a new instance of the ConfigurationInstaller class. + + + + + Sets the configuration environment name. + + The environment name. + + + + + Set the configuration environment strategy. + + The environment strategy. + + + + + Default implementation. + + + + + Installs the components and facilities based on the + information on the configuration store. + + + + + Perform installation. + + Target container + Configuration store + + + + Perform installation. + + Target container + Configuration store + + + + Obtains the interceptors associated with the component. + + The kernel instance + The component model + The creation context + interceptors array + + + + This implementation of relies + on DynamicProxy to expose proxy capabilies. + + + Note that only virtual methods can be intercepted in a + concrete class. However, if the component + was registered with a service interface, we proxy + the interface and the methods don't need to be virtual, + + + + + Constructs a DefaultProxyFactory + + + + + Creates the proxy for the supplied component. + + The kernel. + The target. + The model. + The constructor arguments. + The creation context + The component proxy. + + + + Determines if the component requiries a target instance for proxying. + + The kernel. + The model. + true if an instance is required. + + + + Gets the environment information (name). Implementors should + use to define their environments and how those affect the configuration. + + + + + Gets the name of the environment. + + + + + + The IWindsorContainer interface exposes all the + functionality the Windsor implements. + + + + + Registers a facility within the container. + + The key by which the gets indexed. + The to add to the container. + + + + Creates and adds an facility to the container. + + The facility type. + + + + + + Creates and adds an facility to the container. + + The facility type. + + The callback for creation. + + + + + Creates and adds an facility to the container. + + The facility type. + + The callback for creation. + + + + + Creates and adds an facility to the container. + + The facility type. + + + + + Creates and adds an facility to the container. + + The facility type. + The callback for creation. + + + + + Creates and adds an facility to the container. + + The facility type. + The callback for creation. + + + + + Adds a component to be managed by the container + + The key by which the component gets indexed. + The to manage. + + + + Adds a component to be managed by the container + + The key by which the component gets indexed. + The service that the component implements. + The to manage. + + + + Adds a component to be managed by the container + + The key by which the component gets indexed. + The to manage. + The with which to manage the component. + + + + Adds a component to be managed by the container + + The key by which the component gets indexed. + The service that the component implements. + The to manage. + The with which to manage the component. + + + + Adds a concrete class as a component and specify the extended properties. + Used by facilities, mostly. + + + + + + + + Adds a concrete class and an interface + as a component and specify the extended properties. + Used by facilities, mostly. + + + + + + + + + Adds a component to be managed by the container. + The key to obtain the component will be the FullName of the type. + + The to manage. + + + + Adds a component to be managed by the container + + The to manage. + The key by which the component gets indexed. + + + + Adds a component to be managed by the container. + The key to obtain the component will be the FullName of the type. + + The to manage. + The with which to manage the component. + + + + Adds a component to be managed by the container + + The to manage. + The key by which the component gets indexed. + The with which to manage the component. + + + + Adds a component to be managed by the container + The key to obtain the component will be the FullName of the type. + + The service that the component implements. + The to manage. + + + + Adds a component to be managed by the container + + The service that the component implements. + The to manage. + The key by which the component gets indexed. + + + + Adds a component to be managed by the container + The key to obtain the component will be the FullName of the type. + + The service that the component implements. + The to manage. + The with which to manage the component. + + + + Adds a component to be managed by the container + + The service that the component implements. + The to manage. + The key by which the component gets indexed. + The with which to manage the component. + + + + Adds a concrete class as a component and specify the extended properties. + Used by facilities, mostly. + The key to obtain the component will be the FullName of the type. + + + + + + + Adds a concrete class as a component and specify the extended properties. + Used by facilities, mostly. + + + + + + + + Adds a concrete class and an interface + as a component and specify the extended properties. + Used by facilities, mostly. + The key to obtain the component will be the FullName of the type. + + + + + + + + Adds a concrete class and an interface + as a component and specify the extended properties. + Used by facilities, mostly. + + + + + + + + + Registers the components provided by the s + with the . + + Create a new registration using .For() or . + + + + container.Register(Component.For<IService>().ImplementedBy<DefaultService>()); + + + The component registrations. + The container. + + + + Installs the components provided by the s + with the . + The component installers. + The container. + + + + + Returns a component instance by the key + + + + + + + Returns a component instance by the key + + + + + + + + Returns a component instance by the key + + + + + + + + Returns a component instance by the key + + + + + + + + Returns a component instance by the service + + + + + + + Returns a component instance by the service + + + + + + + + Returns a component instance by the service + + + + + + + + Releases a component instance + + + + + + Registers a subcontainer. The components exposed + by this container will be accessible from subcontainers. + + + + + + Remove a child container + + + + + + Gets a child container instance by name. + + The container's name. + The child container instance or null + + + + Returns a component instance by the service + + Service type + The component instance + + + + Returns a component instance by the service + + Service type + + The component instance + + + + Returns a component instance by the service + + Service type + + The component instance + + + + Returns a component instance by the key + + Component's key + Service type + The Component instance + + + + Returns a component instance by the key + + Service type + Component's key + + The Component instance + + + + Returns a component instance by the key + + Service type + Component's key + + The Component instance + + + + Returns a component instance by the key + + + + + + + + + Returns a component instance by the key + + + + + + + + + Resolve all valid components that match this type. + + The service type + + + + Resolve all valid components that mathc this service + the service to match + + + + + Resolve all valid components that mathc this service + the service to match + Arguments to resolve the service + + + + + Resolve all valid components that mathc this service + the service to match + Arguments to resolve the service + + + + + Resolve all valid components that match this type. + The service type + Arguments to resolve the service + + + + + Resolve all valid components that match this type. + The service type + Arguments to resolve the service + + + + + Gets the container's name + + + Only useful when child containers are being used + + The container's name. + + + + Shortcut to + + + + + Shortcut to + + + + + Returns the inner instance of the MicroKernel + + + + + Gets or sets the parent container if this instance + is a sub container. + + + + + Implementation of + which delegates to implementation. + + + + + Constructs a container without any external + configuration reference + + + + + Constructs a container using the specified + implementation. + + The instance of an implementation. + + + + Constructs a container using the specified + implementation. + + The instance of an implementation. + + + + Initializes a new instance of the class. + + The interpreter. + The environment info. + + + + Initializes a new instance of the class using a + xml file to configure it. + + Equivalent to the use of new WindsorContainer(new XmlInterpreter(xmlFile)) + + + The XML file. + + + + Constructs a container using the specified + implementation. Rarely used. + + + This constructs sets the Kernel.ProxyFactory property to + Proxy.DefaultProxyFactory + + Kernel instance + Installer instance + + + + Constructs a container using the specified + implementation. Rarely used. + + + This constructs sets the Kernel.ProxyFactory property to + Proxy.DefaultProxyFactory + + Container's name + Kernel instance + Installer instance + + + + Constructs with a given . + + A instance of an . + + + + Constructs a container assigning a parent container + before starting the dependency resolution. + + The instance of an + The instance of an implementation + + + + Initializes a new instance of the class. + + The container's name. + The parent. + The interpreter. + + + + Registers a facility within the kernel. + + + + + + + Creates and adds an facility to the container. + + The facility type. + + + + + + Creates and adds an facility to the container. + + The facility type. + + The callback for creation. + + + + + Creates and adds an facility to the container. + + The facility type. + + The callback for creation. + + + + + Creates and adds an facility to the container. + + The facility type. + + + + + Creates and adds an facility to the container. + + The facility type. + The callback for creation. + + + + + Creates and adds an facility to the container. + + The facility type. + The callback for creation. + + + + + Adds a component to be managed by the container + + + + + + + Adds a component to be managed by the container + + + + + + + + Adds a component to be managed by the container + + The key by which the component gets indexed. + The to manage. + The with which to manage the component. + + + + Adds a component to be managed by the container + + The key by which the component gets indexed. + The service that the component implements. + The to manage. + The with which to manage the component. + + + + Adds a component to be managed by the container. + The key to obtain the component will be the FullName of the type. + + The to manage. + + + + Adds a component to be managed by the container + + The to manage. + The key by which the component gets indexed. + + + + Adds a component to be managed by the container. + The key to obtain the component will be the FullName of the type. + + The to manage. + The with which to manage the component. + + + + Adds a component to be managed by the container + + The service that the component implements. + The to manage. + The key by which the component gets indexed. + + + + Adds a component to be managed by the container + The key to obtain the component will be the FullName of the type. + + The service that the component implements. + The to manage. + The with which to manage the component. + + + + Adds a component to be managed by the container + + The to manage. + The key by which the component gets indexed. + The with which to manage the component. + + + + Adds a component to be managed by the container + The key to obtain the component will be the FullName of the type. + + The service that the component implements. + The to manage. + + + + Adds a component to be managed by the container + + The service that the component implements. + The to manage. + The key by which the component gets indexed. + The with which to manage the component. + + + + Adds a concrete class as a component and specify the extended properties. + Used by facilities, mostly. + The key to obtain the component will be the FullName of the type. + + + + + + + Adds a concrete class as a component and specify the extended properties. + Used by facilities, mostly. + + + + + + + + Adds a concrete class and an interface + as a component and specify the extended properties. + Used by facilities, mostly. + The key to obtain the component will be the FullName of the type. + + + + + + + + Adds a concrete class and an interface + as a component and specify the extended properties. + Used by facilities, mostly. + + + + + + + + + Registers the components described by the s + with the . + The component registrations. + The container. + + + + + Installs the components provided by the s + with the . + The component installers. + The container. + + + + + Returns a component instance by the key + + + + + + + Returns a component instance by the service + + + + + + + + Returns a component instance by the service + + + + + + + + Returns a component instance by the key + + + + + + + + Returns a component instance by the key + + + + + + + + Returns a component instance by the service + + + + + + + Resolve all valid components that match this type. + + The service type + + + + Resolve all valid components that match this type. + The service type + Arguments to resolve the service + + + + + Resolve all valid components that match this type. + The service type + Arguments to resolve the service + + + + + Returns a component instance by the key + + + + + + + + Returns a component instance by the key + + + + + + + + + Returns a component instance by the key + + + + + + + + + Returns a component instance by the service + + + + + + + + Returns a component instance by the service + + + + + + + + Returns a component instance by the key + + + + + + + + Returns a component instance by the key + + + + + + + + Returns a component instance by the service + + + + + + + Returns a component instance by the key + + + + + + + Releases a component instance + + + + + + Registers a subcontainer. The components exposed + by this container will be accessible from subcontainers. + + + + + + Removes (unregisters) a subcontainer. The components exposed by this container + will no longer be accessible to the child container. + + + + + + Gets a child container instance by name. + + The container's name. + The child container instance or null + + + + Gets the service object of the specified type. + + + A service object of type serviceType. + + An object that specifies the type of service object to get. + + + + Gets the service object of the specified type. + + + A service object of type serviceType. + + + + + Executes Dispose on underlying + + + + + Gets the container's name + + + Only useful when child containers are being used + + The container's name. + + + + Returns the inner instance of the MicroKernel + + + + + Gets or sets the parent container if this instance + is a sub container. + + + + + Shortcut to the method + + + + + Shortcut to the method + + + + diff --git a/lib/Common.Logging.Log4Net.xml b/lib/Common.Logging.Log4Net.xml index 7597207aae3..561a8dbab47 100644 --- a/lib/Common.Logging.Log4Net.xml +++ b/lib/Common.Logging.Log4Net.xml @@ -1,218 +1,218 @@ - - - - Common.Logging.Log4Net - - - - - Routes log events to Common.Logging infrastructure. - - - To route all events logged using log4net to Common.Logging, you need to configure this appender as shown below: - - <log4net> - <appender name="CommonLoggingAppender" - type="Common.Logging.Log4Net.CommonLoggingAppender, Common.Logging.Log4Net"> - <layout type="log4net.Layout.PatternLayout, log4net"> - <param name="ConversionPattern" value="%level - %class.%method: %message" /> - </layout> - </appender> - - <root> - <level value="ALL" /> - <appender-ref ref="CommonLoggingAppender" /> - </root> - </log4net> - - - Erich Eichinger - - - - Gets the closest level supported by Common.Logging of the given log4net level - - - - - Sends the given log event to Common.Logging - - - - - Get or set the layout for this appender - - - - - Wrapper class that prevents exceptions from being rendered in the message - - - - - Concrete implementation of interface specific to log4net 1.2.10. - - - Log4net is capable of outputting extended debug information about where the current - message was generated: class name, method name, file, line, etc. Log4net assumes that the location - information should be gathered relative to where Debug() was called. - When using Common.Logging, Debug() is called in Common.Logging.Log4Net.Log4NetLogger. This means that - the location information will indicate that Common.Logging.Log4Net.Log4NetLogger always made - the call to Debug(). We need to know where Common.Logging.ILog.Debug() - was called. To do this we need to use the log4net.ILog.Logger.Log method and pass in a Type telling - log4net where in the stack to begin looking for location information. - - Gilles Bayon - Erich Eichinger - - - - Constructor - - - - - - Sends the message to the underlying log4net system. - - the level of this log event. - the message to log - the exception to log (may be null) - - - - Checks if this logger is enabled for the level. - - - - - Checks if this logger is enabled for the level. - - - - - Checks if this logger is enabled for the level. - - - - - Checks if this logger is enabled for the level. - - - - - Checks if this logger is enabled for the level. - - - - - Checks if this logger is enabled for the level. - - - - - Concrete subclass of ILoggerFactoryAdapter specific to log4net 1.2.10. - - - The following configuration property values may be configured: - - configType: INLINE|FILE|FILE-WATCH|EXTERNAL - configFile: log4net configuration file path in case of FILE or FILE-WATCH - - The configType values have the following implications: - - INLINE: simply calls XmlConfigurator.Configure() - FILE: calls XmlConfigurator.Configure(System.IO.FileInfo) using configFile. - FILE-WATCH: calls XmlConfigurator.ConfigureAndWatch(System.IO.FileInfo) using configFile. - EXTERNAL: does nothing and expects log4net to be configured elsewhere. - <any>: calls BasicConfigurator.Configure() - - - - The following snippet shows how to configure EntLib logging for Common.Logging: - - <configuration> - <configSections> - <section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" /> - </configSections> - <common> - <logging> - <factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4Net"> - <arg key="configType" value="FILE" /> - <arg key="configFile" value="~/log4net.config" /> - </factoryAdapter> - </logging> - </common> - </configuration> - - - Gilles Bayon - Erich Eichinger - - - - Constructor - - configuration properties, see for more. - - - - Constructor accepting configuration properties and an arbitrary - instance. - - configuration properties, see for more. - a log4net runtime adapter - - - - Create a ILog instance by name - - - - - - - Abstract interface to the underlying log4net runtime - - - - Calls - - - Calls - - - Calls - - - Calls - - - Calls - - - - - This namespace contains the implementations to plug log4net 1.2.10 into Common.Logging. - - For an example on how to configure - - Common.Logging to render its output to log4net, see . - log4net to render its output to Common.Logging use . - - - - - - - This assembly contains the adapter to the log4net 1.2.10 library - For an example on how to configure - - Common.Logging to render its output to log4net, see . - log4net to render its output to Common.Logging use . - - - - - - + + + + Common.Logging.Log4Net + + + + + Routes log events to Common.Logging infrastructure. + + + To route all events logged using log4net to Common.Logging, you need to configure this appender as shown below: + + <log4net> + <appender name="CommonLoggingAppender" + type="Common.Logging.Log4Net.CommonLoggingAppender, Common.Logging.Log4Net"> + <layout type="log4net.Layout.PatternLayout, log4net"> + <param name="ConversionPattern" value="%level - %class.%method: %message" /> + </layout> + </appender> + + <root> + <level value="ALL" /> + <appender-ref ref="CommonLoggingAppender" /> + </root> + </log4net> + + + Erich Eichinger + + + + Gets the closest level supported by Common.Logging of the given log4net level + + + + + Sends the given log event to Common.Logging + + + + + Get or set the layout for this appender + + + + + Wrapper class that prevents exceptions from being rendered in the message + + + + + Concrete implementation of interface specific to log4net 1.2.10. + + + Log4net is capable of outputting extended debug information about where the current + message was generated: class name, method name, file, line, etc. Log4net assumes that the location + information should be gathered relative to where Debug() was called. + When using Common.Logging, Debug() is called in Common.Logging.Log4Net.Log4NetLogger. This means that + the location information will indicate that Common.Logging.Log4Net.Log4NetLogger always made + the call to Debug(). We need to know where Common.Logging.ILog.Debug() + was called. To do this we need to use the log4net.ILog.Logger.Log method and pass in a Type telling + log4net where in the stack to begin looking for location information. + + Gilles Bayon + Erich Eichinger + + + + Constructor + + + + + + Sends the message to the underlying log4net system. + + the level of this log event. + the message to log + the exception to log (may be null) + + + + Checks if this logger is enabled for the level. + + + + + Checks if this logger is enabled for the level. + + + + + Checks if this logger is enabled for the level. + + + + + Checks if this logger is enabled for the level. + + + + + Checks if this logger is enabled for the level. + + + + + Checks if this logger is enabled for the level. + + + + + Concrete subclass of ILoggerFactoryAdapter specific to log4net 1.2.10. + + + The following configuration property values may be configured: + + configType: INLINE|FILE|FILE-WATCH|EXTERNAL + configFile: log4net configuration file path in case of FILE or FILE-WATCH + + The configType values have the following implications: + + INLINE: simply calls XmlConfigurator.Configure() + FILE: calls XmlConfigurator.Configure(System.IO.FileInfo) using configFile. + FILE-WATCH: calls XmlConfigurator.ConfigureAndWatch(System.IO.FileInfo) using configFile. + EXTERNAL: does nothing and expects log4net to be configured elsewhere. + <any>: calls BasicConfigurator.Configure() + + + + The following snippet shows how to configure EntLib logging for Common.Logging: + + <configuration> + <configSections> + <section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" /> + </configSections> + <common> + <logging> + <factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4Net"> + <arg key="configType" value="FILE" /> + <arg key="configFile" value="~/log4net.config" /> + </factoryAdapter> + </logging> + </common> + </configuration> + + + Gilles Bayon + Erich Eichinger + + + + Constructor + + configuration properties, see for more. + + + + Constructor accepting configuration properties and an arbitrary + instance. + + configuration properties, see for more. + a log4net runtime adapter + + + + Create a ILog instance by name + + + + + + + Abstract interface to the underlying log4net runtime + + + + Calls + + + Calls + + + Calls + + + Calls + + + Calls + + + + + This namespace contains the implementations to plug log4net 1.2.10 into Common.Logging. + + For an example on how to configure + + Common.Logging to render its output to log4net, see . + log4net to render its output to Common.Logging use . + + + + + + + This assembly contains the adapter to the log4net 1.2.10 library + For an example on how to configure + + Common.Logging to render its output to log4net, see . + log4net to render its output to Common.Logging use . + + + + + + diff --git a/lib/Common.Logging.xml b/lib/Common.Logging.xml index 0c0c3405005..556632dc4eb 100644 --- a/lib/Common.Logging.xml +++ b/lib/Common.Logging.xml @@ -1,3094 +1,3094 @@ - - - - Common.Logging - - - - - Various utility methods for using during factory and logger instance configuration - - Erich Eichinger - - - - Initialize all members before any of this class' methods can be accessed (avoids beforeFieldInit) - - - - - Adds the parser to the list of known type parsers. - - - .NET intrinsic types are pre-registerd: short, int, long, float, double, decimal, bool - - - - - Retrieves the named value from the specified . - - may be null - the value's key - if is not null, the value returned by values[name]. null otherwise. - - - - Retrieves the named value from the specified . - - may be null - the value's key - the default value, if not found - if is not null, the value returned by values[name]. null otherwise. - - - - Returns the first nonnull, nonempty value among its arguments. - - - Returns null, if the initial list was null or empty. - - - - - - Returns the first nonnull, nonempty value among its arguments. - - - Also - - - - - Tries parsing into an enum of the type of . - - the default value to return if parsing fails - the string value to parse - the successfully parsed value, otherwise. - - - - Tries parsing into the specified return type. - - the default value to return if parsing fails - the string value to parse - the successfully parsed value, otherwise. - - - - Throws a if is null. - - - - - Throws a if is null. - - - - - Throws a if an object of type is not - assignable to type . - - - - - Throws a if an object of type is not - assignable to type . - - - - - Ensures any exception thrown by the given is wrapped with an - . - - - If already throws a ConfigurationException, it will not be wrapped. - - the action to execute - the message to be set on the thrown - args to be passed to to format the message - - - - Ensures any exception thrown by the given is wrapped with an - . - - - If already throws a ConfigurationException, it will not be wrapped. - - the action to execute - the message to be set on the thrown - args to be passed to to format the message - - - - A delegate converting a string representation into the target type - - - - - An anonymous action delegate with no arguments and no return value. - - - - - - An anonymous action delegate with no arguments and no return value. - - - - - - Implementation of that uses the standard .NET - configuration APIs, ConfigurationSettings in 1.x and ConfigurationManager in 2.0 - - Mark Pollack - - - - Interface for basic operations to read .NET application configuration information. - - Provides a simple abstraction to handle BCL API differences between .NET 1.x and 2.0. Also - useful for testing scenarios. - Mark Pollack - - - - Parses the configuration section and returns the resulting object. - - -

- Primary purpose of this method is to allow us to parse and - load configuration sections using the same API regardless - of the .NET framework version. -

-
- Name of the configuration section. - Object created by a corresponding . - -
- - - Parses the configuration section and returns the resulting object. - - Name of the configuration section. - - Object created by a corresponding . - - -

- Primary purpose of this method is to allow us to parse and - load configuration sections using the same API regardless - of the .NET framework version. -

-
- -
- - - Container used to hold configuration information from config file. - - Gilles Bayon - - - - - - - The type - that will be used for creating - - - Additional user supplied properties that are passed to the - 's constructor. - - - - - The type that will be used for creating - instances. - - - - - Additional user supplied properties that are passed to the 's constructor. - - - - - This namespace contains various utility classes. - - - - - An implementation of that caches loggers handed out by this factory. - - - Implementors just need to override . - - Erich Eichinger - - - - LoggerFactoryAdapter interface is used internally by LogManager - Only developers wishing to write new Common.Logging adapters need to - worry about this interface. - - Gilles Bayon - - - - Get a ILog instance by type. - - The type to use for the logger - - - - - Get a ILog instance by name. - - The name of the logger - - - - - Creates a new - - - - - - Purges all loggers from cache - - - - - Create the specified named logger instance - - - Derived factories need to implement this method to create the - actual logger instance. - - - - - Get a ILog instance by . - - Usually the of the current class. - - An ILog instance either obtained from the internal cache or created by a call to . - - - - - Get a ILog instance by name. - - Usually a 's Name or FullName property. - - An ILog instance either obtained from the internal cache or created by a call to . - - - - - Get or create a ILog instance by name. - - Usually a 's Name or FullName property. - - An ILog instance either obtained from the internal cache or created by a call to . - - - - - Provides base implementation common for most logger adapters - - Erich Eichinger - - - - A simple logging interface abstracting logging APIs. - - - - Implementations should defer calling a message's until the message really needs - to be logged to avoid performance penalties. - - - Each log method offers to pass in a instead of the actual message. - Using this style has the advantage to defer possibly expensive message argument evaluation and formatting (and formatting arguments!) until the message gets - actually logged. If the message is not logged at all (e.g. due to settings), - you won't have to pay the peformance penalty of creating the message. - - - - The example below demonstrates using callback style for creating the message, where the call to the - and the underlying only happens, if level is enabled: - - Log.Debug( m=>m("result is {0}", random.NextDouble()) ); - Log.Debug(delegate(m) { m("result is {0}", random.NextDouble()); }); - - - - Mark Pollack - Bruno Baia - Erich Eichinger - - - - Log a message object with the level. - - The message object to log. - - - - Log a message object with the level including - the stack trace of the passed - as a parameter. - - The message object to log. - The exception to log, including its stack trace. - - - - Log a message with the level. - - The format of the message object to log. - the list of format arguments - - - - Log a message with the level. - - The format of the message object to log. - The exception to log. - the list of format arguments - - - - Log a message with the level. - - An that supplies culture-specific formatting information. - The format of the message object to log. - - - - - Log a message with the level. - - An that supplies culture-specific formatting information. - The format of the message object to log. - The exception to log. - - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - A callback used by the logger to obtain the message if log level is matched - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - A callback used by the logger to obtain the message if log level is matched - The exception to log, including its stack trace. - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - An that supplies culture-specific formatting information. - A callback used by the logger to obtain the message if log level is matched - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - An that supplies culture-specific formatting information. - A callback used by the logger to obtain the message if log level is matched - The exception to log, including its stack trace. - - - - Log a message object with the level. - - The message object to log. - - - - Log a message object with the level including - the stack trace of the passed - as a parameter. - - The message object to log. - The exception to log, including its stack trace. - - - - Log a message with the level. - - The format of the message object to log. - the list of format arguments - - - - Log a message with the level. - - The format of the message object to log. - The exception to log. - the list of format arguments - - - - Log a message with the level. - - An that supplies culture-specific formatting information. - The format of the message object to log. - - - - - Log a message with the level. - - An that supplies culture-specific formatting information. - The format of the message object to log. - The exception to log. - - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - A callback used by the logger to obtain the message if log level is matched - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - A callback used by the logger to obtain the message if log level is matched - The exception to log, including its stack trace. - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - An that supplies culture-specific formatting information. - A callback used by the logger to obtain the message if log level is matched - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - An that supplies culture-specific formatting information. - A callback used by the logger to obtain the message if log level is matched - The exception to log, including its stack Debug. - - - - Log a message object with the level. - - The message object to log. - - - - Log a message object with the level including - the stack trace of the passed - as a parameter. - - The message object to log. - The exception to log, including its stack trace. - - - - Log a message with the level. - - The format of the message object to log. - the list of format arguments - - - - Log a message with the level. - - The format of the message object to log. - The exception to log. - the list of format arguments - - - - Log a message with the level. - - An that supplies culture-specific formatting information. - The format of the message object to log. - - - - - Log a message with the level. - - An that supplies culture-specific formatting information. - The format of the message object to log. - The exception to log. - - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - A callback used by the logger to obtain the message if log level is matched - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - A callback used by the logger to obtain the message if log level is matched - The exception to log, including its stack trace. - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - An that supplies culture-specific formatting information. - A callback used by the logger to obtain the message if log level is matched - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - An that supplies culture-specific formatting information. - A callback used by the logger to obtain the message if log level is matched - The exception to log, including its stack Info. - - - - Log a message object with the level. - - The message object to log. - - - - Log a message object with the level including - the stack trace of the passed - as a parameter. - - The message object to log. - The exception to log, including its stack trace. - - - - Log a message with the level. - - The format of the message object to log. - the list of format arguments - - - - Log a message with the level. - - The format of the message object to log. - The exception to log. - the list of format arguments - - - - Log a message with the level. - - An that supplies culture-specific formatting information. - The format of the message object to log. - - - - - Log a message with the level. - - An that supplies culture-specific formatting information. - The format of the message object to log. - The exception to log. - - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - A callback used by the logger to obtain the message if log level is matched - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - A callback used by the logger to obtain the message if log level is matched - The exception to log, including its stack trace. - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - An that supplies culture-specific formatting information. - A callback used by the logger to obtain the message if log level is matched - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - An that supplies culture-specific formatting information. - A callback used by the logger to obtain the message if log level is matched - The exception to log, including its stack Warn. - - - - Log a message object with the level. - - The message object to log. - - - - Log a message object with the level including - the stack trace of the passed - as a parameter. - - The message object to log. - The exception to log, including its stack trace. - - - - Log a message with the level. - - The format of the message object to log. - the list of format arguments - - - - Log a message with the level. - - The format of the message object to log. - The exception to log. - the list of format arguments - - - - Log a message with the level. - - An that supplies culture-specific formatting information. - The format of the message object to log. - - - - - Log a message with the level. - - An that supplies culture-specific formatting information. - The format of the message object to log. - The exception to log. - - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - A callback used by the logger to obtain the message if log level is matched - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - A callback used by the logger to obtain the message if log level is matched - The exception to log, including its stack trace. - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - An that supplies culture-specific formatting information. - A callback used by the logger to obtain the message if log level is matched - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - An that supplies culture-specific formatting information. - A callback used by the logger to obtain the message if log level is matched - The exception to log, including its stack Error. - - - - Log a message object with the level. - - The message object to log. - - - - Log a message object with the level including - the stack trace of the passed - as a parameter. - - The message object to log. - The exception to log, including its stack trace. - - - - Log a message with the level. - - The format of the message object to log. - the list of format arguments - - - - Log a message with the level. - - The format of the message object to log. - The exception to log. - the list of format arguments - - - - Log a message with the level. - - An that supplies culture-specific formatting information. - The format of the message object to log. - - - - - Log a message with the level. - - An that supplies culture-specific formatting information. - The format of the message object to log. - The exception to log. - - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - A callback used by the logger to obtain the message if log level is matched - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - A callback used by the logger to obtain the message if log level is matched - The exception to log, including its stack trace. - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - An that supplies culture-specific formatting information. - A callback used by the logger to obtain the message if log level is matched - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - An that supplies culture-specific formatting information. - A callback used by the logger to obtain the message if log level is matched - The exception to log, including its stack Fatal. - - - - Checks if this logger is enabled for the level. - - - - - Checks if this logger is enabled for the level. - - - - - Checks if this logger is enabled for the level. - - - - - Checks if this logger is enabled for the level. - - - - - Checks if this logger is enabled for the level. - - - - - Checks if this logger is enabled for the level. - - - - - Holds the method for writing a message to the log system. - - - - - Creates a new logger instance using for - writing log events to the underlying log system. - - - - - - Override this method to use a different method than - for writing log events to the underlying log system. - - - Usually you don't need to override thise method. The default implementation returns - null to indicate that the default handler should be - used. - - - - - Actually sends the message to the underlying log system. - - the level of this log event. - the message to log - the exception to log (may be null) - - - - Log a message object with the level. - - The message object to log. - - - - Log a message object with the level including - the stack trace of the passed - as a parameter. - - The message object to log. - The exception to log, including its stack trace. - - - - Log a message with the level. - - An that supplies culture-specific formatting information. - The format of the message object to log. - - - - - Log a message with the level. - - An that supplies culture-specific formatting information. - The format of the message object to log. - The exception to log. - - - - - Log a message with the level. - - The format of the message object to log. - the list of format arguments - - - - Log a message with the level. - - The format of the message object to log. - The exception to log. - the list of format arguments - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - A callback used by the logger to obtain the message if log level is matched - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - A callback used by the logger to obtain the message if log level is matched - The exception to log, including its stack trace. - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - An that supplies culture-specific formatting information. - A callback used by the logger to obtain the message if log level is matched - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - An that supplies culture-specific formatting information. - A callback used by the logger to obtain the message if log level is matched - The exception to log, including its stack trace. - - - - Log a message object with the level. - - The message object to log. - - - - Log a message object with the level including - the stack Debug of the passed - as a parameter. - - The message object to log. - The exception to log, including its stack Debug. - - - - Log a message with the level. - - An that supplies culture-specific formatting information. - The format of the message object to log. - - - - - Log a message with the level. - - An that supplies culture-specific formatting information. - The format of the message object to log. - The exception to log. - - - - - Log a message with the level. - - The format of the message object to log. - the list of format arguments - - - - Log a message with the level. - - The format of the message object to log. - The exception to log. - the list of format arguments - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - A callback used by the logger to obtain the message if log level is matched - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - A callback used by the logger to obtain the message if log level is matched - The exception to log, including its stack Debug. - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - An that supplies culture-specific formatting information. - A callback used by the logger to obtain the message if log level is matched - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - An that supplies culture-specific formatting information. - A callback used by the logger to obtain the message if log level is matched - The exception to log, including its stack Debug. - - - - Log a message object with the level. - - The message object to log. - - - - Log a message object with the level including - the stack Info of the passed - as a parameter. - - The message object to log. - The exception to log, including its stack Info. - - - - Log a message with the level. - - An that supplies culture-specific formatting information. - The format of the message object to log. - - - - - Log a message with the level. - - An that supplies culture-specific formatting information. - The format of the message object to log. - The exception to log. - - - - - Log a message with the level. - - The format of the message object to log. - the list of format arguments - - - - Log a message with the level. - - The format of the message object to log. - The exception to log. - the list of format arguments - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - A callback used by the logger to obtain the message if log level is matched - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - A callback used by the logger to obtain the message if log level is matched - The exception to log, including its stack Info. - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - An that supplies culture-specific formatting information. - A callback used by the logger to obtain the message if log level is matched - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - An that supplies culture-specific formatting information. - A callback used by the logger to obtain the message if log level is matched - The exception to log, including its stack Info. - - - - Log a message object with the level. - - The message object to log. - - - - Log a message object with the level including - the stack Warn of the passed - as a parameter. - - The message object to log. - The exception to log, including its stack Warn. - - - - Log a message with the level. - - An that supplies culture-specific formatting Warnrmation. - The format of the message object to log. - - - - - Log a message with the level. - - An that supplies culture-specific formatting Warnrmation. - The format of the message object to log. - The exception to log. - - - - - Log a message with the level. - - The format of the message object to log. - the list of format arguments - - - - Log a message with the level. - - The format of the message object to log. - The exception to log. - the list of format arguments - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - A callback used by the logger to obtain the message if log level is matched - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - A callback used by the logger to obtain the message if log level is matched - The exception to log, including its stack Warn. - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - An that supplies culture-specific formatting information. - A callback used by the logger to obtain the message if log level is matched - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - An that supplies culture-specific formatting information. - A callback used by the logger to obtain the message if log level is matched - The exception to log, including its stack Warn. - - - - Log a message object with the level. - - The message object to log. - - - - Log a message object with the level including - the stack Error of the passed - as a parameter. - - The message object to log. - The exception to log, including its stack Error. - - - - Log a message with the level. - - An that supplies culture-specific formatting Errorrmation. - The format of the message object to log. - - - - - Log a message with the level. - - An that supplies culture-specific formatting Errorrmation. - The format of the message object to log. - The exception to log. - - - - - Log a message with the level. - - The format of the message object to log. - the list of format arguments - - - - Log a message with the level. - - The format of the message object to log. - The exception to log. - the list of format arguments - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - A callback used by the logger to obtain the message if log level is matched - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - A callback used by the logger to obtain the message if log level is matched - The exception to log, including its stack Error. - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - An that supplies culture-specific formatting information. - A callback used by the logger to obtain the message if log level is matched - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - An that supplies culture-specific formatting information. - A callback used by the logger to obtain the message if log level is matched - The exception to log, including its stack Error. - - - - Log a message object with the level. - - The message object to log. - - - - Log a message object with the level including - the stack Fatal of the passed - as a parameter. - - The message object to log. - The exception to log, including its stack Fatal. - - - - Log a message with the level. - - An that supplies culture-specific formatting Fatalrmation. - The format of the message object to log. - - - - - Log a message with the level. - - An that supplies culture-specific formatting Fatalrmation. - The format of the message object to log. - The exception to log. - - - - - Log a message with the level. - - The format of the message object to log. - the list of format arguments - - - - Log a message with the level. - - The format of the message object to log. - The exception to log. - the list of format arguments - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - A callback used by the logger to obtain the message if log level is matched - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - A callback used by the logger to obtain the message if log level is matched - The exception to log, including its stack Fatal. - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - An that supplies culture-specific formatting information. - A callback used by the logger to obtain the message if log level is matched - - - - Log a message with the level using a callback to obtain the message - - - Using this method avoids the cost of creating a message and evaluating message arguments - that probably won't be logged due to loglevel settings. - - An that supplies culture-specific formatting information. - A callback used by the logger to obtain the message if log level is matched - The exception to log, including its stack Fatal. - - - - Checks if this logger is enabled for the level. - - - Override this in your derived class to comply with the underlying logging system - - - - - Checks if this logger is enabled for the level. - - - Override this in your derived class to comply with the underlying logging system - - - - - Checks if this logger is enabled for the level. - - - Override this in your derived class to comply with the underlying logging system - - - - - Checks if this logger is enabled for the level. - - - Override this in your derived class to comply with the underlying logging system - - - - - Checks if this logger is enabled for the level. - - - Override this in your derived class to comply with the underlying logging system - - - - - Checks if this logger is enabled for the level. - - - Override this in your derived class to comply with the underlying logging system - - - - - Represents a method responsible for writing a message to the log system. - - - - - This namespace contains convenience base classes for implementing your own s. - - - - - Abstract class providing a standard implementation of simple loggers. - - Erich Eichinger - - - - Creates and initializes a the simple logger. - - The name, usually type name of the calling class, of the logger. - The current logging threshold. Messages recieved that are beneath this threshold will not be logged. - Include level in the log message. - Include the current time in the log message. - Include the instance name in the log message. - The date and time format to use in the log message. - - - - Appends the formatted message to the specified . - - the that receíves the formatted message. - - - - - - - Determines if the given log level is currently enabled. - - - - - - - The name of the logger. - - - - - Include the current log level in the log message. - - - - - Include the current time in the log message. - - - - - Include the instance name in the log message. - - - - - The current logging threshold. Messages recieved that are beneath this threshold will not be logged. - - - - - The date and time format to use in the log message. - - - - - Determines Whether is set. - - - - - Returns if the current is greater than or - equal to . If it is, all messages will be sent to . - - - - - Returns if the current is greater than or - equal to . If it is, all messages will be sent to . - - - - - Returns if the current is greater than or - equal to . If it is, only messages with a of - , , , and - will be sent to . - - - - - Returns if the current is greater than or - equal to . If it is, only messages with a of - , , and - will be sent to . - - - - - Returns if the current is greater than or - equal to . If it is, only messages with a of - and will be sent to . - - - - - Returns if the current is greater than or - equal to . If it is, only messages with a of - will be sent to . - - - - - Base factory implementation for creating simple instances. - - Default settings are LogLevel.All, showDateTime = true, showLogName = true, and no DateTimeFormat. - The keys in the NameValueCollection to configure this adapter are the following - - level - showDateTime - showLogName - dateTimeFormat - - - - - Gilles Bayon - Mark Pollack - Erich Eichinger - - - - Initializes a new instance of the class. - - - Looks for level, showDateTime, showLogName, dateTimeFormat items from - for use when the GetLogger methods are called. - for more information on how to use the - standard .NET application configuraiton file (App.config/Web.config) - to configure this adapter. - - The name value collection, typically specified by the user in - a configuration section named common/logging. - - - - Create the specified logger instance - - - - - Derived factories need to implement this method to create the - actual logger instance. - - a new logger instance. Must never be null! - - - - The default to use when creating new instances. - - - - - The default setting to use when creating new instances. - - - - - The default setting to use when creating new instances. - - - - - The default setting to use when creating new instances. - - - - - The default setting to use when creating new instances. - - - - - A logger created by that - sends all log events to the owning adapter's - - Erich Eichinger - - - - The adapter that created this logger instance. - - - - - Allows to retrieve the last logged event instance captured by this logger - - - - - Create a new logger instance. - - - - - Create a new and send it to - - - - - - - - A logging event captured by - - Erich Eichinger - - - - The logger that logged this event - - - - - The level used to log this event - - - - - The raw message object - - - - - A logged exception - - - - - Create a new event instance - - - - - Retrieves the formatted message text - - - - - An adapter, who's loggers capture all log events and send them to . - Retrieve the list of log events from . - - - This logger factory is mainly for debugging and test purposes. - - This is an example how you might use this adapter for testing: - - // configure for capturing - CapturingLoggerFactoryAdapter adapter = new CapturingLoggerFactoryAdapter(); - LogManager.Adapter = adapter; - - // reset capture state - adapter.Clear(); - // log something - ILog log = LogManager.GetCurrentClassLogger(); - log.DebugFormat("Current Time:{0}", DateTime.Now); - - // check logged data - Assert.AreEqual(1, adapter.LoggerEvents.Count); - Assert.AreEqual(LogLevel.Debug, adapter.LastEvent.Level); - - - - Erich Eichinger - - - - Clears all captured events - - - - - Resets the to null. - - - - - Holds the list of logged events. - - - To access this collection in a multithreaded application, put a lock on the list instance. - - - - - instances send their captured log events to this method. - - - - - Get a instance for the given type. - - - - - Get a instance for the given name. - - - - - Holds the last log event received from any of this adapter's loggers. - - - - - A implementation sending all System.Diagnostics.Trace output to - the Common.Logging infrastructure. - - - This listener captures all output sent by calls to System.Diagnostics.Trace and - and and sends it to an instance.
- The instance to be used is obtained by calling - . The name of the logger is created by passing - this listener's and any source or category passed - into this listener (see or for example). -
- - The snippet below shows how to add and configure this listener to your app.config: - - <system.diagnostics> - <sharedListeners> - <add name="Diagnostics" - type="Common.Logging.Simple.CommonLoggingTraceListener, Common.Logging" - initializeData="DefaultTraceEventType=Information; LoggerNameFormat={listenerName}.{sourceName}"> - <filter type="System.Diagnostics.EventTypeFilter" initializeData="Information"/> - </add> - </sharedListeners> - <trace> - <listeners> - <add name="Diagnostics" /> - </listeners> - </trace> - </system.diagnostics> - - - Erich Eichinger -
- - - Creates a new instance with the default name "Diagnostics" and "Trace". - - - - - Creates a new instance initialized with properties from the . string. - - - is a semicolon separated string of name/value pairs, where each pair has - the form key=value. E.g. - "Name=MyLoggerName;LogLevel=Debug" - - a semicolon separated list of name/value pairs. - - - - Creates a new instance initialized with the specified properties. - - name/value configuration properties. - - - - Logs the given message to the Common.Logging infrastructure. - - the eventType - the name or category name passed into e.g. . - the id of this event - the message format - the message arguments - - - - Writes message to logger provided by . - - - - - Writes message to logger provided by . - - - - - Writes message to logger provided by . - - - - - Writes message to logger provided by . - - - - - Writes message to logger provided by . - - - - - Writes message to logger provided by . - - - - - Writes message to logger provided by . - - - - - Writes message to logger provided by - - - - - Writes message to logger provided by - - - - - Writes message to logger provided by - - - - - Writes message to logger provided by - - - - - Writes message to logger provided by - - - - - Writes message to logger provided by - - - - - Sets the default to use for logging - all events emitted by .Write(...) and - .WriteLine(...) methods. - - - This listener captures all output sent by calls to and - sends it to an instance using the specified - on . - - - - - Format to use for creating the logger name. Defaults to "{listenerName}.{sourceName}". - - - Available placeholders are: - - {listenerName}: the configured name of this listener instance. - {sourceName}: the trace source name an event originates from (see e.g. . - - - - - - Sends log messages to . - - Gilles Bayon - - - - Creates and initializes a logger that writes messages to . - - The name, usually type name of the calling class, of the logger. - The current logging threshold. Messages recieved that are beneath this threshold will not be logged. - Include the current log level in the log message. - Include the current time in the log message. - Include the instance name in the log message. - The date and time format to use in the log message. - - - - Do the actual logging by constructing the log message using a then - sending the output to . - - The of the message. - The log message. - An optional associated with the message. - - - - Factory for creating instances that write data to . - - - - - Gilles Bayon - Mark Pollack - Erich Eichinger - - - - Initializes a new instance of the class using default - settings. - - - - - Initializes a new instance of the class. - - - Looks for level, showDateTime, showLogName, dateTimeFormat items from - for use when the GetLogger methods are called. - for more information on how to use the - standard .NET application configuraiton file (App.config/Web.config) - to configure this adapter. - - The name value collection, typically specified by the user in - a configuration section named common/logging. - - - - Creates a new instance. - - - - - This namespace contains out-of-the-box adapters to intrinsic systems, namely - and . - - - - - Silently ignores all log messages. - - Gilles Bayon - Erich Eichinger - - - - Ignores message. - - - - - - Ignores message. - - - - - - - Ignores message. - - The format of the message object to log. - - - - - Ignores message. - - The format of the message object to log. - The exception to log. - the list of message format arguments - - - - Ignores message. - - An that supplies culture-specific formatting information. - The format of the message object to log. - the list of message format arguments - - - - Ignores message. - - An that supplies culture-specific formatting information. - The format of the message object to log. - The exception to log. - the list of message format arguments - - - - Ignores message. - - A callback used by the logger to obtain the message if log level is matched - - - - Ignores message. - - A callback used by the logger to obtain the message if log level is matched - The exception to log, including its stack trace. - - - - Ignores message. - - An that supplies culture-specific formatting information. - A callback used by the logger to obtain the message if log level is matched - - - - Ignores message. - - An that supplies culture-specific formatting information. - A callback used by the logger to obtain the message if log level is matched - The exception to log, including its stack trace. - - - - Ignores message. - - - - - - Ignores message. - - - - - - - Ignores message. - - The format of the message object to log. - - - - - Ignores message. - - The format of the message object to log. - The exception to log. - the list of message format arguments - - - - Ignores message. - - An that supplies culture-specific formatting information. - The format of the message object to log. - the list of message format arguments - - - - Ignores message. - - An that supplies culture-specific formatting information. - The format of the message object to log. - The exception to log. - the list of message format arguments - - - - Ignores message. - - A callback used by the logger to obtain the message if log level is matched - - - - Ignores message. - - A callback used by the logger to obtain the message if log level is matched - The exception to log, including its stack Debug. - - - - Ignores message. - - An that supplies culture-specific formatting information. - A callback used by the logger to obtain the message if log level is matched - - - - Ignores message. - - An that supplies culture-specific formatting information. - A callback used by the logger to obtain the message if log level is matched - The exception to log, including its stack Debug. - - - - Ignores message. - - - - - - Ignores message. - - - - - - - Ignores message. - - The format of the message object to log. - - - - - Ignores message. - - The format of the message object to log. - The exception to log. - the list of message format arguments - - - - Ignores message. - - An that supplies culture-specific formatting information. - The format of the message object to log. - the list of message format arguments - - - - Ignores message. - - An that supplies culture-specific formatting information. - The format of the message object to log. - The exception to log. - the list of message format arguments - - - - Ignores message. - - A callback used by the logger to obtain the message if log level is matched - - - - Ignores message. - - A callback used by the logger to obtain the message if log level is matched - The exception to log, including its stack Info. - - - - Ignores message. - - An that supplies culture-specific formatting information. - A callback used by the logger to obtain the message if log level is matched - - - - Ignores message. - - An that supplies culture-specific formatting information. - A callback used by the logger to obtain the message if log level is matched - The exception to log, including its stack Info. - - - - Ignores message. - - - - - - Ignores message. - - - - - - - Ignores message. - - The format of the message object to log. - - - - - Ignores message. - - The format of the message object to log. - The exception to log. - the list of message format arguments - - - - Ignores message. - - An that supplies culture-specific formatting Warnrmation. - The format of the message object to log. - the list of message format arguments - - - - Ignores message. - - An that supplies culture-specific formatting Warnrmation. - The format of the message object to log. - The exception to log. - the list of message format arguments - - - - Ignores message. - - A callback used by the logger to obtain the message if log level is matched - - - - Ignores message. - - A callback used by the logger to obtain the message if log level is matched - The exception to log, including its stack Warn. - - - - Ignores message. - - An that supplies culture-specific formatting information. - A callback used by the logger to obtain the message if log level is matched - - - - Ignores message. - - An that supplies culture-specific formatting information. - A callback used by the logger to obtain the message if log level is matched - The exception to log, including its stack Warn. - - - - Ignores message. - - - - - - Ignores message. - - - - - - - Ignores message. - - The format of the message object to log. - - - - - Ignores message. - - The format of the message object to log. - The exception to log. - the list of message format arguments - - - - Ignores message. - - An that supplies culture-specific formatting Errorrmation. - The format of the message object to log. - the list of message format arguments - - - - Ignores message. - - An that supplies culture-specific formatting Errorrmation. - The format of the message object to log. - The exception to log. - the list of message format arguments - - - - Ignores message. - - A callback used by the logger to obtain the message if log level is matched - - - - Ignores message. - - A callback used by the logger to obtain the message if log level is matched - The exception to log, including its stack Error. - - - - Ignores message. - - An that supplies culture-specific formatting information. - A callback used by the logger to obtain the message if log level is matched - - - - Ignores message. - - An that supplies culture-specific formatting information. - A callback used by the logger to obtain the message if log level is matched - The exception to log, including its stack Error. - - - - Ignores message. - - - - - - Ignores message. - - - - - - - Ignores message. - - The format of the message object to log. - - - - - Ignores message. - - The format of the message object to log. - The exception to log. - the list of message format arguments - - - - Ignores message. - - An that supplies culture-specific formatting Fatalrmation. - The format of the message object to log. - the list of message format arguments - - - - Ignores message. - - An that supplies culture-specific formatting Fatalrmation. - The format of the message object to log. - The exception to log. - the list of message format arguments - - - - Ignores message. - - A callback used by the logger to obtain the message if log level is matched - - - - Ignores message. - - A callback used by the logger to obtain the message if log level is matched - The exception to log, including its stack Fatal. - - - - Ignores message. - - An that supplies culture-specific formatting information. - A callback used by the logger to obtain the message if log level is matched - - - - Ignores message. - - An that supplies culture-specific formatting information. - A callback used by the logger to obtain the message if log level is matched - The exception to log, including its stack Fatal. - - - - Always returns . - - - - - Always returns . - - - - - Always returns . - - - - - Always returns . - - - - - Always returns . - - - - - Always returns . - - - - - Factory for creating instances that silently ignores - logging requests. - - - - Gilles Bayon - - - - Constructor - - - - - Constructor - - - - - Get a ILog instance by type - - - - - - - Get a ILog instance by type name - - - - - - - Logger sending everything to the trace output stream using . - - - Beware not to use in combination with this logger as - this would result in an endless loop for obvious reasons! - - - - Gilles Bayon - Erich Eichinger - - - - Creates a new TraceLogger instance. - - whether to use or for logging. - the name of this logger - the default log level to use - Include the current log level in the log message. - Include the current time in the log message. - Include the instance name in the log message. - The date and time format to use in the log message. - - - - Determines if the given log level is currently enabled. - checks if is true. - - - - - Do the actual logging. - - - - - - - - Called after deserialization completed. - - - - - Used to defer message formatting until it is really needed. - - - This class also improves performance when multiple - s are configured. - - - - - Factory for creating instances that send - everything to the output stream. - - - Beware not to use in combination with this logger factory - as this would result in an endless loop for obvious reasons! - - - - - Gilles Bayon - Mark Pollack - Erich Eichinger - - - - Initializes a new instance of the class using default settings. - - - - - Initializes a new instance of the class. - - - Looks for level, showDateTime, showLogName, dateTimeFormat items from - for use when the GetLogger methods are called. - for more information on how to use the - standard .NET application configuraiton file (App.config/Web.config) - to configure this adapter. - - The name value collection, typically specified by the user in - a configuration section named common/logging. - - - - Creates a new instance. - - - - - Whether to use .TraceXXXX(string,object[]) methods for logging - or . - - - - - The exception that is thrown when a configuration system error has occurred with Common.Logging - - Mark Pollack - - - Creates a new instance of the ObjectsException class. - - - - Creates a new instance of the ConfigurationException class. with the specified message. - - - A message about the exception. - - - - - Creates a new instance of the ConfigurationException class with the specified message - and root cause. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ConfigurationException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Used in an application's configuration file (App.Config or Web.Config) to configure the logging subsystem. - - - An example configuration section that writes log messages to the Console using the - built-in Console Logger. - - <configuration> - <configSections> - <sectionGroup name="common"> - <section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" /> - </sectionGroup> - </configSections> - <common> - <logging> - <factoryAdapter type="Common.Logging.Simple.ConsoleOutLoggerFactoryAdapter, Common.Logging"> - <arg key="showLogName" value="true" /> - <arg key="showDataTime" value="true" /> - <arg key="level" value="ALL" /> - <arg key="dateTimeFormat" value="yyyy/MM/dd HH:mm:ss:fff" /> - </factoryAdapter> - </logging> - </common> - </configuration> - - - - - - Ensure static fields get initialized before any class member - can be accessed (avoids beforeFieldInit) - - - - - Constructor - - - - - Retrieves the of the logger the use by looking at the logFactoryAdapter element - of the logging configuration element. - - - - A object containing the specified type that implements - along with zero or more properties that will be - passed to the logger factory adapter's constructor as an . - - - - - Verifies that the logFactoryAdapter element appears once in the configuration section. - - settings of a parent section - atm this must always be null - Additional information about the configuration process. - The configuration section to apply an XPath query too. - - A object containing the specified logFactoryAdapter type - along with user supplied configuration properties. - - - - - Verifies that the logFactoryAdapter element appears once in the configuration section. - - The parent of the current item. - Additional information about the configuration process. - The configuration section to apply an XPath query too. - - A object containing the specified logFactoryAdapter type - along with user supplied configuration properties. - - - - - The type of method that is passed into e.g. - and allows the callback method to "submit" it's message to the underlying output system. - - the format argument as in - the argument list as in - - Erich Eichinger - - - - The 7 possible logging levels - - Gilles Bayon - - - - All logging levels - - - - - A trace logging level - - - - - A debug logging level - - - - - A info logging level - - - - - A warn logging level - - - - - An error logging level - - - - - A fatal logging level - - - - - Do not log anything. - - - - - Use the LogManager's or - methods to obtain instances for logging. - - - For configuring the underlying log system using application configuration, see the example - at . - For configuring programmatically, see the example section below. - - - The example below shows the typical use of LogManager to obtain a reference to a logger - and log an exception: - - - ILog log = LogManager.GetLogger(this.GetType()); - ... - try - { - /* .... */ - } - catch(Exception ex) - { - log.ErrorFormat("Hi {0}", ex, "dude"); - } - - - The example below shows programmatic configuration of the underlying log system: - - - // create properties - NameValueCollection properties = new NameValueCollection(); - properties["showDateTime"] = "true"; - - // set Adapter - Common.Logging.LogManager.Adapter = new - Common.Logging.Simple.ConsoleOutLoggerFactoryAdapter(properties); - - - - - - - - Gilles Bayon - - - - The name of the default configuration section to read settings from. - - - You can always change the source of your configuration settings by setting another instance - on . - - - - - Performs static 1-time init of LogManager by calling - - - - - Reset the infrastructure to its default settings. This means, that configuration settings - will be re-read from section <common/logging> of your app.config. - - - This is mainly used for unit testing, you wouldn't normally use this in your applications.
- Note: instances already handed out from this LogManager are not(!) affected. - Resetting LogManager only affects new instances being handed out. -
-
- - - Reset the infrastructure to its default settings. This means, that configuration settings - will be re-read from section <common/logging> of your app.config. - - - This is mainly used for unit testing, you wouldn't normally use this in your applications.
- Note: instances already handed out from this LogManager are not(!) affected. - Resetting LogManager only affects new instances being handed out. -
- - the instance to obtain settings for - re-initializing the LogManager. - -
- - - Gets the logger by calling - on the currently configured using the type of the calling class. - - - This method needs to inspect the in order to determine the calling - class. This of course comes with a performance penalty, thus you shouldn't call it too - often in your application. - - - the logger instance obtained from the current - - - - Gets the logger by calling - on the currently configured using the specified type. - - the logger instance obtained from the current - - - - Gets the logger by calling - on the currently configured using the specified type. - - The type. - the logger instance obtained from the current - - - - Gets the logger by calling - on the currently configured using the specified name. - - The name. - the logger instance obtained from the current - - - - Builds the logger factory adapter. - - a factory adapter instance. Is never null. - - - - Builds a instance from the given - using . - - - the instance. Is never null - - - - Gets the configuration reader used to initialize the LogManager. - - Primarily used for testing purposes but maybe useful to obtain configuration - information from some place other than the .NET application configuration file. - The configuration reader. - - - - Gets or sets the adapter. - - The adapter. - - - - This namespace contains all core classes making up the Common.Logging framework. - - - - - This assembly contains the core functionality of the Common.Logging framework. - In particular, checkout and for usage information. - - - - - Indicates classes or members to be ignored by NCover - - - Note, the name is chosen, because TestDriven.NET uses it as //ea argument to "Test With... Coverage" - - Erich Eichinger - - - -

Overview

- - There are a variety of logging implementations for .NET currently in use, log4net, Enterprise - Library Logging, NLog, to name the most popular. The downside of having differerent implementation - is that they do not share a common interface and therefore impose a particular logging - implementation on the users of your library. To solve this dependency problem the Common.Logging - library introduces a simple abstraction to allow you to select a specific logging implementation at - runtime. - - - The library is based on work done by the developers of IBatis.NET and it's usage is inspired by - log4net. Many thanks to the developers of those projects! - -

Usage

- - The core logging library Common.Logging provides the base logging interface as - well as the global that you use to instrument your code: - - - ILog log = LogManager.GetLogger(this.GetType()); - - log.DebugFormat("Hi {0}", "dude"); - - - To output the information logged, you need to tell Common.Logging, what underlying logging system - to use. Common.Logging already includes simple console and trace based logger implementations - usable out of the box. Adding the following configuration snippet to your app.config causes - Common.Logging to output all information to the console: - - - <configuration> - <configSections> - <sectionGroup name="common"> - <section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" /> - </sectionGroup> - </configSections> - - <common> - <logging> - <factoryAdapter type="Common.Logging.Simple.ConsoleOutLoggerFactoryAdapter, Common.Logging"> - <arg key="level" value="DEBUG" /> - </factoryAdapter> - </logging> - </common> - </configuration> - -

Customizing

- - In the case you want to integrate your own logging system that is not supported by Common.Logging yet, it is easily - possible to implement your own plugin by implementing . - For convenience there is a base implementation available that usually - makes implementing your own adapter a breeze. - -

<system.diagnostics> Integration

- - If your code already uses the .NET framework's built-in System.Diagnostics.Trace - system, you can use to redirect all trace output to the - Common.Logging infrastructure. - -
-
-
-
+ + + + Common.Logging + + + + + Various utility methods for using during factory and logger instance configuration + + Erich Eichinger + + + + Initialize all members before any of this class' methods can be accessed (avoids beforeFieldInit) + + + + + Adds the parser to the list of known type parsers. + + + .NET intrinsic types are pre-registerd: short, int, long, float, double, decimal, bool + + + + + Retrieves the named value from the specified . + + may be null + the value's key + if is not null, the value returned by values[name]. null otherwise. + + + + Retrieves the named value from the specified . + + may be null + the value's key + the default value, if not found + if is not null, the value returned by values[name]. null otherwise. + + + + Returns the first nonnull, nonempty value among its arguments. + + + Returns null, if the initial list was null or empty. + + + + + + Returns the first nonnull, nonempty value among its arguments. + + + Also + + + + + Tries parsing into an enum of the type of . + + the default value to return if parsing fails + the string value to parse + the successfully parsed value, otherwise. + + + + Tries parsing into the specified return type. + + the default value to return if parsing fails + the string value to parse + the successfully parsed value, otherwise. + + + + Throws a if is null. + + + + + Throws a if is null. + + + + + Throws a if an object of type is not + assignable to type . + + + + + Throws a if an object of type is not + assignable to type . + + + + + Ensures any exception thrown by the given is wrapped with an + . + + + If already throws a ConfigurationException, it will not be wrapped. + + the action to execute + the message to be set on the thrown + args to be passed to to format the message + + + + Ensures any exception thrown by the given is wrapped with an + . + + + If already throws a ConfigurationException, it will not be wrapped. + + the action to execute + the message to be set on the thrown + args to be passed to to format the message + + + + A delegate converting a string representation into the target type + + + + + An anonymous action delegate with no arguments and no return value. + + + + + + An anonymous action delegate with no arguments and no return value. + + + + + + Implementation of that uses the standard .NET + configuration APIs, ConfigurationSettings in 1.x and ConfigurationManager in 2.0 + + Mark Pollack + + + + Interface for basic operations to read .NET application configuration information. + + Provides a simple abstraction to handle BCL API differences between .NET 1.x and 2.0. Also + useful for testing scenarios. + Mark Pollack + + + + Parses the configuration section and returns the resulting object. + + +

+ Primary purpose of this method is to allow us to parse and + load configuration sections using the same API regardless + of the .NET framework version. +

+
+ Name of the configuration section. + Object created by a corresponding . + +
+ + + Parses the configuration section and returns the resulting object. + + Name of the configuration section. + + Object created by a corresponding . + + +

+ Primary purpose of this method is to allow us to parse and + load configuration sections using the same API regardless + of the .NET framework version. +

+
+ +
+ + + Container used to hold configuration information from config file. + + Gilles Bayon + + + + + + + The type + that will be used for creating + + + Additional user supplied properties that are passed to the + 's constructor. + + + + + The type that will be used for creating + instances. + + + + + Additional user supplied properties that are passed to the 's constructor. + + + + + This namespace contains various utility classes. + + + + + An implementation of that caches loggers handed out by this factory. + + + Implementors just need to override . + + Erich Eichinger + + + + LoggerFactoryAdapter interface is used internally by LogManager + Only developers wishing to write new Common.Logging adapters need to + worry about this interface. + + Gilles Bayon + + + + Get a ILog instance by type. + + The type to use for the logger + + + + + Get a ILog instance by name. + + The name of the logger + + + + + Creates a new + + + + + + Purges all loggers from cache + + + + + Create the specified named logger instance + + + Derived factories need to implement this method to create the + actual logger instance. + + + + + Get a ILog instance by . + + Usually the of the current class. + + An ILog instance either obtained from the internal cache or created by a call to . + + + + + Get a ILog instance by name. + + Usually a 's Name or FullName property. + + An ILog instance either obtained from the internal cache or created by a call to . + + + + + Get or create a ILog instance by name. + + Usually a 's Name or FullName property. + + An ILog instance either obtained from the internal cache or created by a call to . + + + + + Provides base implementation common for most logger adapters + + Erich Eichinger + + + + A simple logging interface abstracting logging APIs. + + + + Implementations should defer calling a message's until the message really needs + to be logged to avoid performance penalties. + + + Each log method offers to pass in a instead of the actual message. + Using this style has the advantage to defer possibly expensive message argument evaluation and formatting (and formatting arguments!) until the message gets + actually logged. If the message is not logged at all (e.g. due to settings), + you won't have to pay the peformance penalty of creating the message. + + + + The example below demonstrates using callback style for creating the message, where the call to the + and the underlying only happens, if level is enabled: + + Log.Debug( m=>m("result is {0}", random.NextDouble()) ); + Log.Debug(delegate(m) { m("result is {0}", random.NextDouble()); }); + + + + Mark Pollack + Bruno Baia + Erich Eichinger + + + + Log a message object with the level. + + The message object to log. + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The message object to log. + The exception to log, including its stack trace. + + + + Log a message with the level. + + The format of the message object to log. + the list of format arguments + + + + Log a message with the level. + + The format of the message object to log. + The exception to log. + the list of format arguments + + + + Log a message with the level. + + An that supplies culture-specific formatting information. + The format of the message object to log. + + + + + Log a message with the level. + + An that supplies culture-specific formatting information. + The format of the message object to log. + The exception to log. + + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + A callback used by the logger to obtain the message if log level is matched + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + A callback used by the logger to obtain the message if log level is matched + The exception to log, including its stack trace. + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + An that supplies culture-specific formatting information. + A callback used by the logger to obtain the message if log level is matched + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + An that supplies culture-specific formatting information. + A callback used by the logger to obtain the message if log level is matched + The exception to log, including its stack trace. + + + + Log a message object with the level. + + The message object to log. + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The message object to log. + The exception to log, including its stack trace. + + + + Log a message with the level. + + The format of the message object to log. + the list of format arguments + + + + Log a message with the level. + + The format of the message object to log. + The exception to log. + the list of format arguments + + + + Log a message with the level. + + An that supplies culture-specific formatting information. + The format of the message object to log. + + + + + Log a message with the level. + + An that supplies culture-specific formatting information. + The format of the message object to log. + The exception to log. + + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + A callback used by the logger to obtain the message if log level is matched + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + A callback used by the logger to obtain the message if log level is matched + The exception to log, including its stack trace. + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + An that supplies culture-specific formatting information. + A callback used by the logger to obtain the message if log level is matched + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + An that supplies culture-specific formatting information. + A callback used by the logger to obtain the message if log level is matched + The exception to log, including its stack Debug. + + + + Log a message object with the level. + + The message object to log. + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The message object to log. + The exception to log, including its stack trace. + + + + Log a message with the level. + + The format of the message object to log. + the list of format arguments + + + + Log a message with the level. + + The format of the message object to log. + The exception to log. + the list of format arguments + + + + Log a message with the level. + + An that supplies culture-specific formatting information. + The format of the message object to log. + + + + + Log a message with the level. + + An that supplies culture-specific formatting information. + The format of the message object to log. + The exception to log. + + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + A callback used by the logger to obtain the message if log level is matched + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + A callback used by the logger to obtain the message if log level is matched + The exception to log, including its stack trace. + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + An that supplies culture-specific formatting information. + A callback used by the logger to obtain the message if log level is matched + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + An that supplies culture-specific formatting information. + A callback used by the logger to obtain the message if log level is matched + The exception to log, including its stack Info. + + + + Log a message object with the level. + + The message object to log. + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The message object to log. + The exception to log, including its stack trace. + + + + Log a message with the level. + + The format of the message object to log. + the list of format arguments + + + + Log a message with the level. + + The format of the message object to log. + The exception to log. + the list of format arguments + + + + Log a message with the level. + + An that supplies culture-specific formatting information. + The format of the message object to log. + + + + + Log a message with the level. + + An that supplies culture-specific formatting information. + The format of the message object to log. + The exception to log. + + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + A callback used by the logger to obtain the message if log level is matched + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + A callback used by the logger to obtain the message if log level is matched + The exception to log, including its stack trace. + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + An that supplies culture-specific formatting information. + A callback used by the logger to obtain the message if log level is matched + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + An that supplies culture-specific formatting information. + A callback used by the logger to obtain the message if log level is matched + The exception to log, including its stack Warn. + + + + Log a message object with the level. + + The message object to log. + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The message object to log. + The exception to log, including its stack trace. + + + + Log a message with the level. + + The format of the message object to log. + the list of format arguments + + + + Log a message with the level. + + The format of the message object to log. + The exception to log. + the list of format arguments + + + + Log a message with the level. + + An that supplies culture-specific formatting information. + The format of the message object to log. + + + + + Log a message with the level. + + An that supplies culture-specific formatting information. + The format of the message object to log. + The exception to log. + + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + A callback used by the logger to obtain the message if log level is matched + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + A callback used by the logger to obtain the message if log level is matched + The exception to log, including its stack trace. + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + An that supplies culture-specific formatting information. + A callback used by the logger to obtain the message if log level is matched + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + An that supplies culture-specific formatting information. + A callback used by the logger to obtain the message if log level is matched + The exception to log, including its stack Error. + + + + Log a message object with the level. + + The message object to log. + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The message object to log. + The exception to log, including its stack trace. + + + + Log a message with the level. + + The format of the message object to log. + the list of format arguments + + + + Log a message with the level. + + The format of the message object to log. + The exception to log. + the list of format arguments + + + + Log a message with the level. + + An that supplies culture-specific formatting information. + The format of the message object to log. + + + + + Log a message with the level. + + An that supplies culture-specific formatting information. + The format of the message object to log. + The exception to log. + + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + A callback used by the logger to obtain the message if log level is matched + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + A callback used by the logger to obtain the message if log level is matched + The exception to log, including its stack trace. + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + An that supplies culture-specific formatting information. + A callback used by the logger to obtain the message if log level is matched + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + An that supplies culture-specific formatting information. + A callback used by the logger to obtain the message if log level is matched + The exception to log, including its stack Fatal. + + + + Checks if this logger is enabled for the level. + + + + + Checks if this logger is enabled for the level. + + + + + Checks if this logger is enabled for the level. + + + + + Checks if this logger is enabled for the level. + + + + + Checks if this logger is enabled for the level. + + + + + Checks if this logger is enabled for the level. + + + + + Holds the method for writing a message to the log system. + + + + + Creates a new logger instance using for + writing log events to the underlying log system. + + + + + + Override this method to use a different method than + for writing log events to the underlying log system. + + + Usually you don't need to override thise method. The default implementation returns + null to indicate that the default handler should be + used. + + + + + Actually sends the message to the underlying log system. + + the level of this log event. + the message to log + the exception to log (may be null) + + + + Log a message object with the level. + + The message object to log. + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The message object to log. + The exception to log, including its stack trace. + + + + Log a message with the level. + + An that supplies culture-specific formatting information. + The format of the message object to log. + + + + + Log a message with the level. + + An that supplies culture-specific formatting information. + The format of the message object to log. + The exception to log. + + + + + Log a message with the level. + + The format of the message object to log. + the list of format arguments + + + + Log a message with the level. + + The format of the message object to log. + The exception to log. + the list of format arguments + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + A callback used by the logger to obtain the message if log level is matched + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + A callback used by the logger to obtain the message if log level is matched + The exception to log, including its stack trace. + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + An that supplies culture-specific formatting information. + A callback used by the logger to obtain the message if log level is matched + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + An that supplies culture-specific formatting information. + A callback used by the logger to obtain the message if log level is matched + The exception to log, including its stack trace. + + + + Log a message object with the level. + + The message object to log. + + + + Log a message object with the level including + the stack Debug of the passed + as a parameter. + + The message object to log. + The exception to log, including its stack Debug. + + + + Log a message with the level. + + An that supplies culture-specific formatting information. + The format of the message object to log. + + + + + Log a message with the level. + + An that supplies culture-specific formatting information. + The format of the message object to log. + The exception to log. + + + + + Log a message with the level. + + The format of the message object to log. + the list of format arguments + + + + Log a message with the level. + + The format of the message object to log. + The exception to log. + the list of format arguments + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + A callback used by the logger to obtain the message if log level is matched + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + A callback used by the logger to obtain the message if log level is matched + The exception to log, including its stack Debug. + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + An that supplies culture-specific formatting information. + A callback used by the logger to obtain the message if log level is matched + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + An that supplies culture-specific formatting information. + A callback used by the logger to obtain the message if log level is matched + The exception to log, including its stack Debug. + + + + Log a message object with the level. + + The message object to log. + + + + Log a message object with the level including + the stack Info of the passed + as a parameter. + + The message object to log. + The exception to log, including its stack Info. + + + + Log a message with the level. + + An that supplies culture-specific formatting information. + The format of the message object to log. + + + + + Log a message with the level. + + An that supplies culture-specific formatting information. + The format of the message object to log. + The exception to log. + + + + + Log a message with the level. + + The format of the message object to log. + the list of format arguments + + + + Log a message with the level. + + The format of the message object to log. + The exception to log. + the list of format arguments + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + A callback used by the logger to obtain the message if log level is matched + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + A callback used by the logger to obtain the message if log level is matched + The exception to log, including its stack Info. + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + An that supplies culture-specific formatting information. + A callback used by the logger to obtain the message if log level is matched + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + An that supplies culture-specific formatting information. + A callback used by the logger to obtain the message if log level is matched + The exception to log, including its stack Info. + + + + Log a message object with the level. + + The message object to log. + + + + Log a message object with the level including + the stack Warn of the passed + as a parameter. + + The message object to log. + The exception to log, including its stack Warn. + + + + Log a message with the level. + + An that supplies culture-specific formatting Warnrmation. + The format of the message object to log. + + + + + Log a message with the level. + + An that supplies culture-specific formatting Warnrmation. + The format of the message object to log. + The exception to log. + + + + + Log a message with the level. + + The format of the message object to log. + the list of format arguments + + + + Log a message with the level. + + The format of the message object to log. + The exception to log. + the list of format arguments + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + A callback used by the logger to obtain the message if log level is matched + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + A callback used by the logger to obtain the message if log level is matched + The exception to log, including its stack Warn. + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + An that supplies culture-specific formatting information. + A callback used by the logger to obtain the message if log level is matched + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + An that supplies culture-specific formatting information. + A callback used by the logger to obtain the message if log level is matched + The exception to log, including its stack Warn. + + + + Log a message object with the level. + + The message object to log. + + + + Log a message object with the level including + the stack Error of the passed + as a parameter. + + The message object to log. + The exception to log, including its stack Error. + + + + Log a message with the level. + + An that supplies culture-specific formatting Errorrmation. + The format of the message object to log. + + + + + Log a message with the level. + + An that supplies culture-specific formatting Errorrmation. + The format of the message object to log. + The exception to log. + + + + + Log a message with the level. + + The format of the message object to log. + the list of format arguments + + + + Log a message with the level. + + The format of the message object to log. + The exception to log. + the list of format arguments + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + A callback used by the logger to obtain the message if log level is matched + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + A callback used by the logger to obtain the message if log level is matched + The exception to log, including its stack Error. + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + An that supplies culture-specific formatting information. + A callback used by the logger to obtain the message if log level is matched + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + An that supplies culture-specific formatting information. + A callback used by the logger to obtain the message if log level is matched + The exception to log, including its stack Error. + + + + Log a message object with the level. + + The message object to log. + + + + Log a message object with the level including + the stack Fatal of the passed + as a parameter. + + The message object to log. + The exception to log, including its stack Fatal. + + + + Log a message with the level. + + An that supplies culture-specific formatting Fatalrmation. + The format of the message object to log. + + + + + Log a message with the level. + + An that supplies culture-specific formatting Fatalrmation. + The format of the message object to log. + The exception to log. + + + + + Log a message with the level. + + The format of the message object to log. + the list of format arguments + + + + Log a message with the level. + + The format of the message object to log. + The exception to log. + the list of format arguments + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + A callback used by the logger to obtain the message if log level is matched + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + A callback used by the logger to obtain the message if log level is matched + The exception to log, including its stack Fatal. + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + An that supplies culture-specific formatting information. + A callback used by the logger to obtain the message if log level is matched + + + + Log a message with the level using a callback to obtain the message + + + Using this method avoids the cost of creating a message and evaluating message arguments + that probably won't be logged due to loglevel settings. + + An that supplies culture-specific formatting information. + A callback used by the logger to obtain the message if log level is matched + The exception to log, including its stack Fatal. + + + + Checks if this logger is enabled for the level. + + + Override this in your derived class to comply with the underlying logging system + + + + + Checks if this logger is enabled for the level. + + + Override this in your derived class to comply with the underlying logging system + + + + + Checks if this logger is enabled for the level. + + + Override this in your derived class to comply with the underlying logging system + + + + + Checks if this logger is enabled for the level. + + + Override this in your derived class to comply with the underlying logging system + + + + + Checks if this logger is enabled for the level. + + + Override this in your derived class to comply with the underlying logging system + + + + + Checks if this logger is enabled for the level. + + + Override this in your derived class to comply with the underlying logging system + + + + + Represents a method responsible for writing a message to the log system. + + + + + This namespace contains convenience base classes for implementing your own s. + + + + + Abstract class providing a standard implementation of simple loggers. + + Erich Eichinger + + + + Creates and initializes a the simple logger. + + The name, usually type name of the calling class, of the logger. + The current logging threshold. Messages recieved that are beneath this threshold will not be logged. + Include level in the log message. + Include the current time in the log message. + Include the instance name in the log message. + The date and time format to use in the log message. + + + + Appends the formatted message to the specified . + + the that receíves the formatted message. + + + + + + + Determines if the given log level is currently enabled. + + + + + + + The name of the logger. + + + + + Include the current log level in the log message. + + + + + Include the current time in the log message. + + + + + Include the instance name in the log message. + + + + + The current logging threshold. Messages recieved that are beneath this threshold will not be logged. + + + + + The date and time format to use in the log message. + + + + + Determines Whether is set. + + + + + Returns if the current is greater than or + equal to . If it is, all messages will be sent to . + + + + + Returns if the current is greater than or + equal to . If it is, all messages will be sent to . + + + + + Returns if the current is greater than or + equal to . If it is, only messages with a of + , , , and + will be sent to . + + + + + Returns if the current is greater than or + equal to . If it is, only messages with a of + , , and + will be sent to . + + + + + Returns if the current is greater than or + equal to . If it is, only messages with a of + and will be sent to . + + + + + Returns if the current is greater than or + equal to . If it is, only messages with a of + will be sent to . + + + + + Base factory implementation for creating simple instances. + + Default settings are LogLevel.All, showDateTime = true, showLogName = true, and no DateTimeFormat. + The keys in the NameValueCollection to configure this adapter are the following + + level + showDateTime + showLogName + dateTimeFormat + + + + + Gilles Bayon + Mark Pollack + Erich Eichinger + + + + Initializes a new instance of the class. + + + Looks for level, showDateTime, showLogName, dateTimeFormat items from + for use when the GetLogger methods are called. + for more information on how to use the + standard .NET application configuraiton file (App.config/Web.config) + to configure this adapter. + + The name value collection, typically specified by the user in + a configuration section named common/logging. + + + + Create the specified logger instance + + + + + Derived factories need to implement this method to create the + actual logger instance. + + a new logger instance. Must never be null! + + + + The default to use when creating new instances. + + + + + The default setting to use when creating new instances. + + + + + The default setting to use when creating new instances. + + + + + The default setting to use when creating new instances. + + + + + The default setting to use when creating new instances. + + + + + A logger created by that + sends all log events to the owning adapter's + + Erich Eichinger + + + + The adapter that created this logger instance. + + + + + Allows to retrieve the last logged event instance captured by this logger + + + + + Create a new logger instance. + + + + + Create a new and send it to + + + + + + + + A logging event captured by + + Erich Eichinger + + + + The logger that logged this event + + + + + The level used to log this event + + + + + The raw message object + + + + + A logged exception + + + + + Create a new event instance + + + + + Retrieves the formatted message text + + + + + An adapter, who's loggers capture all log events and send them to . + Retrieve the list of log events from . + + + This logger factory is mainly for debugging and test purposes. + + This is an example how you might use this adapter for testing: + + // configure for capturing + CapturingLoggerFactoryAdapter adapter = new CapturingLoggerFactoryAdapter(); + LogManager.Adapter = adapter; + + // reset capture state + adapter.Clear(); + // log something + ILog log = LogManager.GetCurrentClassLogger(); + log.DebugFormat("Current Time:{0}", DateTime.Now); + + // check logged data + Assert.AreEqual(1, adapter.LoggerEvents.Count); + Assert.AreEqual(LogLevel.Debug, adapter.LastEvent.Level); + + + + Erich Eichinger + + + + Clears all captured events + + + + + Resets the to null. + + + + + Holds the list of logged events. + + + To access this collection in a multithreaded application, put a lock on the list instance. + + + + + instances send their captured log events to this method. + + + + + Get a instance for the given type. + + + + + Get a instance for the given name. + + + + + Holds the last log event received from any of this adapter's loggers. + + + + + A implementation sending all System.Diagnostics.Trace output to + the Common.Logging infrastructure. + + + This listener captures all output sent by calls to System.Diagnostics.Trace and + and and sends it to an instance.
+ The instance to be used is obtained by calling + . The name of the logger is created by passing + this listener's and any source or category passed + into this listener (see or for example). +
+ + The snippet below shows how to add and configure this listener to your app.config: + + <system.diagnostics> + <sharedListeners> + <add name="Diagnostics" + type="Common.Logging.Simple.CommonLoggingTraceListener, Common.Logging" + initializeData="DefaultTraceEventType=Information; LoggerNameFormat={listenerName}.{sourceName}"> + <filter type="System.Diagnostics.EventTypeFilter" initializeData="Information"/> + </add> + </sharedListeners> + <trace> + <listeners> + <add name="Diagnostics" /> + </listeners> + </trace> + </system.diagnostics> + + + Erich Eichinger +
+ + + Creates a new instance with the default name "Diagnostics" and "Trace". + + + + + Creates a new instance initialized with properties from the . string. + + + is a semicolon separated string of name/value pairs, where each pair has + the form key=value. E.g. + "Name=MyLoggerName;LogLevel=Debug" + + a semicolon separated list of name/value pairs. + + + + Creates a new instance initialized with the specified properties. + + name/value configuration properties. + + + + Logs the given message to the Common.Logging infrastructure. + + the eventType + the name or category name passed into e.g. . + the id of this event + the message format + the message arguments + + + + Writes message to logger provided by . + + + + + Writes message to logger provided by . + + + + + Writes message to logger provided by . + + + + + Writes message to logger provided by . + + + + + Writes message to logger provided by . + + + + + Writes message to logger provided by . + + + + + Writes message to logger provided by . + + + + + Writes message to logger provided by + + + + + Writes message to logger provided by + + + + + Writes message to logger provided by + + + + + Writes message to logger provided by + + + + + Writes message to logger provided by + + + + + Writes message to logger provided by + + + + + Sets the default to use for logging + all events emitted by .Write(...) and + .WriteLine(...) methods. + + + This listener captures all output sent by calls to and + sends it to an instance using the specified + on . + + + + + Format to use for creating the logger name. Defaults to "{listenerName}.{sourceName}". + + + Available placeholders are: + + {listenerName}: the configured name of this listener instance. + {sourceName}: the trace source name an event originates from (see e.g. . + + + + + + Sends log messages to . + + Gilles Bayon + + + + Creates and initializes a logger that writes messages to . + + The name, usually type name of the calling class, of the logger. + The current logging threshold. Messages recieved that are beneath this threshold will not be logged. + Include the current log level in the log message. + Include the current time in the log message. + Include the instance name in the log message. + The date and time format to use in the log message. + + + + Do the actual logging by constructing the log message using a then + sending the output to . + + The of the message. + The log message. + An optional associated with the message. + + + + Factory for creating instances that write data to . + + + + + Gilles Bayon + Mark Pollack + Erich Eichinger + + + + Initializes a new instance of the class using default + settings. + + + + + Initializes a new instance of the class. + + + Looks for level, showDateTime, showLogName, dateTimeFormat items from + for use when the GetLogger methods are called. + for more information on how to use the + standard .NET application configuraiton file (App.config/Web.config) + to configure this adapter. + + The name value collection, typically specified by the user in + a configuration section named common/logging. + + + + Creates a new instance. + + + + + This namespace contains out-of-the-box adapters to intrinsic systems, namely + and . + + + + + Silently ignores all log messages. + + Gilles Bayon + Erich Eichinger + + + + Ignores message. + + + + + + Ignores message. + + + + + + + Ignores message. + + The format of the message object to log. + + + + + Ignores message. + + The format of the message object to log. + The exception to log. + the list of message format arguments + + + + Ignores message. + + An that supplies culture-specific formatting information. + The format of the message object to log. + the list of message format arguments + + + + Ignores message. + + An that supplies culture-specific formatting information. + The format of the message object to log. + The exception to log. + the list of message format arguments + + + + Ignores message. + + A callback used by the logger to obtain the message if log level is matched + + + + Ignores message. + + A callback used by the logger to obtain the message if log level is matched + The exception to log, including its stack trace. + + + + Ignores message. + + An that supplies culture-specific formatting information. + A callback used by the logger to obtain the message if log level is matched + + + + Ignores message. + + An that supplies culture-specific formatting information. + A callback used by the logger to obtain the message if log level is matched + The exception to log, including its stack trace. + + + + Ignores message. + + + + + + Ignores message. + + + + + + + Ignores message. + + The format of the message object to log. + + + + + Ignores message. + + The format of the message object to log. + The exception to log. + the list of message format arguments + + + + Ignores message. + + An that supplies culture-specific formatting information. + The format of the message object to log. + the list of message format arguments + + + + Ignores message. + + An that supplies culture-specific formatting information. + The format of the message object to log. + The exception to log. + the list of message format arguments + + + + Ignores message. + + A callback used by the logger to obtain the message if log level is matched + + + + Ignores message. + + A callback used by the logger to obtain the message if log level is matched + The exception to log, including its stack Debug. + + + + Ignores message. + + An that supplies culture-specific formatting information. + A callback used by the logger to obtain the message if log level is matched + + + + Ignores message. + + An that supplies culture-specific formatting information. + A callback used by the logger to obtain the message if log level is matched + The exception to log, including its stack Debug. + + + + Ignores message. + + + + + + Ignores message. + + + + + + + Ignores message. + + The format of the message object to log. + + + + + Ignores message. + + The format of the message object to log. + The exception to log. + the list of message format arguments + + + + Ignores message. + + An that supplies culture-specific formatting information. + The format of the message object to log. + the list of message format arguments + + + + Ignores message. + + An that supplies culture-specific formatting information. + The format of the message object to log. + The exception to log. + the list of message format arguments + + + + Ignores message. + + A callback used by the logger to obtain the message if log level is matched + + + + Ignores message. + + A callback used by the logger to obtain the message if log level is matched + The exception to log, including its stack Info. + + + + Ignores message. + + An that supplies culture-specific formatting information. + A callback used by the logger to obtain the message if log level is matched + + + + Ignores message. + + An that supplies culture-specific formatting information. + A callback used by the logger to obtain the message if log level is matched + The exception to log, including its stack Info. + + + + Ignores message. + + + + + + Ignores message. + + + + + + + Ignores message. + + The format of the message object to log. + + + + + Ignores message. + + The format of the message object to log. + The exception to log. + the list of message format arguments + + + + Ignores message. + + An that supplies culture-specific formatting Warnrmation. + The format of the message object to log. + the list of message format arguments + + + + Ignores message. + + An that supplies culture-specific formatting Warnrmation. + The format of the message object to log. + The exception to log. + the list of message format arguments + + + + Ignores message. + + A callback used by the logger to obtain the message if log level is matched + + + + Ignores message. + + A callback used by the logger to obtain the message if log level is matched + The exception to log, including its stack Warn. + + + + Ignores message. + + An that supplies culture-specific formatting information. + A callback used by the logger to obtain the message if log level is matched + + + + Ignores message. + + An that supplies culture-specific formatting information. + A callback used by the logger to obtain the message if log level is matched + The exception to log, including its stack Warn. + + + + Ignores message. + + + + + + Ignores message. + + + + + + + Ignores message. + + The format of the message object to log. + + + + + Ignores message. + + The format of the message object to log. + The exception to log. + the list of message format arguments + + + + Ignores message. + + An that supplies culture-specific formatting Errorrmation. + The format of the message object to log. + the list of message format arguments + + + + Ignores message. + + An that supplies culture-specific formatting Errorrmation. + The format of the message object to log. + The exception to log. + the list of message format arguments + + + + Ignores message. + + A callback used by the logger to obtain the message if log level is matched + + + + Ignores message. + + A callback used by the logger to obtain the message if log level is matched + The exception to log, including its stack Error. + + + + Ignores message. + + An that supplies culture-specific formatting information. + A callback used by the logger to obtain the message if log level is matched + + + + Ignores message. + + An that supplies culture-specific formatting information. + A callback used by the logger to obtain the message if log level is matched + The exception to log, including its stack Error. + + + + Ignores message. + + + + + + Ignores message. + + + + + + + Ignores message. + + The format of the message object to log. + + + + + Ignores message. + + The format of the message object to log. + The exception to log. + the list of message format arguments + + + + Ignores message. + + An that supplies culture-specific formatting Fatalrmation. + The format of the message object to log. + the list of message format arguments + + + + Ignores message. + + An that supplies culture-specific formatting Fatalrmation. + The format of the message object to log. + The exception to log. + the list of message format arguments + + + + Ignores message. + + A callback used by the logger to obtain the message if log level is matched + + + + Ignores message. + + A callback used by the logger to obtain the message if log level is matched + The exception to log, including its stack Fatal. + + + + Ignores message. + + An that supplies culture-specific formatting information. + A callback used by the logger to obtain the message if log level is matched + + + + Ignores message. + + An that supplies culture-specific formatting information. + A callback used by the logger to obtain the message if log level is matched + The exception to log, including its stack Fatal. + + + + Always returns . + + + + + Always returns . + + + + + Always returns . + + + + + Always returns . + + + + + Always returns . + + + + + Always returns . + + + + + Factory for creating instances that silently ignores + logging requests. + + + + Gilles Bayon + + + + Constructor + + + + + Constructor + + + + + Get a ILog instance by type + + + + + + + Get a ILog instance by type name + + + + + + + Logger sending everything to the trace output stream using . + + + Beware not to use in combination with this logger as + this would result in an endless loop for obvious reasons! + + + + Gilles Bayon + Erich Eichinger + + + + Creates a new TraceLogger instance. + + whether to use or for logging. + the name of this logger + the default log level to use + Include the current log level in the log message. + Include the current time in the log message. + Include the instance name in the log message. + The date and time format to use in the log message. + + + + Determines if the given log level is currently enabled. + checks if is true. + + + + + Do the actual logging. + + + + + + + + Called after deserialization completed. + + + + + Used to defer message formatting until it is really needed. + + + This class also improves performance when multiple + s are configured. + + + + + Factory for creating instances that send + everything to the output stream. + + + Beware not to use in combination with this logger factory + as this would result in an endless loop for obvious reasons! + + + + + Gilles Bayon + Mark Pollack + Erich Eichinger + + + + Initializes a new instance of the class using default settings. + + + + + Initializes a new instance of the class. + + + Looks for level, showDateTime, showLogName, dateTimeFormat items from + for use when the GetLogger methods are called. + for more information on how to use the + standard .NET application configuraiton file (App.config/Web.config) + to configure this adapter. + + The name value collection, typically specified by the user in + a configuration section named common/logging. + + + + Creates a new instance. + + + + + Whether to use .TraceXXXX(string,object[]) methods for logging + or . + + + + + The exception that is thrown when a configuration system error has occurred with Common.Logging + + Mark Pollack + + + Creates a new instance of the ObjectsException class. + + + + Creates a new instance of the ConfigurationException class. with the specified message. + + + A message about the exception. + + + + + Creates a new instance of the ConfigurationException class with the specified message + and root cause. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ConfigurationException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Used in an application's configuration file (App.Config or Web.Config) to configure the logging subsystem. + + + An example configuration section that writes log messages to the Console using the + built-in Console Logger. + + <configuration> + <configSections> + <sectionGroup name="common"> + <section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" /> + </sectionGroup> + </configSections> + <common> + <logging> + <factoryAdapter type="Common.Logging.Simple.ConsoleOutLoggerFactoryAdapter, Common.Logging"> + <arg key="showLogName" value="true" /> + <arg key="showDataTime" value="true" /> + <arg key="level" value="ALL" /> + <arg key="dateTimeFormat" value="yyyy/MM/dd HH:mm:ss:fff" /> + </factoryAdapter> + </logging> + </common> + </configuration> + + + + + + Ensure static fields get initialized before any class member + can be accessed (avoids beforeFieldInit) + + + + + Constructor + + + + + Retrieves the of the logger the use by looking at the logFactoryAdapter element + of the logging configuration element. + + + + A object containing the specified type that implements + along with zero or more properties that will be + passed to the logger factory adapter's constructor as an . + + + + + Verifies that the logFactoryAdapter element appears once in the configuration section. + + settings of a parent section - atm this must always be null + Additional information about the configuration process. + The configuration section to apply an XPath query too. + + A object containing the specified logFactoryAdapter type + along with user supplied configuration properties. + + + + + Verifies that the logFactoryAdapter element appears once in the configuration section. + + The parent of the current item. + Additional information about the configuration process. + The configuration section to apply an XPath query too. + + A object containing the specified logFactoryAdapter type + along with user supplied configuration properties. + + + + + The type of method that is passed into e.g. + and allows the callback method to "submit" it's message to the underlying output system. + + the format argument as in + the argument list as in + + Erich Eichinger + + + + The 7 possible logging levels + + Gilles Bayon + + + + All logging levels + + + + + A trace logging level + + + + + A debug logging level + + + + + A info logging level + + + + + A warn logging level + + + + + An error logging level + + + + + A fatal logging level + + + + + Do not log anything. + + + + + Use the LogManager's or + methods to obtain instances for logging. + + + For configuring the underlying log system using application configuration, see the example + at . + For configuring programmatically, see the example section below. + + + The example below shows the typical use of LogManager to obtain a reference to a logger + and log an exception: + + + ILog log = LogManager.GetLogger(this.GetType()); + ... + try + { + /* .... */ + } + catch(Exception ex) + { + log.ErrorFormat("Hi {0}", ex, "dude"); + } + + + The example below shows programmatic configuration of the underlying log system: + + + // create properties + NameValueCollection properties = new NameValueCollection(); + properties["showDateTime"] = "true"; + + // set Adapter + Common.Logging.LogManager.Adapter = new + Common.Logging.Simple.ConsoleOutLoggerFactoryAdapter(properties); + + + + + + + + Gilles Bayon + + + + The name of the default configuration section to read settings from. + + + You can always change the source of your configuration settings by setting another instance + on . + + + + + Performs static 1-time init of LogManager by calling + + + + + Reset the infrastructure to its default settings. This means, that configuration settings + will be re-read from section <common/logging> of your app.config. + + + This is mainly used for unit testing, you wouldn't normally use this in your applications.
+ Note: instances already handed out from this LogManager are not(!) affected. + Resetting LogManager only affects new instances being handed out. +
+
+ + + Reset the infrastructure to its default settings. This means, that configuration settings + will be re-read from section <common/logging> of your app.config. + + + This is mainly used for unit testing, you wouldn't normally use this in your applications.
+ Note: instances already handed out from this LogManager are not(!) affected. + Resetting LogManager only affects new instances being handed out. +
+ + the instance to obtain settings for + re-initializing the LogManager. + +
+ + + Gets the logger by calling + on the currently configured using the type of the calling class. + + + This method needs to inspect the in order to determine the calling + class. This of course comes with a performance penalty, thus you shouldn't call it too + often in your application. + + + the logger instance obtained from the current + + + + Gets the logger by calling + on the currently configured using the specified type. + + the logger instance obtained from the current + + + + Gets the logger by calling + on the currently configured using the specified type. + + The type. + the logger instance obtained from the current + + + + Gets the logger by calling + on the currently configured using the specified name. + + The name. + the logger instance obtained from the current + + + + Builds the logger factory adapter. + + a factory adapter instance. Is never null. + + + + Builds a instance from the given + using . + + + the instance. Is never null + + + + Gets the configuration reader used to initialize the LogManager. + + Primarily used for testing purposes but maybe useful to obtain configuration + information from some place other than the .NET application configuration file. + The configuration reader. + + + + Gets or sets the adapter. + + The adapter. + + + + This namespace contains all core classes making up the Common.Logging framework. + + + + + This assembly contains the core functionality of the Common.Logging framework. + In particular, checkout and for usage information. + + + + + Indicates classes or members to be ignored by NCover + + + Note, the name is chosen, because TestDriven.NET uses it as //ea argument to "Test With... Coverage" + + Erich Eichinger + + + +

Overview

+ + There are a variety of logging implementations for .NET currently in use, log4net, Enterprise + Library Logging, NLog, to name the most popular. The downside of having differerent implementation + is that they do not share a common interface and therefore impose a particular logging + implementation on the users of your library. To solve this dependency problem the Common.Logging + library introduces a simple abstraction to allow you to select a specific logging implementation at + runtime. + + + The library is based on work done by the developers of IBatis.NET and it's usage is inspired by + log4net. Many thanks to the developers of those projects! + +

Usage

+ + The core logging library Common.Logging provides the base logging interface as + well as the global that you use to instrument your code: + + + ILog log = LogManager.GetLogger(this.GetType()); + + log.DebugFormat("Hi {0}", "dude"); + + + To output the information logged, you need to tell Common.Logging, what underlying logging system + to use. Common.Logging already includes simple console and trace based logger implementations + usable out of the box. Adding the following configuration snippet to your app.config causes + Common.Logging to output all information to the console: + + + <configuration> + <configSections> + <sectionGroup name="common"> + <section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" /> + </sectionGroup> + </configSections> + + <common> + <logging> + <factoryAdapter type="Common.Logging.Simple.ConsoleOutLoggerFactoryAdapter, Common.Logging"> + <arg key="level" value="DEBUG" /> + </factoryAdapter> + </logging> + </common> + </configuration> + +

Customizing

+ + In the case you want to integrate your own logging system that is not supported by Common.Logging yet, it is easily + possible to implement your own plugin by implementing . + For convenience there is a base implementation available that usually + makes implementing your own adapter a breeze. + +

<system.diagnostics> Integration

+ + If your code already uses the .NET framework's built-in System.Diagnostics.Trace + system, you can use to redirect all trace output to the + Common.Logging infrastructure. + +
+
+
+
diff --git a/lib/FluentNHibernate/FluentNHibernate.XML b/lib/FluentNHibernate/FluentNHibernate.XML index 5d38b5d8cd5..79560789b0a 100644 --- a/lib/FluentNHibernate/FluentNHibernate.XML +++ b/lib/FluentNHibernate/FluentNHibernate.XML @@ -1,5485 +1,5485 @@ - - - - FluentNHibernate - - - - - Built-in alteration for altering an AutoPersistenceModel with instance of IAutoMappingOverride<T>. - - - - - Provides a mechanism for altering an AutoPersistenceModel prior to - the generation of mappings. - - - - - Alter the model - - AutoPersistenceModel instance to alter - - - - Constructor for AutoMappingOverrideAlteration. - - Assembly to load overrides from. - - - - Alter the model - - - Finds all types in the assembly (passed in the constructor) that implement IAutoMappingOverride<T>, then - creates an AutoMapping<T> and applies the override to it. - - AutoPersistenceModel instance to alter - - - - A mapping override for an auto mapped entity. - - Entity who's auto-mapping you're overriding - - - - Alter the automapping for this type - - Automapping - - - - Facade over an assembly for retrieving type instances. - - - - - A source for Type instances, acts as a facade for an Assembly or as an alternative Type provider. - - - - - Defines a property to be used as a key for this composite-id. - - A member access lambda expression for the property - The composite identity part fluent interface - - - - Defines a property to be used as a key for this composite-id with an explicit column name. - - A member access lambda expression for the property - The column name in the database to use for this key, or null to use the property name - The composite identity part fluent interface - - - - Defines a property to be used as a key for this composite-id with an explicit column name. - - A member access lambda expression for the property - Additional settings for the key property - The composite identity part fluent interface - - - - Defines a reference to be used as a many-to-one key for this composite-id with an explicit column name. - - A member access lambda expression for the property - The composite identity part fluent interface - - - - Defines a reference to be used as a many-to-one key for this composite-id with an explicit column name. - - A member access lambda expression for the property - A list of column names used for this key - The composite identity part fluent interface - - - - Defines a reference to be used as a many-to-one key for this composite-id with an explicit column name. - - A member access lambda expression for the property - A lambda expression specifying additional settings for the key reference - A list of column names used for this key - The composite identity part fluent interface - - - - Specifies that this composite id is "mapped"; aka, a composite id where - the properties exist in the identity class as well as in the entity itself - - - - - Specifies the unsaved value for the identity - - Unsaved value - - - - You may use a component as an identifier of an entity class. Your component class must - satisfy certain requirements: - - * It must be Serializable. - * It must re-implement Equals() and GetHashCode(), consistently with the database's - notion of composite key equality. - - You can't use an IIdentifierGenerator to generate composite keys. Instead the application - must assign its own identifiers. Since a composite identifier must be assigned to the object - before saving it, we can't use unsaved-value of the identifier to distinguish between newly - instantiated instances and instances saved in a previous session. You may instead implement - IInterceptor.IsUnsaved() if you wish to use SaveOrUpdate() or cascading save / update. As an - alternative, you may also set the unsaved-value attribute on a version or timestamp to specify - a value that indicates a new transient instance. In this case, the version of the entity is - used instead of the (assigned) identifier and you don't have to implement - IInterceptor.IsUnsaved() yourself. - - The property of component type that holds the composite identifier. - - Your persistent class must override Equals() and GetHashCode() to implement composite identifier - equality. It must also be Serializable. - - - - - Set the access and naming strategy for this identity. - - - - - Invert the next boolean operation - - - - - Create a property mapping. - - Property to map - - Map(x => x.Name); - - - - - Create a property mapping. - - Property to map - Property column name - - Map(x => x.Name, "person_name"); - - - - - Create a reference to another entity. In database terms, this is a many-to-one - relationship. - - Other entity - Property on the current entity - - References(x => x.Company); - - - - - Create a reference to another entity. In database terms, this is a many-to-one - relationship. - - Other entity - Property on the current entity - Column name - - References(x => x.Company, "company_id"); - - - - - Create a reference to another entity. In database terms, this is a many-to-one - relationship. - - Other entity - Property on the current entity - - References(x => x.Company, "company_id"); - - - - - Create a reference to another entity. In database terms, this is a many-to-one - relationship. - - Other entity - Property on the current entity - Column name - - References(x => x.Company, "company_id"); - - - - - Create a reference to any other entity. This is an "any" polymorphic relationship. - - Other entity to reference - Property - - - - Create a reference to another entity based exclusively on the primary-key values. - This is sometimes called a one-to-one relationship, in database terms. Generally - you should use - whenever possible. - - Other entity - Property - - HasOne(x => x.ExtendedInfo); - - - - - Create a reference to another entity based exclusively on the primary-key values. - This is sometimes called a one-to-one relationship, in database terms. Generally - you should use - whenever possible. - - Other entity - Property - - HasOne(x => x.ExtendedInfo); - - - - - Create a dynamic component mapping. This is a dictionary that represents - a limited number of columns in the database. - - Property containing component - Component setup action - - DynamicComponent(x => x.Data, comp => - { - comp.Map(x => (int)x["age"]); - }); - - - - - Creates a component reference. This is a place-holder for a component that is defined externally with a - ; the mapping defined in said will be merged - with any options you specify from this call. - - Component type - Property exposing the component - Component reference builder - - - - Maps a component - - Type of component - Component property - Component mapping - - Component(x => x.Address, comp => - { - comp.Map(x => x.Street); - comp.Map(x => x.City); - }); - - - - - Maps a component - - Type of component - Component property - Component mapping - - Component(x => x.Address, comp => - { - comp.Map(x => x.Street); - comp.Map(x => x.City); - }); - - - - - Maps a collection of entities as a one-to-many - - Child entity type - Collection property - - HasMany(x => x.Locations); - - - - - Maps a collection of entities as a one-to-many - - Child entity type - Collection property - - HasMany(x => x.Locations); - - - - - Maps a collection of entities as a many-to-many - - Child entity type - Collection property - - HasManyToMany(x => x.Locations); - - - - - Maps a collection of entities as a many-to-many - - Child entity type - Collection property - - HasManyToMany(x => x.Locations); - - - - - Specify an insert stored procedure - - Stored procedure call - - - - Specify an update stored procedure - - Stored procedure call - - - - Specify an delete stored procedure - - Stored procedure call - - - - Specify an delete all stored procedure - - Stored procedure call - - - - Specifies an entity-name. - - See http://nhforge.org/blogs/nhibernate/archive/2008/10/21/entity-name-in-action-a-strongly-typed-entity.aspx - - - - Inverts the next boolean - - - - - Maps to the Join element in NH 2.0 - - - - - - Specify the key column name - - Column name - - - - Specify the schema - - Schema name - - - - Inverse the ownership of this relationship - - - - - Specify this relationship as optional - - - - - Specify the catalog - - Catalog - - - - Specify a subselect for fetching this join - - Query - - - - Specify the table name - - Table name - - - - Specify the fetching strategy - - - - - Invert the next boolean operation - - - - - Starting point for automapping your entities. - - - - - Automatically map classes in the assembly that contains . - - Class in the assembly you want to map - - - - Automatically map classes in the assembly that contains . - - Class in the assembly you want to map - Automapping configuration - - - - Automatically map the classes in . - - Assembly containing the classes to map - - - - Automatically map the classes in . - - Assembly containing the classes to map - Automapping configuration - - - - Automatically map the classes in each assembly supplied. - - Assemblies containing classes to map - - - - Automatically map the classes in each assembly supplied. - - Automapping configuration - Assemblies containing classes to map - - - - Automatically map the classes in each assembly supplied. - - Automapping configuration - Assemblies containing classes to map - - - - Automatically map the classes exposed through the supplied . - - containing classes to map - - - - Automatically map the classes exposed through the supplied . - - containing classes to map - Automapping configuration - - - - Automatically map the classes exposed through the supplied . - - containing classes to map - Criteria for selecting a subset of the types in the assembly for mapping - - - - Automatically map the classes in . - - Assembly containing the classes to map - Criteria for selecting a subset of the types in the assembly for mapping - - - - Automatically map classes in the assembly that contains . - - Class in the assembly you want to map - Criteria for selecting a subset of the types in the assembly for mapping - - - - Defines a mapping for an entity. Derive from this class to create a mapping, - and use the constructor to control how your entity is persisted. - - - public class PersonMap : ClassMap<Person> - { - public PersonMap() - { - Id(x => x.PersonId); - Map(x => x.Name); - Map(x => x.Age); - } - } - - Entity type to map - - - - Specify the identifier for this entity. - - Identity property - - Id(x => x.PersonId); - - - - - Specify the identifier for this entity. - - Identity property - Column name - - Id(x => x.PersonId, "id"); - - - - - Create an Id that doesn't have a corresponding property in - the domain object, or a column in the database. This is mainly - for use with read-only access and/or views. Defaults to an int - identity with an "increment" generator. - - - - - Create an Id that doesn't have a corresponding property in - the domain object, or a column in the database. This is mainly - for use with read-only access and/or views. - - Type of the id - - - - Create an Id that doesn't have a corresponding property in - the domain object. - - Type of the id - Name and column name of the id - - - - Create a natural identity. This is a secondary identifier - that has "business meaning" moreso than the primary key. - - - NaturalId() - .Property(x => x.Name); - - - - - Create a composite identity. This is an identity composed of multiple - columns. - Note: Prefer using a surrogate key over a composite key whenever possible. - - - CompositeId() - .KeyProperty(x => x.FirstName) - .KeyProperty(x => x.LastName); - - - - - Create a composite identity represented by an identity class. This is an - identity composed of multiple columns. - Note: Prefer using a surrogate key over a composite key whenever possible. - - Composite id property - - CompositeId(x => x.Id) - .KeyProperty(x => x.FirstName) - .KeyProperty(x => x.LastName); - - - - - Specifies that this class should be versioned/timestamped using the - given property. - - Version/timestamp property - - Version(x => x.Timestamp); - - - - - Specify that this entity should use a discriminator with it's subclasses. - This is a mapping strategy called table-per-inheritance-hierarchy; where all - subclasses are stored in the same table, differenciated by a discriminator - column value. - - Type of the discriminator column - Discriminator column name - Default discriminator value - - - - Specify that this entity should use a discriminator with it's subclasses. - This is a mapping strategy called table-per-inheritance-hierarchy; where all - subclasses are stored in the same table, differenciated by a discriminator - column value. - - Type of the discriminator column - Discriminator column name - - - - Specify that this entity should use a discriminator with it's subclasses. - This is a mapping strategy called table-per-inheritance-hierarchy; where all - subclasses are stored in the same table, differenciated by a discriminator - column value. - - Discriminator column name - - - - Specifies that any subclasses of this entity should be treated as union-subclass - mappings. Don't use this in combination with a discriminator, as they are mutually - exclusive. - - - - - Sets the schema for this class. - - Schema name - - - - Sets the table for the class. - - Table name - - - - Sets this entity to be lazy-loaded (overrides the default lazy load configuration). - - - - - Links this entity to another table, to create a composite entity from two or - more tables. - - Joined table name - Joined table mapping - - Join("another_table", join => - { - join.Map(x => x.Name); - join.Map(x => x.Age); - }); - - - - - Imports an existing type for use in the mapping. - - Type to import. - - - - Set the mutability of this class, sets the mutable attribute. - - - - - Sets this entity to be dynamic update - - - - - Sets this entity to be dynamic insert - - - - - Sets the query batch size for this entity. - - Batch size - - - - Specifies a check constraint - - Constraint name - - - - Specifies a persister to be used with this entity - - Persister type - - - - Specifies a persister to be used with this entity - - Persister type - - - - Specifies a persister to be used with this entity - - Persister type - - - - Specifies a proxy class for this entity. - - Proxy type - - - - Specifies a proxy class for this entity. - - Proxy type - - - - Specifies a proxy class for this entity. - - Proxy type - - - - Specifies that a select should be performed before updating - this entity - - - - - Defines a SQL 'where' clause used when retrieving objects of this type. - - - - - Sets the SQL statement used in subselect fetching. - - Subselect SQL Query - - - - Specifies an entity-name. - - See http://nhforge.org/blogs/nhibernate/archive/2008/10/21/entity-name-in-action-a-strongly-typed-entity.aspx - - - - Applies a filter to this entity given it's name. - - - Applies a filter to this entity given it's name. - - The filter's name - The condition to apply - - - - Applies a filter to this entity given it's name. - - - Applies a filter to this entity given it's name. - - The filter's name - - - - Applies a named filter to this entity. - - - Applies a named filter to this entity. - - The condition to apply - - The type of a implementation - defining the filter to apply. - - - - - Applies a named filter to this one-to-many. - - - The type of a implementation - defining the filter to apply. - - - - - Configures the tuplizer for this entity. The tuplizer defines how to transform - a Property-Value to its persistent representation, and viceversa a Column-Value - to its in-memory representation, and the EntityMode defines which tuplizer is in use. - - Tuplizer entity-mode - Tuplizer type - - - - Specify the caching for this entity. - - - Cache.ReadWrite(); - - - - - Specify settings for the container/hibernate-mapping for this class. - Note: Avoid using this, if possible prefer using conventions. - - - HibernateMapping.Schema("dto"); - - - - - Inverts the next boolean option - - - - - Sets the optimistic locking strategy - - - - - Sets the polymorphism behaviour - - - - - Sets the schema action behaviour - - - - - Flags a type as already mapped, stop it from being auto-mapped. - - - - - Creates an instance of an IAutoMappingAlteration from a type instance, then adds it to the alterations collection. - - Type of an IAutoMappingAlteration - - - - Creates an instance of an IAutoMappingAlteration from a generic type parameter, then adds it to the alterations collection. - - Type of an IAutoMappingAlteration - Container - - - - Adds an alteration - - Alteration to add - Container - - - - Adds all alterations from an assembly - - Assembly to search - Container - - - - Adds all alterations from an assembly that contains T. - - Type who's assembly to search - Container - - - - Apply alterations to an AutoPersisteceModel - - AutoPersistenceModel instance to apply alterations to - - - - Determines whether a member is to be automapped. - - - - - Determines whether a member is the identity of an entity. - - - - - Determines whether an abstract class is a layer supertype or part of a mapped inheritance hierarchy. - - - - - Specifies the value column used in a table of simple types. - - - - - Implement this interface to control how the automapper behaves. - Typically you're better off deriving from the - class, which is pre-configured with the default settings; you can then - just override specific methods that you'd like to alter. - - - - - Determines whether a type should be auto-mapped. - Override to restrict which types are mapped in your domain. - - - You normally want to override this method and restrict via something known, like - Namespace. - - - return type.Namespace.EndsWith("Domain"); - - Type to map - Should map type - - - - Determines whether a member of a type should be auto-mapped. - Override to restrict which members are considered in automapping. - - - You normally want to override this method to restrict which members will be - used for mapping. This method will be called for every property, field, and method - on your types. - - - // all writable public properties: - return member.IsProperty && member.IsPublic && member.CanWrite; - - Member to map - Should map member - - - - Determines whether a member is the id of an entity. - - - This method is called for each member that ShouldMap(Type) returns true for. - - Member - Member is id - - - - Gets the access strategy to be used for a read-only property. This method is - called for every setterless property and private-setter autoproperty in your - domain that has been accepted through . - - Member to get access strategy for - Access strategy - - - - Controls which side of a many-to-many relationship is considered the "parent". - - Left side of the relationship - Right side of the relationship - left or right - - - - Determines whether a type is a concrete, or instantiatable, base class. This - affects how the inheritance mappings are built, specifically that any types - this method returns true for will not be mapped as a subclass. - - Type - Base type is concrete? - - - - Specifies that a particular type should be mapped as a component rather than - an entity. - - Type - Type is a component? - - - - Gets the column prefix for a component. - - Member defining the component - Component column prefix - - - - Specifies whether a particular type is mapped with a discriminator. - This method will be called for every type that has already been - approved by . - - Type to check - Whether the type is to be discriminated - - - - Gets the column name of the discriminator. - - Type - Discriminator column name - - - - Specifies whether an abstract type is considered a Layer Supertype - (http://martinfowler.com/eaaCatalog/layerSupertype.html). Defaults to - true for all abstract classes. Override this method if you have an - abstract class that you want mapping as a regular entity. - - Abstract class type - Whether the type is a Layer Supertype - - - - Gets the value column for a collection of simple types. - - - This is the name of the <element> column. - - Collection property - Value column name - - - - Gets the steps that are executed to map a type. - - Collection of mapping steps - - - - Gets or sets whether validation of mappings is performed. - - - - - Specify alterations to be used with this AutoPersisteceModel - - Lambda to declare alterations - AutoPersistenceModel - - - - Use auto mapping overrides defined in the assembly of T. - - Type to get assembly from - AutoPersistenceModel - - - - Use auto mapping overrides defined in the assembly of T. - - Assembly to scan - AutoPersistenceModel - - - - Alter some of the configuration options that control how the automapper works. - Depreciated in favour of supplying your own IAutomappingConfiguration instance to AutoMap: . - Cannot be used in combination with a user-defined configuration. - - - - - Supply a criteria for which types will be mapped. - Cannot be used in combination with a user-defined configuration. - - Where clause - - - - Adds all entities from a specific assembly. - - Assembly to load from - - - - Adds all entities from the . - - to load from - - - - Override the mapping of a specific entity. - - This may affect subclasses, depending on the alterations you do. - Entity who's mapping to override - Lambda performing alterations - - - - Override all mappings. - - Currently only supports ignoring properties on all entities. - Lambda performing alterations - - - - Ignore a base type. This removes it from any mapped inheritance hierarchies, good for non-abstract layer - supertypes. - - Type to ignore - - - - Ignore a base type. This removes it from any mapped inheritance hierarchies, good for non-abstract layer - supertypes. - - Type to ignore - - - - Explicitly includes a type to be used as part of a mapped inheritance hierarchy. - - - Abstract classes are probably what you'll be using this method with. Fluent NHibernate considers abstract - classes to be layer supertypes, so doesn't automatically map them as part of an inheritance hierarchy. You - can use this method to override that behavior for a specific type; otherwise you should consider using the - setting. - - Type to include - - - - Explicitly includes a type to be used as part of a mapped inheritance hierarchy. - - - Abstract classes are probably what you'll be using this method with. Fluent NHibernate considers abstract - classes to be layer supertypes, so doesn't automatically map them as part of an inheritance hierarchy. You - can use this method to override that behavior for a specific type; otherwise you should consider using the - setting. - - Type to include - - - - Alter convention discovery - - - - - Sets whether this subclass is lazy loaded - - - - - - Specifies an entity-name. - - See http://nhforge.org/blogs/nhibernate/archive/2008/10/21/entity-name-in-action-a-strongly-typed-entity.aspx - - - - Inverts the next boolean - - - - - Provides types for mapping from multiple assemblies - - - - - Represents a string identifier for the model instance, used in conventions for a lazy - shortcut. - - e.g. for a ColumnMapping the StringIdentifierForModel would be the Name attribute, - this allows the user to find any columns with the matching name. - - - - - Sets the database dialect. This shouldn't be necessary - if you've used one of the provided database configurations. - - Configuration builder - - - - Sets the database dialect. This shouldn't be necessary - if you've used one of the provided database configurations. - - Configuration builder - - - - Sets the default database schema - - Default schema name - Configuration builder - - - - Enables the outer-join option. - - Configuration builder - - - - Sets the max fetch depth. - - Max fetch depth - Configuration builder - - - - Enables the reflection optimizer. - - Configuration builder - - - - Sets any query stubstitutions that NHibernate should - perform. - - Substitutions - Configuration builder - - - - Enables the show SQL option. - - Configuration builder - - - - Enables the format SQL option. - - Configuration builder - - - - Sets the database provider. This shouldn't be necessary - if you're using one of the provided database configurations. - - Provider type - Configuration builder - - - - Sets the database provider. This shouldn't be necessary - if you're using one of the provided database configurations. - - Provider type - Configuration builder - - - - Specify the database driver. This isn't necessary - if you're using one of the provided database configurations. - - Driver type - Configuration builder - - - - Specify the database driver. This isn't necessary - if you're using one of the provided database configurations. - - Driver type - Configuration builder - - - - Configure the connection string - - - ConnectionString(x => - { - x.Server("db_server"); - x.Database("Products"); - }); - - Closure for building the connection string - Configuration builder - - - - Set the connection string. - - Connection string to use - Configuration builder - - - - Configure caching. - - - Cache(x => - { - x.UseQueryCache(); - x.UseMinimalPuts(); - }); - - Closure for configuring caching - Configuration builder - - - - Sets a raw property on the NHibernate configuration. Use this method - if there isn't a specific option available in the API. - - Setting key - Setting value - Configuration builder - - - - Sets the proxyfactory.factory_class property. - NOTE: NHibernate 2.1 only - - factory class - Configuration - - - - Sets the proxyfactory.factory_class property. - NOTE: NHibernate 2.1 only - - factory class - Configuration - - - - Sets the proxyfactory.factory_class property. - NOTE: NHibernate 2.1 only - - factory class - Configuration - - - - Sets the adonet.batch_size property. - - Batch size - Configuration - - - - Sets the current_session_context_class property. - - current session context class - Configuration - - - - Sets the current_session_context_class property. - - Implementation of ICurrentSessionContext to use - Configuration - - - - Sets the connection isolation level. NHibernate setting: connection.isolation - - Isolation level - Configuration builder - - - - Sets the connection isolation level. NHibernate setting: connection.isolation - - Isolation level - Configuration builder - - - - Negates the next boolean option. - - - - - Base class for attribute based conventions. Create a subclass of this to supply your own - attribute based conventions. - - Attribute identifier - - - - Basic convention interface. Don't use directly. - - Inspector instance for use in retrieving values and setting expectations - Apply instance - - - - Ignore - this is used for generic restrictions only - - - - - Apply changes to the target - - - - - Whether this convention will be applied to the target. - - Instace that could be supplied - Apply on this target? - - - - Apply changes to a property with an attribute matching T. - - Instance of attribute found on property. - Property with attribute - - - - Convention for identities, implement this interface to apply changes to - identity mappings. - - - - - Version convention, implement this interface to apply changes to vesion mappings. - - - - - Property convention, implement this interface to apply changes to - property mappings. - - - - - Convention for a component mapping. Implement this interface to - apply changes to components. - - - - - Convention for dynamic components. Implement this member to apply changes - to dynamic components. - - - - - Reference convention, implement this interface to apply changes to Reference/many-to-one - relationships. - - - - - HasOne convention, used for applying changes to one-to-one relationships. - - - - - Convention for the hibernate-mapping container for a class, this can be used to - set some class-wide settings such as lazy-load and access strategies. - - - - - Joined subclass convention, implement this interface to alter joined-subclass mappings. - - - - - Join convention, implement this interface to alter join mappings. - - - - - Convention for a single class mapping. Implement this interface to apply - changes to class mappings. - - - - - Subclass convention, implement this interface to alter subclass mappings. - - - - - Apply changes to the target - - - - - Apply changes to the target - - - - - Apply changes to the target - - - - - Apply changes to the target - - - - - Apply changes to the target - - - - - Represents a string identifier for the model instance, used in conventions for a lazy - shortcut. - - e.g. for a ColumnMapping the StringIdentifierForModel would be the Name attribute, - this allows the user to find any columns with the matching name. - - - - - Gets the requested value off the first column, as all columns are (currently) created equal - - - - - - - generates identifiers of any integral type that are unique only when no other - process is inserting data into the same table. Do not use in a cluster. - - - - - - generates identifiers of any integral type that are unique only when no other - process is inserting data into the same table. Do not use in a cluster. - - Params configuration - - - - supports identity columns in DB2, MySQL, MS SQL Server and Sybase. - The identifier returned by the database is converted to the property type using - Convert.ChangeType. Any integral property type is thus supported. - - - - - - supports identity columns in DB2, MySQL, MS SQL Server and Sybase. - The identifier returned by the database is converted to the property type using - Convert.ChangeType. Any integral property type is thus supported. - - Params configuration - - - - uses a sequence in DB2, PostgreSQL, Oracle or a generator in Firebird. - The identifier returned by the database is converted to the property type - using Convert.ChangeType. Any integral property type is thus supported. - - - - - - - uses a sequence in DB2, PostgreSQL, Oracle or a generator in Firebird. - The identifier returned by the database is converted to the property type - using Convert.ChangeType. Any integral property type is thus supported. - - - Params configuration - - - - uses a hi/lo algorithm to efficiently generate identifiers of any integral type, - given a table and column (by default hibernate_unique_key and next_hi respectively) - as a source of hi values. The hi/lo algorithm generates identifiers that are unique - only for a particular database. Do not use this generator with a user-supplied connection. - requires a "special" database table to hold the next available "hi" value - - The table. - The column. - The max lo. - The where. - - - - uses a hi/lo algorithm to efficiently generate identifiers of any integral type, - given a table and column (by default hibernate_unique_key and next_hi respectively) - as a source of hi values. The hi/lo algorithm generates identifiers that are unique - only for a particular database. Do not use this generator with a user-supplied connection. - requires a "special" database table to hold the next available "hi" value - - - - - - - - - uses a hi/lo algorithm to efficiently generate identifiers of any integral type, - given a table and column (by default hibernate_unique_key and next_hi respectively) - as a source of hi values. The hi/lo algorithm generates identifiers that are unique - only for a particular database. Do not use this generator with a user-supplied connection. - requires a "special" database table to hold the next available "hi" value - - - - - Params configuration - - - - uses a hi/lo algorithm to efficiently generate identifiers of any integral type, - given a table and column (by default hibernate_unique_key and next_hi respectively) - as a source of hi values. The hi/lo algorithm generates identifiers that are unique - only for a particular database. Do not use this generator with a user-supplied connection. - requires a "special" database table to hold the next available "hi" value - - - - - - - uses a hi/lo algorithm to efficiently generate identifiers of any integral type, - given a table and column (by default hibernate_unique_key and next_hi respectively) - as a source of hi values. The hi/lo algorithm generates identifiers that are unique - only for a particular database. Do not use this generator with a user-supplied connection. - requires a "special" database table to hold the next available "hi" value - - - Params configuration - - - - uses an Oracle-style sequence (where supported) - - - - - - - - uses an Oracle-style sequence (where supported) - - - - Params configuration - - - - uses System.Guid and its ToString(string format) method to generate identifiers - of type string. The length of the string returned depends on the configured format. - - http://msdn.microsoft.com/en-us/library/97af8hh4.aspx - - - - - uses System.Guid and its ToString(string format) method to generate identifiers - of type string. The length of the string returned depends on the configured format. - - http://msdn.microsoft.com/en-us/library/97af8hh4.aspx - Params configuration - - - - uses a new System.Guid to create a byte[] that is converted to a string. - - - - - - uses a new System.Guid to create a byte[] that is converted to a string. - - Params configuration - - - - uses a new System.Guid as the identifier. - - - - - - uses a new System.Guid as the identifier. - - Params configuration - - - - Recommended for Guid identifiers! - uses the algorithm to generate a new System.Guid described by Jimmy Nilsson - in the article http://www.informit.com/articles/article.asp?p=25862. - - - - - - Recommended for Guid identifiers! - uses the algorithm to generate a new System.Guid described by Jimmy Nilsson - in the article http://www.informit.com/articles/article.asp?p=25862. - - Params configuration - - - - Generator that uses the RDBMS native function to generate a GUID. - The behavior is similar to the “sequence” generator. When a new - object is saved NH run two queries: the first to retrieve the GUID - value and the second to insert the entity using the Guid retrieved - from the RDBMS. Your entity Id must be System.Guid and the SQLType - will depend on the dialect (RAW(16) in Oracle, UniqueIdentifier in - MsSQL for example). - - - - - Generator that uses the RDBMS native function to generate a GUID. - The behavior is similar to the “sequence” generator. When a new - object is saved NH run two queries: the first to retrieve the GUID - value and the second to insert the entity using the Guid retrieved - from the RDBMS. Your entity Id must be System.Guid and the SQLType - will depend on the dialect (RAW(16) in Oracle, UniqueIdentifier in - MsSQL for example). - - - GuidNative(x => - { - x.AddParam("key", "value"); - }); - - Parameter builder closure - - - - A deviation of the trigger-identity. This generator works - together with the feature. - The difference with trigger-identity is that the POID value - is retrieved by a SELECT using the natural-id fields as filter. - - - - - A deviation of the trigger-identity. This generator works - together with the feature. - The difference with trigger-identity is that the POID value - is retrieved by a SELECT using the natural-id fields as filter. - - - Select(x => - { - x.AddParam("key", "value"); - }); - - Parameter builder closure - - - - Based on sequence but works like an identity. The POID - value is retrieved with an INSERT query. Your entity Id must - be an integral type. - "hibernate_sequence" is the default name for the sequence, unless - another is provided. - - - - - Based on sequence but works like an identity. The POID - value is retrieved with an INSERT query. Your entity Id must - be an integral type. - "hibernate_sequence" is the default name for the sequence, unless - another is provided. - - Custom sequence name - - - - Based on sequence but works like an identity. The POID - value is retrieved with an INSERT query. Your entity Id must - be an integral type. - "hibernate_sequence" is the default name for the sequence, unless - another is provided. - - Parameter builder closure - - - - Based on sequence but works like an identity. The POID - value is retrieved with an INSERT query. Your entity Id must - be an integral type. - "hibernate_sequence" is the default name for the sequence, unless - another is provided. - - Custom sequence name - Parameter builder closure - - - - trigger-identity is a NHibernate specific feature where the POID - is generated by the RDBMS with an INSERT query through a - BEFORE INSERT trigger. In this case you can use any supported type, - including a custom type, with the limitation of a single column usage. - - - - - trigger-identity is a NHibernate specific feature where the POID - is generated by the RDBMS with an INSERT query through a - BEFORE INSERT trigger. In this case you can use any supported type, - including a custom type, with the limitation of a single column usage. - - Parameter builder closure - - - - lets the application to assign an identifier to the object before Save() is called. - - - - - - lets the application to assign an identifier to the object before Save() is called. - - Params configuration - - - - picks identity, sequence or hilo depending upon the capabilities of the underlying database. - - - - - - picks identity, sequence or hilo depending upon the capabilities of the underlying database. - - Params configuration - - - - picks identity, sequence or hilo depending upon the capabilities of the underlying database. - - - - - picks identity, sequence or hilo depending upon the capabilities of the underlying database. - - - - - uses the identifier of another associated object. Usually used in conjunction with a one-to-one primary key association. - - - - - - - uses the identifier of another associated object. Usually used in conjunction with a one-to-one primary key association. - - - Params configuration - - - - Specify the lazy behaviour of this relationship. - - - Defaults to Proxy lazy-loading. Use the modifier to disable - lazy-loading, and use the - overload to specify alternative lazy strategies. - - - LazyLoad(); - Not.LazyLoad(); - - - - - Specify the lazy behaviour of this relationship. Cannot be used - with the modifier. - - Laziness strategy - - LazyLoad(Laziness.NoProxy); - - - - - Adds a column to the index if columns have not yet been specified - - The column name to add - - - - Adds a column to the index if columns have not yet been specified - - The column name to add - - - - Specify the lazy behaviour of this relationship. - - - Defaults to Proxy lazy-loading. Use the modifier to disable - lazy-loading, and use the - overload to specify alternative lazy strategies. - - - LazyLoad(); - Not.LazyLoad(); - - - - - Specify the lazy behaviour of this relationship. Cannot be used - with the modifier. - - Laziness strategy - - LazyLoad(Laziness.NoProxy); - - - - - (optional) Specifies the entity from which this subclass descends/extends. - - Type of the entity to extend - - - - (optional) Specifies the entity from which this subclass descends/extends. - - Type of the entity to extend - - - - Checks whether a collection contains an inspector identified by the string value. - - - - - - - - - Checks whether a collection contains an inspector identified by a predicate. - - - - - - - - - (optional) Specifies the entity from which this subclass descends/extends. - - Type of the entity to extend - - - - (optional) Specifies the entity from which this subclass descends/extends. - - Type of the entity to extend - - - - Base convention for specifying your own many-to-many table naming style. Implement - the abstract members defined by this class to control how your join tables are named - for uni and bi-directional many-to-many's. - - - - - Gets the name used for bi-directional many-to-many tables. Implement this member to control how - your join table is named for bi-directional relationships. - - - This method will be called once per bi-directional relationship; once one side of the relationship - has been saved, then the other side will assume that name aswell. - - Main collection - Inverse collection - Many-to-many table name - - - - Gets the name used for uni-directional many-to-many tables. Implement this member to control how - your join table is named for uni-directional relationships. - - Main collection - Many-to-many table name - - - - A component that is declared external to a class mapping. - - - - - Determines the lazy-loading strategy for a collection mapping. - - - - - Collection will be eager loaded (lazy=false). - - - - - Collection will lazy loaded (lazy=true). - - - - - collection will be extra lazy loaded (lazy=extra). - - - "Extra" lazy collections are mostly similar to lazy=true, except certain operations on the collection will not load the whol collection - but issue a smarter SQL statement. For example, invoking Count on an extra-lazy collection will issue a "SELECT COUNT(*)..." rather than selecting - and loading the whole collection of entities. - - - - - This bad boy is the entry point to the visitor - - - - - - Laziness strategy for relationships - - - - - No lazy loading - - - - - Proxy-based lazy-loading - - - - - No proxy lazy loading - - - - - Defines a property to be used for this natural-id. - - A member access lambda expression for the property - The natural id part fluent interface - - - - Defines a property to be used for this natural-id with an explicit column name. - - A member access lambda expression for the property - The column name in the database to use for this natural id, or null to use the property name - The natural id part fluent interface - - - - Defines a reference to be used as a many-to-one key for this natural-id with an explicit column name. - - A member access lambda expression for the property - The natural ID part fluent interface - - - - Defines a reference to be used as a many-to-one key for this natural-id with an explicit column name. - - A member access lambda expression for the property - The column name in the database to use for this key, or null to use the property name - The natural id part fluent interface - - - - Specifies that this id is read-only - - This is the same as setting the mutable attribute to false - - - - Inverts the next boolean operation - - - - - Sets the tuplizer type. - - Type - - - - Sets the tuplizer type. - - Type - - - - Sets the tuplizer type. - - Type - - - - Sets the tuplizer mode - - Mode - - - - Specifies an entity-name. - - See http://nhforge.org/blogs/nhibernate/archive/2008/10/21/entity-name-in-action-a-strongly-typed-entity.aspx - - - Computes the Levenshtein Edit Distance between two enumerables. - The type of the items in the enumerables. - The first enumerable. - The second enumerable. - The edit distance. - - - - A reference to a component which is declared externally. Contains properties - that can't be declared externally (property name, for example) - - - - - Specify the column name - - Column name - - - - Specify the column length - - Column length - - - - Specify the nullability of the column - - - - - Specify the uniquness of the column - - - - - Specify the unique key constraint name - - Constraint name - - - - Specify the SQL type for the column - - SQL type - - - - Specify the index name - - Index name - - - - Inverts the next boolean - - - - - Defines a mapping for a component. Derive from this class to create a mapping, - and use the constructor to control how your component is persisted. - - - public class AddressMap : ComponentMap<Address> - { - public AddressMap() - { - Map(x => x.Street); - Map(x => x.City); - } - } - - Component type to map - - - - Specify a parent reference for this component - - Parent property - - ParentReference(x => x.Parent); - - - - - Specifies that this component is read-only - - - This is the same as calling both Not.Insert() and Not.Update() - - - - - Specifies that this component is insertable. - - - - - Specifies that this component is updatable - - - - - Specifies the uniqueness of this component - - - - - Specify that this component should be optimistically locked on access - - - - - Set the access and naming strategy for this component. - - - - - Invert the next boolean operation - - - - - Creates a component reference. This is a place-holder for a component that is defined externally with a - ; the mapping defined in said will be merged - with any options you specify from this call. - - Component type - Property exposing the component - Component reference builder - - - - The fluent-interface part for a external component reference. These are - components which have their bulk/body declared external to a class mapping - and are reusable. - - Component type - - - - Sets the prefix for any columns defined within the component. To refer to the property - that exposes this component use {property}. - - - // Entity using Address component - public class Person - { - public Address PostalAddress { get; set; } - } - - ColumnPrefix("{property}_") will result in any columns of Person.Address being prefixed with "PostalAddress_". - - Prefix for column names - - - - Maps to the Filter element in NH 2.0 - - - - - Specifies an entity-name. - - See http://nhforge.org/blogs/nhibernate/archive/2008/10/21/entity-name-in-action-a-strongly-typed-entity.aspx - - - - Inverts the next boolean - - - - - Defines how NHibernate will access the object for persisting/hydrating (Defaults to Property) - - - - - Implicit polymorphism - - - - - Explicit polymorphism - - - - - Takes a type that represents the level in the class/subclass-hiearchy that we're starting from, the parent, - this can be a class or subclass; also takes a list of subclass providers. The providers are then iterated - and added to a dictionary key'd by the types "distance" from the parentType; distance being the number of levels - between parentType and the subclass-type. - - By default if the Parent type is an interface the level will always be zero. At this time there is no check for - hierarchical interface inheritance. - - Starting point, parent type. - List of subclasses - Dictionary key'd by the distance from the parentType. - - - - The evalType starts out as the original subclass. The class hiearchy is only - walked if the subclass inherits from a class that is included in the subclassProviders. - - - - - - - - - The evalType is always one class higher in the hiearchy starting from the original subclass. The class - hiearchy is walked until the IsTopLevel (base class is Object) is met. The level is only incremented if - the subclass inherits from a class that is also in the subclassProviders. - - - - - - - - - Defines a mapping for an entity subclass. Derive from this class to create a mapping, - and use the constructor to control how your entity is persisted. - - - public class EmployeeMap : SubclassMap<Employee> - { - public EmployeeMap() - { - Map(x => x.Name); - Map(x => x.Age); - } - } - - Entity type to map - - - - (optional) Specifies that this subclass is abstract - - - - - Sets the dynamic insert behaviour - - - - - Sets the dynamic update behaviour - - - - - Specifies that this entity should be lazy loaded - - - - - Specify a proxy type for this entity - - Proxy type - - - - Specify a proxy type for this entity - - Proxy type - - - - Specify that a select should be performed before an update of this entity - - - - - Set the discriminator value, if this entity is in a table-per-class-hierarchy - mapping strategy. - - Discriminator value - - - - Sets the table name - - Table name - - - - Sets the schema - - Schema - - - - Specifies a check constraint - - Constraint name - - - - Adds a column to the key for this subclass, if used - in a table-per-subclass strategy. - - Column name - - - - Subselect query - - Subselect query - - - - Specifies a persister for this entity - - Persister type - - - - Specifies a persister for this entity - - Persister type - - - - Specifies a persister for this entity - - Persister type - - - - Set the query batch size - - Batch size - - - - Specifies an entity-name. - - See http://nhforge.org/blogs/nhibernate/archive/2008/10/21/entity-name-in-action-a-strongly-typed-entity.aspx - - - - Links this entity to another table, to create a composite entity from two or - more tables. This only works if you're in a table-per-inheritance-hierarchy - strategy. - - Joined table name - Joined table mapping - - Join("another_table", join => - { - join.Map(x => x.Name); - join.Map(x => x.Age); - }); - - - - - (optional) Specifies the entity from which this subclass descends/extends. - - Type of the entity to extend - - - - (optional) Specifies the entity from which this subclass descends/extends. - - Type of the entity to extend - - - - Inverts the next boolean setting - - - - - Container for automatic mappings - - - - - Add automatic mappings - - Lambda returning an auto mapping setup - Auto mappings configuration - - - - Add automatic mappings - - Auto mapping setup - Auto mappings configuration - - - - Sets the export location for generated mappings - - Path to folder for mappings - Auto mappings configuration - - - - Sets the text writer to write the generated mappings to. - - Fluent mappings configuration - - - - Applies any added mappings to the NHibernate Configuration - - NHibernate Configuration instance - - - - Gets whether any mappings were added - - - - - Initializes a new instance of the class using the - MS Oracle Client (System.Data.OracleClient) library specifying the Oracle 9i dialect. - - - - - Initializes a new instance of the class using the - MS Oracle Client (System.Data.OracleClient) library specifying the Oracle 10g dialect. - This allows for ANSI join syntax. - - - - - Initializes a new instance of the class using the - Oracle Data Provider (Oracle.DataAccess) library specifying the Oracle 8i dialect. - The Oracle.DataAccess library must be available to the calling application/library. - - - - - Initializes a new instance of the class using the - Oracle Data Provider (Oracle.DataAccess) library specifying the Oracle 9i dialect. - The Oracle.DataAccess library must be available to the calling application/library. - - - - - Initializes a new instance of the class using the - Oracle Data Provider (Oracle.DataAccess) library specifying the Oracle 10g dialect. - The Oracle.DataAccess library must be available to the calling application/library. - This allows for ANSI join syntax. - - - - - Specifies the server to connect. This can be either the DNS name of the - server or the IP (as a string). - - The server. - - - - - Specifies the instance (database name) to use. This can be the short name or the - fully qualified name (Oracle service name). - - The instance. - - - - - Specifies the name of the user account accessing the database. - - The username. - - - - - Specifies the password of the user account accessing the database. - - The password. - - - - - Optional. Ports the specified port the oracle database is running on. This defaults to 1521. - - The port. - - - - - Enable or disable pooling connections for this data configuration. - - if set to true enable pooling. - - - - - Specifies the SQL statement cache size to use for this connection. - - Size of the cache. - - - - - Specifies, as a string, other Oracle options to pass to the connection. - - The other options. - - - - - Initializes a new instance of the class using the - Oracle Data Provider (Oracle.DataAccess) library specifying the Oracle 9i dialect. - The Oracle.DataAccess library must be available to the calling application/library. - - - - - Initializes a new instance of the class using the - Oracle Data Provider (Oracle.DataAccess) library specifying the Oracle 10g dialect. - The Oracle.DataAccess library must be available to the calling application/library. - - - - - The type of authentication to be used. Acceptable values: - - - SERVER - - - SERVER_ENCRYPT - - - DATA_ENCRYPT - - - KERBEROS - - - GSSPLUGIN - - - - - IfxDRDAConnectionStringBuilder object - - - - The name of the database within the server instance. - - - IfxSQLIConnectionStringBuilder object - - - - - - true - - host variable (:param) support enabled. - - - false (default) - - host variable support disabled. - - - - - IfxSQLIConnectionStringBuilder object - - - - Isolation level for the connection. Possible values: - - - ReadCommitted - - - ReadUncommitted - - - RepeatableRead - - - Serializable - - - Transaction - - - This keyword is only supported for applications participating in a - distributed transaction. - - - IfxDRDAConnectionStringBuilder object - - - - The maximum number of connections allowed in the pool. - - - IfxDRDAConnectionStringBuilder object - - - - The minimum number of connections allowed in the pool. Default value 0. - - - IfxDRDAConnectionStringBuilder object - - - - The password associated with the User ID. - - - IfxDRDAConnectionStringBuilder object - - - - When set to true, the IfxConnection object is drawn from - the appropriate pool, or if necessary, it is created and added - to the appropriate pool. Default value 'true'. - - - IfxDRDAConnectionStringBuilder object - - - - Server name with optional port number for direct connection using either - IPv4 notation ([:]]]>) or IPv6 notation. - - - IfxDRDAConnectionStringBuilder object - - - - The login account. - - - IfxDRDAConnectionStringBuilder object - - - - Other options: Connection Lifetime, Connection Reset, Connection Timeout, CurrentSchema, Enlist, - Interrupt, Persist Security Info, ResultArrayAsReturnValue, Security, TrustedContextSystemUserID, - TrustedContextSystemPassword - - - IfxDRDAConnectionStringBuilder object - - - - Client locale, default value is en_us.CP1252 (Windows) - - - IfxSQLIConnectionStringBuilder object - - - - The name of the database within the server instance. - - - IfxSQLIConnectionStringBuilder object - - - - The language locale of the database. Default value is en_US.8859-1 - - - IfxSQLIConnectionStringBuilder object - - - - When set to true or y for yes, any string within double - quotes (") is treated as an identifier, and any string within - single quotes (') is treated as a string literal. Default value 'y'. - - - IfxSQLIConnectionStringBuilder object - - - - The name or IP address of the machine on which the - Informix server is running. Required. - - - IfxSQLIConnectionStringBuilder object - - - - The maximum number of connections allowed in the pool. Default value 100. - - - IfxSQLIConnectionStringBuilder object - - - - The minimum number of connections allowed in the pool. Default value 0. - - - IfxSQLIConnectionStringBuilder object - - - - The password associated with the User ID. Required if the - client machine or user account is not trusted by the host. - Prohibited if a User ID is not given. - - - IfxSQLIConnectionStringBuilder object - - - - When set to true, the IfxConnection object is drawn from - the appropriate pool, or if necessary, it is created and added - to the appropriate pool. Default value 'true'. - - - IfxSQLIConnectionStringBuilder object - - - - The name or alias of the instance of the Informix server to - which to connect. Required. - - - IfxSQLIConnectionStringBuilder object - - - - The service name or port number through which the server - is listening for connection requests. - - - IfxSQLIConnectionStringBuilder object - - - - The login account. Required, unless the client machine is - trusted by the host machine. - - - IfxSQLIConnectionStringBuilder object - - - - Other options like: Connection Lifetime, Enlist, Exclusive, Optimize OpenFetchClose, - Fetch Buffer Size, Persist Security Info, Protocol, Single Threaded, Skip Parsing - - - IfxSQLIConnectionStringBuilder object - - - - Fluent configuration API for NHibernate - - - - - Apply database settings - - Lambda returning database configuration - Fluent configuration - - - - Apply database settings - - Database configuration instance - Fluent configuration - - - - Apply mappings to NHibernate - - Lambda used to apply mappings - Fluent configuration - - - - Allows altering of the raw NHibernate Configuration object before creation - - Lambda used to alter Configuration - Fluent configuration - - - - Verify's the configuration and instructs NHibernate to build a SessionFactory. - - ISessionFactory from supplied settings. - - - - Verifies the configuration and populates the NHibernate Configuration instance. - - NHibernate Configuration instance - - - - Creates an exception based on the current state of the configuration. - - Inner exception - FluentConfigurationException with state - - - - Fluently configure NHibernate - - - - - Begin fluently configuring NHibernate - - Fluent Configuration - - - - Begin fluently configuring NHibernate - - Instance of an NHibernate Configuration - Fluent Configuration - - - - Container for fluent mappings - - - - - Add all fluent mappings in the assembly that contains T. - - Type from the assembly - Fluent mappings configuration - - - - Add all fluent mappings in the assembly - - Assembly to add mappings from - Fluent mappings configuration - - - - Adds a single represented by the specified type. - - Fluent mappings configuration - - - - Adds a single represented by the specified type. - - The type. - Fluent mappings configuration - - - - Sets the export location for generated mappings - - Path to folder for mappings - Fluent mappings configuration - - - - Sets the text writer to write the generated mappings to. - - Fluent mappings configuration - - - - Applies any added mappings to the NHibernate Configuration - - NHibernate Configuration instance - - - - Alter convention discovery - - - - - Gets whether any mappings were added - - - - - Container for Hbm mappings - - - - - Add explicit classes with Hbm mappings - - List of types to map - Hbm mappings configuration - - - - Add all Hbm mappings in the assembly that contains T. - - Type from the assembly - Hbm mappings configuration - - - - Add all Hbm mappings in the assembly - - Assembly to add mappings from - Hbm mappings configuration - - - - Applies any added mappings to the NHibernate Configuration - - NHibernate Configuration instance - - - - Gets whether any mappings were added - - - - - Fluent mapping configuration - - - - - Applies any mappings to the NHibernate Configuration - - NHibernate Configuration instance - - - - Fluent mappings - - - - - Automatic mapping configurations - - - - - Hbm mappings - - - - - Get whether any mappings of any kind were added - - - - - Convention finder - used to search through assemblies for types that implement a specific convention interface. - - - - - Add an assembly to be queried. - - - All convention types must have a parameterless constructor, or a single parameter of . - - Assembly instance to query - - - - Adds all conventions found in the assembly that contains . - - - All convention types must have a parameterless constructor, or a single parameter of . - - - - - Add a single convention by type. - - - Type must have a parameterless constructor, or a single parameter of . - - Convention type - - - - Add a single convention by type. - - - Types must have a parameterless constructor, or a single parameter of . - - Type of convention - - - - Add an instance of a convention. - - - Useful for supplying conventions that require extra constructor parameters. - - Convention type - Instance of convention - - - - Find any conventions implementing T. - - Convention interface type - IEnumerable of T - - - - Default convention finder - doesn't do anything special. - - - - - Find any conventions implementing T. - - Convention interface type - IEnumerable of T - - - - Add an assembly to be queried. - - - All convention types must have a parameterless constructor, or a single parameter of IConventionFinder. - - Assembly instance to query - - - - Adds all conventions found in the assembly that contains T. - - - All convention types must have a parameterless constructor, or a single parameter of IConventionFinder. - - - - - Add a single convention by type. - - - Type must have a parameterless constructor, or a single parameter of IConventionFinder. - - Convention type - - - - Add a single convention by type. - - - Types must have a parameterless constructor, or a single parameter of . - - Type of convention - - - - Add an instance of a convention. - - - Useful for supplying conventions that require extra constructor parameters. - - Convention type - Instance of convention - - - - Indicates whether the current is equal to another . - - - true if the current object is equal to the parameter; otherwise, false. - - An Entity to compare with this object. - - - - Determines whether the specified is equal to the current . - - - true if the specified is equal to the current ; otherwise, false. - - The to compare with the current . - The parameter is null.2 - - - - Serves as a hash function for a Entity. - - - A hash code for the current . - - 2 - - - - Set which type this subclass extends. - Note: This doesn't actually get output into the XML, it's - instead used as a marker for the - to pair things up. - - - - - Represents the "Any" mapping in NHibernate. It is impossible to specify a foreign key constraint for this kind of association. For more information - please reference chapter 5.2.4 in the NHibernate online documentation - - - - - Sets the meta-type value for this any mapping. - - Meta type - - - - Sets the meta-type value for this any mapping. - - Meta type - - - - Sets the meta-type value for this any mapping. - - Meta type - - - - Defines how NHibernate will access the object for persisting/hydrating (Defaults to Property) - - - - - Cascade style (Defaults to none) - - - - - Access strategy mapping builder. - - - - - Access strategy mapping builder. - - - - - Sets the access-strategy to property. - - - - - Sets the access-strategy to field. - - - - - Sets the access-strategy to use the backing-field of an auto-property. - - - - - Sets the access-strategy to field and the naming-strategy to camelcase (field.camelcase). - - - - - Sets the access-strategy to field and the naming-strategy to camelcase, with the specified prefix. - - Naming-strategy prefix - - - - Sets the access-strategy to field and the naming-strategy to lowercase. - - - - - Sets the access-strategy to field and the naming-strategy to lowercase, with the specified prefix. - - Naming-strategy prefix - - - - Sets the access-strategy to field and the naming-strategy to pascalcase, with the specified prefix. - - Naming-strategy prefix - - - - Sets the access-strategy to read-only property (nosetter) and the naming-strategy to camelcase. - - - - - Sets the access-strategy to read-only property (nosetter) and the naming-strategy to camelcase, with the specified prefix. - - Naming-strategy prefix - - - - Sets the access-strategy to read-only property (nosetter) and the naming-strategy to lowercase. - - - - - Sets the access-strategy to read-only property (nosetter) and the naming-strategy to lowercase. - - Naming-strategy prefix - - - - Sets the access-strategy to read-only property (nosetter) and the naming-strategy to pascalcase, with the specified prefix. - - Naming-strategy prefix - - - - Sets the access-strategy to use the type referenced. - - Assembly qualified name of the type to use as the access-strategy - - - - Sets the access-strategy to use the type referenced. - - Type to use as the access-strategy - - - - Sets the access-strategy to use the type referenced. - - Type to use as the access-strategy - - - - Force NHibernate to always select using the discriminator value, even when selecting all subclasses. This - can be useful when your table contains more discriminator values than you have classes (legacy). - - Sets the "force" attribute. - - - - Set this discriminator as read-only. Call this if your discriminator column is also part of a mapped composite identifier. - - Sets the "insert" attribute. - - - - An arbitrary SQL expression that is executed when a type has to be evaluated. Allows content-based discrimination. - - SQL expression - - - - Sets the precision for decimals - - Decimal precision - - - - Specifies the scale for decimals - - Decimal scale - - - - Specify the column length - - Column length - - - - Specify the nullability of this column - - - - - Specifies the uniqueness of this column - - - - - Specifies the unique key constraint name - - Constraint columns - - - - Specifies the index name - - Index name - - - - Specifies a check constraint name - - Constraint name - - - - Specifies the default value for the discriminator - - Default value - - - - Specifies a custom type for the discriminator - - - This is often used with - - Custom type - - - - Specifies a custom type for the discriminator - - - This is often used with - - Custom type - - - - Specifies a custom type for the discriminator - - - This is often used with - - Custom type - - - - Invert the next boolean operation - - - - - Pre-defined discriminator values - - - - - Null discriminator value - - - - - Non-null discriminator value - - - - - Specify the element column name - - Column name - - - - Specify the element type - - Element type - - - - Specify the element column length - - Column length - - - - Specify the element column formula - - Formula - - - - Modify the columns for this element - - - - - Sets caching to read-write - - - - - Sets caching to non-strict read-write - - - - - Sets caching to read-only - - - - - Sets caching to transactional - - - - - Specifies a custom cache behaviour - - Custom behaviour - - - - Specifies the cache region - - - - - - Include all properties for caching - - - - - - Include only non-lazy properties for caching - - - - - Specify a custom property inclusion strategy - - Inclusion strategy - - - - Base class for user type conventions. Create a subclass of this to automatically - map all properties that the user type can be used against. Override Accept or - Apply to alter the behavior. - - IUserType implementation - - - - Base class for attribute based conventions. Create a subclass of this to supply your own - attribute based conventions. - - Attribute identifier - - - - Apply changes to a property with an attribute matching T. - - Instance of attribute found on property. - Property with attribute - - - - Cascade all actions - - - - - Cascade no actions - - - - - Cascade saves and updates - - - - - Cascade deletes - - - - - Cascade all actions, deleting any orphaned records - - - - - Cascade deletes, deleting any orphaned records - - - - - Map a property - - Dictionary key - - Map("Age"); - - - - - Map a property - - Dictionary key - Property type - - Map<int>("Age"); - - - - - Join fetching - - - - - Select fetching - - - - - Subselect/subquery fetching - - - - - Specifies an entity-name. - - See http://nhforge.org/blogs/nhibernate/archive/2008/10/21/entity-name-in-action-a-strongly-typed-entity.aspx - - - - Thrown when a prefix is specified for an access-strategy that isn't supported. - - - - - Naming strategy prefix. - - - - - Property is never database generated - - - - - Property is only generated on insert - - - - - Property is always database generated - - - - - Checks a list of components for validity. - - Entity type - Type of list element - Persistence specification - Property - Value to save - Equality comparer - - - - Converts an expression to a best guess SQL string - - - - - Converts a Func expression to a best guess SQL string - - - - - Converts a boolean Func expression to a best guess SQL string - - - - - Gets the value of a method call. - - Method call expression - - - - Specify an alternative name for the type - - Alternative name - - - - Used to set the Not-Found attribute to ignore. This tells NHibernate to - return a null object rather then throw an exception when the join fails - - - - - Used to set the Not-Found attribute to exception (Nhibernate default). This - tells NHibernate to throw an exception when the join fails - - - - - Specifies the child class - - Child - - - - Specifies the child class - - Child - - - - Specifies that this relationship should be created with a default-named - foreign-key - - - - - Specify the foreign-key constraint name - - Foreign-key constraint - - - - Sets the property reference - - Property - - - - Sets the property reference - - Property - - - - Specifies that this relationship is constrained - - - - - Specify the lazy behaviour of this relationship. - - - Defaults to Proxy lazy-loading. Use the modifier to disable - lazy-loading, and use the - overload to specify alternative lazy strategies. - - - LazyLoad(); - Not.LazyLoad(); - - - - - Specify the lazy behaviour of this relationship. Cannot be used - with the modifier. - - Laziness strategy - - LazyLoad(Laziness.NoProxy); - - - - - Specifies an entity-name. - - See http://nhforge.org/blogs/nhibernate/archive/2008/10/21/entity-name-in-action-a-strongly-typed-entity.aspx - - - - Sets the fetch behaviour for this relationship - - - Fetch.Select(); - - - - - Sets the cascade behaviour for this relationship - - - Cascade.All(); - - - - - Specifies the access strategy for this relationship - - - Access.Field(); - - - - - Inverts the next boolean operation - - - - - No optimistic locking - - - - - Version locking - - - - - Dirty locking - - - - - Lock on everything - - - - - Use no locking strategy - - - - - Use version locking - - - - - Use dirty locking - - - - - Use all locking - - - - - This method is used to set a different key column in this table to be used for joins. - The output is set as the property-ref attribute in the "key" subelement of the collection - - The name of the column in this table which is linked to the foreign key - OneToManyPart - - - - Specify the lazy-load behaviour - - - - - Specify extra lazy loading - - - - - Inverse the ownership of this entity. Make the other side of the relationship - responsible for saving. - - - - - Use a set collection - - - - - Use a set collection - - Sorting - - - - Use a set collection - - Item comparer - - - - Use a bag collection - - - - - Use a list collection - - - - - Use a list collection with an index - - Index mapping - - - - Use a map collection - - Index type - Index property - - - - Use a map collection - - Index type - Index property - Sorting - - - - Use a map collection - - Index column name - - - - Use a map collection - - Index column name - Sorting - - - - Use a map collection - - Index type - Index column name - - - - Use a map collection - - Index type - Index column name - Sorting - - - - Use a map collection - - Index type - Comparer - Index column name - - - - Use a map collection - - Index type - Index property - Index mapping - - - - Use a map collection - - Index type - Index property - Index mapping - Sorting - - - - Use a map collection - - Index type - Index mapping - Element mapping - - - - Use an array - - Index type - Index property - - - - Use an array - - Index type - Index property - Index mapping - - - - Make this collection indexed - - Index type - Index property - Index mapping - - - - Make this collection index - - Index type - Index column - Index mapping - - - - Map an element/value type - - Column name - - - - Map an element/value type - - Column name - Custom mapping - - - - Maps this collection as a collection of components. - - Component mapping - - - - Sets the table name for this one-to-many. - - Table name - - - - Specify that the deletes should be cascaded - - - - - Specify a custom persister - - Persister - - - - Specify a check constraint - - Constraint name - - - - Specify that this collection is generic (optional) - - - - - Sets the where clause for this one-to-many relationship. - Note: This only supports simple cases, use the string overload for more complex clauses. - - - - - Sets the where clause for this one-to-many relationship. - - - - - Specify the select batch size - - Batch size - - - - Sets a custom collection type - - - - - Sets a custom collection type - - - - - Sets a custom collection type - - - - - Sets a custom collection type - - - - - Specify the table schema - - Schema name - - - - Specifies an entity-name. - - See http://nhforge.org/blogs/nhibernate/archive/2008/10/21/entity-name-in-action-a-strongly-typed-entity.aspx - - - - Applies a filter to this entity given it's name. - - - Applies a filter to this entity given it's name. - - The filter's name - The condition to apply - - - - Applies a filter to this entity given it's name. - - - Applies a filter to this entity given it's name. - - The filter's name - - - - Applies a named filter to this one-to-many. - - - Applies a named filter to this one-to-many. - - The condition to apply - - The type of a implementation - defining the filter to apply. - - - - - Applies a named filter to this one-to-many. - - - The type of a implementation - defining the filter to apply. - - - - - Specify caching for this entity. - - - - - Specify the cascade behaviour - - - - - Specify the fetching behaviour - - - - - Set the access and naming strategy for this one-to-many. - - - - - Specify the optimistic locking behaviour - - - - - Inverts the next boolean operation - - - - - Access strategy mapping builder. - - Mapping part to be applied to - - - - Access strategy mapping builder. - - Instance of the parent mapping part. - Setter for altering the model - - - - Sets the access-strategy to property. - - - - - Sets the access-strategy to field. - - - - - Sets the access-strategy to use the backing-field of an auto-property. - - - - - Sets the access-strategy to field and the naming-strategy to camelcase (field.camelcase). - - - - - Sets the access-strategy to field and the naming-strategy to camelcase, with the specified prefix. - - Naming-strategy prefix - - - - Sets the access-strategy to field and the naming-strategy to lowercase. - - - - - Sets the access-strategy to field and the naming-strategy to lowercase, with the specified prefix. - - Naming-strategy prefix - - - - Sets the access-strategy to field and the naming-strategy to pascalcase, with the specified prefix. - - Naming-strategy prefix - - - - Sets the access-strategy to read-only property (nosetter) and the naming-strategy to camelcase. - - - - - Sets the access-strategy to read-only property (nosetter) and the naming-strategy to camelcase, with the specified prefix. - - Naming-strategy prefix - - - - Sets the access-strategy to read-only property (nosetter) and the naming-strategy to lowercase. - - - - - Sets the access-strategy to read-only property (nosetter) and the naming-strategy to lowercase. - - Naming-strategy prefix - - - - Sets the access-strategy to read-only property (nosetter) and the naming-strategy to pascalcase, with the specified prefix. - - Naming-strategy prefix - - - - Sets the access-strategy to use the type referenced. - - Assembly qualified name of the type to use as the access-strategy - - - - Sets the access-strategy to use the type referenced. - - Type to use as the access-strategy - - - - Sets the access-strategy to use the type referenced. - - Type to use as the access-strategy - - - - Specify the lazy-load behaviour - - - - - Component-element for component HasMany's. - - Component type - - - - Map a property - - Property - - Map(x => x.Age); - - - - - Map a property - - Property - Column name - - Map(x => x.Age, "person_age"); - - - - - Create a reference to another entity. In database terms, this is a many-to-one - relationship. - - Other entity - Property on the current entity - - References(x => x.Company); - - - - - Create a reference to another entity. In database terms, this is a many-to-one - relationship. - - Other entity - Property on the current entity - Column name - - References(x => x.Company, "person_company_id"); - - - - - Maps a property of the component class as a reference back to the containing entity - - Parent reference property - Component being mapped - - - - Create a nested component mapping. - - Component property - Action for creating the component - - HasMany(x => x.Locations) - .Component(c => - { - c.Map(x => x.Name); - c.Component(x => x.Address, addr => - { - addr.Map(x => x.Street); - addr.Map(x => x.PostCode); - }); - }); - - - - - generates identifiers of any integral type that are unique only when no other - process is inserting data into the same table. Do not use in a cluster. - - - - - - generates identifiers of any integral type that are unique only when no other - process is inserting data into the same table. Do not use in a cluster. - - Params configuration - - - - supports identity columns in DB2, MySQL, MS SQL Server and Sybase. - The identifier returned by the database is converted to the property type using - Convert.ChangeType. Any integral property type is thus supported. - - - - - - supports identity columns in DB2, MySQL, MS SQL Server and Sybase. - The identifier returned by the database is converted to the property type using - Convert.ChangeType. Any integral property type is thus supported. - - Params configuration - - - - uses a sequence in DB2, PostgreSQL, Oracle or a generator in Firebird. - The identifier returned by the database is converted to the property type - using Convert.ChangeType. Any integral property type is thus supported. - - - - - - - uses a sequence in DB2, PostgreSQL, Oracle or a generator in Firebird. - The identifier returned by the database is converted to the property type - using Convert.ChangeType. Any integral property type is thus supported. - - - Params configuration - - - - uses a hi/lo algorithm to efficiently generate identifiers of any integral type, - given a table and column (by default hibernate_unique_key and next_hi respectively) - as a source of hi values. The hi/lo algorithm generates identifiers that are unique - only for a particular database. Do not use this generator with a user-supplied connection. - requires a "special" database table to hold the next available "hi" value - - The table. - The column. - The max lo. - The where. - - - - - uses a hi/lo algorithm to efficiently generate identifiers of any integral type, - given a table and column (by default hibernate_unique_key and next_hi respectively) - as a source of hi values. The hi/lo algorithm generates identifiers that are unique - only for a particular database. Do not use this generator with a user-supplied connection. - requires a "special" database table to hold the next available "hi" value - - - - - - - - - uses a hi/lo algorithm to efficiently generate identifiers of any integral type, - given a table and column (by default hibernate_unique_key and next_hi respectively) - as a source of hi values. The hi/lo algorithm generates identifiers that are unique - only for a particular database. Do not use this generator with a user-supplied connection. - requires a "special" database table to hold the next available "hi" value - - - - - Params configuration - - - - uses a hi/lo algorithm to efficiently generate identifiers of any integral type, - given a table and column (by default hibernate_unique_key and next_hi respectively) - as a source of hi values. The hi/lo algorithm generates identifiers that are unique - only for a particular database. Do not use this generator with a user-supplied connection. - requires a "special" database table to hold the next available "hi" value - - - - - - - uses a hi/lo algorithm to efficiently generate identifiers of any integral type, - given a table and column (by default hibernate_unique_key and next_hi respectively) - as a source of hi values. The hi/lo algorithm generates identifiers that are unique - only for a particular database. Do not use this generator with a user-supplied connection. - requires a "special" database table to hold the next available "hi" value - - - Params configuration - - - - uses an Oracle-style sequence (where supported) - - - - - - - - uses an Oracle-style sequence (where supported) - - - - Params configuration - - - - uses System.Guid and its ToString(string format) method to generate identifiers - of type string. The length of the string returned depends on the configured format. - - http://msdn.microsoft.com/en-us/library/97af8hh4.aspx - - - - - uses System.Guid and its ToString(string format) method to generate identifiers - of type string. The length of the string returned depends on the configured format. - - http://msdn.microsoft.com/en-us/library/97af8hh4.aspx - Params configuration - - - - uses a new System.Guid to create a byte[] that is converted to a string. - - - - - - uses a new System.Guid to create a byte[] that is converted to a string. - - Params configuration - - - - uses a new System.Guid as the identifier. - - - - - - uses a new System.Guid as the identifier. - - Params configuration - - - - Recommended for Guid identifiers! - uses the algorithm to generate a new System.Guid described by Jimmy Nilsson - in the article http://www.informit.com/articles/article.asp?p=25862. - - - - - - Recommended for Guid identifiers! - uses the algorithm to generate a new System.Guid described by Jimmy Nilsson - in the article http://www.informit.com/articles/article.asp?p=25862. - - Params configuration - - - - lets the application to assign an identifier to the object before Save() is called. - - - - - - lets the application to assign an identifier to the object before Save() is called. - - Params configuration - - - - picks identity, sequence or hilo depending upon the capabilities of the underlying database. - - - - - - picks identity, sequence or hilo depending upon the capabilities of the underlying database. - - Params configuration - - - - picks identity, sequence or hilo depending upon the capabilities of the underlying database. - - - - - picks identity, sequence or hilo depending upon the capabilities of the underlying database. - - - - - uses the identifier of another associated object. Usually used in conjunction with a one-to-one primary key association. - - - - - - - uses the identifier of another associated object. Usually used in conjunction with a one-to-one primary key association. - - - Params configuration - - - - Generator that uses the RDBMS native function to generate a GUID. - The behavior is similar to the “sequence” generator. When a new - object is saved NH run two queries: the first to retrieve the GUID - value and the second to insert the entity using the Guid retrieved - from the RDBMS. Your entity Id must be System.Guid and the SQLType - will depend on the dialect (RAW(16) in Oracle, UniqueIdentifier in - MsSQL for example). - - - - - Generator that uses the RDBMS native function to generate a GUID. - The behavior is similar to the “sequence” generator. When a new - object is saved NH run two queries: the first to retrieve the GUID - value and the second to insert the entity using the Guid retrieved - from the RDBMS. Your entity Id must be System.Guid and the SQLType - will depend on the dialect (RAW(16) in Oracle, UniqueIdentifier in - MsSQL for example). - - - GuidNative(x => - { - x.AddParam("key", "value"); - }); - - Parameter builder closure - - - - A deviation of the trigger-identity. This generator works - together with the feature. - The difference with trigger-identity is that the POID value - is retrieved by a SELECT using the natural-id fields as filter. - - - - - A deviation of the trigger-identity. This generator works - together with the feature. - The difference with trigger-identity is that the POID value - is retrieved by a SELECT using the natural-id fields as filter. - - - Select(x => - { - x.AddParam("key", "value"); - }); - - Parameter builder closure - - - - Based on sequence but works like an identity. The POID - value is retrieved with an INSERT query. Your entity Id must - be an integral type. - "hibernate_sequence" is the default name for the sequence, unless - another is provided. - - - - - Based on sequence but works like an identity. The POID - value is retrieved with an INSERT query. Your entity Id must - be an integral type. - "hibernate_sequence" is the default name for the sequence, unless - another is provided. - - Custom sequence name - - - - Based on sequence but works like an identity. The POID - value is retrieved with an INSERT query. Your entity Id must - be an integral type. - "hibernate_sequence" is the default name for the sequence, unless - another is provided. - - Parameter builder closure - - - - Based on sequence but works like an identity. The POID - value is retrieved with an INSERT query. Your entity Id must - be an integral type. - "hibernate_sequence" is the default name for the sequence, unless - another is provided. - - Custom sequence name - Parameter builder closure - - - - trigger-identity is a NHibernate specific feature where the POID - is generated by the RDBMS with an INSERT query through a - BEFORE INSERT trigger. In this case you can use any supported type, - including a custom type, with the limitation of a single column usage. - - - - - trigger-identity is a NHibernate specific feature where the POID - is generated by the RDBMS with an INSERT query through a - BEFORE INSERT trigger. In this case you can use any supported type, - including a custom type, with the limitation of a single column usage. - - Parameter builder closure - - - - Sets the unsaved-value of the identity. - - Value that represents an unsaved value. - - - - Sets the column name for the identity field. - - Column name - - - - Specify the identity column length - - Column length - - - - Specify the decimal precision - - Decimal precision - - - - Specify the decimal scale - - Decimal scale - - - - Specify the nullability of the identity column - - - - - Specify the uniqueness of the identity column - - - - - Specify a unique key constraint - - Constraint columns - - - - Specify a custom SQL type - - SQL type - - - - Specify an index name - - Index name - - - - Specify a check constraint - - Constraint name - - - - Specify a default value - - Default value - - - - Specify a custom type - - - This is usually used with an - - Custom type - - - - Specify a custom type - - - This is usually used with an - - Custom type - - - - Specify a custom type - - - This is usually used with an - - Custom type - - - - Specify the generator - - - Id(x => x.PersonId) - .GeneratedBy.Assigned(); - - - - - Set the access and naming strategy for this identity. - - - - - Invert the next boolean operation - - - - - Sets a single child key column. If there are multiple columns, use ChildKeyColumns.Add - - - - - Sets a single parent key column. If there are multiple columns, use ParentKeyColumns.Add - - - - - Sets the order-by clause on the collection element. - - - - - Sets the order-by clause on the many-to-many element. - - - - - Applies a filter to the child element of this entity given it's name. - - - Applies a filter to the child element of this entity given it's name. - - The filter's name - The condition to apply - - - - Applies a filter to the child element of this entity given it's name. - - - Applies a filter to the child element of this entity given it's name. - - The filter's name - - - - Applies a named filter to the child element of this many-to-many. - - - Applies a named filter to the child element of this many-to-many. - - The condition to apply - - The type of a implementation - defining the filter to apply. - - - - - Applies a named filter to the child element of this many-to-many. - - - The type of a implementation - defining the filter to apply. - - - - - Sets the where clause for this relationship, on the many-to-many element. - - - - - Sets whether this relationship is unique - - - Unique(); - Not.Unique(); - - - - - Specifies the name of a multi-column unique constraint. - - Name of constraint - - - - Specifies the index name - - Index name - - - - Specifies the child class of this relationship - - Child - - - - Specifies the child class of this relationship - - Child - - - - Sets this relationship to read-only - - - This is the same as calling both Not.Insert() and Not.Update() - - - ReadOnly(); - Not.ReadOnly(); - - - - - Specify the lazy behaviour of this relationship. - - - Defaults to Proxy lazy-loading. Use the modifier to disable - lazy-loading, and use the - overload to specify alternative lazy strategies. - - - LazyLoad(); - Not.LazyLoad(); - - - - - Specify the lazy behaviour of this relationship. Cannot be used - with the modifier. - - Laziness strategy - - LazyLoad(Laziness.NoProxy); - - - - - Specifies this relationship should be created with a default-named - foreign key. - - - - - Specifies the foreign-key constraint name - - Constraint name - - - - Specifies that this relationship is insertable - - - - - Specifies that this relationship is updatable - - - - - Sets the single column used in this relationship. Use - if you need to specify more than one column. - - Column name - - - - Specifies the columns used in this relationship - - Columns - - - - Specifies the columns used in this relationship - - Columns - - - - Specifies the sql formula used for this relationship - - Formula - - - - Specifies the property reference - - Property - - - - Specifies the property reference - - Property - - - - Sets this relationship to nullable - - - Nullable(); - Not.Nullable(); - - - - - Specifies an entity-name. - - See http://nhforge.org/blogs/nhibernate/archive/2008/10/21/entity-name-in-action-a-strongly-typed-entity.aspx - - - - Set the fetching strategy - - - Fetch.Select(); - - - - - Set the behaviour for when this relationship is null in the database - - - NotFound.Exception(); - - - - - Specifies the cascade behaviour for this relationship - - - Cascade.All(); - - - - - Specifies the access strategy for this relationship - - - Access.Field(); - - - - - Inverts the next boolean - - - - - Specify that this is a ternary association - - - - - Specify that this is a ternary association - - Index column - - - - Specify this as an entity map - - - - - Specify this as an entity map - - Index column - - - - Specify the key column name - - Column name - - - - Specify a foreign key constraint - - Constraint name - - - - Sets the order-by clause for this one-to-many relationship. - - - - - Specify that this collection is read-only - - - - - Specify a sub-select query for fetching this collection - - Query - - - - Specify that the key is updatable - - - - - Specify that the key is nullable - - - - - Specifies the behaviour for if this collection is not found - - - - - Specify the cascade behaviour - - - - - Modify the key columns collection - - - - - Specify the property column name - - Column name - - - - Specify that this property is insertable - - - - - Specify that this property is updatable - - - - - Specify the column length - - Column length - - - - Specify the nullability of this property - - - - - Specify that this property is read-only - - - - - Specify the property formula - - Formula - - - - Specify the lazy-loading behaviour - - - - - Specify an index name - - Index name - - - - Specifies that a custom type (an implementation of ) should be used for this property for mapping it to/from one or more database columns whose format or type doesn't match this .NET property. - - A type which implements . - This property mapping to continue the method chain - - - - Specifies that a custom type (an implementation of ) should be used for this property for mapping it to/from one or more database columns whose format or type doesn't match this .NET property. - - A type which implements . - This property mapping to continue the method chain - - - - Specifies that a custom type (an implementation of ) should be used for this property for mapping it to/from one or more database columns whose format or type doesn't match this .NET property. - - A type which implements . - This property mapping to continue the method chain - - - - Specifies that a custom type (an implementation of ) should be used for this property for mapping it to/from one or more database columns whose format or type doesn't match this .NET property. - - A function which returns a type which implements . The argument of the function is the mapped property type - This property mapping to continue the method chain - - - - Specify a custom SQL type - - SQL type - - - - Specify that this property has a unique constranit - - - - - Specify decimal precision - - Decimal precision - - - - Specify decimal scale - - Decimal scale - - - - Specify a default value - - Default value - - - - Specifies the name of a multi-column unique constraint. - - Name of constraint - - - - Specify that this property is optimistically locked - - - - - Specify a check constraint - - Constraint name - - - - Specify if this property is database generated - - - Generated.Insert(); - - - - - Modify the columns collection - - - - - Set the access and naming strategy for this property. - - - - - Inverts the next boolean - - - - - Specify the column name - - Column name - - - - Specify the unsaved value - - Unsaved value - - - - Specify the column length - - Column length - - - - Specify decimal precision - - Decimal precision - - - - Specify decimal scale - - Decimal scale - - - - Specify the nullability of the column - - - - - Specify the uniqueness of the column - - - - - Specify a unique key constraint - - Constraint columns - - - - Specify an index name - - Index name - - - - Specify a check constraint - - Constraint name - - - - Specify a default value - - Default value - - - - Specify a custom type - - Usually used with an - Custom type - - - - Specify a custom type - - Usually used with an - Custom type - - - - Specify a custom type - - Usually used with an - Custom type - - - - Specify a custom SQL type - - SQL type - - - - Specify if this version is database generated - - - - - Specify the access strategy - - - - - Invert the next boolean operation - - - - - Returns whether the user has set a value for a property. - - - - - Returns whether the user has set a value for a property. - - - - - Returns whether a property has any value, default or user specified. - - - - - - - - Reveals a hidden property or field for use instead of expressions. - - Entity type - Name of property or field - Expression for the hidden property or field - - - - Reveals a hidden property or field with a specific return type for use instead of expressions. - - Entity type - Property or field return type - Name of property or field - Expression for the hidden property or field - - - - Visitor that performs validation against the mapping model. - - - - - Gets or sets whether validation is performed. - - - - + + + + FluentNHibernate + + + + + Built-in alteration for altering an AutoPersistenceModel with instance of IAutoMappingOverride<T>. + + + + + Provides a mechanism for altering an AutoPersistenceModel prior to + the generation of mappings. + + + + + Alter the model + + AutoPersistenceModel instance to alter + + + + Constructor for AutoMappingOverrideAlteration. + + Assembly to load overrides from. + + + + Alter the model + + + Finds all types in the assembly (passed in the constructor) that implement IAutoMappingOverride<T>, then + creates an AutoMapping<T> and applies the override to it. + + AutoPersistenceModel instance to alter + + + + A mapping override for an auto mapped entity. + + Entity who's auto-mapping you're overriding + + + + Alter the automapping for this type + + Automapping + + + + Facade over an assembly for retrieving type instances. + + + + + A source for Type instances, acts as a facade for an Assembly or as an alternative Type provider. + + + + + Defines a property to be used as a key for this composite-id. + + A member access lambda expression for the property + The composite identity part fluent interface + + + + Defines a property to be used as a key for this composite-id with an explicit column name. + + A member access lambda expression for the property + The column name in the database to use for this key, or null to use the property name + The composite identity part fluent interface + + + + Defines a property to be used as a key for this composite-id with an explicit column name. + + A member access lambda expression for the property + Additional settings for the key property + The composite identity part fluent interface + + + + Defines a reference to be used as a many-to-one key for this composite-id with an explicit column name. + + A member access lambda expression for the property + The composite identity part fluent interface + + + + Defines a reference to be used as a many-to-one key for this composite-id with an explicit column name. + + A member access lambda expression for the property + A list of column names used for this key + The composite identity part fluent interface + + + + Defines a reference to be used as a many-to-one key for this composite-id with an explicit column name. + + A member access lambda expression for the property + A lambda expression specifying additional settings for the key reference + A list of column names used for this key + The composite identity part fluent interface + + + + Specifies that this composite id is "mapped"; aka, a composite id where + the properties exist in the identity class as well as in the entity itself + + + + + Specifies the unsaved value for the identity + + Unsaved value + + + + You may use a component as an identifier of an entity class. Your component class must + satisfy certain requirements: + + * It must be Serializable. + * It must re-implement Equals() and GetHashCode(), consistently with the database's + notion of composite key equality. + + You can't use an IIdentifierGenerator to generate composite keys. Instead the application + must assign its own identifiers. Since a composite identifier must be assigned to the object + before saving it, we can't use unsaved-value of the identifier to distinguish between newly + instantiated instances and instances saved in a previous session. You may instead implement + IInterceptor.IsUnsaved() if you wish to use SaveOrUpdate() or cascading save / update. As an + alternative, you may also set the unsaved-value attribute on a version or timestamp to specify + a value that indicates a new transient instance. In this case, the version of the entity is + used instead of the (assigned) identifier and you don't have to implement + IInterceptor.IsUnsaved() yourself. + + The property of component type that holds the composite identifier. + + Your persistent class must override Equals() and GetHashCode() to implement composite identifier + equality. It must also be Serializable. + + + + + Set the access and naming strategy for this identity. + + + + + Invert the next boolean operation + + + + + Create a property mapping. + + Property to map + + Map(x => x.Name); + + + + + Create a property mapping. + + Property to map + Property column name + + Map(x => x.Name, "person_name"); + + + + + Create a reference to another entity. In database terms, this is a many-to-one + relationship. + + Other entity + Property on the current entity + + References(x => x.Company); + + + + + Create a reference to another entity. In database terms, this is a many-to-one + relationship. + + Other entity + Property on the current entity + Column name + + References(x => x.Company, "company_id"); + + + + + Create a reference to another entity. In database terms, this is a many-to-one + relationship. + + Other entity + Property on the current entity + + References(x => x.Company, "company_id"); + + + + + Create a reference to another entity. In database terms, this is a many-to-one + relationship. + + Other entity + Property on the current entity + Column name + + References(x => x.Company, "company_id"); + + + + + Create a reference to any other entity. This is an "any" polymorphic relationship. + + Other entity to reference + Property + + + + Create a reference to another entity based exclusively on the primary-key values. + This is sometimes called a one-to-one relationship, in database terms. Generally + you should use + whenever possible. + + Other entity + Property + + HasOne(x => x.ExtendedInfo); + + + + + Create a reference to another entity based exclusively on the primary-key values. + This is sometimes called a one-to-one relationship, in database terms. Generally + you should use + whenever possible. + + Other entity + Property + + HasOne(x => x.ExtendedInfo); + + + + + Create a dynamic component mapping. This is a dictionary that represents + a limited number of columns in the database. + + Property containing component + Component setup action + + DynamicComponent(x => x.Data, comp => + { + comp.Map(x => (int)x["age"]); + }); + + + + + Creates a component reference. This is a place-holder for a component that is defined externally with a + ; the mapping defined in said will be merged + with any options you specify from this call. + + Component type + Property exposing the component + Component reference builder + + + + Maps a component + + Type of component + Component property + Component mapping + + Component(x => x.Address, comp => + { + comp.Map(x => x.Street); + comp.Map(x => x.City); + }); + + + + + Maps a component + + Type of component + Component property + Component mapping + + Component(x => x.Address, comp => + { + comp.Map(x => x.Street); + comp.Map(x => x.City); + }); + + + + + Maps a collection of entities as a one-to-many + + Child entity type + Collection property + + HasMany(x => x.Locations); + + + + + Maps a collection of entities as a one-to-many + + Child entity type + Collection property + + HasMany(x => x.Locations); + + + + + Maps a collection of entities as a many-to-many + + Child entity type + Collection property + + HasManyToMany(x => x.Locations); + + + + + Maps a collection of entities as a many-to-many + + Child entity type + Collection property + + HasManyToMany(x => x.Locations); + + + + + Specify an insert stored procedure + + Stored procedure call + + + + Specify an update stored procedure + + Stored procedure call + + + + Specify an delete stored procedure + + Stored procedure call + + + + Specify an delete all stored procedure + + Stored procedure call + + + + Specifies an entity-name. + + See http://nhforge.org/blogs/nhibernate/archive/2008/10/21/entity-name-in-action-a-strongly-typed-entity.aspx + + + + Inverts the next boolean + + + + + Maps to the Join element in NH 2.0 + + + + + + Specify the key column name + + Column name + + + + Specify the schema + + Schema name + + + + Inverse the ownership of this relationship + + + + + Specify this relationship as optional + + + + + Specify the catalog + + Catalog + + + + Specify a subselect for fetching this join + + Query + + + + Specify the table name + + Table name + + + + Specify the fetching strategy + + + + + Invert the next boolean operation + + + + + Starting point for automapping your entities. + + + + + Automatically map classes in the assembly that contains . + + Class in the assembly you want to map + + + + Automatically map classes in the assembly that contains . + + Class in the assembly you want to map + Automapping configuration + + + + Automatically map the classes in . + + Assembly containing the classes to map + + + + Automatically map the classes in . + + Assembly containing the classes to map + Automapping configuration + + + + Automatically map the classes in each assembly supplied. + + Assemblies containing classes to map + + + + Automatically map the classes in each assembly supplied. + + Automapping configuration + Assemblies containing classes to map + + + + Automatically map the classes in each assembly supplied. + + Automapping configuration + Assemblies containing classes to map + + + + Automatically map the classes exposed through the supplied . + + containing classes to map + + + + Automatically map the classes exposed through the supplied . + + containing classes to map + Automapping configuration + + + + Automatically map the classes exposed through the supplied . + + containing classes to map + Criteria for selecting a subset of the types in the assembly for mapping + + + + Automatically map the classes in . + + Assembly containing the classes to map + Criteria for selecting a subset of the types in the assembly for mapping + + + + Automatically map classes in the assembly that contains . + + Class in the assembly you want to map + Criteria for selecting a subset of the types in the assembly for mapping + + + + Defines a mapping for an entity. Derive from this class to create a mapping, + and use the constructor to control how your entity is persisted. + + + public class PersonMap : ClassMap<Person> + { + public PersonMap() + { + Id(x => x.PersonId); + Map(x => x.Name); + Map(x => x.Age); + } + } + + Entity type to map + + + + Specify the identifier for this entity. + + Identity property + + Id(x => x.PersonId); + + + + + Specify the identifier for this entity. + + Identity property + Column name + + Id(x => x.PersonId, "id"); + + + + + Create an Id that doesn't have a corresponding property in + the domain object, or a column in the database. This is mainly + for use with read-only access and/or views. Defaults to an int + identity with an "increment" generator. + + + + + Create an Id that doesn't have a corresponding property in + the domain object, or a column in the database. This is mainly + for use with read-only access and/or views. + + Type of the id + + + + Create an Id that doesn't have a corresponding property in + the domain object. + + Type of the id + Name and column name of the id + + + + Create a natural identity. This is a secondary identifier + that has "business meaning" moreso than the primary key. + + + NaturalId() + .Property(x => x.Name); + + + + + Create a composite identity. This is an identity composed of multiple + columns. + Note: Prefer using a surrogate key over a composite key whenever possible. + + + CompositeId() + .KeyProperty(x => x.FirstName) + .KeyProperty(x => x.LastName); + + + + + Create a composite identity represented by an identity class. This is an + identity composed of multiple columns. + Note: Prefer using a surrogate key over a composite key whenever possible. + + Composite id property + + CompositeId(x => x.Id) + .KeyProperty(x => x.FirstName) + .KeyProperty(x => x.LastName); + + + + + Specifies that this class should be versioned/timestamped using the + given property. + + Version/timestamp property + + Version(x => x.Timestamp); + + + + + Specify that this entity should use a discriminator with it's subclasses. + This is a mapping strategy called table-per-inheritance-hierarchy; where all + subclasses are stored in the same table, differenciated by a discriminator + column value. + + Type of the discriminator column + Discriminator column name + Default discriminator value + + + + Specify that this entity should use a discriminator with it's subclasses. + This is a mapping strategy called table-per-inheritance-hierarchy; where all + subclasses are stored in the same table, differenciated by a discriminator + column value. + + Type of the discriminator column + Discriminator column name + + + + Specify that this entity should use a discriminator with it's subclasses. + This is a mapping strategy called table-per-inheritance-hierarchy; where all + subclasses are stored in the same table, differenciated by a discriminator + column value. + + Discriminator column name + + + + Specifies that any subclasses of this entity should be treated as union-subclass + mappings. Don't use this in combination with a discriminator, as they are mutually + exclusive. + + + + + Sets the schema for this class. + + Schema name + + + + Sets the table for the class. + + Table name + + + + Sets this entity to be lazy-loaded (overrides the default lazy load configuration). + + + + + Links this entity to another table, to create a composite entity from two or + more tables. + + Joined table name + Joined table mapping + + Join("another_table", join => + { + join.Map(x => x.Name); + join.Map(x => x.Age); + }); + + + + + Imports an existing type for use in the mapping. + + Type to import. + + + + Set the mutability of this class, sets the mutable attribute. + + + + + Sets this entity to be dynamic update + + + + + Sets this entity to be dynamic insert + + + + + Sets the query batch size for this entity. + + Batch size + + + + Specifies a check constraint + + Constraint name + + + + Specifies a persister to be used with this entity + + Persister type + + + + Specifies a persister to be used with this entity + + Persister type + + + + Specifies a persister to be used with this entity + + Persister type + + + + Specifies a proxy class for this entity. + + Proxy type + + + + Specifies a proxy class for this entity. + + Proxy type + + + + Specifies a proxy class for this entity. + + Proxy type + + + + Specifies that a select should be performed before updating + this entity + + + + + Defines a SQL 'where' clause used when retrieving objects of this type. + + + + + Sets the SQL statement used in subselect fetching. + + Subselect SQL Query + + + + Specifies an entity-name. + + See http://nhforge.org/blogs/nhibernate/archive/2008/10/21/entity-name-in-action-a-strongly-typed-entity.aspx + + + + Applies a filter to this entity given it's name. + + + Applies a filter to this entity given it's name. + + The filter's name + The condition to apply + + + + Applies a filter to this entity given it's name. + + + Applies a filter to this entity given it's name. + + The filter's name + + + + Applies a named filter to this entity. + + + Applies a named filter to this entity. + + The condition to apply + + The type of a implementation + defining the filter to apply. + + + + + Applies a named filter to this one-to-many. + + + The type of a implementation + defining the filter to apply. + + + + + Configures the tuplizer for this entity. The tuplizer defines how to transform + a Property-Value to its persistent representation, and viceversa a Column-Value + to its in-memory representation, and the EntityMode defines which tuplizer is in use. + + Tuplizer entity-mode + Tuplizer type + + + + Specify the caching for this entity. + + + Cache.ReadWrite(); + + + + + Specify settings for the container/hibernate-mapping for this class. + Note: Avoid using this, if possible prefer using conventions. + + + HibernateMapping.Schema("dto"); + + + + + Inverts the next boolean option + + + + + Sets the optimistic locking strategy + + + + + Sets the polymorphism behaviour + + + + + Sets the schema action behaviour + + + + + Flags a type as already mapped, stop it from being auto-mapped. + + + + + Creates an instance of an IAutoMappingAlteration from a type instance, then adds it to the alterations collection. + + Type of an IAutoMappingAlteration + + + + Creates an instance of an IAutoMappingAlteration from a generic type parameter, then adds it to the alterations collection. + + Type of an IAutoMappingAlteration + Container + + + + Adds an alteration + + Alteration to add + Container + + + + Adds all alterations from an assembly + + Assembly to search + Container + + + + Adds all alterations from an assembly that contains T. + + Type who's assembly to search + Container + + + + Apply alterations to an AutoPersisteceModel + + AutoPersistenceModel instance to apply alterations to + + + + Determines whether a member is to be automapped. + + + + + Determines whether a member is the identity of an entity. + + + + + Determines whether an abstract class is a layer supertype or part of a mapped inheritance hierarchy. + + + + + Specifies the value column used in a table of simple types. + + + + + Implement this interface to control how the automapper behaves. + Typically you're better off deriving from the + class, which is pre-configured with the default settings; you can then + just override specific methods that you'd like to alter. + + + + + Determines whether a type should be auto-mapped. + Override to restrict which types are mapped in your domain. + + + You normally want to override this method and restrict via something known, like + Namespace. + + + return type.Namespace.EndsWith("Domain"); + + Type to map + Should map type + + + + Determines whether a member of a type should be auto-mapped. + Override to restrict which members are considered in automapping. + + + You normally want to override this method to restrict which members will be + used for mapping. This method will be called for every property, field, and method + on your types. + + + // all writable public properties: + return member.IsProperty && member.IsPublic && member.CanWrite; + + Member to map + Should map member + + + + Determines whether a member is the id of an entity. + + + This method is called for each member that ShouldMap(Type) returns true for. + + Member + Member is id + + + + Gets the access strategy to be used for a read-only property. This method is + called for every setterless property and private-setter autoproperty in your + domain that has been accepted through . + + Member to get access strategy for + Access strategy + + + + Controls which side of a many-to-many relationship is considered the "parent". + + Left side of the relationship + Right side of the relationship + left or right + + + + Determines whether a type is a concrete, or instantiatable, base class. This + affects how the inheritance mappings are built, specifically that any types + this method returns true for will not be mapped as a subclass. + + Type + Base type is concrete? + + + + Specifies that a particular type should be mapped as a component rather than + an entity. + + Type + Type is a component? + + + + Gets the column prefix for a component. + + Member defining the component + Component column prefix + + + + Specifies whether a particular type is mapped with a discriminator. + This method will be called for every type that has already been + approved by . + + Type to check + Whether the type is to be discriminated + + + + Gets the column name of the discriminator. + + Type + Discriminator column name + + + + Specifies whether an abstract type is considered a Layer Supertype + (http://martinfowler.com/eaaCatalog/layerSupertype.html). Defaults to + true for all abstract classes. Override this method if you have an + abstract class that you want mapping as a regular entity. + + Abstract class type + Whether the type is a Layer Supertype + + + + Gets the value column for a collection of simple types. + + + This is the name of the <element> column. + + Collection property + Value column name + + + + Gets the steps that are executed to map a type. + + Collection of mapping steps + + + + Gets or sets whether validation of mappings is performed. + + + + + Specify alterations to be used with this AutoPersisteceModel + + Lambda to declare alterations + AutoPersistenceModel + + + + Use auto mapping overrides defined in the assembly of T. + + Type to get assembly from + AutoPersistenceModel + + + + Use auto mapping overrides defined in the assembly of T. + + Assembly to scan + AutoPersistenceModel + + + + Alter some of the configuration options that control how the automapper works. + Depreciated in favour of supplying your own IAutomappingConfiguration instance to AutoMap: . + Cannot be used in combination with a user-defined configuration. + + + + + Supply a criteria for which types will be mapped. + Cannot be used in combination with a user-defined configuration. + + Where clause + + + + Adds all entities from a specific assembly. + + Assembly to load from + + + + Adds all entities from the . + + to load from + + + + Override the mapping of a specific entity. + + This may affect subclasses, depending on the alterations you do. + Entity who's mapping to override + Lambda performing alterations + + + + Override all mappings. + + Currently only supports ignoring properties on all entities. + Lambda performing alterations + + + + Ignore a base type. This removes it from any mapped inheritance hierarchies, good for non-abstract layer + supertypes. + + Type to ignore + + + + Ignore a base type. This removes it from any mapped inheritance hierarchies, good for non-abstract layer + supertypes. + + Type to ignore + + + + Explicitly includes a type to be used as part of a mapped inheritance hierarchy. + + + Abstract classes are probably what you'll be using this method with. Fluent NHibernate considers abstract + classes to be layer supertypes, so doesn't automatically map them as part of an inheritance hierarchy. You + can use this method to override that behavior for a specific type; otherwise you should consider using the + setting. + + Type to include + + + + Explicitly includes a type to be used as part of a mapped inheritance hierarchy. + + + Abstract classes are probably what you'll be using this method with. Fluent NHibernate considers abstract + classes to be layer supertypes, so doesn't automatically map them as part of an inheritance hierarchy. You + can use this method to override that behavior for a specific type; otherwise you should consider using the + setting. + + Type to include + + + + Alter convention discovery + + + + + Sets whether this subclass is lazy loaded + + + + + + Specifies an entity-name. + + See http://nhforge.org/blogs/nhibernate/archive/2008/10/21/entity-name-in-action-a-strongly-typed-entity.aspx + + + + Inverts the next boolean + + + + + Provides types for mapping from multiple assemblies + + + + + Represents a string identifier for the model instance, used in conventions for a lazy + shortcut. + + e.g. for a ColumnMapping the StringIdentifierForModel would be the Name attribute, + this allows the user to find any columns with the matching name. + + + + + Sets the database dialect. This shouldn't be necessary + if you've used one of the provided database configurations. + + Configuration builder + + + + Sets the database dialect. This shouldn't be necessary + if you've used one of the provided database configurations. + + Configuration builder + + + + Sets the default database schema + + Default schema name + Configuration builder + + + + Enables the outer-join option. + + Configuration builder + + + + Sets the max fetch depth. + + Max fetch depth + Configuration builder + + + + Enables the reflection optimizer. + + Configuration builder + + + + Sets any query stubstitutions that NHibernate should + perform. + + Substitutions + Configuration builder + + + + Enables the show SQL option. + + Configuration builder + + + + Enables the format SQL option. + + Configuration builder + + + + Sets the database provider. This shouldn't be necessary + if you're using one of the provided database configurations. + + Provider type + Configuration builder + + + + Sets the database provider. This shouldn't be necessary + if you're using one of the provided database configurations. + + Provider type + Configuration builder + + + + Specify the database driver. This isn't necessary + if you're using one of the provided database configurations. + + Driver type + Configuration builder + + + + Specify the database driver. This isn't necessary + if you're using one of the provided database configurations. + + Driver type + Configuration builder + + + + Configure the connection string + + + ConnectionString(x => + { + x.Server("db_server"); + x.Database("Products"); + }); + + Closure for building the connection string + Configuration builder + + + + Set the connection string. + + Connection string to use + Configuration builder + + + + Configure caching. + + + Cache(x => + { + x.UseQueryCache(); + x.UseMinimalPuts(); + }); + + Closure for configuring caching + Configuration builder + + + + Sets a raw property on the NHibernate configuration. Use this method + if there isn't a specific option available in the API. + + Setting key + Setting value + Configuration builder + + + + Sets the proxyfactory.factory_class property. + NOTE: NHibernate 2.1 only + + factory class + Configuration + + + + Sets the proxyfactory.factory_class property. + NOTE: NHibernate 2.1 only + + factory class + Configuration + + + + Sets the proxyfactory.factory_class property. + NOTE: NHibernate 2.1 only + + factory class + Configuration + + + + Sets the adonet.batch_size property. + + Batch size + Configuration + + + + Sets the current_session_context_class property. + + current session context class + Configuration + + + + Sets the current_session_context_class property. + + Implementation of ICurrentSessionContext to use + Configuration + + + + Sets the connection isolation level. NHibernate setting: connection.isolation + + Isolation level + Configuration builder + + + + Sets the connection isolation level. NHibernate setting: connection.isolation + + Isolation level + Configuration builder + + + + Negates the next boolean option. + + + + + Base class for attribute based conventions. Create a subclass of this to supply your own + attribute based conventions. + + Attribute identifier + + + + Basic convention interface. Don't use directly. + + Inspector instance for use in retrieving values and setting expectations + Apply instance + + + + Ignore - this is used for generic restrictions only + + + + + Apply changes to the target + + + + + Whether this convention will be applied to the target. + + Instace that could be supplied + Apply on this target? + + + + Apply changes to a property with an attribute matching T. + + Instance of attribute found on property. + Property with attribute + + + + Convention for identities, implement this interface to apply changes to + identity mappings. + + + + + Version convention, implement this interface to apply changes to vesion mappings. + + + + + Property convention, implement this interface to apply changes to + property mappings. + + + + + Convention for a component mapping. Implement this interface to + apply changes to components. + + + + + Convention for dynamic components. Implement this member to apply changes + to dynamic components. + + + + + Reference convention, implement this interface to apply changes to Reference/many-to-one + relationships. + + + + + HasOne convention, used for applying changes to one-to-one relationships. + + + + + Convention for the hibernate-mapping container for a class, this can be used to + set some class-wide settings such as lazy-load and access strategies. + + + + + Joined subclass convention, implement this interface to alter joined-subclass mappings. + + + + + Join convention, implement this interface to alter join mappings. + + + + + Convention for a single class mapping. Implement this interface to apply + changes to class mappings. + + + + + Subclass convention, implement this interface to alter subclass mappings. + + + + + Apply changes to the target + + + + + Apply changes to the target + + + + + Apply changes to the target + + + + + Apply changes to the target + + + + + Apply changes to the target + + + + + Represents a string identifier for the model instance, used in conventions for a lazy + shortcut. + + e.g. for a ColumnMapping the StringIdentifierForModel would be the Name attribute, + this allows the user to find any columns with the matching name. + + + + + Gets the requested value off the first column, as all columns are (currently) created equal + + + + + + + generates identifiers of any integral type that are unique only when no other + process is inserting data into the same table. Do not use in a cluster. + + + + + + generates identifiers of any integral type that are unique only when no other + process is inserting data into the same table. Do not use in a cluster. + + Params configuration + + + + supports identity columns in DB2, MySQL, MS SQL Server and Sybase. + The identifier returned by the database is converted to the property type using + Convert.ChangeType. Any integral property type is thus supported. + + + + + + supports identity columns in DB2, MySQL, MS SQL Server and Sybase. + The identifier returned by the database is converted to the property type using + Convert.ChangeType. Any integral property type is thus supported. + + Params configuration + + + + uses a sequence in DB2, PostgreSQL, Oracle or a generator in Firebird. + The identifier returned by the database is converted to the property type + using Convert.ChangeType. Any integral property type is thus supported. + + + + + + + uses a sequence in DB2, PostgreSQL, Oracle or a generator in Firebird. + The identifier returned by the database is converted to the property type + using Convert.ChangeType. Any integral property type is thus supported. + + + Params configuration + + + + uses a hi/lo algorithm to efficiently generate identifiers of any integral type, + given a table and column (by default hibernate_unique_key and next_hi respectively) + as a source of hi values. The hi/lo algorithm generates identifiers that are unique + only for a particular database. Do not use this generator with a user-supplied connection. + requires a "special" database table to hold the next available "hi" value + + The table. + The column. + The max lo. + The where. + + + + uses a hi/lo algorithm to efficiently generate identifiers of any integral type, + given a table and column (by default hibernate_unique_key and next_hi respectively) + as a source of hi values. The hi/lo algorithm generates identifiers that are unique + only for a particular database. Do not use this generator with a user-supplied connection. + requires a "special" database table to hold the next available "hi" value + + + + + + + + + uses a hi/lo algorithm to efficiently generate identifiers of any integral type, + given a table and column (by default hibernate_unique_key and next_hi respectively) + as a source of hi values. The hi/lo algorithm generates identifiers that are unique + only for a particular database. Do not use this generator with a user-supplied connection. + requires a "special" database table to hold the next available "hi" value + + + + + Params configuration + + + + uses a hi/lo algorithm to efficiently generate identifiers of any integral type, + given a table and column (by default hibernate_unique_key and next_hi respectively) + as a source of hi values. The hi/lo algorithm generates identifiers that are unique + only for a particular database. Do not use this generator with a user-supplied connection. + requires a "special" database table to hold the next available "hi" value + + + + + + + uses a hi/lo algorithm to efficiently generate identifiers of any integral type, + given a table and column (by default hibernate_unique_key and next_hi respectively) + as a source of hi values. The hi/lo algorithm generates identifiers that are unique + only for a particular database. Do not use this generator with a user-supplied connection. + requires a "special" database table to hold the next available "hi" value + + + Params configuration + + + + uses an Oracle-style sequence (where supported) + + + + + + + + uses an Oracle-style sequence (where supported) + + + + Params configuration + + + + uses System.Guid and its ToString(string format) method to generate identifiers + of type string. The length of the string returned depends on the configured format. + + http://msdn.microsoft.com/en-us/library/97af8hh4.aspx + + + + + uses System.Guid and its ToString(string format) method to generate identifiers + of type string. The length of the string returned depends on the configured format. + + http://msdn.microsoft.com/en-us/library/97af8hh4.aspx + Params configuration + + + + uses a new System.Guid to create a byte[] that is converted to a string. + + + + + + uses a new System.Guid to create a byte[] that is converted to a string. + + Params configuration + + + + uses a new System.Guid as the identifier. + + + + + + uses a new System.Guid as the identifier. + + Params configuration + + + + Recommended for Guid identifiers! + uses the algorithm to generate a new System.Guid described by Jimmy Nilsson + in the article http://www.informit.com/articles/article.asp?p=25862. + + + + + + Recommended for Guid identifiers! + uses the algorithm to generate a new System.Guid described by Jimmy Nilsson + in the article http://www.informit.com/articles/article.asp?p=25862. + + Params configuration + + + + Generator that uses the RDBMS native function to generate a GUID. + The behavior is similar to the “sequence” generator. When a new + object is saved NH run two queries: the first to retrieve the GUID + value and the second to insert the entity using the Guid retrieved + from the RDBMS. Your entity Id must be System.Guid and the SQLType + will depend on the dialect (RAW(16) in Oracle, UniqueIdentifier in + MsSQL for example). + + + + + Generator that uses the RDBMS native function to generate a GUID. + The behavior is similar to the “sequence” generator. When a new + object is saved NH run two queries: the first to retrieve the GUID + value and the second to insert the entity using the Guid retrieved + from the RDBMS. Your entity Id must be System.Guid and the SQLType + will depend on the dialect (RAW(16) in Oracle, UniqueIdentifier in + MsSQL for example). + + + GuidNative(x => + { + x.AddParam("key", "value"); + }); + + Parameter builder closure + + + + A deviation of the trigger-identity. This generator works + together with the feature. + The difference with trigger-identity is that the POID value + is retrieved by a SELECT using the natural-id fields as filter. + + + + + A deviation of the trigger-identity. This generator works + together with the feature. + The difference with trigger-identity is that the POID value + is retrieved by a SELECT using the natural-id fields as filter. + + + Select(x => + { + x.AddParam("key", "value"); + }); + + Parameter builder closure + + + + Based on sequence but works like an identity. The POID + value is retrieved with an INSERT query. Your entity Id must + be an integral type. + "hibernate_sequence" is the default name for the sequence, unless + another is provided. + + + + + Based on sequence but works like an identity. The POID + value is retrieved with an INSERT query. Your entity Id must + be an integral type. + "hibernate_sequence" is the default name for the sequence, unless + another is provided. + + Custom sequence name + + + + Based on sequence but works like an identity. The POID + value is retrieved with an INSERT query. Your entity Id must + be an integral type. + "hibernate_sequence" is the default name for the sequence, unless + another is provided. + + Parameter builder closure + + + + Based on sequence but works like an identity. The POID + value is retrieved with an INSERT query. Your entity Id must + be an integral type. + "hibernate_sequence" is the default name for the sequence, unless + another is provided. + + Custom sequence name + Parameter builder closure + + + + trigger-identity is a NHibernate specific feature where the POID + is generated by the RDBMS with an INSERT query through a + BEFORE INSERT trigger. In this case you can use any supported type, + including a custom type, with the limitation of a single column usage. + + + + + trigger-identity is a NHibernate specific feature where the POID + is generated by the RDBMS with an INSERT query through a + BEFORE INSERT trigger. In this case you can use any supported type, + including a custom type, with the limitation of a single column usage. + + Parameter builder closure + + + + lets the application to assign an identifier to the object before Save() is called. + + + + + + lets the application to assign an identifier to the object before Save() is called. + + Params configuration + + + + picks identity, sequence or hilo depending upon the capabilities of the underlying database. + + + + + + picks identity, sequence or hilo depending upon the capabilities of the underlying database. + + Params configuration + + + + picks identity, sequence or hilo depending upon the capabilities of the underlying database. + + + + + picks identity, sequence or hilo depending upon the capabilities of the underlying database. + + + + + uses the identifier of another associated object. Usually used in conjunction with a one-to-one primary key association. + + + + + + + uses the identifier of another associated object. Usually used in conjunction with a one-to-one primary key association. + + + Params configuration + + + + Specify the lazy behaviour of this relationship. + + + Defaults to Proxy lazy-loading. Use the modifier to disable + lazy-loading, and use the + overload to specify alternative lazy strategies. + + + LazyLoad(); + Not.LazyLoad(); + + + + + Specify the lazy behaviour of this relationship. Cannot be used + with the modifier. + + Laziness strategy + + LazyLoad(Laziness.NoProxy); + + + + + Adds a column to the index if columns have not yet been specified + + The column name to add + + + + Adds a column to the index if columns have not yet been specified + + The column name to add + + + + Specify the lazy behaviour of this relationship. + + + Defaults to Proxy lazy-loading. Use the modifier to disable + lazy-loading, and use the + overload to specify alternative lazy strategies. + + + LazyLoad(); + Not.LazyLoad(); + + + + + Specify the lazy behaviour of this relationship. Cannot be used + with the modifier. + + Laziness strategy + + LazyLoad(Laziness.NoProxy); + + + + + (optional) Specifies the entity from which this subclass descends/extends. + + Type of the entity to extend + + + + (optional) Specifies the entity from which this subclass descends/extends. + + Type of the entity to extend + + + + Checks whether a collection contains an inspector identified by the string value. + + + + + + + + + Checks whether a collection contains an inspector identified by a predicate. + + + + + + + + + (optional) Specifies the entity from which this subclass descends/extends. + + Type of the entity to extend + + + + (optional) Specifies the entity from which this subclass descends/extends. + + Type of the entity to extend + + + + Base convention for specifying your own many-to-many table naming style. Implement + the abstract members defined by this class to control how your join tables are named + for uni and bi-directional many-to-many's. + + + + + Gets the name used for bi-directional many-to-many tables. Implement this member to control how + your join table is named for bi-directional relationships. + + + This method will be called once per bi-directional relationship; once one side of the relationship + has been saved, then the other side will assume that name aswell. + + Main collection + Inverse collection + Many-to-many table name + + + + Gets the name used for uni-directional many-to-many tables. Implement this member to control how + your join table is named for uni-directional relationships. + + Main collection + Many-to-many table name + + + + A component that is declared external to a class mapping. + + + + + Determines the lazy-loading strategy for a collection mapping. + + + + + Collection will be eager loaded (lazy=false). + + + + + Collection will lazy loaded (lazy=true). + + + + + collection will be extra lazy loaded (lazy=extra). + + + "Extra" lazy collections are mostly similar to lazy=true, except certain operations on the collection will not load the whol collection + but issue a smarter SQL statement. For example, invoking Count on an extra-lazy collection will issue a "SELECT COUNT(*)..." rather than selecting + and loading the whole collection of entities. + + + + + This bad boy is the entry point to the visitor + + + + + + Laziness strategy for relationships + + + + + No lazy loading + + + + + Proxy-based lazy-loading + + + + + No proxy lazy loading + + + + + Defines a property to be used for this natural-id. + + A member access lambda expression for the property + The natural id part fluent interface + + + + Defines a property to be used for this natural-id with an explicit column name. + + A member access lambda expression for the property + The column name in the database to use for this natural id, or null to use the property name + The natural id part fluent interface + + + + Defines a reference to be used as a many-to-one key for this natural-id with an explicit column name. + + A member access lambda expression for the property + The natural ID part fluent interface + + + + Defines a reference to be used as a many-to-one key for this natural-id with an explicit column name. + + A member access lambda expression for the property + The column name in the database to use for this key, or null to use the property name + The natural id part fluent interface + + + + Specifies that this id is read-only + + This is the same as setting the mutable attribute to false + + + + Inverts the next boolean operation + + + + + Sets the tuplizer type. + + Type + + + + Sets the tuplizer type. + + Type + + + + Sets the tuplizer type. + + Type + + + + Sets the tuplizer mode + + Mode + + + + Specifies an entity-name. + + See http://nhforge.org/blogs/nhibernate/archive/2008/10/21/entity-name-in-action-a-strongly-typed-entity.aspx + + + Computes the Levenshtein Edit Distance between two enumerables. + The type of the items in the enumerables. + The first enumerable. + The second enumerable. + The edit distance. + + + + A reference to a component which is declared externally. Contains properties + that can't be declared externally (property name, for example) + + + + + Specify the column name + + Column name + + + + Specify the column length + + Column length + + + + Specify the nullability of the column + + + + + Specify the uniquness of the column + + + + + Specify the unique key constraint name + + Constraint name + + + + Specify the SQL type for the column + + SQL type + + + + Specify the index name + + Index name + + + + Inverts the next boolean + + + + + Defines a mapping for a component. Derive from this class to create a mapping, + and use the constructor to control how your component is persisted. + + + public class AddressMap : ComponentMap<Address> + { + public AddressMap() + { + Map(x => x.Street); + Map(x => x.City); + } + } + + Component type to map + + + + Specify a parent reference for this component + + Parent property + + ParentReference(x => x.Parent); + + + + + Specifies that this component is read-only + + + This is the same as calling both Not.Insert() and Not.Update() + + + + + Specifies that this component is insertable. + + + + + Specifies that this component is updatable + + + + + Specifies the uniqueness of this component + + + + + Specify that this component should be optimistically locked on access + + + + + Set the access and naming strategy for this component. + + + + + Invert the next boolean operation + + + + + Creates a component reference. This is a place-holder for a component that is defined externally with a + ; the mapping defined in said will be merged + with any options you specify from this call. + + Component type + Property exposing the component + Component reference builder + + + + The fluent-interface part for a external component reference. These are + components which have their bulk/body declared external to a class mapping + and are reusable. + + Component type + + + + Sets the prefix for any columns defined within the component. To refer to the property + that exposes this component use {property}. + + + // Entity using Address component + public class Person + { + public Address PostalAddress { get; set; } + } + + ColumnPrefix("{property}_") will result in any columns of Person.Address being prefixed with "PostalAddress_". + + Prefix for column names + + + + Maps to the Filter element in NH 2.0 + + + + + Specifies an entity-name. + + See http://nhforge.org/blogs/nhibernate/archive/2008/10/21/entity-name-in-action-a-strongly-typed-entity.aspx + + + + Inverts the next boolean + + + + + Defines how NHibernate will access the object for persisting/hydrating (Defaults to Property) + + + + + Implicit polymorphism + + + + + Explicit polymorphism + + + + + Takes a type that represents the level in the class/subclass-hiearchy that we're starting from, the parent, + this can be a class or subclass; also takes a list of subclass providers. The providers are then iterated + and added to a dictionary key'd by the types "distance" from the parentType; distance being the number of levels + between parentType and the subclass-type. + + By default if the Parent type is an interface the level will always be zero. At this time there is no check for + hierarchical interface inheritance. + + Starting point, parent type. + List of subclasses + Dictionary key'd by the distance from the parentType. + + + + The evalType starts out as the original subclass. The class hiearchy is only + walked if the subclass inherits from a class that is included in the subclassProviders. + + + + + + + + + The evalType is always one class higher in the hiearchy starting from the original subclass. The class + hiearchy is walked until the IsTopLevel (base class is Object) is met. The level is only incremented if + the subclass inherits from a class that is also in the subclassProviders. + + + + + + + + + Defines a mapping for an entity subclass. Derive from this class to create a mapping, + and use the constructor to control how your entity is persisted. + + + public class EmployeeMap : SubclassMap<Employee> + { + public EmployeeMap() + { + Map(x => x.Name); + Map(x => x.Age); + } + } + + Entity type to map + + + + (optional) Specifies that this subclass is abstract + + + + + Sets the dynamic insert behaviour + + + + + Sets the dynamic update behaviour + + + + + Specifies that this entity should be lazy loaded + + + + + Specify a proxy type for this entity + + Proxy type + + + + Specify a proxy type for this entity + + Proxy type + + + + Specify that a select should be performed before an update of this entity + + + + + Set the discriminator value, if this entity is in a table-per-class-hierarchy + mapping strategy. + + Discriminator value + + + + Sets the table name + + Table name + + + + Sets the schema + + Schema + + + + Specifies a check constraint + + Constraint name + + + + Adds a column to the key for this subclass, if used + in a table-per-subclass strategy. + + Column name + + + + Subselect query + + Subselect query + + + + Specifies a persister for this entity + + Persister type + + + + Specifies a persister for this entity + + Persister type + + + + Specifies a persister for this entity + + Persister type + + + + Set the query batch size + + Batch size + + + + Specifies an entity-name. + + See http://nhforge.org/blogs/nhibernate/archive/2008/10/21/entity-name-in-action-a-strongly-typed-entity.aspx + + + + Links this entity to another table, to create a composite entity from two or + more tables. This only works if you're in a table-per-inheritance-hierarchy + strategy. + + Joined table name + Joined table mapping + + Join("another_table", join => + { + join.Map(x => x.Name); + join.Map(x => x.Age); + }); + + + + + (optional) Specifies the entity from which this subclass descends/extends. + + Type of the entity to extend + + + + (optional) Specifies the entity from which this subclass descends/extends. + + Type of the entity to extend + + + + Inverts the next boolean setting + + + + + Container for automatic mappings + + + + + Add automatic mappings + + Lambda returning an auto mapping setup + Auto mappings configuration + + + + Add automatic mappings + + Auto mapping setup + Auto mappings configuration + + + + Sets the export location for generated mappings + + Path to folder for mappings + Auto mappings configuration + + + + Sets the text writer to write the generated mappings to. + + Fluent mappings configuration + + + + Applies any added mappings to the NHibernate Configuration + + NHibernate Configuration instance + + + + Gets whether any mappings were added + + + + + Initializes a new instance of the class using the + MS Oracle Client (System.Data.OracleClient) library specifying the Oracle 9i dialect. + + + + + Initializes a new instance of the class using the + MS Oracle Client (System.Data.OracleClient) library specifying the Oracle 10g dialect. + This allows for ANSI join syntax. + + + + + Initializes a new instance of the class using the + Oracle Data Provider (Oracle.DataAccess) library specifying the Oracle 8i dialect. + The Oracle.DataAccess library must be available to the calling application/library. + + + + + Initializes a new instance of the class using the + Oracle Data Provider (Oracle.DataAccess) library specifying the Oracle 9i dialect. + The Oracle.DataAccess library must be available to the calling application/library. + + + + + Initializes a new instance of the class using the + Oracle Data Provider (Oracle.DataAccess) library specifying the Oracle 10g dialect. + The Oracle.DataAccess library must be available to the calling application/library. + This allows for ANSI join syntax. + + + + + Specifies the server to connect. This can be either the DNS name of the + server or the IP (as a string). + + The server. + + + + + Specifies the instance (database name) to use. This can be the short name or the + fully qualified name (Oracle service name). + + The instance. + + + + + Specifies the name of the user account accessing the database. + + The username. + + + + + Specifies the password of the user account accessing the database. + + The password. + + + + + Optional. Ports the specified port the oracle database is running on. This defaults to 1521. + + The port. + + + + + Enable or disable pooling connections for this data configuration. + + if set to true enable pooling. + + + + + Specifies the SQL statement cache size to use for this connection. + + Size of the cache. + + + + + Specifies, as a string, other Oracle options to pass to the connection. + + The other options. + + + + + Initializes a new instance of the class using the + Oracle Data Provider (Oracle.DataAccess) library specifying the Oracle 9i dialect. + The Oracle.DataAccess library must be available to the calling application/library. + + + + + Initializes a new instance of the class using the + Oracle Data Provider (Oracle.DataAccess) library specifying the Oracle 10g dialect. + The Oracle.DataAccess library must be available to the calling application/library. + + + + + The type of authentication to be used. Acceptable values: + + + SERVER + + + SERVER_ENCRYPT + + + DATA_ENCRYPT + + + KERBEROS + + + GSSPLUGIN + + + + + IfxDRDAConnectionStringBuilder object + + + + The name of the database within the server instance. + + + IfxSQLIConnectionStringBuilder object + + + + + + true + - host variable (:param) support enabled. + + + false (default) + - host variable support disabled. + + + + + IfxSQLIConnectionStringBuilder object + + + + Isolation level for the connection. Possible values: + + + ReadCommitted + + + ReadUncommitted + + + RepeatableRead + + + Serializable + + + Transaction + + + This keyword is only supported for applications participating in a + distributed transaction. + + + IfxDRDAConnectionStringBuilder object + + + + The maximum number of connections allowed in the pool. + + + IfxDRDAConnectionStringBuilder object + + + + The minimum number of connections allowed in the pool. Default value 0. + + + IfxDRDAConnectionStringBuilder object + + + + The password associated with the User ID. + + + IfxDRDAConnectionStringBuilder object + + + + When set to true, the IfxConnection object is drawn from + the appropriate pool, or if necessary, it is created and added + to the appropriate pool. Default value 'true'. + + + IfxDRDAConnectionStringBuilder object + + + + Server name with optional port number for direct connection using either + IPv4 notation ([:]]]>) or IPv6 notation. + + + IfxDRDAConnectionStringBuilder object + + + + The login account. + + + IfxDRDAConnectionStringBuilder object + + + + Other options: Connection Lifetime, Connection Reset, Connection Timeout, CurrentSchema, Enlist, + Interrupt, Persist Security Info, ResultArrayAsReturnValue, Security, TrustedContextSystemUserID, + TrustedContextSystemPassword + + + IfxDRDAConnectionStringBuilder object + + + + Client locale, default value is en_us.CP1252 (Windows) + + + IfxSQLIConnectionStringBuilder object + + + + The name of the database within the server instance. + + + IfxSQLIConnectionStringBuilder object + + + + The language locale of the database. Default value is en_US.8859-1 + + + IfxSQLIConnectionStringBuilder object + + + + When set to true or y for yes, any string within double + quotes (") is treated as an identifier, and any string within + single quotes (') is treated as a string literal. Default value 'y'. + + + IfxSQLIConnectionStringBuilder object + + + + The name or IP address of the machine on which the + Informix server is running. Required. + + + IfxSQLIConnectionStringBuilder object + + + + The maximum number of connections allowed in the pool. Default value 100. + + + IfxSQLIConnectionStringBuilder object + + + + The minimum number of connections allowed in the pool. Default value 0. + + + IfxSQLIConnectionStringBuilder object + + + + The password associated with the User ID. Required if the + client machine or user account is not trusted by the host. + Prohibited if a User ID is not given. + + + IfxSQLIConnectionStringBuilder object + + + + When set to true, the IfxConnection object is drawn from + the appropriate pool, or if necessary, it is created and added + to the appropriate pool. Default value 'true'. + + + IfxSQLIConnectionStringBuilder object + + + + The name or alias of the instance of the Informix server to + which to connect. Required. + + + IfxSQLIConnectionStringBuilder object + + + + The service name or port number through which the server + is listening for connection requests. + + + IfxSQLIConnectionStringBuilder object + + + + The login account. Required, unless the client machine is + trusted by the host machine. + + + IfxSQLIConnectionStringBuilder object + + + + Other options like: Connection Lifetime, Enlist, Exclusive, Optimize OpenFetchClose, + Fetch Buffer Size, Persist Security Info, Protocol, Single Threaded, Skip Parsing + + + IfxSQLIConnectionStringBuilder object + + + + Fluent configuration API for NHibernate + + + + + Apply database settings + + Lambda returning database configuration + Fluent configuration + + + + Apply database settings + + Database configuration instance + Fluent configuration + + + + Apply mappings to NHibernate + + Lambda used to apply mappings + Fluent configuration + + + + Allows altering of the raw NHibernate Configuration object before creation + + Lambda used to alter Configuration + Fluent configuration + + + + Verify's the configuration and instructs NHibernate to build a SessionFactory. + + ISessionFactory from supplied settings. + + + + Verifies the configuration and populates the NHibernate Configuration instance. + + NHibernate Configuration instance + + + + Creates an exception based on the current state of the configuration. + + Inner exception + FluentConfigurationException with state + + + + Fluently configure NHibernate + + + + + Begin fluently configuring NHibernate + + Fluent Configuration + + + + Begin fluently configuring NHibernate + + Instance of an NHibernate Configuration + Fluent Configuration + + + + Container for fluent mappings + + + + + Add all fluent mappings in the assembly that contains T. + + Type from the assembly + Fluent mappings configuration + + + + Add all fluent mappings in the assembly + + Assembly to add mappings from + Fluent mappings configuration + + + + Adds a single represented by the specified type. + + Fluent mappings configuration + + + + Adds a single represented by the specified type. + + The type. + Fluent mappings configuration + + + + Sets the export location for generated mappings + + Path to folder for mappings + Fluent mappings configuration + + + + Sets the text writer to write the generated mappings to. + + Fluent mappings configuration + + + + Applies any added mappings to the NHibernate Configuration + + NHibernate Configuration instance + + + + Alter convention discovery + + + + + Gets whether any mappings were added + + + + + Container for Hbm mappings + + + + + Add explicit classes with Hbm mappings + + List of types to map + Hbm mappings configuration + + + + Add all Hbm mappings in the assembly that contains T. + + Type from the assembly + Hbm mappings configuration + + + + Add all Hbm mappings in the assembly + + Assembly to add mappings from + Hbm mappings configuration + + + + Applies any added mappings to the NHibernate Configuration + + NHibernate Configuration instance + + + + Gets whether any mappings were added + + + + + Fluent mapping configuration + + + + + Applies any mappings to the NHibernate Configuration + + NHibernate Configuration instance + + + + Fluent mappings + + + + + Automatic mapping configurations + + + + + Hbm mappings + + + + + Get whether any mappings of any kind were added + + + + + Convention finder - used to search through assemblies for types that implement a specific convention interface. + + + + + Add an assembly to be queried. + + + All convention types must have a parameterless constructor, or a single parameter of . + + Assembly instance to query + + + + Adds all conventions found in the assembly that contains . + + + All convention types must have a parameterless constructor, or a single parameter of . + + + + + Add a single convention by type. + + + Type must have a parameterless constructor, or a single parameter of . + + Convention type + + + + Add a single convention by type. + + + Types must have a parameterless constructor, or a single parameter of . + + Type of convention + + + + Add an instance of a convention. + + + Useful for supplying conventions that require extra constructor parameters. + + Convention type + Instance of convention + + + + Find any conventions implementing T. + + Convention interface type + IEnumerable of T + + + + Default convention finder - doesn't do anything special. + + + + + Find any conventions implementing T. + + Convention interface type + IEnumerable of T + + + + Add an assembly to be queried. + + + All convention types must have a parameterless constructor, or a single parameter of IConventionFinder. + + Assembly instance to query + + + + Adds all conventions found in the assembly that contains T. + + + All convention types must have a parameterless constructor, or a single parameter of IConventionFinder. + + + + + Add a single convention by type. + + + Type must have a parameterless constructor, or a single parameter of IConventionFinder. + + Convention type + + + + Add a single convention by type. + + + Types must have a parameterless constructor, or a single parameter of . + + Type of convention + + + + Add an instance of a convention. + + + Useful for supplying conventions that require extra constructor parameters. + + Convention type + Instance of convention + + + + Indicates whether the current is equal to another . + + + true if the current object is equal to the parameter; otherwise, false. + + An Entity to compare with this object. + + + + Determines whether the specified is equal to the current . + + + true if the specified is equal to the current ; otherwise, false. + + The to compare with the current . + The parameter is null.2 + + + + Serves as a hash function for a Entity. + + + A hash code for the current . + + 2 + + + + Set which type this subclass extends. + Note: This doesn't actually get output into the XML, it's + instead used as a marker for the + to pair things up. + + + + + Represents the "Any" mapping in NHibernate. It is impossible to specify a foreign key constraint for this kind of association. For more information + please reference chapter 5.2.4 in the NHibernate online documentation + + + + + Sets the meta-type value for this any mapping. + + Meta type + + + + Sets the meta-type value for this any mapping. + + Meta type + + + + Sets the meta-type value for this any mapping. + + Meta type + + + + Defines how NHibernate will access the object for persisting/hydrating (Defaults to Property) + + + + + Cascade style (Defaults to none) + + + + + Access strategy mapping builder. + + + + + Access strategy mapping builder. + + + + + Sets the access-strategy to property. + + + + + Sets the access-strategy to field. + + + + + Sets the access-strategy to use the backing-field of an auto-property. + + + + + Sets the access-strategy to field and the naming-strategy to camelcase (field.camelcase). + + + + + Sets the access-strategy to field and the naming-strategy to camelcase, with the specified prefix. + + Naming-strategy prefix + + + + Sets the access-strategy to field and the naming-strategy to lowercase. + + + + + Sets the access-strategy to field and the naming-strategy to lowercase, with the specified prefix. + + Naming-strategy prefix + + + + Sets the access-strategy to field and the naming-strategy to pascalcase, with the specified prefix. + + Naming-strategy prefix + + + + Sets the access-strategy to read-only property (nosetter) and the naming-strategy to camelcase. + + + + + Sets the access-strategy to read-only property (nosetter) and the naming-strategy to camelcase, with the specified prefix. + + Naming-strategy prefix + + + + Sets the access-strategy to read-only property (nosetter) and the naming-strategy to lowercase. + + + + + Sets the access-strategy to read-only property (nosetter) and the naming-strategy to lowercase. + + Naming-strategy prefix + + + + Sets the access-strategy to read-only property (nosetter) and the naming-strategy to pascalcase, with the specified prefix. + + Naming-strategy prefix + + + + Sets the access-strategy to use the type referenced. + + Assembly qualified name of the type to use as the access-strategy + + + + Sets the access-strategy to use the type referenced. + + Type to use as the access-strategy + + + + Sets the access-strategy to use the type referenced. + + Type to use as the access-strategy + + + + Force NHibernate to always select using the discriminator value, even when selecting all subclasses. This + can be useful when your table contains more discriminator values than you have classes (legacy). + + Sets the "force" attribute. + + + + Set this discriminator as read-only. Call this if your discriminator column is also part of a mapped composite identifier. + + Sets the "insert" attribute. + + + + An arbitrary SQL expression that is executed when a type has to be evaluated. Allows content-based discrimination. + + SQL expression + + + + Sets the precision for decimals + + Decimal precision + + + + Specifies the scale for decimals + + Decimal scale + + + + Specify the column length + + Column length + + + + Specify the nullability of this column + + + + + Specifies the uniqueness of this column + + + + + Specifies the unique key constraint name + + Constraint columns + + + + Specifies the index name + + Index name + + + + Specifies a check constraint name + + Constraint name + + + + Specifies the default value for the discriminator + + Default value + + + + Specifies a custom type for the discriminator + + + This is often used with + + Custom type + + + + Specifies a custom type for the discriminator + + + This is often used with + + Custom type + + + + Specifies a custom type for the discriminator + + + This is often used with + + Custom type + + + + Invert the next boolean operation + + + + + Pre-defined discriminator values + + + + + Null discriminator value + + + + + Non-null discriminator value + + + + + Specify the element column name + + Column name + + + + Specify the element type + + Element type + + + + Specify the element column length + + Column length + + + + Specify the element column formula + + Formula + + + + Modify the columns for this element + + + + + Sets caching to read-write + + + + + Sets caching to non-strict read-write + + + + + Sets caching to read-only + + + + + Sets caching to transactional + + + + + Specifies a custom cache behaviour + + Custom behaviour + + + + Specifies the cache region + + + + + + Include all properties for caching + + + + + + Include only non-lazy properties for caching + + + + + Specify a custom property inclusion strategy + + Inclusion strategy + + + + Base class for user type conventions. Create a subclass of this to automatically + map all properties that the user type can be used against. Override Accept or + Apply to alter the behavior. + + IUserType implementation + + + + Base class for attribute based conventions. Create a subclass of this to supply your own + attribute based conventions. + + Attribute identifier + + + + Apply changes to a property with an attribute matching T. + + Instance of attribute found on property. + Property with attribute + + + + Cascade all actions + + + + + Cascade no actions + + + + + Cascade saves and updates + + + + + Cascade deletes + + + + + Cascade all actions, deleting any orphaned records + + + + + Cascade deletes, deleting any orphaned records + + + + + Map a property + + Dictionary key + + Map("Age"); + + + + + Map a property + + Dictionary key + Property type + + Map<int>("Age"); + + + + + Join fetching + + + + + Select fetching + + + + + Subselect/subquery fetching + + + + + Specifies an entity-name. + + See http://nhforge.org/blogs/nhibernate/archive/2008/10/21/entity-name-in-action-a-strongly-typed-entity.aspx + + + + Thrown when a prefix is specified for an access-strategy that isn't supported. + + + + + Naming strategy prefix. + + + + + Property is never database generated + + + + + Property is only generated on insert + + + + + Property is always database generated + + + + + Checks a list of components for validity. + + Entity type + Type of list element + Persistence specification + Property + Value to save + Equality comparer + + + + Converts an expression to a best guess SQL string + + + + + Converts a Func expression to a best guess SQL string + + + + + Converts a boolean Func expression to a best guess SQL string + + + + + Gets the value of a method call. + + Method call expression + + + + Specify an alternative name for the type + + Alternative name + + + + Used to set the Not-Found attribute to ignore. This tells NHibernate to + return a null object rather then throw an exception when the join fails + + + + + Used to set the Not-Found attribute to exception (Nhibernate default). This + tells NHibernate to throw an exception when the join fails + + + + + Specifies the child class + + Child + + + + Specifies the child class + + Child + + + + Specifies that this relationship should be created with a default-named + foreign-key + + + + + Specify the foreign-key constraint name + + Foreign-key constraint + + + + Sets the property reference + + Property + + + + Sets the property reference + + Property + + + + Specifies that this relationship is constrained + + + + + Specify the lazy behaviour of this relationship. + + + Defaults to Proxy lazy-loading. Use the modifier to disable + lazy-loading, and use the + overload to specify alternative lazy strategies. + + + LazyLoad(); + Not.LazyLoad(); + + + + + Specify the lazy behaviour of this relationship. Cannot be used + with the modifier. + + Laziness strategy + + LazyLoad(Laziness.NoProxy); + + + + + Specifies an entity-name. + + See http://nhforge.org/blogs/nhibernate/archive/2008/10/21/entity-name-in-action-a-strongly-typed-entity.aspx + + + + Sets the fetch behaviour for this relationship + + + Fetch.Select(); + + + + + Sets the cascade behaviour for this relationship + + + Cascade.All(); + + + + + Specifies the access strategy for this relationship + + + Access.Field(); + + + + + Inverts the next boolean operation + + + + + No optimistic locking + + + + + Version locking + + + + + Dirty locking + + + + + Lock on everything + + + + + Use no locking strategy + + + + + Use version locking + + + + + Use dirty locking + + + + + Use all locking + + + + + This method is used to set a different key column in this table to be used for joins. + The output is set as the property-ref attribute in the "key" subelement of the collection + + The name of the column in this table which is linked to the foreign key + OneToManyPart + + + + Specify the lazy-load behaviour + + + + + Specify extra lazy loading + + + + + Inverse the ownership of this entity. Make the other side of the relationship + responsible for saving. + + + + + Use a set collection + + + + + Use a set collection + + Sorting + + + + Use a set collection + + Item comparer + + + + Use a bag collection + + + + + Use a list collection + + + + + Use a list collection with an index + + Index mapping + + + + Use a map collection + + Index type + Index property + + + + Use a map collection + + Index type + Index property + Sorting + + + + Use a map collection + + Index column name + + + + Use a map collection + + Index column name + Sorting + + + + Use a map collection + + Index type + Index column name + + + + Use a map collection + + Index type + Index column name + Sorting + + + + Use a map collection + + Index type + Comparer + Index column name + + + + Use a map collection + + Index type + Index property + Index mapping + + + + Use a map collection + + Index type + Index property + Index mapping + Sorting + + + + Use a map collection + + Index type + Index mapping + Element mapping + + + + Use an array + + Index type + Index property + + + + Use an array + + Index type + Index property + Index mapping + + + + Make this collection indexed + + Index type + Index property + Index mapping + + + + Make this collection index + + Index type + Index column + Index mapping + + + + Map an element/value type + + Column name + + + + Map an element/value type + + Column name + Custom mapping + + + + Maps this collection as a collection of components. + + Component mapping + + + + Sets the table name for this one-to-many. + + Table name + + + + Specify that the deletes should be cascaded + + + + + Specify a custom persister + + Persister + + + + Specify a check constraint + + Constraint name + + + + Specify that this collection is generic (optional) + + + + + Sets the where clause for this one-to-many relationship. + Note: This only supports simple cases, use the string overload for more complex clauses. + + + + + Sets the where clause for this one-to-many relationship. + + + + + Specify the select batch size + + Batch size + + + + Sets a custom collection type + + + + + Sets a custom collection type + + + + + Sets a custom collection type + + + + + Sets a custom collection type + + + + + Specify the table schema + + Schema name + + + + Specifies an entity-name. + + See http://nhforge.org/blogs/nhibernate/archive/2008/10/21/entity-name-in-action-a-strongly-typed-entity.aspx + + + + Applies a filter to this entity given it's name. + + + Applies a filter to this entity given it's name. + + The filter's name + The condition to apply + + + + Applies a filter to this entity given it's name. + + + Applies a filter to this entity given it's name. + + The filter's name + + + + Applies a named filter to this one-to-many. + + + Applies a named filter to this one-to-many. + + The condition to apply + + The type of a implementation + defining the filter to apply. + + + + + Applies a named filter to this one-to-many. + + + The type of a implementation + defining the filter to apply. + + + + + Specify caching for this entity. + + + + + Specify the cascade behaviour + + + + + Specify the fetching behaviour + + + + + Set the access and naming strategy for this one-to-many. + + + + + Specify the optimistic locking behaviour + + + + + Inverts the next boolean operation + + + + + Access strategy mapping builder. + + Mapping part to be applied to + + + + Access strategy mapping builder. + + Instance of the parent mapping part. + Setter for altering the model + + + + Sets the access-strategy to property. + + + + + Sets the access-strategy to field. + + + + + Sets the access-strategy to use the backing-field of an auto-property. + + + + + Sets the access-strategy to field and the naming-strategy to camelcase (field.camelcase). + + + + + Sets the access-strategy to field and the naming-strategy to camelcase, with the specified prefix. + + Naming-strategy prefix + + + + Sets the access-strategy to field and the naming-strategy to lowercase. + + + + + Sets the access-strategy to field and the naming-strategy to lowercase, with the specified prefix. + + Naming-strategy prefix + + + + Sets the access-strategy to field and the naming-strategy to pascalcase, with the specified prefix. + + Naming-strategy prefix + + + + Sets the access-strategy to read-only property (nosetter) and the naming-strategy to camelcase. + + + + + Sets the access-strategy to read-only property (nosetter) and the naming-strategy to camelcase, with the specified prefix. + + Naming-strategy prefix + + + + Sets the access-strategy to read-only property (nosetter) and the naming-strategy to lowercase. + + + + + Sets the access-strategy to read-only property (nosetter) and the naming-strategy to lowercase. + + Naming-strategy prefix + + + + Sets the access-strategy to read-only property (nosetter) and the naming-strategy to pascalcase, with the specified prefix. + + Naming-strategy prefix + + + + Sets the access-strategy to use the type referenced. + + Assembly qualified name of the type to use as the access-strategy + + + + Sets the access-strategy to use the type referenced. + + Type to use as the access-strategy + + + + Sets the access-strategy to use the type referenced. + + Type to use as the access-strategy + + + + Specify the lazy-load behaviour + + + + + Component-element for component HasMany's. + + Component type + + + + Map a property + + Property + + Map(x => x.Age); + + + + + Map a property + + Property + Column name + + Map(x => x.Age, "person_age"); + + + + + Create a reference to another entity. In database terms, this is a many-to-one + relationship. + + Other entity + Property on the current entity + + References(x => x.Company); + + + + + Create a reference to another entity. In database terms, this is a many-to-one + relationship. + + Other entity + Property on the current entity + Column name + + References(x => x.Company, "person_company_id"); + + + + + Maps a property of the component class as a reference back to the containing entity + + Parent reference property + Component being mapped + + + + Create a nested component mapping. + + Component property + Action for creating the component + + HasMany(x => x.Locations) + .Component(c => + { + c.Map(x => x.Name); + c.Component(x => x.Address, addr => + { + addr.Map(x => x.Street); + addr.Map(x => x.PostCode); + }); + }); + + + + + generates identifiers of any integral type that are unique only when no other + process is inserting data into the same table. Do not use in a cluster. + + + + + + generates identifiers of any integral type that are unique only when no other + process is inserting data into the same table. Do not use in a cluster. + + Params configuration + + + + supports identity columns in DB2, MySQL, MS SQL Server and Sybase. + The identifier returned by the database is converted to the property type using + Convert.ChangeType. Any integral property type is thus supported. + + + + + + supports identity columns in DB2, MySQL, MS SQL Server and Sybase. + The identifier returned by the database is converted to the property type using + Convert.ChangeType. Any integral property type is thus supported. + + Params configuration + + + + uses a sequence in DB2, PostgreSQL, Oracle or a generator in Firebird. + The identifier returned by the database is converted to the property type + using Convert.ChangeType. Any integral property type is thus supported. + + + + + + + uses a sequence in DB2, PostgreSQL, Oracle or a generator in Firebird. + The identifier returned by the database is converted to the property type + using Convert.ChangeType. Any integral property type is thus supported. + + + Params configuration + + + + uses a hi/lo algorithm to efficiently generate identifiers of any integral type, + given a table and column (by default hibernate_unique_key and next_hi respectively) + as a source of hi values. The hi/lo algorithm generates identifiers that are unique + only for a particular database. Do not use this generator with a user-supplied connection. + requires a "special" database table to hold the next available "hi" value + + The table. + The column. + The max lo. + The where. + + + + + uses a hi/lo algorithm to efficiently generate identifiers of any integral type, + given a table and column (by default hibernate_unique_key and next_hi respectively) + as a source of hi values. The hi/lo algorithm generates identifiers that are unique + only for a particular database. Do not use this generator with a user-supplied connection. + requires a "special" database table to hold the next available "hi" value + + + + + + + + + uses a hi/lo algorithm to efficiently generate identifiers of any integral type, + given a table and column (by default hibernate_unique_key and next_hi respectively) + as a source of hi values. The hi/lo algorithm generates identifiers that are unique + only for a particular database. Do not use this generator with a user-supplied connection. + requires a "special" database table to hold the next available "hi" value + + + + + Params configuration + + + + uses a hi/lo algorithm to efficiently generate identifiers of any integral type, + given a table and column (by default hibernate_unique_key and next_hi respectively) + as a source of hi values. The hi/lo algorithm generates identifiers that are unique + only for a particular database. Do not use this generator with a user-supplied connection. + requires a "special" database table to hold the next available "hi" value + + + + + + + uses a hi/lo algorithm to efficiently generate identifiers of any integral type, + given a table and column (by default hibernate_unique_key and next_hi respectively) + as a source of hi values. The hi/lo algorithm generates identifiers that are unique + only for a particular database. Do not use this generator with a user-supplied connection. + requires a "special" database table to hold the next available "hi" value + + + Params configuration + + + + uses an Oracle-style sequence (where supported) + + + + + + + + uses an Oracle-style sequence (where supported) + + + + Params configuration + + + + uses System.Guid and its ToString(string format) method to generate identifiers + of type string. The length of the string returned depends on the configured format. + + http://msdn.microsoft.com/en-us/library/97af8hh4.aspx + + + + + uses System.Guid and its ToString(string format) method to generate identifiers + of type string. The length of the string returned depends on the configured format. + + http://msdn.microsoft.com/en-us/library/97af8hh4.aspx + Params configuration + + + + uses a new System.Guid to create a byte[] that is converted to a string. + + + + + + uses a new System.Guid to create a byte[] that is converted to a string. + + Params configuration + + + + uses a new System.Guid as the identifier. + + + + + + uses a new System.Guid as the identifier. + + Params configuration + + + + Recommended for Guid identifiers! + uses the algorithm to generate a new System.Guid described by Jimmy Nilsson + in the article http://www.informit.com/articles/article.asp?p=25862. + + + + + + Recommended for Guid identifiers! + uses the algorithm to generate a new System.Guid described by Jimmy Nilsson + in the article http://www.informit.com/articles/article.asp?p=25862. + + Params configuration + + + + lets the application to assign an identifier to the object before Save() is called. + + + + + + lets the application to assign an identifier to the object before Save() is called. + + Params configuration + + + + picks identity, sequence or hilo depending upon the capabilities of the underlying database. + + + + + + picks identity, sequence or hilo depending upon the capabilities of the underlying database. + + Params configuration + + + + picks identity, sequence or hilo depending upon the capabilities of the underlying database. + + + + + picks identity, sequence or hilo depending upon the capabilities of the underlying database. + + + + + uses the identifier of another associated object. Usually used in conjunction with a one-to-one primary key association. + + + + + + + uses the identifier of another associated object. Usually used in conjunction with a one-to-one primary key association. + + + Params configuration + + + + Generator that uses the RDBMS native function to generate a GUID. + The behavior is similar to the “sequence” generator. When a new + object is saved NH run two queries: the first to retrieve the GUID + value and the second to insert the entity using the Guid retrieved + from the RDBMS. Your entity Id must be System.Guid and the SQLType + will depend on the dialect (RAW(16) in Oracle, UniqueIdentifier in + MsSQL for example). + + + + + Generator that uses the RDBMS native function to generate a GUID. + The behavior is similar to the “sequence” generator. When a new + object is saved NH run two queries: the first to retrieve the GUID + value and the second to insert the entity using the Guid retrieved + from the RDBMS. Your entity Id must be System.Guid and the SQLType + will depend on the dialect (RAW(16) in Oracle, UniqueIdentifier in + MsSQL for example). + + + GuidNative(x => + { + x.AddParam("key", "value"); + }); + + Parameter builder closure + + + + A deviation of the trigger-identity. This generator works + together with the feature. + The difference with trigger-identity is that the POID value + is retrieved by a SELECT using the natural-id fields as filter. + + + + + A deviation of the trigger-identity. This generator works + together with the feature. + The difference with trigger-identity is that the POID value + is retrieved by a SELECT using the natural-id fields as filter. + + + Select(x => + { + x.AddParam("key", "value"); + }); + + Parameter builder closure + + + + Based on sequence but works like an identity. The POID + value is retrieved with an INSERT query. Your entity Id must + be an integral type. + "hibernate_sequence" is the default name for the sequence, unless + another is provided. + + + + + Based on sequence but works like an identity. The POID + value is retrieved with an INSERT query. Your entity Id must + be an integral type. + "hibernate_sequence" is the default name for the sequence, unless + another is provided. + + Custom sequence name + + + + Based on sequence but works like an identity. The POID + value is retrieved with an INSERT query. Your entity Id must + be an integral type. + "hibernate_sequence" is the default name for the sequence, unless + another is provided. + + Parameter builder closure + + + + Based on sequence but works like an identity. The POID + value is retrieved with an INSERT query. Your entity Id must + be an integral type. + "hibernate_sequence" is the default name for the sequence, unless + another is provided. + + Custom sequence name + Parameter builder closure + + + + trigger-identity is a NHibernate specific feature where the POID + is generated by the RDBMS with an INSERT query through a + BEFORE INSERT trigger. In this case you can use any supported type, + including a custom type, with the limitation of a single column usage. + + + + + trigger-identity is a NHibernate specific feature where the POID + is generated by the RDBMS with an INSERT query through a + BEFORE INSERT trigger. In this case you can use any supported type, + including a custom type, with the limitation of a single column usage. + + Parameter builder closure + + + + Sets the unsaved-value of the identity. + + Value that represents an unsaved value. + + + + Sets the column name for the identity field. + + Column name + + + + Specify the identity column length + + Column length + + + + Specify the decimal precision + + Decimal precision + + + + Specify the decimal scale + + Decimal scale + + + + Specify the nullability of the identity column + + + + + Specify the uniqueness of the identity column + + + + + Specify a unique key constraint + + Constraint columns + + + + Specify a custom SQL type + + SQL type + + + + Specify an index name + + Index name + + + + Specify a check constraint + + Constraint name + + + + Specify a default value + + Default value + + + + Specify a custom type + + + This is usually used with an + + Custom type + + + + Specify a custom type + + + This is usually used with an + + Custom type + + + + Specify a custom type + + + This is usually used with an + + Custom type + + + + Specify the generator + + + Id(x => x.PersonId) + .GeneratedBy.Assigned(); + + + + + Set the access and naming strategy for this identity. + + + + + Invert the next boolean operation + + + + + Sets a single child key column. If there are multiple columns, use ChildKeyColumns.Add + + + + + Sets a single parent key column. If there are multiple columns, use ParentKeyColumns.Add + + + + + Sets the order-by clause on the collection element. + + + + + Sets the order-by clause on the many-to-many element. + + + + + Applies a filter to the child element of this entity given it's name. + + + Applies a filter to the child element of this entity given it's name. + + The filter's name + The condition to apply + + + + Applies a filter to the child element of this entity given it's name. + + + Applies a filter to the child element of this entity given it's name. + + The filter's name + + + + Applies a named filter to the child element of this many-to-many. + + + Applies a named filter to the child element of this many-to-many. + + The condition to apply + + The type of a implementation + defining the filter to apply. + + + + + Applies a named filter to the child element of this many-to-many. + + + The type of a implementation + defining the filter to apply. + + + + + Sets the where clause for this relationship, on the many-to-many element. + + + + + Sets whether this relationship is unique + + + Unique(); + Not.Unique(); + + + + + Specifies the name of a multi-column unique constraint. + + Name of constraint + + + + Specifies the index name + + Index name + + + + Specifies the child class of this relationship + + Child + + + + Specifies the child class of this relationship + + Child + + + + Sets this relationship to read-only + + + This is the same as calling both Not.Insert() and Not.Update() + + + ReadOnly(); + Not.ReadOnly(); + + + + + Specify the lazy behaviour of this relationship. + + + Defaults to Proxy lazy-loading. Use the modifier to disable + lazy-loading, and use the + overload to specify alternative lazy strategies. + + + LazyLoad(); + Not.LazyLoad(); + + + + + Specify the lazy behaviour of this relationship. Cannot be used + with the modifier. + + Laziness strategy + + LazyLoad(Laziness.NoProxy); + + + + + Specifies this relationship should be created with a default-named + foreign key. + + + + + Specifies the foreign-key constraint name + + Constraint name + + + + Specifies that this relationship is insertable + + + + + Specifies that this relationship is updatable + + + + + Sets the single column used in this relationship. Use + if you need to specify more than one column. + + Column name + + + + Specifies the columns used in this relationship + + Columns + + + + Specifies the columns used in this relationship + + Columns + + + + Specifies the sql formula used for this relationship + + Formula + + + + Specifies the property reference + + Property + + + + Specifies the property reference + + Property + + + + Sets this relationship to nullable + + + Nullable(); + Not.Nullable(); + + + + + Specifies an entity-name. + + See http://nhforge.org/blogs/nhibernate/archive/2008/10/21/entity-name-in-action-a-strongly-typed-entity.aspx + + + + Set the fetching strategy + + + Fetch.Select(); + + + + + Set the behaviour for when this relationship is null in the database + + + NotFound.Exception(); + + + + + Specifies the cascade behaviour for this relationship + + + Cascade.All(); + + + + + Specifies the access strategy for this relationship + + + Access.Field(); + + + + + Inverts the next boolean + + + + + Specify that this is a ternary association + + + + + Specify that this is a ternary association + + Index column + + + + Specify this as an entity map + + + + + Specify this as an entity map + + Index column + + + + Specify the key column name + + Column name + + + + Specify a foreign key constraint + + Constraint name + + + + Sets the order-by clause for this one-to-many relationship. + + + + + Specify that this collection is read-only + + + + + Specify a sub-select query for fetching this collection + + Query + + + + Specify that the key is updatable + + + + + Specify that the key is nullable + + + + + Specifies the behaviour for if this collection is not found + + + + + Specify the cascade behaviour + + + + + Modify the key columns collection + + + + + Specify the property column name + + Column name + + + + Specify that this property is insertable + + + + + Specify that this property is updatable + + + + + Specify the column length + + Column length + + + + Specify the nullability of this property + + + + + Specify that this property is read-only + + + + + Specify the property formula + + Formula + + + + Specify the lazy-loading behaviour + + + + + Specify an index name + + Index name + + + + Specifies that a custom type (an implementation of ) should be used for this property for mapping it to/from one or more database columns whose format or type doesn't match this .NET property. + + A type which implements . + This property mapping to continue the method chain + + + + Specifies that a custom type (an implementation of ) should be used for this property for mapping it to/from one or more database columns whose format or type doesn't match this .NET property. + + A type which implements . + This property mapping to continue the method chain + + + + Specifies that a custom type (an implementation of ) should be used for this property for mapping it to/from one or more database columns whose format or type doesn't match this .NET property. + + A type which implements . + This property mapping to continue the method chain + + + + Specifies that a custom type (an implementation of ) should be used for this property for mapping it to/from one or more database columns whose format or type doesn't match this .NET property. + + A function which returns a type which implements . The argument of the function is the mapped property type + This property mapping to continue the method chain + + + + Specify a custom SQL type + + SQL type + + + + Specify that this property has a unique constranit + + + + + Specify decimal precision + + Decimal precision + + + + Specify decimal scale + + Decimal scale + + + + Specify a default value + + Default value + + + + Specifies the name of a multi-column unique constraint. + + Name of constraint + + + + Specify that this property is optimistically locked + + + + + Specify a check constraint + + Constraint name + + + + Specify if this property is database generated + + + Generated.Insert(); + + + + + Modify the columns collection + + + + + Set the access and naming strategy for this property. + + + + + Inverts the next boolean + + + + + Specify the column name + + Column name + + + + Specify the unsaved value + + Unsaved value + + + + Specify the column length + + Column length + + + + Specify decimal precision + + Decimal precision + + + + Specify decimal scale + + Decimal scale + + + + Specify the nullability of the column + + + + + Specify the uniqueness of the column + + + + + Specify a unique key constraint + + Constraint columns + + + + Specify an index name + + Index name + + + + Specify a check constraint + + Constraint name + + + + Specify a default value + + Default value + + + + Specify a custom type + + Usually used with an + Custom type + + + + Specify a custom type + + Usually used with an + Custom type + + + + Specify a custom type + + Usually used with an + Custom type + + + + Specify a custom SQL type + + SQL type + + + + Specify if this version is database generated + + + + + Specify the access strategy + + + + + Invert the next boolean operation + + + + + Returns whether the user has set a value for a property. + + + + + Returns whether the user has set a value for a property. + + + + + Returns whether a property has any value, default or user specified. + + + + + + + + Reveals a hidden property or field for use instead of expressions. + + Entity type + Name of property or field + Expression for the hidden property or field + + + + Reveals a hidden property or field with a specific return type for use instead of expressions. + + Entity type + Property or field return type + Name of property or field + Expression for the hidden property or field + + + + Visitor that performs validation against the mapping model. + + + + + Gets or sets whether validation is performed. + + + + diff --git a/lib/Iesi.Collections.license.txt b/lib/Iesi.Collections.license.txt index 66c4a8dc5ba..37ee54c84bd 100644 --- a/lib/Iesi.Collections.license.txt +++ b/lib/Iesi.Collections.license.txt @@ -1,9 +1,9 @@ -Copyright 2002-2004 by Aidant Systems, Inc., and by Jason Smith. - -Copied from http://www.codeproject.com/csharp/sets.asp#xx703510xx that was posted by JasonSmith 12:13 2 Jan '04 - -Feel free to use this code any way you want to. As a favor to me, you can leave the copyright in there. You never know when someone might recognize your name! - -If you do use the code in a commercial product, I would appreciate hearing about it. This message serves as legal notice that I won't be suing you for royalties! The code is in the public domain. - -On the other hand, I don't provide support. The code is actually simple enough that it shouldn't need it. +Copyright 2002-2004 by Aidant Systems, Inc., and by Jason Smith. + +Copied from http://www.codeproject.com/csharp/sets.asp#xx703510xx that was posted by JasonSmith 12:13 2 Jan '04 + +Feel free to use this code any way you want to. As a favor to me, you can leave the copyright in there. You never know when someone might recognize your name! + +If you do use the code in a commercial product, I would appreciate hearing about it. This message serves as legal notice that I won't be suing you for royalties! The code is in the public domain. + +On the other hand, I don't provide support. The code is actually simple enough that it shouldn't need it. diff --git a/lib/Iesi.Collections.xml b/lib/Iesi.Collections.xml index 22ebfdec27e..0f9ca81ce33 100644 --- a/lib/Iesi.Collections.xml +++ b/lib/Iesi.Collections.xml @@ -1,1903 +1,1903 @@ - - - - Iesi.Collections - - - - -

DictionarySet is an abstract class that supports the creation of new Set - types where the underlying data store is an IDictionary instance.

- -

You can use any object that implements the IDictionary interface to hold set data. - You can define your own, or you can use one of the objects provided in the Framework. - The type of IDictionary you choose will affect both the performance and the behavior - of the Set using it.

- -

To make a Set typed based on your own IDictionary, simply derive a - new class with a constructor that takes no parameters. Some Set implmentations - cannot be defined with a default constructor. If this is the case for your class, - you will need to override Clone() as well.

- -

It is also standard practice that at least one of your constructors takes an ICollection or - an ISet as an argument.

-
-
- -

A collection that contains no duplicate elements. This class models the mathematical - Set abstraction, and is the base class for all other Set implementations. - The order of elements in a set is dependant on (a)the data-structure implementation, and - (b)the implementation of the various Set methods, and thus is not guaranteed.

- -

None of the Set implementations in this library are guranteed to be thread-safe - in any way unless wrapped in a SynchronizedSet.

- -

The following table summarizes the binary operators that are supported by the Set class.

- - - Operation - Description - Method - Operator - - - Union (OR) - Element included in result if it exists in either A OR B. - Union() - | - - - Intersection (AND) - Element included in result if it exists in both A AND B. - InterSect() - & - - - Exclusive Or (XOR) - Element included in result if it exists in one, but not both, of A and B. - ExclusiveOr() - ^ - - - Minus (n/a) - Take all the elements in A. Now, if any of them exist in B, remove - them. Note that unlike the other operators, A - B is not the same as B - A. - Minus() - - - - -
-
- - -

A collection that contains no duplicate elements. This interface models the mathematical - Set abstraction. - The order of elements in a set is dependant on (a)the data-structure implementation, and - (b)the implementation of the various Set methods, and thus is not guaranteed.

- -

None of the Set implementations in this library are guranteed to be thread-safe - in any way unless wrapped in a SynchronizedSet.

- -

The following table summarizes the binary operators that are supported by the Set class.

- - - Operation - Description - Method - - - Union (OR) - Element included in result if it exists in either A OR B. - Union() - - - Intersection (AND) - Element included in result if it exists in both A AND B. - InterSect() - - - Exclusive Or (XOR) - Element included in result if it exists in one, but not both, of A and B. - ExclusiveOr() - - - Minus (n/a) - Take all the elements in A. Now, if any of them exist in B, remove - them. Note that unlike the other operators, A - B is not the same as B - A. - Minus() - - -
-
- - - Performs a "union" of the two sets, where all the elements - in both sets are present. That is, the element is included if it is in either a or b. - Neither this set nor the input set are modified during the operation. The return value - is a Clone() of this set with the extra elements added in. - - A collection of elements. - A new Set containing the union of this Set with the specified collection. - Neither of the input objects is modified by the union. - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. That is, the element is included if it exists in - both sets. The Intersect() operation does not modify the input sets. It returns - a Clone() of this set with the appropriate elements removed. - - A set of elements. - The intersection of this set with a. - - - - Performs a "minus" of set b from set a. This returns a set of all - the elements in set a, removing the elements that are also in set b. - The original sets are not modified during this operation. The result set is a Clone() - of this Set containing the elements from the operation. - - A set of elements. - A set containing the elements from this set with the elements in a removed. - - - - Performs an "exclusive-or" of the two sets, keeping only the elements that - are in one of the sets, but not in both. The original sets are not modified - during this operation. The result set is a Clone() of this set containing - the elements from the exclusive-or operation. - - A set of elements. - A set containing the result of a ^ b. - - - - Returns if the set contains all the elements in the specified collection. - - A collection of objects. - if the set contains all the elements in the specified collection, otherwise. - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - is the object was added, if it was already present. - - - - Adds all the elements in the specified collection to the set if they are not already present. - - A collection of objects to add to the set. - is the set changed as a result of this operation, if not. - - - - Remove all the specified elements from this set, if they exist in this set. - - A collection of elements to remove. - if the set was modified as a result of this operation. - - - - Retains only the elements in this set that are contained in the specified collection. - - Collection that defines the set of elements to be retained. - if this set changed as a result of this operation. - - - - Returns if this set contains no elements. - - - - -

A collection that contains no duplicate elements. This interface models the mathematical - Set abstraction. - The order of elements in a set is dependant on (a)the data-structure implementation, and - (b)the implementation of the various Set methods, and thus is not guaranteed.

- -

None of the Set implementations in this library are guranteed to be thread-safe - in any way unless wrapped in a SynchronizedSet.

- -

The following table summarizes the binary operators that are supported by the Set class.

- - - Operation - Description - Method - - - Union (OR) - Element included in result if it exists in either A OR B. - Union() - - - Intersection (AND) - Element included in result if it exists in both A AND B. - InterSect() - - - Exclusive Or (XOR) - Element included in result if it exists in one, but not both, of A and B. - ExclusiveOr() - - - Minus (n/a) - Take all the elements in A. Now, if any of them exist in B, remove - them. Note that unlike the other operators, A - B is not the same as B - A. - Minus() - - -
-
- - - Performs a "union" of the two sets, where all the elements - in both sets are present. That is, the element is included if it is in either a or b. - Neither this set nor the input set are modified during the operation. The return value - is a Clone() of this set with the extra elements added in. - - A collection of elements. - A new Set containing the union of this Set with the specified collection. - Neither of the input objects is modified by the union. - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. That is, the element is included if it exists in - both sets. The Intersect() operation does not modify the input sets. It returns - a Clone() of this set with the appropriate elements removed. - - A set of elements. - The intersection of this set with a. - - - - Performs a "minus" of set b from set a. This returns a set of all - the elements in set a, removing the elements that are also in set b. - The original sets are not modified during this operation. The result set is a Clone() - of this Set containing the elements from the operation. - - A set of elements. - A set containing the elements from this set with the elements in a removed. - - - - Performs an "exclusive-or" of the two sets, keeping only the elements that - are in one of the sets, but not in both. The original sets are not modified - during this operation. The result set is a Clone() of this set containing - the elements from the exclusive-or operation. - - A set of elements. - A set containing the result of a ^ b. - - - - Returns if this set contains the specified element. - - The element to look for. - if this set contains the specified element, otherwise. - - - - Returns if the set contains all the elements in the specified collection. - - A collection of objects. - if the set contains all the elements in the specified collection, otherwise. - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - is the object was added, if it was already present. - - - - Adds all the elements in the specified collection to the set if they are not already present. - - A collection of objects to add to the set. - is the set changed as a result of this operation, if not. - - - - Removes the specified element from the set. - - The element to be removed. - if the set contained the specified element, otherwise. - - - - Remove all the specified elements from this set, if they exist in this set. - - A collection of elements to remove. - if the set was modified as a result of this operation. - - - - Retains only the elements in this set that are contained in the specified collection. - - Collection that defines the set of elements to be retained. - if this set changed as a result of this operation. - - - - Removes all objects from the set. - - - - - Returns if this set contains no elements. - - - - - Performs a "union" of the two sets, where all the elements - in both sets are present. That is, the element is included if it is in either a or b. - Neither this set nor the input set are modified during the operation. The return value - is a Clone() of this set with the extra elements added in. - - A collection of elements. - A new Set containing the union of this Set with the specified collection. - Neither of the input objects is modified by the union. - - - - Performs a "union" of two sets, where all the elements - in both are present. That is, the element is included if it is in either a or b. - The return value is a Clone() of one of the sets (a if it is not ) with elements of the other set - added in. Neither of the input sets is modified by the operation. - - A set of elements. - A set of elements. - A set containing the union of the input sets. if both sets are . - - - - Performs a "union" of two sets, where all the elements - in both are present. That is, the element is included if it is in either a or b. - The return value is a Clone() of one of the sets (a if it is not ) with elements of the other set - added in. Neither of the input sets is modified by the operation. - - A set of elements. - A set of elements. - A set containing the union of the input sets. if both sets are . - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. That is, the element is included if it exists in - both sets. The Intersect() operation does not modify the input sets. It returns - a Clone() of this set with the appropriate elements removed. - - A set of elements. - The intersection of this set with a. - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. That is, the element is included only if it exists in - both a and b. Neither input object is modified by the operation. - The result object is a Clone() of one of the input objects (a if it is not ) containing the - elements from the intersect operation. - - A set of elements. - A set of elements. - The intersection of the two input sets. if both sets are . - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. That is, the element is included only if it exists in - both a and b. Neither input object is modified by the operation. - The result object is a Clone() of one of the input objects (a if it is not ) containing the - elements from the intersect operation. - - A set of elements. - A set of elements. - The intersection of the two input sets. if both sets are . - - - - Performs a "minus" of set b from set a. This returns a set of all - the elements in set a, removing the elements that are also in set b. - The original sets are not modified during this operation. The result set is a Clone() - of this Set containing the elements from the operation. - - A set of elements. - A set containing the elements from this set with the elements in a removed. - - - - Performs a "minus" of set b from set a. This returns a set of all - the elements in set a, removing the elements that are also in set b. - The original sets are not modified during this operation. The result set is a Clone() - of set a containing the elements from the operation. - - A set of elements. - A set of elements. - A set containing A - B elements. if a is . - - - - Performs a "minus" of set b from set a. This returns a set of all - the elements in set a, removing the elements that are also in set b. - The original sets are not modified during this operation. The result set is a Clone() - of set a containing the elements from the operation. - - A set of elements. - A set of elements. - A set containing A - B elements. if a is . - - - - Performs an "exclusive-or" of the two sets, keeping only the elements that - are in one of the sets, but not in both. The original sets are not modified - during this operation. The result set is a Clone() of this set containing - the elements from the exclusive-or operation. - - A set of elements. - A set containing the result of a ^ b. - - - - Performs an "exclusive-or" of the two sets, keeping only the elements that - are in one of the sets, but not in both. The original sets are not modified - during this operation. The result set is a Clone() of one of the sets - (a if it is not ) containing - the elements from the exclusive-or operation. - - A set of elements. - A set of elements. - A set containing the result of a ^ b. if both sets are . - - - - Performs an "exclusive-or" of the two sets, keeping only the elements that - are in one of the sets, but not in both. The original sets are not modified - during this operation. The result set is a Clone() of one of the sets - (a if it is not ) containing - the elements from the exclusive-or operation. - - A set of elements. - A set of elements. - A set containing the result of a ^ b. if both sets are . - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - is the object was added, if it was already present. - - - - Adds all the elements in the specified collection to the set if they are not already present. - - A collection of objects to add to the set. - is the set changed as a result of this operation, if not. - - - - Removes all objects from the set. - - - - - Returns if this set contains the specified element. - - The element to look for. - if this set contains the specified element, otherwise. - - - - Returns if the set contains all the elements in the specified collection. - - A collection of objects. - if the set contains all the elements in the specified collection, otherwise. - - - - Removes the specified element from the set. - - The element to be removed. - if the set contained the specified element, otherwise. - - - - Remove all the specified elements from this set, if they exist in this set. - - A collection of elements to remove. - if the set was modified as a result of this operation. - - - - Retains only the elements in this set that are contained in the specified collection. - - Collection that defines the set of elements to be retained. - if this set changed as a result of this operation. - - - - Returns a clone of the Set instance. This will work for derived Set - classes if the derived class implements a constructor that takes no arguments. - - A clone of this object. - - - - Copies the elements in the Set to an array. The type of array needs - to be compatible with the objects in the Set, obviously. - - An array that will be the target of the copy operation. - The zero-based index where copying will start. - - - - Gets an enumerator for the elements in the Set. - - An IEnumerator over the elements in the Set. - - - - Performs CopyTo when called trhough non-generic ISet (ICollection) interface - - - - - - - Performs Union when called trhough non-generic ISet interface - - - - - - - Performs Minus when called trhough non-generic ISet interface - - - - - - - Performs Intersect when called trhough non-generic ISet interface - - - - - - - Performs ExclusiveOr when called trhough non-generic ISet interface - - - - - - - Returns if this set contains no elements. - - - - - The number of elements currently contained in this collection. - - - - - Returns if the Set is synchronized across threads. Note that - enumeration is inherently not thread-safe. Use the SyncRoot to lock the - object during enumeration. - - - - - An object that can be used to synchronize this collection to make it thread-safe. - When implementing this, if your object uses a base object, like an IDictionary, - or anything that has a SyncRoot, return that object instead of "this". - - - - - Indicates whether the given instance is read-only or not - - - if the ISet is read-only; otherwise, . - In the default implementation of Set, this property always returns false. - - - - - Provides the storage for elements in the Set, stored as the key-set - of the IDictionary object. Set this object in the constructor - if you create your own Set class. - - - - - Adds the specified element to this set if it is not already present. - - The to add to the set. - is the object was added, if it was already present. - - - - Adds all the elements in the specified collection to the set if they are not already present. - - A collection of objects to add to the set. - is the set changed as a result of this operation, if not. - - - - Removes all objects from the set. - - - - - Returns if this set contains the specified element. - - The element to look for. - if this set contains the specified element, otherwise. - - - - Returns if the set contains all the elements in the specified collection. - - A collection of objects. - if the set contains all the elements in the specified collection, otherwise. - - - - Removes the specified element from the set. - - The element to be removed. - if the set contained the specified element, otherwise. - - - - Remove all the specified elements from this set, if they exist in this set. - - A collection of elements to remove. - if the set was modified as a result of this operation. - - - - Retains only the elements in this set that are contained in the specified collection. - - Collection that defines the set of elements to be retained. - if this set changed as a result of this operation. - - - - Copies the elements in the Set to an array of T. The type of array needs - to be compatible with the objects in the Set, obviously. - - An array that will be the target of the copy operation. - The zero-based index where copying will start. - - - - Gets an enumerator for the elements in the Set. - - An IEnumerator over the elements in the Set. - - - - Copies the elements in the Set to an array. The type of array needs - to be compatible with the objects in the Set, obviously. Needed for - non-generic ISet methods implementation - - An array that will be the target of the copy operation. - The zero-based index where copying will start. - - - - The placeholder object used as the value for the IDictionary instance. - - - There is a single instance of this object globally, used for all Sets. - - - - - Returns if this set contains no elements. - - - - - The number of elements contained in this collection. - - - - - None of the objects based on DictionarySet are synchronized. Use the - SyncRoot property instead. - - - - - Returns an object that can be used to synchronize the Set between threads. - - - - - Indicates wether the Set is read-only or not - - - - - Implements a Set based on a Dictionary (which is equivalent of - non-genric HashTable) This will give the best lookup, add, and remove - performance for very large data-sets, but iteration will occur in no particular order. - - - - - Creates a new set instance based on a Dictinary. - - - - - Creates a new set instance based on a Dictinary and - initializes it based on a collection of elements. - - A collection of elements that defines the initial set contents. - - - -

Implements an immutable (read-only) Set wrapper.

-

Although this is advertised as immutable, it really isn't. Anyone with access to the - basisSet can still change the data-set. So GetHashCode() is not implemented - for this Set, as is the case for all Set implementations in this library. - This design decision was based on the efficiency of not having to Clone() the - basisSet every time you wrap a mutable Set.

-
-
- - - Constructs an immutable (read-only) Set wrapper. - - The Set that is wrapped. - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - nothing - is always thrown - - - - Adds all the elements in the specified collection to the set if they are not already present. - - A collection of objects to add to the set. - nothing - is always thrown - - - - Removes all objects from the set. - - is always thrown - - - - Returns if this set contains the specified element. - - The element to look for. - if this set contains the specified element, otherwise. - - - - Returns if the set contains all the elements in the specified collection. - - A collection of objects. - if the set contains all the elements in the specified collection, otherwise. - - - - Removes the specified element from the set. - - The element to be removed. - nothing - is always thrown - - - - Remove all the specified elements from this set, if they exist in this set. - - A collection of elements to remove. - nothing - is always thrown - - - - Retains only the elements in this set that are contained in the specified collection. - - Collection that defines the set of elements to be retained. - nothing - is always thrown - - - - Copies the elements in the Set to an array of T. The type of array needs - to be compatible with the objects in the Set, obviously. - - An array that will be the target of the copy operation. - The zero-based index where copying will start. - - - - Gets an enumerator for the elements in the Set. - - An IEnumerator over the elements in the Set. - - - - Returns a clone of the Set instance. - - A clone of this object. - - - - Performs a "union" of the two sets, where all the elements - in both sets are present. That is, the element is included if it is in either a or b. - Neither this set nor the input set are modified during the operation. The return value - is a Clone() of this set with the extra elements added in. - - A collection of elements. - A new Set containing the union of this Set with the specified collection. - Neither of the input objects is modified by the union. - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. That is, the element is included if it exists in - both sets. The Intersect() operation does not modify the input sets. It returns - a Clone() of this set with the appropriate elements removed. - - A set of elements. - The intersection of this set with a. - - - - Performs a "minus" of set b from set a. This returns a set of all - the elements in set a, removing the elements that are also in set b. - The original sets are not modified during this operation. The result set is a Clone() - of this Set containing the elements from the operation. - - A set of elements. - A set containing the elements from this set with the elements in a removed. - - - - Performs an "exclusive-or" of the two sets, keeping only the elements that - are in one of the sets, but not in both. The original sets are not modified - during this operation. The result set is a Clone() of this set containing - the elements from the exclusive-or operation. - - A set of elements. - A set containing the result of a ^ b. - - - - Performs CopyTo when called trhough non-generic ISet (ICollection) interface - - - - - - - Performs Union when called trhough non-generic ISet interface - - - - - - - Performs Minus when called trhough non-generic ISet interface - - - - - - - Performs Intersect when called trhough non-generic ISet interface - - - - - - - Performs ExclusiveOr when called trhough non-generic ISet interface - - - - - - - Returns if this set contains no elements. - - - - - The number of elements contained in this collection. - - - - - Returns an object that can be used to synchronize use of the Set across threads. - - - - - Returns an object that can be used to synchronize the Set between threads. - - - - - Indicates that the given instance is read-only - - - - - Implements an ordered Set based on a dictionary. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - A collection of elements that defines the initial set contents. - - - - Implements a Set based on a sorted tree. This gives good performance for operations on very - large data-sets, though not as good - asymptotically - as a HashedSet. However, iteration - occurs in order. Elements that you put into this type of collection must implement IComparable, - and they must actually be comparable. You can't mix string and int values, for example. - - - - - Creates a new set instance based on a sorted tree. - - - - - Creates a new set instance based on a sorted tree. - - The to use for sorting. - - - - Creates a new set instance based on a sorted tree and - initializes it based on a collection of elements. - - A collection of elements that defines the initial set contents. - - - - Creates a new set instance based on a sorted tree and - initializes it based on a collection of elements. - - A collection of elements that defines the initial set contents. - - - - Creates a new set instance based on a sorted tree and - initializes it based on a collection of elements. - - A collection of elements that defines the initial set contents. - The to use for sorting. - - - -

Implements a thread-safe Set wrapper. The implementation is extremely conservative, - serializing critical sections to prevent possible deadlocks, and locking on everything. - The one exception is for enumeration, which is inherently not thread-safe. For this, you - have to lock the SyncRoot object for the duration of the enumeration.

-
-
- - - Constructs a thread-safe Set wrapper. - - The Set object that this object will wrap. - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - is the object was added, if it was already present. - - - - Adds all the elements in the specified collection to the set if they are not already present. - - A collection of objects to add to the set. - is the set changed as a result of this operation, if not. - - - - Removes all objects from the set. - - - - - Returns if this set contains the specified element. - - The element to look for. - if this set contains the specified element, otherwise. - - - - Returns if the set contains all the elements in the specified collection. - - A collection of objects. - if the set contains all the elements in the specified collection, otherwise. - - - - Removes the specified element from the set. - - The element to be removed. - if the set contained the specified element, otherwise. - - - - Remove all the specified elements from this set, if they exist in this set. - - A collection of elements to remove. - if the set was modified as a result of this operation. - - - - Retains only the elements in this set that are contained in the specified collection. - - Collection that defines the set of elements to be retained. - if this set changed as a result of this operation. - - - - Copies the elements in the Set to an array. The type of array needs - to be compatible with the objects in the Set, obviously. - - An array that will be the target of the copy operation. - The zero-based index where copying will start. - - - - Enumeration is, by definition, not thread-safe. Use a lock on the SyncRoot - to synchronize the entire enumeration process. - - - - - - Returns a clone of the Set instance. - - A clone of this object. - - - - Performs CopyTo when called trhough non-generic ISet (ICollection) interface - - - - - - - Returns if this set contains no elements. - - - - - The number of elements contained in this collection. - - - - - Returns , indicating that this object is thread-safe. The exception to this - is enumeration, which is inherently not thread-safe. Use the SyncRoot object to - lock this object for the entire duration of the enumeration. - - - - - Returns an object that can be used to synchronize the Set between threads. - - - - - Indicates whether given instace is read-only or not - - - - -

DictionarySet is an abstract class that supports the creation of new Set - types where the underlying data store is an IDictionary instance.

- -

You can use any object that implements the IDictionary interface to hold set data. - You can define your own, or you can use one of the objects provided in the Framework. - The type of IDictionary you choose will affect both the performance and the behavior - of the Set using it.

- -

To make a Set typed based on your own IDictionary, simply derive a - new class with a constructor that takes no parameters. Some Set implmentations - cannot be defined with a default constructor. If this is the case for your class, - you will need to override Clone() as well.

- -

It is also standard practice that at least one of your constructors takes an ICollection or - an ISet as an argument.

-
-
- - A collection that contains no duplicate elements. - - - This class models the mathematical set abstraction, and is the base class for all - other set implementations. The order of elements in a set is dependant on - (a) the data-structure implementation, and (b) the implementation of the various - methods, and thus is not guaranteed. - - - None of the implementations in this library are guranteed to be thread-safe - in any way unless wrapped in a . - - - The following table summarizes the binary operators that are supported by the - type. - - - - Operation - Description - Method - Operator - - - Union (OR) - Element included in result if it exists in either A OR B. - Union() - | - - - Intersection (AND) - Element included in result if it exists in both A AND B. - InterSect() - & - - - Exclusive Or (XOR) - Element included in result if it exists in one, but not both, of A and B. - ExclusiveOr() - ^ - - - Minus (n/a) - Take all the elements in A. Now, if any of them exist in B, remove - them. Note that unlike the other operators, A - B is not the same as B - A. - Minus() - - - - - - - - - Performs a "union" of the two sets, where all the elements - in both sets are present. That is, the element is included if it is in either a or b. - Neither this set nor the input set are modified during the operation. The return value - is a clone of this set with the extra elements added in. - - A collection of elements. - A new instance containing the union of this instance with the specified collection. - Neither of the input objects is modified by the union. - - - - Performs a "union" of two sets, where all the elements - in both are present. That is, the element is included if it is in either a or b. - The return value is a clone of one of the sets (a if it is not ) with elements of the other set - added in. Neither of the input sets is modified by the operation. - - A set of elements. - A set of elements. - A set containing the union of the input sets. if both sets are . - - - - Performs a "union" of two sets, where all the elements - in both are present. That is, the element is included if it is in either a or b. - The return value is a clone of one of the sets (a if it is not ) with elements of the other set - added in. Neither of the input sets is modified by the operation. - - A set of elements. - A set of elements. - A set containing the union of the input sets. if both sets are . - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. That is, the element is included if it exists in - both sets. The Intersect() operation does not modify the input sets. It returns - a Clone() of this set with the appropriate elements removed. - - A set of elements. - The intersection of this set with a. - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. That is, the element is included only if it exists in - both a and b. Neither input object is modified by the operation. - The result object is a Clone() of one of the input objects (a if it is not ) containing the - elements from the intersect operation. - - A set of elements. - A set of elements. - The intersection of the two input sets. if both sets are . - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. That is, the element is included only if it exists in - both a and b. Neither input object is modified by the operation. - The result object is a Clone() of one of the input objects (a if it is not ) containing the - elements from the intersect operation. - - A set of elements. - A set of elements. - The intersection of the two input sets. if both sets are . - - - - Performs a "minus" of set b from set a. This returns a set of all - the elements in set a, removing the elements that are also in set b. - The original sets are not modified during this operation. The result set is a Clone() - of this Set containing the elements from the operation. - - A set of elements. - A set containing the elements from this set with the elements in a removed. - - - - Performs a "minus" of set b from set a. This returns a set of all - the elements in set a, removing the elements that are also in set b. - The original sets are not modified during this operation. The result set is a Clone() - of set a containing the elements from the operation. - - A set of elements. - A set of elements. - A set containing A - B elements. if a is . - - - - Performs a "minus" of set b from set a. This returns a set of all - the elements in set a, removing the elements that are also in set b. - The original sets are not modified during this operation. The result set is a Clone() - of set a containing the elements from the operation. - - A set of elements. - A set of elements. - A set containing A - B elements. if a is . - - - - Performs an "exclusive-or" of the two sets, keeping only the elements that - are in one of the sets, but not in both. The original sets are not modified - during this operation. The result set is a clone of this set containing - the elements from the exclusive-or operation. - - A set of elements. - A set containing the result of a ^ b. - - - - Performs an "exclusive-or" of the two sets, keeping only the elements that - are in one of the sets, but not in both. The original sets are not modified - during this operation. The result set is a clone of one of the sets - (a if it is not ) containing - the elements from the exclusive-or operation. - - A set of elements. - A set of elements. - A set containing the result of a ^ b. if both sets are . - - - - Performs an "exclusive-or" of the two sets, keeping only the elements that - are in one of the sets, but not in both. The original sets are not modified - during this operation. The result set is a clone of one of the sets - (a if it is not ) containing - the elements from the exclusive-or operation. - - A set of elements. - A set of elements. - A set containing the result of a ^ b. if both sets are . - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - is the object was added, if it was already present. - - - - Adds all the elements in the specified collection to the set if they are not already present. - - A collection of objects to add to the set. - is the set changed as a result of this operation, if not. - - - - Removes all objects from the set. - - - - - Returns if this set contains the specified element. - - The element to look for. - if this set contains the specified element, otherwise. - - - - Returns if the set contains all the elements in the specified collection. - - A collection of objects. - if the set contains all the elements in the specified collection, otherwise. - - - - Removes the specified element from the set. - - The element to be removed. - if the set contained the specified element, otherwise. - - - - Remove all the specified elements from this set, if they exist in this set. - - A collection of elements to remove. - if the set was modified as a result of this operation. - - - - Retains only the elements in this set that are contained in the specified collection. - - Collection that defines the set of elements to be retained. - if this set changed as a result of this operation. - - - - Returns a clone of the set instance. This will work for derived set - classes if the derived class implements a constructor that takes no arguments. - - A clone of this object. - - - - Copies the elements in the set to an array. The type of array needs - to be compatible with the objects in the set, obviously. - - An array that will be the target of the copy operation. - The zero-based index where copying will start. - - - - Returns an enumerator that iterates through the set. - - - An object that can be used to iterate through the set. - - - - - Returns if this set contains no elements. - - - - - The number of elements currently contained in this collection. - - - - - Returns if the set is synchronized across threads. Note that - enumeration is inherently not thread-safe. Use the to lock the - object during enumeration. - - - - - An object that can be used to synchronize this collection to make it thread-safe. - When implementing this, if your object uses a base object, like an , - or anything that has a , return that object instead - of . - - - - - Provides the storage for elements in the Set, stored as the key-set - of the IDictionary object. Set this object in the constructor - if you create your own Set class. - - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - is the object was added, if it was already present. - - - - Adds all the elements in the specified collection to the set if they are not already present. - - A collection of objects to add to the set. - is the set changed as a result of this operation, if not. - - - - Removes all objects from the set. - - - - - Returns if this set contains the specified element. - - The element to look for. - if this set contains the specified element, otherwise. - - - - Returns if the set contains all the elements in the specified collection. - - A collection of objects. - if the set contains all the elements in the specified collection, otherwise. - - - - Removes the specified element from the set. - - The element to be removed. - if the set contained the specified element, otherwise. - - - - Remove all the specified elements from this set, if they exist in this set. - - A collection of elements to remove. - if the set was modified as a result of this operation. - - - - Retains only the elements in this set that are contained in the specified collection. - - Collection that defines the set of elements to be retained. - if this set changed as a result of this operation. - - - - Copies the elements in the Set to an array. The type of array needs - to be compatible with the objects in the Set, obviously. - - An array that will be the target of the copy operation. - The zero-based index where copying will start. - - - - Gets an enumerator for the elements in the Set. - - An IEnumerator over the elements in the Set. - - - - The placeholder object used as the value for the IDictionary instance. - - - There is a single instance of this object globally, used for all Sets. - - - - - Returns if this set contains no elements. - - - - - The number of elements contained in this collection. - - - - - None of the objects based on DictionarySet are synchronized. Use the - SyncRoot property instead. - - - - - Returns an object that can be used to synchronize the Set between threads. - - - - - Implements a Set based on a hash table. This will give the best lookup, add, and remove - performance for very large data-sets, but iteration will occur in no particular order. - - - - - Creates a new set instance based on a hash table. - - - - - Creates a new set instance based on a hash table and - initializes it based on a collection of elements. - - A collection of elements that defines the initial set contents. - - - - Implements a Set that automatically changes from a list to a hash table - when the size reaches a certain threshold. This is good if you are unsure about - whether you data-set will be tiny or huge. Because this uses a dual implementation, - iteration order is not guaranteed! - - - - - Creates a new set instance based on either a list or a hash table, depending on which - will be more efficient based on the data-set size. - - - - - Creates a new set instance based on either a list or a hash table, depending on which - will be more efficient based on the data-set size, and - initializes it based on a collection of elements. - - A collection of elements that defines the initial set contents. - - - -

Implements an immutable (read-only) Set wrapper.

-

Although this is advertised as immutable, it really isn't. Anyone with access to the - basisSet can still change the data-set. So GetHashCode() is not implemented - for this Set, as is the case for all Set implementations in this library. - This design decision was based on the efficiency of not having to Clone() the - basisSet every time you wrap a mutable Set.

-
-
- - - Constructs an immutable (read-only) Set wrapper. - - The Set that is wrapped. - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - is the object was added, if it was already present. - - - - Adds all the elements in the specified collection to the set if they are not already present. - - A collection of objects to add to the set. - is the set changed as a result of this operation, if not. - - - - Removes all objects from the set. - - - - - Returns if this set contains the specified element. - - The element to look for. - if this set contains the specified element, otherwise. - - - - Returns if the set contains all the elements in the specified collection. - - A collection of objects. - if the set contains all the elements in the specified collection, otherwise. - - - - Removes the specified element from the set. - - The element to be removed. - if the set contained the specified element, otherwise. - - - - Remove all the specified elements from this set, if they exist in this set. - - A collection of elements to remove. - if the set was modified as a result of this operation. - - - - Retains only the elements in this set that are contained in the specified collection. - - Collection that defines the set of elements to be retained. - if this set changed as a result of this operation. - - - - Copies the elements in the Set to an array. The type of array needs - to be compatible with the objects in the Set, obviously. - - An array that will be the target of the copy operation. - The zero-based index where copying will start. - - - - Gets an enumerator for the elements in the Set. - - An IEnumerator over the elements in the Set. - - - - Returns a clone of the Set instance. - - A clone of this object. - - - - Performs a "union" of the two sets, where all the elements - in both sets are present. That is, the element is included if it is in either a or b. - Neither this set nor the input set are modified during the operation. The return value - is a Clone() of this set with the extra elements added in. - - A collection of elements. - A new Set containing the union of this Set with the specified collection. - Neither of the input objects is modified by the union. - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. That is, the element is included if it exists in - both sets. The Intersect() operation does not modify the input sets. It returns - a Clone() of this set with the appropriate elements removed. - - A set of elements. - The intersection of this set with a. - - - - Performs a "minus" of set b from set a. This returns a set of all - the elements in set a, removing the elements that are also in set b. - The original sets are not modified during this operation. The result set is a Clone() - of this Set containing the elements from the operation. - - A set of elements. - A set containing the elements from this set with the elements in a removed. - - - - Performs an "exclusive-or" of the two sets, keeping only the elements that - are in one of the sets, but not in both. The original sets are not modified - during this operation. The result set is a Clone() of this set containing - the elements from the exclusive-or operation. - - A set of elements. - A set containing the result of a ^ b. - - - - Returns if this set contains no elements. - - - - - The number of elements contained in this collection. - - - - - Returns an object that can be used to synchronize use of the Set across threads. - - - - - Returns an object that can be used to synchronize the Set between threads. - - - - - Implements a Set based on a list. Performance is much better for very small lists - than either HashedSet or SortedSet. However, performance degrades rapidly as - the data-set gets bigger. Use a HybridSet instead if you are not sure your data-set - will always remain very small. Iteration produces elements in the order they were added. - However, element order is not guaranteed to be maintained by the various Set - mathematical operators. - - - - - Creates a new set instance based on a list. - - - - - Creates a new set instance based on a list and - initializes it based on a collection of elements. - - A collection of elements that defines the initial set contents. - - - - Implements a set based on a sorted tree. This gives good performance for operations on very - large data-sets, though not as good - asymptotically - as a . - However, iteration occurs in order. Elements that you put into this type of collection must - implement , and they must actually be comparable. You can't mix - and values, for example. - - - - - Creates a new set instance based on a sorted tree. - - - - - Creates a new set instance based on a sorted tree. - - The to use for sorting. - - - - Creates a new set instance based on a sorted tree and - initializes it based on a collection of elements. - - A collection of elements that defines the initial set contents. - - - - Creates a new set instance based on a sorted tree and - initializes it based on a collection of elements. - - A collection of elements that defines the initial set contents. - The to use for sorting. - - - - Implements a thread-safe wrapper. - - - The implementation is extremely conservative, serializing critical sections - to prevent possible deadlocks, and locking on everything. The one exception - is for enumeration, which is inherently not thread-safe. For this, you have - to the object for the duration - of the enumeration. - - - - - Constructs a thread-safe wrapper. - - The object that this object will wrap. - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - is the object was added, if it was already present. - - - - Adds all the elements in the specified collection to the set if they are not already present. - - A collection of objects to add to the set. - is the set changed as a result of this operation, if not. - - - - Removes all objects from the set. - - - - - Returns if this set contains the specified element. - - The element to look for. - if this set contains the specified element, otherwise. - - - - Returns if the set contains all the elements in the specified collection. - - A collection of objects. - if the set contains all the elements in the specified collection, otherwise. - - - - Removes the specified element from the set. - - The element to be removed. - if the set contained the specified element, otherwise. - - - - Remove all the specified elements from this set, if they exist in this set. - - A collection of elements to remove. - if the set was modified as a result of this operation. - - - - Retains only the elements in this set that are contained in the specified collection. - - Collection that defines the set of elements to be retained. - if this set changed as a result of this operation. - - - - Copies the elements in the set to an array. The type of array needs - to be compatible with the objects in the set, obviously. - - An array that will be the target of the copy operation. - The zero-based index where copying will start. - - - - Returns an enumerator that iterates through the set. - - - An object that can be used to iterate through the set. - - - Enumeration is, by definition, not thread-safe. Use a on the - to synchronize the entire enumeration process. - - - - - Returns a clone of this instance. - - A clone of this object. - - - - Returns if this set contains no elements. - - - - - The number of elements contained in this collection. - - - - - Returns , indicating that this object is thread-safe. The exception to this - is enumeration, which is inherently not thread-safe. Use the object to - lock this object for the entire duration of the enumeration. - - - - - Returns an object that can be used to synchronize the set between threads. - - -
-
+ + + + Iesi.Collections + + + + +

DictionarySet is an abstract class that supports the creation of new Set + types where the underlying data store is an IDictionary instance.

+ +

You can use any object that implements the IDictionary interface to hold set data. + You can define your own, or you can use one of the objects provided in the Framework. + The type of IDictionary you choose will affect both the performance and the behavior + of the Set using it.

+ +

To make a Set typed based on your own IDictionary, simply derive a + new class with a constructor that takes no parameters. Some Set implmentations + cannot be defined with a default constructor. If this is the case for your class, + you will need to override Clone() as well.

+ +

It is also standard practice that at least one of your constructors takes an ICollection or + an ISet as an argument.

+
+
+ +

A collection that contains no duplicate elements. This class models the mathematical + Set abstraction, and is the base class for all other Set implementations. + The order of elements in a set is dependant on (a)the data-structure implementation, and + (b)the implementation of the various Set methods, and thus is not guaranteed.

+ +

None of the Set implementations in this library are guranteed to be thread-safe + in any way unless wrapped in a SynchronizedSet.

+ +

The following table summarizes the binary operators that are supported by the Set class.

+ + + Operation + Description + Method + Operator + + + Union (OR) + Element included in result if it exists in either A OR B. + Union() + | + + + Intersection (AND) + Element included in result if it exists in both A AND B. + InterSect() + & + + + Exclusive Or (XOR) + Element included in result if it exists in one, but not both, of A and B. + ExclusiveOr() + ^ + + + Minus (n/a) + Take all the elements in A. Now, if any of them exist in B, remove + them. Note that unlike the other operators, A - B is not the same as B - A. + Minus() + - + + +
+
+ + +

A collection that contains no duplicate elements. This interface models the mathematical + Set abstraction. + The order of elements in a set is dependant on (a)the data-structure implementation, and + (b)the implementation of the various Set methods, and thus is not guaranteed.

+ +

None of the Set implementations in this library are guranteed to be thread-safe + in any way unless wrapped in a SynchronizedSet.

+ +

The following table summarizes the binary operators that are supported by the Set class.

+ + + Operation + Description + Method + + + Union (OR) + Element included in result if it exists in either A OR B. + Union() + + + Intersection (AND) + Element included in result if it exists in both A AND B. + InterSect() + + + Exclusive Or (XOR) + Element included in result if it exists in one, but not both, of A and B. + ExclusiveOr() + + + Minus (n/a) + Take all the elements in A. Now, if any of them exist in B, remove + them. Note that unlike the other operators, A - B is not the same as B - A. + Minus() + + +
+
+ + + Performs a "union" of the two sets, where all the elements + in both sets are present. That is, the element is included if it is in either a or b. + Neither this set nor the input set are modified during the operation. The return value + is a Clone() of this set with the extra elements added in. + + A collection of elements. + A new Set containing the union of this Set with the specified collection. + Neither of the input objects is modified by the union. + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. That is, the element is included if it exists in + both sets. The Intersect() operation does not modify the input sets. It returns + a Clone() of this set with the appropriate elements removed. + + A set of elements. + The intersection of this set with a. + + + + Performs a "minus" of set b from set a. This returns a set of all + the elements in set a, removing the elements that are also in set b. + The original sets are not modified during this operation. The result set is a Clone() + of this Set containing the elements from the operation. + + A set of elements. + A set containing the elements from this set with the elements in a removed. + + + + Performs an "exclusive-or" of the two sets, keeping only the elements that + are in one of the sets, but not in both. The original sets are not modified + during this operation. The result set is a Clone() of this set containing + the elements from the exclusive-or operation. + + A set of elements. + A set containing the result of a ^ b. + + + + Returns if the set contains all the elements in the specified collection. + + A collection of objects. + if the set contains all the elements in the specified collection, otherwise. + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + is the object was added, if it was already present. + + + + Adds all the elements in the specified collection to the set if they are not already present. + + A collection of objects to add to the set. + is the set changed as a result of this operation, if not. + + + + Remove all the specified elements from this set, if they exist in this set. + + A collection of elements to remove. + if the set was modified as a result of this operation. + + + + Retains only the elements in this set that are contained in the specified collection. + + Collection that defines the set of elements to be retained. + if this set changed as a result of this operation. + + + + Returns if this set contains no elements. + + + + +

A collection that contains no duplicate elements. This interface models the mathematical + Set abstraction. + The order of elements in a set is dependant on (a)the data-structure implementation, and + (b)the implementation of the various Set methods, and thus is not guaranteed.

+ +

None of the Set implementations in this library are guranteed to be thread-safe + in any way unless wrapped in a SynchronizedSet.

+ +

The following table summarizes the binary operators that are supported by the Set class.

+ + + Operation + Description + Method + + + Union (OR) + Element included in result if it exists in either A OR B. + Union() + + + Intersection (AND) + Element included in result if it exists in both A AND B. + InterSect() + + + Exclusive Or (XOR) + Element included in result if it exists in one, but not both, of A and B. + ExclusiveOr() + + + Minus (n/a) + Take all the elements in A. Now, if any of them exist in B, remove + them. Note that unlike the other operators, A - B is not the same as B - A. + Minus() + + +
+
+ + + Performs a "union" of the two sets, where all the elements + in both sets are present. That is, the element is included if it is in either a or b. + Neither this set nor the input set are modified during the operation. The return value + is a Clone() of this set with the extra elements added in. + + A collection of elements. + A new Set containing the union of this Set with the specified collection. + Neither of the input objects is modified by the union. + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. That is, the element is included if it exists in + both sets. The Intersect() operation does not modify the input sets. It returns + a Clone() of this set with the appropriate elements removed. + + A set of elements. + The intersection of this set with a. + + + + Performs a "minus" of set b from set a. This returns a set of all + the elements in set a, removing the elements that are also in set b. + The original sets are not modified during this operation. The result set is a Clone() + of this Set containing the elements from the operation. + + A set of elements. + A set containing the elements from this set with the elements in a removed. + + + + Performs an "exclusive-or" of the two sets, keeping only the elements that + are in one of the sets, but not in both. The original sets are not modified + during this operation. The result set is a Clone() of this set containing + the elements from the exclusive-or operation. + + A set of elements. + A set containing the result of a ^ b. + + + + Returns if this set contains the specified element. + + The element to look for. + if this set contains the specified element, otherwise. + + + + Returns if the set contains all the elements in the specified collection. + + A collection of objects. + if the set contains all the elements in the specified collection, otherwise. + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + is the object was added, if it was already present. + + + + Adds all the elements in the specified collection to the set if they are not already present. + + A collection of objects to add to the set. + is the set changed as a result of this operation, if not. + + + + Removes the specified element from the set. + + The element to be removed. + if the set contained the specified element, otherwise. + + + + Remove all the specified elements from this set, if they exist in this set. + + A collection of elements to remove. + if the set was modified as a result of this operation. + + + + Retains only the elements in this set that are contained in the specified collection. + + Collection that defines the set of elements to be retained. + if this set changed as a result of this operation. + + + + Removes all objects from the set. + + + + + Returns if this set contains no elements. + + + + + Performs a "union" of the two sets, where all the elements + in both sets are present. That is, the element is included if it is in either a or b. + Neither this set nor the input set are modified during the operation. The return value + is a Clone() of this set with the extra elements added in. + + A collection of elements. + A new Set containing the union of this Set with the specified collection. + Neither of the input objects is modified by the union. + + + + Performs a "union" of two sets, where all the elements + in both are present. That is, the element is included if it is in either a or b. + The return value is a Clone() of one of the sets (a if it is not ) with elements of the other set + added in. Neither of the input sets is modified by the operation. + + A set of elements. + A set of elements. + A set containing the union of the input sets. if both sets are . + + + + Performs a "union" of two sets, where all the elements + in both are present. That is, the element is included if it is in either a or b. + The return value is a Clone() of one of the sets (a if it is not ) with elements of the other set + added in. Neither of the input sets is modified by the operation. + + A set of elements. + A set of elements. + A set containing the union of the input sets. if both sets are . + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. That is, the element is included if it exists in + both sets. The Intersect() operation does not modify the input sets. It returns + a Clone() of this set with the appropriate elements removed. + + A set of elements. + The intersection of this set with a. + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. That is, the element is included only if it exists in + both a and b. Neither input object is modified by the operation. + The result object is a Clone() of one of the input objects (a if it is not ) containing the + elements from the intersect operation. + + A set of elements. + A set of elements. + The intersection of the two input sets. if both sets are . + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. That is, the element is included only if it exists in + both a and b. Neither input object is modified by the operation. + The result object is a Clone() of one of the input objects (a if it is not ) containing the + elements from the intersect operation. + + A set of elements. + A set of elements. + The intersection of the two input sets. if both sets are . + + + + Performs a "minus" of set b from set a. This returns a set of all + the elements in set a, removing the elements that are also in set b. + The original sets are not modified during this operation. The result set is a Clone() + of this Set containing the elements from the operation. + + A set of elements. + A set containing the elements from this set with the elements in a removed. + + + + Performs a "minus" of set b from set a. This returns a set of all + the elements in set a, removing the elements that are also in set b. + The original sets are not modified during this operation. The result set is a Clone() + of set a containing the elements from the operation. + + A set of elements. + A set of elements. + A set containing A - B elements. if a is . + + + + Performs a "minus" of set b from set a. This returns a set of all + the elements in set a, removing the elements that are also in set b. + The original sets are not modified during this operation. The result set is a Clone() + of set a containing the elements from the operation. + + A set of elements. + A set of elements. + A set containing A - B elements. if a is . + + + + Performs an "exclusive-or" of the two sets, keeping only the elements that + are in one of the sets, but not in both. The original sets are not modified + during this operation. The result set is a Clone() of this set containing + the elements from the exclusive-or operation. + + A set of elements. + A set containing the result of a ^ b. + + + + Performs an "exclusive-or" of the two sets, keeping only the elements that + are in one of the sets, but not in both. The original sets are not modified + during this operation. The result set is a Clone() of one of the sets + (a if it is not ) containing + the elements from the exclusive-or operation. + + A set of elements. + A set of elements. + A set containing the result of a ^ b. if both sets are . + + + + Performs an "exclusive-or" of the two sets, keeping only the elements that + are in one of the sets, but not in both. The original sets are not modified + during this operation. The result set is a Clone() of one of the sets + (a if it is not ) containing + the elements from the exclusive-or operation. + + A set of elements. + A set of elements. + A set containing the result of a ^ b. if both sets are . + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + is the object was added, if it was already present. + + + + Adds all the elements in the specified collection to the set if they are not already present. + + A collection of objects to add to the set. + is the set changed as a result of this operation, if not. + + + + Removes all objects from the set. + + + + + Returns if this set contains the specified element. + + The element to look for. + if this set contains the specified element, otherwise. + + + + Returns if the set contains all the elements in the specified collection. + + A collection of objects. + if the set contains all the elements in the specified collection, otherwise. + + + + Removes the specified element from the set. + + The element to be removed. + if the set contained the specified element, otherwise. + + + + Remove all the specified elements from this set, if they exist in this set. + + A collection of elements to remove. + if the set was modified as a result of this operation. + + + + Retains only the elements in this set that are contained in the specified collection. + + Collection that defines the set of elements to be retained. + if this set changed as a result of this operation. + + + + Returns a clone of the Set instance. This will work for derived Set + classes if the derived class implements a constructor that takes no arguments. + + A clone of this object. + + + + Copies the elements in the Set to an array. The type of array needs + to be compatible with the objects in the Set, obviously. + + An array that will be the target of the copy operation. + The zero-based index where copying will start. + + + + Gets an enumerator for the elements in the Set. + + An IEnumerator over the elements in the Set. + + + + Performs CopyTo when called trhough non-generic ISet (ICollection) interface + + + + + + + Performs Union when called trhough non-generic ISet interface + + + + + + + Performs Minus when called trhough non-generic ISet interface + + + + + + + Performs Intersect when called trhough non-generic ISet interface + + + + + + + Performs ExclusiveOr when called trhough non-generic ISet interface + + + + + + + Returns if this set contains no elements. + + + + + The number of elements currently contained in this collection. + + + + + Returns if the Set is synchronized across threads. Note that + enumeration is inherently not thread-safe. Use the SyncRoot to lock the + object during enumeration. + + + + + An object that can be used to synchronize this collection to make it thread-safe. + When implementing this, if your object uses a base object, like an IDictionary, + or anything that has a SyncRoot, return that object instead of "this". + + + + + Indicates whether the given instance is read-only or not + + + if the ISet is read-only; otherwise, . + In the default implementation of Set, this property always returns false. + + + + + Provides the storage for elements in the Set, stored as the key-set + of the IDictionary object. Set this object in the constructor + if you create your own Set class. + + + + + Adds the specified element to this set if it is not already present. + + The to add to the set. + is the object was added, if it was already present. + + + + Adds all the elements in the specified collection to the set if they are not already present. + + A collection of objects to add to the set. + is the set changed as a result of this operation, if not. + + + + Removes all objects from the set. + + + + + Returns if this set contains the specified element. + + The element to look for. + if this set contains the specified element, otherwise. + + + + Returns if the set contains all the elements in the specified collection. + + A collection of objects. + if the set contains all the elements in the specified collection, otherwise. + + + + Removes the specified element from the set. + + The element to be removed. + if the set contained the specified element, otherwise. + + + + Remove all the specified elements from this set, if they exist in this set. + + A collection of elements to remove. + if the set was modified as a result of this operation. + + + + Retains only the elements in this set that are contained in the specified collection. + + Collection that defines the set of elements to be retained. + if this set changed as a result of this operation. + + + + Copies the elements in the Set to an array of T. The type of array needs + to be compatible with the objects in the Set, obviously. + + An array that will be the target of the copy operation. + The zero-based index where copying will start. + + + + Gets an enumerator for the elements in the Set. + + An IEnumerator over the elements in the Set. + + + + Copies the elements in the Set to an array. The type of array needs + to be compatible with the objects in the Set, obviously. Needed for + non-generic ISet methods implementation + + An array that will be the target of the copy operation. + The zero-based index where copying will start. + + + + The placeholder object used as the value for the IDictionary instance. + + + There is a single instance of this object globally, used for all Sets. + + + + + Returns if this set contains no elements. + + + + + The number of elements contained in this collection. + + + + + None of the objects based on DictionarySet are synchronized. Use the + SyncRoot property instead. + + + + + Returns an object that can be used to synchronize the Set between threads. + + + + + Indicates wether the Set is read-only or not + + + + + Implements a Set based on a Dictionary (which is equivalent of + non-genric HashTable) This will give the best lookup, add, and remove + performance for very large data-sets, but iteration will occur in no particular order. + + + + + Creates a new set instance based on a Dictinary. + + + + + Creates a new set instance based on a Dictinary and + initializes it based on a collection of elements. + + A collection of elements that defines the initial set contents. + + + +

Implements an immutable (read-only) Set wrapper.

+

Although this is advertised as immutable, it really isn't. Anyone with access to the + basisSet can still change the data-set. So GetHashCode() is not implemented + for this Set, as is the case for all Set implementations in this library. + This design decision was based on the efficiency of not having to Clone() the + basisSet every time you wrap a mutable Set.

+
+
+ + + Constructs an immutable (read-only) Set wrapper. + + The Set that is wrapped. + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + nothing + is always thrown + + + + Adds all the elements in the specified collection to the set if they are not already present. + + A collection of objects to add to the set. + nothing + is always thrown + + + + Removes all objects from the set. + + is always thrown + + + + Returns if this set contains the specified element. + + The element to look for. + if this set contains the specified element, otherwise. + + + + Returns if the set contains all the elements in the specified collection. + + A collection of objects. + if the set contains all the elements in the specified collection, otherwise. + + + + Removes the specified element from the set. + + The element to be removed. + nothing + is always thrown + + + + Remove all the specified elements from this set, if they exist in this set. + + A collection of elements to remove. + nothing + is always thrown + + + + Retains only the elements in this set that are contained in the specified collection. + + Collection that defines the set of elements to be retained. + nothing + is always thrown + + + + Copies the elements in the Set to an array of T. The type of array needs + to be compatible with the objects in the Set, obviously. + + An array that will be the target of the copy operation. + The zero-based index where copying will start. + + + + Gets an enumerator for the elements in the Set. + + An IEnumerator over the elements in the Set. + + + + Returns a clone of the Set instance. + + A clone of this object. + + + + Performs a "union" of the two sets, where all the elements + in both sets are present. That is, the element is included if it is in either a or b. + Neither this set nor the input set are modified during the operation. The return value + is a Clone() of this set with the extra elements added in. + + A collection of elements. + A new Set containing the union of this Set with the specified collection. + Neither of the input objects is modified by the union. + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. That is, the element is included if it exists in + both sets. The Intersect() operation does not modify the input sets. It returns + a Clone() of this set with the appropriate elements removed. + + A set of elements. + The intersection of this set with a. + + + + Performs a "minus" of set b from set a. This returns a set of all + the elements in set a, removing the elements that are also in set b. + The original sets are not modified during this operation. The result set is a Clone() + of this Set containing the elements from the operation. + + A set of elements. + A set containing the elements from this set with the elements in a removed. + + + + Performs an "exclusive-or" of the two sets, keeping only the elements that + are in one of the sets, but not in both. The original sets are not modified + during this operation. The result set is a Clone() of this set containing + the elements from the exclusive-or operation. + + A set of elements. + A set containing the result of a ^ b. + + + + Performs CopyTo when called trhough non-generic ISet (ICollection) interface + + + + + + + Performs Union when called trhough non-generic ISet interface + + + + + + + Performs Minus when called trhough non-generic ISet interface + + + + + + + Performs Intersect when called trhough non-generic ISet interface + + + + + + + Performs ExclusiveOr when called trhough non-generic ISet interface + + + + + + + Returns if this set contains no elements. + + + + + The number of elements contained in this collection. + + + + + Returns an object that can be used to synchronize use of the Set across threads. + + + + + Returns an object that can be used to synchronize the Set between threads. + + + + + Indicates that the given instance is read-only + + + + + Implements an ordered Set based on a dictionary. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + A collection of elements that defines the initial set contents. + + + + Implements a Set based on a sorted tree. This gives good performance for operations on very + large data-sets, though not as good - asymptotically - as a HashedSet. However, iteration + occurs in order. Elements that you put into this type of collection must implement IComparable, + and they must actually be comparable. You can't mix string and int values, for example. + + + + + Creates a new set instance based on a sorted tree. + + + + + Creates a new set instance based on a sorted tree. + + The to use for sorting. + + + + Creates a new set instance based on a sorted tree and + initializes it based on a collection of elements. + + A collection of elements that defines the initial set contents. + + + + Creates a new set instance based on a sorted tree and + initializes it based on a collection of elements. + + A collection of elements that defines the initial set contents. + + + + Creates a new set instance based on a sorted tree and + initializes it based on a collection of elements. + + A collection of elements that defines the initial set contents. + The to use for sorting. + + + +

Implements a thread-safe Set wrapper. The implementation is extremely conservative, + serializing critical sections to prevent possible deadlocks, and locking on everything. + The one exception is for enumeration, which is inherently not thread-safe. For this, you + have to lock the SyncRoot object for the duration of the enumeration.

+
+
+ + + Constructs a thread-safe Set wrapper. + + The Set object that this object will wrap. + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + is the object was added, if it was already present. + + + + Adds all the elements in the specified collection to the set if they are not already present. + + A collection of objects to add to the set. + is the set changed as a result of this operation, if not. + + + + Removes all objects from the set. + + + + + Returns if this set contains the specified element. + + The element to look for. + if this set contains the specified element, otherwise. + + + + Returns if the set contains all the elements in the specified collection. + + A collection of objects. + if the set contains all the elements in the specified collection, otherwise. + + + + Removes the specified element from the set. + + The element to be removed. + if the set contained the specified element, otherwise. + + + + Remove all the specified elements from this set, if they exist in this set. + + A collection of elements to remove. + if the set was modified as a result of this operation. + + + + Retains only the elements in this set that are contained in the specified collection. + + Collection that defines the set of elements to be retained. + if this set changed as a result of this operation. + + + + Copies the elements in the Set to an array. The type of array needs + to be compatible with the objects in the Set, obviously. + + An array that will be the target of the copy operation. + The zero-based index where copying will start. + + + + Enumeration is, by definition, not thread-safe. Use a lock on the SyncRoot + to synchronize the entire enumeration process. + + + + + + Returns a clone of the Set instance. + + A clone of this object. + + + + Performs CopyTo when called trhough non-generic ISet (ICollection) interface + + + + + + + Returns if this set contains no elements. + + + + + The number of elements contained in this collection. + + + + + Returns , indicating that this object is thread-safe. The exception to this + is enumeration, which is inherently not thread-safe. Use the SyncRoot object to + lock this object for the entire duration of the enumeration. + + + + + Returns an object that can be used to synchronize the Set between threads. + + + + + Indicates whether given instace is read-only or not + + + + +

DictionarySet is an abstract class that supports the creation of new Set + types where the underlying data store is an IDictionary instance.

+ +

You can use any object that implements the IDictionary interface to hold set data. + You can define your own, or you can use one of the objects provided in the Framework. + The type of IDictionary you choose will affect both the performance and the behavior + of the Set using it.

+ +

To make a Set typed based on your own IDictionary, simply derive a + new class with a constructor that takes no parameters. Some Set implmentations + cannot be defined with a default constructor. If this is the case for your class, + you will need to override Clone() as well.

+ +

It is also standard practice that at least one of your constructors takes an ICollection or + an ISet as an argument.

+
+
+ + A collection that contains no duplicate elements. + + + This class models the mathematical set abstraction, and is the base class for all + other set implementations. The order of elements in a set is dependant on + (a) the data-structure implementation, and (b) the implementation of the various + methods, and thus is not guaranteed. + + + None of the implementations in this library are guranteed to be thread-safe + in any way unless wrapped in a . + + + The following table summarizes the binary operators that are supported by the + type. + + + + Operation + Description + Method + Operator + + + Union (OR) + Element included in result if it exists in either A OR B. + Union() + | + + + Intersection (AND) + Element included in result if it exists in both A AND B. + InterSect() + & + + + Exclusive Or (XOR) + Element included in result if it exists in one, but not both, of A and B. + ExclusiveOr() + ^ + + + Minus (n/a) + Take all the elements in A. Now, if any of them exist in B, remove + them. Note that unlike the other operators, A - B is not the same as B - A. + Minus() + - + + + + + + + Performs a "union" of the two sets, where all the elements + in both sets are present. That is, the element is included if it is in either a or b. + Neither this set nor the input set are modified during the operation. The return value + is a clone of this set with the extra elements added in. + + A collection of elements. + A new instance containing the union of this instance with the specified collection. + Neither of the input objects is modified by the union. + + + + Performs a "union" of two sets, where all the elements + in both are present. That is, the element is included if it is in either a or b. + The return value is a clone of one of the sets (a if it is not ) with elements of the other set + added in. Neither of the input sets is modified by the operation. + + A set of elements. + A set of elements. + A set containing the union of the input sets. if both sets are . + + + + Performs a "union" of two sets, where all the elements + in both are present. That is, the element is included if it is in either a or b. + The return value is a clone of one of the sets (a if it is not ) with elements of the other set + added in. Neither of the input sets is modified by the operation. + + A set of elements. + A set of elements. + A set containing the union of the input sets. if both sets are . + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. That is, the element is included if it exists in + both sets. The Intersect() operation does not modify the input sets. It returns + a Clone() of this set with the appropriate elements removed. + + A set of elements. + The intersection of this set with a. + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. That is, the element is included only if it exists in + both a and b. Neither input object is modified by the operation. + The result object is a Clone() of one of the input objects (a if it is not ) containing the + elements from the intersect operation. + + A set of elements. + A set of elements. + The intersection of the two input sets. if both sets are . + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. That is, the element is included only if it exists in + both a and b. Neither input object is modified by the operation. + The result object is a Clone() of one of the input objects (a if it is not ) containing the + elements from the intersect operation. + + A set of elements. + A set of elements. + The intersection of the two input sets. if both sets are . + + + + Performs a "minus" of set b from set a. This returns a set of all + the elements in set a, removing the elements that are also in set b. + The original sets are not modified during this operation. The result set is a Clone() + of this Set containing the elements from the operation. + + A set of elements. + A set containing the elements from this set with the elements in a removed. + + + + Performs a "minus" of set b from set a. This returns a set of all + the elements in set a, removing the elements that are also in set b. + The original sets are not modified during this operation. The result set is a Clone() + of set a containing the elements from the operation. + + A set of elements. + A set of elements. + A set containing A - B elements. if a is . + + + + Performs a "minus" of set b from set a. This returns a set of all + the elements in set a, removing the elements that are also in set b. + The original sets are not modified during this operation. The result set is a Clone() + of set a containing the elements from the operation. + + A set of elements. + A set of elements. + A set containing A - B elements. if a is . + + + + Performs an "exclusive-or" of the two sets, keeping only the elements that + are in one of the sets, but not in both. The original sets are not modified + during this operation. The result set is a clone of this set containing + the elements from the exclusive-or operation. + + A set of elements. + A set containing the result of a ^ b. + + + + Performs an "exclusive-or" of the two sets, keeping only the elements that + are in one of the sets, but not in both. The original sets are not modified + during this operation. The result set is a clone of one of the sets + (a if it is not ) containing + the elements from the exclusive-or operation. + + A set of elements. + A set of elements. + A set containing the result of a ^ b. if both sets are . + + + + Performs an "exclusive-or" of the two sets, keeping only the elements that + are in one of the sets, but not in both. The original sets are not modified + during this operation. The result set is a clone of one of the sets + (a if it is not ) containing + the elements from the exclusive-or operation. + + A set of elements. + A set of elements. + A set containing the result of a ^ b. if both sets are . + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + is the object was added, if it was already present. + + + + Adds all the elements in the specified collection to the set if they are not already present. + + A collection of objects to add to the set. + is the set changed as a result of this operation, if not. + + + + Removes all objects from the set. + + + + + Returns if this set contains the specified element. + + The element to look for. + if this set contains the specified element, otherwise. + + + + Returns if the set contains all the elements in the specified collection. + + A collection of objects. + if the set contains all the elements in the specified collection, otherwise. + + + + Removes the specified element from the set. + + The element to be removed. + if the set contained the specified element, otherwise. + + + + Remove all the specified elements from this set, if they exist in this set. + + A collection of elements to remove. + if the set was modified as a result of this operation. + + + + Retains only the elements in this set that are contained in the specified collection. + + Collection that defines the set of elements to be retained. + if this set changed as a result of this operation. + + + + Returns a clone of the set instance. This will work for derived set + classes if the derived class implements a constructor that takes no arguments. + + A clone of this object. + + + + Copies the elements in the set to an array. The type of array needs + to be compatible with the objects in the set, obviously. + + An array that will be the target of the copy operation. + The zero-based index where copying will start. + + + + Returns an enumerator that iterates through the set. + + + An object that can be used to iterate through the set. + + + + + Returns if this set contains no elements. + + + + + The number of elements currently contained in this collection. + + + + + Returns if the set is synchronized across threads. Note that + enumeration is inherently not thread-safe. Use the to lock the + object during enumeration. + + + + + An object that can be used to synchronize this collection to make it thread-safe. + When implementing this, if your object uses a base object, like an , + or anything that has a , return that object instead + of . + + + + + Provides the storage for elements in the Set, stored as the key-set + of the IDictionary object. Set this object in the constructor + if you create your own Set class. + + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + is the object was added, if it was already present. + + + + Adds all the elements in the specified collection to the set if they are not already present. + + A collection of objects to add to the set. + is the set changed as a result of this operation, if not. + + + + Removes all objects from the set. + + + + + Returns if this set contains the specified element. + + The element to look for. + if this set contains the specified element, otherwise. + + + + Returns if the set contains all the elements in the specified collection. + + A collection of objects. + if the set contains all the elements in the specified collection, otherwise. + + + + Removes the specified element from the set. + + The element to be removed. + if the set contained the specified element, otherwise. + + + + Remove all the specified elements from this set, if they exist in this set. + + A collection of elements to remove. + if the set was modified as a result of this operation. + + + + Retains only the elements in this set that are contained in the specified collection. + + Collection that defines the set of elements to be retained. + if this set changed as a result of this operation. + + + + Copies the elements in the Set to an array. The type of array needs + to be compatible with the objects in the Set, obviously. + + An array that will be the target of the copy operation. + The zero-based index where copying will start. + + + + Gets an enumerator for the elements in the Set. + + An IEnumerator over the elements in the Set. + + + + The placeholder object used as the value for the IDictionary instance. + + + There is a single instance of this object globally, used for all Sets. + + + + + Returns if this set contains no elements. + + + + + The number of elements contained in this collection. + + + + + None of the objects based on DictionarySet are synchronized. Use the + SyncRoot property instead. + + + + + Returns an object that can be used to synchronize the Set between threads. + + + + + Implements a Set based on a hash table. This will give the best lookup, add, and remove + performance for very large data-sets, but iteration will occur in no particular order. + + + + + Creates a new set instance based on a hash table. + + + + + Creates a new set instance based on a hash table and + initializes it based on a collection of elements. + + A collection of elements that defines the initial set contents. + + + + Implements a Set that automatically changes from a list to a hash table + when the size reaches a certain threshold. This is good if you are unsure about + whether you data-set will be tiny or huge. Because this uses a dual implementation, + iteration order is not guaranteed! + + + + + Creates a new set instance based on either a list or a hash table, depending on which + will be more efficient based on the data-set size. + + + + + Creates a new set instance based on either a list or a hash table, depending on which + will be more efficient based on the data-set size, and + initializes it based on a collection of elements. + + A collection of elements that defines the initial set contents. + + + +

Implements an immutable (read-only) Set wrapper.

+

Although this is advertised as immutable, it really isn't. Anyone with access to the + basisSet can still change the data-set. So GetHashCode() is not implemented + for this Set, as is the case for all Set implementations in this library. + This design decision was based on the efficiency of not having to Clone() the + basisSet every time you wrap a mutable Set.

+
+
+ + + Constructs an immutable (read-only) Set wrapper. + + The Set that is wrapped. + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + is the object was added, if it was already present. + + + + Adds all the elements in the specified collection to the set if they are not already present. + + A collection of objects to add to the set. + is the set changed as a result of this operation, if not. + + + + Removes all objects from the set. + + + + + Returns if this set contains the specified element. + + The element to look for. + if this set contains the specified element, otherwise. + + + + Returns if the set contains all the elements in the specified collection. + + A collection of objects. + if the set contains all the elements in the specified collection, otherwise. + + + + Removes the specified element from the set. + + The element to be removed. + if the set contained the specified element, otherwise. + + + + Remove all the specified elements from this set, if they exist in this set. + + A collection of elements to remove. + if the set was modified as a result of this operation. + + + + Retains only the elements in this set that are contained in the specified collection. + + Collection that defines the set of elements to be retained. + if this set changed as a result of this operation. + + + + Copies the elements in the Set to an array. The type of array needs + to be compatible with the objects in the Set, obviously. + + An array that will be the target of the copy operation. + The zero-based index where copying will start. + + + + Gets an enumerator for the elements in the Set. + + An IEnumerator over the elements in the Set. + + + + Returns a clone of the Set instance. + + A clone of this object. + + + + Performs a "union" of the two sets, where all the elements + in both sets are present. That is, the element is included if it is in either a or b. + Neither this set nor the input set are modified during the operation. The return value + is a Clone() of this set with the extra elements added in. + + A collection of elements. + A new Set containing the union of this Set with the specified collection. + Neither of the input objects is modified by the union. + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. That is, the element is included if it exists in + both sets. The Intersect() operation does not modify the input sets. It returns + a Clone() of this set with the appropriate elements removed. + + A set of elements. + The intersection of this set with a. + + + + Performs a "minus" of set b from set a. This returns a set of all + the elements in set a, removing the elements that are also in set b. + The original sets are not modified during this operation. The result set is a Clone() + of this Set containing the elements from the operation. + + A set of elements. + A set containing the elements from this set with the elements in a removed. + + + + Performs an "exclusive-or" of the two sets, keeping only the elements that + are in one of the sets, but not in both. The original sets are not modified + during this operation. The result set is a Clone() of this set containing + the elements from the exclusive-or operation. + + A set of elements. + A set containing the result of a ^ b. + + + + Returns if this set contains no elements. + + + + + The number of elements contained in this collection. + + + + + Returns an object that can be used to synchronize use of the Set across threads. + + + + + Returns an object that can be used to synchronize the Set between threads. + + + + + Implements a Set based on a list. Performance is much better for very small lists + than either HashedSet or SortedSet. However, performance degrades rapidly as + the data-set gets bigger. Use a HybridSet instead if you are not sure your data-set + will always remain very small. Iteration produces elements in the order they were added. + However, element order is not guaranteed to be maintained by the various Set + mathematical operators. + + + + + Creates a new set instance based on a list. + + + + + Creates a new set instance based on a list and + initializes it based on a collection of elements. + + A collection of elements that defines the initial set contents. + + + + Implements a set based on a sorted tree. This gives good performance for operations on very + large data-sets, though not as good - asymptotically - as a . + However, iteration occurs in order. Elements that you put into this type of collection must + implement , and they must actually be comparable. You can't mix + and values, for example. + + + + + Creates a new set instance based on a sorted tree. + + + + + Creates a new set instance based on a sorted tree. + + The to use for sorting. + + + + Creates a new set instance based on a sorted tree and + initializes it based on a collection of elements. + + A collection of elements that defines the initial set contents. + + + + Creates a new set instance based on a sorted tree and + initializes it based on a collection of elements. + + A collection of elements that defines the initial set contents. + The to use for sorting. + + + + Implements a thread-safe wrapper. + + + The implementation is extremely conservative, serializing critical sections + to prevent possible deadlocks, and locking on everything. The one exception + is for enumeration, which is inherently not thread-safe. For this, you have + to the object for the duration + of the enumeration. + + + + + Constructs a thread-safe wrapper. + + The object that this object will wrap. + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + is the object was added, if it was already present. + + + + Adds all the elements in the specified collection to the set if they are not already present. + + A collection of objects to add to the set. + is the set changed as a result of this operation, if not. + + + + Removes all objects from the set. + + + + + Returns if this set contains the specified element. + + The element to look for. + if this set contains the specified element, otherwise. + + + + Returns if the set contains all the elements in the specified collection. + + A collection of objects. + if the set contains all the elements in the specified collection, otherwise. + + + + Removes the specified element from the set. + + The element to be removed. + if the set contained the specified element, otherwise. + + + + Remove all the specified elements from this set, if they exist in this set. + + A collection of elements to remove. + if the set was modified as a result of this operation. + + + + Retains only the elements in this set that are contained in the specified collection. + + Collection that defines the set of elements to be retained. + if this set changed as a result of this operation. + + + + Copies the elements in the set to an array. The type of array needs + to be compatible with the objects in the set, obviously. + + An array that will be the target of the copy operation. + The zero-based index where copying will start. + + + + Returns an enumerator that iterates through the set. + + + An object that can be used to iterate through the set. + + + Enumeration is, by definition, not thread-safe. Use a on the + to synchronize the entire enumeration process. + + + + + Returns a clone of this instance. + + A clone of this object. + + + + Returns if this set contains no elements. + + + + + The number of elements contained in this collection. + + + + + Returns , indicating that this object is thread-safe. The exception to this + is enumeration, which is inherently not thread-safe. Use the object to + lock this object for the entire duration of the enumeration. + + + + + Returns an object that can be used to synchronize the set between threads. + + +
+
diff --git a/lib/LinFu.License.txt b/lib/LinFu.License.txt index e4c8db141bf..393eaf9df8d 100644 --- a/lib/LinFu.License.txt +++ b/lib/LinFu.License.txt @@ -1,167 +1,167 @@ -The LinFu Library, (c) 2007 Philip Laureano, is subject to the terms of the following license: - - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. +The LinFu Library, (c) 2007 Philip Laureano, is subject to the terms of the following license: + + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/lib/NHibernate-Configuration-templates/FireBird.cfg.xml b/lib/NHibernate-Configuration-templates/FireBird.cfg.xml index b459f11e88f..87b99b5e66c 100644 --- a/lib/NHibernate-Configuration-templates/FireBird.cfg.xml +++ b/lib/NHibernate-Configuration-templates/FireBird.cfg.xml @@ -1,31 +1,31 @@ - - - - - - NHibernate.Driver.FirebirdClientDriver - - Server=localhost; - Database=C:\nhibernate.fdb; - User=SYSDBA;Password=masterkey - - false - NHibernate.Dialect.FirebirdDialect - 60 - true 1, false 0, yes 1, no 0 - NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu - - + + + + + + NHibernate.Driver.FirebirdClientDriver + + Server=localhost; + Database=C:\nhibernate.fdb; + User=SYSDBA;Password=masterkey + + false + NHibernate.Dialect.FirebirdDialect + 60 + true 1, false 0, yes 1, no 0 + NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu + + diff --git a/lib/NHibernate-Configuration-templates/MSSQL.cfg.xml b/lib/NHibernate-Configuration-templates/MSSQL.cfg.xml index ab6b5f8d208..654cd87a015 100644 --- a/lib/NHibernate-Configuration-templates/MSSQL.cfg.xml +++ b/lib/NHibernate-Configuration-templates/MSSQL.cfg.xml @@ -1,22 +1,22 @@ - - - - - - NHibernate.Driver.SqlClientDriver - - Server=(local);initial catalog=nhibernate;Integrated Security=SSPI - - 10 - false - NHibernate.Dialect.MsSql2000Dialect - true - 60 - true 1, false 0, yes 'Y', no 'N' - NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu - + + + + + + NHibernate.Driver.SqlClientDriver + + Server=(local);initial catalog=nhibernate;Integrated Security=SSPI + + 10 + false + NHibernate.Dialect.MsSql2000Dialect + true + 60 + true 1, false 0, yes 'Y', no 'N' + NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu + \ No newline at end of file diff --git a/lib/NHibernate-Configuration-templates/MySql.cfg.xml b/lib/NHibernate-Configuration-templates/MySql.cfg.xml index ee1f1b5222c..6d1e46e7ad2 100644 --- a/lib/NHibernate-Configuration-templates/MySql.cfg.xml +++ b/lib/NHibernate-Configuration-templates/MySql.cfg.xml @@ -1,17 +1,17 @@ - - - - - - NHibernate.Driver.MySqlDataDriver - - Database=test;Data Source=someip;User Id=blah;Password=blah - - NHibernate.Dialect.MySQLDialect - NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu - + + + + + + NHibernate.Driver.MySqlDataDriver + + Database=test;Data Source=someip;User Id=blah;Password=blah + + NHibernate.Dialect.MySQLDialect + NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu + \ No newline at end of file diff --git a/lib/NHibernate-Configuration-templates/Oracle.cfg.xml b/lib/NHibernate-Configuration-templates/Oracle.cfg.xml index d707cbcc5b8..26fdbfde636 100644 --- a/lib/NHibernate-Configuration-templates/Oracle.cfg.xml +++ b/lib/NHibernate-Configuration-templates/Oracle.cfg.xml @@ -1,19 +1,19 @@ - - - - - - NHibernate.Driver.OracleClientDriver - - User ID=nhibernate;Password=nhibernate;Data Source=localhost - - false - NHibernate.Dialect.OracleDialect - true 1, false 0, yes 'Y', no 'N' - NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu - + + + + + + NHibernate.Driver.OracleClientDriver + + User ID=nhibernate;Password=nhibernate;Data Source=localhost + + false + NHibernate.Dialect.OracleDialect + true 1, false 0, yes 'Y', no 'N' + NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu + \ No newline at end of file diff --git a/lib/NHibernate-Configuration-templates/PostgreSQL.cfg.xml b/lib/NHibernate-Configuration-templates/PostgreSQL.cfg.xml index d109bec5066..9e4295390da 100644 --- a/lib/NHibernate-Configuration-templates/PostgreSQL.cfg.xml +++ b/lib/NHibernate-Configuration-templates/PostgreSQL.cfg.xml @@ -1,16 +1,16 @@ - - - - - NHibernate.Driver.NpgsqlDriver - - Server=localhost;initial catalog=nhibernate;User ID=nhibernate;Password=nhibernate; - - NHibernate.Dialect.PostgreSQLDialect - NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu - + + + + + NHibernate.Driver.NpgsqlDriver + + Server=localhost;initial catalog=nhibernate;User ID=nhibernate;Password=nhibernate; + + NHibernate.Dialect.PostgreSQLDialect + NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu + \ No newline at end of file diff --git a/lib/NHibernate-Configuration-templates/SQLite.cfg.xml b/lib/NHibernate-Configuration-templates/SQLite.cfg.xml index fe38243b967..5d43c2d739c 100644 --- a/lib/NHibernate-Configuration-templates/SQLite.cfg.xml +++ b/lib/NHibernate-Configuration-templates/SQLite.cfg.xml @@ -1,17 +1,17 @@ - - - - - NHibernate.Driver.SQLiteDriver - - Data Source=nhibernate.db;Version=3 - - NHibernate.Dialect.SQLiteDialect - true=1;false=0 - NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu - + + + + + NHibernate.Driver.SQLiteDriver + + Data Source=nhibernate.db;Version=3 + + NHibernate.Dialect.SQLiteDialect + true=1;false=0 + NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu + \ No newline at end of file diff --git a/lib/NHibernate.ByteCode.LinFu.xml b/lib/NHibernate.ByteCode.LinFu.xml index 8d77e265131..693854b4f6c 100644 --- a/lib/NHibernate.ByteCode.LinFu.xml +++ b/lib/NHibernate.ByteCode.LinFu.xml @@ -1,8 +1,8 @@ - - - - NHibernate.ByteCode.LinFu - - - - + + + + NHibernate.ByteCode.LinFu + + + + diff --git a/lib/NHibernate.license.txt b/lib/NHibernate.license.txt index 8a88d148977..866688dba6d 100644 --- a/lib/NHibernate.license.txt +++ b/lib/NHibernate.license.txt @@ -1,460 +1,460 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + diff --git a/lib/NHibernate.xml b/lib/NHibernate.xml index a9e6f2e5862..2c5aef61bc7 100644 --- a/lib/NHibernate.xml +++ b/lib/NHibernate.xml @@ -1,40555 +1,40555 @@ - - - - NHibernate - - - - - Implementation of BulkOperationCleanupAction. - - - - - An operation which may be scheduled for later execution. - Usually, the operation is a database insert/update/delete, - together with required second-level cache management. - - - - Called before executing any actions - - - Execute this action - - - - Do we need to retain this instance until after the transaction completes? - - - False if this class defines a no-op has after transaction completion. - - - - Called after the transaction completes - - - - What spaces (tables) are affected by this action? - - - - - Create an action that will evict collection and entity regions based on queryspaces (table names). - - - - - Any action relating to insert/update/delete of a collection - - - - - Initializes a new instance of . - - The that is responsible for the persisting the Collection. - The Persistent collection. - The identifier of the Collection. - The that the Action is occurring in. - - - Called before executing any actions - - - Execute this action - - - - Do we need to retain this instance until after the transaction completes? - - - False if this class defines a no-op has after transaction completion. - - - - Called after the transaction completes - - - - Compares the current object with another object of the same type. - - - A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter.Zero This object is equal to other. Greater than zero This object is greater than other. - - An object to compare with this object. - - - - What spaces (tables) are affected by this action? - - - - Execute this action - - This method is called when a new non-null collection is persisted - or when an existing (non-null) collection is moved to a new owner - - - - - Removes a persistent collection from its loaded owner. - - The collection to to remove; must be non-null - The collection's persister - The collection key - Indicates if the snapshot is empty - The session - Use this constructor when the collection is non-null. - - - - Removes a persistent collection from a specified owner. - - The collection's owner; must be non-null - The collection's persister - The collection key - Indicates if the snapshot is empty - The session - Use this constructor when the collection to be removed has not been loaded. - - - - Acts as a stand-in for an entity identifier which is supposed to be - generated on insert (like an IDENTITY column) where the insert needed to - be delayed because we were outside a transaction when the persist - occurred (save currently still performs the insert). - - The stand-in is only used within the see cref="NHibernate.Engine.PersistenceContext" - in order to distinguish one instance from another; it is never injected into - the entity instance or returned to the client... - - - - - Base class for actions relating to insert/update/delete of an entity - instance. - - - - - Instantiate an action. - - The session from which this action is coming. - The id of the entity - The entity instance - The entity persister - - - - Entity name accessor - - - - - Entity Id accessor - - - - - Entity Instance - - - - - Session from which this action originated - - - - - The entity persister. - - - - Format an SQL statement using simple rules: - a) Insert newline after each comma; - b) Indent three spaces after each inserted newline; - If the statement contains single/double quotes return unchanged, - it is too complex and could be broken by simple formatting. - - - - Represents the the understood types or styles of formatting. - - - Centralize logging handling for SQL statements. - - - Constructs a new SqlStatementLogger instance. - - - Constructs a new SqlStatementLogger instance. - Should we log to STDOUT in addition to our internal logger. - Should we format SQL ('prettify') prior to logging. - - - Log a IDbCommand. - Title - The SQL statement. - The requested formatting style. - - - Log a IDbCommand. - The SQL statement. - The requested formatting style. - - - - Manages prepared statements and batching. Class exists to enforce separation of concerns - - - - - Manages s and s - for an . - - -

- Abstracts ADO.NET batching to maintain the illusion that a single logical batch - exists for the whole session, even when batching is disabled. - Provides transparent IDbCommand caching. -

-

- This will be useful once ADO.NET gets support for batching. Until that point - no code exists that will do batching, but this will provide a good point to do - error checking and making sure the correct number of rows were affected. -

-
-
- - - Get an for using in loading / querying. - - The to convert to an . - The of the command. - The SqlTypes of parameters - in . - - An that is ready to be executed. - - - - If not explicitly released by , it will be - released when the session is closed or disconnected. - - - This does NOT add anything to the batch - it only creates the IDbCommand and - does NOT cause the batch to execute... - - - - - - Get a non-batchable an to use for inserting / deleting / updating. - Must be explicitly released by CloseCommand() - - The to convert to an . - The of the command. - The SqlTypes of parameters - in . - - An that is ready to have the parameter values set - and then executed. - - - - - Close a opened using PrepareCommand() - - The to ensure is closed. - The to ensure is closed. - - - - Close a opened using - - The to ensure is closed. - - - - Get a batchable to use for inserting / deleting / updating - (might be called many times before a single call to ExecuteBatch() - - - After setting parameters, call AddToBatch() - do not execute the statement - explicitly. - - The to convert to an . - The of the command. - The SqlTypes of parameters - in . - - - - - Add an insert / delete / update to the current batch (might be called multiple times - for a single PrepareBatchStatement()) - - Determines whether the number of rows affected by query is correct. - - - - Execute the batch - - - - - Close any query statements that were left lying around - - - Use this method instead of Dispose if the - can be used again. - - - - - Gets an by calling ExecuteReader on the . - - The to execute to get the . - The from the . - - The Batcher is responsible for ensuring that all of the Drivers rules for how many open - s it can have are followed. - - - - - Executes the . - - The to execute. - The number of rows affected. - - The Batcher is responsible for ensuring that all of the Drivers rules for how many open - s it can have are followed. - - - - - Must be called when an exception occurs. - - - - - - Cancel the current query statement - - - - - Gets the value indicating whether there are any open resources - managed by this batcher (IDbCommands or IDataReaders). - - - - - Gets or sets the size of the batch, this can change dynamically by - calling the session's SetBatchSize. - - The size of the batch. - - - - Initializes a new instance of the class. - - The owning this batcher. - - - - - Prepares the for execution in the database. - - - This takes care of hooking the up to an - and if one exists. It will call Prepare if the Driver - supports preparing commands. - - - - - Ensures that the Driver's rules for Multiple Open DataReaders are being followed. - - - - - - - - - - - - - - Adds the expected row count into the batch. - - The number of rows expected to be affected by the query. - - If Batching is not supported, then this is when the Command should be executed. If Batching - is supported then it should hold of on executing the batch until explicitly told to. - - - - - A flag to indicate if Dispose() has been called. - - - - - Finalizer that ensures the object is correctly disposed of. - - - - - Takes care of freeing the managed and unmanaged resources that - this class is responsible for. - - - - - Takes care of freeing the managed and unmanaged resources that - this class is responsible for. - - Indicates if this BatcherImpl is being Disposed of or Finalized. - - If this BatcherImpl is being Finalized (isDisposing==false) then make sure not - to call any methods that could potentially bring this BatcherImpl back to life. - - - - - Gets the current that is contained for this Batch - - The current . - - - - Gets or sets the size of the batch, this can change dynamically by - calling the session's SetBatchSize. - - The size of the batch. - - - - Gets the the Batcher was - created in. - - - The the Batcher was - created in. - - - - - Gets the for this batcher. - - - - Implementation of ColumnNameCache. - - - - Manages the database connection and transaction for an . - - - This class corresponds to ConnectionManager and JDBCContext in Hibernate, - combined. - - - - The batcher managed by this ConnectionManager. - - - - Expected row count. Valid only for batchable expectations. - - - - Factory for instances. - - - - Provide the class of according to the configuration - and the capabilities of the driver. - - - By default, .Net doesn't have any batching capabilities, drivers that does have - batching support. - The BatcherFactory trough session-factory configuration section. - This interface was added in NHibernate for backdraw compatibility to have the ability - to specify a default for a specific . - - - - - An implementation of the - interface that does no batching. - - - - - Initializes a new instance of the class. - - The for this batcher. - - - - - Executes the current and compares the row Count - to the expectedRowCount. - - - The expected number of rows affected by the query. A value of less than 0 - indicates that the number of rows to expect is unknown or should not be a factor. - - - Thrown when there is an expected number of rows to be affected and the - actual number of rows is different. - - - - - This Batcher implementation does not support batching so this is a no-op call. The - actual execution of the is run in the AddToBatch - method. - - - - - - A BatcherFactory implementation which constructs Batcher instances - that do not perform batch operations. - - - - - Summary description for OracleDataClientBatchingBatcher. - By Tomer Avissar - - - - - A ResultSet delegate, responsible for locally caching the columnName-to-columnIndex - resolution that has been found to be inefficient in a few vendor's drivers (i.e., Oracle - and Postgres). - - - - - - Summary description for SqlClientBatchingBatcher. - - - - - Expose the batch functionality in ADO.Net 2.0 - Microsoft in its wisdom decided to make my life hard and mark it internal. - Through the use of Reflection and some delegates magic, I opened up the functionality. - - Observable performance benefits are 50%+ when used, so it is really worth it. - - - - - Append a command to the batch - - - - - - This is required because SqlClient.SqlCommandSet will throw if - the command has no parameters. - - - - - - Executes the batch - - - This seems to be returning the total number of affected rows in all queries - - - - - Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - - 2 - - - - Return the batch command to be executed - - - - - The number of commands batched in this instance - - - - - Any exception that occurs in the O-R persistence layer. - - - Exceptions that occur in the database layer are left as native exceptions. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The message that describes the error. - - - - Initializes a new instance of the class. - - - The exception that is the cause of the current exception. If the innerException parameter - is not a null reference, the current exception is raised in a catch block that handles - the inner exception. - - - - - Initializes a new instance of the class. - - The message that describes the error. - - The exception that is the cause of the current exception. If the innerException parameter - is not a null reference, the current exception is raised in a catch block that handles - the inner exception. - - - - - Initializes a new instance of the class - with serialized data. - - - The that holds the serialized object - data about the exception being thrown. - - - The that contains contextual information about the source or destination. - - - - - CodeDOM-based bytecode provider. - - - - - Retrieve the delegate for this provider - capable of generating reflection optimization components. - - The class to be reflected upon. - All property getters to be accessed via reflection. - All property setters to be accessed via reflection. - The reflection optimization delegate. - - - - The specific factory for this provider capable of - generating run-time proxies for lazy-loading purposes. - - - - - NHibernate's object instaciator. - - - For entities and its implementations. - - - - - Instanciator of NHibernate's collections default types. - - - - - ctor - - The target class - Array of setters - Array of getters - - - - Set up the compiler options - - - - - Add an assembly to the list of ReferencedAssemblies - required to build the class - - - - - - Build the generated code - - Generated code - An instance of the generated class - - - - Check if the property is public - - - If IsPublic==true I can directly set the property - If IsPublic==false I need to use the setter/getter - - - - - - - Generate the required code - - C# code - - - - Represents optimized entity property access. - - - - - Factory that generate object based on IReflectionOptimizer needed to replace the use - of reflection. - - - Used in and - - - - - - Generate the IReflectionOptimizer object - - The target class - Array of setters - Array of getters - if the generation fails - - - - Represents reflection optimization for a particular class. - - - - - Represents optimized entity instantiation. - - - - - Perform instantiation of an instance of the underlying class. - - The new instance. - - - - Class constructor. - - - - - Generates a dynamic method which creates a new instance of - when invoked. - - - - - Generates a dynamic method on the given type. - - - - - Generates a dynamic method on the given type. - - - - - - Interface for instanciate all NHibernate objects. - - - - - Creates an instance of the specified type. - - The type of object to create. - A reference to the created object. - - - - Creates an instance of the specified type. - - The type of object to create. - true if a public or nonpublic default constructor can match; false if only a public default constructor can match. - A reference to the created object. - - - - Creates an instance of the specified type using the constructor - that best matches the specified parameters. - - The type of object to create. - An array of constructor arguments. - A reference to the created object. - - - - Emits an ldc.i4 opcode using the fastest available opcode choice. - - - - - Emits IL to unbox a value type and if null, create a new instance of the value type. - - - This does not work if the value type doesn't have a default constructor - we delegate - that to the ISetter. - - - - - Defines a new delegate type. - - - - - Type factory for collections types. - - - - - Creates a new for an . - - The role the collection is in. - The name of the property in the - owner object containing the collection ID, or if it is - the primary key. - The to use to create the array. - Is embedded in XML (not supported yet) - - An for the specified role. - - - - - Creates a new for an - with bag semantics. - - The role the collection is in. - The name of the property in the - owner object containing the collection ID, or if it is - the primary key. - Is embedded in XML (not supported yet) - - A for the specified role. - - - - - Creates a new for an - with bag semantics. - - The type of elements in the list. - The role the collection is in. - - The name of the property in the owner object containing the collection ID, - or if it is the primary key. - - Is embedded in XML (not supported yet) - - A for the specified role. - - - - - Creates a new for an . - - The role the collection is in. - The name of the property in the - owner object containing the collection ID, or if it is - the primary key. - Is embedded in XML (not supported yet) - - A for the specified role. - - - - - Creates a new for an - with list - semantics. - - The type of elements in the list. - The role the collection is in. - - The name of the property in the - owner object containing the collection ID, or if it is - the primary key. - - Is embedded in XML (not supported yet) - - A for the specified role. - - - - - Creates a new for an - with id-bag semantics. - - The role the collection is in. - The name of the property in the - owner object containing the collection ID, or if it is - the primary key. - Is embedded in XML (not supported yet) - - A for the specified role. - - - - - Creates a new for an - with identifier - bag semantics. - - The type of elements in the list. - The role the collection is in. - The name of the property in the - owner object containing the collection ID, or if it is - the primary key. - - Is embedded in XML (not supported yet) - - A for the specified role. - - - - - Creates a new for an . - - The role the collection is in. - The name of the property in the - owner object containing the collection ID, or if it is - the primary key. - Is embedded in XML (not supported yet) - - A for the specified role. - - - - - Creates a new for an - that is sorted by an . - - The role the collection is in. - The name of the property in the - owner object containing the collection ID, or if it is - the primary key. - The that does the sorting. - Is embedded in XML (not supported yet) - - A for the specified role. - - - - - Creates a new for an . - - The type of elements in the collection. - The role the collection is in. - The name of the property in the - owner object containing the collection ID, or if it is - the primary key. - Is embedded in XML (not supported yet) - A for the specified role. - - - - Creates a new for a sorted . - - The type of elements in the collection. - The role the collection is in. - The name of the property in the - owner object containing the collection ID, or if it is - the primary key. - Is embedded in XML (not supported yet) - The to use for the set. - A for the specified role. - - - - Creates a new for an ordered . - - The type of elements in the collection. - The role the collection is in. - - The name of the property in the owner object containing the collection ID, - or if it is the primary key. - - Is embedded in XML (not supported yet) - A for the specified role. - - - - Creates a new for an . - - The role the collection is in. - - The name of the property in the - owner object containing the collection ID, or if it is - the primary key. - Is embedded in XML (not supported yet) - - A for the specified role. - - - - - Creates a new for an - that maintains insertion order of elements. - - The role the collection is in. - The name of the property in the - owner object containing the collection ID, or if it is - the primary key. - Is embedded in XML (not supported yet) - - A for the specified role. - - - - - Creates a new for an - that is sorted by an . - - The role the collection is in. - The name of the property in the - owner object containing the collection ID, or if it is - the primary key. - The that does the sorting. - Is embedded in XML (not supported yet) - - A for the specified role. - - - - - Creates a new for an - . - - The type of keys in the dictionary. - The type of values in the dictionary. - The role the collection is in. - The name of the property in the - owner object containing the collection ID, or if it is - the primary key. - - Is embedded in XML (not supported yet) - - A for the specified role. - - - - - An interface for factories of proxy factory instances. - - - Used to abstract from the tupizer. - - - - - Build a proxy factory specifically for handling runtime - lazy loading. - - The lazy-load proxy factory. - - - - A implementation that returns - , disabling reflection optimization. - - - - - A cached instance of a persistent class - - - - - An item of cached data, timestamped with the time it was cached, when it was locked, - when it was unlocked - - - - - Caches data that is sometimes updated while maintaining the semantics of - "read committed" isolation level. If the database is set to "repeatable - read", this concurrency strategy almost maintains the semantics. - Repeatable read isolation is compromised in the case of concurrent writes. - This is an "asynchronous" concurrency strategy. - - - If this strategy is used in a cluster, the underlying cache implementation - must support distributed hard locks (which are held only momentarily). This - strategy also assumes that the underlying cache implementation does not do - asynchronous replication and that state has been fully replicated as soon - as the lock is released. - for a faster algorithm - - - - - - Implementors manage transactional access to cached data. - - - - Transactions pass in a timestamp indicating transaction start time. - - - When used to cache entities and collections the key is the identifier of the - entity/collection and the value should be set to the - for an entity and the results of - for a collection. - - - - - - Attempt to retrieve an object from the Cache - - The key (id) of the object to get out of the Cache. - A timestamp prior to the transaction start time - The cached object or - - - - - Attempt to cache an object, after loading from the database - - The key (id) of the object to put in the Cache. - The value - A timestamp prior to the transaction start time - the version number of the object we are putting - a Comparer to be used to compare version numbers - indicates that the cache should avoid a put if the item is already cached - if the object was successfully cached - - - - - We are going to attempt to update/delete the keyed object - - The key - - - This method is used by "asynchronous" concurrency strategies. - - - - Called after an item has become stale (before the transaction completes). - - - - This method is used by "synchronous" concurrency strategies. - - - - Called after an item has been updated (before the transaction completes), - instead of calling Evict(). - - - - - - This method is used by "synchronous" concurrency strategies. - - - - Called after an item has been inserted (before the transaction completes), instead of calling Evict(). - - - - - This method is used by "synchronous" concurrency strategies. - - - - Called when we have finished the attempted update/delete (which may or - may not have been successful), after transaction completion. - - The key - The soft lock - - This method is used by "asynchronous" concurrency strategies. - - - - Called after an item has been updated (after the transaction completes), - instead of calling Release(). - - - - - - This method is used by "asynchronous" concurrency strategies. - - - - Called after an item has been inserted (after the transaction completes), instead of calling release(). - - - - - This method is used by "asynchronous" concurrency strategies. - - - - Evict an item from the cache immediately (without regard for transaction isolation). - - - - - - - Evict all items from the cache immediately. - - - - - - Clean up all resources. - - - - - - Gets the cache region name. - - - - - Gets or sets the for this strategy to use. - - The for this strategy to use. - - - - Generate an id for a new lock. Uniqueness per cache instance is very - desirable but not absolutely critical. Must be called from one of the - synchronized methods of this class. - - - - - - Do not return an item whose timestamp is later than the current - transaction timestamp. (Otherwise we might compromise repeatable - read unnecessarily.) Do not return an item which is soft-locked. - Always go straight to the database instead. - - - Note that since reading an item from that cache does not actually - go to the database, it is possible to see a kind of phantom read - due to the underlying row being updated after we have read it - from the cache. This would not be possible in a lock-based - implementation of repeatable read isolation. It is also possible - to overwrite changes made and committed by another transaction - after the current transaction read the item from the cache. This - problem would be caught by the update-time version-checking, if - the data is versioned or timestamped. - - - - - Stop any other transactions reading or writing this item to/from - the cache. Send them straight to the database instead. (The lock - does time out eventually.) This implementation tracks concurrent - locks by transactions which simultaneously attempt to write to an - item. - - - - - Do not add an item to the cache unless the current transaction - timestamp is later than the timestamp at which the item was - invalidated. (Otherwise, a stale item might be re-added if the - database is operating in repeatable read isolation mode.) - - Whether the item was actually put into the cache - - - - decrement a lock and put it back in the cache - - - - - Re-cache the updated state, if and only if there there are - no other concurrent soft locks. Release our lock. - - - - - Is the client's lock commensurate with the item in the cache? - If it is not, we know that the cache expired the original - lock. - - - - - Gets the cache region name. - - - - - Lock the item - - - - - Is this item visible to the timestamped transaction? - - - - - - - Don't overwrite already cached items - - - - - - - - - The timestamp on the cached data - - - - - The actual cached data - - - - - Not a lock! - - - - - Represents any exception from an . - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The message that describes the error. - - - - Initializes a new instance of the class. - - - The exception that is the cause of the current exception. If the innerException parameter - is not a null reference, the current exception is raised in a catch block that handles - the inner exception. - - - - - Initializes a new instance of the class. - - The message that describes the error. - - The exception that is the cause of the current exception. If the innerException parameter - is not a null reference, the current exception is raised in a catch block that handles - the inner exception. - - - - - Initializes a new instance of the class - with serialized data. - - - The that holds the serialized object - data about the exception being thrown. - - - The that contains contextual information about the source or destination. - - - - - Factory class for creating an . - - - - - No providers implement transactional caching currently, - it was ported from Hibernate just for the sake of completeness. - - - - - Creates an from the parameters. - - The name of the strategy that should use for the class. - The name of the class the strategy is being created for. - if the object being stored in the cache is mutable. - Used to retrieve the global cache region prefix. - Properties the cache provider can use to configure the cache. - An to use for this object in the . - - - - Allows multiple entity classes / collection roles to be - stored in the same cache region. Also allows for composite - keys which do not properly implement equals()/hashCode(). - - - - - Construct a new key for a collection or entity instance. - Note that an entity name should always be the root entity - name, not a subclass entity name. - - The identifier associated with the cached data - The Hibernate type mapping - The entity or collection-role name. - The entiyt mode of the originating session - The session factory for which we are caching - - - - A soft lock which supports concurrent locking, - timestamped with the time it was released - - - This class was named Lock in H2.1 - - - - - Marker interface, denoting a client-visible "soft lock" on a cached item. - - - - - Increment the lock, setting the - new lock timeout - - - - - Decrement the lock, setting the unlock - timestamp if now unlocked - - - - - - Can the timestamped transaction re-cache this - locked item now? - - - - - locks are not returned to the client! - - - - - Was this lock held concurrently by multiple - transactions? - - - - - Yes, this is a lock - - - - - Used by - - - - - Implementors define a caching algorithm. - - - - - All implementations must be threadsafe. - - - The key is the identifier of the object that is being cached and the - value is a . - - - - - - Get the object from the Cache - - - - - - - - - - - - - - Remove an item from the Cache. - - The Key of the Item in the Cache to remove. - - - - - Clear the Cache - - - - - - Clean up. - - - - - - If this is a clustered cache, lock the item - - The Key of the Item in the Cache to lock. - - - - - If this is a clustered cache, unlock the item - - The Key of the Item in the Cache to unlock. - - - - - Generate a timestamp - - - - - - Get a reasonable "lock timeout" - - - - - Gets the name of the cache region - - - - - A simple -based cache - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Cache Provider plugin for NHibernate that is configured by using - cache.provider_class="NHibernate.Cache.HashtableCacheProvider" - - - - - Support for pluggable caches - - - - - Configure the cache - - the name of the cache region - configuration settings - - - - - generate a timestamp - - - - - - Callback to perform any necessary initialization of the underlying cache implementation - during ISessionFactory construction. - - current configuration settings - - - - Callback to perform any necessary cleanup of the underlying cache implementation - during . - - - - - Contract for sources of optimistically lockable data sent to the second level cache. - - - Note currently EntityPersisters are - the only viable source. - - - - - Does this source represent versioned (i.e., and thus optimistically lockable) data? - - True if this source represents versioned data; false otherwise. - - - Get the comparator used to compare two different version values together. - An appropriate comparator. - - - - Defines the contract for caches capable of storing query results. These - caches should only concern themselves with storing the matching result ids. - The transactional semantics are necessarily less strict than the semantics - of an item cache. - - - - - Defines a factory for query cache instances. These factories are responsible for - creating individual QueryCache instances. - - - - - A cache provider placeholder used when caching is disabled. - - - - - Configure the cache - - the name of the cache region - configuration settings - - - - - Generate a timestamp - - - - - Callback to perform any necessary initialization of the underlying cache implementation during SessionFactory - construction. - - current configuration settings. - - - - Callback to perform any necessary cleanup of the underlying cache implementation during SessionFactory.close(). - - - - - Caches data that is sometimes updated without ever locking the cache. - If concurrent access to an item is possible, this concurrency strategy - makes no guarantee that the item returned from the cache is the latest - version available in the database. Configure your cache timeout accordingly! - This is an "asynchronous" concurrency strategy. - for a much stricter algorithm - - - - - Get the most recent version, if available. - - - - - Add an item to the cache - - - - - Do nothing - - - - - Invalidate the item - - - - - Invalidate the item - - - - - Do nothing - - - - - Invalidate the item (again, for safety). - - - - - Invalidate the item (again, for safety). - - - - - Do nothing - - - - - Gets the cache region name. - - - - - Initializes a new instance of the class. - - the session factory for this query key, required to get the identifiers of entities that are used as values. - The query string. - The query parameters. - The filters. - - - - Caches data that is never updated - - - - - Unsupported! - - - - - Unsupported! - - - - - Unsupported! - - - - - Do nothing. - - - - - Do nothing. - - - - - Do nothing. - - - - - Unsupported! - - - - - Gets the cache region name. - - - - - The standard implementation of the Hibernate - interface. This implementation is very good at recognizing stale query - results and re-running queries when it detects this condition, recaching - the new results. - - - - - Standard Hibernate implementation of the IQueryCacheFactory interface. Returns - instances of . - - - - - Generates increasing identifiers (in a single application domain only). - - - Not valid across multiple application domains. Identifiers are not necessarily - strictly increasing, but usually are. - - - - - - - - - - - - - - Tracks the timestamps of the most recent updates to particular tables. It is - important that the cache timeout of the underlying cache implementation be set - to a higher value than the timeouts of any of the query caches. In fact, we - recommend that the the underlying cache not be configured for expiry at all. - Note, in particular, that an LRU cache expiry policy is never appropriate. - - - - - - - - Helper to parse hibernate-configuration XmlNode. - - - - - The XML node name for hibernate configuration section in the App.config/Web.config and - for the hibernate.cfg.xml . - - - - The XML Namespace for the nhibernate-configuration - - - XPath expression for bytecode-provider property. - - - XPath expression for reflection-optimizer property. - - - XPath expression for session-factory whole node. - - - XPath expression for session-factory.property nodes - - - XPath expression for session-factory.mapping nodes - - - XPath expression for session-factory.class-cache nodes - - - XPath expression for session-factory.collection-cache nodes - - - XPath expression for session-factory.event nodes - - - XPath expression for session-factory.listener nodes - - - - Convert a string to . - - The string that represent . - - The converted to . - for invalid values. - - - See for allowed values. - - - - - Convert a string to . - - The string that represent . - - The converted to . - - If the values is invalid. - - See for allowed values. - - - - - Convert a string to . - - The string that represent . - - The converted to . - - If the values is invalid. - - See for allowed values. - - - - - Convert a string to . - - The string that represent . - - The converted to . - - If the values is invalid. - - See for allowed values. - - - - - Values for class-cache and collection-cache strategy. - - - - Xml value: read-only - - - Xml value: read-write - - - Xml value: nonstrict-read-write - - - Xml value: transactional - - - - Values for class-cache include. - - Not implemented in Cache. - - - Xml value: all - - - Xml value: non-lazy - - - - Configuration parsed values for a class-cache XML node. - - - - - Initializes a new instance of the class. - - The class full name. - Cache strategy. - When is null or empty. - - - - Initializes a new instance of the class. - - The class full name. - Cache strategy. - Values for class-cache include. - When is null or empty. - - - - Initializes a new instance of the class. - - The class full name. - Cache strategy. - The cache region. - When is null or empty. - - - - Initializes a new instance of the class. - - The class full name. - Cache strategy. - Values for class-cache include. - The cache region. - When is null or empty. - - - - The class full name. - - - - - The cache region. - - If null or empty the is used during configuration. - - - - Cache strategy. - - - - - class-cache include. - - - Not implemented in Cache. - Default value . - - - - - Configuration parsed values for a collection-cache XML node. - - - - - Initializes a new instance of the class. - - The cache role. - Cache strategy. - When is null or empty. - - - - Initializes a new instance of the class. - - The cache role. - Cache strategy. - The cache region. - When is null or empty. - - - - The role. - - - - - The cache region. - - If null or empty the is used during configuration. - - - - Cache strategy. - - - - - Configuration parsed values for a event XML node. - - - - - Initializes a new instance of the class. - - The listener. - The type. - - - - The default type of listeners. - - - - - Listeners for this event. - - - - - Values for bytecode-provider system property. - - - - Xml value: codedom - - - Xml value: lcg - - - Xml value: null - - - - Configuration parsed values for hibernate-configuration section. - - - - - Initializes a new instance of the class. - - The XML reader to parse. - - The nhibernate-configuration.xsd is applied to the XML. - - When nhibernate-configuration.xsd can't be applied. - - - - Value for bytecode-provider system property. - - Default value . - - - - Value for reflection-optimizer system property. - - Default value true. - - - - The if the session-factory exists in hibernate-configuration; - Otherwise null. - - - - - Configuration parsed values for a listener XML node - - - - - Initializes a new instance of the class. - - The class full name. - When is null or empty. - - - - Initializes a new instance of the class. - - The class full name. - The listener type. - When is null or empty. - - - - The class full name. - - - - - The listener type. - - Default value mean that the value is ignored. - - - - Configuration parsed values for a mapping XML node - - - There are 3 possible combinations of mapping attributes - 1 - resource and assembly: NHibernate will read the mapping resource from the specified assembly - 2 - file only: NHibernate will read the mapping from the file. - 3 - assembly only: NHibernate will find all the resources ending in hbm.xml from the assembly. - - - - - Initializes a new instance of the class. - - Mapped file. - When is null or empty. - - - - Initializes a new instance of the class. - - The assembly name. - The mapped embedded resource. - When is null or empty. - - - - Configuration parsed values for a session-factory XML node. - - - - - Initializes a new instance of the class. - - The session factory name. Null or empty string are allowed. - - - - The session factory name. - - - - - Session factory propeties bag. - - - - - Session factory mapping configuration. - - - - - Session factory class-cache configurations. - - - - - Session factory collection-cache configurations. - - - - - Session factory event configurations. - - - - - Session factory listener configurations. - - - - - Responsible for checking that a resource name matches the default pattern of "*.hbm.xml". This is the - default filter for . - - - - - Responsible for determining whether an embedded resource should be parsed for HBM XML data while - iterating through an . - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A base class for HBM schema classes that provides helper methods. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Responsible for converting a of HBM XML into an instance of - . - - - - - Responsible for building a list of objects from a range of acceptable - sources. - - - - - Calls the greedy constructor, passing it new instances of and - . - - - - Adds any embedded resource streams which pass the . - An assembly containing embedded mapping documents. - A custom filter. - - - Adds any embedded resource streams which pass the default filter. - An assembly containing embedded mapping documents. - - - - Responsible for converting a of HBM XML into an instance of - . - - Uses an to deserialize HBM. - - - - Converts a partial class name into a fully qualified one - - - - - - - - Converts a partial class name into a fully one - - - - The class FullName (without the assembly) - - The FullName is equivalent to the default entity-name - - - - - Attempts to find a type by its full name. Throws a - using the provided in case of failure. - - name of the class to find - Error message to use for - the in case of failure. Should contain - the {0} formatting placeholder. - A instance. - - Thrown when there is an error loading the class. - - - - - Similar to , but handles short class names - by calling . - - - - - - - - - Called for all collections. parameter - was added in NH to allow for reflection related to generic types. - - - - - Called for arrays and primitive arrays - - - - - Called for Maps - - - - - Called for all collections - - - - - Extracts the names of classes mapped in a given file, - and the names of the classes they extend. - - - - - Returns a collection of containing - information about all classes in this stream. - - A validated representing - a mapping file. - - - - Holds information about mapped classes found in the hbm.xml files. - - - - - Allows the application to specify properties and mapping documents to be used when creating - a . - - - - Usually an application will create a single , build a single instance - of , and then instantiate objects in threads - servicing client requests. - - - The is meant only as an initialization-time object. - is immutable and does not retain any association back to the - - - - - The XML Namespace for the nhibernate-mapping - - - Default name for hibernate configuration file. - - - - Clear the internal state of the object. - - - - - Create a new Configuration object. - - - - - Get the mapping for a particular class - - - - Get the mapping for a particular entity - An entity name. - the entity mapping information - - - - Get the mapping for a particular collection role - - a collection role - - - - - Read mappings from a particular XML file. This method is equivalent - to . - - - - - - - Read mappings from a particular XML file. - - a path to a file - This configuration object. - - - - Read mappings from a . This method is equivalent to - . - - an XML string - The name to use in error reporting. May be . - This configuration object. - - - - Read mappings from a . - - an XML string - This configuration object. - - - - Read mappings from a URL. - - a URL - This configuration object. - - - - Read mappings from a URL. - - a to read the mappings from. - This configuration object. - - - - Read mappings from an . - - A loaded that contains the mappings. - The name of the document, for error reporting purposes. - This configuration object. - - - - Takes the validated XmlDocument and has the Binder do its work of - creating Mapping objects from the Mapping Xml. - - The NamedXmlDocument that contains the validated mapping XML file. - - - - Create a new to add classes and collection - mappings to. - - - - - Read mappings from a . - - The stream containing XML - This Configuration object. - - The passed in through the parameter - is not guaranteed to be cleaned up by this method. It is the caller's responsiblity to - ensure that is properly handled when this method - completes. - - - - - Read mappings from a . - - The stream containing XML - The name of the stream to use in error reporting. May be . - This Configuration object. - - The passed in through the parameter - is not guaranteed to be cleaned up by this method. It is the caller's responsiblity to - ensure that is properly handled when this method - completes. - - - - - Adds the mappings in the resource of the assembly. - - The path to the resource file in the assembly. - The assembly that contains the resource file. - This configuration object. - - - - Adds the mappings from ebedded resources of the assembly. - - Paths to the resource files in the assembly. - The assembly that contains the resource files. - This configuration object. - - - - Read a mapping from an embedded resource, using a convention. - - The type to map. - This configuration object. - - The convention is for class Foo.Bar.Foo to be mapped by - the resource named Foo.Bar.Foo.hbm.xml, embedded in - the class' assembly. If the mappings and classes are defined - in different assemblies or don't follow the naming convention, - this method cannot be used. - - - - - Adds all of the assembly's embedded resources whose names end with .hbm.xml. - - The name of the assembly to load. - This configuration object. - - The assembly must be loadable using . If this - condition is not satisfied, load the assembly manually and call - instead. - - - - - Adds all of the assembly's embedded resources whose names end with .hbm.xml. - - The assembly. - This configuration object. - - - - Read all mapping documents from a directory tree. Assume that any - file named *.hbm.xml is a mapping document. - - a directory - - - - Generate DDL for dropping tables - - - - - - Generate DDL for creating tables - - - - - - Call this to ensure the mappings are fully compiled/built. Usefull to ensure getting - access to all information in the metamodel when calling e.g. getClassMappings(). - - - - - This method may be called many times!! - - - - - Instantiate a new , using the properties and mappings in this - configuration. The will be immutable, so changes made to the - configuration after building the will not affect it. - - An instance. - - - - Set the default assembly to use for the mappings added to the configuration - afterwards. - - The default assembly name. - This configuration instance. - - This setting can be overridden for a mapping file by setting default-assembly - attribute of <hibernate-mapping> element. - - - - - Set the default namespace to use for the mappings added to the configuration - afterwards. - - The default namespace. - This configuration instance. - - This setting can be overridden for a mapping file by setting default-namespace - attribute of <hibernate-mapping> element. - - - - - Sets the default interceptor for use by all sessions. - - The default interceptor. - This configuration instance. - - - - Specify a completely new set of properties - - - - - Adds an of configuration properties. The - Key is the name of the Property and the Value is the - value of the Property. - - An of configuration properties. - - This object. - - - - - Sets the value of the configuration property. - - The name of the property. - The value of the property. - - This configuration object. - - - - - Gets the value of the configuration property. - - The name of the property. - The configured value of the property, or if the property was not specified. - - - - Configure NHibernate using the <hibernate-configuration> section - from the application config file, if found, or the file hibernate.cfg.xml if the - <hibernate-configuration> section not include the session-factory configuration. - - A configuration object initialized with the file. - - To configure NHibernate explicitly using hibernate.cfg.xml, appling merge/override - of the application configuration file, use this code: - - configuration.Configure("path/to/hibernate.cfg.xml"); - - - - - - Configure NHibernate using the file specified. - - The location of the XML file to use to configure NHibernate. - A Configuration object initialized with the file. - - Calling Configure(string) will override/merge the values set in app.config or web.config - - - - - Configure NHibernate using a resource contained in an Assembly. - - The that contains the resource. - The name of the manifest resource being requested. - A Configuration object initialized from the manifest resource. - - Calling Configure(Assembly, string) will overwrite the values set in app.config or web.config - - - - - Configure NHibernate using the specified XmlReader. - - The that contains the Xml to configure NHibernate. - A Configuration object initialized with the file. - - Calling Configure(XmlReader) will overwrite the values set in app.config or web.config - - - - - Set up a cache for an entity class - - - - - Set up a cache for a collection role - - - - - Create an object-oriented view of the configuration properties - - A object initialized from the settings properties. - - - - Set a custom naming strategy - - the NamingStrategy to set - - - - - Load and validate the mappings in the against - the nhibernate-mapping-2.2 schema, without adding them to the configuration. - - - This method is made public to be usable from the unit tests. It is not intended - to be called by end users. - - The XmlReader that contains the mapping. - The name of the document, for error reporting purposes. - NamedXmlDocument containing the validated XmlDocument built from the XmlReader. - - - - Adds the Mappings in the after validating it - against the nhibernate-mapping-2.2 schema. - - The XmlReader that contains the mapping. - This Configuration object. - - - - Adds the Mappings in the after validating it - against the nhibernate-mapping-2.2 schema. - - The XmlReader that contains the mapping. - The name of the document to use for error reporting. May be . - This Configuration object. - - - - Set or clear listener for a given . - - The . - The array of AssemblyQualifiedName of each listener for . - - must implements the interface related with . - All listeners of the given will be cleared if the - is null or empty. - - - when an element of have an invalid value or cant be instantiated. - - - - - Set or clear listener for a given . - - The . - The listener for or null to clear. - must implements the interface related with . - - - - - Set or clear listeners for a given . - - The . - The listener for or null to clear. - Listeners of must implements one of the interface of event listenesr. - - - - - Generate DDL for altering tables - - - - - - The class mappings - - - - - The collection mappings - - - - - The table mappings - - - - - The named queries - - - - - Retrieve the user-supplied delegate to handle non-existent entity scenarios. - - - Specify a user-supplied delegate to be used to handle scenarios where an entity could not be - located by specified id. This is mainly intended for EJB3 implementations to be able to - control how proxy initialization errors should be handled... - - - - - Gets or sets the to use. - - The to use. - - - - Gets or sets the that contains the configuration - properties and their values. - - - The that contains the configuration - properties and their values. - - - - - Get the query language imports (entityName/className -> AssemblyQualifiedName) - - - - - The named SQL queries - - - - - Naming strategy for tables and columns - - - - - Defines operations common to "compiled" mappings (ie. SessionFactory) and - "uncompiled" mappings (ie Configuration that are used by implementors of IType - - - - - Summary description for ConfigurationSectionHandler. - - - - - The default - - See for a better alternative - - - - A set of rules for determining the physical column and table names given the information in the mapping - document. May be used to implement project-scoped naming standards for database objects. - - - - - Return a table name for an entity class - - the fully-qualified class name - a table name - - - - Return a column name for a property path expression - - a property path - a column name - - - - Alter the table name given in the mapping document - - a table name - a table name - - - - Alter the column name given in the mapping document - - a column name - a column name - - - - Return a table name for a collection - - the fully-qualified name of the owning entity class - a property path - a table name - - - - Return the logical column name used to refer to a column in the metadata - (like index, unique constraints etc) - A full bijection is required between logicalNames and physical ones - logicalName have to be case insersitively unique for a given table - - given column name if any - property name of this column - - - - The singleton instance - - - - - Return the unqualified class name - - - - - - - Return the unqualified property name - - - - - - - Return the argument - - - - - - - Return the argument - - - - - - - Return the unqualified property name - - - - - - - - Provides access to configuration information. - - - NHibernate has two property scopes: - - - Factory-level properties may be passed to the when it is - instantiated. Each instance might have different property values. If no properties are - specified, the factory gets them from Environment - - - System-level properties are shared by all factory instances and are always determined - by the properties - - - In NHibernate, <hibernate-configuration> section in the application configuration file - corresponds to Java system-level properties; <session-factory> - section is the session-factory-level configuration. - - It is possible to use the application configuration file (App.config) together with the NHibernate - configuration file (hibernate.cfg.xml) at the same time. - Properties in hibernate.cfg.xml override/merge properties in application configuration file where same - property is found. For others configuration a merge is applied. - - - - - Used to find the .Net 2.0 named connection string - - - - A default database schema (owner) name to use for unqualified tablenames - - - A default database catalog name to use for unqualified tablenames - - - The EntityMode in which set the Session opened from the SessionFactory. - - - Enable formatting of SQL logged to the console - - - Should named queries be checked during startup (the default is enabled). - Mainly intended for test environments. - - - Enable statistics collection - - - - Issue warnings to user when any obsolete property names are used. - - - - - - - NHibernate version (informational). - - - - - Gets a copy of the configuration found in <hibernate-configuration> section - of app.config/web.config. - - - This is the replacement for hibernate.properties - - - - - The bytecode provider to use. - - - This property is read from the <nhibernate> section - of the application configuration file by default. Since it is not - always convenient to configure NHibernate through the application - configuration file, it is also possible to set the property value - manually. This should only be done before a configuration object - is created, otherwise the change may not take effect. - - - - - Whether to enable the use of reflection optimizer - - - This property is read from the <nhibernate> section - of the application configuration file by default. Since it is not - always convenient to configure NHibernate through the application - configuration file, it is also possible to set the property value - manually. This should only be done before a configuration object - is created, otherwise the change may not take effect. - - - - - Represents a mapping queued for delayed processing to await - processing of an extends entity upon which it depends. - - - - - An exception that occurs at configuration time, rather than runtime, as a result of - something screwy in the hibernate.cfg.xml. - - - - - An exception that usually occurs at configuration time, rather than runtime, as a result of - something screwy in the O-R mappings - - - - - Initializes a new instance of the class. - - The message that describes the error. - - - - Initializes a new instance of the class. - - - The exception that is the cause of the current exception. If the innerException parameter - is not a null reference, the current exception is raised in a catch block that handles - the inner exception. - - - - - Initializes a new instance of the class. - - The message that describes the error. - - The exception that is the cause of the current exception. If the innerException parameter - is not a null reference, the current exception is raised in a catch block that handles - the inner exception. - - - - - Initializes a new instance of the class - with serialized data. - - - The that holds the serialized object - data about the exception being thrown. - - - The that contains contextual information about the source or destination. - - - - - Initializes a new instance of the class. - - Default message is used. - - - - Initializes a new instance of the class. - - - The exception that is the cause of the current exception. If the innerException parameter - is not a null reference, the current exception is raised in a catch block that handles - the inner exception. - - - - - Initializes a new instance of the class. - - The message that describes the error. - - - - Initializes a new instance of the class. - - The message that describes the error. - - The exception that is the cause of the current exception. If the innerException parameter - is not a null reference, the current exception is raised in a catch block that handles - the inner exception. - - - - - Initializes a new instance of the class - with serialized data. - - - The that holds the serialized object - data about the exception being thrown. - - - The that contains contextual information about the source or destination. - - - - - Summary description for ImprovedNamingStrategy. - - - - - The singleton instance - - - - - Return the unqualified class name, mixed case converted to underscores - - - - - - - Return the full property path with underscore separators, mixed case converted to underscores - - - - - - - Convert mixed case to underscores - - - - - - - Convert mixed case to underscores - - - - - - - Return the full property path prefixed by the unqualified class name, with underscore separators, mixed case converted to underscores - - - - - - - - A collection of mappings from classes and collections to relational database tables. - - Represents a single <hibernate-mapping> element. - - - - Binding table between the logical column name and the name out of the naming strategy - for each table. - According that when the column name is not set, the property name is considered as such - This means that while theoretically possible through the naming strategy contract, it is - forbidden to have 2 real columns having the same logical name - - - - - Binding between logical table name and physical one (ie after the naming strategy has been applied) - - - - - - - - - - - - - - - - - Adds an import to allow for the full class name Namespace.Entity (AssemblyQualifiedName) - to be referenced as Entity or some other name in HQL. - - The name of the type that is being renamed. - The new name to use in HQL for the type. - Thrown when the rename already identifies another type. - - - - - - - - - The default namespace for persistent classes - - - - - The default assembly for persistent classes - - - - - - - - - - - Gets or sets a boolean indicating if the Fully Qualified Type name should - automatically have an import added as the class name. - - if the class name should be used as an import. - - Auto-import is used to shorten the string used to refer to types to just their - unqualified name. So if the type MyAssembly.MyNamespace.MyClass, MyAssembly has - auto-import="false" then all use of it in HQL would need to be the fully qualified - version MyAssembly.MyNamespace.MyClass. If auto-import="true", the type could - be referred to in HQL as just MyClass. - - - - - Queues mapping files according to their dependency order. - - - - - Adds the specified document to the queue. - - - - - Gets a that can now be processed (i.e. - that doesn't depend on classes not yet processed). - - - - - - Checks that no unprocessed documents remain in the queue. - - - - - Holds information about mapped classes found in an embedded resource - - - - - Gets the names of all entities outside this resource - needed by the classes in this resource. - - - - - Gets the names of all entities in this resource - - - - - Settings that affect the behavior of NHibernate at runtime. - - - - - Reads configuration properties and configures a instance. - - - - - Provides callbacks from the to the persistent object. Persistent classes may - implement this interface but they are not required to. - - - - , , and are intended to be used - to cascade saves and deletions of dependent objects. This is an alternative to declaring cascaded - operations in the mapping file. - - - may be used to initialize transient properties of the object from its persistent - state. It may not be used to load dependent objects since the interface - may not be invoked from inside this method. - - - A further intended usage of , , and - is to store a reference to the for later use. - - - If , , or return - , the operation is silently vetoed. If a - is thrown, the operation is vetoed and the exception is passed back to the application. - - - Note that is called after an identifier is assigned to the object, except when - identity key generation is used. - - - - - - Called when an entity is saved - - The session - If we should veto the save - - - - Called when an entity is passed to . - - The session - A value indicating whether the operation - should be vetoed or allowed to proceed. - - This method is not called every time the object's state is - persisted during a flush. - - - - - Called when an entity is deleted - - The session - A value indicating whether the operation - should be vetoed or allowed to proceed. - - - - Called after an entity is loaded. - - - It is illegal to access the from inside this method.. - However, the object may keep a reference to the session for later use - - The session - The identifier - - - - Veto the action - - - - - Accept the action - - - - - Implemented by persistent classes with invariants that must be checked before inserting - into or updating the database - - - - - Validate the state of the object before persisting it. If a violation occurs, - throw a . This method must not change the state of the object - by side-effect. - - - - - Thrown from when an invariant was violated. Some applications - might subclass this exception in order to provide more information about the violation - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The message that describes the error. - - - - Initializes a new instance of the class. - - - The exception that is the cause of the current exception. If the innerException parameter - is not a null reference, the current exception is raised in a catch block that handles - the inner exception. - - - - - Initializes a new instance of the class. - - The message that describes the error. - - The exception that is the cause of the current exception. If the innerException parameter - is not a null reference, the current exception is raised in a catch block that handles - the inner exception. - - - - - Initializes a new instance of the class - with serialized data. - - - The that holds the serialized object - data about the exception being thrown. - - - The that contains contextual information about the source or destination. - - - - - An unordered, unkeyed collection that can contain the same element - multiple times. The .NET collections API, has no Bag. - Most developers seem to use to represent bag semantics, - so NHibernate follows this practice. - - The type of the element the bag should hold. - The underlying collection used is an - - - - An unordered, unkeyed collection that can contain the same element - multiple times. The .NET collections API has no Bag class. - Most developers seem to use s to represent bag semantics, - so NHibernate follows this practice. - - - - - Base class for implementing . - - - - - - Persistent collections are treated as value objects by NHibernate. - ie. they have no independent existence beyond the object holding - a reference to them. Unlike instances of entity classes, they are - automatically deleted when unreferenced and automatically become - persistent when held by a persistent object. Collections can be - passed between different objects (change "roles") and this might - cause their elements to move from one database table to another. - - - NHibernate "wraps" a collection in an instance of - . This mechanism is designed - to support tracking of changes to the collection's persistent - state and lazy instantiation of collection elements. The downside - is that only certain abstract collection types are supported and - any extra semantics are lost. - - - Applications should never use classes in this namespace - directly, unless extending the "framework" here. - - - Changes to structure of the collection are recorded by the - collection calling back to the session. Changes to mutable - elements (ie. composite elements) are discovered by cloning their - state when the collection is initialized and comparing at flush - time. - - - - - - Return the user-visible collection (or array) instance - - - By default, the NHibernate wrapper is an acceptable collection for - the end user code to work with because it is interface compatible. - An NHibernate PersistentList is an IList, an NHibernate PersistentMap is an IDictionary - and those are the types user code is expecting. - - - - After flushing, re-init snapshot state. - - - - Clears out any Queued Additions. - - - After a Flush() the database is in synch with the in-memory - contents of the Collection. Since everything is in synch remove - any Queued Additions. - - - - - Called just before reading any rows from the - - - - - Called after reading all rows from the - - - This should be overridden by sub collections that use temporary collections - to store values read from the db. - - - true if NOT has Queued operations - - - - - Called after initializing from cache - - - true if NOT has Queued operations - - - - - Disassociate this collection from the given session. - - - true if this was currently associated with the given session - - - - Associate the collection with the given session. - - - false if the collection was already associated with the session - - - - Read the state of the collection from a disassembled cached value. - - - - - - - - Iterate all collection entries, during update of the database - - - An that gives access to all entries - in the collection. - - - - - Reads the row from the . - - - This method should be prepared to handle duplicate elements caused by fetching multiple collections, - or should be updated - to return for the collection type. - - The IDataReader that contains the value of the Identifier - The persister for this Collection. - The descriptor providing result set column names - The owner of this Collection. - The object that was contained in the row. - - - - Get the identifier of the given collection entry - - - - - Get the index of the given collection entry - - - - - Get the value of the given collection entry - - - - - Get the snapshot value of the given collection entry - - - - - Called before any elements are read into the collection, - allowing appropriate initializations to occur. - - The for this persistent collection. - The anticipated size of the collection after initilization is complete. - - - - Does the current state exactly match the snapshot? - - The to compare the elements of the Collection. - - if the wrapped collection is different than the snapshot - of the collection or if one of the elements in the collection is - dirty. - - - - Is the snapshot empty? - - - - Disassemble the collection, ready for the cache - - The for this Collection. - The contents of the persistent collection in a cacheable form. - - - - Gets a indicating if the rows for this collection - need to be recreated in the table. - - The for this Collection. - - by default since most collections can determine which rows need to be - individually updated/inserted/deleted. Currently only 's for many-to-many - need to be recreated. - - - - - Return a new snapshot of the current state of the collection - - - - - To be called internally by the session, forcing - immediate initalization. - - - This method is similar to , except that different exceptions are thrown. - - - - - Does an element exist at this entry in the collection? - - - - - Do we need to insert this element? - - - - - Do we need to update this element? - - - - - Get all the elements that need deleting - - - - - Is this the wrapper for the given underlying collection instance? - - The collection to see if this IPersistentCollection is wrapping. - - if the IPersistentCollection is wrappping the collection instance, - otherwise. - - - - Get the "queued" orphans - - - - Clear the dirty flag, after flushing changes - to the database. - - - - - Mark the collection as dirty - - - - - Called before inserting rows, to ensure that any surrogate keys are fully generated - - - - - - Called after inserting a row, to fetch the natively generated id - - - - - Get all "orphaned" elements - - The snapshot of the collection. - The persistent class whose objects - the collection is expected to contain. - - An that contains all of the elements - that have been orphaned. - - - - - The owning entity. - - - Note that the owner is only set during the flush - cycle, and when a new collection wrapper is created - while loading an entity. - - - - Get the current collection key value - - - Get the current role name - - - Is the collection unreferenced? - - - - Is the collection dirty? Note that this is only - reliable during the flush cycle, after the - collection elements are dirty checked against - the snapshot. - - - - Get the snapshot cached by the collection instance - - - - Is the initialized collection empty? - - - - - Gets a indicating if the underlying collection is directly - accessible through code. - - - if we are not guaranteed that the NHibernate collection wrapper - is being used. - - - This is typically whenever a transient object that contains a collection is being - associated with an through or . - NHibernate can't guarantee that it will know about all operations that would cause NHibernate's collections - to call or . - - - - - - - - - - - - - - Not called by Hibernate, but used by non-NET serialization, eg. SOAP libraries. - - - - - Return the user-visible collection (or array) instance - - - By default, the NHibernate wrapper is an acceptable collection for - the end user code to work with because it is interface compatible. - An NHibernate PersistentList is an IList, an NHibernate PersistentMap is an IDictionary - and those are the types user code is expecting. - - - - - Called by any read-only method of the collection interface - - - - Called by the Count property - - - - Called by any writer method of the collection interface - - - - - Queue an addition, delete etc. if the persistent collection supports it - - - - - After reading all existing elements from the database, - add the queued elements to the underlying collection. - - - - - Clears out any Queued operation. - - - After flushing, clear any "queued" additions, since the - database state is now synchronized with the memory state. - - - - - Called just before reading any rows from the - - - - - Called after reading all rows from the - - - This should be overridden by sub collections that use temporary collections - to store values read from the db. - - - - - Initialize the collection, if possible, wrapping any exceptions - in a runtime exception - - currently obsolete - if we cannot initialize - - - - Mark the collection as initialized. - - - - - Disassociate this collection from the given session. - - - true if this was currently associated with the given session - - - - Associate the collection with the given session. - - - false if the collection was already associated with the session - - - - Gets a indicating if the rows for this collection - need to be recreated in the table. - - The for this Collection. - - by default since most collections can determine which rows need to be - individually updated/inserted/deleted. Currently only 's for many-to-many - need to be recreated. - - - - - To be called internally by the session, forcing - immediate initalization. - - - This method is similar to , except that different exceptions are thrown. - - - - - Gets the Snapshot from the current session the collection is in. - - - - - Called before inserting rows, to ensure that any surrogate keys are fully generated - - - - - - Called after inserting a row, to fetch the natively generated id - - - - - Get all "orphaned" elements - - - - - Given a collection of entity instances that used to - belong to the collection, and a collection of instances - that currently belong, return a collection of orphans - - - - - Disassemble the collection, ready for the cache - - - - - - - Is this the wrapper for the given underlying collection instance? - - - - - - - Does an element exist at this entry in the collection? - - - - - - - - Get all the elements that need deleting - - - - - Read the state of the collection from a disassembled cached value. - - - - - - - - Do we need to update this element? - - - - - - - - - Reads the row from the . - - The IDataReader that contains the value of the Identifier - The persister for this Collection. - The descriptor providing result set column names - The owner of this Collection. - The object that was contained in the row. - - - - Do we need to insert this element? - - - - - - - - - Get the index of the given collection entry - - - - - Called before any elements are read into the collection, - allowing appropriate initializations to occur. - - The underlying collection persister. - The anticipated size of the collection after initilization is complete. - - - - Is the collection currently connected to an open session? - - - - - Is this collection in a state that would allow us to "queue" additions? - - - - Is this collection in a state that would allow us to - "queue" puts? This is a special case, because of orphan - delete. - - - - Is this collection in a state that would allow us to - "queue" clear? This is a special case, because of orphan - delete. - - - - Is this the "inverse" end of a bidirectional association? - - - - Is this the "inverse" end of a bidirectional association with - no orphan delete enabled? - - - - - Is this the "inverse" end of a bidirectional one-to-many, or - of a collection with no orphan delete? - - - - - - - - Is the initialized collection empty? - - - - - Gets a indicating if the underlying collection is directly - accessible through code. - - - if we are not guaranteed that the NHibernate collection wrapper - is being used. - - - This is typically whenever a transient object that contains a collection is being - associated with an through or . - NHibernate can't guarantee that it will know about all operations that would cause NHibernate's collections - to call or . - - - - Is this instance initialized? - - - Does this instance have any "queued" additions? - - - - - - - Counts the number of times that the occurs - in the . - - The element to find in the list. - The to search. - The that can determine equality. - The entity mode. - - The number of occurrences of the element in the list. - - - - - Initializes this PersistentBag from the cached values. - - The CollectionPersister to use to reassemble the PersistentBag. - The disassembled PersistentBag. - The owner object. - - - - Gets a indicating if this PersistentBag needs to be recreated - in the database. - - - - if this is a one-to-many Bag, if this is not - a one-to-many Bag. Since a Bag is an unordered, unindexed collection - that permits duplicates it is not possible to determine what has changed in a - many-to-many so it is just recreated. - - - - - Implements "bag" semantics more efficiently than by adding - a synthetic identifier column to the table. - - - - The identifier is unique for all rows in the table, allowing very efficient - updates and deletes. The value of the identifier is never exposed to the - application. - - - Identifier bags may not be used for a many-to-one association. Furthermore, - there is no reason to use inverse="true". - - - - - - Implements "bag" semantics more efficiently than a regular - by adding a synthetic identifier column to the table. - - - - The identifier is unique for all rows in the table, allowing very efficient - updates and deletes. The value of the identifier is never exposed to the - application. - - - PersistentIdentifierBags may not be used for a many-to-one association. - Furthermore, there is no reason to use inverse="true". - - - - - - Initializes this Bag from the cached values. - - The CollectionPersister to use to reassemble the PersistentIdentifierBag. - The disassembled PersistentIdentifierBag. - The owner object. - - - - A persistent wrapper for an - - The type of the element the list should hold. - The underlying collection used is a - - - - A persistent wrapper for an - - - The underlying collection used in an . - - - - - Initializes an instance of the - in the . - - The the list is in. - - - - Initializes an instance of the - that wraps an existing in the . - - The the list is in. - The to wrap. - - - - Initializes this PersistentList from the cached values. - - The CollectionPersister to use to reassemble the PersistentList. - The disassembled PersistentList. - The owner object. - - - - A persistent wrapper for a . Underlying - collection is a - - The type of the keys in the IDictionary. - The type of the elements in the IDictionary. - - - - A persistent wrapper for a . Underlying collection - is a . - - - - - Construct an uninitialized PersistentMap. - - The ISession the PersistentMap should be a part of. - - - - Construct an initialized PersistentMap based off the values from the existing IDictionary. - - The ISession the PersistentMap should be a part of. - The IDictionary that contains the initial values. - - - - Initializes this PersistentMap from the cached values. - - The CollectionPersister to use to reassemble the PersistentMap. - The disassembled PersistentMap. - The owner object. - - - - .NET has no design equivalent for Java's Set so we are going to use the - Iesi.Collections library. This class is internal to NHibernate and shouldn't - be used by user code. - - - The code for the Iesi.Collections library was taken from the article - Add Support for "Set" Collections - to .NET that was written by JasonSmith. - - - - - .NET has no design equivalent for Java's Set so we are going to use the - Iesi.Collections library. This class is internal to NHibernate and shouldn't - be used by user code. - - - The code for the Iesi.Collections library was taken from the article - Add Support for "Set" Collections - to .NET that was written by JasonSmith. - - - - - The that NHibernate is wrapping. - - - - - A temporary list that holds the objects while the PersistentSet is being - populated from the database. - - - This is necessary to ensure that the object being added to the PersistentSet doesn't - have its' GetHashCode() and Equals() methods called during the load - process. - - - - - Constructor matching super. - Instantiates a lazy set (the underlying set is un-initialized). - - The session to which this set will belong. - - - - Instantiates a non-lazy set (the underlying set is constructed - from the incoming set reference). - - The session to which this set will belong. - The underlying set data. - - - - Initializes this PersistentSet from the cached values. - - The CollectionPersister to use to reassemble the PersistentSet. - The disassembled PersistentSet. - The owner object. - - - - Set up the temporary List that will be used in the EndRead() - to fully create the set. - - - - - Takes the contents stored in the temporary list created during BeginRead() - that was populated during ReadFrom() and write it to the underlying - PersistentSet. - - - - - A persistent wrapper for an array. lazy initialization is NOT supported - - Use of Hibernate arrays is not really recommended. - - - - A temporary list that holds the objects while the PersistentArrayHolder is being - populated from the database. - - - - - Returns the user-visible portion of the NHibernate PersistentArrayHolder. - - - The array that contains the data, not the NHibernate wrapper. - - - - - Before is called the PersistentArrayHolder needs to setup - a temporary list to hold the objects. - - - - - Takes the contents stored in the temporary list created during - that was populated during and write it to the underlying - array. - - - - - Initializes this array holder from the cached values. - - The CollectionPersister to use to reassemble the Array. - The disassembled Array. - The owner object. - - - - Gets or sets the array. - - The array. - - - - The base class for the ConnectionProvider. - - - - - A strategy for obtaining ADO.NET . - - - The IConnectionProvider interface is not intended to be exposed to the application. - Instead it is used internally by NHibernate to obtain . - Implementors should provide a public default constructor. - - - - - Initialize the connection provider from the given properties. - - The connection provider settings - - - - Dispose of a used - - The to clean up. - - - - Get an open . - - An open . - - - - Gets the this ConnectionProvider should use to - communicate with the .NET Data Provider - - - The to communicate with the .NET Data Provider. - - - - - Closes the . - - The to clean up. - - - - Configures the ConnectionProvider with the Driver and the ConnectionString. - - An that contains the settings for this ConnectionProvider. - - Thrown when a could not be found - in the settings parameter or the Driver Class could not be loaded. - - - - - Get the .NET 2.0 named connection string - - - Thrown when a was found - in the settings parameter but could not be found in the app.config - - - - - Configures the driver for the ConnectionProvider. - - An that contains the settings for the Driver. - - Thrown when the could not be - found in the settings parameter or there is a problem with creating - the . - - - - - Get an open . - - An open . - - - - A flag to indicate if Disose() has been called. - - - - - Finalizer that ensures the object is correctly disposed of. - - - - - Takes care of freeing the managed and unmanaged resources that - this class is responsible for. - - - - - Takes care of freeing the managed and unmanaged resources that - this class is responsible for. - - Indicates if this ConnectionProvider is being Disposed of or Finalized. - -

- If this ConnectionProvider is being Finalized (isDisposing==false) then make - sure not to call any methods that could potentially bring this - ConnectionProvider back to life. -

-

- If any subclasses manage resources that also need to be disposed of this method - should be overridden, but don't forget to call it in the override. -

-
-
- - - Gets the for the - to connect to the database. - - - The for the - to connect to the database. - - - - - Gets the that can create the object. - - - The that can create the . - - - - - Instanciates a connection provider given configuration properties. - - - - - A ConnectionProvider that uses an IDriver to create connections. - - - - - Closes and Disposes of the . - - The to clean up. - - - - Gets a new open through - the . - - - An Open . - - - If there is any problem creating or opening the . - - - - - An implementation of the IConnectionProvider that simply throws an exception when - a connection is requested. - - - This implementation indicates that the user is expected to supply an ADO.NET connection - - - - - Throws an if this method is called - because the user is responsible for closing s. - - The to clean up. - - Thrown when this method is called. User is responsible for closing - s. - - - - - Throws an if this method is called - because the user is responsible for creating s. - - - No value is returned because an is thrown. - - - Thrown when this method is called. User is responsible for creating - s. - - - - - Configures the ConnectionProvider with only the Driver class. - - - - All other settings of the Connection are the responsibility of the User since they configured - NHibernate to use a Connection supplied by the User. - - - - - Provides a current session - for each . - Not recommended for .NET 2.0 web applications. - - - - - Extends the contract defined by - by providing methods to bind and unbind sessions to the current context. - - - The notion of a contextual session is managed by some external entity - (generally some form of interceptor like the HttpModule). - This external manager is responsible for scoping these contextual sessions - appropriately binding/unbinding them here for exposure to the application - through calls. - - - - - Defines the contract for implementations which know how to - scope the notion of a current session. - - - - Implementations should adhere to the following: - - contain a constructor accepting a single argument of type - - should be thread safe - should be fully serializable - - - - Implementors should be aware that they are also fully responsible for - cleanup of any generated current-sessions. - - - Note that there will be exactly one instance of the configured - ICurrentSessionContext implementation per . - - - It is recommended to inherit from the class - whenever possible as it simplifies the implementation and provides - single entry point with session binding support. - - - - - - Retrieve the current session according to the scoping defined - by this implementation. - - The current session. - Typically indicates an issue - locating or creating the current session. - - - - Retrieve the current session according to the scoping defined - by this implementation. - - The current session. - Indicates an issue - locating the current session. - - - - Binds the specified session to the current context. - - - - - Returns whether there is a session bound to the current context. - - - - - Unbinds and returns the current session. - - - - Gets or sets the currently bound session. - - - - Get the dicitonary mapping session factory to its current session. - - - - - Set the map mapping session factory to its current session. - - - - - Gets or sets the currently bound session. - - - - - The key is the session factory and the value is the bound session. - - - - - The key is the session factory and the value is the bound session. - - - - - Provides a current session - for each . - Works only with Web Applications. - - - - - A impl which scopes the notion of current - session by the current thread of execution. Threads do not give us a - nice hook to perform any type of cleanup making - it questionable for this impl to actually generate Session instances. In - the interest of usability, it was decided to have this default impl - actually generate a session upon first request and then clean it up - after the associated with that session - is committed/rolled-back. In order for ensuring that happens, the sessions - generated here are unusable until after {@link Session#beginTransaction()} - has been called. If Close() is called on a session managed by - this class, it will be automatically unbound. -

- Additionally, the static and methods are - provided to allow application code to explicitly control opening and - closing of these sessions. This, with some from of interception, - is the preferred approach. It also allows easy framework integration - and one possible approach for implementing long-sessions. -

-

-
- - - Unassociate a previously bound session from the current thread of execution. - - - - - - - Provides a current session - for each thread using the []. - To avoid if there are two session factories in the same thread. - - - - Gets or sets the currently bound session. - - - - Provides a current session - for each . Works only with web applications. - - - - - Base class for implementations. - - - - - An object-oriented representation of a query criterion that may be used as a constraint - in a query. - - - Built-in criterion types are provided by the Expression factory class. - This interface might be implemented by application classes but, more commonly, application - criterion types would extend AbstractCriterion. - - - - - Render a SqlString fragment for the expression. - - A SqlString that contains a valid Sql fragment. - - - - Return typed values for all parameters in the rendered SQL fragment - - An array of TypedValues for the Expression. - - - - Return all projections used in this criterion - - An array of IProjection used by the Expression. - - - - Gets a string representation of the . - - - A String that shows the contents of the . - - - This is not a well formed Sql fragment. It is useful for logging what the - looks like. - - - - - Render a SqlString for the expression. - - A SqlString that contains a valid Sql fragment. - - - - Return typed values for all parameters in the rendered SQL fragment - - An array of TypedValues for the Expression. - - - - Return all projections used in this criterion - - An array of IProjection used by the Expression. - - - - See here for details: - http://steve.emxsoftware.com/NET/Overloading+the++and++operators - - - - - See here for details: - http://steve.emxsoftware.com/NET/Overloading+the++and++operators - - - - - See here for details: - http://steve.emxsoftware.com/NET/Overloading+the++and++operators - - - - - See here for details: - http://steve.emxsoftware.com/NET/Overloading+the++and++operators - - - - - An Aggregation - - - - - A single-column projection that may be aliased - - - - - Render the SQL Fragment. - - The criteria. - The position. - The criteria query. - The enabled filters. - - - - - Render the SQL Fragment to be used in the Group By Clause. - - The criteria. - The criteria query. - The enabled filters. - - - - - Return types for a particular user-visible alias - - - - - - - - - - - - - - - - - Get the SQL select clause column aliases for a particular user-visible alias - - - - - - - Get the SQL select clause column aliases for a particular user-visible alias - - - - - - - - Gets the typed values for parameters in this projection - - The criteria. - The criteria query. - - - - - Get the user-visible aliases for this projection (ie. the ones that will be passed to the ResultTransformer) - - - - - Does this projection specify grouping attributes? - - - - - Does this projection specify aggregate attributes? - - - - - Gets the typed values for parameters in this projection - - The criteria. - The criteria query. - - - - - Gets the typed values for parameters in this projection - - The criteria. - The criteria query. - - - - - An that combines two s - with an and between them. - - - - - An that combines two s - with a operator (either "and" or "or") between them. - - - - - Initialize a new instance of the class that - combines two other s. - - The to use in the Left Hand Side. - The to use in the Right Hand Side. - - - - Combines the for the Left Hand Side and the - Right Hand Side of the Expression into one array. - - An array of s. - - - - Converts the LogicalExpression to a . - - A well formed SqlString for the Where clause. - The SqlString will be enclosed by ( and ). - - - - Gets a string representation of the LogicalExpression. - - - The String contains the LeftHandSide.ToString() and the RightHandSide.ToString() - joined by the Op. - - - This is not a well formed Sql fragment. It is useful for logging what Expressions - are being combined. - - - - - Gets the that will be on the Left Hand Side of the Op. - - - - - Gets the that will be on the Right Hand Side of the Op. - - - - - Get the Sql operator to put between the two s. - - - - - Initializes a new instance of the class - that combines two . - - The to use as the left hand side. - The to use as the right hand side. - - - - Get the Sql operator to put between the two s. - - The string "and" - - - - An that represents a "between" constraint. - - - - - Initializes a new instance of the class. - - The _projection. - The _lo. - The _hi. - - - - Initialize a new instance of the class for - the named Property. - - The name of the Property of the Class. - The low value for the BetweenExpression. - The high value for the BetweenExpression. - - - - - - - Casting a value from one type to another, at the database - level - - - - - An that Junctions together multiple - s with an and - - - - - A sequence of logical s combined by some associative - logical operator. - - - - - Adds an to the list of s - to junction together. - - The to add. - - This instance. - - - - - Get the Sql operator to put between multiple s. - - - - - The corresponding to an instance with no added - subcriteria. - - - - - Get the Sql operator to put between multiple s. - - The string " and " - - - - This is useful if we want to send a value to the database - - - - - A Count - - - - The alias that refers to the "root" entity of the criteria query. - - - Each row of results is a from alias to entity instance - - - Each row of results is an instance of the root entity - - - Each row of results is a distinct instance of the root entity - - - This result transformer is selected implicitly by calling - - - Specifies joining to an entity based on an inner join. - - - Specifies joining to an entity based on a full join. - - - Specifies joining to an entity based on a left outer join. - - - - Some applications need to create criteria queries in "detached - mode", where the Hibernate session is not available. This class - may be instantiated anywhere, and then a ICriteria - may be obtained by passing a session to - GetExecutableCriteria(). All methods have the - same semantics and behavior as the corresponding methods of the - ICriteria interface. - - - - - Get an executable instance of Criteria, - to actually run the query. - - - - Get an executable instance of Criteria, - to actually run the query. - - - - Gets the root entity type if available, throws otherwise - - - This is an NHibernate specific method, used by several dependent - frameworks for advance integration with NHibernate. - - - - - Clear all orders from criteria. - - - - - An that Junctions together multiple - s with an or - - - - - Get the Sql operator to put between multiple s. - - The string " or " - - - - Gets the typed values for parameters in this projection - - The criteria. - The criteria query. - - - - - An that represents an "equal" constraint - between two properties. - - - - - Superclass for an that represents a - constraint between two properties (with SQL binary operators). - - - - - Initializes a new instance of the class. - - The projection. - Name of the RHS property. - - - - Initializes a new instance of the class. - - The LHS projection. - The RHS projection. - - - - Initializes a new instance of the class. - - Name of the LHS property. - Name of the RHS property. - - - - Initializes a new instance of the class. - - Name of the LHS property. - The RHS projection. - - - - - - - Get the Sql operator to use for the property expression. - - - - - Initializes a new instance of the class. - - Name of the LHS property. - The RHS projection. - - - - Initializes a new instance of the class. - - The LHS projection. - The RHS projection. - - - - Initializes a new instance of the class. - - The projection. - Name of the RHS property. - - - - Initializes a new instance of the class - that compares two mapped properties using an "equal" constraint. - - The name of the Property to use as the left hand side. - The name of the Property to use as the right hand side. - - - - Get the Sql operator to use for the . - - The string " = " - - - - Support for Query By Example. - - - - List results = session.CreateCriteria(typeof(Parent)) - .Add( Example.Create(parent).IgnoreCase() ) - .CreateCriteria("child") - .Add( Example.Create( parent.Child ) ) - .List(); - - - - "Examples" may be mixed and matched with "Expressions" in the same - - - - - Set escape character for "like" clause - - - - Set the for this . - - The to determine which properties to include. - This instance. - - This should be used when a custom has - been implemented. Otherwise use the methods - or to set the - to the s built into NHibernate. - - - - - Set the for this - to exclude zero-valued properties. - - - - - Set the for this - to exclude no properties. - - - - - Use the "like" operator for all string-valued properties with - the specified . - - - The to convert the string to the pattern - for the like comparison. - - - - - Use the "like" operator for all string-valued properties. - - - The default is MatchMode.Exact. - - - - - Exclude a particular named property - - The name of the property to exclude. - - - - Create a new instance, which includes all non-null properties - by default - - - A new instance of . - - - - Initialize a new instance of the class for a particular - entity. - - The that the Example is being built from. - The the Example should use. - - - - Determines if the property should be included in the Query. - - The value of the property. - The name of the property. - The of the property. - - if the Property should be included, if - the Property should not be a part of the Query. - - - - - Adds a based on the value - and type parameters to the in the - list parameter. - - The value of the Property. - The of the Property. - The to add the to. - - This method will add objects to the list parameter. - - - - - A strategy for choosing property values for inclusion in the query criteria - - - - - Determine if the Property should be included. - - The value of the property that is being checked for inclusion. - The name of the property that is being checked for inclusion. - The of the property. - - if the Property should be included in the Query, - otherwise. - - - - - Implementation of that includes all - properties regardless of value. - - - - - Implementation of that includes the - properties that are not and do not have an - returned by propertyValue.ToString(). - - - This selector is not present in H2.1. It may be useful if nullable types - are used for some properties. - - - - - This class is semi-deprecated. Use . - - - - - - The namespace may be used by applications as a framework for building - new kinds of . - However, it is intended that most applications will - simply use the built-in criterion types via the static factory methods of this class. - - - - - - - Apply an "equal" constraint to the identifier property - - - ICriterion - - - - Apply an "equal" constraint from the projection to the identifier property - - The projection. - ICriterion - - - - Apply an "equal" constraint to the named property - - The name of the Property in the class. - The value for the Property. - - - - Apply an "equal" constraint to the projection - - The projection. - The value for the Property. - - - - Apply a "like" constraint to the named property - - The name of the Property in the class. - The value for the Property. - A . - - - - Apply a "like" constraint to the project - - The projection. - The value for the Property. - A . - - - - Apply a "like" constraint to the project - - The projection. - The value for the Property. - The match mode. - A . - - - - A case-insensitive "like", similar to Postgres "ilike" operator - - The name of the Property in the class. - The value for the Property. - An . - - - - A case-insensitive "like", similar to Postgres "ilike" operator - - The projection. - The value for the Property. - - An . - - - - - Apply a "greater than" constraint to the named property - - The name of the Property in the class. - The value for the Property. - - - - Apply a "greater than" constraint to the projection - - The projection. - The value for the Property. - - - - Apply a "less than" constraint to the named property - - The name of the Property in the class. - The value for the Property. - - - - Apply a "less than" constraint to the projection - - The projection. - The value for the Property. - - - - Apply a "less than or equal" constraint to the named property - - The name of the Property in the class. - The value for the Property. - - - - Apply a "less than or equal" constraint to the projection - - The projection. - The value for the Property. - - - - Apply a "greater than or equal" constraint to the named property - - The name of the Property in the class. - The value for the Property. - - - - Apply a "greater than or equal" constraint to the projection - - The projection. - The value for the Property. - - - - Apply a "between" constraint to the named property - - The name of the Property in the class. - The low value for the Property. - The high value for the Property. - A . - - - - Apply a "between" constraint to the projection - - The projection. - The low value for the Property. - The high value for the Property. - A . - - - - Apply an "in" constraint to the named property - - The name of the Property in the class. - An array of values. - An . - - - - Apply an "in" constraint to the projection - - The projection. - An array of values. - An . - - - - Apply an "in" constraint to the projection - - The projection. - An ICollection of values. - An . - - - - Apply an "in" constraint to the named property - - The name of the Property in the class. - An ICollection of values. - An . - - - - Apply an "in" constraint to the named property. This is the generic equivalent - of , renamed to avoid ambiguity. - - The name of the Property in the class. - An - of values. - An . - - - - Apply an "in" constraint to the projection. This is the generic equivalent - of , renamed to avoid ambiguity. - - - The projection. - An - of values. - An . - - - - Apply an "is null" constraint to the named property - - The name of the Property in the class. - A . - - - - Apply an "is null" constraint to the projection - - The projection. - A . - - - - Apply an "equal" constraint to two properties - - The lhs Property Name - The rhs Property Name - A . - - - - Apply an "equal" constraint to projection and property - - The projection. - The rhs Property Name - A . - - - - Apply an "equal" constraint to lshProjection and rshProjection - - The LHS projection. - The RSH projection. - A . - - - - Apply an "equal" constraint to the property and rshProjection - - Name of the property. - The RSH projection. - A . - - - - Apply an "not equal" constraint to two properties - - The lhs Property Name - The rhs Property Name - A . - - - - Apply an "not equal" constraint to projection and property - - The projection. - The rhs Property Name - A . - - - - Apply an "not equal" constraint to the projections - - The LHS projection. - The RHS projection. - A . - - - - Apply an "not equal" constraint to the projections - - Name of the property. - The RHS projection. - A . - - - - Apply a "greater than" constraint to two properties - - The lhs Property Name - The rhs Property Name - A . - - - - Apply a "greater than" constraint to two properties - - The projection. - The rhs Property Name - A . - - - - Apply a "greater than" constraint to two properties - - Name of the property. - The projection. - A . - - - - Apply a "greater than" constraint to two properties - - The LHS projection. - The RHS projection. - A . - - - - Apply a "greater than or equal" constraint to two properties - - The lhs Property Name - The rhs Property Name - A . - - - - Apply a "greater than or equal" constraint to two properties - - The LHS projection. - The RHS projection. - A . - - - - Apply a "greater than or equal" constraint to two properties - - The projection. - The rhs Property Name - A . - - - - Apply a "greater than or equal" constraint to two properties - - The lhs Property Name - The projection. - A . - - - - Apply a "less than" constraint to two properties - - The lhs Property Name - The rhs Property Name - A . - - - - Apply a "less than" constraint to two properties - - The projection. - The rhs Property Name - A . - - - - Apply a "less than" constraint to two properties - - The lhs Property Name - The projection. - A . - - - - Apply a "less than" constraint to two properties - - The LHS projection. - The RHS projection. - A . - - - - Apply a "less than or equal" constraint to two properties - - The lhs Property Name - The rhs Property Name - A . - - - - Apply a "less than or equal" constraint to two properties - - The projection. - The rhs Property Name - A . - - - - Apply a "less than or equal" constraint to two properties - - The lhs Property Name - The projection. - A . - - - - Apply a "less than or equal" constraint to two properties - - The LHS projection. - The RHS projection. - A . - - - - Apply an "is not null" constraint to the named property - - The name of the Property in the class. - A . - - - - Apply an "is not null" constraint to the named property - - The projection. - A . - - - - Apply an "is not empty" constraint to the named property - - The name of the Property in the class. - A . - - - - Apply an "is not empty" constraint to the named property - - The name of the Property in the class. - A . - - - - Return the conjunction of two expressions - - The Expression to use as the Left Hand Side. - The Expression to use as the Right Hand Side. - An . - - - - Return the disjuction of two expressions - - The Expression to use as the Left Hand Side. - The Expression to use as the Right Hand Side. - An . - - - - Return the negation of an expression - - The Expression to negate. - A . - - - - Group expressions together in a single conjunction (A and B and C...) - - - - - Group expressions together in a single disjunction (A or B or C...) - - - - - Apply an "equals" constraint to each property in the key set of a IDictionary - - a dictionary from property names to values - - - - - Apply a constraint expressed in SQL, with the given SQL parameters - - - - - - - - - Apply a constraint expressed in SQL, with the given SQL parameter - - - - - - - - - Apply a constraint expressed in SQL, with the given SQL parameter - - - - - Apply a constraint expressed in SQL - - - - - - - Apply a constraint expressed in SQL - - - - - - - An that represents an "greater than or equal" constraint - between two properties. - - - - - Initializes a new instance of the class. - - Name of the LHS property. - The RHS projection. - - - - Initializes a new instance of the class. - - The LHS projection. - The RHS projection. - - - - Initializes a new instance of the class. - - The projection. - Name of the RHS property. - - - - Initializes a new instance of the class - that compares two mapped properties using an "greater than or equal" constraint. - - The name of the Property to use as the left hand side. - The name of the Property to use as the right hand side. - - - - Get the Sql operator to use for the . - - The string " < " - - - - Gets the typed values for parameters in this projection - - The criteria. - The criteria query. - - - - - An that represents an "greater than" constraint - between two properties. - - - - - Initializes a new instance of the class. - - Name of the LHS property. - The RHS projection. - - - - Initializes a new instance of the class. - - The LHS projection. - The RHS projection. - - - - Initializes a new instance of the class. - - The projection. - Name of the RHS property. - - - - Initializes a new instance of the class - that compares two mapped properties using an "greater than" constraint. - - The name of the Property to use as the left hand side. - The name of the Property to use as the right hand side. - - - - Get the Sql operator to use for the . - - The string " < " - - - - An instance of is passed to criterion, - order and projection instances when actually compiling and - executing the query. This interface is not used by application - code. - - - - Get the names of the columns mapped by a property path, ignoring projection aliases - - - Get the type of a property path, ignoring projection aliases - - - Get the names of the columns mapped by a property path - - - Get the type of a property path - - - Get the a typed value for the given property value. - - - Get the entity name of an entity - - - - Get the entity name of an entity, taking into account - the qualifier of the property path - - - - Get the root table alias of an entity - - - - Get the root table alias of an entity, taking into account - the qualifier of the property path - - - - Get the property name, given a possibly qualified property name - - - Get the identifier column names of this entity - - - Get the identifier type of this entity - - - - When adding values to the query string it is imperative that they are reported via this function back to the query builder. - Do not report the same item multiple times as it will be assumed to be a separate parameter. - - - - - An identifier constraint - - - - - An that constrains the property - to a specified list of values. - - - InExpression - should only be used with a Single Value column - no multicolumn properties... - - - - - Initializes a new instance of the class. - - The projection. - The _values. - - - - - - - - - - - - - - An that represents an "like" constraint - that is not case sensitive. - - - - - Initializes a new instance of the class. - - The projection. - The value. - The match mode. - - - - Initializes a new instance of the class. - - The projection. - The value. - - - - Initialize a new instance of the - class for a named Property and its value. - - The name of the Property in the class. - The value for the Property. - - - - - - - An that represents empty association constraint. - - - - - An that represents non-empty association constraint. - - - - - An that represents an "less than or equal" constraint - between two properties. - - - - - Initializes a new instance of the class. - - Name of the LHS property. - The RHS projection. - - - - Initializes a new instance of the class. - - The LHS projection. - The RHS projection. - - - - Initializes a new instance of the class. - - The projection. - Name of the RHS property. - - - - Initializes a new instance of the class - that compares two mapped properties using an "less than or equal" constraint. - - The name of the Property to use as the left hand side. - The name of the Property to use as the right hand side. - - - - Get the Sql operator to use for the . - - The string " <= " - - - - An that represents an "like" constraint. - - - The case sensitivity depends on the database settings for string - comparisons. Use if the - string comparison should not be case sensitive. - - - - - An that represents an "less than" constraint - between two properties. - - - - - Initializes a new instance of the class. - - Name of the LHS property. - The RHS projection. - - - - Initializes a new instance of the class. - - The LHS projection. - The RHS projection. - - - - Initializes a new instance of the class. - - The projection. - Name of the RHS property. - - - - Initializes a new instance of the class - that compares two mapped properties using an "less than" constraint. - - The name of the Property to use as the left hand side. - The name of the Property to use as the right hand side. - - - - Get the Sql operator to use for the . - - The string " < " - - - - Represents an strategy for matching strings using "like". - - - - - Initialize a new instance of the class. - - The code that identifies the match mode. - The friendly name of the match mode. - - The parameter intCode is used as the key of - to store instances and to ensure only instance of a particular - is created. - - - - - The string representation of the . - - The friendly name used to describe the . - - - - Convert the pattern, by appending/prepending "%" - - The string to convert to the appropriate match pattern. - - A that contains a "%" in the appropriate place - for the Match Strategy. - - - - - Match the entire string to the pattern - - - - - Match the start of the string to the pattern - - - - - Match the end of the string to the pattern - - - - - Match the pattern anywhere in the string - - - - - The that matches the entire string to the pattern. - - - - - Initialize a new instance of the class. - - - - - Converts the string to the Exact MatchMode. - - The string to convert to the appropriate match pattern. - The pattern exactly the same as it was passed in. - - - - The that matches the start of the string to the pattern. - - - - - Initialize a new instance of the class. - - - - - Converts the string to the Start MatchMode. - - The string to convert to the appropriate match pattern. - The pattern with a "%" appended at the end. - - - - The that matches the end of the string to the pattern. - - - - - Initialize a new instance of the class. - - - - - Converts the string to the End MatchMode. - - The string to convert to the appropriate match pattern. - The pattern with a "%" appended at the beginning. - - - - The that exactly matches the string - by appending "%" to the beginning and end. - - - - - Initialize a new instance of the class. - - - - - Converts the string to the Exact MatchMode. - - The string to convert to the appropriate match pattern. - The pattern with a "%" appended at the beginning and the end. - - - - An that negates another . - - - - - Initialize a new instance of the class for an - - - The to negate. - - - - An that represents "not null" constraint. - - - - - Initializes a new instance of the class. - - The projection. - - - - Initialize a new instance of the class for a named - Property that should not be null. - - The name of the Property in the class. - - - - An that represents "null" constraint. - - - - - Initializes a new instance of the class. - - The projection. - - - - Initialize a new instance of the class for a named - Property that should be null. - - The name of the Property in the class. - - - - - - - Represents an order imposed upon a - result set. - - - - - Constructor for Order. - - - - - - - Constructor for Order. - - - - - - - Render the SQL fragment - - - - - Ascending order - - - - - - - Ascending order - - - - - - - Descending order - - - - - - - Descending order - - - - - - - An that combines two s with an - "or" between them. - - - - - Initialize a new instance of the class for - two s. - - The to use as the left hand side. - The to use as the right hand side. - - - - Get the Sql operator to put between the two s. - - Returns "or" - - - - Gets the typed values for parameters in this projection - - The criteria. - The criteria query. - - - - - The criterion package may be used by applications as a framework for building - new kinds of Projection. However, it is intended that most applications will - simply use the built-in projection types via the static factory methods of this class.
-
- The factory methods that take an alias allow the projected value to be referred to by - criterion and order instances. -
-
- - - Create a distinct projection from a projection - - - - - - - Create a new projection list - - - - - - The query row count, ie. count(*) - - The RowCount projection mapped to an . - - - - The query row count, ie. count(*) - - The RowCount projection mapped to an . - - - - A property value count - - - - - - - A property value count - - - - - - - A distinct property value count - - - - - - - A property maximum value - - - - - - - A projection maximum value - - - - - - - A property minimum value - - - - - - - A projection minimum value - - - - - - - A property average value - - - - - - - A property average value - - - - - - - A property value sum - - - - - - - A property value sum - - - - - - - A SQL projection, a typed select clause fragment - - - - - - - - - A grouping SQL projection, specifying both select clause and group by clause fragments - - - - - - - - - - A grouping property value - - - - - - - A grouping projection value - - - - - - - A projected property value - - - - - - - A projected identifier value - - - - - - Assign an alias to a projection, by wrapping it - - - - - - - - Casts the projection result to the specified type. - - The type. - The projection. - - - - - Return a constant value - - The obj. - - - - - Return a constant value - - The obj. - - - - - - Calls the named - - Name of the function. - The type. - The projections. - - - - - Calls the specified - - the function. - The type. - The projections. - - - - - Conditionally return the true or false part, dependention on the criterion - - The criterion. - The when true. - The when false. - - - - - A factory for property-specific AbstractCriterion and projection instances - - - - - A property value, or grouped property value - - - - - Get a component attribute of this property - - - - - A comparison between a property value in the outer query and the - result of a subquery - - - - - A comparison between a property value in the outer query and the - result of a subquery - - - - - The base class for an that compares a single Property - to a value. - - - - - Initialize a new instance of the class for a named - Property and its value. - - The name of the Property in the class. - The value for the Property. - The SQL operation. - - - - Converts the SimpleExpression to a . - - A SqlString that contains a valid Sql fragment. - - - - - - - Gets the named Property for the Expression. - - A string that is the name of the Property. - - - - Gets the Value for the Expression. - - An object that is the value for the Expression. - - - - Get the Sql operator to use for the specific - subclass of . - - - - - A comparison between a constant value and the the result of a subquery - - - - - An that creates a SQLExpression. - The string {alias} will be replaced by the alias of the root entity. - - - This allows for database specific Expressions at the cost of needing to - write a correct . - - - - - - - - A SQL fragment. The string {alias} will be replaced by the alias of the root entity. - - - - - Gets the typed values for parameters in this projection - - The criteria. - The criteria query. - - - - - Factory class for AbstractCriterion instances that represent - involving subqueries. - Expression - Projection - AbstractCriterion - - - - - A property value, or grouped property value - - - - - Used to show a better debug display for dictionaries - - - - - - - - ::= - EXTRACT FROM - - ::= - | - - - - Represents HQL functions that can have different representations in different SQL dialects. - E.g. in HQL we can define function concat(?1, ?2) to concatenate two strings - p1 and p2. Target SQL function will be dialect-specific, e.g. (?1 || ?2) for - Oracle, concat(?1, ?2) for MySql, (?1 + ?2) for MS SQL. - Each dialect will define a template as a string (exactly like above) marking function - parameters with '?' followed by parameter's index (first index is 1). - - - - - Provides support routines for the HQL functions as used - in the various SQL Dialects - - Provides an interface for supporting various HQL functions that are - translated to SQL. The Dialect and its sub-classes use this interface to - provide details required for processing of the function. - - - - - The function return type - - The type of the first argument - - - - - - Render the function call as SQL. - - List of arguments - - SQL fragment for the fuction. - - - - Does this function have any arguments? - - - - - If there are no arguments, are parens required? - - - - - Applies the template to passed in arguments. - - args function arguments - generated SQL function call - - - - - ANSI-SQL substring - Documented in: - ANSI X3.135-1992 - American National Standard for Information Systems - Database Language - SQL - - - Syntax: - ::= - SUBSTRING FROM < start position> - [ FOR ] - ]]> - - - - - A SQLFunction implementation that emulates the ANSI SQL trim function - on dialects which do not support the full definition. However, this function - definition does assume the availability of ltrim, rtrim, and replace functions - which it uses in various combinations to emulate the desired ANSI trim() - functionality. - - - - - - - - - - - according to both the ANSI-SQL and EJB3 specs, trim can either take - exactly one parameter or a variable number of parameters between 1 and 4. - from the SQL spec: - ::= - TRIM - - ::= - [ [ ] [ ] FROM ] - - ::= - LEADING - | TRAILING - | BOTH - ]]> - If only trim specification is omitted, BOTH is assumed; - if trim character is omitted, space is assumed - - - - - ANSI-SQL style cast(foo as type) where the type is a NHibernate type - - - - - Delegate the values to a real type - - - The real return type of Cast is know only after the Cast is parsed. - This class was created in NH to remove the responsibility of the parser about know the - real return type. - - - - - Defines a mapping from a .NET to a SQL datatype. - This interface is intended to be implemented by applications that need custom types. - - Implementors should usually be immutable and MUST definately be threadsafe. - - - - Return a cacheable "disassembled" representation of the object. - the value to cache - the session - optional parent entity object (needed for collections) - the disassembled, deep cloned state - - - Reconstruct the object from its cached "disassembled" state. - the disassembled state from the cache - the session - the parent entity object - the the object - - - - Called before assembling a query result set from the query cache, to allow batch fetching - of entities missing from the second-level cache. - - - - - When implemented by a class, returns the SqlTypes for the columns mapped by this IType. - The that uses this IType.An array of s. - - - - When implemented by a class, returns how many columns are used to persist this type. - The that uses this IType.The number of columns this IType spans.MappingException - - - - When implemented by a class, should the parent be considered dirty, - given both the old and current field or element value? - The old valueThe current valueThe true if the field is dirty - - - - When implemented by a class, gets an instance of the object mapped by - this IType from the . - The that contains the values - The names of the columns in the that contain the - value to populate the IType with. - The object mapped by this IType. - Implementors should handle possibility of null values. - - - - - When implemented by a class, gets an instance of the object - mapped by this IType from the . - The that contains the valuesThe name of the column in the that contains the - value to populate the IType with.The object mapped by this IType. - Implementations should handle possibility of null values. - This method might be called if the IType is known to be a single-column type. - - - - - When implemented by a class, puts the value/values from the mapped - class into the . - The to put the values into.The object that contains the values.The index of the to start writing the values to.Indicates which columns are to be set. - Implementors should handle possibility of null values. - A multi-column type should be written to parameters starting from . - - - - - When implemented by a class, puts the value/values from the mapped - class into the . - - The to put the values into. - The object that contains the values. - The index of the to start writing the values to. - - Implementors should handle possibility of null values. - A multi-column type should be written to parameters starting from . - - - - - When implemented by a class, a representation of the value to be - embedded in an XML element - The object that contains the values.An Xml formatted string. - - - - When implemented by a class, returns a deep copy of the persistent - state, stopping at entities and at collections. - A Collection element or Entity fieldThe entityMode.The session factory.A deep copy of the object. - - - - When implemented by a class, retrieves an instance of the mapped class, - or the identifier of an entity or collection from a . - The that contains the values. - The names of the columns in the that contain the - value to populate the IType with. - the sessionThe parent EntityAn identifier or actual object mapped by this IType. - - This is useful for 2-phase property initialization - the second phase is a call to - ResolveIdentifier() - - - Most implementors of this method will just pass the call to NullSafeGet(). - - - - - - When implemented by a class, maps identifiers to Entities or Collections. - An identifier or value returned by Hydrate()The sessionThe parent EntityThe Entity or Collection referenced by this Identifier. - This is the second phase of 2-phase property initialization. - - - - - Given a hydrated, but unresolved value, return a value that may be used to - reconstruct property-ref associations. - - - - - - - - During merge, replace the existing (target) value in the entity we are merging to - with a new (original) value from the detached entity we are merging. For immutable - objects, or null values, it is safe to simply return the first parameter. For - mutable objects, it is safe to return a copy of the first parameter. For objects - with component values, it might make sense to recursively replace component values. - - the value from the detached entity being merged - the value in the managed entity - - - - - the value to be merged - - - - Compare two instances of the class mapped by this type for persistence - "equality" - equality of persistent state - taking a shortcut for - entity references. - - - - - boolean - - - - Compare two instances of the class mapped by this type for persistence - "equality" - equality of persistent state. - - - - - boolean - - - - Compare two instances of the class mapped by this type for persistence - "equality" - equality of persistent state. - - - - - - boolean - - - Get a hashcode, consistent with persistence "equality" - - - - - Get a hashcode, consistent with persistence "equality" - - - - - - compare two instances of the type - - - - - - Get the type of a semi-resolved value. - - - A representation of the value to be embedded in an XML element. - - - - - - Parse the XML representation of an instance. - - - an instance of the type - - - - Given an instance of the type, return an array of boolean, indicating - which mapped columns would be null. - - an instance of the type - - - - - When implemented by a class, gets the abbreviated name of the type. - The NHibernate type name. - - - - When implemented by a class, gets the returned - by the NullSafeGet() methods. - - The from the .NET framework. - - This is used to establish the class of an array of this Itype - - - - - When implemented by a class, gets the value indicating if the objects - of this IType are mutable. - true if the objects mapped by this IType are mutable. - With respect to the referencing object... - Entities and Collections are considered immutable because they manage their own internal state. - - - - - When implemented by a class, gets a value indicating if the implementor is castable to an an - true if this is an AssociationThis does not necessarily imply that the type actually represents an association. - - - - When implemented by a class, gets a value indicating if the implementor is a collection type - true if this is a . - - - - When implemented by a class, gets a value indicating if the implementor - is an . - true if this is an - If true, the implementation must be castable to . - A component type may own collections or associations and hence must provide certain extra functionality. - - - - - When implemented by a class, gets a value indicating if the implementor - extends - true if this is an - - - - - - - Emulation of locate() on Sybase - - - - - Initializes a new instance of the StandardSQLFunction class. - - SQL function name. - Whether the function accepts an asterisk (*) in place of arguments - - - - Initializes a new instance of the StandardSQLFunction class. - - SQL function name. - True if accept asterisk like argument - Return type for the fuction. - - - - Classic AVG sqlfunction that return types as it was done in Hibernate 3.1 - - - - - Classic COUNT sqlfunction that return types as it was done in Hibernate 3.1 - - - - - Classic SUM sqlfunction that return types as it was done in Hibernate 3.1 - - - - - Summary description for NoArgSQLFunction. - - - - - Emulation of coalesce() on Oracle, using multiple nvl() calls - - - - - Emulation of locate() on PostgreSQL - - - - - Provides a standard implementation that supports the majority of the HQL - functions that are translated to SQL. - - - The Dialect and its sub-classes use this class to provide details required - for processing of the associated function. - - - - - Provides a standard implementation that supports the majority of the HQL - functions that are translated to SQL. - - - The Dialect and its sub-classes use this class to provide details required - for processing of the associated function. - - - - - Initializes a new instance of the StandardSQLFunction class. - - SQL function name. - - - - Initializes a new instance of the StandardSQLFunction class. - - SQL function name. - Return type for the fuction. - - - - Initializes a new instance of the StandardSafeSQLFunction class. - - SQL function name. - Exact number of arguments expected. - - - - Initializes a new instance of the StandardSafeSQLFunction class. - - SQL function name. - Return type for the fuction. - Exact number of arguments expected. - - - - Support for slightly more general templating than StandardSQLFunction, - with an unlimited number of arguments. - - - - - A strategy abstraction for how locks are obtained in the underlying database. - - - All locking provided implemenations assume the underlying database supports - (and that the connection is in) at least read-committed transaction isolation. - The most glaring exclusion to this is HSQLDB which only offers support for - READ_UNCOMMITTED isolation. - - - - - - Acquire an appropriate type of lock on the underlying data that will - endure until the end of the current transaction. - - The id of the row to be locked - The current version (or null if not versioned) - The object logically being locked (currently not used) - The session from which the lock request originated - - - - A locking strategy where the locks are obtained through select statements. - - - - - For non-read locks, this is achieved through the Dialect's specific - SELECT ... FOR UPDATE syntax. - - - - - A locking strategy where the locks are obtained through update statements. - - This strategy is not valid for read style locks. - - - - Construct a locking strategy based on SQL UPDATE statements. - - The metadata for the entity to be locked. - Indictates the type of lock to be acquired. - - read-locks are not valid for this strategy. - - - - - Common implementation of schema reader. - - - This implementation of is based on the new of - .NET 2.0. - - - - - - This class is specific of NHibernate and supply DatabaseMetaData of Java. - In the .NET Framework, there is no direct equivalent. - - - Implementation is provide by a dialect. - - - - - Gets a description of the tables available for the catalog - - A catalog, retrieves those without a catalog - Schema pattern, retrieves those without the schema - A table name pattern - a list of table types to include - Each row - - - - Get the Table MetaData. - - The resultSet of . - Include FKs and indexes - - - - - Gets a description of the table columns available - - A catalog, retrieves those without a catalog - Schema pattern, retrieves those without the schema - A table name pattern - a columng name patterm - A description of the table columns available - - - - Get a description of the given table's indices and statistics. - - A catalog, retrieves those without a catalog - Schema pattern, retrieves those without the schema - A table name pattern - A description of the table's indices available - The result is relative to the schema collections "Indexes". - - - - Get a description of the given table's indices and statistics. - - A catalog, retrieves those without a catalog - Schema pattern, retrieves those without the schema - A table name pattern - The name of the index - A description of the table's indices available - The result is relative to the schema collections "IndexColumns". - - - - Gets a description of the foreign keys available - - A catalog, retrieves those without a catalog - Schema name, retrieves those without the schema - A table name - A description of the foreign keys available - - - - Get all reserved words - - A set of reserved words - - - - In the Java language, this field indicates that the database treats mixed-case, - quoted SQL identifiers as case-insensitive and stores them in mixed case. - - - - - In the Java language, this field indicates that the database treats mixed-case, - quoted SQL identifiers as case-insensitive and stores them in upper case. - - - - - In the Java language, this field indicates that the database treats mixed-case, - unquoted SQL identifiers as case-insensitive and stores them in upper case. - - - - - In the Java language, this field indicates that the database treats mixed-case, - quoted SQL identifiers as case-insensitive and stores them in lower case. - - - - - In the Java language, this field indicates that the database treats mixed-case, - unquoted SQL identifiers as case-insensitive and stores them in lower case, - - - - - The name of the column that represent the TABLE_NAME in the - returned by . - - - - - An SQL dialect for DB2 on iSeries OS/400. - - - The DB2400Dialect defaults the following configuration properties: - - - Property - Default Value - - - connection.driver_class - - - - - - - - An SQL dialect for DB2. - - - The DB2Dialect defaults the following configuration properties: - - - Property - Default Value - - - connection.driver_class - - - - - - - - Represents a dialect of SQL implemented by a particular RDBMS. Subclasses - implement NHibernate compatibility with different systems. - - - Subclasses should provide a public default constructor that Register() - a set of type mappings and default Hibernate properties. - - - - - - - - - - - Characters used for quoting sql identifiers - - - - - - - - - - - The base constructor for Dialect. - - - Every subclass should override this and call Register() with every except - , , , , - , . - - - The Default properties for this Dialect should also be set - such as whether or not to use outer-joins - and what the batch size should be. - - - - - Get an instance of the dialect specified by the current properties. - The specified Dialect - - - - Get de from a property bag (prop name ) - - The property bag. - An instance of . - When is null. - When the property bag don't contains de property . - - - - Get the name of the database type associated with the given - , - - The SqlType - The database type name used by ddl. - - - - Get the name of the database type associated with the given - . - - The SqlType - The datatype length - The datatype precision - The datatype scale - The database type name used by ddl. - - - - Get the name of the database type appropriate for casting operations - (via the CAST() SQL function) for the given typecode. - - The typecode - The database type name - - - - Subclasses register a typename for the given type code and maximum - column length. $l in the type name will be replaced by the column - length (if appropriate) - - The typecode - Maximum length of database type - The database type name - - - - Suclasses register a typename for the given type code. $l in the - typename will be replaced by the column length (if appropriate). - - The typecode - The database type name - - - - Get the name of the Hibernate associated with th given - typecode. - - The typecode - The Hibernate name. - - - - Get the name of the Hibernate associated - with the given typecode with the given storage - specification parameters. - - The typecode - The datatype length - The datatype precision - The datatype scale - The Hibernate name. - - - - Registers a Hibernate name for the given - type code and maximum column length. - - The typecode - The maximum length of database type - The Hibernate name - - - - Registers a Hibernate name for the given - type code. - - The typecode - The Hibernate name - - - - - - - - - - - The syntax used to add a foreign key constraint to a table. - - The FK constraint name. - The names of the columns comprising the FK - The table referenced by the FK - The explicit columns in the referencedTable referenced by this FK. - - if false, constraint should be explicit about which column names the constraint refers to - - the "add FK" fragment - - - - The syntax used to add a primary key constraint to a table - - - - - - Get a strategy instance which knows how to acquire a database-level lock - of the specified mode for this dialect. - - The persister for the entity to be locked. - The type of lock to be acquired. - The appropriate locking strategy. - - - - Given a lock mode, determine the appropriate for update fragment to use. - - The lock mode to apply. - The appropriate for update fragment. - - - - Get the FOR UPDATE OF column_list fragment appropriate for this - dialect given the aliases of the columns to be write locked. - - The columns to be write locked. - The appropriate FOR UPDATE OF column_list clause string. - - - - Get the FOR UPDATE OF column_list NOWAIT fragment appropriate - for this dialect given the aliases of the columns to be write locked. - - The columns to be write locked. - The appropriate FOR UPDATE colunm_list NOWAIT clause string. - - - - Modifies the given SQL by applying the appropriate updates for the specified - lock modes and key columns. - - the SQL string to modify - a map of lock modes indexed by aliased table names. - a map of key columns indexed by aliased table names. - the modified SQL string. - - The behavior here is that of an ANSI SQL SELECT FOR UPDATE. This - method is really intended to allow dialects which do not support - SELECT FOR UPDATE to achieve this in their own fashion. - - - - - Some dialects support an alternative means to SELECT FOR UPDATE, - whereby a "lock hint" is appends to the table name in the from clause. - - The lock mode to apply - The name of the table to which to apply the lock hint. - The table with any required lock hints. - - - - Return SQL needed to drop the named table. May (and should) use - some form of "if exists" clause, and cascade constraints. - - - - - - Generate a temporary table name given the bas table. - The table name from which to base the temp table name. - The generated temp table name. - - - - Does the dialect require that temporary table DDL statements occur in - isolation from other statements? This would be the case if the creation - would cause any current transaction to get committed implicitly. - - see the result matrix above. - - JDBC defines a standard way to query for this information via the - {@link java.sql.DatabaseMetaData#dataDefinitionCausesTransactionCommit()} - method. However, that does not distinguish between temporary table - DDL and other forms of DDL; MySQL, for example, reports DDL causing a - transaction commit via its driver, even though that is not the case for - temporary table DDL. -

- Possible return values and their meanings:

    -
  • {@link Boolean#TRUE} - Unequivocally, perform the temporary table DDL in isolation.
  • -
  • {@link Boolean#FALSE} - Unequivocally, do not perform the temporary table DDL in isolation.
  • -
  • null - defer to the JDBC driver response in regards to {@link java.sql.DatabaseMetaData#dataDefinitionCausesTransactionCommit()}
  • -
-
-
- - Do we need to drop the temporary table after use? - - - - Registers an OUT parameter which will be returing a - . How this is accomplished varies greatly - from DB to DB, hence its inclusion (along with {@link #getResultSet}) here. - - The callable statement. - The bind position at which to register the OUT param. - The number of (contiguous) bind positions used. - - - - Given a callable statement previously processed by , - extract the from the OUT parameter. - - The callable statement. - The extracted result set. - SQLException Indicates problems extracting the result set. - - - - The syntax used to drop a foreign key constraint from a table. - - The name of the foreign key constraint to drop. - - The SQL string to drop the foreign key constraint. - - - - - The syntax that is used to check if a constraint does not exists before creating it - - The table. - The name. - - - - - The syntax that is used to close the if for a constraint exists check, used - for dialects that requires begin/end for ifs - - The table. - The name. - - - - - The syntax that is used to check if a constraint exists before dropping it - - The table. - The name. - - - - - The syntax that is used to close the if for a constraint exists check, used - for dialects that requires begin/end for ifs - - The table. - The name. - - - - - The syntax used to drop a primary key constraint from a table. - - The name of the primary key constraint to drop. - - The SQL string to drop the primary key constraint. - - - - - The syntax used to drop an index constraint from a table. - - The name of the index constraint to drop. - - The SQL string to drop the primary key constraint. - - - - - Provided we , then attch the - "select identity" clause to the insert statement. - - The insert command - - The insert command with any necessary identity select clause attached. - Note, if == false then - the insert-string should be returned without modification. - - - - - Get the select command to use to retrieve the last generated IDENTITY - value for a particular table - - The table into which the insert was done - The PK column. - The type code. - The appropriate select command - - - - The syntax used during DDL to define a column as being an IDENTITY of - a particular type. - - The type code. - The appropriate DDL fragment. - - - - Generate the appropriate select statement to to retreive the next value - of a sequence. - - the name of the sequence - String The "nextval" select string. - This should be a "stand alone" select statement. - - - - Typically dialects which support sequences can drop a sequence - with a single command. - - The name of the sequence - The sequence drop commands - - This is convenience form of - to help facilitate that. - - Dialects which support sequences and can drop a sequence in a - single command need *only* override this method. Dialects - which support sequences but require multiple commands to drop - a sequence should instead override . - - - - - The multiline script used to drop a sequence. - - The name of the sequence - The sequence drop commands - - - - Generate the select expression fragment that will retrieve the next - value of a sequence as part of another (typically DML) statement. - - the name of the sequence - The "nextval" fragment. - - This differs from in that this - should return an expression usable within another statement. - - - - - Typically dialects which support sequences can create a sequence - with a single command. - - The name of the sequence - The sequence creation command - - This is convenience form of to help facilitate that. - Dialects which support sequences and can create a sequence in a - single command need *only* override this method. Dialects - which support sequences but require multiple commands to create - a sequence should instead override . - - - - - An optional multi-line form for databases which . - - The name of the sequence - The initial value to apply to 'create sequence' statement - The increment value to apply to 'create sequence' statement - The sequence creation commands - - - - Overloaded form of , additionally - taking the initial value and increment size to be applied to the sequence - definition. - - The name of the sequence - The initial value to apply to 'create sequence' statement - The increment value to apply to 'create sequence' statement - The sequence creation command - - The default definition is to suffix - with the string: " start with {initialValue} increment by {incrementSize}" where - {initialValue} and {incrementSize} are replacement placeholders. Generally - dialects should only need to override this method if different key phrases - are used to apply the allocation information. - - - - - Create a strategy responsible - for handling this dialect's variations in how joins are handled. - - This dialect's strategy. - - - - Create a strategy responsible - for handling this dialect's variations in how CASE statements are - handled. - - This dialect's strategy. - - - The SQL literal value to which this database maps boolean values. - The boolean value - The appropriate SQL literal. - - - - Add a LIMIT clause to the given SQL SELECT - - A Query in the form of a SqlString. - Offset of the first row to be returned by the query (zero-based) - Maximum number of rows to be returned by the query - A new SqlString that contains the LIMIT clause. - - - Apply s limit clause to the query. - The query to which to apply the limit. - Is the query requesting an offset? - the modified SQL - - Typically dialects utilize - limit caluses when they support limits. Thus, when building the - select command we do not actually need to know the limit or the offest - since we will just be using placeholders. -

- Here we do still pass along whether or not an offset was specified - so that dialects not supporting offsets can generate proper exceptions. - In general, dialects will override one or the other of this method and - . - - - -

- Checks to see if the name has been quoted. - - The name to check if it is quoted - true if name is already quoted. - - The default implementation is to compare the first character - to Dialect.OpenQuote and the last char to Dialect.CloseQuote - -
- - - Quotes a name. - - The string that needs to be Quoted. - A QuotedName - -

- This method assumes that the name is not already Quoted. So if the name passed - in is "name then it will return """name". It escapes the first char - - the " with "" and encloses the escaped string with OpenQuote and CloseQuote. -

-
-
- - - Quotes a name for being used as a aliasname - - Original implementation calls - Name of the alias - A Quoted name in the format of OpenQuote + aliasName + CloseQuote - -

- If the aliasName is already enclosed in the OpenQuote and CloseQuote then this - method will return the aliasName that was passed in without going through any - Quoting process. So if aliasName is passed in already Quoted make sure that - you have escaped all of the chars according to your DataBase's specifications. -

-
-
- - - Quotes a name for being used as a columnname - - Original implementation calls - Name of the column - A Quoted name in the format of OpenQuote + columnName + CloseQuote - -

- If the columnName is already enclosed in the OpenQuote and CloseQuote then this - method will return the columnName that was passed in without going through any - Quoting process. So if columnName is passed in already Quoted make sure that - you have escaped all of the chars according to your DataBase's specifications. -

-
-
- - - Quotes a name for being used as a tablename - - Name of the table - A Quoted name in the format of OpenQuote + tableName + CloseQuote - -

- If the tableName is already enclosed in the OpenQuote and CloseQuote then this - method will return the tableName that was passed in without going through any - Quoting process. So if tableName is passed in already Quoted make sure that - you have escaped all of the chars according to your DataBase's specifications. -

-
-
- - - Quotes a name for being used as a schemaname - - Name of the schema - A Quoted name in the format of OpenQuote + schemaName + CloseQuote - -

- If the schemaName is already enclosed in the OpenQuote and CloseQuote then this - method will return the schemaName that was passed in without going through any - Quoting process. So if schemaName is passed in already Quoted make sure that - you have escaped all of the chars according to your DataBase's specifications. -

-
-
- - - Unquotes and unescapes an already quoted name - - Quoted string - Unquoted string - -

- This method checks the string quoted to see if it is - quoted. If the string quoted is already enclosed in the OpenQuote - and CloseQuote then those chars are removed. -

-

- After the OpenQuote and CloseQuote have been cleaned from the string quoted - then any chars in the string quoted that have been escaped by doubling them - up are changed back to a single version. -

-

- The following quoted values return these results - "quoted" = quoted - "quote""d" = quote"d - quote""d = quote"d -

-

- If this implementation is not sufficient for your Dialect then it needs to be overridden. - MsSql2000Dialect is an example of where UnQuoting rules are different. -

-
-
- - - Unquotes an array of Quoted Names. - - strings to Unquote - an array of unquoted strings. - - This use UnQuote(string) for each string in the quoted array so - it should not need to be overridden - only UnQuote(string) needs - to be overridden unless this implementation is not sufficient. - - - - - Given a type code, determine an appropriate - null value to use in a select clause. - - The type code. - The appropriate select clause value fragment. - - One thing to consider here is that certain databases might - require proper casting for the nulls here since the select here - will be part of a UNION/UNION ALL. - - - - - Build an instance of the preferred by this dialect for - converting into NHibernate's ADOException hierarchy. - - The Dialect's preferred . - - The default Dialect implementation simply returns a converter based on X/Open SQLState codes. - - It is strongly recommended that specific Dialect implementations override this - method, since interpretation of a SQL error is much more accurate when based on - the ErrorCode rather than the SQLState. Unfortunately, the ErrorCode is a vendor-specific approach. - - - - - Retrieve a set of default Hibernate properties for this database. - - - - - Aggregate SQL functions as defined in general. This is - a case-insensitive hashtable! - - - The results of this method should be integrated with the - specialization's data. - - - - - The class (which implements ) - which acts as this dialects native generation strategy. - - The native generator class. - - Comes into play whenever the user specifies the native generator. - - - - - The keyword used to insert a generated value into an identity column (or null). - Need if the dialect does not support inserts that specify no column values. - - - - Get the select command used retrieve the names of all sequences. - The select command; or null if sequences are not supported. - - - - Get the command used to select a GUID from the underlying database. - (Optional operation.) - - The appropriate command. - - - Command used to create a table. - - - - Slight variation on . - The command used to create a multiset table. - - - Here, we have the command used to create a table when there is no primary key and - duplicate rows are expected. -

- Most databases do not care about the distinction; originally added for - Teradata support which does care. - - - -

Command used to create a temporary table. -
- - - Get any fragments needing to be postfixed to the command for - temporary table creation. - - - - - Should the value returned by - be treated as callable. Typically this indicates that JDBC escape - sytnax is being used... - - - - - Retrieve the command used to retrieve the current timestammp from the database. - - - - - The name of the database-specific SQL function for retrieving the - current timestamp. - - - - - The keyword used to insert a row without specifying any column values - - - - - The name of the SQL function that transforms a string to lowercase - - - - - The syntax used to add a column to a table. Note this is deprecated - - - - - The keyword used to specify a nullable column - - - - - Completely optional cascading drop clause - - - - - The keyword used to create a primary key constraint - - - - - Does this dialect support the ALTER TABLE syntax? - - - - - Do we need to drop constraints before dropping tables in the dialect? - - - - - Do we need to qualify index names with the schema name? - - - - - Does this dialect support the UNIQUE column syntax? - - - - Does this dialect support adding Unique constraints via create and alter table ? - - - - Does the dialect support the syntax 'drop table if exists NAME' - - - - - Does the dialect support the syntax 'drop table NAME if exists' - - - - Does this dialect support column-level check constraints? - True if column-level CHECK constraints are supported; false otherwise. - - - Does this dialect support table-level check constraints? - True if table-level CHECK constraints are supported; false otherwise. - - - - Get the string to append to SELECT statements to acquire locks - for this dialect. - - The appropriate FOR UPDATE clause string. - - - Is FOR UPDATE OF syntax supported? - True if the database supports FOR UPDATE OF syntax; false otherwise. - - - - Does this dialect support FOR UPDATE in conjunction with outer joined rows? - - True if outer joined rows can be locked via FOR UPDATE. - - - - Retrieves the FOR UPDATE NOWAIT syntax specific to this dialect - - The appropriate FOR UPDATE NOWAIT clause string. - - - Does this dialect support temporary tables? - - - Does this dialect support a way to retrieve the database's current timestamp value? - - - - Gives the best resolution that the database can use for storing - date/time values, in ticks. - - - - For example, if the database can store values with 100-nanosecond - precision, this property is equal to 1L. If the database can only - store values with 1-millisecond precision, this property is equal - to 10000L (number of ticks in a millisecond). - - - Used in TimestampType. - - - - - - Does this dialect support subselects? - - - - - Does this dialect support identity column key generation? - - - - - Does the dialect support some form of inserting and selecting - the generated IDENTITY value all in the same statement. - - - - - Whether this dialect has an identity clause added to the data type or a - completely separate identity data type. - - - - - Get the select command to use to retrieve the last generated IDENTITY value. - - The appropriate select command - - - - The keyword used to specify an identity column, if native key generation is supported - - - - - Does this dialect support sequences? - - - - - Does this dialect support "pooled" sequences. Not aware of a better - name for this. Essentially can we specify the initial and increment values? - - True if such "pooled" sequences are supported; false otherwise. - - - - - - Does this Dialect have some kind of LIMIT syntax? - - False, unless overridden. - - - - Does this Dialect support an offset? - - - - - Can parameters be used for a statement containing a LIMIT? - - - - - Does the LIMIT clause specify arguments in the "reverse" order - limit, offset instead of offset, limit? - - False, unless overridden. - Inheritors should return true if the correct order is limit, offset - - - - Does the LIMIT clause come at the start of the - SELECT statement rather than at the end? - - false, unless overridden - - - - Does the LIMIT clause take a "maximum" row number instead - of a total number of returned rows? - - True if limit is relative from offset; false otherwise. - - This is easiest understood via an example. Consider you have a table - with 20 rows, but you only want to retrieve rows number 11 through 20. - Generally, a limit with offset would say that the offset = 11 and the - limit = 10 (we only want 10 rows at a time); this is specifying the - total number of returned rows. Some dialects require that we instead - specify offset = 11 and limit = 20, where 20 is the "last" row we want - relative to offset (i.e. total number of rows = 20 - 11 = 9) - So essentially, is limit relative from offset? Or is limit absolute? - - - - - The opening quote for a quoted identifier. - - - - - The closing quote for a quoted identifier. - - - - - Does this dialect support UNION ALL, which is generally a faster variant of UNION? - True if UNION ALL is supported; false otherwise. - - - - - Does this dialect support empty IN lists? - For example, is [where XYZ in ()] a supported construct? - - True if empty in lists are supported; false otherwise. - - - - Are string comparisons implicitly case insensitive. - In other words, does [where 'XYZ' = 'xyz'] resolve to true? - - True if comparisons are case insensitive. - - - - Is this dialect known to support what ANSI-SQL terms "row value - constructor" syntax; sometimes called tuple syntax. -

- Basically, does it support syntax like - "... where (FIRST_NAME, LAST_NAME) = ('Steve', 'Ebersole') ...". -

- - True if this SQL dialect is known to support "row value - constructor" syntax; false otherwise. - -
- - - If the dialect supports {@link #supportsRowValueConstructorSyntax() row values}, - does it offer such support in IN lists as well? -

- For example, "... where (FIRST_NAME, LAST_NAME) IN ( (?, ?), (?, ?) ) ..." -

- - True if this SQL dialect is known to support "row value - constructor" syntax in the IN list; false otherwise. - -
- - - Should LOBs (both BLOB and CLOB) be bound using stream operations (i.e. - {@link java.sql.PreparedStatement#setBinaryStream}). - - True if BLOBs and CLOBs should be bound using stream operations. - - - - Does this dialect support parameters within the select clause of - INSERT ... SELECT ... statements? - - True if this is supported; false otherwise. - - - - Does this dialect support asking the result set its positioning - information on forward only cursors. Specifically, in the case of - scrolling fetches, Hibernate needs to use - {@link java.sql.ResultSet#isAfterLast} and - {@link java.sql.ResultSet#isBeforeFirst}. Certain drivers do not - allow access to these methods for forward only cursors. -

- NOTE : this is highly driver dependent! -

- - True if methods like {@link java.sql.ResultSet#isAfterLast} and - {@link java.sql.ResultSet#isBeforeFirst} are supported for forward - only cursors; false otherwise. - -
- - - Does this dialect support definition of cascade delete constraints - which can cause circular chains? - - True if circular cascade delete constraints are supported; false otherwise. - - - - Are subselects supported as the left-hand-side (LHS) of - IN-predicates. - - In other words, is syntax like "... {subquery} IN (1, 2, 3) ..." supported? - - True if subselects can appear as the LHS of an in-predicate;false otherwise. - - - - Expected LOB usage pattern is such that I can perform an insert - via prepared statement with a parameter binding for a LOB value - without crazy casting to JDBC driver implementation-specific classes... -

- Part of the trickiness here is the fact that this is largely - driver dependent. For example, Oracle (which is notoriously bad with - LOB support in their drivers historically) actually does a pretty good - job with LOB support as of the 10.2.x versions of their drivers... -

- - True if normal LOB usage patterns can be used with this driver; - false if driver-specific hookiness needs to be applied. - -
- - Does the dialect support propagating changes to LOB - values back to the database? Talking about mutating the - internal value of the locator as opposed to supplying a new - locator instance... -

- For BLOBs, the internal value might be changed by: - {@link java.sql.Blob#setBinaryStream}, - {@link java.sql.Blob#setBytes(long, byte[])}, - {@link java.sql.Blob#setBytes(long, byte[], int, int)}, - or {@link java.sql.Blob#truncate(long)}. -

- For CLOBs, the internal value might be changed by: - {@link java.sql.Clob#setAsciiStream(long)}, - {@link java.sql.Clob#setCharacterStream(long)}, - {@link java.sql.Clob#setString(long, String)}, - {@link java.sql.Clob#setString(long, String, int, int)}, - or {@link java.sql.Clob#truncate(long)}. -

- NOTE : I do not know the correct answer currently for - databases which (1) are not part of the cruise control process - or (2) do not {@link #supportsExpectedLobUsagePattern}. -

- True if the changes are propagated back to the database; false otherwise. -
- - - Is it supported to materialize a LOB locator outside the transaction in - which it was created? -

- Again, part of the trickiness here is the fact that this is largely - driver dependent. -

- NOTE: all database I have tested which {@link #supportsExpectedLobUsagePattern()} - also support the ability to materialize a LOB outside the owning transaction... -

- True if unbounded materialization is supported; false otherwise. -
- - - Does this dialect support referencing the table being mutated in - a subquery. The "table being mutated" is the table referenced in - an UPDATE or a DELETE query. And so can that table then be - referenced in a subquery of said UPDATE/DELETE query. -

- For example, would the following two syntaxes be supported:

    -
  • delete from TABLE_A where ID not in ( select ID from TABLE_A )
  • -
  • update TABLE_A set NON_ID = 'something' where ID in ( select ID from TABLE_A)
  • -
-
- True if this dialect allows references the mutating table from a subquery. -
- - Does the dialect support an exists statement in the select clause? - True if exists checks are allowed in the select clause; false otherwise. - - - - For the underlying database, is READ_COMMITTED isolation implemented by - forcing readers to wait for write locks to be released? - - True if writers block readers to achieve READ_COMMITTED; false otherwise. - - - - For the underlying database, is REPEATABLE_READ isolation implemented by - forcing writers to wait for read locks to be released? - - True if readers block writers to achieve REPEATABLE_READ; false otherwise. - - - - Does this dialect support using a JDBC bind parameter as an argument - to a function or procedure call? - - True if the database supports accepting bind params as args; false otherwise. - - - - The class (which implements ) - which acts as this dialects identity-style generation strategy. - - The native generator class. - - Comes into play whenever the user specifies the "identity" generator. - - - - - Defines a contract for implementations that can extract the name of a violated - constraint from a SQLException that is the result of that constraint violation. - - - - - Extract the name of the violated constraint from the given SQLException. - - The exception that was the result of the constraint violation. - The extracted constraint name. - - - - - - - - - - - - - - - - Add a LIMIT clause to the given SQL SELECT - - A Query in the form of a SqlString. - Offset of the first row is not zero - A new SqlString that contains the LIMIT clause. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Summary description for FirebirdDialect. - - - The FirebirdDialect defaults the following configuration properties: - - - Property - Default Value - - - connection.driver_class - - - - - - - - Add a FIRST x [SKIP] y clause to the given SQL SELECT - - A Query in the form of a SqlString. - Maximum number of rows to be returned by the query - Offset of the first row to process in the result set - A new SqlString that contains the FIRST clause. - - - - - - - A generic SQL dialect which may or may not work on any actual databases - - - - - - - - - - - Summary description for InformixDialect. - This dialect is intended to work with IDS version 7.31 - However I can test only version 10.00 as I have only this version at work - - - The InformixDialect defaults the following configuration properties: - - - ConnectionDriver - NHibernate.Driver.OdbcDriver - PrepareSql - true - - - connection.driver_class - - - - - - - - - - - Get the FOR UPDATE OF column_list fragment appropriate for this - dialect given the aliases of the columns to be write locked. - - The columns to be write locked. - The appropriate FOR UPDATE OF column_list clause string. - - - - Does the dialect require that temporary table DDL statements occur in - isolation from other statements? This would be the case if the creation - would cause any current transaction to get committed implicitly. - - see the result matrix above. - - JDBC defines a standard way to query for this information via the - {@link java.sql.DatabaseMetaData#dataDefinitionCausesTransactionCommit()} - method. However, that does not distinguish between temporary table - DDL and other forms of DDL; MySQL, for example, reports DDL causing a - transaction commit via its driver, even though that is not the case for - temporary table DDL. -

- Possible return values and their meanings:

    -
  • {@link Boolean#TRUE} - Unequivocally, perform the temporary table DDL in isolation.
  • -
  • {@link Boolean#FALSE} - Unequivocally, do not perform the temporary table DDL in isolation.
  • -
  • null - defer to the JDBC driver response in regards to {@link java.sql.DatabaseMetaData#dataDefinitionCausesTransactionCommit()}
  • -
-
-
- - - Get the select command to use to retrieve the last generated IDENTITY - value for a particular table - - The table into which the insert was done - The PK column. - The type code. - The appropriate select command - - - - The syntax used during DDL to define a column as being an IDENTITY of - a particular type. - - The type code. - The appropriate DDL fragment. - - - - Create a strategy responsible - for handling this dialect's variations in how joins are handled. - - This dialect's strategy. - - - The SQL literal value to which this database maps boolean values. - The boolean value - The appropriate SQL literal. - - - Apply s limit clause to the query. - The query to which to apply the limit. - Offset of the first row to be returned by the query (zero-based) - Maximum number of rows to be returned by the query - the modified SQL - - Typically dialects utilize - limit caluses when they support limits. Thus, when building the - select command we do not actually need to know the limit or the offest - since we will just be using placeholders. -

- Here we do still pass along whether or not an offset was specified - so that dialects not supporting offsets can generate proper exceptions. - In general, dialects will override one or the other of this method and - . - - - -

- The keyword used to insert a generated value into an identity column (or null). - Need if the dialect does not support inserts that specify no column values. - -
- - Command used to create a temporary table. - - - - Get any fragments needing to be postfixed to the command for - temporary table creation. - - - - - Should the value returned by - be treated as callable. Typically this indicates that JDBC escape - sytnax is being used... - - - - - Retrieve the command used to retrieve the current timestammp from the database. - - - - - The name of the database-specific SQL function for retrieving the - current timestamp. - - - - - - - Is FOR UPDATE OF syntax supported? - True if the database supports FOR UPDATE OF syntax; false otherwise. - - - - Does this dialect support FOR UPDATE in conjunction with outer joined rows? - - True if outer joined rows can be locked via FOR UPDATE. - - - Does this dialect support temporary tables? - - - Does this dialect support a way to retrieve the database's current timestamp value? - - - - Whether this dialect have an Identity clause added to the data type or a - completely seperate identity data type - - - - - The syntax that returns the identity value of the last insert, if native - key generation is supported - - - - - The keyword used to specify an identity column, if native key generation is supported - - - - - Does this dialect support sequences? - - - - - Does this Dialect have some kind of LIMIT syntax? - - False, unless overridden. - - - - Does this Dialect support an offset? - - - - - Can parameters be used for a statement containing a LIMIT? - - - - - Does the LIMIT clause come at the start of the - SELECT statement rather than at the end? - - false, unless overridden - - - - Does this dialect support UNION ALL, which is generally a faster variant of UNION? - True if UNION ALL is supported; false otherwise. - - - - - Knows how to extract a violated constraint name from an error message based on the - fact that the constraint name is templated within the message. - - - - - Extracts the constraint name based on a template (i.e., templateStartconstraintNametemplateEnd). - - The pattern denoting the start of the constraint name within the message. - The pattern denoting the end of the constraint name within the message. - The templated error message containing the constraint name. - The found constraint name, or null. - - - - Extract the name of the violated constraint from the given SQLException. - - The exception that was the result of the constraint violation. - The extracted constraint name. - - - - Extract the name of the violated constraint from the given DbException. - - The exception that was the result of the constraint violation. - The extracted constraint name. - - - - Summary description for InformixDialect. - This dialect is intended to work with IDS version 9.40 - - - The InformixDialect defaults the following configuration properties: - - - ConnectionDriver - NHibernate.Driver.OdbcDriver - PrepareSql - true - - - connection.driver_class - - - - - - - - - - - Generate the appropriate select statement to to retreive the next value - of a sequence. - - the name of the sequence - String The "nextval" select string. - This should be a "stand alone" select statement. - - - - Generate the select expression fragment that will retrieve the next - value of a sequence as part of another (typically DML) statement. - - the name of the sequence - The "nextval" fragment. - - This differs from in that this - should return an expression usable within another statement. - - - - - Create a strategy responsible - for handling this dialect's variations in how joins are handled. - - This dialect's strategy. - - - Get the select command used retrieve the names of all sequences. - The select command; or null if sequences are not supported. - - - - Does this dialect support sequences? - - - - - Does this dialect support "pooled" sequences. Not aware of a better - name for this. Essentially can we specify the initial and increment values? - - True if such "pooled" sequences are supported; false otherwise. - - - - Does this Dialect have some kind of LIMIT syntax? - - False, unless overridden. - - - - Does this Dialect support an offset? - - - - - Summary description for InformixDialect. - This dialect is intended to work with IDS version 10.00 - - - The InformixDialect defaults the following configuration properties: - - - ConnectionDriver - NHibernate.Driver.OdbcDriver - PrepareSql - true - - - connection.driver_class - - - - - - - - - - - Does this Dialect have some kind of LIMIT syntax? - - False, unless overridden. - - - - Does this Dialect support an offset? - - - - - An SQL dialect for IngresSQL. - - - The IngresDialect defaults the following configuration properties: - - - Property - Default Value - - - use_outer_join - - - - connection.driver_class - - - - - - - - An SQL dialect compatible with Microsoft SQL Server 2000. - - - The MsSql2000Dialect defaults the following configuration properties: - - - Property - Default Value - - - use_outer_join - - - - connection.driver_class - - - - prepare_sql - - - - - - - - - - - Generates the string to drop the table using SQL Server syntax. - - The name of the table to drop. - The SQL with the inserted. - - - - Add a LIMIT (TOP) clause to the given SQL SELECT - - A Query in the form of a SqlString. - Maximum number of rows to be returned by the query - Offset of the first row to process in the result set - A new SqlString that contains the LIMIT clause. - - - - - - - - - MsSql does not require the OpenQuote to be escaped as long as the first char - is an OpenQuote. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Does this Dialect have some kind of LIMIT syntax? - - True, we'll use the SELECT TOP nn syntax. - - - - Does this Dialect support an offset? - - - - - Can parameters be used for a statement containing a LIMIT? - - - - - Does the LIMIT clause take a "maximum" row number - instead of a total number of returned rows? - - false, unless overridden - - - - Add a LIMIT clause to the given SQL SELECT - - The to base the limit query off of. - Offset of the first row to be returned by the query (zero-based) - Maximum number of rows to be returned by the query - A new with the LIMIT clause applied. - - The LIMIT SQL will look like - - - SELECT - TOP last (columns) - FROM - (SELECT (columns), ROW_NUMBER() OVER(ORDER BY {original order by, with un-aliased column names) as __hibernate_sort_row - {original from}) as query - WHERE query.__hibernate_sort_row > offset - ORDER BY query.__hibernate_sort_row - - - - Note that we need to add explicitly specify the columns, because we need to be able to use them - in a paged subselect. NH-1155 - - - - - Indicates whether the string fragment contains matching parenthesis - - the statement to evaluate - true if the statment contains no parenthesis or an equal number of - opening and closing parenthesis;otherwise false - - - - Sql Server 2005 supports a query statement that provides LIMIT - functionality. - - true - - - - Sql Server 2005 supports a query statement that provides LIMIT - functionality with an offset. - - true - - - - Sql Server 2005 supports a query statement that provides LIMIT - functionality with an offset. - - false - - - - This specialized string tokenizier will break a string to tokens, taking - into account single quotes, parenthesis and commas and [ ] - Notice that we aren't differenciating between [ ) and ( ] on purpose, it would complicate - the code and it is not legal at any rate. - - - - - An SQL dialect compatible with Microsoft SQL Server 7. - - - There have been no test run with this because the NHibernate team does not - have a machine with Sql 7 installed on it. But there have been users using - Ms Sql 7 with NHibernate. As issues with Ms Sql 7 and NHibernate become known - this Dialect will be updated. - - - - - Uses @@identity to get the Id value. - - - There is a well known problem with @@identity and triggers that insert into - rows into other tables that also use an identity column. The only way I know - of to get around this problem is to upgrade your database server to Ms Sql 2000. - - - - - A dialect for SQL Server Everywhere (SQL Server CE). - - - - - A SQL dialect for MySQL - - - The MySQLDialect defaults the following configuration properties: - - - Property - Default Value - - - use_outer_join - - - - connection.driver_class - - - - - - - - - - - - - - - - Create the SQL string to drop a foreign key constraint. - - The name of the foreign key to drop. - The SQL string to drop the foreign key constraint. - - - - Create the SQL string to drop a primary key constraint. - - The name of the primary key to drop. - The SQL string to drop the primary key constraint. - - - - Create the SQL string to drop an index. - - The name of the index to drop. - The SQL string to drop the index constraint. - - - - - - - - - - - - - - - - - - - - - - - - - - - - A dialect specifically for use with Oracle 10g. - - - The main difference between this dialect and - is the use of "ANSI join syntax" here... - - - - - A dialect for Oracle 8i. - - - - - Support for the oracle proprietary join syntax... - - The orqacle join fragment - - - - Map case support to the Oracle DECODE function. Oracle did not - add support for CASE until 9i. - - The oracle CASE -> DECODE fragment - - - - Allows access to the basic - implementation... - - The mapping type - The appropriate select cluse fragment - - - - It's a immature version, it just work. - An SQL dialect for Oracle Lite - - - The OracleLiteDialect defaults the following configuration properties: - - - Property - Default Value - - - use_outer_join - - - - connection.driver_class - - - - - - - - - - - - - - An SQL dialect for PostgreSQL 8.1 and above. - - - - PostgreSQL 8.1 supports FOR UPDATE ... NOWAIT syntax. - - - PostgreSQL supports Identity column using the "SERIAL" type. - Serial type is a "virtual" type that will automatically: - - - Create a sequence named tablename_colname_seq. - Set the default value of this column to the next value of the - sequence. (using function nextval('tablename_colname_seq')) - Add a "NOT NULL" constraint to this column. - Set the sequence as "owned by" the table. - - - To insert the next value of the sequence into the serial column, - exclude the column from the list of columns - in the INSERT statement or use the DEFAULT key word. - - - If the table or the column is dropped, the sequence is dropped too. - - - - - - - An SQL dialect for PostgreSQL. - - - The PostgreSQLDialect defaults the following configuration properties: - - - Property - Default Value - - - use_outer_join - - - - connection.driver_class - - - - - - - - - - - - - - Offset of the first row to process in the result set is non-zero - - - - PostgreSQL requires to cast NULL values to correctly handle UNION/UNION ALL - - See - PostgreSQL BUG #1847: Error in some kind of UNION query. - - The type code. - null casted as : "null::sqltypename" - - - - - - - - - PostgreSQL supports UNION ALL clause - - Reference: - PostgreSQL 8.0 UNION Clause documentation - - - - - - PostgreSQL supports serial and serial4 type for 4 bytes integer auto increment column. - bigserial or serial8 can be used for 8 bytes integer auto increment column. - - bigserial if equal Int64, - serial otherwise - - - - PostgreSQL supports Identity column using the "SERIAL" type. - - - - - PostgreSQL doesn't have type in identity column. - - - To create an identity column it uses the SQL syntax - CREATE TABLE tablename (colname SERIAL); or - CREATE TABLE tablename (colname BIGSERIAL); - - - - - The sql syntax to insert a row without specifying any column in PostgreSQL is - INSERT INTO table DEFAULT VALUES; - - - - - PostgreSQL 8.1 and above defined the fuction lastval() that returns the - value of the last sequence that nextval() was used on in the current session. - Call lastval() if nextval() has not yet been called in the current - session throw an exception. - - - - - An SQL dialect for PostgreSQL 8.2 and above. - - - PostgreSQL 8.2 supports DROP TABLE IF EXISTS tablename - and DROP SEQUENCE IF EXISTS sequencename syntax. - See for more information. - - - - - A SQL dialect for SQLite. - - -

- Author: Ioan Bizau -

-
-
- - - - - - - - Add a LIMIT N clause to the given SQL SELECT - - A Query in the form of a SqlString. - Maximum number of rows to be returned by the query - Offset of the first row to process in the result set - A new SqlString that contains the LIMIT clause. - - - - This is a subclass of SybaseDialect for sybase 11 databases (specifically tested against 11.9.2). 11.9.2 does not support ANSI JOINs - therefore we have to provide a special join fragment for left/right joins (*= and =* respectively). - - - - - An SQL dialect compatible with Sybase. - - -

- This dialect probably will not work with schema-export. If anyone out there - can fill in the ctor with DbTypes to Strings that would be helpful. -

- The SybaseDialect defaults the following configuration properties: - - - Property - Default Value - - - use_outer_join - - - - connection.driver_class - - - - prepare_sql - - - -
-
- - - - - - Sybase does not support quoted aliases, this function thus returns - aliasName as is. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This class is basically a port of the hibernate 3.2 Sybase 11 join fragment. It uses concepts from that join fragment and the Oracle join fragment in NHibernate - - - - - Represents a SQL JOIN - - - - - An SQL dialect compatible with Sybase. - - -

- This dialect probably will not work with schema-export. If anyone out there - can fill in the ctor with DbTypes to Strings that would be helpful. -

- The SybaseDialect defaults the following configuration properties: - - - Property - Default Value - - - use_outer_join - - - - connection.driver_class - - - - prepare_sql - - - -
-
- - - - - - Sybase does not support quoted aliases, this function thus returns - aliasName as is. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - An SQL dialect for Sybase Adaptive Server Anywhere 9.0/10.0 - - -

- This dialect probably will not work with schema-export. If anyone out there - can fill in the ctor with DbTypes to Strings that would be helpful. -

- The SybaseAnywhereDialect defaults the following configuration properties: - - - Property - Default Value - - - use_outer_join - - - - connection.driver_class - - - - prepare_sql - - - -
-
- - - - - - - - - - - - ASA does not require to drop constraint before dropping tables, and DROP statement - syntax used by Hibernate to drop constraint is not compatible with ASA, so disable it. - Comments matchs SybaseAnywhereDialect from Hibernate-3.1 src - - - - - This class maps a DbType to names. - - - Associations may be marked with a capacity. Calling the Get() - method with a type and actual size n will return the associated - name with smallest capacity >= n, if available and an unmarked - default type otherwise. - Eg, setting - - Names.Put(DbType, "TEXT" ); - Names.Put(DbType, 255, "VARCHAR($l)" ); - Names.Put(DbType, 65534, "LONGVARCHAR($l)" ); - - will give you back the following: - - Names.Get(DbType) // --> "TEXT" (default) - Names.Get(DbType,100) // --> "VARCHAR(100)" (100 is in [0:255]) - Names.Get(DbType,1000) // --> "LONGVARCHAR(1000)" (100 is in [256:65534]) - Names.Get(DbType,100000) // --> "TEXT" (default) - - On the other hand, simply putting - - Names.Put(DbType, "VARCHAR($l)" ); - - would result in - - Names.Get(DbType) // --> "VARCHAR($l)" (will cause trouble) - Names.Get(DbType,100) // --> "VARCHAR(100)" - Names.Get(DbType,1000) // --> "VARCHAR(1000)" - Names.Get(DbType,10000) // --> "VARCHAR(10000)" - - - - - - Get default type name for specified type - - the type key - the default type name associated with the specified key - - - - Get the type name specified type and size - - the type key - the SQL length - the SQL scale - the SQL precision - - The associated name with smallest capacity >= size if available and the - default type name otherwise - - - - - Set a type name for specified type key and capacity - - the type key - the (maximum) type size/length - The associated name - - - - - - - - - - - The ASAClientDriver Driver provides a database driver for Adaptive Server Anywhere 10.0. - - - - - Base class for the implementation of IDriver - - - - - A strategy for describing how NHibernate should interact with the different .NET Data - Providers. - - - - The IDriver interface is not intended to be exposed to the application. - Instead it is used internally by NHibernate to obtain connection objects, command objects, and - to generate and prepare IDbCommands. Implementors should provide a - public default constructor. - - - This is the interface to implement, or you can inherit from - if you have an ADO.NET data provider that NHibernate does not have built in support for. - To use the driver, NHibernate property connection.driver_class should be - set to the assembly-qualified name of the driver class. - - - key="connection.driver_class" - value="FullyQualifiedClassName, AssemblyName" - - - - - - Configure the driver using . - - - - - Creates an uninitialized IDbConnection object for the specific Driver - - - - - Generates an IDbCommand from the SqlString according to the requirements of the DataProvider. - - The of the command to generate. - The SqlString that contains the SQL. - The types of the parameters to generate for the command. - An IDbCommand with the CommandText and Parameters fully set. - - - - Prepare the by calling . - May be a no-op if the driver does not support preparing commands, or for any other reason. - - - - - - Generates an IDbDataParameter for the IDbCommand. It does not add the IDbDataParameter to the IDbCommand's - Parameter collection. - - The IDbCommand to use to create the IDbDataParameter. - The name to set for IDbDataParameter.Name - The SqlType to set for IDbDataParameter. - An IDbDataParameter ready to be added to an IDbCommand. - - - - Does this Driver support having more than 1 open IDataReader with - the same IDbConnection. - - - - A value of indicates that an exception would be thrown if NHibernate - attempted to have 2 IDataReaders open using the same IDbConnection. NHibernate - (since this version is a close to straight port of Hibernate) relies on the - ability to recursively open 2 IDataReaders. If the Driver does not support it - then NHibernate will read the values from the IDataReader into an . - - - A value of will result in greater performance because an IDataReader can be used - instead of the . So if the Driver supports it then make sure - it is set to . - - - - - - Can we issue several select queries in a single query, and get - several result sets back? - - - - - How we separate the queries when we use multiply queries. - - - - - Change the parameterName into the correct format IDbCommand.CommandText - for the ConnectionProvider - - The unformatted name of the parameter - A parameter formatted for an IDbCommand.CommandText - - - - Changes the parameterName into the correct format for an IDbParameter - for the Driver. - - - For SqlServerConnectionProvider it will change id to @id - - The unformatted name of the parameter - A parameter formatted for an IDbParameter. - - - - Generates an IDbDataParameter for the IDbCommand. It does not add the IDbDataParameter to the IDbCommand's - Parameter collection. - - The IDbCommand to use to create the IDbDataParameter. - The name to set for IDbDataParameter.Name - The SqlType to set for IDbDataParameter. - An IDbDataParameter ready to be added to an IDbCommand. - - - - Override to make any adjustments to the IDbCommand object. (e.g., Oracle custom OUT parameter) - Parameters have been bound by this point, so their order can be adjusted too. - This is analagous to the RegisterResultSetOutParameter() function in Hibernate. - - - - - Does this Driver require the use of a Named Prefix in the SQL statement. - - - For example, SqlClient requires select * from simple where simple_id = @simple_id - If this is false, like with the OleDb provider, then it is assumed that - the ? can be a placeholder for the parameter in the SQL statement. - - - - - Does this Driver require the use of the Named Prefix when trying - to reference the Parameter in the Command's Parameter collection. - - - This is really only useful when the UseNamedPrefixInSql == true. When this is true the - code will look like: - IDbParameter param = cmd.Parameters["@paramName"] - if this is false the code will be - IDbParameter param = cmd.Parameters["paramName"]. - - - - - The Named Prefix for parameters. - - - Sql Server uses "@" and Oracle uses ":". - - - - - Does this Driver support IDbCommand.Prepare(). - - - - A value of indicates that an exception would be thrown or the - company that produces the Driver we are wrapping does not recommend using - IDbCommand.Prepare(). - - - A value of indicates that calling IDbCommand.Prepare() will function - fine on this Driver. - - - - - - Initializes a new instance of with - type names that are loaded from the specified assembly. - - Assembly to load the types from. - Connection type name. - Command type name. - - - - Initializes a new instance of the class. - - - Thrown when the iAnywhere.Data.SQLAnywhere assembly is not and can not be loaded. - - - - - iAnywhere.Data.SQLAnywhere uses named parameters in the sql. - - - Sybase uses String.Empty in the sql. - - - - iAnywhere.Data.SQLAnywhere use the string.Empty to locate parameters in sql. - - - - - The ASAClientDriver Driver provides a database driver for Adaptive Server Anywhere 9.0. - - - - - Initializes a new instance of the class. - - - Thrown when the ASA.Data.AsaClient assembly is not and can not be loaded. - - - - - iAnywhere.Data.AsaClient uses named parameters in the sql. - - - Sybase uses String.Empty in the sql. - - - - iAnywhere.Data.AsaClient use the string.Empty to locate parameters in sql. - - - - - A NHibernate Driver for using the IBM.Data.DB2.iSeries DataProvider. - - - - - Initializes a new instance of the class. - - - Thrown when the IBM.Data.DB2.iSeries assembly can not be loaded. - - - - - A NHibernate Driver for using the IBM.Data.DB2 DataProvider. - - - - - Initializes a new instance of the class. - - - Thrown when the IBM.Data.DB2 assembly can not be loaded. - - - - - A NHibernate Driver for using the Firebird data provider located in - FirebirdSql.Data.FirebirdClient assembly. - - - - - Initializes a new instance of the class. - - - Thrown when the FirebirdSql.Data.Firebird assembly can not be loaded. - - - - - A NHibernate Driver for using the FirebirdSql.Data.Firebird DataProvider. - - - - - Initializes a new instance of the class. - - - Thrown when the FirebirdSql.Data.Firebird assembly can not be loaded. - - - - - A NHibernate Driver for using the Informix DataProvider - - - - - Initializes a new instance of the class. - - - Thrown when the IBM.Data.Informix assembly can not be loaded. - - - - - A NHibernate Driver for using the Ingres DataProvider - - - - - - - Provides a database driver for MySQL. - - - - In order to use this driver you must have the assembly MySql.Data.dll available for - NHibernate to load, including its dependencies (ICSharpCode.SharpZipLib.dll is required by - the assembly MySql.Data.dll as of the time of this writing). - - - Please check the product's website - for any updates and/or documentation regarding MySQL. - - - - - - Initializes a new instance of the class. - - - Thrown when the MySql.Data assembly can not be loaded. - - - - - MySql.Data uses named parameters in the sql. - - - MySql uses ? in the sql. - - - - - - - MySql.Data use the ? to locate parameters in sql. - - ? is used to locate parameters in sql. - - - - The MySql.Data driver does NOT support more than 1 open IDataReader - with only 1 IDbConnection. - - - it is not supported. - - - - MySql.Data does not support preparing of commands. - - - it is not supported. - - With the Gamma MySql.Data provider it is throwing an exception with the - message "Expected End of data packet" when a select command is prepared. - - - - - Some Data Providers (ie - SqlClient) do not support Multiple Active Result Sets (MARS). - NHibernate relies on being able to create MARS to read Components and entities inside - of Collections. - - - This is a completely off-line DataReader - the underlying IDataReader that was used to create - this has been closed and no connections to the Db exists. - - - - - Creates a NDataReader from a - - The to get the records from the Database. - if we are loading the in the middle of reading it. - - NHibernate attempts to not have to read the contents of an into memory until it absolutely - has to. What that means is that it might have processed some records from the and will - pick up the midstream so that the underlying can be closed - so a new one can be opened. - - - - - Sets the values that can be cached back to null and sets the - index of the cached column to -1 - - - - - - - - - - - - - - - - - Takes care of freeing the managed and unmanaged resources that - this class is responsible for. - - - There are not any unmanaged resources or any disposable managed - resources that this class is holding onto. It is in here - to comply with the interface. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Stores a Result from a DataReader in memory. - - - - - Initializes a new instance of the NResult class. - - The IDataReader to populate the Result with. - - if the is already positioned on the record - to start reading from. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - An implementation of that will work with either an - returned by Execute or with an - whose contents have been read into a . - - - - This allows NHibernate to use the underlying for as long as - possible without the need to read everything into the . - - - The consumer of the returned from does - not need to know the underlying reader and can use it the same even if it switches from an - to in the middle of its use. - - - - - - Initializes a new instance of the class. - - The underlying IDataReader to use. - - - - Initializes a new instance of the NHybridDataReader class. - - The underlying IDataReader to use. - if the contents of the IDataReader should be read into memory right away. - - - - Reads all of the contents into memory because another - needs to be opened. - - - This will result in a no op if the reader is closed or is already in memory. - - - - - - - - - - - - - - - - - A flag to indicate if Disose() has been called. - - - - - Finalizer that ensures the object is correctly disposed of. - - - - - Takes care of freeing the managed and unmanaged resources that - this class is responsible for. - - - - - Takes care of freeing the managed and unmanaged resources that - this class is responsible for. - - Indicates if this NHybridDataReader is being Disposed of or Finalized. - - If this NHybridDataReader is being Finalized (isDisposing==false) then make sure not - to call any methods that could potentially bring this NHybridDataReader back to life. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Gets if the object is in the middle of reading a Result. - - if NextResult and Read have been called on the . - - - - - - - - - - - - - - - - - - - - - - The PostgreSQL data provider provides a database driver for PostgreSQL. -

- Author: Oliver Weichhold -

-
- -

- In order to use this Driver you must have the Npgsql.dll Assembly available for - NHibernate to load it. -

-

- Please check the products website - http://www.postgresql.org/ - for any updates and or documentation. -

-

- The homepage for the .NET DataProvider is: - http://pgfoundry.org/projects/npgsql. -

-
-
- - - Initializes a new instance of the class. - - - Thrown when the Npgsql assembly can not be loaded. - - - - - A NHibernate Driver for using the Odbc DataProvider - - - Always look for a native .NET DataProvider before using the Odbc DataProvider. - - - - - A NHibernate Driver for using the OleDb DataProvider - - - Always look for a native .NET DataProvider before using the OleDb DataProvider. - - - - - OLE DB provider does not support multiple open data readers - - - - - A NHibernate Driver for using the Oracle DataProvider. - - - - - A NHibernate Driver for using the Oracle.DataAccess DataProvider - - - Code was contributed by James Mills - on the NHibernate forums in this - post. - - - - - Initializes a new instance of . - - - Thrown when the Oracle.DataAccess assembly can not be loaded. - - - - - This adds logic to ensure that a DbType.Boolean parameter is not created since - ODP.NET doesn't support it. - - - - - - - - - - - - - - A NHibernate Driver for using the Oracle.DataAccess.Lite DataProvider - - - - - Initializes a new instance of . - - - Thrown when the Oracle.DataAccess.Lite_w32 assembly can not be loaded. - - - - - This adds logic to ensure that a DbType.Boolean parameter is not created since - ODP.NET doesn't support it. - - - - - A NHibernate Driver for using the SqlClient DataProvider - - - - - Creates an uninitialized object for - the SqlClientDriver. - - An unitialized object. - - - - Creates an uninitialized object for - the SqlClientDriver. - - An unitialized object. - - - - MsSql requires the use of a Named Prefix in the SQL statement. - - - because MsSql uses "@". - - - - - MsSql requires the use of a Named Prefix in the Parameter. - - - because MsSql uses "@". - - - - - The Named Prefix for parameters. - - - Sql Server uses "@". - - - - - The SqlClient driver does NOT support more than 1 open IDataReader - with only 1 IDbConnection. - - - it is not supported. - - MS SQL Server 2000 (and 7) throws an exception when multiple IDataReaders are - attempted to be opened. When SQL Server 2005 comes out a new driver will be - created for it because SQL Server 2005 is supposed to support it. - - - - - NHibernate driver for the System.Data.SQLite data provider for .NET 2.0. - - -

- In order to use this driver you must have the System.Data.SQLite.dll assembly available - for NHibernate to load. This assembly includes the SQLite.dll or SQLite3.dll libraries. -

-

- You can get the System.Data.SQLite.dll assembly from http://sourceforge.net/projects/sqlite-dotnet2. -

-

- Please check http://www.sqlite.org/ for more information regarding SQLite. -

-
-
- - - Initializes a new instance of . - - - Thrown when the SQLite.NET assembly can not be loaded. - - - - - NHibernate driver for the SQLite.NET data provider. -

- Author: Ioan Bizau -

-
- -

- In order to use this Driver you must have the SQLite.NET.dll Assembly available for NHibernate to load it. - You must also have the SQLite.dll and SQLite3.dll libraries. -

-

- Please check http://www.sqlite.org/ for more information regarding SQLite. -

-
-
- - - Initializes a new instance of . - - - Thrown when the SQLite.NET assembly can not be loaded. - - - - - A NHibernate driver for Microsoft SQL Server CE data provider - - - - - Initializes a new instance of the class. - - - - - MsSql requires the use of a Named Prefix in the SQL statement. - - - because MsSql uses "@". - - - - - MsSql requires the use of a Named Prefix in the Parameter. - - - because MsSql uses "@". - - - - - The Named Prefix for parameters. - - - Sql Server uses "@". - - - - - The SqlClient driver does NOT support more than 1 open IDataReader - with only 1 IDbConnection. - - - it is not supported. - - Ms Sql 2000 (and 7) throws an Exception when multiple DataReaders are - attempted to be Opened. When Yukon comes out a new Driver will be - created for Yukon because it is supposed to support it. - - - - - The SybaseClientDriver Driver provides a database driver for Sybase. - - - It has been reported to work with the . - - - - - Initializes a new instance of the class. - - - Thrown when the Sybase.Data.AseClient assembly can not be loaded. - - - - - Sybase.Data.AseClient uses named parameters in the sql. - - - Sybase uses @ in the sql. - - - - - - - Sybase.Data.AseClient use the @ to locate parameters in sql. - - @ is used to locate parameters in sql. - - - - The SybaseClientDriver Driver provides a database driver for Sybase. - - - It has been reported to work with the . - - - - - Initializes a new instance of the class. - - - Thrown when the Sybase.Data.AseClient assembly can not be loaded. - - - - - Sybase.Data.AseClient uses named parameters in the sql. - - - Sybase uses @ in the sql. - - - - - - - Sybase.Data.AseClient use the @ to locate parameters in sql. - - @ is used to locate parameters in sql. - - - - Represents state associated with the processing of a given - in regards to loading collections. - - - Another implementation option to consider is to not expose ResultSets - directly (in the JDBC redesign) but to always "wrap" them and apply a [series of] context[s] to that wrapper. - - - - - Creates a collection load context for the given result set. - - Callback to other collection load contexts. - The result set this is "wrapping". - - - - Retrieve the collection that is being loaded as part of processing this result set. - - The persister for the collection being requested. - The key of the collection being requested. - The loading collection (see discussion above). - - Basically, there are two valid return values from this method:
    -
  • an instance of {@link PersistentCollection} which indicates to - continue loading the result set row data into that returned collection - instance; this may be either an instance already associated and in the - midst of being loaded, or a newly instantiated instance as a matching - associated collection was not found.
  • -
  • null indicates to ignore the corresponding result set row - data relating to the requested collection; this indicates that either - the collection was found to already be associated with the persistence - context in a fully loaded state, or it was found in a loading state - associated with another result set processing context.
  • -
-
-
- - - Finish the process of collection-loading for this bound result set. Mainly this - involves cleaning up resources and notifying the collections that loading is - complete. - - The persister for which to complete loading. - - - Add the collection to the second-level cache - The entry representing the collection to add - The persister - - - - Maps to specific contextual data - related to processing that . - - - Implementation note: internally an is used to maintain - the mappings; was chosen because I'd rather not be - dependent upon potentially bad and - implementations. - Considering the JDBC-redesign work, would further like this contextual info - not mapped separately, but available based on the result set being processed. - This would also allow maintaining a single mapping as we could reliably get - notification of the result-set closing... - - - - Creates and binds this to the given persistence context. - The persistence context to which this will be bound. - - - - Release internal state associated with the given result set. - - The result set for which it is ok to release associated resources. - - This should be called when we are done with processing said result set, - ideally as the result set is being closed. - - - - Release internal state associated with *all* result sets. - - This is intended as a "failsafe" process to make sure we get everything - cleaned up and released. - - - - - Get the {@link CollectionLoadContext} associated with the given - {@link ResultSet}, creating one if needed. - - The result set for which to retrieve the context. - The processing context. - - - - Attempt to locate the loading collection given the owner's key. The lookup here - occurs against all result-set contexts... - - The collection persister - The owner key - The loading collection, or null if not found. - - - - Register a loading collection xref. - - The xref collection key - The corresponding loading collection entry - - This xref map is used because sometimes a collection is in process of - being loaded from one result set, but needs to be accessed from the - context of another "nested" result set processing. - Implementation note: package protected, as this is meant solely for use - by {@link CollectionLoadContext} to be able to locate collections - being loaded by other {@link CollectionLoadContext}s/{@link ResultSet}s. - - - - - The inverse of {@link #registerLoadingCollectionXRef}. Here, we are done - processing the said collection entry, so we remove it from the - load context. - - The key of the collection we are done processing. - - The idea here is that other loading collections can now reference said - collection directly from the {@link PersistenceContext} because it - has completed its load cycle. - Implementation note: package protected, as this is meant solely for use - by {@link CollectionLoadContext} to be able to locate collections - being loaded by other {@link CollectionLoadContext}s/{@link ResultSet}s. - - - - - Locate the LoadingCollectionEntry within *any* of the tracked - s. - - The collection key. - The located entry; or null. - - Implementation note: package protected, as this is meant solely for use - by to be able to locate collections - being loaded by other s/ResultSets. - - - - - Retrieves the persistence context to which this is bound. - - - - - Do we currently have any internal entries corresponding to loading - collections? - - True if we currently hold state pertaining to loading collections; false otherwise. - - - - Represents a collection currently being loaded. - - - - Describes a return in a native SQL query. - - - - Represents a return defined as part of a native sql query which - names a collection role in the form {classname}.{collectionrole}; it - is used in defining a custom sql query for loading an entity's - collection in non-fetching scenarios (i.e., loading the collection - itself as the "root" of the result). - - - - - Represents the base information for a non-scalar return defined as part of - a native sql query. - - - - Constructs some form of non-scalar return descriptor - The result alias - Any user-supplied column->property mappings - The lock mode to apply to the return. - - - Retrieve the defined result alias - - - Retrieve the lock-mode to apply to this return - - - Retrieve the user-supplied column->property mappings. - - - Construct a native-sql return representing a collection initializer - The result alias - - The entity-name of the entity owning the collection to be initialized. - - - The property name (on the owner) which represents - the collection to be initialized. - - Any user-supplied column->property mappings - The lock mode to apply to the collection. - - - - The class owning the collection. - - - - - The name of the property representing the collection from the . - - - - - Represents a return defined as part of a native sql query which - names a fetched role. - - - - Construct a return descriptor representing some form of fetch. - The result alias - The owner's result alias - The owner's property representing the thing to be fetched - Any user-supplied column->property mappings - The lock mode to apply - - - The alias of the owner of this fetched association. - - - - Retrieve the property name (relative to the owner) which maps to - the association to be fetched. - - - - - Represents a return defined as part of a native sql query which - names a "root" entity. A root entity means it is explicitly a - "column" in the result, as opposed to a fetched relationship or role. - - - - - Construct a return representing an entity returned at the root - of the result. - - The result alias - The entity name. - The lock mode to apply - - - - Construct a return representing an entity returned at the root - of the result. - - The result alias - The entity name. - Any user-supplied column->property mappings - The lock mode to apply - - - The name of the entity to be returned. - - - Describes a scalar return in a native SQL query. - - - - Extends an HQLQueryPlan to maintain a reference to the collection-role name - being filtered. - - - - Defines a query execution plan for an HQL query (or filter). - - - Descriptor regarding a named parameter. - - - - Not supported yet (AST parse needed) - - - - Defines a query execution plan for a native-SQL query. - - - Encapsulates metadata about parameters encountered within a query. - - - - The single available method - is responsible for parsing a query string and recognizing tokens in - relation to parameters (either named, ejb3-style, or ordinal) and - providing callbacks about such recognitions. - - - - - Performs the actual parsing and tokenizing of the query string making appropriate - callbacks to the given recognizer upon recognition of the various tokens. - - - Note that currently, this only knows how to deal with a single output - parameter (for callable statements). If we later add support for - multiple output params, this, obviously, needs to change. - - The string to be parsed/tokenized. - The thing which handles recognition events. - - - - - Implements a parameter parser recognizer specifically for the purpose - of journaling parameter locations. - - - - - Convenience method for creating a param location recognizer and - initiating the parse. - - The query to be parsed for parameter locations. - The generated recognizer, with journaled location info. - - - - The dictionary of named parameter locations. - The dictionary is keyed by parameter name. - - - - - The list of ordinal parameter locations. - - - The list elements are integers, representing the location for that given ordinal. - Thus OrdinalParameterLocationList[n] represents the location for the nth parameter. - - - - Defines metadata regarding a translated HQL or native-SQL query. - - - Get the source HQL or native-SQL query. - - - Return source query select clause aliases (if any) - - - An array of types describing the returns of the source query. - - - The set of query spaces affected by this source query. - - - Acts as a cache for compiled query plans, as well as query-parameter metadata. - - - - Represents work that needs to be performed in a manner - which isolates it from any current application unit of - work transaction. - - - - - Perform the actual work to be done. - - The ADP connection to use. - The active transaction of the connection. - - - - Class which provides the isolation semantics required by - an . - - - - - Processing comes in two flavors: - - - - makes sure the work to be done is performed in a seperate, distinct transaction - - - - makes sure the work to be done is performed outside the scope of any transaction - - - - - - - Ensures that all processing actually performed by the given work will - occur on a seperate transaction. - - The work to be performed. - The session from which this request is originating. - - - - Ensures that all processing actually performed by the given work will - occur outside of a transaction. - - The work to be performed. - The session from which this request is originating. - - - - Responsible for maintaining the queue of actions related to events. - - The ActionQueue holds the DML operations queued as part of a session's - transactional-write-behind semantics. DML operations are queued here - until a flush forces them to be executed against the database. - - - - - - Perform all currently queued entity-insertion actions. - - - - - Perform all currently queued actions. - - - - - Prepares the internal action queues for execution. - - - - - Performs cleanup of any held cache softlocks. - - Was the transaction successful. - - - - Check whether the given tables/query-spaces are to be executed against - given the currently queued actions. - - The table/query-spaces to check. - True if we contain pending actions against any of the given tables; false otherwise. - - - - Check whether any insertion or deletion actions are currently queued. - - True if insertions or deletions are currently queued; false otherwise. - - - - Identifies a named association belonging to a particular - entity instance. Used to record the fact that an association - is null during loading. - - - - - Defines a sequence of elements that are currently - eligible for batch fetching. - - - Even though this is a map, we only use the keys. A map was chosen in - order to utilize a to maintain sequencing - as well as uniqueness. - - - - - A map of subselect-fetch descriptors - keyed by the against which the descriptor is - registered. - - - - - The owning persistence context. - - - - - Constructs a queue for the given context. - - The owning persistence context. - - - - Clears all entries from this fetch queue. - - - - - Retrieve the fetch descriptor associated with the given entity key. - - The entity key for which to locate any defined subselect fetch. - The fetch descriptor; may return null if no subselect fetch queued for - this entity key. - - - - Adds a subselect fetch decriptor for the given entity key. - - The entity for which to register the subselect fetch. - The fetch descriptor. - - - - After evicting or deleting an entity, we don't need to - know the query that was used to load it anymore (don't - call this after loading the entity, since we might still - need to load its collections) - - - - - Clears all pending subselect fetches from the queue. - - - Called after flushing. - - - - - If an EntityKey represents a batch loadable entity, add - it to the queue. - - - Note that the contract here is such that any key passed in should - previously have been been checked for existence within the - ; failure to do so may cause the - referenced entity to be included in a batch even though it is - already associated with the . - - - - - After evicting or deleting or loading an entity, we don't - need to batch fetch it anymore, remove it from the queue - if necessary - - - - - Get a batch of uninitialized collection keys for a given role - - The persister for the collection role. - A key that must be included in the batch fetch - the maximum number of keys to return - The entity mode. - an array of collection keys, of length batchSize (padded with nulls) - - - - Get a batch of unloaded identifiers for this class, using a slightly - complex algorithm that tries to grab keys registered immediately after - the given key. - - The persister for the entities being loaded. - The identifier of the entity currently demanding load. - The maximum number of keys to return - The entity mode. - an array of identifiers, of length batchSize (possibly padded with nulls) - - - - The types of children to cascade to - - - - - A cascade point that occurs just after the insertion of the parent - entity and just before deletion - - - - - A cascade point that occurs just before the insertion of the parent entity - and just after deletion - - - - - A cascade point that occurs just after the insertion of the parent entity - and just before deletion, inside a collection - - - - - A cascade point that occurs just after the update of the parent entity - - - - A cascade point that occurs just before the session is flushed - - - - A cascade point that occurs just after eviction of the parent entity from the - session cache - - - - - A cascade point that occurs just after locking a transient parent entity into the - session cache - - - - - A cascade point that occurs just after locking a transient parent entity into the session cache - - - - - A cascade point that occurs just before merging from a transient parent entity into - the object in the session cache - - - - - Delegate responsible, in conjunction with the various - , for implementing cascade processing. - - - - Cascade an action from the parent entity instance to all its children. - The parent's entity persister - The parent reference. - - - - Cascade an action from the parent entity instance to all its children. This - form is typicaly called from within cascade actions. - - The parent's entity persister - The parent reference. - - Typically some form of cascade-local cache - which is specific to each CascadingAction type - - - - Cascade an action to the child or children - - - Cascade an action to a collection - - - Cascade an action to a to-one association or any type - - - Cascade to the collection elements - - - Delete any entities that were removed from the collection - - - A contract for defining the aspects of cascading various persistence actions. - - - - package-protected constructor - - - For this style, should the given action be cascaded? - The action to be checked for cascade-ability. - True if the action should be cascaded under this style; false otherwise. - - - - Probably more aptly named something like doCascadeToCollectionElements(); - it is however used from both the collection and to-one logic branches... - - The action to be checked for cascade-ability. - True if the action should be really cascaded under this style; false otherwise. - - For this style, should the given action really be cascaded? The default - implementation is simply to return {@link #doCascade}; for certain - styles (currently only delete-orphan), however, we need to be able to - control this separately. - - - - Factory method for obtaining named cascade styles - The named cascade style name. - The appropriate CascadeStyle - - - save / delete / update / evict / lock / replicate / merge / persist + delete orphans - - - save / delete / update / evict / lock / replicate / merge / persist - - - save / update - - - lock - - - refresh - - - evict - - - replicate - - - merge - - - create - - - delete - - - delete + delete orphans - - - no cascades - - - Do we need to delete orphaned collection elements? - True if this style need to account for orphan delete operations; false otherwise. - - - - A session action that may be cascaded from parent entity to its children - - - - Cascade the action to the child object. - The session within which the cascade is occurring. - The child to which cascading should be performed. - The child's entity name - Typically some form of cascade-local cache which is specific to each CascadingAction type - Are cascading deletes enabled. - - - - Given a collection, get an iterator of the children upon which the - current cascading action should be visited. - - The session within which the cascade is occurring. - The mapping type of the collection. - The collection instance. - The children iterator. - - - - Called (in the case of returning true) to validate - that no cascade on the given property is considered a valid semantic. - - The session within which the cascade is occurring. - The property value - The property value owner - The entity persister for the owner - The index of the property within the owner. - - - - Given a collection, get an iterator of all its children, loading them - from the database if necessary. - - The session within which the cascade is occurring. - The mapping type of the collection. - The collection instance. - The children iterator. - - - - Iterate just the elements of the collection that are already there. Don't load - any new elements from the database. - - - - - - - - - - - - - - - - - - - - - - - - - - - - Execute persist during flush time - - - - - - - Does this action potentially extrapolate to orphan deletes? - True if this action can lead to deletions of orphans. - - - Does the specified cascading action require verification of no cascade validity? - True if this action requires no-cascade verification; false otherwise. - - - Should this action be performed (or noCascade consulted) in the case of lazy properties. - - - - We need an entry to tell us all about the current state - of a collection with respect to its persistent state - - - - session-start/post-flush persistent state - - - allow the snapshot to be serialized - - - - The when the Collection was loaded. - - - This can be if the Collection was not loaded by NHibernate and - was passed in along with a transient object. - - - - - The identifier of the Entity that is the owner of this Collection - during the load or post flush. - - - - - Indicates that the Collection can still be reached by an Entity - that exist in the . - - - It is also used to ensure that the Collection is not shared between - two Entities. - - - - - Indicates that the Collection has been processed and is ready - to have its state synchronized with the database. - - - - - Indicates that a Collection needs to be updated. - - - A Collection needs to be updated whenever the contents of the Collection - have been changed. - - - - - Indicates that a Collection has old elements that need to be removed. - - - A Collection needs to have removals performed whenever its role changes or - the key changes and it has a loadedPersister - ie - it was loaded by NHibernate. - - - - - Indicates that a Collection needs to be recreated. - - - A Collection needs to be recreated whenever its role changes - or the owner changes. - - - - - If we instantiate a collection during the - process, we must ignore it for the rest of the flush. - - - - - The that is currently responsible - for the Collection. - - - This is set when NHibernate is updating a reachable or an - unreachable collection. - - - - - Initializes a new instance of . - - - For newly wrapped collections, or dereferenced collection wrappers - - - - For collections just loaded from the database - - - - Initializes a new instance of for initialized detached collections. - - - For initialized detached collections - - - - - Determine if the collection is "really" dirty, by checking dirtiness - of the collection elements, if necessary - - - - - Prepares this CollectionEntry for the Flush process. - - The that this CollectionEntry will be responsible for flushing. - - - - Updates the CollectionEntry to reflect that the - has been initialized. - - The initialized that this Entry is for. - - - - Updates the CollectionEntry to reflect that it is has been successfully flushed to the database. - - The that was flushed. - - Called after a successful flush. - - - - - Sets the information in this CollectionEntry that is specific to the - . - - - The that is - responsible for the Collection. - - - - - - - - - - - - - - Uniquely identifies a collection instance in a particular session. - - - - - Record the fact that this collection was dereferenced - - The collection to be updated by unreachability. - The session. - - - - Initialize the role of the collection. - - The collection to be updated by reachibility. - The type of the collection. - The owner of the collection. - The session. - - - - We need an entry to tell us all about the current state - of an object with respect to its persistent state - - - - - Initializes a new instance of EntityEntry. - - The current of the Entity. - The snapshot of the Entity's state when it was loaded. - - The identifier of the Entity in the database. - The version of the Entity. - The for the Entity. - A boolean indicating if the Entity exists in the database. - The that is responsible for this Entity. - - - - - - - After actually inserting a row, record the fact that the instance exists on the - database (needed for identity-column key generation) - - - - - After actually updating the database, update the snapshot information, - and escalate the lock mode. - - - - - After actually deleting a row, record the fact that the instance no longer - exists in the database - - - - - Gets or sets the current of the Entity. - - The of the Entity. - - - - Gets or sets the of this Entity with respect to its - persistence in the database. - - The of this Entity. - - - - Gets or sets the identifier of the Entity in the database. - - The identifier of the Entity in the database if one has been assigned. - This might be when the is - and the database generates the id. - - - - Gets or sets the snapshot of the Entity when it was loaded from the database. - - The snapshot of the Entity. - - There will only be a value when the Entity was loaded in the current Session. - - - - - Gets or sets the snapshot of the Entity when it was marked as being ready for deletion. - - The snapshot of the Entity. - This will be if the Entity is not being deleted. - - - - Gets or sets a indicating if this Entity exists in the database. - - if it is already in the database. - - It can also be if it does not exists in the database yet and the - is . - - - - - Gets or sets the version of the Entity. - - The version of the Entity. - - - - Gets or sets the that is responsible for this Entity. - - The that is responsible for this Entity. - - - - Gets the Fully Qualified Name of the class this Entity is an instance of. - - The Fully Qualified Name of the class this Entity is an instance of. - - - - A globally unique identifier of an instance, consisting of the user-visible identifier - and the identifier space (eg. tablename) - - - - Construct a unique identifier for an entity class instance - - - Used to reconstruct an EntityKey during deserialization. - The identifier value - The root entity name - The specific entity name - The type of the identifier value - Whether represented entity is eligible for batch loading - The session factory - The entity's entity mode - - - - To use in deserialization callback - - - - - - Used to uniquely key an entity instance in relation to a particular session - by some unique property reference, as opposed to identifier. - Uniqueing information consists of the entity-name, the referenced - property name, and the referenced property value. - - - - - - A FilterDefinition defines the global attributes of a dynamic filter. This - information includes its name as well as its defined parameters (name and type). - - - - - Set the named parameter's value list for this filter. - - The name of the filter for which this configuration is in effect. - The default filter condition. - A dictionary storing the NHibernate type - of each parameter under its name. - if set to true used in many to one rel - - - - Retreive the type of the named parameter defined for this filter. - - The name of the filter parameter for which to return the type. - The type of the named parameter. - - - - Gets a value indicating whether to use this filter-def in manytoone refs. - - true if [use in many to one]; otherwise, false. - - - - Get the name of the filter this configuration defines. - - The filter name for this configuration. - - - - Get a set of the parameters defined by this configuration. - - The parameters named by this configuration. - - - Algorithms related to foreign key constraint transparency - - - - Is this instance persistent or detached? - - - If is non-null, don't hit the database to make the - determination, instead assume that value; the client code must be - prepared to "recover" in the case that this assumed result is incorrect. - - - - - Is this instance, which we know is not persistent, actually transient? - If assumed is non-null, don't hit the database to make the - determination, instead assume that value; the client code must be - prepared to "recover" in the case that this assumed result is incorrect. - - - If is non-null, don't hit the database to make the - determination, instead assume that value; the client code must be - prepared to "recover" in the case that this assumed result is incorrect. - - - - - Return the identifier of the persistent or transient object, or throw - an exception if the instance is "unsaved" - - - Used by OneToOneType and ManyToOneType to determine what id value should - be used for an object that may or may not be associated with the session. - This does a "best guess" using any/all info available to use (not just the - EntityEntry). - - - - - Nullify all references to entities that have not yet - been inserted in the database, where the foreign key - points toward that entity - - - - - Return null if the argument is an "unsaved" entity (ie. - one with no existing database row), or the input argument - otherwise. This is how Hibernate avoids foreign key constraint - violations. - - - - - Determine if the object already exists in the database, using a "best guess" - - - - - A strategy for determining if an identifier value is an identifier of a new - transient instance or a previously persistent transient instance. The strategy - is determined by the Unsaved-Value attribute in the mapping file. - - - - - - - - Assume the transient instance is newly instantiated if its identifier is null or - equal to Value - - - - - - Does the given identifier belong to a new instance - - - - - Always assume the transient instance is newly instantiated - - - - - Never assume that transient instance is newly instantiated - - - - - Assume the transient instance is newly instantiated if the identifier - is null. - - - - Assume nothing. - - - - Holds the state of the persistence context, including the - first-level cache, entries, snapshots, proxies, etc. - - - - Add a collection which has no owner loaded - - - - Get and remove a collection whose owner is not yet loaded, - when its owner is being loaded - - - - Clear the state of the persistence context - - - Set the status of an entry - - - Called after transactions end - - - - Get the current state of the entity as known to the underlying - database, or null if there is no corresponding row - - - - - Retrieve the cached database snapshot for the requested entity key. - - The entity key for which to retrieve the cached snapshot - The cached snapshot - - - This differs from is two important respects: - no snapshot is obtained from the database if not already cached - an entry of NO_ROW here is interpreted as an exception - - - - - - Get the values of the natural id fields as known to the underlying - database, or null if the entity has no natural id or there is no - corresponding row. - - - - Add a canonical mapping from entity key to entity instance - - - - Get the entity instance associated with the given EntityKey - - - - Is there an entity with the given key in the persistence context - - - - Remove an entity from the session cache, also clear - up other state associated with the entity, all except - for the EntityEntry - - - - Get an entity cached by unique key - - - Add an entity to the cache by unique key - - - - Retrieve the EntityEntry representation of the given entity. - - The entity for which to locate the EntityEntry. - The EntityEntry for the given entity. - - - Remove an entity entry from the session cache - - - Is there an EntityEntry for this instance? - - - Get the collection entry for a persistent collection - - - Adds an entity to the internal caches. - - - - Generates an appropriate EntityEntry instance and adds it - to the event source's internal caches. - - - - Is the given collection associated with this persistence context? - - - Is the given proxy associated with this persistence context? - - - - Takes the given object and, if it represents a proxy, reassociates it with this event source. - - The possible proxy to be reassociated. - Whether the passed value represented an actual proxy which got initialized. - - - - If a deleted entity instance is re-saved, and it has a proxy, we need to - reset the identifier of the proxy - - - - - Get the entity instance underlying the given proxy, throwing - an exception if the proxy is uninitialized. If the given object - is not a proxy, simply return the argument. - - - - - Possibly unproxy the given reference and reassociate it with the current session. - - The reference to be unproxied if it currently represents a proxy. - The unproxied instance. - - - - Attempts to check whether the given key represents an entity already loaded within the - current session. - - The entity reference against which to perform the uniqueness check. - The entity key. - - - - If the existing proxy is insufficiently "narrow" (derived), instantiate a new proxy - and overwrite the registration of the old one. This breaks == and occurs only for - "class" proxies rather than "interface" proxies. Also init the proxy to point to - the given target implementation if necessary. - - The proxy instance to be narrowed. - The persister for the proxied entity. - The internal cache key for the proxied entity. - (optional) the actual proxied entity instance. - An appropriately narrowed instance. - - - - Return the existing proxy associated with the given EntityKey, or the - third argument (the entity associated with the key) if no proxy exists. Init - the proxy to the target implementation, if necessary. - - - - - Return the existing proxy associated with the given EntityKey, or the - argument (the entity associated with the key) if no proxy exists. - (slower than the form above) - - - - Get the entity that owns this persistent collection - - - Get the entity that owned this persistent collection when it was loaded - The persistent collection - - The owner if its entity ID is available from the collection's loaded key - and the owner entity is in the persistence context; otherwise, returns null - - - - Get the ID for the entity that owned this persistent collection when it was loaded - The persistent collection - the owner ID if available from the collection's loaded key; otherwise, returns null - - - add a collection we just loaded up (still needs initializing) - - - add a detached uninitialized collection - - - - Add a new collection (ie. a newly created one, just instantiated by the - application, with no database state or snapshot) - - The collection to be associated with the persistence context - - - - - add an (initialized) collection that was created by another session and passed - into update() (ie. one with a snapshot and existing state on the database) - - - - add a collection we just pulled out of the cache (does not need initializing) - - - Get the collection instance associated with the CollectionKey - - - - Register a collection for non-lazy loading at the end of the two-phase load - - - - - Force initialization of all non-lazy collections encountered during - the current two-phase load (actually, this is a no-op, unless this - is the "outermost" load) - - - - Get the PersistentCollection object for an array - - - Register a PersistentCollection object for an array. - Associates a holder with an array - MUST be called after loading - array, since the array instance is not created until endLoad(). - - - - - Remove the mapping of collection to holder during eviction of the owning entity - - - - Get the snapshot of the pre-flush collection state - - - - Get the collection entry for a collection passed to filter, - which might be a collection wrapper, an array, or an unwrapped - collection. Return null if there is no entry. - - - - Get an existing proxy by key - - - Add a proxy to the session cache - - - Remove a proxy from the session cache - - - Called before cascading - - - Called after cascading - - - Call this before beginning a two-phase load - - - Call this after finishing a two-phase load - - - - Search the persistence context for an owner for the child object, - given a collection role - - - - - Search the persistence context for an index of the child object, given a collection role - - - - - Record the fact that the association belonging to the keyed entity is null. - - - - Is the association property belonging to the keyed entity null? - - - Set the object to read only and discard it's snapshot - - - - Get the session to which this persistence context is bound. - - - - - Retrieve this persistence context's managed load context. - - - - - Get the BatchFetchQueue, instantiating one if necessary. - - - - Retrieve the set of EntityKeys representing nullifiable references - - - Get the mapping from key value to entity instance - - - Get the mapping from entity instance to entity entry - - - Get the mapping from collection instance to collection entry - - - Get the mapping from collection key to collection instance - - - How deep are we cascaded? - - - Is a flush cycle currently in process? - Called before and after the flushcycle - - - False if we know for certain that all the entities are read-only - - - - Defines the internal contract between the ISessionFactory and other parts of NHibernate - such as implementors of IType. - - - - - Creates ISessions. - - - - Usually an application has a single SessionFactory. Threads servicing client requests - obtain ISessions from the factory. Implementors must be threadsafe. - - - ISessionFactorys are immutable. The behaviour of a SessionFactory - is controlled by properties supplied at configuration time. - These properties are defined on Environment - - - - - - Open a ISession on the given connection - - A connection provided by the application - A session - - Note that the second-level cache will be disabled if you - supply a ADO.NET connection. NHibernate will not be able to track - any statements you might have executed in the same transaction. - Consider implementing your own . - - - - - Create database connection and open a ISession on it, specifying an interceptor - - A session-scoped interceptor - A session - - - - Open a ISession on the given connection, specifying an interceptor - - A connection provided by the application - A session-scoped interceptor - A session - - Note that the second-level cache will be disabled if you - supply a ADO.NET connection. NHibernate will not be able to track - any statements you might have executed in the same transaction. - Consider implementing your own . - - - - - Create a database connection and open a ISession on it - - - - - - Get the associated with the given entity class - - the given entity type. - The class metadata or if not found. - - - - Get the associated with the given entity name - the given entity name. - The class metadata or if not found. - - - - - Get the CollectionMetadata associated with the named collection role - - - - - - - Get all as a from entityname - to metadata object - - A dictionary from an entity name to - - - - Get all CollectionMetadata as a IDictionary from role name - to metadata object - - - - - - Destroy this SessionFactory and release all resources - connection pools, etc). It is the responsibility of the application - to ensure that there are no open Sessions before calling - close(). - - - - - Evict all entries from the process-level cache. This method occurs outside - of any transaction; it performs an immediate "hard" remove, so does not respect - any transaction isolation semantics of the usage strategy. Use with care. - - - - - - Evict an entry from the process-level cache. This method occurs outside - of any transaction; it performs an immediate "hard" remove, so does not respect - any transaction isolation semantics of the usage strategy. Use with care. - - - - - - - Evict all entries from the second-level cache. This method occurs outside - of any transaction; it performs an immediate "hard" remove, so does not respect - any transaction isolation semantics of the usage strategy. Use with care. - - - - - Evict an entry from the second-level cache. This method occurs outside - of any transaction; it performs an immediate "hard" remove, so does not respect - any transaction isolation semantics of the usage strategy. Use with care. - - - - - Evict all entries from the process-level cache. This method occurs outside - of any transaction; it performs an immediate "hard" remove, so does not respect - any transaction isolation semantics of the usage strategy. Use with care. - - - - - - Evict an entry from the process-level cache. This method occurs outside - of any transaction; it performs an immediate "hard" remove, so does not respect - any transaction isolation semantics of the usage strategy. Use with care. - - - - - - - Evict any query result sets cached in the default query cache region. - - - - - Evict any query result sets cached in the named query cache region. - - - - - Get a new stateless session. - - - Get a new stateless session for the given ADO.NET connection. - - - - Obtain the definition of a filter by name. - - The name of the filter for which to obtain the definition. - The filter definition. - - - - Obtains the current session. - - - - The definition of what exactly "current" means is controlled by the - implementation configured for use. - - - The current session. - Indicates an issue locating a suitable current session. - - - Get the statistics for this session factory - - - Was this already closed? - - - - Obtain a set of the names of all filters defined on this SessionFactory. - - The set of filter names. - - - - Get the persister for the named entity - - The name of the entity that is persisted. - The for the entity. - If no can be found. - - - - Get the persister object for a collection role - - - - - - - Get the return types of a query - - - - - - Get the return aliases of a query - - - - Get the names of all persistent classes that implement/extend the given interface/class - - - - - - - Get a class name, using query language imports - - - - - - - Get a particular named query cache, or the default cache - - the name of the cache region, or null for the default - query cache - the existing cache, or a newly created cache if none by that - region name - - - - Gets the hql query identified by the name. - - The name of that identifies the query. - - A hql query or if the named - query does not exist. - - - - - Get the identifier generator for the hierarchy - - - - Get a named second-level cache region - - - - Open a session conforming to the given parameters. Used mainly - for current session processing. - - The external ado.net connection to use, if one (i.e., optional). - - Should the session be auto-flushed - prior to transaction completion? - - - Should the session be auto-closed after - transaction completion? - - The release mode for managed jdbc connections. - An appropriate session. - - - - Retrieves a set of all the collection roles in which the given entity - is a participant, as either an index or an element. - - The entity name for which to get the collection roles. - - Set of all the collection roles in which the given entityName participates. - - - - - Get the persister for the named entity - - The name of the entity that is persisted. - - The for the entity or is the name was not found. - - - - - Get the entity-name for a given mapped class. - - the mapped class - the enntity name where available or null - - - - Get the SQL . - - - - - Get the used. - - - - The cache of table update timestamps - - - Statistics SPI - - - Retrieves the SQLExceptionConverter in effect for this SessionFactory. - The SQLExceptionConverter for this SessionFactory. - - - - Get the default query cache - - - - - Gets the ICurrentSessionContext instance attached to this session factory. - - - - - Defines the internal contract between the Session and other parts of Hibernate - such as implementors of Type or ClassPersister - - - - - Initialize the session after its construction was complete - - - - - Initialize the collection (if not already initialized) - - - - - - - Load an instance without checking if it was deleted. If it does not exist and isn't nullable, throw an exception. - This method may create a new proxy or return an existing proxy. - - The entityName (or class full name) to load. - The identifier of the object in the database. - Allow null instance - When enabled, the object is eagerly fetched. - - A proxy of the object or an instance of the object if the persistentClass does not have a proxy. - - No object could be found with that id. - - - - Load an instance immediately. Do not return a proxy. - - - - - - - - Execute a List() query - - - - - - - - Strongly-typed version of - - - - - Strongly-typed version of - - - - - Execute an Iterate() query - - - - - - - - Strongly-typed version of - - - - - Execute a filter - - - - - Execute a filter (strongly-typed version). - - - - - Collection from a filter - - - - - Strongly-typed version of - - - - Get the for any instance - optional entity name - the entity instance - - - - Notify the session that an NHibernate transaction has begun. - - - - - Notify the session that the transaction is about to complete - - - - - Notify the session that the transaction completed, so we no longer own the old locks. - (Also we should release cache softlocks). May be called multiple times during the transaction - completion process. - - - - - Return the identifier of the persistent object, or null if transient - - - - - Instantiate the entity class, initializing with the given identifier - - - - - Execute an SQL Query - - - - - Strongly-typed version of - - - - Execute an SQL Query - - - - Retrieve the currently set value for a filter parameter. - - The filter parameter name in the format - {FILTER_NAME.PARAMETER_NAME}. - The filter parameter value. - - - - Retrieve the type for a given filter parameter. - - The filter parameter name in the format - {FILTER_NAME.PARAMETER_NAME}. - The filter parameter type. - - - - Get the entity instance associated with the given Key, - calling the Interceptor if necessary - - - - The best guess entity name for an entity not in an association - - - The guessed entity name for an entity not in an association - - - Execute a native SQL update or delete query - - - Execute a HQL update or delete query - - - - System time before the start of the transaction - - - - - - Get the creating SessionFactoryImplementor - - - - - - Get the prepared statement Batcher for this session - - - - - Return the currently enabled filters. The filter map is keyed by filter - name, with values corresponding to the - instance. - - The currently enabled filters. - - - Retrieves the configured event listeners from this event source. - - - Get the persistence context for this session - - - - Is the ISession still open? - - - - - Is the ISession currently connected? - - - - Determine whether the session is closed. Provided separately from - {@link #isOpen()} as this method does not attempt any JTA synch - registration, where as {@link #isOpen()} does; which makes this one - nicer to use for most internal purposes. - - True if the session is closed; false otherwise. - - - - - Does this Session have an active Hibernate transaction - or is there a JTA transaction in progress? - - - - Retrieve the entity mode in effect for this session. - - - - Get the columns of the associated table which are to - be used in the join - - - - - Get the aliased columns of the owning entity which are to - be used in the join - - - - - Get the columns of the owning entity which are to - be used in the join - - - - - Implements the algorithm for validating property values - for illegal null values - - - - - Check nullability of the class persister properties - - entity properties - class persister - wether it is intended to be updated or saved - - - - Check sub elements-nullability. Returns property path that break - nullability or null if none - - type to check - value to check - property path - - - - Check component nullability. Returns property path that break - nullability or null if none - - component properties - component not-nullable type - property path - - - - Return a well formed property path. - Basicaly, it will return parent.child - - parent in path - child in path - parent-child path - - - - Container for data that is used during the NHibernate query/load process. - - - - - - - - Ensure the Types and Values are the same length. - - - If the Lengths of and - are not equal. - - - - - - - - Named parameters. - - - - - Gets or sets an array of objects that is stored at the index - of the Parameter. - - - - - Gets or sets an array of objects that is stored at the index - of the Parameter. - - - - - Gets or sets the for the Query. - - - - - Gets or sets an that contains the alias name of the - object from hql as the key and the as the value. - - An of lock modes. - - - - Information to determine how to run an IDbCommand and what - records to return from the IDataReader. - - - - - Indicates that the no value has been set on the Property. - - - - - Gets or Sets the Index of the First Row to Select - - The Index of the First Rows to Select - Defaults to 0 unless specifically set. - - - - Gets or Sets the Maximum Number of Rows to Select - - The Maximum Number of Rows to Select - Defaults to NoValue unless specifically set. - - - - Gets or Sets the Timeout of the Query - - The Query Timeout - Defaults to NoValue unless specifically set. - - - - A represents the state of persistent "stuff" which - NHibernate is tracking. This includes persistent entities, collections, - as well as proxies generated. - - - There is meant to be a one-to-one correspondence between a SessionImpl and - a PersistentContext. The SessionImpl uses the PersistentContext to track - the current state of its context. Event-listeners then use the - PersistentContext to drive their processing. - - - - Constructs a PersistentContext, bound to the given session. - The session "owning" this context. - - - Add a collection which has no owner loaded - - - - Get and remove a collection whose owner is not yet loaded, - when its owner is being loaded - - - - Clear the state of the persistence context - - - Set the status of an entry - - - Called after transactions end - - - - Get the current state of the entity as known to the underlying - database, or null if there is no corresponding row - - - - - Retrieve the cached database snapshot for the requested entity key. - - The entity key for which to retrieve the cached snapshot - The cached snapshot - - - This differs from is two important respects: - no snapshot is obtained from the database if not already cached - an entry of NO_ROW here is interpreted as an exception - - - - - - Get the values of the natural id fields as known to the underlying - database, or null if the entity has no natural id or there is no - corresponding row. - - - - Add a canonical mapping from entity key to entity instance - - - - Get the entity instance associated with the given EntityKey - - - - Is there an entity with the given key in the persistence context - - - - Remove an entity from the session cache, also clear - up other state associated with the entity, all except - for the EntityEntry - - - - Get an entity cached by unique key - - - Add an entity to the cache by unique key - - - - Retrieve the EntityEntry representation of the given entity. - - The entity for which to locate the EntityEntry. - The EntityEntry for the given entity. - - - Remove an entity entry from the session cache - - - Is there an EntityEntry for this instance? - - - Get the collection entry for a persistent collection - - - Adds an entity to the internal caches. - - - - Generates an appropriate EntityEntry instance and adds it - to the event source's internal caches. - - - - Is the given collection associated with this persistence context? - - - Is the given proxy associated with this persistence context? - - - - Takes the given object and, if it represents a proxy, reassociates it with this event source. - - The possible proxy to be reassociated. - Whether the passed value represented an actual proxy which got initialized. - - - - If a deleted entity instance is re-saved, and it has a proxy, we need to - reset the identifier of the proxy - - - - - Associate a proxy that was instantiated by another session with this session - - The proxy initializer. - The proxy to reassociate. - - - - Get the entity instance underlying the given proxy, throwing - an exception if the proxy is uninitialized. If the given object - is not a proxy, simply return the argument. - - - - - Possibly unproxy the given reference and reassociate it with the current session. - - The reference to be unproxied if it currently represents a proxy. - The unproxied instance. - - - - Attempts to check whether the given key represents an entity already loaded within the - current session. - - The entity reference against which to perform the uniqueness check. - The entity key. - - - - If the existing proxy is insufficiently "narrow" (derived), instantiate a new proxy - and overwrite the registration of the old one. This breaks == and occurs only for - "class" proxies rather than "interface" proxies. Also init the proxy to point to - the given target implementation if necessary. - - The proxy instance to be narrowed. - The persister for the proxied entity. - The internal cache key for the proxied entity. - (optional) the actual proxied entity instance. - An appropriately narrowed instance. - - - - Return the existing proxy associated with the given EntityKey, or the - third argument (the entity associated with the key) if no proxy exists. Init - the proxy to the target implementation, if necessary. - - - - - Return the existing proxy associated with the given EntityKey, or the - argument (the entity associated with the key) if no proxy exists. - (slower than the form above) - - - - Get the entity that owns this persistent collection - - - Get the entity that owned this persistent collection when it was loaded - The persistent collection - - The owner, if its entity ID is available from the collection's loaded key - and the owner entity is in the persistence context; otherwise, returns null - - - - Get the ID for the entity that owned this persistent collection when it was loaded - The persistent collection - the owner ID if available from the collection's loaded key; otherwise, returns null - - - Get the ID for the entity that owned this persistent collection when it was loaded - The collection entry - the owner ID if available from the collection's loaded key; otherwise, returns null - - - add a collection we just loaded up (still needs initializing) - - - add a detached uninitialized collection - - - - Add a new collection (ie. a newly created one, just instantiated by the - application, with no database state or snapshot) - - The collection to be associated with the persistence context - - - - Add an collection to the cache, with a given collection entry. - The collection for which we are adding an entry. - The entry representing the collection. - The key of the collection's entry. - - - Add a collection to the cache, creating a new collection entry for it - The collection for which we are adding an entry. - The collection persister - - - - add an (initialized) collection that was created by another session and passed - into update() (ie. one with a snapshot and existing state on the database) - - - - add a collection we just pulled out of the cache (does not need initializing) - - - Get the collection instance associated with the CollectionKey - - - - Register a collection for non-lazy loading at the end of the two-phase load - - - - - Force initialization of all non-lazy collections encountered during - the current two-phase load (actually, this is a no-op, unless this - is the "outermost" load) - - - - Get the PersistentCollection object for an array - - - Register a PersistentCollection object for an array. - Associates a holder with an array - MUST be called after loading - array, since the array instance is not created until endLoad(). - - - - - Remove the mapping of collection to holder during eviction of the owning entity - - - - Get the snapshot of the pre-flush collection state - - - - Get the collection entry for a collection passed to filter, - which might be a collection wrapper, an array, or an unwrapped - collection. Return null if there is no entry. - - - - Get an existing proxy by key - - - Add a proxy to the session cache - - - Remove a proxy from the session cache - - - Called before cascading - - - Called after cascading - - - Call this before begining a two-phase load - - - Call this after finishing a two-phase load - - - - Search the persistence context for an owner for the child object, - given a collection role - - - - - Search the persistence context for an index of the child object, given a collection role - - - - - Record the fact that the association belonging to the keyed entity is null. - - - - Is the association property belonging to the keyed entity null? - - - Set the object to read only and discard it's snapshot - - - - Get the session to which this persistence context is bound. - - - - - Retrieve this persistence context's managed load context. - - - - - Get the BatchFetchQueue, instantiating one if necessary. - - - - Retrieve the set of EntityKeys representing nullifiable references - - - Get the mapping from key value to entity instance - - - Get the mapping from entity instance to entity entry - - - Get the mapping from collection instance to collection entry - - - Get the mapping from collection key to collection instance - - - How deep are we cascaded? - - - Is a flush cycle currently in process? - Called before and after the flushcycle - - - False if we know for certain that all the entities are read-only - - - - Represents the status of an entity with respect to - this session. These statuses are for internal - book-keeping only and are not intended to represent - any notion that is visible to the application. - - - - - The Entity is snapshotted in the Session with the same state as the database - (called Managed in H3). - - - - - The Entity is in the Session and has been marked for deletion but not - deleted from the database yet. - - - - - The Entity has been deleted from database. - - - - - The Entity is in the process of being loaded. - - - - - The Entity is in the process of being saved. - - - - - The entity is read-only. - - - - - Allows work to be done outside the current transaction, by suspending it, - and performing work in a new transaction - - - - The work to be done - - - Suspend the current transaction and perform work in a new transaction - - - - Functionality relating to Hibernate's two-phase loading process, - that may be reused by persisters that do not use the Loader - framework - - - - - Register the "hydrated" state of an entity instance, after the first step of 2-phase loading. - - Add the "hydrated state" (an array) of an uninitialized entity to the session. We don't try - to resolve any associations yet, because there might be other entities waiting to be - read from the JDBC result set we are currently processing - - - - - Perform the second step of 2-phase load. Fully initialize the entity instance. - After processing a JDBC result set, we "resolve" all the associations - between the entities which were instantiated and had their state - "hydrated" into an array - - - - - Add an uninitialized instance of an entity class, as a placeholder to ensure object - identity. Must be called before postHydrate(). - Create a "temporary" entry for a newly instantiated entity. The entity is uninitialized, - but we need the mapping from id to instance in order to guarantee uniqueness. - - - - An ordered pair of a value and its Hibernate type. - - - - Return an IdentifierValue for the specified unsaved-value. If none is specified, - guess the unsaved value by instantiating a test instance of the class and - reading it's id property, or if that is not possible, using the java default - value for the type - - - - - An enum of the different ways a value might be "included". - - - This is really an expanded true/false notion with Partial being the - expansion. Partial deals with components in the cases where - parts of the referenced component might define inclusion, but the - component overall does not. - - - - - Utility methods for managing versions and timestamps - - - - - Increment the given version number - - The value of the current version. - The of the versioned property. - The current . - Returns the next value for the version. - - - - Create an initial version number - - The of the versioned property. - The current . - A seed value to initialize the versioned property with. - - - - Seed the given instance state snapshot with an initial version number - - An array of objects that contains a snapshot of a persistent object. - The index of the version property in the fields parameter. - The of the versioned property. - Force the version to initialize - The current session, if any. - if the version property needs to be seeded with an initial value. - - - - Set the version number of the given instance state snapshot - - An array of objects that contains a snapshot of a persistent object. - The value the version should be set to in the fields parameter. - The that is responsible for persisting the values of the fields parameter. - - - - Get the version number of the given instance state snapshot - - An array of objects that contains a snapshot of a persistent object. - The that is responsible for persisting the values of the fields parameter. - - The value of the version contained in the fields parameter or null if the - Entity is not versioned. - - - - Do we need to increment the version number, given the dirty properties? - The array of property indexes which were deemed dirty - Were any collections found to be dirty (structurally changed) - An array indicating versionability of each property. - True if a version increment is required; false otherwise. - - - - A strategy for determining if a version value is an version of - a new transient instance or a previously persistent transient instance. - The strategy is determined by the Unsaved-Value attribute in the mapping file. - - - - - - - - Assume the transient instance is newly instantiated if its version is null or - equal to Value - - - - - - Does the given identifier belong to a new instance - - - - - Assume the transient instance is newly instantiated if the version - is null, otherwise assume it is a detached instance. - - - - - Assume the transient instance is newly instantiated if the version - is null, otherwise defer to the identifier unsaved-value. - - - - - Assume the transient instance is newly instantiated if the identifier - is null. - - - - - A convenience base class for listeners whose functionality results in flushing. - - - - - Coordinates the processing necessary to get things ready for executions - as db calls by preparing the session caches and moving the appropriate - entities and collections to their respective execution queues. - - The flush event. - - - - Execute all SQL and second-level cache updates, in a - special order so that foreign-key constraints cannot - be violated: - - Inserts, in the order they were performed - Updates - Deletion of collection elements - Insertion of collection elements - Deletes, in the order they were performed - - - - - - 1. Recreate the collection key -> collection map - 2. rebuild the collection entries - 3. call Interceptor.postFlush() - - - - - A convenience base class for listeners that respond to requests to perform a - pessimistic lock upgrade on an entity. - - - - - A convenience base class for listeners that respond to requests to reassociate an entity - to a session ( such as through lock() or update() ). - - - - - Associates a given entity (either transient or associated with another session) to the given session. - - The event triggering the re-association - The entity to be associated - The id of the entity. - The entity's persister instance. - An EntityEntry representing the entity within this session. - - - - Performs a pessimistic lock upgrade on a given entity, if needed. - - The entity for which to upgrade the lock. - The entity's EntityEntry instance. - The lock mode being requested for locking. - The session which is the source of the event being processed. - - - - A convenience bas class for listeners responding to save events. - - - - - Prepares the save call using the given requested id. - - The entity to be saved. - The id to which to associate the entity. - The name of the entity being saved. - Generally cascade-specific information. - The session which is the source of this save event. - The id used to save the entity. - - - - Prepares the save call using a newly generated id. - - The entity to be saved - The entity-name for the entity to be saved - Generally cascade-specific information. - The session which is the source of this save event. - - does the event context require - access to the identifier immediately after execution of this method (if - not, post-insert style id generators may be postponed if we are outside - a transaction). - - - The id used to save the entity; may be null depending on the - type of id generator used and the requiresImmediateIdAccess value - - - - - Prepares the save call by checking the session caches for a pre-existing - entity and performing any lifecycle callbacks. - - The entity to be saved. - The id by which to save the entity. - The entity's persister instance. - Is an identity column being used? - Generally cascade-specific information. - The session from which the event originated. - - does the event context require - access to the identifier immediately after execution of this method (if - not, post-insert style id generators may be postponed if we are outside - a transaction). - - - The id used to save the entity; may be null depending on the - type of id generator used and the requiresImmediateIdAccess value - - - - - Performs all the actual work needed to save an entity (well to get the save moved to - the execution queue). - - The entity to be saved - The id to be used for saving the entity (or null, in the case of identity columns) - The entity's persister instance. - Should an identity column be used for id generation? - Generally cascade-specific information. - The session which is the source of the current event. - - Is access to the identifier required immediately - after the completion of the save? persist(), for example, does not require this... - - - The id used to save the entity; may be null depending on the - type of id generator used and the requiresImmediateIdAccess value - - - - - Perform any property value substitution that is necessary - (interceptor callback, version initialization...) - - The entity - The entity identifier - The snapshot entity state - The entity persister - The originating session - - True if the snapshot state changed such that - reinjection of the values into the entity is required. - - - - Handles the calls needed to perform pre-save cascades for the given entity. - The session from which the save event originated. - The entity's persister instance. - The entity to be saved. - Generally cascade-specific data - - - Handles to calls needed to perform post-save cascades. - The session from which the event originated. - The entity's persister instance. - The entity being saved. - Generally cascade-specific data - - - - Determine whether the entity is persistent, detached, or transient - - The entity to check - The name of the entity - The entity's entry in the persistence context - The originating session. - The state. - - - - After the save, will te version number be incremented - if the instance is modified? - - True if the version will be incremented on an entity change after save; false otherwise. - - - - Abstract superclass of algorithms that walk a tree of property values of an entity, and - perform specific functionality for collections, components and associated entities. - - - - Dispatch each property value to ProcessValue(). - - - - - - Visit a property value. Dispatch to the correct handler for the property type. - - - - - - - Visit a component. Dispatch each property to - - - - - - - - Visit a many-to-one or one-to-one associated entity. Default superclass implementation is a no-op. - - - - - - - - Visit a collection. Default superclass implementation is a no-op. - - - - - - - - Walk the tree starting from the given entity. - - - - - - - Defines the default flush event listeners used by hibernate for - flushing session state in response to generated auto-flush events. - - - - Defines the contract for handling of session auto-flush events. - - - - Handle the given auto-flush event. - - The auto-flush event to be handled. - - - - Handle the given auto-flush event. - - The auto-flush event to be handled. - - - - Defines the default delete event listener used by hibernate for deleting entities - from the datastore in response to generated delete events. - - - - Defines the contract for handling of deletion events generated from a session. - - - Handle the given delete event. - The delete event to be handled. - - - Handle the given delete event. - The delete event to be handled. - - - Called when we have recognized an attempt to delete a detached entity. - The event. - - This is perfectly valid in Hibernate usage; JPA, however, forbids this. - Thus, this is a hook for HEM to affect this behavior. - - - - - We encountered a delete request on a transient instance. -

- This is a deviation from historical Hibernate (pre-3.2) behavior to - align with the JPA spec, which states that transient entities can be - passed to remove operation in which case cascades still need to be - performed. -

- The session which is the source of the event - The entity being delete processed - Is cascading of deletes enabled - The entity persister - - A cache of already visited transient entities (to avoid infinite recursion). - -
- - - Perform the entity deletion. Well, as with most operations, does not - really perform it; just schedules an action/execution with the - for execution during flush. - - The originating session - The entity to delete - The entity's entry in the - Is delete cascading enabled? - The entity persister. - A cache of already deleted entities. - - - - Defines the default dirty-check event listener used by hibernate for - checking the session for dirtiness in response to generated dirty-check events. - - - - Defines the contract for handling of session dirty-check events. - - - Handle the given dirty-check event. - The dirty-check event to be handled. - - - - Defines the default evict event listener used by hibernate for evicting entities - in response to generated flush events. In particular, this implementation will - remove any hard references to the entity that are held by the infrastructure - (references held by application or other persistent instances are okay) - - - - Defines the contract for handling of evict events generated from a session. - - - Handle the given evict event. - The evict event to be handled. - - - - An event that occurs for each entity instance at flush time - - - - - Flushes a single entity's state to the database, by scheduling an update action, if necessary - - - - - make sure user didn't mangle the id - - The obj. - The persister. - The id. - The entity mode. - - - - Performs all necessary checking to determine if an entity needs an SQL update - to synchronize its state to the database. Modifies the event by side-effect! - Note: this method is quite slow, avoid calling if possible! - - - - Perform a dirty check, and attach the results to the event - - - - Defines the default flush event listeners used by hibernate for - flushing session state in response to generated flush events. - - - - Defines the contract for handling of session flush events. - - - Handle the given flush event. - The flush event to be handled. - - - - Defines the contract for handling of collection initialization events - generated by a session. - - - - called by a collection that wants to initialize itself - - - Try to initialize a collection from the cache - - - - Defines the default load event listeners used by hibernate for loading entities - in response to generated load events. - - - - - Defines the contract for handling of load events generated from a session. - - - - - Handle the given load event. - - The load event to be handled. - - The result (i.e., the loaded entity). - - - Perfoms the load of an entity. - The loaded entity. - - - - Based on configured options, will either return a pre-existing proxy, - generate a new proxy, or perform an actual load. - - The result of the proxy/load operation. - - - - Given that there is a pre-existing proxy. - Initialize it if necessary; narrow if necessary. - - - - - Given that there is no pre-existing proxy. - Check if the entity is already loaded. If it is, return the entity, - otherwise create and return a proxy. - - - - - If the class to be loaded has been configured with a cache, then lock - given id in that cache and then perform the load. - - The loaded entity - - - - Coordinates the efforts to load a given entity. First, an attempt is - made to load the entity from the session-level cache. If not found there, - an attempt is made to locate it in second-level cache. Lastly, an - attempt is made to load it directly from the datasource. - - The load event - The persister for the entity being requested for load - The EntityKey representing the entity to be loaded. - The load options. - The loaded entity, or null. - - - - Performs the process of loading an entity from the configured underlying datasource. - - The load event - The persister for the entity being requested for load - The EntityKey representing the entity to be loaded. - The load options. - The object loaded from the datasource, or null if not found. - - - - Attempts to locate the entity in the session-level cache. - - The load event - The EntityKey representing the entity to be loaded. - The load options. - The entity from the session-level cache, or null. - - If allowed to return nulls, then if the entity happens to be found in - the session cache, we check the entity type for proper handling - of entity hierarchies. - If checkDeleted was set to true, then if the entity is found in the - session-level cache, it's current status within the session cache - is checked to see if it has previously been scheduled for deletion. - - - - Attempts to load the entity from the second-level cache. - The load event - The persister for the entity being requested for load - The load options. - The entity from the second-level cache, or null. - - - - Defines the default lock event listeners used by hibernate to lock entities - in response to generated lock events. - - - - - Defines the contract for handling of lock events generated from a session. - - - - Handle the given lock event. - The lock event to be handled. - - - Handle the given lock event. - The lock event to be handled. - - - - Defines the default copy event listener used by hibernate for copying entities - in response to generated copy events. - - - - - Defines the contract for handling of merge events generated from a session. - - - - Handle the given merge event. - The merge event to be handled. - - - Handle the given merge event. - The merge event to be handled. - - - - - Perform any cascades needed as part of this copy event. - - The merge event being processed. - The persister of the entity being copied. - The entity being copied. - A cache of already copied instance. - - - Cascade behavior is redefined by this subclass, disable superclass behavior - - - Cascade behavior is redefined by this subclass, disable superclass behavior - - - - Defines the default create event listener used by hibernate for creating - transient entities in response to generated create events. - - - - - Defines the contract for handling of create events generated from a session. - - - - Handle the given create event. - The create event to be handled. - - - Handle the given create event. - The create event to be handled. - - - - Handle the given create event. - The save event to be handled. - - - - When persist is used as the cascade action, persistOnFlush should be used - - - Call interface if necessary - - - - Occurs after an an entity instance is fully loaded. - - - - - - - - - - - Called before injecting property values into a newly - loaded entity instance. - - - - - Called before injecting property values into a newly loaded entity instance. - - - - - - - - - - - Defines the default refresh event listener used by hibernate for refreshing entities - in response to generated refresh events. - - - - - Defines the contract for handling of refresh events generated from a session. - - - - Handle the given refresh event. - The refresh event to be handled. - - - - - - - - - - - Defines the default replicate event listener used by Hibernate to replicate - entities in response to generated replicate events. - - - - - Defines the contract for handling of replicate events generated from a session. - - - - Handle the given replicate event. - The replicate event to be handled. - - - An event handler for save() events - - - - Defines the default listener used by Hibernate for handling save-update events. - - - - - Defines the contract for handling of update events generated from a session. - - - - Handle the given update event. - The update event to be handled. - - - - The given save-update event named a transient entity. - Here, we will perform the save processing. - - The save event to be handled. - The entity's identifier after saving. - - - - Save the transient instance, assigning the right identifier - - The initiating event. - The entity's identifier value after saving. - - - - The given save-update event named a detached entity. - Here, we will perform the update processing. - - The update event to be handled. - - - Determine the id to use for updating. - The entity. - The entity persister - The requested identifier - The entity mode. - The id. - - - - Handles the calls needed to perform cascades as part of an update request - for the given entity. - - The event currently being processed. - The defined persister for the entity being updated. - The entity being updated. - - - An event handler for update() events - - - - If the user specified an id, assign it to the instance and use that, - otherwise use the id already assigned to the instance - - - - - A Visitor that determines if a dirty collection was found. - - - - - Reason for dirty collection - - - - If it is a new application-instantiated collection, return true (does not occur anymore!) - - - - - If it is a component, recurse. - - - - - If it is a wrapped collection, ask the collection entry. - - - - - - - - Gets a indicating if a dirty collection was found. - - if a dirty collection was found. - - - - Evict any collections referenced by the object from the session cache. - This will NOT pick up any collections that were dereferenced, so they - will be deleted (suboptimal but not exactly incorrect). - - - - - Process collections reachable from an entity. - This visitor assumes that wrap was already performed for the entity. - - - - - When a transient entity is passed to lock(), we must inspect all its collections and - 1. associate any uninitialized PersistentCollections with this session - 2. associate any initialized PersistentCollections with this session, using the existing snapshot - 3. throw an exception for each "new" collection - - - - - Abstract superclass of visitors that reattach collections - - - - - Reassociates uninitialized proxies with the session - - - - - Visit a many-to-one or one-to-one associated entity. Default superclass implementation is a no-op. - - - - - - - - Has the owner of the collection changed since the collection was snapshotted and detached? - - - - - Reattach a detached (disassociated) initialized or uninitialized - collection wrapper, using a snapshot carried with the collection wrapper - - - - - Schedules a collection for deletion. - - The persister representing the collection to be removed. - The collection key (differs from owner-id in the case of property-refs). - The session from which the request originated. - - - - This version is slightly different in that here we need to assume that - the owner is not yet associated with the session, and thus we cannot - rely on the owner's EntityEntry snapshot... - - The persister for the collection role being processed. - - - - - When an entity is passed to replicate(), and there is an existing row, we must - inspect all its collections and - 1. associate any uninitialized PersistentCollections with this session - 2. associate any initialized PersistentCollections with this session, using the existing snapshot - 3. execute a collection removal (SQL DELETE) for each null collection property or "new" collection - - - - - When an entity is passed to update(), we must inspect all its collections and - 1. associate any uninitialized PersistentCollections with this session - 2. associate any initialized PersistentCollections with this session, using the existing snapshot - 3. execute a collection removal (SQL DELETE) for each null collection property or "new" collection - - - - - Wrap collections in a Hibernate collection wrapper. - - - - Defines a base class for events involving collections. - - - - Defines a base class for Session generated events. - - - - - Returns the session event source for this event. - This is the underlying session from which this event was generated. - - - - - Constructs an event from the given event session. - - The session event source. - - - - Returns the session event source for this event. - This is the underlying session from which this event was generated. - - - - Constructs an AbstractCollectionEvent object. - The collection persister. - The collection - The Session source - The owner that is affected by this event; can be null if unavailable - - The ID for the owner that is affected by this event; can be null if unavailable - that is affected by this event; can be null if unavailable - - - - Get the entity name for the collection owner entity that is affected by this event. - - The entity name; if the owner is not in the PersistenceContext, the - returned value may be a superclass name, instead of the actual class name - - - - The collection owner entity that is affected by this event. - - Returns null if the entity is not in the persistence context - (e.g., because the collection from a detached entity was moved to a new owner) - - - - Get the ID for the collection owner entity that is affected by this event. - - Returns null if the ID cannot be obtained - from the collection's loaded key (e.g., a property-ref is used for the - collection and does not include the entity's ID) - - - - - Represents an operation we performed against the database. - - - - - Represents an operation we performed against the database. - - - - The entity involved in the database operation. - - - The id to be used in the database operation. - - - - The persister for the . - - - - Constructs an event containing the pertinent information. - The session from which the event originated. - The entity to be invloved in the database operation. - The entity id to be invloved in the database operation. - The entity's persister. - - - The entity involved in the database operation. - - - The id to be used in the database operation. - - - - The persister for the . - - - - - Represents an operation we are about to perform against the database. - - - - The entity involved in the database operation. - - - The id to be used in the database operation. - - - - The persister for the . - - - - Constructs an event containing the pertinent information. - The session from which the event originated. - The entity to be invloved in the database operation. - The entity id to be invloved in the database operation. - The entity's persister. - - - The entity involved in the database operation. - - - The id to be used in the database operation. - - - - The persister for the . - - - - Defines an event class for the auto-flushing of a session. - - - Defines an event class for the flushing of a session. - - - Defines an event class for the deletion of an entity. - - - Constructs a new DeleteEvent instance. - The entity to be deleted. - The session from which the delete event was generated. - - - - - Returns the encapsulated entity to be deleed. - - - - Defines an event class for the dirty-checking of a session. - - - - A convience holder for all defined session event listeners. - - - - - Call on any listeners that implement - . - - - - - Defines an event class for the evicting of an entity. - - - - Contract for listeners which require notification of SessionFactory closing, - presumably to destroy internal state. - - - - - Notification of shutdown. - - - - - The main runtime interface between a .NET application and NHibernate. This is the central - API class abstracting the notion of a persistence service. - - - - The lifecycle of a ISession is bounded by the beginning and end of a logical - transaction. (Long transactions might span several database transactions.) - - - The main function of the ISession is to offer create, find and delete operations - for instances of mapped entity classes. Instances may exist in one of two states: - - transient: not associated with any ISession - persistent: associated with a ISession - - - - Transient instances may be made persistent by calling Save(), Insert(), - or Update(). Persistent instances may be made transient by calling Delete(). - Any instance returned by a List(), Iterate(), Load(), or Create - method is persistent. - - - Save() results in an SQL INSERT, Delete() - in an SQL DELETE and Update() in an SQL UPDATE. Changes to - persistent instances are detected at flush time and also result in an SQL - UPDATE. - - - It is not intended that implementors be threadsafe. Instead each thread/transaction should obtain - its own instance from an ISessionFactory. - - - A ISession instance is serializable if its persistent classes are serializable - - - A typical transaction should use the following idiom: - - ISession sess = factory.OpenSession(); - ITransaction tx; - try { - tx = sess.BeginTransaction(); - //do some work - ... - tx.Commit(); - } catch (Exception e) { - if (tx != null) tx.Rollback(); - throw; - } finally { - sess.Close(); - } - - - - If the ISession throws an exception, the transaction must be rolled back and the session - discarded. The internal state of the ISession might not be consistent with the database - after the exception occurs. - - - - - - - Force the ISession to flush. - - - Must be called at the end of a unit of work, before commiting the transaction and closing - the session (Transaction.Commit() calls this method). Flushing if the process - of synchronising the underlying persistent store with persistable state held in memory. - - - - - Disconnect the ISession from the current ADO.NET connection. - - - If the connection was obtained by Hibernate, close it or return it to the connection - pool. Otherwise return it to the application. This is used by applications which require - long transactions. - - The connection provided by the application or - - - - Obtain a new ADO.NET connection. - - - This is used by applications which require long transactions - - - - - Reconnect to the given ADO.NET connection. - - This is used by applications which require long transactions - An ADO.NET connection - - - - End the ISession by disconnecting from the ADO.NET connection and cleaning up. - - - It is not strictly necessary to Close() the ISession but you must - at least Disconnect() it. - - The connection provided by the application or - - - - Cancel execution of the current query. - - - May be called from one thread to stop execution of a query in another thread. - Use with care! - - - - - Does this ISession contain any changes which must be - synchronized with the database? Would any SQL be executed if - we flushed this session? - - - - - Return the identifier of an entity instance cached by the ISession - - - Throws an exception if the instance is transient or associated with a different - ISession - - a persistent instance - the identifier - - - - Is this instance associated with this Session? - - an instance of a persistent class - true if the given instance is associated with this Session - - - - Remove this instance from the session cache. - - - Changes to the instance will not be synchronized with the database. - This operation cascades to associated instances if the association is mapped - with cascade="all" or cascade="all-delete-orphan". - - a persistent instance - - - - Return the persistent instance of the given entity class with the given identifier, - obtaining the specified lock mode. - - A persistent class - A valid identifier of an existing persistent instance of the class - The lock level - the persistent instance - - - - Return the persistent instance of the given entity class with the given identifier, - obtaining the specified lock mode, assuming the instance exists. - - The entity-name of a persistent class - a valid identifier of an existing persistent instance of the class - the lock level - the persistent instance or proxy - - - - Return the persistent instance of the given entity class with the given identifier, - assuming that the instance exists. - - - You should not use this method to determine if an instance exists (use a query or - instead). Use this only to retrieve an instance - that you assume exists, where non-existence would be an actual error. - - A persistent class - A valid identifier of an existing persistent instance of the class - The persistent instance or proxy - - - - Return the persistent instance of the given entity class with the given identifier, - obtaining the specified lock mode. - - A persistent class - A valid identifier of an existing persistent instance of the class - The lock level - the persistent instance - - - - Return the persistent instance of the given entity class with the given identifier, - assuming that the instance exists. - - - You should not use this method to determine if an instance exists (use a query or - instead). Use this only to retrieve an instance that you - assume exists, where non-existence would be an actual error. - - A persistent class - A valid identifier of an existing persistent instance of the class - The persistent instance or proxy - - - - Return the persistent instance of the given with the given identifier, - assuming that the instance exists. - - The entity-name of a persistent class - a valid identifier of an existing persistent instance of the class - The persistent instance or proxy - - You should not use this method to determine if an instance exists (use - instead). Use this only to retrieve an instance that you assume exists, where non-existence - would be an actual error. - - - - - Read the persistent state associated with the given identifier into the given transient - instance. - - An "empty" instance of the persistent class - A valid identifier of an existing persistent instance of the class - - - - Persist all reachable transient objects, reusing the current identifier - values. Note that this will not trigger the Interceptor of the Session. - - a detached instance of a persistent class - - - - - Persist the state of the given detached instance, reusing the current - identifier value. This operation cascades to associated instances if - the association is mapped with cascade="replicate". - - - a detached instance of a persistent class - - - - - Persist the given transient instance, first assigning a generated identifier. - - - Save will use the current value of the identifier property if the Assigned - generator is used. - - A transient instance of a persistent class - The generated identifier - - - - Persist the given transient instance, using the given identifier. - - A transient instance of a persistent class - An unused valid identifier - - - - Persist the given transient instance, first assigning a generated identifier. (Or - using the current value of the identifier property if the assigned - generator is used.) - - The Entity name. - a transient instance of a persistent class - the generated identifier - - This operation cascades to associated instances if the - association is mapped with cascade="save-update". - - - - - Either Save() or Update() the given instance, depending upon the value of - its identifier property. - - - By default the instance is always saved. This behaviour may be adjusted by specifying - an unsaved-value attribute of the identifier property mapping - - A transient instance containing new or updated state - - - - Either or - the given instance, depending upon resolution of the unsaved-value checks - (see the manual for discussion of unsaved-value checking). - - The name of the entity - a transient or detached instance containing new or updated state - - - - This operation cascades to associated instances if the association is mapped - with cascade="save-update". - - - - - Update the persistent instance with the identifier of the given transient instance. - - - If there is a persistent instance with the same identifier, an exception is thrown. If - the given transient instance has a identifier, an exception will be thrown. - - A transient instance containing updated state - - - - Update the persistent state associated with the given identifier. - - - An exception is thrown if there is a persistent instance with the same identifier - in the current session. - - A transient instance containing updated state - Identifier of persistent instance - - - - Update the persistent instance with the identifier of the given detached - instance. - - The Entity name. - a detached instance containing updated state - - If there is a persistent instance with the same identifier, - an exception is thrown. This operation cascades to associated instances - if the association is mapped with cascade="save-update". - - - - - Copy the state of the given object onto the persistent object with the same - identifier. If there is no persistent instance currently associated with - the session, it will be loaded. Return the persistent instance. If the - given instance is unsaved, save a copy of and return it as a newly persistent - instance. The given instance does not become associated with the session. - This operation cascades to associated instances if the association is mapped - with cascade="merge".
- The semantics of this method are defined by JSR-220. -
- a detached instance with state to be copied - an updated persistent instance -
- - - Copy the state of the given object onto the persistent object with the same - identifier. If there is no persistent instance currently associated with - the session, it will be loaded. Return the persistent instance. If the - given instance is unsaved, save a copy of and return it as a newly persistent - instance. The given instance does not become associated with the session. - This operation cascades to associated instances if the association is mapped - with cascade="merge".
- The semantics of this method are defined by JSR-220. - Name of the entity. - a detached instance with state to be copied - an updated persistent instance -
- -
- - - Make a transient instance persistent. This operation cascades to associated - instances if the association is mapped with cascade="persist".
- The semantics of this method are defined by JSR-220. -
- a transient instance to be made persistent -
- - - Make a transient instance persistent. This operation cascades to associated - instances if the association is mapped with cascade="persist".
- The semantics of this method are defined by JSR-220. -
- Name of the entity. - a transient instance to be made persistent -
- - - Copy the state of the given object onto the persistent object with the same - identifier. If there is no persistent instance currently associated with - the session, it will be loaded. Return the persistent instance. If the - given instance is unsaved or does not exist in the database, save it and - return it as a newly persistent instance. Otherwise, the given instance - does not become associated with the session. - - a transient instance with state to be copied - an updated persistent instance - - - - Copy the state of the given object onto the persistent object with the - given identifier. If there is no persistent instance currently associated - with the session, it will be loaded. Return the persistent instance. If - there is no database row with the given identifier, save the given instance - and return it as a newly persistent instance. Otherwise, the given instance - does not become associated with the session. - - a persistent or transient instance with state to be copied - the identifier of the instance to copy to - an updated persistent instance - - - - Remove a persistent instance from the datastore. - - - The argument may be an instance associated with the receiving ISession or a - transient instance with an identifier associated with existing persistent state. - - The instance to be removed - - - - Remove a persistent instance from the datastore. The object argument may be - an instance associated with the receiving or a transient - instance with an identifier associated with existing persistent state. - This operation cascades to associated instances if the association is mapped - with cascade="delete". - - The entity name for the instance to be removed. - the instance to be removed - - - - Execute a query - - A query expressed in Hibernate's query language - A distinct list of instances - See for implications of cache usage. - - - - Execute a query, binding a value to a "?" parameter in the query string. - - The query string - A value to be bound to a "?" placeholder - The Hibernate type of the value - A distinct list of instances - See for implications of cache usage. - - - - Execute a query, binding an array of values to a "?" parameters in the query string. - - The query string - An array of values to be bound to the "?" placeholders - An array of Hibernate types of the values - A distinct list of instances - See for implications of cache usage. - - - - Execute a query and return the results in an interator. - - - - If the query has multiple return values, values will be returned in an array of - type object[]. - - - Entities returned as results are initialized on demand. The first SQL query returns - identifiers only. So Enumerator() is usually a less efficient way to retrieve - object than List(). - - - The query string - An enumerator - - - - Execute a query and return the results in an interator, - binding a value to a "?" parameter in the query string. - - - - If the query has multiple return values, values will be returned in an array of - type object[]. - - - Entities returned as results are initialized on demand. The first SQL query returns - identifiers only. So Enumerator() is usually a less efficient way to retrieve - object than List(). - - - The query string - A value to be written to a "?" placeholder in the query string - The hibernate type of the value - An enumerator - - - - Execute a query and return the results in an interator, - binding the values to "?"s parameters in the query string. - - - - If the query has multiple return values, values will be returned in an array of - type object[]. - - - Entities returned as results are initialized on demand. The first SQL query returns - identifiers only. So Enumerator() is usually a less efficient way to retrieve - object than List(). - - - The query string - A list of values to be written to "?" placeholders in the query - A list of hibernate types of the values - An enumerator - - - - Apply a filter to a persistent collection. - - - A filter is a Hibernate query that may refer to this, the collection element. - Filters allow efficient access to very large lazy collections. (Executing the filter - does not initialize the collection.) - - A persistent collection to filter - A filter query string - The resulting collection - - - - Apply a filter to a persistent collection, binding the given parameter to a "?" placeholder - - - A filter is a Hibernate query that may refer to this, the collection element. - Filters allow efficient access to very large lazy collections. (Executing the filter - does not initialize the collection.) - - A persistent collection to filter - A filter query string - A value to be written to a "?" placeholder in the query - The hibernate type of value - A collection - - - - Apply a filter to a persistent collection, binding the given parameters to "?" placeholders. - - - A filter is a Hibernate query that may refer to this, the collection element. - Filters allow efficient access to very large lazy collections. (Executing the filter - does not initialize the collection.) - - A persistent collection to filter - A filter query string - The values to be written to "?" placeholders in the query - The hibernate types of the values - A collection - - - - Delete all objects returned by the query. - - The query string - Returns the number of objects deleted. - - - - Delete all objects returned by the query. - - The query string - A value to be written to a "?" placeholer in the query - The hibernate type of value. - The number of instances deleted - - - - Delete all objects returned by the query. - - The query string - A list of values to be written to "?" placeholders in the query - A list of Hibernate types of the values - The number of instances deleted - - - - Obtain the specified lock level upon the given object. - - A persistent instance - The lock level - - - - Obtain the specified lock level upon the given object. - - The Entity name. - a persistent or transient instance - the lock level - - This may be used to perform a version check (), to upgrade to a pessimistic - lock (), or to simply reassociate a transient instance - with a session (). This operation cascades to associated - instances if the association is mapped with cascade="lock". - - - - - Re-read the state of the given instance from the underlying database. - - - - It is inadvisable to use this to implement long-running sessions that span many - business tasks. This method is, however, useful in certain special circumstances. - - - For example, - - Where a database trigger alters the object state upon insert or update - After executing direct SQL (eg. a mass update) in the same session - After inserting a Blob or Clob - - - - A persistent instance - - - - Re-read the state of the given instance from the underlying database, with - the given LockMode. - - - It is inadvisable to use this to implement long-running sessions that span many - business tasks. This method is, however, useful in certain special circumstances. - - a persistent or transient instance - the lock mode to use - - - - Determine the current lock mode of the given object - - A persistent instance - The current lock mode - - - - Begin a unit of work and return the associated ITransaction object. - - - If a new underlying transaction is required, begin the transaction. Otherwise - continue the new work in the context of the existing underlying transaction. - The class of the returned object is determined by - the property transaction_factory - - A transaction instance - - - - Begin a transaction with the specified isolationLevel - - Isolation level for the new transaction - A transaction instance having the specified isolation level - - - - Creates a new Criteria for the entity class. - - The entity class - An ICriteria object - - - - Creates a new Criteria for the entity class with a specific alias - - The entity class - The alias of the entity - An ICriteria object - - - - Creates a new Criteria for the entity class. - - The class to Query - An ICriteria object - - - - Creates a new Criteria for the entity class with a specific alias - - The class to Query - The alias of the entity - An ICriteria object - - - - Create a new Criteria instance, for the given entity name. - - The name of the entity to Query - An ICriteria object - - - - Create a new Criteria instance, for the given entity name, - with the given alias. - - The name of the entity to Query - The alias of the entity - An ICriteria object - - - - Create a new instance of Query for the given query string - - A hibernate query string - The query - - - - Create a new instance of Query for the given collection and filter string - - A persistent collection - A hibernate query - A query - - - - Obtain an instance of for a named query string defined in the - mapping file. - - The name of a query defined externally. - An from a named query string. - - The query can be either in HQL or SQL format. - - - - - Create a new instance of IQuery for the given SQL string. - - a query expressed in SQL - a table alias that appears inside {} in the SQL string - the returned persistent class - An from the SQL string - - - - Create a new instance of for the given SQL string. - - a query expressed in SQL - an array of table aliases that appear inside {} in the SQL string - the returned persistent classes - An from the SQL string - - - - Create a new instance of for the given SQL query string. - - a query expressed in SQL - An from the SQL string - - - - Completely clear the session. Evict all loaded instances and cancel all pending - saves, updates and deletions. Do not close open enumerables or instances of - ScrollableResults. - - - - - Return the persistent instance of the given entity class with the given identifier, or null - if there is no such persistent instance. (If the instance, or a proxy for the instance, is - already associated with the session, return that instance or proxy.) - - a persistent class - an identifier - a persistent instance or null - - - - Return the persistent instance of the given entity class with the given identifier, or null - if there is no such persistent instance. Obtain the specified lock mode if the instance - exists. - - a persistent class - an identifier - the lock mode - a persistent instance or null - - - - Return the persistent instance of the given named entity with the given identifier, - or null if there is no such persistent instance. (If the instance, or a proxy for the - instance, is already associated with the session, return that instance or proxy.) - - the entity name - an identifier - a persistent instance or null - - - - Strongly-typed version of - - - - - Strongly-typed version of - - - - - Return the entity name for a persistent entity - - a persistent entity - the entity name - - - - Enable the named filter for this current session. - - The name of the filter to be enabled. - The Filter instance representing the enabled filter. - - - - Retrieve a currently enabled filter by name. - - The name of the filter to be retrieved. - The Filter instance representing the enabled filter. - - - - Disable the named filter for the current session. - - The name of the filter to be disabled. - - - - Create a multi query, a query that can send several - queries to the server, and return all their results in a single - call. - - - An that can return - a list of all the results of all the queries. - Note that each query result is itself usually a list. - - - - - Sets the batch size of the session - - - - - - - Gets the session implementation. - - - This method is provided in order to get the NHibernate implementation of the session from wrapper implementions. - Implementors of the interface should return the NHibernate implementation of this method. - - - An NHibernate implementation of the interface - - - - - An that can return a list of all the results - of all the criterias. - - - - - - Starts a new Session with the given entity mode in effect. This secondary - Session inherits the connection, transaction, and other context - information from the primary Session. It doesn't need to be flushed - or closed by the developer. - - The entity mode to use for the new session. - The new session - - - The entity mode in effect for this session. - - - - Determines at which points Hibernate automatically flushes the session. - - - For a readonly session, it is reasonable to set the flush mode to FlushMode.Never - at the start of the session (in order to achieve some extra performance). - - - - The current cache mode. - - Cache mode determines the manner in which this session can interact with - the second level cache. - - - - - Get the that created this instance. - - - - - Gets the ADO.NET connection. - - - Applications are responsible for calling commit/rollback upon the connection before - closing the ISession. - - - - - Is the ISession still open? - - - - - Is the ISession currently connected? - - - - - Get the current Unit of Work and return the associated ITransaction object. - - - - Get the statistics for this session. - - - - Instantiate an entity instance, using either an interceptor, - or the given persister - - - - Force an immediate flush - - - Cascade merge an entity instance - - - Cascade persist an entity instance - - - Cascade persist an entity instance during the flush process - - - Cascade refresh an entity instance - - - Cascade copy an entity instance - - - Cascade delete an entity instance - - - Get the ActionQueue for this session - - - - An event listener that requires access to mappings to - initialize state at initialization time. - - - - - An event that occurs when a collection wants to be initialized - - - - Called after recreating a collection - - - Called after removing a collection - - - Called after updating a collection - - - Called after deleting an item from the datastore - - - - - - - - - Called after inserting an item in the datastore - - - - - - - - - - Called after updating the datastore - - - - - - - - - - Called before recreating a collection - - - Called before removing a collection - - - Called before updating a collection - - - - Called before deleting an item from the datastore - - - - Return true if the operation should be vetoed - - - - - Called before inserting an item in the datastore - - - - Return true if the operation should be vetoed - - - - - Called before updating the datastore - - - - Return true if the operation should be vetoed - - - - - Values for listener type property. - - - - Not allowed in Xml. It represents the default value when an explicit type is assigned. - - - Xml value: auto-flush - - - Xml value: merge - - - Xml value: create - - - Xml value: create-onflush - - - Xml value: delete - - - Xml value: dirty-check - - - Xml value: evict - - - Xml value: flush - - - Xml value: flush-entity - - - Xml value: load - - - Xml value: load-collection - - - Xml value: lock - - - Xml value: refresh - - - Xml value: replicate - - - Xml value: save-update - - - Xml value: save - - - Xml value: pre-update - - - Xml value: update - - - Xml value: pre-load - - - Xml value: pre-delete - - - Xml value: pre-insert - - - Xml value: pre-collection-recreate - - - Xml value: pre-collection-remove - - - Xml value: pre-collection-update - - - Xml value: post-load - - - Xml value: post-insert - - - Xml value: post-update - - - Xml value: post-delete - - - Xml value: post-commit-update - - - Xml value: post-commit-insert - - - Xml value: post-commit-delete - - - Xml value: post-collection-recreate - - - Xml value: post-collection-remove - - - Xml value: post-collection-update - - - Defines an event class for the loading of an entity. - - - - Defines an event class for the locking of an entity. - - - - - An event class for merge() and saveOrUpdateCopy() - - - - An event class for persist() - - - An event that occurs after a collection is recreated - - - An event that occurs after a collection is removed - - - An event that occurs after a collection is updated - - - - Occurs after deleting an item from the datastore - - - - - Occurs after inserting an item in the datastore - - - - - Occurs after an an entity instance is fully loaded. - - - - - Occurs after the datastore is updated - - - - An event that occurs before a collection is recreated - - - An event that occurs before a collection is removed - - - An event that occurs before a collection is updated - - - - Represents a pre-delete event, which occurs just prior to - performing the deletion of an entity from the database. - - - - - Constructs an event containing the pertinent information. - - The entity to be deleted. - The id to use in the deletion. - The entity's state at deletion time. - The entity's persister. - The session from which the event originated. - - - - This is the entity state at the - time of deletion (useful for optomistic locking and such). - - - - - Represents a pre-insert event, which occurs just prior to - performing the insert of an entity into the database. - - - - - These are the values to be inserted. - - - - - Called before injecting property values into a newly loaded entity instance. - - - - - Represents a pre-update event, which occurs just prior to - performing the update of an entity in the database. - - - - - Retrieves the state to be used in the update. - - - - - The old state of the entity at the time it was last loaded from the - database; can be null in the case of detached entities. - - - - - Defines an event class for the refreshing of an object. - - - - - Defines an event class for the replication of an entity. - - - - - An event class for saveOrUpdate() - - - - - Implementation of ADOException indicating problems with communicating with the - database (can also include incorrect ADO setup). - - - - - Wraps exceptions that occur during ADO.NET calls. - - - Exceptions thrown by various ADO.NET providers are not derived from - a common base class (SQLException in Java), so - is used instead in NHibernate. - - - - - Initializes a new instance of the class. - - The message that describes the error. - - The exception that is the cause of the current exception. If the innerException parameter - is not a null reference, the current exception is raised in a catch block that handles - the inner exception. - - - - - Initializes a new instance of the class. - - - The that holds the serialized object - data about the exception being thrown. - - - The that contains contextual information about the source or destination. - - - - - Collect data of an to be converted. - - - - - The to be converted. - - - - - An optional error message. - - - - - The SQL that generate the exception - - - - - Optional EntityName where available in the original exception context. - - - - - Optional EntityId where available in the original exception context. - - - - - Converts the given SQLException into Exception hierarchy, as well as performing - appropriate logging. - - The converter to use. - The exception to convert. - An optional error message. - The SQL executed. - The converted . - - - - Converts the given SQLException into Exception hierarchy, as well as performing - appropriate logging. - - The converter to use. - The exception to convert. - An optional error message. - The converted . - - - For the given , locates the . - The exception from which to extract the - The , or null. - - - - Implementation of ADOException indicating that the requested DML operation - resulted in a violation of a defined integrity constraint. - - - - - Returns the name of the violated constraint, if known. - - The name of the violated constraint, or null if not known. - - - - Implementation of ADOException indicating that evaluation of the - valid SQL statement against the given data resulted in some - illegal operation, mismatched types or incorrect cardinality. - - - - - The Configurable interface defines the contract for impls that - want to be configured prior to usage given the currently defined Hibernate properties. - - - - Configure the component, using the given settings and properties. - All defined startup properties. - - - - Defines a contract for implementations that know how to convert a - into NHibernate's hierarchy. - - - Inspired by Spring's SQLExceptionTranslator. - - Implementations must have a constructor which takes a - parameter. - - Implementations may implement if they need to perform - configuration steps prior to first use. - - - - - - Convert the given into custom Exception. - - Available information during exception throw. - The resulting Exception to throw. - - - - Implementation of ADOException indicating a problem acquiring lock - on the database. - - - - A factory for building SQLExceptionConverter instances. - - - Build a SQLExceptionConverter instance. - The defined dialect. - The configuration properties. - An appropriate instance. - - First, looks for a property to see - if the configuration specified the class of a specific converter to use. If this - property is set, attempt to construct an instance of that class. If not set, or - if construction fails, the converter specific to the dialect will be used. - - - - - Builds a minimal converter. The instance returned here just always converts to . - - The minimal converter. - - - - Implementation of ADOException indicating that the SQL sent to the database - server was invalid (syntax error, invalid object references, etc). - - - - - A SQLExceptionConverter implementation which performs no conversion of - the underlying . - Interpretation of a SQL error based on - is not possible as using the ErrorCode (which is, however, vendor- - specific). Use of a ErrorCode-based converter should be preferred approach - for converting/interpreting SQLExceptions. - - - - Handle an exception not converted to a specific type based on the SQLState. - The exception to be handled. - An optional message - Optionally, the sql being performed when the exception occurred. - The converted exception; should never be null. - - - - Encapsulates the strategy required to execute various types of update, delete, - and insert statements issued through HQL. - - - - - Execute the sql managed by this executor using the given parameters. - - Essentially bind information for this processing. - The session originating the request. - The number of entities updated/deleted. - - - - True if this is a filter query (allow no FROM clause). * - - - - Returns to the previous 'FROM' context. - - - - - - Implementations will report or handle errors invoked by an ANTLR base parser. - Author: josh - Ported by: Steve Strong - - - - all append invocations on the buf should go through this Output instance variable. - The value of this variable may be temporarily substitued by sql function processing code - to catch generated arguments. - This is because sql function templates need arguments as seperate string chunks - that will be assembled into the target dialect-specific function call. - - - - Handles parser errors. - - - - - Add a aspace if the previous token was not a space or a parenthesis. - - - - - The default SQL writer. - - - - - Writes SQL fragments. - - - - todo remove this hack - The parameter is either ", " or " , ". This is needed to pass sql generating tests as the old - sql generator uses " , " in the WHERE and ", " in SELECT. - - @param comma either " , " or ", " - - - - Abstract superclass of object loading (and querying) strategies. - - -

- This class implements useful common functionality that concrete loaders would delegate to. - It is not intended that this functionality would be directly accessed by client code (Hence, - all methods of this class are declared protected or private.) This class relies heavily upon the - interface, which is the contract between this class and - s that may be loaded by it. -

-

- The present implementation is able to load any number of columns of entities and at most - one collection role per query. -

-
- -
- - - What lock mode does this load entities with? - - A Collection of lock modes specified dynamically via the Query Interface - - - - - Append FOR UPDATE OF clause, if necessary. This - empty superclass implementation merely returns its first - argument. - - - - - Does this query return objects that might be already cached by - the session, whose lock mode may need upgrading. - - - - - - Modify the SQL, adding lock hints and comments, if necessary - - - - - Execute an SQL query and attempt to instantiate instances of the class mapped by the given - persister from each row of the DataReader. If an object is supplied, will attempt to - initialize that object. If a collection is supplied, attempt to initialize that collection. - - - - - Loads a single row from the result set. This is the processing used from the - ScrollableResults where no collection fetches were encountered. - - The result set from which to do the load. - The session from which the request originated. - The query parameters specified by the user. - Should proxies be generated - The loaded "row". - - - - - Read any collection elements contained in a single row of the result set - - - - - Get the actual object that is returned in the user-visible result list. - - - This empty implementation merely returns its first argument. This is - overridden by some subclasses. - - - - - For missing objects associated by one-to-one with another object in the - result set, register the fact that the the object is missing with the - session. - - - - - Read one collection element from the current row of the ADO.NET result set - - - - - If this is a collection initializer, we need to tell the session that a collection - is being initilized, to account for the possibility of the collection having - no elements (hence no rows in the result set). - - - - - Read a row of EntityKeys from the IDataReader into the given array. - - - Warning: this method is side-effecty. If an id is given, don't bother going - to the IDataReader - - - - - Check the version of the object in the IDataReader against - the object version in the session cache, throwing an exception - if the version numbers are different. - - - - - - Resolve any ids for currently loaded objects, duplications within the IDataReader, - etc. Instanciate empty objects to be initialized from the IDataReader. Return an - array of objects (a row of results) and an array of booleans (by side-effect) that determine - wheter the corresponding object should be initialized - - - - - The entity instance is already in the session cache - - - - - The entity instance is not in the session cache - - - - - Hydrate the state of an object from the SQL IDataReader, into - an array of "hydrated" values (do not resolve associations yet), - and pass the hydrated state to the session. - - - - - Determine the concrete class of an instance for the IDataReader - - - - - Advance the cursor to the first required row of the IDataReader - - - - - Should we pre-process the SQL string, adding a dialect-specific - LIMIT clause. - - - - - - - - Obtain an IDbCommand with all parameters pre-bound. Bind positional parameters, - named parameters, and limit parameters. - - - Creates an IDbCommand object and populates it with the values necessary to execute it against the - database to Load an Entity. - - The to use for the IDbCommand. - TODO: find out where this is used... - The SessionImpl this Command is being prepared in. - A CommandWrapper wrapping an IDbCommand that is ready to be executed. - - - - Some dialect-specific LIMIT clauses require the maximium last row number - (aka, first_row_number + total_row_count), while others require the maximum - returned row count (the total maximum number of rows to return). - - The selection criteria - The dialect - The appropriate value to bind into the limit clause. - - - - Bind parameters needed by the dialect-specific LIMIT clause - - The number of parameters bound - - - - Limits the number of rows returned by the Sql query if necessary. - - The IDbCommand to limit. - The RowSelection that contains the MaxResults info. - TODO: This does not apply to ADO.NET at all - - - - Bind all parameter values into the prepared statement in preparation for execution. - - The ADO prepared statement - The encapsulation of the parameter values to be bound. - The position from which to start binding parameter values. - The originating session. - The number of ADO bind positions actually bound during this method execution. - - - - Fetch a IDbCommand, call SetMaxRows and then execute it, - advance to the first result and return an SQL IDataReader - - The to execute. - The to apply to the and . - true if result types need to be auto-discovered by the loader; false otherwise. - The to load in. - - An IDataReader advanced to the first record in RowSelection. - - - - Called by subclasses that load entities - - - - - Called by subclasses that batch load entities - - - - - Called by subclasses that load collections - - - - - Called by wrappers that batch initialize collections - - - - - Called by subclasses that batch initialize collections - - - - - Return the query results, using the query cache, called - by subclasses that implement cacheable queries - - - - - - - - - - Actually execute a query, ignoring the query cache - - - - - - - - Calculate and cache select-clause suffixes. Must be - called by subclasses after instantiation. - - - - of - - - - An array indicating whether the entities have eager property fetching - enabled. - - Eager property fetching indicators. - - - - An array of indexes of the entity that owns a one-to-one association - to the entity at the given index (-1 if there is no "owner") - - - The indexes contained here are relative to the result of . - - - - - An array of the owner types corresponding to the - returns. Indices indicating no owner would be null here. - - - - - Get the index of the entity that owns the collection, or -1 - if there is no owner in the query results (i.e. in the case of a - collection initializer) or no collection. - - - - - Return false is this loader is a batch entity loader - - - - - Get the result set descriptor - - - - - The SqlString to be called; implemented by all subclasses - - - - The setter was added so that class inheriting from Loader could write a - value using the Property instead of directly to the field. - - - The scope is protected internal because the needs to - be able to get the SqlString of the when - it is parsing a subquery. - - - - - - An array of persisters of entity classes contained in each row of results; - implemented by all subclasses - - - The setter was added so that classes inheriting from Loader could write a - value using the Property instead of directly to the field. - - - - - An (optional) persister for a collection to be initialized; only collection loaders - return a non-null value - - - - - Get the SQL table aliases of entities whose - associations are subselect-loadable, returning - null if this loader does not support subselect - loading - - - - - Identifies the query for statistics reporting, if null, - no statistics will be reported - - - - - Utility method that generates 0_, 1_ suffixes. Subclasses don't - necessarily need to use this algorithm, but it is intended that - they will in most cases. - - - - - Returns the locations of all occurrences of the named parameter. - - - - - - - - - a collection of lock modes specified dynamically via the Query interface - - - - - Base class for nodes dealing 'is null' and 'is not null' operators. - todo : a good deal of this is copied from BinaryLogicOperatorNode; look at consolidating these code fragments - - Author: Steve Ebersole - Ported by: Steve Strong - - - - - Represents a unary operator node. - - Author: Steve Ebersole - Ported by: Steve Strong - - - - - A semantic analysis node, that points back to the main analyzer. - Authoer: josh - Ported by: Steve Strong - - - - - A base AST node for the intermediate tree. - - - - The original text for the node, mostly for debugging. - - - The data type of this node. Null for 'no type'. - - - - Retrieve the text to be used for rendering this particular node. - - The session factory - The text to use for rendering - - - - An interface for initializeable AST nodes. - - - - - Initializes the node with the parameter. - - the initialization parameter. - - - A pointer back to the phase 2 processor. - - - - Contract for nodes representing unary operators. - - Author: Steve Ebersole - Ported by: Steve Strong - - - - - Contract for nodes representing operators (logic or arithmetic). - Author: Steve Ebersole - Ported by: Steve Strong - - - - - Called by the tree walker during hql-sql semantic analysis - after the operator sub-tree is completely built. - - - - - Retrieves the data type for the overall operator expression. - - The expression's data type. - - - - Retrieves the node representing the operator's single operand. - - - - - When (if) we need to expand a row value constructor, what is the type of connector to use between the - expansion fragments. - - The expansion connector type. - - - - When (if) we need to expand a row value constructor, what is the text of connector to use between the - expansion fragments. - - The expansion connector text. - - - - Convenience implementation of Statement to centralize common functionality. - Author: Steve Ebersole - Ported by: Steve Strong - - - - - Implementors will return additional display text, which will be used - by the ASTPrinter to display information (besides the node type and node - text). - - - - - Returns additional display text for the AST node. - - The additional display text. - - - - Common interface modeling the different HQL statements (i.e., INSERT, UPDATE, DELETE, SELECT). - Author: Steve Ebersole - Ported by: Steve Strong - - - - - The "phase 2" walker which generated this statement tree. - - - - - The main token type representing the type of this statement. - - - - - Does this statement require the StatementExecutor? - Essentially, at the JDBC level, does this require an executeUpdate()? - - - - - Returns additional display text for the AST node. - - The additional display text. - - - - Type definition for Statements which are restrictable via a where-clause (and - thus also having a from-clause). - Author: Steve Ebersole - Ported by: Steve Strong - - - - - Retreives the from-clause in effect for this statement; could be null if the from-clause - has not yet been parsed/generated. - - - - - Does this statement tree currently contain a where clause? - Returns True if a where-clause is found in the statement tree and - that where clause actually defines restrictions; false otherwise. - - - - - Retreives the where-clause defining the restriction(s) in effect for - this statement. - Note that this will generate a where-clause if one was not found, so caution - needs to taken prior to calling this that restrictions will actually exist - in the resulting statement tree (otherwise "unexpected end of subtree" errors - might occur during rendering). - - - - - Represents an element of a projection list, i.e. a select expression. - Author: josh - Ported by: Steve Strong - - - - - Appends AST nodes that represent the columns after the current AST node. - (e.g. 'as col0_O_') - - The index of the select expression in the projection list. - - - - Returns the data type of the select expression. - - - - - Returns the FROM element that this expression refers to. - - - - - Returns true if the element is a constructor (e.g. new Foo). - - - - - Returns true if this select expression represents an entity that can be returned. - - - - - Sets the text of the node. - - - - - Represents an aggregate function i.e. min, max, sum, avg. - - Author: Joshua Davis - Ported by: Steve Strong - - - - - Encapsulates the information relating to an individual assignment within the - set clause of an HQL update statement. This information is used during execution - of the update statements when the updates occur against "multi-table" stuff. - - - - - Contract for nodes representing logcial BETWEEN (ternary) operators. - - - - - Nodes which represent binary arithmetic operators. - - - - - Contract for nodes representing binary operators. - Author: Steve Ebersole - Ported by: Steve Strong - - - - - The left-hand operand of the operator. - - - - - The right-hand operand of the operator. - - - - Retrieves the left-hand operand of the operator. - - @return The left-hand operand - - - Retrieves the right-hand operand of the operator. - - @return The right-hand operand - - - - Contract for nodes representing binary operators. - Author: Steve Ebersole - Ported by: Steve Strong - - - - - Performs the operator node initialization by seeking out any parameter - nodes and setting their expected type, if possible. - - - - Mutate the subtree relating to a row-value-constructor to instead use - a series of ANDed predicates. This allows multi-column type comparisons - and explicit row-value-constructor syntax even on databases which do - not support row-value-constructor. -

- For example, here we'd mutate "... where (col1, col2) = ('val1', 'val2) ..." to - "... where col1 = 'val1' and col2 = 'val2' ..." - - @param valueElements The number of elements in the row value constructor list. - - -

- Represents a boolean literal within a query. - -
- - - Represents a literal. - - Author: josh - Ported by: Steve Strong - - - - - Interface for nodes which wish to be made aware of any determined "expected - type" based on the context within they appear in the query. - Author: Steve Ebersole - Ported by: Steve Strong - - - - Expected-types really only pertinent here for boolean literals... - - @param expectedType - - - - Represents a case ... when .. then ... else ... end expression in a select. - - - - - Represents a case ... when .. then ... else ... end expression in a select. - - Author: Gavin King - Ported by: Steve Strong - - - - - Represents 'elements()' or 'indices()'. - Author: josh - Ported by: Steve strong - - - - - Represents a method call - Author: josh - Ported by: Steve Strong - - - - - Common behavior - a node that contains a list of select expressions. - Author: josh - Ported by: Steve Strong - - - - - Returns an array of SelectExpressions gathered from the children of the given parent AST node. - - - - - Returns an array of SelectExpressions gathered from the children of the given parent AST node. - - - - - Returns the first select expression node that should be considered when building the array of select - expressions. - - - - - Represents a COUNT expression in a select. - Author: josh - Ported by: Steve Strong - - - - - Defines a top-level AST node representing an HQL delete statement. - - - - - Represents a reference to a property or alias expression. This should duplicate the relevant behaviors in - PathExpressionParser. - Author: Joshua Davis - Ported by: Steve Strong - - - - - The contract for expression sub-trees that can resolve themselves. - Author: josh - Ported by: Steve Strong - - - - - Does the work of resolving an identifier or a dot - - - - - Does the work of resolving an identifier or a dot, but without a parent node - - - - - Does the work of resolving an identifier or a dot, but without a parent node or alias - - - - - Does the work of resolving inside of the scope of a function call - - - - - Does the work of resolving an an index []. - - - - - An AST node with a path property. This path property will be the fully qualified name. - Author: josh - Ported by: Steve Strong - - - - - Returns the full path name represented by the node. - - the full path name represented by the node. - - - - Sub-classes can override this method if they produce implied joins (e.g. DotNode). - - an implied join created by this from reference. - - - - The full path, to the root alias of this dot node. - - - - - The type of dereference that hapened (DEREF_xxx). - - - - - The identifier that is the name of the property. - - - - - The unresolved property path relative to this dot node. - - - - - The column names that this resolves to. - - - - - Fetch join or not. - - - - - The type of join to create. Default is an inner join. - - - - - Is the given property name a reference to the primary key of the associated - entity construed by the given entity type? - For example, consider a fragment like order.customer.id - (where order is a from-element alias). Here, we'd have: - propertyName = "id" AND - owningType = ManyToOneType(Customer) - and are being asked to determine whether "customer.id" is a reference - to customer's PK... - - The name of the property to check. - The type represeting the entity "owning" the property - True if propertyName references the entity's (owningType->associatedEntity) primary key; false otherwise. - - - - Sets the join type for this '.' node structure. - - - - - Returns the full path of the node. - - - - - Represents the 'FROM' part of a query or subquery, containing all mapped class references. - Author: josh - Ported by: Steve Strong - - - - - Counts the from elements as they are added. - - - - - All of the implicit FROM xxx JOIN yyy elements that are the destination of a collection. These are created from - index operators on collection property references. - - - - - Pointer to the parent FROM clause, if there is one. - - - - - Collection of FROM clauses of which this is the parent. - - - - - Convenience method to check whether a given token represents a from-element alias. - - The potential from-element alias to check. - True if the possibleAlias is an alias to a from-element visible from this point in the query graph. - - - - Returns true if the from node contains the class alias name. - - The HQL class alias name. - true if the from node contains the class alias name. - - - - Returns true if the from node contains the table alias name. - - The SQL table alias name. - true if the from node contains the table alias name. - - - - Adds a new from element to the from node. - - The reference to the class. - The alias AST. - The new FROM element. - - - - Retreives the from-element represented by the given alias. - - The alias by which to locate the from-element. - The from-element assigned the given alias, or null if none. - - - - Returns the list of from elements in order. - - The list of from elements (instances of FromElement). - - - - Returns the list of from elements that will be part of the result set. - - the list of from elements that will be part of the result set. - - - - Look for an existing implicit or explicit join by the given path. - - - - - Currently this is needed in order to deal with {@link FromElement FromElements} which - contain "hidden" JDBC parameters from applying filters. - Would love for this to go away, but that would require that Hibernate's - internal {@link org.hibernate.engine.JoinSequence join handling} be able to either:
    -
  • render the same AST structures
  • -
  • render structures capable of being converted to these AST structures
  • -
- In the interim, this allows us to at least treat these "hidden" parameters properly which is - the most pressing need. - Author: Steve Ebersole - Ported by: Steve Strong -
-
- - - Adds a parameter specification for a parameter encountered within this node. We use the term 'embedded' here - because of the fact that the parameter was simply encountered as part of the node's text; it does not exist - as part of a subtree as it might in a true AST. - - The generated specification. - - - - Retrieve all embedded parameter specifications. - - All embedded parameter specifications; may return null. - - - - Set the renderable text of this node. - - - - - Determine whether this node contans embedded parameters. The implication is that - {@link #getEmbeddedParameters()} is allowed to return null if this method returns false. - - - - - Returns the identifier select SQL fragment. - - The total number of returned types. - The sequence of the current returned type. - the identifier select SQL fragment. - - - - Returns the property select SQL fragment. - - The total number of returned types. - The sequence of the current returned type. - the property select SQL fragment. - - - - Render the identifier select, but in a 'scalar' context (i.e. generate the column alias). - - the sequence of the returned type - the identifier select with the column alias. - - - - Returns true if this FromElement was implied by a path, or false if this FROM element is explicitly declared in - the FROM clause. - - - - - Creates entity from elements. - - - - - - - - Creates collection from elements. - - - - - - - - - - - Delegate that handles the type and join sequence information for a FromElement. - Author: josh - Ported by: Steve Strong - - - - - Returns the identifier select SQL fragment. - - The total number of returned types. - The sequence of the current returned type. - the identifier select SQL fragment. - - - - Render the identifier select, but in a 'scalar' context (i.e. generate the column alias). - - the sequence of the returned type - the identifier select with the column alias. - - - - Returns the property select SQL fragment. - - The total number of returned types. - The sequence of the current returned type. - - the property select SQL fragment. - - - - Returns the type of a property, given it's name (the last part) and the full path. - - The last part of the full path to the property. - The full property path. - The type - - - - This accounts for a quirk in Queryable, where it sometimes generates ', ' in front of the - SQL fragment. :-P - - A SQL fragment. - The fragment, without the leading comma and spaces. - - - - Returns the Hibernate queryable implementation for the HQL class. - - - - - Insert a new node into both the Tree and the Node Array. Add DOWN and UP nodes if needed. - - The parent node - The child node - - - - Count the number of child nodes (including DOWNs and UPs) of a parent node - - The index of the parent in the node array - The number of child nodes - - - - Represents the [] operator and provides it's semantics. - Author: josh - Ported by: Steve Strong - - - - - Author: Steve Ebersole - Ported by: Steve Strong - - - - - Defines a top-level AST node representing an HQL "insert select" statement. - - - - Performs detailed semantic validation on this insert statement tree. - Indicates validation failure. - - - Retreive this insert statement's into-clause. - The into-clause - - - Retreive this insert statement's select-clause. - The select-clause. - - - - Represents an entity referenced in the INTO clause of an HQL - INSERT statement. - - Author: Steve Ebersole - Ported by: Steve Strong - - - - - Returns additional display text for the AST node. - - The additional display text. - - - - Determine whether the two types are "assignment compatible". - - The type defined in the into-clause. - The type defined in the select clause. - True if they are assignment compatible. - - - - Interface for nodes which require access to the SessionFactory - - Author: Steve Ebersole - Ported by: Steve Strong - - - - - IsNotNullLogicOperatorNode implementation - - Author: Steve Ebersole - Ported by: Steve Strong - - - - - Represents a 'is null' check. - - - - - A node representing a static Java constant. - - Author: Steve Ebersole - Ported by: Steve Strong - - - - - Implementation of OrderByClause. - Author: Steve Ebersole - Ported by: Steve Strong - - - - - Implementation of ParameterNode. - Author: Steve Ebersole - Ported by: Steve Strong - - - - - Locate the select clause that is part of this select statement. - Note, that this might return null as derived select clauses (i.e., no - select clause at the HQL-level) get generated much later than when we - get created; thus it depends upon lifecycle. - - Our select clause, or null. - - - - Represents the list of expressions in a SELECT clause. - Author: josh - Ported by: Steve Strong - - - - Prepares a derived (i.e., not explicitly defined in the query) select clause. - - @param fromClause The from clause to which this select clause is linked. - - - Prepares an explicitly defined select clause. - - @param fromClause The from clause linked to this select clause. - @throws SemanticException - - - - FromElements which need to be accounted for in the load phase (either for return or for fetch). - - - - - The column alias names being used in the generated SQL. - - - - - The constructor to use for dynamic instantiation queries. - - - - - The HQL aliases, or generated aliases - - - - - The types actually being returned from this query at the "object level". - - - - - A select expression that was generated by a FROM element. - Author: josh - Ported by: Steve Strong - - - - - Represents an SQL fragment in the AST. - Author: josh - Ported by: Steve Strong - - - - - Defines a top-level AST node representing an HQL update statement. - - - - - Generates class/table/column aliases during semantic analysis and SQL rendering. - Its essential purpose is to keep an internal counter to ensure that the - generated aliases are unique. - - - - - Appends child nodes to a parent efficiently. - - - - - Depth first iteration of an ANTLR AST. - Author: josh - Ported by: Steve Strong - - - - - Returns the 'list' representation with some brackets around it for debugging. - - The tree. - The list representation of the tree. - - - - Determine if a given node (test) is contained anywhere in the subtree - of another given node (fixture). - - The node against which to be checked for children. - The node to be tested as being a subtree child of the parent. - True if child is contained in the parent's collection of children. - - - - Finds the first node of the specified type in the chain of children. - - The parent - The type to find. - The first node of the specified type, or null if not found. - - - - Filters nodes in/out of a tree. - - The node to check. - true to keep the node, false if the node should be filtered out. - - - - Generates the scalar column AST nodes for a given array of SQL columns - - - - - Performs the post-processing of the join information gathered during semantic analysis. - The join generating classes are complex, this encapsulates some of the JoinSequence-related - code. - Author: Joshua Davis - Ported by: Steve Strong - - - - - Constructs a new JoinProcessor. - - The walker to which we are bound, giving us access to needed resources. - - - - Translates an AST join type (i.e., the token type) into a JoinFragment.XXX join type. - - The AST join type (from HqlSqlWalker) - a JoinType.XXX join type. - - - - Indicates that Float and Double literal values should - be treated using the SQL "exact" format (i.e., '.001') - - - - - Indicates that Float and Double literal values should - be treated using the SQL "approximate" format (i.e., '1E-3') - - - - - In what format should Float and Double literal values be sent - to the database? - See #EXACT, #APPROXIMATE - - - - - Traverse the AST tree depth first. Note that the AST passed in is not visited itself. Visitation starts - with its children. - - ast - - - - Turns a path into an AST. - - The path. - The AST factory to use. - An HQL AST representing the path. - - - - Creates synthetic and nodes based on the where fragment part of a JoinSequence. - Author: josh - Ported by: Steve Strong - - - - - Generates translators which uses the Antlr-based parser to perform - the translation. - - Author: Gavin King - Ported by: Steve Strong - - - - - Facade for generation of - and instances. - - - - - Construct a instance - capable of translating an HQL query string. - - - The query-identifier (used in collection). - This is typically the same as the queryString parameter except for the case of - split polymorphic queries which result in multiple physical sql queries. - - The query string to be translated - Currently enabled filters - The session factory - An appropriate translator. - - - - Construct a instance capable of - translating an HQL filter string. - - - The query-identifier (used in collection). - This is typically the same as the queryString parameter except for the case of - split polymorphic queries which result in multiple physical sql queries. - - The query string to be translated - Currently enabled filters - The session factory - An appropriate translator. - - - - Look ahead for tokenizing is all lowercase, whereas the original case of an input stream is preserved. - Copied from http://www.antlr.org/wiki/pages/viewpage.action?pageId=1782 - - - - - Provides a map of collection function names to the corresponding property names. - Authoer: josh - Ported by: Steve Strong - - - - - A problem occurred translating a Hibernate query to SQL due to invalid query syntax, etc. - - - - - Initializes a new instance of the class. - - The message that describes the error. - - - - Initializes a new instance of the class. - - The message that describes the error. - - The exception that is the cause of the current exception. If the innerException parameter - is not a null reference, the current exception is raised in a catch block that handles - the inner exception. - - - - - Initializes a new instance of the class. - - The message that describes the error. - The query that contains the error. - - - - Initializes a new instance of the class. - - - The exception that is the cause of the current exception. If the innerException parameter - is not a null reference, the current exception is raised in a catch block that handles - the inner exception. - - - - - Initializes a new instance of the class - with serialized data. - - - The that holds the serialized object - data about the exception being thrown. - - - The that contains contextual information about the source or destination. - - - - - Sets the serialization info for after - getting the info from the base Exception. - - - The that holds the serialized object - data about the exception being thrown. - - - The that contains contextual information about the source or destination. - - - - - Gets or sets the of HQL that caused the Exception. - - - - - Gets a message that describes the current . - - The error message that explains the reason for this exception including the HQL. - - - - An error handler that counts parsing errors and warnings. - - - - - Defines the behavior of an error handler for the HQL parsers. - Author: josh - Ported by: Steve Strong - - - - - A custom token class for the HQL grammar. - - - - - The previous token type. - - - - - Public constructor - - - - - Returns a string representation of the object. - - The debug string - - - - Indicates if the token could be an identifier. - - - - - Gets or Sets the type of the token, remembering the previous type on Sets. - - - - - Returns the previous token type. - - - - - Exception thrown when an invalid path is found in a query. - Author: josh - Ported by: Steve Strong - - - - - Specialized interface for filters. - - - - - Defines the constract of an HQL->SQL translator. - - - - - Compile a "normal" query. This method may be called multiple times. Subsequent invocations are no-ops. - - Defined query substitutions. - Does this represent a shallow (scalar or entity-id) select? - There was a problem parsing the query string. - There was a problem querying defined mappings. - - - - Perform a list operation given the underlying query definition. - - The session owning this query. - The query bind parameters. - The query list results. - - - - - Perform a bulk update/delete operation given the underlying query defintion. - - The query bind parameters. - The session owning this query. - The number of entities updated or deleted. - - - - - Returns the column names in the generated SQL. - - the column names in the generated SQL. - - - - Information about any parameters encountered during translation. - - - - - The set of query spaces (table names) that the query referrs to. - - - - - The SQL string generated by the translator. - - - - - The HQL string processed by the translator. - - - - - Returns the filters enabled for this query translator. - - Filters enabled for this query execution. - - - - Returns an array of Types represented in the query result. - - Query return types. - - - - Returns an array of HQL aliases - - Returns an array of HQL aliases - - - - Does the translated query contain collection fetches? - - True if the query does contain collection fetched; false otherwise. - - - - Compile a filter. This method may be called multiple - times. Subsequent invocations are no-ops. - - the role name of the collection used as the basis for the filter. - Defined query substitutions. - Does this represent a shallow (scalar or entity-id) select? - - - - Creates a new AST-based query translator. - - The query-identifier (used in stats collection) - The hql query to translate - Currently enabled filters - The session factory constructing this translator instance. - - - - Compile a "normal" query. This method may be called multiple - times. Subsequent invocations are no-ops. - - Defined query substitutions. - Does this represent a shallow (scalar or entity-id) select? - - - - Compile a filter. This method may be called multiple - times. Subsequent invocations are no-ops. - - the role name of the collection used as the basis for the filter. - Defined query substitutions. - Does this represent a shallow (scalar or entity-id) select? - - - - Performs both filter and non-filter compiling. - - Defined query substitutions. - Does this represent a shallow (scalar or entity-id) select? - the role name of the collection used as the basis for the filter, NULL if this is not a filter. - - - - Construct a new SessionFactoryHelperExtensions instance. - - The SessionFactory impl to be encapsulated. - - - - Locate a registered sql function by name. - - The name of the function to locate - The sql function, or null if not found. - - - - Locate a registered sql function by name. - - The name of the function to locate - The sql function, or throws QueryException if no matching sql functions could be found. - - - - Find the function return type given the function name and the first argument expression node. - - The function name. - The first argument expression. - the function return type given the function name and the first argument expression node. - - - - Given a (potentially unqualified) class name, locate its imported qualified name. - - The potentially unqualified class name - The qualified class name. - - - - Does the given persister define a physical discriminator column - for the purpose of inheritence discrimination? - - The persister to be checked. - True if the persister does define an actual discriminator column. - - - - Locate the collection persister by the collection role. - - The collection role name. - The defined CollectionPersister for this collection role, or null. - - - - Determine the name of the property for the entity encapsulated by the - given type which represents the id or unique-key. - - The type representing the entity. - The corresponding property name - - - - Retrieves the column names corresponding to the collection elements for the given - collection role. - - The collection role - The sql column-qualification alias (i.e., the table alias) - the collection element columns - - - - Essentially the same as GetElementType, but requiring that the - element type be an association type. - - The collection type to be checked. - The AssociationType of the elements of the collection. - - - - Locate the collection persister by the collection role, requiring that - such a persister exist. - - The collection role name. - The defined CollectionPersister for this collection role. - - - - Locate the persister by class or entity name, requiring that such a persister - exist. - - The class or entity name - The defined persister for this entity - - - - Given a (potentially unqualified) class name, locate its persister. - - The (potentially unqualified) class name. - The defined persister for this class, or null if none found. - - - - Given a (potentially unqualified) class name, locate its persister. - - The session factory implementor. - The (potentially unqualified) class name. - The defined persister for this class, or null if none found. - - - - Locate the persister by class or entity name. - - The class or entity name - The defined persister for this entity, or null if none found. - - - - Create a join sequence rooted at the given collection. - - The persister for the collection at which the join should be rooted. - The alias to use for qualifying column references. - The generated join sequence. - - - - Generate an empty join sequence instance. - - The generated join sequence. - - - - Generate a join sequence representing the given association type. - - Should implicit joins (theta-style) or explicit joins (ANSI-style) be rendered - The type representing the thing to be joined into. - The table alias to use in qualifing the join conditions - The type of join to render (inner, outer, etc) - The columns making up the condition of the join. - The generated join sequence. - - - - Retreive a PropertyMapping describing the given collection role. - - The collection role for whcih to retrieve the property mapping. - The property mapping. - - - - Given a collection type, determine the Type representing elements - within instances of that collection. - - The collection type to be checked. - The Type of the elements of the collection. - - - - Generates translators which uses the older hand-written parser to perform the translation. - - - - - Parses the hibernate query into its constituent clauses. - - - - - A parser is a state machine that accepts a string of tokens, - bounded by start() and end() and modifies a QueryTranslator. Parsers - are NOT intended to be threadsafe. They SHOULD be reuseable - for more than one token stream. - - - - - - - - - - - - - - - - - - - - - - - - Parses the from clause of a hibernate query, looking for tables and - aliases for the SQL query. - - - - - - - - FromPathExpressionParser - - - - - Parses an expression of the form foo.bar.baz and builds up an expression - involving two less table joins than there are path components. - - - - - - - - - - NOTE: we avoid joining to the next table if the named property is just the foreign key value - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Used to hold column type in nested functions. - - - - - Parses the GROUP BY clause of an aggregate query - - - - - Parses the having clause of a hibernate query and translates it to an - SQL having clause. - - - - Parses the where clause of a hibernate query and translates it to an - SQL where clause. - - - - - - - - - - - - - - - - - - - - - - - - Parses the ORDER BY clause of a query - - - - - - - HQL lexical analyzer (not really a parser) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - An instance of QueryTranslator translates a Hibernate query string to SQL. - - - - Construct a query translator - - A unique identifier for the query of which this - translation is part; typically this is the original, user-supplied query string. - - - The "preprocessed" query string; at the very least - already processed by {@link org.hibernate.hql.QuerySplitter}. - - Any enabled filters. - The session factory. - - - - Construct a query translator - - - - - Compile a subquery - - - - - - Compile a "normal" query. This method may be called multiple - times. Subsequent invocations are no-ops. - - - - - Compile a filter. This method may be called multiple - times. Subsequent invocations are no-ops. - - - - - Compile the query (generate the SQL). - - - - - WARNING: side-effecty - - - - - Extract the complete clause of function. - - The list of tokens - The index of the list that represent the founded function. - String trepresentation of each token. - Each token can be string or SqlString - - - Used for collection filters - - - - - - - Persisters for the return values of a List style query - - - The Persisters stored by QueryTranslator have to be . The - setter will attempt to cast the ILoadable array passed in into an - IQueryable array. - - - - - Types of the return values of an Enumerate() style query. - Return an array of s. - - - - - - - - Is this query called by Scroll() or Iterate()? - - true if it is, false if it is called by find() or list() - - - - - - - - - - Parsers the select clause of a hibernate query, looking - for a table (well, really class) alias. - - - - - - - - - - - - - - - - - - - - - - - Wraps SessionFactoryImpl, adding more lookup behaviors and encapsulating some of the error handling. - - - - - Locate the collection persister by the collection role. - - The collection role name. - The defined CollectionPersister for this collection role, or null. - - - - Locate the persister by class or entity name, requiring that such a persister - exists - - The class or entity name - The defined persister for this entity - - - - Locate the persister by class or entity name. - - The class or entity name - The defined persister for this entity, or null if none found. - - - - Retreive a PropertyMapping describing the given collection role. - - The collection role for whcih to retrieve the property mapping. - The property mapping. - - - - Provides utility methods for generating HQL / SQL names. - Shared by both the 'classic' and 'new' query translators. - - - - - Handle Hibernate "implicit" polymorphism, by translating the query string into - several "concrete" queries against mapped classes. - - - - - - - - - Contract for providing callback access to a , - typically from the . - - - - Retrieve the next value from the underlying source. - - - - Encapsulates definition of the underlying data structure backing a sequence-style generator. - - - - - A callback to be able to get the next value from the underlying - structure as needed. - - The session. - The next value. - - - - Prepare this structure for use. Called sometime after instantiation, - but before first use. - - The optimizer being applied to the generator. - - - Commands needed to create the underlying structures. - The database dialect being used. - The creation commands. - - - Commands needed to drop the underlying structures. - The database dialect being used. - The drop commands. - - - The name of the database structure (table or sequence). - - - How many times has this structure been accessed through this reference? - - - The configured increment size - - - - Performs optimization on an optimizable identifier generator. Typically - this optimization takes the form of trying to ensure we do not have to - hit the database on each and every request to get an identifier value. - - - - Optimizers work on constructor injection. They should provide - a constructor with the following arguments. - - - The return type for the generated values. - - int The increment size. - - - - - Generate an identifier value accounting for this specific optimization. - - Callback to access the underlying value source. - The generated identifier value. - - - - A common means to access the last value obtained from the underlying - source. This is intended for testing purposes, since accessing the - unerlying database source directly is much more difficult. - - - The last value we obtained from the underlying source; - -1 indicates we have not yet consulted with the source. - - - - - Defined increment size. - - The increment size. - - - - - Are increments to be applied to the values stored in the underlying - value source? - - - True if the values in the source are to be incremented - according to the defined increment size; false otherwise, in which - case the increment is totally an in memory construct. - - - - - Describes a sequence. - - - - - An that requires creation of database objects - All s that also implement - An have access to a special mapping parameter: schema - - - - - The general contract between a class that generates unique - identifiers and the . - - - - It is not intended that this interface ever be exposed to the - application. It is intended that users implement this interface - to provide custom identifier generation strategies. - - - Implementors should provide a public default constructor. - - - Implementations that accept configuration parameters should also - implement . - - - Implementors must be threadsafe. - - - - - - Generate a new identifier - - The this id is being generated in. - The entity for which the id is being generated. - The new identifier - - - - The SQL required to create the underlying database objects - - The to help with creating the sql. - - An array of objects that contain the sql to create the - necessary database objects. - - - - - The SQL required to remove the underlying database objects - - The to help with creating the sql. - - A that will drop the database objects. - - - - - Return a key unique to the underlying database objects. - - - A key unique to the underlying database objects. - - - Prevents us from trying to create/remove them multiple times - - - - - An IdentiferGenerator that supports "configuration". - - - - - Configure this instance, given the values of parameters - specified by the user as <param> elements. - This method is called just once, followed by instantiation. - - The the identifier should be. - An of Param values that are keyed by parameter name. - The to help with Configuration. - - - - Describes a table used to mimic sequence behavior - - - - - Abstract InsertGeneratedIdentifierDelegate implementation where the - underlying strategy causes the generated identitifer to be returned as an - effect of performing the insert statement. Thus, there is no need for an - additional sql statement to determine the generated identitifer. - - - - - Responsible for handling delegation relating to variants in how - insert-generated-identifier generator strategies dictate processing: -
    -
  • building the sql insert statement
  • -
  • determination of the generated identifier value
  • -
-
-
- - - Build a specific to the delegate's mode - of handling generated key values. - - The insert object. - - - - Perform the indicated insert SQL statement and determine the identifier value generated. - - - - - The generated identifier value. - - - - Abstract InsertGeneratedIdentifierDelegate implementation where the - underlying strategy requires an subsequent select after the insert - to determine the generated identifier. - - - - Extract the generated key value from the given result set. - The session - The result set containing the generated primay key values. - The entity being saved. - The generated identifier - - - Bind any required parameter values into the SQL command . - The session - The prepared command - The entity being saved. - - - Get the SQL statement to be used to retrieve generated key values. - The SQL command string - - - - Types of any required parameter values into the SQL command . - - - - - Nothing more than a distinguishing subclass of Insert used to indicate - intent. - Some subclasses of this also provided some additional - functionality or semantic to the genernated SQL statement string. - - - - - A class that builds an INSERT sql statement. - - - - - - - - Builds a SqlString from the internal data. - - A valid SqlString that can be converted into an IDbCommand - - - - Adds the Property's columns to the INSERT sql - - The column name for the Property - The IType of the property. - The SqlInsertBuilder. - The column will be associated with a parameter. - - - - Add a column with a specific value to the INSERT sql - - The name of the Column to add. - The value to set for the column. - The NHibernateType to use to convert the value to a sql string. - The SqlInsertBuilder. - - - - Add a column with a specific value to the INSERT sql - - The name of the Column to add. - A valid sql string to set as the value of the column. - The SqlInsertBuilder. - - - - Specialized IdentifierGeneratingInsert which appends the database - specific clause which signifies to return generated IDENTITY values - to the end of the insert statement. - - - - - Disable comments on insert. - - - - - implementation where the - underlying strategy causes the generated identitifer to be returned, as an - effect of performing the insert statement, in a Output parameter. - Thus, there is no need for an additional sql statement to determine the generated identitifer. - - - - - Specialized IdentifierGeneratingInsert which appends the database - specific clause which signifies to return generated identifier values - to the end of the insert statement. - - - - - - - The IdentityGenerator for autoincrement/identity key generation. - - The this id is being generated in. - The entity the id is being generated for. - - IdentityColumnIndicator Indicates to the Session that identity (i.e. identity/autoincrement column) - key generation should be used. - - - - - An that returns the current identifier - assigned to an instance. - - -

- This id generation strategy is specified in the mapping file as - <generator class="assigned" /> -

-
-
- - - Generates a new identifier by getting the value of the identifier - for the obj parameter. - - The this id is being generated in. - The entity for which the id is being generated. - The value that was assigned to the mapped id's property. - - Thrown when a is passed in as the obj or - if the identifier of obj is null. - - - - - An that returns a Int64 constructed from the system - time and a counter value. Not safe for use in a clustser! - - - - - An that uses the value of - the id property of an associated object - - - - This id generation strategy is specified in the mapping file as - - <generator class="foreign"> - <param name="property">AssociatedObject</param> - </generator> - - - The mapping parameter property is required. - - - - - Generates an identifer from the value of a Property. - - The this id is being generated in. - The entity for which the id is being generated. - - The identifier value from the associated object or - if the session - already contains obj. - - - - - Configures the ForeignGenerator by reading the value of property - from the parms parameter. - - The the identifier should be. - An of Param values that are keyed by parameter name. - The to help with Configuration. - - Thrown if the key property is not found in the parms parameter. - - - - - An that generates values - using a strategy suggested Jimmy Nilsson's - article - on informit.com. - - -

- This id generation strategy is specified in the mapping file as - <generator class="guid.comb" /> -

-

- The comb algorithm is designed to make the use of GUIDs as Primary Keys, Foreign Keys, - and Indexes nearly as efficient as ints. -

-

- This code was contributed by Donald Mull. -

-
-
- - - Generate a new using the comb algorithm. - - The this id is being generated in. - The entity for which the id is being generated. - The new identifier as a . - - - - Generate a new using the comb algorithm. - - - - - An that generates values - using Guid.NewGuid(). - - -

- This id generation strategy is specified in the mapping file as - <generator class="guid" /> -

-
-
- - - Generate a new for the identifier. - - The this id is being generated in. - The entity for which the id is being generated. - The new identifier as a . - - - - Thrown by implementation class when ID generation fails - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The message that describes the error. - - - - Initializes a new instance of the class. - - The message that describes the error. - - The exception that is the cause of the current exception. If the innerException parameter - is not a null reference, the current exception is raised in a catch block that handles - the inner exception. - - - - - Initializes a new instance of the class - with serialized data. - - - The that holds the serialized object - data about the exception being thrown. - - - The that contains contextual information about the source or destination. - - - - - Factory methods for IdentifierGenerator framework. - - -

The built in strategies for identifier generation in NHibernate are:

- - - strategy - Implementation of strategy - - - assigned - - - - counter - - - - foreign - - - - guid - - - - guid.comb - - - - guid.native - - - - hilo - - - - identity - - - - native - - Chooses between , - , and based on the - 's capabilities. - - - - seqhilo - - - - sequence - - - - uuid.hex - - - - uuid.string - - - -
-
- - Get the generated identifier when using identity columns - The to read the identifier value from. - The the value should be converted to. - The the value is retrieved in. - The value for the identifier. - - - - Gets the value of the identifier from the and - ensures it is the correct . - - The to read the identifier value from. - The the value should be converted to. - The the value is retrieved in. - - The value for the identifier. - - - Thrown if there is any problem getting the value from the - or with converting it to the . - - - - - An where the key is the strategy and - the value is the for the strategy. - - - - - When this is returned by Generate() it indicates that the object - has already been saved. - - - String.Empty - - - - - When this is return - - - - - Initializes the static fields in . - - - - - Creates an from the named strategy. - - - The name of the generator to create. This can be one of the NHibernate abbreviations (ie - native, - sequence, guid.comb, etc...), a full class name if the Type is in the NHibernate assembly, or - a full type name if the strategy is in an external assembly. - - The that the retured identifier should be. - An of <param> values from the mapping. - The to help with Configuration. - - An instantiated and configured . - - - Thrown if there are any exceptions while creating the . - - - - - Create the correct boxed for the identifier. - - The value of the new identifier. - The the identifier should be. - - The identifier value converted to the . - - - The type parameter must be an , , - or . - - - - - An that indicates to the that identity - (ie. identity/autoincrement column) key generation should be used. - - -

- This id generation strategy is specified in the mapping file as - <generator class="identity" /> - or if the database natively supports identity columns - <generator class="native" /> -

-

- This indicates to NHibernate that the database generates the id when - the entity is inserted. -

-
-
- - - Delegate for dealing with IDENTITY columns where the dialect supports returning - the generated IDENTITY value directly from the insert statement. - - - - - Delegate for dealing with IDENTITY columns where the dialect requires an - additional command execution to retrieve the generated IDENTITY value - - - - The configuration parameter holding the entity name - - - - An IIdentifierGenerator that returns a Int64, constructed by - counting from the maximum primary key value at startup. Not safe for use in a - cluster! - - - - java author Gavin King, .NET port Mark Holden - - - Mapping parameters supported, but not usually needed: table, column. - - - - - - - - - - - - - - - - - - - - - The configuration parameter holding the schema name - - - - The configuration parameter holding the table name for the - generated id - - - - - The configuration parameter holding the table names for all - tables for which the id must be unique - - - - - The configuration parameter holding the primary key column - name of the generated id - - - - The configuration parameter holding the catalog name - - - - A persister that may have an identity assigned by execution of a SQL INSERT. - - - - - Get a SQL select string that performs a select based on a unique - key determined by the given property name). - - - The name of the property which maps to the - column(s) to use in the select statement restriction. - - The SQL select string - - - - Get the database-specific SQL command to retrieve the last - generated IDENTITY value. - - - - The names of the primary key columns in the root table. - The primary key column names. - - - - Get the identifier type - - - - - Generates Guid values using the server side Guid function. - - - - - A generator that selects the just inserted row to determine the identifier - value assigned by the database. The correct row is located using a unique key. - - One mapping parameter is required: key (unless a natural-id is defined in the mapping). - - - The delegate for the select generation strategy. - - - - An that generates Int64 values using an - oracle-style sequence. A higher performance algorithm is - . - - -

- This id generation strategy is specified in the mapping file as - - <generator class="sequence"> - <param name="sequence">uid_sequence</param> - <param name="schema">db_schema</param> - </generator> - -

-

- The sequence parameter is required while the schema is optional. -

-
-
- - - The name of the sequence parameter. - - - - - The parameters parameter, appended to the create sequence DDL. - For example (Oracle): INCREMENT BY 1 START WITH 1 MAXVALUE 100 NOCACHE. - - - - - Configures the SequenceGenerator by reading the value of sequence and - schema from the parms parameter. - - The the identifier should be. - An of Param values that are keyed by parameter name. - The to help with Configuration. - - - - Generate an , , or - for the identifier by using a database sequence. - - The this id is being generated in. - The entity for which the id is being generated. - The new identifier as a , , or . - - - - The SQL required to create the database objects for a SequenceGenerator. - - The to help with creating the sql. - - An array of objects that contain the Dialect specific sql to - create the necessary database objects for the SequenceGenerator. - - - - - The SQL required to remove the underlying database objects for a SequenceGenerator. - - The to help with creating the sql. - - A that will drop the database objects for the SequenceGenerator. - - - - - Return a key unique to the underlying database objects for a SequenceGenerator. - - - The configured sequence name. - - - - - An that combines a hi/lo algorithm with an underlying - oracle-style sequence that generates hi values. - - -

- This id generation strategy is specified in the mapping file as - - <generator class="seqhilo"> - <param name="sequence">uid_sequence</param> - <param name="max_lo">max_lo_value</param> - <param name="schema">db_schema</param> - </generator> - -

-

- The sequence parameter is required, the max_lo and schema are optional. -

-

- The user may specify a max_lo value to determine how often new hi values are - fetched. If sequences are not avaliable, TableHiLoGenerator might be an - alternative. -

-
-
- - - The name of the maximum low value parameter. - - - - - Configures the SequenceHiLoGenerator by reading the value of sequence, max_lo, - and schema from the parms parameter. - - The the identifier should be. - An of Param values that are keyed by parameter name. - The to help with Configuration. - - - - Generate an , , or - for the identifier by using a database sequence. - - The this id is being generated in. - The entity for which the id is being generated. - The new identifier as a , , or . - - - - A generator which combines sequence generation with immediate retrieval - by attaching a output parameter to the SQL command - In this respect it works much like ANSI-SQL IDENTITY generation. - - - - - An that uses a database table to store the last - generated value. - - -

- It is not intended that applications use this strategy directly. However, - it may be used to build other (efficient) strategies. The return type is - System.Int32 -

-

- The hi value MUST be fetched in a seperate transaction to the ISession - transaction so the generator must be able to obtain a new connection and commit it. - Hence this implementation may not be used when the user is supplying connections. -

-

- The mapping parameters table and column are required. -

-
-
- - - An additional where clause that is added to - the queries against the table. - - - - - The name of the column parameter. - - - - - The name of the table parameter. - - - - Default column name - - - Default table name - - - - Configures the TableGenerator by reading the value of table, - column, and schema from the parms parameter. - - The the identifier should be. - An of Param values that are keyed by parameter name. - The to help with Configuration. - - - - Generate a , , or - for the identifier by selecting and updating a value in a table. - - The this id is being generated in. - The entity for which the id is being generated. - The new identifier as a , , or . - - - - The SQL required to create the database objects for a TableGenerator. - - The to help with creating the sql. - - An array of objects that contain the Dialect specific sql to - create the necessary database objects and to create the first value as 1 - for the TableGenerator. - - - - - The SQL required to remove the underlying database objects for a TableGenerator. - - The to help with creating the sql. - - A that will drop the database objects for the TableGenerator. - - - - - Return a key unique to the underlying database objects for a TableGenerator. - - - The configured table name. - - - - - An that returns an Int64, constructed using - a hi/lo algorithm. - - -

- This id generation strategy is specified in the mapping file as - - <generator class="hilo"> - <param name="table">table</param> - <param name="column">id_column</param> - <param name="max_lo">max_lo_value</param> - <param name="schema">db_schema</param> - </generator> - -

-

- The table and column parameters are required, the max_lo and - schema are optional. -

-

- The hi value MUST be fecthed in a seperate transaction to the ISession - transaction so the generator must be able to obtain a new connection and - commit it. Hence this implementation may not be used when the user is supplying - connections. In that case a would be a - better choice (where supported). -

-
-
- - - The name of the max lo parameter. - - - - - Configures the TableHiLoGenerator by reading the value of table, - column, max_lo, and schema from the parms parameter. - - The the identifier should be. - An of Param values that are keyed by parameter name. - The to help with Configuration. - - - - Generate a for the identifier by selecting and updating a value in a table. - - The this id is being generated in. - The entity for which the id is being generated. - The new identifier as a . - - - - An that returns a string of length - 32, 36, or 38 depending on the configuration. - - -

- This id generation strategy is specified in the mapping file as - - <generator class="uuid.hex"> - <param name="format">format_string</param> - <param name="seperator">seperator_string</param> - </generator> - -

-

- The format and seperator parameters are optional. -

-

- The identifier string will consist of only hex digits. Optionally, the identifier string - may be generated with enclosing characters and seperators between each component - of the UUID. If there are seperators then the string length will be 36. If a format - that has enclosing brackets is used, then the string length will be 38. -

-

- format is either - "N" (xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx), - "D" (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx), - "B" ({xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}), - or "P" ((xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)). These formats are described in - the Guid.ToString(String) method. - If no format is specified the default is "N". -

-

- seperator is the char that will replace the "-" if specified. If no value is - configured then the default seperator for the format will be used. If the format "D", "B", or - "P" is specified, then the seperator will replace the "-". If the format is "N" then this - parameter will be ignored. -

-

- This class is based on -

-
-
- - - Generate a new for the identifier using the "uuid.hex" algorithm. - - The this id is being generated in. - The entity for which the id is being generated. - The new identifier as a . - - - - Configures the UUIDHexGenerator by reading the value of format and - seperator from the parms parameter. - - The the identifier should be. - An of Param values that are keyed by parameter name. - The to help with Configuration. - - - - Generate a Guid into a string using the format. - - A new Guid string - - - - An that returns a string of length - 16. - - -

- This id generation strategy is specified in the mapping file as - <generator class="uuid.string" /> -

- - The identifier string will NOT consist of only alphanumeric characters. Use - this only if you don't mind unreadable identifiers. - - - This impelementation was known to be incompatible with Postgres. - -
-
- - - Generate a new for the identifier using the "uuid.string" algorithm. - - The this id is being generated in. - The entity for which the id is being generated. - The new identifier as a . - - - - Base class to create queries in "detached mode" where the NHibernate session is not available. - - - - - The behaviour of each method is basically the same of methods. - The main difference is on : - If you mix with named parameters setter, if same param name are found, - the value of the parameter setter override the value read from the POCO. - - - - - Interface to create queries in "detached mode" where the NHibernate session is not available. - All methods have the same semantics as the corresponding methods of the interface. - - - - - Get an executable instance of , - to actually run the query. - - - - Set the maximum number of rows to retrieve. - - The maximum number of rows to retreive. - - - - Sets the first row to retrieve. - - The first row to retreive. - - - - Enable caching of this query result set. - - Should the query results be cacheable? - - - Set the name of the cache region. - The name of a query cache region, or - for the default query cache - - - - Entities retrieved by this query will be loaded in - a read-only mode where Hibernate will never dirty-check - them or make changes persistent. - - Enable/Disable read -only mode - - - - The timeout for the underlying ADO query - - - - - Set a fetch size for the underlying ADO query. - the fetch size - - - - Set the lockmode for the objects idententified by the - given alias that appears in the FROM clause. - - alias a query alias, or this for a collection filter - - - - Add a comment to the generated SQL. - a human-readable string - - - - Bind a value to an indexed parameter. - - Position of the parameter in the query, numbered from 0 - The possibly null parameter value - The Hibernate type - - - - Bind a value to a named query parameter - - The name of the parameter - The possibly null parameter value - The NHibernate . - - - - Bind a value to an indexed parameter, guessing the Hibernate type from - the class of the given object. - - The position of the parameter in the query, numbered from 0 - The non-null parameter value - - - - Bind a value to a named query parameter, guessing the NHibernate - from the class of the given object. - - The name of the parameter - The non-null parameter value - - - - Bind multiple values to a named query parameter. This is useful for binding a list - of values to an expression such as foo.bar in (:value_list) - - The name of the parameter - A collection of values to list - The Hibernate type of the values - - - - Bind multiple values to a named query parameter, guessing the Hibernate - type from the class of the first object in the collection. This is useful for binding a list - of values to an expression such as foo.bar in (:value_list) - - The name of the parameter - A collection of values to list - - - - Bind the property values of the given object to named parameters of the query, - matching property names with parameter names and mapping property types to - Hibernate types using heuristics. - - Any POCO - - - - Bind an instance of a to an indexed parameter - using an NHibernate . - - The position of the parameter in the query string, numbered from 0 - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a array to an indexed parameter - using an NHibernate . - - The position of the parameter in the query string, numbered from 0 - A non-null instance of a array. - - - - Bind an instance of a array to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a array. - - - - Bind an instance of a to an indexed parameter - using an NHibernate . - - The position of the parameter in the query string, numbered from 0 - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a to an indexed parameter - using an NHibernate . - - The position of the parameter in the query string, numbered from 0 - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a to an indexed parameter - using an NHibernate . - - The position of the parameter in the query string, numbered from 0 - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a to an indexed parameter - using an NHibernate . - - The position of the parameter in the query string, numbered from 0 - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - A non-null instance of a . - The name of the parameter - - - - Bind an instance of a to an indexed parameter - using an NHibernate . - - The position of the parameter in the query string, numbered from 0 - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a to an indexed parameter - using an NHibernate . - - The position of the parameter in the query string, numbered from 0 - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a mapped persistent class to an indexed parameter. - - Position of the parameter in the query string, numbered from 0 - A non-null instance of a persistent class - - - - Bind an instance of a mapped persistent class to a named parameter. - - The name of the parameter - A non-null instance of a persistent class - - - - Bind an instance of a persistent enumeration class to an indexed parameter - using an NHibernate . - - The position of the parameter in the query string, numbered from 0 - A non-null instance of a persistent enumeration - - - - Bind an instance of a persistent enumeration class to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a persistent enumeration - - - - Bind an instance of a to an indexed parameter - using an NHibernate . - - The position of the parameter in the query string, numbered from 0 - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a to an indexed parameter - using an NHibernate . - - The position of the parameter in the query string, numbered from 0 - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a to an indexed parameter - using an NHibernate . - - The position of the parameter in the query string, numbered from 0 - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a to an indexed parameter - using an NHibernate . - - The position of the parameter in the query string, numbered from 0 - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a to an indexed parameter - using an NHibernate . - - The position of the parameter in the query string, numbered from 0 - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a to an indexed parameter - using an NHibernate . - - The position of the parameter in the query string, numbered from 0 - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a to an indexed parameter - using an NHibernate . - - The position of the parameter in the query string, numbered from 0 - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The position of the parameter in the query string, numbered from 0 - An instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - An instance of a . - - - - Override the current session flush mode, just for this query. - - - - - Set a strategy for handling the query results. This can be used to change - "shape" of the query result. - - - - - Set the value to ignore unknown parameters names. - - True to ignore unknown parameters names. - - - Override the current session cache mode, just for this query. - The cache mode to use. - this (for method chaining) - - - - Interface for DetachedQuery implementors. - - - When you are working with queries in "detached mode" you may need some additional services like clone, - copy of parameters from another query and so on. - - - - - Copy all properties to a given . - - The given . - - Usually the implementation use to set properties to the . - This mean that existing properties are merged/overriden. - - - - - Set only parameters to a given . - - The given . - - Existing parameters are merged/overriden. - - - - - Override all properties reading new values from a given . - - The given origin. - - - - Override all parameters reading new values from a given . - - The given origin. - - - Override the current session cache mode, just for this query. - The cache mode to use. - this (for method chaining) - - - - Fill all properties. - - The . - - Query properties are overriden/merged. - - - - - Copy all properties to a given . - - The given . - - The method use to set properties of . - - - - - Set only parameters to a given . - - The given . - - The method use to set properties of . - Existing parameters in are merged/overriden. - - - - - Clear all existing parameters and copy new parameters from a given origin. - - The origin of parameters. - The current instance - If is null. - - - - Abstract implementation of the IQuery interface. - - - - - An object-oriented representation of a NHibernate query. - - - An IQuery instance is obtained by calling ISession.CreateQuery(). This interface - exposes some extra functionality beyond that provided by ISession.Iterate() and - ISession.List(); - - - A particulare page of the result set may be selected by calling - SetMaxResults(), SetFirstResult(). The generated sql - depends on the capabilities of the . Some - Dialects are for databases that have built in paging (LIMIT) and those capabilities - will be used to limit the number of records returned by the sql statement. - If the database does not support LIMITs then all of the records will be returned, - but the objects created will be limited to the specific results requested. - - Named query parameters may be used - - - Named query parameters are tokens of the form :name in the query string. A value is bound - to the Int32 parameter :foo by calling - - SetParameter("foo", foo, NHibernateUtil.Int32); - - for example. A name may appear multiple times in the query string. - - - Unnamed parameters ? are also supported. To bind a value to an unnamed - parameter use a Set method that accepts an Int32 positional argument - numbered from - zero. - - - You may not mix and match unnamed parameters and named parameters in the same query. - - - Queries are executed by calling List() or Iterate(). A query - may be re-executed by subsequent invocations. Its lifespan is, however, bounded by the lifespan - of the ISession that created it. - - - Implementors are not intended to be threadsafe. - - - - - - Return the query results as an . If the query contains multiple results - per row, the results are returned in an instance of object[]. - - -

- Entities returned as results are initialized on demand. The first SQL query returns - identifiers only. -

-

- This is a good strategy to use if you expect a high number of the objects - returned to be already loaded in the or in the 2nd level cache. -

-
-
- - - Strongly-typed version of . - - - - - - - Return the query results as an . If the query contains multiple results per row, - the results are returned in an instance of object[]. - - The filled with the results. - - This is a good strategy to use if you expect few of the objects being returned are already loaded - or if you want to fill the 2nd level cache. - - - - - Return the query results an place them into the . - - The to place the results in. - - - - Strongly-typed version of . - - - - - Convenience method to return a single instance that matches - the query, or null if the query returns no results. - - the single result or - - Thrown when there is more than one matching result. - - - - - Strongly-typed version of . - - - - - Execute the update or delete statement. - - The number of entities updated or deleted. - - - - Set the maximum number of rows to retrieve. - - The maximum number of rows to retreive. - - - - Sets the first row to retrieve. - - The first row to retreive. - - - - Entities retrieved by this query will be loaded in - a read-only mode where Hibernate will never dirty-check - them or make changes persistent. - - - - - Enable caching of this query result set. - - Should the query results be cacheable? - - - Set the name of the cache region. - The name of a query cache region, or - for the default query cache - - - - The timeout for the underlying ADO query - - - - - Set a fetch size for the underlying ADO query. - the fetch size - - - - Set the lockmode for the objects idententified by the - given alias that appears in the FROM clause. - - alias a query alias, or this for a collection filter - - - - Add a comment to the generated SQL. - a human-readable string - - - - Override the current session flush mode, just for this query. - - - - Override the current session cache mode, just for this query. - The cache mode to use. - this (for method chaining) - - - - Bind a value to an indexed parameter. - - Position of the parameter in the query, numbered from 0 - The possibly null parameter value - The Hibernate type - - - - Bind a value to a named query parameter - - The name of the parameter - The possibly null parameter value - The NHibernate . - - - - Bind a value to an indexed parameter. - - Position of the parameter in the query, numbered from 0 - The possibly null parameter value - The parameter's - - - - Bind a value to a named query parameter - - The name of the parameter - The possibly null parameter value - The parameter's - - - - Bind a value to an indexed parameter, guessing the Hibernate type from - the class of the given object. - - The position of the parameter in the query, numbered from 0 - The non-null parameter value - - - - Bind a value to a named query parameter, guessing the NHibernate - from the class of the given object. - - The name of the parameter - The non-null parameter value - - - - Bind multiple values to a named query parameter. This is useful for binding a list - of values to an expression such as foo.bar in (:value_list) - - The name of the parameter - A collection of values to list - The Hibernate type of the values - - - - Bind multiple values to a named query parameter, guessing the Hibernate - type from the class of the first object in the collection. This is useful for binding a list - of values to an expression such as foo.bar in (:value_list) - - The name of the parameter - A collection of values to list - - - - Bind multiple values to a named query parameter. This is useful for binding - a list of values to an expression such as foo.bar in (:value_list). - - the name of the parameter - a collection of values to list - the Hibernate type of the values - - - - Bind multiple values to a named query parameter. The Hibernate type of the parameter is - first detected via the usage/position in the query and if not sufficient secondly - guessed from the class of the first object in the array. This is useful for binding a list of values - to an expression such as foo.bar in (:value_list). - - the name of the parameter - a collection of values to list - - - - Bind the property values of the given object to named parameters of the query, - matching property names with parameter names and mapping property types to - Hibernate types using heuristics. - - Any PONO - - - - Bind an instance of a to an indexed parameter - using an NHibernate . - - The position of the parameter in the query string, numbered from 0 - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a array to an indexed parameter - using an NHibernate . - - The position of the parameter in the query string, numbered from 0 - A non-null instance of a array. - - - - Bind an instance of a array to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a array. - - - - Bind an instance of a to an indexed parameter - using an NHibernate . - - The position of the parameter in the query string, numbered from 0 - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a to an indexed parameter - using an NHibernate . - - The position of the parameter in the query string, numbered from 0 - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a to an indexed parameter - using an NHibernate . - - The position of the parameter in the query string, numbered from 0 - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a to an indexed parameter - using an NHibernate . - - The position of the parameter in the query string, numbered from 0 - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - A non-null instance of a . - The name of the parameter - - - - Bind an instance of a to an indexed parameter - using an NHibernate . - - The position of the parameter in the query string, numbered from 0 - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a to an indexed parameter - using an NHibernate . - - The position of the parameter in the query string, numbered from 0 - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a persistent enumeration class to an indexed parameter - using an NHibernate . - - The position of the parameter in the query string, numbered from 0 - A non-null instance of a persistent enumeration - - - - Bind an instance of a persistent enumeration class to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a persistent enumeration - - - - Bind an instance of a to an indexed parameter - using an NHibernate . - - The position of the parameter in the query string, numbered from 0 - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a to an indexed parameter - using an NHibernate . - - The position of the parameter in the query string, numbered from 0 - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a to an indexed parameter - using an NHibernate . - - The position of the parameter in the query string, numbered from 0 - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a to an indexed parameter - using an NHibernate . - - The position of the parameter in the query string, numbered from 0 - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a to an indexed parameter - using an NHibernate . - - The position of the parameter in the query string, numbered from 0 - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a to an indexed parameter - using an NHibernate . - - The position of the parameter in the query string, numbered from 0 - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a to an indexed parameter - using an NHibernate . - - The position of the parameter in the query string, numbered from 0 - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The position of the parameter in the query string, numbered from 0 - An instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - An instance of a . - - - - Bind an instance of a mapped persistent class to an indexed parameter. - - Position of the parameter in the query string, numbered from 0 - A non-null instance of a persistent class - - - - Bind an instance of a mapped persistent class to a named parameter. - - The name of the parameter - A non-null instance of a persistent class - - - - Set a strategy for handling the query results. This can be used to change - "shape" of the query result. - - - - - Get a enumerable that when enumerated will execute - a batch of queries in a single database roundtrip - - - - - - - Get an IFutureValue instance, whose value can be retrieved through - its Value property. The query is not executed until the Value property - is retrieved, which will execute other Future queries as well in a - single roundtrip - - - - - - - The query string - - - - - The Hibernate types of the query result set. - - - - Return the HQL select clause aliases (if any) - an array of aliases as strings - - - - The names of all named parameters of the query - - The parameter names, in no particular order - - - - Perform parameter validation. Used prior to executing the encapsulated query. - - - if true, the first ? will not be verified since - its needed for e.g. callable statements returning a out parameter - - - - - Guesses the from the param's value. - - The object to guess the of. - An for the object. - - Thrown when the param is null because the - can't be guess from a null value. - - - - - Guesses the from the . - - The to guess the of. - An for the . - - Thrown when the clazz is null because the - can't be guess from a null type. - - - - - Warning: adds new parameters to the argument by side-effect, as well as mutating the query string! - - - - - Warning: adds new parameters to the argument by side-effect, as well as mutating the query string! - - - - Override the current session cache mode, just for this query. - - The cache mode to use. - this (for method chaining) - - - Functionality common to stateless and stateful sessions - - - - Implementation of the interface for collection filters. - - - - - Default implementation of the , - for "ordinary" HQL queries (not collection filters) - - - - - - Implementation of the interface - - - - - Criteria is a simplified API for retrieving entities by composing - objects. - - - - Using criteria is a very convenient approach for functionality like "search" screens - where there is a variable number of conditions to be placed upon the result set. - - - The Session is a factory for ICriteria. Expression instances are usually obtained via - the factory methods on . eg: - - - IList cats = session.CreateCriteria(typeof(Cat)) - .Add( Expression.Like("name", "Iz%") ) - .Add( Expression.Gt( "weight", minWeight ) ) - .AddOrder( Order.Asc("age") ) - .List(); - - You may navigate associations using or . - - IList cats = session.CreateCriteria(typeof(Cat)) - .CreateCriteria("kittens") - .Add( Expression.like("name", "Iz%") ) - .List(); - - - You may specify projection and aggregation using Projection - instances obtained via the factory methods on Projections. - - IList cats = session.CreateCriteria(typeof(Cat)) - .setProjection( Projections.ProjectionList() - .Add( Projections.RowCount() ) - .Add( Projections.Avg("weight") ) - .Add( Projections.Max("weight") ) - .Add( Projections.Min("weight") ) - .Add( Projections.GroupProperty("color") ) - ) - .AddOrder( Order.Asc("color") ) - .List(); - - - - - - - Used to specify that the query results will be a projection (scalar in - nature). Implicitly specifies the projection result transformer. - - The projection representing the overall "shape" of the - query results. - This instance (for method chaining) - - - The individual components contained within the given - determines the overall "shape" of the query result. - - - - - - Add an Expression to constrain the results to be retrieved. - - - - - - - An an Order to the result set - - - - - - Specify an association fetching strategy. Currently, only - one-to-many and one-to-one associations are supported. - - A dot seperated property path. - The Fetch mode. - - - - - Set the lock mode of the current entity - - the lock mode - - - - - Set the lock mode of the aliased entity - - an alias - the lock mode - - - - - Join an association, assigning an alias to the joined entity - - - - - - - - Join an association using the specified join-type, assigning an alias to the joined - association - - - - The type of join to use. - this (for method chaining) - - - - Create a new , "rooted" at the associated entity - - - - - - - Create a new , "rooted" at the associated entity, - using the specified join type. - - A dot-seperated property path - The type of join to use - The created "sub criteria" - - - - Create a new , "rooted" at the associated entity, - assigning the given alias - - - - - - - - Create a new , "rooted" at the associated entity, - assigning the given alias and using the specified join type. - - A dot-separated property path - The alias to assign to the joined association (for later reference). - The type of join to use. - The created "sub criteria" - - - - Set a strategy for handling the query results. This determines the - "shape" of the query result set. - - - - - - - - - - Set a limit upon the number of objects to be retrieved - - - - - - Set the first result to be retrieved - - - - - Set a fetch size for the underlying ADO query. - the fetch size - this (for method chaining) - - - - Set a timeout for the underlying ADO.NET query - - - - - - - Enable caching of this query result set - - - - - - - Set the name of the cache region. - - the name of a query cache region, or - for the default query cache - - - - Add a comment to the generated SQL. - a human-readable string - this (for method chaining) - - - Override the flush mode for this particular query. - The flush mode to use. - this (for method chaining) - - - Override the cache mode for this particular query. - The cache mode to use. - this (for method chaining) - - - - Get the results - - - - - - Convenience method to return a single instance that matches - the query, or null if the query returns no results. - - the single result or - - If there is more than one matching result - - - - - Get a enumerable that when enumerated will execute - a batch of queries in a single database roundtrip - - - - - - - Get an IFutureValue instance, whose value can be retrieved through - its Value property. The query is not executed until the Value property - is retrieved, which will execute other Future queries as well in a - single roundtrip - - - - - - - Get the results and fill the - - The list to fill with the results. - - - - Strongly-typed version of . - - - - - Strongly-typed version of . - - - - - Clear all orders from criteria. - - - - - Allows to get a sub criteria by path. - Will return null if the criteria does not exists. - - The path. - - - - Alows to get a sub criteria by alias. - Will return null if the criteria does not exists - - The alias. - - - - - Gets the root entity type if available, throws otherwise - - - This is an NHibernate specific method, used by several dependent - frameworks for advance integration with NHibernate. - - - - - Get the alias of the entity encapsulated by this criteria instance. - - The alias for the encapsulated entity. - - - Override the cache mode for this particular query. - The cache mode to use. - this (for method chaining) - - - Override the cache mode for this particular query. - The cache mode to use. - this (for method chaining) - - - - The Clone is supported only by a root criteria. - - The clone of the root criteria. - - - - Error handling in this case will only kick in if we cannot set values on the TLS - this is usally the case if we are called from the finalizer, since this is something - that we do only for logging, we ignore the error. - - - - - Expose the batch functionality in ADO.Net 2.0 - Microsoft in its wisdom decided to make my life hard and mark it internal. - Through the use of Reflection and some delegates magic, I opened up the functionality. - - Observable performance benefits are 50%+ when used, so it is really worth it. - - - - - Append a command to the batch - - - - - - Executes the batch - - - This seems to be returning the total number of affected rows in all queries - - - - - Return the batch command to be executed - - - - - The number of commands batched in this instance - - - - - Append a command to the batch - - - - - - This is required because SqlClient.SqlCommandSet will throw if - the command has no parameters. - - - - - - Executes the batch - - - This seems to be returning the total number of affected rows in all queries - - - - - Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - - 2 - - - - Return the batch command to be executed - - - - - The number of commands batched in this instance - - - - - Named query in "detached mode" where the NHibernate session is not available. - - - - - - - - - Create a new instance of for a named query string defined in the mapping file. - - The name of a query defined externally. - - The query can be either in HQL or SQL format. - - - - - Get an executable instance of , to actually run the query. - - - - - Creates a new DetachedNamedQuery that is a deep copy of the current instance. - - The clone. - - - - Get the query name. - - - - - Query in "detached mode" where the NHibernate session is not available. - - - - - - - - Create a new instance of for the given query string. - - A hibernate query string - - - - Get an executable instance of , to actually run the query. - - - - - Creates a new DetachedQuery that is a deep copy of the current instance. - - The clone. - - - - Get the HQL string. - - - - - Provides an wrapper over the results of an . - - - This is the IteratorImpl in H2.0.3 - - - - - Create an wrapper over an . - - The to enumerate over. - The used to create the . - The to use to load objects. - The s contained in the . - The names of the columns in the . - The that should be applied to the . - Instantiator of the result holder (used for "select new SomeClass(...)" queries). - - The should already be positioned on the first record in . - - - - - Returns an enumerator that can iterate through the query results. - - - An that can be used to iterate through the query results. - - - - - Advances the enumerator to the next element of the query results. - - - if the enumerator was successfully advanced to the next query results - ; if the enumerator has passed the end of the query results. - - - - - - - - A flag to indicate if Dispose() has been called. - - - - - Finalizer that ensures the object is correctly disposed of. - - - - - Takes care of freeing the managed and unmanaged resources that - this class is responsible for. - - - - - Takes care of freeing the managed and unmanaged resources that - this class is responsible for. - - Indicates if this EnumerableImpl is being Disposed of or Finalized. - - The command is closed and the reader is disposed. This allows other ADO.NET - related actions to occur without needing to move all the way through the - EnumerableImpl. - - - - - Gets the current element in the query results. - - - The current element in the query results which is either an object or - an object array. - - - If the only returns one type of Entity then an object will - be returned. If this is a multi-column resultset then an object array will be - returned. - - - - - - - - - Type definition of Filter. Filter defines the user's view into enabled dynamic filters, - allowing them to set filter parameter values. - - - - - Set the named parameter's value list for this filter. - - The parameter's name. - The values to be applied. - This FilterImpl instance (for method chaining). - - - - Set the named parameter's value list for this filter. Used - in conjunction with IN-style filter criteria. - - The parameter's name. - The values to be expanded into an SQL IN list. - This FilterImpl instance (for method chaining). - - - - Set the named parameter's value list for this filter. Used - in conjunction with IN-style filter criteria. - - The parameter's name. - The values to be expanded into an SQL IN list. - This FilterImpl instance (for method chaining). - - - - Perform validation of the filter state. This is used to verify the - state of the filter after its enablement and before its use. - - - - - - Get the name of this filter. - - This filter's name. - - - - Get the filter definition containing additional information about the - filter (such as default-condition and expected parameter names/types). - - The filter definition - - - - Set the named parameter's value for this filter. - - The parameter's name. - The value to be applied. - This FilterImpl instance (for method chaining). - - - - Set the named parameter's value list for this filter. Used - in conjunction with IN-style filter criteria. - - The parameter's name. - The values to be expanded into an SQL IN list. - This FilterImpl instance (for method chaining). - - - - Set the named parameter's value list for this filter. Used - in conjunction with IN-style filter criteria. - - The parameter's name. - The values to be expanded into an SQL IN list. - This FilterImpl instance (for method chaining). - - - - Perform validation of the filter state. This is used to verify the - state of the filter after its enablement and before its use. - - - - - Get the name of this filter. - - - - - Helper methods for rendering log messages and exception messages - - - - - Generate small message that can be used in traces and exception messages. - - The to create the string from. - The identifier of the object. - A descriptive in the format of [classname#id] - - - - Generate small message that can be used in traces and exception messages. - - The for the class in question. - The identifier of the object. - The . - A descriptive in the format of [classname#id] - - - - Generate small message that can be used in traces and exception messages. - - The for the class in question. - The identifier of the object. - The . - The NHibernate type of the identifier. - A descriptive in the format of [classname#id] - - - - Generate small message that can be used in traces and exception messages. - - The for the class in question - The id - A descriptive in the form [FooBar#id] - - - - Generate small message that can be used in traces and exception messages. - - The for the class in question - A descriptive in the form [FooBar] - - - - Generate small message that can be used in traces and exception messages. - - The for the class in question - The id - A descriptive in the form [collectionrole#id] - - - - Generate an info message string relating to a given property value - for an entity. - - The entity name - The name of the property - The property value. - An info string, in the form [Foo.bars#1] - - - - Generate an info message string relating to a particular managed - collection. - - The persister for the collection - The id value of the owner - The session factory - An info string, in the form [Foo.bars#1] - - - - Generate an info message string relating to a particular entity, - based on the given entityName and id. - - The defined entity name. - The entity id value. - An info string, in the form [FooBar#1]. - - - - Combines several queries into a single DB call - - - - - Get all the results - - - - - Adds the specified criteria to the query. The result will be contained in a - - Return results in a - The criteria. - - - - - Adds the specified criteria to the query. The result will be contained in a - - The criteria. - - - - - Adds the specified criteria to the query, and associates it with the given key. The result will be contained in a - - The key - The criteria - - - - - Adds the specified detached criteria. The result will be contained in a - - The detached criteria. - - - - - Adds the specified detached criteria, and associates it with the given key. The result will be contained in a - - The key - The detached criteria - - - - - Adds the specified criteria to the query - - The criteria. - - - - - Adds the specified criteria to the query, and associates it with the given key - - The key - The criteria - - - - - Adds the specified detached criteria. - - The detached criteria. - - - - - Adds the specified detached criteria, and associates it with the given key - - The key - The detached criteria - - - - - Sets whatevert this criteria is cacheable. - - if set to true [cachable]. - - - - Set the cache region for thie criteria - - The region - - - - - Force a cache refresh - - - - - - - Sets the result transformer for all the results in this mutli criteria instance - - The result transformer. - - - - - Returns the result of one of the Criteria based on the key - - The key - - - - - Initializes a new instance of the class. - - The session. - The factory. - - - - Combines sevaral queries into a single database call - - - - - Get all the results - - - - - Adds the specified criteria to the query. The result will be contained in a - - Return results in a - The criteria. - - - - - Add the specified HQL query to the multi query. The result will be contained in a - - - - - Add the specified HQL query to the multi query, and associate it with the given key. The result will be contained in a - - - - - - - - Add the specified HQL Query to the multi query, and associate it with the given key. The result will be contained in a - - - - - - - - Add the specified HQL query to the multi query. The result will be contained in a - - - - - Add a named query to the multi query. The result will be contained in a - - - - - Add a named query to the multi query, and associate it with the given key. The result will be contained in a - - - - - - - - Add the specified HQL query to the multi query, and associate it with the given key - - - - - - - - Add the specified HQL query to the multi query - - - - - Add the specified HQL Query to the multi query, and associate it with the given key - - - - - - - - Add the specified HQL query to the multi query - - - - - Add a named query to the multi query - - - - - Add a named query to the multi query, and associate it with the given key - - - - - - - - Enable caching of this query result set. - - Should the query results be cacheable? - - - Set the name of the cache region. - The name of a query cache region, or - for the default query cache - - - Should the query force a refresh of the specified query cache region? - This is particularly useful in cases where underlying data may have been - updated via a seperate process (i.e., not modified through Hibernate) and - allows the application to selectively refresh the query cache regions - based on its knowledge of those events. - Should the query result in a forcible refresh of - the query cache? - - - - The timeout for the underlying ADO query - - - - - - Bind a value to a named query parameter - - The name of the parameter - The possibly null parameter value - The NHibernate . - - - - Bind a value to a named query parameter, guessing the NHibernate - from the class of the given object. - - The name of the parameter - The non-null parameter value - - - - Bind multiple values to a named query parameter. This is useful for binding a list - of values to an expression such as foo.bar in (:value_list) - - The name of the parameter - A collection of values to list - The Hibernate type of the values - - - - Bind multiple values to a named query parameter, guessing the Hibernate - type from the class of the first object in the collection. This is useful for binding a list - of values to an expression such as foo.bar in (:value_list) - - The name of the parameter - A collection of values to list - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a array to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a array. - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - A non-null instance of a . - The name of the parameter - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a mapped persistent class to a named parameter. - - The name of the parameter - A non-null instance of a persistent class - - - - Bind an instance of a persistent enumeration class to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a persistent enumeration - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - An instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Bind an instance of a to a named parameter - using an NHibernate . - - The name of the parameter - A non-null instance of a . - - - - Override the current session flush mode, just for this query. - - - - - Set a strategy for handling the query results. This can be used to change - "shape" of the query result. - - - - - Returns the result of one of the Criteria based on the key - - The key - - - - - Return the query results of all the queries - - - - - - - an actual entity object, not a proxy! - - - - - - Concrete implementation of a SessionFactory. - - - Has the following responsibilities: - - - Caches configuration settings (immutably) - - Caches "compiled" mappings - ie. - and - - - Caches "compiled" queries (memory sensitive cache) - - - Manages PreparedStatements/IDbCommands - how true in NH? - - - Delegates IDbConnection management to the - - - Factory for instances of - - - - This class must appear immutable to clients, even if it does all kinds of caching - and pooling under the covers. It is crucial that the class is not only thread safe - , but also highly concurrent. Synchronization must be used extremely sparingly. - - - - - - - - - - - NH specific : to avoid the use of entityName for generic implementation - - this is a shortcut. - - - - Gets the hql query identified by the name. - - The name of that identifies the query. - - A hql query or if the named - query does not exist. - - - - Get the return aliases of a query - - - - Return the names of all persistent (mapped) classes that extend or implement the - given class or interface, accounting for implicit/explicit polymorphism settings - and excluding mapped subclasses/joined-subclasses of other classes in the result. - - - - - - - - - - - Closes the session factory, releasing all held resources. - - cleans up used cache regions and "stops" the cache provider. - close the ADO.NET connection - - - - - Get a new stateless session. - - - Get a new stateless session for the given ADO.NET connection. - - - - - - - - - Statistics SPI - - - Get the statistics for this session factory - - - - Gets the ICurrentSessionContext instance attached to this session factory. - - - - - Delegate to handle the scenario of an entity not found by a specified id. - - - - - Delegate method to handle the scenario of an entity not found. - - The entityName (may be the class fullname) - The requested id not founded. - - - - Resolves lookups and deserialization. - - - - This is used heavily be Deserialization. Currently a SessionFactory is not really serialized. - All that is serialized is it's name and uid. During Deserializaiton the serialized SessionFactory - is converted to the one contained in this object. So if you are serializing across AppDomains - you should make sure that "name" is specified for the SessionFactory in the hbm.xml file and that the - other AppDomain has a configured SessionFactory with the same name. If - you are serializing in the same AppDomain then there will be no problem because the uid will - be in this object. - - - - - - - - - Adds an Instance of the SessionFactory to the local "cache". - - The identifier of the ISessionFactory. - The name of the ISessionFactory. - The ISessionFactory. - The configured properties for the ISessionFactory. - - - - Removes the Instance of the SessionFactory from the local "cache". - - The identifier of the ISessionFactory. - The name of the ISessionFactory. - The configured properties for the ISessionFactory. - - - - Returns a Named Instance of the SessionFactory from the local "cache" identified by name. - - The name of the ISessionFactory. - An instantiated ISessionFactory. - - - - Returns an Instance of the SessionFactory from the local "cache" identified by UUID. - - The identifier of the ISessionFactory. - An instantiated ISessionFactory. - - - - We always set the result to use a thread static variable, on the face of it, - it looks like it is not a valid choice, since ASP.Net and WCF may decide to switch - threads on us. But, since SessionIdLoggingContext is only used inside NH calls, and since - NH calls are never async, this isn't an issue for us. - In addition to that, attempting to match to the current context has proven to be performance hit. - - - - - Concrete implementation of a Session, also the central, organizing component - of Hibernate's internal implementation. - - - Exposes two interfaces: ISession itself, to the application and ISessionImplementor - to other components of hibernate. This is where the hard stuff is... - NOT THREADSAFE - - - - - Constructor used to recreate the Session during the deserialization. - - - - - This is needed because we have to do some checking before the serialization process - begins. I don't know how to add logic in ISerializable.GetObjectData and have .net - write all of the serializable fields out. - - - - - Verify the ISession can be serialized and write the fields to the Serializer. - - - - - The fields are marked with [NonSerializable] as just a point of reference. This method - has complete control and what is serialized and those attributes are ignored. However, - this method should be in synch with the attributes for easy readability. - - - - - Once the entire object graph has been deserialized then we can hook the - collections, proxies, and entities back up to the ISession. - - - - - - Constructor used for OpenSession(...) processing, as well as construction - of sessions for GetCurrentSession(). - - The user-supplied connection to use for this session. - The factory from which this session was obtained - NOT USED - The timestamp for this session - The interceptor to be applied to this session - The entity-mode for this session - Should we auto flush before completion of transaction - Should we auto close after completion of transaction - The mode by which we should release JDBC connections. - - - - Constructor used in building "child sessions". - - The parent Session - The entity mode - - - - Close the session and release all resources - - Do not call this method inside a transaction scope, use Dispose instead, since - Close() is not aware of distributed transactions - - - - - - Ensure that the locks are downgraded to - and that all of the softlocks in the have - been released. - - - - - Save a transient object. An id is generated, assigned to the object and returned - - - - - - - Save a transient object with a manually assigned ID - - - - - - - Delete a persistent object - - - - - Delete a persistent object (by explicit entity name) - - - - Retrieve a list of persistent objects using a Hibernate query - - - - - - - - - - - - - - - Give the interceptor an opportunity to override the default instantiation - - - - - - - Force an immediate flush - - - Cascade merge an entity instance - - - Cascade persist an entity instance - - - Cascade persist an entity instance during the flush process - - - Cascade refresh an entity instance - - - Cascade copy an entity instance - - - Cascade delete an entity instance - - - - detect in-memory changes, determine if the changes are to tables - named in the query and, if so, complete execution the flush - - - - - - - Load the data for the object with the specified id into a newly created object - using "for update", if supported. A new key will be assigned to the object. - This should return an existing proxy where appropriate. - - If the object does not exist in the database, an exception is thrown. - - - - - - - Thrown when the object with the specified id does not exist in the database. - - - - - Load the data for the object with the specified id into a newly created object - using "for update", if supported. A new key will be assigned to the object. - This should return an existing proxy where appropriate. - - If the object does not exist in the database, null is returned. - - - - - - - - - Load the data for the object with the specified id into a newly created object. - This is only called when lazily initializing a proxy. - Do NOT return a proxy. - - - - - Return the object with the specified id or throw exception if no row with that id exists. Defer the load, - return a new proxy or return an existing proxy if possible. Do not check if the object was deleted. - - - - - - - - This can be called from commit() or at the start of a List() method. - - Perform all the necessary SQL statements in a sensible order, to allow - users to repect foreign key constraints: - - Inserts, in the order they were performed - Updates - Deletion of collection elements - Insertion of collection elements - Deletes, in the order they were performed - - - - Go through all the persistent objects and look for collections they might be - holding. If they had a nonpersistable collection, substitute a persistable one - - - - - - Not for internal use - - - - - - - Get the id value for an object that is actually associated with the session. - This is a bit stricter than GetEntityIdentifierIfNotUnsaved(). - - - - - - - called by a collection that wants to initialize itself - - - - - - - - - - Finalizer that ensures the object is correctly disposed of. - - - - - Perform a soft (distributed transaction aware) close of the session - - - - - Takes care of freeing the managed and unmanaged resources that - this class is responsible for. - - Indicates if this Session is being Disposed of or Finalized. - - If this Session is being Finalized (isDisposing==false) then make sure not - to call any methods that could potentially bring this Session back to life. - - - - - remove any hard references to the entity that are held by the infrastructure - (references held by application or other persistant instances are okay) - - - - - - - - - - - - - - - - - - - - - Get the ActionQueue for this session - - - - - - - Gets if the ISession is connected. - - - if the ISession is connected. - - - An ISession is considered connected if there is an (regardless - of its state) or if it the field connect is true. Meaning that it will connect - at the next operation that requires a connection. - - - - Get the statistics for this session. - - - Retrieves the configured event listeners from this event source. - - - - Implements SQL query passthrough - - - An example mapping is: - - <sql-query-name name="mySqlQuery"> - <return alias="person" class="eg.Person" /> - SELECT {person}.NAME AS {person.name}, {person}.AGE AS {person.age}, {person}.SEX AS {person.sex} - FROM PERSON {person} WHERE {person}.NAME LIKE 'Hiber%' - </sql-query-name> - - - - - - Declare a "root" entity, without specifying an alias - - - - - Declare a "root" entity - - - - - Declare a "root" entity, specifying a lock mode - - - - - Declare a "root" entity, without specifying an alias - - - - - Declare a "root" entity - - - - - Declare a "root" entity, specifying a lock mode - - - - - Declare a "joined" entity - - - - - Declare a "joined" entity, specifying a lock mode - - - - - Declare a scalar query result - - - - - Use a predefined named ResultSetMapping - - - - Constructs a SQLQueryImpl given a sql query defined in the mappings. - The representation of the defined sql-query. - The session to which this SQLQueryImpl belongs. - Metadata about parameters found in the query. - - - - A command-oriented API for performing bulk operations against a database. - - - A stateless session does not implement a first-level cache nor - interact with any second-level cache, nor does it implement - transactional write-behind or automatic dirty checking, nor do - operations cascade to associated instances. Collections are - ignored by a stateless session. Operations performed via a - stateless session bypass Hibernate's event model and - interceptors. Stateless sessions are vulnerable to data - aliasing effects, due to the lack of a first-level cache. - - For certain kinds of transactions, a stateless session may - perform slightly faster than a stateful session. - - - - Close the stateless session and release the ADO.NET connection. - - - Insert a entity. - A new transient instance - the identifier of the instance - - - Insert a row. - The entityName for the entity to be inserted - a new transient instance - the identifier of the instance - - - Update a entity. - a detached entity instance - - - Update a entity. - The entityName for the entity to be updated - a detached entity instance - - - Delete a entity. - a detached entity instance - - - Delete a entity. - The entityName for the entity to be deleted - a detached entity instance - - - Retrieve a entity. - a detached entity instance - - - Retrieve a entity. - - - a detached entity instance - - - - - Retrieve a entity, obtaining the specified lock mode. - - a detached entity instance - - - - Retrieve a entity, obtaining the specified lock mode. - - a detached entity instance - - - - Refresh the entity instance state from the database. - - The entity to be refreshed. - - - - Refresh the entity instance state from the database. - - The entityName for the entity to be refreshed. - The entity to be refreshed. - - - - Refresh the entity instance state from the database. - - The entity to be refreshed. - The LockMode to be applied. - - - - Refresh the entity instance state from the database. - - The entityName for the entity to be refreshed. - The entity to be refreshed. - The LockMode to be applied. - - - - Create a new instance of Query for the given HQL query string. - - Entities returned by the query are detached. - - - - Obtain an instance of for a named query string defined in - the mapping file. - - - The query can be either in HQL or SQL format. - Entities returned by the query are detached. - - - - - Create a new instance, for the given entity class, - or a superclass of an entity class. - - A class, which is persistent, or has persistent subclasses - The . - Entities returned by the query are detached. - - - - Create a new instance, for the given entity class, - or a superclass of an entity class, with the given alias. - - A class, which is persistent, or has persistent subclasses - The alias of the entity - The . - Entities returned by the query are detached. - - - - Create a new instance, for the given entity class, - or a superclass of an entity class. - - A class, which is persistent, or has persistent subclasses - The . - Entities returned by the query are detached. - - - - Create a new instance, for the given entity class, - or a superclass of an entity class, with the given alias. - - A class, which is persistent, or has persistent subclasses - The alias of the entity - The . - Entities returned by the query are detached. - - - - Create a new instance, for the given entity name. - - The entity name. - The . - Entities returned by the query are detached. - - - - Create a new instance, for the given entity name, - with the given alias. - - The entity name. - The alias of the entity - The . - Entities returned by the query are detached. - - - - Create a new instance of for the given SQL query string. - Entities returned by the query are detached. - - a SQL query - The - - - Begin a NHibernate transaction. - - - Get the current Hibernate transaction. - - - - Returns the current ADO.NET connection associated with this instance. - - - If the session is using aggressive connection release (as in a - CMT environment), it is the application's responsibility to - close the connection returned by this call. Otherwise, the - application should not close the connection. - - - - Close the stateless session and release the ADO.NET connection. - - - Insert a entity. - A new transient instance - the identifier of the instance - - - Insert a row. - The entityName for the entity to be inserted - a new transient instance - the identifier of the instance - - - Update a entity. - a detached entity instance - - - Update a entity. - The entityName for the entity to be updated - a detached entity instance - - - Delete a entity. - a detached entity instance - - - Delete a entity. - The entityName for the entity to be deleted - a detached entity instance - - - Retrieve a entity. - a detached entity instance - - - Retrieve a entity. - - - a detached entity instance - - - - - Retrieve a entity, obtaining the specified lock mode. - - a detached entity instance - - - - Retrieve a entity, obtaining the specified lock mode. - - a detached entity instance - - - - Refresh the entity instance state from the database. - - The entity to be refreshed. - - - - Refresh the entity instance state from the database. - - The entityName for the entity to be refreshed. - The entity to be refreshed. - - - - Refresh the entity instance state from the database. - - The entity to be refreshed. - The LockMode to be applied. - - - - Refresh the entity instance state from the database. - - The entityName for the entity to be refreshed. - The entity to be refreshed. - The LockMode to be applied. - - - - Create a new instance, for the given entity class, - or a superclass of an entity class. - - A class, which is persistent, or has persistent subclasses - The . - Entities returned by the query are detached. - - - - Create a new instance, for the given entity class, - or a superclass of an entity class, with the given alias. - - A class, which is persistent, or has persistent subclasses - The alias of the entity - The . - Entities returned by the query are detached. - - - - Create a new instance, for the given entity name. - - The entity name. - The . - Entities returned by the query are detached. - - - - Create a new instance, for the given entity name, - with the given alias. - - The entity name. - The alias of the entity - The . - Entities returned by the query are detached. - - - Begin a NHibernate transaction. - - - - Finalizer that ensures the object is correctly disposed of. - - - - - Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. - - 2 - - - Get the current Hibernate transaction. - - - Contract for field interception handlers. - - - Use to associate the entity to which we are bound to the given session. - The session to which we are now associated. - - - The the given field initialized for the entity to which we are bound? - The name of the field to check - True if the given field is initialized; otherwise false. - - - Forcefully mark the entity as being dirty. - - - Clear the internal dirty flag. - - - Is the entity considered dirty? - True if the entity is dirty; otherwise false. - - - Is the entity to which we are bound completely initialized? - - - Helper class for dealing with enhanced entity classes. - - - Marker value for uninitialized properties - - - Contract for controlling how lazy properties get initialized. - - - Initialize the property, and return its new value - - - - Walker for collections of values and many-to-many associations - - - - - Superclass of walkers for collection initializers - - - - - - - - Add on association (one-to-one, many-to-one, or a collection) to a list - of associations to be fetched by outerjoin (if necessary) - - - - - Add on association (one-to-one, many-to-one, or a collection) to a list - of associations to be fetched by outerjoin - - - - - For an entity class, return a list of associations to be fetched by outerjoin - - - - - For a collection role, return a list of associations to be fetched by outerjoin - - - - - For a collection role, return a list of associations to be fetched by outerjoin - - - - - For an entity class, add to a list of associations to be fetched - by outerjoin - - - - - For a component, add to a list of associations to be fetched by outerjoin - - - - - For a composite element, add to a list of associations to be fetched by outerjoin - - - - - Extend the path by the given property name - - - - - Get the join type (inner, outer, etc) or -1 if the - association should not be joined. Override on - subclasses. - - - - - Use an inner join if it is a non-null association and this - is the "first" join in a series - - - - - Does the mapping, and Hibernate default semantics, specify that - this association should be fetched by outer joining - - - - - Override on subclasses to enable or suppress joining - of certain association types - - - - - Used to detect circularities in the joined graph, note that - this method is side-effecty - - - - - Used to detect circularities in the joined graph, note that - this method is side-effecty - - - - - Should we join this association? - - - - - Generate a sequence of LEFT OUTER JOIN clauses for the given associations. - - - - - Count the number of instances of IJoinable which are actually - also instances of ILoadable, or are one-to-many associations - - - - - Count the number of instances of which - are actually also instances of - which are being fetched by outer join - - - - - Get the order by string required for collection fetching - - - - - Render the where condition for a (batch) load by identifier / collection key - - - - - Generate a select list of columns containing all properties of the entity classes - - - - - Uniquely identifier a foreign key, so that we don't - join it more than once, and create circularities - - - - - We can use an inner join for first many-to-many association - - - - - Loads a collection of values or a many-to-many association. - - - The collection persister must implement . For - other collections, create a customized subclass of - - - - - - Superclass for loaders that initialize collections - - - - - - - Implements logic for walking a tree of associated classes. - - - Generates an SQL select string containing all properties of those classes. - Tablse are joined using an ANSI-style left outer join. - - - - - An interface for collection loaders - - - - - - - Initialize the given collection - - - - - "Batch" loads collections, using multiple foreign key values in the SQL Where clause - - - - - - - Walker for one-to-many associations - - - - - - Loads one-to-many associations - - - The collection persister must implement . - For other collections, create a customized subclass of . - - - - - Implements subselect fetching for a collection - - - - Implements subselect fetching for a one to many association - - - - - A for queries. - - - - - - The superclass deliberately excludes collections - - - - - Don't bother with the discriminator, unless overridden by subclass - - - - - Use the discriminator, to narrow the select to instances - of the queried subclass, also applying any filters. - - - - - A Loader for queries. - - - Note that criteria - queries are more like multi-object Load()s than like HQL queries. - - - - - Get the names of the columns constrained - by this criterion. - - - - - Get the a typed value for the given property value. - - - - - Get the aliases of the columns constrained - by this criterion (for use in ORDER BY clause). - - - - Implements Hibernate's built-in support for native SQL queries. - This support is built on top of the notion of "custom queries"... - - - - Extension point allowing any SQL query with named and positional parameters - to be executed by Hibernate, returning managed entities, collections and - simple scalar values. - - - - The SQL query string to be performed. - - - - Any query spaces to apply to the query execution. Query spaces are - used in Hibernate's auto-flushing mechanism to determine which - entities need to be checked for pending changes. - - - - - A map representing positions within the supplied query to - which we need to bind named parameters. - - - Optional, may return null if no named parameters. - The structure of the returned map (if one) as follows: -
    -
  1. The keys into the map are the named parameter names
  2. -
  3. The corresponding value is either an if the - parameter occurs only once in the query; or a List of int if the - parameter occurs more than once
  4. -
-
-
- - - A collection of descriptors describing the - ADO result set to be expected and how to map this result set. - - - - - Substitues ADO parameter placeholders (?) for all encountered - parameter specifications. It also tracks the positions of these - parameter specifications within the query string. This accounts for - ordinal-params, named-params, and ejb3-positional-params. - - The query string. - The SQL query with parameter substitution complete. - - - Spefically a fetch return that refers to a collection association. - - - Represents a return which names a fetched association. - - - Represents some non-scalar (entity/collection) return within the query result. - - - Represents a return in a custom query. - - - Retrieves the return descriptor for the owner of this fetch. - - - The name of the property on the owner which represents this association. - - - - Represents a return which names a collection role; it - is used in defining a custom query for loading an entity's - collection in non-fetching scenarios (i.e., loading the collection - itself as the "root" of the result). - - - - Returns the class owning the collection. - - - Returns the name of the property representing the collection from the . - - - - that uses columnnames instead of generated aliases. - Aliases can still be overwritten via <return-property> - - - - - Type definition of CollectionAliases. - - - - - Returns the suffixed result-set column-aliases for columns making - up the key for this collection (i.e., its FK to its owner). - - The key result-set column aliases. - - - - Returns the suffixed result-set column-aliases for the columns - making up the collection's index (map or list). - - The index result-set column aliases. - - - - Returns the suffixed result-set column-aliases for the columns - making up the collection's elements. - - The element result-set column aliases. - - - - Returns the suffixed result-set column-aliases for the column - defining the collection's identifier (if any). - - The identifier result-set column aliases. - - - - Returns the suffix used to unique the column aliases for this - particular alias set. - - The uniqued column alias suffix. - - - - Returns the suffixed result-set column-aliases for columns making up the key for this collection (i.e., its FK to - its owner). - - The key result-set column aliases. - - - - Returns the suffixed result-set column-aliases for the columns making up the collection's index (map or list). - - The index result-set column aliases. - - - - Returns the suffixed result-set column-aliases for the columns making up the collection's elements. - - The element result-set column aliases. - - - - Returns the suffixed result-set column-aliases for the column defining the collection's identifier (if any). - - The identifier result-set column aliases. - - - - Returns the suffix used to unique the column aliases for this particular alias set. - - The uniqued column alias suffix. - - - - that chooses the column names over the alias names. - - - - - EntityAliases which handles the logic of selecting user provided aliases (via return-property), - before using the default aliases. - - - - - Metadata describing the SQL result set column aliases - for a particular entity - - - - - The result set column aliases for the property columns of a subclass - - - - - The result set column aliases for the primary key columns - - - - - The result set column aliases for the discriminator columns - - - - - The result set column aliases for the version columns - - - - - The result set column alias for the Oracle row id - - - - - The result set column aliases for the property columns - - - - - Calculate and cache select-clause suffixes. - - - - - Extension point for loaders which use a SQL result set with "unexpected" column aliases. - - - - Build a logical result row. - - Entity data defined as "root returns" and already handled by the normal Loader mechanism. - - The ADO result set (positioned at the row currently being processed). - Does this query have an associated . - The session from which the query request originated. - The logical result row - - At this point, Loader has already processed all non-scalar result data. We - just need to account for scalar result data here... - - - - - Encapsulates the metadata available from the database result set. - - - - - Initializes a new instance of the class. - - The result set. - - - - Gets the column count in the result set. - - The column count. - - - - Gets the (zero-based) position of the column with the specified name. - - Name of the column. - The column position. - - - - Gets the name of the column at the specified position. - - The (zero-based) position. - The column name. - - - - Gets the Hibernate type of the specified column. - - The column position. - The Hibernate type. - - - Specifically a fetch return that refers to an entity association. - - - - Represents a return which names a "root" entity. - - - A root entity means it is explicitly a "column" in the result, as opposed to - a fetched association. - - - - Represent a scalar (AKA simple value) return within a query result. - - - - Abstract superclass for entity loaders that use outer joins - - - - - Loads entities for a - - - - - Load an entity instance. If OptionalObject is supplied, load the entity - state into the given (uninitialized) object - - - - - "Batch" loads entities, using multiple primary key values in the - SQL where clause. - - - - - - A walker for loaders that fetch entities - - - - - - Disable outer join fetching if this loader obtains an - upgrade lock mode - - - - - Load an entity using outerjoin fetching to fetch associated entities. - - - The must implement . For other entities, - create a customized subclass of . - - - - - CollectionAliases which handles the logic of selecting user provided aliases (via return-property), - before using the default aliases. - - - - - Returns the suffixed result-set column-aliases for columns making up the key for this collection (i.e., its FK to - its owner). - - - - - Returns the suffixed result-set column-aliases for the columns making up the collection's index (map or list). - - - - - Returns the suffixed result-set column-aliases for the columns making up the collection's elements. - - - - - Returns the suffixed result-set column-aliases for the column defining the collection's identifier (if any). - - - - - Returns the suffix used to unique the column aliases for this particular alias set. - - - - - Get the position of the join with the given alias in the - list of joins - - - - - Convenience base class for AuxiliaryDatabaseObjects. - - - This implementation performs dialect scoping checks strictly based on - dialect name comparisons. Custom implementations might want to do - instanceof-type checks. - - - - - Auxiliary database objects (i.e., triggers, stored procedures, etc) defined - in the mappings. Allows Hibernate to manage their lifecycle as part of - creating/dropping the schema. - - - - - Operations to create/drop the mapping element in the database. - - - - - When implemented by a class, generates the SQL string to create - the mapping element in the database. - - The to use for SQL rules. - - - - - A string that contains the SQL to create an object. - - - - - When implemented by a class, generates the SQL string to drop - the mapping element from the database. - - The to use for SQL rules. - - - - A string that contains the SQL to drop an object. - - - - - Add the given dialect name to the scope of dialects to which - this database object applies. - - The name of a dialect. - - - - Does this database object apply to the given dialect? - - The dialect to check against. - True if this database object does apply to the given dialect. - - - - Gets called by NHibernate to pass the configured type parameters to the implementation. - - - - - A NHibernate any type. - - - Polymorphic association to one of several tables. - - - - - Any value that maps to columns. - - - - - Represents an identifying key of a table: the value for primary key - of an entity, or a foreign key of a collection or join table or - joined subclass table. - - - - - A value is anything that is persisted by value, instead of - by reference. It is essentially a Hibernate IType, together - with zero or more columns. Values are wrapped by things with - higher level semantics, for example properties, collections, - classes. - - - - - - - - - - Determines if the Value is part of a valid mapping. - - The to validate. - - if the Value is part of a valid mapping, - otherwise. - - - - Mainly used to make sure that Value maps to the correct number - of columns. - - - - - Gets the number of columns that this value spans in the table. - - - - - Gets an of objects - that this value is stored in. - - - - - Gets the to read/write the Values. - - - - - Gets the this Value is stored in. - - - - - Gets a indicating if this Value is unique. - - - - - Gets a indicating if this Value can have - null values. - - - - - Gets a indicating if this is a SimpleValue - that does not involve foreign keys. - - - - - Get or set the identifier type name - - - - - Get or set the metatype - - - - - Represent the relation between a meta-value and the related entityName - - - - - An array has a primary key consisting of the key columns + index column - - - - - A list has a primary key consisting of the key columns + index column - - - - - Indexed collections include IList, IDictionary, Arrays - and primitive Arrays. - - - - - Base class that stores the mapping information for <array>, <bag>, - <id-bag>, <list>, <map>, and <set> - collections. - - - Subclasses are responsible for the specialization required for the particular - collection style. - - - - - Any mapping with an outer-join attribute - - - - - Defines mapping elements to which filters may be applied. - - - - - Gets or sets a indicating if this is a - mapping for a generic collection. - - - if a collection from the System.Collections.Generic namespace - should be used, if a collection from the System.Collections - namespace should be used. - - - This has no affect on any versions of the .net framework before .net-2.0. - - - - - Gets or sets an array of that contains the arguments - needed to construct an instance of a closed type. - - - - - Initializes a new instance of the class. - - The that contains this list mapping. - - - - Gets the appropriate that is - specialized for this list mapping. - - - - - Mapping for a property of a .NET class (entity - or component). - - - - Common interface for things that can handle meta attributes. - - - - Retrieve the - - The attribute name - The if exists; null otherwise - - - - Meta-Attribute collection. - - - - - Gets the number of columns this property uses in the db. - - - - - Gets an of s. - - - - - Gets or Sets the name of the Property in the class. - - - - - - - - A bag permits duplicates, so it has no primary key - - - - - A bag permits duplicates, so it has no primary key. - - The that contains this bag mapping. - - - - Gets the appropriate that is - specialized for this bag mapping. - - - - - Represents the mapping to a column in a database. - - - - - Initializes a new instance of . - - - - - Initializes a new instance of . - - The name of the column. - - - - Gets the name of this Column in quoted form if it is necessary. - - - The that knows how to quote - the column name. - - - The column name in a form that is safe to use inside of a SQL statement. - Quoted if it needs to be, not quoted if it does not need to be. - - - - For any column name, generate an alias that is unique - to that column name, and also 10 characters or less - in length. - - - - Gets the name of the data type for the column. - - The to use to get the valid data types. - - - The name of the data type for the column. - - - If the mapping file contains a value of the attribute sql-type this will - return the string contained in that attribute. Otherwise it will use the - typename from the of the object. - - - - - Determines if this instance of and a specified object, - which must be a Column can be considered the same. - - An that should be a . - - if the name of this Column and the other Column are the same, - otherwise . - - - - - Determines if this instance of and the specified Column - can be considered the same. - - A to compare to this Column. - - if the name of this Column and the other Column are the same, - otherwise . - - - - - Returns the hash code for this instance. - - - - returns quoted name as it would be in the mapping file. - - - Shallow copy, the value is not copied - - - - Gets or sets the length of the datatype in the database. - - The length of the datatype in the database. - - - - Gets or sets the name of the column in the database. - - - The name of the column in the database. The get does - not return a Quoted column name. - - -

- If a value is passed in that is wrapped by ` then - NHibernate will Quote the column whenever SQL is generated - for it. How the column is quoted depends on the Dialect. -

-

- The value returned by the getter is not Quoted. To get the - column name in quoted form use . -

-
-
- - - Gets or sets if the column can have null values in it. - - if the column can have a null value in it. - - - - Gets or sets the index of the column in the . - - - The index of the column in the . - - - - - Gets or sets if the column contains unique values. - - if the column contains unique values. - - - - Gets or sets the sql data type name of the column. - - - The sql data type name of the column. - - - This is usually read from the sql-type attribute. - - - - - Gets or sets if the column needs to be quoted in SQL statements. - - if the column is quoted. - - - - Gets or sets whether the column is unique. - - - - - Gets or sets a check constraint on the column - - - - - Do we have a check constraint? - - - - - The underlying columns SqlType. - - - If null, it is because the sqltype code is unknown. - - Use to retreive the sqltypecode used - for the columns associated Value/Type. - - - - - The mapping for a component, composite element, composite identifier, - etc. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Base class for relational constraints in the database. - - - - - Adds the to the of - Columns that are part of the constraint. - - The to include in the Constraint. - - - - Generates the SQL string to drop this Constraint in the database. - - The to use for SQL rules. - - - - A string that contains the SQL to drop this Constraint. - - - - - Generates the SQL string to create this Constraint in the database. - - The to use for SQL rules. - - - - - A string that contains the SQL to create this Constraint. - - - - - When implemented by a class, generates the SQL string to create the named - Constraint in the database. - - The to use for SQL rules. - The name to use as the identifier of the constraint in the database. - - - - A string that contains the SQL to create the named Constraint. - - - - - Gets or sets the Name used to identify the constraint in the database. - - The Name used to identify the constraint in the database. - - - - Gets an of objects that are part of the constraint. - - - An of objects that are part of the constraint. - - - - - Gets the number of columns that this Constraint contains. - - - The number of columns that this Constraint contains. - - - - - Gets or sets the this Constraint is in. - - - The this Constraint is in. - - - - - Represents a Table in a database that an object gets mapped against. - - - - - Initializes a new instance of . - - - - - Generates the SQL string to create this Table in the database. - - The to use for SQL rules. - - - - - A string that contains the SQL to create this Table, Primary Key Constraints - , and Unique Key Constraints. - - - - - Generates the SQL string to drop this Table in the database. - - The to use for SQL rules. - - - - A string that contains the SQL to drop this Table and to cascade the drop to - the constraints if the database supports it. - - - - - Gets the schema qualified name of the Table. - - The that knows how to Quote the Table name. - The name of the table qualified with the schema if one is specified. - - - - Gets the schema qualified name of the Table using the specified qualifier - - The that knows how to Quote the Table name. - The catalog name. - The schema name. - A String representing the Qualified name. - If this were used with MSSQL it would return a dbo.table_name. - - - returns quoted name as it would be in the mapping file. - - - - Gets the name of this Table in quoted form if it is necessary. - - - The that knows how to quote the Table name. - - - The Table name in a form that is safe to use inside of a SQL statement. - Quoted if it needs to be, not quoted if it does not need to be. - - - - returns quoted name as it is in the mapping file. - - - - Gets the schema for this table in quoted form if it is necessary. - - - The that knows how to quote the table name. - - - The schema name for this table in a form that is safe to use inside - of a SQL statement. Quoted if it needs to be, not quoted if it does not need to be. - - - - - Gets the at the specified index. - - The index of the Column to get. - - The at the specified index. - - - - - Adds the to the of - Columns that are part of the Table. - - The to include in the Table. - - - - Gets the identified by the name. - - The name of the to get. - - The identified by the name. If the - identified by the name does not exist then it is created. - - - - - Gets the identified by the name. - - The name of the to get. - - The identified by the name. If the - identified by the name does not exist then it is created. - - - - - Create a for the columns in the Table. - - - An of objects. - - - - A for the columns in the Table. - - - This does not necessarily create a , if - one already exists for the columns then it will return an - existing . - - - - - Generates a unique string for an of - objects. - - An of objects. - - An unique string for the objects. - - - - - Sets the Identifier of the Table. - - The that represents the Identifier. - - - - - - - - - Return the column which is identified by column provided as argument. - column with atleast a name. - - The underlying column or null if not inside this table. - Note: the instance *can* be different than the input parameter, but the name will be the same. - - - - - Gets or sets the name of the Table in the database. - - - The name of the Table in the database. The get does - not return a Quoted Table name. - - -

- If a value is passed in that is wrapped by ` then - NHibernate will Quote the Table whenever SQL is generated - for it. How the Table is quoted depends on the Dialect. -

-

- The value returned by the getter is not Quoted. To get the - column name in quoted form use . -

-
-
- - - Gets the number of columns that this Table contains. - - - The number of columns that this Table contains. - - - - - Gets an of objects that - are part of the Table. - - - An of objects that are - part of the Table. - - - - - Gets an of objects that - are part of the Table. - - - An of objects that are - part of the Table. - - - - - Gets an of objects that - are part of the Table. - - - An of objects that are - part of the Table. - - - - - Gets an of objects that - are part of the Table. - - - An of objects that are - part of the Table. - - - - - Gets or sets the of the Table. - - The of the Table. - - - - Gets or sets the schema the table is in. - - - The schema the table is in or if no schema is specified. - - - - - Gets the unique number of the Table. - - The unique number of the Table. - - - - Gets or sets if the column needs to be quoted in SQL statements. - - if the column is quoted. - - - - A value which is "typed" by reference to some other value - (for example, a foreign key is typed by the referenced primary key). - - - - - A Foreign Key constraint in the database. - - - - - Generates the SQL string to create the named Foreign Key Constraint in the database. - - The to use for SQL rules. - The name to use as the identifier of the constraint in the database. - - - - A string that contains the SQL to create the named Foreign Key Constraint. - - - - - Get the SQL string to drop this Constraint in the database. - - The to use for SQL rules. - - - - A string that contains the SQL to drop this Constraint. - - - - - Validates that columnspan of the foreignkey and the primarykey is the same. - Furthermore it aligns the length of the underlying tables columns. - - - - - Gets or sets the that the Foreign Key is referencing. - - The the Foreign Key is referencing. - - Thrown when the number of columns in this Foreign Key is not the same - amount of columns as the Primary Key in the ReferencedTable. - - - - Does this foreignkey reference the primary key of the reference table - - - - A formula is a derived column value. - - - - - - - - - - - - - - - - - - - An PersistentIdentifierBag has a primary key consistenting of just - the identifier column. - - - - - A collection with a synthetic "identifier" column. - - - - - - - - - - - - - - - - - - - - - - - - - - An Index in the database. - - - - - Generates the SQL string to create this Index in the database. - - The to use for SQL rules. - - - - - A string that contains the SQL to create this Index. - - - - - Generates the SQL string to drop this Index in the database. - - The to use for SQL rules. - - - - A string that contains the SQL to drop this Index. - - - - - Adds the to the of - Columns that are part of the Index. - - The to include in the Index. - - - - Gets or sets the this Index is in. - - - The this Index is in. - - - - - Gets an of objects that are - part of the Index. - - - An of objects that are - part of the Index. - - - - - Gets or sets the Name used to identify the Index in the database. - - The Name used to identify the Index in the database. - - - - Declaration of a System.Type mapped with the <subclass> or - <joined-subclass> element. - - - - - Base class for the mapped by <class> and a - that is mapped by <subclass> or - <joined-subclass>. - - - - - - - - - - - Adds a to the class hierarchy. - - The to add to the hierarchy. - - - - Change the property definition or add a new property definition - - The to add. - - - - Adds a that is implemented by a subclass. - - The implemented by a subclass. - - - - Adds a that a subclass is stored in. - - The the subclass is stored in. - - - - Creates the for the - this type is persisted in. - - The that is used to Alias columns. - - - - Given a property path, locate the appropriate referenceable property reference. - - - A referenceable property is a property which can be a target of a foreign-key - mapping (an identifier or explicitly named in a property-ref). - - The property path to resolve into a property reference. - The property reference (never null). - If the property could not be found. - - - - - - - - - - Gets the that is being mapped. - - The that is being mapped. - - The value of this is set by the name attribute on the <class> - element. - - - - - Gets or sets the to use as a Proxy. - - The to use as a Proxy. - - The value of this is set by the proxy attribute. - - - - - Gets or Sets if the Insert Sql is built dynamically. - - if the Sql is built at runtime. - - The value of this is set by the dynamic-insert attribute. - - - - - Gets or Sets if the Update Sql is built dynamically. - - if the Sql is built at runtime. - - The value of this is set by the dynamic-update attribute. - - - - - Gets or Sets the value to use as the discriminator for the Class. - - - A value that distinguishes this subclass in the database. - - - The value of this is set by the discriminator-value attribute. Each <subclass> - in a hierarchy must define a unique discriminator-value. The default value - is the class name if no value is supplied. - - - - - Gets the number of subclasses that inherit either directly or indirectly. - - The number of subclasses that inherit from this PersistentClass. - - - - Iterate over subclasses in a special 'order', most derived subclasses first. - - - It will recursively go through Subclasses so that if a SubclassType has Subclasses - it will pick those up also. - - - - - Gets an of objects - that directly inherit from this PersistentClass. - - - An of objects - that directly inherit from this PersistentClass. - - - - - When implemented by a class, gets a boolean indicating if this - mapped class is inherited from another. - - - if this class is a subclass or joined-subclass - that inherited from another class. - - - - - When implemented by a class, gets a boolean indicating if the mapped class - has a version property. - - if there is a <version> property. - - - - When implemented by a class, gets an - of objects that this mapped class contains. - - - An of objects that - this mapped class contains. - - - This is all of the properties of this mapped class and each mapped class that - it is inheriting from. - - - - - When implemented by a class, gets an - of objects that this mapped class reads from - and writes to. - - - An of objects that - this mapped class reads from and writes to. - - - This is all of the tables of this mapped class and each mapped class that - it is inheriting from. - - - - - Gets an of objects that - this mapped class contains and that all of its subclasses contain. - - - An of objects that - this mapped class contains and that all of its subclasses contain. - - - - - Gets an of all of the objects that the - subclass finds its information in. - - An of objects. - It adds the TableClosureIterator and the subclassTables into the IEnumerable. - - - - When implemented by a class, gets or sets the of the Persister. - - - - - When implemented by a class, gets the of the class - that is mapped in the class element. - - - The of the class that is mapped in the class element. - - - - - - - - - - - - - - - Build a collection of properties which are "referenceable". - - - See for a discussion of "referenceable". - - - - - - - - - - - - - - - Build an iterator over the properties defined on this class. The returned - iterator only accounts for "normal" properties (i.e. non-identifier - properties). - - - An of objects. - - - Differs from in that the iterator - we return here will include properties defined as part of a join. - - - - - Build an enumerable over the properties defined on this class which - are not defined as part of a join. - As with the returned iterator only accounts - for non-identifier properties. - - An enumerable over the non-joined "normal" properties. - - - - - - - - - Gets a boolean indicating if this PersistentClass has any subclasses. - - if this PeristentClass has any subclasses. - - - - Gets or Sets the that this class is stored in. - - The this class is stored in. - - The value of this is set by the table attribute. - - - - - When implemented by a class, gets or set a boolean indicating - if the mapped class has properties that can be changed. - - if the object is mutable. - - The value of this is set by the mutable attribute. - - - - - When implemented by a class, gets a boolean indicating - if the mapped class has a Property for the id. - - if there is a Property for the id. - - - - When implemented by a class, gets or sets the - that is used as the id. - - - The that is used as the id. - - - - - When implemented by a class, gets or sets the - that contains information about the identifier. - - The that contains information about the identifier. - - - - When implemented by a class, gets or sets the - that is used as the version. - - The that is used as the version. - - - - When implemented by a class, gets or sets the - that contains information about the discriminator. - - The that contains information about the discriminator. - - - - When implemented by a class, gets or sets if the mapped class has subclasses or is - a subclass. - - - if the mapped class has subclasses or is a subclass. - - - - - When implemented by a class, gets or sets the CacheConcurrencyStrategy - to use to read/write instances of the persistent class to the Cache. - - The CacheConcurrencyStrategy used with the Cache. - - - - When implemented by a class, gets or sets the - that this mapped class is extending. - - - The that this mapped class is extending. - - - - - When implemented by a class, gets or sets a boolean indicating if - explicit polymorphism should be used in Queries. - - - if only classes queried on should be returned, - if any class in the heirarchy should implicitly be returned. - - The value of this is set by the polymorphism attribute. - - - - - - - - - - When implemented by a class, gets or sets a boolean indicating if the identifier is - embedded in the class. - - if the class identifies itself. - - An embedded identifier is true when using a composite-id specifying - properties of the class as the key-property instead of using a class - as the composite-id. - - - - - When implemented by a class, gets the of the class - that is mapped in the class element. - - - The of the class that is mapped in the class element. - - - - - When implemented by a class, gets or sets the - that contains information about the Key. - - The that contains information about the Key. - - - - When implemented by a class, gets or sets the sql string that should - be a part of the where clause. - - - The sql string that should be a part of the where clause. - - - The value of this is set by the where attribute. - - - - - Gets or sets a boolean indicating if only values in the discriminator column that - are mapped will be included in the sql. - - if the mapped discriminator values should be forced. - - The value of this is set by the force attribute on the discriminator element. - - - - - Initializes a new instance of the class. - - The that is the superclass. - - - - Add the to this PersistentClass. - - The to add. - - This also adds the to the Superclass' collection - of SubclassType Properties. - - - - - Adds a that is implemented by a subclass. - - The implemented by a subclass. - - This also adds the to the Superclass' collection - of SubclassType Properties. - - - - - Adds a that a subclass is stored in. - - The the subclass is stored in. - - This also adds the to the Superclass' collection - of SubclassType Tables. - - - - - - - - - - Gets a boolean indicating if this mapped class is inherited from another. - - - because this is a SubclassType. - - - - - Gets an of objects that this mapped class contains. - - - An of objects that - this mapped class contains. - - - This is all of the properties of this mapped class and each mapped class that - it is inheriting from. - - - - - Gets an of objects that this - mapped class reads from and writes to. - - - An of objects that - this mapped class reads from and writes to. - - - This is all of the tables of this mapped class and each mapped class that - it is inheriting from. - - - - - Gets a boolean indicating if the mapped class has a version property. - - if for the Superclass there is a Property for a version. - - - - - - - - - Gets the of the class - that is mapped in the class element. - - - The of the Superclass that is mapped in the class element. - - - - - - - - - - Gets or sets the CacheConcurrencyStrategy - to use to read/write instances of the persistent class to the Cache. - - The CacheConcurrencyStrategy used with the Cache. - - - - Gets the of the class that is mapped in the class element. - - - The of the Superclass that is mapped in the class element. - - - - - Gets or sets the that this mapped class is extending. - - - The that this mapped class is extending. - - - - - Gets or sets the that is used as the id. - - - The from the Superclass that is used as the id. - - - - - Gets or sets the that contains information about the identifier. - - The from the Superclass that contains information about the identifier. - - - - Gets a boolean indicating if the mapped class has a Property for the id. - - if in the Superclass there is a Property for the id. - - - - Gets or sets the that contains information about the discriminator. - - The from the Superclass that contains information about the discriminator. - - - - Gets or set a boolean indicating if the mapped class has properties that can be changed. - - if the Superclass is mutable. - - - - Gets or sets if the mapped class is a subclass. - - - since this mapped class is a subclass. - - - The setter should not be used to set the value to anything but . - - - - - Gets or sets the that is used as the version. - - The from the Superclass that is used as the version. - - - - Gets or sets a boolean indicating if the identifier is - embedded in the class. - - if the Superclass has an embedded identifier. - - An embedded identifier is true when using a composite-id specifying - properties of the class as the key-property instead of using a class - as the composite-id. - - - - - Gets or sets the that contains information about the Key. - - The that contains information about the Key. - - - - Gets or sets a boolean indicating if explicit polymorphism should be used in Queries. - - - The value of the Superclasses IsExplicitPolymorphism property. - - - - - Gets the sql string that should be a part of the where clause. - - - The sql string that should be a part of the where clause. - - - Thrown when the setter is called. The where clause can not be set on the - SubclassType, only the RootClass. - - - - - Gets or Sets the that this class is stored in. - - The this class is stored in. - - This also adds the to the Superclass' collection - of SubclassType Tables. - - - - - - - - - A many-to-one association mapping - - - - A simple-point association (ie. a reference to another entity). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A map has a primary key consisting of the key columns - + index columns. - - - - - Initializes a new instance of the class. - - The that contains this map mapping. - - - - Gets the appropriate that is - specialized for this list mapping. - - - - - A meta attribute is a named value or values. - - - - - A mapping for a one-to-many association. - - - - - - - - - - No foreign key element for a one-to-many - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A mapping for a one-to-one association. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A Primary Key constraint in the database. - - - - - Generates the SQL string to create the Primary Key Constraint in the database. - - The to use for SQL rules. - - - A string that contains the SQL to create the Primary Key Constraint. - - - - - Generates the SQL string to create the named Primary Key Constraint in the database. - - The to use for SQL rules. - The name to use as the identifier of the constraint in the database. - - - - A string that contains the SQL to create the named Primary Key Constraint. - - - - - Get the SQL string to drop this Constraint in the database. - - The to use for SQL rules. - - - - A string that contains the SQL to drop this Constraint. - - - - - A primitive array has a primary key consisting - of the key columns + index column. - - - - - Indicates whether given properties are generated by the database and, if - so, at what time(s) they are generated. - - - - - Values for this property are never generated by the database. - - - - - Values for this property are generated by the database on insert. - - - - - Values for this property are generated by the database on both insert and update. - - - - - Declaration of a System.Type mapped with the <class> element that - is the root class of a table-per-subclass, or table-per-concrete-class - inheritance heirarchy. - - - - - The default name of the column for the Identifier - - id is the default column name for the Identifier. - - - - The default name of the column for the Discriminator - - class is the default column name for the Discriminator. - - - - Adds a to the class hierarchy. - - The to add to the hierarchy. - - When a is added this mapped class has the property - set to . - - - - - - - - - - - Gets a boolean indicating if this mapped class is inherited from another. - - - because this is the root mapped class. - - - - - Gets an of objects that this mapped class contains. - - - An of objects that - this mapped class contains. - - - - - Gets an of objects that this - mapped class reads from and writes to. - - - An of objects that - this mapped class reads from and writes to. - - - There is only one in the since - this is the root class. - - - - - Gets a boolean indicating if the mapped class has a version property. - - if there is a Property for a version. - - - - Gets the of the class - that is mapped in the class element. - - - The of the class this mapped class. - - - - - Gets or sets a boolean indicating if the identifier is - embedded in the class. - - if the class identifies itself. - - An embedded identifier is true when using a composite-id specifying - properties of the class as the key-property instead of using a class - as the composite-id. - - - - - Gets or sets the cache region name. - - The region name used with the Cache. - - - - - - - - - Gets or sets the that is used as the id. - - - The that is used as the id. - - - - - Gets or sets the that contains information about the identifier. - - The that contains information about the identifier. - - - - Gets a boolean indicating if the mapped class has a Property for the id. - - if there is a Property for the id. - - - - Gets or sets the that contains information about the discriminator. - - The that contains information about the discriminator. - - - - Gets or sets if the mapped class has subclasses. - - - if the mapped class has subclasses. - - - - - Gets the of the class that is mapped in the class element. - - - this since this is the root mapped class. - - - - - Gets or sets a boolean indicating if explicit polymorphism should be used in Queries. - - - if only classes queried on should be returned, - if any class in the hierarchy should implicitly be returned. - - - - - Gets or sets the that is used as the version. - - The that is used as the version. - - - - Gets or set a boolean indicating if the mapped class has properties that can be changed. - - if the object is mutable. - - - - Gets or sets the that this mapped class is extending. - - - since this is the root class. - - - Thrown when the setter is called. The Superclass can not be set on the - RootClass, only the SubclassType can have a Superclass set. - - - - - Gets or sets the that contains information about the Key. - - The that contains information about the Key. - - - - - - - - - Gets or sets a boolean indicating if only values in the discriminator column that - are mapped will be included in the sql. - - if the mapped discriminator values should be forced. - - - - Gets or sets the sql string that should be a part of the where clause. - - - The sql string that should be a part of the where clause. - - - - - Gets or sets the CacheConcurrencyStrategy - to use to read/write instances of the persistent class to the Cache. - - The CacheConcurrencyStrategy used with the Cache. - - - - A Set with no nullable element columns will have a primary - key consisting of all table columns (ie - key columns + - element columns). - - - - - A simple implementation of AbstractAuxiliaryDatabaseObject in which the CREATE and DROP strings are - provided up front. - - - Contains simple facilities for templating the catalog and schema - names into the provided strings. - This is the form created when the mapping documents use <create/> and <drop/>. - - - - Placeholder for typedef information - - - - An Unique Key constraint in the database. - - - - - Generates the SQL string to create the Unique Key Constraint in the database. - - The to use for SQL rules. - A string that contains the SQL to create the Unique Key Constraint. - - - - Generates the SQL string to create the Unique Key Constraint in the database. - - The to use for SQL rules. - - - - - A string that contains the SQL to create the Unique Key Constraint. - - - - - Get the SQL string to drop this Constraint in the database. - - The to use for SQL rules. - - - - A string that contains the SQL to drop this Constraint. - - - - - Exposes entity class metadata to the application - - - - - Get the type of a particular (named) property - - - Return the values of the mapped properties of the object - - - - The persistent class - - - - - Create a class instance initialized with the given identifier - - - - - Get the value of a particular (named) property - - - - Extract the property values from the given entity. - The entity from which to extract the property values. - The entity-mode of the given entity - The property values. - - - - Set the value of a particular (named) property - - - - - Set the given values to the mapped properties of the given object - - - - - Get the identifier of an instance (throw an exception if no identifier property) - - - - - Set the identifier of an instance (or do nothing if no identifier property) - - - - Does the class implement the interface? - - - Does the class implement the interface? - - - - Get the version number (or timestamp) from the object's version property - (or return null if not versioned) - - - - - The name of the entity - - - - - The name of the identifier property (or return null) - - - - - The names of the class' persistent properties - - - - - The identifier Hibernate type - - - - - The Hibernate types of the classes properties - - - - - Are instances of this class mutable? - - - - - Are instances of this class versioned by a timestamp or version number column? - - - - - Gets the index of the version property - - - - - Get the nullability of the class' persistent properties - - - - Get the "laziness" of the properties of this class - - - Which properties hold the natural id? - - - Does this entity extend a mapped superclass? - - - Does the class support dynamic proxies? - - - Does the class have an identifier property? - - - Does this entity declare a natural id? - - - Does this entity have mapped subclasses? - - - - Exposes collection metadata to the application - - - - - The collection key type - - - - - The collection element type - - - - - The collection index type (or null if the collection has no index) - - - - - Is the collection indexed? - - - - - The name of this collection role - - - - - Is the collection an array? - - - - - Is the collection a primitive array? - - - - - Is the collection lazily initialized? - - - - - An additional contract for parameters which originate from parameters explicitly encountered in the source statement - (HQL or native-SQL). - Author: Steve Ebersole - Ported by: Steve Strong - - - - - Maintains information relating to parameters which need to get bound into a - JDBC {@link PreparedStatement}. - Author: Steve Ebersole - Ported by: Steve Strong - - - - - Bind the appropriate value into the given statement at the specified position. - - The statement into which the value should be bound. - The defined values for the current query execution. - The session against which the current execution is occuring. - The position from which to start binding value(s). - The number of sql bind positions "eaten" by this bind operation. - - - - Render this parameter into displayable info (for logging, etc). - - The displayable info - - - - Get or set the type which we are expeting for a bind into this parameter based - on translated contextual information. - - - - - Retrieves the line number on which this parameter occurs in the source query. - - - - - Retrieves the column number (within the {@link #getSourceLine()}) where this parameter occurs. - - - - - Constructs an AbstractExplicitParameterSpecification. - - sourceLine - sourceColumn - - - - Creates a specialized collection-filter collection-key parameter spec. - - The collection role being filtered. - The mapped collection-key type. - The position within QueryParameters where we can find the appropriate param value to bind. - - - - Constructs a parameter specification for a particular filter parameter. - - The name of the filter - The name of the parameter - The paremeter type specified on the filter metadata - - - - Parameter bind specification for an explicit named parameter. - Author: Steve Ebersole - Ported by: Steve Strong - - - - - Constructs a named parameter bind specification. - - sourceLine - sourceColumn - The named parameter name. - - - - Bind the appropriate value into the given statement at the specified position. - - The statement into which the value should be bound. - The defined values for the current query execution. - The session against which the current execution is occuring. - The position from which to start binding value(s). - The number of sql bind positions "eaten" by this bind operation. - - - - Getter for property 'name'. - - - - - Defines the information available for parameters encountered during - query translation through the antlr-based parser. - Author: Steve Ebersole - Ported by: Steve Strong - - - - - Parameter bind specification for an explicit positional (or ordinal) parameter. - Author: Steve Ebersole - Ported by: Steve Strong - - - - - Constructs a position/ordinal parameter bind specification. - - sourceLine - sourceColumn - The position in the source query, relative to the other source positional parameters. - - - - Bind the appropriate value into the given statement at the specified position. - - The statement into which the value should be bound. - The defined values for the current query execution. - The session against which the current execution is occuring. - The position from which to start binding value(s). - The number of sql bind positions "eaten" by this bind operation. - - - - Getter for property 'hqlPosition'. - - - - - Summary description for AbstractCollectionPersister. - - - - - A collection role that may be queried or loaded by outer join. - - - - - Abstraction of all mappings that define properties: entities, collection elements. - - - - - Given a component path expression, get the type of the property - - - - - - - Given a component path expression, get the type of the property. - - - - true if a type was found, false if not - - - - Given a query alias and a property path, return the qualified column name - - - - - - - Given a property path, return the corresponding column name(s). - - - - Get the type of the thing containing the properties - - - - - Anything that can be loaded by outer join - namely persisters for classes or collections. - - - - - All columns to select, when loading. - - - - - Get the where clause part of any joins (optional operation) - - - - - - - - - Get the from clause part of any joins (optional operation) - - - - - - - - - Get the where clause filter, given a query alias and considering enabled session filters - - - - - Very, very, very ugly... - - Does this persister "consume" entity column aliases in the result - set? - - - - Very, very, very ugly... - - Does this persister "consume" collection column aliases in the result - set? - - - - An identifying name; a class name or collection role name. - - - - - The columns to join on. - - - - - Is this instance actually a ICollectionPersister? - - - - - The table to join to. - - - - - A strategy for persisting a collection role. - - - Defines a contract between the persistence strategy and the actual persistent collection framework - and session. Does not define operations that are required for querying collections, or loading by outer join. - - Implements persistence of a collection instance while the instance is - referenced in a particular role. - - This class is highly coupled to the - hierarchy, since double dispatch is used to load and update collection - elements. - - May be considered an immutable view of the mapping object - - - - - Initialize the given collection with the given key - - - - - - - Read the key from a row of the - - - - - Read the element from a row of the - - - - - Read the index from a row of the - - - - - Read the identifier from a row of the - - - - - Completely remove the persistent state of the collection - - - - - - - (Re)create the collection's persistent state - - - - - - - - Delete the persistent state of any elements that were removed from the collection - - - - - - - - Update the persistent state of any elements that were modified - - - - - - - - Insert the persistent state of any new collection elements - - - - - - - - Generates the collection's key column aliases, based on the given - suffix. - - The suffix to use in the key column alias generation. - The key column aliases. - - - - Generates the collection's index column aliases, based on the given - suffix. - - The suffix to use in the index column alias generation. - The index column aliases, or null if not indexed. - - - - Generates the collection's element column aliases, based on the given - suffix. - - The suffix to use in the element column alias generation. - The element column aliases. - - - - Generates the collection's identifier column aliases, based on the given - suffix. - - The suffix to use in the identifier column alias generation. - The identifier column aliases. - - - - Get the cache - - - - Get the cache structure - - - - Get the associated IType - - - - - Get the "key" type (the type of the foreign key) - - - - - Get the "index" type for a list or map (optional operation) - - - - - Get the "element" type - - - - - Return the element class of an array, or null otherwise - - - - - Is this an array or primitive values? - - - - - Is this an array? - - - - Is this a one-to-many association? - - - - Is this a many-to-many association? Note that this is mainly - a convenience feature as the single persister does not - contain all the information needed to handle a many-to-many - itself, as internally it is looked at as two many-to-ones. - - - - - Is this collection lazily initialized? - - - - - Is this collection "inverse", so state changes are not propogated to the database. - - - - - Get the name of this collection role (the fully qualified class name, extended by a "property path") - - - - Get the persister of the entity that "owns" this collection - - - - Get the surrogate key generation strategy (optional operation) - - - - - Get the type of the surrogate key - - - - Get the "space" that holds the persistent state - - - - Is cascade delete handled by the database-level - foreign key constraint definition? - - - - - Does this collection cause version increment of the owning entity? - - - - Can the elements of this collection change? - - - - Is this collection role cacheable - - - - - Is this an "indexed" collection? (list or map) - - - - - Does this collection implement "orphan delete"? - - - - - Is this an ordered collection? (An ordered collection is - ordered by the initialization operation, not by sorting - that happens in memory, as in the case of a sorted collection.) - - - - - Generate a list of collection index and element columns - - - - - Get the names of the collection index columns if - this is an indexed collection (optional operation), - aliased by the given table alias - - - - - Get the names of the collection element columns (or the primary - key columns in the case of a one-to-many association), - aliased by the given table alias - - - - - Get the extra where clause filter SQL - - - - - - - Get the order by SQL - - - - - - - Get the order-by to be applied at the target table of a many to many - - The alias for the many-to-many target table - Appropriate order-by fragment or empty string. - - - - Get the index formulas if this is an indexed collection - (optional operation) - - - - - Get the persister of the element class, if this is a - collection of entities (optional operation). Note that - for a one-to-many association, the returned persister - must be OuterJoinLoadable. - - - - - Should we load this collection role by outer joining? - - - - - Get the names of the collection index columns if this is an indexed collection (optional operation) - - - - - Get the names of the collection element columns (or the primary key columns in the case of a one-to-many association) - - - - - Does this collection role have a where clause filter? - - - - - Reads the Element from the IDataReader. The IDataReader will probably only contain - the id of the Element. - - See ReadElementIdentifier for an explanation of why this method will be depreciated. - - - - Perform an SQL INSERT, and then retrieve a generated identifier. - - the id of the collection entry - - This form is used for PostInsertIdentifierGenerator-style ids (IDENTITY, select, etc). - - - - - Return the element class of an array, or null otherwise - - - - - Get the name of this collection role (the fully qualified class name, - extended by a "property path") - - - - - Collection persister for collections of values and many-to-many associations. - - - - - Generate the SQL DELETE that deletes all rows - - - - - - Generate the SQL INSERT that creates a new row - - - - - - Generate the SQL UPDATE that updates a row - - - - - - Generate the SQL DELETE that deletes a particular row - - - - - - Create the - - - - - Summary description for CollectionPropertyMapping. - - - - - The names of all the collection properties. - - - - - Summary description for CompositeElementPropertyMapping. - - - - - Base implementation of a PropertyMapping. - - - - - Summary description for ElementPropertyMapping. - - - - - Summary description for OneToManyPersister. - - - - - Generate the SQL UPDATE that updates all the foreign keys to null - - - - - - Generate the SQL UPDATE that updates a foreign key to a value - - - - - - Not needed for one-to-many association - - - - - - Generate the SQL UPDATE that updates a particular row's foreign - key to null - - - - - - Create the - - - - - Superclass for built-in mapping strategies. Implements functionalty common to both mapping - strategies - - - May be considered an immutable view of the mapping object - - - - - A ClassPersister that may be loaded by outer join using - the OuterJoinLoader hierarchy and may be an element - of a one-to-many association. - - - - - Implemented by ClassPersister that uses Loader. There are several optional - operations used only by loaders that inherit OuterJoinLoader - - - - - Concrete IEntityPersisters implement mapping and persistence logic for a particular class. - - - Implementors must be threadsafe (preferably immutable) and must provide a constructor of type - matching the signature of: (PersistentClass, SessionFactoryImplementor) - - - - - Finish the initialization of this object, once all ClassPersisters have been - instantiated. Called only once, before any other method. - - - - - Determine whether the given name represents a subclass entity - (or this entity itself) of the entity mapped by this persister. - - The entity name to be checked. - - True if the given entity name represents either the entity mapped by this persister or one of its subclass entities; - false otherwise. - - - - - Get the type of a particular property - - - - - - Locate the property-indices of all properties considered to be dirty. - The current state of the entity (the state to be checked). - The previous state of the entity (the state to be checked against). - The entity for which we are checking state dirtiness. - The session in which the check is ccurring. - or the indices of the dirty properties - - - Locate the property-indices of all properties considered to be dirty. - The old state of the entity. - The current state of the entity. - The entity for which we are checking state modification. - The session in which the check is ccurring. - return or the indicies of the modified properties - - - - Retrieve the current state of the natural-id properties from the database. - - - The identifier of the entity for which to retrieve the naturak-id values. - - - The session from which the request originated. - - The natural-id snapshot. - - - - Load an instance of the persistent class. - - - - - Do a version check (optional operation) - - - - - Persist an instance - - - - - Persist an instance, using a natively generated identifier (optional operation) - - - - - Delete a persistent instance - - - - - Update a persistent instance - - The id. - The fields. - The dirty fields. - if set to [has dirty collection]. - The old fields. - The old version. - The obj. - The rowId - The session. - - - - Get the current database state of the object, in a "hydrated" form, without resolving identifiers - - - - if select-before-update is not enabled or not supported - - - - Get the current version of the object, or return null if there is no row for - the given identifier. In the case of unversioned data, return any object - if the row exists. - - - - - - - Try to discover the entity mode from the entity instance - - - Has the class actually been bytecode instrumented? - - - Called just after the entities properties have been initialized - - - Called just after the entity has been reassociated with the session - - - - Create a new proxy instance - - - - - - - Is this a new transient instance? - - - Return the values of the insertable properties of the object (including backrefs) - - - - Perform a select to retrieve the values of any generated properties - back from the database, injecting these generated values into the - given entity as well as writing this state to the persistence context. - - - Note, that because we update the persistence context here, callers - need to take care that they have already written the initial snapshot - to the persistence context before calling this method. - - The entity's id value. - The entity for which to get the state. - The entity state (at the time of Save). - The session. - - - - Perform a select to retrieve the values of any generated properties - back from the database, injecting these generated values into the - given entity as well as writing this state to the persistence context. - - - Note, that because we update the persistence context here, callers - need to take care that they have already written the initial snapshot - to the persistence context before calling this method. - - The entity's id value. - The entity for which to get the state. - The entity state (at the time of Save). - The session. - - - - The persistent class, or null - - - - - Does the class implement the ILifecycle inteface? - - - - - Does the class implement the IValidatable interface? - - - - - Get the proxy interface that instances of this concrete class will be cast to - - - - - Set the given values to the mapped properties of the given object - - - - - Set the value of a particular property - - - - - Return the values of the mapped properties of the object - - - - - Get the value of a particular property - - - - - Get the value of a particular property - - - - - Get the identifier of an instance ( throw an exception if no identifier property) - - - - - Set the identifier of an instance (or do nothing if no identifier property) - - The object to set the Id property on. - The value to set the Id property to. - The EntityMode - - - - Get the version number (or timestamp) from the object's version property (or return null if not versioned) - - - - - Create a class instance initialized with the given identifier - - - - - Determines whether the specified entity is an instance of the class - managed by this persister. - - The entity. - The EntityMode - - if the specified entity is an instance; otherwise, . - - - - Does the given instance have any uninitialized lazy properties? - - - - Set the identifier and version of the given instance back - to its "unsaved" value, returning the id - - - - Get the persister for an instance of this class or a subclass - - - - Check the version value trough . - - The snapshot entity state - The result of . - NHibernate-specific feature, not present in H3.2 - - - - The ISessionFactory to which this persister "belongs". - - - - - Returns an object that identifies the space in which identifiers of - this entity hierarchy are unique. - - - - - The entity name which this persister maps. - - - - - Retrieve the underlying entity metamodel instance... - - The metamodel - - - - Returns an array of objects that identify spaces in which properties of - this entity are persisted, for instances of this class only. - - The property spaces. - - For most implementations, this returns the complete set of table names - to which instances of the mapped entity are persisted (not accounting - for superclass entity mappings). - - - - - Returns an array of objects that identify spaces in which properties of - this entity are persisted, for instances of this class and its subclasses. - - - Much like , except that here we include subclass - entity spaces. - - The query spaces. - - - - Are instances of this class mutable? - - - - - Determine whether the entity is inherited one or more other entities. - In other words, is this entity a subclass of other entities. - - True if other entities extend this entity; false otherwise. - - - - Is the identifier assigned before the insert by an IDGenerator or is it returned - by the Insert() method? - - - This determines which form of Insert() will be called. - - - - - Are instances of this class versioned by a timestamp or version number column? - - - - - Get the type of versioning (optional operation) - - - - - Which property holds the version number? (optional operation) - - - - - If the entity defines a natural id (), which - properties make up the natural id. - - - The indices of the properties making of the natural id; or - null, if no natural id is defined. - - - - - Return the IIdentifierGenerator for the class - - - - - Get the Hibernate types of the class properties - - - - - Get the names of the class properties - doesn't have to be the names of the actual - .NET properties (used for XML generation only) - - - - - Gets if the Property is insertable. - - if the Property's value can be inserted. - - This is for formula columns and if the user sets the insert attribute on the <property> element. - - - - Which of the properties of this class are database generated values on insert? - - - Which of the properties of this class are database generated values on update? - - - - Properties that may be dirty (and thus should be dirty-checked). These - include all updatable properties and some associations. - - - - - Get the nullability of the properties of this class - - - - - Get the "versionability" of the properties of this class (is the property optimistic-locked) - - if the property is optimistic-locked; otherwise, . - - - - Get the cascade styles of the properties (optional operation) - - - - - Get the identifier type - - - - - Get the name of the indentifier property (or return null) - need not return the - name of an actual .NET property - - - - - Should we always invalidate the cache instead of recaching updated state - - - - - Should lazy properties of this entity be cached? - - - - - Get the cache (optional operation) - - - - Get the cache structure - - - - Get the user-visible metadata for the class (optional operation) - - - - - Is batch loading enabled? - - - - Is select snapshot before update enabled? - - - - Does this entity contain a version property that is defined - to be database generated? - - - - - Does this class support dynamic proxies? - - - - - Do instances of this class contain collections? - - - - - Determine whether any properties of this entity are considered mutable. - - - True if any properties of the entity are mutable; false otherwise (meaning none are). - - - - - Determine whether this entity contains references to persistent collections - which are fetchable by subselect? - - - True if the entity contains collections fetchable by subselect; false otherwise. - - - - - Does this class declare any cascading save/update/deletes? - - - - - Does the class have a property holding the identifier value? - - - - - Determine whether detahced instances of this entity carry their own - identifier value. - - - True if either (1) or - (2) the identifier is an embedded composite identifier; false otherwise. - - - The other option is the deprecated feature where users could supply - the id during session calls. - - - - - Determine whether this entity defines a natural identifier. - - True if the entity defines a natural id; false otherwise. - - - - Determine whether this entity defines any lazy properties (ala - bytecode instrumentation). - - - True if the entity has properties mapped as lazy; false otherwise. - - - - - Gets if the Property is updatable - - if the Property's value can be updated. - - This is for formula columns and if the user sets the update attribute on the <property> element. - - - - - Does this class have a cache? - - - - - Does this entity define any properties as being database-generated on insert? - - - - - Does this entity define any properties as being database-generated on update? - - - - - Get the concrete subclass corresponding to the given discriminator value - - - - - Get the result set aliases used for the identifier columns, given a suffix - - - - - Get the result set aliases used for the property columns, given a suffix (properties of this class, only). - - - - - Get the result set column names mapped for this property (properties of this class, only). - - - - - Get the alias used for the discriminator column, given a suffix - - - - - Retrieve property values from one row of a result set - - - - - The discriminator type - - - - - Get the names of columns used to persist the identifier - - - - - Get the name of the column used as a discriminator - - - - - Does the persistent class have subclasses? - - - - Does the result set contain rowids? - - - - Generate a list of collection index and element columns - - - - - - - - How many properties are there, for this class and all subclasses? (optional operation) - - - - - - May this property be fetched using an SQL outerjoin? - - - - - - - Get the cascade style of this (subclass closure) property - - - - - Is this property defined on a subclass of the mapped class? - - - - - - - Get an array of the types of all properties of all subclasses (optional operation) - - - - - - - Get the name of the numbered property of the class or a subclass - (optional operation) - - - - - - - Is the numbered property of the class of subclass nullable? - - - - - Return the column names used to persist all properties of all sublasses of the persistent class - (optional operation) - - - - - Return the table name used to persist the numbered property of - the class or a subclass - (optional operation) - - - - - Given the number of a property of a subclass, and a table alias, return the aliased column names - (optional operation) - - - - - - - - Get the main from table fragment, given a query alias (optional operation) - - - - - - - Get the column names for the given property path - - - - - Get the table name for the given property path - - - - - Return the alised identifier column names - - - - - Extends the generic ILoadable contract to add operations required by HQL - - - - - Given a query alias and an identifying suffix, render the intentifier select fragment. - - - - - - - - Given a query alias and an identifying suffix, render the property select fragment. - - - - - Given a property name, determine the number of the table which contains the column - to which this property is mapped. - - The name of the property. - The number of the table to which the property is mapped. - - Note that this is not relative to the results from {@link #getConstraintOrderedTableNameClosure()}. - It is relative to the subclass table name closure maintained internal to the persister (yick!). - It is also relative to the indexing used to resolve {@link #getSubclassTableName}... - - - - Determine whether the given property is declared by our - mapped class, our super class, or one of our subclasses... -

- Note: the method is called 'subclass property...' simply - for consistency sake (e.g. {@link #getSubclassPropertyTableNumber} -

- The property name. - The property declarer -
- - - Get the name of the table with the given index from the internal array. - - The index into the internal array. - - - - - The alias used for any filter conditions (mapped where-fragments or - enabled-filters). - - The root alias - The alias used for "filter conditions" within the where clause. - - This may or may not be different from the root alias depending upon the - inheritance mapping strategy. - - - - - Is this class explicit polymorphism only? - - - - - The class that this class is mapped as a subclass of - not necessarily the direct superclass - - - - - The discriminator value for this particular concrete subclass, as a string that may be - embedded in a select statement - - - - - The discriminator value for this particular concrete subclass - - The DiscriminatorValue is specific of NH since we are using strongly typed parameters for SQL query. - - - - Is the inheritance hierarchy described by this persister contained across - multiple tables? - - True if the inheritance hierarchy is spread across multiple tables; false otherwise. - - - - Get the names of all tables used in the hierarchy (up and down) ordered such - that deletes in the given order would not cause constraint violations. - - The ordered array of table names. - - - - For each table specified in , get - the columns that define the key between the various hierarchy classes. - - - The first dimension here corresponds to the table indexes returned in - . - - The second dimension should have the same length across all the elements in - the first dimension. If not, that'd be a problem ;) - - - - - Get the name of the temporary table to be used to (potentially) store id values - when performing bulk update/deletes. - - The appropriate temporary table name. - - - - Get the appropriate DDL command for generating the temporary table to - be used to (potentially) store id values when performing bulk update/deletes. - - The appropriate temporary table creation command. - - - Is the version property included in insert statements? - - - - Describes a class that may be loaded via a unique key. - - - - - Load an instance of the persistent class, by a unique key other than the primary key. - - - - - Get the property number of the unique key property - - - - - A class persister that supports queries expressed in the platform native SQL dialect. - - - - - Returns the column alias names used to persist/query the numbered property of the class or a subclass (optional operation). - - - - - Return the column names used to persist/query the named property of the class or a subclass (optional operation). - - - - - All columns to select, when loading. - - - - - Get the type - - - - - Contract for things that can be locked via a . - - - Currently only the root table gets locked, except for the case of HQL and Criteria queries - against dialects which do not support either (1) FOR UPDATE OF or (2) support hint locking - (in which case *all* queried tables would be locked). - - - - - Get the SQL alias this persister would use for the root table - given the passed driving alias. - - - The driving alias; or the alias for the table mapped by this persister in the hierarchy. - - The root table alias. - - - - Locks are always applied to the "root table". - - - - - Get the names of columns on the root table used to persist the identifier. - - - - - For versioned entities, get the name of the column (again, expected on the - root table) used to store the version values. - - - - - To build the SQL command in pessimistic lock - - - - - Decide which tables need to be updated - - The indices of all the entity properties considered dirty. - Whether any collections owned by the entity which were considered dirty. - Array of booleans indicating which table require updating. - - The return here is an array of boolean values with each index corresponding - to a given table in the scope of this persister. - - - - - Generate the SQL that selects the version number by id - - - - - Retrieve the version number - - - - - Warning: - When there are duplicated property names in the subclasses - of the class, this method may return the wrong table - number for the duplicated subclass property (note that - SingleTableEntityPersister defines an overloaded form - which takes the entity name. - - - - - Get the column names for the numbered property of this class - - - - - Must be called by subclasses, at the end of their constructors - - - - Generate the SQL that updates a row by id (and version) - - - Generate the SQL that inserts a row - - - Marshall the fields of a persistent instance to a prepared statement - - - - Unmarshall the fields of a persistent instance from a result set, - without resolving associations or collections - - - - - Perform an SQL INSERT, and then retrieve a generated identifier. - - - This form is used for PostInsertIdentifierGenerator-style ids (IDENTITY, select, etc). - - - - - Perform an SQL INSERT. - - - This for is used for all non-root tables as well as the root table - in cases where the identifier value is known before the insert occurs. - - - - Perform an SQL UPDATE or SQL INSERT - - - - Perform an SQL DELETE - - - - - Load an instance using the appropriate loader (as determined by - - - - - Transform the array of property indexes to an array of booleans, true when the property is dirty - - - - Which properties appear in the SQL update? (Initialized, updateable ones!) - - - - Determines whether the specified entity is an instance of the class - managed by this persister. - - The entity. - The entity mode. - - if the specified entity is an instance; otherwise, . - - - - - The queries that delete rows by id (and version) - - - - - The queries that insert rows with a given id - - - - - The queries that update rows by id (and version) - - - - - The query that inserts a row, letting the database generate an id - - The IDENTITY-based insertion query. - - - - We can't immediately add to the cache if we have formulas - which must be evaluated, or if we have the possibility of - two concurrent updates to the same item being merged on - the database. This can happen if (a) the item is not - versioned and either (b) we have dynamic update enabled - or (c) we have multiple tables holding the state of the - item. - - - - The property name of the "special" identifier property in HQL - - - - A IEntityPersister implementing the normalized "table-per-subclass" mapping strategy - - - - - Constructs the NormalizedEntityPerister for the PersistentClass. - - The PersistentClass to create the EntityPersister for. - The configured . - The SessionFactory that this EntityPersister will be stored in. - The mapping used to retrieve type information. - - - - Find the Index of the table name from a list of table names. - - The name of the table to find. - The array of table names - The Index of the table in the array. - Thrown when the tableName specified can't be found - - - - Not really a Loader, just a wrapper around a named query. - - - - - Default implementation of the ClassPersister interface. Implements the - "table-per-class hierarchy" mapping strategy for an entity class. - - - - Generate the SQL that selects a row by id - - - - Factory for IEntityPersister and ICollectionPersister instances. - - - - - Creates a built in Entity Persister or a custom Persister. - - - - - Creates a specific Persister - could be a built in or custom persister. - - - - - A Strategy for converting a mapped property name to a Field name. - - - - - When implemented by a class, converts the Property's name into a Field name - - The name of the mapped property. - The name of the Field. - - - Represents a "back-reference" to the id of a collection owner. - - - - Abstracts the notion of a "property". Defines a strategy for accessing the - value of a mapped property. - - - - - When implemented by a class, create a "getter" for the mapped property. - - The to find the Property in. - The name of the mapped Property to get. - - The to use to get the value of the Property from an - instance of the . - - Thrown when a Property specified by the propertyName could not - be found in the . - - - - - When implemented by a class, create a "setter" for the mapped property. - - The to find the Property in. - The name of the mapped Property to set. - - The to use to set the value of the Property on an - instance of the . - - - Thrown when a Property specified by the propertyName could not - be found in the . - - - - - Allow embedded and custom accessors to define if the ReflectionOptimizer can be used. - - - - The Setter implementation for id backrefs. - - - - Sets values of a particular mapped property. - - - - - When implemented by a class, sets the value of the Property/Field on the object. - - The object to set the Property value in. - The value to set the Property to. - - Thrown when there is a problem setting the value in the target. - - - - - When implemented by a class, gets the name of the Property. - - The name of the Property or . - - This is an optional operation - if it is not implemented then - is an acceptable value to return. - - - - - When implemented by a class, gets the for the set - accessor of the property. - - - This is an optional operation - if the is not - for a property set then is an acceptable value to return. - It is used by the proxies to determine which setter to intercept for the - identifier property. - - - - The Getter implementation for id backrefs. - - - - Gets values of a particular mapped property. - - - - - When implemented by a class, gets the value of the Property/Field from the object. - - The object to get the Property/Field value from. - - The value of the Property for the target. - - - Thrown when there is a problem getting the value from the target. - - - - Get the property value from the given owner instance. - The instance containing the value to be retrieved. - a map of merged persistent instances to detached instances - The session from which this request originated. - The extracted value. - - - - When implemented by a class, gets the that the Property/Field returns. - - The that the Property returns. - - - - When implemented by a class, gets the name of the Property. - - The name of the Property or . - - This is an optional operation - if the is not - for a Property get then is an acceptable value to return. - - - - - When implemented by a class, gets the for the get - accessor of the property. - - - This is an optional operation - if the is not - for a property get then is an acceptable value to return. - It is used by the proxies to determine which getter to intercept for the - identifier property. - - - - - Accesses mapped property values via a get/set pair, which may be nonpublic. - The default (and recommended strategy). - - - - - Create a for the mapped property. - - The to find the Property in. - The name of the mapped Property to get. - - The to use to get the value of the Property from an - instance of the . - - Thrown when a Property specified by the propertyName could not - be found in the . - - - - - Create a for the mapped property. - - The to find the Property in. - The name of the mapped Property to get. - - The to use to set the value of the Property on an - instance of the . - - - Thrown when a Property specified by the propertyName could not - be found in the . - - - - - Helper method to find the Property get. - - The to find the Property in. - The name of the mapped Property to get. - - The for the Property get or - if the Property could not be found. - - - - - Helper method to find the Property set. - - The to find the Property in. - The name of the mapped Property to set. - - The for the Property set or - if the Property could not be found. - - - - - An for a Property get. - - - - - An that can emit IL to get the property value. - - - - - Emit IL to get the property value from the object on top of the stack. - - - - - Initializes a new instance of . - - The that contains the Property get. - The for reflection. - The name of the Property. - - - - Gets the value of the Property from the object. - - The object to get the Property value from. - - The value of the Property for the target. - - - - - Gets the that the Property returns. - - The that the Property returns. - - - - Gets the name of the Property. - - The name of the Property. - - - - Gets the for the Property. - - - The for the Property. - - - - - An for a Property set. - - - - - An that can emit IL to set the property value. - - - - - Emit IL to set the property of an object to the value. The object - is loaded onto the stack first, then the value, then this method - is called. - - - - - Initializes a new instance of . - - The that contains the Property set. - The for reflection. - The name of the mapped Property. - - - - Sets the value of the Property on the object. - - The object to set the Property value in. - The value to set the Property to. - - Thrown when there is a problem setting the value in the target. - - - - - Gets the name of the mapped Property. - - The name of the mapped Property or . - - - - Gets the for the mapped Property. - - The for the mapped Property. - - - - Implementation of for fields that are the - camelCase version of the PropertyName - - - - - Converts the Property's name into a Field name by making the first character - lower case. - - The name of the mapped property. - The name of the Field in CamelCase format. - - - - Implementation of for fields that are prefixed with - an underscore and the PropertyName is changed to camelCase. - - - - - Converts the Property's name into a Field name by making the first character - of the propertyName lowercase and prefixing it with an underscore. - - The name of the mapped property. - The name of the Field in CamelCase format prefixed with an underscore. - - - - Access the mapped property by using a Field to get and set the value. - - - The is useful when you expose getter and setters - for a Property, but they have extra code in them that shouldn't be executed when NHibernate - is setting or getting the values for loads or saves. - - - - - Initializes a new instance of . - - - - - Initializes a new instance of . - - The to use. - - - - Create a to get the value of the mapped Property - through a Field. - - The to find the Property in. - The name of the mapped Property to get. - - The to use to get the value of the Property from an - instance of the . - - Thrown when a Field specified by the propertyName could not - be found in the . - - - - - Create a to set the value of the mapped Property - through a Field. - - The to find the mapped Property in. - The name of the mapped Property to set. - - The to use to set the value of the Property on an - instance of the . - - - Thrown when a Field for the Property specified by the propertyName using the - could not be found in the . - - - - - Helper method to find the Field. - - The to find the Field in. - The name of the Field to find. - - The for the field. - - - Thrown when a field could not be found. - - - - - Converts the mapped property's name into a Field using - the if one exists. - - The name of the Property. - The name of the Field. - - - - Gets the used to convert the name of the - mapped Property in the hbm.xml file to the name of the field in the class. - - The or . - - - - An that uses a Field instead of the Property get. - - - - - Initializes a new instance of . - - The that contains the field to use for the Property get. - The for reflection. - The name of the Field. - - - - Gets the value of the Field from the object. - - The object to get the Field value from. - - The value of the Field for the target. - - - - - Gets the that the Field returns. - - The that the Field returns. - - - - Gets the name of the Property. - - since this is a Field - not a Property. - - - - Gets the for the Property. - - since this is a Field - not a Property. - - - - An that uses a Field instead of the Property set. - - - - - Initializes a new instance of . - - The that contains the Field to use for the Property set. - The for reflection. - The name of the Field. - - - - Sets the value of the Field on the object. - - The object to set the Field value in. - The value to set the Field to. - - Thrown when there is a problem setting the value in the target. - - - - - Gets the name of the Property. - - since this is a Field - not a Property. - - - - Gets the for the Property. - - since this is a Field - not a Property. - - - Represents a "back-reference" to the index of a collection. - - - Constructs a new instance of IndexPropertyAccessor. - The collection role which this back ref references. - The owner entity name. - - - The Setter implementation for index backrefs. - - - The Getter implementation for index backrefs. - - - - Implementation of for fields that are - the PropertyName in all LowerCase characters. - - - - - Converts the Property's name into a Field name by making the all characters - of the propertyName lowercase. - - The name of the mapped property. - The name of the Field in lowercase. - - - - Implementation of for fields that are prefixed with - an underscore and the PropertyName is changed to lower case. - - - - - Converts the Property's name into a Field name by making the all characters - of the propertyName lowercase and prefixing it with an underscore. - - The name of the mapped property. - The name of the Field in lowercase prefixed with an underscore. - - - Used to declare properties not represented at the pojo level - - - A Getter which will always return null. It should not be called anyway. - - - A Setter which will just do nothing. - - - - Access the mapped property through a Property get to get the value - and go directly to the Field to set the value. - - - This is most useful because Classes can provider a get for the Property - that is the <id> but tell NHibernate there is no setter for the Property - so the value should be written directly to the field. - - - - - Initializes a new instance of . - - The to use. - - - - Creates an to get the value from the Property. - - The to find the Property in. - The name of the mapped Property to get. - - The to use to get the value of the Property from an - instance of the . - - Thrown when a Property specified by the propertyName could not - be found in the . - - - - - Create a to set the value of the mapped Property - through a Field. - - The to find the mapped Property in. - The name of the mapped Property to set. - - The to use to set the value of the Property on an - instance of the . - - - Thrown when a Field for the Property specified by the propertyName using the - could not be found in the . - - - - - Converts the Property's name into a Field name by making the first character - of the propertyName uppercase and prefixing it with the letter 'm'. - - The name of the mapped property. - The name of the Field in PascalCase format prefixed with an 'm'. - - - - Implementation of for fields that are prefixed with - an m_ and the first character in PropertyName capitalized. - - - - - Converts the Property's name into a Field name by making the first character - of the propertyName uppercase and prefixing it with the letter 'm' - and an underscore. - - The name of the mapped property. - The name of the Field in PascalCase format prefixed with an 'm' and an underscore. - - - - Implementation of for fields that are prefixed with - an _ and the first character in PropertyName capitalized. - - - - - Converts the Property's name into a Field name by making the first character - of the propertyName uppercase and prefixing it with an underscore. - - The name of the mapped property. - The name of the Field in PascalCase format prefixed with an underscore. - - - - Factory for creating the various PropertyAccessor strategies. - - - - - Initializes the static members in . - - - - - Gets or creates the specified by the type. - - - The specified by the type. - - - The built in ways of accessing the values of Properties in your domain class are: - - - - Access Method - How NHibernate accesses the Mapped Class. - - - property - - The name attribute is the name of the Property. This is the - default implementation. - - - - field - - The name attribute is the name of the field. If you have any Properties - in the Mapped Class those will be bypassed and NHibernate will go straight to the - field. This is a good option if your setters have business rules attached to them - or if you don't want to expose a field through a Getter & Setter. - - - - nosetter - - The name attribute is the name of the Property. NHibernate will use the - Property's get method to retrieve the value and will use the field - to set the value. This is a good option for <id> Properties because this access method - allows users of the Class to get the value of the Id but not set the value. - - - - readonly - - The name attribute is the name of the Property. NHibernate will use the - Property's get method to retrieve the value but will never set the value back in the domain. - This is used for read-only calculated properties with only a get method. - - - - Assembly Qualified Name - - If NHibernate's built in s are not what is needed for your - situation then you are free to build your own. Provide an Assembly Qualified Name so that - NHibernate can call Activator.CreateInstance(AssemblyQualifiedName) to create it. - - - - - In order for the nosetter to know the name of the field to access NHibernate needs to know - what the naming strategy is. The following naming strategies are built into NHibernate: - - - - Naming Strategy - How NHibernate converts the value of the name attribute to a field name. - - - camelcase - - The name attribute should be changed to CamelCase to find the field. - <property name="Foo" ... > finds a field foo. - - - - camelcase-underscore - - The name attribute should be changed to CamelCase and prefixed with - an underscore to find the field. - <property name="Foo" ... > finds a field _foo. - - - - pascalcase-underscore - - The name attribute should be prefixed with an underscore - to find the field. - <property name="Foo" ... > finds a field _Foo. - - - - pascalcase-m-underscore - - The name attribute should be prefixed with an 'm' and underscore - to find the field. - <property name="Foo" ... > finds a field m_Foo. - - - - pascalcase-m - - The name attribute should be prefixed with an 'm'. - <property name="Foo" ... > finds a field mFoo. - - - - lowercase - - The name attribute should be changed to lowercase to find the field. - <property name="FooBar" ... > finds a field foobar. - - - - lowercase-underscore - - The name attribute should be changed to lowercase and prefixed with - and underscore to find the field. - <property name="FooBar" ... > finds a field _foobar. - - - - - The naming strategy can also be appended at the end of the field access method. Where - this could be useful is a scenario where you do expose a get and set method in the Domain Class - but NHibernate should only use the fields. - - - With a naming strategy and a get/set for the Property available the user of the Domain Class - could write an Hql statement from Foo as foo where foo.SomeProperty = 'a'. If no naming - strategy was specified the Hql statement would have to be from Foo as foo where foo._someProperty - (assuming CamelCase with an underscore field naming strategy is used). - - - - - Retrieves a PropertyAccessor instance based on the given property definition and entity mode. - The property for which to retrieve an accessor. - The mode for the resulting entity. - An appropriate accessor. - - - - Access the mapped property through a Property get to get the value - and do nothing to set the value. - - - This is useful to allow calculated properties in the domain that will never - be recovered from the DB but can be used for querying. - - - - - Initializes a new instance of . - - - - - Creates an to get the value from the Property. - - The to find the Property in. - The name of the mapped Property to get. - - The to use to get the value of the Property from an - instance of the . - - Thrown when a Property specified by the propertyName could not - be found in the . - - - - - Create a to do nothing when trying to - se the value of the mapped Property - - The to find the mapped Property in. - The name of the mapped Property to set. - - An instance of . - - - - - Responsible for accessing property values represented as a XmlElement - or XmlAttribute. - - - - For nodes like "@bar" - - - Defines the strategy for getting property values out of a dom4j Node. - - - Get the declared type - - - Optional operation (return null) - - - Optional operation (return null) - - - For nodes like "@bar" - - - Optional operation (return null) - - - Optional operation (return null) - - - For nodes like "foo/@bar" - - - For nodes like "foo/@bar" - - - For nodes like "foo" - - - For nodes like "foo" - - - For nodes like "." - - - For nodes like "." - - - Lazy initializer for "dynamic-map" entity representations. - - - - Provides the base functionality to Handle Member calls into a dynamically - generated NHibernate Proxy. - - - This could be an extension point later if the .net framework ever gets a Proxy - class that is similar to the java.lang.reflect.Proxy or if a library similar - to cglib was made in .net. - - - - - Perform an ImmediateLoad of the actual object for the Proxy. - - - Thrown when the Proxy has no Session or the Session is closed or disconnected. - - - - - Return the Underlying Persistent Object, initializing if necessary. - - The Persistent Object this proxy is Proxying. - - - - Return the Underlying Persistent Object in a given , or null. - - The Session to get the object from. - The Persistent Object this proxy is Proxying, or . - - - - - - Get the entity name - - - - - - - - - - - - - If this is returned by Invoke then the subclass needs to Invoke the - method call against the object that is being proxied. - - - - - Create a LazyInitializer to handle all of the Methods/Properties that are called - on the Proxy. - - The entityName - The Id of the Object we are Proxying. - The ISession this Proxy is in. - - - - Perform an ImmediateLoad of the actual object for the Proxy. - - - Thrown when the Proxy has no Session or the Session is closed or disconnected. - - - - - Return the Underlying Persistent Object, initializing if necessary. - - The Persistent Object this proxy is Proxying. - - - - Return the Underlying Persistent Object in a given , or null. - - The Session to get the object from. - The Persistent Object this proxy is Proxying, or . - - - - - - - - - Proxy for "dynamic-map" entity representations. - - - - A marker interface so NHibernate can know if it is dealing with - an object that is a Proxy. - - - - This interface should not be implemented by anything other than - the Dynamically generated Proxy. If it is implemented by a class then - NHibernate will think that class is a Proxy and will not work. - - - It has to be public scope because - the Proxies are created in a separate DLL than NHibernate. - - - - - Get the underlying lazy initialization handler. - - - Contract for run-time, proxy-based lazy initialization proxies. - - - Called immediately after instantiation of this factory. - - The name of the entity for which this factory should generate proxies. - - - The entity class for which to generate proxies; not always the same as the entityName. - - - The interfaces to expose in the generated proxy; - is already included in this collection. - - - Reference to the identifier getter method; invocation on this method should not force initialization - - - Reference to the identifier setter method; invocation on this method should not force initialization - - - For composite identifier types, a reference to - the type of the identifier - property; again accessing the id should generally not cause - initialization - but need to bear in mind key-many-to-one - mappings. - - Indicates a problem completing post - - Essentially equivalent to constructor injection, but contracted - here via interface. - - - - - Create a new proxy - - The id value for the proxy to be generated. - The session to which the generated proxy will be associated. - The generated proxy. - Indicates problems generating requested proxy. - - - Lazy initializer for POCOs - - - - Adds all of the information into the SerializationInfo that is needed to - reconstruct the proxy during deserialization or to replace the proxy - with the instantiated target. - - - This will only be called if the Dynamic Proxy generator does not handle serialization - itself or delegates calls to the method GetObjectData to the LazyInitializer. - - - - - Invokes the method if this is something that the LazyInitializer can handle - without the underlying proxied object being instantiated. - - The name of the method/property to Invoke. - The arguments to pass the method/property. - The proxy object that the method is being invoked on. - - The result of the Invoke if the underlying proxied object is not needed. If the - underlying proxied object is needed then it returns the result - which indicates that the Proxy will need to forward to the real implementation. - - - - - Convenient common implementation for ProxyFactory - - - - - Proxeability validator. - - - - - Validates whether can be specified as the base class - (or an interface) for a dynamically-generated proxy. - - The type to validate. - - A collection of errors messages, if any, or if none were found. - - - When the configuration property "use_proxy_validator" is set to true(default), the result of this method - is used to throw a detailed exception about the proxeability of the given . - - - - - Validate if a single method can be intercepted by proxy. - - The given method to check. - if the method can be intercepted by proxy. - otherwise. - - - This method can be used internally by the and is used - by to log errors when - a property accessor can't be intercepted by proxy. - The validation of property accessors is fairly enough if you ecampsulate each property. - - - - - Validates whether can be specified as the base class - (or an interface) for a dynamically-generated proxy. - - The type to validate. - - A collection of errors messages, if any, or if none were found. - - - - - NHibernateProxyHelper provides convenience methods for working with - objects that might be instances of Classes or the Proxied version of - the Class. - - - - - Get the class of an instance or the underlying class of a proxy (without initializing the proxy!). - It is almost always better to use the entity name! - - The object to get the type of. - The Underlying Type for the object regardless of if it is a Proxy. - - - - Get the true, underlying class of a proxied persistent class. This operation - will NOT initialize the proxy and thus may return an incorrect result. - - a persistable object or proxy - guessed class of the instance - - This method is approximate match for Session.bestGuessEntityName in H3.2 - - - - - Aliases tables and fields for Sql Statements. - - - Several methods of this class take an additional - parameter, while their Java counterparts - do not. The dialect is used to correctly quote and unquote identifiers. - Java versions do the quoting and unquoting themselves and fail to - consider dialect-specific rules, such as escaping closing brackets in - identifiers on MS SQL 2000. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - An ANSI SQL CASE expression. - case when ... then ... end as ... - - This class looks StringHelper.SqlParameter safe... - - - Abstract SQL case fragment renderer - - - - An ANSI-style Join. - - - - - - - - Sets the op - - The op to set - - - - - - - - - - - - - - - - - - - - - - - - - - - - - An Oracle-style DECODE function. - - decode(pkvalue, key1, 1, key2, 2, ..., 0) - - - - - - - - Represents an SQL for update of ... nowait statement - - - - - An Informix-style (theta) Join - - - - - Represents an ... in (...) expression - - - - - Add a value to the value list. Value may be a string, - a , or one of special values - or . - - - - - - - - An Oracle-style (theta) Join - - - - - This method is a bit of a hack, and assumes - that the column on the "right" side of the - join appears on the "left" side of the - operator, which is extremely weird if this - was a normal join condition, but is natural - for a filter. - - - - - A placeholder for an ADO.NET parameter in an . - - - - - We need to know what the position of the parameter was in a query - before we rearranged the query. - This is used only by dialects that rearrange the query, unfortunately, - the MS SQL 2005 dialect have to re shuffle the query (and ruin positional parameter - support) because the SQL 2005 and 2008 SQL dialects have a completely broken - support for paging, which is just a tad less important than SELECT. - See NH-1528 - - - - - Generates an array of parameters for the given SqlTypes. - - The number of parameters to generate. - An array of objects - - - - Determines whether this instance and the specified object - are of the same type and have the same values. - - An object to compare to this instance. - - if the object equals the current instance. - - - - - Gets a hash code for the parameter. - - - An value for the hash code. - - - - - Used as a placeholder when parsing HQL or SQL queries. - - - - - Summary description for QueryJoinFragment. - - - - - Summary description for QuerySelect. - - - - - Certain databases don't like spaces around these operators. - - - This needs to contain both a plain string and a - SqlString version of the operator because the portions in - the WHERE clause will come in as SqlStrings since there - might be parameters, other portions of the clause come in - as strings since there are no parameters. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Adds a string containing a valid "order by" sql statement - to this QuerySelect - - The "order by" sql statement. - - - - - - - - - - - - - - - - - Represents part of an SQL SELECT clause - - - - - Equivalent to ToSqlStringFragment. - - - - In H3, it is called ToFragmentString(). It appears to be - functionally equivalent as ToSqlStringFragment() here. - - - - - The base class for all of the SqlBuilders. - - - - - Converts the ColumnNames and ColumnValues to a WhereFragment - - The names of the Columns to Add to the WhereFragment - A SqlString that contains the WhereFragment - This just calls the overloaded ToWhereFragment() with the operator as " = " and the tableAlias null. - - - - Converts the ColumnNames and ColumnValues to a WhereFragment - - The Alias for the Table. - The names of the Columns to Add to the WhereFragment - A SqlString that contains the WhereFragment - This defaults the op to " = " - - - - Converts the ColumnNames and ColumnValues to a WhereFragment - - The names of the Columns to Add to the WhereFragment - The operator to use between the names & values. For example " = " or "!=" - A SqlString that contains the WhereFragment - - - - Converts the ColumnNames and ColumnValues to a WhereFragment - - The Alias for the Table. - The names of the Columns to Add to the WhereFragment - The operator to use between the names & values. For example " = " or "!=" - A SqlString that contains the WhereFragment - - - - A class that builds an DELETE sql statement. - - - - - Sets the IdentityColumn for the DELETE sql to use. - - An array of the column names for the Property - The IType of the Identity Property. - The SqlDeleteBuilder. - - - - Sets the VersionColumn for the DELETE sql to use. - - An array of the column names for the Property - The IVersionType of the Version Property. - The SqlDeleteBuilder. - - - - Adds the columns for the Type to the WhereFragment - - The names of the columns to add. - The IType of the property. - The operator to put between the column name and value. - The SqlDeleteBuilder - - - - Adds a string to the WhereFragement - - A well formed sql statement with no parameters. - The SqlDeleteBuilder - - - - Builds a SELECT SQL statement. - - - - - Sets the text that should appear after the FROM - - The fromClause to set - The SqlSelectBuilder - - - - Sets the text that should appear after the FROM - - The name of the Table to get the data from - The Alias to use for the table name. - The SqlSelectBuilder - - - - Sets the text that should appear after the FROM - - The fromClause in a SqlString - The SqlSelectBuilder - - - - Sets the text that should appear after the ORDER BY. - - The orderByClause to set - The SqlSelectBuilder - - - - Sets the text that should appear after the GROUP BY. - - The groupByClause to set - The SqlSelectBuilder - - - - Sets the SqlString for the OUTER JOINs. - - - All of the Sql needs to be included in the SELECT. No OUTER JOINS will automatically be - added. - - The outerJoinsAfterFrom to set - The outerJoinsAfterWhere to set - The SqlSelectBuilder - - - - Sets the text for the SELECT - - The selectClause to set - The SqlSelectBuilder - - - - Sets the text for the SELECT - - The selectClause to set - The SqlSelectBuilder - - - - Sets the criteria to use for the WHERE. It joins all of the columnNames together with an AND. - - - The names of the columns - The Hibernate Type - The SqlSelectBuilder - - - - Sets the prebuilt SqlString to the Where clause - - The SqlString that contains the sql and parameters to add to the WHERE - This SqlSelectBuilder - - - - Sets the criteria to use for the WHERE. It joins all of the columnNames together with an AND. - - - The names of the columns - The Hibernate Type - The SqlSelectBuilder - - - - Sets the prebuilt SqlString to the Having clause - - The SqlString that contains the sql and parameters to add to the HAVING - This SqlSelectBuilder - - - - ToSqlString() is named ToStatementString() in H3 - - - - - - - - - Summary description for SqlSimpleSelectBuilder. - - - - - - - - - - - - Adds a columnName to the SELECT fragment. - - The name of the column to add. - The SqlSimpleSelectBuilder - - - - Adds a columnName and its Alias to the SELECT fragment. - - The name of the column to add. - The alias to use for the column - The SqlSimpleSelectBuilder - - - - Adds an array of columnNames to the SELECT fragment. - - The names of the columns to add. - The SqlSimpleSelectBuilder - - - - Adds an array of columnNames with their Aliases to the SELECT fragment. - - The names of the columns to add. - The aliases to use for the columns - The SqlSimpleSelectBuilder - - - - Gets the Alias that should be used for the column - - The name of the column to get the Alias for. - The Alias if one exists, null otherwise - - - - Sets the IdentityColumn for the SELECT sql to use. - - An array of the column names for the Property - The IType of the Identity Property. - The SqlSimpleSelectBuilder. - - - - Sets the VersionColumn for the SELECT sql to use. - - An array of the column names for the Property - The IVersionType of the Version Property. - The SqlSimpleSelectBuilder. - - - - Set the Order By fragment of the Select Command - - The OrderBy fragment. It should include the SQL "ORDER BY" - The SqlSimpleSelectBuilder - - - - Adds the columns for the Type to the WhereFragment - - The names of the columns to add. - The IType of the property. - The operator to put between the column name and value. - The SqlSimpleSelectBuilder - - - - - - - This is a non-modifiable SQL statement that is ready to be prepared - and sent to the Database for execution. - - - - If you need to modify this object pass it to a and - get a new object back from it. - - - - - - Appends the SqlString parameter to the end of the current SqlString to create a - new SqlString object. - - The SqlString to append. - A new SqlString object. - - A SqlString object is immutable so this returns a new SqlString. If multiple Appends - are called it is better to use the SqlStringBuilder. - - - - - Appends the string parameter to the end of the current SqlString to create a - new SqlString object. - - The string to append. - A new SqlString object. - - A SqlString object is immutable so this returns a new SqlString. If multiple Appends - are called it is better to use the SqlStringBuilder. - - - - - Compacts the SqlString into the fewest parts possible. - - A new SqlString. - - Combines all SqlParts that are strings and next to each other into - one SqlPart. - - - - - Determines whether the end of this instance matches the specified String. - - A string to seek at the end. - if the end of this instance matches value; otherwise, - - - - Replaces all occurrences of a specified in this instance, - with another specified . - - A String to be replaced. - A String to replace all occurrences of oldValue. - - A new SqlString with oldValue replaced by the newValue. The new SqlString is - in the compacted form. - - - - - Determines whether the beginning of this SqlString matches the specified System.String, - using case-insensitive comparison. - - The System.String to seek - true if the SqlString starts with the value. - - - - Retrieves a substring from this instance. The substring starts at a specified character position. - - The starting character position of a substring in this instance. - - A new SqlString to the substring that begins at startIndex in this instance. - - - If the startIndex is greater than the length of the SqlString then is returned. - - - - - Returns the index of the first occurrence of , case-insensitive. - - Text to look for in the . Must be in lower - case. - - The text must be located entirely in a string part of the . - Searching for "a ? b" in an consisting of - "a ", Parameter, " b" will result in no matches. - - The index of the first occurrence of , or -1 - if not found. - - - - Removes all occurrences of white space characters from the beginning and end of this instance. - - - A new SqlString equivalent to this instance after white space characters - are removed from the beginning and end. - - - - - - - - - - - - - - - Returns the SqlString in a string where it looks like - SELECT col1, col2 FROM table WHERE col1 = ? - - - The question mark is used as the indicator of a parameter because at - this point we are not using the specific provider so we don't know - how that provider wants our parameters formatted. - - A provider-neutral version of the CommandText - - - - Returns substring of this SqlString starting with the specified - . If the text is not found, returns an - empty, not-null SqlString. - - - The method performs case-insensitive comparison, so the - passed should be in lower case. - - - - - Parse SQL in and create a SqlString representing it. - - - Parameter marks in single quotes will be correctly skipped, but otherwise the - lexer is very simple and will not parse double quotes or escape sequences - correctly, for example. - - - - - Gets the number of SqlParts contained in this SqlString. - - The number of SqlParts contained in this SqlString. - - - - The SqlStringBuilder is used to construct a SqlString. - - - - The SqlString is a nonmutable class so it can't have sql parts added - to it. Instead this class should be used to generate a new SqlString. - The SqlStringBuilder is to SqlString what the StringBuilder is to - a String. - - - This is different from the original version of SqlString because this does not - hold the sql string in the form of "column1=@column1" instead it uses an array to - build the sql statement such that - object[0] = "column1=" - object[1] = ref to column1 parameter - - - What this allows us to do is to delay the generating of the parameter for the sql - until the very end - making testing dialect indifferent. Right now all of our test - to make sure the correct sql is getting built are specific to MsSql2000Dialect. - - - - - - Create an empty StringBuilder with the default capacity. - - - - - Create a StringBuilder with a specific capacity. - - The number of parts expected. - - - - Create a StringBuilder to modify the SqlString - - The SqlString to modify. - - - - Adds the preformatted sql to the SqlString that is being built. - - The string to add. - This SqlStringBuilder - - - - Adds the Parameter to the SqlString that is being built. - The correct operator should be added before the Add(Parameter) is called - because there will be no operator ( such as "=" ) placed between the last Add call - and this Add call. - - The Parameter to add. - This SqlStringBuilder - - - - Attempts to discover what type of object this is and calls the appropriate - method. - - The part to add when it is not known if it is a Parameter, String, or SqlString. - This SqlStringBuilder. - Thrown when the part is not a Parameter, String, or SqlString. - - - - Adds an existing SqlString to this SqlStringBuilder. It does NOT add any - prefix, postfix, operator, or wrap around this. It is equivalent to just - adding a string. - - The SqlString to add to this SqlStringBuilder - This SqlStringBuilder - This calls the overloaded Add(sqlString, null, null, null, false) - - - - Adds an existing SqlString to this SqlStringBuilder - - The SqlString to add to this SqlStringBuilder - String to put at the beginning of the combined SqlString. - How these Statements should be junctioned "AND" or "OR" - String to put at the end of the combined SqlString. - This SqlStringBuilder - - This calls the overloaded Add method with an array of SqlStrings and wrapStatment=false - so it will not be wrapped with a "(" and ")" - - - - - Adds existing SqlStrings to this SqlStringBuilder - - The SqlStrings to combine. - String to put at the beginning of the combined SqlString. - How these SqlStrings should be junctioned "AND" or "OR" - String to put at the end of the combined SqlStrings. - This SqlStringBuilder - This calls the overloaded Add method with wrapStatement=true - - - - Adds existing SqlStrings to this SqlStringBuilder - - The SqlStrings to combine. - String to put at the beginning of the combined SqlStrings. - How these SqlStrings should be junctioned "AND" or "OR" - String to put at the end of the combined SqlStrings. - Wrap each SqlStrings with "(" and ")" - This SqlStringBuilder - - - - Insert a string containing sql into the SqlStringBuilder at the specified index. - - The zero-based index at which the sql should be inserted. - The string containing sql to insert. - This SqlStringBuilder - - - - Insert a Parameter into the SqlStringBuilder at the specified index. - - The zero-based index at which the Parameter should be inserted. - The Parameter to insert. - This SqlStringBuilder - - - - Removes the string or Parameter at the specified index. - - The zero-based index of the item to remove. - This SqlStringBuilder - - - - Converts the mutable SqlStringBuilder into the immutable SqlString. - - The SqlString that was built. - - - - Gets the number of SqlParts in this SqlStringBuilder. - - - The number of SqlParts in this SqlStringBuilder. - - - - - Gets or Sets the element at the index - - Returns a string or Parameter. - - - - - A class that builds an UPDATE sql statement. - - - - - Add a column with a specific value to the UPDATE sql - - The name of the Column to add. - The value to set for the column. - The NHibernateType to use to convert the value to a sql string. - The SqlUpdateBuilder. - - - - Add a column with a specific value to the UPDATE sql - - The name of the Column to add. - A valid sql string to set as the value of the column. - The SqlUpdateBuilder. - - - - Adds columns with a specific value to the UPDATE sql - - The names of the Columns to add. - A valid sql string to set as the value of the column. This value is assigned to each column. - The SqlUpdateBuilder. - - - - Adds the Property's columns to the UPDATE sql - - An array of the column names for the Property - The IType of the property. - The SqlUpdateBuilder. - - - - Adds the Property's updatable columns to the UPDATE sql - - An array of the column names for the Property - An array of updatable column flags. If this array is null, all supplied columns are considered updatable. - The IType of the property. - The SqlUpdateBuilder. - - - - Sets the IdentityColumn for the UPDATE sql to use. - - An array of the column names for the Property - The IType of the Identity Property. - The SqlUpdateBuilder. - - - - Sets the VersionColumn for the UPDATE sql to use. - - An array of the column names for the Property - The IVersionType of the Version Property. - The SqlUpdateBuilder. - - - - Adds the columns for the Type to the WhereFragment - - The names of the columns to add. - The IType of the property. - The operator to put between the column name and value. - The SqlUpdateBuilder - - - - Adds a string to the WhereFragment - - A well formed sql string with no parameters. - The SqlUpdateBuilder - - - - - - - Given an SQL SELECT statement, parse it to extract clauses starting with - FROM, up to and not including ORDER BY (known collectively - as a subselect clause). - - - - - Contains the subselect clause as it is being built. - - - - - Initializes a new instance of the class. - - The parts of an to extract the subselect clause from. - - - - Looks for a FROM clause in the - and adds the clause to the result if found. - - A or a . - if the part contained a FROM clause, - otherwise. - - - - Returns the subselect clause of the statement - being processed. - - An containing - the subselect clause of the original SELECT - statement. - - - - Allows us to construct SQL WHERE fragments - - - - - Describes the details of a with the - information required to to generate an . - - - This can store the length of the string that the can hold. - If no value is provided for the length then the Driver is responsible for - setting the properties on the correctly. - - - - - This is the base class that adds information to the - for the and - to use. - - -

- The uses the SqlType to get enough - information to create an . -

-

- The use the SqlType to convert the - to the appropriate sql type for SchemaExport. -

-
-
- - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The length of the string the should hold. - - - - Describes the details of a with the - information required to generate an . - - - This can store the length of the string that the can hold. - If no value is provided for the length then the Driver is responsible for - setting the properties on the correctly. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The length of the string the should hold. - - - - Describes the details of a that is stored in - a BLOB column with the information required to generate - an . - - -

- This can store the length of the binary data that the can hold. - If no value is provided for the length then the Driver is responsible for - setting the properties on the correctly. -

-

- This is only needed by DataProviders (SqlClient) that need to specify a Size for the - IDbDataParameter. Most DataProvider(Oralce) don't need to set the Size so a - BinarySqlType would work just fine. -

-
-
- - - Describes the details of a with the - information required to to generate an . - - - This can store the binary data that the can hold. - If no value is provided for the length then the Driver is responsible for - setting the properties on the correctly. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The length of the binary data the should hold - - - - SqlTypeFactory provides Singleton access to the SqlTypes. - - - - - Describes the details of a that is stored in - a CLOB column with the information required to generate - an . - - -

- This can store the length of the binary data that the can hold. - If no value is provided for the length then the Driver is responsible for - setting the properties on the correctly. -

-

- This is only needed by DataProviders (SqlClient) that need to specify a Size for the - IDbDataParameter. Most DataProvider(Oralce) don't need to set the Size so a - StringSqlType would work just fine. -

-
-
- - - Describes the details of a with the - information required to generate an . - - - This can store the length of the string that the can hold. - If no value is provided for the length then the Driver is responsible for - setting the properties on the correctly. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The length of the string the should hold. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The length of the string the should hold. - - - - Describes the details of a with the - information required to to generate an . - - - This can store the length of the string that the can hold. - If no value is provided for the length then the Driver is responsible for - setting the properties on the correctly. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The length of the string the should hold. - - - - Statistics for a particular "category" (a named entity, - collection role, second level cache region or query). - - - - Collection related statistics - - - Entity related statistics - - - - Information about the first-level (session) cache for a particular session instance - - - - Get the number of entity instances associated with the session - - - Get the number of collection instances associated with the session - - - Get the set of all EntityKeys. - - - Get the set of all CollectionKeys. - - - - Statistics for a particular . - Beware of metrics, they are dependent of the precision: - - - - Reset all statistics - - - Find entity statistics per name - entity name - EntityStatistics object - - - Get collection statistics per role - collection role - CollectionStatistics - - - Second level cache statistics per region - region name - SecondLevelCacheStatistics - - - Query statistics from query string (HQL or SQL) - query string - QueryStatistics - - - log in info level the main statistics - - - Global number of entity deletes - - - Global number of entity inserts - - - Global number of entity loads - - - Global number of entity fetchs - - - Global number of entity updates - - - Global number of executed queries - - - The of the slowest query. - - - The query string for the slowest query. - - - The global number of cached queries successfully retrieved from cache - - - The global number of cached queries *not* found in cache - - - The global number of cacheable queries put in cache - - - Get the global number of flush executed by sessions (either implicit or explicit) - - - - Get the global number of connections asked by the sessions - (the actual number of connections used may be much smaller depending - whether you use a connection pool or not) - - - - Global number of cacheable entities/collections successfully retrieved from the cache - - - Global number of cacheable entities/collections not found in the cache and loaded from the database. - - - Global number of cacheable entities/collections put in the cache - - - Global number of sessions closed - - - Global number of sessions opened - - - Global number of collections loaded - - - Global number of collections fetched - - - Global number of collections updated - - - Global number of collections removed - - - Global number of collections recreated - - - Start time - - - Enable/Disable statistics logs (this is a dynamic parameter) - - - All executed query strings - - - The names of all entities - - - The names of all collection roles - - - Get all second-level cache region names - - - The number of transactions we know to have been successful - - - The number of transactions we know to have completed - - - The number of prepared statements that were acquired - - - The number of prepared statements that were released - - - The number of StaleObjectStateExceptions that occurred - - - - The OperationThreshold to a value greater than to enable logging of long running operations. - - Operations that exceed the level will be logged. - - - Statistics SPI for the NHibernate core - - - Query statistics (HQL and SQL) - Note that for a cached query, the cache miss is equals to the db count - - - Add statistics report of a DB query - rows count returned - time taken - - - Second level cache statistics of a specific region - - - - Not ported yet - - - - - Not ported yet - - - - - Not ported yet - - - - - Not ported yet - - - - - Contract for delegates responsible for managing connection used by the hbm2ddl tools. - - - - - Prepare the helper for use. - - - - - Release any resources held by this helper. - - - - - Get a reference to the connection we are using. - - - - - A implementation based on an internally - built and managed . - - - - - Generates ddl to export table schema for a configured Configuration to the database - - - This Class can be used directly or the command line wrapper NHibernate.Tool.hbm2ddl.exe can be - used when a dll can not be directly used. - - - - - Create a schema exported for a given Configuration - - The NHibernate Configuration to generate the schema from. - - - - Create a schema exporter for the given Configuration, with the given - database connection properties - - The NHibernate Configuration to generate the schema from. - The Properties to use when connecting to the Database. - - - - Set the output filename. The generated script will be written to this file - - The name of the file to output the ddl to. - The SchemaExport object. - - - - Set the end of statement delimiter - - The end of statement delimiter. - The SchemaExport object. - - - - Run the schema creation script - - if the ddl should be outputted in the Console. - if the ddl should be executed against the Database. - - This is a convenience method that calls and sets - the justDrop parameter to false. - - - - - Run the drop schema script - - if the ddl should be outputted in the Console. - if the ddl should be executed against the Database. - - This is a convenience method that calls and sets - the justDrop parameter to true. - - - - - Executes the Export of the Schema in the given connection - - if the ddl should be outputted in the Console. - if the ddl should be executed against the Database. - if only the ddl to drop the Database objects should be executed. - - The connection to use when executing the commands when export is . - Must be an opened connection. The method doesn't close the connection. - - The writer used to output the generated schema - - This method allows for both the drop and create ddl script to be executed. - This overload is provided mainly to enable use of in memory databases. - It does NOT close the given connection! - - - - - Executes the Export of the Schema. - - if the ddl should be outputted in the Console. - if the ddl should be executed against the Database. - if only the ddl to drop the Database objects should be executed. - - This method allows for both the drop and create ddl script to be executed. - - - - - Execute the schema updates - - - - - Execute the schema updates - - The action to write the each schema line. - Commit the script to DB - - - - Returns a List of all Exceptions which occured during the export. - - - - - Perform the validations. - - - - A implementation based on an explicitly supplied - connection. - - - - - A implementation based on a provided - . Essentially, ensures that the connection - gets cleaned up, but that the provider itself remains usable since it - was externally provided to us. - - - - - An abstract factory for instances. - Concrete implementations are specified by transaction.factory_class - configuration property. - - Implementors must be threadsafe and should declare a public default constructor. - - - - - - Configure from the given properties - - - - - - Create a new transaction and return it without starting it. - - - - - This is used as a marker interface for the different - transaction context required for each session - - - - - Wraps an ADO.NET to implement - the interface. - - - - - Allows the application to define units of work, while maintaining abstraction from the - underlying transaction implementation - - - A transaction is associated with a ISession and is usually instanciated by a call to - ISession.BeginTransaction(). A single session might span multiple transactions since - the notion of a session (a conversation between the application and the datastore) is of - coarser granularity than the notion of a transaction. However, it is intended that there be - at most one uncommitted ITransaction associated with a particular ISession - at a time. Implementors are not intended to be threadsafe. - - - - - Begin the transaction with the default isolation level. - - - - - Begin the transaction with the specified isolation level. - - Isolation level of the transaction - - - - Flush the associated ISession and end the unit of work. - - - This method will commit the underlying transaction if and only if the transaction - was initiated by this object. - - - - - Force the underlying transaction to roll back. - - - - - Enlist the in the current Transaction. - - The to enlist. - - It is okay for this to be a no op implementation. - - - - - Register a user synchronization callback for this transaction. - - The callback to register. - - - - Is the transaction in progress - - - - - Was the transaction rolled back or set to rollback only? - - - - - Was the transaction successfully committed? - - - This method could return even after successful invocation of Commit() - - - - - Initializes a new instance of the class. - - The the Transaction is for. - - - - Enlist the in the current . - - The to enlist in this Transaction. - - - This takes care of making sure the 's Transaction property - contains the correct or if there is no - Transaction for the ISession - ie BeginTransaction() not called. - - - This method may be called even when the transaction is disposed. - - - - - - Begins the on the - used by the . - - - Thrown if there is any problems encountered while trying to create - the . - - - - - Commits the by flushing the - and committing the . - - - Thrown if there is any exception while trying to call Commit() on - the underlying . - - - - - Rolls back the by calling the method Rollback - on the underlying . - - - Thrown if there is any exception while trying to call Rollback() on - the underlying . - - - - - A flag to indicate if Disose() has been called. - - - - - Finalizer that ensures the object is correctly disposed of. - - - - - Takes care of freeing the managed and unmanaged resources that - this class is responsible for. - - - - - Takes care of freeing the managed and unmanaged resources that - this class is responsible for. - - Indicates if this AdoTransaction is being Disposed of or Finalized. - - If this AdoTransaction is being Finalized (isDisposing==false) then make sure not - to call any methods that could potentially bring this AdoTransaction back to life. - - - - - Gets a indicating if the transaction was rolled back. - - - if the had Rollback called - without any exceptions. - - - - - Gets a indicating if the transaction was committed. - - - if the had Commit called - without any exceptions. - - - - - A mimic to the javax.transaction.Synchronization callback to enable - - - - - Implementors define a strategy for transforming criteria query - results into the actual application-visible query result list. - - - - - - - - - - - - - - - - - - - - - Result transformer that allows to transform a result to - a user specified class which will be populated via setter - methods or fields matching the alias names. - - - - IList resultWithAliasedBean = s.CreateCriteria(typeof(Enrollment)) - .CreateAlias("Student", "st") - .CreateAlias("Course", "co") - .SetProjection( Projections.ProjectionList() - .Add( Projections.Property("co.Description"), "CourseDescription" ) - ) - .SetResultTransformer( new AliasToBeanResultTransformer(typeof(StudentDTO)) ) - .List(); - - StudentDTO dto = (StudentDTO)resultWithAliasedBean[0]; - - - - - - Tranforms each result row from a tuple into a , such that what - you end up with is a of . - - - - - Each row of results is a map () from alias to values/entities - - - - Each row of results is a - - - - Creates a resulttransformer that will inject aliased values into instances - of via property methods or fields. - - - - Support for tuplizers relating to components. - - - - Defines further responsibilities regarding tuplization based on - a mapped components. - - - ComponentTuplizer implementations should have the following constructor signature: - (org.hibernate.mapping.Component) - - - - - A tuplizer defines the contract for things which know how to manage - a particular representation of a piece of data, given that - representation's (the entity-mode - essentially defining which representation). - - - If that given piece of data is thought of as a data structure, then a tuplizer - is the thing which knows how to: - - create such a data structure appropriately - extract values from and inject values into such a data structure - - - For example, a given piece of data might be represented as a POCO class. - Here, it's representation and entity-mode is POCO. Well a tuplizer for POCO - entity-modes would know how to: - - create the data structure by calling the POCO's constructor - extract and inject values through getters/setter, or by direct field access, etc - - - That same piece of data might also be represented as a DOM structure, using - the tuplizer associated with the XML entity-mode, which would generate instances - of as the data structure and know how to access the - values as either nested s or as s. - - - - - - - Extract the current values contained on the given entity. - - The entity from which to extract values. - The current property values. - HibernateException - - - Inject the given values into the given entity. - The entity. - The values to be injected. - - - Extract the value of a particular property from the given entity. - The entity from which to extract the property value. - The index of the property for which to extract the value. - The current value of the given property on the given entity. - - - Generate a new, empty entity. - The new, empty entity instance. - - - - Is the given object considered an instance of the the entity (acconting - for entity-mode) managed by this tuplizer. - - The object to be checked. - True if the object is considered as an instance of this entity within the given mode. - - - - Return the pojo class managed by this tuplizer. - - The persistent class. - - Need to determine how to best handle this for the Tuplizers for EntityModes - other than POCO. - - - - Retrieve the current value of the parent property. - - The component instance from which to extract the parent property value. - - The current value of the parent property. - - - Set the value of the parent property. - The component instance on which to set the parent. - The parent to be set on the component. - The current session factory. - - - Does the component managed by this tuuplizer contain a parent property? - True if the component does contain a parent property; false otherwise. - - - This method does not populate the component parent - - - - Handles mapping s to ComponentTuplizers. -

- Most of the handling is really in the super class; here we just create - the tuplizers and add them to the superclass -

-
- - Centralizes handling of to mappings. - - - Given a supposed instance of an entity/component, guess its entity mode. - The supposed instance of the entity/component. - The guessed entity mode. - - - - Locate the contained tuplizer responsible for the given entity-mode. If - no such tuplizer is defined on this mapping, then return null. - - The entity-mode for which the caller wants a tuplizer. - The tuplizer, or null if not found. - - - Locate the tuplizer contained within this mapping which is responsible - for the given entity-mode. If no such tuplizer is defined on this - mapping, then an exception is thrown. - - - The entity-mode for which the caller wants a tuplizer. - - The tuplizer. - - HibernateException Unable to locate the requested tuplizer. - - - Centralizes metamodel information about a component. - - - - A specific to the dynamic-map entity mode. - - - - - A specific to the POCO entity mode. - - - - Support for tuplizers relating to entities. - - - - Defines further responsibilities regarding tuplization based on a mapped entity. - - - EntityTuplizer implementations should have the following constructor signature: - (, ) - - - - Create an entity instance initialized with the given identifier. - The identifier value for the entity to be instantiated. - The instantiated entity. - - - Extract the identifier value from the given entity. - The entity from which to extract the identifier value. - The identifier value. - - - - Inject the identifier value into the given entity. - - The entity to inject with the identifier value. - The value to be injected as the identifier. - Has no effect if the entity does not define an identifier property - - - - Inject the given identifier and version into the entity, in order to - "roll back" to their original values. - - - The identifier value to inject into the entity. - The version value to inject into the entity. - - - Extract the value of the version property from the given entity. - The entity from which to extract the version value. - The value of the version property, or null if not versioned. - - - Inject the value of a particular property. - The entity into which to inject the value. - The property's index. - The property value to inject. - - - Inject the value of a particular property. - The entity into which to inject the value. - The name of the property. - The property value to inject. - - - Extract the values of the insertable properties of the entity (including backrefs) - The entity from which to extract. - a map of instances being merged to merged instances - The session in which the resuest is being made. - The insertable property values. - - - Extract the value of a particular property from the given entity. - The entity from which to extract the property value. - The name of the property for which to extract the value. - The current value of the given property on the given entity. - - - Called just after the entities properties have been initialized. - The entity being initialized. - Are defined lazy properties currently unfecthed - The session initializing this entity. - - - - Generates an appropriate proxy representation of this entity for this entity-mode. - - The id of the instance for which to generate a proxy. - The session to which the proxy should be bound. - The generate proxies. - - - Does the given entity instance have any currently uninitialized lazy properties? - The entity to be check for uninitialized lazy properties. - True if uninitialized lazy properties were found; false otherwise. - - - - Does the class managed by this tuplizer implement - the interface. - - True if the ILifecycle interface is implemented; false otherwise. - - - - Does the class managed by this tuplizer implement - the interface. - - True if the IValidatable interface is implemented; false otherwise. - - - Returns the java class to which generated proxies will be typed. - The .NET class to which generated proxies will be typed - - - Is it an instrumented POCO? - - - Does this entity, for this mode, present a possibility for proxying? - True if this tuplizer can generate proxies for this entity. - - - Constructs a new AbstractEntityTuplizer instance. - The "interpreted" information relating to the mapped entity. - The parsed "raw" mapping data relating to the given entity. - - - Build an appropriate Getter for the given property. - The property to be accessed via the built Getter. - The entity information regarding the mapped entity owning this property. - An appropriate Getter instance. - - - Build an appropriate Setter for the given property. - The property to be accessed via the built Setter. - The entity information regarding the mapped entity owning this property. - An appropriate Setter instance. - - - Build an appropriate Instantiator for the given mapped entity. - The mapping information regarding the mapped entity. - An appropriate Instantiator instance. - - - Build an appropriate ProxyFactory for the given mapped entity. - The mapping information regarding the mapped entity. - The constructed Getter relating to the entity's id property. - The constructed Setter relating to the entity's id property. - An appropriate ProxyFactory instance. - - - Extract a component property value. - The component property types. - The component instance itself. - The property path for the property to be extracted. - The property value extracted. - - - Return the entity-mode handled by this tuplizer instance. - - - Retrieves the defined entity-name for the tuplized entity. - - - - Retrieves the defined entity-names for any subclasses defined for this entity. - - - - - Handles mapping s to s. - - - Most of the handling is really in the super class; here we just create - the tuplizers and add them to the superclass - - - - - Instantiates a EntityEntityModeToTuplizerMapping based on the given - entity mapping and metamodel definitions. - - The entity mapping definition. - The entity metamodel definition. - - - An specific to the POCO entity mode. - - - Contract for implementors responsible for instantiating entity/component instances. - - - Perform the requested entity instantiation. - The id of the entity to be instantiated. - An appropriately instantiated entity. - This form is never called for component instantiation, only entity instantiation. - - - Perform the requested instantiation. - The instantiated data structure. - - - - Performs check to see if the given object is an instance of the entity - or component which this Instantiator instantiates. - - The object to be checked. - True is the object does represent an instance of the underlying entity/component. - - - - Represents a defined entity identifier property within the Hibernate - runtime-metamodel. - - - Author: Steve Ebersole - - - - - Defines the basic contract of a Property within the runtime metamodel. - - - - - Constructor for Property instances. - - The name by which the property can be referenced within its owner. - The node name to use for XML-based representation of this property. - The Hibernate Type of this property. - - - - Construct a non-virtual identifier property. - - The name of the property representing the identifier within - its owning entity. - The node name to use for XML-based representation of this - property. - The Hibernate Type for the identifier property. - Is this an embedded identifier. - The value which, if found as the value on the identifier - property, represents new (i.e., un-saved) instances of the owning entity. - The generator to use for id value generation. - - - - Construct a virtual IdentifierProperty. - - The Hibernate Type for the identifier property. - Is this an embedded identifier. - The value which, if found as the value on the identifier - property, represents new (i.e., un-saved) instances of the owning entity. - The generator to use for id value generation. - - - - Defines a POCO-based instantiator for use from the tuplizers. - - - - Responsible for generation of runtime metamodel representations. - Makes distinction between identifier, version, and other (standard) properties. - - - Author: Steve Ebersole - - - - - Generates an IdentifierProperty representation of the for a given entity mapping. - - The mapping definition of the entity. - The identifier value generator to use for this identifier. - The appropriate IdentifierProperty definition. - - - - Generates a VersionProperty representation for an entity mapping given its - version mapping Property. - - The version mapping Property. - Is property lazy loading currently available. - The appropriate VersionProperty definition. - - - - Generate a "standard" (i.e., non-identifier and non-version) based on the given - mapped property. - - The mapped property. - Is property lazy loading currently available. - The appropriate StandardProperty definition. - - - - Represents a basic property within the Hibernate runtime-metamodel. - - - Author: Steve Ebersole - - - - - Constructs StandardProperty instances. - - The name by which the property can be referenced within - its owner. - The node name to use for XML-based representation of this - property. - The Hibernate Type of this property. - Should this property be handled lazily? - Is this property an insertable value? - Is this property an updateable value? - Is this property generated in the database on insert? - Is this property generated in the database on update? - Is this property a nullable value? - Is this property a checkable value? - Is this property a versionable value? - The cascade style for this property's value. - Any fetch mode defined for this property - - - - Represents a version property within the Hibernate runtime-metamodel. - - - Author: Steve Ebersole - - - - - Constructs VersionProperty instances. - - The name by which the property can be referenced within - its owner. - The node name to use for XML-based representation of this - property. - The Hibernate Type of this property. - Should this property be handled lazily? - Is this property an insertable value? - Is this property an updateable value? - Is this property generated in the database on insert? - Is this property generated in the database on update? - Is this property a nullable value? - Is this property a checkable value? - Is this property a versionable value? - The cascade style for this property's value. - The value which, if found as the value of - this (i.e., the version) property, represents new (i.e., un-saved) - instances of the owning entity. - - - Logic to bind stream of byte into a VARBINARY - - - - Superclass for mutable nullable types. - - - - - Superclass of single-column nullable types. - - - Maps the Property to a single column that is capable of storing nulls in it. If a .net Struct is - used it will be created with its unitialized value and then on Update the uninitialized value of - the Struct will be written to the column - not . - - - - - The base implementation of the interface. - Mapping of the built in Type hierarchy. - - - - - Disassembles the object into a cacheable representation. - - The value to disassemble. - The is not used by this method. - optional parent entity object (needed for collections) - The disassembled, deep cloned state of the object - - This method calls DeepCopy if the value is not null. - - - - - Reconstructs the object from its cached "disassembled" state. - - The disassembled state from the cache - The is not used by this method. - The parent Entity object is not used by this method - The assembled object. - - This method calls DeepCopy if the value is not null. - - - - - Should the parent be considered dirty, given both the old and current - field or element value? - - The old value - The current value - The is not used by this method. - true if the field is dirty - This method uses IType.Equals(object, object) to determine the value of IsDirty. - - - - Retrives an instance of the mapped class, or the identifier of an entity - or collection from a . - - The that contains the values. - - The names of the columns in the that contain the - value to populate the IType with. - - the session - The parent Entity - An identifier or actual object mapped by this IType. - - This method uses the IType.NullSafeGet(IDataReader, string[], ISessionImplementor, object) method - to Hydrate this . - - - - - Maps identifiers to Entities or Collections. - - An identifier or value returned by Hydrate() - The is not used by this method. - The parent Entity is not used by this method. - The value. - - There is nothing done in this method other than return the value parameter passed in. - - - - - Says whether the value has been modified - - - - - When implemented by a class, returns a deep copy of the persistent - state, stopping at entities and at collections. - A Collection element or Entity fieldThe entityMode.The session factory.A deep copy of the object. - - - - When implemented by a class, returns the SqlTypes for the columns mapped by this IType. - The that uses this IType.An array of s. - - - - When implemented by a class, returns how many columns are used to persist this type. - The that uses this IType.The number of columns this IType spans.MappingException - - - - - - - - - - When implemented by a class, puts the value/values from the mapped - class into the . - The to put the values into.The object that contains the values.The index of the to start writing the values to.Indicates which columns are to be set. - Implementors should handle possibility of null values. - A multi-column type should be written to parameters starting from . - - - - - When implemented by a class, puts the value/values from the mapped - class into the . - - The to put the values into. - The object that contains the values. - The index of the to start writing the values to. - - Implementors should handle possibility of null values. - A multi-column type should be written to parameters starting from . - - - - - When implemented by a class, a representation of the value to be - embedded in an XML element - The object that contains the values.An Xml formatted string. - - - - Gets a value indicating if the is an . - - false - by default an is not an . - - - - Gets a value indicating if the is a . - - false - by default an is not a . - - - - Gets a value indicating if the is an . - - false - by default an is not an . - - - - Gets a value indicating if the is a . - - false - by default an is not a . - - - - Gets a value indicating if the implementation is an "object" type - - false - by default an is not a "object" type. - - - - When implemented by a class, gets the value indicating if the objects - of this IType are mutable. - true if the objects mapped by this IType are mutable. - With respect to the referencing object... - Entities and Collections are considered immutable because they manage their own internal state. - - - - - When implemented by a class, gets the abbreviated name of the type. - The NHibernate type name. - - - - When implemented by a class, gets the returned - by the NullSafeGet() methods. - - The from the .NET framework. - - This is used to establish the class of an array of this Itype - - - - - Initialize a new instance of the NullableType class using a - . - - The underlying . - This is used when the Property is mapped to a single column. - - - - When implemented by a class, put the value from the mapped - Property into to the . - - The to put the value into. - The object that contains the value. - The index of the to start writing the values to. - - Implementors do not need to handle possibility of null values because this will - only be called from after - it has checked for nulls. - - - - - When implemented by a class, gets the object in the - for the Property. - - The that contains the value. - The index of the field to get the value from. - An object with the value from the database. - - - - When implemented by a class, gets the object in the - for the Property. - - The that contains the value. - The name of the field to get the value from. - An object with the value from the database. - - Most implementors just call the - overload of this method. - - - - - A representation of the value to be embedded in an XML element - - The object that contains the values. - - An Xml formatted string. - - - - When implemented by a class, a representation of the value to be - embedded in an XML element - The object that contains the values.An Xml formatted string. - - - This implementation forwards the call to if the parameter - value is not null. - - - It has been "sealed" because the Types inheriting from - do not need and should not override this method. All of their implementation - should be in . - - - - - - Parse the XML representation of an instance - - XML string to parse, guaranteed to be non-empty - - - - - When implemented by a class, puts the value/values from the mapped - class into the . - - The to put the values into. - The object that contains the values. - The index of the to start writing the values to. - - Implementors should handle possibility of null values. - A multi-column type should be written to parameters starting from . - - - - This implementation forwards the call to . - - - It has been "sealed" because the Types inheriting from - do not need to and should not override this method. All of their implementation - should be in . - - - - - - Puts the value from the mapped class into the . - - The to put the values into. - The object that contains the values. - The index of the to write the value to. - - - This method checks to see if value is null, if it is then the value of - is written to the . - - - If the value is not null, then the method - is called and that method is responsible for setting the value. - - - - - - When implemented by a class, gets an instance of the object mapped by - this IType from the . - The that contains the values - The names of the columns in the that contain the - value to populate the IType with. - The object mapped by this IType. - Implementors should handle possibility of null values. - - - This has been sealed because no other class should override it. This - method calls for a single value. - It only takes the first name from the string[] names parameter - that is a - safe thing to do because a Nullable Type only has one field. - - - - - Extracts the values of the fields from the DataReader - - The DataReader positioned on the correct record - An array of field names. - The value off the field from the DataReader - - In this class this just ends up passing the first name to the NullSafeGet method - that takes a string, not a string[]. - - I don't know why this method is in here - it doesn't look like anybody that inherits - from NullableType overrides this... - - TODO: determine if this is needed - - - - - Gets the value of the field from the . - - The positioned on the correct record. - The name of the field to get the value from. - The value of the field. - - - This method checks to see if value is null, if it is then the null is returned - from this method. - - - If the value is not null, then the method - is called and that method is responsible for retrieving the value. - - - - - - When implemented by a class, gets an instance of the object - mapped by this IType from the . - The that contains the valuesThe name of the column in the that contains the - value to populate the IType with.The object mapped by this IType. - Implementations should handle possibility of null values. - This method might be called if the IType is known to be a single-column type. - - - - This implementation forwards the call to . - - - It has been "sealed" because the Types inheriting from - do not need to and should not override this method. All of their implementation - should be in . - - - - - - When implemented by a class, returns the SqlTypes for the columns mapped by this IType. - The that uses this IType.An array of s. - - - This implementation forwards the call to . - - - It has been "sealed" because the Types inheriting from - do not need to and should not override this method because they map to a single - column. All of their implementation should be in . - - - - - - Returns the number of columns spanned by this - - A always returns 1. - - This has the hard coding of 1 in there because, by definition of this class, - a NullableType can only map to one column in a table. - - - - - Determines whether the specified is equal to this - . - - The to compare with this NullableType. - true if the SqlType and Name properties are the same. - - - - Serves as a hash function for the , - suitable for use in hashing algorithms and data structures like a hash table. - - - A hash code that is based on the 's - hash code and the 's hash code. - - - - Gets the underlying for - the column mapped by this . - - The underlying . - - This implementation should be suitable for all subclasses unless they need to - do some special things to get the value. There are no built in s - that override this Property. - - - - - Initialize a new instance of the MutableType class using a - . - - The underlying . - - - - Gets the value indicating if this IType is mutable. - - true - a is mutable. - - This has been "sealed" because any subclasses are expected to be mutable. If - the type is immutable then they should inherit from . - - - - - An that may be used to version data. - - - - - When implemented by a class, increments the version. - - The current version - The current session, if available. - an instance of the that has been incremented. - - - - When implemented by a class, gets an initial version. - - The current session, if available. - An instance of the type. - - - - Are the two version values considered equal? - - One value to check. - The other value to check. - true if the values are equal, false otherwise. - - - - Get a comparator for the version numbers - - - - Convert the byte[] into the expected object type - - - Convert the object into the internal byte[] representation - - - - Common base class for and . - - - - - Superclass of types. - - - - - Superclass of nullable immutable types. - - - - - Initialize a new instance of the ImmutableType class using a - . - - The underlying . - - - - Gets the value indicating if this IType is mutable. - - false - an is not mutable. - - This has been "sealed" because any subclasses are expected to be immutable. If - the type is mutable then they should inherit from . - - - - - An that may appear as an SQL literal - - - - - When implemented by a class, return a representation - of the value, suitable for embedding in an SQL statement - - The object to convert to a string for the SQL statement. - - A string that contains a well formed SQL Statement. - - - - Initialize a new instance of the PrimitiveType class using a . - - The underlying . - - - - When implemented by a class, return a representation - of the value, suitable for embedding in an SQL statement - - The object to convert to a string for the SQL statement. - - A string that containts a well formed SQL Statement. - - - - A representation of the value to be embedded in an XML element - - The object that contains the values. - - An Xml formatted string. - - This just calls so if there is - a possibility of this PrimitiveType having any characters - that need to be encoded then this method should be overridden. - - - - - An IType that may be used for a discriminator column. - - - This interface contains no new methods but does require that an - that will be used in a discriminator column must implement - both the and interfaces. - - - - - An that may be used as an identifier. - - - - - When implemented by a class, converts the xml string from the - mapping file to the .NET object. - - The value of discriminator-value or unsaved-value attribute. - The string converted to the object. - - This method needs to be able to handle any string. It should not just - call System.Type.Parse without verifying that it is a parsable value - for the System.Type. - - - - - Base class for enum types. - - - - - Maps a Property - to a DbType.AnsiStringFixedLength column. - - - - - Maps a Property - to a column. - - - - - - - - Handles "any" mappings and the old deprecated "object" type. - - - The identifierType is any NHibernate IType that can be serailized by default. - For example, you can specify the identifierType as an Int32 or a custom identifier - type that you built. The identifierType matches to one or many columns. - - The metaType maps to a single column. By default it stores the name of the Type - that the Identifier identifies. - - For example, we can store a link to any table. It will have the results - class_name id_col1 - ======================================== - Simple, AssemblyName 5 - DiffClass, AssemblyName 5 - Simple, AssemblyName 4 - - You can also provide you own type that might map the name of the class to a table - with a giant switch statemet or a good naming convention for your class->table. The - data stored might look like - class_name id_col1 - ======================================== - simple_table 5 - diff_table 5 - simple_table 4 - - - - - - Enables other Component-like types to hold collections and have cascades, etc. - - - - - Get the values of the component properties of - a component instance - - - - - Optional Operation - - - - - Optional operation - - - - Get the types of the component properties - - - Get the names of the component properties - - - - Optional operation - - nullability of component properties - - - - An that represents some kind of association between entities. - - - - - Get the "persister" for this association - a class or collection persister - - - - - - Get the entity name of the associated entity - - - - Get the "filtering" SQL fragment that is applied in the - SQL on clause, in addition to the usual join condition. - - - - - When implemented by a class, gets the type of foreign key directionality - of this association. - - The of this association. - - - - Is the primary key of the owning entity table - to be used in the join? - - - - - Get the name of the property in the owning entity - that provides the join key (null if the identifier) - - - - - The name of a unique property of the associated entity - that provides the join key (null if the identifier of - an entity, or key of a collection) - - - - - Do we dirty check this association, even when there are - no columns to be updated. - - - - - - - - - - - - - - - Not really relevant to AnyType, since it cannot be "joined" - - - - - An that maps an collection - to the database. - - - - - The base class for an that maps collections - to the database. - - - - - Initializes a new instance of a class for - a specific role. - - The role the persistent collection is in. - - The name of the property in the - owner object containing the collection ID, or if it is - the primary key. - - - - - - Instantiate an uninitialized collection wrapper or holder. Callers MUST add the holder to the - persistence context! - - The session from which the request is originating. - The underlying collection persister (metadata) - The owner key. - The instantiated collection. - - - - Wrap the naked collection instance in a wrapper, or instantiate a - holder. Callers MUST add the holder to the persistence context! - - The session from which the request is originating. - The bare collection to be wrapped. - - A subclass of that wraps the non NHibernate collection. - - - - - Get the key value from the owning entity instance, usually the identifier, but might be some - other unique key, in the case of property-ref - - - - - Get the id value from the owning entity key, usually the same as the key, but might be some - other property, in the case of property-ref - - The collection owner key - The session from which the request is originating. - - The collection owner's id, if it can be obtained from the key; - otherwise, null is returned - - - - - Instantiate an empty instance of the "underlying" collection (not a wrapper), - but with the given anticipated size (i.e. accounting for initial capacity - and perhaps load factor). - - - The anticipated size of the instantiated collection after we are done populating it. - - A newly instantiated collection to be wrapped. - - - - Get an iterator over the element set of the collection, which may not yet be wrapped - - The collection to be iterated - The session from which the request is originating. - The iterator. - - - - Get an iterator over the element set of the collection in POCO mode - - The collection to be iterated - The iterator. - - - - We always need to dirty check the collection because we sometimes - need to increment version number of owner and also because of - how assemble/disassemble is implemented for uks - - - - - Initializes a new instance of a class for - a specific role. - - The role the persistent collection is in. - The name of the property in the - owner object containing the collection ID, or if it is - the primary key. - The of the element contained in the array. - - - This creates a bag that is non-generic. - - - - - - - - - - - - - - Wraps a in a . - - The for the collection to be a part of. - The unwrapped array. - - An that wraps the non NHibernate . - - - - - The for the element. - - - - - - - - An that maps an collection - using bag semantics to the database. - - - - - Initializes a new instance of a class for - a specific role. - - The role the persistent collection is in. - The name of the property in the - owner object containing the collection ID, or if it is - the primary key. - - - - - Instantiates a new for the bag. - - The current for the bag. - - - A new . - - - - Wraps an in a NHibernate . - - The for the collection to be a part of. - The unwrapped . - - An that wraps the non NHibernate . - - - - - - - - Maps a System.Byte[] Property to an column that can store a BLOB. - - - This is only needed by DataProviders (SqlClient) that need to specify a Size for the - IDbDataParameter. Most DataProvider(Oralce) don't need to set the Size so a BinaryType - would work just fine. - - - - - BinaryType. - - - - - - - - Maps a Property - to a column. - - - - - Initialize a new instance of the BooleanType - - This is used when the Property is mapped to a native boolean type. - - - - Initialize a new instance of the BooleanType class using a - . - - The underlying . - - This is used when the Property is mapped to a string column - that stores true or false as a string. - - - - - Maps a property - to a column. - - - - - Maps a Property - to a column. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Maps a Property - to a DbType.StringFixedLength column. - - - - - ClassMetaType is a NH specific type to support "any" with meta-type="class" - - - It work like a MetaType where the key is the entity-name it self - - - - - - - - - - - - - - - - - - - - - This method does not populate the component parent - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Summary description for CompositeCustomType. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Maps a Property - to a column. - - - CultureInfoType stores the culture name (not the Culture ID) of the - in the DB. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Maps a Property - to a column. - - - - - A custom type for mapping user-written classes that implement - . - - - - - - - Adapts IUserType to the generic IType interface. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Maps a Property to a - - - - - Maps a Property to a column that - stores date & time down to the accuracy of a second. - - - This only stores down to a second, so if you are looking for the most accurate - date and time storage your provider can give you use the . - or the - - - - - - - - - - - - - - Maps a Property to a - - - - - - - - Maps the Year, Month, and Day of a Property to a - column - - - - - - - - - - An extension of which - maps to the database's current timestamp, rather than the vm's - current timestamp. - - - Note: May/may-not cause issues on dialects which do not properly support - a true notion of timestamp - - - - - This is almost the exact same type as the DateTime except it can be used - in the version column, stores it to the accuracy the database supports, - and will default to the value of DateTime.Now if the value is null. - - -

- The value stored in the database depends on what your data provider is capable - of storing. So there is a possibility that the DateTime you save will not be - the same DateTime you get back when you check DateTime.Equals(DateTime) because - they will have their milliseconds off. -

-

- For example - SQL Server 2000 is only accurate to 3.33 milliseconds. So if - NHibernate writes a value of 01/01/98 23:59:59.995 to the Prepared Command, MsSql - will store it as 1998-01-01 23:59:59.997. -

-

- Please review the documentation of your Database server. -

-
-
- - - Sets the value of this Type in the IDbCommand. - - The IDbCommand to add the Type's value to. - The value of the Type. - The index of the IDataParameter in the IDbCommand. - - No null values will be written to the IDbCommand for this Type. - - - - - Maps a Property - to a column. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A reference to an entity class - - - - Constructs the requested entity type mapping. - The name of the associated entity. - - The property-ref name, or null if we - reference the PK of the associated entity. - - Is eager fetching enabled. - Should values of this mapping be embedded in XML modes? - - Is unwrapping of proxies allowed for this association; unwrapping - says to return the "implementation target" of lazy prooxies; typically only possible - with lazy="no-proxy". - - - - Two entities are considered the same when their instances are the same. - One entity instance - Another entity instance - The entity mode. - True if x == y; false otherwise. - - - - Get the identifier value of an instance or proxy. -

- Intended only for loggin purposes!!! -

- The object from which to extract the identifier. - The entity persister - The entity mode - The extracted identifier. -
- - - Converts the id contained in the to an object. - - The that contains the query results. - A string array of column names that contain the id. - The this is occurring in. - The object that this Entity will be a part of. - - An instance of the object or if the identifer was null. - - - - Retrieves the {@link Joinable} defining the associated entity. - The session factory. - The associated joinable - - - - Determine the type of either (1) the identifier if we reference the - associated entity's PK or (2) the unique key to which we refer (i.e. - the property-ref). - - The mappings... - The appropriate type. - - - - The name of the property on the associated entity to which our FK refers - - The mappings... - The appropriate property name. - - - Convenience method to locate the identifier type of the associated entity. - The mappings... - The identifier type - - - Convenience method to locate the identifier type of the associated entity. - The originating session - The identifier type - - - - Resolves the identifier to the actual object. - - - - - Resolve an identifier or unique key value - - - - - - - - The name of the associated entity. - The session factory, for resolution. - The associated entity name. - - - The name of the associated entity. - The associated entity name. - - - - Load an instance by a unique key that is not the primary key. - - The name of the entity to load - The name of the property defining the uniqie key. - The unique key property value. - The originating session. - The loaded entity - - - Explicitly, an entity type is an entity type - True. - - - - This returns the wrong class for an entity with a proxy, or for a named - entity. Theoretically it should return the proxy class, but it doesn't. -

- The problem here is that we do not necessarily have a ref to the associated - entity persister (nor to the session factory, to look it up) which is really - needed to "do the right thing" here... -

-
- - - - - - - - - When implemented by a class, gets the type of foreign key directionality - of this association. - - The of this association. - - - - Is the foreign key the primary key of the table? - - - - - Converts the given enum instance into a basic type. - - - - - - - Maps a to a - DbType.String. - - - If your database should store the - using the named values in the enum instead of the underlying values - then subclass this . - - - All that needs to be done is to provide a default constructor that - NHibernate can use to create the specific type. For example, if - you had an enum defined as. - - - - public enum MyEnum - { - On, - Off, - Dimmed - } - - - - all that needs to be written for your enum string type is: - - - - public class MyEnumStringType : NHibernate.Type.EnumStringType - { - public MyEnumStringType() - : base( typeof( MyEnum ) ) - { - } - } - - - - The mapping would look like: - - - - ... - <property name="Status" type="MyEnumStringType, AssemblyContaining" /> - ... - - - - The TestFixture that shows the working code can be seen - in NHibernate.Test.TypesTest.EnumStringTypeFixture.cs - , NHibernate.Test.TypesTest.EnumStringClass.cs - , and NHibernate.Test.TypesTest.EnumStringClass.hbm.xml - - - - - - Hardcoding of 255 for the maximum length - of the Enum name that will be saved to the db. - - - 255 because that matches the default length that hbm2ddl will - use to create the column. - - - - - Initializes a new instance of . - - The of the Enum. - - - - Initializes a new instance of . - - The of the Enum. - The length of the string that can be written to the column. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This appends enumstring - to the beginning of the underlying - enums name so that could still be stored - using the underlying value through the - also. - - - - - Represents directionality of the foreign key constraint - - - - - A foreign key from parent to child - - - - - A foreign key from child to parent - - - - - Should we cascade at this cascade point? - - - - - An that maps an collection - to the database using bag semantics. - - - - - Initializes a new instance of a class for - a specific role. - - The role the persistent collection is in. - The name of the property in the - owner object containing the collection ID, or if it is - the primary key. - - - - Instantiates a new for the bag. - - The current for the bag. - The current for the bag. - - - - - Wraps an in a . - - The for the collection to be a part of. - The unwrapped . - - An that wraps the non NHibernate . - - - - - An that maps an collection - using bag semantics with an identifier to the database. - - - - - Initializes a new instance of a class for - a specific role. - - The role the persistent collection is in. - The name of the property in the - owner object containing the collection ID, or if it is - the primary key. - - - - - Instantiates a new for the identifier bag. - - The current for the identifier bag. - - - - - - - Wraps an in a . - - The for the collection to be a part of. - The unwrapped . - - An that wraps the non NHibernate . - - - - - - - - An that maps an collection - to the database using list semantics. - - - - - An that maps an collection - using list semantics to the database. - - - - - Initializes a new instance of a class for - a specific role. - - The role the persistent collection is in. - The name of the property in the - owner object containing the collection ID, or if it is - the primary key. - - - - - Instantiates a new for the bag. - - The current for the bag. - - - A new . - - - - Wraps an exist in a NHibernate . - - The for the collection to be a part of. - The unwrapped . - - An that wraps the non NHibernate . - - - - - - - - Initializes a new instance of a class for - a specific role. - - The role the persistent collection is in. - The name of the property in the - owner object containing the collection ID, or if it is - the primary key. - - - - Instantiates a new for the list. - - The current for the list. - The current for the list. - - - - - Wraps an in a . - - The for the collection to be a part of. - The unwrapped . - - An that wraps the non NHibernate . - - - - - An that maps an collection - to the database. - - - - - An that maps an collection - to the database. - - - - - Initializes a new instance of a class for - a specific role. - - The role the persistent collection is in. - The name of the property in the - owner object containing the collection ID, or if it is - the primary key. - - - - - Instantiates a new for the map. - - The current for the map. - - - - - - - Wraps an in a . - - The for the collection to be a part of. - The unwrapped . - - An that wraps the non NHibernate . - - - - - - - - Initializes a new instance of a class for - a specific role. - - The role the persistent collection is in. - The name of the property in the - owner object containing the collection ID, or if it is - the primary key. - - - - Instantiates a new for the map. - - The current for the map. - - Not used. - - - - - Wraps an in a . - - The for the collection to be a part of. - The unwrapped . - - An that wraps the - non NHibernate . - - - - - An that maps a sorted collection - to the database. - - - - - An that maps an collection - to the database. - - - - - An that maps an collection - to the database. - - - - - Initializes a new instance of a class for - a specific role. - - The role the persistent collection is in. - The name of the property in the - owner object containing the collection ID, or if it is - the primary key. - - - - - Instantiates a new for the set. - - The current for the set. - - - - - - - Wraps an in a . - - The for the collection to be a part of. - The unwrapped . - - An that wraps the non NHibernate . - - - - - - - - - - Initializes a new instance of a class for - a specific role. - - The role the persistent collection is in. - The name of the property in the - owner object containing the collection ID, or if it is - the primary key. - - - - Instantiates a new for the set. - - The current for the set. - The current for the set. - - - - - Wraps an in a . - - The for the collection to be a part of. - The unwrapped . - - An that wraps the non NHibernate . - - - - - Initializes a new instance of a class for - a specific role. - - The role the persistent collection is in. - The name of the property in the - owner object containing the collection ID, or if it is - the primary key. - - - - An that maps a sorted collection - to the database. - - - - - Initializes a new instance of a class for - a specific role. - - The role the persistent collection is in. - The name of the property in the - owner object containing the collection ID, or if it is - the primary key. - The to use to compare - set elements. - - - - Maps a Property - to a column. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Maps a Property - to a column. - - - - - - - - - - - Maps a Property - to a column. - - - - - - - - - - - Maps a Property - to a column. - - - - - - - - - - - A many-to-one association to an entity - - - - - Hydrates the Identifier from . - - The that contains the query results. - A string array of column names to read from. - The this is occurring in. - The object that this Entity will be a part of. - - An instantiated object that used as the identifier of the type. - - - - - A one-to-one association to an entity - - - - - We don't need to dirty check one-to-one because of how - assemble/disassemble is implemented and because a one-to-one - association is never dirty - - - - - A implemented using a collection that maintains - the order in which elements are inserted into it. - - - - - Initializes a new instance of a class. - - The role the persistent collection is in. - - - - - - A implemented using a collection that maintains - the order in which elements are inserted into it. - - - - - Initializes a new instance of a class - - The role the persistent collection is in. - - - - - - PersistentEnumType - - - - - Gets an instance of the Enum - - The underlying value of an item in the Enum. - - An instance of the Enum set to the code value. - - - - - Gets the correct value for the Enum. - - The value to convert (an enum instance). - A boxed version of the code, converted to the correct type. - - This handles situations where the DataProvider returns the value of the Enum - from the db in the wrong underlying type. It uses to - convert it to the correct type. - - - - - Maps a Property - to a column. - - - - - - - - - - - Maps an instance of a that has the - to a column. - - - - The SerializableType should be used when you know that Bytes are - not going to be greater than 8,000. - - - The base class is because the data is stored in - a byte[]. The System.Array does not have a nice "equals" method so we must - do a custom implementation. - - - - - - - - - - - - - - - - - - - - - - - Thrown when a property cannot be serialized/deserialized - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The message that describes the error. - - - - Initializes a new instance of the class. - - The message that describes the error. - - The exception that is the cause of the current exception. If the innerException parameter - is not a null reference, the current exception is raised in a catch block that handles - the inner exception. - - - - - Initializes a new instance of the class - with serialized data. - - - The that holds the serialized object - data about the exception being thrown. - - - The that contains contextual information about the source or destination. - - - - - Maps a Property to an - column. - - - Verify through your database's documentation if there is a column type that - matches up with the capabilities of - - - - - - - - - - - Extends the to provide sorting. - - - - - Initializes a new instance of a class for - a specific role using the to do the sorting. - - The role the persistent collection is in. - The name of the property in the - owner object containing the collection ID, or if it is - the primary key. - The to use for the sorting. - - - - - Extends the to provide sorting. - - - - - Initializes a new instance of a class for - a specific role using the to do the sorting. - - The role the persistent collection is in. - The name of the property in the - owner object containing the collection ID, or if it is - the primary key. - The to use for the sorting. - - - - - A one-to-one association that maps to specific formula(s) - instead of the primary key column of the owning entity. - - - - - Maps a Property to an - column that can store a CLOB. - - - This is only needed by DataProviders (SqlClient) that need to specify a Size for the - IDbDataParameter. Most DataProvider(Oralce) don't need to set the Size so a StringType - would work just fine. - - - - - Maps a to a column. - - - - - - - - - - - - - - - - - Maps a Property to an column - that stores the DateTime using the Ticks property. - - - This is the recommended way to "timestamp" a column. - The System.DateTime.Ticks is accurate to 100-nanosecond intervals. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Maps a Property to an column - This is an extra way to map a . You already have - but mapping against a . - - - - - Maps a Property to an column - - - - - - - - - - - - - - - - - - - - - - - - - Maps a Property to an DateTime column that only stores the - Hours, Minutes, and Seconds of the DateTime as significant. - Also you have for handling, the NHibernate Type , - the which maps to a . - - - - This defaults the Date to "1753-01-01" - that should not matter because - using this Type indicates that you don't care about the Date portion of the DateTime. - - - A more appropriate choice to store the duration/time is the . - The underlying tends to be handled differently by different - DataProviders. - - - - - - Maps a to a 1 char column - that stores a 'T'/'F' to indicate true/false. - - - If you are using schema-export to generate your tables then you need - to set the column attributes: length=1 or sql-type="char(1)". - - This needs to be done because in Java's JDBC there is a type for CHAR and - in ADO.NET there is not one specifically for char, so you need to tell schema - export to create a char(1) column. - - - - - - - - - - - - - - - - - Used internally to obtain instances of IType. - - - Applications should use static methods and constants on NHibernate.NHibernateUtil if the default - IType is good enough. For example, the TypeFactory should only be used when the String needs - to have a length of 300 instead of 255. At this point NHibernate.String does not get you the - correct IType. Instead use TypeFactory.GetString(300) and keep a local variable that holds - a reference to the IType. - - - - - - - - Register other Default .NET type - - - These type will be used, as default, even when the "type" attribute was NOT specified in the mapping - - - - - Register other NO Default .NET type - - - These type will be used only when the "type" attribute was is specified in the mapping. - These are in here because needed to NO override default CLR types and be available in mappings - - - - - Gets the classification of the Type based on the string. - - The name of the Type to get the classification for. - The Type of Classification - - This parses through the string and makes the assumption that no class - name and no assembly name will contain the "(". - - If it finds - the "(" and then finds a "," afterwards then it is a - TypeClassification.PrecisionScale. - - - If it finds the "(" - and doesn't find a "," afterwards, then it is a - TypeClassification.Length. - - - If it doesn't find the "(" then it assumes that it is a - TypeClassification.Plain. - - - - - - Given the name of a Hibernate type such as Decimal, Decimal(19,0) - , Int32, or even NHibernate.Type.DecimalType, NHibernate.Type.DecimalType(19,0), - NHibernate.Type.Int32Type, then return an instance of NHibernate.Type.IType - - The name of the type. - The instance of the IType that the string represents. - - This method will return null if the name is not found in the basicNameMap. - - - - - Uses heuristics to deduce a NHibernate type given a string naming the - type. - - - An instance of NHibernate.Type.IType - - When looking for the NHibernate type it will look in the cache of the Basic types first. - If it doesn't find it in the cache then it uses the typeName to get a reference to the - Class (Type in .NET). Once we get the reference to the .NET class we check to see if it - implements IType, ICompositeUserType, IUserType, ILifecycle (Association), or - IPersistentEnum. If none of those are implemented then we will serialize the Type to the - database using NHibernate.Type.SerializableType(typeName) - - - - - Uses heuristics to deduce a NHibernate type given a string naming the - type. - - the type name - parameters for the type - An instance of NHibernate.Type.IType - - - - Gets the BinaryType with the specified length. - - The length of the data to store in the database. - A BinaryType - - In addition to returning the BinaryType it will also ensure that it has - been added to the basicNameMap with the keys Byte[](length) and - NHibernate.Type.BinaryType(length). - - - - - Gets the SerializableType for the specified Type - - The Type that will be Serialized to the database. - A SerializableType - - - In addition to returning the SerializableType it will also ensure that it has - been added to the basicNameMap with the keys Type.FullName (the result - of IType.Name and Type.AssemblyQualifiedName. This is different - from the other items put in the basicNameMap because it is uses the AQN and the - FQN as opposed to the short name used in the maps and the FQN. - - - Since this method calls the method - GetSerializableType(System.Type, Int32) - with the default length, those keys will also be added. - - - - - - A one-to-one association type for the given class and cascade style. - - - - - A many-to-one association type for the given class and cascade style. - - - - - - - A many-to-one association type for the given class and cascade style. - - - - - A many-to-one association type for the given class and cascade style. - - - - Deep copy a series of values from one array to another... - The values to copy (the source) - The value types - an array indicating which values to include in the copy - The array into which to copy the values - The originating session - - - Apply the operation across a series of values. - The values - The value types - The originating session - - - - Determine if any of the given field values are dirty, - returning an array containing indexes of - the dirty fields or null if no fields are dirty. - - - - - Determine if any of the given field values are modified, - returning an array containing indexes of - the dirty fields or null if no fields are modified. - - - - - - - - - - - - - - Apply the {@link Type#disassemble} operation across a series of values. - The values - The value types - An array indicating which values to include in the disassembled state - The originating session - The entity "owning" the values - The disassembled state - - - - Apply the operation across a series of values. - - The source of the state - The target into which to replace the source values. - The value types - The originating session - The entity "owning" the values - Represent a cache of already replaced state - The replaced state - - - - Apply the - operation across a series of values. - - The source of the state - The target into which to replace the source values. - The value types - The originating session - The entity "owning" the values - A map representing a cache of already replaced state - FK directionality to be applied to the replacement - The replaced state - - - - Apply the - operation across a series of values, as - long as the corresponding is an association. - - The source of the state - The target into which to replace the source values. - The value types - The originating session - The entity "owning" the values - A map representing a cache of already replaced state - FK directionality to be applied to the replacement - The replaced state - - If the corresponding type is a component type, then apply - across the component subtypes but do not replace the component value itself. - - - - - Maps the Assembly Qualified Name of a to a - column. - - - - - - - - Initialize a new instance of the TypeType class using a - . - - The underlying . - - - - Gets the in the for the Property. - - The that contains the value. - The index of the field to get the value from. - The from the database. - - Thrown when the value in the database can not be loaded as a - - - - - Gets the in the for the Property. - - The that contains the value. - The name of the field to get the value from. - The from the database. - - This just calls gets the index of the name in the IDataReader - and calls the overloaded version - (IDataReader, Int32). - - - Thrown when the value in the database can not be loaded as a - - - - - Puts the Assembly Qualified Name of the - Property into to the . - - The to put the value into. - The that contains the value. - The index of the to start writing the value to. - - This uses the method of the - object to do the work. - - - - - A representation of the value to be embedded in an XML element - - The that contains the values. - - An Xml formatted string that contains the Assembly Qualified Name. - - - - Gets the that will be returned - by the NullSafeGet() methods. - - - A from the .NET framework. - - - - - - - - Maps a Property - to a column. - - - - - - - - - - - Maps a Property - to a column. - - - - - - - - - - - Maps a Property - to a column. - - - - - - - - Maps a to a 1 char column - that stores a 'Y'/'N' to indicate true/false. - - - If you are using schema-export to generate your tables then you need - to set the column attributes: length=1 or sql-type="char(1)". - - This needs to be done because in Java's JDBC there is a type for CHAR and - in ADO.NET there is not one specifically for char, so you need to tell schema - export to create a char(1) column. - - - - - - - - - - - - - - - - - A UserType that may be dereferenced in a query. - This interface allows a custom type to define "properties". - These need not necessarily correspond to physical .NET style properties. - - A ICompositeUserType may be used in almost every way - that a component may be used. It may even contain many-to-one - associations. - - Implementors must be immutable and must declare a public - default constructor. - - Unlike UserType, cacheability does not depend upon - serializability. Instead, Assemble() and - Disassemble() provide conversion to/from a cacheable - representation. - - - - - Get the value of a property - - an instance of class mapped by this "type" - - the property value - - - - Set the value of a property - - an instance of class mapped by this "type" - - the value to set - - - - Compare two instances of the class mapped by this type for persistence - "equality", ie. equality of persistent state. - - - - - - - - Get a hashcode for the instance, consistent with persistence "equality" - - - - - Retrieve an instance of the mapped class from a IDataReader. Implementors - should handle possibility of null values. - - IDataReader - the column names - - the containing entity - - - - - Write an instance of the mapped class to a prepared statement. - Implementors should handle possibility of null values. - A multi-column type should be written to parameters starting from index. - - - - - - - - - Return a deep copy of the persistent state, stopping at entities and at collections. - - generally a collection element or entity field - - - - - Transform the object into its cacheable representation. - At the very least this method should perform a deep copy. - That may not be enough for some implementations, method should perform a deep copy. That may not be enough for some implementations, however; for example, associations must be cached as identifier values. (optional operation) - - the object to be cached - - - - - - Reconstruct an object from the cacheable representation. - At the very least this method should perform a deep copy. (optional operation) - - the object to be cached - - - - - - - During merge, replace the existing (target) value in the entity we are merging to - with a new (original) value from the detached entity we are merging. For immutable - objects, or null values, it is safe to simply return the first parameter. For - mutable objects, it is safe to return a copy of the first parameter. However, since - composite user types often define component values, it might make sense to recursively - replace component values in the target object. - - - - - Get the "property names" that may be used in a query. - - - - - Get the corresponding "property types" - - - - - The class returned by NullSafeGet(). - - - - - Are objects of this type mutable? - - - - - A custom type that may function as an identifier or discriminator - type, or may be marshalled to and from an XML document. - - - - - The interface to be implemented by user-defined types. - - - - The interface abstracts user code from future changes to the interface, - simplifies the implementation of custom types and hides certain "internal interfaces from - user code. - - - Implementers must be immutable and must declare a public default constructor. - - - The actual class mapped by a IUserType may be just about anything. However, if it is to - be cacheble by a persistent cache, it must be serializable. - - - Alternatively, custom types could implement directly or extend one of the - abstract classes in NHibernate.Type. This approach risks future incompatible changes - to classes or interfaces in the package. - - - - - - Compare two instances of the class mapped by this type for persistent "equality" - ie. equality of persistent state - - - - - - - - Get a hashcode for the instance, consistent with persistence "equality" - - - - - Retrieve an instance of the mapped class from a JDBC resultset. - Implementors should handle possibility of null values. - - a IDataReader - column names - the containing entity - - HibernateException - - - - Write an instance of the mapped class to a prepared statement. - Implementors should handle possibility of null values. - A multi-column type should be written to parameters starting from index. - - a IDbCommand - the object to write - command parameter index - HibernateException - - - - Return a deep copy of the persistent state, stopping at entities and at collections. - - generally a collection element or entity field - a copy - - - - During merge, replace the existing () value in the entity - we are merging to with a new () value from the detached - entity we are merging. For immutable objects, or null values, it is safe to simply - return the first parameter. For mutable objects, it is safe to return a copy of the - first parameter. For objects with component values, it might make sense to - recursively replace component values. - - the value from the detached entity being merged - the value in the managed entity - the managed entity - the value to be merged - - - - Reconstruct an object from the cacheable representation. At the very least this - method should perform a deep copy if the type is mutable. (optional operation) - - the object to be cached - the owner of the cached object - a reconstructed object from the cachable representation - - - - Transform the object into its cacheable representation. At the very least this - method should perform a deep copy if the type is mutable. That may not be enough - for some implementations, however; for example, associations must be cached as - identifier values. (optional operation) - - the object to be cached - a cacheable representation of the object - - - - The SQL types for the columns mapped by this type. - - - - - The type returned by NullSafeGet() - - - - - Are objects of this type mutable? - - - - - Parse a string representation of this value, as it appears - in an XML document. - - - - - Return an SQL literal representation of the value - - - - - Return a string representation of this value, as it - should appear in an XML document - - - - - Marker interface for user types which want to perform custom - logging of their corresponding values - - - - Generate a loggable string representation of the collection (value). - The collection to be logged; guaranteed to be non-null and initialized. - The factory. - The loggable string representation. - - - - Support for parameterizable types. A UserType or CustomUserType may be - made parameterizable by implementing this interface. Parameters for a - type may be set by using a nested type element for the property element - - - - - Gets called by Hibernate to pass the configured type parameters to - the implementation. - - - - - Instantiate an uninitialized instance of the collection wrapper - - - - - Wrap an instance of a collection - - - - - Return an over the elements of this collection - the passed collection - instance may or may not be a wrapper - - - - - Optional operation. Does the collection contain the entity instance? - - - - - Optional operation. Return the index of the entity in the collection. - - - - - Replace the elements of a collection with the elements of another collection - - - - - Instantiate an empty instance of the "underlying" collection (not a wrapper), - but with the given anticipated size (i.e. accounting for initial size - and perhaps load factor). - - - The anticipated size of the instantiated collection - after we are done populating it. Note, may be negative to indicate that - we not yet know anything about the anticipated size (i.e., when initializing - from a result set row by row). - - - - - A user type that may be used for a version property. - - - - - Generate an initial version. - - The session from which this request originates. May be - null; currently this only happens during startup when trying to determine - the "unsaved value" of entities. - an instance of the type - - - - Increment the version. - - The session from which this request originates. - the current version - an instance of the type - - - - Helper class that contains common array functions and - data structures used through out NHibernate. - - - - - Sets item at position to . - Expands the list by adding values, if needed. - - - - - Computes a hash code for . - - The hash code is computed as the sum of hash codes of - individual elements, so that the value is independent of the - collection iteration order. - - - - - Creates a that uses case-insensitive string comparison - associated with invariant culture. - - - This is different from the method in - in that the latter uses the current culture and is thus vulnerable to the "Turkish I" problem. - - - - - Creates a that uses case-insensitive string comparison - associated with invariant culture. - - - This is different from the method in - in that the latter uses the current culture and is thus vulnerable to the "Turkish I" problem. - - - - - Computes a hash code for . - - The hash code is computed as the sum of hash codes of - individual elements, so that the value is independent of the - collection iteration order. - - - - - A read-only dictionary that is always empty and permits lookup by key. - - - - - A read-only dictionary that is always empty and permits lookup by key. - - - - - Utility class implementing ToString for collections. All ToString - overloads call element.ToString(). - - - To print collections of entities or typed values, use - . - - - - - - - - Get only filters enabled for many-to-one association. - - All enabled filters - A new for filters enabled for many to one. - - - - An where keys are compared by object identity, rather than equals. - - All external users of this class need to have no knowledge of the IdentityKey - it is all - hidden by this class. - - - - Do NOT use a System.Value type as the key for this Hashtable - only classes. See - the google thread - about why using System.Value is a bad thing. - - - If I understand it correctly, the first call to get an object defined by a DateTime("2003-01-01") - would box the DateTime and return the identity key for the box. If you were to get that Key and - unbox it into a DateTime struct, then the next time you passed it in as the Key the IdentityMap - would box it again (into a different box) and it would have a different IdentityKey - so you would - not get the same value for the same DateTime value. - - - - - - Create a new instance of the IdentityMap that has no - iteration order. - - A new IdentityMap based on a Hashtable. - - - - Create a new instance of the IdentityMap that has an - iteration order of the order the objects were added - to the Map. - - A new IdentityMap based on ListDictionary. - - - - Return the Dictionary Entries (as instances of DictionaryEntry in a collection - that is safe from concurrent modification). Ie - we may safely add new instances - to the underlying IDictionary during enumeration of the Values. - - The IDictionary to get the enumeration safe list. - A Collection of DictionaryEntries - - - - Create the IdentityMap class with the correct class for the IDictionary. - Unsorted = Hashtable - Sorted = ListDictionary - - A class that implements the IDictionary for storing the objects. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Verifies that we are not using a System.ValueType as the Key in the Dictionary - - The object that will be the key. - An object that is safe to be a key. - Thrown when the obj is a System.ValueType - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Returns the Keys used in this IdentityMap - - - - - - - - - - - - - - - - Provides a snapshot VIEW in the form of a List of the contents of the IdentityMap. - You can safely iterate over this VIEW and modify the actual IdentityMap because the - VIEW is a copy of the contents, not a reference to the existing Map. - - Contains a copy (not that actual instance stored) of the DictionaryEntries in a List. - - - - - Set implementation that use == instead of equals() as its comparison mechanism - that base its implementation of IdentityMap - - - - - Combines multiple objects implementing into one. - - - - - Creates an IEnumerable object from multiple IEnumerables. - - The IEnumerables to join together. - - - - - - - - - - - - - A flag to indicate if Dispose() has been called. - - - - - Finalizer that ensures the object is correctly disposed of. - - - - - Takes care of freeing the managed and unmanaged resources that - this class is responsible for. - - - - - Takes care of freeing the managed and unmanaged resources that - this class is responsible for. - - Indicates if this JoinedEnumerable is being Disposed of or Finalized. - - The command is closed and the reader is disposed. This allows other ADO.NET - related actions to occur without needing to move all the way through the - EnumerableImpl. - - - - - - - - A map of objects whose mapping entries are sequenced based on the order in which they were - added. This data structure has fast O(1) search time, deletion time, and insertion time - - - This class is not thread safe. - This class is not a really replication of JDK LinkedHashMap{K, V}, - this class is an adaptation of SequencedHashMap with generics. - - - - - Initializes a new instance of the class that is empty, - has the default initial capacity, and uses the default equality comparer for the key type. - - - - - Initializes a new instance of the class that is empty, - has the specified initial capacity, and uses the default equality comparer for the key type. - - The initial number of elements that the can contain. - - - - Initializes a new instance of the class that is empty, has the default initial capacity, and uses the specified . - - The implementation to use when comparing keys, or null to use the default EqualityComparer for the type of the key. - - - - Initializes a new instance of the class that is empty, has the specified initial capacity, and uses the specified . - - The initial number of elements that the can contain. - The implementation to use when comparing keys, or null to use the default EqualityComparer for the type of the key. - - - - An implementation of a Map which has a maximum size and uses a Least Recently Used - algorithm to remove items from the Map when the maximum size is reached and new items are added. - - - - - A map of objects whose mapping entries are sequenced based on the order in which they were - added. This data structure has fast O(1) search time, deletion time, and insertion time - - - This class is not thread safe. - - - - - Construct an empty sentinel used to hold the head (sentinel.next) and the tail (sentinal.prev) - of the list. The sentinal has a key and value - - - - - - Sentinel used to hold the head and tail of the list of entries - - - - - Map of keys to entries - - - - - Holds the number of modifications that have occurred to the map, excluding modifications - made through a collection view's iterator. - - - - - Construct a new sequenced hash map with default initial size and load factor - - - - - Construct a new sequenced hash map with the specified initial size and default load factor - - the initial size for the hash table - - - - Construct a new sequenced hash map with the specified initial size and load factor - - the initial size for the hashtable - the load factor for the hash table - - - - Construct a new sequenced hash map with the specified initial size, hash code provider - and comparer - - the initial size for the hashtable - - - - - Creates an empty Hashtable with the default initial capacity and using the default load factor, - the specified hash code provider and the specified comparer - - - - - - Creates an empty Hashtable with the default initial capacity and using the default load factor, - the specified hash code provider and the specified comparer - - the initial size for the hashtable - the load factor for the hash table - - - - - Removes an internal entry from the linked list. THis does not remove it from the underlying - map. - - - - - - Inserts a new internal entry to the tail of the linked list. This does not add the - entry to the underlying map. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Remove the Entry identified by the Key if it exists. - - The Key to remove. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Return only the Key of the DictionaryEntry - - - - - Return only the Value of the DictionaryEntry - - - - - Return the full DictionaryEntry - - - - - Summary description for ObjectUtils. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Helper class for Reflection related code. - - - - - Determine if the specified overrides the - implementation of Equals from - - The to reflect. - if any type in the hierarchy overrides Equals(object). - - - - Determine if the specified overrides the - implementation of GetHashCode from - - The to reflect. - if any type in the hierarchy overrides GetHashCode(). - - - - Finds the for the property in the . - - The to find the property in. - The name of the Property to find. - The name of the property access strategy. - The to get the value of the Property. - - This one takes a propertyAccessor name as we might know the correct strategy by now so we avoid Exceptions which are costly - - - - - Get the NHibernate for the named property of the . - - The to find the Property in. - The name of the property/field to find in the class. - The name of the property accessor for the property. - - The NHibernate for the named property. - - - - - Get the for the named property of a type. - - The to find the property in. - The name of the property/field to find in the class. - The name of the property accessor for the property. - The for the named property. - - - - Get the for the named property of a type. - - The FullName to find the property in. - The name of the property/field to find in the class. - The name of the property accessor for the property. - The for the named property. - - - - Returns a reference to the Type. - - The name of the class or a fully qualified name. - The Type for the Class. - - - - Load a System.Type given is't name. - - The class FullName or AssemblyQualifiedName - The System.Type - - If the don't represent an - the method try to find the System.Type scanning all Assemblies of the . - - If no System.Type was found for . - - - - Returns a from an already loaded Assembly or an - Assembly that is loaded with a partial name. - - An . - if an exception should be thrown - in case of an error, otherwise. - - A object that represents the specified type, - or if the type cannot be loaded. - - - Attempts to get a reference to the type from an already loaded assembly. If the - type cannot be found then the assembly is loaded using - . - - - - - Returns the value of the static field of . - - The . - The name of the field in the . - The value contained in the field, or if the type or the field does not exist. - - - - Gets the default no arg constructor for the . - - The to find the constructor for. - - The for the no argument constructor, or if the - type is an abstract class. - - - Thrown when there is a problem calling the method GetConstructor on . - - - - - Finds the constructor that takes the parameters. - - The to find the constructor in. - The objects to use to find the appropriate constructor. - - An that can be used to create the type with - the specified parameters. - - - Thrown when no constructor with the correct signature can be found. - - - - - Determines if the is a non creatable class. - - The to check. - if the is an Abstract Class or an Interface. - - - - Unwraps the supplied - and returns the inner exception preserving the stack trace. - - - The to unwrap. - - The unwrapped exception. - - - - Try to find a method in a given type. - - The given type. - The method info. - The found method or null. - - The , in general, become from another . - - - - - Try to find a method in a serie of given types. - - The serie of types where find. - The method info. - The found method or null. - - The , in general, become from another . - - - - - Used to ensure a collection filtering a given IEnumerable by a certain type. - - The type used like filter. - - - - Cache following a "Most Recently Used" (MRU) algorithm for maintaining a - bounded in-memory size; the "Least Recently Used" (LRU) entry is the first - available for removal from the cache. - - - This implementation uses a bounded MRU Map to limit the in-memory size of - the cache. Thus the size of this cache never grows beyond the stated size. - - - - - Cache following a "Most Recently Used" (MRY) algorithm for maintaining a - bounded in-memory size; the "Least Recently Used" (LRU) entry is the first - available for removal from the cache. - - - This implementation uses a "soft limit" to the in-memory size of the cache, - meaning that all cache entries are kept within a completely - {@link java.lang.ref.SoftReference}-based map with the most recently utilized - entries additionally kept in a hard-reference manner to prevent those cache - entries soft references from becoming enqueued by the garbage collector. - Thus the actual size of this cache impl can actually grow beyond the stated - max size bound as long as GC is not actively seeking soft references for - enqueuement. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Just a façade for calling string.Split() - We don't use our StringTokenizer because string.Split() is - more efficient (but it only works when we don't want to retrieve the delimiters) - - separators for the tokens of the list - the string that will be broken into tokens - - - - - Splits the String using the StringTokenizer. - - separators for the tokens of the list - the string that will be broken into tokens - true to include the separators in the tokens. - - - This is more powerful than Split because you have the option of including or - not including the separators in the tokens. - - - - - - - - - - - - - - - - - - - - Takes a fully qualified type name and returns the full name of the - Class - includes namespaces. - - - - - - - Takes a fully qualified type name (can include the assembly) and just returns - the name of the Class. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Converts a in the format of "true", "t", "false", or "f" to - a . - - The string to convert. - - The value converted to a . - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Counts the unquoted instances of the character. - - - - - - - - - - - - - - - - Generate a nice alias for the given class name or collection role - name and unique integer. Subclasses do not have to use - aliases of this form. - - an alias of the form foo1_ - - - - Returns the interned string equal to if there is one, or - otherwise. - - A - A - - - - A StringTokenizer java like object - - - - - - - - - - - - - - - - - - - - - - - - - - Returns an unmodifiable view of the specified IDictionary. - This method allows modules to provide users with "read-only" access to internal dictionary. - Query operations on the returned dictionary "read through" to the specified dictionary, - and attempts to modify the returned dictionary, - whether direct or via its collection views, result in an . - - The type of keys in the dictionary. - The type of values in the dictionary. - - - - Initializes a new instance of the UnmodifiableDictionary class that contains elements wrapped - from the specified IDictionary. - - The whose elements are wrapped. - - - - Count of elements in the collection. Unreliable! - - - - - Indicates failure of an assertion: a possible bug in NHibernate - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The message that describes the error. - - - - Initializes a new instance of the class. - - The message that describes the error. - - The exception that is the cause of the current exception. If the innerException parameter - is not a null reference, the current exception is raised in a catch block that handles - the inner exception. - - - - - Initializes a new instance of the class. - - - The that holds the serialized object - data about the exception being thrown. - - - The that contains contextual information about the source or destination. - - - - - Controls how the session interacts with the second-level - cache and query cache. - - - - - The session will never interact with the cache, except to invalidate - cache items when updates occur - - - - - The session will never read items from the cache, but will add items - to the cache as it reads them from the database. - - - - - The session may read items from the cache, but will not add items, - except to invalidate items when updates occur - - - - The session may read items from the cache, and add items to the cache - - - - The session will never read items from the cache, but will add items - to the cache as it reads them from the database. In this mode, the - effect of hibernate.cache.use_minimal_puts is bypassed, in - order to force a cache refresh - - - - - - - - Initializes a new instance of the class. - - - The exception that is the cause of the current exception. If the innerException parameter - is not a null reference, the current exception is raised in a catch block that handles - the inner exception. - - - - - Initializes a new instance of the class. - - The message that describes the error. - - - - Initializes a new instance of the class. - - The message that describes the error. - - The exception that is the cause of the current exception. If the innerException parameter - is not a null reference, the current exception is raised in a catch block that handles - the inner exception. - - - - - Initializes a new instance of the class - with serialized data. - - - The that holds the serialized object - data about the exception being thrown. - - - The that contains contextual information about the source or destination. - - - - - Transforms Criteria queries - - - - - Returns a clone of the original criteria, which will return the count - of rows that are returned by the original criteria query. - - - - - Returns a clone of the original criteria, which will return the count - of rows that are returned by the original criteria query. - - - - - Creates an exact clone of the criteria - - - - - - Creates an exact clone of the criteria - - - - - - Initializes a new instance of the class. - - The message that describes the error. - The name of the duplicate object - The type of the duplicate object - - - - Initializes a new instance of the class. - - The name of the duplicate object - The type of the duplicate object - - - - Initializes a new instance of the class - with serialized data. - - - The that holds the serialized object - data about the exception being thrown. - - - The that contains contextual information about the source or destination. - - - - - The type of the duplicated object - - - - - The name of the duplicated object - - - - - Allows user code to inspect and/or change property values before they are written and after they - are read from the database - - - - There might be a single instance of IInterceptor for a SessionFactory, or a new - instance might be specified for each ISession. Whichever approach is used, the interceptor - must be serializable if the ISession is to be serializable. This means that SessionFactory - -scoped interceptors should implement ReadResolve(). - - - The ISession may not be invoked from a callback (nor may a callback cause a collection or - proxy to be lazily initialized). - - - - - - Called just before an object is initialized - - - - - - - - The interceptor may change the state, which will be propagated to the persistent - object. Note that when this method is called, entity will be an empty - uninitialized instance of the class. - if the user modified the state in any way - - - - Called when an object is detected to be dirty, during a flush. - - - - - - - - - The interceptor may modify the detected currentState, which will be propagated to - both the database and the persistent object. Note that all flushes end in an actual - synchronization with the database, in which as the new currentState will be propagated - to the object, but not necessarily (immediately) to the database. It is strongly recommended - that the interceptor not modify the previousState. - - if the user modified the currentState in any way - - - - Called before an object is saved - - - - - - - - The interceptor may modify the state, which will be used for the SQL INSERT - and propagated to the persistent object - - if the user modified the state in any way - - - - Called before an object is deleted - - - - - - - - It is not recommended that the interceptor modify the state. - - - - Called before a collection is (re)created. - - - Called before a collection is deleted. - - - Called before a collection is updated. - - - - Called before a flush - - The entities - - - - Called after a flush that actually ends in execution of the SQL statements required to - synchronize in-memory state with the database. - - The entitites - - - - Called when a transient entity is passed to SaveOrUpdate. - - - The return value determines if the object is saved - - - the entity is passed to Save(), resulting in an INSERT - - the entity is passed to Update(), resulting in an UPDATE - - Hibernate uses the unsaved-value mapping to determine if the object is unsaved - - - A transient entity - Boolean or to choose default behaviour - - - - Called from Flush(). The return value determines whether the entity is updated - - - - an array of property indicies - the entity is dirty - an empty array - the entity is not dirty - - use Hibernate's default dirty-checking algorithm - - - A persistent entity - - - - - - An array of dirty property indicies or to choose default behavior - - - - Instantiate the entity class. Return to indicate that Hibernate should use the default - constructor of the class - - the name of the entity - The type of entity instance to be returned. - the identifier of the new instance - An instance of the class, or to choose default behaviour - - The identifier property of the returned instance - should be initialized with the given identifier. - - - - Get the entity name for a persistent or transient instance - an entity instance - the name of the entity - - - Get a fully loaded entity instance that is cached externally - the name of the entity - the instance identifier - a fully initialized entity - - - - Called when a NHibernate transaction is begun via the NHibernate - API. Will not be called if transactions are being controlled via some other mechanism. - - - - - Called before a transaction is committed (but not before rollback). - - - - - Called after a transaction is committed or rolled back. - - - - Called when sql string is being prepared. - sql to be prepared - original or modified sql - - - - Called when a session-scoped (and only session scoped) interceptor is attached - to a session - - - session-scoped-interceptor is an instance of the interceptor used only for one session. - The use of singleton-interceptor may cause problems in multi-thread scenario. - - - - - - Defines the representation modes available for entities. - - - - Represents a fetching strategy. - - - This is used together with the API to specify - runtime fetching strategies. - - For Hql queries, use the FETCH keyword instead. - - - - - - Default to the setting configured in the mapping file. - - - - - Fetch eagerly, using a separate select. Equivalent to - fetch="select" (and outer-join="false") - - - - - Fetch using an outer join. Equivalent to - fetch="join" (and outer-join="true") - - - - - Indicates that an expected getter or setter method could not be found on a class - - - - - Initializes a new instance of the class. - - The message that describes the error. - - - - Initializes a new instance of the class. - - The message that describes the error. - - The exception that is the cause of the current exception. If the innerException parameter - is not a null reference, the current exception is raised in a catch block that handles - the inner exception. - - - - - Initializes a new instance of the class - with serialized data. - - - The that holds the serialized object - data about the exception being thrown. - - - The that contains contextual information about the source or destination. - - - - - Represents a flushing strategy. - - - The flush process synchronizes database state with session state by detecting state - changes and executing SQL statements - - - - - Special value for unspecified flush mode (like in Java). - - - - - The ISession is never flushed unless Flush() is explicitly - called by the application. This mode is very efficient for read only - transactions - - - - - The ISession is flushed when Transaction.Commit() is called - - - - - The ISession is sometimes flushed before query execution in order to - ensure that queries never return stale state. This is the default flush mode. - - - - - The is flushed before every query. This is - almost always unnecessary and inefficient. - - - - - Provides XML marshalling for classes registered with a SessionFactory - - - - Hibernate defines a generic XML format that may be used to represent any class - (hibernate-generic.dtd). The user configures an XSLT stylesheet for marshalling - data from this generic format to an application and/or user readable format. By default, - Hibernate will use hibernate-default.xslt which maps data to a useful human- - readable format. - - - The property xml.output_stylesheet specifies a user-written stylesheet. - Hibernate will attempt to load the stylesheet from the classpath first and if not found, - will attempt to load it as a file - - - It is not intended that implementors be threadsafe - - - - - - Add an object to the output document. - - A transient or persistent instance - Databinder - - - - Add a collection of objects to the output document - - A collection of transient or persistent instance - Databinder - - - - Output the generic XML representation of the bound objects - - Generic Xml representation - - - - Output the generic XML Representation of the bound objects - to a XmlDocument - - A generic Xml tree - - - - Output the custom XML representation of the bound objects - - Custom Xml representation - - - - Output the custom XML representation of the bound objects as - an XmlDocument - - A custom Xml Tree - - - - Controls whether bound objects (and their associated objects) that are lazily instanciated - are explicityl initialized or left as they are - - True to explicitly initilize lazy objects, false to leave them in the state they are in - - - - Performs a null safe comparison using "==" instead of Object.Equals() - - First object to compare. - Second object to compare. - - true if x is the same instance as y or if both are null references; otherwise, false. - - - This is Lazy collection safe since it uses , - unlike Object.Equals() which currently causes NHibernate to load up the collection. - This behaivior of Collections is likely to change because Java's collections override Equals() and - .net's collections don't. So in .net there is no need to override Equals() and - GetHashCode() on the NHibernate Collection implementations. - - - - - Thrown if Hibernate can't instantiate an entity or component class at runtime. - - - - - Initializes a new instance of the class. - - The message that describes the error. - - The exception that is the cause of the current exception. If the innerException parameter - is not a null reference, the current exception is raised in a catch block that handles - the inner exception. - - The that NHibernate was trying to instantiate. - - - - Initializes a new instance of the class - with serialized data. - - - The that holds the serialized object - data about the exception being thrown. - - - The that contains contextual information about the source or destination. - - - - - Sets the serialization info for after - getting the info from the base Exception. - - - The that holds the serialized object - data about the exception being thrown. - - - The that contains contextual information about the source or destination. - - - - - Gets the that NHibernate was trying to instantiate. - - - - - Gets a message that describes the current . - - - The error message that explains the reason for this exception and the Type that - was trying to be instantiated. - - - - - Thrown when an invalid type is specified as a proxy for a class. - The exception is also thrown when a class is specified as lazy, - but cannot be used as a proxy for itself. - - - - - A problem occurred trying to lazily initialize a collection or proxy (for example the session - was closed) or iterate query results. - - - - - Initializes a new instance of the class. - - The name of the entity where the exception was thrown - The id of the entity where the exception was thrown - The message that describes the error. - - - - Initializes a new instance of the class. - - The message that describes the error. - - - - Initializes a new instance of the class. - - - The exception that is the cause of the current exception. If the innerException parameter - is not a null reference, the current exception is raised in a catch block that handles - the inner exception. - - - - - Initializes a new instance of the class. - - The message that describes the error. - - The exception that is the cause of the current exception. If the innerException parameter - is not a null reference, the current exception is raised in a catch block that handles - the inner exception. - - - - - Initializes a new instance of the class - with serialized data. - - - The that holds the serialized object - data about the exception being thrown. - - - The that contains contextual information about the source or destination. - - - - - Instances represent a lock mode for a row of a relational database table. - - - It is not intended that users spend much time worrying about locking since Hibernate - usually obtains exactly the right lock level automatically. Some "advanced" users may - wish to explicitly specify lock levels. - - - - - - - - - - - - - - - Is this lock mode more restrictive than the given lock mode? - - - - - - Is this lock mode less restrictive than the given lock mode? - - - - - - No lock required. - - - If an object is requested with this lock mode, a Read lock - might be obtained if necessary. - - - - - A shared lock. - - - Objects are loaded in Read mode by default - - - - - An upgrade lock. - - - Objects loaded in this lock mode are materialized using an - SQL SELECT ... FOR UPDATE - - - - - Attempt to obtain an upgrade lock, using an Oracle-style - SELECT ... FOR UPGRADE NOWAIT. - - - The semantics of this lock mode, once obtained, are the same as Upgrade - - - - - A Write lock is obtained when an object is updated or inserted. - - - This is not a valid mode for Load() or Lock(). - - - - - Similar to except that, for versioned entities, - it results in a forced version increment. - - - - - Provides access to the full range of NHibernate built-in types. - IType instances may be used to bind values to query parameters. - Also a factory for new Blobs and Clobs. - - - - - Guesses the IType of this object - - The obj. - - - - - Guesses the IType by the type - - The type. - - - - - NHibernate Ansi String type - - - - - NHibernate binary type - - - - - NHibernate binary blob type - - - - - NHibernate boolean type - - - - - NHibernate byte type - - - - - NHibernate character type - - - - - NHibernate Culture Info type - - - - - NHibernate date type - - - - - NHibernate date type - - - - - NHibernate date type - - - - - NHibernate date type - - - - - NHibernate decimal type - - - - - NHibernate double type - - - - - NHibernate Currency type (System.Decimal - DbType.Currency) - - - - - NHibernate Guid type. - - - - - NHibernate System.Int16 (short in C#) type - - - - - NHibernate System.Int32 (int in C#) type - - - - - NHibernate System.Int64 (long in C#) type - - - - - NHibernate System.SByte type - - - - - NHibernate System.UInt16 (ushort in C#) type - - - - - NHibernate System.UInt32 (uint in C#) type - - - - - NHibernate System.UInt64 (ulong in C#) type - - - - - NHibernate System.Single (float in C#) Type - - - - - NHibernate String type - - - - - NHibernate string clob type - - - - - NHibernate Time type - - - - - NHibernate Ticks type - - - - - NHibernate Ticks type - - - - - NHibernate Ticks type - - - - - NHibernate Timestamp type - - - - - NHibernate TrueFalse type - - - - - NHibernate YesNo type - - - - - NHibernate class type - - - - - NHibernate class meta type for association of kind any. - - - - - - NHibernate serializable type - - - - - NHibernate System.Object type - - - - - A NHibernate persistent enum type - - - - - - - A NHibernate serializable type - - - - - - - A NHibernate serializable type - - a type mapping to a single column - the entity identifier type - - - - - A NHibernate persistent object (entity) type - - a mapped entity class - - - - - A NHibernate persistent object (entity) type - - a mapped entity class - - - - A Hibernate persistent object (entity) type. - a mapped entity class - - - - A NHibernate custom type - - a class that implements UserType - - - - - Force initialization of a proxy or persistent collection. - - a persistable object, proxy, persistent collection or null - if we can't initialize the proxy at this time, eg. the Session was closed - - - - Is the proxy or persistent collection initialized? - - a persistable object, proxy, persistent collection or null - true if the argument is already initialized, or is not a proxy or collection - - - - Get the true, underlying class of a proxied persistent class. This operation - will initialize a proxy by side-effect. - - a persistable object or proxy - the true class of the instance - - - - Close an obtained from an - returned by NHibernate immediately, instead of waiting until the session is - closed or disconnected. - - - - - Close an returned by NHibernate immediately, - instead of waiting until the session is closed or disconnected. - - - - - Check if the property is initialized. If the named property does not exist - or is not persistent, this method always returns true. - - The potential proxy - the name of a persistent attribute of the object - - true if the named property of the object is not listed as uninitialized; - false if the object is an uninitialized proxy, or the named property is uninitialized - - - - - This exception is thrown when an operation would - break session-scoped identity. This occurs if the - user tries to associate two different instances of - the same class with a particular identifier, - in the scope of a single . - - - - - Initializes a new instance of the class. - - The message that describes the error. - The identifier of the object that caused the exception. - The EntityName of the object attempted to be loaded. - - - - Initializes a new instance of the class. - - The identifier of the object that caused the exception. - The EntityName of the object attempted to be loaded. - - - - Initializes a new instance of the class. - - - - - Sets the serialization info for after - getting the info from the base Exception. - - - The that holds the serialized object - data about the exception being thrown. - - - The that contains contextual information about the source or destination. - - - - - Thrown when the application calls IQuery.UniqueResult() - and the query returned more than one result. Unlike all other NHibernate - exceptions, this one is recoverable! - - - - - Initializes a new instance of the class. - - The number of items in the result. - - - - Initializes a new instance of the class - with serialized data. - - - The that holds the serialized object - data about the exception being thrown. - - - The that contains contextual information about the source or destination. - - - - - Thrown when the user tries to pass a deleted object to the ISession. - - - - - Thrown when Hibernate could not resolve an object by id, especially when - loading an association. - - - - - Initializes a new instance of the class. - - The identifier of the object that caused the exception. - The of the object attempted to be loaded. - - - - Initializes a new instance of the class. - - The message that describes the error. - The identifier of the object that caused the exception. - The of the object attempted to be loaded. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with serialized data. - - - The that holds the serialized object - data about the exception being thrown. - - - The that contains contextual information about the source or destination. - - - - - Thrown when ISession.Load() fails to select a row with - the given primary key (identifier value). This exception might not - be thrown when Load() is called, even if there was no - row on the database, because Load() returns a proxy if - possible. Applications should use ISession.Get() to test if - a row exists in the database. - - - - - Initializes a new instance of the class. - - The identifier of the object that was attempting to be loaded. - The that NHibernate was trying to find a row for in the database. - - - - Initializes a new instance of the class - with serialized data. - - - The that holds the serialized object - data about the exception being thrown. - - - The that contains contextual information about the source or destination. - - - - - Thrown when the user passes a persistent instance to a ISession method that expects a - transient instance - - - - - Initializes a new instance of the class. - - The message that describes the error. - - - - Initializes a new instance of the class - with serialized data. - - - The that holds the serialized object - data about the exception being thrown. - - - The that contains contextual information about the source or destination. - - - - - A problem occurred accessing a property of an instance of a persistent class by reflection - - - - - Initializes a new instance of the class. - - The message that describes the error. - - The exception that is the cause of the current exception. If the innerException parameter - is not a null reference, the current exception is raised in a catch block that handles - the inner exception. - - A indicating if this was a "setter" operation. - The that NHibernate was trying find the Property or Field in. - The mapped property name that was trying to be accessed. - - - - Initializes a new instance of the class - with serialized data. - - - The that holds the serialized object - data about the exception being thrown. - - - The that contains contextual information about the source or destination. - - - - - Sets the serialization info for after - getting the info from the base Exception. - - - The that holds the serialized object - data about the exception being thrown. - - - The that contains contextual information about the source or destination. - - - - - Gets the that NHibernate was trying find the Property or Field in. - - - - - Gets a message that describes the current . - - - The error message that explains the reason for this exception and - information about the mapped property and its usage. - - - - - Indicates that an expected getter or setter method could not be found on a class - - - - - Initializes a new instance of the class, - used when a property get/set accessor is missing. - - The that is missing the property - The name of the missing property - The type of the missing accessor - ("getter" or "setter") - - - - Initializes a new instance of the class, - used when a field is missing. - - The that is missing the field - The name of the missing property - - - - Initializes a new instance of the class - with serialized data. - - - The that holds the serialized object - data about the exception being thrown. - - - The that contains contextual information about the source or destination. - - - - - Initializes a new instance of the class. - - The message that describes the error. - The that NHibernate was trying to access. - The name of the Property that was being get/set. - - - - Initializes a new instance of the class - with serialized data. - - - The that holds the serialized object - data about the exception being thrown. - - - The that contains contextual information about the source or destination. - - - - - Sets the serialization info for after - getting the info from the base Exception. - - - The that holds the serialized object - data about the exception being thrown. - - - The that contains contextual information about the source or destination. - - - - - Represents a replication strategy. - - - - - - Throw an exception when a row already exists - - - - - Ignore replicated entities when a row already exists - - - - - When a row already exists, choose the latest version - - - - - Overwrite existing rows when a row already exists - - - - - Thrown when a version number check failed, indicating that the - contained stale data (when using long transactions with - versioning). - - - - - Initializes a new instance of the class. - - The EntityName that NHibernate was trying to update in the database. - The identifier of the object that is stale. - - - - Initializes a new instance of the class - with serialized data. - - - The that holds the serialized object - data about the exception being thrown. - - - The that contains contextual information about the source or destination. - - - - - Sets the serialization info for after - getting the info from the base Exception. - - - The that holds the serialized object - data about the exception being thrown. - - - The that contains contextual information about the source or destination. - - - - - Gets the EntityName that NHibernate was trying to update in the database. - - - - - Gets the identifier of the object that is stale. - - - - - Gets a message that describes the current . - - The error message that explains the reason for this exception. - - - - Indicated that a transaction could not be begun, committed, or rolled back - - - - - Initializes a new instance of the class. - - The message that describes the error. - - - - Initializes a new instance of the class. - - The message that describes the error. - - The exception that is the cause of the current exception. If the innerException parameter - is not a null reference, the current exception is raised in a catch block that handles - the inner exception. - - - - - Initializes a new instance of the class - with serialized data. - - - The that holds the serialized object - data about the exception being thrown. - - - The that contains contextual information about the source or destination. - - - - - Throw when the user passes a transient instance to a ISession method that expects - a persistent instance - - - - - Initializes a new instance of the class. - - The message that describes the error. - - - - Initializes a new instance of the class - with serialized data. - - - The that holds the serialized object - data about the exception being thrown. - - - The that contains contextual information about the source or destination. - - - - - Used when a user provided type does not match the expected one - - - - - Thrown when ISession.Load() selects a row with the given primary key (identifier value) - but the row's discriminator value specifies a different subclass from the one requested - - - - - Initializes a new instance of the class. - - The message that describes the error. - The identifier of the object that was being loaded. - The name of entity that NHibernate was told to load. - - - - Initializes a new instance of the class - with serialized data. - - - The that holds the serialized object - data about the exception being thrown. - - - The that contains contextual information about the source or destination. - - - - - Sets the serialization info for after - getting the info from the base Exception. - - - The that holds the serialized object - data about the exception being thrown. - - - The that contains contextual information about the source or destination. - - - - - Gets the identifier of the object that was being loaded. - - - - - Gets the name of entity that NHibernate was told to load. - - - - - Gets a message that describes the current . - - The error message that explains the reason for this exception. - -
-
+ + + + NHibernate + + + + + Implementation of BulkOperationCleanupAction. + + + + + An operation which may be scheduled for later execution. + Usually, the operation is a database insert/update/delete, + together with required second-level cache management. + + + + Called before executing any actions + + + Execute this action + + + + Do we need to retain this instance until after the transaction completes? + + + False if this class defines a no-op has after transaction completion. + + + + Called after the transaction completes + + + + What spaces (tables) are affected by this action? + + + + + Create an action that will evict collection and entity regions based on queryspaces (table names). + + + + + Any action relating to insert/update/delete of a collection + + + + + Initializes a new instance of . + + The that is responsible for the persisting the Collection. + The Persistent collection. + The identifier of the Collection. + The that the Action is occurring in. + + + Called before executing any actions + + + Execute this action + + + + Do we need to retain this instance until after the transaction completes? + + + False if this class defines a no-op has after transaction completion. + + + + Called after the transaction completes + + + + Compares the current object with another object of the same type. + + + A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has the following meanings: Value Meaning Less than zero This object is less than the other parameter.Zero This object is equal to other. Greater than zero This object is greater than other. + + An object to compare with this object. + + + + What spaces (tables) are affected by this action? + + + + Execute this action + + This method is called when a new non-null collection is persisted + or when an existing (non-null) collection is moved to a new owner + + + + + Removes a persistent collection from its loaded owner. + + The collection to to remove; must be non-null + The collection's persister + The collection key + Indicates if the snapshot is empty + The session + Use this constructor when the collection is non-null. + + + + Removes a persistent collection from a specified owner. + + The collection's owner; must be non-null + The collection's persister + The collection key + Indicates if the snapshot is empty + The session + Use this constructor when the collection to be removed has not been loaded. + + + + Acts as a stand-in for an entity identifier which is supposed to be + generated on insert (like an IDENTITY column) where the insert needed to + be delayed because we were outside a transaction when the persist + occurred (save currently still performs the insert). + + The stand-in is only used within the see cref="NHibernate.Engine.PersistenceContext" + in order to distinguish one instance from another; it is never injected into + the entity instance or returned to the client... + + + + + Base class for actions relating to insert/update/delete of an entity + instance. + + + + + Instantiate an action. + + The session from which this action is coming. + The id of the entity + The entity instance + The entity persister + + + + Entity name accessor + + + + + Entity Id accessor + + + + + Entity Instance + + + + + Session from which this action originated + + + + + The entity persister. + + + + Format an SQL statement using simple rules: + a) Insert newline after each comma; + b) Indent three spaces after each inserted newline; + If the statement contains single/double quotes return unchanged, + it is too complex and could be broken by simple formatting. + + + + Represents the the understood types or styles of formatting. + + + Centralize logging handling for SQL statements. + + + Constructs a new SqlStatementLogger instance. + + + Constructs a new SqlStatementLogger instance. + Should we log to STDOUT in addition to our internal logger. + Should we format SQL ('prettify') prior to logging. + + + Log a IDbCommand. + Title + The SQL statement. + The requested formatting style. + + + Log a IDbCommand. + The SQL statement. + The requested formatting style. + + + + Manages prepared statements and batching. Class exists to enforce separation of concerns + + + + + Manages s and s + for an . + + +

+ Abstracts ADO.NET batching to maintain the illusion that a single logical batch + exists for the whole session, even when batching is disabled. + Provides transparent IDbCommand caching. +

+

+ This will be useful once ADO.NET gets support for batching. Until that point + no code exists that will do batching, but this will provide a good point to do + error checking and making sure the correct number of rows were affected. +

+
+
+ + + Get an for using in loading / querying. + + The to convert to an . + The of the command. + The SqlTypes of parameters + in . + + An that is ready to be executed. + + + + If not explicitly released by , it will be + released when the session is closed or disconnected. + + + This does NOT add anything to the batch - it only creates the IDbCommand and + does NOT cause the batch to execute... + + + + + + Get a non-batchable an to use for inserting / deleting / updating. + Must be explicitly released by CloseCommand() + + The to convert to an . + The of the command. + The SqlTypes of parameters + in . + + An that is ready to have the parameter values set + and then executed. + + + + + Close a opened using PrepareCommand() + + The to ensure is closed. + The to ensure is closed. + + + + Close a opened using + + The to ensure is closed. + + + + Get a batchable to use for inserting / deleting / updating + (might be called many times before a single call to ExecuteBatch() + + + After setting parameters, call AddToBatch() - do not execute the statement + explicitly. + + The to convert to an . + The of the command. + The SqlTypes of parameters + in . + + + + + Add an insert / delete / update to the current batch (might be called multiple times + for a single PrepareBatchStatement()) + + Determines whether the number of rows affected by query is correct. + + + + Execute the batch + + + + + Close any query statements that were left lying around + + + Use this method instead of Dispose if the + can be used again. + + + + + Gets an by calling ExecuteReader on the . + + The to execute to get the . + The from the . + + The Batcher is responsible for ensuring that all of the Drivers rules for how many open + s it can have are followed. + + + + + Executes the . + + The to execute. + The number of rows affected. + + The Batcher is responsible for ensuring that all of the Drivers rules for how many open + s it can have are followed. + + + + + Must be called when an exception occurs. + + + + + + Cancel the current query statement + + + + + Gets the value indicating whether there are any open resources + managed by this batcher (IDbCommands or IDataReaders). + + + + + Gets or sets the size of the batch, this can change dynamically by + calling the session's SetBatchSize. + + The size of the batch. + + + + Initializes a new instance of the class. + + The owning this batcher. + + + + + Prepares the for execution in the database. + + + This takes care of hooking the up to an + and if one exists. It will call Prepare if the Driver + supports preparing commands. + + + + + Ensures that the Driver's rules for Multiple Open DataReaders are being followed. + + + + + + + + + + + + + + Adds the expected row count into the batch. + + The number of rows expected to be affected by the query. + + If Batching is not supported, then this is when the Command should be executed. If Batching + is supported then it should hold of on executing the batch until explicitly told to. + + + + + A flag to indicate if Dispose() has been called. + + + + + Finalizer that ensures the object is correctly disposed of. + + + + + Takes care of freeing the managed and unmanaged resources that + this class is responsible for. + + + + + Takes care of freeing the managed and unmanaged resources that + this class is responsible for. + + Indicates if this BatcherImpl is being Disposed of or Finalized. + + If this BatcherImpl is being Finalized (isDisposing==false) then make sure not + to call any methods that could potentially bring this BatcherImpl back to life. + + + + + Gets the current that is contained for this Batch + + The current . + + + + Gets or sets the size of the batch, this can change dynamically by + calling the session's SetBatchSize. + + The size of the batch. + + + + Gets the the Batcher was + created in. + + + The the Batcher was + created in. + + + + + Gets the for this batcher. + + + + Implementation of ColumnNameCache. + + + + Manages the database connection and transaction for an . + + + This class corresponds to ConnectionManager and JDBCContext in Hibernate, + combined. + + + + The batcher managed by this ConnectionManager. + + + + Expected row count. Valid only for batchable expectations. + + + + Factory for instances. + + + + Provide the class of according to the configuration + and the capabilities of the driver. + + + By default, .Net doesn't have any batching capabilities, drivers that does have + batching support. + The BatcherFactory trough session-factory configuration section. + This interface was added in NHibernate for backdraw compatibility to have the ability + to specify a default for a specific . + + + + + An implementation of the + interface that does no batching. + + + + + Initializes a new instance of the class. + + The for this batcher. + + + + + Executes the current and compares the row Count + to the expectedRowCount. + + + The expected number of rows affected by the query. A value of less than 0 + indicates that the number of rows to expect is unknown or should not be a factor. + + + Thrown when there is an expected number of rows to be affected and the + actual number of rows is different. + + + + + This Batcher implementation does not support batching so this is a no-op call. The + actual execution of the is run in the AddToBatch + method. + + + + + + A BatcherFactory implementation which constructs Batcher instances + that do not perform batch operations. + + + + + Summary description for OracleDataClientBatchingBatcher. + By Tomer Avissar + + + + + A ResultSet delegate, responsible for locally caching the columnName-to-columnIndex + resolution that has been found to be inefficient in a few vendor's drivers (i.e., Oracle + and Postgres). + + + + + + Summary description for SqlClientBatchingBatcher. + + + + + Expose the batch functionality in ADO.Net 2.0 + Microsoft in its wisdom decided to make my life hard and mark it internal. + Through the use of Reflection and some delegates magic, I opened up the functionality. + + Observable performance benefits are 50%+ when used, so it is really worth it. + + + + + Append a command to the batch + + + + + + This is required because SqlClient.SqlCommandSet will throw if + the command has no parameters. + + + + + + Executes the batch + + + This seems to be returning the total number of affected rows in all queries + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + 2 + + + + Return the batch command to be executed + + + + + The number of commands batched in this instance + + + + + Any exception that occurs in the O-R persistence layer. + + + Exceptions that occur in the database layer are left as native exceptions. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message that describes the error. + + + + Initializes a new instance of the class. + + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class. + + The message that describes the error. + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + CodeDOM-based bytecode provider. + + + + + Retrieve the delegate for this provider + capable of generating reflection optimization components. + + The class to be reflected upon. + All property getters to be accessed via reflection. + All property setters to be accessed via reflection. + The reflection optimization delegate. + + + + The specific factory for this provider capable of + generating run-time proxies for lazy-loading purposes. + + + + + NHibernate's object instaciator. + + + For entities and its implementations. + + + + + Instanciator of NHibernate's collections default types. + + + + + ctor + + The target class + Array of setters + Array of getters + + + + Set up the compiler options + + + + + Add an assembly to the list of ReferencedAssemblies + required to build the class + + + + + + Build the generated code + + Generated code + An instance of the generated class + + + + Check if the property is public + + + If IsPublic==true I can directly set the property + If IsPublic==false I need to use the setter/getter + + + + + + + Generate the required code + + C# code + + + + Represents optimized entity property access. + + + + + Factory that generate object based on IReflectionOptimizer needed to replace the use + of reflection. + + + Used in and + + + + + + Generate the IReflectionOptimizer object + + The target class + Array of setters + Array of getters + if the generation fails + + + + Represents reflection optimization for a particular class. + + + + + Represents optimized entity instantiation. + + + + + Perform instantiation of an instance of the underlying class. + + The new instance. + + + + Class constructor. + + + + + Generates a dynamic method which creates a new instance of + when invoked. + + + + + Generates a dynamic method on the given type. + + + + + Generates a dynamic method on the given type. + + + + + + Interface for instanciate all NHibernate objects. + + + + + Creates an instance of the specified type. + + The type of object to create. + A reference to the created object. + + + + Creates an instance of the specified type. + + The type of object to create. + true if a public or nonpublic default constructor can match; false if only a public default constructor can match. + A reference to the created object. + + + + Creates an instance of the specified type using the constructor + that best matches the specified parameters. + + The type of object to create. + An array of constructor arguments. + A reference to the created object. + + + + Emits an ldc.i4 opcode using the fastest available opcode choice. + + + + + Emits IL to unbox a value type and if null, create a new instance of the value type. + + + This does not work if the value type doesn't have a default constructor - we delegate + that to the ISetter. + + + + + Defines a new delegate type. + + + + + Type factory for collections types. + + + + + Creates a new for an . + + The role the collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + The to use to create the array. + Is embedded in XML (not supported yet) + + An for the specified role. + + + + + Creates a new for an + with bag semantics. + + The role the collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + Is embedded in XML (not supported yet) + + A for the specified role. + + + + + Creates a new for an + with bag semantics. + + The type of elements in the list. + The role the collection is in. + + The name of the property in the owner object containing the collection ID, + or if it is the primary key. + + Is embedded in XML (not supported yet) + + A for the specified role. + + + + + Creates a new for an . + + The role the collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + Is embedded in XML (not supported yet) + + A for the specified role. + + + + + Creates a new for an + with list + semantics. + + The type of elements in the list. + The role the collection is in. + + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + + Is embedded in XML (not supported yet) + + A for the specified role. + + + + + Creates a new for an + with id-bag semantics. + + The role the collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + Is embedded in XML (not supported yet) + + A for the specified role. + + + + + Creates a new for an + with identifier + bag semantics. + + The type of elements in the list. + The role the collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + + Is embedded in XML (not supported yet) + + A for the specified role. + + + + + Creates a new for an . + + The role the collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + Is embedded in XML (not supported yet) + + A for the specified role. + + + + + Creates a new for an + that is sorted by an . + + The role the collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + The that does the sorting. + Is embedded in XML (not supported yet) + + A for the specified role. + + + + + Creates a new for an . + + The type of elements in the collection. + The role the collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + Is embedded in XML (not supported yet) + A for the specified role. + + + + Creates a new for a sorted . + + The type of elements in the collection. + The role the collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + Is embedded in XML (not supported yet) + The to use for the set. + A for the specified role. + + + + Creates a new for an ordered . + + The type of elements in the collection. + The role the collection is in. + + The name of the property in the owner object containing the collection ID, + or if it is the primary key. + + Is embedded in XML (not supported yet) + A for the specified role. + + + + Creates a new for an . + + The role the collection is in. + + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + Is embedded in XML (not supported yet) + + A for the specified role. + + + + + Creates a new for an + that maintains insertion order of elements. + + The role the collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + Is embedded in XML (not supported yet) + + A for the specified role. + + + + + Creates a new for an + that is sorted by an . + + The role the collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + The that does the sorting. + Is embedded in XML (not supported yet) + + A for the specified role. + + + + + Creates a new for an + . + + The type of keys in the dictionary. + The type of values in the dictionary. + The role the collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + + Is embedded in XML (not supported yet) + + A for the specified role. + + + + + An interface for factories of proxy factory instances. + + + Used to abstract from the tupizer. + + + + + Build a proxy factory specifically for handling runtime + lazy loading. + + The lazy-load proxy factory. + + + + A implementation that returns + , disabling reflection optimization. + + + + + A cached instance of a persistent class + + + + + An item of cached data, timestamped with the time it was cached, when it was locked, + when it was unlocked + + + + + Caches data that is sometimes updated while maintaining the semantics of + "read committed" isolation level. If the database is set to "repeatable + read", this concurrency strategy almost maintains the semantics. + Repeatable read isolation is compromised in the case of concurrent writes. + This is an "asynchronous" concurrency strategy. + + + If this strategy is used in a cluster, the underlying cache implementation + must support distributed hard locks (which are held only momentarily). This + strategy also assumes that the underlying cache implementation does not do + asynchronous replication and that state has been fully replicated as soon + as the lock is released. + for a faster algorithm + + + + + + Implementors manage transactional access to cached data. + + + + Transactions pass in a timestamp indicating transaction start time. + + + When used to cache entities and collections the key is the identifier of the + entity/collection and the value should be set to the + for an entity and the results of + for a collection. + + + + + + Attempt to retrieve an object from the Cache + + The key (id) of the object to get out of the Cache. + A timestamp prior to the transaction start time + The cached object or + + + + + Attempt to cache an object, after loading from the database + + The key (id) of the object to put in the Cache. + The value + A timestamp prior to the transaction start time + the version number of the object we are putting + a Comparer to be used to compare version numbers + indicates that the cache should avoid a put if the item is already cached + if the object was successfully cached + + + + + We are going to attempt to update/delete the keyed object + + The key + + + This method is used by "asynchronous" concurrency strategies. + + + + Called after an item has become stale (before the transaction completes). + + + + This method is used by "synchronous" concurrency strategies. + + + + Called after an item has been updated (before the transaction completes), + instead of calling Evict(). + + + + + + This method is used by "synchronous" concurrency strategies. + + + + Called after an item has been inserted (before the transaction completes), instead of calling Evict(). + + + + + This method is used by "synchronous" concurrency strategies. + + + + Called when we have finished the attempted update/delete (which may or + may not have been successful), after transaction completion. + + The key + The soft lock + + This method is used by "asynchronous" concurrency strategies. + + + + Called after an item has been updated (after the transaction completes), + instead of calling Release(). + + + + + + This method is used by "asynchronous" concurrency strategies. + + + + Called after an item has been inserted (after the transaction completes), instead of calling release(). + + + + + This method is used by "asynchronous" concurrency strategies. + + + + Evict an item from the cache immediately (without regard for transaction isolation). + + + + + + + Evict all items from the cache immediately. + + + + + + Clean up all resources. + + + + + + Gets the cache region name. + + + + + Gets or sets the for this strategy to use. + + The for this strategy to use. + + + + Generate an id for a new lock. Uniqueness per cache instance is very + desirable but not absolutely critical. Must be called from one of the + synchronized methods of this class. + + + + + + Do not return an item whose timestamp is later than the current + transaction timestamp. (Otherwise we might compromise repeatable + read unnecessarily.) Do not return an item which is soft-locked. + Always go straight to the database instead. + + + Note that since reading an item from that cache does not actually + go to the database, it is possible to see a kind of phantom read + due to the underlying row being updated after we have read it + from the cache. This would not be possible in a lock-based + implementation of repeatable read isolation. It is also possible + to overwrite changes made and committed by another transaction + after the current transaction read the item from the cache. This + problem would be caught by the update-time version-checking, if + the data is versioned or timestamped. + + + + + Stop any other transactions reading or writing this item to/from + the cache. Send them straight to the database instead. (The lock + does time out eventually.) This implementation tracks concurrent + locks by transactions which simultaneously attempt to write to an + item. + + + + + Do not add an item to the cache unless the current transaction + timestamp is later than the timestamp at which the item was + invalidated. (Otherwise, a stale item might be re-added if the + database is operating in repeatable read isolation mode.) + + Whether the item was actually put into the cache + + + + decrement a lock and put it back in the cache + + + + + Re-cache the updated state, if and only if there there are + no other concurrent soft locks. Release our lock. + + + + + Is the client's lock commensurate with the item in the cache? + If it is not, we know that the cache expired the original + lock. + + + + + Gets the cache region name. + + + + + Lock the item + + + + + Is this item visible to the timestamped transaction? + + + + + + + Don't overwrite already cached items + + + + + + + + + The timestamp on the cached data + + + + + The actual cached data + + + + + Not a lock! + + + + + Represents any exception from an . + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message that describes the error. + + + + Initializes a new instance of the class. + + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class. + + The message that describes the error. + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Factory class for creating an . + + + + + No providers implement transactional caching currently, + it was ported from Hibernate just for the sake of completeness. + + + + + Creates an from the parameters. + + The name of the strategy that should use for the class. + The name of the class the strategy is being created for. + if the object being stored in the cache is mutable. + Used to retrieve the global cache region prefix. + Properties the cache provider can use to configure the cache. + An to use for this object in the . + + + + Allows multiple entity classes / collection roles to be + stored in the same cache region. Also allows for composite + keys which do not properly implement equals()/hashCode(). + + + + + Construct a new key for a collection or entity instance. + Note that an entity name should always be the root entity + name, not a subclass entity name. + + The identifier associated with the cached data + The Hibernate type mapping + The entity or collection-role name. + The entiyt mode of the originating session + The session factory for which we are caching + + + + A soft lock which supports concurrent locking, + timestamped with the time it was released + + + This class was named Lock in H2.1 + + + + + Marker interface, denoting a client-visible "soft lock" on a cached item. + + + + + Increment the lock, setting the + new lock timeout + + + + + Decrement the lock, setting the unlock + timestamp if now unlocked + + + + + + Can the timestamped transaction re-cache this + locked item now? + + + + + locks are not returned to the client! + + + + + Was this lock held concurrently by multiple + transactions? + + + + + Yes, this is a lock + + + + + Used by + + + + + Implementors define a caching algorithm. + + + + + All implementations must be threadsafe. + + + The key is the identifier of the object that is being cached and the + value is a . + + + + + + Get the object from the Cache + + + + + + + + + + + + + + Remove an item from the Cache. + + The Key of the Item in the Cache to remove. + + + + + Clear the Cache + + + + + + Clean up. + + + + + + If this is a clustered cache, lock the item + + The Key of the Item in the Cache to lock. + + + + + If this is a clustered cache, unlock the item + + The Key of the Item in the Cache to unlock. + + + + + Generate a timestamp + + + + + + Get a reasonable "lock timeout" + + + + + Gets the name of the cache region + + + + + A simple -based cache + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Cache Provider plugin for NHibernate that is configured by using + cache.provider_class="NHibernate.Cache.HashtableCacheProvider" + + + + + Support for pluggable caches + + + + + Configure the cache + + the name of the cache region + configuration settings + + + + + generate a timestamp + + + + + + Callback to perform any necessary initialization of the underlying cache implementation + during ISessionFactory construction. + + current configuration settings + + + + Callback to perform any necessary cleanup of the underlying cache implementation + during . + + + + + Contract for sources of optimistically lockable data sent to the second level cache. + + + Note currently EntityPersisters are + the only viable source. + + + + + Does this source represent versioned (i.e., and thus optimistically lockable) data? + + True if this source represents versioned data; false otherwise. + + + Get the comparator used to compare two different version values together. + An appropriate comparator. + + + + Defines the contract for caches capable of storing query results. These + caches should only concern themselves with storing the matching result ids. + The transactional semantics are necessarily less strict than the semantics + of an item cache. + + + + + Defines a factory for query cache instances. These factories are responsible for + creating individual QueryCache instances. + + + + + A cache provider placeholder used when caching is disabled. + + + + + Configure the cache + + the name of the cache region + configuration settings + + + + + Generate a timestamp + + + + + Callback to perform any necessary initialization of the underlying cache implementation during SessionFactory + construction. + + current configuration settings. + + + + Callback to perform any necessary cleanup of the underlying cache implementation during SessionFactory.close(). + + + + + Caches data that is sometimes updated without ever locking the cache. + If concurrent access to an item is possible, this concurrency strategy + makes no guarantee that the item returned from the cache is the latest + version available in the database. Configure your cache timeout accordingly! + This is an "asynchronous" concurrency strategy. + for a much stricter algorithm + + + + + Get the most recent version, if available. + + + + + Add an item to the cache + + + + + Do nothing + + + + + Invalidate the item + + + + + Invalidate the item + + + + + Do nothing + + + + + Invalidate the item (again, for safety). + + + + + Invalidate the item (again, for safety). + + + + + Do nothing + + + + + Gets the cache region name. + + + + + Initializes a new instance of the class. + + the session factory for this query key, required to get the identifiers of entities that are used as values. + The query string. + The query parameters. + The filters. + + + + Caches data that is never updated + + + + + Unsupported! + + + + + Unsupported! + + + + + Unsupported! + + + + + Do nothing. + + + + + Do nothing. + + + + + Do nothing. + + + + + Unsupported! + + + + + Gets the cache region name. + + + + + The standard implementation of the Hibernate + interface. This implementation is very good at recognizing stale query + results and re-running queries when it detects this condition, recaching + the new results. + + + + + Standard Hibernate implementation of the IQueryCacheFactory interface. Returns + instances of . + + + + + Generates increasing identifiers (in a single application domain only). + + + Not valid across multiple application domains. Identifiers are not necessarily + strictly increasing, but usually are. + + + + + + + + + + + + + + Tracks the timestamps of the most recent updates to particular tables. It is + important that the cache timeout of the underlying cache implementation be set + to a higher value than the timeouts of any of the query caches. In fact, we + recommend that the the underlying cache not be configured for expiry at all. + Note, in particular, that an LRU cache expiry policy is never appropriate. + + + + + + + + Helper to parse hibernate-configuration XmlNode. + + + + + The XML node name for hibernate configuration section in the App.config/Web.config and + for the hibernate.cfg.xml . + + + + The XML Namespace for the nhibernate-configuration + + + XPath expression for bytecode-provider property. + + + XPath expression for reflection-optimizer property. + + + XPath expression for session-factory whole node. + + + XPath expression for session-factory.property nodes + + + XPath expression for session-factory.mapping nodes + + + XPath expression for session-factory.class-cache nodes + + + XPath expression for session-factory.collection-cache nodes + + + XPath expression for session-factory.event nodes + + + XPath expression for session-factory.listener nodes + + + + Convert a string to . + + The string that represent . + + The converted to . + for invalid values. + + + See for allowed values. + + + + + Convert a string to . + + The string that represent . + + The converted to . + + If the values is invalid. + + See for allowed values. + + + + + Convert a string to . + + The string that represent . + + The converted to . + + If the values is invalid. + + See for allowed values. + + + + + Convert a string to . + + The string that represent . + + The converted to . + + If the values is invalid. + + See for allowed values. + + + + + Values for class-cache and collection-cache strategy. + + + + Xml value: read-only + + + Xml value: read-write + + + Xml value: nonstrict-read-write + + + Xml value: transactional + + + + Values for class-cache include. + + Not implemented in Cache. + + + Xml value: all + + + Xml value: non-lazy + + + + Configuration parsed values for a class-cache XML node. + + + + + Initializes a new instance of the class. + + The class full name. + Cache strategy. + When is null or empty. + + + + Initializes a new instance of the class. + + The class full name. + Cache strategy. + Values for class-cache include. + When is null or empty. + + + + Initializes a new instance of the class. + + The class full name. + Cache strategy. + The cache region. + When is null or empty. + + + + Initializes a new instance of the class. + + The class full name. + Cache strategy. + Values for class-cache include. + The cache region. + When is null or empty. + + + + The class full name. + + + + + The cache region. + + If null or empty the is used during configuration. + + + + Cache strategy. + + + + + class-cache include. + + + Not implemented in Cache. + Default value . + + + + + Configuration parsed values for a collection-cache XML node. + + + + + Initializes a new instance of the class. + + The cache role. + Cache strategy. + When is null or empty. + + + + Initializes a new instance of the class. + + The cache role. + Cache strategy. + The cache region. + When is null or empty. + + + + The role. + + + + + The cache region. + + If null or empty the is used during configuration. + + + + Cache strategy. + + + + + Configuration parsed values for a event XML node. + + + + + Initializes a new instance of the class. + + The listener. + The type. + + + + The default type of listeners. + + + + + Listeners for this event. + + + + + Values for bytecode-provider system property. + + + + Xml value: codedom + + + Xml value: lcg + + + Xml value: null + + + + Configuration parsed values for hibernate-configuration section. + + + + + Initializes a new instance of the class. + + The XML reader to parse. + + The nhibernate-configuration.xsd is applied to the XML. + + When nhibernate-configuration.xsd can't be applied. + + + + Value for bytecode-provider system property. + + Default value . + + + + Value for reflection-optimizer system property. + + Default value true. + + + + The if the session-factory exists in hibernate-configuration; + Otherwise null. + + + + + Configuration parsed values for a listener XML node + + + + + Initializes a new instance of the class. + + The class full name. + When is null or empty. + + + + Initializes a new instance of the class. + + The class full name. + The listener type. + When is null or empty. + + + + The class full name. + + + + + The listener type. + + Default value mean that the value is ignored. + + + + Configuration parsed values for a mapping XML node + + + There are 3 possible combinations of mapping attributes + 1 - resource and assembly: NHibernate will read the mapping resource from the specified assembly + 2 - file only: NHibernate will read the mapping from the file. + 3 - assembly only: NHibernate will find all the resources ending in hbm.xml from the assembly. + + + + + Initializes a new instance of the class. + + Mapped file. + When is null or empty. + + + + Initializes a new instance of the class. + + The assembly name. + The mapped embedded resource. + When is null or empty. + + + + Configuration parsed values for a session-factory XML node. + + + + + Initializes a new instance of the class. + + The session factory name. Null or empty string are allowed. + + + + The session factory name. + + + + + Session factory propeties bag. + + + + + Session factory mapping configuration. + + + + + Session factory class-cache configurations. + + + + + Session factory collection-cache configurations. + + + + + Session factory event configurations. + + + + + Session factory listener configurations. + + + + + Responsible for checking that a resource name matches the default pattern of "*.hbm.xml". This is the + default filter for . + + + + + Responsible for determining whether an embedded resource should be parsed for HBM XML data while + iterating through an . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A base class for HBM schema classes that provides helper methods. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Responsible for converting a of HBM XML into an instance of + . + + + + + Responsible for building a list of objects from a range of acceptable + sources. + + + + + Calls the greedy constructor, passing it new instances of and + . + + + + Adds any embedded resource streams which pass the . + An assembly containing embedded mapping documents. + A custom filter. + + + Adds any embedded resource streams which pass the default filter. + An assembly containing embedded mapping documents. + + + + Responsible for converting a of HBM XML into an instance of + . + + Uses an to deserialize HBM. + + + + Converts a partial class name into a fully qualified one + + + + + + + + Converts a partial class name into a fully one + + + + The class FullName (without the assembly) + + The FullName is equivalent to the default entity-name + + + + + Attempts to find a type by its full name. Throws a + using the provided in case of failure. + + name of the class to find + Error message to use for + the in case of failure. Should contain + the {0} formatting placeholder. + A instance. + + Thrown when there is an error loading the class. + + + + + Similar to , but handles short class names + by calling . + + + + + + + + + Called for all collections. parameter + was added in NH to allow for reflection related to generic types. + + + + + Called for arrays and primitive arrays + + + + + Called for Maps + + + + + Called for all collections + + + + + Extracts the names of classes mapped in a given file, + and the names of the classes they extend. + + + + + Returns a collection of containing + information about all classes in this stream. + + A validated representing + a mapping file. + + + + Holds information about mapped classes found in the hbm.xml files. + + + + + Allows the application to specify properties and mapping documents to be used when creating + a . + + + + Usually an application will create a single , build a single instance + of , and then instantiate objects in threads + servicing client requests. + + + The is meant only as an initialization-time object. + is immutable and does not retain any association back to the + + + + + The XML Namespace for the nhibernate-mapping + + + Default name for hibernate configuration file. + + + + Clear the internal state of the object. + + + + + Create a new Configuration object. + + + + + Get the mapping for a particular class + + + + Get the mapping for a particular entity + An entity name. + the entity mapping information + + + + Get the mapping for a particular collection role + + a collection role + + + + + Read mappings from a particular XML file. This method is equivalent + to . + + + + + + + Read mappings from a particular XML file. + + a path to a file + This configuration object. + + + + Read mappings from a . This method is equivalent to + . + + an XML string + The name to use in error reporting. May be . + This configuration object. + + + + Read mappings from a . + + an XML string + This configuration object. + + + + Read mappings from a URL. + + a URL + This configuration object. + + + + Read mappings from a URL. + + a to read the mappings from. + This configuration object. + + + + Read mappings from an . + + A loaded that contains the mappings. + The name of the document, for error reporting purposes. + This configuration object. + + + + Takes the validated XmlDocument and has the Binder do its work of + creating Mapping objects from the Mapping Xml. + + The NamedXmlDocument that contains the validated mapping XML file. + + + + Create a new to add classes and collection + mappings to. + + + + + Read mappings from a . + + The stream containing XML + This Configuration object. + + The passed in through the parameter + is not guaranteed to be cleaned up by this method. It is the caller's responsiblity to + ensure that is properly handled when this method + completes. + + + + + Read mappings from a . + + The stream containing XML + The name of the stream to use in error reporting. May be . + This Configuration object. + + The passed in through the parameter + is not guaranteed to be cleaned up by this method. It is the caller's responsiblity to + ensure that is properly handled when this method + completes. + + + + + Adds the mappings in the resource of the assembly. + + The path to the resource file in the assembly. + The assembly that contains the resource file. + This configuration object. + + + + Adds the mappings from ebedded resources of the assembly. + + Paths to the resource files in the assembly. + The assembly that contains the resource files. + This configuration object. + + + + Read a mapping from an embedded resource, using a convention. + + The type to map. + This configuration object. + + The convention is for class Foo.Bar.Foo to be mapped by + the resource named Foo.Bar.Foo.hbm.xml, embedded in + the class' assembly. If the mappings and classes are defined + in different assemblies or don't follow the naming convention, + this method cannot be used. + + + + + Adds all of the assembly's embedded resources whose names end with .hbm.xml. + + The name of the assembly to load. + This configuration object. + + The assembly must be loadable using . If this + condition is not satisfied, load the assembly manually and call + instead. + + + + + Adds all of the assembly's embedded resources whose names end with .hbm.xml. + + The assembly. + This configuration object. + + + + Read all mapping documents from a directory tree. Assume that any + file named *.hbm.xml is a mapping document. + + a directory + + + + Generate DDL for dropping tables + + + + + + Generate DDL for creating tables + + + + + + Call this to ensure the mappings are fully compiled/built. Usefull to ensure getting + access to all information in the metamodel when calling e.g. getClassMappings(). + + + + + This method may be called many times!! + + + + + Instantiate a new , using the properties and mappings in this + configuration. The will be immutable, so changes made to the + configuration after building the will not affect it. + + An instance. + + + + Set the default assembly to use for the mappings added to the configuration + afterwards. + + The default assembly name. + This configuration instance. + + This setting can be overridden for a mapping file by setting default-assembly + attribute of <hibernate-mapping> element. + + + + + Set the default namespace to use for the mappings added to the configuration + afterwards. + + The default namespace. + This configuration instance. + + This setting can be overridden for a mapping file by setting default-namespace + attribute of <hibernate-mapping> element. + + + + + Sets the default interceptor for use by all sessions. + + The default interceptor. + This configuration instance. + + + + Specify a completely new set of properties + + + + + Adds an of configuration properties. The + Key is the name of the Property and the Value is the + value of the Property. + + An of configuration properties. + + This object. + + + + + Sets the value of the configuration property. + + The name of the property. + The value of the property. + + This configuration object. + + + + + Gets the value of the configuration property. + + The name of the property. + The configured value of the property, or if the property was not specified. + + + + Configure NHibernate using the <hibernate-configuration> section + from the application config file, if found, or the file hibernate.cfg.xml if the + <hibernate-configuration> section not include the session-factory configuration. + + A configuration object initialized with the file. + + To configure NHibernate explicitly using hibernate.cfg.xml, appling merge/override + of the application configuration file, use this code: + + configuration.Configure("path/to/hibernate.cfg.xml"); + + + + + + Configure NHibernate using the file specified. + + The location of the XML file to use to configure NHibernate. + A Configuration object initialized with the file. + + Calling Configure(string) will override/merge the values set in app.config or web.config + + + + + Configure NHibernate using a resource contained in an Assembly. + + The that contains the resource. + The name of the manifest resource being requested. + A Configuration object initialized from the manifest resource. + + Calling Configure(Assembly, string) will overwrite the values set in app.config or web.config + + + + + Configure NHibernate using the specified XmlReader. + + The that contains the Xml to configure NHibernate. + A Configuration object initialized with the file. + + Calling Configure(XmlReader) will overwrite the values set in app.config or web.config + + + + + Set up a cache for an entity class + + + + + Set up a cache for a collection role + + + + + Create an object-oriented view of the configuration properties + + A object initialized from the settings properties. + + + + Set a custom naming strategy + + the NamingStrategy to set + + + + + Load and validate the mappings in the against + the nhibernate-mapping-2.2 schema, without adding them to the configuration. + + + This method is made public to be usable from the unit tests. It is not intended + to be called by end users. + + The XmlReader that contains the mapping. + The name of the document, for error reporting purposes. + NamedXmlDocument containing the validated XmlDocument built from the XmlReader. + + + + Adds the Mappings in the after validating it + against the nhibernate-mapping-2.2 schema. + + The XmlReader that contains the mapping. + This Configuration object. + + + + Adds the Mappings in the after validating it + against the nhibernate-mapping-2.2 schema. + + The XmlReader that contains the mapping. + The name of the document to use for error reporting. May be . + This Configuration object. + + + + Set or clear listener for a given . + + The . + The array of AssemblyQualifiedName of each listener for . + + must implements the interface related with . + All listeners of the given will be cleared if the + is null or empty. + + + when an element of have an invalid value or cant be instantiated. + + + + + Set or clear listener for a given . + + The . + The listener for or null to clear. + must implements the interface related with . + + + + + Set or clear listeners for a given . + + The . + The listener for or null to clear. + Listeners of must implements one of the interface of event listenesr. + + + + + Generate DDL for altering tables + + + + + + The class mappings + + + + + The collection mappings + + + + + The table mappings + + + + + The named queries + + + + + Retrieve the user-supplied delegate to handle non-existent entity scenarios. + + + Specify a user-supplied delegate to be used to handle scenarios where an entity could not be + located by specified id. This is mainly intended for EJB3 implementations to be able to + control how proxy initialization errors should be handled... + + + + + Gets or sets the to use. + + The to use. + + + + Gets or sets the that contains the configuration + properties and their values. + + + The that contains the configuration + properties and their values. + + + + + Get the query language imports (entityName/className -> AssemblyQualifiedName) + + + + + The named SQL queries + + + + + Naming strategy for tables and columns + + + + + Defines operations common to "compiled" mappings (ie. SessionFactory) and + "uncompiled" mappings (ie Configuration that are used by implementors of IType + + + + + Summary description for ConfigurationSectionHandler. + + + + + The default + + See for a better alternative + + + + A set of rules for determining the physical column and table names given the information in the mapping + document. May be used to implement project-scoped naming standards for database objects. + + + + + Return a table name for an entity class + + the fully-qualified class name + a table name + + + + Return a column name for a property path expression + + a property path + a column name + + + + Alter the table name given in the mapping document + + a table name + a table name + + + + Alter the column name given in the mapping document + + a column name + a column name + + + + Return a table name for a collection + + the fully-qualified name of the owning entity class + a property path + a table name + + + + Return the logical column name used to refer to a column in the metadata + (like index, unique constraints etc) + A full bijection is required between logicalNames and physical ones + logicalName have to be case insersitively unique for a given table + + given column name if any + property name of this column + + + + The singleton instance + + + + + Return the unqualified class name + + + + + + + Return the unqualified property name + + + + + + + Return the argument + + + + + + + Return the argument + + + + + + + Return the unqualified property name + + + + + + + + Provides access to configuration information. + + + NHibernate has two property scopes: + + + Factory-level properties may be passed to the when it is + instantiated. Each instance might have different property values. If no properties are + specified, the factory gets them from Environment + + + System-level properties are shared by all factory instances and are always determined + by the properties + + + In NHibernate, <hibernate-configuration> section in the application configuration file + corresponds to Java system-level properties; <session-factory> + section is the session-factory-level configuration. + + It is possible to use the application configuration file (App.config) together with the NHibernate + configuration file (hibernate.cfg.xml) at the same time. + Properties in hibernate.cfg.xml override/merge properties in application configuration file where same + property is found. For others configuration a merge is applied. + + + + + Used to find the .Net 2.0 named connection string + + + + A default database schema (owner) name to use for unqualified tablenames + + + A default database catalog name to use for unqualified tablenames + + + The EntityMode in which set the Session opened from the SessionFactory. + + + Enable formatting of SQL logged to the console + + + Should named queries be checked during startup (the default is enabled). + Mainly intended for test environments. + + + Enable statistics collection + + + + Issue warnings to user when any obsolete property names are used. + + + + + + + NHibernate version (informational). + + + + + Gets a copy of the configuration found in <hibernate-configuration> section + of app.config/web.config. + + + This is the replacement for hibernate.properties + + + + + The bytecode provider to use. + + + This property is read from the <nhibernate> section + of the application configuration file by default. Since it is not + always convenient to configure NHibernate through the application + configuration file, it is also possible to set the property value + manually. This should only be done before a configuration object + is created, otherwise the change may not take effect. + + + + + Whether to enable the use of reflection optimizer + + + This property is read from the <nhibernate> section + of the application configuration file by default. Since it is not + always convenient to configure NHibernate through the application + configuration file, it is also possible to set the property value + manually. This should only be done before a configuration object + is created, otherwise the change may not take effect. + + + + + Represents a mapping queued for delayed processing to await + processing of an extends entity upon which it depends. + + + + + An exception that occurs at configuration time, rather than runtime, as a result of + something screwy in the hibernate.cfg.xml. + + + + + An exception that usually occurs at configuration time, rather than runtime, as a result of + something screwy in the O-R mappings + + + + + Initializes a new instance of the class. + + The message that describes the error. + + + + Initializes a new instance of the class. + + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class. + + The message that describes the error. + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Initializes a new instance of the class. + + Default message is used. + + + + Initializes a new instance of the class. + + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class. + + The message that describes the error. + + + + Initializes a new instance of the class. + + The message that describes the error. + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Summary description for ImprovedNamingStrategy. + + + + + The singleton instance + + + + + Return the unqualified class name, mixed case converted to underscores + + + + + + + Return the full property path with underscore separators, mixed case converted to underscores + + + + + + + Convert mixed case to underscores + + + + + + + Convert mixed case to underscores + + + + + + + Return the full property path prefixed by the unqualified class name, with underscore separators, mixed case converted to underscores + + + + + + + + A collection of mappings from classes and collections to relational database tables. + + Represents a single <hibernate-mapping> element. + + + + Binding table between the logical column name and the name out of the naming strategy + for each table. + According that when the column name is not set, the property name is considered as such + This means that while theoretically possible through the naming strategy contract, it is + forbidden to have 2 real columns having the same logical name + + + + + Binding between logical table name and physical one (ie after the naming strategy has been applied) + + + + + + + + + + + + + + + + + Adds an import to allow for the full class name Namespace.Entity (AssemblyQualifiedName) + to be referenced as Entity or some other name in HQL. + + The name of the type that is being renamed. + The new name to use in HQL for the type. + Thrown when the rename already identifies another type. + + + + + + + + + The default namespace for persistent classes + + + + + The default assembly for persistent classes + + + + + + + + + + + Gets or sets a boolean indicating if the Fully Qualified Type name should + automatically have an import added as the class name. + + if the class name should be used as an import. + + Auto-import is used to shorten the string used to refer to types to just their + unqualified name. So if the type MyAssembly.MyNamespace.MyClass, MyAssembly has + auto-import="false" then all use of it in HQL would need to be the fully qualified + version MyAssembly.MyNamespace.MyClass. If auto-import="true", the type could + be referred to in HQL as just MyClass. + + + + + Queues mapping files according to their dependency order. + + + + + Adds the specified document to the queue. + + + + + Gets a that can now be processed (i.e. + that doesn't depend on classes not yet processed). + + + + + + Checks that no unprocessed documents remain in the queue. + + + + + Holds information about mapped classes found in an embedded resource + + + + + Gets the names of all entities outside this resource + needed by the classes in this resource. + + + + + Gets the names of all entities in this resource + + + + + Settings that affect the behavior of NHibernate at runtime. + + + + + Reads configuration properties and configures a instance. + + + + + Provides callbacks from the to the persistent object. Persistent classes may + implement this interface but they are not required to. + + + + , , and are intended to be used + to cascade saves and deletions of dependent objects. This is an alternative to declaring cascaded + operations in the mapping file. + + + may be used to initialize transient properties of the object from its persistent + state. It may not be used to load dependent objects since the interface + may not be invoked from inside this method. + + + A further intended usage of , , and + is to store a reference to the for later use. + + + If , , or return + , the operation is silently vetoed. If a + is thrown, the operation is vetoed and the exception is passed back to the application. + + + Note that is called after an identifier is assigned to the object, except when + identity key generation is used. + + + + + + Called when an entity is saved + + The session + If we should veto the save + + + + Called when an entity is passed to . + + The session + A value indicating whether the operation + should be vetoed or allowed to proceed. + + This method is not called every time the object's state is + persisted during a flush. + + + + + Called when an entity is deleted + + The session + A value indicating whether the operation + should be vetoed or allowed to proceed. + + + + Called after an entity is loaded. + + + It is illegal to access the from inside this method.. + However, the object may keep a reference to the session for later use + + The session + The identifier + + + + Veto the action + + + + + Accept the action + + + + + Implemented by persistent classes with invariants that must be checked before inserting + into or updating the database + + + + + Validate the state of the object before persisting it. If a violation occurs, + throw a . This method must not change the state of the object + by side-effect. + + + + + Thrown from when an invariant was violated. Some applications + might subclass this exception in order to provide more information about the violation + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message that describes the error. + + + + Initializes a new instance of the class. + + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class. + + The message that describes the error. + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + An unordered, unkeyed collection that can contain the same element + multiple times. The .NET collections API, has no Bag. + Most developers seem to use to represent bag semantics, + so NHibernate follows this practice. + + The type of the element the bag should hold. + The underlying collection used is an + + + + An unordered, unkeyed collection that can contain the same element + multiple times. The .NET collections API has no Bag class. + Most developers seem to use s to represent bag semantics, + so NHibernate follows this practice. + + + + + Base class for implementing . + + + + + + Persistent collections are treated as value objects by NHibernate. + ie. they have no independent existence beyond the object holding + a reference to them. Unlike instances of entity classes, they are + automatically deleted when unreferenced and automatically become + persistent when held by a persistent object. Collections can be + passed between different objects (change "roles") and this might + cause their elements to move from one database table to another. + + + NHibernate "wraps" a collection in an instance of + . This mechanism is designed + to support tracking of changes to the collection's persistent + state and lazy instantiation of collection elements. The downside + is that only certain abstract collection types are supported and + any extra semantics are lost. + + + Applications should never use classes in this namespace + directly, unless extending the "framework" here. + + + Changes to structure of the collection are recorded by the + collection calling back to the session. Changes to mutable + elements (ie. composite elements) are discovered by cloning their + state when the collection is initialized and comparing at flush + time. + + + + + + Return the user-visible collection (or array) instance + + + By default, the NHibernate wrapper is an acceptable collection for + the end user code to work with because it is interface compatible. + An NHibernate PersistentList is an IList, an NHibernate PersistentMap is an IDictionary + and those are the types user code is expecting. + + + + After flushing, re-init snapshot state. + + + + Clears out any Queued Additions. + + + After a Flush() the database is in synch with the in-memory + contents of the Collection. Since everything is in synch remove + any Queued Additions. + + + + + Called just before reading any rows from the + + + + + Called after reading all rows from the + + + This should be overridden by sub collections that use temporary collections + to store values read from the db. + + + true if NOT has Queued operations + + + + + Called after initializing from cache + + + true if NOT has Queued operations + + + + + Disassociate this collection from the given session. + + + true if this was currently associated with the given session + + + + Associate the collection with the given session. + + + false if the collection was already associated with the session + + + + Read the state of the collection from a disassembled cached value. + + + + + + + + Iterate all collection entries, during update of the database + + + An that gives access to all entries + in the collection. + + + + + Reads the row from the . + + + This method should be prepared to handle duplicate elements caused by fetching multiple collections, + or should be updated + to return for the collection type. + + The IDataReader that contains the value of the Identifier + The persister for this Collection. + The descriptor providing result set column names + The owner of this Collection. + The object that was contained in the row. + + + + Get the identifier of the given collection entry + + + + + Get the index of the given collection entry + + + + + Get the value of the given collection entry + + + + + Get the snapshot value of the given collection entry + + + + + Called before any elements are read into the collection, + allowing appropriate initializations to occur. + + The for this persistent collection. + The anticipated size of the collection after initilization is complete. + + + + Does the current state exactly match the snapshot? + + The to compare the elements of the Collection. + + if the wrapped collection is different than the snapshot + of the collection or if one of the elements in the collection is + dirty. + + + + Is the snapshot empty? + + + + Disassemble the collection, ready for the cache + + The for this Collection. + The contents of the persistent collection in a cacheable form. + + + + Gets a indicating if the rows for this collection + need to be recreated in the table. + + The for this Collection. + + by default since most collections can determine which rows need to be + individually updated/inserted/deleted. Currently only 's for many-to-many + need to be recreated. + + + + + Return a new snapshot of the current state of the collection + + + + + To be called internally by the session, forcing + immediate initalization. + + + This method is similar to , except that different exceptions are thrown. + + + + + Does an element exist at this entry in the collection? + + + + + Do we need to insert this element? + + + + + Do we need to update this element? + + + + + Get all the elements that need deleting + + + + + Is this the wrapper for the given underlying collection instance? + + The collection to see if this IPersistentCollection is wrapping. + + if the IPersistentCollection is wrappping the collection instance, + otherwise. + + + + Get the "queued" orphans + + + + Clear the dirty flag, after flushing changes + to the database. + + + + + Mark the collection as dirty + + + + + Called before inserting rows, to ensure that any surrogate keys are fully generated + + + + + + Called after inserting a row, to fetch the natively generated id + + + + + Get all "orphaned" elements + + The snapshot of the collection. + The persistent class whose objects + the collection is expected to contain. + + An that contains all of the elements + that have been orphaned. + + + + + The owning entity. + + + Note that the owner is only set during the flush + cycle, and when a new collection wrapper is created + while loading an entity. + + + + Get the current collection key value + + + Get the current role name + + + Is the collection unreferenced? + + + + Is the collection dirty? Note that this is only + reliable during the flush cycle, after the + collection elements are dirty checked against + the snapshot. + + + + Get the snapshot cached by the collection instance + + + + Is the initialized collection empty? + + + + + Gets a indicating if the underlying collection is directly + accessible through code. + + + if we are not guaranteed that the NHibernate collection wrapper + is being used. + + + This is typically whenever a transient object that contains a collection is being + associated with an through or . + NHibernate can't guarantee that it will know about all operations that would cause NHibernate's collections + to call or . + + + + + + + + + + + + + + Not called by Hibernate, but used by non-NET serialization, eg. SOAP libraries. + + + + + Return the user-visible collection (or array) instance + + + By default, the NHibernate wrapper is an acceptable collection for + the end user code to work with because it is interface compatible. + An NHibernate PersistentList is an IList, an NHibernate PersistentMap is an IDictionary + and those are the types user code is expecting. + + + + + Called by any read-only method of the collection interface + + + + Called by the Count property + + + + Called by any writer method of the collection interface + + + + + Queue an addition, delete etc. if the persistent collection supports it + + + + + After reading all existing elements from the database, + add the queued elements to the underlying collection. + + + + + Clears out any Queued operation. + + + After flushing, clear any "queued" additions, since the + database state is now synchronized with the memory state. + + + + + Called just before reading any rows from the + + + + + Called after reading all rows from the + + + This should be overridden by sub collections that use temporary collections + to store values read from the db. + + + + + Initialize the collection, if possible, wrapping any exceptions + in a runtime exception + + currently obsolete + if we cannot initialize + + + + Mark the collection as initialized. + + + + + Disassociate this collection from the given session. + + + true if this was currently associated with the given session + + + + Associate the collection with the given session. + + + false if the collection was already associated with the session + + + + Gets a indicating if the rows for this collection + need to be recreated in the table. + + The for this Collection. + + by default since most collections can determine which rows need to be + individually updated/inserted/deleted. Currently only 's for many-to-many + need to be recreated. + + + + + To be called internally by the session, forcing + immediate initalization. + + + This method is similar to , except that different exceptions are thrown. + + + + + Gets the Snapshot from the current session the collection is in. + + + + + Called before inserting rows, to ensure that any surrogate keys are fully generated + + + + + + Called after inserting a row, to fetch the natively generated id + + + + + Get all "orphaned" elements + + + + + Given a collection of entity instances that used to + belong to the collection, and a collection of instances + that currently belong, return a collection of orphans + + + + + Disassemble the collection, ready for the cache + + + + + + + Is this the wrapper for the given underlying collection instance? + + + + + + + Does an element exist at this entry in the collection? + + + + + + + + Get all the elements that need deleting + + + + + Read the state of the collection from a disassembled cached value. + + + + + + + + Do we need to update this element? + + + + + + + + + Reads the row from the . + + The IDataReader that contains the value of the Identifier + The persister for this Collection. + The descriptor providing result set column names + The owner of this Collection. + The object that was contained in the row. + + + + Do we need to insert this element? + + + + + + + + + Get the index of the given collection entry + + + + + Called before any elements are read into the collection, + allowing appropriate initializations to occur. + + The underlying collection persister. + The anticipated size of the collection after initilization is complete. + + + + Is the collection currently connected to an open session? + + + + + Is this collection in a state that would allow us to "queue" additions? + + + + Is this collection in a state that would allow us to + "queue" puts? This is a special case, because of orphan + delete. + + + + Is this collection in a state that would allow us to + "queue" clear? This is a special case, because of orphan + delete. + + + + Is this the "inverse" end of a bidirectional association? + + + + Is this the "inverse" end of a bidirectional association with + no orphan delete enabled? + + + + + Is this the "inverse" end of a bidirectional one-to-many, or + of a collection with no orphan delete? + + + + + + + + Is the initialized collection empty? + + + + + Gets a indicating if the underlying collection is directly + accessible through code. + + + if we are not guaranteed that the NHibernate collection wrapper + is being used. + + + This is typically whenever a transient object that contains a collection is being + associated with an through or . + NHibernate can't guarantee that it will know about all operations that would cause NHibernate's collections + to call or . + + + + Is this instance initialized? + + + Does this instance have any "queued" additions? + + + + + + + Counts the number of times that the occurs + in the . + + The element to find in the list. + The to search. + The that can determine equality. + The entity mode. + + The number of occurrences of the element in the list. + + + + + Initializes this PersistentBag from the cached values. + + The CollectionPersister to use to reassemble the PersistentBag. + The disassembled PersistentBag. + The owner object. + + + + Gets a indicating if this PersistentBag needs to be recreated + in the database. + + + + if this is a one-to-many Bag, if this is not + a one-to-many Bag. Since a Bag is an unordered, unindexed collection + that permits duplicates it is not possible to determine what has changed in a + many-to-many so it is just recreated. + + + + + Implements "bag" semantics more efficiently than by adding + a synthetic identifier column to the table. + + + + The identifier is unique for all rows in the table, allowing very efficient + updates and deletes. The value of the identifier is never exposed to the + application. + + + Identifier bags may not be used for a many-to-one association. Furthermore, + there is no reason to use inverse="true". + + + + + + Implements "bag" semantics more efficiently than a regular + by adding a synthetic identifier column to the table. + + + + The identifier is unique for all rows in the table, allowing very efficient + updates and deletes. The value of the identifier is never exposed to the + application. + + + PersistentIdentifierBags may not be used for a many-to-one association. + Furthermore, there is no reason to use inverse="true". + + + + + + Initializes this Bag from the cached values. + + The CollectionPersister to use to reassemble the PersistentIdentifierBag. + The disassembled PersistentIdentifierBag. + The owner object. + + + + A persistent wrapper for an + + The type of the element the list should hold. + The underlying collection used is a + + + + A persistent wrapper for an + + + The underlying collection used in an . + + + + + Initializes an instance of the + in the . + + The the list is in. + + + + Initializes an instance of the + that wraps an existing in the . + + The the list is in. + The to wrap. + + + + Initializes this PersistentList from the cached values. + + The CollectionPersister to use to reassemble the PersistentList. + The disassembled PersistentList. + The owner object. + + + + A persistent wrapper for a . Underlying + collection is a + + The type of the keys in the IDictionary. + The type of the elements in the IDictionary. + + + + A persistent wrapper for a . Underlying collection + is a . + + + + + Construct an uninitialized PersistentMap. + + The ISession the PersistentMap should be a part of. + + + + Construct an initialized PersistentMap based off the values from the existing IDictionary. + + The ISession the PersistentMap should be a part of. + The IDictionary that contains the initial values. + + + + Initializes this PersistentMap from the cached values. + + The CollectionPersister to use to reassemble the PersistentMap. + The disassembled PersistentMap. + The owner object. + + + + .NET has no design equivalent for Java's Set so we are going to use the + Iesi.Collections library. This class is internal to NHibernate and shouldn't + be used by user code. + + + The code for the Iesi.Collections library was taken from the article + Add Support for "Set" Collections + to .NET that was written by JasonSmith. + + + + + .NET has no design equivalent for Java's Set so we are going to use the + Iesi.Collections library. This class is internal to NHibernate and shouldn't + be used by user code. + + + The code for the Iesi.Collections library was taken from the article + Add Support for "Set" Collections + to .NET that was written by JasonSmith. + + + + + The that NHibernate is wrapping. + + + + + A temporary list that holds the objects while the PersistentSet is being + populated from the database. + + + This is necessary to ensure that the object being added to the PersistentSet doesn't + have its' GetHashCode() and Equals() methods called during the load + process. + + + + + Constructor matching super. + Instantiates a lazy set (the underlying set is un-initialized). + + The session to which this set will belong. + + + + Instantiates a non-lazy set (the underlying set is constructed + from the incoming set reference). + + The session to which this set will belong. + The underlying set data. + + + + Initializes this PersistentSet from the cached values. + + The CollectionPersister to use to reassemble the PersistentSet. + The disassembled PersistentSet. + The owner object. + + + + Set up the temporary List that will be used in the EndRead() + to fully create the set. + + + + + Takes the contents stored in the temporary list created during BeginRead() + that was populated during ReadFrom() and write it to the underlying + PersistentSet. + + + + + A persistent wrapper for an array. lazy initialization is NOT supported + + Use of Hibernate arrays is not really recommended. + + + + A temporary list that holds the objects while the PersistentArrayHolder is being + populated from the database. + + + + + Returns the user-visible portion of the NHibernate PersistentArrayHolder. + + + The array that contains the data, not the NHibernate wrapper. + + + + + Before is called the PersistentArrayHolder needs to setup + a temporary list to hold the objects. + + + + + Takes the contents stored in the temporary list created during + that was populated during and write it to the underlying + array. + + + + + Initializes this array holder from the cached values. + + The CollectionPersister to use to reassemble the Array. + The disassembled Array. + The owner object. + + + + Gets or sets the array. + + The array. + + + + The base class for the ConnectionProvider. + + + + + A strategy for obtaining ADO.NET . + + + The IConnectionProvider interface is not intended to be exposed to the application. + Instead it is used internally by NHibernate to obtain . + Implementors should provide a public default constructor. + + + + + Initialize the connection provider from the given properties. + + The connection provider settings + + + + Dispose of a used + + The to clean up. + + + + Get an open . + + An open . + + + + Gets the this ConnectionProvider should use to + communicate with the .NET Data Provider + + + The to communicate with the .NET Data Provider. + + + + + Closes the . + + The to clean up. + + + + Configures the ConnectionProvider with the Driver and the ConnectionString. + + An that contains the settings for this ConnectionProvider. + + Thrown when a could not be found + in the settings parameter or the Driver Class could not be loaded. + + + + + Get the .NET 2.0 named connection string + + + Thrown when a was found + in the settings parameter but could not be found in the app.config + + + + + Configures the driver for the ConnectionProvider. + + An that contains the settings for the Driver. + + Thrown when the could not be + found in the settings parameter or there is a problem with creating + the . + + + + + Get an open . + + An open . + + + + A flag to indicate if Disose() has been called. + + + + + Finalizer that ensures the object is correctly disposed of. + + + + + Takes care of freeing the managed and unmanaged resources that + this class is responsible for. + + + + + Takes care of freeing the managed and unmanaged resources that + this class is responsible for. + + Indicates if this ConnectionProvider is being Disposed of or Finalized. + +

+ If this ConnectionProvider is being Finalized (isDisposing==false) then make + sure not to call any methods that could potentially bring this + ConnectionProvider back to life. +

+

+ If any subclasses manage resources that also need to be disposed of this method + should be overridden, but don't forget to call it in the override. +

+
+
+ + + Gets the for the + to connect to the database. + + + The for the + to connect to the database. + + + + + Gets the that can create the object. + + + The that can create the . + + + + + Instanciates a connection provider given configuration properties. + + + + + A ConnectionProvider that uses an IDriver to create connections. + + + + + Closes and Disposes of the . + + The to clean up. + + + + Gets a new open through + the . + + + An Open . + + + If there is any problem creating or opening the . + + + + + An implementation of the IConnectionProvider that simply throws an exception when + a connection is requested. + + + This implementation indicates that the user is expected to supply an ADO.NET connection + + + + + Throws an if this method is called + because the user is responsible for closing s. + + The to clean up. + + Thrown when this method is called. User is responsible for closing + s. + + + + + Throws an if this method is called + because the user is responsible for creating s. + + + No value is returned because an is thrown. + + + Thrown when this method is called. User is responsible for creating + s. + + + + + Configures the ConnectionProvider with only the Driver class. + + + + All other settings of the Connection are the responsibility of the User since they configured + NHibernate to use a Connection supplied by the User. + + + + + Provides a current session + for each . + Not recommended for .NET 2.0 web applications. + + + + + Extends the contract defined by + by providing methods to bind and unbind sessions to the current context. + + + The notion of a contextual session is managed by some external entity + (generally some form of interceptor like the HttpModule). + This external manager is responsible for scoping these contextual sessions + appropriately binding/unbinding them here for exposure to the application + through calls. + + + + + Defines the contract for implementations which know how to + scope the notion of a current session. + + + + Implementations should adhere to the following: + + contain a constructor accepting a single argument of type + + should be thread safe + should be fully serializable + + + + Implementors should be aware that they are also fully responsible for + cleanup of any generated current-sessions. + + + Note that there will be exactly one instance of the configured + ICurrentSessionContext implementation per . + + + It is recommended to inherit from the class + whenever possible as it simplifies the implementation and provides + single entry point with session binding support. + + + + + + Retrieve the current session according to the scoping defined + by this implementation. + + The current session. + Typically indicates an issue + locating or creating the current session. + + + + Retrieve the current session according to the scoping defined + by this implementation. + + The current session. + Indicates an issue + locating the current session. + + + + Binds the specified session to the current context. + + + + + Returns whether there is a session bound to the current context. + + + + + Unbinds and returns the current session. + + + + Gets or sets the currently bound session. + + + + Get the dicitonary mapping session factory to its current session. + + + + + Set the map mapping session factory to its current session. + + + + + Gets or sets the currently bound session. + + + + + The key is the session factory and the value is the bound session. + + + + + The key is the session factory and the value is the bound session. + + + + + Provides a current session + for each . + Works only with Web Applications. + + + + + A impl which scopes the notion of current + session by the current thread of execution. Threads do not give us a + nice hook to perform any type of cleanup making + it questionable for this impl to actually generate Session instances. In + the interest of usability, it was decided to have this default impl + actually generate a session upon first request and then clean it up + after the associated with that session + is committed/rolled-back. In order for ensuring that happens, the sessions + generated here are unusable until after {@link Session#beginTransaction()} + has been called. If Close() is called on a session managed by + this class, it will be automatically unbound. +

+ Additionally, the static and methods are + provided to allow application code to explicitly control opening and + closing of these sessions. This, with some from of interception, + is the preferred approach. It also allows easy framework integration + and one possible approach for implementing long-sessions. +

+

+
+ + + Unassociate a previously bound session from the current thread of execution. + + + + + + + Provides a current session + for each thread using the []. + To avoid if there are two session factories in the same thread. + + + + Gets or sets the currently bound session. + + + + Provides a current session + for each . Works only with web applications. + + + + + Base class for implementations. + + + + + An object-oriented representation of a query criterion that may be used as a constraint + in a query. + + + Built-in criterion types are provided by the Expression factory class. + This interface might be implemented by application classes but, more commonly, application + criterion types would extend AbstractCriterion. + + + + + Render a SqlString fragment for the expression. + + A SqlString that contains a valid Sql fragment. + + + + Return typed values for all parameters in the rendered SQL fragment + + An array of TypedValues for the Expression. + + + + Return all projections used in this criterion + + An array of IProjection used by the Expression. + + + + Gets a string representation of the . + + + A String that shows the contents of the . + + + This is not a well formed Sql fragment. It is useful for logging what the + looks like. + + + + + Render a SqlString for the expression. + + A SqlString that contains a valid Sql fragment. + + + + Return typed values for all parameters in the rendered SQL fragment + + An array of TypedValues for the Expression. + + + + Return all projections used in this criterion + + An array of IProjection used by the Expression. + + + + See here for details: + http://steve.emxsoftware.com/NET/Overloading+the++and++operators + + + + + See here for details: + http://steve.emxsoftware.com/NET/Overloading+the++and++operators + + + + + See here for details: + http://steve.emxsoftware.com/NET/Overloading+the++and++operators + + + + + See here for details: + http://steve.emxsoftware.com/NET/Overloading+the++and++operators + + + + + An Aggregation + + + + + A single-column projection that may be aliased + + + + + Render the SQL Fragment. + + The criteria. + The position. + The criteria query. + The enabled filters. + + + + + Render the SQL Fragment to be used in the Group By Clause. + + The criteria. + The criteria query. + The enabled filters. + + + + + Return types for a particular user-visible alias + + + + + + + + + + + + + + + + + Get the SQL select clause column aliases for a particular user-visible alias + + + + + + + Get the SQL select clause column aliases for a particular user-visible alias + + + + + + + + Gets the typed values for parameters in this projection + + The criteria. + The criteria query. + + + + + Get the user-visible aliases for this projection (ie. the ones that will be passed to the ResultTransformer) + + + + + Does this projection specify grouping attributes? + + + + + Does this projection specify aggregate attributes? + + + + + Gets the typed values for parameters in this projection + + The criteria. + The criteria query. + + + + + Gets the typed values for parameters in this projection + + The criteria. + The criteria query. + + + + + An that combines two s + with an and between them. + + + + + An that combines two s + with a operator (either "and" or "or") between them. + + + + + Initialize a new instance of the class that + combines two other s. + + The to use in the Left Hand Side. + The to use in the Right Hand Side. + + + + Combines the for the Left Hand Side and the + Right Hand Side of the Expression into one array. + + An array of s. + + + + Converts the LogicalExpression to a . + + A well formed SqlString for the Where clause. + The SqlString will be enclosed by ( and ). + + + + Gets a string representation of the LogicalExpression. + + + The String contains the LeftHandSide.ToString() and the RightHandSide.ToString() + joined by the Op. + + + This is not a well formed Sql fragment. It is useful for logging what Expressions + are being combined. + + + + + Gets the that will be on the Left Hand Side of the Op. + + + + + Gets the that will be on the Right Hand Side of the Op. + + + + + Get the Sql operator to put between the two s. + + + + + Initializes a new instance of the class + that combines two . + + The to use as the left hand side. + The to use as the right hand side. + + + + Get the Sql operator to put between the two s. + + The string "and" + + + + An that represents a "between" constraint. + + + + + Initializes a new instance of the class. + + The _projection. + The _lo. + The _hi. + + + + Initialize a new instance of the class for + the named Property. + + The name of the Property of the Class. + The low value for the BetweenExpression. + The high value for the BetweenExpression. + + + + + + + Casting a value from one type to another, at the database + level + + + + + An that Junctions together multiple + s with an and + + + + + A sequence of logical s combined by some associative + logical operator. + + + + + Adds an to the list of s + to junction together. + + The to add. + + This instance. + + + + + Get the Sql operator to put between multiple s. + + + + + The corresponding to an instance with no added + subcriteria. + + + + + Get the Sql operator to put between multiple s. + + The string " and " + + + + This is useful if we want to send a value to the database + + + + + A Count + + + + The alias that refers to the "root" entity of the criteria query. + + + Each row of results is a from alias to entity instance + + + Each row of results is an instance of the root entity + + + Each row of results is a distinct instance of the root entity + + + This result transformer is selected implicitly by calling + + + Specifies joining to an entity based on an inner join. + + + Specifies joining to an entity based on a full join. + + + Specifies joining to an entity based on a left outer join. + + + + Some applications need to create criteria queries in "detached + mode", where the Hibernate session is not available. This class + may be instantiated anywhere, and then a ICriteria + may be obtained by passing a session to + GetExecutableCriteria(). All methods have the + same semantics and behavior as the corresponding methods of the + ICriteria interface. + + + + + Get an executable instance of Criteria, + to actually run the query. + + + + Get an executable instance of Criteria, + to actually run the query. + + + + Gets the root entity type if available, throws otherwise + + + This is an NHibernate specific method, used by several dependent + frameworks for advance integration with NHibernate. + + + + + Clear all orders from criteria. + + + + + An that Junctions together multiple + s with an or + + + + + Get the Sql operator to put between multiple s. + + The string " or " + + + + Gets the typed values for parameters in this projection + + The criteria. + The criteria query. + + + + + An that represents an "equal" constraint + between two properties. + + + + + Superclass for an that represents a + constraint between two properties (with SQL binary operators). + + + + + Initializes a new instance of the class. + + The projection. + Name of the RHS property. + + + + Initializes a new instance of the class. + + The LHS projection. + The RHS projection. + + + + Initializes a new instance of the class. + + Name of the LHS property. + Name of the RHS property. + + + + Initializes a new instance of the class. + + Name of the LHS property. + The RHS projection. + + + + + + + Get the Sql operator to use for the property expression. + + + + + Initializes a new instance of the class. + + Name of the LHS property. + The RHS projection. + + + + Initializes a new instance of the class. + + The LHS projection. + The RHS projection. + + + + Initializes a new instance of the class. + + The projection. + Name of the RHS property. + + + + Initializes a new instance of the class + that compares two mapped properties using an "equal" constraint. + + The name of the Property to use as the left hand side. + The name of the Property to use as the right hand side. + + + + Get the Sql operator to use for the . + + The string " = " + + + + Support for Query By Example. + + + + List results = session.CreateCriteria(typeof(Parent)) + .Add( Example.Create(parent).IgnoreCase() ) + .CreateCriteria("child") + .Add( Example.Create( parent.Child ) ) + .List(); + + + + "Examples" may be mixed and matched with "Expressions" in the same + + + + + Set escape character for "like" clause + + + + Set the for this . + + The to determine which properties to include. + This instance. + + This should be used when a custom has + been implemented. Otherwise use the methods + or to set the + to the s built into NHibernate. + + + + + Set the for this + to exclude zero-valued properties. + + + + + Set the for this + to exclude no properties. + + + + + Use the "like" operator for all string-valued properties with + the specified . + + + The to convert the string to the pattern + for the like comparison. + + + + + Use the "like" operator for all string-valued properties. + + + The default is MatchMode.Exact. + + + + + Exclude a particular named property + + The name of the property to exclude. + + + + Create a new instance, which includes all non-null properties + by default + + + A new instance of . + + + + Initialize a new instance of the class for a particular + entity. + + The that the Example is being built from. + The the Example should use. + + + + Determines if the property should be included in the Query. + + The value of the property. + The name of the property. + The of the property. + + if the Property should be included, if + the Property should not be a part of the Query. + + + + + Adds a based on the value + and type parameters to the in the + list parameter. + + The value of the Property. + The of the Property. + The to add the to. + + This method will add objects to the list parameter. + + + + + A strategy for choosing property values for inclusion in the query criteria + + + + + Determine if the Property should be included. + + The value of the property that is being checked for inclusion. + The name of the property that is being checked for inclusion. + The of the property. + + if the Property should be included in the Query, + otherwise. + + + + + Implementation of that includes all + properties regardless of value. + + + + + Implementation of that includes the + properties that are not and do not have an + returned by propertyValue.ToString(). + + + This selector is not present in H2.1. It may be useful if nullable types + are used for some properties. + + + + + This class is semi-deprecated. Use . + + + + + + The namespace may be used by applications as a framework for building + new kinds of . + However, it is intended that most applications will + simply use the built-in criterion types via the static factory methods of this class. + + + + + + + Apply an "equal" constraint to the identifier property + + + ICriterion + + + + Apply an "equal" constraint from the projection to the identifier property + + The projection. + ICriterion + + + + Apply an "equal" constraint to the named property + + The name of the Property in the class. + The value for the Property. + + + + Apply an "equal" constraint to the projection + + The projection. + The value for the Property. + + + + Apply a "like" constraint to the named property + + The name of the Property in the class. + The value for the Property. + A . + + + + Apply a "like" constraint to the project + + The projection. + The value for the Property. + A . + + + + Apply a "like" constraint to the project + + The projection. + The value for the Property. + The match mode. + A . + + + + A case-insensitive "like", similar to Postgres "ilike" operator + + The name of the Property in the class. + The value for the Property. + An . + + + + A case-insensitive "like", similar to Postgres "ilike" operator + + The projection. + The value for the Property. + + An . + + + + + Apply a "greater than" constraint to the named property + + The name of the Property in the class. + The value for the Property. + + + + Apply a "greater than" constraint to the projection + + The projection. + The value for the Property. + + + + Apply a "less than" constraint to the named property + + The name of the Property in the class. + The value for the Property. + + + + Apply a "less than" constraint to the projection + + The projection. + The value for the Property. + + + + Apply a "less than or equal" constraint to the named property + + The name of the Property in the class. + The value for the Property. + + + + Apply a "less than or equal" constraint to the projection + + The projection. + The value for the Property. + + + + Apply a "greater than or equal" constraint to the named property + + The name of the Property in the class. + The value for the Property. + + + + Apply a "greater than or equal" constraint to the projection + + The projection. + The value for the Property. + + + + Apply a "between" constraint to the named property + + The name of the Property in the class. + The low value for the Property. + The high value for the Property. + A . + + + + Apply a "between" constraint to the projection + + The projection. + The low value for the Property. + The high value for the Property. + A . + + + + Apply an "in" constraint to the named property + + The name of the Property in the class. + An array of values. + An . + + + + Apply an "in" constraint to the projection + + The projection. + An array of values. + An . + + + + Apply an "in" constraint to the projection + + The projection. + An ICollection of values. + An . + + + + Apply an "in" constraint to the named property + + The name of the Property in the class. + An ICollection of values. + An . + + + + Apply an "in" constraint to the named property. This is the generic equivalent + of , renamed to avoid ambiguity. + + The name of the Property in the class. + An + of values. + An . + + + + Apply an "in" constraint to the projection. This is the generic equivalent + of , renamed to avoid ambiguity. + + + The projection. + An + of values. + An . + + + + Apply an "is null" constraint to the named property + + The name of the Property in the class. + A . + + + + Apply an "is null" constraint to the projection + + The projection. + A . + + + + Apply an "equal" constraint to two properties + + The lhs Property Name + The rhs Property Name + A . + + + + Apply an "equal" constraint to projection and property + + The projection. + The rhs Property Name + A . + + + + Apply an "equal" constraint to lshProjection and rshProjection + + The LHS projection. + The RSH projection. + A . + + + + Apply an "equal" constraint to the property and rshProjection + + Name of the property. + The RSH projection. + A . + + + + Apply an "not equal" constraint to two properties + + The lhs Property Name + The rhs Property Name + A . + + + + Apply an "not equal" constraint to projection and property + + The projection. + The rhs Property Name + A . + + + + Apply an "not equal" constraint to the projections + + The LHS projection. + The RHS projection. + A . + + + + Apply an "not equal" constraint to the projections + + Name of the property. + The RHS projection. + A . + + + + Apply a "greater than" constraint to two properties + + The lhs Property Name + The rhs Property Name + A . + + + + Apply a "greater than" constraint to two properties + + The projection. + The rhs Property Name + A . + + + + Apply a "greater than" constraint to two properties + + Name of the property. + The projection. + A . + + + + Apply a "greater than" constraint to two properties + + The LHS projection. + The RHS projection. + A . + + + + Apply a "greater than or equal" constraint to two properties + + The lhs Property Name + The rhs Property Name + A . + + + + Apply a "greater than or equal" constraint to two properties + + The LHS projection. + The RHS projection. + A . + + + + Apply a "greater than or equal" constraint to two properties + + The projection. + The rhs Property Name + A . + + + + Apply a "greater than or equal" constraint to two properties + + The lhs Property Name + The projection. + A . + + + + Apply a "less than" constraint to two properties + + The lhs Property Name + The rhs Property Name + A . + + + + Apply a "less than" constraint to two properties + + The projection. + The rhs Property Name + A . + + + + Apply a "less than" constraint to two properties + + The lhs Property Name + The projection. + A . + + + + Apply a "less than" constraint to two properties + + The LHS projection. + The RHS projection. + A . + + + + Apply a "less than or equal" constraint to two properties + + The lhs Property Name + The rhs Property Name + A . + + + + Apply a "less than or equal" constraint to two properties + + The projection. + The rhs Property Name + A . + + + + Apply a "less than or equal" constraint to two properties + + The lhs Property Name + The projection. + A . + + + + Apply a "less than or equal" constraint to two properties + + The LHS projection. + The RHS projection. + A . + + + + Apply an "is not null" constraint to the named property + + The name of the Property in the class. + A . + + + + Apply an "is not null" constraint to the named property + + The projection. + A . + + + + Apply an "is not empty" constraint to the named property + + The name of the Property in the class. + A . + + + + Apply an "is not empty" constraint to the named property + + The name of the Property in the class. + A . + + + + Return the conjunction of two expressions + + The Expression to use as the Left Hand Side. + The Expression to use as the Right Hand Side. + An . + + + + Return the disjuction of two expressions + + The Expression to use as the Left Hand Side. + The Expression to use as the Right Hand Side. + An . + + + + Return the negation of an expression + + The Expression to negate. + A . + + + + Group expressions together in a single conjunction (A and B and C...) + + + + + Group expressions together in a single disjunction (A or B or C...) + + + + + Apply an "equals" constraint to each property in the key set of a IDictionary + + a dictionary from property names to values + + + + + Apply a constraint expressed in SQL, with the given SQL parameters + + + + + + + + + Apply a constraint expressed in SQL, with the given SQL parameter + + + + + + + + + Apply a constraint expressed in SQL, with the given SQL parameter + + + + + Apply a constraint expressed in SQL + + + + + + + Apply a constraint expressed in SQL + + + + + + + An that represents an "greater than or equal" constraint + between two properties. + + + + + Initializes a new instance of the class. + + Name of the LHS property. + The RHS projection. + + + + Initializes a new instance of the class. + + The LHS projection. + The RHS projection. + + + + Initializes a new instance of the class. + + The projection. + Name of the RHS property. + + + + Initializes a new instance of the class + that compares two mapped properties using an "greater than or equal" constraint. + + The name of the Property to use as the left hand side. + The name of the Property to use as the right hand side. + + + + Get the Sql operator to use for the . + + The string " < " + + + + Gets the typed values for parameters in this projection + + The criteria. + The criteria query. + + + + + An that represents an "greater than" constraint + between two properties. + + + + + Initializes a new instance of the class. + + Name of the LHS property. + The RHS projection. + + + + Initializes a new instance of the class. + + The LHS projection. + The RHS projection. + + + + Initializes a new instance of the class. + + The projection. + Name of the RHS property. + + + + Initializes a new instance of the class + that compares two mapped properties using an "greater than" constraint. + + The name of the Property to use as the left hand side. + The name of the Property to use as the right hand side. + + + + Get the Sql operator to use for the . + + The string " < " + + + + An instance of is passed to criterion, + order and projection instances when actually compiling and + executing the query. This interface is not used by application + code. + + + + Get the names of the columns mapped by a property path, ignoring projection aliases + + + Get the type of a property path, ignoring projection aliases + + + Get the names of the columns mapped by a property path + + + Get the type of a property path + + + Get the a typed value for the given property value. + + + Get the entity name of an entity + + + + Get the entity name of an entity, taking into account + the qualifier of the property path + + + + Get the root table alias of an entity + + + + Get the root table alias of an entity, taking into account + the qualifier of the property path + + + + Get the property name, given a possibly qualified property name + + + Get the identifier column names of this entity + + + Get the identifier type of this entity + + + + When adding values to the query string it is imperative that they are reported via this function back to the query builder. + Do not report the same item multiple times as it will be assumed to be a separate parameter. + + + + + An identifier constraint + + + + + An that constrains the property + to a specified list of values. + + + InExpression - should only be used with a Single Value column - no multicolumn properties... + + + + + Initializes a new instance of the class. + + The projection. + The _values. + + + + + + + + + + + + + + An that represents an "like" constraint + that is not case sensitive. + + + + + Initializes a new instance of the class. + + The projection. + The value. + The match mode. + + + + Initializes a new instance of the class. + + The projection. + The value. + + + + Initialize a new instance of the + class for a named Property and its value. + + The name of the Property in the class. + The value for the Property. + + + + + + + An that represents empty association constraint. + + + + + An that represents non-empty association constraint. + + + + + An that represents an "less than or equal" constraint + between two properties. + + + + + Initializes a new instance of the class. + + Name of the LHS property. + The RHS projection. + + + + Initializes a new instance of the class. + + The LHS projection. + The RHS projection. + + + + Initializes a new instance of the class. + + The projection. + Name of the RHS property. + + + + Initializes a new instance of the class + that compares two mapped properties using an "less than or equal" constraint. + + The name of the Property to use as the left hand side. + The name of the Property to use as the right hand side. + + + + Get the Sql operator to use for the . + + The string " <= " + + + + An that represents an "like" constraint. + + + The case sensitivity depends on the database settings for string + comparisons. Use if the + string comparison should not be case sensitive. + + + + + An that represents an "less than" constraint + between two properties. + + + + + Initializes a new instance of the class. + + Name of the LHS property. + The RHS projection. + + + + Initializes a new instance of the class. + + The LHS projection. + The RHS projection. + + + + Initializes a new instance of the class. + + The projection. + Name of the RHS property. + + + + Initializes a new instance of the class + that compares two mapped properties using an "less than" constraint. + + The name of the Property to use as the left hand side. + The name of the Property to use as the right hand side. + + + + Get the Sql operator to use for the . + + The string " < " + + + + Represents an strategy for matching strings using "like". + + + + + Initialize a new instance of the class. + + The code that identifies the match mode. + The friendly name of the match mode. + + The parameter intCode is used as the key of + to store instances and to ensure only instance of a particular + is created. + + + + + The string representation of the . + + The friendly name used to describe the . + + + + Convert the pattern, by appending/prepending "%" + + The string to convert to the appropriate match pattern. + + A that contains a "%" in the appropriate place + for the Match Strategy. + + + + + Match the entire string to the pattern + + + + + Match the start of the string to the pattern + + + + + Match the end of the string to the pattern + + + + + Match the pattern anywhere in the string + + + + + The that matches the entire string to the pattern. + + + + + Initialize a new instance of the class. + + + + + Converts the string to the Exact MatchMode. + + The string to convert to the appropriate match pattern. + The pattern exactly the same as it was passed in. + + + + The that matches the start of the string to the pattern. + + + + + Initialize a new instance of the class. + + + + + Converts the string to the Start MatchMode. + + The string to convert to the appropriate match pattern. + The pattern with a "%" appended at the end. + + + + The that matches the end of the string to the pattern. + + + + + Initialize a new instance of the class. + + + + + Converts the string to the End MatchMode. + + The string to convert to the appropriate match pattern. + The pattern with a "%" appended at the beginning. + + + + The that exactly matches the string + by appending "%" to the beginning and end. + + + + + Initialize a new instance of the class. + + + + + Converts the string to the Exact MatchMode. + + The string to convert to the appropriate match pattern. + The pattern with a "%" appended at the beginning and the end. + + + + An that negates another . + + + + + Initialize a new instance of the class for an + + + The to negate. + + + + An that represents "not null" constraint. + + + + + Initializes a new instance of the class. + + The projection. + + + + Initialize a new instance of the class for a named + Property that should not be null. + + The name of the Property in the class. + + + + An that represents "null" constraint. + + + + + Initializes a new instance of the class. + + The projection. + + + + Initialize a new instance of the class for a named + Property that should be null. + + The name of the Property in the class. + + + + + + + Represents an order imposed upon a + result set. + + + + + Constructor for Order. + + + + + + + Constructor for Order. + + + + + + + Render the SQL fragment + + + + + Ascending order + + + + + + + Ascending order + + + + + + + Descending order + + + + + + + Descending order + + + + + + + An that combines two s with an + "or" between them. + + + + + Initialize a new instance of the class for + two s. + + The to use as the left hand side. + The to use as the right hand side. + + + + Get the Sql operator to put between the two s. + + Returns "or" + + + + Gets the typed values for parameters in this projection + + The criteria. + The criteria query. + + + + + The criterion package may be used by applications as a framework for building + new kinds of Projection. However, it is intended that most applications will + simply use the built-in projection types via the static factory methods of this class.
+
+ The factory methods that take an alias allow the projected value to be referred to by + criterion and order instances. +
+
+ + + Create a distinct projection from a projection + + + + + + + Create a new projection list + + + + + + The query row count, ie. count(*) + + The RowCount projection mapped to an . + + + + The query row count, ie. count(*) + + The RowCount projection mapped to an . + + + + A property value count + + + + + + + A property value count + + + + + + + A distinct property value count + + + + + + + A property maximum value + + + + + + + A projection maximum value + + + + + + + A property minimum value + + + + + + + A projection minimum value + + + + + + + A property average value + + + + + + + A property average value + + + + + + + A property value sum + + + + + + + A property value sum + + + + + + + A SQL projection, a typed select clause fragment + + + + + + + + + A grouping SQL projection, specifying both select clause and group by clause fragments + + + + + + + + + + A grouping property value + + + + + + + A grouping projection value + + + + + + + A projected property value + + + + + + + A projected identifier value + + + + + + Assign an alias to a projection, by wrapping it + + + + + + + + Casts the projection result to the specified type. + + The type. + The projection. + + + + + Return a constant value + + The obj. + + + + + Return a constant value + + The obj. + + + + + + Calls the named + + Name of the function. + The type. + The projections. + + + + + Calls the specified + + the function. + The type. + The projections. + + + + + Conditionally return the true or false part, dependention on the criterion + + The criterion. + The when true. + The when false. + + + + + A factory for property-specific AbstractCriterion and projection instances + + + + + A property value, or grouped property value + + + + + Get a component attribute of this property + + + + + A comparison between a property value in the outer query and the + result of a subquery + + + + + A comparison between a property value in the outer query and the + result of a subquery + + + + + The base class for an that compares a single Property + to a value. + + + + + Initialize a new instance of the class for a named + Property and its value. + + The name of the Property in the class. + The value for the Property. + The SQL operation. + + + + Converts the SimpleExpression to a . + + A SqlString that contains a valid Sql fragment. + + + + + + + Gets the named Property for the Expression. + + A string that is the name of the Property. + + + + Gets the Value for the Expression. + + An object that is the value for the Expression. + + + + Get the Sql operator to use for the specific + subclass of . + + + + + A comparison between a constant value and the the result of a subquery + + + + + An that creates a SQLExpression. + The string {alias} will be replaced by the alias of the root entity. + + + This allows for database specific Expressions at the cost of needing to + write a correct . + + + + + + + + A SQL fragment. The string {alias} will be replaced by the alias of the root entity. + + + + + Gets the typed values for parameters in this projection + + The criteria. + The criteria query. + + + + + Factory class for AbstractCriterion instances that represent + involving subqueries. + Expression + Projection + AbstractCriterion + + + + + A property value, or grouped property value + + + + + Used to show a better debug display for dictionaries + + + + + + + + ::= + EXTRACT FROM + + ::= + | + + + + Represents HQL functions that can have different representations in different SQL dialects. + E.g. in HQL we can define function concat(?1, ?2) to concatenate two strings + p1 and p2. Target SQL function will be dialect-specific, e.g. (?1 || ?2) for + Oracle, concat(?1, ?2) for MySql, (?1 + ?2) for MS SQL. + Each dialect will define a template as a string (exactly like above) marking function + parameters with '?' followed by parameter's index (first index is 1). + + + + + Provides support routines for the HQL functions as used + in the various SQL Dialects + + Provides an interface for supporting various HQL functions that are + translated to SQL. The Dialect and its sub-classes use this interface to + provide details required for processing of the function. + + + + + The function return type + + The type of the first argument + + + + + + Render the function call as SQL. + + List of arguments + + SQL fragment for the fuction. + + + + Does this function have any arguments? + + + + + If there are no arguments, are parens required? + + + + + Applies the template to passed in arguments. + + args function arguments + generated SQL function call + + + + + ANSI-SQL substring + Documented in: + ANSI X3.135-1992 + American National Standard for Information Systems - Database Language - SQL + + + Syntax: + ::= + SUBSTRING FROM < start position> + [ FOR ] + ]]> + + + + + A SQLFunction implementation that emulates the ANSI SQL trim function + on dialects which do not support the full definition. However, this function + definition does assume the availability of ltrim, rtrim, and replace functions + which it uses in various combinations to emulate the desired ANSI trim() + functionality. + + + + + + + + + + + according to both the ANSI-SQL and EJB3 specs, trim can either take + exactly one parameter or a variable number of parameters between 1 and 4. + from the SQL spec: + ::= + TRIM + + ::= + [ [ ] [ ] FROM ] + + ::= + LEADING + | TRAILING + | BOTH + ]]> + If only trim specification is omitted, BOTH is assumed; + if trim character is omitted, space is assumed + + + + + ANSI-SQL style cast(foo as type) where the type is a NHibernate type + + + + + Delegate the values to a real type + + + The real return type of Cast is know only after the Cast is parsed. + This class was created in NH to remove the responsibility of the parser about know the + real return type. + + + + + Defines a mapping from a .NET to a SQL datatype. + This interface is intended to be implemented by applications that need custom types. + + Implementors should usually be immutable and MUST definately be threadsafe. + + + + Return a cacheable "disassembled" representation of the object. + the value to cache + the session + optional parent entity object (needed for collections) + the disassembled, deep cloned state + + + Reconstruct the object from its cached "disassembled" state. + the disassembled state from the cache + the session + the parent entity object + the the object + + + + Called before assembling a query result set from the query cache, to allow batch fetching + of entities missing from the second-level cache. + + + + + When implemented by a class, returns the SqlTypes for the columns mapped by this IType. + The that uses this IType.An array of s. + + + + When implemented by a class, returns how many columns are used to persist this type. + The that uses this IType.The number of columns this IType spans.MappingException + + + + When implemented by a class, should the parent be considered dirty, + given both the old and current field or element value? + The old valueThe current valueThe true if the field is dirty + + + + When implemented by a class, gets an instance of the object mapped by + this IType from the . + The that contains the values + The names of the columns in the that contain the + value to populate the IType with. + The object mapped by this IType. + Implementors should handle possibility of null values. + + + + + When implemented by a class, gets an instance of the object + mapped by this IType from the . + The that contains the valuesThe name of the column in the that contains the + value to populate the IType with.The object mapped by this IType. + Implementations should handle possibility of null values. + This method might be called if the IType is known to be a single-column type. + + + + + When implemented by a class, puts the value/values from the mapped + class into the . + The to put the values into.The object that contains the values.The index of the to start writing the values to.Indicates which columns are to be set. + Implementors should handle possibility of null values. + A multi-column type should be written to parameters starting from . + + + + + When implemented by a class, puts the value/values from the mapped + class into the . + + The to put the values into. + The object that contains the values. + The index of the to start writing the values to. + + Implementors should handle possibility of null values. + A multi-column type should be written to parameters starting from . + + + + + When implemented by a class, a representation of the value to be + embedded in an XML element + The object that contains the values.An Xml formatted string. + + + + When implemented by a class, returns a deep copy of the persistent + state, stopping at entities and at collections. + A Collection element or Entity fieldThe entityMode.The session factory.A deep copy of the object. + + + + When implemented by a class, retrieves an instance of the mapped class, + or the identifier of an entity or collection from a . + The that contains the values. + The names of the columns in the that contain the + value to populate the IType with. + the sessionThe parent EntityAn identifier or actual object mapped by this IType. + + This is useful for 2-phase property initialization - the second phase is a call to + ResolveIdentifier() + + + Most implementors of this method will just pass the call to NullSafeGet(). + + + + + + When implemented by a class, maps identifiers to Entities or Collections. + An identifier or value returned by Hydrate()The sessionThe parent EntityThe Entity or Collection referenced by this Identifier. + This is the second phase of 2-phase property initialization. + + + + + Given a hydrated, but unresolved value, return a value that may be used to + reconstruct property-ref associations. + + + + + + + + During merge, replace the existing (target) value in the entity we are merging to + with a new (original) value from the detached entity we are merging. For immutable + objects, or null values, it is safe to simply return the first parameter. For + mutable objects, it is safe to return a copy of the first parameter. For objects + with component values, it might make sense to recursively replace component values. + + the value from the detached entity being merged + the value in the managed entity + + + + + the value to be merged + + + + Compare two instances of the class mapped by this type for persistence + "equality" - equality of persistent state - taking a shortcut for + entity references. + + + + + boolean + + + + Compare two instances of the class mapped by this type for persistence + "equality" - equality of persistent state. + + + + + boolean + + + + Compare two instances of the class mapped by this type for persistence + "equality" - equality of persistent state. + + + + + + boolean + + + Get a hashcode, consistent with persistence "equality" + + + + + Get a hashcode, consistent with persistence "equality" + + + + + + compare two instances of the type + + + + + + Get the type of a semi-resolved value. + + + A representation of the value to be embedded in an XML element. + + + + + + Parse the XML representation of an instance. + + + an instance of the type + + + + Given an instance of the type, return an array of boolean, indicating + which mapped columns would be null. + + an instance of the type + + + + + When implemented by a class, gets the abbreviated name of the type. + The NHibernate type name. + + + + When implemented by a class, gets the returned + by the NullSafeGet() methods. + + The from the .NET framework. + + This is used to establish the class of an array of this Itype + + + + + When implemented by a class, gets the value indicating if the objects + of this IType are mutable. + true if the objects mapped by this IType are mutable. + With respect to the referencing object... + Entities and Collections are considered immutable because they manage their own internal state. + + + + + When implemented by a class, gets a value indicating if the implementor is castable to an an + true if this is an AssociationThis does not necessarily imply that the type actually represents an association. + + + + When implemented by a class, gets a value indicating if the implementor is a collection type + true if this is a . + + + + When implemented by a class, gets a value indicating if the implementor + is an . + true if this is an + If true, the implementation must be castable to . + A component type may own collections or associations and hence must provide certain extra functionality. + + + + + When implemented by a class, gets a value indicating if the implementor + extends + true if this is an + + + + + + + Emulation of locate() on Sybase + + + + + Initializes a new instance of the StandardSQLFunction class. + + SQL function name. + Whether the function accepts an asterisk (*) in place of arguments + + + + Initializes a new instance of the StandardSQLFunction class. + + SQL function name. + True if accept asterisk like argument + Return type for the fuction. + + + + Classic AVG sqlfunction that return types as it was done in Hibernate 3.1 + + + + + Classic COUNT sqlfunction that return types as it was done in Hibernate 3.1 + + + + + Classic SUM sqlfunction that return types as it was done in Hibernate 3.1 + + + + + Summary description for NoArgSQLFunction. + + + + + Emulation of coalesce() on Oracle, using multiple nvl() calls + + + + + Emulation of locate() on PostgreSQL + + + + + Provides a standard implementation that supports the majority of the HQL + functions that are translated to SQL. + + + The Dialect and its sub-classes use this class to provide details required + for processing of the associated function. + + + + + Provides a standard implementation that supports the majority of the HQL + functions that are translated to SQL. + + + The Dialect and its sub-classes use this class to provide details required + for processing of the associated function. + + + + + Initializes a new instance of the StandardSQLFunction class. + + SQL function name. + + + + Initializes a new instance of the StandardSQLFunction class. + + SQL function name. + Return type for the fuction. + + + + Initializes a new instance of the StandardSafeSQLFunction class. + + SQL function name. + Exact number of arguments expected. + + + + Initializes a new instance of the StandardSafeSQLFunction class. + + SQL function name. + Return type for the fuction. + Exact number of arguments expected. + + + + Support for slightly more general templating than StandardSQLFunction, + with an unlimited number of arguments. + + + + + A strategy abstraction for how locks are obtained in the underlying database. + + + All locking provided implemenations assume the underlying database supports + (and that the connection is in) at least read-committed transaction isolation. + The most glaring exclusion to this is HSQLDB which only offers support for + READ_UNCOMMITTED isolation. + + + + + + Acquire an appropriate type of lock on the underlying data that will + endure until the end of the current transaction. + + The id of the row to be locked + The current version (or null if not versioned) + The object logically being locked (currently not used) + The session from which the lock request originated + + + + A locking strategy where the locks are obtained through select statements. + + + + + For non-read locks, this is achieved through the Dialect's specific + SELECT ... FOR UPDATE syntax. + + + + + A locking strategy where the locks are obtained through update statements. + + This strategy is not valid for read style locks. + + + + Construct a locking strategy based on SQL UPDATE statements. + + The metadata for the entity to be locked. + Indictates the type of lock to be acquired. + + read-locks are not valid for this strategy. + + + + + Common implementation of schema reader. + + + This implementation of is based on the new of + .NET 2.0. + + + + + + This class is specific of NHibernate and supply DatabaseMetaData of Java. + In the .NET Framework, there is no direct equivalent. + + + Implementation is provide by a dialect. + + + + + Gets a description of the tables available for the catalog + + A catalog, retrieves those without a catalog + Schema pattern, retrieves those without the schema + A table name pattern + a list of table types to include + Each row + + + + Get the Table MetaData. + + The resultSet of . + Include FKs and indexes + + + + + Gets a description of the table columns available + + A catalog, retrieves those without a catalog + Schema pattern, retrieves those without the schema + A table name pattern + a columng name patterm + A description of the table columns available + + + + Get a description of the given table's indices and statistics. + + A catalog, retrieves those without a catalog + Schema pattern, retrieves those without the schema + A table name pattern + A description of the table's indices available + The result is relative to the schema collections "Indexes". + + + + Get a description of the given table's indices and statistics. + + A catalog, retrieves those without a catalog + Schema pattern, retrieves those without the schema + A table name pattern + The name of the index + A description of the table's indices available + The result is relative to the schema collections "IndexColumns". + + + + Gets a description of the foreign keys available + + A catalog, retrieves those without a catalog + Schema name, retrieves those without the schema + A table name + A description of the foreign keys available + + + + Get all reserved words + + A set of reserved words + + + + In the Java language, this field indicates that the database treats mixed-case, + quoted SQL identifiers as case-insensitive and stores them in mixed case. + + + + + In the Java language, this field indicates that the database treats mixed-case, + quoted SQL identifiers as case-insensitive and stores them in upper case. + + + + + In the Java language, this field indicates that the database treats mixed-case, + unquoted SQL identifiers as case-insensitive and stores them in upper case. + + + + + In the Java language, this field indicates that the database treats mixed-case, + quoted SQL identifiers as case-insensitive and stores them in lower case. + + + + + In the Java language, this field indicates that the database treats mixed-case, + unquoted SQL identifiers as case-insensitive and stores them in lower case, + + + + + The name of the column that represent the TABLE_NAME in the + returned by . + + + + + An SQL dialect for DB2 on iSeries OS/400. + + + The DB2400Dialect defaults the following configuration properties: + + + Property + Default Value + + + connection.driver_class + + + + + + + + An SQL dialect for DB2. + + + The DB2Dialect defaults the following configuration properties: + + + Property + Default Value + + + connection.driver_class + + + + + + + + Represents a dialect of SQL implemented by a particular RDBMS. Subclasses + implement NHibernate compatibility with different systems. + + + Subclasses should provide a public default constructor that Register() + a set of type mappings and default Hibernate properties. + + + + + + + + + + + Characters used for quoting sql identifiers + + + + + + + + + + + The base constructor for Dialect. + + + Every subclass should override this and call Register() with every except + , , , , + , . + + + The Default properties for this Dialect should also be set - such as whether or not to use outer-joins + and what the batch size should be. + + + + + Get an instance of the dialect specified by the current properties. + The specified Dialect + + + + Get de from a property bag (prop name ) + + The property bag. + An instance of . + When is null. + When the property bag don't contains de property . + + + + Get the name of the database type associated with the given + , + + The SqlType + The database type name used by ddl. + + + + Get the name of the database type associated with the given + . + + The SqlType + The datatype length + The datatype precision + The datatype scale + The database type name used by ddl. + + + + Get the name of the database type appropriate for casting operations + (via the CAST() SQL function) for the given typecode. + + The typecode + The database type name + + + + Subclasses register a typename for the given type code and maximum + column length. $l in the type name will be replaced by the column + length (if appropriate) + + The typecode + Maximum length of database type + The database type name + + + + Suclasses register a typename for the given type code. $l in the + typename will be replaced by the column length (if appropriate). + + The typecode + The database type name + + + + Get the name of the Hibernate associated with th given + typecode. + + The typecode + The Hibernate name. + + + + Get the name of the Hibernate associated + with the given typecode with the given storage + specification parameters. + + The typecode + The datatype length + The datatype precision + The datatype scale + The Hibernate name. + + + + Registers a Hibernate name for the given + type code and maximum column length. + + The typecode + The maximum length of database type + The Hibernate name + + + + Registers a Hibernate name for the given + type code. + + The typecode + The Hibernate name + + + + + + + + + + + The syntax used to add a foreign key constraint to a table. + + The FK constraint name. + The names of the columns comprising the FK + The table referenced by the FK + The explicit columns in the referencedTable referenced by this FK. + + if false, constraint should be explicit about which column names the constraint refers to + + the "add FK" fragment + + + + The syntax used to add a primary key constraint to a table + + + + + + Get a strategy instance which knows how to acquire a database-level lock + of the specified mode for this dialect. + + The persister for the entity to be locked. + The type of lock to be acquired. + The appropriate locking strategy. + + + + Given a lock mode, determine the appropriate for update fragment to use. + + The lock mode to apply. + The appropriate for update fragment. + + + + Get the FOR UPDATE OF column_list fragment appropriate for this + dialect given the aliases of the columns to be write locked. + + The columns to be write locked. + The appropriate FOR UPDATE OF column_list clause string. + + + + Get the FOR UPDATE OF column_list NOWAIT fragment appropriate + for this dialect given the aliases of the columns to be write locked. + + The columns to be write locked. + The appropriate FOR UPDATE colunm_list NOWAIT clause string. + + + + Modifies the given SQL by applying the appropriate updates for the specified + lock modes and key columns. + + the SQL string to modify + a map of lock modes indexed by aliased table names. + a map of key columns indexed by aliased table names. + the modified SQL string. + + The behavior here is that of an ANSI SQL SELECT FOR UPDATE. This + method is really intended to allow dialects which do not support + SELECT FOR UPDATE to achieve this in their own fashion. + + + + + Some dialects support an alternative means to SELECT FOR UPDATE, + whereby a "lock hint" is appends to the table name in the from clause. + + The lock mode to apply + The name of the table to which to apply the lock hint. + The table with any required lock hints. + + + + Return SQL needed to drop the named table. May (and should) use + some form of "if exists" clause, and cascade constraints. + + + + + + Generate a temporary table name given the bas table. + The table name from which to base the temp table name. + The generated temp table name. + + + + Does the dialect require that temporary table DDL statements occur in + isolation from other statements? This would be the case if the creation + would cause any current transaction to get committed implicitly. + + see the result matrix above. + + JDBC defines a standard way to query for this information via the + {@link java.sql.DatabaseMetaData#dataDefinitionCausesTransactionCommit()} + method. However, that does not distinguish between temporary table + DDL and other forms of DDL; MySQL, for example, reports DDL causing a + transaction commit via its driver, even though that is not the case for + temporary table DDL. +

+ Possible return values and their meanings:

    +
  • {@link Boolean#TRUE} - Unequivocally, perform the temporary table DDL in isolation.
  • +
  • {@link Boolean#FALSE} - Unequivocally, do not perform the temporary table DDL in isolation.
  • +
  • null - defer to the JDBC driver response in regards to {@link java.sql.DatabaseMetaData#dataDefinitionCausesTransactionCommit()}
  • +
+
+
+ + Do we need to drop the temporary table after use? + + + + Registers an OUT parameter which will be returing a + . How this is accomplished varies greatly + from DB to DB, hence its inclusion (along with {@link #getResultSet}) here. + + The callable statement. + The bind position at which to register the OUT param. + The number of (contiguous) bind positions used. + + + + Given a callable statement previously processed by , + extract the from the OUT parameter. + + The callable statement. + The extracted result set. + SQLException Indicates problems extracting the result set. + + + + The syntax used to drop a foreign key constraint from a table. + + The name of the foreign key constraint to drop. + + The SQL string to drop the foreign key constraint. + + + + + The syntax that is used to check if a constraint does not exists before creating it + + The table. + The name. + + + + + The syntax that is used to close the if for a constraint exists check, used + for dialects that requires begin/end for ifs + + The table. + The name. + + + + + The syntax that is used to check if a constraint exists before dropping it + + The table. + The name. + + + + + The syntax that is used to close the if for a constraint exists check, used + for dialects that requires begin/end for ifs + + The table. + The name. + + + + + The syntax used to drop a primary key constraint from a table. + + The name of the primary key constraint to drop. + + The SQL string to drop the primary key constraint. + + + + + The syntax used to drop an index constraint from a table. + + The name of the index constraint to drop. + + The SQL string to drop the primary key constraint. + + + + + Provided we , then attch the + "select identity" clause to the insert statement. + + The insert command + + The insert command with any necessary identity select clause attached. + Note, if == false then + the insert-string should be returned without modification. + + + + + Get the select command to use to retrieve the last generated IDENTITY + value for a particular table + + The table into which the insert was done + The PK column. + The type code. + The appropriate select command + + + + The syntax used during DDL to define a column as being an IDENTITY of + a particular type. + + The type code. + The appropriate DDL fragment. + + + + Generate the appropriate select statement to to retreive the next value + of a sequence. + + the name of the sequence + String The "nextval" select string. + This should be a "stand alone" select statement. + + + + Typically dialects which support sequences can drop a sequence + with a single command. + + The name of the sequence + The sequence drop commands + + This is convenience form of + to help facilitate that. + + Dialects which support sequences and can drop a sequence in a + single command need *only* override this method. Dialects + which support sequences but require multiple commands to drop + a sequence should instead override . + + + + + The multiline script used to drop a sequence. + + The name of the sequence + The sequence drop commands + + + + Generate the select expression fragment that will retrieve the next + value of a sequence as part of another (typically DML) statement. + + the name of the sequence + The "nextval" fragment. + + This differs from in that this + should return an expression usable within another statement. + + + + + Typically dialects which support sequences can create a sequence + with a single command. + + The name of the sequence + The sequence creation command + + This is convenience form of to help facilitate that. + Dialects which support sequences and can create a sequence in a + single command need *only* override this method. Dialects + which support sequences but require multiple commands to create + a sequence should instead override . + + + + + An optional multi-line form for databases which . + + The name of the sequence + The initial value to apply to 'create sequence' statement + The increment value to apply to 'create sequence' statement + The sequence creation commands + + + + Overloaded form of , additionally + taking the initial value and increment size to be applied to the sequence + definition. + + The name of the sequence + The initial value to apply to 'create sequence' statement + The increment value to apply to 'create sequence' statement + The sequence creation command + + The default definition is to suffix + with the string: " start with {initialValue} increment by {incrementSize}" where + {initialValue} and {incrementSize} are replacement placeholders. Generally + dialects should only need to override this method if different key phrases + are used to apply the allocation information. + + + + + Create a strategy responsible + for handling this dialect's variations in how joins are handled. + + This dialect's strategy. + + + + Create a strategy responsible + for handling this dialect's variations in how CASE statements are + handled. + + This dialect's strategy. + + + The SQL literal value to which this database maps boolean values. + The boolean value + The appropriate SQL literal. + + + + Add a LIMIT clause to the given SQL SELECT + + A Query in the form of a SqlString. + Offset of the first row to be returned by the query (zero-based) + Maximum number of rows to be returned by the query + A new SqlString that contains the LIMIT clause. + + + Apply s limit clause to the query. + The query to which to apply the limit. + Is the query requesting an offset? + the modified SQL + + Typically dialects utilize + limit caluses when they support limits. Thus, when building the + select command we do not actually need to know the limit or the offest + since we will just be using placeholders. +

+ Here we do still pass along whether or not an offset was specified + so that dialects not supporting offsets can generate proper exceptions. + In general, dialects will override one or the other of this method and + . + + + +

+ Checks to see if the name has been quoted. + + The name to check if it is quoted + true if name is already quoted. + + The default implementation is to compare the first character + to Dialect.OpenQuote and the last char to Dialect.CloseQuote + +
+ + + Quotes a name. + + The string that needs to be Quoted. + A QuotedName + +

+ This method assumes that the name is not already Quoted. So if the name passed + in is "name then it will return """name". It escapes the first char + - the " with "" and encloses the escaped string with OpenQuote and CloseQuote. +

+
+
+ + + Quotes a name for being used as a aliasname + + Original implementation calls + Name of the alias + A Quoted name in the format of OpenQuote + aliasName + CloseQuote + +

+ If the aliasName is already enclosed in the OpenQuote and CloseQuote then this + method will return the aliasName that was passed in without going through any + Quoting process. So if aliasName is passed in already Quoted make sure that + you have escaped all of the chars according to your DataBase's specifications. +

+
+
+ + + Quotes a name for being used as a columnname + + Original implementation calls + Name of the column + A Quoted name in the format of OpenQuote + columnName + CloseQuote + +

+ If the columnName is already enclosed in the OpenQuote and CloseQuote then this + method will return the columnName that was passed in without going through any + Quoting process. So if columnName is passed in already Quoted make sure that + you have escaped all of the chars according to your DataBase's specifications. +

+
+
+ + + Quotes a name for being used as a tablename + + Name of the table + A Quoted name in the format of OpenQuote + tableName + CloseQuote + +

+ If the tableName is already enclosed in the OpenQuote and CloseQuote then this + method will return the tableName that was passed in without going through any + Quoting process. So if tableName is passed in already Quoted make sure that + you have escaped all of the chars according to your DataBase's specifications. +

+
+
+ + + Quotes a name for being used as a schemaname + + Name of the schema + A Quoted name in the format of OpenQuote + schemaName + CloseQuote + +

+ If the schemaName is already enclosed in the OpenQuote and CloseQuote then this + method will return the schemaName that was passed in without going through any + Quoting process. So if schemaName is passed in already Quoted make sure that + you have escaped all of the chars according to your DataBase's specifications. +

+
+
+ + + Unquotes and unescapes an already quoted name + + Quoted string + Unquoted string + +

+ This method checks the string quoted to see if it is + quoted. If the string quoted is already enclosed in the OpenQuote + and CloseQuote then those chars are removed. +

+

+ After the OpenQuote and CloseQuote have been cleaned from the string quoted + then any chars in the string quoted that have been escaped by doubling them + up are changed back to a single version. +

+

+ The following quoted values return these results + "quoted" = quoted + "quote""d" = quote"d + quote""d = quote"d +

+

+ If this implementation is not sufficient for your Dialect then it needs to be overridden. + MsSql2000Dialect is an example of where UnQuoting rules are different. +

+
+
+ + + Unquotes an array of Quoted Names. + + strings to Unquote + an array of unquoted strings. + + This use UnQuote(string) for each string in the quoted array so + it should not need to be overridden - only UnQuote(string) needs + to be overridden unless this implementation is not sufficient. + + + + + Given a type code, determine an appropriate + null value to use in a select clause. + + The type code. + The appropriate select clause value fragment. + + One thing to consider here is that certain databases might + require proper casting for the nulls here since the select here + will be part of a UNION/UNION ALL. + + + + + Build an instance of the preferred by this dialect for + converting into NHibernate's ADOException hierarchy. + + The Dialect's preferred . + + The default Dialect implementation simply returns a converter based on X/Open SQLState codes. + + It is strongly recommended that specific Dialect implementations override this + method, since interpretation of a SQL error is much more accurate when based on + the ErrorCode rather than the SQLState. Unfortunately, the ErrorCode is a vendor-specific approach. + + + + + Retrieve a set of default Hibernate properties for this database. + + + + + Aggregate SQL functions as defined in general. This is + a case-insensitive hashtable! + + + The results of this method should be integrated with the + specialization's data. + + + + + The class (which implements ) + which acts as this dialects native generation strategy. + + The native generator class. + + Comes into play whenever the user specifies the native generator. + + + + + The keyword used to insert a generated value into an identity column (or null). + Need if the dialect does not support inserts that specify no column values. + + + + Get the select command used retrieve the names of all sequences. + The select command; or null if sequences are not supported. + + + + Get the command used to select a GUID from the underlying database. + (Optional operation.) + + The appropriate command. + + + Command used to create a table. + + + + Slight variation on . + The command used to create a multiset table. + + + Here, we have the command used to create a table when there is no primary key and + duplicate rows are expected. +

+ Most databases do not care about the distinction; originally added for + Teradata support which does care. + + + +

Command used to create a temporary table. +
+ + + Get any fragments needing to be postfixed to the command for + temporary table creation. + + + + + Should the value returned by + be treated as callable. Typically this indicates that JDBC escape + sytnax is being used... + + + + + Retrieve the command used to retrieve the current timestammp from the database. + + + + + The name of the database-specific SQL function for retrieving the + current timestamp. + + + + + The keyword used to insert a row without specifying any column values + + + + + The name of the SQL function that transforms a string to lowercase + + + + + The syntax used to add a column to a table. Note this is deprecated + + + + + The keyword used to specify a nullable column + + + + + Completely optional cascading drop clause + + + + + The keyword used to create a primary key constraint + + + + + Does this dialect support the ALTER TABLE syntax? + + + + + Do we need to drop constraints before dropping tables in the dialect? + + + + + Do we need to qualify index names with the schema name? + + + + + Does this dialect support the UNIQUE column syntax? + + + + Does this dialect support adding Unique constraints via create and alter table ? + + + + Does the dialect support the syntax 'drop table if exists NAME' + + + + + Does the dialect support the syntax 'drop table NAME if exists' + + + + Does this dialect support column-level check constraints? + True if column-level CHECK constraints are supported; false otherwise. + + + Does this dialect support table-level check constraints? + True if table-level CHECK constraints are supported; false otherwise. + + + + Get the string to append to SELECT statements to acquire locks + for this dialect. + + The appropriate FOR UPDATE clause string. + + + Is FOR UPDATE OF syntax supported? + True if the database supports FOR UPDATE OF syntax; false otherwise. + + + + Does this dialect support FOR UPDATE in conjunction with outer joined rows? + + True if outer joined rows can be locked via FOR UPDATE. + + + + Retrieves the FOR UPDATE NOWAIT syntax specific to this dialect + + The appropriate FOR UPDATE NOWAIT clause string. + + + Does this dialect support temporary tables? + + + Does this dialect support a way to retrieve the database's current timestamp value? + + + + Gives the best resolution that the database can use for storing + date/time values, in ticks. + + + + For example, if the database can store values with 100-nanosecond + precision, this property is equal to 1L. If the database can only + store values with 1-millisecond precision, this property is equal + to 10000L (number of ticks in a millisecond). + + + Used in TimestampType. + + + + + + Does this dialect support subselects? + + + + + Does this dialect support identity column key generation? + + + + + Does the dialect support some form of inserting and selecting + the generated IDENTITY value all in the same statement. + + + + + Whether this dialect has an identity clause added to the data type or a + completely separate identity data type. + + + + + Get the select command to use to retrieve the last generated IDENTITY value. + + The appropriate select command + + + + The keyword used to specify an identity column, if native key generation is supported + + + + + Does this dialect support sequences? + + + + + Does this dialect support "pooled" sequences. Not aware of a better + name for this. Essentially can we specify the initial and increment values? + + True if such "pooled" sequences are supported; false otherwise. + + + + + + Does this Dialect have some kind of LIMIT syntax? + + False, unless overridden. + + + + Does this Dialect support an offset? + + + + + Can parameters be used for a statement containing a LIMIT? + + + + + Does the LIMIT clause specify arguments in the "reverse" order + limit, offset instead of offset, limit? + + False, unless overridden. + Inheritors should return true if the correct order is limit, offset + + + + Does the LIMIT clause come at the start of the + SELECT statement rather than at the end? + + false, unless overridden + + + + Does the LIMIT clause take a "maximum" row number instead + of a total number of returned rows? + + True if limit is relative from offset; false otherwise. + + This is easiest understood via an example. Consider you have a table + with 20 rows, but you only want to retrieve rows number 11 through 20. + Generally, a limit with offset would say that the offset = 11 and the + limit = 10 (we only want 10 rows at a time); this is specifying the + total number of returned rows. Some dialects require that we instead + specify offset = 11 and limit = 20, where 20 is the "last" row we want + relative to offset (i.e. total number of rows = 20 - 11 = 9) + So essentially, is limit relative from offset? Or is limit absolute? + + + + + The opening quote for a quoted identifier. + + + + + The closing quote for a quoted identifier. + + + + + Does this dialect support UNION ALL, which is generally a faster variant of UNION? + True if UNION ALL is supported; false otherwise. + + + + + Does this dialect support empty IN lists? + For example, is [where XYZ in ()] a supported construct? + + True if empty in lists are supported; false otherwise. + + + + Are string comparisons implicitly case insensitive. + In other words, does [where 'XYZ' = 'xyz'] resolve to true? + + True if comparisons are case insensitive. + + + + Is this dialect known to support what ANSI-SQL terms "row value + constructor" syntax; sometimes called tuple syntax. +

+ Basically, does it support syntax like + "... where (FIRST_NAME, LAST_NAME) = ('Steve', 'Ebersole') ...". +

+ + True if this SQL dialect is known to support "row value + constructor" syntax; false otherwise. + +
+ + + If the dialect supports {@link #supportsRowValueConstructorSyntax() row values}, + does it offer such support in IN lists as well? +

+ For example, "... where (FIRST_NAME, LAST_NAME) IN ( (?, ?), (?, ?) ) ..." +

+ + True if this SQL dialect is known to support "row value + constructor" syntax in the IN list; false otherwise. + +
+ + + Should LOBs (both BLOB and CLOB) be bound using stream operations (i.e. + {@link java.sql.PreparedStatement#setBinaryStream}). + + True if BLOBs and CLOBs should be bound using stream operations. + + + + Does this dialect support parameters within the select clause of + INSERT ... SELECT ... statements? + + True if this is supported; false otherwise. + + + + Does this dialect support asking the result set its positioning + information on forward only cursors. Specifically, in the case of + scrolling fetches, Hibernate needs to use + {@link java.sql.ResultSet#isAfterLast} and + {@link java.sql.ResultSet#isBeforeFirst}. Certain drivers do not + allow access to these methods for forward only cursors. +

+ NOTE : this is highly driver dependent! +

+ + True if methods like {@link java.sql.ResultSet#isAfterLast} and + {@link java.sql.ResultSet#isBeforeFirst} are supported for forward + only cursors; false otherwise. + +
+ + + Does this dialect support definition of cascade delete constraints + which can cause circular chains? + + True if circular cascade delete constraints are supported; false otherwise. + + + + Are subselects supported as the left-hand-side (LHS) of + IN-predicates. + + In other words, is syntax like "... {subquery} IN (1, 2, 3) ..." supported? + + True if subselects can appear as the LHS of an in-predicate;false otherwise. + + + + Expected LOB usage pattern is such that I can perform an insert + via prepared statement with a parameter binding for a LOB value + without crazy casting to JDBC driver implementation-specific classes... +

+ Part of the trickiness here is the fact that this is largely + driver dependent. For example, Oracle (which is notoriously bad with + LOB support in their drivers historically) actually does a pretty good + job with LOB support as of the 10.2.x versions of their drivers... +

+ + True if normal LOB usage patterns can be used with this driver; + false if driver-specific hookiness needs to be applied. + +
+ + Does the dialect support propagating changes to LOB + values back to the database? Talking about mutating the + internal value of the locator as opposed to supplying a new + locator instance... +

+ For BLOBs, the internal value might be changed by: + {@link java.sql.Blob#setBinaryStream}, + {@link java.sql.Blob#setBytes(long, byte[])}, + {@link java.sql.Blob#setBytes(long, byte[], int, int)}, + or {@link java.sql.Blob#truncate(long)}. +

+ For CLOBs, the internal value might be changed by: + {@link java.sql.Clob#setAsciiStream(long)}, + {@link java.sql.Clob#setCharacterStream(long)}, + {@link java.sql.Clob#setString(long, String)}, + {@link java.sql.Clob#setString(long, String, int, int)}, + or {@link java.sql.Clob#truncate(long)}. +

+ NOTE : I do not know the correct answer currently for + databases which (1) are not part of the cruise control process + or (2) do not {@link #supportsExpectedLobUsagePattern}. +

+ True if the changes are propagated back to the database; false otherwise. +
+ + + Is it supported to materialize a LOB locator outside the transaction in + which it was created? +

+ Again, part of the trickiness here is the fact that this is largely + driver dependent. +

+ NOTE: all database I have tested which {@link #supportsExpectedLobUsagePattern()} + also support the ability to materialize a LOB outside the owning transaction... +

+ True if unbounded materialization is supported; false otherwise. +
+ + + Does this dialect support referencing the table being mutated in + a subquery. The "table being mutated" is the table referenced in + an UPDATE or a DELETE query. And so can that table then be + referenced in a subquery of said UPDATE/DELETE query. +

+ For example, would the following two syntaxes be supported:

    +
  • delete from TABLE_A where ID not in ( select ID from TABLE_A )
  • +
  • update TABLE_A set NON_ID = 'something' where ID in ( select ID from TABLE_A)
  • +
+
+ True if this dialect allows references the mutating table from a subquery. +
+ + Does the dialect support an exists statement in the select clause? + True if exists checks are allowed in the select clause; false otherwise. + + + + For the underlying database, is READ_COMMITTED isolation implemented by + forcing readers to wait for write locks to be released? + + True if writers block readers to achieve READ_COMMITTED; false otherwise. + + + + For the underlying database, is REPEATABLE_READ isolation implemented by + forcing writers to wait for read locks to be released? + + True if readers block writers to achieve REPEATABLE_READ; false otherwise. + + + + Does this dialect support using a JDBC bind parameter as an argument + to a function or procedure call? + + True if the database supports accepting bind params as args; false otherwise. + + + + The class (which implements ) + which acts as this dialects identity-style generation strategy. + + The native generator class. + + Comes into play whenever the user specifies the "identity" generator. + + + + + Defines a contract for implementations that can extract the name of a violated + constraint from a SQLException that is the result of that constraint violation. + + + + + Extract the name of the violated constraint from the given SQLException. + + The exception that was the result of the constraint violation. + The extracted constraint name. + + + + + + + + + + + + + + + + Add a LIMIT clause to the given SQL SELECT + + A Query in the form of a SqlString. + Offset of the first row is not zero + A new SqlString that contains the LIMIT clause. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Summary description for FirebirdDialect. + + + The FirebirdDialect defaults the following configuration properties: + + + Property + Default Value + + + connection.driver_class + + + + + + + + Add a FIRST x [SKIP] y clause to the given SQL SELECT + + A Query in the form of a SqlString. + Maximum number of rows to be returned by the query + Offset of the first row to process in the result set + A new SqlString that contains the FIRST clause. + + + + + + + A generic SQL dialect which may or may not work on any actual databases + + + + + + + + + + + Summary description for InformixDialect. + This dialect is intended to work with IDS version 7.31 + However I can test only version 10.00 as I have only this version at work + + + The InformixDialect defaults the following configuration properties: + + + ConnectionDriver + NHibernate.Driver.OdbcDriver + PrepareSql + true + + + connection.driver_class + + + + + + + + + + + Get the FOR UPDATE OF column_list fragment appropriate for this + dialect given the aliases of the columns to be write locked. + + The columns to be write locked. + The appropriate FOR UPDATE OF column_list clause string. + + + + Does the dialect require that temporary table DDL statements occur in + isolation from other statements? This would be the case if the creation + would cause any current transaction to get committed implicitly. + + see the result matrix above. + + JDBC defines a standard way to query for this information via the + {@link java.sql.DatabaseMetaData#dataDefinitionCausesTransactionCommit()} + method. However, that does not distinguish between temporary table + DDL and other forms of DDL; MySQL, for example, reports DDL causing a + transaction commit via its driver, even though that is not the case for + temporary table DDL. +

+ Possible return values and their meanings:

    +
  • {@link Boolean#TRUE} - Unequivocally, perform the temporary table DDL in isolation.
  • +
  • {@link Boolean#FALSE} - Unequivocally, do not perform the temporary table DDL in isolation.
  • +
  • null - defer to the JDBC driver response in regards to {@link java.sql.DatabaseMetaData#dataDefinitionCausesTransactionCommit()}
  • +
+
+
+ + + Get the select command to use to retrieve the last generated IDENTITY + value for a particular table + + The table into which the insert was done + The PK column. + The type code. + The appropriate select command + + + + The syntax used during DDL to define a column as being an IDENTITY of + a particular type. + + The type code. + The appropriate DDL fragment. + + + + Create a strategy responsible + for handling this dialect's variations in how joins are handled. + + This dialect's strategy. + + + The SQL literal value to which this database maps boolean values. + The boolean value + The appropriate SQL literal. + + + Apply s limit clause to the query. + The query to which to apply the limit. + Offset of the first row to be returned by the query (zero-based) + Maximum number of rows to be returned by the query + the modified SQL + + Typically dialects utilize + limit caluses when they support limits. Thus, when building the + select command we do not actually need to know the limit or the offest + since we will just be using placeholders. +

+ Here we do still pass along whether or not an offset was specified + so that dialects not supporting offsets can generate proper exceptions. + In general, dialects will override one or the other of this method and + . + + + +

+ The keyword used to insert a generated value into an identity column (or null). + Need if the dialect does not support inserts that specify no column values. + +
+ + Command used to create a temporary table. + + + + Get any fragments needing to be postfixed to the command for + temporary table creation. + + + + + Should the value returned by + be treated as callable. Typically this indicates that JDBC escape + sytnax is being used... + + + + + Retrieve the command used to retrieve the current timestammp from the database. + + + + + The name of the database-specific SQL function for retrieving the + current timestamp. + + + + + + + Is FOR UPDATE OF syntax supported? + True if the database supports FOR UPDATE OF syntax; false otherwise. + + + + Does this dialect support FOR UPDATE in conjunction with outer joined rows? + + True if outer joined rows can be locked via FOR UPDATE. + + + Does this dialect support temporary tables? + + + Does this dialect support a way to retrieve the database's current timestamp value? + + + + Whether this dialect have an Identity clause added to the data type or a + completely seperate identity data type + + + + + The syntax that returns the identity value of the last insert, if native + key generation is supported + + + + + The keyword used to specify an identity column, if native key generation is supported + + + + + Does this dialect support sequences? + + + + + Does this Dialect have some kind of LIMIT syntax? + + False, unless overridden. + + + + Does this Dialect support an offset? + + + + + Can parameters be used for a statement containing a LIMIT? + + + + + Does the LIMIT clause come at the start of the + SELECT statement rather than at the end? + + false, unless overridden + + + + Does this dialect support UNION ALL, which is generally a faster variant of UNION? + True if UNION ALL is supported; false otherwise. + + + + + Knows how to extract a violated constraint name from an error message based on the + fact that the constraint name is templated within the message. + + + + + Extracts the constraint name based on a template (i.e., templateStartconstraintNametemplateEnd). + + The pattern denoting the start of the constraint name within the message. + The pattern denoting the end of the constraint name within the message. + The templated error message containing the constraint name. + The found constraint name, or null. + + + + Extract the name of the violated constraint from the given SQLException. + + The exception that was the result of the constraint violation. + The extracted constraint name. + + + + Extract the name of the violated constraint from the given DbException. + + The exception that was the result of the constraint violation. + The extracted constraint name. + + + + Summary description for InformixDialect. + This dialect is intended to work with IDS version 9.40 + + + The InformixDialect defaults the following configuration properties: + + + ConnectionDriver + NHibernate.Driver.OdbcDriver + PrepareSql + true + + + connection.driver_class + + + + + + + + + + + Generate the appropriate select statement to to retreive the next value + of a sequence. + + the name of the sequence + String The "nextval" select string. + This should be a "stand alone" select statement. + + + + Generate the select expression fragment that will retrieve the next + value of a sequence as part of another (typically DML) statement. + + the name of the sequence + The "nextval" fragment. + + This differs from in that this + should return an expression usable within another statement. + + + + + Create a strategy responsible + for handling this dialect's variations in how joins are handled. + + This dialect's strategy. + + + Get the select command used retrieve the names of all sequences. + The select command; or null if sequences are not supported. + + + + Does this dialect support sequences? + + + + + Does this dialect support "pooled" sequences. Not aware of a better + name for this. Essentially can we specify the initial and increment values? + + True if such "pooled" sequences are supported; false otherwise. + + + + Does this Dialect have some kind of LIMIT syntax? + + False, unless overridden. + + + + Does this Dialect support an offset? + + + + + Summary description for InformixDialect. + This dialect is intended to work with IDS version 10.00 + + + The InformixDialect defaults the following configuration properties: + + + ConnectionDriver + NHibernate.Driver.OdbcDriver + PrepareSql + true + + + connection.driver_class + + + + + + + + + + + Does this Dialect have some kind of LIMIT syntax? + + False, unless overridden. + + + + Does this Dialect support an offset? + + + + + An SQL dialect for IngresSQL. + + + The IngresDialect defaults the following configuration properties: + + + Property + Default Value + + + use_outer_join + + + + connection.driver_class + + + + + + + + An SQL dialect compatible with Microsoft SQL Server 2000. + + + The MsSql2000Dialect defaults the following configuration properties: + + + Property + Default Value + + + use_outer_join + + + + connection.driver_class + + + + prepare_sql + + + + + + + + + + + Generates the string to drop the table using SQL Server syntax. + + The name of the table to drop. + The SQL with the inserted. + + + + Add a LIMIT (TOP) clause to the given SQL SELECT + + A Query in the form of a SqlString. + Maximum number of rows to be returned by the query + Offset of the first row to process in the result set + A new SqlString that contains the LIMIT clause. + + + + + + + + + MsSql does not require the OpenQuote to be escaped as long as the first char + is an OpenQuote. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Does this Dialect have some kind of LIMIT syntax? + + True, we'll use the SELECT TOP nn syntax. + + + + Does this Dialect support an offset? + + + + + Can parameters be used for a statement containing a LIMIT? + + + + + Does the LIMIT clause take a "maximum" row number + instead of a total number of returned rows? + + false, unless overridden + + + + Add a LIMIT clause to the given SQL SELECT + + The to base the limit query off of. + Offset of the first row to be returned by the query (zero-based) + Maximum number of rows to be returned by the query + A new with the LIMIT clause applied. + + The LIMIT SQL will look like + + + SELECT + TOP last (columns) + FROM + (SELECT (columns), ROW_NUMBER() OVER(ORDER BY {original order by, with un-aliased column names) as __hibernate_sort_row + {original from}) as query + WHERE query.__hibernate_sort_row > offset + ORDER BY query.__hibernate_sort_row + + + + Note that we need to add explicitly specify the columns, because we need to be able to use them + in a paged subselect. NH-1155 + + + + + Indicates whether the string fragment contains matching parenthesis + + the statement to evaluate + true if the statment contains no parenthesis or an equal number of + opening and closing parenthesis;otherwise false + + + + Sql Server 2005 supports a query statement that provides LIMIT + functionality. + + true + + + + Sql Server 2005 supports a query statement that provides LIMIT + functionality with an offset. + + true + + + + Sql Server 2005 supports a query statement that provides LIMIT + functionality with an offset. + + false + + + + This specialized string tokenizier will break a string to tokens, taking + into account single quotes, parenthesis and commas and [ ] + Notice that we aren't differenciating between [ ) and ( ] on purpose, it would complicate + the code and it is not legal at any rate. + + + + + An SQL dialect compatible with Microsoft SQL Server 7. + + + There have been no test run with this because the NHibernate team does not + have a machine with Sql 7 installed on it. But there have been users using + Ms Sql 7 with NHibernate. As issues with Ms Sql 7 and NHibernate become known + this Dialect will be updated. + + + + + Uses @@identity to get the Id value. + + + There is a well known problem with @@identity and triggers that insert into + rows into other tables that also use an identity column. The only way I know + of to get around this problem is to upgrade your database server to Ms Sql 2000. + + + + + A dialect for SQL Server Everywhere (SQL Server CE). + + + + + A SQL dialect for MySQL + + + The MySQLDialect defaults the following configuration properties: + + + Property + Default Value + + + use_outer_join + + + + connection.driver_class + + + + + + + + + + + + + + + + Create the SQL string to drop a foreign key constraint. + + The name of the foreign key to drop. + The SQL string to drop the foreign key constraint. + + + + Create the SQL string to drop a primary key constraint. + + The name of the primary key to drop. + The SQL string to drop the primary key constraint. + + + + Create the SQL string to drop an index. + + The name of the index to drop. + The SQL string to drop the index constraint. + + + + + + + + + + + + + + + + + + + + + + + + + + + + A dialect specifically for use with Oracle 10g. + + + The main difference between this dialect and + is the use of "ANSI join syntax" here... + + + + + A dialect for Oracle 8i. + + + + + Support for the oracle proprietary join syntax... + + The orqacle join fragment + + + + Map case support to the Oracle DECODE function. Oracle did not + add support for CASE until 9i. + + The oracle CASE -> DECODE fragment + + + + Allows access to the basic + implementation... + + The mapping type + The appropriate select cluse fragment + + + + It's a immature version, it just work. + An SQL dialect for Oracle Lite + + + The OracleLiteDialect defaults the following configuration properties: + + + Property + Default Value + + + use_outer_join + + + + connection.driver_class + + + + + + + + + + + + + + An SQL dialect for PostgreSQL 8.1 and above. + + + + PostgreSQL 8.1 supports FOR UPDATE ... NOWAIT syntax. + + + PostgreSQL supports Identity column using the "SERIAL" type. + Serial type is a "virtual" type that will automatically: + + + Create a sequence named tablename_colname_seq. + Set the default value of this column to the next value of the + sequence. (using function nextval('tablename_colname_seq')) + Add a "NOT NULL" constraint to this column. + Set the sequence as "owned by" the table. + + + To insert the next value of the sequence into the serial column, + exclude the column from the list of columns + in the INSERT statement or use the DEFAULT key word. + + + If the table or the column is dropped, the sequence is dropped too. + + + + + + + An SQL dialect for PostgreSQL. + + + The PostgreSQLDialect defaults the following configuration properties: + + + Property + Default Value + + + use_outer_join + + + + connection.driver_class + + + + + + + + + + + + + + Offset of the first row to process in the result set is non-zero + + + + PostgreSQL requires to cast NULL values to correctly handle UNION/UNION ALL + + See + PostgreSQL BUG #1847: Error in some kind of UNION query. + + The type code. + null casted as : "null::sqltypename" + + + + + + + + + PostgreSQL supports UNION ALL clause + + Reference: + PostgreSQL 8.0 UNION Clause documentation + + + + + + PostgreSQL supports serial and serial4 type for 4 bytes integer auto increment column. + bigserial or serial8 can be used for 8 bytes integer auto increment column. + + bigserial if equal Int64, + serial otherwise + + + + PostgreSQL supports Identity column using the "SERIAL" type. + + + + + PostgreSQL doesn't have type in identity column. + + + To create an identity column it uses the SQL syntax + CREATE TABLE tablename (colname SERIAL); or + CREATE TABLE tablename (colname BIGSERIAL); + + + + + The sql syntax to insert a row without specifying any column in PostgreSQL is + INSERT INTO table DEFAULT VALUES; + + + + + PostgreSQL 8.1 and above defined the fuction lastval() that returns the + value of the last sequence that nextval() was used on in the current session. + Call lastval() if nextval() has not yet been called in the current + session throw an exception. + + + + + An SQL dialect for PostgreSQL 8.2 and above. + + + PostgreSQL 8.2 supports DROP TABLE IF EXISTS tablename + and DROP SEQUENCE IF EXISTS sequencename syntax. + See for more information. + + + + + A SQL dialect for SQLite. + + +

+ Author: Ioan Bizau +

+
+
+ + + + + + + + Add a LIMIT N clause to the given SQL SELECT + + A Query in the form of a SqlString. + Maximum number of rows to be returned by the query + Offset of the first row to process in the result set + A new SqlString that contains the LIMIT clause. + + + + This is a subclass of SybaseDialect for sybase 11 databases (specifically tested against 11.9.2). 11.9.2 does not support ANSI JOINs + therefore we have to provide a special join fragment for left/right joins (*= and =* respectively). + + + + + An SQL dialect compatible with Sybase. + + +

+ This dialect probably will not work with schema-export. If anyone out there + can fill in the ctor with DbTypes to Strings that would be helpful. +

+ The SybaseDialect defaults the following configuration properties: + + + Property + Default Value + + + use_outer_join + + + + connection.driver_class + + + + prepare_sql + + + +
+
+ + + + + + Sybase does not support quoted aliases, this function thus returns + aliasName as is. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This class is basically a port of the hibernate 3.2 Sybase 11 join fragment. It uses concepts from that join fragment and the Oracle join fragment in NHibernate + + + + + Represents a SQL JOIN + + + + + An SQL dialect compatible with Sybase. + + +

+ This dialect probably will not work with schema-export. If anyone out there + can fill in the ctor with DbTypes to Strings that would be helpful. +

+ The SybaseDialect defaults the following configuration properties: + + + Property + Default Value + + + use_outer_join + + + + connection.driver_class + + + + prepare_sql + + + +
+
+ + + + + + Sybase does not support quoted aliases, this function thus returns + aliasName as is. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + An SQL dialect for Sybase Adaptive Server Anywhere 9.0/10.0 + + +

+ This dialect probably will not work with schema-export. If anyone out there + can fill in the ctor with DbTypes to Strings that would be helpful. +

+ The SybaseAnywhereDialect defaults the following configuration properties: + + + Property + Default Value + + + use_outer_join + + + + connection.driver_class + + + + prepare_sql + + + +
+
+ + + + + + + + + + + + ASA does not require to drop constraint before dropping tables, and DROP statement + syntax used by Hibernate to drop constraint is not compatible with ASA, so disable it. + Comments matchs SybaseAnywhereDialect from Hibernate-3.1 src + + + + + This class maps a DbType to names. + + + Associations may be marked with a capacity. Calling the Get() + method with a type and actual size n will return the associated + name with smallest capacity >= n, if available and an unmarked + default type otherwise. + Eg, setting + + Names.Put(DbType, "TEXT" ); + Names.Put(DbType, 255, "VARCHAR($l)" ); + Names.Put(DbType, 65534, "LONGVARCHAR($l)" ); + + will give you back the following: + + Names.Get(DbType) // --> "TEXT" (default) + Names.Get(DbType,100) // --> "VARCHAR(100)" (100 is in [0:255]) + Names.Get(DbType,1000) // --> "LONGVARCHAR(1000)" (100 is in [256:65534]) + Names.Get(DbType,100000) // --> "TEXT" (default) + + On the other hand, simply putting + + Names.Put(DbType, "VARCHAR($l)" ); + + would result in + + Names.Get(DbType) // --> "VARCHAR($l)" (will cause trouble) + Names.Get(DbType,100) // --> "VARCHAR(100)" + Names.Get(DbType,1000) // --> "VARCHAR(1000)" + Names.Get(DbType,10000) // --> "VARCHAR(10000)" + + + + + + Get default type name for specified type + + the type key + the default type name associated with the specified key + + + + Get the type name specified type and size + + the type key + the SQL length + the SQL scale + the SQL precision + + The associated name with smallest capacity >= size if available and the + default type name otherwise + + + + + Set a type name for specified type key and capacity + + the type key + the (maximum) type size/length + The associated name + + + + + + + + + + + The ASAClientDriver Driver provides a database driver for Adaptive Server Anywhere 10.0. + + + + + Base class for the implementation of IDriver + + + + + A strategy for describing how NHibernate should interact with the different .NET Data + Providers. + + + + The IDriver interface is not intended to be exposed to the application. + Instead it is used internally by NHibernate to obtain connection objects, command objects, and + to generate and prepare IDbCommands. Implementors should provide a + public default constructor. + + + This is the interface to implement, or you can inherit from + if you have an ADO.NET data provider that NHibernate does not have built in support for. + To use the driver, NHibernate property connection.driver_class should be + set to the assembly-qualified name of the driver class. + + + key="connection.driver_class" + value="FullyQualifiedClassName, AssemblyName" + + + + + + Configure the driver using . + + + + + Creates an uninitialized IDbConnection object for the specific Driver + + + + + Generates an IDbCommand from the SqlString according to the requirements of the DataProvider. + + The of the command to generate. + The SqlString that contains the SQL. + The types of the parameters to generate for the command. + An IDbCommand with the CommandText and Parameters fully set. + + + + Prepare the by calling . + May be a no-op if the driver does not support preparing commands, or for any other reason. + + + + + + Generates an IDbDataParameter for the IDbCommand. It does not add the IDbDataParameter to the IDbCommand's + Parameter collection. + + The IDbCommand to use to create the IDbDataParameter. + The name to set for IDbDataParameter.Name + The SqlType to set for IDbDataParameter. + An IDbDataParameter ready to be added to an IDbCommand. + + + + Does this Driver support having more than 1 open IDataReader with + the same IDbConnection. + + + + A value of indicates that an exception would be thrown if NHibernate + attempted to have 2 IDataReaders open using the same IDbConnection. NHibernate + (since this version is a close to straight port of Hibernate) relies on the + ability to recursively open 2 IDataReaders. If the Driver does not support it + then NHibernate will read the values from the IDataReader into an . + + + A value of will result in greater performance because an IDataReader can be used + instead of the . So if the Driver supports it then make sure + it is set to . + + + + + + Can we issue several select queries in a single query, and get + several result sets back? + + + + + How we separate the queries when we use multiply queries. + + + + + Change the parameterName into the correct format IDbCommand.CommandText + for the ConnectionProvider + + The unformatted name of the parameter + A parameter formatted for an IDbCommand.CommandText + + + + Changes the parameterName into the correct format for an IDbParameter + for the Driver. + + + For SqlServerConnectionProvider it will change id to @id + + The unformatted name of the parameter + A parameter formatted for an IDbParameter. + + + + Generates an IDbDataParameter for the IDbCommand. It does not add the IDbDataParameter to the IDbCommand's + Parameter collection. + + The IDbCommand to use to create the IDbDataParameter. + The name to set for IDbDataParameter.Name + The SqlType to set for IDbDataParameter. + An IDbDataParameter ready to be added to an IDbCommand. + + + + Override to make any adjustments to the IDbCommand object. (e.g., Oracle custom OUT parameter) + Parameters have been bound by this point, so their order can be adjusted too. + This is analagous to the RegisterResultSetOutParameter() function in Hibernate. + + + + + Does this Driver require the use of a Named Prefix in the SQL statement. + + + For example, SqlClient requires select * from simple where simple_id = @simple_id + If this is false, like with the OleDb provider, then it is assumed that + the ? can be a placeholder for the parameter in the SQL statement. + + + + + Does this Driver require the use of the Named Prefix when trying + to reference the Parameter in the Command's Parameter collection. + + + This is really only useful when the UseNamedPrefixInSql == true. When this is true the + code will look like: + IDbParameter param = cmd.Parameters["@paramName"] + if this is false the code will be + IDbParameter param = cmd.Parameters["paramName"]. + + + + + The Named Prefix for parameters. + + + Sql Server uses "@" and Oracle uses ":". + + + + + Does this Driver support IDbCommand.Prepare(). + + + + A value of indicates that an exception would be thrown or the + company that produces the Driver we are wrapping does not recommend using + IDbCommand.Prepare(). + + + A value of indicates that calling IDbCommand.Prepare() will function + fine on this Driver. + + + + + + Initializes a new instance of with + type names that are loaded from the specified assembly. + + Assembly to load the types from. + Connection type name. + Command type name. + + + + Initializes a new instance of the class. + + + Thrown when the iAnywhere.Data.SQLAnywhere assembly is not and can not be loaded. + + + + + iAnywhere.Data.SQLAnywhere uses named parameters in the sql. + + - Sybase uses String.Empty in the sql. + + + + iAnywhere.Data.SQLAnywhere use the string.Empty to locate parameters in sql. + + + + + The ASAClientDriver Driver provides a database driver for Adaptive Server Anywhere 9.0. + + + + + Initializes a new instance of the class. + + + Thrown when the ASA.Data.AsaClient assembly is not and can not be loaded. + + + + + iAnywhere.Data.AsaClient uses named parameters in the sql. + + - Sybase uses String.Empty in the sql. + + + + iAnywhere.Data.AsaClient use the string.Empty to locate parameters in sql. + + + + + A NHibernate Driver for using the IBM.Data.DB2.iSeries DataProvider. + + + + + Initializes a new instance of the class. + + + Thrown when the IBM.Data.DB2.iSeries assembly can not be loaded. + + + + + A NHibernate Driver for using the IBM.Data.DB2 DataProvider. + + + + + Initializes a new instance of the class. + + + Thrown when the IBM.Data.DB2 assembly can not be loaded. + + + + + A NHibernate Driver for using the Firebird data provider located in + FirebirdSql.Data.FirebirdClient assembly. + + + + + Initializes a new instance of the class. + + + Thrown when the FirebirdSql.Data.Firebird assembly can not be loaded. + + + + + A NHibernate Driver for using the FirebirdSql.Data.Firebird DataProvider. + + + + + Initializes a new instance of the class. + + + Thrown when the FirebirdSql.Data.Firebird assembly can not be loaded. + + + + + A NHibernate Driver for using the Informix DataProvider + + + + + Initializes a new instance of the class. + + + Thrown when the IBM.Data.Informix assembly can not be loaded. + + + + + A NHibernate Driver for using the Ingres DataProvider + + + + + + + Provides a database driver for MySQL. + + + + In order to use this driver you must have the assembly MySql.Data.dll available for + NHibernate to load, including its dependencies (ICSharpCode.SharpZipLib.dll is required by + the assembly MySql.Data.dll as of the time of this writing). + + + Please check the product's website + for any updates and/or documentation regarding MySQL. + + + + + + Initializes a new instance of the class. + + + Thrown when the MySql.Data assembly can not be loaded. + + + + + MySql.Data uses named parameters in the sql. + + - MySql uses ? in the sql. + + + + + + + MySql.Data use the ? to locate parameters in sql. + + ? is used to locate parameters in sql. + + + + The MySql.Data driver does NOT support more than 1 open IDataReader + with only 1 IDbConnection. + + - it is not supported. + + + + MySql.Data does not support preparing of commands. + + - it is not supported. + + With the Gamma MySql.Data provider it is throwing an exception with the + message "Expected End of data packet" when a select command is prepared. + + + + + Some Data Providers (ie - SqlClient) do not support Multiple Active Result Sets (MARS). + NHibernate relies on being able to create MARS to read Components and entities inside + of Collections. + + + This is a completely off-line DataReader - the underlying IDataReader that was used to create + this has been closed and no connections to the Db exists. + + + + + Creates a NDataReader from a + + The to get the records from the Database. + if we are loading the in the middle of reading it. + + NHibernate attempts to not have to read the contents of an into memory until it absolutely + has to. What that means is that it might have processed some records from the and will + pick up the midstream so that the underlying can be closed + so a new one can be opened. + + + + + Sets the values that can be cached back to null and sets the + index of the cached column to -1 + + + + + + + + + + + + + + + + + Takes care of freeing the managed and unmanaged resources that + this class is responsible for. + + + There are not any unmanaged resources or any disposable managed + resources that this class is holding onto. It is in here + to comply with the interface. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Stores a Result from a DataReader in memory. + + + + + Initializes a new instance of the NResult class. + + The IDataReader to populate the Result with. + + if the is already positioned on the record + to start reading from. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + An implementation of that will work with either an + returned by Execute or with an + whose contents have been read into a . + + + + This allows NHibernate to use the underlying for as long as + possible without the need to read everything into the . + + + The consumer of the returned from does + not need to know the underlying reader and can use it the same even if it switches from an + to in the middle of its use. + + + + + + Initializes a new instance of the class. + + The underlying IDataReader to use. + + + + Initializes a new instance of the NHybridDataReader class. + + The underlying IDataReader to use. + if the contents of the IDataReader should be read into memory right away. + + + + Reads all of the contents into memory because another + needs to be opened. + + + This will result in a no op if the reader is closed or is already in memory. + + + + + + + + + + + + + + + + + A flag to indicate if Disose() has been called. + + + + + Finalizer that ensures the object is correctly disposed of. + + + + + Takes care of freeing the managed and unmanaged resources that + this class is responsible for. + + + + + Takes care of freeing the managed and unmanaged resources that + this class is responsible for. + + Indicates if this NHybridDataReader is being Disposed of or Finalized. + + If this NHybridDataReader is being Finalized (isDisposing==false) then make sure not + to call any methods that could potentially bring this NHybridDataReader back to life. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Gets if the object is in the middle of reading a Result. + + if NextResult and Read have been called on the . + + + + + + + + + + + + + + + + + + + + + + The PostgreSQL data provider provides a database driver for PostgreSQL. +

+ Author: Oliver Weichhold +

+
+ +

+ In order to use this Driver you must have the Npgsql.dll Assembly available for + NHibernate to load it. +

+

+ Please check the products website + http://www.postgresql.org/ + for any updates and or documentation. +

+

+ The homepage for the .NET DataProvider is: + http://pgfoundry.org/projects/npgsql. +

+
+
+ + + Initializes a new instance of the class. + + + Thrown when the Npgsql assembly can not be loaded. + + + + + A NHibernate Driver for using the Odbc DataProvider + + + Always look for a native .NET DataProvider before using the Odbc DataProvider. + + + + + A NHibernate Driver for using the OleDb DataProvider + + + Always look for a native .NET DataProvider before using the OleDb DataProvider. + + + + + OLE DB provider does not support multiple open data readers + + + + + A NHibernate Driver for using the Oracle DataProvider. + + + + + A NHibernate Driver for using the Oracle.DataAccess DataProvider + + + Code was contributed by James Mills + on the NHibernate forums in this + post. + + + + + Initializes a new instance of . + + + Thrown when the Oracle.DataAccess assembly can not be loaded. + + + + + This adds logic to ensure that a DbType.Boolean parameter is not created since + ODP.NET doesn't support it. + + + + + + + + + + + + + + A NHibernate Driver for using the Oracle.DataAccess.Lite DataProvider + + + + + Initializes a new instance of . + + + Thrown when the Oracle.DataAccess.Lite_w32 assembly can not be loaded. + + + + + This adds logic to ensure that a DbType.Boolean parameter is not created since + ODP.NET doesn't support it. + + + + + A NHibernate Driver for using the SqlClient DataProvider + + + + + Creates an uninitialized object for + the SqlClientDriver. + + An unitialized object. + + + + Creates an uninitialized object for + the SqlClientDriver. + + An unitialized object. + + + + MsSql requires the use of a Named Prefix in the SQL statement. + + + because MsSql uses "@". + + + + + MsSql requires the use of a Named Prefix in the Parameter. + + + because MsSql uses "@". + + + + + The Named Prefix for parameters. + + + Sql Server uses "@". + + + + + The SqlClient driver does NOT support more than 1 open IDataReader + with only 1 IDbConnection. + + - it is not supported. + + MS SQL Server 2000 (and 7) throws an exception when multiple IDataReaders are + attempted to be opened. When SQL Server 2005 comes out a new driver will be + created for it because SQL Server 2005 is supposed to support it. + + + + + NHibernate driver for the System.Data.SQLite data provider for .NET 2.0. + + +

+ In order to use this driver you must have the System.Data.SQLite.dll assembly available + for NHibernate to load. This assembly includes the SQLite.dll or SQLite3.dll libraries. +

+

+ You can get the System.Data.SQLite.dll assembly from http://sourceforge.net/projects/sqlite-dotnet2. +

+

+ Please check http://www.sqlite.org/ for more information regarding SQLite. +

+
+
+ + + Initializes a new instance of . + + + Thrown when the SQLite.NET assembly can not be loaded. + + + + + NHibernate driver for the SQLite.NET data provider. +

+ Author: Ioan Bizau +

+
+ +

+ In order to use this Driver you must have the SQLite.NET.dll Assembly available for NHibernate to load it. + You must also have the SQLite.dll and SQLite3.dll libraries. +

+

+ Please check http://www.sqlite.org/ for more information regarding SQLite. +

+
+
+ + + Initializes a new instance of . + + + Thrown when the SQLite.NET assembly can not be loaded. + + + + + A NHibernate driver for Microsoft SQL Server CE data provider + + + + + Initializes a new instance of the class. + + + + + MsSql requires the use of a Named Prefix in the SQL statement. + + + because MsSql uses "@". + + + + + MsSql requires the use of a Named Prefix in the Parameter. + + + because MsSql uses "@". + + + + + The Named Prefix for parameters. + + + Sql Server uses "@". + + + + + The SqlClient driver does NOT support more than 1 open IDataReader + with only 1 IDbConnection. + + - it is not supported. + + Ms Sql 2000 (and 7) throws an Exception when multiple DataReaders are + attempted to be Opened. When Yukon comes out a new Driver will be + created for Yukon because it is supposed to support it. + + + + + The SybaseClientDriver Driver provides a database driver for Sybase. + + + It has been reported to work with the . + + + + + Initializes a new instance of the class. + + + Thrown when the Sybase.Data.AseClient assembly can not be loaded. + + + + + Sybase.Data.AseClient uses named parameters in the sql. + + - Sybase uses @ in the sql. + + + + + + + Sybase.Data.AseClient use the @ to locate parameters in sql. + + @ is used to locate parameters in sql. + + + + The SybaseClientDriver Driver provides a database driver for Sybase. + + + It has been reported to work with the . + + + + + Initializes a new instance of the class. + + + Thrown when the Sybase.Data.AseClient assembly can not be loaded. + + + + + Sybase.Data.AseClient uses named parameters in the sql. + + - Sybase uses @ in the sql. + + + + + + + Sybase.Data.AseClient use the @ to locate parameters in sql. + + @ is used to locate parameters in sql. + + + + Represents state associated with the processing of a given + in regards to loading collections. + + + Another implementation option to consider is to not expose ResultSets + directly (in the JDBC redesign) but to always "wrap" them and apply a [series of] context[s] to that wrapper. + + + + + Creates a collection load context for the given result set. + + Callback to other collection load contexts. + The result set this is "wrapping". + + + + Retrieve the collection that is being loaded as part of processing this result set. + + The persister for the collection being requested. + The key of the collection being requested. + The loading collection (see discussion above). + + Basically, there are two valid return values from this method:
    +
  • an instance of {@link PersistentCollection} which indicates to + continue loading the result set row data into that returned collection + instance; this may be either an instance already associated and in the + midst of being loaded, or a newly instantiated instance as a matching + associated collection was not found.
  • +
  • null indicates to ignore the corresponding result set row + data relating to the requested collection; this indicates that either + the collection was found to already be associated with the persistence + context in a fully loaded state, or it was found in a loading state + associated with another result set processing context.
  • +
+
+
+ + + Finish the process of collection-loading for this bound result set. Mainly this + involves cleaning up resources and notifying the collections that loading is + complete. + + The persister for which to complete loading. + + + Add the collection to the second-level cache + The entry representing the collection to add + The persister + + + + Maps to specific contextual data + related to processing that . + + + Implementation note: internally an is used to maintain + the mappings; was chosen because I'd rather not be + dependent upon potentially bad and + implementations. + Considering the JDBC-redesign work, would further like this contextual info + not mapped separately, but available based on the result set being processed. + This would also allow maintaining a single mapping as we could reliably get + notification of the result-set closing... + + + + Creates and binds this to the given persistence context. + The persistence context to which this will be bound. + + + + Release internal state associated with the given result set. + + The result set for which it is ok to release associated resources. + + This should be called when we are done with processing said result set, + ideally as the result set is being closed. + + + + Release internal state associated with *all* result sets. + + This is intended as a "failsafe" process to make sure we get everything + cleaned up and released. + + + + + Get the {@link CollectionLoadContext} associated with the given + {@link ResultSet}, creating one if needed. + + The result set for which to retrieve the context. + The processing context. + + + + Attempt to locate the loading collection given the owner's key. The lookup here + occurs against all result-set contexts... + + The collection persister + The owner key + The loading collection, or null if not found. + + + + Register a loading collection xref. + + The xref collection key + The corresponding loading collection entry + + This xref map is used because sometimes a collection is in process of + being loaded from one result set, but needs to be accessed from the + context of another "nested" result set processing. + Implementation note: package protected, as this is meant solely for use + by {@link CollectionLoadContext} to be able to locate collections + being loaded by other {@link CollectionLoadContext}s/{@link ResultSet}s. + + + + + The inverse of {@link #registerLoadingCollectionXRef}. Here, we are done + processing the said collection entry, so we remove it from the + load context. + + The key of the collection we are done processing. + + The idea here is that other loading collections can now reference said + collection directly from the {@link PersistenceContext} because it + has completed its load cycle. + Implementation note: package protected, as this is meant solely for use + by {@link CollectionLoadContext} to be able to locate collections + being loaded by other {@link CollectionLoadContext}s/{@link ResultSet}s. + + + + + Locate the LoadingCollectionEntry within *any* of the tracked + s. + + The collection key. + The located entry; or null. + + Implementation note: package protected, as this is meant solely for use + by to be able to locate collections + being loaded by other s/ResultSets. + + + + + Retrieves the persistence context to which this is bound. + + + + + Do we currently have any internal entries corresponding to loading + collections? + + True if we currently hold state pertaining to loading collections; false otherwise. + + + + Represents a collection currently being loaded. + + + + Describes a return in a native SQL query. + + + + Represents a return defined as part of a native sql query which + names a collection role in the form {classname}.{collectionrole}; it + is used in defining a custom sql query for loading an entity's + collection in non-fetching scenarios (i.e., loading the collection + itself as the "root" of the result). + + + + + Represents the base information for a non-scalar return defined as part of + a native sql query. + + + + Constructs some form of non-scalar return descriptor + The result alias + Any user-supplied column->property mappings + The lock mode to apply to the return. + + + Retrieve the defined result alias + + + Retrieve the lock-mode to apply to this return + + + Retrieve the user-supplied column->property mappings. + + + Construct a native-sql return representing a collection initializer + The result alias + + The entity-name of the entity owning the collection to be initialized. + + + The property name (on the owner) which represents + the collection to be initialized. + + Any user-supplied column->property mappings + The lock mode to apply to the collection. + + + + The class owning the collection. + + + + + The name of the property representing the collection from the . + + + + + Represents a return defined as part of a native sql query which + names a fetched role. + + + + Construct a return descriptor representing some form of fetch. + The result alias + The owner's result alias + The owner's property representing the thing to be fetched + Any user-supplied column->property mappings + The lock mode to apply + + + The alias of the owner of this fetched association. + + + + Retrieve the property name (relative to the owner) which maps to + the association to be fetched. + + + + + Represents a return defined as part of a native sql query which + names a "root" entity. A root entity means it is explicitly a + "column" in the result, as opposed to a fetched relationship or role. + + + + + Construct a return representing an entity returned at the root + of the result. + + The result alias + The entity name. + The lock mode to apply + + + + Construct a return representing an entity returned at the root + of the result. + + The result alias + The entity name. + Any user-supplied column->property mappings + The lock mode to apply + + + The name of the entity to be returned. + + + Describes a scalar return in a native SQL query. + + + + Extends an HQLQueryPlan to maintain a reference to the collection-role name + being filtered. + + + + Defines a query execution plan for an HQL query (or filter). + + + Descriptor regarding a named parameter. + + + + Not supported yet (AST parse needed) + + + + Defines a query execution plan for a native-SQL query. + + + Encapsulates metadata about parameters encountered within a query. + + + + The single available method + is responsible for parsing a query string and recognizing tokens in + relation to parameters (either named, ejb3-style, or ordinal) and + providing callbacks about such recognitions. + + + + + Performs the actual parsing and tokenizing of the query string making appropriate + callbacks to the given recognizer upon recognition of the various tokens. + + + Note that currently, this only knows how to deal with a single output + parameter (for callable statements). If we later add support for + multiple output params, this, obviously, needs to change. + + The string to be parsed/tokenized. + The thing which handles recognition events. + + + + + Implements a parameter parser recognizer specifically for the purpose + of journaling parameter locations. + + + + + Convenience method for creating a param location recognizer and + initiating the parse. + + The query to be parsed for parameter locations. + The generated recognizer, with journaled location info. + + + + The dictionary of named parameter locations. + The dictionary is keyed by parameter name. + + + + + The list of ordinal parameter locations. + + + The list elements are integers, representing the location for that given ordinal. + Thus OrdinalParameterLocationList[n] represents the location for the nth parameter. + + + + Defines metadata regarding a translated HQL or native-SQL query. + + + Get the source HQL or native-SQL query. + + + Return source query select clause aliases (if any) + + + An array of types describing the returns of the source query. + + + The set of query spaces affected by this source query. + + + Acts as a cache for compiled query plans, as well as query-parameter metadata. + + + + Represents work that needs to be performed in a manner + which isolates it from any current application unit of + work transaction. + + + + + Perform the actual work to be done. + + The ADP connection to use. + The active transaction of the connection. + + + + Class which provides the isolation semantics required by + an . + + + + + Processing comes in two flavors: + + + + makes sure the work to be done is performed in a seperate, distinct transaction + + + + makes sure the work to be done is performed outside the scope of any transaction + + + + + + + Ensures that all processing actually performed by the given work will + occur on a seperate transaction. + + The work to be performed. + The session from which this request is originating. + + + + Ensures that all processing actually performed by the given work will + occur outside of a transaction. + + The work to be performed. + The session from which this request is originating. + + + + Responsible for maintaining the queue of actions related to events. + + The ActionQueue holds the DML operations queued as part of a session's + transactional-write-behind semantics. DML operations are queued here + until a flush forces them to be executed against the database. + + + + + + Perform all currently queued entity-insertion actions. + + + + + Perform all currently queued actions. + + + + + Prepares the internal action queues for execution. + + + + + Performs cleanup of any held cache softlocks. + + Was the transaction successful. + + + + Check whether the given tables/query-spaces are to be executed against + given the currently queued actions. + + The table/query-spaces to check. + True if we contain pending actions against any of the given tables; false otherwise. + + + + Check whether any insertion or deletion actions are currently queued. + + True if insertions or deletions are currently queued; false otherwise. + + + + Identifies a named association belonging to a particular + entity instance. Used to record the fact that an association + is null during loading. + + + + + Defines a sequence of elements that are currently + eligible for batch fetching. + + + Even though this is a map, we only use the keys. A map was chosen in + order to utilize a to maintain sequencing + as well as uniqueness. + + + + + A map of subselect-fetch descriptors + keyed by the against which the descriptor is + registered. + + + + + The owning persistence context. + + + + + Constructs a queue for the given context. + + The owning persistence context. + + + + Clears all entries from this fetch queue. + + + + + Retrieve the fetch descriptor associated with the given entity key. + + The entity key for which to locate any defined subselect fetch. + The fetch descriptor; may return null if no subselect fetch queued for + this entity key. + + + + Adds a subselect fetch decriptor for the given entity key. + + The entity for which to register the subselect fetch. + The fetch descriptor. + + + + After evicting or deleting an entity, we don't need to + know the query that was used to load it anymore (don't + call this after loading the entity, since we might still + need to load its collections) + + + + + Clears all pending subselect fetches from the queue. + + + Called after flushing. + + + + + If an EntityKey represents a batch loadable entity, add + it to the queue. + + + Note that the contract here is such that any key passed in should + previously have been been checked for existence within the + ; failure to do so may cause the + referenced entity to be included in a batch even though it is + already associated with the . + + + + + After evicting or deleting or loading an entity, we don't + need to batch fetch it anymore, remove it from the queue + if necessary + + + + + Get a batch of uninitialized collection keys for a given role + + The persister for the collection role. + A key that must be included in the batch fetch + the maximum number of keys to return + The entity mode. + an array of collection keys, of length batchSize (padded with nulls) + + + + Get a batch of unloaded identifiers for this class, using a slightly + complex algorithm that tries to grab keys registered immediately after + the given key. + + The persister for the entities being loaded. + The identifier of the entity currently demanding load. + The maximum number of keys to return + The entity mode. + an array of identifiers, of length batchSize (possibly padded with nulls) + + + + The types of children to cascade to + + + + + A cascade point that occurs just after the insertion of the parent + entity and just before deletion + + + + + A cascade point that occurs just before the insertion of the parent entity + and just after deletion + + + + + A cascade point that occurs just after the insertion of the parent entity + and just before deletion, inside a collection + + + + + A cascade point that occurs just after the update of the parent entity + + + + A cascade point that occurs just before the session is flushed + + + + A cascade point that occurs just after eviction of the parent entity from the + session cache + + + + + A cascade point that occurs just after locking a transient parent entity into the + session cache + + + + + A cascade point that occurs just after locking a transient parent entity into the session cache + + + + + A cascade point that occurs just before merging from a transient parent entity into + the object in the session cache + + + + + Delegate responsible, in conjunction with the various + , for implementing cascade processing. + + + + Cascade an action from the parent entity instance to all its children. + The parent's entity persister + The parent reference. + + + + Cascade an action from the parent entity instance to all its children. This + form is typicaly called from within cascade actions. + + The parent's entity persister + The parent reference. + + Typically some form of cascade-local cache + which is specific to each CascadingAction type + + + + Cascade an action to the child or children + + + Cascade an action to a collection + + + Cascade an action to a to-one association or any type + + + Cascade to the collection elements + + + Delete any entities that were removed from the collection + + + A contract for defining the aspects of cascading various persistence actions. + + + + package-protected constructor + + + For this style, should the given action be cascaded? + The action to be checked for cascade-ability. + True if the action should be cascaded under this style; false otherwise. + + + + Probably more aptly named something like doCascadeToCollectionElements(); + it is however used from both the collection and to-one logic branches... + + The action to be checked for cascade-ability. + True if the action should be really cascaded under this style; false otherwise. + + For this style, should the given action really be cascaded? The default + implementation is simply to return {@link #doCascade}; for certain + styles (currently only delete-orphan), however, we need to be able to + control this separately. + + + + Factory method for obtaining named cascade styles + The named cascade style name. + The appropriate CascadeStyle + + + save / delete / update / evict / lock / replicate / merge / persist + delete orphans + + + save / delete / update / evict / lock / replicate / merge / persist + + + save / update + + + lock + + + refresh + + + evict + + + replicate + + + merge + + + create + + + delete + + + delete + delete orphans + + + no cascades + + + Do we need to delete orphaned collection elements? + True if this style need to account for orphan delete operations; false otherwise. + + + + A session action that may be cascaded from parent entity to its children + + + + Cascade the action to the child object. + The session within which the cascade is occurring. + The child to which cascading should be performed. + The child's entity name + Typically some form of cascade-local cache which is specific to each CascadingAction type + Are cascading deletes enabled. + + + + Given a collection, get an iterator of the children upon which the + current cascading action should be visited. + + The session within which the cascade is occurring. + The mapping type of the collection. + The collection instance. + The children iterator. + + + + Called (in the case of returning true) to validate + that no cascade on the given property is considered a valid semantic. + + The session within which the cascade is occurring. + The property value + The property value owner + The entity persister for the owner + The index of the property within the owner. + + + + Given a collection, get an iterator of all its children, loading them + from the database if necessary. + + The session within which the cascade is occurring. + The mapping type of the collection. + The collection instance. + The children iterator. + + + + Iterate just the elements of the collection that are already there. Don't load + any new elements from the database. + + + + + + + + + + + + + + + + + + + + + + + + + + + + Execute persist during flush time + + + + + + + Does this action potentially extrapolate to orphan deletes? + True if this action can lead to deletions of orphans. + + + Does the specified cascading action require verification of no cascade validity? + True if this action requires no-cascade verification; false otherwise. + + + Should this action be performed (or noCascade consulted) in the case of lazy properties. + + + + We need an entry to tell us all about the current state + of a collection with respect to its persistent state + + + + session-start/post-flush persistent state + + + allow the snapshot to be serialized + + + + The when the Collection was loaded. + + + This can be if the Collection was not loaded by NHibernate and + was passed in along with a transient object. + + + + + The identifier of the Entity that is the owner of this Collection + during the load or post flush. + + + + + Indicates that the Collection can still be reached by an Entity + that exist in the . + + + It is also used to ensure that the Collection is not shared between + two Entities. + + + + + Indicates that the Collection has been processed and is ready + to have its state synchronized with the database. + + + + + Indicates that a Collection needs to be updated. + + + A Collection needs to be updated whenever the contents of the Collection + have been changed. + + + + + Indicates that a Collection has old elements that need to be removed. + + + A Collection needs to have removals performed whenever its role changes or + the key changes and it has a loadedPersister - ie - it was loaded by NHibernate. + + + + + Indicates that a Collection needs to be recreated. + + + A Collection needs to be recreated whenever its role changes + or the owner changes. + + + + + If we instantiate a collection during the + process, we must ignore it for the rest of the flush. + + + + + The that is currently responsible + for the Collection. + + + This is set when NHibernate is updating a reachable or an + unreachable collection. + + + + + Initializes a new instance of . + + + For newly wrapped collections, or dereferenced collection wrappers + + + + For collections just loaded from the database + + + + Initializes a new instance of for initialized detached collections. + + + For initialized detached collections + + + + + Determine if the collection is "really" dirty, by checking dirtiness + of the collection elements, if necessary + + + + + Prepares this CollectionEntry for the Flush process. + + The that this CollectionEntry will be responsible for flushing. + + + + Updates the CollectionEntry to reflect that the + has been initialized. + + The initialized that this Entry is for. + + + + Updates the CollectionEntry to reflect that it is has been successfully flushed to the database. + + The that was flushed. + + Called after a successful flush. + + + + + Sets the information in this CollectionEntry that is specific to the + . + + + The that is + responsible for the Collection. + + + + + + + + + + + + + + Uniquely identifies a collection instance in a particular session. + + + + + Record the fact that this collection was dereferenced + + The collection to be updated by unreachability. + The session. + + + + Initialize the role of the collection. + + The collection to be updated by reachibility. + The type of the collection. + The owner of the collection. + The session. + + + + We need an entry to tell us all about the current state + of an object with respect to its persistent state + + + + + Initializes a new instance of EntityEntry. + + The current of the Entity. + The snapshot of the Entity's state when it was loaded. + + The identifier of the Entity in the database. + The version of the Entity. + The for the Entity. + A boolean indicating if the Entity exists in the database. + The that is responsible for this Entity. + + + + + + + After actually inserting a row, record the fact that the instance exists on the + database (needed for identity-column key generation) + + + + + After actually updating the database, update the snapshot information, + and escalate the lock mode. + + + + + After actually deleting a row, record the fact that the instance no longer + exists in the database + + + + + Gets or sets the current of the Entity. + + The of the Entity. + + + + Gets or sets the of this Entity with respect to its + persistence in the database. + + The of this Entity. + + + + Gets or sets the identifier of the Entity in the database. + + The identifier of the Entity in the database if one has been assigned. + This might be when the is + and the database generates the id. + + + + Gets or sets the snapshot of the Entity when it was loaded from the database. + + The snapshot of the Entity. + + There will only be a value when the Entity was loaded in the current Session. + + + + + Gets or sets the snapshot of the Entity when it was marked as being ready for deletion. + + The snapshot of the Entity. + This will be if the Entity is not being deleted. + + + + Gets or sets a indicating if this Entity exists in the database. + + if it is already in the database. + + It can also be if it does not exists in the database yet and the + is . + + + + + Gets or sets the version of the Entity. + + The version of the Entity. + + + + Gets or sets the that is responsible for this Entity. + + The that is responsible for this Entity. + + + + Gets the Fully Qualified Name of the class this Entity is an instance of. + + The Fully Qualified Name of the class this Entity is an instance of. + + + + A globally unique identifier of an instance, consisting of the user-visible identifier + and the identifier space (eg. tablename) + + + + Construct a unique identifier for an entity class instance + + + Used to reconstruct an EntityKey during deserialization. + The identifier value + The root entity name + The specific entity name + The type of the identifier value + Whether represented entity is eligible for batch loading + The session factory + The entity's entity mode + + + + To use in deserialization callback + + + + + + Used to uniquely key an entity instance in relation to a particular session + by some unique property reference, as opposed to identifier. + Uniqueing information consists of the entity-name, the referenced + property name, and the referenced property value. + + + + + + A FilterDefinition defines the global attributes of a dynamic filter. This + information includes its name as well as its defined parameters (name and type). + + + + + Set the named parameter's value list for this filter. + + The name of the filter for which this configuration is in effect. + The default filter condition. + A dictionary storing the NHibernate type + of each parameter under its name. + if set to true used in many to one rel + + + + Retreive the type of the named parameter defined for this filter. + + The name of the filter parameter for which to return the type. + The type of the named parameter. + + + + Gets a value indicating whether to use this filter-def in manytoone refs. + + true if [use in many to one]; otherwise, false. + + + + Get the name of the filter this configuration defines. + + The filter name for this configuration. + + + + Get a set of the parameters defined by this configuration. + + The parameters named by this configuration. + + + Algorithms related to foreign key constraint transparency + + + + Is this instance persistent or detached? + + + If is non-null, don't hit the database to make the + determination, instead assume that value; the client code must be + prepared to "recover" in the case that this assumed result is incorrect. + + + + + Is this instance, which we know is not persistent, actually transient? + If assumed is non-null, don't hit the database to make the + determination, instead assume that value; the client code must be + prepared to "recover" in the case that this assumed result is incorrect. + + + If is non-null, don't hit the database to make the + determination, instead assume that value; the client code must be + prepared to "recover" in the case that this assumed result is incorrect. + + + + + Return the identifier of the persistent or transient object, or throw + an exception if the instance is "unsaved" + + + Used by OneToOneType and ManyToOneType to determine what id value should + be used for an object that may or may not be associated with the session. + This does a "best guess" using any/all info available to use (not just the + EntityEntry). + + + + + Nullify all references to entities that have not yet + been inserted in the database, where the foreign key + points toward that entity + + + + + Return null if the argument is an "unsaved" entity (ie. + one with no existing database row), or the input argument + otherwise. This is how Hibernate avoids foreign key constraint + violations. + + + + + Determine if the object already exists in the database, using a "best guess" + + + + + A strategy for determining if an identifier value is an identifier of a new + transient instance or a previously persistent transient instance. The strategy + is determined by the Unsaved-Value attribute in the mapping file. + + + + + + + + Assume the transient instance is newly instantiated if its identifier is null or + equal to Value + + + + + + Does the given identifier belong to a new instance + + + + + Always assume the transient instance is newly instantiated + + + + + Never assume that transient instance is newly instantiated + + + + + Assume the transient instance is newly instantiated if the identifier + is null. + + + + Assume nothing. + + + + Holds the state of the persistence context, including the + first-level cache, entries, snapshots, proxies, etc. + + + + Add a collection which has no owner loaded + + + + Get and remove a collection whose owner is not yet loaded, + when its owner is being loaded + + + + Clear the state of the persistence context + + + Set the status of an entry + + + Called after transactions end + + + + Get the current state of the entity as known to the underlying + database, or null if there is no corresponding row + + + + + Retrieve the cached database snapshot for the requested entity key. + + The entity key for which to retrieve the cached snapshot + The cached snapshot + + + This differs from is two important respects: + no snapshot is obtained from the database if not already cached + an entry of NO_ROW here is interpreted as an exception + + + + + + Get the values of the natural id fields as known to the underlying + database, or null if the entity has no natural id or there is no + corresponding row. + + + + Add a canonical mapping from entity key to entity instance + + + + Get the entity instance associated with the given EntityKey + + + + Is there an entity with the given key in the persistence context + + + + Remove an entity from the session cache, also clear + up other state associated with the entity, all except + for the EntityEntry + + + + Get an entity cached by unique key + + + Add an entity to the cache by unique key + + + + Retrieve the EntityEntry representation of the given entity. + + The entity for which to locate the EntityEntry. + The EntityEntry for the given entity. + + + Remove an entity entry from the session cache + + + Is there an EntityEntry for this instance? + + + Get the collection entry for a persistent collection + + + Adds an entity to the internal caches. + + + + Generates an appropriate EntityEntry instance and adds it + to the event source's internal caches. + + + + Is the given collection associated with this persistence context? + + + Is the given proxy associated with this persistence context? + + + + Takes the given object and, if it represents a proxy, reassociates it with this event source. + + The possible proxy to be reassociated. + Whether the passed value represented an actual proxy which got initialized. + + + + If a deleted entity instance is re-saved, and it has a proxy, we need to + reset the identifier of the proxy + + + + + Get the entity instance underlying the given proxy, throwing + an exception if the proxy is uninitialized. If the given object + is not a proxy, simply return the argument. + + + + + Possibly unproxy the given reference and reassociate it with the current session. + + The reference to be unproxied if it currently represents a proxy. + The unproxied instance. + + + + Attempts to check whether the given key represents an entity already loaded within the + current session. + + The entity reference against which to perform the uniqueness check. + The entity key. + + + + If the existing proxy is insufficiently "narrow" (derived), instantiate a new proxy + and overwrite the registration of the old one. This breaks == and occurs only for + "class" proxies rather than "interface" proxies. Also init the proxy to point to + the given target implementation if necessary. + + The proxy instance to be narrowed. + The persister for the proxied entity. + The internal cache key for the proxied entity. + (optional) the actual proxied entity instance. + An appropriately narrowed instance. + + + + Return the existing proxy associated with the given EntityKey, or the + third argument (the entity associated with the key) if no proxy exists. Init + the proxy to the target implementation, if necessary. + + + + + Return the existing proxy associated with the given EntityKey, or the + argument (the entity associated with the key) if no proxy exists. + (slower than the form above) + + + + Get the entity that owns this persistent collection + + + Get the entity that owned this persistent collection when it was loaded + The persistent collection + + The owner if its entity ID is available from the collection's loaded key + and the owner entity is in the persistence context; otherwise, returns null + + + + Get the ID for the entity that owned this persistent collection when it was loaded + The persistent collection + the owner ID if available from the collection's loaded key; otherwise, returns null + + + add a collection we just loaded up (still needs initializing) + + + add a detached uninitialized collection + + + + Add a new collection (ie. a newly created one, just instantiated by the + application, with no database state or snapshot) + + The collection to be associated with the persistence context + + + + + add an (initialized) collection that was created by another session and passed + into update() (ie. one with a snapshot and existing state on the database) + + + + add a collection we just pulled out of the cache (does not need initializing) + + + Get the collection instance associated with the CollectionKey + + + + Register a collection for non-lazy loading at the end of the two-phase load + + + + + Force initialization of all non-lazy collections encountered during + the current two-phase load (actually, this is a no-op, unless this + is the "outermost" load) + + + + Get the PersistentCollection object for an array + + + Register a PersistentCollection object for an array. + Associates a holder with an array - MUST be called after loading + array, since the array instance is not created until endLoad(). + + + + + Remove the mapping of collection to holder during eviction of the owning entity + + + + Get the snapshot of the pre-flush collection state + + + + Get the collection entry for a collection passed to filter, + which might be a collection wrapper, an array, or an unwrapped + collection. Return null if there is no entry. + + + + Get an existing proxy by key + + + Add a proxy to the session cache + + + Remove a proxy from the session cache + + + Called before cascading + + + Called after cascading + + + Call this before beginning a two-phase load + + + Call this after finishing a two-phase load + + + + Search the persistence context for an owner for the child object, + given a collection role + + + + + Search the persistence context for an index of the child object, given a collection role + + + + + Record the fact that the association belonging to the keyed entity is null. + + + + Is the association property belonging to the keyed entity null? + + + Set the object to read only and discard it's snapshot + + + + Get the session to which this persistence context is bound. + + + + + Retrieve this persistence context's managed load context. + + + + + Get the BatchFetchQueue, instantiating one if necessary. + + + + Retrieve the set of EntityKeys representing nullifiable references + + + Get the mapping from key value to entity instance + + + Get the mapping from entity instance to entity entry + + + Get the mapping from collection instance to collection entry + + + Get the mapping from collection key to collection instance + + + How deep are we cascaded? + + + Is a flush cycle currently in process? + Called before and after the flushcycle + + + False if we know for certain that all the entities are read-only + + + + Defines the internal contract between the ISessionFactory and other parts of NHibernate + such as implementors of IType. + + + + + Creates ISessions. + + + + Usually an application has a single SessionFactory. Threads servicing client requests + obtain ISessions from the factory. Implementors must be threadsafe. + + + ISessionFactorys are immutable. The behaviour of a SessionFactory + is controlled by properties supplied at configuration time. + These properties are defined on Environment + + + + + + Open a ISession on the given connection + + A connection provided by the application + A session + + Note that the second-level cache will be disabled if you + supply a ADO.NET connection. NHibernate will not be able to track + any statements you might have executed in the same transaction. + Consider implementing your own . + + + + + Create database connection and open a ISession on it, specifying an interceptor + + A session-scoped interceptor + A session + + + + Open a ISession on the given connection, specifying an interceptor + + A connection provided by the application + A session-scoped interceptor + A session + + Note that the second-level cache will be disabled if you + supply a ADO.NET connection. NHibernate will not be able to track + any statements you might have executed in the same transaction. + Consider implementing your own . + + + + + Create a database connection and open a ISession on it + + + + + + Get the associated with the given entity class + + the given entity type. + The class metadata or if not found. + + + + Get the associated with the given entity name + the given entity name. + The class metadata or if not found. + + + + + Get the CollectionMetadata associated with the named collection role + + + + + + + Get all as a from entityname + to metadata object + + A dictionary from an entity name to + + + + Get all CollectionMetadata as a IDictionary from role name + to metadata object + + + + + + Destroy this SessionFactory and release all resources + connection pools, etc). It is the responsibility of the application + to ensure that there are no open Sessions before calling + close(). + + + + + Evict all entries from the process-level cache. This method occurs outside + of any transaction; it performs an immediate "hard" remove, so does not respect + any transaction isolation semantics of the usage strategy. Use with care. + + + + + + Evict an entry from the process-level cache. This method occurs outside + of any transaction; it performs an immediate "hard" remove, so does not respect + any transaction isolation semantics of the usage strategy. Use with care. + + + + + + + Evict all entries from the second-level cache. This method occurs outside + of any transaction; it performs an immediate "hard" remove, so does not respect + any transaction isolation semantics of the usage strategy. Use with care. + + + + + Evict an entry from the second-level cache. This method occurs outside + of any transaction; it performs an immediate "hard" remove, so does not respect + any transaction isolation semantics of the usage strategy. Use with care. + + + + + Evict all entries from the process-level cache. This method occurs outside + of any transaction; it performs an immediate "hard" remove, so does not respect + any transaction isolation semantics of the usage strategy. Use with care. + + + + + + Evict an entry from the process-level cache. This method occurs outside + of any transaction; it performs an immediate "hard" remove, so does not respect + any transaction isolation semantics of the usage strategy. Use with care. + + + + + + + Evict any query result sets cached in the default query cache region. + + + + + Evict any query result sets cached in the named query cache region. + + + + + Get a new stateless session. + + + Get a new stateless session for the given ADO.NET connection. + + + + Obtain the definition of a filter by name. + + The name of the filter for which to obtain the definition. + The filter definition. + + + + Obtains the current session. + + + + The definition of what exactly "current" means is controlled by the + implementation configured for use. + + + The current session. + Indicates an issue locating a suitable current session. + + + Get the statistics for this session factory + + + Was this already closed? + + + + Obtain a set of the names of all filters defined on this SessionFactory. + + The set of filter names. + + + + Get the persister for the named entity + + The name of the entity that is persisted. + The for the entity. + If no can be found. + + + + Get the persister object for a collection role + + + + + + + Get the return types of a query + + + + + + Get the return aliases of a query + + + + Get the names of all persistent classes that implement/extend the given interface/class + + + + + + + Get a class name, using query language imports + + + + + + + Get a particular named query cache, or the default cache + + the name of the cache region, or null for the default + query cache + the existing cache, or a newly created cache if none by that + region name + + + + Gets the hql query identified by the name. + + The name of that identifies the query. + + A hql query or if the named + query does not exist. + + + + + Get the identifier generator for the hierarchy + + + + Get a named second-level cache region + + + + Open a session conforming to the given parameters. Used mainly + for current session processing. + + The external ado.net connection to use, if one (i.e., optional). + + Should the session be auto-flushed + prior to transaction completion? + + + Should the session be auto-closed after + transaction completion? + + The release mode for managed jdbc connections. + An appropriate session. + + + + Retrieves a set of all the collection roles in which the given entity + is a participant, as either an index or an element. + + The entity name for which to get the collection roles. + + Set of all the collection roles in which the given entityName participates. + + + + + Get the persister for the named entity + + The name of the entity that is persisted. + + The for the entity or is the name was not found. + + + + + Get the entity-name for a given mapped class. + + the mapped class + the enntity name where available or null + + + + Get the SQL . + + + + + Get the used. + + + + The cache of table update timestamps + + + Statistics SPI + + + Retrieves the SQLExceptionConverter in effect for this SessionFactory. + The SQLExceptionConverter for this SessionFactory. + + + + Get the default query cache + + + + + Gets the ICurrentSessionContext instance attached to this session factory. + + + + + Defines the internal contract between the Session and other parts of Hibernate + such as implementors of Type or ClassPersister + + + + + Initialize the session after its construction was complete + + + + + Initialize the collection (if not already initialized) + + + + + + + Load an instance without checking if it was deleted. If it does not exist and isn't nullable, throw an exception. + This method may create a new proxy or return an existing proxy. + + The entityName (or class full name) to load. + The identifier of the object in the database. + Allow null instance + When enabled, the object is eagerly fetched. + + A proxy of the object or an instance of the object if the persistentClass does not have a proxy. + + No object could be found with that id. + + + + Load an instance immediately. Do not return a proxy. + + + + + + + + Execute a List() query + + + + + + + + Strongly-typed version of + + + + + Strongly-typed version of + + + + + Execute an Iterate() query + + + + + + + + Strongly-typed version of + + + + + Execute a filter + + + + + Execute a filter (strongly-typed version). + + + + + Collection from a filter + + + + + Strongly-typed version of + + + + Get the for any instance + optional entity name + the entity instance + + + + Notify the session that an NHibernate transaction has begun. + + + + + Notify the session that the transaction is about to complete + + + + + Notify the session that the transaction completed, so we no longer own the old locks. + (Also we should release cache softlocks). May be called multiple times during the transaction + completion process. + + + + + Return the identifier of the persistent object, or null if transient + + + + + Instantiate the entity class, initializing with the given identifier + + + + + Execute an SQL Query + + + + + Strongly-typed version of + + + + Execute an SQL Query + + + + Retrieve the currently set value for a filter parameter. + + The filter parameter name in the format + {FILTER_NAME.PARAMETER_NAME}. + The filter parameter value. + + + + Retrieve the type for a given filter parameter. + + The filter parameter name in the format + {FILTER_NAME.PARAMETER_NAME}. + The filter parameter type. + + + + Get the entity instance associated with the given Key, + calling the Interceptor if necessary + + + + The best guess entity name for an entity not in an association + + + The guessed entity name for an entity not in an association + + + Execute a native SQL update or delete query + + + Execute a HQL update or delete query + + + + System time before the start of the transaction + + + + + + Get the creating SessionFactoryImplementor + + + + + + Get the prepared statement Batcher for this session + + + + + Return the currently enabled filters. The filter map is keyed by filter + name, with values corresponding to the + instance. + + The currently enabled filters. + + + Retrieves the configured event listeners from this event source. + + + Get the persistence context for this session + + + + Is the ISession still open? + + + + + Is the ISession currently connected? + + + + Determine whether the session is closed. Provided separately from + {@link #isOpen()} as this method does not attempt any JTA synch + registration, where as {@link #isOpen()} does; which makes this one + nicer to use for most internal purposes. + + True if the session is closed; false otherwise. + + + + + Does this Session have an active Hibernate transaction + or is there a JTA transaction in progress? + + + + Retrieve the entity mode in effect for this session. + + + + Get the columns of the associated table which are to + be used in the join + + + + + Get the aliased columns of the owning entity which are to + be used in the join + + + + + Get the columns of the owning entity which are to + be used in the join + + + + + Implements the algorithm for validating property values + for illegal null values + + + + + Check nullability of the class persister properties + + entity properties + class persister + wether it is intended to be updated or saved + + + + Check sub elements-nullability. Returns property path that break + nullability or null if none + + type to check + value to check + property path + + + + Check component nullability. Returns property path that break + nullability or null if none + + component properties + component not-nullable type + property path + + + + Return a well formed property path. + Basicaly, it will return parent.child + + parent in path + child in path + parent-child path + + + + Container for data that is used during the NHibernate query/load process. + + + + + + + + Ensure the Types and Values are the same length. + + + If the Lengths of and + are not equal. + + + + + + + + Named parameters. + + + + + Gets or sets an array of objects that is stored at the index + of the Parameter. + + + + + Gets or sets an array of objects that is stored at the index + of the Parameter. + + + + + Gets or sets the for the Query. + + + + + Gets or sets an that contains the alias name of the + object from hql as the key and the as the value. + + An of lock modes. + + + + Information to determine how to run an IDbCommand and what + records to return from the IDataReader. + + + + + Indicates that the no value has been set on the Property. + + + + + Gets or Sets the Index of the First Row to Select + + The Index of the First Rows to Select + Defaults to 0 unless specifically set. + + + + Gets or Sets the Maximum Number of Rows to Select + + The Maximum Number of Rows to Select + Defaults to NoValue unless specifically set. + + + + Gets or Sets the Timeout of the Query + + The Query Timeout + Defaults to NoValue unless specifically set. + + + + A represents the state of persistent "stuff" which + NHibernate is tracking. This includes persistent entities, collections, + as well as proxies generated. + + + There is meant to be a one-to-one correspondence between a SessionImpl and + a PersistentContext. The SessionImpl uses the PersistentContext to track + the current state of its context. Event-listeners then use the + PersistentContext to drive their processing. + + + + Constructs a PersistentContext, bound to the given session. + The session "owning" this context. + + + Add a collection which has no owner loaded + + + + Get and remove a collection whose owner is not yet loaded, + when its owner is being loaded + + + + Clear the state of the persistence context + + + Set the status of an entry + + + Called after transactions end + + + + Get the current state of the entity as known to the underlying + database, or null if there is no corresponding row + + + + + Retrieve the cached database snapshot for the requested entity key. + + The entity key for which to retrieve the cached snapshot + The cached snapshot + + + This differs from is two important respects: + no snapshot is obtained from the database if not already cached + an entry of NO_ROW here is interpreted as an exception + + + + + + Get the values of the natural id fields as known to the underlying + database, or null if the entity has no natural id or there is no + corresponding row. + + + + Add a canonical mapping from entity key to entity instance + + + + Get the entity instance associated with the given EntityKey + + + + Is there an entity with the given key in the persistence context + + + + Remove an entity from the session cache, also clear + up other state associated with the entity, all except + for the EntityEntry + + + + Get an entity cached by unique key + + + Add an entity to the cache by unique key + + + + Retrieve the EntityEntry representation of the given entity. + + The entity for which to locate the EntityEntry. + The EntityEntry for the given entity. + + + Remove an entity entry from the session cache + + + Is there an EntityEntry for this instance? + + + Get the collection entry for a persistent collection + + + Adds an entity to the internal caches. + + + + Generates an appropriate EntityEntry instance and adds it + to the event source's internal caches. + + + + Is the given collection associated with this persistence context? + + + Is the given proxy associated with this persistence context? + + + + Takes the given object and, if it represents a proxy, reassociates it with this event source. + + The possible proxy to be reassociated. + Whether the passed value represented an actual proxy which got initialized. + + + + If a deleted entity instance is re-saved, and it has a proxy, we need to + reset the identifier of the proxy + + + + + Associate a proxy that was instantiated by another session with this session + + The proxy initializer. + The proxy to reassociate. + + + + Get the entity instance underlying the given proxy, throwing + an exception if the proxy is uninitialized. If the given object + is not a proxy, simply return the argument. + + + + + Possibly unproxy the given reference and reassociate it with the current session. + + The reference to be unproxied if it currently represents a proxy. + The unproxied instance. + + + + Attempts to check whether the given key represents an entity already loaded within the + current session. + + The entity reference against which to perform the uniqueness check. + The entity key. + + + + If the existing proxy is insufficiently "narrow" (derived), instantiate a new proxy + and overwrite the registration of the old one. This breaks == and occurs only for + "class" proxies rather than "interface" proxies. Also init the proxy to point to + the given target implementation if necessary. + + The proxy instance to be narrowed. + The persister for the proxied entity. + The internal cache key for the proxied entity. + (optional) the actual proxied entity instance. + An appropriately narrowed instance. + + + + Return the existing proxy associated with the given EntityKey, or the + third argument (the entity associated with the key) if no proxy exists. Init + the proxy to the target implementation, if necessary. + + + + + Return the existing proxy associated with the given EntityKey, or the + argument (the entity associated with the key) if no proxy exists. + (slower than the form above) + + + + Get the entity that owns this persistent collection + + + Get the entity that owned this persistent collection when it was loaded + The persistent collection + + The owner, if its entity ID is available from the collection's loaded key + and the owner entity is in the persistence context; otherwise, returns null + + + + Get the ID for the entity that owned this persistent collection when it was loaded + The persistent collection + the owner ID if available from the collection's loaded key; otherwise, returns null + + + Get the ID for the entity that owned this persistent collection when it was loaded + The collection entry + the owner ID if available from the collection's loaded key; otherwise, returns null + + + add a collection we just loaded up (still needs initializing) + + + add a detached uninitialized collection + + + + Add a new collection (ie. a newly created one, just instantiated by the + application, with no database state or snapshot) + + The collection to be associated with the persistence context + + + + Add an collection to the cache, with a given collection entry. + The collection for which we are adding an entry. + The entry representing the collection. + The key of the collection's entry. + + + Add a collection to the cache, creating a new collection entry for it + The collection for which we are adding an entry. + The collection persister + + + + add an (initialized) collection that was created by another session and passed + into update() (ie. one with a snapshot and existing state on the database) + + + + add a collection we just pulled out of the cache (does not need initializing) + + + Get the collection instance associated with the CollectionKey + + + + Register a collection for non-lazy loading at the end of the two-phase load + + + + + Force initialization of all non-lazy collections encountered during + the current two-phase load (actually, this is a no-op, unless this + is the "outermost" load) + + + + Get the PersistentCollection object for an array + + + Register a PersistentCollection object for an array. + Associates a holder with an array - MUST be called after loading + array, since the array instance is not created until endLoad(). + + + + + Remove the mapping of collection to holder during eviction of the owning entity + + + + Get the snapshot of the pre-flush collection state + + + + Get the collection entry for a collection passed to filter, + which might be a collection wrapper, an array, or an unwrapped + collection. Return null if there is no entry. + + + + Get an existing proxy by key + + + Add a proxy to the session cache + + + Remove a proxy from the session cache + + + Called before cascading + + + Called after cascading + + + Call this before begining a two-phase load + + + Call this after finishing a two-phase load + + + + Search the persistence context for an owner for the child object, + given a collection role + + + + + Search the persistence context for an index of the child object, given a collection role + + + + + Record the fact that the association belonging to the keyed entity is null. + + + + Is the association property belonging to the keyed entity null? + + + Set the object to read only and discard it's snapshot + + + + Get the session to which this persistence context is bound. + + + + + Retrieve this persistence context's managed load context. + + + + + Get the BatchFetchQueue, instantiating one if necessary. + + + + Retrieve the set of EntityKeys representing nullifiable references + + + Get the mapping from key value to entity instance + + + Get the mapping from entity instance to entity entry + + + Get the mapping from collection instance to collection entry + + + Get the mapping from collection key to collection instance + + + How deep are we cascaded? + + + Is a flush cycle currently in process? + Called before and after the flushcycle + + + False if we know for certain that all the entities are read-only + + + + Represents the status of an entity with respect to + this session. These statuses are for internal + book-keeping only and are not intended to represent + any notion that is visible to the application. + + + + + The Entity is snapshotted in the Session with the same state as the database + (called Managed in H3). + + + + + The Entity is in the Session and has been marked for deletion but not + deleted from the database yet. + + + + + The Entity has been deleted from database. + + + + + The Entity is in the process of being loaded. + + + + + The Entity is in the process of being saved. + + + + + The entity is read-only. + + + + + Allows work to be done outside the current transaction, by suspending it, + and performing work in a new transaction + + + + The work to be done + + + Suspend the current transaction and perform work in a new transaction + + + + Functionality relating to Hibernate's two-phase loading process, + that may be reused by persisters that do not use the Loader + framework + + + + + Register the "hydrated" state of an entity instance, after the first step of 2-phase loading. + + Add the "hydrated state" (an array) of an uninitialized entity to the session. We don't try + to resolve any associations yet, because there might be other entities waiting to be + read from the JDBC result set we are currently processing + + + + + Perform the second step of 2-phase load. Fully initialize the entity instance. + After processing a JDBC result set, we "resolve" all the associations + between the entities which were instantiated and had their state + "hydrated" into an array + + + + + Add an uninitialized instance of an entity class, as a placeholder to ensure object + identity. Must be called before postHydrate(). + Create a "temporary" entry for a newly instantiated entity. The entity is uninitialized, + but we need the mapping from id to instance in order to guarantee uniqueness. + + + + An ordered pair of a value and its Hibernate type. + + + + Return an IdentifierValue for the specified unsaved-value. If none is specified, + guess the unsaved value by instantiating a test instance of the class and + reading it's id property, or if that is not possible, using the java default + value for the type + + + + + An enum of the different ways a value might be "included". + + + This is really an expanded true/false notion with Partial being the + expansion. Partial deals with components in the cases where + parts of the referenced component might define inclusion, but the + component overall does not. + + + + + Utility methods for managing versions and timestamps + + + + + Increment the given version number + + The value of the current version. + The of the versioned property. + The current . + Returns the next value for the version. + + + + Create an initial version number + + The of the versioned property. + The current . + A seed value to initialize the versioned property with. + + + + Seed the given instance state snapshot with an initial version number + + An array of objects that contains a snapshot of a persistent object. + The index of the version property in the fields parameter. + The of the versioned property. + Force the version to initialize + The current session, if any. + if the version property needs to be seeded with an initial value. + + + + Set the version number of the given instance state snapshot + + An array of objects that contains a snapshot of a persistent object. + The value the version should be set to in the fields parameter. + The that is responsible for persisting the values of the fields parameter. + + + + Get the version number of the given instance state snapshot + + An array of objects that contains a snapshot of a persistent object. + The that is responsible for persisting the values of the fields parameter. + + The value of the version contained in the fields parameter or null if the + Entity is not versioned. + + + + Do we need to increment the version number, given the dirty properties? + The array of property indexes which were deemed dirty + Were any collections found to be dirty (structurally changed) + An array indicating versionability of each property. + True if a version increment is required; false otherwise. + + + + A strategy for determining if a version value is an version of + a new transient instance or a previously persistent transient instance. + The strategy is determined by the Unsaved-Value attribute in the mapping file. + + + + + + + + Assume the transient instance is newly instantiated if its version is null or + equal to Value + + + + + + Does the given identifier belong to a new instance + + + + + Assume the transient instance is newly instantiated if the version + is null, otherwise assume it is a detached instance. + + + + + Assume the transient instance is newly instantiated if the version + is null, otherwise defer to the identifier unsaved-value. + + + + + Assume the transient instance is newly instantiated if the identifier + is null. + + + + + A convenience base class for listeners whose functionality results in flushing. + + + + + Coordinates the processing necessary to get things ready for executions + as db calls by preparing the session caches and moving the appropriate + entities and collections to their respective execution queues. + + The flush event. + + + + Execute all SQL and second-level cache updates, in a + special order so that foreign-key constraints cannot + be violated: + + Inserts, in the order they were performed + Updates + Deletion of collection elements + Insertion of collection elements + Deletes, in the order they were performed + + + + + + 1. Recreate the collection key -> collection map + 2. rebuild the collection entries + 3. call Interceptor.postFlush() + + + + + A convenience base class for listeners that respond to requests to perform a + pessimistic lock upgrade on an entity. + + + + + A convenience base class for listeners that respond to requests to reassociate an entity + to a session ( such as through lock() or update() ). + + + + + Associates a given entity (either transient or associated with another session) to the given session. + + The event triggering the re-association + The entity to be associated + The id of the entity. + The entity's persister instance. + An EntityEntry representing the entity within this session. + + + + Performs a pessimistic lock upgrade on a given entity, if needed. + + The entity for which to upgrade the lock. + The entity's EntityEntry instance. + The lock mode being requested for locking. + The session which is the source of the event being processed. + + + + A convenience bas class for listeners responding to save events. + + + + + Prepares the save call using the given requested id. + + The entity to be saved. + The id to which to associate the entity. + The name of the entity being saved. + Generally cascade-specific information. + The session which is the source of this save event. + The id used to save the entity. + + + + Prepares the save call using a newly generated id. + + The entity to be saved + The entity-name for the entity to be saved + Generally cascade-specific information. + The session which is the source of this save event. + + does the event context require + access to the identifier immediately after execution of this method (if + not, post-insert style id generators may be postponed if we are outside + a transaction). + + + The id used to save the entity; may be null depending on the + type of id generator used and the requiresImmediateIdAccess value + + + + + Prepares the save call by checking the session caches for a pre-existing + entity and performing any lifecycle callbacks. + + The entity to be saved. + The id by which to save the entity. + The entity's persister instance. + Is an identity column being used? + Generally cascade-specific information. + The session from which the event originated. + + does the event context require + access to the identifier immediately after execution of this method (if + not, post-insert style id generators may be postponed if we are outside + a transaction). + + + The id used to save the entity; may be null depending on the + type of id generator used and the requiresImmediateIdAccess value + + + + + Performs all the actual work needed to save an entity (well to get the save moved to + the execution queue). + + The entity to be saved + The id to be used for saving the entity (or null, in the case of identity columns) + The entity's persister instance. + Should an identity column be used for id generation? + Generally cascade-specific information. + The session which is the source of the current event. + + Is access to the identifier required immediately + after the completion of the save? persist(), for example, does not require this... + + + The id used to save the entity; may be null depending on the + type of id generator used and the requiresImmediateIdAccess value + + + + + Perform any property value substitution that is necessary + (interceptor callback, version initialization...) + + The entity + The entity identifier + The snapshot entity state + The entity persister + The originating session + + True if the snapshot state changed such that + reinjection of the values into the entity is required. + + + + Handles the calls needed to perform pre-save cascades for the given entity. + The session from which the save event originated. + The entity's persister instance. + The entity to be saved. + Generally cascade-specific data + + + Handles to calls needed to perform post-save cascades. + The session from which the event originated. + The entity's persister instance. + The entity being saved. + Generally cascade-specific data + + + + Determine whether the entity is persistent, detached, or transient + + The entity to check + The name of the entity + The entity's entry in the persistence context + The originating session. + The state. + + + + After the save, will te version number be incremented + if the instance is modified? + + True if the version will be incremented on an entity change after save; false otherwise. + + + + Abstract superclass of algorithms that walk a tree of property values of an entity, and + perform specific functionality for collections, components and associated entities. + + + + Dispatch each property value to ProcessValue(). + + + + + + Visit a property value. Dispatch to the correct handler for the property type. + + + + + + + Visit a component. Dispatch each property to + + + + + + + + Visit a many-to-one or one-to-one associated entity. Default superclass implementation is a no-op. + + + + + + + + Visit a collection. Default superclass implementation is a no-op. + + + + + + + + Walk the tree starting from the given entity. + + + + + + + Defines the default flush event listeners used by hibernate for + flushing session state in response to generated auto-flush events. + + + + Defines the contract for handling of session auto-flush events. + + + + Handle the given auto-flush event. + + The auto-flush event to be handled. + + + + Handle the given auto-flush event. + + The auto-flush event to be handled. + + + + Defines the default delete event listener used by hibernate for deleting entities + from the datastore in response to generated delete events. + + + + Defines the contract for handling of deletion events generated from a session. + + + Handle the given delete event. + The delete event to be handled. + + + Handle the given delete event. + The delete event to be handled. + + + Called when we have recognized an attempt to delete a detached entity. + The event. + + This is perfectly valid in Hibernate usage; JPA, however, forbids this. + Thus, this is a hook for HEM to affect this behavior. + + + + + We encountered a delete request on a transient instance. +

+ This is a deviation from historical Hibernate (pre-3.2) behavior to + align with the JPA spec, which states that transient entities can be + passed to remove operation in which case cascades still need to be + performed. +

+ The session which is the source of the event + The entity being delete processed + Is cascading of deletes enabled + The entity persister + + A cache of already visited transient entities (to avoid infinite recursion). + +
+ + + Perform the entity deletion. Well, as with most operations, does not + really perform it; just schedules an action/execution with the + for execution during flush. + + The originating session + The entity to delete + The entity's entry in the + Is delete cascading enabled? + The entity persister. + A cache of already deleted entities. + + + + Defines the default dirty-check event listener used by hibernate for + checking the session for dirtiness in response to generated dirty-check events. + + + + Defines the contract for handling of session dirty-check events. + + + Handle the given dirty-check event. + The dirty-check event to be handled. + + + + Defines the default evict event listener used by hibernate for evicting entities + in response to generated flush events. In particular, this implementation will + remove any hard references to the entity that are held by the infrastructure + (references held by application or other persistent instances are okay) + + + + Defines the contract for handling of evict events generated from a session. + + + Handle the given evict event. + The evict event to be handled. + + + + An event that occurs for each entity instance at flush time + + + + + Flushes a single entity's state to the database, by scheduling an update action, if necessary + + + + + make sure user didn't mangle the id + + The obj. + The persister. + The id. + The entity mode. + + + + Performs all necessary checking to determine if an entity needs an SQL update + to synchronize its state to the database. Modifies the event by side-effect! + Note: this method is quite slow, avoid calling if possible! + + + + Perform a dirty check, and attach the results to the event + + + + Defines the default flush event listeners used by hibernate for + flushing session state in response to generated flush events. + + + + Defines the contract for handling of session flush events. + + + Handle the given flush event. + The flush event to be handled. + + + + Defines the contract for handling of collection initialization events + generated by a session. + + + + called by a collection that wants to initialize itself + + + Try to initialize a collection from the cache + + + + Defines the default load event listeners used by hibernate for loading entities + in response to generated load events. + + + + + Defines the contract for handling of load events generated from a session. + + + + + Handle the given load event. + + The load event to be handled. + + The result (i.e., the loaded entity). + + + Perfoms the load of an entity. + The loaded entity. + + + + Based on configured options, will either return a pre-existing proxy, + generate a new proxy, or perform an actual load. + + The result of the proxy/load operation. + + + + Given that there is a pre-existing proxy. + Initialize it if necessary; narrow if necessary. + + + + + Given that there is no pre-existing proxy. + Check if the entity is already loaded. If it is, return the entity, + otherwise create and return a proxy. + + + + + If the class to be loaded has been configured with a cache, then lock + given id in that cache and then perform the load. + + The loaded entity + + + + Coordinates the efforts to load a given entity. First, an attempt is + made to load the entity from the session-level cache. If not found there, + an attempt is made to locate it in second-level cache. Lastly, an + attempt is made to load it directly from the datasource. + + The load event + The persister for the entity being requested for load + The EntityKey representing the entity to be loaded. + The load options. + The loaded entity, or null. + + + + Performs the process of loading an entity from the configured underlying datasource. + + The load event + The persister for the entity being requested for load + The EntityKey representing the entity to be loaded. + The load options. + The object loaded from the datasource, or null if not found. + + + + Attempts to locate the entity in the session-level cache. + + The load event + The EntityKey representing the entity to be loaded. + The load options. + The entity from the session-level cache, or null. + + If allowed to return nulls, then if the entity happens to be found in + the session cache, we check the entity type for proper handling + of entity hierarchies. + If checkDeleted was set to true, then if the entity is found in the + session-level cache, it's current status within the session cache + is checked to see if it has previously been scheduled for deletion. + + + + Attempts to load the entity from the second-level cache. + The load event + The persister for the entity being requested for load + The load options. + The entity from the second-level cache, or null. + + + + Defines the default lock event listeners used by hibernate to lock entities + in response to generated lock events. + + + + + Defines the contract for handling of lock events generated from a session. + + + + Handle the given lock event. + The lock event to be handled. + + + Handle the given lock event. + The lock event to be handled. + + + + Defines the default copy event listener used by hibernate for copying entities + in response to generated copy events. + + + + + Defines the contract for handling of merge events generated from a session. + + + + Handle the given merge event. + The merge event to be handled. + + + Handle the given merge event. + The merge event to be handled. + + + + + Perform any cascades needed as part of this copy event. + + The merge event being processed. + The persister of the entity being copied. + The entity being copied. + A cache of already copied instance. + + + Cascade behavior is redefined by this subclass, disable superclass behavior + + + Cascade behavior is redefined by this subclass, disable superclass behavior + + + + Defines the default create event listener used by hibernate for creating + transient entities in response to generated create events. + + + + + Defines the contract for handling of create events generated from a session. + + + + Handle the given create event. + The create event to be handled. + + + Handle the given create event. + The create event to be handled. + + + + Handle the given create event. + The save event to be handled. + + + + When persist is used as the cascade action, persistOnFlush should be used + + + Call interface if necessary + + + + Occurs after an an entity instance is fully loaded. + + + + + + + + + + + Called before injecting property values into a newly + loaded entity instance. + + + + + Called before injecting property values into a newly loaded entity instance. + + + + + + + + + + + Defines the default refresh event listener used by hibernate for refreshing entities + in response to generated refresh events. + + + + + Defines the contract for handling of refresh events generated from a session. + + + + Handle the given refresh event. + The refresh event to be handled. + + + + + + + + + + + Defines the default replicate event listener used by Hibernate to replicate + entities in response to generated replicate events. + + + + + Defines the contract for handling of replicate events generated from a session. + + + + Handle the given replicate event. + The replicate event to be handled. + + + An event handler for save() events + + + + Defines the default listener used by Hibernate for handling save-update events. + + + + + Defines the contract for handling of update events generated from a session. + + + + Handle the given update event. + The update event to be handled. + + + + The given save-update event named a transient entity. + Here, we will perform the save processing. + + The save event to be handled. + The entity's identifier after saving. + + + + Save the transient instance, assigning the right identifier + + The initiating event. + The entity's identifier value after saving. + + + + The given save-update event named a detached entity. + Here, we will perform the update processing. + + The update event to be handled. + + + Determine the id to use for updating. + The entity. + The entity persister + The requested identifier + The entity mode. + The id. + + + + Handles the calls needed to perform cascades as part of an update request + for the given entity. + + The event currently being processed. + The defined persister for the entity being updated. + The entity being updated. + + + An event handler for update() events + + + + If the user specified an id, assign it to the instance and use that, + otherwise use the id already assigned to the instance + + + + + A Visitor that determines if a dirty collection was found. + + + + + Reason for dirty collection + + + + If it is a new application-instantiated collection, return true (does not occur anymore!) + + + + + If it is a component, recurse. + + + + + If it is a wrapped collection, ask the collection entry. + + + + + + + + Gets a indicating if a dirty collection was found. + + if a dirty collection was found. + + + + Evict any collections referenced by the object from the session cache. + This will NOT pick up any collections that were dereferenced, so they + will be deleted (suboptimal but not exactly incorrect). + + + + + Process collections reachable from an entity. + This visitor assumes that wrap was already performed for the entity. + + + + + When a transient entity is passed to lock(), we must inspect all its collections and + 1. associate any uninitialized PersistentCollections with this session + 2. associate any initialized PersistentCollections with this session, using the existing snapshot + 3. throw an exception for each "new" collection + + + + + Abstract superclass of visitors that reattach collections + + + + + Reassociates uninitialized proxies with the session + + + + + Visit a many-to-one or one-to-one associated entity. Default superclass implementation is a no-op. + + + + + + + + Has the owner of the collection changed since the collection was snapshotted and detached? + + + + + Reattach a detached (disassociated) initialized or uninitialized + collection wrapper, using a snapshot carried with the collection wrapper + + + + + Schedules a collection for deletion. + + The persister representing the collection to be removed. + The collection key (differs from owner-id in the case of property-refs). + The session from which the request originated. + + + + This version is slightly different in that here we need to assume that + the owner is not yet associated with the session, and thus we cannot + rely on the owner's EntityEntry snapshot... + + The persister for the collection role being processed. + + + + + When an entity is passed to replicate(), and there is an existing row, we must + inspect all its collections and + 1. associate any uninitialized PersistentCollections with this session + 2. associate any initialized PersistentCollections with this session, using the existing snapshot + 3. execute a collection removal (SQL DELETE) for each null collection property or "new" collection + + + + + When an entity is passed to update(), we must inspect all its collections and + 1. associate any uninitialized PersistentCollections with this session + 2. associate any initialized PersistentCollections with this session, using the existing snapshot + 3. execute a collection removal (SQL DELETE) for each null collection property or "new" collection + + + + + Wrap collections in a Hibernate collection wrapper. + + + + Defines a base class for events involving collections. + + + + Defines a base class for Session generated events. + + + + + Returns the session event source for this event. + This is the underlying session from which this event was generated. + + + + + Constructs an event from the given event session. + + The session event source. + + + + Returns the session event source for this event. + This is the underlying session from which this event was generated. + + + + Constructs an AbstractCollectionEvent object. + The collection persister. + The collection + The Session source + The owner that is affected by this event; can be null if unavailable + + The ID for the owner that is affected by this event; can be null if unavailable + that is affected by this event; can be null if unavailable + + + + Get the entity name for the collection owner entity that is affected by this event. + + The entity name; if the owner is not in the PersistenceContext, the + returned value may be a superclass name, instead of the actual class name + + + + The collection owner entity that is affected by this event. + + Returns null if the entity is not in the persistence context + (e.g., because the collection from a detached entity was moved to a new owner) + + + + Get the ID for the collection owner entity that is affected by this event. + + Returns null if the ID cannot be obtained + from the collection's loaded key (e.g., a property-ref is used for the + collection and does not include the entity's ID) + + + + + Represents an operation we performed against the database. + + + + + Represents an operation we performed against the database. + + + + The entity involved in the database operation. + + + The id to be used in the database operation. + + + + The persister for the . + + + + Constructs an event containing the pertinent information. + The session from which the event originated. + The entity to be invloved in the database operation. + The entity id to be invloved in the database operation. + The entity's persister. + + + The entity involved in the database operation. + + + The id to be used in the database operation. + + + + The persister for the . + + + + + Represents an operation we are about to perform against the database. + + + + The entity involved in the database operation. + + + The id to be used in the database operation. + + + + The persister for the . + + + + Constructs an event containing the pertinent information. + The session from which the event originated. + The entity to be invloved in the database operation. + The entity id to be invloved in the database operation. + The entity's persister. + + + The entity involved in the database operation. + + + The id to be used in the database operation. + + + + The persister for the . + + + + Defines an event class for the auto-flushing of a session. + + + Defines an event class for the flushing of a session. + + + Defines an event class for the deletion of an entity. + + + Constructs a new DeleteEvent instance. + The entity to be deleted. + The session from which the delete event was generated. + + + + + Returns the encapsulated entity to be deleed. + + + + Defines an event class for the dirty-checking of a session. + + + + A convience holder for all defined session event listeners. + + + + + Call on any listeners that implement + . + + + + + Defines an event class for the evicting of an entity. + + + + Contract for listeners which require notification of SessionFactory closing, + presumably to destroy internal state. + + + + + Notification of shutdown. + + + + + The main runtime interface between a .NET application and NHibernate. This is the central + API class abstracting the notion of a persistence service. + + + + The lifecycle of a ISession is bounded by the beginning and end of a logical + transaction. (Long transactions might span several database transactions.) + + + The main function of the ISession is to offer create, find and delete operations + for instances of mapped entity classes. Instances may exist in one of two states: + + transient: not associated with any ISession + persistent: associated with a ISession + + + + Transient instances may be made persistent by calling Save(), Insert(), + or Update(). Persistent instances may be made transient by calling Delete(). + Any instance returned by a List(), Iterate(), Load(), or Create + method is persistent. + + + Save() results in an SQL INSERT, Delete() + in an SQL DELETE and Update() in an SQL UPDATE. Changes to + persistent instances are detected at flush time and also result in an SQL + UPDATE. + + + It is not intended that implementors be threadsafe. Instead each thread/transaction should obtain + its own instance from an ISessionFactory. + + + A ISession instance is serializable if its persistent classes are serializable + + + A typical transaction should use the following idiom: + + ISession sess = factory.OpenSession(); + ITransaction tx; + try { + tx = sess.BeginTransaction(); + //do some work + ... + tx.Commit(); + } catch (Exception e) { + if (tx != null) tx.Rollback(); + throw; + } finally { + sess.Close(); + } + + + + If the ISession throws an exception, the transaction must be rolled back and the session + discarded. The internal state of the ISession might not be consistent with the database + after the exception occurs. + + + + + + + Force the ISession to flush. + + + Must be called at the end of a unit of work, before commiting the transaction and closing + the session (Transaction.Commit() calls this method). Flushing if the process + of synchronising the underlying persistent store with persistable state held in memory. + + + + + Disconnect the ISession from the current ADO.NET connection. + + + If the connection was obtained by Hibernate, close it or return it to the connection + pool. Otherwise return it to the application. This is used by applications which require + long transactions. + + The connection provided by the application or + + + + Obtain a new ADO.NET connection. + + + This is used by applications which require long transactions + + + + + Reconnect to the given ADO.NET connection. + + This is used by applications which require long transactions + An ADO.NET connection + + + + End the ISession by disconnecting from the ADO.NET connection and cleaning up. + + + It is not strictly necessary to Close() the ISession but you must + at least Disconnect() it. + + The connection provided by the application or + + + + Cancel execution of the current query. + + + May be called from one thread to stop execution of a query in another thread. + Use with care! + + + + + Does this ISession contain any changes which must be + synchronized with the database? Would any SQL be executed if + we flushed this session? + + + + + Return the identifier of an entity instance cached by the ISession + + + Throws an exception if the instance is transient or associated with a different + ISession + + a persistent instance + the identifier + + + + Is this instance associated with this Session? + + an instance of a persistent class + true if the given instance is associated with this Session + + + + Remove this instance from the session cache. + + + Changes to the instance will not be synchronized with the database. + This operation cascades to associated instances if the association is mapped + with cascade="all" or cascade="all-delete-orphan". + + a persistent instance + + + + Return the persistent instance of the given entity class with the given identifier, + obtaining the specified lock mode. + + A persistent class + A valid identifier of an existing persistent instance of the class + The lock level + the persistent instance + + + + Return the persistent instance of the given entity class with the given identifier, + obtaining the specified lock mode, assuming the instance exists. + + The entity-name of a persistent class + a valid identifier of an existing persistent instance of the class + the lock level + the persistent instance or proxy + + + + Return the persistent instance of the given entity class with the given identifier, + assuming that the instance exists. + + + You should not use this method to determine if an instance exists (use a query or + instead). Use this only to retrieve an instance + that you assume exists, where non-existence would be an actual error. + + A persistent class + A valid identifier of an existing persistent instance of the class + The persistent instance or proxy + + + + Return the persistent instance of the given entity class with the given identifier, + obtaining the specified lock mode. + + A persistent class + A valid identifier of an existing persistent instance of the class + The lock level + the persistent instance + + + + Return the persistent instance of the given entity class with the given identifier, + assuming that the instance exists. + + + You should not use this method to determine if an instance exists (use a query or + instead). Use this only to retrieve an instance that you + assume exists, where non-existence would be an actual error. + + A persistent class + A valid identifier of an existing persistent instance of the class + The persistent instance or proxy + + + + Return the persistent instance of the given with the given identifier, + assuming that the instance exists. + + The entity-name of a persistent class + a valid identifier of an existing persistent instance of the class + The persistent instance or proxy + + You should not use this method to determine if an instance exists (use + instead). Use this only to retrieve an instance that you assume exists, where non-existence + would be an actual error. + + + + + Read the persistent state associated with the given identifier into the given transient + instance. + + An "empty" instance of the persistent class + A valid identifier of an existing persistent instance of the class + + + + Persist all reachable transient objects, reusing the current identifier + values. Note that this will not trigger the Interceptor of the Session. + + a detached instance of a persistent class + + + + + Persist the state of the given detached instance, reusing the current + identifier value. This operation cascades to associated instances if + the association is mapped with cascade="replicate". + + + a detached instance of a persistent class + + + + + Persist the given transient instance, first assigning a generated identifier. + + + Save will use the current value of the identifier property if the Assigned + generator is used. + + A transient instance of a persistent class + The generated identifier + + + + Persist the given transient instance, using the given identifier. + + A transient instance of a persistent class + An unused valid identifier + + + + Persist the given transient instance, first assigning a generated identifier. (Or + using the current value of the identifier property if the assigned + generator is used.) + + The Entity name. + a transient instance of a persistent class + the generated identifier + + This operation cascades to associated instances if the + association is mapped with cascade="save-update". + + + + + Either Save() or Update() the given instance, depending upon the value of + its identifier property. + + + By default the instance is always saved. This behaviour may be adjusted by specifying + an unsaved-value attribute of the identifier property mapping + + A transient instance containing new or updated state + + + + Either or + the given instance, depending upon resolution of the unsaved-value checks + (see the manual for discussion of unsaved-value checking). + + The name of the entity + a transient or detached instance containing new or updated state + + + + This operation cascades to associated instances if the association is mapped + with cascade="save-update". + + + + + Update the persistent instance with the identifier of the given transient instance. + + + If there is a persistent instance with the same identifier, an exception is thrown. If + the given transient instance has a identifier, an exception will be thrown. + + A transient instance containing updated state + + + + Update the persistent state associated with the given identifier. + + + An exception is thrown if there is a persistent instance with the same identifier + in the current session. + + A transient instance containing updated state + Identifier of persistent instance + + + + Update the persistent instance with the identifier of the given detached + instance. + + The Entity name. + a detached instance containing updated state + + If there is a persistent instance with the same identifier, + an exception is thrown. This operation cascades to associated instances + if the association is mapped with cascade="save-update". + + + + + Copy the state of the given object onto the persistent object with the same + identifier. If there is no persistent instance currently associated with + the session, it will be loaded. Return the persistent instance. If the + given instance is unsaved, save a copy of and return it as a newly persistent + instance. The given instance does not become associated with the session. + This operation cascades to associated instances if the association is mapped + with cascade="merge".
+ The semantics of this method are defined by JSR-220. +
+ a detached instance with state to be copied + an updated persistent instance +
+ + + Copy the state of the given object onto the persistent object with the same + identifier. If there is no persistent instance currently associated with + the session, it will be loaded. Return the persistent instance. If the + given instance is unsaved, save a copy of and return it as a newly persistent + instance. The given instance does not become associated with the session. + This operation cascades to associated instances if the association is mapped + with cascade="merge".
+ The semantics of this method are defined by JSR-220. + Name of the entity. + a detached instance with state to be copied + an updated persistent instance +
+ +
+ + + Make a transient instance persistent. This operation cascades to associated + instances if the association is mapped with cascade="persist".
+ The semantics of this method are defined by JSR-220. +
+ a transient instance to be made persistent +
+ + + Make a transient instance persistent. This operation cascades to associated + instances if the association is mapped with cascade="persist".
+ The semantics of this method are defined by JSR-220. +
+ Name of the entity. + a transient instance to be made persistent +
+ + + Copy the state of the given object onto the persistent object with the same + identifier. If there is no persistent instance currently associated with + the session, it will be loaded. Return the persistent instance. If the + given instance is unsaved or does not exist in the database, save it and + return it as a newly persistent instance. Otherwise, the given instance + does not become associated with the session. + + a transient instance with state to be copied + an updated persistent instance + + + + Copy the state of the given object onto the persistent object with the + given identifier. If there is no persistent instance currently associated + with the session, it will be loaded. Return the persistent instance. If + there is no database row with the given identifier, save the given instance + and return it as a newly persistent instance. Otherwise, the given instance + does not become associated with the session. + + a persistent or transient instance with state to be copied + the identifier of the instance to copy to + an updated persistent instance + + + + Remove a persistent instance from the datastore. + + + The argument may be an instance associated with the receiving ISession or a + transient instance with an identifier associated with existing persistent state. + + The instance to be removed + + + + Remove a persistent instance from the datastore. The object argument may be + an instance associated with the receiving or a transient + instance with an identifier associated with existing persistent state. + This operation cascades to associated instances if the association is mapped + with cascade="delete". + + The entity name for the instance to be removed. + the instance to be removed + + + + Execute a query + + A query expressed in Hibernate's query language + A distinct list of instances + See for implications of cache usage. + + + + Execute a query, binding a value to a "?" parameter in the query string. + + The query string + A value to be bound to a "?" placeholder + The Hibernate type of the value + A distinct list of instances + See for implications of cache usage. + + + + Execute a query, binding an array of values to a "?" parameters in the query string. + + The query string + An array of values to be bound to the "?" placeholders + An array of Hibernate types of the values + A distinct list of instances + See for implications of cache usage. + + + + Execute a query and return the results in an interator. + + + + If the query has multiple return values, values will be returned in an array of + type object[]. + + + Entities returned as results are initialized on demand. The first SQL query returns + identifiers only. So Enumerator() is usually a less efficient way to retrieve + object than List(). + + + The query string + An enumerator + + + + Execute a query and return the results in an interator, + binding a value to a "?" parameter in the query string. + + + + If the query has multiple return values, values will be returned in an array of + type object[]. + + + Entities returned as results are initialized on demand. The first SQL query returns + identifiers only. So Enumerator() is usually a less efficient way to retrieve + object than List(). + + + The query string + A value to be written to a "?" placeholder in the query string + The hibernate type of the value + An enumerator + + + + Execute a query and return the results in an interator, + binding the values to "?"s parameters in the query string. + + + + If the query has multiple return values, values will be returned in an array of + type object[]. + + + Entities returned as results are initialized on demand. The first SQL query returns + identifiers only. So Enumerator() is usually a less efficient way to retrieve + object than List(). + + + The query string + A list of values to be written to "?" placeholders in the query + A list of hibernate types of the values + An enumerator + + + + Apply a filter to a persistent collection. + + + A filter is a Hibernate query that may refer to this, the collection element. + Filters allow efficient access to very large lazy collections. (Executing the filter + does not initialize the collection.) + + A persistent collection to filter + A filter query string + The resulting collection + + + + Apply a filter to a persistent collection, binding the given parameter to a "?" placeholder + + + A filter is a Hibernate query that may refer to this, the collection element. + Filters allow efficient access to very large lazy collections. (Executing the filter + does not initialize the collection.) + + A persistent collection to filter + A filter query string + A value to be written to a "?" placeholder in the query + The hibernate type of value + A collection + + + + Apply a filter to a persistent collection, binding the given parameters to "?" placeholders. + + + A filter is a Hibernate query that may refer to this, the collection element. + Filters allow efficient access to very large lazy collections. (Executing the filter + does not initialize the collection.) + + A persistent collection to filter + A filter query string + The values to be written to "?" placeholders in the query + The hibernate types of the values + A collection + + + + Delete all objects returned by the query. + + The query string + Returns the number of objects deleted. + + + + Delete all objects returned by the query. + + The query string + A value to be written to a "?" placeholer in the query + The hibernate type of value. + The number of instances deleted + + + + Delete all objects returned by the query. + + The query string + A list of values to be written to "?" placeholders in the query + A list of Hibernate types of the values + The number of instances deleted + + + + Obtain the specified lock level upon the given object. + + A persistent instance + The lock level + + + + Obtain the specified lock level upon the given object. + + The Entity name. + a persistent or transient instance + the lock level + + This may be used to perform a version check (), to upgrade to a pessimistic + lock (), or to simply reassociate a transient instance + with a session (). This operation cascades to associated + instances if the association is mapped with cascade="lock". + + + + + Re-read the state of the given instance from the underlying database. + + + + It is inadvisable to use this to implement long-running sessions that span many + business tasks. This method is, however, useful in certain special circumstances. + + + For example, + + Where a database trigger alters the object state upon insert or update + After executing direct SQL (eg. a mass update) in the same session + After inserting a Blob or Clob + + + + A persistent instance + + + + Re-read the state of the given instance from the underlying database, with + the given LockMode. + + + It is inadvisable to use this to implement long-running sessions that span many + business tasks. This method is, however, useful in certain special circumstances. + + a persistent or transient instance + the lock mode to use + + + + Determine the current lock mode of the given object + + A persistent instance + The current lock mode + + + + Begin a unit of work and return the associated ITransaction object. + + + If a new underlying transaction is required, begin the transaction. Otherwise + continue the new work in the context of the existing underlying transaction. + The class of the returned object is determined by + the property transaction_factory + + A transaction instance + + + + Begin a transaction with the specified isolationLevel + + Isolation level for the new transaction + A transaction instance having the specified isolation level + + + + Creates a new Criteria for the entity class. + + The entity class + An ICriteria object + + + + Creates a new Criteria for the entity class with a specific alias + + The entity class + The alias of the entity + An ICriteria object + + + + Creates a new Criteria for the entity class. + + The class to Query + An ICriteria object + + + + Creates a new Criteria for the entity class with a specific alias + + The class to Query + The alias of the entity + An ICriteria object + + + + Create a new Criteria instance, for the given entity name. + + The name of the entity to Query + An ICriteria object + + + + Create a new Criteria instance, for the given entity name, + with the given alias. + + The name of the entity to Query + The alias of the entity + An ICriteria object + + + + Create a new instance of Query for the given query string + + A hibernate query string + The query + + + + Create a new instance of Query for the given collection and filter string + + A persistent collection + A hibernate query + A query + + + + Obtain an instance of for a named query string defined in the + mapping file. + + The name of a query defined externally. + An from a named query string. + + The query can be either in HQL or SQL format. + + + + + Create a new instance of IQuery for the given SQL string. + + a query expressed in SQL + a table alias that appears inside {} in the SQL string + the returned persistent class + An from the SQL string + + + + Create a new instance of for the given SQL string. + + a query expressed in SQL + an array of table aliases that appear inside {} in the SQL string + the returned persistent classes + An from the SQL string + + + + Create a new instance of for the given SQL query string. + + a query expressed in SQL + An from the SQL string + + + + Completely clear the session. Evict all loaded instances and cancel all pending + saves, updates and deletions. Do not close open enumerables or instances of + ScrollableResults. + + + + + Return the persistent instance of the given entity class with the given identifier, or null + if there is no such persistent instance. (If the instance, or a proxy for the instance, is + already associated with the session, return that instance or proxy.) + + a persistent class + an identifier + a persistent instance or null + + + + Return the persistent instance of the given entity class with the given identifier, or null + if there is no such persistent instance. Obtain the specified lock mode if the instance + exists. + + a persistent class + an identifier + the lock mode + a persistent instance or null + + + + Return the persistent instance of the given named entity with the given identifier, + or null if there is no such persistent instance. (If the instance, or a proxy for the + instance, is already associated with the session, return that instance or proxy.) + + the entity name + an identifier + a persistent instance or null + + + + Strongly-typed version of + + + + + Strongly-typed version of + + + + + Return the entity name for a persistent entity + + a persistent entity + the entity name + + + + Enable the named filter for this current session. + + The name of the filter to be enabled. + The Filter instance representing the enabled filter. + + + + Retrieve a currently enabled filter by name. + + The name of the filter to be retrieved. + The Filter instance representing the enabled filter. + + + + Disable the named filter for the current session. + + The name of the filter to be disabled. + + + + Create a multi query, a query that can send several + queries to the server, and return all their results in a single + call. + + + An that can return + a list of all the results of all the queries. + Note that each query result is itself usually a list. + + + + + Sets the batch size of the session + + + + + + + Gets the session implementation. + + + This method is provided in order to get the NHibernate implementation of the session from wrapper implementions. + Implementors of the interface should return the NHibernate implementation of this method. + + + An NHibernate implementation of the interface + + + + + An that can return a list of all the results + of all the criterias. + + + + + + Starts a new Session with the given entity mode in effect. This secondary + Session inherits the connection, transaction, and other context + information from the primary Session. It doesn't need to be flushed + or closed by the developer. + + The entity mode to use for the new session. + The new session + + + The entity mode in effect for this session. + + + + Determines at which points Hibernate automatically flushes the session. + + + For a readonly session, it is reasonable to set the flush mode to FlushMode.Never + at the start of the session (in order to achieve some extra performance). + + + + The current cache mode. + + Cache mode determines the manner in which this session can interact with + the second level cache. + + + + + Get the that created this instance. + + + + + Gets the ADO.NET connection. + + + Applications are responsible for calling commit/rollback upon the connection before + closing the ISession. + + + + + Is the ISession still open? + + + + + Is the ISession currently connected? + + + + + Get the current Unit of Work and return the associated ITransaction object. + + + + Get the statistics for this session. + + + + Instantiate an entity instance, using either an interceptor, + or the given persister + + + + Force an immediate flush + + + Cascade merge an entity instance + + + Cascade persist an entity instance + + + Cascade persist an entity instance during the flush process + + + Cascade refresh an entity instance + + + Cascade copy an entity instance + + + Cascade delete an entity instance + + + Get the ActionQueue for this session + + + + An event listener that requires access to mappings to + initialize state at initialization time. + + + + + An event that occurs when a collection wants to be initialized + + + + Called after recreating a collection + + + Called after removing a collection + + + Called after updating a collection + + + Called after deleting an item from the datastore + + + + + + + + + Called after inserting an item in the datastore + + + + + + + + + + Called after updating the datastore + + + + + + + + + + Called before recreating a collection + + + Called before removing a collection + + + Called before updating a collection + + + + Called before deleting an item from the datastore + + + + Return true if the operation should be vetoed + + + + + Called before inserting an item in the datastore + + + + Return true if the operation should be vetoed + + + + + Called before updating the datastore + + + + Return true if the operation should be vetoed + + + + + Values for listener type property. + + + + Not allowed in Xml. It represents the default value when an explicit type is assigned. + + + Xml value: auto-flush + + + Xml value: merge + + + Xml value: create + + + Xml value: create-onflush + + + Xml value: delete + + + Xml value: dirty-check + + + Xml value: evict + + + Xml value: flush + + + Xml value: flush-entity + + + Xml value: load + + + Xml value: load-collection + + + Xml value: lock + + + Xml value: refresh + + + Xml value: replicate + + + Xml value: save-update + + + Xml value: save + + + Xml value: pre-update + + + Xml value: update + + + Xml value: pre-load + + + Xml value: pre-delete + + + Xml value: pre-insert + + + Xml value: pre-collection-recreate + + + Xml value: pre-collection-remove + + + Xml value: pre-collection-update + + + Xml value: post-load + + + Xml value: post-insert + + + Xml value: post-update + + + Xml value: post-delete + + + Xml value: post-commit-update + + + Xml value: post-commit-insert + + + Xml value: post-commit-delete + + + Xml value: post-collection-recreate + + + Xml value: post-collection-remove + + + Xml value: post-collection-update + + + Defines an event class for the loading of an entity. + + + + Defines an event class for the locking of an entity. + + + + + An event class for merge() and saveOrUpdateCopy() + + + + An event class for persist() + + + An event that occurs after a collection is recreated + + + An event that occurs after a collection is removed + + + An event that occurs after a collection is updated + + + + Occurs after deleting an item from the datastore + + + + + Occurs after inserting an item in the datastore + + + + + Occurs after an an entity instance is fully loaded. + + + + + Occurs after the datastore is updated + + + + An event that occurs before a collection is recreated + + + An event that occurs before a collection is removed + + + An event that occurs before a collection is updated + + + + Represents a pre-delete event, which occurs just prior to + performing the deletion of an entity from the database. + + + + + Constructs an event containing the pertinent information. + + The entity to be deleted. + The id to use in the deletion. + The entity's state at deletion time. + The entity's persister. + The session from which the event originated. + + + + This is the entity state at the + time of deletion (useful for optomistic locking and such). + + + + + Represents a pre-insert event, which occurs just prior to + performing the insert of an entity into the database. + + + + + These are the values to be inserted. + + + + + Called before injecting property values into a newly loaded entity instance. + + + + + Represents a pre-update event, which occurs just prior to + performing the update of an entity in the database. + + + + + Retrieves the state to be used in the update. + + + + + The old state of the entity at the time it was last loaded from the + database; can be null in the case of detached entities. + + + + + Defines an event class for the refreshing of an object. + + + + + Defines an event class for the replication of an entity. + + + + + An event class for saveOrUpdate() + + + + + Implementation of ADOException indicating problems with communicating with the + database (can also include incorrect ADO setup). + + + + + Wraps exceptions that occur during ADO.NET calls. + + + Exceptions thrown by various ADO.NET providers are not derived from + a common base class (SQLException in Java), so + is used instead in NHibernate. + + + + + Initializes a new instance of the class. + + The message that describes the error. + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Collect data of an to be converted. + + + + + The to be converted. + + + + + An optional error message. + + + + + The SQL that generate the exception + + + + + Optional EntityName where available in the original exception context. + + + + + Optional EntityId where available in the original exception context. + + + + + Converts the given SQLException into Exception hierarchy, as well as performing + appropriate logging. + + The converter to use. + The exception to convert. + An optional error message. + The SQL executed. + The converted . + + + + Converts the given SQLException into Exception hierarchy, as well as performing + appropriate logging. + + The converter to use. + The exception to convert. + An optional error message. + The converted . + + + For the given , locates the . + The exception from which to extract the + The , or null. + + + + Implementation of ADOException indicating that the requested DML operation + resulted in a violation of a defined integrity constraint. + + + + + Returns the name of the violated constraint, if known. + + The name of the violated constraint, or null if not known. + + + + Implementation of ADOException indicating that evaluation of the + valid SQL statement against the given data resulted in some + illegal operation, mismatched types or incorrect cardinality. + + + + + The Configurable interface defines the contract for impls that + want to be configured prior to usage given the currently defined Hibernate properties. + + + + Configure the component, using the given settings and properties. + All defined startup properties. + + + + Defines a contract for implementations that know how to convert a + into NHibernate's hierarchy. + + + Inspired by Spring's SQLExceptionTranslator. + + Implementations must have a constructor which takes a + parameter. + + Implementations may implement if they need to perform + configuration steps prior to first use. + + + + + + Convert the given into custom Exception. + + Available information during exception throw. + The resulting Exception to throw. + + + + Implementation of ADOException indicating a problem acquiring lock + on the database. + + + + A factory for building SQLExceptionConverter instances. + + + Build a SQLExceptionConverter instance. + The defined dialect. + The configuration properties. + An appropriate instance. + + First, looks for a property to see + if the configuration specified the class of a specific converter to use. If this + property is set, attempt to construct an instance of that class. If not set, or + if construction fails, the converter specific to the dialect will be used. + + + + + Builds a minimal converter. The instance returned here just always converts to . + + The minimal converter. + + + + Implementation of ADOException indicating that the SQL sent to the database + server was invalid (syntax error, invalid object references, etc). + + + + + A SQLExceptionConverter implementation which performs no conversion of + the underlying . + Interpretation of a SQL error based on + is not possible as using the ErrorCode (which is, however, vendor- + specific). Use of a ErrorCode-based converter should be preferred approach + for converting/interpreting SQLExceptions. + + + + Handle an exception not converted to a specific type based on the SQLState. + The exception to be handled. + An optional message + Optionally, the sql being performed when the exception occurred. + The converted exception; should never be null. + + + + Encapsulates the strategy required to execute various types of update, delete, + and insert statements issued through HQL. + + + + + Execute the sql managed by this executor using the given parameters. + + Essentially bind information for this processing. + The session originating the request. + The number of entities updated/deleted. + + + + True if this is a filter query (allow no FROM clause). * + + + + Returns to the previous 'FROM' context. + + + + + + Implementations will report or handle errors invoked by an ANTLR base parser. + Author: josh + Ported by: Steve Strong + + + + all append invocations on the buf should go through this Output instance variable. + The value of this variable may be temporarily substitued by sql function processing code + to catch generated arguments. + This is because sql function templates need arguments as seperate string chunks + that will be assembled into the target dialect-specific function call. + + + + Handles parser errors. + + + + + Add a aspace if the previous token was not a space or a parenthesis. + + + + + The default SQL writer. + + + + + Writes SQL fragments. + + + + todo remove this hack + The parameter is either ", " or " , ". This is needed to pass sql generating tests as the old + sql generator uses " , " in the WHERE and ", " in SELECT. + + @param comma either " , " or ", " + + + + Abstract superclass of object loading (and querying) strategies. + + +

+ This class implements useful common functionality that concrete loaders would delegate to. + It is not intended that this functionality would be directly accessed by client code (Hence, + all methods of this class are declared protected or private.) This class relies heavily upon the + interface, which is the contract between this class and + s that may be loaded by it. +

+

+ The present implementation is able to load any number of columns of entities and at most + one collection role per query. +

+
+ +
+ + + What lock mode does this load entities with? + + A Collection of lock modes specified dynamically via the Query Interface + + + + + Append FOR UPDATE OF clause, if necessary. This + empty superclass implementation merely returns its first + argument. + + + + + Does this query return objects that might be already cached by + the session, whose lock mode may need upgrading. + + + + + + Modify the SQL, adding lock hints and comments, if necessary + + + + + Execute an SQL query and attempt to instantiate instances of the class mapped by the given + persister from each row of the DataReader. If an object is supplied, will attempt to + initialize that object. If a collection is supplied, attempt to initialize that collection. + + + + + Loads a single row from the result set. This is the processing used from the + ScrollableResults where no collection fetches were encountered. + + The result set from which to do the load. + The session from which the request originated. + The query parameters specified by the user. + Should proxies be generated + The loaded "row". + + + + + Read any collection elements contained in a single row of the result set + + + + + Get the actual object that is returned in the user-visible result list. + + + This empty implementation merely returns its first argument. This is + overridden by some subclasses. + + + + + For missing objects associated by one-to-one with another object in the + result set, register the fact that the the object is missing with the + session. + + + + + Read one collection element from the current row of the ADO.NET result set + + + + + If this is a collection initializer, we need to tell the session that a collection + is being initilized, to account for the possibility of the collection having + no elements (hence no rows in the result set). + + + + + Read a row of EntityKeys from the IDataReader into the given array. + + + Warning: this method is side-effecty. If an id is given, don't bother going + to the IDataReader + + + + + Check the version of the object in the IDataReader against + the object version in the session cache, throwing an exception + if the version numbers are different. + + + + + + Resolve any ids for currently loaded objects, duplications within the IDataReader, + etc. Instanciate empty objects to be initialized from the IDataReader. Return an + array of objects (a row of results) and an array of booleans (by side-effect) that determine + wheter the corresponding object should be initialized + + + + + The entity instance is already in the session cache + + + + + The entity instance is not in the session cache + + + + + Hydrate the state of an object from the SQL IDataReader, into + an array of "hydrated" values (do not resolve associations yet), + and pass the hydrated state to the session. + + + + + Determine the concrete class of an instance for the IDataReader + + + + + Advance the cursor to the first required row of the IDataReader + + + + + Should we pre-process the SQL string, adding a dialect-specific + LIMIT clause. + + + + + + + + Obtain an IDbCommand with all parameters pre-bound. Bind positional parameters, + named parameters, and limit parameters. + + + Creates an IDbCommand object and populates it with the values necessary to execute it against the + database to Load an Entity. + + The to use for the IDbCommand. + TODO: find out where this is used... + The SessionImpl this Command is being prepared in. + A CommandWrapper wrapping an IDbCommand that is ready to be executed. + + + + Some dialect-specific LIMIT clauses require the maximium last row number + (aka, first_row_number + total_row_count), while others require the maximum + returned row count (the total maximum number of rows to return). + + The selection criteria + The dialect + The appropriate value to bind into the limit clause. + + + + Bind parameters needed by the dialect-specific LIMIT clause + + The number of parameters bound + + + + Limits the number of rows returned by the Sql query if necessary. + + The IDbCommand to limit. + The RowSelection that contains the MaxResults info. + TODO: This does not apply to ADO.NET at all + + + + Bind all parameter values into the prepared statement in preparation for execution. + + The ADO prepared statement + The encapsulation of the parameter values to be bound. + The position from which to start binding parameter values. + The originating session. + The number of ADO bind positions actually bound during this method execution. + + + + Fetch a IDbCommand, call SetMaxRows and then execute it, + advance to the first result and return an SQL IDataReader + + The to execute. + The to apply to the and . + true if result types need to be auto-discovered by the loader; false otherwise. + The to load in. + + An IDataReader advanced to the first record in RowSelection. + + + + Called by subclasses that load entities + + + + + Called by subclasses that batch load entities + + + + + Called by subclasses that load collections + + + + + Called by wrappers that batch initialize collections + + + + + Called by subclasses that batch initialize collections + + + + + Return the query results, using the query cache, called + by subclasses that implement cacheable queries + + + + + + + + + + Actually execute a query, ignoring the query cache + + + + + + + + Calculate and cache select-clause suffixes. Must be + called by subclasses after instantiation. + + + + of + + + + An array indicating whether the entities have eager property fetching + enabled. + + Eager property fetching indicators. + + + + An array of indexes of the entity that owns a one-to-one association + to the entity at the given index (-1 if there is no "owner") + + + The indexes contained here are relative to the result of . + + + + + An array of the owner types corresponding to the + returns. Indices indicating no owner would be null here. + + + + + Get the index of the entity that owns the collection, or -1 + if there is no owner in the query results (i.e. in the case of a + collection initializer) or no collection. + + + + + Return false is this loader is a batch entity loader + + + + + Get the result set descriptor + + + + + The SqlString to be called; implemented by all subclasses + + + + The setter was added so that class inheriting from Loader could write a + value using the Property instead of directly to the field. + + + The scope is protected internal because the needs to + be able to get the SqlString of the when + it is parsing a subquery. + + + + + + An array of persisters of entity classes contained in each row of results; + implemented by all subclasses + + + The setter was added so that classes inheriting from Loader could write a + value using the Property instead of directly to the field. + + + + + An (optional) persister for a collection to be initialized; only collection loaders + return a non-null value + + + + + Get the SQL table aliases of entities whose + associations are subselect-loadable, returning + null if this loader does not support subselect + loading + + + + + Identifies the query for statistics reporting, if null, + no statistics will be reported + + + + + Utility method that generates 0_, 1_ suffixes. Subclasses don't + necessarily need to use this algorithm, but it is intended that + they will in most cases. + + + + + Returns the locations of all occurrences of the named parameter. + + + + + + + + + a collection of lock modes specified dynamically via the Query interface + + + + + Base class for nodes dealing 'is null' and 'is not null' operators. + todo : a good deal of this is copied from BinaryLogicOperatorNode; look at consolidating these code fragments + + Author: Steve Ebersole + Ported by: Steve Strong + + + + + Represents a unary operator node. + + Author: Steve Ebersole + Ported by: Steve Strong + + + + + A semantic analysis node, that points back to the main analyzer. + Authoer: josh + Ported by: Steve Strong + + + + + A base AST node for the intermediate tree. + + + + The original text for the node, mostly for debugging. + + + The data type of this node. Null for 'no type'. + + + + Retrieve the text to be used for rendering this particular node. + + The session factory + The text to use for rendering + + + + An interface for initializeable AST nodes. + + + + + Initializes the node with the parameter. + + the initialization parameter. + + + A pointer back to the phase 2 processor. + + + + Contract for nodes representing unary operators. + + Author: Steve Ebersole + Ported by: Steve Strong + + + + + Contract for nodes representing operators (logic or arithmetic). + Author: Steve Ebersole + Ported by: Steve Strong + + + + + Called by the tree walker during hql-sql semantic analysis + after the operator sub-tree is completely built. + + + + + Retrieves the data type for the overall operator expression. + + The expression's data type. + + + + Retrieves the node representing the operator's single operand. + + + + + When (if) we need to expand a row value constructor, what is the type of connector to use between the + expansion fragments. + + The expansion connector type. + + + + When (if) we need to expand a row value constructor, what is the text of connector to use between the + expansion fragments. + + The expansion connector text. + + + + Convenience implementation of Statement to centralize common functionality. + Author: Steve Ebersole + Ported by: Steve Strong + + + + + Implementors will return additional display text, which will be used + by the ASTPrinter to display information (besides the node type and node + text). + + + + + Returns additional display text for the AST node. + + The additional display text. + + + + Common interface modeling the different HQL statements (i.e., INSERT, UPDATE, DELETE, SELECT). + Author: Steve Ebersole + Ported by: Steve Strong + + + + + The "phase 2" walker which generated this statement tree. + + + + + The main token type representing the type of this statement. + + + + + Does this statement require the StatementExecutor? + Essentially, at the JDBC level, does this require an executeUpdate()? + + + + + Returns additional display text for the AST node. + + The additional display text. + + + + Type definition for Statements which are restrictable via a where-clause (and + thus also having a from-clause). + Author: Steve Ebersole + Ported by: Steve Strong + + + + + Retreives the from-clause in effect for this statement; could be null if the from-clause + has not yet been parsed/generated. + + + + + Does this statement tree currently contain a where clause? + Returns True if a where-clause is found in the statement tree and + that where clause actually defines restrictions; false otherwise. + + + + + Retreives the where-clause defining the restriction(s) in effect for + this statement. + Note that this will generate a where-clause if one was not found, so caution + needs to taken prior to calling this that restrictions will actually exist + in the resulting statement tree (otherwise "unexpected end of subtree" errors + might occur during rendering). + + + + + Represents an element of a projection list, i.e. a select expression. + Author: josh + Ported by: Steve Strong + + + + + Appends AST nodes that represent the columns after the current AST node. + (e.g. 'as col0_O_') + + The index of the select expression in the projection list. + + + + Returns the data type of the select expression. + + + + + Returns the FROM element that this expression refers to. + + + + + Returns true if the element is a constructor (e.g. new Foo). + + + + + Returns true if this select expression represents an entity that can be returned. + + + + + Sets the text of the node. + + + + + Represents an aggregate function i.e. min, max, sum, avg. + + Author: Joshua Davis + Ported by: Steve Strong + + + + + Encapsulates the information relating to an individual assignment within the + set clause of an HQL update statement. This information is used during execution + of the update statements when the updates occur against "multi-table" stuff. + + + + + Contract for nodes representing logcial BETWEEN (ternary) operators. + + + + + Nodes which represent binary arithmetic operators. + + + + + Contract for nodes representing binary operators. + Author: Steve Ebersole + Ported by: Steve Strong + + + + + The left-hand operand of the operator. + + + + + The right-hand operand of the operator. + + + + Retrieves the left-hand operand of the operator. + + @return The left-hand operand + + + Retrieves the right-hand operand of the operator. + + @return The right-hand operand + + + + Contract for nodes representing binary operators. + Author: Steve Ebersole + Ported by: Steve Strong + + + + + Performs the operator node initialization by seeking out any parameter + nodes and setting their expected type, if possible. + + + + Mutate the subtree relating to a row-value-constructor to instead use + a series of ANDed predicates. This allows multi-column type comparisons + and explicit row-value-constructor syntax even on databases which do + not support row-value-constructor. +

+ For example, here we'd mutate "... where (col1, col2) = ('val1', 'val2) ..." to + "... where col1 = 'val1' and col2 = 'val2' ..." + + @param valueElements The number of elements in the row value constructor list. + + +

+ Represents a boolean literal within a query. + +
+ + + Represents a literal. + + Author: josh + Ported by: Steve Strong + + + + + Interface for nodes which wish to be made aware of any determined "expected + type" based on the context within they appear in the query. + Author: Steve Ebersole + Ported by: Steve Strong + + + + Expected-types really only pertinent here for boolean literals... + + @param expectedType + + + + Represents a case ... when .. then ... else ... end expression in a select. + + + + + Represents a case ... when .. then ... else ... end expression in a select. + + Author: Gavin King + Ported by: Steve Strong + + + + + Represents 'elements()' or 'indices()'. + Author: josh + Ported by: Steve strong + + + + + Represents a method call + Author: josh + Ported by: Steve Strong + + + + + Common behavior - a node that contains a list of select expressions. + Author: josh + Ported by: Steve Strong + + + + + Returns an array of SelectExpressions gathered from the children of the given parent AST node. + + + + + Returns an array of SelectExpressions gathered from the children of the given parent AST node. + + + + + Returns the first select expression node that should be considered when building the array of select + expressions. + + + + + Represents a COUNT expression in a select. + Author: josh + Ported by: Steve Strong + + + + + Defines a top-level AST node representing an HQL delete statement. + + + + + Represents a reference to a property or alias expression. This should duplicate the relevant behaviors in + PathExpressionParser. + Author: Joshua Davis + Ported by: Steve Strong + + + + + The contract for expression sub-trees that can resolve themselves. + Author: josh + Ported by: Steve Strong + + + + + Does the work of resolving an identifier or a dot + + + + + Does the work of resolving an identifier or a dot, but without a parent node + + + + + Does the work of resolving an identifier or a dot, but without a parent node or alias + + + + + Does the work of resolving inside of the scope of a function call + + + + + Does the work of resolving an an index []. + + + + + An AST node with a path property. This path property will be the fully qualified name. + Author: josh + Ported by: Steve Strong + + + + + Returns the full path name represented by the node. + + the full path name represented by the node. + + + + Sub-classes can override this method if they produce implied joins (e.g. DotNode). + + an implied join created by this from reference. + + + + The full path, to the root alias of this dot node. + + + + + The type of dereference that hapened (DEREF_xxx). + + + + + The identifier that is the name of the property. + + + + + The unresolved property path relative to this dot node. + + + + + The column names that this resolves to. + + + + + Fetch join or not. + + + + + The type of join to create. Default is an inner join. + + + + + Is the given property name a reference to the primary key of the associated + entity construed by the given entity type? + For example, consider a fragment like order.customer.id + (where order is a from-element alias). Here, we'd have: + propertyName = "id" AND + owningType = ManyToOneType(Customer) + and are being asked to determine whether "customer.id" is a reference + to customer's PK... + + The name of the property to check. + The type represeting the entity "owning" the property + True if propertyName references the entity's (owningType->associatedEntity) primary key; false otherwise. + + + + Sets the join type for this '.' node structure. + + + + + Returns the full path of the node. + + + + + Represents the 'FROM' part of a query or subquery, containing all mapped class references. + Author: josh + Ported by: Steve Strong + + + + + Counts the from elements as they are added. + + + + + All of the implicit FROM xxx JOIN yyy elements that are the destination of a collection. These are created from + index operators on collection property references. + + + + + Pointer to the parent FROM clause, if there is one. + + + + + Collection of FROM clauses of which this is the parent. + + + + + Convenience method to check whether a given token represents a from-element alias. + + The potential from-element alias to check. + True if the possibleAlias is an alias to a from-element visible from this point in the query graph. + + + + Returns true if the from node contains the class alias name. + + The HQL class alias name. + true if the from node contains the class alias name. + + + + Returns true if the from node contains the table alias name. + + The SQL table alias name. + true if the from node contains the table alias name. + + + + Adds a new from element to the from node. + + The reference to the class. + The alias AST. + The new FROM element. + + + + Retreives the from-element represented by the given alias. + + The alias by which to locate the from-element. + The from-element assigned the given alias, or null if none. + + + + Returns the list of from elements in order. + + The list of from elements (instances of FromElement). + + + + Returns the list of from elements that will be part of the result set. + + the list of from elements that will be part of the result set. + + + + Look for an existing implicit or explicit join by the given path. + + + + + Currently this is needed in order to deal with {@link FromElement FromElements} which + contain "hidden" JDBC parameters from applying filters. + Would love for this to go away, but that would require that Hibernate's + internal {@link org.hibernate.engine.JoinSequence join handling} be able to either:
    +
  • render the same AST structures
  • +
  • render structures capable of being converted to these AST structures
  • +
+ In the interim, this allows us to at least treat these "hidden" parameters properly which is + the most pressing need. + Author: Steve Ebersole + Ported by: Steve Strong +
+
+ + + Adds a parameter specification for a parameter encountered within this node. We use the term 'embedded' here + because of the fact that the parameter was simply encountered as part of the node's text; it does not exist + as part of a subtree as it might in a true AST. + + The generated specification. + + + + Retrieve all embedded parameter specifications. + + All embedded parameter specifications; may return null. + + + + Set the renderable text of this node. + + + + + Determine whether this node contans embedded parameters. The implication is that + {@link #getEmbeddedParameters()} is allowed to return null if this method returns false. + + + + + Returns the identifier select SQL fragment. + + The total number of returned types. + The sequence of the current returned type. + the identifier select SQL fragment. + + + + Returns the property select SQL fragment. + + The total number of returned types. + The sequence of the current returned type. + the property select SQL fragment. + + + + Render the identifier select, but in a 'scalar' context (i.e. generate the column alias). + + the sequence of the returned type + the identifier select with the column alias. + + + + Returns true if this FromElement was implied by a path, or false if this FROM element is explicitly declared in + the FROM clause. + + + + + Creates entity from elements. + + + + + + + + Creates collection from elements. + + + + + + + + + + + Delegate that handles the type and join sequence information for a FromElement. + Author: josh + Ported by: Steve Strong + + + + + Returns the identifier select SQL fragment. + + The total number of returned types. + The sequence of the current returned type. + the identifier select SQL fragment. + + + + Render the identifier select, but in a 'scalar' context (i.e. generate the column alias). + + the sequence of the returned type + the identifier select with the column alias. + + + + Returns the property select SQL fragment. + + The total number of returned types. + The sequence of the current returned type. + + the property select SQL fragment. + + + + Returns the type of a property, given it's name (the last part) and the full path. + + The last part of the full path to the property. + The full property path. + The type + + + + This accounts for a quirk in Queryable, where it sometimes generates ', ' in front of the + SQL fragment. :-P + + A SQL fragment. + The fragment, without the leading comma and spaces. + + + + Returns the Hibernate queryable implementation for the HQL class. + + + + + Insert a new node into both the Tree and the Node Array. Add DOWN and UP nodes if needed. + + The parent node + The child node + + + + Count the number of child nodes (including DOWNs and UPs) of a parent node + + The index of the parent in the node array + The number of child nodes + + + + Represents the [] operator and provides it's semantics. + Author: josh + Ported by: Steve Strong + + + + + Author: Steve Ebersole + Ported by: Steve Strong + + + + + Defines a top-level AST node representing an HQL "insert select" statement. + + + + Performs detailed semantic validation on this insert statement tree. + Indicates validation failure. + + + Retreive this insert statement's into-clause. + The into-clause + + + Retreive this insert statement's select-clause. + The select-clause. + + + + Represents an entity referenced in the INTO clause of an HQL + INSERT statement. + + Author: Steve Ebersole + Ported by: Steve Strong + + + + + Returns additional display text for the AST node. + + The additional display text. + + + + Determine whether the two types are "assignment compatible". + + The type defined in the into-clause. + The type defined in the select clause. + True if they are assignment compatible. + + + + Interface for nodes which require access to the SessionFactory + + Author: Steve Ebersole + Ported by: Steve Strong + + + + + IsNotNullLogicOperatorNode implementation + + Author: Steve Ebersole + Ported by: Steve Strong + + + + + Represents a 'is null' check. + + + + + A node representing a static Java constant. + + Author: Steve Ebersole + Ported by: Steve Strong + + + + + Implementation of OrderByClause. + Author: Steve Ebersole + Ported by: Steve Strong + + + + + Implementation of ParameterNode. + Author: Steve Ebersole + Ported by: Steve Strong + + + + + Locate the select clause that is part of this select statement. + Note, that this might return null as derived select clauses (i.e., no + select clause at the HQL-level) get generated much later than when we + get created; thus it depends upon lifecycle. + + Our select clause, or null. + + + + Represents the list of expressions in a SELECT clause. + Author: josh + Ported by: Steve Strong + + + + Prepares a derived (i.e., not explicitly defined in the query) select clause. + + @param fromClause The from clause to which this select clause is linked. + + + Prepares an explicitly defined select clause. + + @param fromClause The from clause linked to this select clause. + @throws SemanticException + + + + FromElements which need to be accounted for in the load phase (either for return or for fetch). + + + + + The column alias names being used in the generated SQL. + + + + + The constructor to use for dynamic instantiation queries. + + + + + The HQL aliases, or generated aliases + + + + + The types actually being returned from this query at the "object level". + + + + + A select expression that was generated by a FROM element. + Author: josh + Ported by: Steve Strong + + + + + Represents an SQL fragment in the AST. + Author: josh + Ported by: Steve Strong + + + + + Defines a top-level AST node representing an HQL update statement. + + + + + Generates class/table/column aliases during semantic analysis and SQL rendering. + Its essential purpose is to keep an internal counter to ensure that the + generated aliases are unique. + + + + + Appends child nodes to a parent efficiently. + + + + + Depth first iteration of an ANTLR AST. + Author: josh + Ported by: Steve Strong + + + + + Returns the 'list' representation with some brackets around it for debugging. + + The tree. + The list representation of the tree. + + + + Determine if a given node (test) is contained anywhere in the subtree + of another given node (fixture). + + The node against which to be checked for children. + The node to be tested as being a subtree child of the parent. + True if child is contained in the parent's collection of children. + + + + Finds the first node of the specified type in the chain of children. + + The parent + The type to find. + The first node of the specified type, or null if not found. + + + + Filters nodes in/out of a tree. + + The node to check. + true to keep the node, false if the node should be filtered out. + + + + Generates the scalar column AST nodes for a given array of SQL columns + + + + + Performs the post-processing of the join information gathered during semantic analysis. + The join generating classes are complex, this encapsulates some of the JoinSequence-related + code. + Author: Joshua Davis + Ported by: Steve Strong + + + + + Constructs a new JoinProcessor. + + The walker to which we are bound, giving us access to needed resources. + + + + Translates an AST join type (i.e., the token type) into a JoinFragment.XXX join type. + + The AST join type (from HqlSqlWalker) + a JoinType.XXX join type. + + + + Indicates that Float and Double literal values should + be treated using the SQL "exact" format (i.e., '.001') + + + + + Indicates that Float and Double literal values should + be treated using the SQL "approximate" format (i.e., '1E-3') + + + + + In what format should Float and Double literal values be sent + to the database? + See #EXACT, #APPROXIMATE + + + + + Traverse the AST tree depth first. Note that the AST passed in is not visited itself. Visitation starts + with its children. + + ast + + + + Turns a path into an AST. + + The path. + The AST factory to use. + An HQL AST representing the path. + + + + Creates synthetic and nodes based on the where fragment part of a JoinSequence. + Author: josh + Ported by: Steve Strong + + + + + Generates translators which uses the Antlr-based parser to perform + the translation. + + Author: Gavin King + Ported by: Steve Strong + + + + + Facade for generation of + and instances. + + + + + Construct a instance + capable of translating an HQL query string. + + + The query-identifier (used in collection). + This is typically the same as the queryString parameter except for the case of + split polymorphic queries which result in multiple physical sql queries. + + The query string to be translated + Currently enabled filters + The session factory + An appropriate translator. + + + + Construct a instance capable of + translating an HQL filter string. + + + The query-identifier (used in collection). + This is typically the same as the queryString parameter except for the case of + split polymorphic queries which result in multiple physical sql queries. + + The query string to be translated + Currently enabled filters + The session factory + An appropriate translator. + + + + Look ahead for tokenizing is all lowercase, whereas the original case of an input stream is preserved. + Copied from http://www.antlr.org/wiki/pages/viewpage.action?pageId=1782 + + + + + Provides a map of collection function names to the corresponding property names. + Authoer: josh + Ported by: Steve Strong + + + + + A problem occurred translating a Hibernate query to SQL due to invalid query syntax, etc. + + + + + Initializes a new instance of the class. + + The message that describes the error. + + + + Initializes a new instance of the class. + + The message that describes the error. + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class. + + The message that describes the error. + The query that contains the error. + + + + Initializes a new instance of the class. + + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Sets the serialization info for after + getting the info from the base Exception. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Gets or sets the of HQL that caused the Exception. + + + + + Gets a message that describes the current . + + The error message that explains the reason for this exception including the HQL. + + + + An error handler that counts parsing errors and warnings. + + + + + Defines the behavior of an error handler for the HQL parsers. + Author: josh + Ported by: Steve Strong + + + + + A custom token class for the HQL grammar. + + + + + The previous token type. + + + + + Public constructor + + + + + Returns a string representation of the object. + + The debug string + + + + Indicates if the token could be an identifier. + + + + + Gets or Sets the type of the token, remembering the previous type on Sets. + + + + + Returns the previous token type. + + + + + Exception thrown when an invalid path is found in a query. + Author: josh + Ported by: Steve Strong + + + + + Specialized interface for filters. + + + + + Defines the constract of an HQL->SQL translator. + + + + + Compile a "normal" query. This method may be called multiple times. Subsequent invocations are no-ops. + + Defined query substitutions. + Does this represent a shallow (scalar or entity-id) select? + There was a problem parsing the query string. + There was a problem querying defined mappings. + + + + Perform a list operation given the underlying query definition. + + The session owning this query. + The query bind parameters. + The query list results. + + + + + Perform a bulk update/delete operation given the underlying query defintion. + + The query bind parameters. + The session owning this query. + The number of entities updated or deleted. + + + + + Returns the column names in the generated SQL. + + the column names in the generated SQL. + + + + Information about any parameters encountered during translation. + + + + + The set of query spaces (table names) that the query referrs to. + + + + + The SQL string generated by the translator. + + + + + The HQL string processed by the translator. + + + + + Returns the filters enabled for this query translator. + + Filters enabled for this query execution. + + + + Returns an array of Types represented in the query result. + + Query return types. + + + + Returns an array of HQL aliases + + Returns an array of HQL aliases + + + + Does the translated query contain collection fetches? + + True if the query does contain collection fetched; false otherwise. + + + + Compile a filter. This method may be called multiple + times. Subsequent invocations are no-ops. + + the role name of the collection used as the basis for the filter. + Defined query substitutions. + Does this represent a shallow (scalar or entity-id) select? + + + + Creates a new AST-based query translator. + + The query-identifier (used in stats collection) + The hql query to translate + Currently enabled filters + The session factory constructing this translator instance. + + + + Compile a "normal" query. This method may be called multiple + times. Subsequent invocations are no-ops. + + Defined query substitutions. + Does this represent a shallow (scalar or entity-id) select? + + + + Compile a filter. This method may be called multiple + times. Subsequent invocations are no-ops. + + the role name of the collection used as the basis for the filter. + Defined query substitutions. + Does this represent a shallow (scalar or entity-id) select? + + + + Performs both filter and non-filter compiling. + + Defined query substitutions. + Does this represent a shallow (scalar or entity-id) select? + the role name of the collection used as the basis for the filter, NULL if this is not a filter. + + + + Construct a new SessionFactoryHelperExtensions instance. + + The SessionFactory impl to be encapsulated. + + + + Locate a registered sql function by name. + + The name of the function to locate + The sql function, or null if not found. + + + + Locate a registered sql function by name. + + The name of the function to locate + The sql function, or throws QueryException if no matching sql functions could be found. + + + + Find the function return type given the function name and the first argument expression node. + + The function name. + The first argument expression. + the function return type given the function name and the first argument expression node. + + + + Given a (potentially unqualified) class name, locate its imported qualified name. + + The potentially unqualified class name + The qualified class name. + + + + Does the given persister define a physical discriminator column + for the purpose of inheritence discrimination? + + The persister to be checked. + True if the persister does define an actual discriminator column. + + + + Locate the collection persister by the collection role. + + The collection role name. + The defined CollectionPersister for this collection role, or null. + + + + Determine the name of the property for the entity encapsulated by the + given type which represents the id or unique-key. + + The type representing the entity. + The corresponding property name + + + + Retrieves the column names corresponding to the collection elements for the given + collection role. + + The collection role + The sql column-qualification alias (i.e., the table alias) + the collection element columns + + + + Essentially the same as GetElementType, but requiring that the + element type be an association type. + + The collection type to be checked. + The AssociationType of the elements of the collection. + + + + Locate the collection persister by the collection role, requiring that + such a persister exist. + + The collection role name. + The defined CollectionPersister for this collection role. + + + + Locate the persister by class or entity name, requiring that such a persister + exist. + + The class or entity name + The defined persister for this entity + + + + Given a (potentially unqualified) class name, locate its persister. + + The (potentially unqualified) class name. + The defined persister for this class, or null if none found. + + + + Given a (potentially unqualified) class name, locate its persister. + + The session factory implementor. + The (potentially unqualified) class name. + The defined persister for this class, or null if none found. + + + + Locate the persister by class or entity name. + + The class or entity name + The defined persister for this entity, or null if none found. + + + + Create a join sequence rooted at the given collection. + + The persister for the collection at which the join should be rooted. + The alias to use for qualifying column references. + The generated join sequence. + + + + Generate an empty join sequence instance. + + The generated join sequence. + + + + Generate a join sequence representing the given association type. + + Should implicit joins (theta-style) or explicit joins (ANSI-style) be rendered + The type representing the thing to be joined into. + The table alias to use in qualifing the join conditions + The type of join to render (inner, outer, etc) + The columns making up the condition of the join. + The generated join sequence. + + + + Retreive a PropertyMapping describing the given collection role. + + The collection role for whcih to retrieve the property mapping. + The property mapping. + + + + Given a collection type, determine the Type representing elements + within instances of that collection. + + The collection type to be checked. + The Type of the elements of the collection. + + + + Generates translators which uses the older hand-written parser to perform the translation. + + + + + Parses the hibernate query into its constituent clauses. + + + + + A parser is a state machine that accepts a string of tokens, + bounded by start() and end() and modifies a QueryTranslator. Parsers + are NOT intended to be threadsafe. They SHOULD be reuseable + for more than one token stream. + + + + + + + + + + + + + + + + + + + + + + + + Parses the from clause of a hibernate query, looking for tables and + aliases for the SQL query. + + + + + + + + FromPathExpressionParser + + + + + Parses an expression of the form foo.bar.baz and builds up an expression + involving two less table joins than there are path components. + + + + + + + + + + NOTE: we avoid joining to the next table if the named property is just the foreign key value + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Used to hold column type in nested functions. + + + + + Parses the GROUP BY clause of an aggregate query + + + + + Parses the having clause of a hibernate query and translates it to an + SQL having clause. + + + + Parses the where clause of a hibernate query and translates it to an + SQL where clause. + + + + + + + + + + + + + + + + + + + + + + + + Parses the ORDER BY clause of a query + + + + + + + HQL lexical analyzer (not really a parser) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + An instance of QueryTranslator translates a Hibernate query string to SQL. + + + + Construct a query translator + + A unique identifier for the query of which this + translation is part; typically this is the original, user-supplied query string. + + + The "preprocessed" query string; at the very least + already processed by {@link org.hibernate.hql.QuerySplitter}. + + Any enabled filters. + The session factory. + + + + Construct a query translator + + + + + Compile a subquery + + + + + + Compile a "normal" query. This method may be called multiple + times. Subsequent invocations are no-ops. + + + + + Compile a filter. This method may be called multiple + times. Subsequent invocations are no-ops. + + + + + Compile the query (generate the SQL). + + + + + WARNING: side-effecty + + + + + Extract the complete clause of function. + + The list of tokens + The index of the list that represent the founded function. + String trepresentation of each token. + Each token can be string or SqlString + + + Used for collection filters + + + + + + + Persisters for the return values of a List style query + + + The Persisters stored by QueryTranslator have to be . The + setter will attempt to cast the ILoadable array passed in into an + IQueryable array. + + + + + Types of the return values of an Enumerate() style query. + Return an array of s. + + + + + + + + Is this query called by Scroll() or Iterate()? + + true if it is, false if it is called by find() or list() + + + + + + + + + + Parsers the select clause of a hibernate query, looking + for a table (well, really class) alias. + + + + + + + + + + + + + + + + + + + + + + + Wraps SessionFactoryImpl, adding more lookup behaviors and encapsulating some of the error handling. + + + + + Locate the collection persister by the collection role. + + The collection role name. + The defined CollectionPersister for this collection role, or null. + + + + Locate the persister by class or entity name, requiring that such a persister + exists + + The class or entity name + The defined persister for this entity + + + + Locate the persister by class or entity name. + + The class or entity name + The defined persister for this entity, or null if none found. + + + + Retreive a PropertyMapping describing the given collection role. + + The collection role for whcih to retrieve the property mapping. + The property mapping. + + + + Provides utility methods for generating HQL / SQL names. + Shared by both the 'classic' and 'new' query translators. + + + + + Handle Hibernate "implicit" polymorphism, by translating the query string into + several "concrete" queries against mapped classes. + + + + + + + + + Contract for providing callback access to a , + typically from the . + + + + Retrieve the next value from the underlying source. + + + + Encapsulates definition of the underlying data structure backing a sequence-style generator. + + + + + A callback to be able to get the next value from the underlying + structure as needed. + + The session. + The next value. + + + + Prepare this structure for use. Called sometime after instantiation, + but before first use. + + The optimizer being applied to the generator. + + + Commands needed to create the underlying structures. + The database dialect being used. + The creation commands. + + + Commands needed to drop the underlying structures. + The database dialect being used. + The drop commands. + + + The name of the database structure (table or sequence). + + + How many times has this structure been accessed through this reference? + + + The configured increment size + + + + Performs optimization on an optimizable identifier generator. Typically + this optimization takes the form of trying to ensure we do not have to + hit the database on each and every request to get an identifier value. + + + + Optimizers work on constructor injection. They should provide + a constructor with the following arguments. + + - The return type for the generated values. + - int The increment size. + + + + + Generate an identifier value accounting for this specific optimization. + + Callback to access the underlying value source. + The generated identifier value. + + + + A common means to access the last value obtained from the underlying + source. This is intended for testing purposes, since accessing the + unerlying database source directly is much more difficult. + + + The last value we obtained from the underlying source; + -1 indicates we have not yet consulted with the source. + + + + + Defined increment size. + + The increment size. + + + + + Are increments to be applied to the values stored in the underlying + value source? + + + True if the values in the source are to be incremented + according to the defined increment size; false otherwise, in which + case the increment is totally an in memory construct. + + + + + Describes a sequence. + + + + + An that requires creation of database objects + All s that also implement + An have access to a special mapping parameter: schema + + + + + The general contract between a class that generates unique + identifiers and the . + + + + It is not intended that this interface ever be exposed to the + application. It is intended that users implement this interface + to provide custom identifier generation strategies. + + + Implementors should provide a public default constructor. + + + Implementations that accept configuration parameters should also + implement . + + + Implementors must be threadsafe. + + + + + + Generate a new identifier + + The this id is being generated in. + The entity for which the id is being generated. + The new identifier + + + + The SQL required to create the underlying database objects + + The to help with creating the sql. + + An array of objects that contain the sql to create the + necessary database objects. + + + + + The SQL required to remove the underlying database objects + + The to help with creating the sql. + + A that will drop the database objects. + + + + + Return a key unique to the underlying database objects. + + + A key unique to the underlying database objects. + + + Prevents us from trying to create/remove them multiple times + + + + + An IdentiferGenerator that supports "configuration". + + + + + Configure this instance, given the values of parameters + specified by the user as <param> elements. + This method is called just once, followed by instantiation. + + The the identifier should be. + An of Param values that are keyed by parameter name. + The to help with Configuration. + + + + Describes a table used to mimic sequence behavior + + + + + Abstract InsertGeneratedIdentifierDelegate implementation where the + underlying strategy causes the generated identitifer to be returned as an + effect of performing the insert statement. Thus, there is no need for an + additional sql statement to determine the generated identitifer. + + + + + Responsible for handling delegation relating to variants in how + insert-generated-identifier generator strategies dictate processing: +
    +
  • building the sql insert statement
  • +
  • determination of the generated identifier value
  • +
+
+
+ + + Build a specific to the delegate's mode + of handling generated key values. + + The insert object. + + + + Perform the indicated insert SQL statement and determine the identifier value generated. + + + + + The generated identifier value. + + + + Abstract InsertGeneratedIdentifierDelegate implementation where the + underlying strategy requires an subsequent select after the insert + to determine the generated identifier. + + + + Extract the generated key value from the given result set. + The session + The result set containing the generated primay key values. + The entity being saved. + The generated identifier + + + Bind any required parameter values into the SQL command . + The session + The prepared command + The entity being saved. + + + Get the SQL statement to be used to retrieve generated key values. + The SQL command string + + + + Types of any required parameter values into the SQL command . + + + + + Nothing more than a distinguishing subclass of Insert used to indicate + intent. + Some subclasses of this also provided some additional + functionality or semantic to the genernated SQL statement string. + + + + + A class that builds an INSERT sql statement. + + + + + + + + Builds a SqlString from the internal data. + + A valid SqlString that can be converted into an IDbCommand + + + + Adds the Property's columns to the INSERT sql + + The column name for the Property + The IType of the property. + The SqlInsertBuilder. + The column will be associated with a parameter. + + + + Add a column with a specific value to the INSERT sql + + The name of the Column to add. + The value to set for the column. + The NHibernateType to use to convert the value to a sql string. + The SqlInsertBuilder. + + + + Add a column with a specific value to the INSERT sql + + The name of the Column to add. + A valid sql string to set as the value of the column. + The SqlInsertBuilder. + + + + Specialized IdentifierGeneratingInsert which appends the database + specific clause which signifies to return generated IDENTITY values + to the end of the insert statement. + + + + + Disable comments on insert. + + + + + implementation where the + underlying strategy causes the generated identitifer to be returned, as an + effect of performing the insert statement, in a Output parameter. + Thus, there is no need for an additional sql statement to determine the generated identitifer. + + + + + Specialized IdentifierGeneratingInsert which appends the database + specific clause which signifies to return generated identifier values + to the end of the insert statement. + + + + + + + The IdentityGenerator for autoincrement/identity key generation. + + The this id is being generated in. + The entity the id is being generated for. + + IdentityColumnIndicator Indicates to the Session that identity (i.e. identity/autoincrement column) + key generation should be used. + + + + + An that returns the current identifier + assigned to an instance. + + +

+ This id generation strategy is specified in the mapping file as + <generator class="assigned" /> +

+
+
+ + + Generates a new identifier by getting the value of the identifier + for the obj parameter. + + The this id is being generated in. + The entity for which the id is being generated. + The value that was assigned to the mapped id's property. + + Thrown when a is passed in as the obj or + if the identifier of obj is null. + + + + + An that returns a Int64 constructed from the system + time and a counter value. Not safe for use in a clustser! + + + + + An that uses the value of + the id property of an associated object + + + + This id generation strategy is specified in the mapping file as + + <generator class="foreign"> + <param name="property">AssociatedObject</param> + </generator> + + + The mapping parameter property is required. + + + + + Generates an identifer from the value of a Property. + + The this id is being generated in. + The entity for which the id is being generated. + + The identifier value from the associated object or + if the session + already contains obj. + + + + + Configures the ForeignGenerator by reading the value of property + from the parms parameter. + + The the identifier should be. + An of Param values that are keyed by parameter name. + The to help with Configuration. + + Thrown if the key property is not found in the parms parameter. + + + + + An that generates values + using a strategy suggested Jimmy Nilsson's + article + on informit.com. + + +

+ This id generation strategy is specified in the mapping file as + <generator class="guid.comb" /> +

+

+ The comb algorithm is designed to make the use of GUIDs as Primary Keys, Foreign Keys, + and Indexes nearly as efficient as ints. +

+

+ This code was contributed by Donald Mull. +

+
+
+ + + Generate a new using the comb algorithm. + + The this id is being generated in. + The entity for which the id is being generated. + The new identifier as a . + + + + Generate a new using the comb algorithm. + + + + + An that generates values + using Guid.NewGuid(). + + +

+ This id generation strategy is specified in the mapping file as + <generator class="guid" /> +

+
+
+ + + Generate a new for the identifier. + + The this id is being generated in. + The entity for which the id is being generated. + The new identifier as a . + + + + Thrown by implementation class when ID generation fails + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message that describes the error. + + + + Initializes a new instance of the class. + + The message that describes the error. + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Factory methods for IdentifierGenerator framework. + + +

The built in strategies for identifier generation in NHibernate are:

+ + + strategy + Implementation of strategy + + + assigned + + + + counter + + + + foreign + + + + guid + + + + guid.comb + + + + guid.native + + + + hilo + + + + identity + + + + native + + Chooses between , + , and based on the + 's capabilities. + + + + seqhilo + + + + sequence + + + + uuid.hex + + + + uuid.string + + + +
+
+ + Get the generated identifier when using identity columns + The to read the identifier value from. + The the value should be converted to. + The the value is retrieved in. + The value for the identifier. + + + + Gets the value of the identifier from the and + ensures it is the correct . + + The to read the identifier value from. + The the value should be converted to. + The the value is retrieved in. + + The value for the identifier. + + + Thrown if there is any problem getting the value from the + or with converting it to the . + + + + + An where the key is the strategy and + the value is the for the strategy. + + + + + When this is returned by Generate() it indicates that the object + has already been saved. + + + String.Empty + + + + + When this is return + + + + + Initializes the static fields in . + + + + + Creates an from the named strategy. + + + The name of the generator to create. This can be one of the NHibernate abbreviations (ie - native, + sequence, guid.comb, etc...), a full class name if the Type is in the NHibernate assembly, or + a full type name if the strategy is in an external assembly. + + The that the retured identifier should be. + An of <param> values from the mapping. + The to help with Configuration. + + An instantiated and configured . + + + Thrown if there are any exceptions while creating the . + + + + + Create the correct boxed for the identifier. + + The value of the new identifier. + The the identifier should be. + + The identifier value converted to the . + + + The type parameter must be an , , + or . + + + + + An that indicates to the that identity + (ie. identity/autoincrement column) key generation should be used. + + +

+ This id generation strategy is specified in the mapping file as + <generator class="identity" /> + or if the database natively supports identity columns + <generator class="native" /> +

+

+ This indicates to NHibernate that the database generates the id when + the entity is inserted. +

+
+
+ + + Delegate for dealing with IDENTITY columns where the dialect supports returning + the generated IDENTITY value directly from the insert statement. + + + + + Delegate for dealing with IDENTITY columns where the dialect requires an + additional command execution to retrieve the generated IDENTITY value + + + + The configuration parameter holding the entity name + + + + An IIdentifierGenerator that returns a Int64, constructed by + counting from the maximum primary key value at startup. Not safe for use in a + cluster! + + + + java author Gavin King, .NET port Mark Holden + + + Mapping parameters supported, but not usually needed: table, column. + + + + + + + + + + + + + + + + + + + + + The configuration parameter holding the schema name + + + + The configuration parameter holding the table name for the + generated id + + + + + The configuration parameter holding the table names for all + tables for which the id must be unique + + + + + The configuration parameter holding the primary key column + name of the generated id + + + + The configuration parameter holding the catalog name + + + + A persister that may have an identity assigned by execution of a SQL INSERT. + + + + + Get a SQL select string that performs a select based on a unique + key determined by the given property name). + + + The name of the property which maps to the + column(s) to use in the select statement restriction. + + The SQL select string + + + + Get the database-specific SQL command to retrieve the last + generated IDENTITY value. + + + + The names of the primary key columns in the root table. + The primary key column names. + + + + Get the identifier type + + + + + Generates Guid values using the server side Guid function. + + + + + A generator that selects the just inserted row to determine the identifier + value assigned by the database. The correct row is located using a unique key. + + One mapping parameter is required: key (unless a natural-id is defined in the mapping). + + + The delegate for the select generation strategy. + + + + An that generates Int64 values using an + oracle-style sequence. A higher performance algorithm is + . + + +

+ This id generation strategy is specified in the mapping file as + + <generator class="sequence"> + <param name="sequence">uid_sequence</param> + <param name="schema">db_schema</param> + </generator> + +

+

+ The sequence parameter is required while the schema is optional. +

+
+
+ + + The name of the sequence parameter. + + + + + The parameters parameter, appended to the create sequence DDL. + For example (Oracle): INCREMENT BY 1 START WITH 1 MAXVALUE 100 NOCACHE. + + + + + Configures the SequenceGenerator by reading the value of sequence and + schema from the parms parameter. + + The the identifier should be. + An of Param values that are keyed by parameter name. + The to help with Configuration. + + + + Generate an , , or + for the identifier by using a database sequence. + + The this id is being generated in. + The entity for which the id is being generated. + The new identifier as a , , or . + + + + The SQL required to create the database objects for a SequenceGenerator. + + The to help with creating the sql. + + An array of objects that contain the Dialect specific sql to + create the necessary database objects for the SequenceGenerator. + + + + + The SQL required to remove the underlying database objects for a SequenceGenerator. + + The to help with creating the sql. + + A that will drop the database objects for the SequenceGenerator. + + + + + Return a key unique to the underlying database objects for a SequenceGenerator. + + + The configured sequence name. + + + + + An that combines a hi/lo algorithm with an underlying + oracle-style sequence that generates hi values. + + +

+ This id generation strategy is specified in the mapping file as + + <generator class="seqhilo"> + <param name="sequence">uid_sequence</param> + <param name="max_lo">max_lo_value</param> + <param name="schema">db_schema</param> + </generator> + +

+

+ The sequence parameter is required, the max_lo and schema are optional. +

+

+ The user may specify a max_lo value to determine how often new hi values are + fetched. If sequences are not avaliable, TableHiLoGenerator might be an + alternative. +

+
+
+ + + The name of the maximum low value parameter. + + + + + Configures the SequenceHiLoGenerator by reading the value of sequence, max_lo, + and schema from the parms parameter. + + The the identifier should be. + An of Param values that are keyed by parameter name. + The to help with Configuration. + + + + Generate an , , or + for the identifier by using a database sequence. + + The this id is being generated in. + The entity for which the id is being generated. + The new identifier as a , , or . + + + + A generator which combines sequence generation with immediate retrieval + by attaching a output parameter to the SQL command + In this respect it works much like ANSI-SQL IDENTITY generation. + + + + + An that uses a database table to store the last + generated value. + + +

+ It is not intended that applications use this strategy directly. However, + it may be used to build other (efficient) strategies. The return type is + System.Int32 +

+

+ The hi value MUST be fetched in a seperate transaction to the ISession + transaction so the generator must be able to obtain a new connection and commit it. + Hence this implementation may not be used when the user is supplying connections. +

+

+ The mapping parameters table and column are required. +

+
+
+ + + An additional where clause that is added to + the queries against the table. + + + + + The name of the column parameter. + + + + + The name of the table parameter. + + + + Default column name + + + Default table name + + + + Configures the TableGenerator by reading the value of table, + column, and schema from the parms parameter. + + The the identifier should be. + An of Param values that are keyed by parameter name. + The to help with Configuration. + + + + Generate a , , or + for the identifier by selecting and updating a value in a table. + + The this id is being generated in. + The entity for which the id is being generated. + The new identifier as a , , or . + + + + The SQL required to create the database objects for a TableGenerator. + + The to help with creating the sql. + + An array of objects that contain the Dialect specific sql to + create the necessary database objects and to create the first value as 1 + for the TableGenerator. + + + + + The SQL required to remove the underlying database objects for a TableGenerator. + + The to help with creating the sql. + + A that will drop the database objects for the TableGenerator. + + + + + Return a key unique to the underlying database objects for a TableGenerator. + + + The configured table name. + + + + + An that returns an Int64, constructed using + a hi/lo algorithm. + + +

+ This id generation strategy is specified in the mapping file as + + <generator class="hilo"> + <param name="table">table</param> + <param name="column">id_column</param> + <param name="max_lo">max_lo_value</param> + <param name="schema">db_schema</param> + </generator> + +

+

+ The table and column parameters are required, the max_lo and + schema are optional. +

+

+ The hi value MUST be fecthed in a seperate transaction to the ISession + transaction so the generator must be able to obtain a new connection and + commit it. Hence this implementation may not be used when the user is supplying + connections. In that case a would be a + better choice (where supported). +

+
+
+ + + The name of the max lo parameter. + + + + + Configures the TableHiLoGenerator by reading the value of table, + column, max_lo, and schema from the parms parameter. + + The the identifier should be. + An of Param values that are keyed by parameter name. + The to help with Configuration. + + + + Generate a for the identifier by selecting and updating a value in a table. + + The this id is being generated in. + The entity for which the id is being generated. + The new identifier as a . + + + + An that returns a string of length + 32, 36, or 38 depending on the configuration. + + +

+ This id generation strategy is specified in the mapping file as + + <generator class="uuid.hex"> + <param name="format">format_string</param> + <param name="seperator">seperator_string</param> + </generator> + +

+

+ The format and seperator parameters are optional. +

+

+ The identifier string will consist of only hex digits. Optionally, the identifier string + may be generated with enclosing characters and seperators between each component + of the UUID. If there are seperators then the string length will be 36. If a format + that has enclosing brackets is used, then the string length will be 38. +

+

+ format is either + "N" (xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx), + "D" (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx), + "B" ({xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}), + or "P" ((xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)). These formats are described in + the Guid.ToString(String) method. + If no format is specified the default is "N". +

+

+ seperator is the char that will replace the "-" if specified. If no value is + configured then the default seperator for the format will be used. If the format "D", "B", or + "P" is specified, then the seperator will replace the "-". If the format is "N" then this + parameter will be ignored. +

+

+ This class is based on +

+
+
+ + + Generate a new for the identifier using the "uuid.hex" algorithm. + + The this id is being generated in. + The entity for which the id is being generated. + The new identifier as a . + + + + Configures the UUIDHexGenerator by reading the value of format and + seperator from the parms parameter. + + The the identifier should be. + An of Param values that are keyed by parameter name. + The to help with Configuration. + + + + Generate a Guid into a string using the format. + + A new Guid string + + + + An that returns a string of length + 16. + + +

+ This id generation strategy is specified in the mapping file as + <generator class="uuid.string" /> +

+ + The identifier string will NOT consist of only alphanumeric characters. Use + this only if you don't mind unreadable identifiers. + + + This impelementation was known to be incompatible with Postgres. + +
+
+ + + Generate a new for the identifier using the "uuid.string" algorithm. + + The this id is being generated in. + The entity for which the id is being generated. + The new identifier as a . + + + + Base class to create queries in "detached mode" where the NHibernate session is not available. + + + + + The behaviour of each method is basically the same of methods. + The main difference is on : + If you mix with named parameters setter, if same param name are found, + the value of the parameter setter override the value read from the POCO. + + + + + Interface to create queries in "detached mode" where the NHibernate session is not available. + All methods have the same semantics as the corresponding methods of the interface. + + + + + Get an executable instance of , + to actually run the query. + + + + Set the maximum number of rows to retrieve. + + The maximum number of rows to retreive. + + + + Sets the first row to retrieve. + + The first row to retreive. + + + + Enable caching of this query result set. + + Should the query results be cacheable? + + + Set the name of the cache region. + The name of a query cache region, or + for the default query cache + + + + Entities retrieved by this query will be loaded in + a read-only mode where Hibernate will never dirty-check + them or make changes persistent. + + Enable/Disable read -only mode + + + + The timeout for the underlying ADO query + + + + + Set a fetch size for the underlying ADO query. + the fetch size + + + + Set the lockmode for the objects idententified by the + given alias that appears in the FROM clause. + + alias a query alias, or this for a collection filter + + + + Add a comment to the generated SQL. + a human-readable string + + + + Bind a value to an indexed parameter. + + Position of the parameter in the query, numbered from 0 + The possibly null parameter value + The Hibernate type + + + + Bind a value to a named query parameter + + The name of the parameter + The possibly null parameter value + The NHibernate . + + + + Bind a value to an indexed parameter, guessing the Hibernate type from + the class of the given object. + + The position of the parameter in the query, numbered from 0 + The non-null parameter value + + + + Bind a value to a named query parameter, guessing the NHibernate + from the class of the given object. + + The name of the parameter + The non-null parameter value + + + + Bind multiple values to a named query parameter. This is useful for binding a list + of values to an expression such as foo.bar in (:value_list) + + The name of the parameter + A collection of values to list + The Hibernate type of the values + + + + Bind multiple values to a named query parameter, guessing the Hibernate + type from the class of the first object in the collection. This is useful for binding a list + of values to an expression such as foo.bar in (:value_list) + + The name of the parameter + A collection of values to list + + + + Bind the property values of the given object to named parameters of the query, + matching property names with parameter names and mapping property types to + Hibernate types using heuristics. + + Any POCO + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a array to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a array. + + + + Bind an instance of a array to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a array. + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + A non-null instance of a . + The name of the parameter + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a mapped persistent class to an indexed parameter. + + Position of the parameter in the query string, numbered from 0 + A non-null instance of a persistent class + + + + Bind an instance of a mapped persistent class to a named parameter. + + The name of the parameter + A non-null instance of a persistent class + + + + Bind an instance of a persistent enumeration class to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a persistent enumeration + + + + Bind an instance of a persistent enumeration class to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a persistent enumeration + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + An instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + An instance of a . + + + + Override the current session flush mode, just for this query. + + + + + Set a strategy for handling the query results. This can be used to change + "shape" of the query result. + + + + + Set the value to ignore unknown parameters names. + + True to ignore unknown parameters names. + + + Override the current session cache mode, just for this query. + The cache mode to use. + this (for method chaining) + + + + Interface for DetachedQuery implementors. + + + When you are working with queries in "detached mode" you may need some additional services like clone, + copy of parameters from another query and so on. + + + + + Copy all properties to a given . + + The given . + + Usually the implementation use to set properties to the . + This mean that existing properties are merged/overriden. + + + + + Set only parameters to a given . + + The given . + + Existing parameters are merged/overriden. + + + + + Override all properties reading new values from a given . + + The given origin. + + + + Override all parameters reading new values from a given . + + The given origin. + + + Override the current session cache mode, just for this query. + The cache mode to use. + this (for method chaining) + + + + Fill all properties. + + The . + + Query properties are overriden/merged. + + + + + Copy all properties to a given . + + The given . + + The method use to set properties of . + + + + + Set only parameters to a given . + + The given . + + The method use to set properties of . + Existing parameters in are merged/overriden. + + + + + Clear all existing parameters and copy new parameters from a given origin. + + The origin of parameters. + The current instance + If is null. + + + + Abstract implementation of the IQuery interface. + + + + + An object-oriented representation of a NHibernate query. + + + An IQuery instance is obtained by calling ISession.CreateQuery(). This interface + exposes some extra functionality beyond that provided by ISession.Iterate() and + ISession.List(); + + + A particulare page of the result set may be selected by calling + SetMaxResults(), SetFirstResult(). The generated sql + depends on the capabilities of the . Some + Dialects are for databases that have built in paging (LIMIT) and those capabilities + will be used to limit the number of records returned by the sql statement. + If the database does not support LIMITs then all of the records will be returned, + but the objects created will be limited to the specific results requested. + + Named query parameters may be used + + + Named query parameters are tokens of the form :name in the query string. A value is bound + to the Int32 parameter :foo by calling + + SetParameter("foo", foo, NHibernateUtil.Int32); + + for example. A name may appear multiple times in the query string. + + + Unnamed parameters ? are also supported. To bind a value to an unnamed + parameter use a Set method that accepts an Int32 positional argument - numbered from + zero. + + + You may not mix and match unnamed parameters and named parameters in the same query. + + + Queries are executed by calling List() or Iterate(). A query + may be re-executed by subsequent invocations. Its lifespan is, however, bounded by the lifespan + of the ISession that created it. + + + Implementors are not intended to be threadsafe. + + + + + + Return the query results as an . If the query contains multiple results + per row, the results are returned in an instance of object[]. + + +

+ Entities returned as results are initialized on demand. The first SQL query returns + identifiers only. +

+

+ This is a good strategy to use if you expect a high number of the objects + returned to be already loaded in the or in the 2nd level cache. +

+
+
+ + + Strongly-typed version of . + + + + + + + Return the query results as an . If the query contains multiple results per row, + the results are returned in an instance of object[]. + + The filled with the results. + + This is a good strategy to use if you expect few of the objects being returned are already loaded + or if you want to fill the 2nd level cache. + + + + + Return the query results an place them into the . + + The to place the results in. + + + + Strongly-typed version of . + + + + + Convenience method to return a single instance that matches + the query, or null if the query returns no results. + + the single result or + + Thrown when there is more than one matching result. + + + + + Strongly-typed version of . + + + + + Execute the update or delete statement. + + The number of entities updated or deleted. + + + + Set the maximum number of rows to retrieve. + + The maximum number of rows to retreive. + + + + Sets the first row to retrieve. + + The first row to retreive. + + + + Entities retrieved by this query will be loaded in + a read-only mode where Hibernate will never dirty-check + them or make changes persistent. + + + + + Enable caching of this query result set. + + Should the query results be cacheable? + + + Set the name of the cache region. + The name of a query cache region, or + for the default query cache + + + + The timeout for the underlying ADO query + + + + + Set a fetch size for the underlying ADO query. + the fetch size + + + + Set the lockmode for the objects idententified by the + given alias that appears in the FROM clause. + + alias a query alias, or this for a collection filter + + + + Add a comment to the generated SQL. + a human-readable string + + + + Override the current session flush mode, just for this query. + + + + Override the current session cache mode, just for this query. + The cache mode to use. + this (for method chaining) + + + + Bind a value to an indexed parameter. + + Position of the parameter in the query, numbered from 0 + The possibly null parameter value + The Hibernate type + + + + Bind a value to a named query parameter + + The name of the parameter + The possibly null parameter value + The NHibernate . + + + + Bind a value to an indexed parameter. + + Position of the parameter in the query, numbered from 0 + The possibly null parameter value + The parameter's + + + + Bind a value to a named query parameter + + The name of the parameter + The possibly null parameter value + The parameter's + + + + Bind a value to an indexed parameter, guessing the Hibernate type from + the class of the given object. + + The position of the parameter in the query, numbered from 0 + The non-null parameter value + + + + Bind a value to a named query parameter, guessing the NHibernate + from the class of the given object. + + The name of the parameter + The non-null parameter value + + + + Bind multiple values to a named query parameter. This is useful for binding a list + of values to an expression such as foo.bar in (:value_list) + + The name of the parameter + A collection of values to list + The Hibernate type of the values + + + + Bind multiple values to a named query parameter, guessing the Hibernate + type from the class of the first object in the collection. This is useful for binding a list + of values to an expression such as foo.bar in (:value_list) + + The name of the parameter + A collection of values to list + + + + Bind multiple values to a named query parameter. This is useful for binding + a list of values to an expression such as foo.bar in (:value_list). + + the name of the parameter + a collection of values to list + the Hibernate type of the values + + + + Bind multiple values to a named query parameter. The Hibernate type of the parameter is + first detected via the usage/position in the query and if not sufficient secondly + guessed from the class of the first object in the array. This is useful for binding a list of values + to an expression such as foo.bar in (:value_list). + + the name of the parameter + a collection of values to list + + + + Bind the property values of the given object to named parameters of the query, + matching property names with parameter names and mapping property types to + Hibernate types using heuristics. + + Any PONO + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a array to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a array. + + + + Bind an instance of a array to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a array. + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + A non-null instance of a . + The name of the parameter + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a persistent enumeration class to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a persistent enumeration + + + + Bind an instance of a persistent enumeration class to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a persistent enumeration + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to an indexed parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The position of the parameter in the query string, numbered from 0 + An instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + An instance of a . + + + + Bind an instance of a mapped persistent class to an indexed parameter. + + Position of the parameter in the query string, numbered from 0 + A non-null instance of a persistent class + + + + Bind an instance of a mapped persistent class to a named parameter. + + The name of the parameter + A non-null instance of a persistent class + + + + Set a strategy for handling the query results. This can be used to change + "shape" of the query result. + + + + + Get a enumerable that when enumerated will execute + a batch of queries in a single database roundtrip + + + + + + + Get an IFutureValue instance, whose value can be retrieved through + its Value property. The query is not executed until the Value property + is retrieved, which will execute other Future queries as well in a + single roundtrip + + + + + + + The query string + + + + + The Hibernate types of the query result set. + + + + Return the HQL select clause aliases (if any) + an array of aliases as strings + + + + The names of all named parameters of the query + + The parameter names, in no particular order + + + + Perform parameter validation. Used prior to executing the encapsulated query. + + + if true, the first ? will not be verified since + its needed for e.g. callable statements returning a out parameter + + + + + Guesses the from the param's value. + + The object to guess the of. + An for the object. + + Thrown when the param is null because the + can't be guess from a null value. + + + + + Guesses the from the . + + The to guess the of. + An for the . + + Thrown when the clazz is null because the + can't be guess from a null type. + + + + + Warning: adds new parameters to the argument by side-effect, as well as mutating the query string! + + + + + Warning: adds new parameters to the argument by side-effect, as well as mutating the query string! + + + + Override the current session cache mode, just for this query. + + The cache mode to use. + this (for method chaining) + + + Functionality common to stateless and stateful sessions + + + + Implementation of the interface for collection filters. + + + + + Default implementation of the , + for "ordinary" HQL queries (not collection filters) + + + + + + Implementation of the interface + + + + + Criteria is a simplified API for retrieving entities by composing + objects. + + + + Using criteria is a very convenient approach for functionality like "search" screens + where there is a variable number of conditions to be placed upon the result set. + + + The Session is a factory for ICriteria. Expression instances are usually obtained via + the factory methods on . eg: + + + IList cats = session.CreateCriteria(typeof(Cat)) + .Add( Expression.Like("name", "Iz%") ) + .Add( Expression.Gt( "weight", minWeight ) ) + .AddOrder( Order.Asc("age") ) + .List(); + + You may navigate associations using or . + + IList cats = session.CreateCriteria(typeof(Cat)) + .CreateCriteria("kittens") + .Add( Expression.like("name", "Iz%") ) + .List(); + + + You may specify projection and aggregation using Projection + instances obtained via the factory methods on Projections. + + IList cats = session.CreateCriteria(typeof(Cat)) + .setProjection( Projections.ProjectionList() + .Add( Projections.RowCount() ) + .Add( Projections.Avg("weight") ) + .Add( Projections.Max("weight") ) + .Add( Projections.Min("weight") ) + .Add( Projections.GroupProperty("color") ) + ) + .AddOrder( Order.Asc("color") ) + .List(); + + + + + + + Used to specify that the query results will be a projection (scalar in + nature). Implicitly specifies the projection result transformer. + + The projection representing the overall "shape" of the + query results. + This instance (for method chaining) + + + The individual components contained within the given + determines the overall "shape" of the query result. + + + + + + Add an Expression to constrain the results to be retrieved. + + + + + + + An an Order to the result set + + + + + + Specify an association fetching strategy. Currently, only + one-to-many and one-to-one associations are supported. + + A dot seperated property path. + The Fetch mode. + + + + + Set the lock mode of the current entity + + the lock mode + + + + + Set the lock mode of the aliased entity + + an alias + the lock mode + + + + + Join an association, assigning an alias to the joined entity + + + + + + + + Join an association using the specified join-type, assigning an alias to the joined + association + + + + The type of join to use. + this (for method chaining) + + + + Create a new , "rooted" at the associated entity + + + + + + + Create a new , "rooted" at the associated entity, + using the specified join type. + + A dot-seperated property path + The type of join to use + The created "sub criteria" + + + + Create a new , "rooted" at the associated entity, + assigning the given alias + + + + + + + + Create a new , "rooted" at the associated entity, + assigning the given alias and using the specified join type. + + A dot-separated property path + The alias to assign to the joined association (for later reference). + The type of join to use. + The created "sub criteria" + + + + Set a strategy for handling the query results. This determines the + "shape" of the query result set. + + + + + + + + + + Set a limit upon the number of objects to be retrieved + + + + + + Set the first result to be retrieved + + + + + Set a fetch size for the underlying ADO query. + the fetch size + this (for method chaining) + + + + Set a timeout for the underlying ADO.NET query + + + + + + + Enable caching of this query result set + + + + + + + Set the name of the cache region. + + the name of a query cache region, or + for the default query cache + + + + Add a comment to the generated SQL. + a human-readable string + this (for method chaining) + + + Override the flush mode for this particular query. + The flush mode to use. + this (for method chaining) + + + Override the cache mode for this particular query. + The cache mode to use. + this (for method chaining) + + + + Get the results + + + + + + Convenience method to return a single instance that matches + the query, or null if the query returns no results. + + the single result or + + If there is more than one matching result + + + + + Get a enumerable that when enumerated will execute + a batch of queries in a single database roundtrip + + + + + + + Get an IFutureValue instance, whose value can be retrieved through + its Value property. The query is not executed until the Value property + is retrieved, which will execute other Future queries as well in a + single roundtrip + + + + + + + Get the results and fill the + + The list to fill with the results. + + + + Strongly-typed version of . + + + + + Strongly-typed version of . + + + + + Clear all orders from criteria. + + + + + Allows to get a sub criteria by path. + Will return null if the criteria does not exists. + + The path. + + + + Alows to get a sub criteria by alias. + Will return null if the criteria does not exists + + The alias. + + + + + Gets the root entity type if available, throws otherwise + + + This is an NHibernate specific method, used by several dependent + frameworks for advance integration with NHibernate. + + + + + Get the alias of the entity encapsulated by this criteria instance. + + The alias for the encapsulated entity. + + + Override the cache mode for this particular query. + The cache mode to use. + this (for method chaining) + + + Override the cache mode for this particular query. + The cache mode to use. + this (for method chaining) + + + + The Clone is supported only by a root criteria. + + The clone of the root criteria. + + + + Error handling in this case will only kick in if we cannot set values on the TLS + this is usally the case if we are called from the finalizer, since this is something + that we do only for logging, we ignore the error. + + + + + Expose the batch functionality in ADO.Net 2.0 + Microsoft in its wisdom decided to make my life hard and mark it internal. + Through the use of Reflection and some delegates magic, I opened up the functionality. + + Observable performance benefits are 50%+ when used, so it is really worth it. + + + + + Append a command to the batch + + + + + + Executes the batch + + + This seems to be returning the total number of affected rows in all queries + + + + + Return the batch command to be executed + + + + + The number of commands batched in this instance + + + + + Append a command to the batch + + + + + + This is required because SqlClient.SqlCommandSet will throw if + the command has no parameters. + + + + + + Executes the batch + + + This seems to be returning the total number of affected rows in all queries + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + 2 + + + + Return the batch command to be executed + + + + + The number of commands batched in this instance + + + + + Named query in "detached mode" where the NHibernate session is not available. + + + + + + + + + Create a new instance of for a named query string defined in the mapping file. + + The name of a query defined externally. + + The query can be either in HQL or SQL format. + + + + + Get an executable instance of , to actually run the query. + + + + + Creates a new DetachedNamedQuery that is a deep copy of the current instance. + + The clone. + + + + Get the query name. + + + + + Query in "detached mode" where the NHibernate session is not available. + + + + + + + + Create a new instance of for the given query string. + + A hibernate query string + + + + Get an executable instance of , to actually run the query. + + + + + Creates a new DetachedQuery that is a deep copy of the current instance. + + The clone. + + + + Get the HQL string. + + + + + Provides an wrapper over the results of an . + + + This is the IteratorImpl in H2.0.3 + + + + + Create an wrapper over an . + + The to enumerate over. + The used to create the . + The to use to load objects. + The s contained in the . + The names of the columns in the . + The that should be applied to the . + Instantiator of the result holder (used for "select new SomeClass(...)" queries). + + The should already be positioned on the first record in . + + + + + Returns an enumerator that can iterate through the query results. + + + An that can be used to iterate through the query results. + + + + + Advances the enumerator to the next element of the query results. + + + if the enumerator was successfully advanced to the next query results + ; if the enumerator has passed the end of the query results. + + + + + + + + A flag to indicate if Dispose() has been called. + + + + + Finalizer that ensures the object is correctly disposed of. + + + + + Takes care of freeing the managed and unmanaged resources that + this class is responsible for. + + + + + Takes care of freeing the managed and unmanaged resources that + this class is responsible for. + + Indicates if this EnumerableImpl is being Disposed of or Finalized. + + The command is closed and the reader is disposed. This allows other ADO.NET + related actions to occur without needing to move all the way through the + EnumerableImpl. + + + + + Gets the current element in the query results. + + + The current element in the query results which is either an object or + an object array. + + + If the only returns one type of Entity then an object will + be returned. If this is a multi-column resultset then an object array will be + returned. + + + + + + + + + Type definition of Filter. Filter defines the user's view into enabled dynamic filters, + allowing them to set filter parameter values. + + + + + Set the named parameter's value list for this filter. + + The parameter's name. + The values to be applied. + This FilterImpl instance (for method chaining). + + + + Set the named parameter's value list for this filter. Used + in conjunction with IN-style filter criteria. + + The parameter's name. + The values to be expanded into an SQL IN list. + This FilterImpl instance (for method chaining). + + + + Set the named parameter's value list for this filter. Used + in conjunction with IN-style filter criteria. + + The parameter's name. + The values to be expanded into an SQL IN list. + This FilterImpl instance (for method chaining). + + + + Perform validation of the filter state. This is used to verify the + state of the filter after its enablement and before its use. + + + + + + Get the name of this filter. + + This filter's name. + + + + Get the filter definition containing additional information about the + filter (such as default-condition and expected parameter names/types). + + The filter definition + + + + Set the named parameter's value for this filter. + + The parameter's name. + The value to be applied. + This FilterImpl instance (for method chaining). + + + + Set the named parameter's value list for this filter. Used + in conjunction with IN-style filter criteria. + + The parameter's name. + The values to be expanded into an SQL IN list. + This FilterImpl instance (for method chaining). + + + + Set the named parameter's value list for this filter. Used + in conjunction with IN-style filter criteria. + + The parameter's name. + The values to be expanded into an SQL IN list. + This FilterImpl instance (for method chaining). + + + + Perform validation of the filter state. This is used to verify the + state of the filter after its enablement and before its use. + + + + + Get the name of this filter. + + + + + Helper methods for rendering log messages and exception messages + + + + + Generate small message that can be used in traces and exception messages. + + The to create the string from. + The identifier of the object. + A descriptive in the format of [classname#id] + + + + Generate small message that can be used in traces and exception messages. + + The for the class in question. + The identifier of the object. + The . + A descriptive in the format of [classname#id] + + + + Generate small message that can be used in traces and exception messages. + + The for the class in question. + The identifier of the object. + The . + The NHibernate type of the identifier. + A descriptive in the format of [classname#id] + + + + Generate small message that can be used in traces and exception messages. + + The for the class in question + The id + A descriptive in the form [FooBar#id] + + + + Generate small message that can be used in traces and exception messages. + + The for the class in question + A descriptive in the form [FooBar] + + + + Generate small message that can be used in traces and exception messages. + + The for the class in question + The id + A descriptive in the form [collectionrole#id] + + + + Generate an info message string relating to a given property value + for an entity. + + The entity name + The name of the property + The property value. + An info string, in the form [Foo.bars#1] + + + + Generate an info message string relating to a particular managed + collection. + + The persister for the collection + The id value of the owner + The session factory + An info string, in the form [Foo.bars#1] + + + + Generate an info message string relating to a particular entity, + based on the given entityName and id. + + The defined entity name. + The entity id value. + An info string, in the form [FooBar#1]. + + + + Combines several queries into a single DB call + + + + + Get all the results + + + + + Adds the specified criteria to the query. The result will be contained in a + + Return results in a + The criteria. + + + + + Adds the specified criteria to the query. The result will be contained in a + + The criteria. + + + + + Adds the specified criteria to the query, and associates it with the given key. The result will be contained in a + + The key + The criteria + + + + + Adds the specified detached criteria. The result will be contained in a + + The detached criteria. + + + + + Adds the specified detached criteria, and associates it with the given key. The result will be contained in a + + The key + The detached criteria + + + + + Adds the specified criteria to the query + + The criteria. + + + + + Adds the specified criteria to the query, and associates it with the given key + + The key + The criteria + + + + + Adds the specified detached criteria. + + The detached criteria. + + + + + Adds the specified detached criteria, and associates it with the given key + + The key + The detached criteria + + + + + Sets whatevert this criteria is cacheable. + + if set to true [cachable]. + + + + Set the cache region for thie criteria + + The region + + + + + Force a cache refresh + + + + + + + Sets the result transformer for all the results in this mutli criteria instance + + The result transformer. + + + + + Returns the result of one of the Criteria based on the key + + The key + + + + + Initializes a new instance of the class. + + The session. + The factory. + + + + Combines sevaral queries into a single database call + + + + + Get all the results + + + + + Adds the specified criteria to the query. The result will be contained in a + + Return results in a + The criteria. + + + + + Add the specified HQL query to the multi query. The result will be contained in a + + + + + Add the specified HQL query to the multi query, and associate it with the given key. The result will be contained in a + + + + + + + + Add the specified HQL Query to the multi query, and associate it with the given key. The result will be contained in a + + + + + + + + Add the specified HQL query to the multi query. The result will be contained in a + + + + + Add a named query to the multi query. The result will be contained in a + + + + + Add a named query to the multi query, and associate it with the given key. The result will be contained in a + + + + + + + + Add the specified HQL query to the multi query, and associate it with the given key + + + + + + + + Add the specified HQL query to the multi query + + + + + Add the specified HQL Query to the multi query, and associate it with the given key + + + + + + + + Add the specified HQL query to the multi query + + + + + Add a named query to the multi query + + + + + Add a named query to the multi query, and associate it with the given key + + + + + + + + Enable caching of this query result set. + + Should the query results be cacheable? + + + Set the name of the cache region. + The name of a query cache region, or + for the default query cache + + + Should the query force a refresh of the specified query cache region? + This is particularly useful in cases where underlying data may have been + updated via a seperate process (i.e., not modified through Hibernate) and + allows the application to selectively refresh the query cache regions + based on its knowledge of those events. + Should the query result in a forcible refresh of + the query cache? + + + + The timeout for the underlying ADO query + + + + + + Bind a value to a named query parameter + + The name of the parameter + The possibly null parameter value + The NHibernate . + + + + Bind a value to a named query parameter, guessing the NHibernate + from the class of the given object. + + The name of the parameter + The non-null parameter value + + + + Bind multiple values to a named query parameter. This is useful for binding a list + of values to an expression such as foo.bar in (:value_list) + + The name of the parameter + A collection of values to list + The Hibernate type of the values + + + + Bind multiple values to a named query parameter, guessing the Hibernate + type from the class of the first object in the collection. This is useful for binding a list + of values to an expression such as foo.bar in (:value_list) + + The name of the parameter + A collection of values to list + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a array to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a array. + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + A non-null instance of a . + The name of the parameter + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a mapped persistent class to a named parameter. + + The name of the parameter + A non-null instance of a persistent class + + + + Bind an instance of a persistent enumeration class to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a persistent enumeration + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + An instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Bind an instance of a to a named parameter + using an NHibernate . + + The name of the parameter + A non-null instance of a . + + + + Override the current session flush mode, just for this query. + + + + + Set a strategy for handling the query results. This can be used to change + "shape" of the query result. + + + + + Returns the result of one of the Criteria based on the key + + The key + + + + + Return the query results of all the queries + + + + + + + an actual entity object, not a proxy! + + + + + + Concrete implementation of a SessionFactory. + + + Has the following responsibilities: + + + Caches configuration settings (immutably) + + Caches "compiled" mappings - ie. + and + + + Caches "compiled" queries (memory sensitive cache) + + + Manages PreparedStatements/IDbCommands - how true in NH? + + + Delegates IDbConnection management to the + + + Factory for instances of + + + + This class must appear immutable to clients, even if it does all kinds of caching + and pooling under the covers. It is crucial that the class is not only thread safe + , but also highly concurrent. Synchronization must be used extremely sparingly. + + + + + + + + + + + NH specific : to avoid the use of entityName for generic implementation + + this is a shortcut. + + + + Gets the hql query identified by the name. + + The name of that identifies the query. + + A hql query or if the named + query does not exist. + + + + Get the return aliases of a query + + + + Return the names of all persistent (mapped) classes that extend or implement the + given class or interface, accounting for implicit/explicit polymorphism settings + and excluding mapped subclasses/joined-subclasses of other classes in the result. + + + + + + + + + + + Closes the session factory, releasing all held resources. + + cleans up used cache regions and "stops" the cache provider. + close the ADO.NET connection + + + + + Get a new stateless session. + + + Get a new stateless session for the given ADO.NET connection. + + + + + + + + + Statistics SPI + + + Get the statistics for this session factory + + + + Gets the ICurrentSessionContext instance attached to this session factory. + + + + + Delegate to handle the scenario of an entity not found by a specified id. + + + + + Delegate method to handle the scenario of an entity not found. + + The entityName (may be the class fullname) + The requested id not founded. + + + + Resolves lookups and deserialization. + + + + This is used heavily be Deserialization. Currently a SessionFactory is not really serialized. + All that is serialized is it's name and uid. During Deserializaiton the serialized SessionFactory + is converted to the one contained in this object. So if you are serializing across AppDomains + you should make sure that "name" is specified for the SessionFactory in the hbm.xml file and that the + other AppDomain has a configured SessionFactory with the same name. If + you are serializing in the same AppDomain then there will be no problem because the uid will + be in this object. + + + + + + + + + Adds an Instance of the SessionFactory to the local "cache". + + The identifier of the ISessionFactory. + The name of the ISessionFactory. + The ISessionFactory. + The configured properties for the ISessionFactory. + + + + Removes the Instance of the SessionFactory from the local "cache". + + The identifier of the ISessionFactory. + The name of the ISessionFactory. + The configured properties for the ISessionFactory. + + + + Returns a Named Instance of the SessionFactory from the local "cache" identified by name. + + The name of the ISessionFactory. + An instantiated ISessionFactory. + + + + Returns an Instance of the SessionFactory from the local "cache" identified by UUID. + + The identifier of the ISessionFactory. + An instantiated ISessionFactory. + + + + We always set the result to use a thread static variable, on the face of it, + it looks like it is not a valid choice, since ASP.Net and WCF may decide to switch + threads on us. But, since SessionIdLoggingContext is only used inside NH calls, and since + NH calls are never async, this isn't an issue for us. + In addition to that, attempting to match to the current context has proven to be performance hit. + + + + + Concrete implementation of a Session, also the central, organizing component + of Hibernate's internal implementation. + + + Exposes two interfaces: ISession itself, to the application and ISessionImplementor + to other components of hibernate. This is where the hard stuff is... + NOT THREADSAFE + + + + + Constructor used to recreate the Session during the deserialization. + + + + + This is needed because we have to do some checking before the serialization process + begins. I don't know how to add logic in ISerializable.GetObjectData and have .net + write all of the serializable fields out. + + + + + Verify the ISession can be serialized and write the fields to the Serializer. + + + + + The fields are marked with [NonSerializable] as just a point of reference. This method + has complete control and what is serialized and those attributes are ignored. However, + this method should be in synch with the attributes for easy readability. + + + + + Once the entire object graph has been deserialized then we can hook the + collections, proxies, and entities back up to the ISession. + + + + + + Constructor used for OpenSession(...) processing, as well as construction + of sessions for GetCurrentSession(). + + The user-supplied connection to use for this session. + The factory from which this session was obtained + NOT USED + The timestamp for this session + The interceptor to be applied to this session + The entity-mode for this session + Should we auto flush before completion of transaction + Should we auto close after completion of transaction + The mode by which we should release JDBC connections. + + + + Constructor used in building "child sessions". + + The parent Session + The entity mode + + + + Close the session and release all resources + + Do not call this method inside a transaction scope, use Dispose instead, since + Close() is not aware of distributed transactions + + + + + + Ensure that the locks are downgraded to + and that all of the softlocks in the have + been released. + + + + + Save a transient object. An id is generated, assigned to the object and returned + + + + + + + Save a transient object with a manually assigned ID + + + + + + + Delete a persistent object + + + + + Delete a persistent object (by explicit entity name) + + + + Retrieve a list of persistent objects using a Hibernate query + + + + + + + + + + + + + + + Give the interceptor an opportunity to override the default instantiation + + + + + + + Force an immediate flush + + + Cascade merge an entity instance + + + Cascade persist an entity instance + + + Cascade persist an entity instance during the flush process + + + Cascade refresh an entity instance + + + Cascade copy an entity instance + + + Cascade delete an entity instance + + + + detect in-memory changes, determine if the changes are to tables + named in the query and, if so, complete execution the flush + + + + + + + Load the data for the object with the specified id into a newly created object + using "for update", if supported. A new key will be assigned to the object. + This should return an existing proxy where appropriate. + + If the object does not exist in the database, an exception is thrown. + + + + + + + Thrown when the object with the specified id does not exist in the database. + + + + + Load the data for the object with the specified id into a newly created object + using "for update", if supported. A new key will be assigned to the object. + This should return an existing proxy where appropriate. + + If the object does not exist in the database, null is returned. + + + + + + + + + Load the data for the object with the specified id into a newly created object. + This is only called when lazily initializing a proxy. + Do NOT return a proxy. + + + + + Return the object with the specified id or throw exception if no row with that id exists. Defer the load, + return a new proxy or return an existing proxy if possible. Do not check if the object was deleted. + + + + + + + + This can be called from commit() or at the start of a List() method. + + Perform all the necessary SQL statements in a sensible order, to allow + users to repect foreign key constraints: + + Inserts, in the order they were performed + Updates + Deletion of collection elements + Insertion of collection elements + Deletes, in the order they were performed + + + + Go through all the persistent objects and look for collections they might be + holding. If they had a nonpersistable collection, substitute a persistable one + + + + + + Not for internal use + + + + + + + Get the id value for an object that is actually associated with the session. + This is a bit stricter than GetEntityIdentifierIfNotUnsaved(). + + + + + + + called by a collection that wants to initialize itself + + + + + + + + + + Finalizer that ensures the object is correctly disposed of. + + + + + Perform a soft (distributed transaction aware) close of the session + + + + + Takes care of freeing the managed and unmanaged resources that + this class is responsible for. + + Indicates if this Session is being Disposed of or Finalized. + + If this Session is being Finalized (isDisposing==false) then make sure not + to call any methods that could potentially bring this Session back to life. + + + + + remove any hard references to the entity that are held by the infrastructure + (references held by application or other persistant instances are okay) + + + + + + + + + + + + + + + + + + + + + Get the ActionQueue for this session + + + + + + + Gets if the ISession is connected. + + + if the ISession is connected. + + + An ISession is considered connected if there is an (regardless + of its state) or if it the field connect is true. Meaning that it will connect + at the next operation that requires a connection. + + + + Get the statistics for this session. + + + Retrieves the configured event listeners from this event source. + + + + Implements SQL query passthrough + + + An example mapping is: + + <sql-query-name name="mySqlQuery"> + <return alias="person" class="eg.Person" /> + SELECT {person}.NAME AS {person.name}, {person}.AGE AS {person.age}, {person}.SEX AS {person.sex} + FROM PERSON {person} WHERE {person}.NAME LIKE 'Hiber%' + </sql-query-name> + + + + + + Declare a "root" entity, without specifying an alias + + + + + Declare a "root" entity + + + + + Declare a "root" entity, specifying a lock mode + + + + + Declare a "root" entity, without specifying an alias + + + + + Declare a "root" entity + + + + + Declare a "root" entity, specifying a lock mode + + + + + Declare a "joined" entity + + + + + Declare a "joined" entity, specifying a lock mode + + + + + Declare a scalar query result + + + + + Use a predefined named ResultSetMapping + + + + Constructs a SQLQueryImpl given a sql query defined in the mappings. + The representation of the defined sql-query. + The session to which this SQLQueryImpl belongs. + Metadata about parameters found in the query. + + + + A command-oriented API for performing bulk operations against a database. + + + A stateless session does not implement a first-level cache nor + interact with any second-level cache, nor does it implement + transactional write-behind or automatic dirty checking, nor do + operations cascade to associated instances. Collections are + ignored by a stateless session. Operations performed via a + stateless session bypass Hibernate's event model and + interceptors. Stateless sessions are vulnerable to data + aliasing effects, due to the lack of a first-level cache. + + For certain kinds of transactions, a stateless session may + perform slightly faster than a stateful session. + + + + Close the stateless session and release the ADO.NET connection. + + + Insert a entity. + A new transient instance + the identifier of the instance + + + Insert a row. + The entityName for the entity to be inserted + a new transient instance + the identifier of the instance + + + Update a entity. + a detached entity instance + + + Update a entity. + The entityName for the entity to be updated + a detached entity instance + + + Delete a entity. + a detached entity instance + + + Delete a entity. + The entityName for the entity to be deleted + a detached entity instance + + + Retrieve a entity. + a detached entity instance + + + Retrieve a entity. + + + a detached entity instance + + + + + Retrieve a entity, obtaining the specified lock mode. + + a detached entity instance + + + + Retrieve a entity, obtaining the specified lock mode. + + a detached entity instance + + + + Refresh the entity instance state from the database. + + The entity to be refreshed. + + + + Refresh the entity instance state from the database. + + The entityName for the entity to be refreshed. + The entity to be refreshed. + + + + Refresh the entity instance state from the database. + + The entity to be refreshed. + The LockMode to be applied. + + + + Refresh the entity instance state from the database. + + The entityName for the entity to be refreshed. + The entity to be refreshed. + The LockMode to be applied. + + + + Create a new instance of Query for the given HQL query string. + + Entities returned by the query are detached. + + + + Obtain an instance of for a named query string defined in + the mapping file. + + + The query can be either in HQL or SQL format. + Entities returned by the query are detached. + + + + + Create a new instance, for the given entity class, + or a superclass of an entity class. + + A class, which is persistent, or has persistent subclasses + The . + Entities returned by the query are detached. + + + + Create a new instance, for the given entity class, + or a superclass of an entity class, with the given alias. + + A class, which is persistent, or has persistent subclasses + The alias of the entity + The . + Entities returned by the query are detached. + + + + Create a new instance, for the given entity class, + or a superclass of an entity class. + + A class, which is persistent, or has persistent subclasses + The . + Entities returned by the query are detached. + + + + Create a new instance, for the given entity class, + or a superclass of an entity class, with the given alias. + + A class, which is persistent, or has persistent subclasses + The alias of the entity + The . + Entities returned by the query are detached. + + + + Create a new instance, for the given entity name. + + The entity name. + The . + Entities returned by the query are detached. + + + + Create a new instance, for the given entity name, + with the given alias. + + The entity name. + The alias of the entity + The . + Entities returned by the query are detached. + + + + Create a new instance of for the given SQL query string. + Entities returned by the query are detached. + + a SQL query + The + + + Begin a NHibernate transaction. + + + Get the current Hibernate transaction. + + + + Returns the current ADO.NET connection associated with this instance. + + + If the session is using aggressive connection release (as in a + CMT environment), it is the application's responsibility to + close the connection returned by this call. Otherwise, the + application should not close the connection. + + + + Close the stateless session and release the ADO.NET connection. + + + Insert a entity. + A new transient instance + the identifier of the instance + + + Insert a row. + The entityName for the entity to be inserted + a new transient instance + the identifier of the instance + + + Update a entity. + a detached entity instance + + + Update a entity. + The entityName for the entity to be updated + a detached entity instance + + + Delete a entity. + a detached entity instance + + + Delete a entity. + The entityName for the entity to be deleted + a detached entity instance + + + Retrieve a entity. + a detached entity instance + + + Retrieve a entity. + + + a detached entity instance + + + + + Retrieve a entity, obtaining the specified lock mode. + + a detached entity instance + + + + Retrieve a entity, obtaining the specified lock mode. + + a detached entity instance + + + + Refresh the entity instance state from the database. + + The entity to be refreshed. + + + + Refresh the entity instance state from the database. + + The entityName for the entity to be refreshed. + The entity to be refreshed. + + + + Refresh the entity instance state from the database. + + The entity to be refreshed. + The LockMode to be applied. + + + + Refresh the entity instance state from the database. + + The entityName for the entity to be refreshed. + The entity to be refreshed. + The LockMode to be applied. + + + + Create a new instance, for the given entity class, + or a superclass of an entity class. + + A class, which is persistent, or has persistent subclasses + The . + Entities returned by the query are detached. + + + + Create a new instance, for the given entity class, + or a superclass of an entity class, with the given alias. + + A class, which is persistent, or has persistent subclasses + The alias of the entity + The . + Entities returned by the query are detached. + + + + Create a new instance, for the given entity name. + + The entity name. + The . + Entities returned by the query are detached. + + + + Create a new instance, for the given entity name, + with the given alias. + + The entity name. + The alias of the entity + The . + Entities returned by the query are detached. + + + Begin a NHibernate transaction. + + + + Finalizer that ensures the object is correctly disposed of. + + + + + Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. + + 2 + + + Get the current Hibernate transaction. + + + Contract for field interception handlers. + + + Use to associate the entity to which we are bound to the given session. + The session to which we are now associated. + + + The the given field initialized for the entity to which we are bound? + The name of the field to check + True if the given field is initialized; otherwise false. + + + Forcefully mark the entity as being dirty. + + + Clear the internal dirty flag. + + + Is the entity considered dirty? + True if the entity is dirty; otherwise false. + + + Is the entity to which we are bound completely initialized? + + + Helper class for dealing with enhanced entity classes. + + + Marker value for uninitialized properties + + + Contract for controlling how lazy properties get initialized. + + + Initialize the property, and return its new value + + + + Walker for collections of values and many-to-many associations + + + + + Superclass of walkers for collection initializers + + + + + + + + Add on association (one-to-one, many-to-one, or a collection) to a list + of associations to be fetched by outerjoin (if necessary) + + + + + Add on association (one-to-one, many-to-one, or a collection) to a list + of associations to be fetched by outerjoin + + + + + For an entity class, return a list of associations to be fetched by outerjoin + + + + + For a collection role, return a list of associations to be fetched by outerjoin + + + + + For a collection role, return a list of associations to be fetched by outerjoin + + + + + For an entity class, add to a list of associations to be fetched + by outerjoin + + + + + For a component, add to a list of associations to be fetched by outerjoin + + + + + For a composite element, add to a list of associations to be fetched by outerjoin + + + + + Extend the path by the given property name + + + + + Get the join type (inner, outer, etc) or -1 if the + association should not be joined. Override on + subclasses. + + + + + Use an inner join if it is a non-null association and this + is the "first" join in a series + + + + + Does the mapping, and Hibernate default semantics, specify that + this association should be fetched by outer joining + + + + + Override on subclasses to enable or suppress joining + of certain association types + + + + + Used to detect circularities in the joined graph, note that + this method is side-effecty + + + + + Used to detect circularities in the joined graph, note that + this method is side-effecty + + + + + Should we join this association? + + + + + Generate a sequence of LEFT OUTER JOIN clauses for the given associations. + + + + + Count the number of instances of IJoinable which are actually + also instances of ILoadable, or are one-to-many associations + + + + + Count the number of instances of which + are actually also instances of + which are being fetched by outer join + + + + + Get the order by string required for collection fetching + + + + + Render the where condition for a (batch) load by identifier / collection key + + + + + Generate a select list of columns containing all properties of the entity classes + + + + + Uniquely identifier a foreign key, so that we don't + join it more than once, and create circularities + + + + + We can use an inner join for first many-to-many association + + + + + Loads a collection of values or a many-to-many association. + + + The collection persister must implement . For + other collections, create a customized subclass of + + + + + + Superclass for loaders that initialize collections + + + + + + + Implements logic for walking a tree of associated classes. + + + Generates an SQL select string containing all properties of those classes. + Tablse are joined using an ANSI-style left outer join. + + + + + An interface for collection loaders + + + + + + + Initialize the given collection + + + + + "Batch" loads collections, using multiple foreign key values in the SQL Where clause + + + + + + + Walker for one-to-many associations + + + + + + Loads one-to-many associations + + + The collection persister must implement . + For other collections, create a customized subclass of . + + + + + Implements subselect fetching for a collection + + + + Implements subselect fetching for a one to many association + + + + + A for queries. + + + + + + The superclass deliberately excludes collections + + + + + Don't bother with the discriminator, unless overridden by subclass + + + + + Use the discriminator, to narrow the select to instances + of the queried subclass, also applying any filters. + + + + + A Loader for queries. + + + Note that criteria + queries are more like multi-object Load()s than like HQL queries. + + + + + Get the names of the columns constrained + by this criterion. + + + + + Get the a typed value for the given property value. + + + + + Get the aliases of the columns constrained + by this criterion (for use in ORDER BY clause). + + + + Implements Hibernate's built-in support for native SQL queries. + This support is built on top of the notion of "custom queries"... + + + + Extension point allowing any SQL query with named and positional parameters + to be executed by Hibernate, returning managed entities, collections and + simple scalar values. + + + + The SQL query string to be performed. + + + + Any query spaces to apply to the query execution. Query spaces are + used in Hibernate's auto-flushing mechanism to determine which + entities need to be checked for pending changes. + + + + + A map representing positions within the supplied query to + which we need to bind named parameters. + + + Optional, may return null if no named parameters. + The structure of the returned map (if one) as follows: +
    +
  1. The keys into the map are the named parameter names
  2. +
  3. The corresponding value is either an if the + parameter occurs only once in the query; or a List of int if the + parameter occurs more than once
  4. +
+
+
+ + + A collection of descriptors describing the + ADO result set to be expected and how to map this result set. + + + + + Substitues ADO parameter placeholders (?) for all encountered + parameter specifications. It also tracks the positions of these + parameter specifications within the query string. This accounts for + ordinal-params, named-params, and ejb3-positional-params. + + The query string. + The SQL query with parameter substitution complete. + + + Spefically a fetch return that refers to a collection association. + + + Represents a return which names a fetched association. + + + Represents some non-scalar (entity/collection) return within the query result. + + + Represents a return in a custom query. + + + Retrieves the return descriptor for the owner of this fetch. + + + The name of the property on the owner which represents this association. + + + + Represents a return which names a collection role; it + is used in defining a custom query for loading an entity's + collection in non-fetching scenarios (i.e., loading the collection + itself as the "root" of the result). + + + + Returns the class owning the collection. + + + Returns the name of the property representing the collection from the . + + + + that uses columnnames instead of generated aliases. + Aliases can still be overwritten via <return-property> + + + + + Type definition of CollectionAliases. + + + + + Returns the suffixed result-set column-aliases for columns making + up the key for this collection (i.e., its FK to its owner). + + The key result-set column aliases. + + + + Returns the suffixed result-set column-aliases for the columns + making up the collection's index (map or list). + + The index result-set column aliases. + + + + Returns the suffixed result-set column-aliases for the columns + making up the collection's elements. + + The element result-set column aliases. + + + + Returns the suffixed result-set column-aliases for the column + defining the collection's identifier (if any). + + The identifier result-set column aliases. + + + + Returns the suffix used to unique the column aliases for this + particular alias set. + + The uniqued column alias suffix. + + + + Returns the suffixed result-set column-aliases for columns making up the key for this collection (i.e., its FK to + its owner). + + The key result-set column aliases. + + + + Returns the suffixed result-set column-aliases for the columns making up the collection's index (map or list). + + The index result-set column aliases. + + + + Returns the suffixed result-set column-aliases for the columns making up the collection's elements. + + The element result-set column aliases. + + + + Returns the suffixed result-set column-aliases for the column defining the collection's identifier (if any). + + The identifier result-set column aliases. + + + + Returns the suffix used to unique the column aliases for this particular alias set. + + The uniqued column alias suffix. + + + + that chooses the column names over the alias names. + + + + + EntityAliases which handles the logic of selecting user provided aliases (via return-property), + before using the default aliases. + + + + + Metadata describing the SQL result set column aliases + for a particular entity + + + + + The result set column aliases for the property columns of a subclass + + + + + The result set column aliases for the primary key columns + + + + + The result set column aliases for the discriminator columns + + + + + The result set column aliases for the version columns + + + + + The result set column alias for the Oracle row id + + + + + The result set column aliases for the property columns + + + + + Calculate and cache select-clause suffixes. + + + + + Extension point for loaders which use a SQL result set with "unexpected" column aliases. + + + + Build a logical result row. + + Entity data defined as "root returns" and already handled by the normal Loader mechanism. + + The ADO result set (positioned at the row currently being processed). + Does this query have an associated . + The session from which the query request originated. + The logical result row + + At this point, Loader has already processed all non-scalar result data. We + just need to account for scalar result data here... + + + + + Encapsulates the metadata available from the database result set. + + + + + Initializes a new instance of the class. + + The result set. + + + + Gets the column count in the result set. + + The column count. + + + + Gets the (zero-based) position of the column with the specified name. + + Name of the column. + The column position. + + + + Gets the name of the column at the specified position. + + The (zero-based) position. + The column name. + + + + Gets the Hibernate type of the specified column. + + The column position. + The Hibernate type. + + + Specifically a fetch return that refers to an entity association. + + + + Represents a return which names a "root" entity. + + + A root entity means it is explicitly a "column" in the result, as opposed to + a fetched association. + + + + Represent a scalar (AKA simple value) return within a query result. + + + + Abstract superclass for entity loaders that use outer joins + + + + + Loads entities for a + + + + + Load an entity instance. If OptionalObject is supplied, load the entity + state into the given (uninitialized) object + + + + + "Batch" loads entities, using multiple primary key values in the + SQL where clause. + + + + + + A walker for loaders that fetch entities + + + + + + Disable outer join fetching if this loader obtains an + upgrade lock mode + + + + + Load an entity using outerjoin fetching to fetch associated entities. + + + The must implement . For other entities, + create a customized subclass of . + + + + + CollectionAliases which handles the logic of selecting user provided aliases (via return-property), + before using the default aliases. + + + + + Returns the suffixed result-set column-aliases for columns making up the key for this collection (i.e., its FK to + its owner). + + + + + Returns the suffixed result-set column-aliases for the columns making up the collection's index (map or list). + + + + + Returns the suffixed result-set column-aliases for the columns making up the collection's elements. + + + + + Returns the suffixed result-set column-aliases for the column defining the collection's identifier (if any). + + + + + Returns the suffix used to unique the column aliases for this particular alias set. + + + + + Get the position of the join with the given alias in the + list of joins + + + + + Convenience base class for AuxiliaryDatabaseObjects. + + + This implementation performs dialect scoping checks strictly based on + dialect name comparisons. Custom implementations might want to do + instanceof-type checks. + + + + + Auxiliary database objects (i.e., triggers, stored procedures, etc) defined + in the mappings. Allows Hibernate to manage their lifecycle as part of + creating/dropping the schema. + + + + + Operations to create/drop the mapping element in the database. + + + + + When implemented by a class, generates the SQL string to create + the mapping element in the database. + + The to use for SQL rules. + + + + + A string that contains the SQL to create an object. + + + + + When implemented by a class, generates the SQL string to drop + the mapping element from the database. + + The to use for SQL rules. + + + + A string that contains the SQL to drop an object. + + + + + Add the given dialect name to the scope of dialects to which + this database object applies. + + The name of a dialect. + + + + Does this database object apply to the given dialect? + + The dialect to check against. + True if this database object does apply to the given dialect. + + + + Gets called by NHibernate to pass the configured type parameters to the implementation. + + + + + A NHibernate any type. + + + Polymorphic association to one of several tables. + + + + + Any value that maps to columns. + + + + + Represents an identifying key of a table: the value for primary key + of an entity, or a foreign key of a collection or join table or + joined subclass table. + + + + + A value is anything that is persisted by value, instead of + by reference. It is essentially a Hibernate IType, together + with zero or more columns. Values are wrapped by things with + higher level semantics, for example properties, collections, + classes. + + + + + + + + + + Determines if the Value is part of a valid mapping. + + The to validate. + + if the Value is part of a valid mapping, + otherwise. + + + + Mainly used to make sure that Value maps to the correct number + of columns. + + + + + Gets the number of columns that this value spans in the table. + + + + + Gets an of objects + that this value is stored in. + + + + + Gets the to read/write the Values. + + + + + Gets the this Value is stored in. + + + + + Gets a indicating if this Value is unique. + + + + + Gets a indicating if this Value can have + null values. + + + + + Gets a indicating if this is a SimpleValue + that does not involve foreign keys. + + + + + Get or set the identifier type name + + + + + Get or set the metatype + + + + + Represent the relation between a meta-value and the related entityName + + + + + An array has a primary key consisting of the key columns + index column + + + + + A list has a primary key consisting of the key columns + index column + + + + + Indexed collections include IList, IDictionary, Arrays + and primitive Arrays. + + + + + Base class that stores the mapping information for <array>, <bag>, + <id-bag>, <list>, <map>, and <set> + collections. + + + Subclasses are responsible for the specialization required for the particular + collection style. + + + + + Any mapping with an outer-join attribute + + + + + Defines mapping elements to which filters may be applied. + + + + + Gets or sets a indicating if this is a + mapping for a generic collection. + + + if a collection from the System.Collections.Generic namespace + should be used, if a collection from the System.Collections + namespace should be used. + + + This has no affect on any versions of the .net framework before .net-2.0. + + + + + Gets or sets an array of that contains the arguments + needed to construct an instance of a closed type. + + + + + Initializes a new instance of the class. + + The that contains this list mapping. + + + + Gets the appropriate that is + specialized for this list mapping. + + + + + Mapping for a property of a .NET class (entity + or component). + + + + Common interface for things that can handle meta attributes. + + + + Retrieve the + + The attribute name + The if exists; null otherwise + + + + Meta-Attribute collection. + + + + + Gets the number of columns this property uses in the db. + + + + + Gets an of s. + + + + + Gets or Sets the name of the Property in the class. + + + + + + + + A bag permits duplicates, so it has no primary key + + + + + A bag permits duplicates, so it has no primary key. + + The that contains this bag mapping. + + + + Gets the appropriate that is + specialized for this bag mapping. + + + + + Represents the mapping to a column in a database. + + + + + Initializes a new instance of . + + + + + Initializes a new instance of . + + The name of the column. + + + + Gets the name of this Column in quoted form if it is necessary. + + + The that knows how to quote + the column name. + + + The column name in a form that is safe to use inside of a SQL statement. + Quoted if it needs to be, not quoted if it does not need to be. + + + + For any column name, generate an alias that is unique + to that column name, and also 10 characters or less + in length. + + + + Gets the name of the data type for the column. + + The to use to get the valid data types. + + + The name of the data type for the column. + + + If the mapping file contains a value of the attribute sql-type this will + return the string contained in that attribute. Otherwise it will use the + typename from the of the object. + + + + + Determines if this instance of and a specified object, + which must be a Column can be considered the same. + + An that should be a . + + if the name of this Column and the other Column are the same, + otherwise . + + + + + Determines if this instance of and the specified Column + can be considered the same. + + A to compare to this Column. + + if the name of this Column and the other Column are the same, + otherwise . + + + + + Returns the hash code for this instance. + + + + returns quoted name as it would be in the mapping file. + + + Shallow copy, the value is not copied + + + + Gets or sets the length of the datatype in the database. + + The length of the datatype in the database. + + + + Gets or sets the name of the column in the database. + + + The name of the column in the database. The get does + not return a Quoted column name. + + +

+ If a value is passed in that is wrapped by ` then + NHibernate will Quote the column whenever SQL is generated + for it. How the column is quoted depends on the Dialect. +

+

+ The value returned by the getter is not Quoted. To get the + column name in quoted form use . +

+
+
+ + + Gets or sets if the column can have null values in it. + + if the column can have a null value in it. + + + + Gets or sets the index of the column in the . + + + The index of the column in the . + + + + + Gets or sets if the column contains unique values. + + if the column contains unique values. + + + + Gets or sets the sql data type name of the column. + + + The sql data type name of the column. + + + This is usually read from the sql-type attribute. + + + + + Gets or sets if the column needs to be quoted in SQL statements. + + if the column is quoted. + + + + Gets or sets whether the column is unique. + + + + + Gets or sets a check constraint on the column + + + + + Do we have a check constraint? + + + + + The underlying columns SqlType. + + + If null, it is because the sqltype code is unknown. + + Use to retreive the sqltypecode used + for the columns associated Value/Type. + + + + + The mapping for a component, composite element, composite identifier, + etc. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Base class for relational constraints in the database. + + + + + Adds the to the of + Columns that are part of the constraint. + + The to include in the Constraint. + + + + Generates the SQL string to drop this Constraint in the database. + + The to use for SQL rules. + + + + A string that contains the SQL to drop this Constraint. + + + + + Generates the SQL string to create this Constraint in the database. + + The to use for SQL rules. + + + + + A string that contains the SQL to create this Constraint. + + + + + When implemented by a class, generates the SQL string to create the named + Constraint in the database. + + The to use for SQL rules. + The name to use as the identifier of the constraint in the database. + + + + A string that contains the SQL to create the named Constraint. + + + + + Gets or sets the Name used to identify the constraint in the database. + + The Name used to identify the constraint in the database. + + + + Gets an of objects that are part of the constraint. + + + An of objects that are part of the constraint. + + + + + Gets the number of columns that this Constraint contains. + + + The number of columns that this Constraint contains. + + + + + Gets or sets the this Constraint is in. + + + The this Constraint is in. + + + + + Represents a Table in a database that an object gets mapped against. + + + + + Initializes a new instance of . + + + + + Generates the SQL string to create this Table in the database. + + The to use for SQL rules. + + + + + A string that contains the SQL to create this Table, Primary Key Constraints + , and Unique Key Constraints. + + + + + Generates the SQL string to drop this Table in the database. + + The to use for SQL rules. + + + + A string that contains the SQL to drop this Table and to cascade the drop to + the constraints if the database supports it. + + + + + Gets the schema qualified name of the Table. + + The that knows how to Quote the Table name. + The name of the table qualified with the schema if one is specified. + + + + Gets the schema qualified name of the Table using the specified qualifier + + The that knows how to Quote the Table name. + The catalog name. + The schema name. + A String representing the Qualified name. + If this were used with MSSQL it would return a dbo.table_name. + + + returns quoted name as it would be in the mapping file. + + + + Gets the name of this Table in quoted form if it is necessary. + + + The that knows how to quote the Table name. + + + The Table name in a form that is safe to use inside of a SQL statement. + Quoted if it needs to be, not quoted if it does not need to be. + + + + returns quoted name as it is in the mapping file. + + + + Gets the schema for this table in quoted form if it is necessary. + + + The that knows how to quote the table name. + + + The schema name for this table in a form that is safe to use inside + of a SQL statement. Quoted if it needs to be, not quoted if it does not need to be. + + + + + Gets the at the specified index. + + The index of the Column to get. + + The at the specified index. + + + + + Adds the to the of + Columns that are part of the Table. + + The to include in the Table. + + + + Gets the identified by the name. + + The name of the to get. + + The identified by the name. If the + identified by the name does not exist then it is created. + + + + + Gets the identified by the name. + + The name of the to get. + + The identified by the name. If the + identified by the name does not exist then it is created. + + + + + Create a for the columns in the Table. + + + An of objects. + + + + A for the columns in the Table. + + + This does not necessarily create a , if + one already exists for the columns then it will return an + existing . + + + + + Generates a unique string for an of + objects. + + An of objects. + + An unique string for the objects. + + + + + Sets the Identifier of the Table. + + The that represents the Identifier. + + + + + + + + + Return the column which is identified by column provided as argument. + column with atleast a name. + + The underlying column or null if not inside this table. + Note: the instance *can* be different than the input parameter, but the name will be the same. + + + + + Gets or sets the name of the Table in the database. + + + The name of the Table in the database. The get does + not return a Quoted Table name. + + +

+ If a value is passed in that is wrapped by ` then + NHibernate will Quote the Table whenever SQL is generated + for it. How the Table is quoted depends on the Dialect. +

+

+ The value returned by the getter is not Quoted. To get the + column name in quoted form use . +

+
+
+ + + Gets the number of columns that this Table contains. + + + The number of columns that this Table contains. + + + + + Gets an of objects that + are part of the Table. + + + An of objects that are + part of the Table. + + + + + Gets an of objects that + are part of the Table. + + + An of objects that are + part of the Table. + + + + + Gets an of objects that + are part of the Table. + + + An of objects that are + part of the Table. + + + + + Gets an of objects that + are part of the Table. + + + An of objects that are + part of the Table. + + + + + Gets or sets the of the Table. + + The of the Table. + + + + Gets or sets the schema the table is in. + + + The schema the table is in or if no schema is specified. + + + + + Gets the unique number of the Table. + + The unique number of the Table. + + + + Gets or sets if the column needs to be quoted in SQL statements. + + if the column is quoted. + + + + A value which is "typed" by reference to some other value + (for example, a foreign key is typed by the referenced primary key). + + + + + A Foreign Key constraint in the database. + + + + + Generates the SQL string to create the named Foreign Key Constraint in the database. + + The to use for SQL rules. + The name to use as the identifier of the constraint in the database. + + + + A string that contains the SQL to create the named Foreign Key Constraint. + + + + + Get the SQL string to drop this Constraint in the database. + + The to use for SQL rules. + + + + A string that contains the SQL to drop this Constraint. + + + + + Validates that columnspan of the foreignkey and the primarykey is the same. + Furthermore it aligns the length of the underlying tables columns. + + + + + Gets or sets the that the Foreign Key is referencing. + + The the Foreign Key is referencing. + + Thrown when the number of columns in this Foreign Key is not the same + amount of columns as the Primary Key in the ReferencedTable. + + + + Does this foreignkey reference the primary key of the reference table + + + + A formula is a derived column value. + + + + + + + + + + + + + + + + + + + An PersistentIdentifierBag has a primary key consistenting of just + the identifier column. + + + + + A collection with a synthetic "identifier" column. + + + + + + + + + + + + + + + + + + + + + + + + + + An Index in the database. + + + + + Generates the SQL string to create this Index in the database. + + The to use for SQL rules. + + + + + A string that contains the SQL to create this Index. + + + + + Generates the SQL string to drop this Index in the database. + + The to use for SQL rules. + + + + A string that contains the SQL to drop this Index. + + + + + Adds the to the of + Columns that are part of the Index. + + The to include in the Index. + + + + Gets or sets the this Index is in. + + + The this Index is in. + + + + + Gets an of objects that are + part of the Index. + + + An of objects that are + part of the Index. + + + + + Gets or sets the Name used to identify the Index in the database. + + The Name used to identify the Index in the database. + + + + Declaration of a System.Type mapped with the <subclass> or + <joined-subclass> element. + + + + + Base class for the mapped by <class> and a + that is mapped by <subclass> or + <joined-subclass>. + + + + + + + + + + + Adds a to the class hierarchy. + + The to add to the hierarchy. + + + + Change the property definition or add a new property definition + + The to add. + + + + Adds a that is implemented by a subclass. + + The implemented by a subclass. + + + + Adds a that a subclass is stored in. + + The the subclass is stored in. + + + + Creates the for the + this type is persisted in. + + The that is used to Alias columns. + + + + Given a property path, locate the appropriate referenceable property reference. + + + A referenceable property is a property which can be a target of a foreign-key + mapping (an identifier or explicitly named in a property-ref). + + The property path to resolve into a property reference. + The property reference (never null). + If the property could not be found. + + + + + + + + + + Gets the that is being mapped. + + The that is being mapped. + + The value of this is set by the name attribute on the <class> + element. + + + + + Gets or sets the to use as a Proxy. + + The to use as a Proxy. + + The value of this is set by the proxy attribute. + + + + + Gets or Sets if the Insert Sql is built dynamically. + + if the Sql is built at runtime. + + The value of this is set by the dynamic-insert attribute. + + + + + Gets or Sets if the Update Sql is built dynamically. + + if the Sql is built at runtime. + + The value of this is set by the dynamic-update attribute. + + + + + Gets or Sets the value to use as the discriminator for the Class. + + + A value that distinguishes this subclass in the database. + + + The value of this is set by the discriminator-value attribute. Each <subclass> + in a hierarchy must define a unique discriminator-value. The default value + is the class name if no value is supplied. + + + + + Gets the number of subclasses that inherit either directly or indirectly. + + The number of subclasses that inherit from this PersistentClass. + + + + Iterate over subclasses in a special 'order', most derived subclasses first. + + + It will recursively go through Subclasses so that if a SubclassType has Subclasses + it will pick those up also. + + + + + Gets an of objects + that directly inherit from this PersistentClass. + + + An of objects + that directly inherit from this PersistentClass. + + + + + When implemented by a class, gets a boolean indicating if this + mapped class is inherited from another. + + + if this class is a subclass or joined-subclass + that inherited from another class. + + + + + When implemented by a class, gets a boolean indicating if the mapped class + has a version property. + + if there is a <version> property. + + + + When implemented by a class, gets an + of objects that this mapped class contains. + + + An of objects that + this mapped class contains. + + + This is all of the properties of this mapped class and each mapped class that + it is inheriting from. + + + + + When implemented by a class, gets an + of objects that this mapped class reads from + and writes to. + + + An of objects that + this mapped class reads from and writes to. + + + This is all of the tables of this mapped class and each mapped class that + it is inheriting from. + + + + + Gets an of objects that + this mapped class contains and that all of its subclasses contain. + + + An of objects that + this mapped class contains and that all of its subclasses contain. + + + + + Gets an of all of the objects that the + subclass finds its information in. + + An of objects. + It adds the TableClosureIterator and the subclassTables into the IEnumerable. + + + + When implemented by a class, gets or sets the of the Persister. + + + + + When implemented by a class, gets the of the class + that is mapped in the class element. + + + The of the class that is mapped in the class element. + + + + + + + + + + + + + + + Build a collection of properties which are "referenceable". + + + See for a discussion of "referenceable". + + + + + + + + + + + + + + + Build an iterator over the properties defined on this class. The returned + iterator only accounts for "normal" properties (i.e. non-identifier + properties). + + + An of objects. + + + Differs from in that the iterator + we return here will include properties defined as part of a join. + + + + + Build an enumerable over the properties defined on this class which + are not defined as part of a join. + As with the returned iterator only accounts + for non-identifier properties. + + An enumerable over the non-joined "normal" properties. + + + + + + + + + Gets a boolean indicating if this PersistentClass has any subclasses. + + if this PeristentClass has any subclasses. + + + + Gets or Sets the that this class is stored in. + + The this class is stored in. + + The value of this is set by the table attribute. + + + + + When implemented by a class, gets or set a boolean indicating + if the mapped class has properties that can be changed. + + if the object is mutable. + + The value of this is set by the mutable attribute. + + + + + When implemented by a class, gets a boolean indicating + if the mapped class has a Property for the id. + + if there is a Property for the id. + + + + When implemented by a class, gets or sets the + that is used as the id. + + + The that is used as the id. + + + + + When implemented by a class, gets or sets the + that contains information about the identifier. + + The that contains information about the identifier. + + + + When implemented by a class, gets or sets the + that is used as the version. + + The that is used as the version. + + + + When implemented by a class, gets or sets the + that contains information about the discriminator. + + The that contains information about the discriminator. + + + + When implemented by a class, gets or sets if the mapped class has subclasses or is + a subclass. + + + if the mapped class has subclasses or is a subclass. + + + + + When implemented by a class, gets or sets the CacheConcurrencyStrategy + to use to read/write instances of the persistent class to the Cache. + + The CacheConcurrencyStrategy used with the Cache. + + + + When implemented by a class, gets or sets the + that this mapped class is extending. + + + The that this mapped class is extending. + + + + + When implemented by a class, gets or sets a boolean indicating if + explicit polymorphism should be used in Queries. + + + if only classes queried on should be returned, + if any class in the heirarchy should implicitly be returned. + + The value of this is set by the polymorphism attribute. + + + + + + + + + + When implemented by a class, gets or sets a boolean indicating if the identifier is + embedded in the class. + + if the class identifies itself. + + An embedded identifier is true when using a composite-id specifying + properties of the class as the key-property instead of using a class + as the composite-id. + + + + + When implemented by a class, gets the of the class + that is mapped in the class element. + + + The of the class that is mapped in the class element. + + + + + When implemented by a class, gets or sets the + that contains information about the Key. + + The that contains information about the Key. + + + + When implemented by a class, gets or sets the sql string that should + be a part of the where clause. + + + The sql string that should be a part of the where clause. + + + The value of this is set by the where attribute. + + + + + Gets or sets a boolean indicating if only values in the discriminator column that + are mapped will be included in the sql. + + if the mapped discriminator values should be forced. + + The value of this is set by the force attribute on the discriminator element. + + + + + Initializes a new instance of the class. + + The that is the superclass. + + + + Add the to this PersistentClass. + + The to add. + + This also adds the to the Superclass' collection + of SubclassType Properties. + + + + + Adds a that is implemented by a subclass. + + The implemented by a subclass. + + This also adds the to the Superclass' collection + of SubclassType Properties. + + + + + Adds a that a subclass is stored in. + + The the subclass is stored in. + + This also adds the to the Superclass' collection + of SubclassType Tables. + + + + + + + + + + Gets a boolean indicating if this mapped class is inherited from another. + + + because this is a SubclassType. + + + + + Gets an of objects that this mapped class contains. + + + An of objects that + this mapped class contains. + + + This is all of the properties of this mapped class and each mapped class that + it is inheriting from. + + + + + Gets an of objects that this + mapped class reads from and writes to. + + + An of objects that + this mapped class reads from and writes to. + + + This is all of the tables of this mapped class and each mapped class that + it is inheriting from. + + + + + Gets a boolean indicating if the mapped class has a version property. + + if for the Superclass there is a Property for a version. + + + + + + + + + Gets the of the class + that is mapped in the class element. + + + The of the Superclass that is mapped in the class element. + + + + + + + + + + Gets or sets the CacheConcurrencyStrategy + to use to read/write instances of the persistent class to the Cache. + + The CacheConcurrencyStrategy used with the Cache. + + + + Gets the of the class that is mapped in the class element. + + + The of the Superclass that is mapped in the class element. + + + + + Gets or sets the that this mapped class is extending. + + + The that this mapped class is extending. + + + + + Gets or sets the that is used as the id. + + + The from the Superclass that is used as the id. + + + + + Gets or sets the that contains information about the identifier. + + The from the Superclass that contains information about the identifier. + + + + Gets a boolean indicating if the mapped class has a Property for the id. + + if in the Superclass there is a Property for the id. + + + + Gets or sets the that contains information about the discriminator. + + The from the Superclass that contains information about the discriminator. + + + + Gets or set a boolean indicating if the mapped class has properties that can be changed. + + if the Superclass is mutable. + + + + Gets or sets if the mapped class is a subclass. + + + since this mapped class is a subclass. + + + The setter should not be used to set the value to anything but . + + + + + Gets or sets the that is used as the version. + + The from the Superclass that is used as the version. + + + + Gets or sets a boolean indicating if the identifier is + embedded in the class. + + if the Superclass has an embedded identifier. + + An embedded identifier is true when using a composite-id specifying + properties of the class as the key-property instead of using a class + as the composite-id. + + + + + Gets or sets the that contains information about the Key. + + The that contains information about the Key. + + + + Gets or sets a boolean indicating if explicit polymorphism should be used in Queries. + + + The value of the Superclasses IsExplicitPolymorphism property. + + + + + Gets the sql string that should be a part of the where clause. + + + The sql string that should be a part of the where clause. + + + Thrown when the setter is called. The where clause can not be set on the + SubclassType, only the RootClass. + + + + + Gets or Sets the that this class is stored in. + + The this class is stored in. + + This also adds the to the Superclass' collection + of SubclassType Tables. + + + + + + + + + A many-to-one association mapping + + + + A simple-point association (ie. a reference to another entity). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A map has a primary key consisting of the key columns + + index columns. + + + + + Initializes a new instance of the class. + + The that contains this map mapping. + + + + Gets the appropriate that is + specialized for this list mapping. + + + + + A meta attribute is a named value or values. + + + + + A mapping for a one-to-many association. + + + + + + + + + + No foreign key element for a one-to-many + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A mapping for a one-to-one association. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A Primary Key constraint in the database. + + + + + Generates the SQL string to create the Primary Key Constraint in the database. + + The to use for SQL rules. + + + A string that contains the SQL to create the Primary Key Constraint. + + + + + Generates the SQL string to create the named Primary Key Constraint in the database. + + The to use for SQL rules. + The name to use as the identifier of the constraint in the database. + + + + A string that contains the SQL to create the named Primary Key Constraint. + + + + + Get the SQL string to drop this Constraint in the database. + + The to use for SQL rules. + + + + A string that contains the SQL to drop this Constraint. + + + + + A primitive array has a primary key consisting + of the key columns + index column. + + + + + Indicates whether given properties are generated by the database and, if + so, at what time(s) they are generated. + + + + + Values for this property are never generated by the database. + + + + + Values for this property are generated by the database on insert. + + + + + Values for this property are generated by the database on both insert and update. + + + + + Declaration of a System.Type mapped with the <class> element that + is the root class of a table-per-subclass, or table-per-concrete-class + inheritance heirarchy. + + + + + The default name of the column for the Identifier + + id is the default column name for the Identifier. + + + + The default name of the column for the Discriminator + + class is the default column name for the Discriminator. + + + + Adds a to the class hierarchy. + + The to add to the hierarchy. + + When a is added this mapped class has the property + set to . + + + + + + + + + + + Gets a boolean indicating if this mapped class is inherited from another. + + + because this is the root mapped class. + + + + + Gets an of objects that this mapped class contains. + + + An of objects that + this mapped class contains. + + + + + Gets an of objects that this + mapped class reads from and writes to. + + + An of objects that + this mapped class reads from and writes to. + + + There is only one in the since + this is the root class. + + + + + Gets a boolean indicating if the mapped class has a version property. + + if there is a Property for a version. + + + + Gets the of the class + that is mapped in the class element. + + + The of the class this mapped class. + + + + + Gets or sets a boolean indicating if the identifier is + embedded in the class. + + if the class identifies itself. + + An embedded identifier is true when using a composite-id specifying + properties of the class as the key-property instead of using a class + as the composite-id. + + + + + Gets or sets the cache region name. + + The region name used with the Cache. + + + + + + + + + Gets or sets the that is used as the id. + + + The that is used as the id. + + + + + Gets or sets the that contains information about the identifier. + + The that contains information about the identifier. + + + + Gets a boolean indicating if the mapped class has a Property for the id. + + if there is a Property for the id. + + + + Gets or sets the that contains information about the discriminator. + + The that contains information about the discriminator. + + + + Gets or sets if the mapped class has subclasses. + + + if the mapped class has subclasses. + + + + + Gets the of the class that is mapped in the class element. + + + this since this is the root mapped class. + + + + + Gets or sets a boolean indicating if explicit polymorphism should be used in Queries. + + + if only classes queried on should be returned, + if any class in the hierarchy should implicitly be returned. + + + + + Gets or sets the that is used as the version. + + The that is used as the version. + + + + Gets or set a boolean indicating if the mapped class has properties that can be changed. + + if the object is mutable. + + + + Gets or sets the that this mapped class is extending. + + + since this is the root class. + + + Thrown when the setter is called. The Superclass can not be set on the + RootClass, only the SubclassType can have a Superclass set. + + + + + Gets or sets the that contains information about the Key. + + The that contains information about the Key. + + + + + + + + + Gets or sets a boolean indicating if only values in the discriminator column that + are mapped will be included in the sql. + + if the mapped discriminator values should be forced. + + + + Gets or sets the sql string that should be a part of the where clause. + + + The sql string that should be a part of the where clause. + + + + + Gets or sets the CacheConcurrencyStrategy + to use to read/write instances of the persistent class to the Cache. + + The CacheConcurrencyStrategy used with the Cache. + + + + A Set with no nullable element columns will have a primary + key consisting of all table columns (ie - key columns + + element columns). + + + + + A simple implementation of AbstractAuxiliaryDatabaseObject in which the CREATE and DROP strings are + provided up front. + + + Contains simple facilities for templating the catalog and schema + names into the provided strings. + This is the form created when the mapping documents use <create/> and <drop/>. + + + + Placeholder for typedef information + + + + An Unique Key constraint in the database. + + + + + Generates the SQL string to create the Unique Key Constraint in the database. + + The to use for SQL rules. + A string that contains the SQL to create the Unique Key Constraint. + + + + Generates the SQL string to create the Unique Key Constraint in the database. + + The to use for SQL rules. + + + + + A string that contains the SQL to create the Unique Key Constraint. + + + + + Get the SQL string to drop this Constraint in the database. + + The to use for SQL rules. + + + + A string that contains the SQL to drop this Constraint. + + + + + Exposes entity class metadata to the application + + + + + Get the type of a particular (named) property + + + Return the values of the mapped properties of the object + + + + The persistent class + + + + + Create a class instance initialized with the given identifier + + + + + Get the value of a particular (named) property + + + + Extract the property values from the given entity. + The entity from which to extract the property values. + The entity-mode of the given entity + The property values. + + + + Set the value of a particular (named) property + + + + + Set the given values to the mapped properties of the given object + + + + + Get the identifier of an instance (throw an exception if no identifier property) + + + + + Set the identifier of an instance (or do nothing if no identifier property) + + + + Does the class implement the interface? + + + Does the class implement the interface? + + + + Get the version number (or timestamp) from the object's version property + (or return null if not versioned) + + + + + The name of the entity + + + + + The name of the identifier property (or return null) + + + + + The names of the class' persistent properties + + + + + The identifier Hibernate type + + + + + The Hibernate types of the classes properties + + + + + Are instances of this class mutable? + + + + + Are instances of this class versioned by a timestamp or version number column? + + + + + Gets the index of the version property + + + + + Get the nullability of the class' persistent properties + + + + Get the "laziness" of the properties of this class + + + Which properties hold the natural id? + + + Does this entity extend a mapped superclass? + + + Does the class support dynamic proxies? + + + Does the class have an identifier property? + + + Does this entity declare a natural id? + + + Does this entity have mapped subclasses? + + + + Exposes collection metadata to the application + + + + + The collection key type + + + + + The collection element type + + + + + The collection index type (or null if the collection has no index) + + + + + Is the collection indexed? + + + + + The name of this collection role + + + + + Is the collection an array? + + + + + Is the collection a primitive array? + + + + + Is the collection lazily initialized? + + + + + An additional contract for parameters which originate from parameters explicitly encountered in the source statement + (HQL or native-SQL). + Author: Steve Ebersole + Ported by: Steve Strong + + + + + Maintains information relating to parameters which need to get bound into a + JDBC {@link PreparedStatement}. + Author: Steve Ebersole + Ported by: Steve Strong + + + + + Bind the appropriate value into the given statement at the specified position. + + The statement into which the value should be bound. + The defined values for the current query execution. + The session against which the current execution is occuring. + The position from which to start binding value(s). + The number of sql bind positions "eaten" by this bind operation. + + + + Render this parameter into displayable info (for logging, etc). + + The displayable info + + + + Get or set the type which we are expeting for a bind into this parameter based + on translated contextual information. + + + + + Retrieves the line number on which this parameter occurs in the source query. + + + + + Retrieves the column number (within the {@link #getSourceLine()}) where this parameter occurs. + + + + + Constructs an AbstractExplicitParameterSpecification. + + sourceLine + sourceColumn + + + + Creates a specialized collection-filter collection-key parameter spec. + + The collection role being filtered. + The mapped collection-key type. + The position within QueryParameters where we can find the appropriate param value to bind. + + + + Constructs a parameter specification for a particular filter parameter. + + The name of the filter + The name of the parameter + The paremeter type specified on the filter metadata + + + + Parameter bind specification for an explicit named parameter. + Author: Steve Ebersole + Ported by: Steve Strong + + + + + Constructs a named parameter bind specification. + + sourceLine + sourceColumn + The named parameter name. + + + + Bind the appropriate value into the given statement at the specified position. + + The statement into which the value should be bound. + The defined values for the current query execution. + The session against which the current execution is occuring. + The position from which to start binding value(s). + The number of sql bind positions "eaten" by this bind operation. + + + + Getter for property 'name'. + + + + + Defines the information available for parameters encountered during + query translation through the antlr-based parser. + Author: Steve Ebersole + Ported by: Steve Strong + + + + + Parameter bind specification for an explicit positional (or ordinal) parameter. + Author: Steve Ebersole + Ported by: Steve Strong + + + + + Constructs a position/ordinal parameter bind specification. + + sourceLine + sourceColumn + The position in the source query, relative to the other source positional parameters. + + + + Bind the appropriate value into the given statement at the specified position. + + The statement into which the value should be bound. + The defined values for the current query execution. + The session against which the current execution is occuring. + The position from which to start binding value(s). + The number of sql bind positions "eaten" by this bind operation. + + + + Getter for property 'hqlPosition'. + + + + + Summary description for AbstractCollectionPersister. + + + + + A collection role that may be queried or loaded by outer join. + + + + + Abstraction of all mappings that define properties: entities, collection elements. + + + + + Given a component path expression, get the type of the property + + + + + + + Given a component path expression, get the type of the property. + + + + true if a type was found, false if not + + + + Given a query alias and a property path, return the qualified column name + + + + + + + Given a property path, return the corresponding column name(s). + + + + Get the type of the thing containing the properties + + + + + Anything that can be loaded by outer join - namely persisters for classes or collections. + + + + + All columns to select, when loading. + + + + + Get the where clause part of any joins (optional operation) + + + + + + + + + Get the from clause part of any joins (optional operation) + + + + + + + + + Get the where clause filter, given a query alias and considering enabled session filters + + + + + Very, very, very ugly... + + Does this persister "consume" entity column aliases in the result + set? + + + + Very, very, very ugly... + + Does this persister "consume" collection column aliases in the result + set? + + + + An identifying name; a class name or collection role name. + + + + + The columns to join on. + + + + + Is this instance actually a ICollectionPersister? + + + + + The table to join to. + + + + + A strategy for persisting a collection role. + + + Defines a contract between the persistence strategy and the actual persistent collection framework + and session. Does not define operations that are required for querying collections, or loading by outer join. + + Implements persistence of a collection instance while the instance is + referenced in a particular role. + + This class is highly coupled to the + hierarchy, since double dispatch is used to load and update collection + elements. + + May be considered an immutable view of the mapping object + + + + + Initialize the given collection with the given key + + + + + + + Read the key from a row of the + + + + + Read the element from a row of the + + + + + Read the index from a row of the + + + + + Read the identifier from a row of the + + + + + Completely remove the persistent state of the collection + + + + + + + (Re)create the collection's persistent state + + + + + + + + Delete the persistent state of any elements that were removed from the collection + + + + + + + + Update the persistent state of any elements that were modified + + + + + + + + Insert the persistent state of any new collection elements + + + + + + + + Generates the collection's key column aliases, based on the given + suffix. + + The suffix to use in the key column alias generation. + The key column aliases. + + + + Generates the collection's index column aliases, based on the given + suffix. + + The suffix to use in the index column alias generation. + The index column aliases, or null if not indexed. + + + + Generates the collection's element column aliases, based on the given + suffix. + + The suffix to use in the element column alias generation. + The element column aliases. + + + + Generates the collection's identifier column aliases, based on the given + suffix. + + The suffix to use in the identifier column alias generation. + The identifier column aliases. + + + + Get the cache + + + + Get the cache structure + + + + Get the associated IType + + + + + Get the "key" type (the type of the foreign key) + + + + + Get the "index" type for a list or map (optional operation) + + + + + Get the "element" type + + + + + Return the element class of an array, or null otherwise + + + + + Is this an array or primitive values? + + + + + Is this an array? + + + + Is this a one-to-many association? + + + + Is this a many-to-many association? Note that this is mainly + a convenience feature as the single persister does not + contain all the information needed to handle a many-to-many + itself, as internally it is looked at as two many-to-ones. + + + + + Is this collection lazily initialized? + + + + + Is this collection "inverse", so state changes are not propogated to the database. + + + + + Get the name of this collection role (the fully qualified class name, extended by a "property path") + + + + Get the persister of the entity that "owns" this collection + + + + Get the surrogate key generation strategy (optional operation) + + + + + Get the type of the surrogate key + + + + Get the "space" that holds the persistent state + + + + Is cascade delete handled by the database-level + foreign key constraint definition? + + + + + Does this collection cause version increment of the owning entity? + + + + Can the elements of this collection change? + + + + Is this collection role cacheable + + + + + Is this an "indexed" collection? (list or map) + + + + + Does this collection implement "orphan delete"? + + + + + Is this an ordered collection? (An ordered collection is + ordered by the initialization operation, not by sorting + that happens in memory, as in the case of a sorted collection.) + + + + + Generate a list of collection index and element columns + + + + + Get the names of the collection index columns if + this is an indexed collection (optional operation), + aliased by the given table alias + + + + + Get the names of the collection element columns (or the primary + key columns in the case of a one-to-many association), + aliased by the given table alias + + + + + Get the extra where clause filter SQL + + + + + + + Get the order by SQL + + + + + + + Get the order-by to be applied at the target table of a many to many + + The alias for the many-to-many target table + Appropriate order-by fragment or empty string. + + + + Get the index formulas if this is an indexed collection + (optional operation) + + + + + Get the persister of the element class, if this is a + collection of entities (optional operation). Note that + for a one-to-many association, the returned persister + must be OuterJoinLoadable. + + + + + Should we load this collection role by outer joining? + + + + + Get the names of the collection index columns if this is an indexed collection (optional operation) + + + + + Get the names of the collection element columns (or the primary key columns in the case of a one-to-many association) + + + + + Does this collection role have a where clause filter? + + + + + Reads the Element from the IDataReader. The IDataReader will probably only contain + the id of the Element. + + See ReadElementIdentifier for an explanation of why this method will be depreciated. + + + + Perform an SQL INSERT, and then retrieve a generated identifier. + + the id of the collection entry + + This form is used for PostInsertIdentifierGenerator-style ids (IDENTITY, select, etc). + + + + + Return the element class of an array, or null otherwise + + + + + Get the name of this collection role (the fully qualified class name, + extended by a "property path") + + + + + Collection persister for collections of values and many-to-many associations. + + + + + Generate the SQL DELETE that deletes all rows + + + + + + Generate the SQL INSERT that creates a new row + + + + + + Generate the SQL UPDATE that updates a row + + + + + + Generate the SQL DELETE that deletes a particular row + + + + + + Create the + + + + + Summary description for CollectionPropertyMapping. + + + + + The names of all the collection properties. + + + + + Summary description for CompositeElementPropertyMapping. + + + + + Base implementation of a PropertyMapping. + + + + + Summary description for ElementPropertyMapping. + + + + + Summary description for OneToManyPersister. + + + + + Generate the SQL UPDATE that updates all the foreign keys to null + + + + + + Generate the SQL UPDATE that updates a foreign key to a value + + + + + + Not needed for one-to-many association + + + + + + Generate the SQL UPDATE that updates a particular row's foreign + key to null + + + + + + Create the + + + + + Superclass for built-in mapping strategies. Implements functionalty common to both mapping + strategies + + + May be considered an immutable view of the mapping object + + + + + A ClassPersister that may be loaded by outer join using + the OuterJoinLoader hierarchy and may be an element + of a one-to-many association. + + + + + Implemented by ClassPersister that uses Loader. There are several optional + operations used only by loaders that inherit OuterJoinLoader + + + + + Concrete IEntityPersisters implement mapping and persistence logic for a particular class. + + + Implementors must be threadsafe (preferably immutable) and must provide a constructor of type + matching the signature of: (PersistentClass, SessionFactoryImplementor) + + + + + Finish the initialization of this object, once all ClassPersisters have been + instantiated. Called only once, before any other method. + + + + + Determine whether the given name represents a subclass entity + (or this entity itself) of the entity mapped by this persister. + + The entity name to be checked. + + True if the given entity name represents either the entity mapped by this persister or one of its subclass entities; + false otherwise. + + + + + Get the type of a particular property + + + + + + Locate the property-indices of all properties considered to be dirty. + The current state of the entity (the state to be checked). + The previous state of the entity (the state to be checked against). + The entity for which we are checking state dirtiness. + The session in which the check is ccurring. + or the indices of the dirty properties + + + Locate the property-indices of all properties considered to be dirty. + The old state of the entity. + The current state of the entity. + The entity for which we are checking state modification. + The session in which the check is ccurring. + return or the indicies of the modified properties + + + + Retrieve the current state of the natural-id properties from the database. + + + The identifier of the entity for which to retrieve the naturak-id values. + + + The session from which the request originated. + + The natural-id snapshot. + + + + Load an instance of the persistent class. + + + + + Do a version check (optional operation) + + + + + Persist an instance + + + + + Persist an instance, using a natively generated identifier (optional operation) + + + + + Delete a persistent instance + + + + + Update a persistent instance + + The id. + The fields. + The dirty fields. + if set to [has dirty collection]. + The old fields. + The old version. + The obj. + The rowId + The session. + + + + Get the current database state of the object, in a "hydrated" form, without resolving identifiers + + + + if select-before-update is not enabled or not supported + + + + Get the current version of the object, or return null if there is no row for + the given identifier. In the case of unversioned data, return any object + if the row exists. + + + + + + + Try to discover the entity mode from the entity instance + + + Has the class actually been bytecode instrumented? + + + Called just after the entities properties have been initialized + + + Called just after the entity has been reassociated with the session + + + + Create a new proxy instance + + + + + + + Is this a new transient instance? + + + Return the values of the insertable properties of the object (including backrefs) + + + + Perform a select to retrieve the values of any generated properties + back from the database, injecting these generated values into the + given entity as well as writing this state to the persistence context. + + + Note, that because we update the persistence context here, callers + need to take care that they have already written the initial snapshot + to the persistence context before calling this method. + + The entity's id value. + The entity for which to get the state. + The entity state (at the time of Save). + The session. + + + + Perform a select to retrieve the values of any generated properties + back from the database, injecting these generated values into the + given entity as well as writing this state to the persistence context. + + + Note, that because we update the persistence context here, callers + need to take care that they have already written the initial snapshot + to the persistence context before calling this method. + + The entity's id value. + The entity for which to get the state. + The entity state (at the time of Save). + The session. + + + + The persistent class, or null + + + + + Does the class implement the ILifecycle inteface? + + + + + Does the class implement the IValidatable interface? + + + + + Get the proxy interface that instances of this concrete class will be cast to + + + + + Set the given values to the mapped properties of the given object + + + + + Set the value of a particular property + + + + + Return the values of the mapped properties of the object + + + + + Get the value of a particular property + + + + + Get the value of a particular property + + + + + Get the identifier of an instance ( throw an exception if no identifier property) + + + + + Set the identifier of an instance (or do nothing if no identifier property) + + The object to set the Id property on. + The value to set the Id property to. + The EntityMode + + + + Get the version number (or timestamp) from the object's version property (or return null if not versioned) + + + + + Create a class instance initialized with the given identifier + + + + + Determines whether the specified entity is an instance of the class + managed by this persister. + + The entity. + The EntityMode + + if the specified entity is an instance; otherwise, . + + + + Does the given instance have any uninitialized lazy properties? + + + + Set the identifier and version of the given instance back + to its "unsaved" value, returning the id + + + + Get the persister for an instance of this class or a subclass + + + + Check the version value trough . + + The snapshot entity state + The result of . + NHibernate-specific feature, not present in H3.2 + + + + The ISessionFactory to which this persister "belongs". + + + + + Returns an object that identifies the space in which identifiers of + this entity hierarchy are unique. + + + + + The entity name which this persister maps. + + + + + Retrieve the underlying entity metamodel instance... + + The metamodel + + + + Returns an array of objects that identify spaces in which properties of + this entity are persisted, for instances of this class only. + + The property spaces. + + For most implementations, this returns the complete set of table names + to which instances of the mapped entity are persisted (not accounting + for superclass entity mappings). + + + + + Returns an array of objects that identify spaces in which properties of + this entity are persisted, for instances of this class and its subclasses. + + + Much like , except that here we include subclass + entity spaces. + + The query spaces. + + + + Are instances of this class mutable? + + + + + Determine whether the entity is inherited one or more other entities. + In other words, is this entity a subclass of other entities. + + True if other entities extend this entity; false otherwise. + + + + Is the identifier assigned before the insert by an IDGenerator or is it returned + by the Insert() method? + + + This determines which form of Insert() will be called. + + + + + Are instances of this class versioned by a timestamp or version number column? + + + + + Get the type of versioning (optional operation) + + + + + Which property holds the version number? (optional operation) + + + + + If the entity defines a natural id (), which + properties make up the natural id. + + + The indices of the properties making of the natural id; or + null, if no natural id is defined. + + + + + Return the IIdentifierGenerator for the class + + + + + Get the Hibernate types of the class properties + + + + + Get the names of the class properties - doesn't have to be the names of the actual + .NET properties (used for XML generation only) + + + + + Gets if the Property is insertable. + + if the Property's value can be inserted. + + This is for formula columns and if the user sets the insert attribute on the <property> element. + + + + Which of the properties of this class are database generated values on insert? + + + Which of the properties of this class are database generated values on update? + + + + Properties that may be dirty (and thus should be dirty-checked). These + include all updatable properties and some associations. + + + + + Get the nullability of the properties of this class + + + + + Get the "versionability" of the properties of this class (is the property optimistic-locked) + + if the property is optimistic-locked; otherwise, . + + + + Get the cascade styles of the properties (optional operation) + + + + + Get the identifier type + + + + + Get the name of the indentifier property (or return null) - need not return the + name of an actual .NET property + + + + + Should we always invalidate the cache instead of recaching updated state + + + + + Should lazy properties of this entity be cached? + + + + + Get the cache (optional operation) + + + + Get the cache structure + + + + Get the user-visible metadata for the class (optional operation) + + + + + Is batch loading enabled? + + + + Is select snapshot before update enabled? + + + + Does this entity contain a version property that is defined + to be database generated? + + + + + Does this class support dynamic proxies? + + + + + Do instances of this class contain collections? + + + + + Determine whether any properties of this entity are considered mutable. + + + True if any properties of the entity are mutable; false otherwise (meaning none are). + + + + + Determine whether this entity contains references to persistent collections + which are fetchable by subselect? + + + True if the entity contains collections fetchable by subselect; false otherwise. + + + + + Does this class declare any cascading save/update/deletes? + + + + + Does the class have a property holding the identifier value? + + + + + Determine whether detahced instances of this entity carry their own + identifier value. + + + True if either (1) or + (2) the identifier is an embedded composite identifier; false otherwise. + + + The other option is the deprecated feature where users could supply + the id during session calls. + + + + + Determine whether this entity defines a natural identifier. + + True if the entity defines a natural id; false otherwise. + + + + Determine whether this entity defines any lazy properties (ala + bytecode instrumentation). + + + True if the entity has properties mapped as lazy; false otherwise. + + + + + Gets if the Property is updatable + + if the Property's value can be updated. + + This is for formula columns and if the user sets the update attribute on the <property> element. + + + + + Does this class have a cache? + + + + + Does this entity define any properties as being database-generated on insert? + + + + + Does this entity define any properties as being database-generated on update? + + + + + Get the concrete subclass corresponding to the given discriminator value + + + + + Get the result set aliases used for the identifier columns, given a suffix + + + + + Get the result set aliases used for the property columns, given a suffix (properties of this class, only). + + + + + Get the result set column names mapped for this property (properties of this class, only). + + + + + Get the alias used for the discriminator column, given a suffix + + + + + Retrieve property values from one row of a result set + + + + + The discriminator type + + + + + Get the names of columns used to persist the identifier + + + + + Get the name of the column used as a discriminator + + + + + Does the persistent class have subclasses? + + + + Does the result set contain rowids? + + + + Generate a list of collection index and element columns + + + + + + + + How many properties are there, for this class and all subclasses? (optional operation) + + + + + + May this property be fetched using an SQL outerjoin? + + + + + + + Get the cascade style of this (subclass closure) property + + + + + Is this property defined on a subclass of the mapped class? + + + + + + + Get an array of the types of all properties of all subclasses (optional operation) + + + + + + + Get the name of the numbered property of the class or a subclass + (optional operation) + + + + + + + Is the numbered property of the class of subclass nullable? + + + + + Return the column names used to persist all properties of all sublasses of the persistent class + (optional operation) + + + + + Return the table name used to persist the numbered property of + the class or a subclass + (optional operation) + + + + + Given the number of a property of a subclass, and a table alias, return the aliased column names + (optional operation) + + + + + + + + Get the main from table fragment, given a query alias (optional operation) + + + + + + + Get the column names for the given property path + + + + + Get the table name for the given property path + + + + + Return the alised identifier column names + + + + + Extends the generic ILoadable contract to add operations required by HQL + + + + + Given a query alias and an identifying suffix, render the intentifier select fragment. + + + + + + + + Given a query alias and an identifying suffix, render the property select fragment. + + + + + Given a property name, determine the number of the table which contains the column + to which this property is mapped. + + The name of the property. + The number of the table to which the property is mapped. + + Note that this is not relative to the results from {@link #getConstraintOrderedTableNameClosure()}. + It is relative to the subclass table name closure maintained internal to the persister (yick!). + It is also relative to the indexing used to resolve {@link #getSubclassTableName}... + + + + Determine whether the given property is declared by our + mapped class, our super class, or one of our subclasses... +

+ Note: the method is called 'subclass property...' simply + for consistency sake (e.g. {@link #getSubclassPropertyTableNumber} +

+ The property name. + The property declarer +
+ + + Get the name of the table with the given index from the internal array. + + The index into the internal array. + + + + + The alias used for any filter conditions (mapped where-fragments or + enabled-filters). + + The root alias + The alias used for "filter conditions" within the where clause. + + This may or may not be different from the root alias depending upon the + inheritance mapping strategy. + + + + + Is this class explicit polymorphism only? + + + + + The class that this class is mapped as a subclass of - not necessarily the direct superclass + + + + + The discriminator value for this particular concrete subclass, as a string that may be + embedded in a select statement + + + + + The discriminator value for this particular concrete subclass + + The DiscriminatorValue is specific of NH since we are using strongly typed parameters for SQL query. + + + + Is the inheritance hierarchy described by this persister contained across + multiple tables? + + True if the inheritance hierarchy is spread across multiple tables; false otherwise. + + + + Get the names of all tables used in the hierarchy (up and down) ordered such + that deletes in the given order would not cause constraint violations. + + The ordered array of table names. + + + + For each table specified in , get + the columns that define the key between the various hierarchy classes. + + + The first dimension here corresponds to the table indexes returned in + . + + The second dimension should have the same length across all the elements in + the first dimension. If not, that'd be a problem ;) + + + + + Get the name of the temporary table to be used to (potentially) store id values + when performing bulk update/deletes. + + The appropriate temporary table name. + + + + Get the appropriate DDL command for generating the temporary table to + be used to (potentially) store id values when performing bulk update/deletes. + + The appropriate temporary table creation command. + + + Is the version property included in insert statements? + + + + Describes a class that may be loaded via a unique key. + + + + + Load an instance of the persistent class, by a unique key other than the primary key. + + + + + Get the property number of the unique key property + + + + + A class persister that supports queries expressed in the platform native SQL dialect. + + + + + Returns the column alias names used to persist/query the numbered property of the class or a subclass (optional operation). + + + + + Return the column names used to persist/query the named property of the class or a subclass (optional operation). + + + + + All columns to select, when loading. + + + + + Get the type + + + + + Contract for things that can be locked via a . + + + Currently only the root table gets locked, except for the case of HQL and Criteria queries + against dialects which do not support either (1) FOR UPDATE OF or (2) support hint locking + (in which case *all* queried tables would be locked). + + + + + Get the SQL alias this persister would use for the root table + given the passed driving alias. + + + The driving alias; or the alias for the table mapped by this persister in the hierarchy. + + The root table alias. + + + + Locks are always applied to the "root table". + + + + + Get the names of columns on the root table used to persist the identifier. + + + + + For versioned entities, get the name of the column (again, expected on the + root table) used to store the version values. + + + + + To build the SQL command in pessimistic lock + + + + + Decide which tables need to be updated + + The indices of all the entity properties considered dirty. + Whether any collections owned by the entity which were considered dirty. + Array of booleans indicating which table require updating. + + The return here is an array of boolean values with each index corresponding + to a given table in the scope of this persister. + + + + + Generate the SQL that selects the version number by id + + + + + Retrieve the version number + + + + + Warning: + When there are duplicated property names in the subclasses + of the class, this method may return the wrong table + number for the duplicated subclass property (note that + SingleTableEntityPersister defines an overloaded form + which takes the entity name. + + + + + Get the column names for the numbered property of this class + + + + + Must be called by subclasses, at the end of their constructors + + + + Generate the SQL that updates a row by id (and version) + + + Generate the SQL that inserts a row + + + Marshall the fields of a persistent instance to a prepared statement + + + + Unmarshall the fields of a persistent instance from a result set, + without resolving associations or collections + + + + + Perform an SQL INSERT, and then retrieve a generated identifier. + + + This form is used for PostInsertIdentifierGenerator-style ids (IDENTITY, select, etc). + + + + + Perform an SQL INSERT. + + + This for is used for all non-root tables as well as the root table + in cases where the identifier value is known before the insert occurs. + + + + Perform an SQL UPDATE or SQL INSERT + + + + Perform an SQL DELETE + + + + + Load an instance using the appropriate loader (as determined by + + + + + Transform the array of property indexes to an array of booleans, true when the property is dirty + + + + Which properties appear in the SQL update? (Initialized, updateable ones!) + + + + Determines whether the specified entity is an instance of the class + managed by this persister. + + The entity. + The entity mode. + + if the specified entity is an instance; otherwise, . + + + + + The queries that delete rows by id (and version) + + + + + The queries that insert rows with a given id + + + + + The queries that update rows by id (and version) + + + + + The query that inserts a row, letting the database generate an id + + The IDENTITY-based insertion query. + + + + We can't immediately add to the cache if we have formulas + which must be evaluated, or if we have the possibility of + two concurrent updates to the same item being merged on + the database. This can happen if (a) the item is not + versioned and either (b) we have dynamic update enabled + or (c) we have multiple tables holding the state of the + item. + + + + The property name of the "special" identifier property in HQL + + + + A IEntityPersister implementing the normalized "table-per-subclass" mapping strategy + + + + + Constructs the NormalizedEntityPerister for the PersistentClass. + + The PersistentClass to create the EntityPersister for. + The configured . + The SessionFactory that this EntityPersister will be stored in. + The mapping used to retrieve type information. + + + + Find the Index of the table name from a list of table names. + + The name of the table to find. + The array of table names + The Index of the table in the array. + Thrown when the tableName specified can't be found + + + + Not really a Loader, just a wrapper around a named query. + + + + + Default implementation of the ClassPersister interface. Implements the + "table-per-class hierarchy" mapping strategy for an entity class. + + + + Generate the SQL that selects a row by id + + + + Factory for IEntityPersister and ICollectionPersister instances. + + + + + Creates a built in Entity Persister or a custom Persister. + + + + + Creates a specific Persister - could be a built in or custom persister. + + + + + A Strategy for converting a mapped property name to a Field name. + + + + + When implemented by a class, converts the Property's name into a Field name + + The name of the mapped property. + The name of the Field. + + + Represents a "back-reference" to the id of a collection owner. + + + + Abstracts the notion of a "property". Defines a strategy for accessing the + value of a mapped property. + + + + + When implemented by a class, create a "getter" for the mapped property. + + The to find the Property in. + The name of the mapped Property to get. + + The to use to get the value of the Property from an + instance of the . + + Thrown when a Property specified by the propertyName could not + be found in the . + + + + + When implemented by a class, create a "setter" for the mapped property. + + The to find the Property in. + The name of the mapped Property to set. + + The to use to set the value of the Property on an + instance of the . + + + Thrown when a Property specified by the propertyName could not + be found in the . + + + + + Allow embedded and custom accessors to define if the ReflectionOptimizer can be used. + + + + The Setter implementation for id backrefs. + + + + Sets values of a particular mapped property. + + + + + When implemented by a class, sets the value of the Property/Field on the object. + + The object to set the Property value in. + The value to set the Property to. + + Thrown when there is a problem setting the value in the target. + + + + + When implemented by a class, gets the name of the Property. + + The name of the Property or . + + This is an optional operation - if it is not implemented then + is an acceptable value to return. + + + + + When implemented by a class, gets the for the set + accessor of the property. + + + This is an optional operation - if the is not + for a property set then is an acceptable value to return. + It is used by the proxies to determine which setter to intercept for the + identifier property. + + + + The Getter implementation for id backrefs. + + + + Gets values of a particular mapped property. + + + + + When implemented by a class, gets the value of the Property/Field from the object. + + The object to get the Property/Field value from. + + The value of the Property for the target. + + + Thrown when there is a problem getting the value from the target. + + + + Get the property value from the given owner instance. + The instance containing the value to be retrieved. + a map of merged persistent instances to detached instances + The session from which this request originated. + The extracted value. + + + + When implemented by a class, gets the that the Property/Field returns. + + The that the Property returns. + + + + When implemented by a class, gets the name of the Property. + + The name of the Property or . + + This is an optional operation - if the is not + for a Property get then is an acceptable value to return. + + + + + When implemented by a class, gets the for the get + accessor of the property. + + + This is an optional operation - if the is not + for a property get then is an acceptable value to return. + It is used by the proxies to determine which getter to intercept for the + identifier property. + + + + + Accesses mapped property values via a get/set pair, which may be nonpublic. + The default (and recommended strategy). + + + + + Create a for the mapped property. + + The to find the Property in. + The name of the mapped Property to get. + + The to use to get the value of the Property from an + instance of the . + + Thrown when a Property specified by the propertyName could not + be found in the . + + + + + Create a for the mapped property. + + The to find the Property in. + The name of the mapped Property to get. + + The to use to set the value of the Property on an + instance of the . + + + Thrown when a Property specified by the propertyName could not + be found in the . + + + + + Helper method to find the Property get. + + The to find the Property in. + The name of the mapped Property to get. + + The for the Property get or + if the Property could not be found. + + + + + Helper method to find the Property set. + + The to find the Property in. + The name of the mapped Property to set. + + The for the Property set or + if the Property could not be found. + + + + + An for a Property get. + + + + + An that can emit IL to get the property value. + + + + + Emit IL to get the property value from the object on top of the stack. + + + + + Initializes a new instance of . + + The that contains the Property get. + The for reflection. + The name of the Property. + + + + Gets the value of the Property from the object. + + The object to get the Property value from. + + The value of the Property for the target. + + + + + Gets the that the Property returns. + + The that the Property returns. + + + + Gets the name of the Property. + + The name of the Property. + + + + Gets the for the Property. + + + The for the Property. + + + + + An for a Property set. + + + + + An that can emit IL to set the property value. + + + + + Emit IL to set the property of an object to the value. The object + is loaded onto the stack first, then the value, then this method + is called. + + + + + Initializes a new instance of . + + The that contains the Property set. + The for reflection. + The name of the mapped Property. + + + + Sets the value of the Property on the object. + + The object to set the Property value in. + The value to set the Property to. + + Thrown when there is a problem setting the value in the target. + + + + + Gets the name of the mapped Property. + + The name of the mapped Property or . + + + + Gets the for the mapped Property. + + The for the mapped Property. + + + + Implementation of for fields that are the + camelCase version of the PropertyName + + + + + Converts the Property's name into a Field name by making the first character + lower case. + + The name of the mapped property. + The name of the Field in CamelCase format. + + + + Implementation of for fields that are prefixed with + an underscore and the PropertyName is changed to camelCase. + + + + + Converts the Property's name into a Field name by making the first character + of the propertyName lowercase and prefixing it with an underscore. + + The name of the mapped property. + The name of the Field in CamelCase format prefixed with an underscore. + + + + Access the mapped property by using a Field to get and set the value. + + + The is useful when you expose getter and setters + for a Property, but they have extra code in them that shouldn't be executed when NHibernate + is setting or getting the values for loads or saves. + + + + + Initializes a new instance of . + + + + + Initializes a new instance of . + + The to use. + + + + Create a to get the value of the mapped Property + through a Field. + + The to find the Property in. + The name of the mapped Property to get. + + The to use to get the value of the Property from an + instance of the . + + Thrown when a Field specified by the propertyName could not + be found in the . + + + + + Create a to set the value of the mapped Property + through a Field. + + The to find the mapped Property in. + The name of the mapped Property to set. + + The to use to set the value of the Property on an + instance of the . + + + Thrown when a Field for the Property specified by the propertyName using the + could not be found in the . + + + + + Helper method to find the Field. + + The to find the Field in. + The name of the Field to find. + + The for the field. + + + Thrown when a field could not be found. + + + + + Converts the mapped property's name into a Field using + the if one exists. + + The name of the Property. + The name of the Field. + + + + Gets the used to convert the name of the + mapped Property in the hbm.xml file to the name of the field in the class. + + The or . + + + + An that uses a Field instead of the Property get. + + + + + Initializes a new instance of . + + The that contains the field to use for the Property get. + The for reflection. + The name of the Field. + + + + Gets the value of the Field from the object. + + The object to get the Field value from. + + The value of the Field for the target. + + + + + Gets the that the Field returns. + + The that the Field returns. + + + + Gets the name of the Property. + + since this is a Field - not a Property. + + + + Gets the for the Property. + + since this is a Field - not a Property. + + + + An that uses a Field instead of the Property set. + + + + + Initializes a new instance of . + + The that contains the Field to use for the Property set. + The for reflection. + The name of the Field. + + + + Sets the value of the Field on the object. + + The object to set the Field value in. + The value to set the Field to. + + Thrown when there is a problem setting the value in the target. + + + + + Gets the name of the Property. + + since this is a Field - not a Property. + + + + Gets the for the Property. + + since this is a Field - not a Property. + + + Represents a "back-reference" to the index of a collection. + + + Constructs a new instance of IndexPropertyAccessor. + The collection role which this back ref references. + The owner entity name. + + + The Setter implementation for index backrefs. + + + The Getter implementation for index backrefs. + + + + Implementation of for fields that are + the PropertyName in all LowerCase characters. + + + + + Converts the Property's name into a Field name by making the all characters + of the propertyName lowercase. + + The name of the mapped property. + The name of the Field in lowercase. + + + + Implementation of for fields that are prefixed with + an underscore and the PropertyName is changed to lower case. + + + + + Converts the Property's name into a Field name by making the all characters + of the propertyName lowercase and prefixing it with an underscore. + + The name of the mapped property. + The name of the Field in lowercase prefixed with an underscore. + + + Used to declare properties not represented at the pojo level + + + A Getter which will always return null. It should not be called anyway. + + + A Setter which will just do nothing. + + + + Access the mapped property through a Property get to get the value + and go directly to the Field to set the value. + + + This is most useful because Classes can provider a get for the Property + that is the <id> but tell NHibernate there is no setter for the Property + so the value should be written directly to the field. + + + + + Initializes a new instance of . + + The to use. + + + + Creates an to get the value from the Property. + + The to find the Property in. + The name of the mapped Property to get. + + The to use to get the value of the Property from an + instance of the . + + Thrown when a Property specified by the propertyName could not + be found in the . + + + + + Create a to set the value of the mapped Property + through a Field. + + The to find the mapped Property in. + The name of the mapped Property to set. + + The to use to set the value of the Property on an + instance of the . + + + Thrown when a Field for the Property specified by the propertyName using the + could not be found in the . + + + + + Converts the Property's name into a Field name by making the first character + of the propertyName uppercase and prefixing it with the letter 'm'. + + The name of the mapped property. + The name of the Field in PascalCase format prefixed with an 'm'. + + + + Implementation of for fields that are prefixed with + an m_ and the first character in PropertyName capitalized. + + + + + Converts the Property's name into a Field name by making the first character + of the propertyName uppercase and prefixing it with the letter 'm' + and an underscore. + + The name of the mapped property. + The name of the Field in PascalCase format prefixed with an 'm' and an underscore. + + + + Implementation of for fields that are prefixed with + an _ and the first character in PropertyName capitalized. + + + + + Converts the Property's name into a Field name by making the first character + of the propertyName uppercase and prefixing it with an underscore. + + The name of the mapped property. + The name of the Field in PascalCase format prefixed with an underscore. + + + + Factory for creating the various PropertyAccessor strategies. + + + + + Initializes the static members in . + + + + + Gets or creates the specified by the type. + + + The specified by the type. + + + The built in ways of accessing the values of Properties in your domain class are: + + + + Access Method + How NHibernate accesses the Mapped Class. + + + property + + The name attribute is the name of the Property. This is the + default implementation. + + + + field + + The name attribute is the name of the field. If you have any Properties + in the Mapped Class those will be bypassed and NHibernate will go straight to the + field. This is a good option if your setters have business rules attached to them + or if you don't want to expose a field through a Getter & Setter. + + + + nosetter + + The name attribute is the name of the Property. NHibernate will use the + Property's get method to retrieve the value and will use the field + to set the value. This is a good option for <id> Properties because this access method + allows users of the Class to get the value of the Id but not set the value. + + + + readonly + + The name attribute is the name of the Property. NHibernate will use the + Property's get method to retrieve the value but will never set the value back in the domain. + This is used for read-only calculated properties with only a get method. + + + + Assembly Qualified Name + + If NHibernate's built in s are not what is needed for your + situation then you are free to build your own. Provide an Assembly Qualified Name so that + NHibernate can call Activator.CreateInstance(AssemblyQualifiedName) to create it. + + + + + In order for the nosetter to know the name of the field to access NHibernate needs to know + what the naming strategy is. The following naming strategies are built into NHibernate: + + + + Naming Strategy + How NHibernate converts the value of the name attribute to a field name. + + + camelcase + + The name attribute should be changed to CamelCase to find the field. + <property name="Foo" ... > finds a field foo. + + + + camelcase-underscore + + The name attribute should be changed to CamelCase and prefixed with + an underscore to find the field. + <property name="Foo" ... > finds a field _foo. + + + + pascalcase-underscore + + The name attribute should be prefixed with an underscore + to find the field. + <property name="Foo" ... > finds a field _Foo. + + + + pascalcase-m-underscore + + The name attribute should be prefixed with an 'm' and underscore + to find the field. + <property name="Foo" ... > finds a field m_Foo. + + + + pascalcase-m + + The name attribute should be prefixed with an 'm'. + <property name="Foo" ... > finds a field mFoo. + + + + lowercase + + The name attribute should be changed to lowercase to find the field. + <property name="FooBar" ... > finds a field foobar. + + + + lowercase-underscore + + The name attribute should be changed to lowercase and prefixed with + and underscore to find the field. + <property name="FooBar" ... > finds a field _foobar. + + + + + The naming strategy can also be appended at the end of the field access method. Where + this could be useful is a scenario where you do expose a get and set method in the Domain Class + but NHibernate should only use the fields. + + + With a naming strategy and a get/set for the Property available the user of the Domain Class + could write an Hql statement from Foo as foo where foo.SomeProperty = 'a'. If no naming + strategy was specified the Hql statement would have to be from Foo as foo where foo._someProperty + (assuming CamelCase with an underscore field naming strategy is used). + + + + + Retrieves a PropertyAccessor instance based on the given property definition and entity mode. + The property for which to retrieve an accessor. + The mode for the resulting entity. + An appropriate accessor. + + + + Access the mapped property through a Property get to get the value + and do nothing to set the value. + + + This is useful to allow calculated properties in the domain that will never + be recovered from the DB but can be used for querying. + + + + + Initializes a new instance of . + + + + + Creates an to get the value from the Property. + + The to find the Property in. + The name of the mapped Property to get. + + The to use to get the value of the Property from an + instance of the . + + Thrown when a Property specified by the propertyName could not + be found in the . + + + + + Create a to do nothing when trying to + se the value of the mapped Property + + The to find the mapped Property in. + The name of the mapped Property to set. + + An instance of . + + + + + Responsible for accessing property values represented as a XmlElement + or XmlAttribute. + + + + For nodes like "@bar" + + + Defines the strategy for getting property values out of a dom4j Node. + + + Get the declared type + + + Optional operation (return null) + + + Optional operation (return null) + + + For nodes like "@bar" + + + Optional operation (return null) + + + Optional operation (return null) + + + For nodes like "foo/@bar" + + + For nodes like "foo/@bar" + + + For nodes like "foo" + + + For nodes like "foo" + + + For nodes like "." + + + For nodes like "." + + + Lazy initializer for "dynamic-map" entity representations. + + + + Provides the base functionality to Handle Member calls into a dynamically + generated NHibernate Proxy. + + + This could be an extension point later if the .net framework ever gets a Proxy + class that is similar to the java.lang.reflect.Proxy or if a library similar + to cglib was made in .net. + + + + + Perform an ImmediateLoad of the actual object for the Proxy. + + + Thrown when the Proxy has no Session or the Session is closed or disconnected. + + + + + Return the Underlying Persistent Object, initializing if necessary. + + The Persistent Object this proxy is Proxying. + + + + Return the Underlying Persistent Object in a given , or null. + + The Session to get the object from. + The Persistent Object this proxy is Proxying, or . + + + + + + Get the entity name + + + + + + + + + + + + + If this is returned by Invoke then the subclass needs to Invoke the + method call against the object that is being proxied. + + + + + Create a LazyInitializer to handle all of the Methods/Properties that are called + on the Proxy. + + The entityName + The Id of the Object we are Proxying. + The ISession this Proxy is in. + + + + Perform an ImmediateLoad of the actual object for the Proxy. + + + Thrown when the Proxy has no Session or the Session is closed or disconnected. + + + + + Return the Underlying Persistent Object, initializing if necessary. + + The Persistent Object this proxy is Proxying. + + + + Return the Underlying Persistent Object in a given , or null. + + The Session to get the object from. + The Persistent Object this proxy is Proxying, or . + + + + + + + + + Proxy for "dynamic-map" entity representations. + + + + A marker interface so NHibernate can know if it is dealing with + an object that is a Proxy. + + + + This interface should not be implemented by anything other than + the Dynamically generated Proxy. If it is implemented by a class then + NHibernate will think that class is a Proxy and will not work. + + + It has to be public scope because + the Proxies are created in a separate DLL than NHibernate. + + + + + Get the underlying lazy initialization handler. + + + Contract for run-time, proxy-based lazy initialization proxies. + + + Called immediately after instantiation of this factory. + + The name of the entity for which this factory should generate proxies. + + + The entity class for which to generate proxies; not always the same as the entityName. + + + The interfaces to expose in the generated proxy; + is already included in this collection. + + + Reference to the identifier getter method; invocation on this method should not force initialization + + + Reference to the identifier setter method; invocation on this method should not force initialization + + + For composite identifier types, a reference to + the type of the identifier + property; again accessing the id should generally not cause + initialization - but need to bear in mind key-many-to-one + mappings. + + Indicates a problem completing post + + Essentially equivalent to constructor injection, but contracted + here via interface. + + + + + Create a new proxy + + The id value for the proxy to be generated. + The session to which the generated proxy will be associated. + The generated proxy. + Indicates problems generating requested proxy. + + + Lazy initializer for POCOs + + + + Adds all of the information into the SerializationInfo that is needed to + reconstruct the proxy during deserialization or to replace the proxy + with the instantiated target. + + + This will only be called if the Dynamic Proxy generator does not handle serialization + itself or delegates calls to the method GetObjectData to the LazyInitializer. + + + + + Invokes the method if this is something that the LazyInitializer can handle + without the underlying proxied object being instantiated. + + The name of the method/property to Invoke. + The arguments to pass the method/property. + The proxy object that the method is being invoked on. + + The result of the Invoke if the underlying proxied object is not needed. If the + underlying proxied object is needed then it returns the result + which indicates that the Proxy will need to forward to the real implementation. + + + + + Convenient common implementation for ProxyFactory + + + + + Proxeability validator. + + + + + Validates whether can be specified as the base class + (or an interface) for a dynamically-generated proxy. + + The type to validate. + + A collection of errors messages, if any, or if none were found. + + + When the configuration property "use_proxy_validator" is set to true(default), the result of this method + is used to throw a detailed exception about the proxeability of the given . + + + + + Validate if a single method can be intercepted by proxy. + + The given method to check. + if the method can be intercepted by proxy. + otherwise. + + + This method can be used internally by the and is used + by to log errors when + a property accessor can't be intercepted by proxy. + The validation of property accessors is fairly enough if you ecampsulate each property. + + + + + Validates whether can be specified as the base class + (or an interface) for a dynamically-generated proxy. + + The type to validate. + + A collection of errors messages, if any, or if none were found. + + + + + NHibernateProxyHelper provides convenience methods for working with + objects that might be instances of Classes or the Proxied version of + the Class. + + + + + Get the class of an instance or the underlying class of a proxy (without initializing the proxy!). + It is almost always better to use the entity name! + + The object to get the type of. + The Underlying Type for the object regardless of if it is a Proxy. + + + + Get the true, underlying class of a proxied persistent class. This operation + will NOT initialize the proxy and thus may return an incorrect result. + + a persistable object or proxy + guessed class of the instance + + This method is approximate match for Session.bestGuessEntityName in H3.2 + + + + + Aliases tables and fields for Sql Statements. + + + Several methods of this class take an additional + parameter, while their Java counterparts + do not. The dialect is used to correctly quote and unquote identifiers. + Java versions do the quoting and unquoting themselves and fail to + consider dialect-specific rules, such as escaping closing brackets in + identifiers on MS SQL 2000. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + An ANSI SQL CASE expression. + case when ... then ... end as ... + + This class looks StringHelper.SqlParameter safe... + + + Abstract SQL case fragment renderer + + + + An ANSI-style Join. + + + + + + + + Sets the op + + The op to set + + + + + + + + + + + + + + + + + + + + + + + + + + + + + An Oracle-style DECODE function. + + decode(pkvalue, key1, 1, key2, 2, ..., 0) + + + + + + + + Represents an SQL for update of ... nowait statement + + + + + An Informix-style (theta) Join + + + + + Represents an ... in (...) expression + + + + + Add a value to the value list. Value may be a string, + a , or one of special values + or . + + + + + + + + An Oracle-style (theta) Join + + + + + This method is a bit of a hack, and assumes + that the column on the "right" side of the + join appears on the "left" side of the + operator, which is extremely weird if this + was a normal join condition, but is natural + for a filter. + + + + + A placeholder for an ADO.NET parameter in an . + + + + + We need to know what the position of the parameter was in a query + before we rearranged the query. + This is used only by dialects that rearrange the query, unfortunately, + the MS SQL 2005 dialect have to re shuffle the query (and ruin positional parameter + support) because the SQL 2005 and 2008 SQL dialects have a completely broken + support for paging, which is just a tad less important than SELECT. + See NH-1528 + + + + + Generates an array of parameters for the given SqlTypes. + + The number of parameters to generate. + An array of objects + + + + Determines whether this instance and the specified object + are of the same type and have the same values. + + An object to compare to this instance. + + if the object equals the current instance. + + + + + Gets a hash code for the parameter. + + + An value for the hash code. + + + + + Used as a placeholder when parsing HQL or SQL queries. + + + + + Summary description for QueryJoinFragment. + + + + + Summary description for QuerySelect. + + + + + Certain databases don't like spaces around these operators. + + + This needs to contain both a plain string and a + SqlString version of the operator because the portions in + the WHERE clause will come in as SqlStrings since there + might be parameters, other portions of the clause come in + as strings since there are no parameters. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Adds a string containing a valid "order by" sql statement + to this QuerySelect + + The "order by" sql statement. + + + + + + + + + + + + + + + + + Represents part of an SQL SELECT clause + + + + + Equivalent to ToSqlStringFragment. + + + + In H3, it is called ToFragmentString(). It appears to be + functionally equivalent as ToSqlStringFragment() here. + + + + + The base class for all of the SqlBuilders. + + + + + Converts the ColumnNames and ColumnValues to a WhereFragment + + The names of the Columns to Add to the WhereFragment + A SqlString that contains the WhereFragment + This just calls the overloaded ToWhereFragment() with the operator as " = " and the tableAlias null. + + + + Converts the ColumnNames and ColumnValues to a WhereFragment + + The Alias for the Table. + The names of the Columns to Add to the WhereFragment + A SqlString that contains the WhereFragment + This defaults the op to " = " + + + + Converts the ColumnNames and ColumnValues to a WhereFragment + + The names of the Columns to Add to the WhereFragment + The operator to use between the names & values. For example " = " or "!=" + A SqlString that contains the WhereFragment + + + + Converts the ColumnNames and ColumnValues to a WhereFragment + + The Alias for the Table. + The names of the Columns to Add to the WhereFragment + The operator to use between the names & values. For example " = " or "!=" + A SqlString that contains the WhereFragment + + + + A class that builds an DELETE sql statement. + + + + + Sets the IdentityColumn for the DELETE sql to use. + + An array of the column names for the Property + The IType of the Identity Property. + The SqlDeleteBuilder. + + + + Sets the VersionColumn for the DELETE sql to use. + + An array of the column names for the Property + The IVersionType of the Version Property. + The SqlDeleteBuilder. + + + + Adds the columns for the Type to the WhereFragment + + The names of the columns to add. + The IType of the property. + The operator to put between the column name and value. + The SqlDeleteBuilder + + + + Adds a string to the WhereFragement + + A well formed sql statement with no parameters. + The SqlDeleteBuilder + + + + Builds a SELECT SQL statement. + + + + + Sets the text that should appear after the FROM + + The fromClause to set + The SqlSelectBuilder + + + + Sets the text that should appear after the FROM + + The name of the Table to get the data from + The Alias to use for the table name. + The SqlSelectBuilder + + + + Sets the text that should appear after the FROM + + The fromClause in a SqlString + The SqlSelectBuilder + + + + Sets the text that should appear after the ORDER BY. + + The orderByClause to set + The SqlSelectBuilder + + + + Sets the text that should appear after the GROUP BY. + + The groupByClause to set + The SqlSelectBuilder + + + + Sets the SqlString for the OUTER JOINs. + + + All of the Sql needs to be included in the SELECT. No OUTER JOINS will automatically be + added. + + The outerJoinsAfterFrom to set + The outerJoinsAfterWhere to set + The SqlSelectBuilder + + + + Sets the text for the SELECT + + The selectClause to set + The SqlSelectBuilder + + + + Sets the text for the SELECT + + The selectClause to set + The SqlSelectBuilder + + + + Sets the criteria to use for the WHERE. It joins all of the columnNames together with an AND. + + + The names of the columns + The Hibernate Type + The SqlSelectBuilder + + + + Sets the prebuilt SqlString to the Where clause + + The SqlString that contains the sql and parameters to add to the WHERE + This SqlSelectBuilder + + + + Sets the criteria to use for the WHERE. It joins all of the columnNames together with an AND. + + + The names of the columns + The Hibernate Type + The SqlSelectBuilder + + + + Sets the prebuilt SqlString to the Having clause + + The SqlString that contains the sql and parameters to add to the HAVING + This SqlSelectBuilder + + + + ToSqlString() is named ToStatementString() in H3 + + + + + + + + + Summary description for SqlSimpleSelectBuilder. + + + + + + + + + + + + Adds a columnName to the SELECT fragment. + + The name of the column to add. + The SqlSimpleSelectBuilder + + + + Adds a columnName and its Alias to the SELECT fragment. + + The name of the column to add. + The alias to use for the column + The SqlSimpleSelectBuilder + + + + Adds an array of columnNames to the SELECT fragment. + + The names of the columns to add. + The SqlSimpleSelectBuilder + + + + Adds an array of columnNames with their Aliases to the SELECT fragment. + + The names of the columns to add. + The aliases to use for the columns + The SqlSimpleSelectBuilder + + + + Gets the Alias that should be used for the column + + The name of the column to get the Alias for. + The Alias if one exists, null otherwise + + + + Sets the IdentityColumn for the SELECT sql to use. + + An array of the column names for the Property + The IType of the Identity Property. + The SqlSimpleSelectBuilder. + + + + Sets the VersionColumn for the SELECT sql to use. + + An array of the column names for the Property + The IVersionType of the Version Property. + The SqlSimpleSelectBuilder. + + + + Set the Order By fragment of the Select Command + + The OrderBy fragment. It should include the SQL "ORDER BY" + The SqlSimpleSelectBuilder + + + + Adds the columns for the Type to the WhereFragment + + The names of the columns to add. + The IType of the property. + The operator to put between the column name and value. + The SqlSimpleSelectBuilder + + + + + + + This is a non-modifiable SQL statement that is ready to be prepared + and sent to the Database for execution. + + + + If you need to modify this object pass it to a and + get a new object back from it. + + + + + + Appends the SqlString parameter to the end of the current SqlString to create a + new SqlString object. + + The SqlString to append. + A new SqlString object. + + A SqlString object is immutable so this returns a new SqlString. If multiple Appends + are called it is better to use the SqlStringBuilder. + + + + + Appends the string parameter to the end of the current SqlString to create a + new SqlString object. + + The string to append. + A new SqlString object. + + A SqlString object is immutable so this returns a new SqlString. If multiple Appends + are called it is better to use the SqlStringBuilder. + + + + + Compacts the SqlString into the fewest parts possible. + + A new SqlString. + + Combines all SqlParts that are strings and next to each other into + one SqlPart. + + + + + Determines whether the end of this instance matches the specified String. + + A string to seek at the end. + if the end of this instance matches value; otherwise, + + + + Replaces all occurrences of a specified in this instance, + with another specified . + + A String to be replaced. + A String to replace all occurrences of oldValue. + + A new SqlString with oldValue replaced by the newValue. The new SqlString is + in the compacted form. + + + + + Determines whether the beginning of this SqlString matches the specified System.String, + using case-insensitive comparison. + + The System.String to seek + true if the SqlString starts with the value. + + + + Retrieves a substring from this instance. The substring starts at a specified character position. + + The starting character position of a substring in this instance. + + A new SqlString to the substring that begins at startIndex in this instance. + + + If the startIndex is greater than the length of the SqlString then is returned. + + + + + Returns the index of the first occurrence of , case-insensitive. + + Text to look for in the . Must be in lower + case. + + The text must be located entirely in a string part of the . + Searching for "a ? b" in an consisting of + "a ", Parameter, " b" will result in no matches. + + The index of the first occurrence of , or -1 + if not found. + + + + Removes all occurrences of white space characters from the beginning and end of this instance. + + + A new SqlString equivalent to this instance after white space characters + are removed from the beginning and end. + + + + + + + + + + + + + + + Returns the SqlString in a string where it looks like + SELECT col1, col2 FROM table WHERE col1 = ? + + + The question mark is used as the indicator of a parameter because at + this point we are not using the specific provider so we don't know + how that provider wants our parameters formatted. + + A provider-neutral version of the CommandText + + + + Returns substring of this SqlString starting with the specified + . If the text is not found, returns an + empty, not-null SqlString. + + + The method performs case-insensitive comparison, so the + passed should be in lower case. + + + + + Parse SQL in and create a SqlString representing it. + + + Parameter marks in single quotes will be correctly skipped, but otherwise the + lexer is very simple and will not parse double quotes or escape sequences + correctly, for example. + + + + + Gets the number of SqlParts contained in this SqlString. + + The number of SqlParts contained in this SqlString. + + + + The SqlStringBuilder is used to construct a SqlString. + + + + The SqlString is a nonmutable class so it can't have sql parts added + to it. Instead this class should be used to generate a new SqlString. + The SqlStringBuilder is to SqlString what the StringBuilder is to + a String. + + + This is different from the original version of SqlString because this does not + hold the sql string in the form of "column1=@column1" instead it uses an array to + build the sql statement such that + object[0] = "column1=" + object[1] = ref to column1 parameter + + + What this allows us to do is to delay the generating of the parameter for the sql + until the very end - making testing dialect indifferent. Right now all of our test + to make sure the correct sql is getting built are specific to MsSql2000Dialect. + + + + + + Create an empty StringBuilder with the default capacity. + + + + + Create a StringBuilder with a specific capacity. + + The number of parts expected. + + + + Create a StringBuilder to modify the SqlString + + The SqlString to modify. + + + + Adds the preformatted sql to the SqlString that is being built. + + The string to add. + This SqlStringBuilder + + + + Adds the Parameter to the SqlString that is being built. + The correct operator should be added before the Add(Parameter) is called + because there will be no operator ( such as "=" ) placed between the last Add call + and this Add call. + + The Parameter to add. + This SqlStringBuilder + + + + Attempts to discover what type of object this is and calls the appropriate + method. + + The part to add when it is not known if it is a Parameter, String, or SqlString. + This SqlStringBuilder. + Thrown when the part is not a Parameter, String, or SqlString. + + + + Adds an existing SqlString to this SqlStringBuilder. It does NOT add any + prefix, postfix, operator, or wrap around this. It is equivalent to just + adding a string. + + The SqlString to add to this SqlStringBuilder + This SqlStringBuilder + This calls the overloaded Add(sqlString, null, null, null, false) + + + + Adds an existing SqlString to this SqlStringBuilder + + The SqlString to add to this SqlStringBuilder + String to put at the beginning of the combined SqlString. + How these Statements should be junctioned "AND" or "OR" + String to put at the end of the combined SqlString. + This SqlStringBuilder + + This calls the overloaded Add method with an array of SqlStrings and wrapStatment=false + so it will not be wrapped with a "(" and ")" + + + + + Adds existing SqlStrings to this SqlStringBuilder + + The SqlStrings to combine. + String to put at the beginning of the combined SqlString. + How these SqlStrings should be junctioned "AND" or "OR" + String to put at the end of the combined SqlStrings. + This SqlStringBuilder + This calls the overloaded Add method with wrapStatement=true + + + + Adds existing SqlStrings to this SqlStringBuilder + + The SqlStrings to combine. + String to put at the beginning of the combined SqlStrings. + How these SqlStrings should be junctioned "AND" or "OR" + String to put at the end of the combined SqlStrings. + Wrap each SqlStrings with "(" and ")" + This SqlStringBuilder + + + + Insert a string containing sql into the SqlStringBuilder at the specified index. + + The zero-based index at which the sql should be inserted. + The string containing sql to insert. + This SqlStringBuilder + + + + Insert a Parameter into the SqlStringBuilder at the specified index. + + The zero-based index at which the Parameter should be inserted. + The Parameter to insert. + This SqlStringBuilder + + + + Removes the string or Parameter at the specified index. + + The zero-based index of the item to remove. + This SqlStringBuilder + + + + Converts the mutable SqlStringBuilder into the immutable SqlString. + + The SqlString that was built. + + + + Gets the number of SqlParts in this SqlStringBuilder. + + + The number of SqlParts in this SqlStringBuilder. + + + + + Gets or Sets the element at the index + + Returns a string or Parameter. + + + + + A class that builds an UPDATE sql statement. + + + + + Add a column with a specific value to the UPDATE sql + + The name of the Column to add. + The value to set for the column. + The NHibernateType to use to convert the value to a sql string. + The SqlUpdateBuilder. + + + + Add a column with a specific value to the UPDATE sql + + The name of the Column to add. + A valid sql string to set as the value of the column. + The SqlUpdateBuilder. + + + + Adds columns with a specific value to the UPDATE sql + + The names of the Columns to add. + A valid sql string to set as the value of the column. This value is assigned to each column. + The SqlUpdateBuilder. + + + + Adds the Property's columns to the UPDATE sql + + An array of the column names for the Property + The IType of the property. + The SqlUpdateBuilder. + + + + Adds the Property's updatable columns to the UPDATE sql + + An array of the column names for the Property + An array of updatable column flags. If this array is null, all supplied columns are considered updatable. + The IType of the property. + The SqlUpdateBuilder. + + + + Sets the IdentityColumn for the UPDATE sql to use. + + An array of the column names for the Property + The IType of the Identity Property. + The SqlUpdateBuilder. + + + + Sets the VersionColumn for the UPDATE sql to use. + + An array of the column names for the Property + The IVersionType of the Version Property. + The SqlUpdateBuilder. + + + + Adds the columns for the Type to the WhereFragment + + The names of the columns to add. + The IType of the property. + The operator to put between the column name and value. + The SqlUpdateBuilder + + + + Adds a string to the WhereFragment + + A well formed sql string with no parameters. + The SqlUpdateBuilder + + + + + + + Given an SQL SELECT statement, parse it to extract clauses starting with + FROM, up to and not including ORDER BY (known collectively + as a subselect clause). + + + + + Contains the subselect clause as it is being built. + + + + + Initializes a new instance of the class. + + The parts of an to extract the subselect clause from. + + + + Looks for a FROM clause in the + and adds the clause to the result if found. + + A or a . + if the part contained a FROM clause, + otherwise. + + + + Returns the subselect clause of the statement + being processed. + + An containing + the subselect clause of the original SELECT + statement. + + + + Allows us to construct SQL WHERE fragments + + + + + Describes the details of a with the + information required to to generate an . + + + This can store the length of the string that the can hold. + If no value is provided for the length then the Driver is responsible for + setting the properties on the correctly. + + + + + This is the base class that adds information to the + for the and + to use. + + +

+ The uses the SqlType to get enough + information to create an . +

+

+ The use the SqlType to convert the + to the appropriate sql type for SchemaExport. +

+
+
+ + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The length of the string the should hold. + + + + Describes the details of a with the + information required to generate an . + + + This can store the length of the string that the can hold. + If no value is provided for the length then the Driver is responsible for + setting the properties on the correctly. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The length of the string the should hold. + + + + Describes the details of a that is stored in + a BLOB column with the information required to generate + an . + + +

+ This can store the length of the binary data that the can hold. + If no value is provided for the length then the Driver is responsible for + setting the properties on the correctly. +

+

+ This is only needed by DataProviders (SqlClient) that need to specify a Size for the + IDbDataParameter. Most DataProvider(Oralce) don't need to set the Size so a + BinarySqlType would work just fine. +

+
+
+ + + Describes the details of a with the + information required to to generate an . + + + This can store the binary data that the can hold. + If no value is provided for the length then the Driver is responsible for + setting the properties on the correctly. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The length of the binary data the should hold + + + + SqlTypeFactory provides Singleton access to the SqlTypes. + + + + + Describes the details of a that is stored in + a CLOB column with the information required to generate + an . + + +

+ This can store the length of the binary data that the can hold. + If no value is provided for the length then the Driver is responsible for + setting the properties on the correctly. +

+

+ This is only needed by DataProviders (SqlClient) that need to specify a Size for the + IDbDataParameter. Most DataProvider(Oralce) don't need to set the Size so a + StringSqlType would work just fine. +

+
+
+ + + Describes the details of a with the + information required to generate an . + + + This can store the length of the string that the can hold. + If no value is provided for the length then the Driver is responsible for + setting the properties on the correctly. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The length of the string the should hold. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The length of the string the should hold. + + + + Describes the details of a with the + information required to to generate an . + + + This can store the length of the string that the can hold. + If no value is provided for the length then the Driver is responsible for + setting the properties on the correctly. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The length of the string the should hold. + + + + Statistics for a particular "category" (a named entity, + collection role, second level cache region or query). + + + + Collection related statistics + + + Entity related statistics + + + + Information about the first-level (session) cache for a particular session instance + + + + Get the number of entity instances associated with the session + + + Get the number of collection instances associated with the session + + + Get the set of all EntityKeys. + + + Get the set of all CollectionKeys. + + + + Statistics for a particular . + Beware of metrics, they are dependent of the precision: + + + + Reset all statistics + + + Find entity statistics per name + entity name + EntityStatistics object + + + Get collection statistics per role + collection role + CollectionStatistics + + + Second level cache statistics per region + region name + SecondLevelCacheStatistics + + + Query statistics from query string (HQL or SQL) + query string + QueryStatistics + + + log in info level the main statistics + + + Global number of entity deletes + + + Global number of entity inserts + + + Global number of entity loads + + + Global number of entity fetchs + + + Global number of entity updates + + + Global number of executed queries + + + The of the slowest query. + + + The query string for the slowest query. + + + The global number of cached queries successfully retrieved from cache + + + The global number of cached queries *not* found in cache + + + The global number of cacheable queries put in cache + + + Get the global number of flush executed by sessions (either implicit or explicit) + + + + Get the global number of connections asked by the sessions + (the actual number of connections used may be much smaller depending + whether you use a connection pool or not) + + + + Global number of cacheable entities/collections successfully retrieved from the cache + + + Global number of cacheable entities/collections not found in the cache and loaded from the database. + + + Global number of cacheable entities/collections put in the cache + + + Global number of sessions closed + + + Global number of sessions opened + + + Global number of collections loaded + + + Global number of collections fetched + + + Global number of collections updated + + + Global number of collections removed + + + Global number of collections recreated + + + Start time + + + Enable/Disable statistics logs (this is a dynamic parameter) + + + All executed query strings + + + The names of all entities + + + The names of all collection roles + + + Get all second-level cache region names + + + The number of transactions we know to have been successful + + + The number of transactions we know to have completed + + + The number of prepared statements that were acquired + + + The number of prepared statements that were released + + + The number of StaleObjectStateExceptions that occurred + + + + The OperationThreshold to a value greater than to enable logging of long running operations. + + Operations that exceed the level will be logged. + + + Statistics SPI for the NHibernate core + + + Query statistics (HQL and SQL) + Note that for a cached query, the cache miss is equals to the db count + + + Add statistics report of a DB query + rows count returned + time taken + + + Second level cache statistics of a specific region + + + + Not ported yet + + + + + Not ported yet + + + + + Not ported yet + + + + + Not ported yet + + + + + Contract for delegates responsible for managing connection used by the hbm2ddl tools. + + + + + Prepare the helper for use. + + + + + Release any resources held by this helper. + + + + + Get a reference to the connection we are using. + + + + + A implementation based on an internally + built and managed . + + + + + Generates ddl to export table schema for a configured Configuration to the database + + + This Class can be used directly or the command line wrapper NHibernate.Tool.hbm2ddl.exe can be + used when a dll can not be directly used. + + + + + Create a schema exported for a given Configuration + + The NHibernate Configuration to generate the schema from. + + + + Create a schema exporter for the given Configuration, with the given + database connection properties + + The NHibernate Configuration to generate the schema from. + The Properties to use when connecting to the Database. + + + + Set the output filename. The generated script will be written to this file + + The name of the file to output the ddl to. + The SchemaExport object. + + + + Set the end of statement delimiter + + The end of statement delimiter. + The SchemaExport object. + + + + Run the schema creation script + + if the ddl should be outputted in the Console. + if the ddl should be executed against the Database. + + This is a convenience method that calls and sets + the justDrop parameter to false. + + + + + Run the drop schema script + + if the ddl should be outputted in the Console. + if the ddl should be executed against the Database. + + This is a convenience method that calls and sets + the justDrop parameter to true. + + + + + Executes the Export of the Schema in the given connection + + if the ddl should be outputted in the Console. + if the ddl should be executed against the Database. + if only the ddl to drop the Database objects should be executed. + + The connection to use when executing the commands when export is . + Must be an opened connection. The method doesn't close the connection. + + The writer used to output the generated schema + + This method allows for both the drop and create ddl script to be executed. + This overload is provided mainly to enable use of in memory databases. + It does NOT close the given connection! + + + + + Executes the Export of the Schema. + + if the ddl should be outputted in the Console. + if the ddl should be executed against the Database. + if only the ddl to drop the Database objects should be executed. + + This method allows for both the drop and create ddl script to be executed. + + + + + Execute the schema updates + + + + + Execute the schema updates + + The action to write the each schema line. + Commit the script to DB + + + + Returns a List of all Exceptions which occured during the export. + + + + + Perform the validations. + + + + A implementation based on an explicitly supplied + connection. + + + + + A implementation based on a provided + . Essentially, ensures that the connection + gets cleaned up, but that the provider itself remains usable since it + was externally provided to us. + + + + + An abstract factory for instances. + Concrete implementations are specified by transaction.factory_class + configuration property. + + Implementors must be threadsafe and should declare a public default constructor. + + + + + + Configure from the given properties + + + + + + Create a new transaction and return it without starting it. + + + + + This is used as a marker interface for the different + transaction context required for each session + + + + + Wraps an ADO.NET to implement + the interface. + + + + + Allows the application to define units of work, while maintaining abstraction from the + underlying transaction implementation + + + A transaction is associated with a ISession and is usually instanciated by a call to + ISession.BeginTransaction(). A single session might span multiple transactions since + the notion of a session (a conversation between the application and the datastore) is of + coarser granularity than the notion of a transaction. However, it is intended that there be + at most one uncommitted ITransaction associated with a particular ISession + at a time. Implementors are not intended to be threadsafe. + + + + + Begin the transaction with the default isolation level. + + + + + Begin the transaction with the specified isolation level. + + Isolation level of the transaction + + + + Flush the associated ISession and end the unit of work. + + + This method will commit the underlying transaction if and only if the transaction + was initiated by this object. + + + + + Force the underlying transaction to roll back. + + + + + Enlist the in the current Transaction. + + The to enlist. + + It is okay for this to be a no op implementation. + + + + + Register a user synchronization callback for this transaction. + + The callback to register. + + + + Is the transaction in progress + + + + + Was the transaction rolled back or set to rollback only? + + + + + Was the transaction successfully committed? + + + This method could return even after successful invocation of Commit() + + + + + Initializes a new instance of the class. + + The the Transaction is for. + + + + Enlist the in the current . + + The to enlist in this Transaction. + + + This takes care of making sure the 's Transaction property + contains the correct or if there is no + Transaction for the ISession - ie BeginTransaction() not called. + + + This method may be called even when the transaction is disposed. + + + + + + Begins the on the + used by the . + + + Thrown if there is any problems encountered while trying to create + the . + + + + + Commits the by flushing the + and committing the . + + + Thrown if there is any exception while trying to call Commit() on + the underlying . + + + + + Rolls back the by calling the method Rollback + on the underlying . + + + Thrown if there is any exception while trying to call Rollback() on + the underlying . + + + + + A flag to indicate if Disose() has been called. + + + + + Finalizer that ensures the object is correctly disposed of. + + + + + Takes care of freeing the managed and unmanaged resources that + this class is responsible for. + + + + + Takes care of freeing the managed and unmanaged resources that + this class is responsible for. + + Indicates if this AdoTransaction is being Disposed of or Finalized. + + If this AdoTransaction is being Finalized (isDisposing==false) then make sure not + to call any methods that could potentially bring this AdoTransaction back to life. + + + + + Gets a indicating if the transaction was rolled back. + + + if the had Rollback called + without any exceptions. + + + + + Gets a indicating if the transaction was committed. + + + if the had Commit called + without any exceptions. + + + + + A mimic to the javax.transaction.Synchronization callback to enable + + + + + Implementors define a strategy for transforming criteria query + results into the actual application-visible query result list. + + + + + + + + + + + + + + + + + + + + + Result transformer that allows to transform a result to + a user specified class which will be populated via setter + methods or fields matching the alias names. + + + + IList resultWithAliasedBean = s.CreateCriteria(typeof(Enrollment)) + .CreateAlias("Student", "st") + .CreateAlias("Course", "co") + .SetProjection( Projections.ProjectionList() + .Add( Projections.Property("co.Description"), "CourseDescription" ) + ) + .SetResultTransformer( new AliasToBeanResultTransformer(typeof(StudentDTO)) ) + .List(); + + StudentDTO dto = (StudentDTO)resultWithAliasedBean[0]; + + + + + + Tranforms each result row from a tuple into a , such that what + you end up with is a of . + + + + + Each row of results is a map () from alias to values/entities + + + + Each row of results is a + + + + Creates a resulttransformer that will inject aliased values into instances + of via property methods or fields. + + + + Support for tuplizers relating to components. + + + + Defines further responsibilities regarding tuplization based on + a mapped components. + + + ComponentTuplizer implementations should have the following constructor signature: + (org.hibernate.mapping.Component) + + + + + A tuplizer defines the contract for things which know how to manage + a particular representation of a piece of data, given that + representation's (the entity-mode + essentially defining which representation). + + + If that given piece of data is thought of as a data structure, then a tuplizer + is the thing which knows how to: + + create such a data structure appropriately + extract values from and inject values into such a data structure + + + For example, a given piece of data might be represented as a POCO class. + Here, it's representation and entity-mode is POCO. Well a tuplizer for POCO + entity-modes would know how to: + + create the data structure by calling the POCO's constructor + extract and inject values through getters/setter, or by direct field access, etc + + + That same piece of data might also be represented as a DOM structure, using + the tuplizer associated with the XML entity-mode, which would generate instances + of as the data structure and know how to access the + values as either nested s or as s. + + + + + + + Extract the current values contained on the given entity. + + The entity from which to extract values. + The current property values. + HibernateException + + + Inject the given values into the given entity. + The entity. + The values to be injected. + + + Extract the value of a particular property from the given entity. + The entity from which to extract the property value. + The index of the property for which to extract the value. + The current value of the given property on the given entity. + + + Generate a new, empty entity. + The new, empty entity instance. + + + + Is the given object considered an instance of the the entity (acconting + for entity-mode) managed by this tuplizer. + + The object to be checked. + True if the object is considered as an instance of this entity within the given mode. + + + + Return the pojo class managed by this tuplizer. + + The persistent class. + + Need to determine how to best handle this for the Tuplizers for EntityModes + other than POCO. + + + + Retrieve the current value of the parent property. + + The component instance from which to extract the parent property value. + + The current value of the parent property. + + + Set the value of the parent property. + The component instance on which to set the parent. + The parent to be set on the component. + The current session factory. + + + Does the component managed by this tuuplizer contain a parent property? + True if the component does contain a parent property; false otherwise. + + + This method does not populate the component parent + + + + Handles mapping s to ComponentTuplizers. +

+ Most of the handling is really in the super class; here we just create + the tuplizers and add them to the superclass +

+
+ + Centralizes handling of to mappings. + + + Given a supposed instance of an entity/component, guess its entity mode. + The supposed instance of the entity/component. + The guessed entity mode. + + + + Locate the contained tuplizer responsible for the given entity-mode. If + no such tuplizer is defined on this mapping, then return null. + + The entity-mode for which the caller wants a tuplizer. + The tuplizer, or null if not found. + + + Locate the tuplizer contained within this mapping which is responsible + for the given entity-mode. If no such tuplizer is defined on this + mapping, then an exception is thrown. + + + The entity-mode for which the caller wants a tuplizer. + + The tuplizer. + + HibernateException Unable to locate the requested tuplizer. + + + Centralizes metamodel information about a component. + + + + A specific to the dynamic-map entity mode. + + + + + A specific to the POCO entity mode. + + + + Support for tuplizers relating to entities. + + + + Defines further responsibilities regarding tuplization based on a mapped entity. + + + EntityTuplizer implementations should have the following constructor signature: + (, ) + + + + Create an entity instance initialized with the given identifier. + The identifier value for the entity to be instantiated. + The instantiated entity. + + + Extract the identifier value from the given entity. + The entity from which to extract the identifier value. + The identifier value. + + + + Inject the identifier value into the given entity. + + The entity to inject with the identifier value. + The value to be injected as the identifier. + Has no effect if the entity does not define an identifier property + + + + Inject the given identifier and version into the entity, in order to + "roll back" to their original values. + + + The identifier value to inject into the entity. + The version value to inject into the entity. + + + Extract the value of the version property from the given entity. + The entity from which to extract the version value. + The value of the version property, or null if not versioned. + + + Inject the value of a particular property. + The entity into which to inject the value. + The property's index. + The property value to inject. + + + Inject the value of a particular property. + The entity into which to inject the value. + The name of the property. + The property value to inject. + + + Extract the values of the insertable properties of the entity (including backrefs) + The entity from which to extract. + a map of instances being merged to merged instances + The session in which the resuest is being made. + The insertable property values. + + + Extract the value of a particular property from the given entity. + The entity from which to extract the property value. + The name of the property for which to extract the value. + The current value of the given property on the given entity. + + + Called just after the entities properties have been initialized. + The entity being initialized. + Are defined lazy properties currently unfecthed + The session initializing this entity. + + + + Generates an appropriate proxy representation of this entity for this entity-mode. + + The id of the instance for which to generate a proxy. + The session to which the proxy should be bound. + The generate proxies. + + + Does the given entity instance have any currently uninitialized lazy properties? + The entity to be check for uninitialized lazy properties. + True if uninitialized lazy properties were found; false otherwise. + + + + Does the class managed by this tuplizer implement + the interface. + + True if the ILifecycle interface is implemented; false otherwise. + + + + Does the class managed by this tuplizer implement + the interface. + + True if the IValidatable interface is implemented; false otherwise. + + + Returns the java class to which generated proxies will be typed. + The .NET class to which generated proxies will be typed + + + Is it an instrumented POCO? + + + Does this entity, for this mode, present a possibility for proxying? + True if this tuplizer can generate proxies for this entity. + + + Constructs a new AbstractEntityTuplizer instance. + The "interpreted" information relating to the mapped entity. + The parsed "raw" mapping data relating to the given entity. + + + Build an appropriate Getter for the given property. + The property to be accessed via the built Getter. + The entity information regarding the mapped entity owning this property. + An appropriate Getter instance. + + + Build an appropriate Setter for the given property. + The property to be accessed via the built Setter. + The entity information regarding the mapped entity owning this property. + An appropriate Setter instance. + + + Build an appropriate Instantiator for the given mapped entity. + The mapping information regarding the mapped entity. + An appropriate Instantiator instance. + + + Build an appropriate ProxyFactory for the given mapped entity. + The mapping information regarding the mapped entity. + The constructed Getter relating to the entity's id property. + The constructed Setter relating to the entity's id property. + An appropriate ProxyFactory instance. + + + Extract a component property value. + The component property types. + The component instance itself. + The property path for the property to be extracted. + The property value extracted. + + + Return the entity-mode handled by this tuplizer instance. + + + Retrieves the defined entity-name for the tuplized entity. + + + + Retrieves the defined entity-names for any subclasses defined for this entity. + + + + + Handles mapping s to s. + + + Most of the handling is really in the super class; here we just create + the tuplizers and add them to the superclass + + + + + Instantiates a EntityEntityModeToTuplizerMapping based on the given + entity mapping and metamodel definitions. + + The entity mapping definition. + The entity metamodel definition. + + + An specific to the POCO entity mode. + + + Contract for implementors responsible for instantiating entity/component instances. + + + Perform the requested entity instantiation. + The id of the entity to be instantiated. + An appropriately instantiated entity. + This form is never called for component instantiation, only entity instantiation. + + + Perform the requested instantiation. + The instantiated data structure. + + + + Performs check to see if the given object is an instance of the entity + or component which this Instantiator instantiates. + + The object to be checked. + True is the object does represent an instance of the underlying entity/component. + + + + Represents a defined entity identifier property within the Hibernate + runtime-metamodel. + + + Author: Steve Ebersole + + + + + Defines the basic contract of a Property within the runtime metamodel. + + + + + Constructor for Property instances. + + The name by which the property can be referenced within its owner. + The node name to use for XML-based representation of this property. + The Hibernate Type of this property. + + + + Construct a non-virtual identifier property. + + The name of the property representing the identifier within + its owning entity. + The node name to use for XML-based representation of this + property. + The Hibernate Type for the identifier property. + Is this an embedded identifier. + The value which, if found as the value on the identifier + property, represents new (i.e., un-saved) instances of the owning entity. + The generator to use for id value generation. + + + + Construct a virtual IdentifierProperty. + + The Hibernate Type for the identifier property. + Is this an embedded identifier. + The value which, if found as the value on the identifier + property, represents new (i.e., un-saved) instances of the owning entity. + The generator to use for id value generation. + + + + Defines a POCO-based instantiator for use from the tuplizers. + + + + Responsible for generation of runtime metamodel representations. + Makes distinction between identifier, version, and other (standard) properties. + + + Author: Steve Ebersole + + + + + Generates an IdentifierProperty representation of the for a given entity mapping. + + The mapping definition of the entity. + The identifier value generator to use for this identifier. + The appropriate IdentifierProperty definition. + + + + Generates a VersionProperty representation for an entity mapping given its + version mapping Property. + + The version mapping Property. + Is property lazy loading currently available. + The appropriate VersionProperty definition. + + + + Generate a "standard" (i.e., non-identifier and non-version) based on the given + mapped property. + + The mapped property. + Is property lazy loading currently available. + The appropriate StandardProperty definition. + + + + Represents a basic property within the Hibernate runtime-metamodel. + + + Author: Steve Ebersole + + + + + Constructs StandardProperty instances. + + The name by which the property can be referenced within + its owner. + The node name to use for XML-based representation of this + property. + The Hibernate Type of this property. + Should this property be handled lazily? + Is this property an insertable value? + Is this property an updateable value? + Is this property generated in the database on insert? + Is this property generated in the database on update? + Is this property a nullable value? + Is this property a checkable value? + Is this property a versionable value? + The cascade style for this property's value. + Any fetch mode defined for this property + + + + Represents a version property within the Hibernate runtime-metamodel. + + + Author: Steve Ebersole + + + + + Constructs VersionProperty instances. + + The name by which the property can be referenced within + its owner. + The node name to use for XML-based representation of this + property. + The Hibernate Type of this property. + Should this property be handled lazily? + Is this property an insertable value? + Is this property an updateable value? + Is this property generated in the database on insert? + Is this property generated in the database on update? + Is this property a nullable value? + Is this property a checkable value? + Is this property a versionable value? + The cascade style for this property's value. + The value which, if found as the value of + this (i.e., the version) property, represents new (i.e., un-saved) + instances of the owning entity. + + + Logic to bind stream of byte into a VARBINARY + + + + Superclass for mutable nullable types. + + + + + Superclass of single-column nullable types. + + + Maps the Property to a single column that is capable of storing nulls in it. If a .net Struct is + used it will be created with its unitialized value and then on Update the uninitialized value of + the Struct will be written to the column - not . + + + + + The base implementation of the interface. + Mapping of the built in Type hierarchy. + + + + + Disassembles the object into a cacheable representation. + + The value to disassemble. + The is not used by this method. + optional parent entity object (needed for collections) + The disassembled, deep cloned state of the object + + This method calls DeepCopy if the value is not null. + + + + + Reconstructs the object from its cached "disassembled" state. + + The disassembled state from the cache + The is not used by this method. + The parent Entity object is not used by this method + The assembled object. + + This method calls DeepCopy if the value is not null. + + + + + Should the parent be considered dirty, given both the old and current + field or element value? + + The old value + The current value + The is not used by this method. + true if the field is dirty + This method uses IType.Equals(object, object) to determine the value of IsDirty. + + + + Retrives an instance of the mapped class, or the identifier of an entity + or collection from a . + + The that contains the values. + + The names of the columns in the that contain the + value to populate the IType with. + + the session + The parent Entity + An identifier or actual object mapped by this IType. + + This method uses the IType.NullSafeGet(IDataReader, string[], ISessionImplementor, object) method + to Hydrate this . + + + + + Maps identifiers to Entities or Collections. + + An identifier or value returned by Hydrate() + The is not used by this method. + The parent Entity is not used by this method. + The value. + + There is nothing done in this method other than return the value parameter passed in. + + + + + Says whether the value has been modified + + + + + When implemented by a class, returns a deep copy of the persistent + state, stopping at entities and at collections. + A Collection element or Entity fieldThe entityMode.The session factory.A deep copy of the object. + + + + When implemented by a class, returns the SqlTypes for the columns mapped by this IType. + The that uses this IType.An array of s. + + + + When implemented by a class, returns how many columns are used to persist this type. + The that uses this IType.The number of columns this IType spans.MappingException + + + + + + + + + + When implemented by a class, puts the value/values from the mapped + class into the . + The to put the values into.The object that contains the values.The index of the to start writing the values to.Indicates which columns are to be set. + Implementors should handle possibility of null values. + A multi-column type should be written to parameters starting from . + + + + + When implemented by a class, puts the value/values from the mapped + class into the . + + The to put the values into. + The object that contains the values. + The index of the to start writing the values to. + + Implementors should handle possibility of null values. + A multi-column type should be written to parameters starting from . + + + + + When implemented by a class, a representation of the value to be + embedded in an XML element + The object that contains the values.An Xml formatted string. + + + + Gets a value indicating if the is an . + + false - by default an is not an . + + + + Gets a value indicating if the is a . + + false - by default an is not a . + + + + Gets a value indicating if the is an . + + false - by default an is not an . + + + + Gets a value indicating if the is a . + + false - by default an is not a . + + + + Gets a value indicating if the implementation is an "object" type + + false - by default an is not a "object" type. + + + + When implemented by a class, gets the value indicating if the objects + of this IType are mutable. + true if the objects mapped by this IType are mutable. + With respect to the referencing object... + Entities and Collections are considered immutable because they manage their own internal state. + + + + + When implemented by a class, gets the abbreviated name of the type. + The NHibernate type name. + + + + When implemented by a class, gets the returned + by the NullSafeGet() methods. + + The from the .NET framework. + + This is used to establish the class of an array of this Itype + + + + + Initialize a new instance of the NullableType class using a + . + + The underlying . + This is used when the Property is mapped to a single column. + + + + When implemented by a class, put the value from the mapped + Property into to the . + + The to put the value into. + The object that contains the value. + The index of the to start writing the values to. + + Implementors do not need to handle possibility of null values because this will + only be called from after + it has checked for nulls. + + + + + When implemented by a class, gets the object in the + for the Property. + + The that contains the value. + The index of the field to get the value from. + An object with the value from the database. + + + + When implemented by a class, gets the object in the + for the Property. + + The that contains the value. + The name of the field to get the value from. + An object with the value from the database. + + Most implementors just call the + overload of this method. + + + + + A representation of the value to be embedded in an XML element + + The object that contains the values. + + An Xml formatted string. + + + + When implemented by a class, a representation of the value to be + embedded in an XML element + The object that contains the values.An Xml formatted string. + + + This implementation forwards the call to if the parameter + value is not null. + + + It has been "sealed" because the Types inheriting from + do not need and should not override this method. All of their implementation + should be in . + + + + + + Parse the XML representation of an instance + + XML string to parse, guaranteed to be non-empty + + + + + When implemented by a class, puts the value/values from the mapped + class into the . + + The to put the values into. + The object that contains the values. + The index of the to start writing the values to. + + Implementors should handle possibility of null values. + A multi-column type should be written to parameters starting from . + + + + This implementation forwards the call to . + + + It has been "sealed" because the Types inheriting from + do not need to and should not override this method. All of their implementation + should be in . + + + + + + Puts the value from the mapped class into the . + + The to put the values into. + The object that contains the values. + The index of the to write the value to. + + + This method checks to see if value is null, if it is then the value of + is written to the . + + + If the value is not null, then the method + is called and that method is responsible for setting the value. + + + + + + When implemented by a class, gets an instance of the object mapped by + this IType from the . + The that contains the values + The names of the columns in the that contain the + value to populate the IType with. + The object mapped by this IType. + Implementors should handle possibility of null values. + + + This has been sealed because no other class should override it. This + method calls for a single value. + It only takes the first name from the string[] names parameter - that is a + safe thing to do because a Nullable Type only has one field. + + + + + Extracts the values of the fields from the DataReader + + The DataReader positioned on the correct record + An array of field names. + The value off the field from the DataReader + + In this class this just ends up passing the first name to the NullSafeGet method + that takes a string, not a string[]. + + I don't know why this method is in here - it doesn't look like anybody that inherits + from NullableType overrides this... + + TODO: determine if this is needed + + + + + Gets the value of the field from the . + + The positioned on the correct record. + The name of the field to get the value from. + The value of the field. + + + This method checks to see if value is null, if it is then the null is returned + from this method. + + + If the value is not null, then the method + is called and that method is responsible for retrieving the value. + + + + + + When implemented by a class, gets an instance of the object + mapped by this IType from the . + The that contains the valuesThe name of the column in the that contains the + value to populate the IType with.The object mapped by this IType. + Implementations should handle possibility of null values. + This method might be called if the IType is known to be a single-column type. + + + + This implementation forwards the call to . + + + It has been "sealed" because the Types inheriting from + do not need to and should not override this method. All of their implementation + should be in . + + + + + + When implemented by a class, returns the SqlTypes for the columns mapped by this IType. + The that uses this IType.An array of s. + + + This implementation forwards the call to . + + + It has been "sealed" because the Types inheriting from + do not need to and should not override this method because they map to a single + column. All of their implementation should be in . + + + + + + Returns the number of columns spanned by this + + A always returns 1. + + This has the hard coding of 1 in there because, by definition of this class, + a NullableType can only map to one column in a table. + + + + + Determines whether the specified is equal to this + . + + The to compare with this NullableType. + true if the SqlType and Name properties are the same. + + + + Serves as a hash function for the , + suitable for use in hashing algorithms and data structures like a hash table. + + + A hash code that is based on the 's + hash code and the 's hash code. + + + + Gets the underlying for + the column mapped by this . + + The underlying . + + This implementation should be suitable for all subclasses unless they need to + do some special things to get the value. There are no built in s + that override this Property. + + + + + Initialize a new instance of the MutableType class using a + . + + The underlying . + + + + Gets the value indicating if this IType is mutable. + + true - a is mutable. + + This has been "sealed" because any subclasses are expected to be mutable. If + the type is immutable then they should inherit from . + + + + + An that may be used to version data. + + + + + When implemented by a class, increments the version. + + The current version + The current session, if available. + an instance of the that has been incremented. + + + + When implemented by a class, gets an initial version. + + The current session, if available. + An instance of the type. + + + + Are the two version values considered equal? + + One value to check. + The other value to check. + true if the values are equal, false otherwise. + + + + Get a comparator for the version numbers + + + + Convert the byte[] into the expected object type + + + Convert the object into the internal byte[] representation + + + + Common base class for and . + + + + + Superclass of types. + + + + + Superclass of nullable immutable types. + + + + + Initialize a new instance of the ImmutableType class using a + . + + The underlying . + + + + Gets the value indicating if this IType is mutable. + + false - an is not mutable. + + This has been "sealed" because any subclasses are expected to be immutable. If + the type is mutable then they should inherit from . + + + + + An that may appear as an SQL literal + + + + + When implemented by a class, return a representation + of the value, suitable for embedding in an SQL statement + + The object to convert to a string for the SQL statement. + + A string that contains a well formed SQL Statement. + + + + Initialize a new instance of the PrimitiveType class using a . + + The underlying . + + + + When implemented by a class, return a representation + of the value, suitable for embedding in an SQL statement + + The object to convert to a string for the SQL statement. + + A string that containts a well formed SQL Statement. + + + + A representation of the value to be embedded in an XML element + + The object that contains the values. + + An Xml formatted string. + + This just calls so if there is + a possibility of this PrimitiveType having any characters + that need to be encoded then this method should be overridden. + + + + + An IType that may be used for a discriminator column. + + + This interface contains no new methods but does require that an + that will be used in a discriminator column must implement + both the and interfaces. + + + + + An that may be used as an identifier. + + + + + When implemented by a class, converts the xml string from the + mapping file to the .NET object. + + The value of discriminator-value or unsaved-value attribute. + The string converted to the object. + + This method needs to be able to handle any string. It should not just + call System.Type.Parse without verifying that it is a parsable value + for the System.Type. + + + + + Base class for enum types. + + + + + Maps a Property + to a DbType.AnsiStringFixedLength column. + + + + + Maps a Property + to a column. + + + + + + + + Handles "any" mappings and the old deprecated "object" type. + + + The identifierType is any NHibernate IType that can be serailized by default. + For example, you can specify the identifierType as an Int32 or a custom identifier + type that you built. The identifierType matches to one or many columns. + + The metaType maps to a single column. By default it stores the name of the Type + that the Identifier identifies. + + For example, we can store a link to any table. It will have the results + class_name id_col1 + ======================================== + Simple, AssemblyName 5 + DiffClass, AssemblyName 5 + Simple, AssemblyName 4 + + You can also provide you own type that might map the name of the class to a table + with a giant switch statemet or a good naming convention for your class->table. The + data stored might look like + class_name id_col1 + ======================================== + simple_table 5 + diff_table 5 + simple_table 4 + + + + + + Enables other Component-like types to hold collections and have cascades, etc. + + + + + Get the values of the component properties of + a component instance + + + + + Optional Operation + + + + + Optional operation + + + + Get the types of the component properties + + + Get the names of the component properties + + + + Optional operation + + nullability of component properties + + + + An that represents some kind of association between entities. + + + + + Get the "persister" for this association - a class or collection persister + + + + + + Get the entity name of the associated entity + + + + Get the "filtering" SQL fragment that is applied in the + SQL on clause, in addition to the usual join condition. + + + + + When implemented by a class, gets the type of foreign key directionality + of this association. + + The of this association. + + + + Is the primary key of the owning entity table + to be used in the join? + + + + + Get the name of the property in the owning entity + that provides the join key (null if the identifier) + + + + + The name of a unique property of the associated entity + that provides the join key (null if the identifier of + an entity, or key of a collection) + + + + + Do we dirty check this association, even when there are + no columns to be updated. + + + + + + + + + + + + + + + Not really relevant to AnyType, since it cannot be "joined" + + + + + An that maps an collection + to the database. + + + + + The base class for an that maps collections + to the database. + + + + + Initializes a new instance of a class for + a specific role. + + The role the persistent collection is in. + + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + + + + + + Instantiate an uninitialized collection wrapper or holder. Callers MUST add the holder to the + persistence context! + + The session from which the request is originating. + The underlying collection persister (metadata) + The owner key. + The instantiated collection. + + + + Wrap the naked collection instance in a wrapper, or instantiate a + holder. Callers MUST add the holder to the persistence context! + + The session from which the request is originating. + The bare collection to be wrapped. + + A subclass of that wraps the non NHibernate collection. + + + + + Get the key value from the owning entity instance, usually the identifier, but might be some + other unique key, in the case of property-ref + + + + + Get the id value from the owning entity key, usually the same as the key, but might be some + other property, in the case of property-ref + + The collection owner key + The session from which the request is originating. + + The collection owner's id, if it can be obtained from the key; + otherwise, null is returned + + + + + Instantiate an empty instance of the "underlying" collection (not a wrapper), + but with the given anticipated size (i.e. accounting for initial capacity + and perhaps load factor). + + + The anticipated size of the instantiated collection after we are done populating it. + + A newly instantiated collection to be wrapped. + + + + Get an iterator over the element set of the collection, which may not yet be wrapped + + The collection to be iterated + The session from which the request is originating. + The iterator. + + + + Get an iterator over the element set of the collection in POCO mode + + The collection to be iterated + The iterator. + + + + We always need to dirty check the collection because we sometimes + need to increment version number of owner and also because of + how assemble/disassemble is implemented for uks + + + + + Initializes a new instance of a class for + a specific role. + + The role the persistent collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + The of the element contained in the array. + + + This creates a bag that is non-generic. + + + + + + + + + + + + + + Wraps a in a . + + The for the collection to be a part of. + The unwrapped array. + + An that wraps the non NHibernate . + + + + + The for the element. + + + + + + + + An that maps an collection + using bag semantics to the database. + + + + + Initializes a new instance of a class for + a specific role. + + The role the persistent collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + + + + + Instantiates a new for the bag. + + The current for the bag. + + + A new . + + + + Wraps an in a NHibernate . + + The for the collection to be a part of. + The unwrapped . + + An that wraps the non NHibernate . + + + + + + + + Maps a System.Byte[] Property to an column that can store a BLOB. + + + This is only needed by DataProviders (SqlClient) that need to specify a Size for the + IDbDataParameter. Most DataProvider(Oralce) don't need to set the Size so a BinaryType + would work just fine. + + + + + BinaryType. + + + + + + + + Maps a Property + to a column. + + + + + Initialize a new instance of the BooleanType + + This is used when the Property is mapped to a native boolean type. + + + + Initialize a new instance of the BooleanType class using a + . + + The underlying . + + This is used when the Property is mapped to a string column + that stores true or false as a string. + + + + + Maps a property + to a column. + + + + + Maps a Property + to a column. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Maps a Property + to a DbType.StringFixedLength column. + + + + + ClassMetaType is a NH specific type to support "any" with meta-type="class" + + + It work like a MetaType where the key is the entity-name it self + + + + + + + + + + + + + + + + + + + + + This method does not populate the component parent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Summary description for CompositeCustomType. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Maps a Property + to a column. + + + CultureInfoType stores the culture name (not the Culture ID) of the + in the DB. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Maps a Property + to a column. + + + + + A custom type for mapping user-written classes that implement + . + + + + + + + Adapts IUserType to the generic IType interface. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Maps a Property to a + + + + + Maps a Property to a column that + stores date & time down to the accuracy of a second. + + + This only stores down to a second, so if you are looking for the most accurate + date and time storage your provider can give you use the . + or the + + + + + + + + + + + + + + Maps a Property to a + + + + + + + + Maps the Year, Month, and Day of a Property to a + column + + + + + + + + + + An extension of which + maps to the database's current timestamp, rather than the vm's + current timestamp. + + + Note: May/may-not cause issues on dialects which do not properly support + a true notion of timestamp + + + + + This is almost the exact same type as the DateTime except it can be used + in the version column, stores it to the accuracy the database supports, + and will default to the value of DateTime.Now if the value is null. + + +

+ The value stored in the database depends on what your data provider is capable + of storing. So there is a possibility that the DateTime you save will not be + the same DateTime you get back when you check DateTime.Equals(DateTime) because + they will have their milliseconds off. +

+

+ For example - SQL Server 2000 is only accurate to 3.33 milliseconds. So if + NHibernate writes a value of 01/01/98 23:59:59.995 to the Prepared Command, MsSql + will store it as 1998-01-01 23:59:59.997. +

+

+ Please review the documentation of your Database server. +

+
+
+ + + Sets the value of this Type in the IDbCommand. + + The IDbCommand to add the Type's value to. + The value of the Type. + The index of the IDataParameter in the IDbCommand. + + No null values will be written to the IDbCommand for this Type. + + + + + Maps a Property + to a column. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A reference to an entity class + + + + Constructs the requested entity type mapping. + The name of the associated entity. + + The property-ref name, or null if we + reference the PK of the associated entity. + + Is eager fetching enabled. + Should values of this mapping be embedded in XML modes? + + Is unwrapping of proxies allowed for this association; unwrapping + says to return the "implementation target" of lazy prooxies; typically only possible + with lazy="no-proxy". + + + + Two entities are considered the same when their instances are the same. + One entity instance + Another entity instance + The entity mode. + True if x == y; false otherwise. + + + + Get the identifier value of an instance or proxy. +

+ Intended only for loggin purposes!!! +

+ The object from which to extract the identifier. + The entity persister + The entity mode + The extracted identifier. +
+ + + Converts the id contained in the to an object. + + The that contains the query results. + A string array of column names that contain the id. + The this is occurring in. + The object that this Entity will be a part of. + + An instance of the object or if the identifer was null. + + + + Retrieves the {@link Joinable} defining the associated entity. + The session factory. + The associated joinable + + + + Determine the type of either (1) the identifier if we reference the + associated entity's PK or (2) the unique key to which we refer (i.e. + the property-ref). + + The mappings... + The appropriate type. + + + + The name of the property on the associated entity to which our FK refers + + The mappings... + The appropriate property name. + + + Convenience method to locate the identifier type of the associated entity. + The mappings... + The identifier type + + + Convenience method to locate the identifier type of the associated entity. + The originating session + The identifier type + + + + Resolves the identifier to the actual object. + + + + + Resolve an identifier or unique key value + + + + + + + + The name of the associated entity. + The session factory, for resolution. + The associated entity name. + + + The name of the associated entity. + The associated entity name. + + + + Load an instance by a unique key that is not the primary key. + + The name of the entity to load + The name of the property defining the uniqie key. + The unique key property value. + The originating session. + The loaded entity + + + Explicitly, an entity type is an entity type + True. + + + + This returns the wrong class for an entity with a proxy, or for a named + entity. Theoretically it should return the proxy class, but it doesn't. +

+ The problem here is that we do not necessarily have a ref to the associated + entity persister (nor to the session factory, to look it up) which is really + needed to "do the right thing" here... +

+
+ + + + + + + + + When implemented by a class, gets the type of foreign key directionality + of this association. + + The of this association. + + + + Is the foreign key the primary key of the table? + + + + + Converts the given enum instance into a basic type. + + + + + + + Maps a to a + DbType.String. + + + If your database should store the + using the named values in the enum instead of the underlying values + then subclass this . + + + All that needs to be done is to provide a default constructor that + NHibernate can use to create the specific type. For example, if + you had an enum defined as. + + + + public enum MyEnum + { + On, + Off, + Dimmed + } + + + + all that needs to be written for your enum string type is: + + + + public class MyEnumStringType : NHibernate.Type.EnumStringType + { + public MyEnumStringType() + : base( typeof( MyEnum ) ) + { + } + } + + + + The mapping would look like: + + + + ... + <property name="Status" type="MyEnumStringType, AssemblyContaining" /> + ... + + + + The TestFixture that shows the working code can be seen + in NHibernate.Test.TypesTest.EnumStringTypeFixture.cs + , NHibernate.Test.TypesTest.EnumStringClass.cs + , and NHibernate.Test.TypesTest.EnumStringClass.hbm.xml + + + + + + Hardcoding of 255 for the maximum length + of the Enum name that will be saved to the db. + + + 255 because that matches the default length that hbm2ddl will + use to create the column. + + + + + Initializes a new instance of . + + The of the Enum. + + + + Initializes a new instance of . + + The of the Enum. + The length of the string that can be written to the column. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This appends enumstring - to the beginning of the underlying + enums name so that could still be stored + using the underlying value through the + also. + + + + + Represents directionality of the foreign key constraint + + + + + A foreign key from parent to child + + + + + A foreign key from child to parent + + + + + Should we cascade at this cascade point? + + + + + An that maps an collection + to the database using bag semantics. + + + + + Initializes a new instance of a class for + a specific role. + + The role the persistent collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + + + + Instantiates a new for the bag. + + The current for the bag. + The current for the bag. + + + + + Wraps an in a . + + The for the collection to be a part of. + The unwrapped . + + An that wraps the non NHibernate . + + + + + An that maps an collection + using bag semantics with an identifier to the database. + + + + + Initializes a new instance of a class for + a specific role. + + The role the persistent collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + + + + + Instantiates a new for the identifier bag. + + The current for the identifier bag. + + + + + + + Wraps an in a . + + The for the collection to be a part of. + The unwrapped . + + An that wraps the non NHibernate . + + + + + + + + An that maps an collection + to the database using list semantics. + + + + + An that maps an collection + using list semantics to the database. + + + + + Initializes a new instance of a class for + a specific role. + + The role the persistent collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + + + + + Instantiates a new for the bag. + + The current for the bag. + + + A new . + + + + Wraps an exist in a NHibernate . + + The for the collection to be a part of. + The unwrapped . + + An that wraps the non NHibernate . + + + + + + + + Initializes a new instance of a class for + a specific role. + + The role the persistent collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + + + + Instantiates a new for the list. + + The current for the list. + The current for the list. + + + + + Wraps an in a . + + The for the collection to be a part of. + The unwrapped . + + An that wraps the non NHibernate . + + + + + An that maps an collection + to the database. + + + + + An that maps an collection + to the database. + + + + + Initializes a new instance of a class for + a specific role. + + The role the persistent collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + + + + + Instantiates a new for the map. + + The current for the map. + + + + + + + Wraps an in a . + + The for the collection to be a part of. + The unwrapped . + + An that wraps the non NHibernate . + + + + + + + + Initializes a new instance of a class for + a specific role. + + The role the persistent collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + + + + Instantiates a new for the map. + + The current for the map. + + Not used. + + + + + Wraps an in a . + + The for the collection to be a part of. + The unwrapped . + + An that wraps the + non NHibernate . + + + + + An that maps a sorted collection + to the database. + + + + + An that maps an collection + to the database. + + + + + An that maps an collection + to the database. + + + + + Initializes a new instance of a class for + a specific role. + + The role the persistent collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + + + + + Instantiates a new for the set. + + The current for the set. + + + + + + + Wraps an in a . + + The for the collection to be a part of. + The unwrapped . + + An that wraps the non NHibernate . + + + + + + + + + + Initializes a new instance of a class for + a specific role. + + The role the persistent collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + + + + Instantiates a new for the set. + + The current for the set. + The current for the set. + + + + + Wraps an in a . + + The for the collection to be a part of. + The unwrapped . + + An that wraps the non NHibernate . + + + + + Initializes a new instance of a class for + a specific role. + + The role the persistent collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + + + + An that maps a sorted collection + to the database. + + + + + Initializes a new instance of a class for + a specific role. + + The role the persistent collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + The to use to compare + set elements. + + + + Maps a Property + to a column. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Maps a Property + to a column. + + + + + + + + + + + Maps a Property + to a column. + + + + + + + + + + + Maps a Property + to a column. + + + + + + + + + + + A many-to-one association to an entity + + + + + Hydrates the Identifier from . + + The that contains the query results. + A string array of column names to read from. + The this is occurring in. + The object that this Entity will be a part of. + + An instantiated object that used as the identifier of the type. + + + + + A one-to-one association to an entity + + + + + We don't need to dirty check one-to-one because of how + assemble/disassemble is implemented and because a one-to-one + association is never dirty + + + + + A implemented using a collection that maintains + the order in which elements are inserted into it. + + + + + Initializes a new instance of a class. + + The role the persistent collection is in. + + + + + + A implemented using a collection that maintains + the order in which elements are inserted into it. + + + + + Initializes a new instance of a class + + The role the persistent collection is in. + + + + + + PersistentEnumType + + + + + Gets an instance of the Enum + + The underlying value of an item in the Enum. + + An instance of the Enum set to the code value. + + + + + Gets the correct value for the Enum. + + The value to convert (an enum instance). + A boxed version of the code, converted to the correct type. + + This handles situations where the DataProvider returns the value of the Enum + from the db in the wrong underlying type. It uses to + convert it to the correct type. + + + + + Maps a Property + to a column. + + + + + + + + + + + Maps an instance of a that has the + to a column. + + + + The SerializableType should be used when you know that Bytes are + not going to be greater than 8,000. + + + The base class is because the data is stored in + a byte[]. The System.Array does not have a nice "equals" method so we must + do a custom implementation. + + + + + + + + + + + + + + + + + + + + + + + Thrown when a property cannot be serialized/deserialized + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message that describes the error. + + + + Initializes a new instance of the class. + + The message that describes the error. + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Maps a Property to an + column. + + + Verify through your database's documentation if there is a column type that + matches up with the capabilities of + + + + + + + + + + + Extends the to provide sorting. + + + + + Initializes a new instance of a class for + a specific role using the to do the sorting. + + The role the persistent collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + The to use for the sorting. + + + + + Extends the to provide sorting. + + + + + Initializes a new instance of a class for + a specific role using the to do the sorting. + + The role the persistent collection is in. + The name of the property in the + owner object containing the collection ID, or if it is + the primary key. + The to use for the sorting. + + + + + A one-to-one association that maps to specific formula(s) + instead of the primary key column of the owning entity. + + + + + Maps a Property to an + column that can store a CLOB. + + + This is only needed by DataProviders (SqlClient) that need to specify a Size for the + IDbDataParameter. Most DataProvider(Oralce) don't need to set the Size so a StringType + would work just fine. + + + + + Maps a to a column. + + + + + + + + + + + + + + + + + Maps a Property to an column + that stores the DateTime using the Ticks property. + + + This is the recommended way to "timestamp" a column. + The System.DateTime.Ticks is accurate to 100-nanosecond intervals. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Maps a Property to an column + This is an extra way to map a . You already have + but mapping against a . + + + + + Maps a Property to an column + + + + + + + + + + + + + + + + + + + + + + + + + Maps a Property to an DateTime column that only stores the + Hours, Minutes, and Seconds of the DateTime as significant. + Also you have for handling, the NHibernate Type , + the which maps to a . + + + + This defaults the Date to "1753-01-01" - that should not matter because + using this Type indicates that you don't care about the Date portion of the DateTime. + + + A more appropriate choice to store the duration/time is the . + The underlying tends to be handled differently by different + DataProviders. + + + + + + Maps a to a 1 char column + that stores a 'T'/'F' to indicate true/false. + + + If you are using schema-export to generate your tables then you need + to set the column attributes: length=1 or sql-type="char(1)". + + This needs to be done because in Java's JDBC there is a type for CHAR and + in ADO.NET there is not one specifically for char, so you need to tell schema + export to create a char(1) column. + + + + + + + + + + + + + + + + + Used internally to obtain instances of IType. + + + Applications should use static methods and constants on NHibernate.NHibernateUtil if the default + IType is good enough. For example, the TypeFactory should only be used when the String needs + to have a length of 300 instead of 255. At this point NHibernate.String does not get you the + correct IType. Instead use TypeFactory.GetString(300) and keep a local variable that holds + a reference to the IType. + + + + + + + + Register other Default .NET type + + + These type will be used, as default, even when the "type" attribute was NOT specified in the mapping + + + + + Register other NO Default .NET type + + + These type will be used only when the "type" attribute was is specified in the mapping. + These are in here because needed to NO override default CLR types and be available in mappings + + + + + Gets the classification of the Type based on the string. + + The name of the Type to get the classification for. + The Type of Classification + + This parses through the string and makes the assumption that no class + name and no assembly name will contain the "(". + + If it finds + the "(" and then finds a "," afterwards then it is a + TypeClassification.PrecisionScale. + + + If it finds the "(" + and doesn't find a "," afterwards, then it is a + TypeClassification.Length. + + + If it doesn't find the "(" then it assumes that it is a + TypeClassification.Plain. + + + + + + Given the name of a Hibernate type such as Decimal, Decimal(19,0) + , Int32, or even NHibernate.Type.DecimalType, NHibernate.Type.DecimalType(19,0), + NHibernate.Type.Int32Type, then return an instance of NHibernate.Type.IType + + The name of the type. + The instance of the IType that the string represents. + + This method will return null if the name is not found in the basicNameMap. + + + + + Uses heuristics to deduce a NHibernate type given a string naming the + type. + + + An instance of NHibernate.Type.IType + + When looking for the NHibernate type it will look in the cache of the Basic types first. + If it doesn't find it in the cache then it uses the typeName to get a reference to the + Class (Type in .NET). Once we get the reference to the .NET class we check to see if it + implements IType, ICompositeUserType, IUserType, ILifecycle (Association), or + IPersistentEnum. If none of those are implemented then we will serialize the Type to the + database using NHibernate.Type.SerializableType(typeName) + + + + + Uses heuristics to deduce a NHibernate type given a string naming the + type. + + the type name + parameters for the type + An instance of NHibernate.Type.IType + + + + Gets the BinaryType with the specified length. + + The length of the data to store in the database. + A BinaryType + + In addition to returning the BinaryType it will also ensure that it has + been added to the basicNameMap with the keys Byte[](length) and + NHibernate.Type.BinaryType(length). + + + + + Gets the SerializableType for the specified Type + + The Type that will be Serialized to the database. + A SerializableType + + + In addition to returning the SerializableType it will also ensure that it has + been added to the basicNameMap with the keys Type.FullName (the result + of IType.Name and Type.AssemblyQualifiedName. This is different + from the other items put in the basicNameMap because it is uses the AQN and the + FQN as opposed to the short name used in the maps and the FQN. + + + Since this method calls the method + GetSerializableType(System.Type, Int32) + with the default length, those keys will also be added. + + + + + + A one-to-one association type for the given class and cascade style. + + + + + A many-to-one association type for the given class and cascade style. + + + + + + + A many-to-one association type for the given class and cascade style. + + + + + A many-to-one association type for the given class and cascade style. + + + + Deep copy a series of values from one array to another... + The values to copy (the source) + The value types + an array indicating which values to include in the copy + The array into which to copy the values + The originating session + + + Apply the operation across a series of values. + The values + The value types + The originating session + + + + Determine if any of the given field values are dirty, + returning an array containing indexes of + the dirty fields or null if no fields are dirty. + + + + + Determine if any of the given field values are modified, + returning an array containing indexes of + the dirty fields or null if no fields are modified. + + + + + + + + + + + + + + Apply the {@link Type#disassemble} operation across a series of values. + The values + The value types + An array indicating which values to include in the disassembled state + The originating session + The entity "owning" the values + The disassembled state + + + + Apply the operation across a series of values. + + The source of the state + The target into which to replace the source values. + The value types + The originating session + The entity "owning" the values + Represent a cache of already replaced state + The replaced state + + + + Apply the + operation across a series of values. + + The source of the state + The target into which to replace the source values. + The value types + The originating session + The entity "owning" the values + A map representing a cache of already replaced state + FK directionality to be applied to the replacement + The replaced state + + + + Apply the + operation across a series of values, as + long as the corresponding is an association. + + The source of the state + The target into which to replace the source values. + The value types + The originating session + The entity "owning" the values + A map representing a cache of already replaced state + FK directionality to be applied to the replacement + The replaced state + + If the corresponding type is a component type, then apply + across the component subtypes but do not replace the component value itself. + + + + + Maps the Assembly Qualified Name of a to a + column. + + + + + + + + Initialize a new instance of the TypeType class using a + . + + The underlying . + + + + Gets the in the for the Property. + + The that contains the value. + The index of the field to get the value from. + The from the database. + + Thrown when the value in the database can not be loaded as a + + + + + Gets the in the for the Property. + + The that contains the value. + The name of the field to get the value from. + The from the database. + + This just calls gets the index of the name in the IDataReader + and calls the overloaded version + (IDataReader, Int32). + + + Thrown when the value in the database can not be loaded as a + + + + + Puts the Assembly Qualified Name of the + Property into to the . + + The to put the value into. + The that contains the value. + The index of the to start writing the value to. + + This uses the method of the + object to do the work. + + + + + A representation of the value to be embedded in an XML element + + The that contains the values. + + An Xml formatted string that contains the Assembly Qualified Name. + + + + Gets the that will be returned + by the NullSafeGet() methods. + + + A from the .NET framework. + + + + + + + + Maps a Property + to a column. + + + + + + + + + + + Maps a Property + to a column. + + + + + + + + + + + Maps a Property + to a column. + + + + + + + + Maps a to a 1 char column + that stores a 'Y'/'N' to indicate true/false. + + + If you are using schema-export to generate your tables then you need + to set the column attributes: length=1 or sql-type="char(1)". + + This needs to be done because in Java's JDBC there is a type for CHAR and + in ADO.NET there is not one specifically for char, so you need to tell schema + export to create a char(1) column. + + + + + + + + + + + + + + + + + A UserType that may be dereferenced in a query. + This interface allows a custom type to define "properties". + These need not necessarily correspond to physical .NET style properties. + + A ICompositeUserType may be used in almost every way + that a component may be used. It may even contain many-to-one + associations. + + Implementors must be immutable and must declare a public + default constructor. + + Unlike UserType, cacheability does not depend upon + serializability. Instead, Assemble() and + Disassemble() provide conversion to/from a cacheable + representation. + + + + + Get the value of a property + + an instance of class mapped by this "type" + + the property value + + + + Set the value of a property + + an instance of class mapped by this "type" + + the value to set + + + + Compare two instances of the class mapped by this type for persistence + "equality", ie. equality of persistent state. + + + + + + + + Get a hashcode for the instance, consistent with persistence "equality" + + + + + Retrieve an instance of the mapped class from a IDataReader. Implementors + should handle possibility of null values. + + IDataReader + the column names + + the containing entity + + + + + Write an instance of the mapped class to a prepared statement. + Implementors should handle possibility of null values. + A multi-column type should be written to parameters starting from index. + + + + + + + + + Return a deep copy of the persistent state, stopping at entities and at collections. + + generally a collection element or entity field + + + + + Transform the object into its cacheable representation. + At the very least this method should perform a deep copy. + That may not be enough for some implementations, method should perform a deep copy. That may not be enough for some implementations, however; for example, associations must be cached as identifier values. (optional operation) + + the object to be cached + + + + + + Reconstruct an object from the cacheable representation. + At the very least this method should perform a deep copy. (optional operation) + + the object to be cached + + + + + + + During merge, replace the existing (target) value in the entity we are merging to + with a new (original) value from the detached entity we are merging. For immutable + objects, or null values, it is safe to simply return the first parameter. For + mutable objects, it is safe to return a copy of the first parameter. However, since + composite user types often define component values, it might make sense to recursively + replace component values in the target object. + + + + + Get the "property names" that may be used in a query. + + + + + Get the corresponding "property types" + + + + + The class returned by NullSafeGet(). + + + + + Are objects of this type mutable? + + + + + A custom type that may function as an identifier or discriminator + type, or may be marshalled to and from an XML document. + + + + + The interface to be implemented by user-defined types. + + + + The interface abstracts user code from future changes to the interface, + simplifies the implementation of custom types and hides certain "internal interfaces from + user code. + + + Implementers must be immutable and must declare a public default constructor. + + + The actual class mapped by a IUserType may be just about anything. However, if it is to + be cacheble by a persistent cache, it must be serializable. + + + Alternatively, custom types could implement directly or extend one of the + abstract classes in NHibernate.Type. This approach risks future incompatible changes + to classes or interfaces in the package. + + + + + + Compare two instances of the class mapped by this type for persistent "equality" + ie. equality of persistent state + + + + + + + + Get a hashcode for the instance, consistent with persistence "equality" + + + + + Retrieve an instance of the mapped class from a JDBC resultset. + Implementors should handle possibility of null values. + + a IDataReader + column names + the containing entity + + HibernateException + + + + Write an instance of the mapped class to a prepared statement. + Implementors should handle possibility of null values. + A multi-column type should be written to parameters starting from index. + + a IDbCommand + the object to write + command parameter index + HibernateException + + + + Return a deep copy of the persistent state, stopping at entities and at collections. + + generally a collection element or entity field + a copy + + + + During merge, replace the existing () value in the entity + we are merging to with a new () value from the detached + entity we are merging. For immutable objects, or null values, it is safe to simply + return the first parameter. For mutable objects, it is safe to return a copy of the + first parameter. For objects with component values, it might make sense to + recursively replace component values. + + the value from the detached entity being merged + the value in the managed entity + the managed entity + the value to be merged + + + + Reconstruct an object from the cacheable representation. At the very least this + method should perform a deep copy if the type is mutable. (optional operation) + + the object to be cached + the owner of the cached object + a reconstructed object from the cachable representation + + + + Transform the object into its cacheable representation. At the very least this + method should perform a deep copy if the type is mutable. That may not be enough + for some implementations, however; for example, associations must be cached as + identifier values. (optional operation) + + the object to be cached + a cacheable representation of the object + + + + The SQL types for the columns mapped by this type. + + + + + The type returned by NullSafeGet() + + + + + Are objects of this type mutable? + + + + + Parse a string representation of this value, as it appears + in an XML document. + + + + + Return an SQL literal representation of the value + + + + + Return a string representation of this value, as it + should appear in an XML document + + + + + Marker interface for user types which want to perform custom + logging of their corresponding values + + + + Generate a loggable string representation of the collection (value). + The collection to be logged; guaranteed to be non-null and initialized. + The factory. + The loggable string representation. + + + + Support for parameterizable types. A UserType or CustomUserType may be + made parameterizable by implementing this interface. Parameters for a + type may be set by using a nested type element for the property element + + + + + Gets called by Hibernate to pass the configured type parameters to + the implementation. + + + + + Instantiate an uninitialized instance of the collection wrapper + + + + + Wrap an instance of a collection + + + + + Return an over the elements of this collection - the passed collection + instance may or may not be a wrapper + + + + + Optional operation. Does the collection contain the entity instance? + + + + + Optional operation. Return the index of the entity in the collection. + + + + + Replace the elements of a collection with the elements of another collection + + + + + Instantiate an empty instance of the "underlying" collection (not a wrapper), + but with the given anticipated size (i.e. accounting for initial size + and perhaps load factor). + + + The anticipated size of the instantiated collection + after we are done populating it. Note, may be negative to indicate that + we not yet know anything about the anticipated size (i.e., when initializing + from a result set row by row). + + + + + A user type that may be used for a version property. + + + + + Generate an initial version. + + The session from which this request originates. May be + null; currently this only happens during startup when trying to determine + the "unsaved value" of entities. + an instance of the type + + + + Increment the version. + + The session from which this request originates. + the current version + an instance of the type + + + + Helper class that contains common array functions and + data structures used through out NHibernate. + + + + + Sets item at position to . + Expands the list by adding values, if needed. + + + + + Computes a hash code for . + + The hash code is computed as the sum of hash codes of + individual elements, so that the value is independent of the + collection iteration order. + + + + + Creates a that uses case-insensitive string comparison + associated with invariant culture. + + + This is different from the method in + in that the latter uses the current culture and is thus vulnerable to the "Turkish I" problem. + + + + + Creates a that uses case-insensitive string comparison + associated with invariant culture. + + + This is different from the method in + in that the latter uses the current culture and is thus vulnerable to the "Turkish I" problem. + + + + + Computes a hash code for . + + The hash code is computed as the sum of hash codes of + individual elements, so that the value is independent of the + collection iteration order. + + + + + A read-only dictionary that is always empty and permits lookup by key. + + + + + A read-only dictionary that is always empty and permits lookup by key. + + + + + Utility class implementing ToString for collections. All ToString + overloads call element.ToString(). + + + To print collections of entities or typed values, use + . + + + + + + + + Get only filters enabled for many-to-one association. + + All enabled filters + A new for filters enabled for many to one. + + + + An where keys are compared by object identity, rather than equals. + + All external users of this class need to have no knowledge of the IdentityKey - it is all + hidden by this class. + + + + Do NOT use a System.Value type as the key for this Hashtable - only classes. See + the google thread + about why using System.Value is a bad thing. + + + If I understand it correctly, the first call to get an object defined by a DateTime("2003-01-01") + would box the DateTime and return the identity key for the box. If you were to get that Key and + unbox it into a DateTime struct, then the next time you passed it in as the Key the IdentityMap + would box it again (into a different box) and it would have a different IdentityKey - so you would + not get the same value for the same DateTime value. + + + + + + Create a new instance of the IdentityMap that has no + iteration order. + + A new IdentityMap based on a Hashtable. + + + + Create a new instance of the IdentityMap that has an + iteration order of the order the objects were added + to the Map. + + A new IdentityMap based on ListDictionary. + + + + Return the Dictionary Entries (as instances of DictionaryEntry in a collection + that is safe from concurrent modification). Ie - we may safely add new instances + to the underlying IDictionary during enumeration of the Values. + + The IDictionary to get the enumeration safe list. + A Collection of DictionaryEntries + + + + Create the IdentityMap class with the correct class for the IDictionary. + Unsorted = Hashtable + Sorted = ListDictionary + + A class that implements the IDictionary for storing the objects. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Verifies that we are not using a System.ValueType as the Key in the Dictionary + + The object that will be the key. + An object that is safe to be a key. + Thrown when the obj is a System.ValueType + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Returns the Keys used in this IdentityMap + + + + + + + + + + + + + + + + Provides a snapshot VIEW in the form of a List of the contents of the IdentityMap. + You can safely iterate over this VIEW and modify the actual IdentityMap because the + VIEW is a copy of the contents, not a reference to the existing Map. + + Contains a copy (not that actual instance stored) of the DictionaryEntries in a List. + + + + + Set implementation that use == instead of equals() as its comparison mechanism + that base its implementation of IdentityMap + + + + + Combines multiple objects implementing into one. + + + + + Creates an IEnumerable object from multiple IEnumerables. + + The IEnumerables to join together. + + + + + + + + + + + + + A flag to indicate if Dispose() has been called. + + + + + Finalizer that ensures the object is correctly disposed of. + + + + + Takes care of freeing the managed and unmanaged resources that + this class is responsible for. + + + + + Takes care of freeing the managed and unmanaged resources that + this class is responsible for. + + Indicates if this JoinedEnumerable is being Disposed of or Finalized. + + The command is closed and the reader is disposed. This allows other ADO.NET + related actions to occur without needing to move all the way through the + EnumerableImpl. + + + + + + + + A map of objects whose mapping entries are sequenced based on the order in which they were + added. This data structure has fast O(1) search time, deletion time, and insertion time + + + This class is not thread safe. + This class is not a really replication of JDK LinkedHashMap{K, V}, + this class is an adaptation of SequencedHashMap with generics. + + + + + Initializes a new instance of the class that is empty, + has the default initial capacity, and uses the default equality comparer for the key type. + + + + + Initializes a new instance of the class that is empty, + has the specified initial capacity, and uses the default equality comparer for the key type. + + The initial number of elements that the can contain. + + + + Initializes a new instance of the class that is empty, has the default initial capacity, and uses the specified . + + The implementation to use when comparing keys, or null to use the default EqualityComparer for the type of the key. + + + + Initializes a new instance of the class that is empty, has the specified initial capacity, and uses the specified . + + The initial number of elements that the can contain. + The implementation to use when comparing keys, or null to use the default EqualityComparer for the type of the key. + + + + An implementation of a Map which has a maximum size and uses a Least Recently Used + algorithm to remove items from the Map when the maximum size is reached and new items are added. + + + + + A map of objects whose mapping entries are sequenced based on the order in which they were + added. This data structure has fast O(1) search time, deletion time, and insertion time + + + This class is not thread safe. + + + + + Construct an empty sentinel used to hold the head (sentinel.next) and the tail (sentinal.prev) + of the list. The sentinal has a key and value + + + + + + Sentinel used to hold the head and tail of the list of entries + + + + + Map of keys to entries + + + + + Holds the number of modifications that have occurred to the map, excluding modifications + made through a collection view's iterator. + + + + + Construct a new sequenced hash map with default initial size and load factor + + + + + Construct a new sequenced hash map with the specified initial size and default load factor + + the initial size for the hash table + + + + Construct a new sequenced hash map with the specified initial size and load factor + + the initial size for the hashtable + the load factor for the hash table + + + + Construct a new sequenced hash map with the specified initial size, hash code provider + and comparer + + the initial size for the hashtable + + + + + Creates an empty Hashtable with the default initial capacity and using the default load factor, + the specified hash code provider and the specified comparer + + + + + + Creates an empty Hashtable with the default initial capacity and using the default load factor, + the specified hash code provider and the specified comparer + + the initial size for the hashtable + the load factor for the hash table + + + + + Removes an internal entry from the linked list. THis does not remove it from the underlying + map. + + + + + + Inserts a new internal entry to the tail of the linked list. This does not add the + entry to the underlying map. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Remove the Entry identified by the Key if it exists. + + The Key to remove. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Return only the Key of the DictionaryEntry + + + + + Return only the Value of the DictionaryEntry + + + + + Return the full DictionaryEntry + + + + + Summary description for ObjectUtils. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Helper class for Reflection related code. + + + + + Determine if the specified overrides the + implementation of Equals from + + The to reflect. + if any type in the hierarchy overrides Equals(object). + + + + Determine if the specified overrides the + implementation of GetHashCode from + + The to reflect. + if any type in the hierarchy overrides GetHashCode(). + + + + Finds the for the property in the . + + The to find the property in. + The name of the Property to find. + The name of the property access strategy. + The to get the value of the Property. + + This one takes a propertyAccessor name as we might know the correct strategy by now so we avoid Exceptions which are costly + + + + + Get the NHibernate for the named property of the . + + The to find the Property in. + The name of the property/field to find in the class. + The name of the property accessor for the property. + + The NHibernate for the named property. + + + + + Get the for the named property of a type. + + The to find the property in. + The name of the property/field to find in the class. + The name of the property accessor for the property. + The for the named property. + + + + Get the for the named property of a type. + + The FullName to find the property in. + The name of the property/field to find in the class. + The name of the property accessor for the property. + The for the named property. + + + + Returns a reference to the Type. + + The name of the class or a fully qualified name. + The Type for the Class. + + + + Load a System.Type given is't name. + + The class FullName or AssemblyQualifiedName + The System.Type + + If the don't represent an + the method try to find the System.Type scanning all Assemblies of the . + + If no System.Type was found for . + + + + Returns a from an already loaded Assembly or an + Assembly that is loaded with a partial name. + + An . + if an exception should be thrown + in case of an error, otherwise. + + A object that represents the specified type, + or if the type cannot be loaded. + + + Attempts to get a reference to the type from an already loaded assembly. If the + type cannot be found then the assembly is loaded using + . + + + + + Returns the value of the static field of . + + The . + The name of the field in the . + The value contained in the field, or if the type or the field does not exist. + + + + Gets the default no arg constructor for the . + + The to find the constructor for. + + The for the no argument constructor, or if the + type is an abstract class. + + + Thrown when there is a problem calling the method GetConstructor on . + + + + + Finds the constructor that takes the parameters. + + The to find the constructor in. + The objects to use to find the appropriate constructor. + + An that can be used to create the type with + the specified parameters. + + + Thrown when no constructor with the correct signature can be found. + + + + + Determines if the is a non creatable class. + + The to check. + if the is an Abstract Class or an Interface. + + + + Unwraps the supplied + and returns the inner exception preserving the stack trace. + + + The to unwrap. + + The unwrapped exception. + + + + Try to find a method in a given type. + + The given type. + The method info. + The found method or null. + + The , in general, become from another . + + + + + Try to find a method in a serie of given types. + + The serie of types where find. + The method info. + The found method or null. + + The , in general, become from another . + + + + + Used to ensure a collection filtering a given IEnumerable by a certain type. + + The type used like filter. + + + + Cache following a "Most Recently Used" (MRU) algorithm for maintaining a + bounded in-memory size; the "Least Recently Used" (LRU) entry is the first + available for removal from the cache. + + + This implementation uses a bounded MRU Map to limit the in-memory size of + the cache. Thus the size of this cache never grows beyond the stated size. + + + + + Cache following a "Most Recently Used" (MRY) algorithm for maintaining a + bounded in-memory size; the "Least Recently Used" (LRU) entry is the first + available for removal from the cache. + + + This implementation uses a "soft limit" to the in-memory size of the cache, + meaning that all cache entries are kept within a completely + {@link java.lang.ref.SoftReference}-based map with the most recently utilized + entries additionally kept in a hard-reference manner to prevent those cache + entries soft references from becoming enqueued by the garbage collector. + Thus the actual size of this cache impl can actually grow beyond the stated + max size bound as long as GC is not actively seeking soft references for + enqueuement. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Just a façade for calling string.Split() + We don't use our StringTokenizer because string.Split() is + more efficient (but it only works when we don't want to retrieve the delimiters) + + separators for the tokens of the list + the string that will be broken into tokens + + + + + Splits the String using the StringTokenizer. + + separators for the tokens of the list + the string that will be broken into tokens + true to include the separators in the tokens. + + + This is more powerful than Split because you have the option of including or + not including the separators in the tokens. + + + + + + + + + + + + + + + + + + + + Takes a fully qualified type name and returns the full name of the + Class - includes namespaces. + + + + + + + Takes a fully qualified type name (can include the assembly) and just returns + the name of the Class. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Converts a in the format of "true", "t", "false", or "f" to + a . + + The string to convert. + + The value converted to a . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Counts the unquoted instances of the character. + + + + + + + + + + + + + + + + Generate a nice alias for the given class name or collection role + name and unique integer. Subclasses do not have to use + aliases of this form. + + an alias of the form foo1_ + + + + Returns the interned string equal to if there is one, or + otherwise. + + A + A + + + + A StringTokenizer java like object + + + + + + + + + + + + + + + + + + + + + + + + + + Returns an unmodifiable view of the specified IDictionary. + This method allows modules to provide users with "read-only" access to internal dictionary. + Query operations on the returned dictionary "read through" to the specified dictionary, + and attempts to modify the returned dictionary, + whether direct or via its collection views, result in an . + + The type of keys in the dictionary. + The type of values in the dictionary. + + + + Initializes a new instance of the UnmodifiableDictionary class that contains elements wrapped + from the specified IDictionary. + + The whose elements are wrapped. + + + + Count of elements in the collection. Unreliable! + + + + + Indicates failure of an assertion: a possible bug in NHibernate + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The message that describes the error. + + + + Initializes a new instance of the class. + + The message that describes the error. + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Controls how the session interacts with the second-level + cache and query cache. + + + + + The session will never interact with the cache, except to invalidate + cache items when updates occur + + + + + The session will never read items from the cache, but will add items + to the cache as it reads them from the database. + + + + + The session may read items from the cache, but will not add items, + except to invalidate items when updates occur + + + + The session may read items from the cache, and add items to the cache + + + + The session will never read items from the cache, but will add items + to the cache as it reads them from the database. In this mode, the + effect of hibernate.cache.use_minimal_puts is bypassed, in + order to force a cache refresh + + + + + + + + Initializes a new instance of the class. + + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class. + + The message that describes the error. + + + + Initializes a new instance of the class. + + The message that describes the error. + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Transforms Criteria queries + + + + + Returns a clone of the original criteria, which will return the count + of rows that are returned by the original criteria query. + + + + + Returns a clone of the original criteria, which will return the count + of rows that are returned by the original criteria query. + + + + + Creates an exact clone of the criteria + + + + + + Creates an exact clone of the criteria + + + + + + Initializes a new instance of the class. + + The message that describes the error. + The name of the duplicate object + The type of the duplicate object + + + + Initializes a new instance of the class. + + The name of the duplicate object + The type of the duplicate object + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + The type of the duplicated object + + + + + The name of the duplicated object + + + + + Allows user code to inspect and/or change property values before they are written and after they + are read from the database + + + + There might be a single instance of IInterceptor for a SessionFactory, or a new + instance might be specified for each ISession. Whichever approach is used, the interceptor + must be serializable if the ISession is to be serializable. This means that SessionFactory + -scoped interceptors should implement ReadResolve(). + + + The ISession may not be invoked from a callback (nor may a callback cause a collection or + proxy to be lazily initialized). + + + + + + Called just before an object is initialized + + + + + + + + The interceptor may change the state, which will be propagated to the persistent + object. Note that when this method is called, entity will be an empty + uninitialized instance of the class. + if the user modified the state in any way + + + + Called when an object is detected to be dirty, during a flush. + + + + + + + + + The interceptor may modify the detected currentState, which will be propagated to + both the database and the persistent object. Note that all flushes end in an actual + synchronization with the database, in which as the new currentState will be propagated + to the object, but not necessarily (immediately) to the database. It is strongly recommended + that the interceptor not modify the previousState. + + if the user modified the currentState in any way + + + + Called before an object is saved + + + + + + + + The interceptor may modify the state, which will be used for the SQL INSERT + and propagated to the persistent object + + if the user modified the state in any way + + + + Called before an object is deleted + + + + + + + + It is not recommended that the interceptor modify the state. + + + + Called before a collection is (re)created. + + + Called before a collection is deleted. + + + Called before a collection is updated. + + + + Called before a flush + + The entities + + + + Called after a flush that actually ends in execution of the SQL statements required to + synchronize in-memory state with the database. + + The entitites + + + + Called when a transient entity is passed to SaveOrUpdate. + + + The return value determines if the object is saved + + - the entity is passed to Save(), resulting in an INSERT + - the entity is passed to Update(), resulting in an UPDATE + - Hibernate uses the unsaved-value mapping to determine if the object is unsaved + + + A transient entity + Boolean or to choose default behaviour + + + + Called from Flush(). The return value determines whether the entity is updated + + + + an array of property indicies - the entity is dirty + an empty array - the entity is not dirty + - use Hibernate's default dirty-checking algorithm + + + A persistent entity + + + + + + An array of dirty property indicies or to choose default behavior + + + + Instantiate the entity class. Return to indicate that Hibernate should use the default + constructor of the class + + the name of the entity + The type of entity instance to be returned. + the identifier of the new instance + An instance of the class, or to choose default behaviour + + The identifier property of the returned instance + should be initialized with the given identifier. + + + + Get the entity name for a persistent or transient instance + an entity instance + the name of the entity + + + Get a fully loaded entity instance that is cached externally + the name of the entity + the instance identifier + a fully initialized entity + + + + Called when a NHibernate transaction is begun via the NHibernate + API. Will not be called if transactions are being controlled via some other mechanism. + + + + + Called before a transaction is committed (but not before rollback). + + + + + Called after a transaction is committed or rolled back. + + + + Called when sql string is being prepared. + sql to be prepared + original or modified sql + + + + Called when a session-scoped (and only session scoped) interceptor is attached + to a session + + + session-scoped-interceptor is an instance of the interceptor used only for one session. + The use of singleton-interceptor may cause problems in multi-thread scenario. + + + + + + Defines the representation modes available for entities. + + + + Represents a fetching strategy. + + + This is used together with the API to specify + runtime fetching strategies. + + For Hql queries, use the FETCH keyword instead. + + + + + + Default to the setting configured in the mapping file. + + + + + Fetch eagerly, using a separate select. Equivalent to + fetch="select" (and outer-join="false") + + + + + Fetch using an outer join. Equivalent to + fetch="join" (and outer-join="true") + + + + + Indicates that an expected getter or setter method could not be found on a class + + + + + Initializes a new instance of the class. + + The message that describes the error. + + + + Initializes a new instance of the class. + + The message that describes the error. + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Represents a flushing strategy. + + + The flush process synchronizes database state with session state by detecting state + changes and executing SQL statements + + + + + Special value for unspecified flush mode (like in Java). + + + + + The ISession is never flushed unless Flush() is explicitly + called by the application. This mode is very efficient for read only + transactions + + + + + The ISession is flushed when Transaction.Commit() is called + + + + + The ISession is sometimes flushed before query execution in order to + ensure that queries never return stale state. This is the default flush mode. + + + + + The is flushed before every query. This is + almost always unnecessary and inefficient. + + + + + Provides XML marshalling for classes registered with a SessionFactory + + + + Hibernate defines a generic XML format that may be used to represent any class + (hibernate-generic.dtd). The user configures an XSLT stylesheet for marshalling + data from this generic format to an application and/or user readable format. By default, + Hibernate will use hibernate-default.xslt which maps data to a useful human- + readable format. + + + The property xml.output_stylesheet specifies a user-written stylesheet. + Hibernate will attempt to load the stylesheet from the classpath first and if not found, + will attempt to load it as a file + + + It is not intended that implementors be threadsafe + + + + + + Add an object to the output document. + + A transient or persistent instance + Databinder + + + + Add a collection of objects to the output document + + A collection of transient or persistent instance + Databinder + + + + Output the generic XML representation of the bound objects + + Generic Xml representation + + + + Output the generic XML Representation of the bound objects + to a XmlDocument + + A generic Xml tree + + + + Output the custom XML representation of the bound objects + + Custom Xml representation + + + + Output the custom XML representation of the bound objects as + an XmlDocument + + A custom Xml Tree + + + + Controls whether bound objects (and their associated objects) that are lazily instanciated + are explicityl initialized or left as they are + + True to explicitly initilize lazy objects, false to leave them in the state they are in + + + + Performs a null safe comparison using "==" instead of Object.Equals() + + First object to compare. + Second object to compare. + + true if x is the same instance as y or if both are null references; otherwise, false. + + + This is Lazy collection safe since it uses , + unlike Object.Equals() which currently causes NHibernate to load up the collection. + This behaivior of Collections is likely to change because Java's collections override Equals() and + .net's collections don't. So in .net there is no need to override Equals() and + GetHashCode() on the NHibernate Collection implementations. + + + + + Thrown if Hibernate can't instantiate an entity or component class at runtime. + + + + + Initializes a new instance of the class. + + The message that describes the error. + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + The that NHibernate was trying to instantiate. + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Sets the serialization info for after + getting the info from the base Exception. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Gets the that NHibernate was trying to instantiate. + + + + + Gets a message that describes the current . + + + The error message that explains the reason for this exception and the Type that + was trying to be instantiated. + + + + + Thrown when an invalid type is specified as a proxy for a class. + The exception is also thrown when a class is specified as lazy, + but cannot be used as a proxy for itself. + + + + + A problem occurred trying to lazily initialize a collection or proxy (for example the session + was closed) or iterate query results. + + + + + Initializes a new instance of the class. + + The name of the entity where the exception was thrown + The id of the entity where the exception was thrown + The message that describes the error. + + + + Initializes a new instance of the class. + + The message that describes the error. + + + + Initializes a new instance of the class. + + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class. + + The message that describes the error. + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Instances represent a lock mode for a row of a relational database table. + + + It is not intended that users spend much time worrying about locking since Hibernate + usually obtains exactly the right lock level automatically. Some "advanced" users may + wish to explicitly specify lock levels. + + + + + + + + + + + + + + + Is this lock mode more restrictive than the given lock mode? + + + + + + Is this lock mode less restrictive than the given lock mode? + + + + + + No lock required. + + + If an object is requested with this lock mode, a Read lock + might be obtained if necessary. + + + + + A shared lock. + + + Objects are loaded in Read mode by default + + + + + An upgrade lock. + + + Objects loaded in this lock mode are materialized using an + SQL SELECT ... FOR UPDATE + + + + + Attempt to obtain an upgrade lock, using an Oracle-style + SELECT ... FOR UPGRADE NOWAIT. + + + The semantics of this lock mode, once obtained, are the same as Upgrade + + + + + A Write lock is obtained when an object is updated or inserted. + + + This is not a valid mode for Load() or Lock(). + + + + + Similar to except that, for versioned entities, + it results in a forced version increment. + + + + + Provides access to the full range of NHibernate built-in types. + IType instances may be used to bind values to query parameters. + Also a factory for new Blobs and Clobs. + + + + + Guesses the IType of this object + + The obj. + + + + + Guesses the IType by the type + + The type. + + + + + NHibernate Ansi String type + + + + + NHibernate binary type + + + + + NHibernate binary blob type + + + + + NHibernate boolean type + + + + + NHibernate byte type + + + + + NHibernate character type + + + + + NHibernate Culture Info type + + + + + NHibernate date type + + + + + NHibernate date type + + + + + NHibernate date type + + + + + NHibernate date type + + + + + NHibernate decimal type + + + + + NHibernate double type + + + + + NHibernate Currency type (System.Decimal - DbType.Currency) + + + + + NHibernate Guid type. + + + + + NHibernate System.Int16 (short in C#) type + + + + + NHibernate System.Int32 (int in C#) type + + + + + NHibernate System.Int64 (long in C#) type + + + + + NHibernate System.SByte type + + + + + NHibernate System.UInt16 (ushort in C#) type + + + + + NHibernate System.UInt32 (uint in C#) type + + + + + NHibernate System.UInt64 (ulong in C#) type + + + + + NHibernate System.Single (float in C#) Type + + + + + NHibernate String type + + + + + NHibernate string clob type + + + + + NHibernate Time type + + + + + NHibernate Ticks type + + + + + NHibernate Ticks type + + + + + NHibernate Ticks type + + + + + NHibernate Timestamp type + + + + + NHibernate TrueFalse type + + + + + NHibernate YesNo type + + + + + NHibernate class type + + + + + NHibernate class meta type for association of kind any. + + + + + + NHibernate serializable type + + + + + NHibernate System.Object type + + + + + A NHibernate persistent enum type + + + + + + + A NHibernate serializable type + + + + + + + A NHibernate serializable type + + a type mapping to a single column + the entity identifier type + + + + + A NHibernate persistent object (entity) type + + a mapped entity class + + + + + A NHibernate persistent object (entity) type + + a mapped entity class + + + + A Hibernate persistent object (entity) type. + a mapped entity class + + + + A NHibernate custom type + + a class that implements UserType + + + + + Force initialization of a proxy or persistent collection. + + a persistable object, proxy, persistent collection or null + if we can't initialize the proxy at this time, eg. the Session was closed + + + + Is the proxy or persistent collection initialized? + + a persistable object, proxy, persistent collection or null + true if the argument is already initialized, or is not a proxy or collection + + + + Get the true, underlying class of a proxied persistent class. This operation + will initialize a proxy by side-effect. + + a persistable object or proxy + the true class of the instance + + + + Close an obtained from an + returned by NHibernate immediately, instead of waiting until the session is + closed or disconnected. + + + + + Close an returned by NHibernate immediately, + instead of waiting until the session is closed or disconnected. + + + + + Check if the property is initialized. If the named property does not exist + or is not persistent, this method always returns true. + + The potential proxy + the name of a persistent attribute of the object + + true if the named property of the object is not listed as uninitialized; + false if the object is an uninitialized proxy, or the named property is uninitialized + + + + + This exception is thrown when an operation would + break session-scoped identity. This occurs if the + user tries to associate two different instances of + the same class with a particular identifier, + in the scope of a single . + + + + + Initializes a new instance of the class. + + The message that describes the error. + The identifier of the object that caused the exception. + The EntityName of the object attempted to be loaded. + + + + Initializes a new instance of the class. + + The identifier of the object that caused the exception. + The EntityName of the object attempted to be loaded. + + + + Initializes a new instance of the class. + + + + + Sets the serialization info for after + getting the info from the base Exception. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Thrown when the application calls IQuery.UniqueResult() + and the query returned more than one result. Unlike all other NHibernate + exceptions, this one is recoverable! + + + + + Initializes a new instance of the class. + + The number of items in the result. + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Thrown when the user tries to pass a deleted object to the ISession. + + + + + Thrown when Hibernate could not resolve an object by id, especially when + loading an association. + + + + + Initializes a new instance of the class. + + The identifier of the object that caused the exception. + The of the object attempted to be loaded. + + + + Initializes a new instance of the class. + + The message that describes the error. + The identifier of the object that caused the exception. + The of the object attempted to be loaded. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Thrown when ISession.Load() fails to select a row with + the given primary key (identifier value). This exception might not + be thrown when Load() is called, even if there was no + row on the database, because Load() returns a proxy if + possible. Applications should use ISession.Get() to test if + a row exists in the database. + + + + + Initializes a new instance of the class. + + The identifier of the object that was attempting to be loaded. + The that NHibernate was trying to find a row for in the database. + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Thrown when the user passes a persistent instance to a ISession method that expects a + transient instance + + + + + Initializes a new instance of the class. + + The message that describes the error. + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + A problem occurred accessing a property of an instance of a persistent class by reflection + + + + + Initializes a new instance of the class. + + The message that describes the error. + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + A indicating if this was a "setter" operation. + The that NHibernate was trying find the Property or Field in. + The mapped property name that was trying to be accessed. + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Sets the serialization info for after + getting the info from the base Exception. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Gets the that NHibernate was trying find the Property or Field in. + + + + + Gets a message that describes the current . + + + The error message that explains the reason for this exception and + information about the mapped property and its usage. + + + + + Indicates that an expected getter or setter method could not be found on a class + + + + + Initializes a new instance of the class, + used when a property get/set accessor is missing. + + The that is missing the property + The name of the missing property + The type of the missing accessor + ("getter" or "setter") + + + + Initializes a new instance of the class, + used when a field is missing. + + The that is missing the field + The name of the missing property + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Initializes a new instance of the class. + + The message that describes the error. + The that NHibernate was trying to access. + The name of the Property that was being get/set. + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Sets the serialization info for after + getting the info from the base Exception. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Represents a replication strategy. + + + + + + Throw an exception when a row already exists + + + + + Ignore replicated entities when a row already exists + + + + + When a row already exists, choose the latest version + + + + + Overwrite existing rows when a row already exists + + + + + Thrown when a version number check failed, indicating that the + contained stale data (when using long transactions with + versioning). + + + + + Initializes a new instance of the class. + + The EntityName that NHibernate was trying to update in the database. + The identifier of the object that is stale. + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Sets the serialization info for after + getting the info from the base Exception. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Gets the EntityName that NHibernate was trying to update in the database. + + + + + Gets the identifier of the object that is stale. + + + + + Gets a message that describes the current . + + The error message that explains the reason for this exception. + + + + Indicated that a transaction could not be begun, committed, or rolled back + + + + + Initializes a new instance of the class. + + The message that describes the error. + + + + Initializes a new instance of the class. + + The message that describes the error. + + The exception that is the cause of the current exception. If the innerException parameter + is not a null reference, the current exception is raised in a catch block that handles + the inner exception. + + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Throw when the user passes a transient instance to a ISession method that expects + a persistent instance + + + + + Initializes a new instance of the class. + + The message that describes the error. + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Used when a user provided type does not match the expected one + + + + + Thrown when ISession.Load() selects a row with the given primary key (identifier value) + but the row's discriminator value specifies a different subclass from the one requested + + + + + Initializes a new instance of the class. + + The message that describes the error. + The identifier of the object that was being loaded. + The name of entity that NHibernate was told to load. + + + + Initializes a new instance of the class + with serialized data. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Sets the serialization info for after + getting the info from the base Exception. + + + The that holds the serialized object + data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + + + Gets the identifier of the object that was being loaded. + + + + + Gets the name of entity that NHibernate was told to load. + + + + + Gets a message that describes the current . + + The error message that explains the reason for this exception. + +
+
diff --git a/lib/ServiceLocation/Microsoft.Practices.ServiceLocation.xml b/lib/ServiceLocation/Microsoft.Practices.ServiceLocation.xml index fb5136cb22d..6c6f2fe625f 100644 --- a/lib/ServiceLocation/Microsoft.Practices.ServiceLocation.xml +++ b/lib/ServiceLocation/Microsoft.Practices.ServiceLocation.xml @@ -1,280 +1,280 @@ - - - - Microsoft.Practices.ServiceLocation - - - - - The standard exception thrown when a ServiceLocator has an error in resolving an object. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class with a specified error message. - - - The message that describes the error. - - - - - Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception. - - - The error message that explains the reason for the exception. - - - The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. - - - - - Initializes a new instance of the class with serialized data. - - - The that holds the serialized object data about the exception being thrown. - - - The that contains contextual information about the source or destination. - - - The parameter is null. - - - The class name is null or is zero (0). - - - - - The generic Service Locator interface. This interface is used - to retrieve services (instances identified by type and optional - name) from a container. - - - - - Get an instance of the given . - - Type of object requested. - if there is an error resolving - the service instance. - The requested service instance. - - - - Get an instance of the given named . - - Type of object requested. - Name the object was registered with. - if there is an error resolving - the service instance. - The requested service instance. - - - - Get all instances of the given currently - registered in the container. - - Type of object requested. - if there is are errors resolving - the service instance. - A sequence of instances of the requested . - - - - Get an instance of the given . - - Type of object requested. - if there is are errors resolving - the service instance. - The requested service instance. - - - - Get an instance of the given named . - - Type of object requested. - Name the object was registered with. - if there is are errors resolving - the service instance. - The requested service instance. - - - - Get all instances of the given currently - registered in the container. - - Type of object requested. - if there is are errors resolving - the service instance. - A sequence of instances of the requested . - - - - A strongly-typed resource class, for looking up localized strings, etc. - - - - - Returns the cached ResourceManager instance used by this class. - - - - - Overrides the current thread's CurrentUICulture property for all - resource lookups using this strongly typed resource class. - - - - - Looks up a localized string similar to Activation error occured while trying to get all instances of type {0}. - - - - - Looks up a localized string similar to Activation error occured while trying to get instance of type {0}, key "{1}". - - - - - This class provides the ambient container for this application. If your - framework defines such an ambient container, use ServiceLocator.Current - to get it. - - - - - Set the delegate that is used to retrieve the current container. - - Delegate that, when called, will return - the current ambient container. - - - - The current ambient container. - - - - - This class is a helper that provides a default implementation - for most of the methods of . - - - - - Implementation of . - - The requested service. - if there is an error in resolving the service instance. - The requested object. - - - - Get an instance of the given . - - Type of object requested. - if there is an error resolving - the service instance. - The requested service instance. - - - - Get an instance of the given named . - - Type of object requested. - Name the object was registered with. - if there is an error resolving - the service instance. - The requested service instance. - - - - Get all instances of the given currently - registered in the container. - - Type of object requested. - if there is are errors resolving - the service instance. - A sequence of instances of the requested . - - - - Get an instance of the given . - - Type of object requested. - if there is are errors resolving - the service instance. - The requested service instance. - - - - Get an instance of the given named . - - Type of object requested. - Name the object was registered with. - if there is are errors resolving - the service instance. - The requested service instance. - - - - Get all instances of the given currently - registered in the container. - - Type of object requested. - if there is are errors resolving - the service instance. - A sequence of instances of the requested . - - - - When implemented by inheriting classes, this method will do the actual work of resolving - the requested service instance. - - Type of instance requested. - Name of registered service you want. May be null. - The requested service instance. - - - - When implemented by inheriting classes, this method will do the actual work of - resolving all the requested service instances. - - Type of service requested. - Sequence of service instance objects. - - - - Format the exception message for use in an - that occurs while resolving a single service. - - The actual exception thrown by the implementation. - Type of service requested. - Name requested. - The formatted exception message string. - - - - Format the exception message for use in an - that occurs while resolving multiple service instances. - - The actual exception thrown by the implementation. - Type of service requested. - The formatted exception message string. - - - - This delegate type is used to provide a method that will - return the current container. Used with the - static accessor class. - - An . - - - + + + + Microsoft.Practices.ServiceLocation + + + + + The standard exception thrown when a ServiceLocator has an error in resolving an object. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with a specified error message. + + + The message that describes the error. + + + + + Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception. + + + The error message that explains the reason for the exception. + + + The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. + + + + + Initializes a new instance of the class with serialized data. + + + The that holds the serialized object data about the exception being thrown. + + + The that contains contextual information about the source or destination. + + + The parameter is null. + + + The class name is null or is zero (0). + + + + + The generic Service Locator interface. This interface is used + to retrieve services (instances identified by type and optional + name) from a container. + + + + + Get an instance of the given . + + Type of object requested. + if there is an error resolving + the service instance. + The requested service instance. + + + + Get an instance of the given named . + + Type of object requested. + Name the object was registered with. + if there is an error resolving + the service instance. + The requested service instance. + + + + Get all instances of the given currently + registered in the container. + + Type of object requested. + if there is are errors resolving + the service instance. + A sequence of instances of the requested . + + + + Get an instance of the given . + + Type of object requested. + if there is are errors resolving + the service instance. + The requested service instance. + + + + Get an instance of the given named . + + Type of object requested. + Name the object was registered with. + if there is are errors resolving + the service instance. + The requested service instance. + + + + Get all instances of the given currently + registered in the container. + + Type of object requested. + if there is are errors resolving + the service instance. + A sequence of instances of the requested . + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + + Returns the cached ResourceManager instance used by this class. + + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + + Looks up a localized string similar to Activation error occured while trying to get all instances of type {0}. + + + + + Looks up a localized string similar to Activation error occured while trying to get instance of type {0}, key "{1}". + + + + + This class provides the ambient container for this application. If your + framework defines such an ambient container, use ServiceLocator.Current + to get it. + + + + + Set the delegate that is used to retrieve the current container. + + Delegate that, when called, will return + the current ambient container. + + + + The current ambient container. + + + + + This class is a helper that provides a default implementation + for most of the methods of . + + + + + Implementation of . + + The requested service. + if there is an error in resolving the service instance. + The requested object. + + + + Get an instance of the given . + + Type of object requested. + if there is an error resolving + the service instance. + The requested service instance. + + + + Get an instance of the given named . + + Type of object requested. + Name the object was registered with. + if there is an error resolving + the service instance. + The requested service instance. + + + + Get all instances of the given currently + registered in the container. + + Type of object requested. + if there is are errors resolving + the service instance. + A sequence of instances of the requested . + + + + Get an instance of the given . + + Type of object requested. + if there is are errors resolving + the service instance. + The requested service instance. + + + + Get an instance of the given named . + + Type of object requested. + Name the object was registered with. + if there is are errors resolving + the service instance. + The requested service instance. + + + + Get all instances of the given currently + registered in the container. + + Type of object requested. + if there is are errors resolving + the service instance. + A sequence of instances of the requested . + + + + When implemented by inheriting classes, this method will do the actual work of resolving + the requested service instance. + + Type of instance requested. + Name of registered service you want. May be null. + The requested service instance. + + + + When implemented by inheriting classes, this method will do the actual work of + resolving all the requested service instances. + + Type of service requested. + Sequence of service instance objects. + + + + Format the exception message for use in an + that occurs while resolving a single service. + + The actual exception thrown by the implementation. + Type of service requested. + Name requested. + The formatted exception message string. + + + + Format the exception message for use in an + that occurs while resolving multiple service instances. + + The actual exception thrown by the implementation. + Type of service requested. + The formatted exception message string. + + + + This delegate type is used to provide a method that will + return the current container. Used with the + static accessor class. + + An . + + + diff --git a/lib/Spring.Core.xml b/lib/Spring.Core.xml index 2cf3b5bf424..a6db39ea943 100644 --- a/lib/Spring.Core.xml +++ b/lib/Spring.Core.xml @@ -1,47833 +1,47833 @@ - - - - Spring.Core - - - - - An abstract implementation that can - be used as base class for concrete implementations. - - Aleksandar Seovic - Erich Eichinger - - - - Defines a contract that all cache implementations have to fulfill. - - Aleksandar Seovic - Erich Eichinger - - - - Retrieves an item from the cache. - - - Item key. - - - Item for the specified , or null. - - - - - Removes an item from the cache. - - - Item key. - - - - - Removes collection of items from the cache. - - - Collection of keys to remove. - - - - - Removes all items from the cache. - - - - - Inserts an item into the cache. - - - Items inserted using this method have no expiration time - and default cache priority. - - - Item key. - - - Item value. - - - - - Inserts an item into the cache. - - - Items inserted using this method have default cache priority. - - - Item key. - - - Item value. - - - Item's time-to-live. - - - - - Gets the number of items in the cache. - - - - - Gets a collection of all cache item keys. - - - - - Retrieves an item from the cache. - - - Item key. - - - Item for the specified , or null. - - - - - Removes an item from the cache. - - - Item key. - - - - - Removes collection of items from the cache. - - - Collection of keys to remove. - - - - - Removes all items from the cache. - - - - - Inserts an item into the cache. - - - Items inserted using this method use the default - - - Item key. - - - Item value. - - - - - Inserts an item into the cache. - - - If equals , - or is true, this cache - instance's value will be applied. - - - Item key. - - - Item value. - - - Item's time-to-live (TTL). - - - - - Actually does the cache implementation specific insert operation into the cache. - - - Items inserted using this method have default cache priority. - - - Item key. - - - Item value. - - - Item's time-to-live (TTL). - - - - - Gets/Set the Default time-to-live (TTL) for items inserted into this cache. - Used by - - - - - Gets/Sets a value, whether the this cache instance's - shall be applied to all items, regardless of their individual TTL - when is called. - - - - - Gets the number of items in the cache. - - - May be overridden by subclasses for cache-specific efficient implementation. - - - - - Gets a collection of all cache item keys. - - - - - Abstract base class containing shared properties for all cache attributes. - - Aleksandar Seovic - - - - The instance used to parse values. - - - - - - - Creates an attribute instance. - - - - - Creates an attribute instance. - - - The name of the cache to use. - - - An expression string that should be evaluated in order to determine - the cache key for the item. - - - - - Gets or sets the name of the cache to use. - - - The name of the cache to use. - - - - - Gets or sets a SpEL expression that should be evaluated in order - to determine the cache key for the item. - - - An expression string that should be evaluated in order to determine - the cache key for the item. - - - - - Gets an expression instance that should be evaluated in order - to determine the cache key for the item. - - - An expression instance that should be evaluated in order to determine - the cache key for the item. - - - - - Gets or sets a SpEL expression that should be evaluated in order - to determine whether the item should be cached. - - - An expression string that should be evaluated in order to determine - whether the item should be cached. - - - - - Gets an expression instance that should be evaluated in order - to determine whether the item should be cached. - - - An expression instance that should be evaluated in order to determine - whether the item should be cached. - - - - - The amount of time an object should remain in the cache. - - - If no TTL is specified, the default TTL defined by the - cache's policy will be applied. - - - The amount of time object should remain in the cache - formatted to be recognizable by . - - - - - The amount of time an object should remain in the cache (in seconds). - - - If no TTL is specified, the default TTL defined by the - cache's policy will be applied. - - - The amount of time object should remain in the cache (in seconds). - - - - - This attribute should be used to mark methods whose argument(s) - need to be cached. - - -

- This attribute allows application developers to specify that an argument - of the method should be cached, but it will not do any caching by itself. -

-

- In order to actually cache the result, an application developer - must apply a Spring.Aspects.Cache.CacheParameterAdvice to - all of the members that have this attribute defined. -

-

- You can specify this attribute multiple times on the same method in order to - cache several method parameters. -

-
- Aleksandar Seovic -
- - - Creates an attribute instance. - - - - - Creates an attribute instance. - - - The name of the cache to use. - - - An expression string that should be evaluated in order to determine - the cache key for the item. - - - - - This attribute should be used to mark methods whose result - needs to be cached. - - -

- This attribute allows application developers to mark that a result - of the method invocation should be cached, but it will not do any - caching by itself. -

-

- In order to actually cache the result, an application developer - must apply a Spring.Aspects.Cache.CacheResultAdvice to - all of the members that have this attribute defined. -

-
- Aleksandar Seovic -
- - - Creates an attribute instance. - - - - - Creates an attribute instance. - - - The name of the cache to use. - - - An expression string that should be evaluated in order to determine - the cache key for the item. - - - - - This attribute should be used with methods that return an - in order to cache each item separately. - - -

- This attribute allows application developers to specify that each item - from the collection returned by the method should be cached, - but it will not do any caching by itself. -

-

- In order to actually cache the result, an application developer - must apply a Spring.Aspects.Cache.CacheResultAdvice to - all of the members that have this attribute defined. -

-
- Aleksandar Seovic -
- - - Creates an attribute instance. - - - - - Creates an attribute instance. - - - The name of the cache to use. - - - An expression string that should be evaluated in order to determine - the cache key for the item. - - - - - This attribute should be used to mark method that should - invalidate one or more cache items when invoked. - - -

- This attribute allows application developers to specify that some - cache items should be evicted from cache when the method is invoked, - but it will not do any eviction by itself. -

-

- In order to actually evict cache items, an application developer - must apply a Spring.Aspects.Cache.InvalidateCacheAdvice to - all of the members that have this attribute defined. -

-
- Aleksandar Seovic -
- - - Creates an attribute instance. - - - - - Creates an attribute instance. - - - The name of the cache to use. - - - - - Gets or sets the name of the cache to use. - - - The name of the cache to use. - - - - - Gets or sets a SpEL expression that should be evaluated in order - to determine the keys for the items that should be evicted. - - - An expression string that should be evaluated in order - to determine the keys for the items that should be evicted. - - - - - Gets an expression instance that should be evaluated in order - to determine the keys for the items that should be evicted. - - - An expression instance that should be evaluated in order - to determine the keys for the items that should be evicted. - - - - - Gets or sets a SpEL expression that should be evaluated in order - to determine whether items should be evicted. - - - An expression string that should be evaluated in order to determine - whether items should be evicted. - - - - - Gets an expression instance that should be evaluated in order - to determine whether items should be evicted. - - - An expression instance that should be evaluated in order to determine - whether items should be evicted. - - - - - A simple implementation backed by a dictionary that - never expires cache items. - - Aleksandar Seovic - - - - Retrieves an item from the cache. - - - Item key. - - - Item for the specified , or null. - - - - - Removes an item from the cache. - - - Item key. - - - - - Removes collection of items from the cache. - - - Collection of keys to remove. - - - - - Removes all items from the cache. - - - - - Inserts an item into the cache. - - - Item key. - - - Item value. - - - Item's time-to-live (TTL) in milliseconds. - - - - - Gets the number of items in the cache. - - - - - Gets a collection of all cache item keys. - - - - - Represents a read only wrapper around a generic IDictionary. The design pattern - mirrors ReadOnlyCollection, and follows the apparent pattern that write operations - do not throw an exception, but simply make no change to the underlying collection. - - Originally put into the public domain. - http://www.simple-talk.com/community/forums/thread/2263.aspx - - - - Original from Public Domain - Mark Pollack (.NET) - - - - Inner storage for ReadOnlyDictionary - - - - - Easy access to non-generic dictionary API - - - - - Initializes a new instance of the class. - - The dictionary to wrap. - - - - Add does not change a read only Dictionary - - The object to use as the key of the element to add. - The object to use as the value of the element to add. - The is read-only. - - - - Determines whether the contains an element with the specified key. - - The key to locate in the . - - true if the contains an element with the key; otherwise, false. - - key is null. - - - - Remove does not change a read only Dictionary, will throw an exception. - - The is read-only. - - - - Tries the get value. - - The key. - The value. - - - - - Add does not change a read only Dictionary - - The object to add to the . - The is read-only. - - - - Clear does not change a read only Dictionary. - - The is read-only. - - - - Determines whether the contains a specific value. - - The object to locate in the . - - true if item is found in the ; otherwise, false. - - - - - Copies the elements of the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in array at which copying begins. - arrayIndex is less than 0. - array is null. - array is multidimensional.-or-arrayIndex is equal to or greater than the length of array.-or-The number of elements in the source is greater than the available space from arrayIndex to the end of the destination array.-or-Type T cannot be cast automatically to the type of the destination array. - - - - Remove does not change a read only Dictionary. Throws an exception - - The object to remove from the . - - true if item was successfully removed from the ; otherwise, false. This method also returns false if item is not found in the original . - - The is read-only. - - - - Returns an enumerator that iterates through the collection. - - - A that can be used to iterate through the collection. - - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Add does not change a read only Dictionary. Throws an exception. - - The to use as the key of the element to add. - The to use as the value of the element to add. - The is read-only.-or- The has a fixed size. - - - - Determines whether the object contains an element with the specified key. - - The key to locate in the object. - - true if the contains an element with the key; otherwise, false. - - key is null. - - - - Returns an object for the object. - - - An object for the object. - - - - - Remove does not change a read only Dictionary. Throws an exception. - - The key of the element to remove. - The object is read-only.-or- The has a fixed size. - - - - Copies the elements of the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in array at which copying begins. - array is null. - index is less than zero. - array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. - The type of the source cannot be cast automatically to the type of the destination array. - - - - Runs when the entire object graph has been deserialized. - - The object that initiated the callback. The functionality for this parameter is not currently implemented. - - - - Populates a with the data needed to serialize the target object. - - The to populate with data. - The destination (see ) for this serialization. - The caller does not have the required permission. - - - - Gets a read only containing the keys of the . - - - An containing the keys of the object that implements . - - - - Gets an containing the values in the . - - - An containing the values in the object that implements . - - - - Gets the value with the specified key. - Set will throw an exception - - - - - Gets the number of elements contained in the . - - - The number of elements contained in the . - - - - Gets a value indicating whether the is read-only. - - - true if the is read-only; otherwise, false. - - - - Gets a value indicating whether the object has a fixed size. - - - true if the object has a fixed size; otherwise, false. - - - - Gets an containing the keys of the . - - - An containing the keys of the object that implements . - - - - Gets an containing the values in the . - - - An containing the values in the object that implements . - - - - Gets the with the specified key. Set throws an exception. - - - The is read-only. - if try to set value - - - - Gets a value indicating whether access to the is synchronized (thread safe). - - - true if access to the is synchronized (thread safe); otherwise, false. - - - - Gets an object that can be used to synchronize access to the . - - - An object that can be used to synchronize access to the . - - - - This class provides skeletal implementations of some - operations. - - -

- The implementations in this class are appropriate when the base - implementation does not allow elements. The methods - , - , and - are based on - the , - , and - methods - respectively but throw exceptions instead of indicating failure via - or returns. -

- An implementation that extends this class must - minimally define a method - which does - not permit the insertion of elements, along with methods - , and - . Typically, - additional methods will be overridden as well. If these requirements - cannot be met, consider instead subclassing - }. -

-
- Doug Lea - Griffin Caprio (.NET) -
- - - A collection designed for holding elements prior to processing. - - -

- Besides basic operations, - queues provide additional insertion, extraction, and inspection - operations. -

-

- Each of these methods exists in two forms: one throws - an exception if the operation fails, the other returns a special - value (either or , depending on the - operation). The latter form of the insert operation is designed - specifically for use with capacity-restricted - implementations; in most implementations, insert operations cannot - fail. -

-

- Queues typically, but do not necessarily, order elements in a - FIFO (first-in-first-out) manner. Among the exceptions are - priority queues, which order elements according to a supplied - comparator, or the elements' natural ordering, and LIFO queues (or - stacks) which order the elements LIFO (last-in-first-out). - Whatever the ordering used, the head of the queue is that - element which would be removed by a call to - or - . In a FIFO queue, all new - elements are inserted at the tail of the queue. Other kinds of queues may - use different placement rules. Every implementation - must specify its ordering properties. -

-

- The method inserts an - element if possible, otherwise returning . This differs from the - method, which can fail to - add an element only by throwing an exception. The - method is designed for - use when failure is a normal, rather than exceptional occurrence, for example, - in fixed-capacity (or "bounded" queues. -

-

- The - methods remove and - return the head of the queue. Exactly which element is removed from the - queue is a function of the queue's ordering policy, which differs from - implementation to implementation. The - and - methods differ only in their - behavior when the queue is empty: the - method throws an exception, - while the method returns - . -

-

- The and - methods return, but do - not remove, the head of the queue. -

-

- The interface does not define the blocking queue - methods, which are common in concurrent programming. -

-

- implementations generally do not allow insertion - of elements, although some implementations, such as - a linked list, do not prohibit the insertion of . - Even in the implementations that permit it, should - not be inserted into a , as is also - used as a special return value by the - method to - indicate that the queue contains no elements. -

-

- implementations generally do not define - element-based versions of methods - and , but instead inherit the - identity based versions from the class object, because element-based equality - is not always well-defined for queues with the same elements but different - ordering properties. -

-

- Based on the back port of JCP JSR-166. -

-
- Doug Lea - Griffin Caprio (.NET) -
- - - Inserts the specified element into this queue if it is possible to do so - immediately without violating capacity restrictions, returning - upon success and throwing an - if no space is - currently available. - - - The element to add. - - - if successful. - - - If the element cannot be added at this time due to capacity restrictions. - - - If the class of the supplied prevents it - from being added to this queue. - - - If the specified element is and this queue does not - permit elements. - - - If some property of the supplied prevents - it from being added to this queue. - - - - - Inserts the specified element into this queue if it is possible to do - so immediately without violating capacity restrictions. - - -

- When using a capacity-restricted queue, this method is generally - preferable to , - which can fail to insert an element only by throwing an exception. -

-
- - The element to add. - - - if the element was added to this queue. - - - If the element cannot be added at this time due to capacity restrictions. - - - If the supplied is - . - - - If some property of the supplied prevents - it from being added to this queue. - -
- - - Retrieves and removes the head of this queue. - - -

- This method differs from - only in that it throws an exception if this queue is empty. -

-
- - The head of this queue - - if this queue is empty -
- - - Retrieves and removes the head of this queue, - or returns if this queue is empty. - - - The head of this queue, or if this queue is empty. - - - - - Retrieves, but does not remove, the head of this queue. - - -

- This method differs from - only in that it throws an exception if this queue is empty. -

-
- - The head of this queue. - - If this queue is empty. -
- - - Retrieves, but does not remove, the head of this queue, - or returns if this queue is empty. - - - The head of this queue, or if this queue is empty. - - - - - Returns if there are no elements in the , otherwise. - - - - - Creates a new instance of the class. - - -

- This is an abstract class, and as such has no publicly - visible constructors. -

-
-
- - - Inserts the specified element into this queue if it is possible - to do so immediately without violating capacity restrictions. - - - The element to add. - - - if successful. - - - If the element cannot be added at this time due to capacity restrictions. - - - - - Retrieves and removes the head of this queue. - - -

- This method differs from - only in that - it throws an exception if this queue is empty. -

-
- - The head of this queue - - - If this queue is empty. - -
- - - Retrieves, but does not remove, the head of this queue. - - -

- This method differs from - only in that it throws an exception if this queue is empty. -

-

- ALso note that this implementation returns the result of - unless the queue - is empty. -

-
- The head of this queue. - - If this queue is empty. - -
- - - Removes all of the elements from this queue. - - -

- The queue will be empty after this call returns. -

-

- This implementation repeatedly invokes - until it - returns . -

-
-
- - - Adds all of the elements in the supplied - to this queue. - - -

- Attempts to - - of a queue to itself result in . - Further, the behavior of this operation is undefined if the specified - collection is modified while the operation is in progress. -

-

- This implementation iterates over the specified collection, - and adds each element returned by the iterator to this queue, in turn. - An exception encountered while trying to add an element (including, - in particular, a element) may result in only some - of the elements having been successfully added when the associated - exception is thrown. -

-
- - The collection containing the elements to be added to this queue. - - - if this queue changed as a result of the call. - - - If the supplied or any one of its elements are . - - - If the collection is the current or - the collection size is greater than the queue capacity. - -
- - - Inserts the specified element into this queue if it is possible to do - so immediately without violating capacity restrictions. - - -

- When using a capacity-restricted queue, this method is generally - preferable to , - which can fail to insert an element only by throwing an exception. -

-
- - The element to add. - - - if the element was added to this queue. - - - If the element cannot be added at this time due to capacity restrictions. - - - If the supplied is - . - - - If some property of the supplied prevents - it from being added to this queue. - -
- - - Retrieves, but does not remove, the head of this queue, - or returns if this queue is empty. - - - The head of this queue, or if this queue is empty. - - - - - Retrieves and removes the head of this queue, - or returns if this queue is empty. - - - The head of this queue, or if this queue is empty. - - - - - Copies the elements of the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in array at which copying begins. - array is null. - index is less than zero. - array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. - The type of the source cannot be cast automatically to the type of the destination array. 2 - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Returns if there are no elements in the , otherwise. - - - - - Returns the current capacity of this queue. - - - - - Gets the number of elements contained in the . - - - The number of elements contained in the . - - - - - Gets an object that can be used to synchronize access to the . - - - An object that can be used to synchronize access to the . - - - - - Gets a value indicating whether access to the is synchronized (thread safe). - - - true if access to the is synchronized (thread safe); otherwise, false. - - - - - Provides a performance improved hashtable with case-insensitive (string-only! based) key handling. - - Erich Eichinger - - - - Creates a case-insensitive hashtable using . - - - - - Creates a case-insensitive hashtable using the given . - - the to calculate the hashcode - - - - Creates a case-insensitive hashtable using the given , initially - populated with entries from another dictionary. - - the dictionary to copy entries from - the to calculate the hashcode - - - - Initializes a new, empty instance of the class that is serializable using the specified and objects. - - A object containing the source and destination of the serialized stream associated with the . - A object containing the information required to serialize the object. - info is null. - - - - Implements the interface and returns the data needed to serialize the . - - - A object containing the source and destination of the serialized stream associated with the . - A object containing the information required to serialize the . - info is null. - - - - Calculate the hashcode of the given string key, using the configured culture. - - - - - - - Compares two keys - - - - - Creates a shallow copy of the current instance. - - - - - is an - class that supports the creation of new - types where the underlying data - store is an instance. - - -

- You can use any object that implements the - interface to hold set - data. You can define your own, or you can use one of the objects - provided in the framework. The type of - you - choose will affect both the performance and the behavior of the - using it. -

-

- This object overrides the method, - but not the method, because - the class is mutable. - Therefore, it is not safe to use as a key value in a dictionary. -

-

- To make a typed based on your - own , simply derive a new - class with a constructor that takes no parameters. Some - implmentations cannot be defined - with a default constructor. If this is the case for your class, you - will need to override clone as well. -

-

- It is also standard practice that at least one of your constructors - takes an or an - as an argument. -

-
- -
- - - A collection that contains no duplicate elements. - - - - - - A collection that contains no duplicate elements. - - -

- This interface models the mathematical - abstraction. The order of - elements in a set is dependant on (a)the data-structure implementation, and - (b)the implementation of the various - methods, and thus is not - guaranteed. -

-

- overrides the - method to test for "equivalency": - whether the two sets contain the same elements. The "==" and "!=" - operators are not overridden by design, since it is often desirable to - compare object references for equality. -

-

- Also, the method is not - implemented on any of the set implementations, since none of them are - truly immutable. This is by design, and it is the way almost all - collections in the .NET framework function. So as a general rule, don't - store collection objects inside - instances. You would typically want to use a keyed - instead. -

-

- None of the implementations in - this library are guaranteed to be thread-safe in any way unless wrapped - in a . -

-

- The following table summarizes the binary operators that are supported - by the class. -

- - - Operation - Description - Method - - - Union (OR) - - Element included in result if it exists in either A OR - B. - - Union() - - - Intersection (AND) - - Element included in result if it exists in both A AND - B. - - InterSect() - - - Exclusive Or (XOR) - - Element included in result if it exists in one, but not both, - of A and B. - - ExclusiveOr() - - - Minus (n/a) - - Take all the elements in A. Now, if any of them exist in - B, remove them. Note that unlike the other operators, - A - B is not the same as B - A. - - Minus() - - -
-
- - - Performs a "union" of the two sets, where all the elements - in both sets are present. - - -

- That is, the element is included if it is in either - or this set. Neither this set nor the input - set are modified during the operation. The return value is a - clone of this set with the extra elements added in. -

-
- A collection of elements. - - A new containing the union of - this with the specified - collection. Neither of the input objects is modified by the union. - -
- - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. - - -

- That is, the element is included if it exists in both sets. The - Intersect() operation does not modify the input sets. It - returns a clone of this set with the appropriate elements - removed. -

-
- A set of elements. - - The intersection of this set with . - -
- - - Performs a "minus" of this set from the - set. - - -

- This returns a set of all the elements in set - , removing the elements that are also in - this set. The original sets are not modified during this operation. - The result set is a clone of this - containing the elements from - the operation. -

-
- A set of elements. - - A set containing the elements from this set with the elements in - removed. - -
- - - Performs an "exclusive-or" of the two sets, keeping only those - elements that are in one of the sets, but not in both. - - -

- The original sets are not modified during this operation. The - result set is a clone of this set containing the elements - from the exclusive-or operation. -

-
- A set of elements. - - A set containing the result of - ^ this. - -
- - - Returns if this set contains the specified - element. - - The element to look for. - - if this set contains the specified element. - - - - - Returns if the set contains all the - elements in the specified collection. - - A collection of objects. - - if the set contains all the elements in the - specified collection. - - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - - is the object was added, - if the object was already present. - - - - - Adds all the elements in the specified collection to the set if - they are not already present. - - A collection of objects to add to the set. - - is the set changed as a result of this - operation. - - - - - Removes the specified element from the set. - - The element to be removed. - - if the set contained the specified element. - - - - - Remove all the specified elements from this set, if they exist in - this set. - - A collection of elements to remove. - - if the set was modified as a result of this - operation. - - - - - Retains only the elements in this set that are contained in the - specified collection. - - - The collection that defines the set of elements to be retained. - - - if this set changed as a result of this - operation. - - - - - Removes all objects from this set. - - - - - Returns if this set contains no elements. - - - - - Performs a "union" of the two sets, where all the elements - in both sets are present. - - A collection of elements. - - A new containing the union of - this with the specified - collection. Neither of the input objects is modified by the union. - - - - - - Performs a "union" of two sets, where all the elements in both are - present. - - -

- That is, the element is included if it is in either - or . The return - value is a clone of one of the sets ( - if it is not ) with elements of the other set - added in. Neither of the input sets is modified by the operation. -

-
- A set of elements. - A set of elements. - - A set containing the union of the input sets; - if both sets are . - -
- - - Performs a "union" of two sets, where all the elements in both are - present. - - A set of elements. - A set of elements. - - A set containing the union of the input sets; - if both sets are . - - - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. - - A set of elements. - - The intersection of this set with . - - - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. - - -

- That is, the element is included only if it exists in both - and . Neither input - object is modified by the operation. The result object is a - clone of one of the input objects ( - if it is not ) containing the elements from - the intersect operation. -

-
- A set of elements. - A set of elements. - - The intersection of the two input sets; if - both sets are . - -
- - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. - - A set of elements. - A set of elements. - - The intersection of the two input sets; if - both sets are . - - - - - - Performs a "minus" of this set from the - set. - - A set of elements. - - A set containing the elements from this set with the elements in - removed. - - - - - - Performs a "minus" of set from set - . - - -

- This returns a set of all the elements in set - , removing the elements that are also in - set . The original sets are not modified - during this operation. The result set is a clone of set - containing the elements from the operation. -

-
- A set of elements. - A set of elements. - - A set containing - - elements. - if is - . - -
- - - Performs a "minus" of set from set - . - - A set of elements. - A set of elements. - - A set containing - - elements. - if is - . - - - - - - Performs an "exclusive-or" of the two sets, keeping only those - elements that are in one of the sets, but not in both. - - A set of elements. - - A set containing the result of - ^ this. - - - - - - Performs an "exclusive-or" of the two sets, keeping only those - elements that are in one of the sets, but not in both. - - -

- The original sets are not modified during this operation. The - result set is a clone of one of the sets ( - if it is not ) - containing the elements from the exclusive-or operation. -

-
- A set of elements. - A set of elements. - - A set containing the result of - ^ . - if both sets are . - -
- - - Performs an "exclusive-or" of the two sets, keeping only those - elements that are in one of the sets, but not in both. - - A set of elements. - A set of elements. - - A set containing the result of - ^ . - if both sets are . - - - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - - is the object was added, - if the object was already present. - - - - - Adds all the elements in the specified collection to the set if - they are not already present. - - A collection of objects to add to the set. - - is the set changed as a result of this - operation. - - - - - Removes all objects from this set. - - - - - Returns if this set contains the specified - element. - - The element to look for. - - if this set contains the specified element. - - - - - Returns if the set contains all the - elements in the specified collection. - - A collection of objects. - - if the set contains all the elements in the - specified collection. - - - - - Removes the specified element from the set. - - The element to be removed. - - if the set contained the specified element. - - - - - Remove all the specified elements from this set, if they exist in - this set. - - A collection of elements to remove. - - if the set was modified as a result of this - operation. - - - - - Retains only the elements in this set that are contained in the - specified collection. - - - The collection that defines the set of elements to be retained. - - - if this set changed as a result of this - operation. - - - - - Returns a clone of the - instance. - - -

- This will work for derived - classes if the derived class implements a constructor that takes no - arguments. -

-
- A clone of this object. -
- - - Copies the elements in the to - an array. - - -

- The type of array needs to be compatible with the objects in the - , obviously. -

-
- - An array that will be the target of the copy operation. - - - The zero-based index where copying will start. - -
- - - Gets an enumerator for the elements in the - . - - - An over the elements - in the . - - - - - This method will test the - against another for - "equality". - - -

- In this case, "equality" means that the two sets contain the same - elements. The "==" and "!=" operators are not overridden by design. - If you wish to check for "equivalent" - instances, use - Equals(). If you wish to check to see if two references are - actually the same object, use "==" and "!=". -

-
- - A object to compare to. - - - if the two sets contain the same elements. - -
- - - Gets the hashcode for the object. - - - - - Returns if this set contains no elements. - - - - - The number of elements currently contained in this collection. - - - - - Returns if the - is synchronized across - threads. - - -

- Note that enumeration is inherently not thread-safe. Use the - to lock the object during enumeration. -

-
-
- - - An object that can be used to synchronize this collection to make - it thread-safe. - - -

- When implementing this, if your object uses a base object, like an - , or anything that has - a SyncRoot, return that object instead of "this". -

-
- - An object that can be used to synchronize this collection to make - it thread-safe. - -
- - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - - is the object was added, - if the object was already present. - - - - - Adds all the elements in the specified collection to the set if - they are not already present. - - A collection of objects to add to the set. - - is the set changed as a result of this - operation. - - - - - Removes all objects from this set. - - - - - Returns if this set contains the specified - element. - - The element to look for. - - if this set contains the specified element. - - - - - Returns if the set contains all the - elements in the specified collection. - - A collection of objects. - - if the set contains all the elements in the - specified collection; also if the - supplied is . - - - - - Removes the specified element from the set. - - The element to be removed. - - if the set contained the specified element. - - - - - Remove all the specified elements from this set, if they exist in - this set. - - A collection of elements to remove. - - if the set was modified as a result of this - operation. - - - - - Retains only the elements in this set that are contained in the - specified collection. - - - The collection that defines the set of elements to be retained. - - - if this set changed as a result of this - operation. - - - - - Copies the elements in the to - an array. - - -

- The type of array needs to be compatible with the objects in the - , obviously. -

-
- - An array that will be the target of the copy operation. - - - The zero-based index where copying will start. - -
- - - Gets an enumerator for the elements in the - . - - - An over the elements - in the . - - - - - Provides the storage for elements in the - , stored as the key-set - of the object. - - -

- Set this object in the constructor if you create your own - class. -

-
-
- - - The placeholder object used as the value for the - instance. - - - There is a single instance of this object globally, used for all - s. - - - - - Returns if this set contains no elements. - - - - - The number of elements currently contained in this collection. - - - - - Returns if the - is synchronized across - threads. - - - - - - An object that can be used to synchronize this collection to make - it thread-safe. - - - An object that can be used to synchronize this collection to make - it thread-safe. - - - - - - Implements an based on a - hash table. - - -

- This will give the best lookup, add, and remove performance for very - large data-sets, but iteration will occur in no particular order. -

-
- -
- - - Creates a new instance of the class. - - - - - Creates a new instance of the class, and - initializes it based on a collection of elements. - - - A collection of elements that defines the initial set contents. - - - - - Implements an that automatically - changes from a list based implementation to a hashtable based - implementation when the size reaches a certain threshold. - - -

- This is good if you are unsure about whether you data-set will be tiny - or huge. -

- - Because this uses a dual implementation, iteration order is not - guaranteed! - -
- -
- - - Creates a new set instance based on either a list or a hash table, - depending on which will be more efficient based on the data-set - size. - - - - - Initializes a new instance of the class with a given capacity - - The size. - - - - Creates a new set instance based on either a list or a hash table, - depending on which will be more efficient based on the data-set - size, and initializes it based on a collection of elements. - - - A collection of elements that defines the initial set contents. - - - - - Implements an immutable (read-only) - wrapper. - - -

- Although this class is advertised as immutable, it really isn't. - Anyone with access to the wrapped - can still change the data. So - is not implemented for this , as - is the case for all - implementations in this library. This design decision was based on the - efficiency of not having to clone the wrapped - every time you wrap a mutable - . -

-
-
- - - Constructs an immutable (read-only) - wrapper. - - - The that is to be wrapped. - - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - - is the object was added, - if the object was already present. - - - - - - Adds all the elements in the specified collection to the set if - they are not already present. - - A collection of objects to add to the set. - - is the set changed as a result of this - operation. - - - - - - Removes all objects from this set. - - - - - - Returns if this set contains the specified - element. - - The element to look for. - - if this set contains the specified element. - - - - - Returns if the set contains all the - elements in the specified collection. - - A collection of objects. - - if the set contains all the elements in the - specified collection. - - - - - Removes the specified element from the set. - - The element to be removed. - - if the set contained the specified element. - - - - - - Remove all the specified elements from this set, if they exist in - this set. - - A collection of elements to remove. - - if the set was modified as a result of this - operation. - - - - - - Retains only the elements in this set that are contained in the - specified collection. - - - The collection that defines the set of elements to be retained. - - - if this set changed as a result of this - operation. - - - - - - Copies the elements in the to - an array. - - -

- The type of array needs to be compatible with the objects in the - , obviously. -

-
- - An array that will be the target of the copy operation. - - - The zero-based index where copying will start. - -
- - - Gets an enumerator for the elements in the - . - - - An over the elements - in the . - - - - - Returns a clone of the - instance. - - A clone of this object. - - - - Performs a "union" of the two sets, where all the elements - in both sets are present. - - A collection of elements. - - A new containing the union of - this with the specified - collection. Neither of the input objects is modified by the union. - - - - - - Performs an "intersection" of the two sets, where only the elements - that are present in both sets remain. - - A set of elements. - - The intersection of this set with . - - - - - - Performs a "minus" of this set from the - set. - - A set of elements. - - A set containing the elements from this set with the elements in - removed. - - - - - - Performs an "exclusive-or" of the two sets, keeping only those - elements that are in one of the sets, but not in both. - - A set of elements. - - A set containing the result of - ^ this. - - - - - - Returns if this set contains no elements. - - - - - The number of elements currently contained in this collection. - - - - - Returns if the - is synchronized across - threads. - - -

- Note that enumeration is inherently not thread-safe. Use the - to lock the object during enumeration. -

-
-
- - - An object that can be used to synchronize this collection to make - it thread-safe. - - - An object that can be used to synchronize this collection to make - it thread-safe. - - - - - Simple linked list implementation. - - Simon White - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class that contains all - elements of the specified list. - - - A list of elements that defines the initial contents. - - - - - Removes the object at the specified index. - - The lookup index. - - If the specified is greater than the - number of objects within the list. - - - - - Inserts an object at the specified index. - - The lookup index. - The object to be inserted. - - If the specified is greater than the - number of objects within the list. - - - - - Removes the first instance of the specified object found. - - The object to remove - - - - Returns if this list contains the specified - element. - - The element to look for. - - if this list contains the specified element. - - - - - Removes all objects from the list. - - - - - Returns the index of the first instance of the specified - found. - - The object to search for - - The index of the first instance found, or -1 if the element was not - found. - - - - - Adds the specified object to the end of the list. - - The object to add - The index that the object was added at. - - - - Adds all of the elements of the supplied - list to the end of this list. - - The list of objects to add. - - - - Checks whether the list can be modified. - - - If the list cannot be modified. - - - - - Validates the specified index. - - The lookup index. - - If the index is invalid. - - - - - Returns the node at the specified index. - - The lookup index. - The node at the specified index. - - If the specified is greater than the - number of objects within the list. - - - - - Returns the node (and index) of the first node that contains - the specified value. - - The value to search for. - - The node, or if not found. - - - - - Removes the specified node. - - The node to be removed. - - - - Copies the elements in this list to an array. - - -

- The type of array needs to be compatible with the objects in this - list, obviously. -

-
- - An array that will be the target of the copy operation. - - - The zero-based index where copying will start. - - - If the supplied is . - - - If the supplied is less than zero - or is greater than the length of . - - - If the supplied is of insufficient size. - -
- - - Gets an enumerator for the elements in the - . - - -

- Enumerators are fail fast. -

-
- - An over the elements - in the . - -
- - - Is list read only? - - - if the list is read only. - - - - - Returns the node at the specified index. - - -

- This is the indexer for the - class. -

-
- -
- - - Is the list a fixed size? - - - if the list is a fixed size list. - - - - - Returns if the list is synchronized across - threads. - - - - This implementation always returns . - -

- Note that enumeration is inherently not thread-safe. Use the - to lock the object during enumeration. -

-
-
- - - The number of objects within the list. - - - - - An object that can be used to synchronize this - to make it thread-safe. - - - An object that can be used to synchronize this - to make it thread-safe. - - - - - Implements a based on a list. - - -

- Performance is much better for very small lists than either - or . - However, performance degrades rapidly as the data-set gets bigger. Use a - instead if you are not sure your data-set - will always remain very small. Iteration produces elements in the order they were added. - However, element order is not guaranteed to be maintained by the various - mathematical operators. -

-
-
- - - Creates a new set instance based on a list. - - - - - Creates a new set instance based on a list and initializes it based on a - collection of elements. - - - A collection of elements that defines the initial set contents. - - - - - Thrown when an element is requested from an empty . - - Griffin Caprio - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Creates a new instance of the - class with the - specified message. - - - A message about the exception. - - - - - Creates a new instance of the - class with the - specified message. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - An unbounded priority based on a priority - heap. This queue orders elements according to an order specified - at construction time, which is specified either according to their - natural order (see , or according to a - , depending on which constructor is - used. A priority queue does not permit elements. - A priority queue relying on natural ordering also does not - permit insertion of non-comparable objects (doing so will result - . - -

- The head of this queue is the lowest element - with respect to the specified ordering. If multiple elements are - tied for lowest value, the head is one of those elements -- ties are - broken arbitrarily. - -

- A priority queue is unbounded, but has an internal - capacity governing the size of an array used to store the - elements on the queue. It is always at least as large as the queue - size. As elements are added to a priority queue, its capacity - grows automatically. The details of the growth policy are not - specified. - -

- This class and its enumerator implement all of the - optional methods of the and - interfaces. - The enumerator provided in method - is not guaranteed to traverse the elements of the PriorityQueue in any - particular order. - -

- Note that this implementation is NOT synchronized. - Multiple threads should not access a - instance concurrently if any of the threads modifies the list - structurally. Instead, use the thread-safe PriorityBlockingQueue. -

- Josh Bloch - Griffin Caprio (.NET) -
- - - Priority queue represented as a balanced binary heap: the two children - of queue[n] are queue[2*n] and queue[2*n + 1]. The priority queue is - ordered by comparator, or by the elements' natural ordering, if - comparator is null: For each node n in the heap and each descendant d - of n, n <= d. - - The element with the lowest value is in queue[1], assuming the queue is - nonempty. (A one-based array is used in preference to the traditional - zero-based array to simplify parent and child calculations.) - - queue.length must be >= 2, even if size == 0. - - - - The number of elements in the priority queue. - - - - The comparator, or null if priority queue uses elements' - natural ordering. - - - - - The number of times this priority queue has been - structurally modified. - - - - - Creates a with the default initial capacity - (11) that orders its elements according to their natural - ordering (using ). - - - - - Creates a with the specified initial capacity - that orders its elements according to their natural ordering - (using ). - - the initial capacity for this priority queue. - - if is less than 1. - - - - Creates a with the specified initial capacity - that orders its elements according to the specified comparator. - - the initial capacity for this priority queue. - the comparator used to order this priority queue. - If then the order depends on the elements' natural ordering. - - if is less than 1. - - - - Creates a containing the elements in the - specified collection. The priority queue has an initial - capacity of 110% of the size of the specified collection or 1 - if the collection is empty. If the specified collection is an - instance of a , the priority queue will be sorted - according to the same comparator, or according to its elements' - natural order if the collection is sorted according to its - elements' natural order. Otherwise, the priority queue is - ordered according to its elements' natural order. - - the collection whose elements are to be placed into this priority queue. - if elements of cannot be - compared to one another according to the priority queue's ordering - if or any element with it is - - - - - - Common code to initialize underlying queue array across - constructors below. - - - - - Performs an unsigned bitwise right shift with the specified number - - Number to operate on - Ammount of bits to shift - The resulting number from the shift operation - - - - Establishes the heap invariant assuming the heap - satisfies the invariant except possibly for the leaf-node indexed by k - (which may have a nextExecutionTime less than its parent's). - - - This method functions by "promoting" queue[k] up the hierarchy - (by swapping it with its parent) repeatedly until queue[k] - is greater than or equal to its parent. - - - - - Establishes the heap invariant (described above) in the subtree - rooted at k, which is assumed to satisfy the heap invariant except - possibly for node k itself (which may be greater than its children). - - - This method functions by "demoting" queue[k] down the hierarchy - (by swapping it with its smaller child) repeatedly until queue[k] - is less than or equal to its children. - - - - - Establishes the heap invariant in the entire tree, - assuming nothing about the order of the elements prior to the call. - - - - - Returns the of or - 1, - whichever is smaller. - - base size - percentage to return - of - - - - Initially fill elements of the queue array under the - knowledge that it is sorted or is another , in which - case we can just place the elements in the order presented. - - - - - Initially fill elements of the queue array that is not to our knowledge - sorted, so we must rearrange the elements to guarantee the heap - invariant. - - - - - Removes and returns element located at from queue. (Recall that the queue - is one-based, so 1 <= i <= size.) - - - Normally this method leaves the elements at positions from 1 up to i-1, - inclusive, untouched. Under these circumstances, it returns . - Occasionally, in order to maintain the heap invariant, it must move - the last element of the list to some index in the range [2, i-1], - and move the element previously at position (i/2) to position i. - Under these circumstances, this method returns the element that was - previously at the end of the list and is now at some position between - 2 and i-1 inclusive. - - - - Resize array, if necessary, to be able to hold given index - - - - Inserts the specified element into this queue if it is possible to do - so immediately without violating capacity restrictions. - - -

- When using a capacity-restricted queue, this method is generally - preferable to , - which can fail to insert an element only by throwing an exception. -

-
- - The element to add. - - - if the element was added to this queue. - - - if the specified element cannot be compared - with elements currently in the priority queue according - to the priority queue's ordering. - - - If the element cannot be added at this time due to capacity restrictions. - - - If the supplied is - and this queue does not permit - elements. - - - If some property of the supplied prevents - it from being added to this queue. - -
- - - Retrieves, but does not remove, the head of this queue, - or returns if this queue is empty. - - - The head of this queue, or if this queue is empty. - - - - - Inserts the specified element into this queue if it is possible to do so - immediately without violating capacity restrictions, returning - upon success and throwing an - if no space is - currently available. - - - The element to add. - - - if successful. - - - If the element cannot be added at this time due to capacity restrictions. - - - If the specified element is and this queue does not - permit elements. - - - If some property of the supplied prevents - it from being added to this queue. - - - if the specified element cannot be compared - with elements currently in the priority queue according - to the priority queue's ordering. - - - - - Removes a single instance of the specified element from this - queue, if it is present. - - - - - Returns an over the elements in this queue. - The enumeratoar does not return the elements in any particular order. - - an enumerator over the elements in this queue. - - - - Removes all elements from the priority queue. - The queue will be empty after this call returns. - - - - - Retrieves and removes the head of this queue, - or returns if this queue is empty. - - - The head of this queue, or if this queue is empty. - - - - - Queries the queue to see if it contains the specified - - element to look for. - if the queue contains the , - otherwise. - - - Returns the comparator used to order this collection, or - if this collection is sorted according to its elements natural ordering - (using ). - - - the comparator used to order this collection, or - if this collection is sorted according to its elements natural ordering. - - - - - Save the state of the instance to a stream (that - is, serialize it). - - The length of the array backing the instance is - emitted (int), followed by all of its elements (each an - ) in the proper order. - - the stream - the context - - - - Reconstitute the instance from a stream (that is, - deserialize it). - - the stream - the context - - - - Copies the elements of the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in array at which copying begins. - array is null. - index is less than zero. - array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. - The type of the source cannot be cast automatically to the type of the destination array. 2 - - - - Copies the elements of the to an , starting at index 0. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - array is null. - index is less than zero. - array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. - The type of the source cannot be cast automatically to the type of the destination array. 2 - - - - Gets the Capacity of this queue. Will equal - - - - - Returns the queue count. - - - - - Gets an object that can be used to synchronize access to the . - - - An object that can be used to synchronize access to the . - - - - - Gets a value indicating whether access to the is synchronized (thread safe). - - - true if access to the is synchronized (thread safe); otherwise, false. - - - - - Returns if there are no elements in the , otherwise. - - - - - Index (into queue array) of element to be returned by subsequent call to next. - - - - - Implements an based on a sorted - tree. - - -

- This gives good performance for operations on very large data-sets, - though not as good - asymptotically - as a - . However, iteration occurs - in order. -

-

- Elements that you put into this type of collection must implement - , and they must actually be comparable. - You can't mix and - values, for example. -

-

- This implementation does - not support elements that are . -

-
- -
- - - Creates a new set instance based on a sorted tree. - - - - - Creates a new set instance based on a sorted tree using for ordering. - - - - - Creates a new set instance based on a sorted tree and initializes - it based on a collection of elements. - - - A collection of elements that defines the initial set contents. - - - - - Synchronized that should be returned by synchronized - dictionary implementations in order to ensure that the enumeration is thread safe. - - Aleksandar Seovic - - - - Synchronized that should be returned by synchronized - collections in order to ensure that the enumeration is thread safe. - - Aleksandar Seovic - - - - Synchronized that, unlike hashtable created - using method, synchronizes - reads from the underlying hashtable in addition to writes. - - -

- In addition to synchronizing reads, this implementation also fixes - IEnumerator/ICollection issue described at - http://msdn.microsoft.com/en-us/netframework/aa570326.aspx - (search for SynchronizedHashtable for issue description), by implementing - interface explicitly, and returns thread safe enumerator - implementations as well. -

-

- This class should be used whenever a truly synchronized - is needed. -

-
- Aleksandar Seovic -
- - - Initializes a new instance of - - - - - Initializes a new instance of - - - - - Initializes a new instance of , copying inital entries from - handling keys depending on . - - - - - Creates a instance that - synchronizes access to the underlying . - - the hashtable to be synchronized - - - - Creates a wrapper that synchronizes - access to the passed . - - the hashtable to be synchronized - - - - Adds an element with the provided key and value to the object. - - The to use as the value of the element to add. - The to use as the key of the element to add. - An element with the same key already exists in the object. - key is null. - The is read-only.-or- The has a fixed size. 2 - - - - Removes all elements from the object. - - The object is read-only. 2 - - - - Creates a new object that is a copy of the current instance. - - - A new object that is a copy of this instance. - - - - - Determines whether the object contains an element with the specified key. - - - true if the contains an element with the key; otherwise, false. - - The key to locate in the object. - key is null. 2 - - - - Returns, whether this contains an entry with the specified . - - The key to look for - , if this contains an entry with this - - - - Returns, whether this contains an entry with the specified . - - The valúe to look for - , if this contains an entry with this - - - - Copies the elements of the to an , starting at a particular index. - - The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. - The zero-based index in array at which copying begins. - array is null. - The type of the source cannot be cast automatically to the type of the destination array. - index is less than zero. - array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. 2 - - - - Returns an object for the object. - - - An object for the object. - - - - - Removes the element with the specified key from the object. - - The key of the element to remove. - The object is read-only.-or- The has a fixed size. - key is null. 2 - - - - Returns an enumerator that iterates through a collection. - - - An object that can be used to iterate through the collection. - - - - - Gets a value indicating whether the object is read-only. - - - true if the object is read-only; otherwise, false. - - - - - Gets a value indicating whether the object has a fixed size. - - - true if the object has a fixed size; otherwise, false. - - - - - Gets a value indicating whether access to the is synchronized (thread safe). - - - true if access to the is synchronized (thread safe); otherwise, false. - - - - - Gets an object containing the keys of the object. - - - An object containing the keys of the object. - - - - - Gets an object containing the values in the object. - - - An object containing the values in the object. - - - - - Gets an object that can be used to synchronize access to the . - - - An object that can be used to synchronize access to the . - - - - - Gets the number of elements contained in the . - - - The number of elements contained in the . - - - - - Gets or sets the element with the specified key. - - - The element with the specified key. - - The key of the element to get or set. - The property is set and the object is read-only.-or- The property is set, key does not exist in the collection, and the has a fixed size. - key is null. 2 - - - - Implements a thread-safe wrapper. - - -

- The implementation is extremely conservative, serializing critical - sections to prevent possible deadlocks, and locking on everything. The - one exception is for enumeration, which is inherently not thread-safe. - For this, you have to lock the SyncRoot object for the - duration of the enumeration. -

-
- -
- - - Constructs a thread-safe - wrapper. - - - The object that this object - will wrap. - - - If the supplied ecposes a - SyncRoot value. - - - - - Adds the specified element to this set if it is not already present. - - The object to add to the set. - - is the object was added, - if the object was already present. - - - - - Adds all the elements in the specified collection to the set if - they are not already present. - - A collection of objects to add to the set. - - is the set changed as a result of this - operation. - - - - - Removes all objects from this set. - - - - - Returns if this set contains the specified - element. - - The element to look for. - - if this set contains the specified element. - - - - - Returns if the set contains all the - elements in the specified collection. - - A collection of objects. - - if the set contains all the elements in the - specified collection; also if the - supplied is . - - - - - Removes the specified element from the set. - - The element to be removed. - - if the set contained the specified element. - - - - - Remove all the specified elements from this set, if they exist in - this set. - - A collection of elements to remove. - - if the set was modified as a result of this - operation. - - - - - Retains only the elements in this set that are contained in the - specified collection. - - - The collection that defines the set of elements to be retained. - - - if this set changed as a result of this - operation. - - - - - Copies the elements in the to - an array. - - -

- The type of array needs to be compatible with the objects in the - , obviously. -

-
- - An array that will be the target of the copy operation. - - - The zero-based index where copying will start. - -
- - - Gets an enumerator for the elements in the - . - - - An over the elements - in the . - - - - - Returns a clone of the instance. - - A clone of this object. - - - - Returns if this set contains no elements. - - - - - The number of elements currently contained in this collection. - - - - - Returns if the - is synchronized across - threads. - - - - - - An object that can be used to synchronize this collection to make - it thread-safe. - - - An object that can be used to synchronize this collection to make - it thread-safe. - - - - - - Simple listener that logs application events to the console. - - -

- Intended for use during debugging only. -

-
- Rod Johnson - Griffin Caprio (.NET) - -
- - - A listener for application events. - - Rod Johnson - Griffin Caprio (.NET) - - - - Handle an application event. - - - The source of the event. - - - The event that is to be handled. - - - - - Creates a new instance of the - class. - - - - - Handle an application event. - - - The source of the event. - - - The event that is to be handled. - - - - - Event object sent to listeners registered with an - to inform them of - context lifecycle events. - - Griffin Caprio (.NET) - - - - - - - Encapsulates the data associated with an event raised by an - . - - Rod Johnson - Mark Pollack (.NET) - Griffin Caprio (.NET) - - - - - Creates a new instance of the - class. - - - - - The date and time when the event occured. - - - The date and time when the event occured. - - - - - The system time in milliseconds when the event happened. - - - The system time in milliseconds when the event happened. - - - - - Creates a new instance of the ContextEventArgs class to represent the - supplied context event. - - The type of context event. - - - - Returns a string representation of this object. - - A string representation of this object. - - - - The event type. - - - - - The various context event types. - - - - - The event type when the context is refreshed or created. - - - - - The event type when the context is closed. - - - - - Event object sent to listeners registered with an - to inform them of - context lifecycle event. - - - - - Event object sent to listeners registered with an - to inform them of - context lifecycle event. - - - - - Partial implementation of the - interface. - - -

- Does not mandate the type of storage used for configuration, but does - implement common functionality. Uses the Template Method design - pattern, requiring concrete subclasses to implement - methods. -

-

- In contrast to a plain vanilla - , an - is supposed - to detect special objects defined in its object factory: therefore, - this class automatically registers - s, - s - and s that are - defined as objects in the context. -

-

- An may be also supplied as - an object in the context, with the special, well-known-name of - "messageSource". Else, message resolution is delegated to the - parent context. -

-
- Rod Johnson - Juergan Hoeller - Griffin Caprio (.NET) - - -
- - - Configurable implementation of the - interface. - - -

- This implementation - supports the configuration of resource access protocols and the - corresponding .NET types that know how to handle those protocols. -

-

- Basic protocol-to-resource type mappings are also defined by this class, - while others can be added either internally, by application contexts - extending this class, or externally, by the end user configuring the - context. -

-

- Only one resource type can be defined for each protocol, but multiple - protocols can map to the same resource type (for example, the - "http" and "ftp" protocols both map to the - type. The protocols that are - mapped by default can be found in the following list. -

-

- - - assembly - - - config - - - file - - - http - - - https - - -

-
- Aleksandar Seovic - - - -
- - - Describes an object that can load - s. - - -

- An implementation is - generally required to support the functionality described by this - interface. -

-

- The class is a - standalone implementation that is usable outside an - ; the aforementioned - class is also used by the - class. -

-
- Juergen Hoeller - Mark Pollack (.NET) - - - -
- - - Return an handle for the - specified resource. - - -

- The handle should always be a reusable resource descriptor; this - allows one to make repeated calls to the underlying - . -

-

-

    -
  • - Must support fully qualified URLs, e.g. "file:C:/test.dat". -
  • -
  • - Should support relative file paths, e.g. "test.dat" (this will be - implementation-specific, typically provided by an - implementation). -
  • -
-

- - An handle does not imply an - existing resource; you need to check the value of an - 's - property to determine - conclusively whether or not the resource actually exists. - -
- The resource location. - - An appropriate handle. - - - - -
- - - The separator between the protocol name and the resource name. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class using the specified default protocol for unqualified resources. - - - - - Returns a that has been - mapped to the protocol of the supplied . - - The name of the resource. - - A new instance for the - supplied . - - - If a - mapping does not exist for the supplied . - - - In the case of any errors arising from the instantiation of the - returned instance. - - - - - - Checks that the supplied starts - with one of the protocol names currently mapped by this - instance. - - The name of the resource. - - if the supplied - starts with one of the known - protocols; if not, or if the supplied - is itself . - - - - - Extracts the protocol name from the supplied - . - - The name of the resource. - - The extracted protocol name or if the - supplied is unqualified (or - is itself ). - - - - - The default protocol to use for unqualified resources. - - -

- The initial value is "file". -

-
-
- - - Provides the means to configure an application context in addition to - the methods exposed on the - interface. - - -

- This interface is to be implemented by most (if not all) - implementations. -

-

- Configuration and lifecycle methods are encapsulated here to avoid - making them obvious to - client code. -

-

- Calling will close this - application context, releasing all resources and locks that the - implementation might hold. This includes disposing all cached - singleton objects. -

- - does not invoke the - attendant on any parent - context. - -
- Juergen Hoeller - Mark Pollack (.NET) - - -
- - - The central interface to Spring.NET's IoC container. - - -

- implementations - provide: - - - - Object factory functionality inherited from the - - and - interfaces. - - - - - The ability to resolve messages, supporting internationalization. - Inherited from the - interface. - - - - - The ability to load file resources in a generic fashion. - Inherited from the - interface. - - - - - Acts an an event registry for supporting loosely coupled eventing - between objecs. Inherited from the - interface. - - - - - The ability to raise events related to the context lifecycle. Inherited - from the - interface. - - - - - Inheritance from a parent context. Definitions in a descendant context - will always take priority. - - - -

-

- In addition to standard object factory lifecycle capabilities, - implementations need - to detect - , - , and - objects and supply - their attendant dependencies accordingly. -

-

- This interface is the central client interface in Spring.NET's IoC - container implementation. As such it does inherit a quite sizeable - number of interfaces; implementations are strongly encouraged to use - composition to satisfy each of the inherited interfaces (where - appropriate of course). -

-
- Rod Johnson - Juergen Hoeller - Mark Pollack (.NET) - - - - -
- - - Extension of the interface - to be implemented by object factories that can enumerate all their object instances, - rather than attempting object lookup by name one by one as requested by clients. - - -

- implementations that preload - all their objects (for example, DOM-based XML factories) may implement this - interface. This interface is discussed in - "Expert One-on-One J2EE Design and Development", by Rod Johnson. -

-

- If this is an , - the return values will not take any - hierarchy into account, but - will relate only to the objects defined in the current factory. - Use the helper class to - get all objects. -

-

- With the exception of - , - the methods and properties in this interface are not designed for frequent - invocation. Implementations may be slow. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - The root interface for accessing a Spring.NET IoC container. - - - - This is the basic client view of a Spring.NET IoC container; further interfaces - such as and - - are available for specific purposes such as enumeration and configuration. - - - This is the root interface to be implemented by objects that can hold a number - of object definitions, each uniquely identified by a - name. An independent instance of any of these objects can be obtained - (the Prototype design pattern), or a single shared instance can be obtained - (a superior alternative to the Singleton design pattern, in which the instance is a - singleton in the scope of the factory). Which type of instance - will be returned depends on the object factory configuration - the API is the same. - The Singleton approach is more useful and hence more common in practice. - - - The point of this approach is that the IObjectFactory is a central registry of - application components, and centralizes the configuring of application components - (no more do individual objects need to read properties files, for example). - See chapters 4 and 11 of "Expert One-on-One J2EE Design and Development" for a - discussion of the benefits of this approach. - - - Normally an IObjectFactory will load object definitions stored in a configuration - source (such as an XML document), and use the - namespace to configure the objects. However, an implementation could simply return - .NET objects it creates as necessary directly in .NET code. There are no - constraints on how the definitions could be stored: LDAP, RDBMS, XML, properties - file etc. Implementations are encouraged to support references amongst objects, - to either Singletons or Prototypes. - - - In contrast to the methods in - , all of the methods - in this interface will also check parent factories if this is an - . If an object is - not found in this factory instance, the immediate parent is asked. Objects in - this factory instance are supposed to override objects of the same name in any - parent factory. - - - Object factories are supposed to support the standard object lifecycle interfaces - as far as possible. The maximum set of initialization methods and their standard - order is: - - - - - - 's - property. - - - - - 's - property. - - - - - - (only applicable if running within an ). - - - - - The - - method of - s. - - - - - 's - method. - - - - - A custom init-method definition. - - - - - The - - method of - s. - - - - -

- - On shutdown of an object factory, the following lifecycle methods apply: - - - - - - 's - method. - - - - - A custom destroy-method definition. - - - - - - Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - - -

- Is this object a singleton? - - - - That is, will - always return the same object? - - - Will ask the parent factory if the object cannot be found in this factory - instance. - - - The name of the object to query. - True if the named object is a singleton. - - If there's no such object definition. - -
- - - Determines whether the specified object name is prototype. That is, will GetObject - always return independent instances? - - This method returning false does not clearly indicate a singleton object. - It indicated non-independent instances, which may correspond to a scoped object as - well. use the IsSingleton property to explicitly check for a shared - singleton instance. - Translates aliases back to the corresponding canonical object name. Will ask the - parent factory if the object can not be found in this factory instance. - - - - The name of the object to query - - true if the specified object name will always deliver independent instances; otherwise, false. - - if there is no object with the given name. - - - - Does this object factory contain an object with the given name? - - - - The concrete lookup strategy depends on the implementation. E.g. s - will also search their parent factory if a name isn't found . - - - The name of the object to query. - True if an object with the given name is defined. - - - - Return the aliases for the given object name, if defined. - - - - Will ask the parent factory if the object cannot be found in this factory - instance. - - - The object name to check for aliases. - The aliases, or an empty array if none. - - If there's no such object definition. - - - - - Return an instance (possibly shared or independent) of the given object name. - - - - This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. - - - Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. - - - Will ask the parent factory if the object cannot be found in this factory - instance. - - - The name of the object to return. - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - - - Return an instance (possibly shared or independent) of the given object name. - - - - This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. - - - Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. - - - Will ask the parent factory if the object cannot be found in this factory - instance. - - - The name of the object to return. - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. If there is no factory method and the - arguments are not null, then match the argument values by type and - call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the supplied is . - - - - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - - - Return an instance (possibly shared or independent) of the given object name. - - - - Provides a measure of type safety by throwing an exception if the object is - not of the required . - - - This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. - - - Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. - - - Will ask the parent factory if the object cannot be found in this factory - instance. - - - The name of the object to return. - - the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - - - Determine the type of the object with the given name. - - - - More specifically, checks the type of object that - would return. - For an , returns the type - of object that the creates. - - - The name of the object to query. - - The type of the object or if not determinable. - - - - - Determines whether the object with the given name matches the specified type. - - More specifically, check whether a GetObject call for the given name - would return an object that is assignable to the specified target type. - Translates aliases back to the corresponding canonical bean name. - Will ask the parent factory if the bean cannot be found in this factory instance. - - The name of the object to query. - Type of the target to match against. - - true if the object type matches; otherwise, false - if it doesn't match or cannot be determined yet. - - Ff there is no object with the given name - - - - - Return an unconfigured(!) instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - The unconfigured(!) instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - This method will only instantiate the requested object. It does NOT inject any dependencies! - - - - - Injects dependencies into the supplied instance - using the named object definition. - - - - In addition to being generally useful, typically this method is used to provide - dependency injection functionality for objects that are instantiated outwith the - control of a developer. A case in point is the way that the current (1.1) - ASP.NET classes instantiate web controls... the instantiation takes place within - a private method of a compiled page, and thus cannot be hooked into the - typical Spring.NET IOC container lifecycle for dependency injection. - - - - The following code snippet assumes that the instantiated factory instance - has been configured with an object definition named - 'ExampleNamespace.BusinessObject' that has been configured to set the - Dao property of any ExampleNamespace.BusinessObject instance - to an instance of an appropriate implementation... - - namespace ExampleNamespace - { - public class BusinessObject - { - private IDao _dao; - - public BusinessObject() {} - - public IDao Dao - { - get { return _dao; } - set { _dao = value; } - } - } - } - - with the corresponding driver code looking like so... - - IObjectFactory factory = GetAnIObjectFactoryImplementation(); - BusinessObject instance = new BusinessObject(); - factory.ConfigureObject(instance, "object_definition_name"); - // at this point the dependencies for the 'instance' object will have been resolved... - - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - If there is no object definition for the supplied . - - - If any of the target object's dependencies could not be created. - - - - - Determine whether this object factory treats object names case-sensitive or not. - - - - - Return an instance (possibly shared or independent) of the given object name. - - - - This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. - - - Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. - - - Will ask the parent factory if the object cannot be found in this factory - instance. - - - This is the indexer for the - interface. - - - The name of the object to return. - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - - - Check if this object factory contains an object definition with the given name. - - -

- Does not consider any hierarchy this factory may participate in. -

- - Ignores any singleton objects that have been registered by other means - than object definitions. - -
- The name of the object to look for. - - if this object factory contains an object - definition with the given name. - -
- - - Return the names of all objects defined in this factory. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - -

- Does consider objects created by s, - or rather it considers the type of objects created by - (which means that - s will be instantiated). -

-

- Does not consider any hierarchy this factory may participate in. -

-
- - The (class or interface) to match, or - for all object names. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - -
- - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - -

- Does consider objects created by s, - or rather it considers the type of objects created by - (which means that - s will be instantiated). -

-

- Does not consider any hierarchy this factory may participate in. - Use - to include beans in ancestor factories too. - <p>Note: Does <i>not</i> ignore singleton objects that have been registered - by other means than bean definitions. -

-
- - The (class or interface) to match, or - for all object names. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - -
- - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - -

- This version of the - method matches all kinds of object definitions, be they singletons, prototypes, or - s. Typically, the results - of this method call will be the same as a call to - IListableObjectFactory.GetObjectsOfType(type,true,true) . -

-
- - The (class or interface) to match. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - -
- - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - - The (class or interface) to match. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - - - - - Return the number of objects defined in the factory. - - - The number of objects defined in the factory. - - - - - Sub-interface implemented by object factories that can be part - of a hierarchy. - - Rod Johnson - Rick Evans (.NET) - - - - Determines whether the local object factory contains a bean of the given name, - ignoring object defined in ancestor contexts, also resolving a given alias if necessary. - This is an alternative to ContainsObject, ignoring an object - of the given name from an ancestor object factory. - - The name of the object to query. - - true if objects with the specified name is defined in the local factory; otherwise, false. - - - - - Return the parent object factory, or - if this factory does not have a parent. - - - The parent object factory, or - if this factory does not have a parent. - - - - - Describes an object that can resolve messages. - - -

- This enables the parameterization and internationalization of messages. -

-

- Spring.NET provides one out-of-the-box implementation for production - use: -

    -
  • .
  • -
-

-
- Rod Johnson - Juergen Hoeller - Mark Pollack (.NET) - Aleksandar Seovic (.NET) - -
- - - Resolve the message identified by the supplied - . - - -

- If the lookup is not successful, implementations are permitted to - take one of two actions. -

- - - Throw an exception. - - - - Return the supplied as is. - - - -
- The name of the message to resolve. - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - -
- - - Resolve the message identified by the supplied - . - - -

- If the lookup is not successful, implementations are permitted to - take one of two actions. -

- - - Throw an exception. - - - - Return the supplied as is. - - - -
- The name of the message to resolve. - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - -
- - - Resolve the message identified by the supplied - . - - - Note that the fallback behavior based on CultureInfo seem to - have a bug that is fixed by installed .NET 1.1 Service Pack 1. -

- If the lookup is not successful, implementations are permitted to - take one of two actions. -

- - - Throw an exception. - - - - Return the supplied as is. - - - -
- The name of the message to resolve. - - The that represents - the culture for which the resource is localized. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - -
- - - Resolve the message identified by the supplied - . - - - Note that the fallback behavior based on CultureInfo seem to - have a bug that is fixed by installed .NET 1.1 Service Pack 1. -

- If the lookup is not successful, implementations are permitted to - take one of two actions. -

- - - Throw an exception. - - - - Return the supplied as is. - - - -
- The name of the message to resolve. - - The that represents - the culture for which the resource is localized. - - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - -
- - - Resolve the message identified by the supplied - . - - - Note that the fallback behavior based on CultureInfo seem to - have a bug that is fixed by installed .NET 1.1 Service Pack 1. -

- If the lookup is not successful, implementations are permitted to - take one of two actions. -

- - - Throw an exception. - - - - Return the supplied as is. - - - -
- The name of the message to resolve. - The default message if name is not found. - - The that represents - the culture for which the resource is localized. - - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - -
- - - Resolve the message using all of the attributes contained within - the supplied - argument. - - - The value object storing those attributes that are required to - properly resolve a message. - - - The that represents - the culture for which the resource is localized. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - Gets a localized resource object identified by the supplied - . - - -

- This method must use the - - value to obtain a resource. -

-

- Examples of resources that may be resolved by this method include - (but are not limited to) objects such as icons and bitmaps. -

-
- - The name of the resource object to resolve. - - - The resolved object, or if not found. - -
- - - Gets a localized resource object identified by the supplied - . - - -

- Examples of resources that may be resolved by this method include - (but are not limited to) objects such as icons and bitmaps. -

-
- - The name of the resource object to resolve. - - - The with which the - resource is associated. - - - The resolved object, or if not found. - -
- - - Applies resources to object properties. - - -

- Resource key names are of the form objectName.propertyName. -

-
- - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - -
- - - Encapsulates event publication functionality. - - -

- Serves as a super-interface for the - interface. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Publishes an application context event. - - - The source of the event. May be . - - - The event that is to be raised. - - - - - A registry that manages subscriptions to and the - publishing of events. - - Griffin Caprio - - - - Publishes all events of the source object. - - - The source object containing events to publish. - - - - - Subscribes to all events published, if the subscriber - implements compatible handler methods. - - The subscriber to use. - - - - Subscribes to the published events of all objects of a given - , if the subscriber implements - compatible handler methods. - - The subscriber to use. - - The target to subscribe to. - - - - - Unsubscribes to all events published, if the subscriber - implmenets compatible handler methods. - - The subscriber to use - - - - Unsubscribes to the published events of all objects of a given - , if the subscriber implements - compatible handler methods. - - The subscriber to use. - - The target to unsubscribe from - - - - - Raised in response to an application context event. - - - - - Returns the date and time this context was loaded. - - -

- This is to be set immediately after an - has been - instantiated and its configuration has been loaded. Implementations - are permitted to update this value if the context is reset or - refreshed in some way. -

-
- - The representing when this context - was loaded. - - -
- - - Gets the parent context, or if there is no - parent context. - - -

- If the parent context is , then this context - is the root of any context hierarchy. -

-
- - The parent context, or if there is no - parent. - -
- - - Gets and sets a name for this context. - - - A name for this context. - - - - - Interface defining methods for start/stop lifecycle control. - The typical use case for this is to control asynchronous processing. - - - - Can be implemented by both components (typically a Spring object defined in - a spring and containers - (typically a spring . Containers will - propagate start/stop signals to all components that apply. - - - Juergen Hoeller - Mark Pollack (.NET) - - - - Starts this component. - - Should not throw an exception if the component is already running. - In the case of a container, this will propagate the start signal - to all components that apply. - - - - - Stops this component. - - - Should not throw an exception if the component isn't started yet. - In the case of a container, this will propagate the stop signal - to all components that apply. - - - - - Gets a value indicating whether this component is currently running. - - - In the case of a container, this will return true - only if all components that apply are currently running. - - - true if this component is running; otherwise, false. - - - - - Add an - - that will get applied to the internal object factory of this - application context on refresh, before any of the object - definitions are evaluated. - - -

- To be invoked during context configuration. -

-
- - The factory processor to register. - - -
- - - Load or refresh the persistent representation of the configuration, - which might an XML file, properties file, or relational database schema. - - - If the configuration cannot be loaded. - - - If the object factory could not be initialized. - - - - - Return the internal object factory of this application context. - - -

- Can be used to access specific functionality of the factory. -

- - This is just guaranteed to return an instance that is not - after the context has been refreshed - at least once. - - - Do not use this to post-process the object factory; singletons - will already have been instantiated. Use an - - to intercept the object factory setup process before objects even - get touched. - -
- -
- - - Sets the parent of this application context. - - - - The parent should not be changed: it should only be set - outside a constructor if it isn't available when an instance of - this class is created. - - - - The parent context. - - - - - Interface for registries that hold object definitions, i.e. - - and - - instances. - - -

- Typically implemented by object factories that work with the - - hierarchy internally. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Determine whether the given object name is already in use within this registry, - i.e. whether there is a local object or alias registered under this name. - - - - - Return the names of all objects defined in this registry. - - - The names of all objects defined in this registry, or an empty array - if none defined - - - - - Check if this registry contains a object definition with the given name. - - - The name of the object to look for. - - - True if this object factory contains an object definition with the - given name. - - - - - Returns the - - for the given object name. - - - The name of the object to find a definition for. - - - The for - the given name (never null). - - - If the object definition cannot be resolved. - - - In case of errors. - - - - - Register a new object definition with this registry. - Must support - - and . - - - The name of the object instance to register. - - - The definition of the object instance to register. - - -

- Must support - and - . -

-
- - If the object definition is invalid. - -
- - - Return the aliases for the given object name, if defined. - - the object name to check for aliases - - -

- Will ask the parent factory if the object cannot be found in this - factory instance. -

-
- - The aliases, or an empty array if none. - - - If there's no such object definition. - -
- - - Given a object name, create an alias. We typically use this method to - support names that are illegal within XML ids (used for object names). - - - The name of the object. - - - The alias that will behave the same as the object name. - - - If there is no object with the given name. - - - If the alias is already in use. - - - - - Return the number of objects defined in the registry. - - - The number of objects defined in the registry. - - - - - Name of the .Net config section that contains Spring.Net context definition. - - - - - Default name of the root context. - - - - - The special, well-known-name of the default - in the context. - - -

- If no can be found - in the context using this lookup key, then message resolution - will be delegated to the parent context (if any). -

-
-
- - - The special, well-known-name of the default - in the context. - - -

- If no can be found - in the context using this lookup key, then a default - will be used. -

-
-
- - - The instance for this class. - - - - - The instance we delegate - our implementation of said interface to. - - - - - The instance we - delegate our implementation of said interface to. - - - - - Creates a new instance of the - with no parent context. - - -

- This is an class, and as such exposes - no public constructors. -

-
-
- - - Creates a new instance of the - with no parent context. - - -

- This is an class, and as such exposes - no public constructors. -

-
- Flag specifying whether to make this context case sensitive or not. -
- - - Creates a new instance of the - with the supplied parent context. - - -

- This is an class, and as such exposes - no public constructors. -

-
- The application context name. - Flag specifying whether to make this context case sensitive or not. - The parent application context. -
- - - Adds the given to the list of standard - processors being added to the underlying - - - Each time is called on this context, the context ensures, that - all default s are registered with the underlying . - - The instance. - - - - Closes this context and disposes of any resources (such as - singleton objects in the wrapped - ). - - - - - Subclasses must implement this method to perform the actual - configuration loading. - - -

- This method is invoked by - , - before any other initialization occurs. -

-
- - In the case of errors encountered while refreshing the object factory. - -
- - - Returns the internal object factory of the parent context if it implements - ; else, - returns the parent context itself. - - - The parent context's object factory, or the parent itself. - - - - - Raises an application context event. - - - Any arguments to the event. May be . - - - - - Raises an application context event. - - - The source of the event. - - - Any arguments to the event. May be . - - - - - Create the strategy to be used - - - - - Modify the application context's internal object factory after its standard - initialization. - - -

- All object definitions will have been loaded, but no objects - will have been instantiated yet. This allows for the registration - of special - s - in certain - implementations. -

-
- - The object factory used by the application context. - - - In the case of errors. - . -
- - - Template method which can be overridden to add context-specific - work before the underlying object factory gets refreshed. - - - - - Template method which can be overridden to add context-specific - refresh work. - - -

- Called on initialization of special objects, before instantiation - of singletons. -

-
-
- - - Template method which can be overridden to add context-specific - work after the context was refreshed but before the - event gets raised. - - - - - Instantiate and invoke all registered - - objects, respecting any explicit ordering. - - - - Must be called before singleton instantiation. - - - In the case of errors. - - - - Resets the well-known ObjectPostProcessorChecker that logs an info - message when an object is created during IObjectPostProcessor - instantiation, i.e. when an object is not eligible for being - processed by all IObjectPostProcessors. - - - - - Initializes the default event registry for this context. - - - - - Returns the internal message source of the parent context if said - parent context is an , else - simply the parent context itself. - - - The internal message source of the parent context if said - parent context is an , else - simply the parent context itself. - - - - - Initializes the default message source for this context. - - -

- Uses any parent context's message source if one is not available - in this context. -

-
-
- - - Add a new - that will get applied to the internal object factory of this application context - on refresh, before any of the object definitions are evaluated. - - - The factory processor to register. - - - - - Load or refresh the persistent representation of the configuration, - which might an XML file, properties file, or relational database schema. - - - If the configuration cannot be loaded. - - - If the object factory could not be initialized. - - - - - Registers well-known s and - preregisters well-known dependencies using - - the raw object factory as returned from - - - - Ensures, that predefined ObjectPostProcessors are registered with this ObjectFactory - - - - - - Starts this component. - - Should not throw an exception if the component is already running. - In the case of a container, this will propagate the start signal - to all components that apply. - - - - - Stops this component. - - - Should not throw an exception if the component isn't started yet. - In the case of a container, this will propagate the stop signal - to all components that apply. - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the names of all objects defined in this factory. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - Whether to search parent object factories. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - - The (class or interface) to match. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - - - - - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - - The (class or interface) to match. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - - - - - - Check if this object factory contains an object definition with the given name. - - The name of the object to look for. - - True if this object factory contains an object definition with the given name. - - - - - - Does this object factory contain an object with the given name? - - The name of the object to query. - - if an object with the given name is defined. - - - - - - Return the aliases for the given object name, if defined. - - The object name to check for aliases. - The aliases, or an empty array if none. - - If there's no such object definition. - - - - - - Return an unconfigured(!) instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - The unconfigured(!) instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - This method will only instantiate the requested object. It does NOT inject any dependencies! - - - - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - - - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - - - - Return an instance (possibly shared or independent) of the given object name. - - -

- This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. -

-

- Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. -

-

- Will ask the parent factory if the object cannot be found in this factory - instance. -

-
- The name of the object to return. - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. If there is no factory method and the - arguments are not null, then match the argument values by type and - call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the supplied is . - -
- - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - - - Is this object a singleton? - - The name of the object to query. - True if the named object is a singleton. - - If there's no such object definition. - - - - - - Determines whether the specified object name is prototype. That is, will GetObject - always return independent instances? - - The name of the object to query - - true if the specified object name will always deliver independent instances; otherwise, false. - - This method returning false does not clearly indicate a singleton object. - It indicated non-independent instances, which may correspond to a scoped object as - well. use the IsSingleton property to explicitly check for a shared - singleton instance. - Translates aliases back to the corresponding canonical object name. Will ask the - parent factory if the object can not be found in this factory instance. - - - if there is no object with the given name. - - - - Determines whether the object with the given name matches the specified type. - - More specifically, check whether a GetObject call for the given name - would return an object that is assignable to the specified target type. - Translates aliases back to the corresponding canonical bean name. - Will ask the parent factory if the bean cannot be found in this factory instance. - - The name of the object to query. - Type of the target to match against. - - true if the object type matches; otherwise, false - if it doesn't match or cannot be determined yet. - - Ff there is no object with the given name - - - - - Determine the of the object with the - given name. - - The name of the object to query. - - The of the object, or - if not determinable. - - - - - - Injects dependencies into the supplied instance - using the named object definition. - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - - - - Injects dependencies into the supplied instance - using the supplied . - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - An object definition that should be used to configure object. - - - - - - Determines whether the local object factory contains a bean of the given name, - ignoring object defined in ancestor contexts. - This is an alternative to ContainsObject, ignoring an object - of the given name from an ancestor object factory. - - - - - The name of the object to query. - - true if objects with the specified name is defined in the local factory; otherwise, false. - - - - - Determine whether the given object name is already in use within this context, - i.e. whether there is a local object. May be override by subclasses, the default - implementation simply returns - - - - - Register a new object definition with this registry. - Must support - - and . - - The name of the object instance to register. - The definition of the object instance to register. - -

- Must support - and - . -

-
- - If the object definition is invalid. - -
- - - Given a object name, create an alias. We typically use this method to - support names that are illegal within XML ids (used for object names). - - The name of the object. - The alias that will behave the same as the object name. - - If there is no object with the given name. - - - If the alias is already in use. - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The that represents - the culture for which the resource is localized. - - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If no message could be resolved. - - - If the supplied is . - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - The default message. - - The that represents - the culture for which the resource is localized. - - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If no message could be resolved. - - - If the supplied is . - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The resolved message if the lookup was successful. - - - If no message could be resolved. - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful. - - - If no message could be resolved. - - - If the supplied is . - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The that represents - the culture for which the resource is localized. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If no message could be resolved. - - - If the supplied is . - - - - - - Resolve the message using all of the attributes contained within - the supplied - argument. - - - The value object storing those attributes that are required to - properly resolve a message. - - - The that represents - the culture for which the resource is localized. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The with which the - resource is associated. - - - The resolved object, or if not found. - - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The resolved object, or if not found. - - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The with which the - resource is associated. - - - The resolved object, or if not found. - - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The resolved object, or if not found. - - - - - - Applies resources to object properties. - - - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - - - - - - Publishes all events of the source object. - - - The source object containing events to publish. - - - - - - Subscribes to all events published, if the subscriber - implements compatible handler methods. - - The subscriber to use. - - - - - Subscribes to published events of a all objects of a given - , if the subscriber implements - compatible handler methods. - - The subscriber to use. - - The target to subscribe to. - - - - - - Unsubscribes to all events published, if the subscriber - implmenets compatible handler methods. - - The subscriber to use - - - - Unsubscribes to the published events of all objects of a given - , if the subscriber implements - compatible handler methods. - - The subscriber to use. - - The target to unsubscribe from - - - - - Publishes an application context event. - - -

- -

-
- - The source of the event. May be . - - - The event that is to be raised. - - -
- - - An object that can be used to synchronize access to the - - - - - Set the to be used by this context. - - - - - The timestamp when this context was first loaded. - - - The timestamp (milliseconds) when this context was first loaded. - - - - - Gets a flag indicating whether context should be case sensitive. - - true if object lookups are case sensitive; otherwise, false. - - - - The for this context. - - - If the context has not been initialized yet. - - - - - The for this context. - - - If the context has not been initialized yet. - - - - - Returns the list of the - s - that will be applied to the objects created with this factory. - - -

- The elements of this list are instances of implementations of the - - interface. -

-
- - The list of the - s - that will be applied to the objects created with this factory. - -
- - - Return the internal object factory of this application context. - - - - - Gets the parent context, or if there is no - parent context. - - - The parent context, or if there is no - parent. - - - - - - Gets a value indicating whether this component is currently running. - - - true if this component is running; otherwise, false. - - - In the case of a container, this will return true - only if all components that apply are currently running. - - - - - Gets a dictionary of all singleton beans that implement the - ILifecycle interface in this context. - - A dictionary of ILifecycle objects with object name as key. - - - - Raised in response to an implementation-dependant application - context event. - - - - - The date and time this context was first loaded. - - - The representing when this context - was first loaded. - - - - - A name for this context. - - - A name for this context. - - - - - Return the number of objects defined in the factory. - - - The number of objects defined in the factory. - - - - - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - - - - Return the parent object factory, or if there is none. - - - The parent object factory, or if there is none. - - - - - - Allows for custom modification of new object instances, e.g. - checking for marker interfaces or wrapping them with proxies. - - -

- Application contexts can auto-detect - - objects in their object definitions and apply them before any other - objects get created. Plain object factories allow for programmatic - registration of post-processors. -

-

- Typically, post-processors that populate objects via marker interfaces - or the like will implement - , - and post-processors that wrap objects with proxies will normally implement - . -

-
- Juergen Hoeller - Aleksandar Seovic (.NET) - -
- - - Apply this - to the given new object instance before any object initialization callbacks. - - -

- The object will already be populated with property values. - The returned object instance may be a wrapper around the original. -

-
- - The new object instance. - - - The name of the object. - - - The object instance to use, either the original or a wrapped one. - - - In case of errors. - -
- - - Apply this to the - given new object instance after any object initialization callbacks. - - -

- The object will already be populated with property values. The returned object - instance may be a wrapper around the original. -

-
- - The new object instance. - - - The name of the object. - - - The object instance to use, either the original or a wrapped one. - - - In case of errors. - -
- - - Interface that can be implemented by objects that should be orderable, e.g. in an - . - - -

- The actual order can be interpreted as prioritization, the first object (with the - lowest order value) having the highest priority. -

-
- Juergen Hoeller - Aleksandar Seovic (.Net) -
- - - Return the order value of this object, where a higher value means greater in - terms of sorting. - - -

- Normally starting with 0 or 1, with indicating - greatest. Same order values will result in arbitrary positions for the affected - objects. -

-

- Higher value can be interpreted as lower priority, consequently the first object - has highest priority. -

-
- The order value. -
- - - Abstract implementation of the interface, - implementing common handling of message variants, making it easy - to implement a specific strategy for a concrete . - - -

Subclasses must implement the abstract ResolveObject - method.

-

Note: By default, message texts are only parsed through - String.Format if arguments have been passed in for the message. In case - of no arguments, message texts will be returned as-is. As a consequence, - you should only use String.Format escaping for messages with actual - arguments, and keep all other messages unescaped. -

-

Supports not only IMessageSourceResolvables as primary messages - but also resolution of message arguments that are in turn - IMessageSourceResolvables themselves. -

-

This class does not implement caching of messages per code, thus - subclasses can dynamically change messages over time. Subclasses are - encouraged to cache their messages in a modification-aware fashion, - allowing for hot deployment of updated messages. -

-
- Rod Johnson - Juergen Hoeller - Griffin Caprio (.NET) - Harald Radi (.NET) - - - -
- - - Sub-interface of to be - implemented by objects that can resolve messages hierarchically. - - Rod Johnson - Juergen Hoeller - Mark Pollack (.NET) - - - - - The parent message source used to try and resolve messages that - this object can't resolve. - - -

- If the value of this property is then no - further resolution is possible. -

-
-
- - - holds the logger instance shared with subclasses. - - - - - Initializes this instance. - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the lookup is not successful throw NoSuchMessageException - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - The that represents - the culture for which the resource is localized. - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - Note that the fallback behavior based on CultureInfo seem to - have a bug that is fixed by installed .NET 1.1 Service Pack 1. -

- If the lookup is not successful, implementations are permitted to - take one of two actions. -

- If the lookup is not successful throw NoSuchMessageException -
-
- - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the lookup is not successful throw NoSuchMessageException - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - The that represents - the culture for which the resource is localized. - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - Note that the fallback behavior based on CultureInfo seem to - have a bug that is fixed by installed .NET 1.1 Service Pack 1. -

- If the lookup is not successful throw NoSuchMessageException. -

-
-
- - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - The default message if name is not found. - The that represents - the culture for which the resource is localized. - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - Note that the fallback behavior based on CultureInfo seem to - have a bug that is fixed by installed .NET 1.1 Service Pack 1. -

- If the lookup is not successful throw NoSuchMessageException -

-
-
- - - Resolve the message using all of the attributes contained within - the supplied - argument. - - The value object storing those attributes that are required to - properly resolve a message. - The that represents - the culture for which the resource is localized. - - The resolved message if the lookup was successful. - - - If the message could not be resolved. - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The resolved object, or if not found. - - - - - - Gets a localized resource object identified by the supplied - . - - - Note that the fallback behavior based on CultureInfo seem to - have a bug that is fixed by installed .NET 1.1 Service Pack 1. - - - The name of the resource object to resolve. - - - The with which the - resource is associated. - - - The resolved object, or if not found. If - the resource name resolves to null, then in .NET 1.1 the return - value will be String.Empty whereas in .NET 2.0 it will return - null. - - - - - - Applies resources to object properties. - - - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - - - - - Resolve the given code and arguments as message in the given culture, - returning null if not found. Does not fall back to the code - as default message. Invoked by GetMessage methods. - - The code to lookup up, such as 'calculator.noRateSet'. - array of arguments that will be filled in for params - within the message. - The with which the - resource is associated. - - The resolved message if the lookup was successful. - - - - - Try to retrieve the given message from the parent MessageSource, if any. - - The code to lookup up, such as 'calculator.noRateSet'. - array of arguments that will be filled in for params - within the message. - The with which the - resource is associated. - - The resolved message if the lookup was successful. - - - - - Return a fallback default message for the given code, if any. - - - Default is to return the code itself if "UseCodeAsDefaultMessage" - is activated, or return no fallback else. In case of no fallback, - the caller will usually receive a NoSuchMessageException from GetMessage - - The code to lookup up, such as 'calculator.noRateSet'. - The default message to use, or null if none. - - - - Renders the default message string. The default message is passed in as specified by the - caller and can be rendered into a fully formatted default message shown to the user. - - Default implementation passed he String for String.Format resolving any - argument placeholders found in them. Subclasses may override this method to plug - in custom processing of default messages. - - The default message. - The array of agruments that will be filled in for parameter - placeholders within the message, or null if none. - The with which the - resource is associated. - The rendered default message (with resolved arguments) - - - - Format the given default message String resolving any - agrument placeholders found in them. - - The message to format. - The array of agruments that will be filled in for parameter - placeholders within the message, or null if none. - The with which the - resource is associated. - The formatted message (with resolved arguments) - - - - Search through the given array of objects, find any - MessageSourceResolvable objects and resolve them. - - - Allows for messages to have MessageSourceResolvables as arguments. - - - The array of arguments for a message. - The with which the - resource is associated. - An array of arguments with any IMessageSourceResolvables resolved - - - - Gets the specified resource (e.g. Icon or Bitmap). - - The name of the resource to resolve. - - The to resolve the - code for. - - The resource if found. otherwise. - - - - Applies resources from the given name on the specified object. - - - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - - - - - Subclasses must implement this method to resolve a message. - - The code to lookup up, such as 'calculator.noRateSet'. - The with which the - resource is associated. - The resolved message from the backing store of message data. - - - - Resolves an object (typically an icon or bitmap). - - -

- Subclasses must implement this method to resolve an object. -

-
- The code of the object to resolve. - - The to resolve the - code for. - - - The resolved object or if not found. - -
- - - Applies resources to object properties. - - -

- Subclasses must implement this method to apply resources - to an arbitrary object. -

-
- - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - -
- - Gets or Sets a value indicating whether to use the message code as - default message instead of throwing a NoSuchMessageException. - Useful for development and debugging. Default is "false". - - -

Note: In case of a IMessageSourceResolvable with multiple codes - (like a FieldError) and a MessageSource that has a parent MessageSource, - do not activate "UseCodeAsDefaultMessage" in the parent: - Else, you'll get the first code returned as message by the parent, - without attempts to check further codes.

-

To be able to work with "UseCodeAsDefaultMessage" turned on in the parent, - AbstractMessageSource contains special checks - to delegate to the internal GetMessageInternal method if available. - In general, it is recommended to just use "UseCodeAsDefaultMessage" during - development and not rely on it in production in the first place, though.

-

Alternatively, consider overriding the GetDefaultMessage - method to return a custom fallback message for an unresolvable code.

-
- - true if use the message code as default message instead of - throwing a NoSuchMessageException; otherwise, false. - -
- - - The parent message source used to try and resolve messages that - this object can't resolve. - - - -

- If the value of this property is then no - further resolution is possible. -

-
-
- - - Convenient abstract superclass for - implementations that - draw their configuration from XML documents containing object - definitions as understood by an - . - - Rod Johnson - Juergen Hoeller - Griffin Caprio (.NET) - - - - Creates a new instance of the - - class. - - -

- This is an class, and as such exposes - no public constructors. -

-
-
- - - Creates a new instance of the - class - with the given parent context. - - -

- This is an class, and as such exposes - no public constructors. -

-
- The application context name. - Flag specifying whether to make this context case sensitive or not. - The parent context. -
- - - Instantiates and populates the underlying - with the object - definitions yielded up by the - method. - - - In the case of errors encountered while refreshing the object factory. - - - In the case of errors encountered reading any of the resources - yielded by the method. - - - - - - Initialize the object definition reader used for loading the object - definitions of this context. - - -

- The default implementation of this method is a no-op; i.e. it does - nothing. Can be overridden in subclasses to provide custom - initialization of the supplied - ; for example, a derived - class may want to turn off XML validation. -

-
- - The object definition reader used by this context. - -
- - - Load the object definitions with the given - . - - -

- The lifecycle of the object factory is handled by - ; - therefore this method is just supposed to load and / or register - object definitions. -

-
- - The reader containing object definitions. - - In case of object registration errors. - - - In the case of errors encountered reading any of the resources - yielded by the method. - -
- - - Loads the object definitions into the given object factory, typically through - delegating to one or more object definition readers. - - The object factory to lead object definitions into - - - - - - Create a new reader instance for importing object definitions into the specified . - - the to be associated with the reader - a new instance. - - - - Customizes the internal object factory used by this context. - - Called for each attempt. -

- The default implementation is empty. Can be overriden in subclassses to customize - DefaultListableBeanFatory's standard settings. -

- The newly created object factory for this context -
- - - Create an internal object factory for this context. - - -

- Called for each attempt. - This default implementation creates a - - with the internal object factory of this context's parent serving - as the parent object factory. Can be overridden in subclasse,s - for example to customize DefaultListableBeanFactory's settings. -

-
- The object factory for this context. -
- - - Determine whether the given object name is already in use within this context's object factory, - i.e. whether there is a local object or alias registered under this name. - - - - - An array of resource locations, referring to the XML object - definition files that this context is to be built with. - - -

- Examples of the format of the various strings that would be - returned by accessing this property can be found in the overview - documentation of with the - class. -

-
- - An array of resource locations, or if none. - -
- - - Subclasses must return their internal object factory here. - - - The internal object factory for the application context. - - - - - - - implementation that passes the application context to object that - implement the - , - , and - interfaces. - - -

- If an object's class implements more than one of the - , - , and - interfaces, then the - order in which the interfaces are satisfied is as follows... - - - - - - - - - - - -

-

- Application contexts will automatically register this with their - underlying object factory. Applications should thus never need to use - this class directly. -

-
- Juergen Hoeller - Griffin Caprio (.NET) -
- - - Creates a new instance of the - class. - - - The that this - instance will work with. - - - - - Apply this - to the given new object instance before any object - initialization callbacks. - - - The new object instance. - - - The name of the object. - - - The the object instance to use, either the original or a wrapped one. - - - In case of errors. - - - - - - Apply this to the - given new object instance after any object initialization - callbacks. - - - The new object instance. - - - The name of the object. - - - The object instance to use, either the original or a wrapped one. - - - In case of errors. - - - - - - Convenient superclass for application objects that want to be aware of - the application context, e.g. for custom lookup of collaborating object - or for context-specific resource access. - - -

- It saves the application context reference and provides an - initialization callback method. Furthermore, it offers numerous - convenience methods for message lookup. -

-

- There is no requirement to subclass this class: it just makes things - a little easier if you need access to the context, e.g. for access to - file resources or to the message source. Note that many application - objects do not need to be aware of the application context at all, - as they can receive collaborating objects via object references. -

-
- Rod Johnson - Juergen Hoeller - Griffin Caprio (.NET) -
- - - To be implemented by any object that wishes to be notified - of the that it runs in. - - -

- Implementing this interface makes sense when an object requires access - to a set of collaborating objects. Note that configuration via object - references is preferable to implementing this interface just for object - lookup purposes. -

-

- This interface can also be implemented if an object needs access to - file resources, i.e. wants to call - , or access to - the . However, it is - preferable to implement the more specific - - interface to receive a reference to the - object in that scenario. -

-

- Note that dependencies can also - be exposed as object properties of the - type, populated via strings with - automatic type conversion performed by an object factory. This obviates - the need for implementing any callback interface just for the purpose - of accessing a specific file resource. -

-

- - is a convenience implementation of this interface for your - application objects. -

-

- For a list of all object lifecycle methods, see the overview for the - interface. -

-
- Rod Johnson - Mark Pollack (.NET) - - - -
- - - Sets the that this - object runs in. - - -

- Normally this call will be used to initialize the object. -

-

- Invoked after population of normal object properties but before an - init callback such as - 's - - or a custom init-method. Invoked after the setting of any - 's - - property. -

-
- - In the case of application context initialization errors. - - - If thrown by any application context methods. - - -
- - - Creates a new instance of the - class. - - -

- This is an class, and as such exposes no - public constructors. -

-
-
- - - Creates a new instance of the - class. - - -

- This is an class, and as such exposes no - public constructors. -

-
- - The that this - object runs in. - -
- - - Intializes the wrapped - . - - -

- This is a template method that subclasses can override for custom - initialization behavior. -

-

- Gets called by the - - instance directly after setting the context instance. -

- - Does not get called on reinitialization of the context. - -
- - In the case of any initialization errors. - - - If thrown by application context methods. - -
- - - The context class that any context passed to the - - must be an instance of. - - - The - . - - - - - Return a for the - application context used by this object, for easy message access. - - - - - Gets or sets the that this - object runs in. - - - When passed an unexpected - implementation - instance that is not compatible with the - defined by the value of the - . - property. Also, thrown when trying to re-initialize with a - different than was - originally used. - - - If thrown by any application context methods. - - - - - - - Creates an instance - using context definitions supplied in a custom configuration and - configures the with that instance. - - - Implementations of the - interface must provide the following two constructors: - - - - A constructor that takes a string array of resource locations. - - - - - A constructor that takes a reference to a parent application context - and a string array of resource locations (and in that order). - - - -

- Note that if the type attribute is not present in the declaration - of a particular context, then a default - - is assumed. This default - - is currently the - ; please note the exact - of this default is an - implementation detail, that, while unlikely, may do so in the future. - to -

-
- -

- This is an example of specifying a context that reads its resources from - an embedded Spring.NET XML object configuration file... -

- - - - -
- - - - - - - - - -

- This is an example of specifying a context that reads its resources from - a custom configuration section within the same application / web - configuration file and uses case insensitive object lookups. -

-

- Please note that you must adhere to the naming - of the various sections (i.e. '<sectionGroup name="spring">' and - '<section name="context">'. -

- - - - -
-
- - - - - - - - - - - - -

- And this is an example of specifying a hierarchy of contexts. The - hierarchy in this case is only a simple parent->child hierarchy, but - hopefully it illustrates the nesting of context configurations. This - nesting of contexts can be arbitrarily deep, and is one way... child - contexts know about their parent contexts, but parent contexts do not - know how many child contexts they have (if any), or have references - to any such child contexts. -

- - - - -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Mark Pollack - Aleksandar Seovic - Rick Evans - - - - - Creates an instance - using the context definitions supplied in a custom - configuration section. - - -

- This instance is - also used to configure the . -

-
- - The configuration settings in a corresponding parent - configuration section. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is . - - - The for the section. - - - An instance - populated with the object definitions supplied in the configuration - section. - -
- - - Create all child-contexts in the given for the given context. - - The parent context to use - The current configContext - The list of child context elements - - - - Instantiates a new context. - - - - - Gets the context's name specified in the name attribute of the context element. - - The current configContext - The context element - - - - Extracts the context-type from the context element. - If none is specified, returns the parent's type. - - - - - Extracts the case-sensitivity attribute from the context element - - - - - Gets the context specified in the type - attribute of the context element. - - -

- If this attribute is not defined it defaults to the - type. -

-
- - If the context type does not implement the - interface. - -
- - - Returns the array of resources containing object definitions for - this context. - - - - - Returns the array of child contexts for this context. - - - - - The of - created if no type attribute is specified on a context element. - - - - - - Get the context's case-sensitivity to use if none is specified - - -

- Derived handlers may override this property to change their default case-sensitivity. -

-

- Defaults to 'true'. -

-
-
- - - Returns if the context should be lazily - initialized. - - - - - Constants defining the structure and values associated with the - schema for laying out Spring.NET contexts in XML. - - - - - Defines a single - . - - - - - Specifies a context name. - - - - - Specifies if context should be case sensitive or not. Default is true. - - - - - Specifies a . - - -

- Does not have to be fully assembly qualified, but its generally regarded - as better form if the names of one's objects - are specified explicitly. -

-
-
- - - Specifies whether context should be lazy initialized. - - - - - Defines an - - - - - Specifies the URI for an - . - - - - - Provides access to a central registry of - s. - - -

- A singleton implementation to access one or more application contexts. Application - context instances are cached. -

-

Note that the use of this class or similar is unnecessary except (sometimes) for - a small amount of glue code. Excessive usage will lead to code that is more tightly - coupled, and harder to modify or test. Consider refactoring your code to use standard - Dependency Injection techniques or implement the interface IApplicationContextAware to - obtain a reference to an application context.

-
- Mark Pollack - Aleksandar Seovic - -
- - - The shared instance for this class (and derived classes). - - - - - Creates a new instance of the ContextRegistry class. - - -

- Explicit static constructor to tell C# compiler - not to mark type as beforefieldinit. -

-
-
- - - Registers an instance of an - . - - -

- This is usually called via a - inside a .NET - application configuration file. -

-
- The application context to be registered. - - If a context has previously been registered using the same name - -
- - - Handles events raised by an application context. - - - - - - - Removes the context from the registry - - - Has no effect if the context wasn't registered - - ´the context to remove from the registry - - - - Returns the root application context. - - -

- The first call to GetContext will create the context - as specified in the .NET application configuration file - under the location spring/context. -

-
- The root application context. -
- - - Returns context based on specified name. - - -

- The first call to GetContext will create the context - as specified in the .NET application configuration file - under the location spring/context. -

-
- The context name. - The specified context, or null, if context with that name doesn't exists. - - If the context name is null or empty - -
- - - Removes all registered - s from this - registry. - - - Raises the event while still holding a lock on - - - - - Allows to check, if a context is already registered - - The context name. - true, if the context is already registered. false otherwise - - - - This event is fired, if ContextRegistry.Clear() is called.
- Clients may register to get informed -
- - This event is fired while still holding a lock on the Registry.
- 'sender' parameter is sent as typeof(ContextRegistry), EventArgs are not used -
-
- - - Gets an object that should be used to synchronize access to ContextRegistry - from the calling code. - - - - - Default implementation of the - interface. - - -

- Provides easy ways to store all the necessary values needed to resolve - messages from an . -

-
- Juergen Hoeller - Griffin Caprio (.NET) - -
- - - Describes objects that are suitable for message resolution in a - . - - -

- Spring.NET's own validation error classes implement this interface. -

-
- Juergen Hoeller - Mark Pollack (.NET) - - -
- - - Return the codes to be used to resolve this message, in the order - that they are to be tried. - - -

- The last code will therefore be the default one. -

-
- - A array of codes which are associated - with this message. - -
- - - Return the array of arguments to be used to resolve this message. - - - An array of objects to be used as parameters to replace - placeholders within the message text. - - - - - Return the default message to be used to resolve this message. - - - The default message, or if there is no - default. - - - - - Creates a new instance of the - class - using a single code. - - The message code to be resolved. - - - - Initializes a new instance of the class. - - The codes to be used to resolve this message - - - - Creates a new instance of the - class - using multiple codes. - - The message codes to be resolved. - - The arguments used to resolve the supplied . - - - - - Creates a new instance of the - class - using multiple codes and a default message. - - The message codes to be resolved. - - The arguments used to resolve the supplied . - - - The default message used if no code could be resolved. - - - - - Creates a new instance of the - class - from another resolvable. - - -

- This is the copy constructor for the - class. -

-
- - The to be copied. - - - If the supplied is . - -
- - - Returns a representation of this - . - - - A representation of this - . - - - - - Calls the visit method on the supplied - to output a version of this class. - - The visitor to use. - - A representation of this - . - - - - - Return the codes to be used to resolve this message, in the order - that they are to be tried. - - - A array of codes which are associated - with this message. - - - - - - Return the array of arguments to be used to resolve this message. - - - An array of objects to be used as parameters to replace - placeholders within the message text. - - - - - - Return the default code for this resolvable. - - - The default code of this resolvable; this will be the last code in - the codes array, or if this instance has no - codes. - - - - - - Return the default message to be used to resolve this message. - - - The default message, or if there is no - default. - - - - - - Default section handler that can handle any configuration section. - - -

- Simply returns the configuration section as an . -

-
- Aleksandar Seovic -
- - - Returns the configuration section as an - - - The configuration settings in a corresponding parent - configuration section. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is a null reference. - - - The for the section. - - Config section as XmlElement. - - - - Empty implementation that - simply delegates all method calls to it's parent - . - - -

- If no parent is available, - no messages will be resolved (and a - will be thrown). -

-

- Used as placeholder by the - class, - if the context definition doesn't define its own - . Not intended for direct use - in applications. -

-
- Juergan Hoeller - Rick Evans (.NET) - -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The parent message source used to try and resolve messages that - this object can't resolve. - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The that represents - the culture for which the resource is localized. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - - The that represents - the culture for which the resource is localized. - - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - - Resolve the message identified by the supplied - . - - The name of the message to resolve. - The default message. - - The that represents - the culture for which the resource is localized. - - - The array of arguments that will be filled in for parameters within - the message, or if there are no parameters - within the message. Parameters within a message should be - referenced using the same syntax as the format string for the - method. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - - - - Resolve the message using all of the attributes contained within - the supplied - argument. - - - The value object storing those attributes that are required to - properly resolve a message. - - - The that represents - the culture for which the resource is localized. - - - The resolved message if the lookup was successful (see above for - the return value in the case of an unsuccessful lookup). - - - If the message could not be resolved. - - - If the message could not be resolved. - - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The resolved object, or if not found. - - - - - - Gets a localized resource object identified by the supplied - . - - - The name of the resource object to resolve. - - - The with which the - resource is associated. - - - The resolved object, or if not found. - - - - - - Applies resources to object properties. - - - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - - - - - - The parent message source used to try and resolve messages that - this object can't resolve. - - - - - - Generic ApplicationContext implementation that holds a single internal - instance and does not - assume a specific object definition format. - - - Implements the interface in order - to allow for aplying any object definition readers to it. - Typical usage is to register a variety of object definitions via the - interface and then call - to initialize those - objects with application context semantics (handling - , auto-detecting - ObjectFactoryPostProcessors, etc). - - In contrast to other IApplicationContext implementations that create a new internal - IObjectFactory instance for each refresh, the internal IObjectFactory of this context - is available right from the start, to be able to register object definitions on it. - may only be called once - Usage examples - - GenericApplicationContext ctx = new GenericApplicationContext(); - // register your objects and object definitions - ctx.RegisterObjectDefinition(...) - ctx.Refresh(); - - - Mark Pollack - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - if set to true names in the context are case sensitive. - - - - Initializes a new instance of the class. - - The object factory instance to use for this context. - - - - Initializes a new instance of the class. - - The parent application context. - - - - Initializes a new instance of the class. - - The name of the application context. - if set to true names in the context are case sensitive. - The parent application context. - - - - Initializes a new instance of the class. - - The object factory to use for this context - The parent applicaiton context. - - - - Initializes a new instance of the class. - - The name of the application context. - if set to true names in the context are case sensitive. - The parent application context. - The object factory to use for this context - - - - Do nothing operation. We hold a single internal ObjectFactory and rely on callers - to register objects throug our public methods (or the ObjectFactory's). - - - In the case of errors encountered while refreshing the object factory. - - - - - Determines whether the given object name is already in use within this factory, - i.e. whether there is a local object or alias registered under this name or - an inner object created with this name. - - - - - Return the internal object factory of this application context. - - - - - - Gets the underlying object factory of this context, available for - registering object definitions. - - You need to call Refresh to initialize the - objects factory and its contained objects with application context - semantics (autodecting IObjectFactoryPostProcessors, etc). - The internal object factory (as DefaultListableObjectFactory). - - - - Helper class for easy access to messages from an - , providing various - overloaded GetMessage methods. - - -

- Available from - , but also - reusable as a standalone helper to delegate to in application objects. -

-
- Juergen Hoeller - Griffin Caprio (.NET) - - -
- - - Creates a new instance of the - class - that uses the current - for all locale specific lookups. - - - The to use to locate messages. - - - - - Creates a new instance of the - class - - - The to use to locate - messages. - - - The to use for - locale specific messages. - - - - - Retrieve the message for the given code and the default - . - - The code of the message. - The message. - - - - Retrieve the message for the given code and the given - . - - The code of the message. - - The to use for - lookups. - - The message. - - - - Retrieve the message for the given code and the default - . - - The code of the message. - - The arguments for the message, or if none. - - The message. - - If the message could not be found. - - - - - Retrieve the message for the given code and the given - . - - The code of the message. - - The to use for - lookups. - - - The arguments for the message, or if none. - - The message. - - If the message could not be found. - - - - - Retrieve a mesage using the given - . - - - The . - - The message. - - If the message could not be found. - - - - - Retrieve a mesage using the given - in the given - . - - - The . - - - The to use for - lookups. - - The message - - If the message could not be found. - - - - - Visitor class to represent - instances. - - -

- Used in the first instance to supply stringified versions of - instances. -

-

- Other methods can be added here to return different representations, - including XML, CSV, etc.. -

-
- Griffin Caprio (.NET) -
- - - Creates a new instance of the - class. - - - - - Outputs the supplied - as a nicely formatted . - - - The to output. - - - - - Configuration section handler for the (recommended, Spring.NET standard) parsers - config section. - - -

- Spring.NET allows the registration of custom configuration parsers that - can be used to create simplified configuration schemas that better - describe object definitions. -

-

- For example, Spring.NET uses this facility internally in order to - define simplified schemas for various AOP, Data and Services definitions. -

-
- -

- The following example shows how to configure both this section handler - and how to define custom configuration parsers within a Spring.NET - config section. -

- - - - -
- - - - - - - ... - - ... - - - - - Aleksandar Seovic - - - - - Registers parsers specified in the (recommended, Spring.NET standard) - parsers config section with the . - - - The configuration settings in a corresponding parent - configuration section. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is . - - - The for the section. - - - This method always returns , because parsers - are registered as a side-effect of this object's execution and there - is thus no need to return anything. - - - - - An that doesn't do a whole lot. - - -

- is an implementation of - the NullObject pattern. It should be used in those situations where a - needs to be passed (say to a - method) but where the resolution of messages is not required. -

-

- There should not (typically) be a need to instantiate instances of this class; - does not maintan any state - and the instance is - thus safe to pass around. -

-
- Aleksandar Seovic -
- - - The canonical instance of the - class. - - - - - Creates a new instance of the class. - - -

- Consider using - instead. -

-
-
- - - Simply returns the supplied message as-is. - - The code of the message to resolve. - - The to resolve the - code for. - - - The supplied message as-is. - - - - - Always returns . - - The code of the object to resolve. - - The to resolve the - code for. - - - (always). - - - - - Does nothing. - - - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - - - - - Handler for Spring.NET resourceHandlers config section. - - -

- Spring allows registration of custom resource handlers that can be used to load - object definitions from. -

-

- For example, if you wanted to store your object definitions in a database instead - of in the config file, you could write a custom implementation - and register it with Spring using 'db' as a protocol name. -

-

- Afterwards, you would simply specify resource URI within the context config element - using your custom resource handler. -

-
- -

- The following example shows how to configure both this section handler, - how to define custom resource within Spring config section, and how to load - object definitions using custom resource handler: -

- - - - -
- - - - - - - - - - - - - - Aleksandar Seovic - - - - - Registers resource handlers that are specified in - the resources config section with the . - - - The configuration settings in a corresponding parent - configuration section. Ignored. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is . - - - The for the section. - - - This method always returns null, because resource handlers are registered - as a sideffect of its execution and there is no need to return anything. - - - - - An implementation that - accesses resources from .resx / .resource files. - - Note that for the method - GetResourceObject if the resource name resolves to null, then in - .NET 1.1 the return value will be String.Empty whereas - in .NET 2.0 it will return null. - Griffin Caprio (.NET) - Mark Pollack (.NET) - Aleksandar Seovic (.NET) - - - - Defines a simple initialization callback for objects that need to to some - post-initialization logic after all of their dependencies have been injected. - - -

- An implementation of the - - method might perform some additional custom initialization (over and above that - performed by the constructor), or merely check that all mandatory properties - have been set (this last example is a very typical use case of this interface). -

- - The use of the - interface - by non-Spring.NET framework code can be avoided (and is generally - discouraged). The Spring.NET container provides support for a generic - initialization method given to the object definition in the object - configuration store (be it XML, or a database, etc). This requires - slightly more configuration (one attribute-value pair in the case of - XML configuration), but removes any dependency on Spring.NET from the - class definition. - -
- Rod Johnson - Rick Evans (.NET) - -
- - - Invoked by an - after it has injected all of an object's dependencies. - - -

- This method allows the object instance to perform the kind of - initialization only possible when all of it's dependencies have - been injected (set), and to throw an appropriate exception in the - event of misconfiguration. -

-

- Please do consult the class level documentation for the - interface for a - description of exactly when this method is invoked. In - particular, it is worth noting that the - - and - callbacks will have been invoked prior to this method being - called. -

-
- - In the event of misconfiguration (such as the failure to set a - required property) or if initialization fails. - -
- - - Creates a new instance of the - class. - - - - - Resolves a given code by searching through each assembly name in - the base names array. - - The code to resolve. - - The to use for lookups. - - The message from the resource set. - - - - Resolves a given code by searching through each assembly name in the array. - - The code to resolve. - - The to use for lookups. - - The object from the resource set. - - - - Uses a System.ComponentModel.ComponentResourceManager - to apply resources to object properties. - Resource key names are of the form objectName.propertyName - - - This feature is not currently supported on version 1.0 of the .NET platform. - - - An object that contains the property values to be applied. - - - The base name of the object to use for the key lookup. - - - The to use for lookups. - If , uses the - value. - - - This feature is not currently supported on version 1.0 of the .NET platform. - - - - - Resolves a code into an object given a base name. - - The to search. - The code to resolve. - - The to use for lookups. - - The object from the resource file. - - - - Returns a representation of the - . - - A representation of the - . - - - - Invoked by an - after it has set all object properties supplied. - - -

- The list may contain objects of type or - . types - are converted to instances using the notation - resourcename, assembly partial name. -

-
- - If the conversion from a to a - can't be performed. - -
- - - The collection of s - in this . - - - - - that allows concrete registration of - objects and messages in code, rather than from external configuration sources. - - -

- Mainly useful for testing. -

-
- Rod Johnson - Griffin Caprio (.NET) -
- - - Creates a new instance of the StaticApplicationContext class. - - - - - Creates a new instance of the StaticApplicationContext class. - - The parent application context. - - - - Creates a new, named instance of the StaticApplicationContext class. - - the context name - The parent application context. - - - - Do nothing: we rely on callers to update our public methods. - - - - - Register a singleton object with the default object factory. - - The name of the object. - The of the object. - The property values for the singleton instance. - - - - Registers a prototype object with the default object factory. - - The name of the prototype object. - The of the prototype object. - The property values for the prototype instance. - - - - Associate the given message with the given code. - - The lookup code. - - The that the message should be found within. - - The message associated with the lookup code. - - - - Simple implementation of - that allows messages to be held in an object and added programmatically. - - -

- Mainly useful for testing. -

-

- This supports internationalization. -

-
- Rod Johnson - Juergen Hoeller - Griffin Caprio (.NET) - -
- - - Creates a new instance of the - class. - - - - - Returns a format string. - - The code of the message to resolve. - - The to resolve the - code for. - - - A format string or if not found. - - - - - - Resolves an object (typically an icon or bitmap). - - The code of the object to resolve. - - The to resolve the - code for. - - - The resolved object or if not found. - - - - - - Applies resources to object properties. - - -

- Uses a System.ComponentModel.ComponentResourceManager - internally to apply resources to object properties. Resource key - names are of the form objectName.propertyName. -

-

- This feature is not currently supported on version 1.0 of the .NET platform. -

-
- - An object that contains the property values to be applied. - - - The base name of the object to use for key lookup. - - - The with which the - resource is associated. - - - This feature is not currently supported on version 1.0 of the .NET platform. - - -
- - - Associate the supplied with the - supplied . - - The lookup code. - - The to resolve the - code for. - - - The message format associated with this lookup code. - - - - - Associate the supplied with the - supplied . - - The lookup code. - - The to resolve the - code for. - - - The object associated with this lookup code. - - - - - Returns a representation of this - message source. - - - A containing all of this message - source's messages. - - - - - Configuration section handler for the Spring.NET typeAliases - config section. - - -

- Type aliases can be used instead of fully qualified type names anywhere - a type name is expected in a Spring.NET configuration file. -

-

- This includes type names specified within an object definition, as well - as values of the properties or constructor arguments that expect - instances. -

-
- -

- The following example shows how to configure both this section handler and - how to define type aliases within a Spring.NET config section: -

- - - - -
- - - - - - - ... - - ... - - - - - Aleksandar Seovic - - - - - Populates using values specified in - the typeAliases config section. - - - The configuration settings in a corresponding parent - configuration section. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is . - - - The for the section. - - - This method always returns , because the - is populated as a side-effect of this - object's execution and thus there is no need to return anything. - - - - - Configuration section handler for the Spring.NET typeConverters - config section. - - -

- Type converters are used to convert objects from one type into another - when injecting property values, evaluating expressions, performing data - binding, etc. -

-

- They are a very powerful mechanism as they allow Spring.NET to automatically - convert string-based property values from the configuration file into the appropriate - type based on the target property's type or to convert string values submitted - via a web form into a type that is used by your data model when Spring.NET data - binding is used. Because they offer such tremendous help, you should always provide - a type converter implementation for your custom types that you want to be able to use - for injected properties or for data binding. -

-

- The standard .NET mechanism for specifying type converter for a particular type is - to decorate the type with a , passing the type - of the -derived class as a parameter. -

-

- This mechanism will still work and is a preferred way of defining type converters if - you control the source code for the type that you want to define a converter for. However, - this configuration section allows you to specify converters for the types that you don't - control and it also allows you to override some of the standard type converters, such as - the ones that are defined for some of the types in the .NET Base Class Library. -

-
- -

- The following example shows how to configure both this section handler and - how to define type converters within a Spring.NET config section: -

- - - - -
- - - - - - - ... - - ... - - - - - Aleksandar Seovic - - - - - Populates using values specified in - the typeConverters config section. - - - The configuration settings in a corresponding parent - configuration section. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is . - - - The for the section. - - - This method always returns , because the - is populated as a side-effect of - its execution and thus there is no need to return anything. - - - - - An implementation that - reads context definitions from XML based resources. - - -

- Currently, the resources that are supported are the file, - http, ftp, config and assembly resource - types. -

-

- You can provide custom implementations of the - interface and and register them - with any that inherits - from the - - interface. -

- - In case of multiple config locations, later object definitions will - override ones defined in previously loaded resources. This can be - leveraged to deliberately override certain object definitions via an - extra XML file. - -
- -

- Find below some examples of instantiating an - using a - variety of different XML resources. -

- - // an XmlApplicationContext that reads its object definitions from an - // XML file that has been embedded in an assembly... - IApplicationContext context = new XmlApplicationContext - ( - "assembly://AssemblyName/NameSpace/ResourceName" - ); - - // an XmlApplicationContext that reads its object definitions from a - // number of disparate XML resources... - IApplicationContext context = new XmlApplicationContext - ( - // from an XML file that has been embedded in an assembly... - "assembly://AssemblyName/NameSpace/ResourceName", - // and from a (relative) filesystem-based resource... - "file://Objects/services.xml", - // and from an App.config / Web.config resource... - "config://spring/objects" - ); - -
- Rod Johnson - Juergen Hoeller - Griffin Caprio (.NET) - - - -
- - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations. - - The created context will be case sensitive. - - Any number of XML based object definition resource locations. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations. - - Flag specifying whether to make this context case sensitive or not. - - Any number of XML based object definition resource locations. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations. - - The application context name. - Flag specifying whether to make this context case sensitive or not. - - Any number of XML based object definition resource locations. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations, - with the given . - - - The parent context (may be ). - - - Any number of XML based object definition resource locations. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations, - with the given . - - Flag specifying whether to make this context case sensitive or not. - - The parent context (may be ). - - - Any number of XML based object definition resource locations. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations, - with the given . - - The application context name. - Flag specifying whether to make this context case sensitive or not. - - The parent context (may be ). - - - Any number of XML based object definition resource locations. - - - - - Creates a new instance of the - class, - loading the definitions from the supplied XML resource locations, - with the given . - - - This constructor is meant to be used by derived classes. By passing =false, it is - the responsibility of the deriving class to call to initialize the context instance. - - if true, is called automatically. - The application context name. - Flag specifying whether to make this context case sensitive or not. - - The parent context (may be ). - - - Any number of XML based object definition resource locations. - - - - - An array of resource locations, referring to the XML object - definition files that this context is to be built with. - - - An array of resource locations, or if none. - - - - - Exception thrown during application context initialization. - Rod Johnson - Mark Pollack (.NET) - - - - Thrown on an unrecoverable problem encountered in the - objects namespace or sub-namespaces, e.g. bad class or field. - - Rod Johnson - Mark Pollack (.NET) - - - - Superclass for all exceptions thrown in the Objects namespace and sub-namespaces. - - Rod Johnson - Mark Pollack (.NET) - - - Creates a new instance of the ObjectsException class. - - - - Creates a new instance of the ObjectsException class. with the specified message. - - - A message about the exception. - - - - - Creates a new instance of the ObjectsException class with the specified message - and root cause. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectsException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Creates a new instance of the FatalObjectException class. - - - - - Creates a new instance of the FatalObjectException class with the - specified message. - - - A message about the exception. - - - - - Creates a new instance of the FatalObjectException class with the - specified message. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the FatalObjectException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Creates a new instance of the - class with the - specified message. - - - A message about the exception. - - - - - Creates a new instance of the - class with the - specified message. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Marks an interface as being an application event listener. - - Griffin Caprio - - - - - Creates a new instance of the - class. - - - - - The callback for application events. - - - - - To be implemented by any object that wishes to be notified - of the associated with it. - - -

- In the current implementation, the - will typically be the - associated that - spawned the implementing object. -

-

- The can usually also be - passed on as an object reference to arbitrary object properties or - constructor arguments, because a - is typically defined as an - object with the well known name "messageSource" in the - associated application context. -

-
- Juergen Hoeller - Rick Evans (.NET) - -
- - - Sets the associated - with this object. - - -

- Invoked after population of normal object properties but - before an initializing callback such as the - - method of the - interface - or a custom init-method. -

-

- It is also invoked before the - - property of any - - implementation. -

-
- - The associated - with this object. - -
- - - Interface to be implemented by any object that wishes to be notified - of the (typically the - ) that it runs in. - - -

- Note that dependencies can also - be exposed as object properties of type - , populated via strings with - automatic type conversion by the object factory. This obviates the - need for implementing any callback interface just for the purpose of - accessing a specific resource. -

-

- You typically need an - when your application object has to access a variety of file resources - whose names are calculated. A good strategy is to make the object use - a default resource loader but still implement the - interface to allow - for overriding when running in an - . -

-
- Juergen Hoeller - Mark Pollack (.NET) - - - -
- - - Sets the - that this object runs in. - - -

- Invoked after population of normal objects properties but - before an init callback such as - 's - - or a custom init-method. Invoked before setting - 's - - property. -

-
-
- - - Thrown when a message cannot be resolved. - - Rod Johnson - Mark Pollack (.NET) - - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class with the - specified message. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the - class. - - - The - that holds the serialized object data about the exception being - thrown. - - - The - that contains contextual information about the source or - destination. - - - - - Creates a new instance of the - class. - - - The code that could not be resolved for given culture. - - - The that was used - to search for the code. - - - - - Creates a new instance of the - class. - - - The code that could not be resolved for the current UI culture. - - - - - Convenience base class for - implementations, pre-implementing typical behavior. - - -

- The method will - check whether a or - can be opened; - will always return - ; - and - throw an exception; - and will - return the value of the - property. -

-
- Juergen Hoeller - Rick Evans (.NET) - Aleksandar Seovic (.NET) - -
- - - The central abstraction for Spring.NET's access to resources such as - s. - - -

- This interface encapsulates a resource descriptor that abstracts away - from the underlying type of resource; possible resource types include - files, memory streams, and databases (this list is not exhaustive). -

-

- A can definitely be opened and accessed - for every such resource; if the resource exists in a physical form (for - example, the resource is not an in-memory stream or one that has been - extracted from an assembly or ZIP file), a or - can also be accessed. The actual - behavior is implementation-specific. -

-

- This interface, when used in tandem with the - interface, forms the backbone of - Spring.NET's resource handling. Third party extensions or libraries - that want to integrate external resources with Spring.NET's IoC - container are encouraged expose such resources via this abstraction. -

-

- Interfaces cannot obviously mandate implementation, but derived classes - are strongly encouraged to expose a constructor that takes a - single as it's sole argument (see example). - Exposing such a constructor will make your custom - implementation integrate nicely - with the class. -

-
- Juergen Hoeller - Rick Evans (.NET) - - -
- - - Simple interface for objects that are sources for - s. - - -

- This is the base interface for the abstraction encapsulated by - Spring.NET's interface. -

-
- Juergen Hoeller - Rick Evans (.NET) - -
- - - Return an for this resource. - - - - Clients of this interface must be aware that every access of this - property will create a fresh ; - it is the responsibility of the calling code to close any such - . - - - - An . - - - If the stream could not be opened. - - - - - Creates a resource relative to this resource. - - - The path (always resolved as relative to this resource). - - - The relative resource. - - - If the relative resource could not be created from the supplied - path. - - - If the resource does not support the notion of a relative path. - - - - - Does this resource represent a handle with an open stream? - - -

- If , the - cannot be read multiple times, and must be read and then closed to - avoid resource leaks. -

-

- Will be for all usual resource descriptors. -

-
- - if this resource represents a handle with an - open stream. - - -
- - - Returns the handle for this resource. - - -

- For safety, always check the value of the - property prior to - accessing this property; resources that cannot be exposed as - a will typically return - from a call to the - property. -

-
- - The handle for this resource. - - - If the resource is not available or cannot be exposed as a - . - - - -
- - - Returns a handle for this resource. - - -

- For safety, always check the value of the - property prior to - accessing this property; resources that cannot be exposed as - a will typically return - from a call to the - property. -

-
- - The handle for this resource. - - - If the resource is not available on a filesystem, or cannot be - exposed as a handle. - - - -
- - - Returns a description for this resource. - - -

- The description is typically used for diagnostics and other such - logging when working with the resource. -

-

- Implementations are also encouraged to return this value from their - method. -

-
- - A description for this resource. - -
- - - Does this resource actually exist in physical form? - - -

- An example of a resource that physically exists would be a - file on a local filesystem. An example of a resource that does not - physically exist would be an in-memory stream. -

-
- - if this resource actually exists in physical - form (for example on a filesystem). - - - -
- - - The default special character that denotes the base (home, or root) - path. - - -

- Will be resolved (by those - implementations that support it) to the home (or root) path for - the specific implementation. -

-

- For example, in the case of a web application this will (probably) - resolve to the virtual directory of said web application. -

-
-
- - - Creates a new instance of the - class. - - -

- This is an class, and as such exposes no - public constructors. -

-
-
- - - Creates a new instance of the - class. - - -

- This is an class, and as such exposes no - public constructors. -

-
- - A string representation of the resource. - - - If the supplied is - or contains only whitespace character(s). - -
- - - Strips any protocol name from the supplied - . - - -

- If the supplied does not - have any protocol associated with it, then the supplied - will be returned as-is. -

-
- - - GetResourceNameWithoutProtocol("http://www.mycompany.com/resource.txt"); - // returns www.mycompany.com/resource.txt - - - - The name of the resource. - - - The name of the resource without the protocol name. - -
- - - Resolves the supplied to its value - sans any leading protocol. - - - The name of the resource. - - - The name of the resource without the protocol name. - - - - - - Resolves the presence of the - value - in the supplied into a path. - - -

- The default implementation simply returns the supplied - as is. -

-
- - The name of the resource. - - - The string that is a placeholder for a base path. - - - The name of the resource with any - value having been resolved into an actual path. - -
- - - This implementation returns the - of this resource. - - - - - - Determines whether the specified is - equal to the current . - - -

- This implementation compares values. -

-
- -
- - - Serves as a hash function for a particular type, suitable for use - in hashing algorithms and data structures like a hash table. - - -

- This implementation returns the hashcode of the - property. -

-
- -
- - - Factory Method. Create a new instance of the current resource type using the given resourceName - - - - - The ResourceLoader to be used for resolving relative resources - - - - - Does the supplied relative ? - - - The name of the resource to test. - - - if resource name is relative; - otherwise . - - - - - Creates a new resource that is relative to this resource based on the - supplied . - - -

- This method can accept either a fully qualified resource name or a - relative resource name as it's parameter. -

-

- A fully qualified resource is one that has a protocol prefix and - all elements of the resource name. All other resources are treated - as relative to this resource, and the following rules are used to - locate a relative resource: -

- - - If the starts with '..', - the current resource path is navigated backwards before the - is concatenated to the current - of - this resource. - - - If the starts with '/', the - current resource path is ignored and a new resource name is - appended to the - of - this resource. - - - If the starts with '.' or a - letter, a new path is appended to the current - of - this resource. - - -
- - The name of the resource to create. - - The relative resource. - - If the process of resolving the relative resource yielded an - invalid URI. - - - If this resource does not support the resolution of relative - resources (as determined by the value of the - - property). - - -
- - - Calculates a new resource path based on the supplied - . - - - The relative path to evaluate. - - The newly calculated resource path. - - - - The special character that denotes the base (home, or root) - path. - - -

- Will be resolved (by those - implementations that support it) to the home (or root) path for - the specific implementation. -

-

- For example, in the case of a web application this will (probably) - resolve to the virtual directory of said web application. -

-
- -
- - - Return an for this resource. - - - An . - - - If the stream could not be opened. - - - - - - Returns a description for this resource. - - - A description for this resource. - - - - - - Returns the protocol associated with this resource (if any). - - -

- The value of this property may be if no - protocol is associated with the resource type (for example if the - resource is a memory stream). -

-
- - The protocol associated with this resource (if any). - -
- - - Does this resource represent a handle with an open stream? - - -

- This, the default implementation, always returns - . -

-
- - if this resource represents a handle with an - open stream. - - -
- - - Returns the handle for this resource. - - - - - - Returns a handle for this resource. - - -

- This, the default implementation, always throws a - , assuming that the - resource cannot be resolved to an absolute file path. -

-
- - The handle for this resource. - - - This implementation always throws a - . - - - -
- - - Does this resource actually exist in physical form? - - -

- This implementation checks whether a - can be opened, falling back to whether a - can be opened. -

-

- This will cover both directories and content resources. -

-

- This implementation will also return if - permission to the (file's) path is denied. -

-
- - if this resource actually exists in physical - form (for example on a filesystem). - - - -
- - - Does this support relative - resource retrieval? - - -

- This property is generally to be consulted prior to attempting - to attempting to access a resource that is relative to this - resource (via a call to - ). -

-

- This, the default implementation, always returns - . -

-
- - if this - supports relative resource - retrieval. - -
- - - Gets the root location of the resource. - - -

- Where root resource can be taken to mean that part of the resource - descriptor that doesn't change when a relative resource is looked - up. Examples of such a root location would include a drive letter, - a web server name, an assembly name, etc. -

-
- - The root location of the resource. - - - This, the default implementation, always throws a - . - -
- - - Gets the current path of the resource. - - -

- An example value of this property would be the name of the - directory containing a filesystem based resource. -

-
- - The current path of the resource. - - - This, the default implementation, always throws a - . - -
- - - Gets those characters that are valid path separators for the - resource type. - - -

- An example value of this property would be the - and - values for a - filesystem based resource. -

-

- Any derived classes that override this method are expected to - return a new array for each access of this property. -

-
- - Those characters that are valid path separators for the resource - type. - - - This, the default implementation, always throws a - . - -
- - - An implementation for - resources stored within assemblies. - - -

- This implementation expects any resource name passed to the - constructor to adhere to the following format: -

-

- assembly://assemblyName/namespace/resourceName -

-
- Aleksandar Seovic (.NET) - Federico Spinazzi (.NET) -
- - - Creates a new instance of the - class. - - - The name of the assembly resource. - - - If the supplied did not conform - to the expected format. - - - If the assembly specified in the supplied - was loaded twice with two - different evidences. - - - If the assembly specified in the supplied - could not be found. - - - If the caller does not have the required permission to load - the assembly specified in the supplied - . - - - - - - Does the supplied relative ? - - - The name of the resource to test. - - - if resource name is relative; - otherwise . - - - - - Return an for this resource. - - - An . - - - If the stream could not be opened. - - - If the caller does not have the required permission to load - the underlying assembly's manifest. - - - - - - - Does the embedded resource specified in the value passed to the - constructor exist? - - - if this resource actually exists in physical - form (for example on a filesystem). - - - - - - - - Does this support relative - resource retrieval? - - -

- This implementation does support relative resource retrieval, and - so will always return . -

-
- - if this - supports relative resource - retrieval. - - -
- - - Gets the root location of the resource (the assembly name in this - case). - - - The root location of the resource. - - - - - - Gets the current path of the resource (the namespace in which the - target resource was embedded in this case). - - - The current path of the resource. - - - - - - Gets those characters that are valid path separators for the - resource type. - - - Those characters that are valid path separators for the resource - type. - - - - - - Returns a description for this resource. - - - A description for this resource. - - - - - - Returns the handle for this resource. - - - - - - Used when retrieving information from the standard .NET configuration - files (App.config / Web.config). - - -

- If created with the name of a configuration section, then all methods - aside from the description return , - , or throw an exception. If created with an - , then the - property - will return a corresponding to parse. -

-
- Mark Pollack - Rick Evans -
- - - Creates new instance of the - class. - - - The actual XML configuration section. - - - If the supplied is . - - - - - Creates new instance of the - class. - - - The name of the configuration section. - - - If the supplied is - or contains only whitespace character(s). - - - - - Returns the handle for this resource. - - -

- This implementation always returns . -

-
- - . - - -
- - - Returns a handle for this resource. - - -

- This implementation always returns . -

-
- - . - - -
- - - Returns a description for this resource (the name of the - configuration section in this case). - - - A description for this resource. - - - - - - Does this resource actually exist in physical form? - - -

- This implementation always returns . -

-
- - - - - -
- - - Return an for this resource. - - - An . - - - If the stream could not be opened. - - - - - - Exposes the actual for the - configuration section. - - -

- Introduced to accomodate line info tracking during parsing. -

-
-
- - - Holder that combines with a specific encoding to be used for reading - from the resource - - Juergen Hoeller - Erich Eichinger (.NET) - - - - Create an encoded resource, autodetecting the encoding from the resource stream. - - - - - - Create an encoded resource, autodetecting the encoding from the resource stream. - - the resource to read from. Must not be null - whether to autoDetect encoding from byte-order marks () - - - - Create an encoded resource using the specified encoding. - - the resource to read from. Must not be null - the encoding to use. If null, encoding will be autodetected. - whether to autoDetect encoding from byte-order marks () - - - - - - - - - - Determine whether equals this instance. - - - true if obj is an and both - , and are equal. - - - - - Calculate the unique hash code for this instance. - - - - - - Get a textual description of the resource. - - - - - Get the underlying resource - - - - - Get the encoding to use for reading, if any. May be null - - - - - whether to autoDetect encoding from byte-order marks () - - - - - A backed resource. - - -

- Supports resolution as both a and a - . -

-

- Also supports the use of the ~ character. If the ~ character - is the first character in a resource path (sans protocol), the ~ - character will be replaced with the value of the - System.AppDomain.CurrentDomain.BaseDirectory property (an example of - this can be seen in the examples below). -

-
- -

- Consider the example of an application that is running (has been launched - from) the C:\App\ directory. The following resource paths will map - to the following resources on the filesystem... -

- - strings.txt C:\App\strings.txt - ~/strings.txt C:\App\strings.txt - file://~/strings.txt C:\App\strings.txt - file://~/../strings.txt C:\strings.txt - ../strings.txt C:\strings.txt - ~/../strings.txt C:\strings.txt - - // note that only a leading ~ character is resolved to the executing directory... - stri~ngs.txt C:\App\stri~ngs.txt - -
- Juergen Hoeller - Leonardo Susatyo (.NET) - Aleksandar Seovic (.NET) -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The name of the file system resource. - - - If the supplied is - or contains only whitespace character(s). - - - - - Creates a new instance of the - class. - - - The name of the file system resource. - - - Supresses initialization of this instance. Used from derived classes. - - - If the supplied is - or contains only whitespace character(s). - - - - - Initializes this instance. - - - - - - Resolves the handle - for the supplied . - - - The name of the file system resource. - - - The handle for this resource. - - - - - Resolves the root location for the supplied . - - - The name of the file system resource. - - - The root location of the resource. - - - - - Resolves the path for the supplied . - - - The name of the file system resource. - - - The current path of the resource. - - - - - Resolves the presence of the - value - in the supplied into a path. - - - The name of the resource. - - - The string that is a placeholder for a base path. - - - The name of the resource with any - value having been resolved into an actual path. - - - - - Does the supplied relative ? - - - The name of the resource to test. - - - if resource name is relative; - otherwise . - - - - - Returns the underlying handle for - this resource. - - - The handle for this resource. - - - - - - Does this support relative - resource retrieval? - - -

- This implementation does support relative resource retrieval, and - so will always return . -

-
- - if this - supports relative resource - retrieval. - - -
- - - Gets the root location of the resource (a drive or UNC file share - name in this case). - - - The root location of the resource. - - - - - - Gets the current path of the resource. - - - The current path of the resource. - - - - - - Gets those characters that are valid path separators for the - resource type. - - - Those characters that are valid path separators for the resource - type. - - - - - - - Return an for this resource. - - - An . - - - If the stream could not be opened. - - - If the underlying file could not be found. - - - - - - Returns a description for this resource. - - - A description for this resource. - - - - - - Returns the handle for this resource. - - - The handle for this resource. - - - If the resource is not available or cannot be exposed as a - . - - - - - - adapter implementation for a - . - - -

- Should only be used if no other - implementation is applicable. -

-

- In contrast to other - implementations, this is an adapter for an already opened - resource - the - therefore always returns . Do not use this class - if you need to keep the resource descriptor somewhere, or if you need - to read a stream multiple times. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - - The input to use. - - - Where the input comes from. - - - If the supplied is - . - - - - - The input to use. - - - If the underlying has already - been read. - - - - - Returns a description for this resource. - - - A description for this resource. - - - - - - This implementation always returns true - - - - - This implemementation always returns true - - - - - Custom type converter for instances. - - -

- A resource path may contain placeholder variables of the form ${...} - that will be expended to environment variables. -

-

- Currently only supports conversion from a - instance. -

-
- -

- On Win9x boxes, this resource path, ${userprofile}\objects.xml will - be expanded at runtime with the value of the 'userprofile' environment - variable substituted for the '${userprofile}' portion of the path. -

- - // assuming a user called Rick, running on a plain vanilla Windows XP setup... - // this resource path... - - ${userprofile}\objects.xml - - // will become (after expansion)... - - C:\Documents and Settings\Rick\objects.xml - -
- Mark Pollack - - -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class using the specified resourceLoader. - - the underlying IResourceLoader to be used to resolve resources - - - - Returns whether this converter can convert an object of one - to a - - - A - that provides a format context. - - - A that represents the - you want to convert from. - - - if the conversion is possible. - - - - - Convert from a string value to a - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - An if successful. - - - If the resource name objectained form the supplied - is malformed. - - - In the case of any errors arising from the instantiation of the - returned instance. - - - - - Resolve the given path, replacing placeholder values with - corresponding property values if necessary. - - -

- This implementation resolves environment variables only. -

-
- The original resource path. - The resolved resource path. -
- - - Return the used to - resolve the string. - - - The used to resolve - the string. - - - - - Registry class that allows users to register and retrieve protocol handlers. - - - - Resource handler is an implementation of interface - that should be used to process resources with the specified protocol. - - - They are used throughout the framework to access resources from various - sources. For example, application context loads object definitions from the resources - that are processed using one of the registered resource handlers. - - Following resource handlers are registered by default: - - - Protocol - Handler Type - Description - - - config - - Resolves the resources by loading specified configuration section from the standard .NET config file. - - - file - - Resolves filesystem resources. - - - http - - Resolves remote web resources. - - - https - - Resolves remote web resources via HTTPS. - - - ftp - - Resolves ftp resources. - - - assembly - - Resolves resources that are embedded into an assembly. - - - web - Spring.Core.IO.WebResource, Spring.Web* - Resolves resources relative to the web application's virtual directory. - - - * only available in web applications. - - Users can create and register their own protocol handlers by implementing interface - and mapping custom protocol name to that implementation. See for details - on how to register custom protocol handler. - - - Aleksandar Seovic - - - - Name of the .Net config section that contains definitions - for custom resource handlers. - - - - - Registers standard and user-configured resource handlers. - - - - - Returns resource handler for the specified protocol name. - - - - This method returns object that should be used - to create an instance of the -derived type by passing - resource location as a parameter. - - - Name of the protocol to get the handler for. - Resource handler constructor for the specified protocol name. - If is null. - - - - Returns true if a handler is registered for the specified protocol, - false otherwise. - - Name of the protocol. - - true if a handler is registered for the specified protocol, false otherwise. - - If is null. - - - - Registers resource handler and maps it to the specified protocol name. - - -

- If the mapping already exists, the existing mapping will be - silently overwritten with the new mapping. -

-
- - The protocol to add (or override). - - - The type name of the concrete implementation of the - interface that will handle - the specified protocol. - - - If the supplied is - or contains only whitespace character(s); or - if the supplied is - . - - - If the supplied is not a - that derives from the - interface; or (having passed - this first check), the supplied - does not expose a constructor that takes a single - parameter. - -
- - - Registers resource handler and maps it to the specified protocol name. - - -

- If the mapping already exists, the existing mapping will be - silently overwritten with the new mapping. -

-
- - The protocol to add (or override). - - - The concrete implementation of the - interface that will handle - the specified protocol. - - - If the supplied is - or contains only whitespace character(s); or - if the supplied is - . - - - If the supplied is not a - that derives from the - interface; or (having passed - this first check), the supplied - does not expose a constructor that takes a single - parameter. - -
- - - Allows to create any arbitrary Url format - - - - - A adapter implementation encapsulating a simple string. - - Erich Eichinger - - - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - - - - Get the to - for accessing this resource. - - - - - Returns a description for this resource. - - - A description for this resource. - - - - - - This implementation always returns true - - - - - This implemementation always returns true - - - - - Gets the encoding used to create a byte stream of the string. - - - - - Gets the content encapsulated by this . - - - - - A backed resource - on top of - - -

- Obviously supports resolution as a , and also - as a in the case of the "file:" - protocol. -

-
- -

- Some examples of the strings that can be used to initialize a new - instance of the class - include... - - - file:///Config/objects.xml - - - http://www.mycompany.com/services.txt - - -

-
- Juergen Hoeller - Leonardo Susatyo (.NET) - Aleksandar Seovic (.NET) - - - -
- - - Creates a new instance of the - class. - - -

- Some examples of the values that the - can typically be expected to hold include... - - - file:///Config/objects.xml - - - http://www.mycompany.com/services.txt - - -

-
- - A string representation of the resource. - -
- - - Does the supplied relative ? - - - The name of the resource to test. - - - if resource name is relative; - otherwise . - - - - - Returns the instance - used for the resource resolution. - - - A instance. - - - - - - - Return an for this resource. - - - An . - - - If the stream could not be opened. - - - - - - Returns the handle for this resource. - - - The handle for this resource. - - - If the resource is not available or cannot be exposed as a - . - - - - - - Returns a handle for this resource. - - - The handle for this resource. - - - If the resource is not available on a filesystem. - - - - - - Does this support relative - resource retrieval? - - -

- This implementation does support relative resource retrieval, and - so will always return . -

-
- - if this - supports relative resource - retrieval. - - -
- - - Gets the root location of the resource. - - - The root location of the resource. - - - - - - Gets the current path of the resource. - - - The current path of the resource. - - - - - - Gets those characters that are valid path separators for the - resource type. - - - Those characters that are valid path separators for the resource - type. - - - - - - Returns a description for this resource. - - - A description for this resource. - - - - - - Converts string representation of a credential for Web client authentication - into an instance of . - - -

- Find below some examples of the XML formatted strings that this - converter will sucessfully convert. -

- - - - - - -
- Bruno Baia -
- - - Can we convert from the sourcetype - to a instance ? - - -

- Currently only supports conversion from a instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - if the conversion is possible. -
- - - Convert from a value to an - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A instance if successful. - - - - - A custom for any - primitive numeric type such as , - , , etc. - - -

- Can use a given for - (locale-specific) parsing and rendering. -

-

- This is not meant to be used as a system - but rather as a - locale-specific number converter within custom controller code, to - parse user-entered number strings into number properties of objects, - and render them in a UI form. -

-
- Juergen Hoeller - Simon White (.NET) -
- - - Creates a new instance of the - class. - - - The primitive numeric to convert to. - - - The to use for - (locale-specific) parsing and rendering - - - Is an empty string allowed to be converted? If - , an empty string value will be converted to - numeric 0. - - Id the supplied is not a primitive - . - - - - - - Returns whether this converter can convert an object of one - to a - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - - if the conversion is possible. - -
- - - Converts the specified object (a string) to the required primitive - type. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - A primitive representation of the string value. - - - - Converter for instances. - - Juergen Hoeller - Mark Pollack (.NET) - - - - Creates a new instance of the - class. - - - - - Returns whether this converter can convert an object of one - to a - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - True if the conversion is possible. -
- - - Convert from a string value to a instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A if successful. - - - - - Custom implementation for - objects. - - -

- Handles conversion from an XML formatted string to a - object - (see below for an example of the expected XML format). -

-

- This converter must be registered before it will be available. Standard - converters in this namespace are automatically registered by the - class. -

-
- -

- Find below some examples of the XML formatted strings that this - converter will sucessfully convert. Note that the name of the top level - (document) element is quite arbitrary... it is only the content that - matters (and which must be in the format - <add key="..." value="..."/>. For your continued sanity - though, you may wish to standardize on the top level name of - 'dictionary' (although you are of course free to not do so). -

- - - - - - -

- The following example uses a different top level (document) element - name, but is equivalent to the first example. -

- - - - - - -
- Rod Johnson - Juergen Hoeller - Simon White (.NET) -
- - - Creates a new instance of the - class. - - - - - Returns whether this converter can convert an object of one - to a - - - -

- Currently only supports conversion from an - XML formatted instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - True if the conversion is possible. -
- - - Convert from a string value to a - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A - if successful. - - - - - Converts string representation of a regular expression into an instance of . - - Aleksandar Seovic - - - - Can we convert from the sourcetype to a ? - - -

- Currently only supports conversion from a instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - if the conversion is possible. -
- - - Convert from a value to an - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A if successful. - - - - - Converts string representation of the registry key - into instance. - - Aleksandar Seovic - - - - Can we convert from a the sourcetype to a ? - - -

- Currently only supports conversion from a instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - if the conversion is possible. -
- - - Convert from a value to an - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A array if successful. - - - - - Generates partial registry key name. - - - Key elements. - - - Index of the last element to use. - - - Friendly key name containing key element from - 0 to , inclusive. - - - - - Returns for the specified - root hive name. - - - Root hive name. - - - Registry key for the specified name. - - - - - Converts a two part string, (resource name, assembly name) - to a ResourceManager instance. - - - - - This constant represents the name of the folder/assembly containing global resources. - - - - - Creates a new instance of the - class. - - - - - Returns whether this converter can convert an object of one - to a - - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - True if the conversion is possible. -
- - - Convert from a string value to a - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A - if successful. - - If the specified does not denote a valid resource - - - - Converter for from a comma separated - list of RBG values. - - -

- Please note that this class does not implement converting - to a comma separated list of RBG values from a - . -

-
- Federico Spinazzi -
- - - Returns whether this converter can convert an object of one - to a - . - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - if the conversion is possible. -
- - - Converts the specified object (a string) a - instance. - - - A - that provides a format context. - - - The to use - as the current culture: currently ignored. - - - The value that is to be converted, in "R,G,B", "A,R,G,B", or - symbolic color name (). - - - A representation of the string value. - - - If the input string is not in a supported format, or is not one of the - predefined system colors (). - - - - - A custom for - runtime type references. - - -

- Currently only supports conversion to and from a - . -

-
- Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - - - - Returns whether this converter can convert an object of one - to the - of this converter. - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - True if the conversion is possible. -
- - - Returns whether this converter can convert the object to the specified - . - - - A - that provides a format context. - - - A that represents the - you want to convert to. - - True if the conversion is possible. - - - - Converts the given value to the type of this converter. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - An that represents the converted value. - - - - - Converts the given value object to the specified type, - using the specified context and culture information. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - The to convert the - parameter to. - - - An that represents the converted value. - - - - - Converter for to directly set a - property. - - Jurgen Hoeller - Mark Pollack (.NET) - - - - Create a new StreamConverter using the default - . - - - - - Create a new StreamConverter using the given - . - - - The to use. - - - - Returns whether this converter can convert an object of one - to a - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - True if the conversion is possible. -
- - - Convert from a string value to a instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A if successful. - - - - - Converts a separated to a - array. - - -

- Defaults to using the , (comma) as the list separator. Note that the value - of the current is - not used. -

-

- If you want to provide your own list separator, you can set the value of the - - property to the value that you want. Please note that this value will be used - for all future conversions in preference to the default list separator. -

-

- Please note that the individual elements of a string will be passed - through as is (i.e. no conversion or trimming of surrounding - whitespace will be performed). -

-

- This should be - automatically registered with any - implementations. -

-
- - - public class StringArrayConverterExample - { - public static void Main() - { - StringArrayConverter converter = new StringArrayConverter(); - - string csvWords = "This,Is,It"; - string[] frankBoothWords = converter.ConvertFrom(csvWords); - - // the 'frankBoothWords' array will have 3 elements, namely - // "This", "Is", "It". - - // please note that extraneous whitespace is NOT trimmed off - // in the current implementation... - string csv = " Cogito ,ergo ,sum "; - string[] descartesWords = converter.ConvertFrom(csv); - - // the 'descartesWords' array will have 3 elements, namely - // " Cogito ", "ergo ", "sum ". - // notice how the whitespace has NOT been trimmed. - } - } - - - -
- - - Can we convert from a the sourcetype to a array? - - -

- Currently only supports conversion from a instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - if the conversion is possible. -
- - - Convert from a value to a - array. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A array if successful. - - - - - The value that will be used as the list separator when performing - conversions. - - - A 'single' string character that will be used as the list separator - when performing conversions. - - - If the supplied value is not and is an empty - string, or has more than one character. - - - - - Base parser for custom specifiers. - - - - - Convert int value to a Timespan based on the specifier - - - - - - - Check if the string contains the specifier and - - - - - - - Specifier - - - - - Recognize 10d as ten days - - - - - Parse value as days - - Timespan in days - - - - - Day specifier: d - - - - - Recognize 10h as ten hours - - - - - Parse value as hours - - Timespan in hours - - - - - Hour specifier: h - - - - - Recognize 10m as ten minutes - - - - - Parse value as minutes - - Timespan in minutes - - - - - Minute specifier: m - - - - - Recognize 10s as ten seconds - - - - - Parse value as seconds - - Timespan in seconds - - - - - Second specifier: s - - - - - Recognize 10ms as ten milliseconds - - - - - Parse value as milliseconds - - Timespan in milliseconds - - - - - Millisecond specifier: ms - - - - - Converter for instances. - - Bruno Baia - Roberto Paterlini - - - - Creates a new instance of the - class. - - - - - Convert from a string value to a instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A if successful. - - - - - Utility methods that are used to convert objects from one type into another. - - Aleksandar Seovic - - - - Convert the value to the required (if necessary from a string). - - The proposed change value. - - The we must convert to. - - Property name, used for error reporting purposes... - - If there is an internal error. - - The new value, possibly the result of type conversion. - - - - Utility method to create a property change event. - - - The full name of the property that has changed. - - The property old value - The property new value - - A new . - - - - - Registry class that allows users to register and retrieve type converters. - - Aleksandar Seovic - - - - Name of the .Net config section that contains Spring.Net type aliases. - - - - - Registers standard and configured type converters. - - - - - Returns for the specified type. - - Type to get the converter for. - a type converter for the specified type. - If is null. - - - - Registers for the specified type. - - Type to register the converter for. - Type converter to register. - If either of arguments is null. - - - - Registers for the specified type. - - - This is a convinience method that accepts the names of both - type to register converter for and the converter itself, - resolves them using , creates an - instance of type converter and calls overloaded - method. - - Type name of the type to register the converter for (can be a type alias). - Type name of the type converter to register (can be a type alias). - If either of arguments is null or empty string. - - If either of arguments fails to resolve to a valid . - - - If type converter does not derive from or if it cannot be instantiated. - - - - - Converts between instances of and their string representations. - - Erich Eichinger - - - - Can we convert from the sourcetype to a ? - - -

- Currently only supports conversion from a instance. -

-
- - A that provides a format context. - - - A that represents the you want to convert from. - - if the conversion is possible. -
- - - Convert from a value to an instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A if successful, otherwise. - - The conversion cannot be performed. - - - - Returns whether this converter can convert the object to the specified type, using the specified context. - - An that provides a format context. - A that represents the type you want to convert to. - - true if this converter can perform the conversion; otherwise, false. - - - At the moment only conversion to string is supported. - - - - - Converts the given value object to the specified type, using the specified context and culture information. - - - - An that represents the converted value. - - - A . If null is passed, the current culture is assumed. - An that provides a format context. - The to convert the value parameter to. - The to convert. - The conversion cannot be performed. - The destinationType parameter is null. - - - - Converter for instances. - - Juergen Hoeller - Mark Pollack (.NET) - - - - Creates a new instance of the - class. - - - - - Returns whether this converter can convert an object of one - to a - - -

- Currently only supports conversion from a - instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - True if the conversion is possible. -
- - - Convert from a string value to a instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A if successful. - - - - - Resolves (instantiates) a by it's (possibly - assembly qualified) name, and caches the - instance against the type name. - - Rick Evans - Bruno Baia - Erich Eichinger - - - - Resolves a by name. - - -

- The rationale behind the creation of this interface is to centralise - the resolution of type names to instances - beyond that offered by the plain vanilla - method call. -

-
- Rick Evans -
- - - Resolves the supplied to a - - instance. - - - The (possibly partially assembly qualified) name of a - . - - - A resolved instance. - - - If the supplied could not be resolved - to a . - - - - - The cache, mapping type names ( instances) against - instances. - - - - - Creates a new instance of the class. - - - The that this instance will delegate - actual resolution to if a - cannot be found in this instance's cache. - - - If the supplied is . - - - - - Resolves the supplied to a - - instance. - - - The (possibly partially assembly qualified) name of a - . - - - A resolved instance. - - - If the supplied could not be resolved - to a . - - - - - Holder for the generic arguments when using type parameters. - - -

- Type parameters can be applied to classes, interfaces, - structures, methods, delegates, etc... -

-
-
- - - The generic arguments prefix. - - - - - The generic arguments suffix. - - - - - The generic arguments prefix. - - - - - The generic arguments suffix. - - - - - The character that separates a list of generic arguments. - - - - - Creates a new instance of the GenericArgumentsHolder class. - - - The string value to parse looking for a generic definition - and retrieving its generic arguments. - - - - - Returns the array declaration portion of the definition, e.g. "[,]" - - - - - - Returns an array of unresolved generic arguments types. - - -

- A empty string represents a type parameter that - did not have been substituted by a specific type. -

-
- - An array of strings that represents the unresolved generic - arguments types or an empty array if not generic. - -
- - - The (unresolved) generic type name portion - of the original value when parsing a generic type. - - - - - The (unresolved) generic method name portion - of the original value when parsing a generic method. - - - - - Is the string value contains generic arguments ? - - -

- A generic argument can be a type parameter or a type argument. -

-
-
- - - Is generic arguments only contains type parameters ? - - - - - Is this an array type definition? - - - - - Resolves a generic by name. - - Bruno Baia - - - - Resolves a by name. - - Rick Evans - Aleksandar Seovic - Bruno Baia - - - - Resolves the supplied to a - instance. - - - The unresolved (possibly partially assembly qualified) name - of a . - - - A resolved instance. - - - If the supplied could not be resolved - to a . - - - - - Uses - to load an and then the attendant - referred to by the - parameter. - - -

- is - deprecated in .NET 2.0, but is still used here (even when this class is - compiled for .NET 2.0); - will - still resolve (non-.NET Framework) local assemblies when given only the - display name of an assembly (the behaviour for .NET Framework assemblies - and strongly named assemblies is documented in the docs for the - method). -

-
- - The assembly and type to be loaded. - - - A , or . - - - - -
- - - Uses - to load the attendant referred to by - the parameter. - - - The type to be loaded. - - - A , or . - - - - - Creates a new instance - from the given - - - - - Creates a new instance - from the given with the given inner - - - - - Resolves the supplied generic to a - instance. - - - The unresolved (possibly generic) name of a . - - - A resolved instance. - - - If the supplied could not be resolved - to a . - - - - - Holds data about a and it's - attendant . - - - - - The string that separates a name - from the name of it's attendant - in an assembly qualified type name. - - - - - Creates a new instance of the TypeAssemblyHolder class. - - - The unresolved name of a . - - - - - The (unresolved) type name portion of the original type name. - - - - - The (unresolved, possibly partial) name of the attandant assembly. - - - - - Is the type name being resolved assembly qualified? - - - - - Provides access to a central registry of aliased s. - - -

- Simplifies configuration by allowing aliases to be used instead of - fully qualified type names. -

-

- Comes 'pre-loaded' with a number of convenience alias' for the more - common types; an example would be the 'int' (or 'Integer' - for Visual Basic.NET developers) alias for the - type. -

-
- Aleksandar Seovic - -
- - - Name of the .Net config section that contains Spring.Net type aliases. - - - - - The alias around the 'int' type. - - - - - The alias around the 'Integer' type (Visual Basic.NET style). - - - - - The alias around the 'int[]' array type. - - - - - The alias around the 'Integer()' array type (Visual Basic.NET style). - - - - - The alias around the 'decimal' type. - - - - - The alias around the 'Decimal' type (Visual Basic.NET style). - - - - - The alias around the 'decimal[]' array type. - - - - - The alias around the 'Decimal()' array type (Visual Basic.NET style). - - - - - The alias around the 'char' type. - - - - - The alias around the 'Char' type (Visual Basic.NET style). - - - - - The alias around the 'char[]' array type. - - - - - The alias around the 'Char()' array type (Visual Basic.NET style). - - - - - The alias around the 'long' type. - - - - - The alias around the 'Long' type (Visual Basic.NET style). - - - - - The alias around the 'long[]' array type. - - - - - The alias around the 'Long()' array type (Visual Basic.NET style). - - - - - The alias around the 'short' type. - - - - - The alias around the 'Short' type (Visual Basic.NET style). - - - - - The alias around the 'short[]' array type. - - - - - The alias around the 'Short()' array type (Visual Basic.NET style). - - - - - The alias around the 'unsigned int' type. - - - - - The alias around the 'unsigned long' type. - - - - - The alias around the 'ulong[]' array type. - - - - - The alias around the 'uint[]' array type. - - - - - The alias around the 'unsigned short' type. - - - - - The alias around the 'ushort[]' array type. - - - - - The alias around the 'double' type. - - - - - The alias around the 'Double' type (Visual Basic.NET style). - - - - - The alias around the 'double[]' array type. - - - - - The alias around the 'Double()' array type (Visual Basic.NET style). - - - - - The alias around the 'float' type. - - - - - The alias around the 'Single' type (Visual Basic.NET style). - - - - - The alias around the 'float[]' array type. - - - - - The alias around the 'Single()' array type (Visual Basic.NET style). - - - - - The alias around the 'DateTime' type. - - - - - The alias around the 'DateTime' type (C# style). - - - - - The alias around the 'DateTime' type (Visual Basic.NET style). - - - - - The alias around the 'DateTime[]' array type. - - - - - The alias around the 'DateTime[]' array type. - - - - - The alias around the 'DateTime()' array type (Visual Basic.NET style). - - - - - The alias around the 'bool' type. - - - - - The alias around the 'Boolean' type (Visual Basic.NET style). - - - - - The alias around the 'bool[]' array type. - - - - - The alias around the 'Boolean()' array type (Visual Basic.NET style). - - - - - The alias around the 'string' type. - - - - - The alias around the 'string' type (Visual Basic.NET style). - - - - - The alias around the 'string[]' array type. - - - - - The alias around the 'string[]' array type (Visual Basic.NET style). - - - - - The alias around the 'object' type. - - - - - The alias around the 'object' type (Visual Basic.NET style). - - - - - The alias around the 'object[]' array type. - - - - - The alias around the 'object[]' array type (Visual Basic.NET style). - - - - - The alias around the 'int?' type. - - - - - The alias around the 'int?[]' array type. - - - - - The alias around the 'decimal?' type. - - - - - The alias around the 'decimal?[]' array type. - - - - - The alias around the 'char?' type. - - - - - The alias around the 'char?[]' array type. - - - - - The alias around the 'long?' type. - - - - - The alias around the 'long?[]' array type. - - - - - The alias around the 'short?' type. - - - - - The alias around the 'short?[]' array type. - - - - - The alias around the 'unsigned int?' type. - - - - - The alias around the 'unsigned long?' type. - - - - - The alias around the 'ulong?[]' array type. - - - - - The alias around the 'uint?[]' array type. - - - - - The alias around the 'unsigned short?' type. - - - - - The alias around the 'ushort?[]' array type. - - - - - The alias around the 'double?' type. - - - - - The alias around the 'double?[]' array type. - - - - - The alias around the 'float?' type. - - - - - The alias around the 'float?[]' array type. - - - - - The alias around the 'bool?' type. - - - - - The alias around the 'bool?[]' array type. - - - - - Registers standard and user-configured type aliases. - - - - - Registers an alias for the specified . - - -

- This overload does eager resolution of the - referred to by the parameter. It will throw a - if the referred - to by the parameter cannot be resolved. -

-
- - A string that will be used as an alias for the specified - . - - - The (possibly partially assembly qualified) name of the - to register the alias for. - - - If either of the supplied parameters is or - contains only whitespace character(s). - - - If the referred to by the supplied - cannot be loaded. - -
- - - Registers short type name as an alias for - the supplied . - - - The to register. - - - If the supplied is . - - - - - Registers an alias for the supplied . - - - The alias for the supplied . - - - The to register the supplied under. - - - If the supplied is ; or if - the supplied is or - contains only whitespace character(s). - - - - - Resolves the supplied to a . - - - The alias to resolve. - - - The the supplied was - associated with, or if no - was previously registered for the supplied . - - - If the supplied is or - contains only whitespace character(s). - - - - - Returns a flag specifying whether TypeRegistry contains - specified alias or not. - - - Alias to check. - - - true if the specified type alias is registered, - false otherwise. - - - - - Helper methods with regard to type resolution. - - -

- Not intended to be used directly by applications. -

-
- Bruno Baia -
- - - Creates a new instance of the class. - - -

- This is a utility class, and as such exposes no public constructors. -

-
-
- - - Resolves the supplied type name into a - instance. - - -

- If you require special resolution, do - not use this method, but rather instantiate - your own . -

-
- - The (possibly partially assembly qualified) name of a - . - - - A resolved instance. - - - If the type cannot be resolved. - -
- - - Resolves a string array of interface names to - a array. - - - An array of valid interface names. Each name must include the full - interface and assembly name. - - An array of interface s. - - If any of the interfaces can't be loaded. - - - If any of the s specified is not an interface. - - - If (or any of its elements ) is - . - - - - - Match a method against the given pattern. - - the pattern to match against. - the method to match. - - if the method matches the given pattern; otherwise . - - - If the supplied is invalid. - - - - - Exception thrown when the ObjectFactory cannot load the specified type of a given object. - - Mark Pollack - - - - Thrown on an unrecoverable problem encountered in the - objects namespace or sub-namespaces, e.g. bad class or field. - - Rod Johnson - Mark Pollack (.NET) - - - - Superclass for all exceptions thrown in the Objects namespace and sub-namespaces. - - Rod Johnson - Mark Pollack (.NET) - - - Creates a new instance of the ObjectsException class. - - - - Creates a new instance of the ObjectsException class. with the specified message. - - - A message about the exception. - - - - - Creates a new instance of the ObjectsException class with the specified message - and root cause. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectsException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Creates a new instance of the FatalObjectException class. - - - - - Creates a new instance of the FatalObjectException class with the - specified message. - - - A message about the exception. - - - - - Creates a new instance of the FatalObjectException class with the - specified message. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the FatalObjectException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Initializes a new instance of the class. - - - - - Creates a new instance of the - class. - - - A message about the exception. - - - - - Creates a new instance of the - class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Initializes a new instance of the class. - - The resource description that the object definition came from. - Name of the object requested - Name of the object type. - The root cause. - - - - Creates a new instance of the - class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - Gets he name of the object we are trying to load. - - The name of the object. - - - - Gets the name of the object type we are trying to load. - - The name of the object type. - - - - Gets the resource description that the object definition came from - - The resource description. - - - - A implementation that represents - a composed collection of instances. - - - - - The criteria for an arbitrary filter. - - Rick Evans - - - - Does the supplied satisfy the criteria - encapsulated by this instance? - - - The datum to be checked by this criteria instance. - - - if the supplied - satisfies the criteria encapsulated by this instance; - if not, or the supplied - is . - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - A user-defined (child) criteria that will be composed into this instance. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The data to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - Adds the supplied into the criteria - composed within this instance. - - - The to be added. - - - - - The list of composing this - instance. - - - - - Factory class to conceal any default implementation. - - Rod Johnson - Simon White (.NET) - - - - Creates a new instance of the - implementation provided by this factory. - - - A new instance of the - implementation provided by this factory. - - - - - Interface to be implemented by objects that can return information about - the current call stack. - - -

- Useful in AOP (as an expression of the AspectJ cflow concept) but not AOP-specific. -

-
- Rod Johnson - Aleksandar Seovic (.Net) -
- - - Detects whether the caller is under the supplied , - according to the current stacktrace. - - - The to look for. - - - if the caller is under the supplied . - - - - - Detects whether the caller is under the supplied - and , according to the current stacktrace. - - - The to look for. - - The name of the method to look for. - - if the caller is under the supplied - and . - - - - - Does the current stack trace contain the supplied ? - - The token to match against. - - if the current stack trace contains the supplied - . - - - - - Creates a new instance of the - class. - - - - - Detects whether the caller is under the supplied , - according to the current stacktrace. - - - - - - Detects whether the caller is under the supplied - and , according to the current stacktrace. - - -

- Matches the whole method name. -

-
- -
- - - Does the current stack trace contain the supplied ? - - -

- This leaves it up to the caller to decide what matches, but is obviously less of - an abstraction because the caller must know the exact format of the underlying - stack trace. -

-
- -
- - - Provides methods to support various naming and other conventions used throughout the framework. - Mainly for internal use within the framework. - - Rob Harrop - Juergen Hoeller - Mark Pollack (.NET) - - - Convert Strings in attribute name format (lowercase, hyphens separating words) - into property name format (camel-cased). For example, transaction-manager is - converted into transactionManager. - - - - - Convenience class that exposes a signature that matches the - delegate. - - -

- Useful when filtering members via the - mechanism. -

-
- Rick Evans -
- - - Creates a new instance of the - class. - - - - - Returns true if the supplied instance - satisfies the supplied (which must be an - implementation). - - - The instance that will be checked to see if - it matches the supplied . - - - The criteria against which to filter the supplied - instance. - - - True if the supplied instance - satisfies the supplied (which must be an - implementation); false if not or the - supplied is not an - implementation or is null. - - - - - Interface that can be implemented by exceptions etc that are error coded. - - -

- The error code is a , rather than a number, so it can - be given user-readable values, such as "object.failureDescription". -

-
- Rod Johnson - Aleksandar Seovic (.Net) -
- - - Return the error code associated with this failure. - - -

- The GUI can render this anyway it pleases, allowing for I18n etc. -

-
- - The error code associated with this failure, - or the empty string instance if not error-coded. - -
- - - Thrown in response to referring to an invalid property (most often via reflection). - - Rick Evans - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - A message about the exception. - - - - - Creates a new instance of the - class. - - - The that is (or rather was) the source of the - offending property. - - - The name of the offending property. - - - - - Creates a new instance of the - class. - - - The that is (or rather was) the source of the - offending property. - - - The name of the offending property. - - - A message about the exception. - - - - - Creates a new instance of the InvalidPropertyException class. - - - The that is (or rather was) the source of the - offending property. - - - The name of the offending property. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the - class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the - class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The that is (or rather was) the source of the - offending property. - - - - - The name of the offending property. - - - - - Criteria that is satisfied if the of each of the - arguments matches each of the parameter s of a given - . - - -

- If no array is passed to the overloaded constructor, - any method that has no parameters will satisfy an instance of this - class. The same effect could be achieved by passing the - array to the overloaded constructor. -

-
- Rick Evans - Bruno Baia -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - -

- If the supplied array is null, then this - constructor uses the array. -

-
- - The array that this criteria will use to - check parameter s. - -
- - - Does the supplied satisfy the criteria encapsulated by - this instance? - - -

- This implementation respects the inheritance chain of any parameter - s... i.e. methods that have a base type (or - interface) that is assignable to the in the - same corresponding index of the parameter types will satisfy this - criteria instance. -

-
- The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - -
- - - Criteria that is satisfied if the number of generic arguments to a given - matches an arbitrary number. - - -

- This class supports checking the generic arguments count of both - generic methods and constructors. -

-
- Bruno Baia -
- - - Creates a new instance of the - class. - - -

- This constructor sets the - - property to zero (0). -

-
-
- - - Creates a new instance of the - class. - - - The number of generic arguments that a - must have to satisfy this criteria. - - - If the supplied is less - than zero. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - The number of generic arguments that a - must have to satisfy this criteria. - - - If the supplied value is less than zero. - - - - - Thrown when a method (typically a property getter or setter invoked via reflection) - throws an exception, analogous to a . - - Rod Johnson - Mark Pollack (.NET) - - - - Superclass for exceptions related to a property access, such as a - mismatch or a target invocation exception. - - Rod Johnson - Mark Pollack (.NET) - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - Create a new instance of the PropertyAccessException class. - - - A message about the exception. - - Describes the change attempted on the property. - - - - Create a new instance of the PropertyAccessException class. - - - A message about the exception. - - Describes the change attempted on the property. - - The root exception that is being wrapped. - - - - - Creates a new instance of the PropertyAccessException class. - - - - - Creates a new instance of the PropertyAccessException class. - - - A message about the exception. - - - - - Creates a new instance of the PropertyAccessExceptionsException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the PropertyAccessExceptionsException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Returns the PropertyChangeEventArgs that resulted in the problem. - - - - - The string error code used to classify the error. - - - - - Creates a new instance of the MethodInvocationException class. - - - - - Creates a new instance of the MethodInvocationException class. - - - A message about the exception. - - - - - Creates a new instance of the MethodInvocationException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Constructor to use when an exception results from a - . - - - The raised by the invoked property. - - - The that - resulted in an exception. - - - - - Creates a new instance of the MethodInvocationException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - The error code string for this exception. - - - - - Criteria that is satisfied if the method Name of an - instance matches a - supplied string pattern. - - - - Supports the following simple pattern styles: - "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. - - - Bruno Baia - - - - Creates a new instance of the - class. - - -

- This constructor sets the - - property to * (any method name). -

-
-
- - - Creates a new instance of the - class. - - The pattern that names - must match against in order to satisfy this criteria. - - If the supplied is null or resolve to an empty string. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - The number of parameters that a - must have to satisfy this criteria. - - - If the supplied value is null or resolve to an empty string. - - - - - Helper class that encapsulates the specification of a method parameter, i.e. - a MethodInfo or ConstructorInfo plus a parameter index. - Useful as a specification object to pass along. - - Juergen Hoeller - Rob Harrop - Mark Pollack (.NET) - - - - Initializes a new instance of the class for the given - MethodInfo. - - The MethodInfo to specify a parameter for. - Index of the parameter. - - - - Initializes a new instance of the class. - - The ConstructorInfo to specify a parameter for. - Index of the parameter. - - - - Create a new MethodParameter for the given method or donstructor. - This is a convenience constructor for scenarios where a - Method or Constructor reference is treated in a generic fashion. - - The method or constructor to specify a parameter for. - Index of the parameter. - the corresponding MethodParameter instance - - - - Parameters the name of the method/constructor parameter. - - the parameter name. - - - - Gets the type of the method/constructor parameter. - - The type of the parameter. (never null) - - - - Gets the wrapped MethodInfo, if any. Note Either MethodInfo or ConstructorInfo is available. - - The MethodInfo, or null if none. - - - - Gets wrapped ConstructorInfo, if any. Note Either MethodInfo or ConstructorInfo is available. - - The ConstructorInfo, or null if none - - - - Criteria that is satisfied if the number of parameters to a given - matches an arbitrary number. - - -

- This class supports checking the parameter count of both methods and - constructors. -

-

- Default parameters, etc need to taken into account. -

-
- Rick Evans -
- - - Creates a new instance of the - class. - - -

- This constructor sets the - - property to zero (0). -

-
-
- - - Creates a new instance of the - class. - - - The number of parameters that a - must have to satisfy this criteria. - - - If the supplied is less - than zero. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - The number of parameters that a - must have to satisfy this criteria. - - - If the supplied value is less than zero. - - - - - Criteria that is satisfied if the of each of the - parameters of a given matches each - of the parameter s of a given - . - - -

- If no array is passed to the overloaded constructor, - any method that has no parameters will satisfy an instance of this - class. The same effect could be achieved by passing the - array to the overloaded constructor. -

-
- Rick Evans - Bruno Baia -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - -

- If the supplied array is null, then this - constructor uses the array. -

-
- - The array that this criteria will use to - check parameter s. - -
- - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - Criteria that is satisfied if the return of a given - matches a given . - - Rick Evans - - - - The return to match against if no - is provided explictly. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The that the return type of a given - must match in order to satisfy - this criteria. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - The that the return type of a given - must match in order to satisfy - this criteria. - - - - - Thrown in response to a failed attempt to read a property. - - -

- Typically thrown when attempting to read the value of a write-only - property via reflection. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - A message about the exception. - - - - - Creates a new instance of the - class. - - - The that is (or rather was) the source of the - offending property. - - - The name of the offending property. - - - - - Creates a new instance of the - class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the - class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Thrown in response to a failed attempt to write a property. - - Mark Pollack (.NET) - - - - Creates a new instance of the NotWritablePropertyException class. - - - - - Creates a new instance of the NotWritablePropertyException class. - - - A message about the exception. - - - - - Creates a new instance of the NotWritablePropertyException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the NotWritablePropertyException class. - - - The that is (or rather was) the source of the - offending property. - - - The name of the offending property. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the NotWritablePropertyException class - summarizing what property was not writable. - - - The name of the property that is not writable. - - - The in which the property is not writable. - - - - - Creates new NotWritablePropertyException with a root cause. - - - The name of the property that is not writable. - - - The in which the property is not writable. - - - The root cause indicating why the property was not writable. - - - - - Creates a new instance of the NotWritablePropertyException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Thrown in response to encountering a value - when traversing a nested path expression. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - A message about the exception. - - - - - Creates a new instance of the - class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the - class. - - - The of the object where the property was not found. - - The name of the property not found. - - - - Creates a new instance of the - class. - - - The of the object where the property was not found. - - The name of the property not found. - A message about the exception. - - - - Creates a new instance of the - class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The name of the offending property. - - - - - The of the class where the property was last looked for. - - - - - Comparator implementation for objects, sorting by - order value ascending (resp. by priority descending). - - -

- Non- objects are treated as greatest order values, - thus ending up at the end of a list, in arbitrary order (just like same order values of - objects). -

-
- Juergen Hoeller - Aleksandar Seovic (.Net) -
- - - Compares two objects and returns a value indicating whether one is less than, - equal to or greater than the other. - - -

- Uses direct evaluation instead of - to avoid unnecessary boxing. -

-
- The first object to compare. - The second object to compare. - - -1 if first object is less then second, 1 if it is greater, or 0 if they are equal. - -
- - - Handle the case when both objects have equal sort order priority. By default returns 0, - but may be overriden for handling special cases. - - The first object to compare. - The second object to compare. - - -1 if first object is less then second, 1 if it is greater, or 0 if they are equal. - - - - - Provides additional data for the PropertyChanged event. - - -

- Provides some additional properties over and above the name of the - property that has changed (which is inherited from the - base class). - This allows calling code to determine whether or not a property has - actually changed (i.e. a PropertyChanged event may have been - raised, but the value itself may be equivalent). -

-
- -
- - - Create a new instance of the - class. - - - The name of the property that was changed. - The old value of the property. - the new value of the property. - - - - Get the old value for the property. - - - - - - Get the new value of the property. - - - - - - A base class for all - implementations that are regular expression based. - - Rick Evans - - - - The default pattern... matches absolutely anything. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The regular expression pattern to be applied. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - Convenience method that calls the - - on the supplied . - - The input to match against. - True if the matches. - - - - The regular expression pattern to be applied. - - - - - The regular expression options to be applied. - - - - - The regular expression to be applied. - - - - - Criteria that is satisfied if the Name property of an - instance matches a - supplied regular expression pattern. - - Rick Evans - - - - The default event name pattern... matches pretty much any event name. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The pattern that names - must match against in order to satisfy this criteria. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - Criteria that is satisfied if the Name property of an - instance matches a - supplied regular expression pattern. - - Rick Evans - - - - The default method name pattern... matches pretty much any method name. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The pattern that names - must match against in order to satisfy this criteria. - - - - - Does the supplied satisfy the criteria encapsulated by - this instance? - - The datum to be checked by this criteria instance. - - True if the supplied satisfies the criteria encapsulated - by this instance; false if not or the supplied is null. - - - - - Exception thrown on a mismatch when trying to set a property - or resolve an argument to a method invocation. - - Rod Johnson - Juergen Hoeller - Mark Pollack (.NET) - - - - Creates a new instance of the TypeMismatchException class. - - - - - Creates a new instance of the TypeMismatchException class. - - - A message about the exception. - - - - - Creates a new instance of the TypeMismatchException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the TypeMismatchException class describing the - property and required type that could not used to set a property on the target object. - - - The description of the property that was to be changed. - - The target conversion type. - - - - Creates a new instance of the TypeMismatchException class describing the - property, required type, and underlying exception that could not be used - to set a property on the target object. - - - The description of the property that was to be changed. - - The target conversion type. - The underlying exception. - - - - Creates a new instance of the TypeMismatchException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - The string error code used to classify the exception. - - - - - Abstract base class for implementations. - - Aleksandar Seovic - - - - An interface that defines the methods that have to be implemented by all data bindings. - - Aleksandar Seovic - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Sets error message that should be displayed in the case - of a non-fatal binding error. - - - Resource ID of the error message. - - - List of error providers message should be added to. - - - - - The name of the always filled error provider - - - - - Gets or sets a flag specifying whether this binding is valid. - - - true if this binding evaluated without errors; - false otherwise. - - - - - Marks this binding's state as invalid for this validationErrors collection. - Returns false if is null. - - - false, if validationErrors is null - - - - Initializes a new instance of the class. - - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Sets error message that should be displayed in the case - of a non-fatal binding error. - - - Resource ID of the error message. - - - List of error providers message should be added to. - - - - - Determines whether the specified is equal to the current . - - - true if the specified is equal to the current ; otherwise, false. - - The to compare with the current . 2 - - - - Serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. - - - A hash code for the current . - - - - - Gets the unique ID of this binding instance. - - - - - Gets or sets the . - - The binding direction. - - - - Gets the error message. - - The error message. - - - - Gets the error providers. - - - - - Abstract base class for simple, one-to-one implementations. - - Aleksandar Seovic - - - - Initialize a new instance of without any - - - - - Initialize a new instance of with the - specified . - - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Concrete implementation if source to target binding. - - - The source object. - - - The target object. - - - Variables that should be used during expression evaluation. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Concrete implementation of target to source binding. - - - The source object. - - - The target object. - - - Variables that should be used during expression evaluation. - - - - - Gets the source value for the binding. - - - Source object to extract value from. - - - Variables for expression evaluation. - - - The source value for the binding. - - - - - Sets the source value for the binding. - - - The source object to set the value on. - - - The value to set. - - - Variables for expression evaluation. - - - - - Gets the target value for the binding. - - - Source object to extract value from. - - - Variables for expression evaluation. - - - The target value for the binding. - - - - - Sets the target value for the binding. - - - The target object to set the value on. - - - The value to set. - - - Variables for expression evaluation. - - - - - Gets or sets the to use. - - The formatter to use. - - - - Base implementation of the . - - Aleksandar Seovic - - - - An interface that has to be implemented by all data binding containers. - - Aleksandar Seovic - - - - Adds the binding. - - - Binding definition to add. - - - Added instance. - - - - - Adds the binding with a default - binding direction of . - - - This is a convinience method for adding SimpleExpressionBinding, - one of the most often used binding types, to the bindings list. - - - The source expression. - - - The target expression. - - - Added instance. - - - - - Adds the binding. - - - This is a convinience method for adding SimpleExpressionBinding, - one of the most often used binding types, to the bindings list. - - - The source expression. - - - The target expression. - - - Binding direction. - - - Added instance. - - - - - Adds the binding with a default - binding direction of . - - - This is a convinience method for adding SimpleExpressionBinding, - one of the most often used binding types, to the bindings list. - - - The source expression. - - - The target expression. - - - to use for value formatting and parsing. - - - Added instance. - - - - - Adds the binding. - - - This is a convinience method for adding SimpleExpressionBinding, - one of the most often used binding types, to the bindings list. - - - The source expression. - - - The target expression. - - - Binding direction. - - - to use for value formatting and parsing. - - - Added instance. - - - - - Gets a value indicating whether this data binding container - has bindings. - - - true if this data binding container has bindings; - false otherwise. - - - - - Creates a new instance of . - - - - - Adds the binding. - - - Binding definition to add. - - - Added instance. - - - - - Adds the binding with a default - binding direction of . - - - The source expression. - - - The target expression. - - - Added instance. - - - - - Adds the binding. - - - The source expression. - - - The target expression. - - - Binding direction. - - - Added instance. - - - - - Adds the binding with a default - binding direction of . - - - The source expression. - - - The target expression. - - - to use for value formatting and parsing. - - - Added instance. - - - - - Adds the binding. - - - The source expression. - - - The target expression. - - - Binding direction. - - - to use for value formatting and parsing. - - - Added instance. - - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Implemented as a NOOP for containers. - of a non-fatal binding error. - - - Resource ID of the error message. - - - List of error providers message should be added to. - - - - - Gets a list of bindings for this container. - - - A list of bindings for this container. - - - - - Gets a value indicating whether this instance has bindings. - - - true if this instance has bindings; otherwise, false. - - - - - BaseBindingManager keeps track of all registered bindings and - represents an entry point for the binding and unbinding process. - - Aleksandar Seovic - - - - Initializes a new instance of the class. - - - - - Enumeration that defines possible values for data binding direction. - - Aleksandar Seovic - - - - Specifies that value from the control property should be bound to a data model. - - - - - Specifies that value from the data model should be bound to control property. - - - - - Specifies that binding is bidirectional. - - - - - Represents an ErrorMessage specific to a binding instance. - - Erich Eichinger - - - - Represents a single validation error message. - - Aleksandar Seovic - Goran Milosavljevic - - - - Default constructor. - - - - - Initializes a new instance of the class. - - Error message resource identifier. - Parameters that should be used for message resolution. - - - - Initializes a new instance of the class copying values from another instance. - - Another Error message instance to copy values from. - - - - This property is reserved, apply the - - to the class instead. - - - An - that describes the XML representation of the object that - is produced by the - - method and consumed by the - - method. - - - - - - Generates an object from its XML representation. - - - The stream - from which the object is deserialized. - - - - - Converts an object into its XML representation. - - - The stream - to which the object is serialized. - - - - - Resolves the message against specified . - - Message source to resolve this error message against. - Resolved error message. - - - - Determines whether the specified is equal to the current . - - - true if the specified is equal to the current ; otherwise, false. - - The to compare with the current . 2 - - - - Serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. - - - A hash code for the current . - - - - - Gets or sets the resource identifier for this message. - - The resource identifier for this message. - - - - Gets or sets the message parameters. - - The message parameters. - - - - Initializes a new instance of the class. - - the id of the binding this error message is associated with - the message id - optional parameters to this message - - - - Generates an object from its XML representation. - - - The stream - from which the object is deserialized. - - - - - Converts an object into its XML representation. - - - The stream - to which the object is serialized. - - - - - Determines whether the specified is equal to the current . - - - true if the specified is equal to the current ; otherwise, false. - - The to compare with the current . 2 - - - - Serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. - - - A hash code for the current . - - - - - Get the ID of the binding this message instance relates to. - - - - - Interface that should be implemented by data bound objects, such as - web pages, user controls, windows forms, etc. - - Aleksandar Seovic - - - - Gets the binding manager. - - The binding manager. - - - - implementation that allows - data binding between collections that implement - interface. - - Aleksandar Seovic - - - - Binds source object to target object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Binds target object to source object. - - - The source object. - - - The target object. - - - Validation errors collection that type conversion errors should be added to. - - - Variables that should be used during expression evaluation. - - - - - Simple, expression-based implementation of that - binds source to target one-to-one. - - Aleksandar Seovic - - - - Initializes a new instance of the class. - - - The source expression. - - - The target expression. - - - - - Initializes a new instance of the class. - - - The source expression. - - - The target expression. - - - The formatter to use. - - - - - Gets the source value for the binding. - - - Source object to extract value from. - - - Variables for expression evaluation. - - - The source value for the binding. - - - - - Sets the source value for the binding. - - - The source object to set the value on. - - - The value to set. - - - Variables for expression evaluation. - - - - - Gets the target value for the binding. - - - Source object to extract value from. - - - Variables for expression evaluation. - - - The target value for the binding. - - - - - Sets the target value for the binding. - - - The target object to set the value on. - - - The value to set. - - - Variables for expression evaluation. - - - - - Gets the source expression. - - The source expression. - - - - Gets the target expression. - - The target expression. - - - - Minimal AST node interface used by ANTLR AST generation and tree-walker. - - - - - Add a (rightmost) child to this node - - - - - - Get the first child of this node; null if no children - - - - - Get the next sibling in line after this one - - - - - Get the token text for this node - - - - - - Get number of children of this node; if leaf, returns 0 - - Number of children - - - - Set the first child of a node. - - - - - - Set the next sibling after this one. - - - - - - Set the token text for this node - - - - - - Set the token type for this node - - - - - - Get the token type for this node - - - - - Event type. - - - - Used for creating Token instances. - - - Used for caching lookahead characters. - - - - This method is executed by ANTLR internally when it detected an illegal - state that cannot be recovered from. - The previous implementation of this method called - and writes directly to , which is usually not - appropriate when a translator is embedded into a larger application. - - Error message. - - - - A creator of Token object instances. - - - - This class and it's sub-classes exists primarily as an optimization - of the reflection-based mechanism(s) previously used exclusively to - create instances of Token objects. - - - Since Lexers in ANTLR use a single Token type, each TokenCreator can - create one class of Token objects (that's why it's not called TokenFactory). - - - - - - Constructs a instance. - - - - - Returns the fully qualified name of the Token type that this - class creates. - - - - - The fully qualified name of the Token type to create. - - - - - Type object used as a template for creating tokens by reflection. - - - - - Returns the fully qualified name of the Token type that this - class creates. - - - - - Constructs a instance. - - - - - Returns the fully qualified name of the Token type that this - class creates. - - - - This type was created in VisualAge. - - - - Report exception errors caught in nextToken() - - - - Parser error-reporting function can be overridden in subclass - - - - Parser warning-reporting function can be overridden in subclass - - - - - Represents a stream of characters fed to the lexer from that can be rewound - via mark()/rewind() methods. - - - - A dynamic array is used to buffer up all the input characters. Normally, - "k" characters are stored in the buffer. More characters may be stored - during guess mode (testing syntactic predicate), or when LT(i>k) is referenced. - Consumption of characters is deferred. In other words, reading the next - character is not done by conume(), but deferred until needed by LA or LT. - - - - - This should NOT be called from anyone other than ParserEventSupport! - - - - This should NOT be called from anyone other than ParserEventSupport! - - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "CharConsumed" event. - - Event source object - Event data object - - - - Handle the "CharLA" event. - - Event source object - Event data object - - - - Handle the "Mark" event. - - Event source object - Event data object - - - - Handle the "Rewind" event. - - Event source object - Event data object - - - charBufferConsume method comment. - - - - charBufferLA method comment. - - - - - @deprecated as of 2.7.2. This method calls System.exit() and writes - directly to stderr, which is usually not appropriate when - a parser is embedded into a larger application. Since the method is - static, it cannot be overridden to avoid these problems. - ANTLR no longer uses this method internally or in generated code. - - - - - - Specify an object with support code (shared by Parser and TreeParser. - Normally, the programmer does not play with this, using - instead. - - - - - - Specify the type of node to create during tree building. - - Fully qualified AST Node type name. - - - - Specify the type of node to create during tree building. - use now to be consistent with - Token Object Type accessor. - - Fully qualified AST Node type name. - - - - - - - - Get another token object from the token stream - - - - Return the token type of the ith token of lookahead where i=1 - is the current token being examined by the parser (i.e., it - has not been matched yet). - - - - Make sure current lookahead symbol matches token type t. - Throw an exception upon mismatch, which is catch by either the - error handler or by the syntactic predicate. - - - - Make sure current lookahead symbol matches the given set - Throw an exception upon mismatch, which is catch by either the - error handler or by the syntactic predicate. - - - - Parser error-reporting function can be overridden in subclass - - - - Parser error-reporting function can be overridden in subclass - - - - Parser warning-reporting function can be overridden in subclass - - - - User can override to do their own debugging - - - - This should NOT be called from anyone other than ParserEventSupport! - - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "ReportError" event. - - Event source object - Event data object - - - - Handle the "ReportWarning" event. - - Event source object - Event data object - - - This should NOT be called from anyone other than ParserEventSupport! - - - - A class to assist in firing parser events - NOTE: I intentionally _did_not_ synchronize the event firing and - add/remove listener methods. This is because the add/remove should - _only_ be called by the parser at its start/end, and the _same_thread_ - should be performing the parsing. This should help performance a tad... - - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "EnterRule" event - - Event source object - Event data object - - - - Handle the "ExitRule" event - - Event source object - Event data object - - - - Handle the "Consume" event. - - Event source object - Event data object - - - - Handle the "ParserLA" event. - - Event source object - Event data object - - - - Handle the "Match" event. - - Event source object - Event data object - - - - Handle the "MatchNot" event. - - Event source object - Event data object - - - - Handle the "MisMatch" event. - - Event source object - Event data object - - - - Handle the "MisMatchNot" event. - - Event source object - Event data object - - - - Handle the "ReportError" event. - - Event source object - Event data object - - - - Handle the "ReportWarning" event. - - Event source object - Event data object - - - - Handle the "SemPreEvaluated" event. - - Event source object - Event data object - - - - Handle the "SynPredFailed" event. - - Event source object - Event data object - - - - Handle the "SynPredStarted" event. - - Event source object - Event data object - - - - Handle the "SynPredSucceeded" event. - - Event source object - Event data object - - - This should NOT be called from anyone other than ParserEventSupport! - - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "Match" event. - - Event source object - Event data object - - - - Handle the "MatchNot" event. - - Event source object - Event data object - - - - Handle the "MisMatch" event. - - Event source object - Event data object - - - - Handle the "MisMatchNot" event. - - Event source object - Event data object - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "EnterRule" event - - Event source object - Event data object - - - - Handle the "ExitRule" event - - Event source object - Event data object - - - This should NOT be called from anyone other than ParserEventSupport! - - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "Consume" event. - - Event source object - Event data object - - - - Handle the "ParserLA" event. - - Event source object - Event data object - - - - Specifies the behaviour required (i.e. parser modifications) - specifically to support parse tree debugging and derivation. - - - - Override the standard matching and rule entry/exit routines - to build parse trees. This class is useful for 2.7.3 where - you can specify a superclass like - - - class TinyCParser extends Parser(ParseTreeDebugParser); - - - - - - Each new rule invocation must have it's own subtree. Tokens are - added to the current root so we must have a stack of subtree roots. - - - - - Track most recently created parse subtree so that when parsing - is finished, we can get to the root. - - - - - For every rule replacement with a production, we bump up count. - - - - - Adds LT(1) to the current parse subtree. - - - - Note that the match() routines add the node before checking for - correct match. This means that, upon mismatched token, there - will a token node in the tree corresponding to where that token - was expected. For no viable alternative errors, no node will - be in the tree as nothing was matched() (the lookahead failed - to predict an alternative). - - - - - - Create a rule node, add to current tree, and make it current root - - - - - - Pop current root; back to adding to old root - - - - - A class to assist in firing parser events - NOTE: I intentionally _did_not_ synchronize the event firing and - add/remove listener methods. This is because the add/remove should - _only_ be called by the parser at its start/end, and the _same_thread_ - should be performing the parsing. This should help performance a tad... - - - - This should NOT be called from anyone other than ParserEventSupport! - - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "SemPreEvaluated" event. - - Event source object - Event data object - - - - Provides an abstract base for implementing subclasses. - - - - This abstract class is provided to make it easier to create s. - You should extend this base class rather than creating your own. - - - - - - Handle the "Done" event. - - Event source object - Event data object - - - - Handle the "SynPredFailed" event. - - Event source object - Event data object - - - - Handle the "SynPredStarted" event. - - Event source object - Event data object - - - - Handle the "SynPredSucceeded" event. - - Event source object - Event data object - - - This should NOT be called from anyone other than ParserEventSupport! - - - - - AST Support code shared by TreeParser and Parser. - - - - We use delegation to share code (and have only one - bit of code to maintain) rather than subclassing - or superclassing (forces AST support code to be - loaded even when you don't want to do AST stuff). - - - Typically, is used to specify the - homogeneous type of node to create, but you can override - to make heterogeneous nodes etc... - - - - - - Constructs an ASTFactory with the default AST node type of - . - - - - - Constructs an ASTFactory and use the specified AST node type - as the default. - - - Name of default AST node type for this factory. - - - - - Constructs an ASTFactory and use the specified AST node type - as the default. - - - MetaType of default AST node type for this factory. - - - - - Stores the Type of the default AST node class to be used during tree construction. - - - - - Stores the mapping between custom AST NodeTypes and their NodeTypeName/NodeTypeClass - and ASTNodeCreator. - - - - - Stores the mapping between AST node typenames and their token ID. - - - - - Specify an "override" for the type created for - the specified Token type. - - - This method is useful for situations that ANTLR cannot oridinarily deal - with (i.e., when you create a token based upon a nonliteral token symbol - like #[LT(1)]. This is a runtime value and ANTLR cannot determine the token - type (and hence the AST) statically. - - Token type to override. - - Fully qualified AST typename (or null to specify - the factory's default AST type). - - - - - Register an AST Node Type for a given Token type ID. - - The Token type ID. - The AST Node Type to register. - - - - Register an ASTNodeCreator for a given Token type ID. - - The Token type ID. - The creater to register. - - - - Register an ASTNodeCreator to be used for creating node by default. - - The ASTNodeCreator. - - - - Pre-expands the internal list of TokenTypeID-to-ASTNodeType mappings - to the specified size. - This is primarily a convenience method that can be used to prevent - unnecessary and costly re-org of the mappings list. - - Maximum Token Type ID. - - - - Add a child to the current AST - - The AST to add a child to - The child AST to be added - - - - Creates a new uninitialized AST node. Since a specific AST Node Type - wasn't indicated, the new AST node is created using the current default - AST Node type - - - An uninitialized AST node object. - - - - Creates and initializes a new AST node using the specified Token Type ID. - The used for creating this new AST node is - determined by the following: - - the current TokenTypeID-to-ASTNodeType mapping (if any) or, - the otherwise - - - Token type ID to be used to create new AST Node. - An initialized AST node object. - - - - Creates and initializes a new AST node using the specified Token Type ID. - The used for creating this new AST node is - determined by the following: - - the current TokenTypeID-to-ASTNodeType mapping (if any) or, - the otherwise - - - Token type ID to be used to create new AST Node. - Text for initializing the new AST Node. - An initialized AST node object. - - - - Creates a new AST node using the specified AST Node Type name. Once created, - the new AST node is initialized with the specified Token type ID and string. - The used for creating this new AST node is - determined solely by ASTNodeTypeName. - The AST Node type must have a default/parameterless constructor. - - Token type ID to be used to create new AST Node. - Text for initializing the new AST Node. - Fully qualified name of the Type to be used for creating the new AST Node. - An initialized AST node object. - - - - Creates a new AST node using the specified AST Node Type name. - - Token instance to be used to initialize the new AST Node. - - Fully qualified name of the Type to be used for creating the new AST Node. - - A newly created and initialized AST node object. - - Once created, the new AST node is initialized with the specified Token - instance. The used for creating this new AST - node is determined solely by ASTNodeTypeName. - The AST Node type must have a default/parameterless constructor. - - - - - Creates and initializes a new AST node using the specified AST Node instance. - the new AST node is initialized with the specified Token type ID and string. - The used for creating this new AST node is - determined solely by aNode. - The AST Node type must have a default/parameterless constructor. - - AST Node instance to be used for creating the new AST Node. - An initialized AST node object. - - - - Creates and initializes a new AST node using the specified Token instance. - The used for creating this new AST node is - determined by the following: - - the current TokenTypeID-to-ASTNodeType mapping (if any) or, - the otherwise - - - Token instance to be used to create new AST Node. - An initialized AST node object. - - - - Returns a copy of the specified AST Node instance. The copy is obtained by - using the method Clone(). - - AST Node to copy. - An AST Node (or null if t is null). - - - - Duplicate AST Node tree rooted at specified AST node and all of it's siblings. - - Root of AST Node tree. - Root node of new AST Node tree (or null if t is null). - - - - Duplicate AST Node tree rooted at specified AST node. Ignore it's siblings. - - Root of AST Node tree. - Root node of new AST Node tree (or null if t is null). - - - - Make a tree from a list of nodes. The first element in the - array is the root. If the root is null, then the tree is - a simple list not a tree. Handles null children nodes correctly. - For example, build(a, b, null, c) yields tree (a b c). build(null,a,b) - yields tree (nil a b). - - List of Nodes. - AST Node tree. - - - - Make a tree from a list of nodes, where the nodes are contained - in an ASTArray object. - - List of Nodes. - AST Node tree. - - - - Make an AST the root of current AST. - - - - - - - Sets the global default AST Node Type for this ASTFactory instance. - This method also attempts to load the instance - for the specified typename. - - Fully qualified AST Node Type name. - - - - To change where error messages go, can subclass/override this method - and then setASTFactory in Parser and TreeParser. This method removes - a prior dependency on class antlr.Tool. - - - - - - A creator of AST node instances. - - - - This class and it's sub-classes exists primarily as an optimization - of the reflection-based mechanism(s) previously used exclusively to - create instances of AST node objects. - - - Parsers and TreeParsers already use the ASTFactory class in ANTLR whenever - they need to create an AST node objeect. What this class does is to support - performant extensibility of the basic ASTFactory. The ASTFactory can now be - extnded as run-time to support more new AST node types without using needing - to use reflection. - - - - - - Constructs an instance. - - - - - Returns the fully qualified name of the AST type that this - class creates. - - - - - Summary description for ASTVisitor. - - - - - Get number of children of this node; if leaf, returns 0 - - Number of children - - - - Small buffer used to avoid reading individual chars - - - - - Small buffer used to avoid reading individual chars - - - - - Constructs a instance. - - - - - Returns the fully qualified name of the AST type that this - class creates. - - - - - Constructs a instance. - - - - - Returns the fully qualified name of the AST type that this - class creates. - - - - - A token is minimally a token type. Subclasses can add the text matched - for the token and line info. - - - - - Constructs a instance. - - - - - Returns the fully qualified name of the Token type that this - class creates. - - - - - Constructs a instance. - - - - - Returns the fully qualified name of the Token type that this - class creates. - - - - - Summary description for DumpASTVisitor. - - Simple class to dump the contents of an AST to the output - - - - Append a char to the msg buffer. If special, then show escaped version - - Message buffer - Char to append - - - - Walk parse tree and return requested number of derivation steps. - If steps less-than 0, return node text. If steps equals 1, return derivation - string at step. - - derivation steps - - - - - Get derivation and return how many you did (less than requested for - subtree roots. - - string buffer - derivation steps - - - - - Do a step-first walk, building up a buffer of tokens until - you've reached a particular step and print out any rule subroots - insteads of descending. - - derivation buffer - derivation steps - - - - - This token stream tracks the *entire* token stream coming from - a lexer, but does not pass on the whitespace (or whatever else - you want to discard) to the parser. - - - - This class can then be asked for the ith token in the input stream. - Useful for dumping out the input stream exactly after doing some - augmentation or other manipulations. Tokens are index from 0..n-1 - - - You can insert stuff, replace, and delete chunks. Note that the - operations are done lazily--only if you convert the buffer to a - string. This is very efficient because you are not moving data around - all the time. As the buffer of tokens is converted to strings, the - toString() method(s) check to see if there is an operation at the - current index. If so, the operation is done and then normal string - rendering continues on the buffer. This is like having multiple Turing - machine instruction streams (programs) operating on a single input tape. :) - - - Since the operations are done lazily at toString-time, operations do not - screw up the token index values. That is, an insert operation at token - index i does not change the index values for tokens i+1..n-1. - - - Because operations never actually alter the buffer, you may always get - the original token stream back without undoing anything. Since - the instructions are queued up, you can easily simulate transactions and - roll back any changes if there is an error just by removing instructions. - For example, - - For example: - - TokenStreamRewriteEngine rewriteEngine = new TokenStreamRewriteEngine(lexer); - JavaRecognizer parser = new JavaRecognizer(rewriteEngine); - ... - rewriteEngine.insertAfter("pass1", t, "foobar");} - rewriteEngine.insertAfter("pass2", u, "start");} - System.Console.Out.WriteLine(rewriteEngine.ToString("pass1")); - System.Console.Out.WriteLine(rewriteEngine.ToString("pass2")); - - - - You can also have multiple "instruction streams" and get multiple - rewrites from a single pass over the input. Just name the instruction - streams and use that name again when printing the buffer. This could be - useful for generating a C file and also its header file--all from the - same buffer. - - - If you don't use named rewrite streams, a "default" stream is used. - - - Terence Parr, parrt@cs.usfca.edu - University of San Francisco - February 2004 - - - - - - Track the incoming list of tokens - - - - - You may have multiple, named streams of rewrite operations. - I'm calling these things "programs." - Maps string (name) -> rewrite (List) - - - - - Map string (program name) -> Integer index - - - - - track index of tokens - - - - - Who do we suck tokens from? - - - - - Which (whitespace) token(s) to throw out - - - - - Rollback the instruction stream for a program so that - the indicated instruction (via instructionIndex) is no - longer in the stream. - - - UNTESTED! - - - - - - - Reset the program so that no instructions exist - - - - - - If op.index > lastRewriteTokenIndexes, just add to the end. - Otherwise, do linear - - - - - - Execute the rewrite operation by possibly adding to the buffer. - - rewrite buffer - The index of the next token to operate on. - - - - This token tracks it's own index 0..n-1 relative to the beginning - of the stream. It is designed to work with - in TokenStreamRewriteEngine.cs - - - - - Index into token array indicating position in input stream - - - - - @deprecated as of 2.7.2. This method calls System.exit() and writes - directly to stderr, which is usually not appropriate when - a parser is embedded into a larger application. Since the method is - static, it cannot be overridden to avoid these problems. - ANTLR no longer uses this method internally or in generated code. - - - - - - Implementation of the average aggregator. - - Aleksandar Seovic - - - - Defines an interface that should be implemented - by all collection processors and aggregators. - - - - - Processes a list of source items and returns a result. - - - The source list to process. - - - An optional processor arguments array. - - - The processing result. - - - - - Returns the average of the numeric values in the source collection. - - - The source collection to process. - - - Ignored. - - - The average of the numeric values in the source collection. - - - - - Converts all elements in the input list to a given target type. - - Erich Eichinger - - - - Processes a list of source items and returns a result. - - - The source list to process. - - - An optional processor arguments array. - - - The processing result. - - - - - Implementation of the count aggregator. - - Aleksandar Seovic - - - - Returns the number of items in the source collection. - - - The source collection to process. - - - Ignored. - - - The number of items in the source collection, - or zero if the collection is empty or null. - - - - - Converts a string literal to a instance. - - Erich Eichinger - - - - - Erich Eichinger - - - - Implementation of the distinct processor. - - Aleksandar Seovic - - - - Returns distinct items from the collection. - - - The source collection to process. - - - 0: boolean flag specifying whether to include null - in the results or not. Default is false, which means that - null values will not be included in the results. - - - A collection containing distinct source collection elements. - - - If there is more than one argument, or if the single optional argument - is not Boolean. - - - - - Implementation of the maximum aggregator. - - Aleksandar Seovic - - - - Returns the largest item in the source collection. - - - The source collection to process. - - - Ignored. - - - The largest item in the source collection. - - - - - Implementation of the minimum aggregator. - - Aleksandar Seovic - - - - Returns the smallest item in the source collection. - - - The source collection to process. - - - Ignored. - - - The smallest item in the source collection. - - - - - Implementation of the non-null processor. - - Aleksandar Seovic - - - - Returns non-null items from the collection. - - - The source collection to process. - - - Ignored. - - - A collection containing non-null source collection elements. - - - - - Implementation of the 'order by' processor. - - Aleksandar Seovic - Erich Eichinger - - - - Sorts the source collection using custom sort criteria. - - - Please note that your compare function needs to take care about - proper conversion of types to be comparable! - - - The source collection to sort. - - - Sort criteria to use. - - - A sorted array containing collection elements. - - - - - Reverts order of elements in the list - - Erich Eichinger - - - - Processes a list of source items and returns a result. - - - The source list to process. - - - An optional processor arguments array. - - - The processing result. - - - - - Implementation of the sort processor. - - Aleksandar Seovic - - - - Sorts the source collection. - - - Please not that this processor requires that collection elements - are of a uniform type and that they implement - interface. -

- If you want to perform custom sorting based on element properties - you should consider using instead. - - - The source collection to sort. - - - Ignored. - - - An array containing sorted collection elements. - - - If collection is not empty and it is - neither nor . - - - -

- Implementation of the sum aggregator. - - Aleksandar Seovic -
- - - Returns the sum of the numeric values in the source collection. - - - The source collection to process. - - - Ignored. - - - The sum of the numeric values in the source collection. - - - - - Represents parsed method node in the navigation expression. - - Aleksandar Seovic - - - - Base type for nodes that accept arguments. - - Aleksandar Seovic - - - - Base type for all expression nodes. - - Aleksandar Seovic - - - - For internal purposes only. Use for expression node implementations. - - - This class is only required to enable serialization of parsed Spring expressions since antlr.CommonAST - unfortunately is not marked as [Serializable].
-
- Note:Since SpringAST implements , deriving classes - have to explicitely override if they need to persist additional - data during serialization. -
-
- - - The global SpringAST node factory - - - - - Create an instance - - - - - Create an instance from a token - - - - - initialize this instance from an AST - - - - - initialize this instance from an IToken - - - - - initialize this instance from a token type number and a text - - - - - sets the text of this node - - - - - gets the text of this node - - - - - Create a new instance from SerializationInfo - - - - - populate SerializationInfo from this instance - - - - - gets or sets the token type of this node - - - - - gets or sets the text of this node - - - - - Interface that all navigation expression nodes have to implement. - - Aleksandar Seovic - - - - Returns expression value. - - Value of the expression. - - - - Returns expression value. - - Object to evaluate expression against. - Value of the expression. - - - - Returns expression value. - - Object to evaluate expression against. - Expression variables map. - Value of the expression. - - - - Sets expression value. - - Object to evaluate expression against. - New value for the last node of the expression. - - - - Sets expression value. - - Object to evaluate expression against. - Expression variables map. - New value for the last node of the expression. - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns node's value. - - Node's value. - - - - Returns node's value for the given context. - - Object to evaluate node against. - Node's value. - - - - Returns node's value for the given context. - - Object to evaluate node against. - Expression variables map. - Node's value. - - - - Returns node's value for the given context. - - Node's value. - - - - Evaluates this node for the given context, switching local variables map to the ones specified in . - - - - - Sets node's value for the given context. - - Object to evaluate node against. - New value for this node. - - - - Sets node's value for the given context. - - Object to evaluate node against. - Expression variables map. - New value for this node. - - - - Sets node's value for the given context. - - -

- This is a default implementation of Set method, which - simply throws . -

-

- This was done in order to avoid redundant Set method implementations, - because most of the node types do not support value setting. -

-
-
- - - Returns a string representation of this node instance. - - - - - Evaluates this node, switching local variables map to the ones specified in . - - - - - Holds the state during evaluating an expression. - - - - - Gets/Sets the root context of the current evaluation - - - - - Gets/Sets the current context of the current evaluation - - - - - Gets/Sets global variables of the current evaluation - - - - - Gets/Sets local variables of the current evaluation - - - - - Initializes a new EvaluationContext instance. - - The root context for this evaluation - dictionary of global variables used during this evaluation - - - - Switches current ThisContext. - - - - - Switches current LocalVariables. - - - - - Gets the type of the - - - - - Create a new instance - - - - - Create a new instance - - - - - Append an argument node to the list of child nodes - - - - - - Create a new instance from SerializationInfo - - - - - Initializes the node. - - - - - Asserts the argument count. - - The required count. - - - - Resolves the arguments. - - Current expression evaluation context. - An array of argument values - - - - Resolves the named arguments. - - Current expression evaluation context. - A dictionary of argument name to value mappings. - - - - Resolves the argument. - - Argument position. - Current expression evaluation context. - Resolved argument value. - - - - Resolves the argument without ensuring was called. - - Argument position. - Current expression evaluation context. - Resolved argument value. - - - - Resolves the named argument. - - Argument name. - Current expression evaluation context. - Resolved named argument value. - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Creates new instance of the type defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed assignment node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Assigns value of the right operand to the left one. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed attribute node in the navigation expression. - - Aleksandar Seovic - - - - Represents parsed method node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Creates new instance of the type defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Determines the type of object that should be instantiated. - - - The type name to resolve. - - - The type of object that should be instantiated. - - - If the type cannot be resolved. - - - - - Initializes this node by caching necessary constructor and property info. - - - - - - - Sets the named arguments (properties). - - Instance to set property values on. - Argument (property) name to value mappings. - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Tries to determine attribute type based on the specified - attribute type name. - - - Attribute type name to resolve. - - - Resolved attribute type. - - - If type cannot be resolved. - - - - - Base class for binary operators. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance with the supplied operands - - - - - - - Create a new instance from SerializationInfo - - - - - Evaluate the left operand - - - - - Evaluate the left operand - - - - - Gets the left operand. - - The left operand. - - - - Gets the right operand. - - The right operand. - - - - Represents parsed boolean literal node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the boolean literal node. - - - This is the entrypoint into evaluating this expression. - - Node's value. - - - - Represents parsed default node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns left operand if it is not null, or the right operand if it is. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Container object for the parsed expression. - - -

- Preparing this object once and reusing it many times for expression - evaluation can result in significant performance improvements, as - expression parsing and reflection lookups are only performed once. -

-
- Aleksandar Seovic -
- - - Initializes a new instance of the class - by parsing specified expression string. - - Expression to parse. - - - - Registers lambda expression under the specified . - - Function name to register expression as. - Lambda expression to register. - Variables dictionary that the function will be registered in. - - - - Initializes a new instance of the class - by parsing specified primary expression string. - - Primary expression to parse. - - - - Initializes a new instance of the class - by parsing specified property expression string. - - Property expression to parse. - - - - Initializes a new instance of the class. - - - - - Create a new instance from SerializationInfo - - - - - Evaluates this expression for the specified root object and returns - value of the last node. - - Context to evaluate expressions against. - Current expression evaluation context. - Value of the last node. - - - - Evaluates this expression for the specified root object and sets - value of the last node. - - Context to evaluate expressions against. - Current expression evaluation context. - Value to set last node to. - If navigation expression is empty. - - - - Evaluates this expression for the specified root object and returns - of the last node, if possible. - - Context to evaluate expression against. - Expression variables map. - Value of the last node. - - - - Contains a list of reserved variable names. - You must not use any variable names with the reserved prefix! - - - - - Variable Names using this prefix are reserved for internal framework use - - - - - variable name of the currently processed object factory, if any - - - - - Converts string representation of expression into an instance of . - - Aleksandar Seovic - - - - Can we convert from a the sourcetype to a ? - - -

- Currently only supports conversion from a instance. -

-
- - A - that provides a format context. - - - A that represents the - you want to convert from. - - if the conversion is possible. -
- - - Convert from a value to an - instance. - - - A - that provides a format context. - - - The to use - as the current culture. - - - The value that is to be converted. - - - A array if successful. - - - - - Utility class that enables easy expression evaluation. - - -

- This class allows users to get or set properties, execute methods, and evaluate - logical and arithmetic expressions. -

-

- Methods in this class parse expression on every invocation. - If you plan to reuse the same expression many times, you should prepare - the expression once using the static method, - and then call to evaluate it. -

-

- This can result in significant performance improvements as it avoids expression - parsing and node resolution every time it is called. -

-

-

-
- Aleksandar Seovic -
- - - Parses and evaluates specified expression. - - Root object. - Expression to evaluate. - Value of the last node in the expression. - - - - Parses and evaluates specified expression. - - Root object. - Expression to evaluate. - Expression variables map. - Value of the last node in the expression. - - - - Parses and specified expression and sets the value of the - last node to the value of the newValue parameter. - - Root object. - Expression to evaluate. - Value to set last node to. - - - - Parses and specified expression and sets the value of the - last node to the value of the newValue parameter. - - Root object. - Expression to evaluate. - Expression variables map. - Value to set last node to. - - - - Represents parsed expression list node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a result of the last expression in a list. - - Context to evaluate expressions against. - Current expression evaluation context. - Result of the last expression in a list - - - - Represents parsed function node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Evaluates function represented by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Result of the function evaluation. - - - - Represents parsed hexadecimal integer literal node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the hexadecimal integer literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed indexer node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns node's value for the given context. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Sets node's value for the given context. - - Context to evaluate expressions against. - Current expression evaluation context. - New value for this node. - - - - Utility method that is needed by ObjectWrapper and AbstractAutowireCapableObjectFactory. - - Context to resolve property against. - Expression variables map. - PropertyInfo for this node. - - - - Represents parsed integer literal node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the integer literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents lambda expression. - - Aleksandar Seovic - - - - caches argumentNames of this instance - - - - - caches body expression of this lambda function - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Assigns value of the right operand to the left one. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Evaluates this node, switching local variables map to the ones specified in . - - - - - Gets argument names for this lambda expression. - - - - - Represents parsed list initializer node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Creates new instance of the list defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents local function node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Evaluates function represented by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Result of the function evaluation. - - - - Represents parsed variable node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns value of the local variable represented by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Sets value of the local variable represented by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - New value for this node. - - - - Represents parsed map entry node. - - Aleksandar Seovic - - - - Creates a new instance of . - - - - - Create a new instance from SerializationInfo - - - - - Creates new instance of the map entry defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed map initializer node in the navigation expression. - - Aleksandar Seovic - - - - Creates a new instance of . - - - - - Create a new instance from SerializationInfo - - - - - Creates new instance of the map defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed method node in the navigation expression. - - Aleksandar Seovic - - - - Static constructor. Initializes a map of special collection processor methods. - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns node's value for the given context. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Gets the best method given the name, argument values, for a given type. - - The type on which to search for the method. - Name of the method. - The binding flags. - The arg values. - Best matching method or null if none found. - - - - Represents parsed named argument node in the expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns the value of the named argument defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed null literal node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the null literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents arithmetic addition operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the arithmetic addition operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents AND operator (both, bitwise and logical). - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical AND operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical BETWEEN operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical IN operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - - true if the left operand is contained within the right operand, false otherwise. - - - - - Represents arithmetic division operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the arithmetic division operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical equality operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical equality operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical "greater than" operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical "greater than" operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical "greater than or equal" operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical "greater than or equal" operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical IN operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical IN operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - - true if the left operand is contained within the right operand, false otherwise. - - - - - Represents logical IS operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical IS operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - - true if the left operand is contained within the right operand, false otherwise. - - - - - Represents logical "less than" operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical "less than" operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical "less than or equal" operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical "less than or equal" operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents VB-style logical LIKE operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical LIKE operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - - true if the left operand matches the right operand, false otherwise. - - - - - Represents logical MATCHES operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical MATCHES operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - - true if the left operand matches the right operand, false otherwise. - - - - - Represents arithmetic modulus operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the arithmetic modulus operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents arithmetic multiplication operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the arithmetic multiplication operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents NOT operator (both, bitwise and logical). - - Aleksandar Seovic - - - - Base class for unary operators. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Gets the operand. - - The operand. - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical NOT operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents logical inequality operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical inequality operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents OR operator (both, bitwise and logical). - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical OR operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents arithmetic exponent operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the arithmetic exponent operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents arithmetic subtraction operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the arithmetic subtraction operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents unary minus operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the unary plus operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents unary plus operator. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the unary plus operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - - Erich Eichinger - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the logical AND operator node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed projection node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a containing results of evaluation - of projection expression against each node in the context. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents node that navigates to object's property or public field. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Initializes the node. - - The parent. - - - - Attempts to resolve property or field. - - - Type to search for a property or a field. - - - Property or field name. - - - Binding flags to use. - - - Resolved property or field accessor, or null - if specified cannot be resolved. - - - - - Returns node's value for the given context. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Sets node's value for the given context. - - Context to evaluate expressions against. - Current expression evaluation context. - New value for this node. - - - - Retrieves property or field value. - - Context to evaluate expressions against. - Current expression evaluation context. - Property or field value. - - - - Sets property value, doing any type conversions that are necessary along the way. - - Context to evaluate expressions against. - Current expression evaluation context. - New value for this node. - - - - Sets property or field value using either dynamic or standard reflection. - - Object to evaluate node against. - New value for this node, converted to appropriate type. - - - - In the case of read only collections or custom collections that are not assignable from - IList, try to add to the collection. - - Context to evaluate expressions against. - Current expression evaluation context. - New value for this node. - true if was able add to IList, IDictionary, or ISet - - - - Utility method that is needed by ObjectWrapper and AbstractAutowireCapableObjectFactory. - We try as hard as we can, but there are instances when we won't be able to obtain PropertyInfo... - - Context to resolve property against. - PropertyInfo for this node. - - - - Gets a value indicating whether this node represents a property. - - - true if this node is a property; otherwise, false. - - - - - Gets a value indicating whether this node represents a field. - - - true if this node is a field; otherwise, false. - - - - - Represents parsed named argument node in the expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns the value of the named argument defined by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Overrides getText to allow easy way to get fully - qualified identifier. - - - Fully qualified identifier as a string. - - - - - Represents parsed real literal node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the real literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents a reference to a Spring-managed object. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the integer literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed selection node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns the first context item that matches selection expression. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed selection node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns the last context item that matches selection expression. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed selection node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a containing results of evaluation - of selection expression against each node in the context. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed string literal node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the string literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Exception thrown when detecting invalid SpEL syntax - - Erich Eichinger - - - - TODO - - - - - TODO - - - - - - - - - - - - - - - - - - - - Gets a message that provides details on the syntax error. - - - - - The expression that caused the error - - - - - Represents ternary expression node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns a value for the string literal node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Represents parsed type node in the navigation expression. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns node's value for the given context. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Overrides getText to allow easy way to get fully - qualified typename. - - - Fully qualified typename as a string. - - - - - Represents parsed variable node. - - Aleksandar Seovic - - - - Create a new instance - - - - - Create a new instance from SerializationInfo - - - - - Returns value of the variable represented by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - Node's value. - - - - Sets value of the variable represented by this node. - - Context to evaluate expressions against. - Current expression evaluation context. - New value for this node. - - - - Implementation of that can be used to - format and parse boolean values. - - Erich Eichinger - - - - Interface that should be implemented by all formatters. - - - - Formatters assume that source value is a string, and make no assumptions - about the target value's type, which means that Parse method can return - object of any type. - - - Aleksandar Seovic - - - - Formats the specified value. - - The value to format. - Formatted . - - - - Parses the specified value. - - The value to parse. - Parsed . - - - - Initializes a new instance of the class - using default values - - - - - Initializes a new instance of the class - - - - - Formats the specified boolean value. - - The value to format. - Formatted boolean value. - If is null. - If is not of type . - - - - Parses the specified boolean value according to settings of and - - The boolean value to parse. - Parsed boolean value as a . - If does not match or . - - - - Set/Get value to control casesensitivity of - - - Defaults to true - - - - - Set/Get value to recognize as boolean "true" value - - - Defaults to - - - - - Set/Get value to recognize as boolean "false" value - - - Defaults to - - - - - Implementation of that can be used to - format and parse currency values. - - - - CurrencyFormatter uses currency related properties of the - to format and parse currency values. - - - If you use one of the constructors that accept culture as a parameter - to create an instance of CurrencyFormatter, default NumberFormatInfo - for the specified culture will be used. - - - You can also use properties exposed by the CurrencyFormatter in order - to override some of the default currency formatting parameters. - - - Aleksandar Seovic - - - - Initializes a new instance of the class - using default for the current thread's culture. - - - - - Initializes a new instance of the class - using default for the specified culture. - - The culture name. - - - - Initializes a new instance of the class - using default for the specified culture. - - The culture. - - - - Initializes a new instance of the class - using specified . - - - The instance that defines how - currency values are formatted. - - - - - Formats the specified currency value. - - The value to format. - Formatted currency . - If is null. - If is not a number. - - - - Parses the specified currency value. - - The currency value to parse. - Parsed currency value as a . - - - - Gets or sets the currency decimal digits. - - The currency decimal digits. - - - - - Gets or sets the currency decimal separator. - - The currency decimal separator. - - - - - Gets or sets the currency group sizes. - - The currency group sizes. - - - - - Gets or sets the currency group separator. - - The currency group separator. - - - - - Gets or sets the currency symbol. - - The currency symbol. - - - - - Gets or sets the currency negative pattern. - - The currency negative pattern. - - - - - Gets or sets the currency positive pattern. - - The currency positive pattern. - - - - - Implementation of that can be used to - format and parse values. - - - - DateTimeFormatter uses properties of the - to format and parse values. - - - If you use one of the constructors that accept culture as a parameter - to create an instance of DateTimeFormatter, default DateTimeFormatInfo - for the specified culture will be used. - - - You can also use properties exposed by the DateTimeFormatter in order - to override some of the default formatting parameters. - - - Aleksandar Seovic - - - - Initializes a new instance of the class - using default for the current thread's culture. - - Date/time format string. - - - - Initializes a new instance of the class - using default for the specified culture. - - Date/time format string. - The culture name. - - - - Initializes a new instance of the class - using default for the specified culture. - - Date/time format string. - The culture. - - - - Formats the specified value. - - The value to format. - Formatted value. - If is null. - If is not an instance of . - - - - Parses the specified value. - - The string to parse. - Parsed value. - - - - Provides base functionality for filtering values before they actually get parsed/formatted. - - Erich Eichinger - - - - Creates a new instance of this FilteringFormatter. - - an optional underlying formatter - - If no underlying formatter is specified, the values - get passed through "as-is" after being filtered - - - - - Parses the specified value. - - The value to parse. - Parsed . - - - - Formats the specified value. - - The value to format. - Formatted . - - - - Allows to rewrite a value before it gets parsed by the underlying formatter - - - - - Allows to change a value before it gets formatted by the underlying formatter - - - - - Implementation of that can be used to - format and parse floating point numbers. - - - - This formatter allows you to format and parse numbers that conform - to number style (leading and trailing - white space, leading sign, decimal point, exponent). - - - Aleksandar Seovic - - - - Default format string. - - - - - Initializes a new instance of the class, - using default format string of '{0:F}' and current thread's culture. - - - - - Initializes a new instance of the class, - using specified format string and current thread's culture. - - The format string. - - - - Initializes a new instance of the class, - using default format string of '{0:F}' and specified culture. - - The culture. - - - - Initializes a new instance of the class, - using specified format string and current thread's culture. - - The format string. - The culture name. - - - - Initializes a new instance of the class, - using specified format string and culture. - - The format string. - The culture. - - - - Formats the specified float value. - - The value to format. - Formatted floating point number. - If is null. - If is not a number. - - - - Parses the specified float value. - - The float value to parse. - Parsed float value as a . - - - - Replaces input strings with a given default value, - if they are null or contain whitespaces only, - - Erich Eichinger - - - - Creates a new instance of this HasTextFilteringFormatter using null as default value. - - an optional underlying formatter - - If no underlying formatter is specified, the values - get passed through "as-is" after being filtered - - - - - Creates a new instance of this HasTextFilteringFormatter. - - the default value to be returned, if input text doesn't contain text - an optional underlying formatter - - If no underlying formatter is specified, the values - get passed through "as-is" after being filtered - - - - - If value contains no text, it will be replaced by a defaultValue. - - - - - Implementation of that can be used to - format and parse integer numbers. - - - - This formatter allows you to format and parse numbers that conform - to number style (leading and trailing - white space, leading sign). - - - Aleksandar Seovic - - - - Initializes a new instance of the class, - using default format string of '{0:D}'. - - - - - Initializes a new instance of the class, - using specified format string. - - - - - Formats the specified integer value. - - The value to format. - Formatted integer number. - If is null. - If is not an integer number. - - - - Parses the specified integer value. - - The integer value to parse. - Parsed number value as a . - - - - Implementation of that simply calls . - - - This formatter is a no-operation implementation. - - Erich Eichinger - - - - Initializes a new instance of the class. - - - - - Converts the passed value to a string by calling . - - The value to convert. - to string converted value. - - - - Returns the passed string "as is". - - The value to return. - The value passed into this method. - - - - Implementation of that can be used to - format and parse numbers. - - - - NumberFormatter uses number-related properties of the - to format and parse numbers. - - - This formatter works with both integer and decimal numbers and allows - you to format and parse numbers that conform to - number style (leading and trailing white space and/or sign, thousands separator, - decimal point) - - - If you use one of the constructors that accept culture as a parameter - to create an instance of NumberFormatter, default NumberFormatInfo - for the specified culture will be used. - - - You can also use properties exposed by the NumberFormatter in order - to override some of the default number formatting parameters. - - - Aleksandar Seovic - - - - Initializes a new instance of the class - using default for the current thread's culture. - - - - - Initializes a new instance of the class - using default for the specified culture. - - The culture name. - - - - Initializes a new instance of the class - using default for the specified culture. - - The culture. - - - - Initializes a new instance of the class - using specified . - - - The instance that defines how - numbers are formatted and parsed. - - - - - Formats the specified number value. - - The value to format. - Formatted number . - If is null. - If is not a number. - - - - Parses the specified number value. - - The number value to parse. - Parsed number value as a . - - - - Gets or sets the number of decimal digits. - - The number of decimal digits. - - - - - Gets or sets the decimal separator. - - The decimal separator. - - - - - Gets or sets the number group sizes. - - The number group sizes. - - - - - Gets or sets the number group separator. - - The number group separator. - - - - - Gets or sets the negative pattern. - - The number negative pattern. - - - - - Implementation of that can be used to - format and parse numbers. - - - - PercentFormatter uses percent-related properties of the - to format and parse percentages. - - - If you use one of the constructors that accept culture as a parameter - to create an instance of PercentFormatter, default NumberFormatInfo - for the specified culture will be used. - - - You can also use properties exposed by the PercentFormatter in order - to override some of the default number formatting parameters. - - - Aleksandar Seovic - - - - Initializes a new instance of the class - using default for the current thread's culture. - - - - - Initializes a new instance of the class - using default for the specified culture. - - The culture name. - - - - Initializes a new instance of the class - using default for the specified culture. - - The culture. - - - - Initializes a new instance of the class - using specified . - - - The instance that defines how - numbers are formatted and parsed. - - - - - Formats the specified percentage value. - - The value to format. - Formatted percentage. - If is null. - If is not a number. - - - - Parses the specified percentage value. - - The percentage value to parse. - Parsed percentage value as a . - - - - Gets or sets the number of decimal digits. - - The number of decimal digits. - - - - - Gets or sets the decimal separator. - - The decimal separator. - - - - - Gets or sets the percent group sizes. - - The percent group sizes. - - - - - Gets or sets the percent group separator. - - The percent group separator. - - - - - Gets or sets the negative pattern. - - The percent negative pattern. - - - - - Gets or sets the positive pattern. - - The percent positive pattern. - - - - - Gets or sets the percent symbol. - - The percent symbol. - - - - - Gets or sets the per mille symbol. - - The per mille symbol. - - - - - Loads a list of resources that should be applied from the .NET . - - -

- This implementation will iterate over all resource managers - within the message source and return a list of all the resources whose name starts with '$this'. -

-

- All other resources will be ignored, but you can retrieve them by calling one of - GetMessage methods on the message source directly. -

-
- Aleksandar Seovic -
- - - Abstract base class that all localizers should extend - - -

- This class contains the bulk of the localizer logic, including implementation - of the ApplyResources methods that are defined in - interface. -

-

- All specific localizers need to do is inherit this class and implement - GetResources method that will return a list of - objects that should be applied to a specified target. -

-

- Custom implementations can use whatever type of resource storage they want, - such as standard .NET resource sets, custom XML files, database, etc. -

-
- Aleksandar Seovic -
- - - Defines an interface that localizers have to implement. - - -

- Localizers are used to automatically apply resources to object's members - using reflection. -

-
- Aleksandar Seovic -
- - - Applies resources of the specified culture to the specified target object. - - Target object to apply resources to. - instance to retrieve resources from. - Resource culture to use for resource lookup. - - - - Applies resources to the specified target object, using current thread's culture to resolve resources. - - Target object to apply resources to. - instance to retrieve resources from. - - - - Gets or sets the resource cache instance. - - The resource cache instance. - - - - Applies resources of the specified culture to the specified target object. - - Target object to apply resources to. - instance to retrieve resources from. - Resource culture to use for resource lookup. - - - - Applies resources to the specified target object, using current thread's uiCulture to resolve resources. - - Target object to apply resources to. - instance to retrieve resources from. - - - - Returns a list of instances that should be applied to the target. - - Target to get a list of resources for. - instance to retrieve resources from. - Resource locale. - A list of resources to apply. - - - - Loads resources from the storage and creates a list of instances that should be applied to the target. - - Target to get a list of resources for. - instance to retrieve resources from. - Resource locale. - A list of resources to apply. - - - - Gets or sets the resource cache instance. - - The resource cache instance. - - - - Loads resources from the storage and creates a list of instances that should be applied to the target. - - - This feature is not currently supported on version 1.0 of the .NET platform. - - Target to get a list of resources for. - instance to retrieve resources from. - Resource locale. - A list of resources to apply. - - - - implementation - that simply returns the - value of the - - property (if said property value is not ), or the - of the current thread if it is - . - - Aleksandar Seovic - - - - Strategy interface for - resolution. - - Aleksandar Seovic - - - - Resolves the - from some context. - - -

- The 'context' is determined by the appropriate implementation class. - An example of such a context might be a thread local bound - , or a - sourced from an HTTP - session. -

-
- - The that should be used - by the caller. - -
- - - Sets the . - - -

- This is an optional operation and does not need to be implemented - such that it actually does anything useful (i.e. it can be a no-op). -

-
- - The new or - to clear the current . - -
- - - Returns the default . - - -

- It tries to get the - from the value of the - - property and falls back to the of the - current thread if the - - is . -

-
- - The default - -
- - - Resolves the - from some context. - - -

- The 'context' in this implementation is the - value of the - - property (if said property value is not ), or the - of the current thread if it is - . -

-
- - The that should be used - by the caller. - -
- - - Sets the . - - - The new or - to clear the current . - - - - - - - The default . - - - The default . - - - - - Abstract base class that all resource cache implementations should extend. - - Aleksandar Seovic - - - - Defines an interface that resource cache adapters have to implement. - - Aleksandar Seovic - - - - Gets the list of resources from cache. - - Target to get a list of resources for. - Resource culture. - A list of cached resources for the specified target object and culture. - - - - Puts the list of resources in the cache. - - Target to cache a list of resources for. - Resource culture. - A list of resources to cache. - A list of cached resources for the specified target object and culture. - - - - Gets the list of resources from the cache. - - Target to get a list of resources for. - Resource culture. - A list of cached resources for the specified target object and culture. - - - - Puts the list of resources in the cache. - - Target to cache a list of resources for. - Resource culture. - A list of resources to cache. - A list of cached resources for the specified target object and culture. - - - - Crates resource cache key for the specified target object and culture. - - Target object to apply resources to. - Resource culture to use for resource lookup. - - - - Gets the list of resources from cache. - - Cache key to use for lookup. - A list of cached resources for the specified target object and culture. - - - - Puts the list of resources in the cache. - - Cache key to use for the specified resources. - A list of resources to cache. - A list of cached resources for the specified target object and culture. - - - - Resource cache implementation that doesn't cache resources. - - Aleksandar Seovic - - - - Gets the list of resources from cache. - - Cache key to use for lookup. - Always returns null. - - - - Puts the list of resources in the cache. - - Cache key to use for the specified resources. - A list of resources to cache. - - - - Holds mapping between control property and it's value - as read from the resource file. - - Aleksandar Seovic - - - - Creates instance of resource mapper. - - Target property. - Resource value. - - - - Gets parsed target property expression. See - for more information on object navigation expressions. - - - - - Value of the resource that target property should be set to. - - - - - Utility class to aid in the manipulation of events and delegates. - - Griffin Caprio - - - - Returns a new instance of the requested . - - -

- Often used to wire subscribers to event publishers. -

-
- - The of delegate to create. - - - The target subscriber object that contains the delegate implementation. - - - referencing the delegate method on the subscriber. - - - A delegate handler that can be added to an events list of handlers, or called directly. - -
- - - Queries the input type for a signature matching the input - signature. - - - Typically used to query a potential subscriber to see if they implement an event handler. - - to match against - to query - - matching input - signature, or if there is no match. - - - - - Creates a new instance of the EventManipulationUtilities class. - - -

- This is a utility class, and as such has no publicly visible constructors. -

-
-
- - - Default implementation of the - interface. - - Griffin Caprio - - - - Creates a new instance of the EventRegistry class. - - - - - Adds the input object to the list of publishers. - - - This publishes all events of the source object to any object - wishing to subscribe - - The source object to publish. - - - - Subscribes to all events published, if the subscriber implements - compatible handler methods. - - The subscriber to use. - - - - Subscribes to published events of all objects of a given type, if the - subscriber implements compatible handler methods. - - The subscriber to use. - - The target to subscribe to. - - - - - Unsubscribes to all events published, if the subscriber - implmenets compatible handler methods. - - The subscriber to use - - - - Unsubscribes to the published events of all objects of a given - , if the subscriber implements - compatible handler methods. - - The subscriber to use. - The target to unsubscribe from - - - - The list of event publishers. - - The list of event publishers. - - - - To be implemented by any object that wishes to receive a reference to - an . - - -

- This interface only applies to objects that have been instantiated - within the context of an - . This interface does - not typically need to be implemented by application code, but is rather - used by classes internal to Spring.NET. -

-
- Mark Pollack - Rick Evans -
- - - Set the - associated with the - that created this - object. - - -

- This property will be set by the relevant - after all of this - object's dependencies have been resolved. This object can use the - supplied - immediately to publish or subscribe to one or more events. -

-
-
- - - Marks a property as being 'required': that is, the setter property - must be configured to be dependency-injected with a value. - - Consult the SDK documentation for , - which, by default, checks for the presence of this annotation. - - Rob Harrop - Mark Pollack - - - - A implementation that enforces required properties to have been configured. - Required properties are detected through an attribute, by default, Spring's - attribute. - - - The motivation for the existence of this IObjectPostProcessor is to allow - developers to annotate the setter properties of their own classes with an - arbitrary attribute to indicate that the container must check - for the configuration of a dependency injected value. This neatly pushes - responsibility for such checking onto the container (where it arguably belongs), - and obviates the need (in part) for a developer to code a method that - simply checks that all required properties have actually been set. - - Please note that an 'init' method may still need to implemented (and may - still be desirable), because all that this class does is enforce that a - 'required' property has actually been configured with a value. It does - not check anything else... In particular, it does not check that a - configured value is not null. - - - Rob Harrop - Juergen Hoeller - Mark Pollack (.NET) - - - - Adapter that implements all methods on - as no-ops, which will not change normal processing of each object instantiated - by the container. Subclasses may override merely those methods that they are - actually interested in. - - - Note that this base class is only recommendable if you actually require - functionality. If all you need - is plain functionality, prefer a straight - implementation of that (simpler) interface. - - Rod Johnson - Juergen Hoeller - Mark Pollack (.NET) - - - - Extension of the interface, - adding a callback for predicting the eventual type of a processed object. - - This interface is a special purpose interface, mainly for - internal use within the framework. In general, application-provided - post-processors should simply implement the plain - interface or derive from the - class. New methods might be added to this interface even in point releases. - - - Juergen Hoeller - Mark Pollack (.NET) - - - - Subinterface of - - that adds a before-instantiation callback and a callback after instantiation but before - explicit properties are set or autowiring occurs. - - - - Typically used to suppress default instantiation for specific target objects, - for example to create proxies with special Spring.Aop.ITargetSources (pooling targets, - lazily initializing targets, etc), or to implement additional injection strategies such as field - injection. - - - This interface is a special purpose interface, mainly for internal use within the framework. - It is recommended to implement the plain interface as far as - possible, or to derive from in order to be shielded - from extension to this interface. - - - Juergen Hoeller - Rick Evans (.NET) - - - - Apply this - - before the target object gets instantiated. - - -

- The returned object may be a proxy to use instead of the target - object, effectively suppressing the default instantiation of the - target object. -

-

- If the object is returned by this method is not - , the object creation process will be - short-circuited. The returned object will not be processed any - further; in particular, no further - - callbacks will be applied to it. This mechanism is mainly intended - for exposing a proxy instead of an actual target object. -

-

- This callback will only be applied to object definitions with an - object class. In particular, it will not be applied to - objects with a "factory-method" (i.e. objects that are to be - instantiated via a layer of indirection anyway). -

-
- - The of the target object that is to be - instantiated. - - - The name of the target object. - - - The object to expose instead of a default instance of the target - object. - - - In the case of any errors. - - - -
- - - Perform operations after the object has been instantiated, via a constructor or factory method, - but before Spring property population (from explicit properties or autowiring) occurs. - - The object instance created, but whose properties have not yet been set - Name of the object. - true if properties should be set on the object; false if property population - should be skipped. Normal implementations should return true. Returning false will also - prevent any subsequent InstantiationAwareObjectPostProcessor instances from being - invoked on this object instance. - - - - Post-process the given property values before the factory applies them - to the given object. - - Allows for checking whether all dependencies have been - satisfied, for example based on a "Required" annotation on bean property setters. - Also allows for replacing the property values to apply, typically through - creating a new MutablePropertyValues instance based on the original PropertyValues, - adding or removing specific values. - - - The property values that the factory is about to apply (never null). - he relevant property infos for the target object (with ignored - dependency types - which the factory handles specifically - already filtered out) - The object instance created, but whose properties have not yet - been set. - Name of the object. - The actual property values to apply to the given object (can be the - passed-in PropertyValues instances0 or null to skip property population. - - - - Predicts the type of the object to be eventually returned from this - processors callback. - - The raw Type of the object. - Name of the object. - The type of the object, or null if not predictable. - in case of errors - - - - Determines the candidate constructors to use for the given object. - - The raw Type of the object. - Name of the object. - The candidate constructors, or null if none specified - in case of errors - - - - Predicts the type of the object to be eventually returned from this - processors PostProcessBeforeInstantiation callback. - - The raw Type of the object. - Name of the object. - The type of the object, or null if not predictable. - in case of errors - - - - Determines the candidate constructors to use for the given object. - - The raw Type of the object. - Name of the object. - The candidate constructors, or null if none specified - in case of errors - - - - Apply this - - before the target object gets instantiated. - - -

- The returned object may be a proxy to use instead of the target - object, effectively suppressing the default instantiation of the - target object. -

-

- If the object is returned by this method is not - , the object creation process will be - short-circuited. The returned object will not be processed any - further; in particular, no further - - callbacks will be applied to it. This mechanism is mainly intended - for exposing a proxy instead of an actual target object. -

-

- This callback will only be applied to object definitions with an - object class. In particular, it will not be applied to - objects with a "factory-method" (i.e. objects that are to be - instantiated via a layer of indirection anyway). -

-
- - The of the target object that is to be - instantiated. - - - The name of the target object. - - - The object to expose instead of a default instance of the target - object. - - - In the case of any errors. - - - -
- - - Perform operations after the object has been instantiated, via a constructor or factory method, - but before Spring property population (from explicit properties or autowiring) occurs. - - The object instance created, but whose properties have not yet been set - Name of the object. - true if properties should be set on the object; false if property population - should be skipped. Normal implementations should return true. Returning false will also - prevent any subsequent InstantiationAwareObjectPostProcessor instances from being - invoked on this object instance. - - - - Post-process the given property values before the factory applies them - to the given object. - - Allows for checking whether all dependencies have been - satisfied, for example based on a "Required" annotation on bean property setters. - Also allows for replacing the property values to apply, typically through - creating a new MutablePropertyValues instance based on the original PropertyValues, - adding or removing specific values. - - - The property values that the factory is about to apply (never null). - he relevant property infos for the target object (with ignored - dependency types - which the factory handles specifically - already filtered out) - The object instance created, but whose properties have not yet - been set. - Name of the object. - The actual property values to apply to the given object (can be the - passed-in PropertyValues instances0 or null to skip property population. - - - - Apply this - to the given new object instance before any object initialization callbacks. - - -

- The object will already be populated with property values. - The returned object instance may be a wrapper around the original. -

-
- - The new object instance. - - - The name of the object. - - - The object instance to use, either the original or a wrapped one. - - - In case of errors. - -
- - - Apply this to the - given new object instance after any object initialization callbacks. - - -

- The object will already be populated with property values. The returned object - instance may be a wrapper around the original. -

-
- - The new object instance. - - - The name of the object. - - - The object instance to use, either the original or a wrapped one. - - - In case of errors. - -
- - - Cache for validated object names, skipping re-validation for the same object - - - - - Post-process the given property values before the factory applies them - to the given object. Checks for the attribute specified by this PostProcessor's RequiredAttributeType. - - The property values that the factory is about to apply (never null). - The relevant property infos for the target object (with ignored - dependency types - which the factory handles specifically - already filtered out) - The object instance created, but whose properties have not yet - been set. - Name of the object. - - The actual property values to apply to the given object (can be the - passed-in PropertyValues instances or null to skip property population. - - If a required property value has not been specified - in the configuration metadata. - - - - Determines whether the supplied property is required to have a value, that is to be dependency injected. - - - This implementation looks for the existence of a "required" attribute on the supplied PropertyInfo and that - the property has a setter method. - - The target PropertyInfo - - true if the supplied property has been marked as being required;; otherwise, false if - not or if the supplied property does not have a setter method - - - - - Builds an exception message for the given list of invalid properties. - - The list of names of invalid properties. - Name of the object. - The exception message - - - - Sets the type of the required attribute, to be used on a property setter - - - The default required attribute type is the Spring-provided attribute. - This setter property exists so that developers can provide their own - (non-Spring-specific) annotation type to indicate that a property value is required. - - The type of the required attribute. - - - - Base class that provides common functionality needed for several IObjectFactoryPostProcessor - implementations - - Mark Pollack - - - - Allows for custom modification of an application context's object - definitions, adapting the object property values of the context's - underlying object factory. - - -

- Application contexts can auto-detect - IObjectFactoryPostProcessor objects in their object definitions and - apply them before any other objects get created. -

-

- Useful for custom config files targeted at system administrators that - override object properties configured in the application context. -

-

- See PropertyResourceConfigurer and its concrete implementations for - out-of-the-box solutions that address such configuration needs. -

-
- Juergen Hoeller - Rick Evans (.Net) -
- - - Modify the application context's internal object factory after its - standard initialization. - - -

- All object definitions will have been loaded, but no objects will have - been instantiated yet. This allows for overriding or adding properties - even to eager-initializing objects. -

-
- - The object factory used by the application context. - - - In case of errors. - -
- - - Modify the application context's internal object factory after its - standard initialization. - - The object factory used by the application context. - -

- All object definitions will have been loaded, but no objects will have - been instantiated yet. This allows for overriding or adding properties - even to eager-initializing objects. -

-
- - In case of errors. - -
- - - Resolves the supplied into a - instance. - - The object that is to be resolved into a - instance. - The error context source. - The error context string. - A resolved . - -

- This (default) implementation supports resolving - s and s. - Only override this method if you want to key your type alias - on something other than s - and s. -

-
- - If the supplied is , - or the supplied cannot be resolved. - -
- - - Return the order value of this object, with a higher value meaning - greater in terms of sorting. - - The order value. - - - - - Simple template superclass for - implementations that allows for the creation of a singleton or a prototype - instance (depending on a flag). - - - If the value of the - - property is (this is the default), this class - will create a single instance of it's object upon initialization and - subsequently return the singleton instance; else, this class will - create a new instance each time (prototype mode). Subclasses must - implement the - - template method to actually create objects. - - Juergen Hoeller - Keith Donald - Simon White (.NET) - - - - Interface to be implemented by objects used within an - that are themselves - factories. - - -

- If an object implements this interface, it is used as a factory, - not directly as an object. s - can support singletons and prototypes - ()... - please note that an - itself can only ever be a singleton. It is a logic error to configure an - itself to be a prototype. -

- - An object that implements this interface cannot be used as a normal object. - -
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - - - If this method is being called in the context of an enclosing IoC container and - returns , the IoC container will consider this factory - object as not being fully initialized and throw a corresponding (and most - probably fatal) exception. - - - - An instance (possibly shared or independent) of the object managed by - this factory. - - - - - Return the of object that this - creates, or - if not known in advance. - - - - - Is the object managed by this factory a singleton or a prototype? - - - - - Invoked by an - after it has injected all of an object's dependencies. - - - In the event of misconfiguration (such as the failure to set a - required property) or if initialization fails. - - - - - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - - An instance (possibly shared or independent) of the object managed by - this factory. - - - - - - Template method that subclasses must override to construct - the object returned by this factory. - - - Invoked once immediately after the initialization of this - in the case of - a singleton; else, on each call to the - - method. - - - If an exception occured during object creation. - - - A distinct instance of the object created by this factory. - - - - - Performs cleanup on any cached singleton object. - - -

- Only makes sense in the context of a singleton object. -

-
- - -
- - - Is the object managed by this factory a singleton or a prototype? - - -

- Please note that changing the value of this property after - this factory object instance has been created by an enclosing - Spring.NET IoC container really is a programming error. This - property should really only be set once, prior to the invocation - of the - - callback method. -

-
- -
- - - Return the of object that this - creates, or - if not known in advance. - - - - - - The various autowiring modes. - - Rick Evans - - - - Do not autowire. - - - - - Autowire by name. - - - - - Autowire by . - - - - - Autowiring by constructor. - - - - - The autowiring strategy is to be determined by introspection - of the object's . - - - - - Implementation of that - resolves variable name against command line arguments. - - Aleksandar Seovic - - - - Defines contract that different variable sources have to implement. - - -

- The "variable sources" are objects containing name-value pairs - that allow a variable value to be retrieved for the given name.

-

- Out of the box, Spring.NET supports a number of variable sources, - that allow users to obtain variable values from .NET config files, - Java-style property files, environment, registry, etc.

-

- Users can always write their own variable sources implementations, - that will allow them to load variable values from the database or - other proprietary data source.

-
- - - - - - - Aleksandar Seovic -
- - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Default constructor. - Initializes command line arguments from the environment. - - - - - Constructor that allows arguments to be passed externally. - Useful for testing. - - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Initializes command line arguments dictionary. - - - - - Gets or sets a prefix that should be used to - identify arguments to extract values from. - - - A prefix that should be used to identify arguments - to extract values from. Defaults to slash ("/"). - - - - - Gets or sets a character that should be used to - separate argument name from its value. - - - A character that should be used to separate argument - name from its value. Defaults to colon (":"). - - - - - Implementation of that - resolves variable name against name-value sections in - the standard .NET configuration file. - - Aleksandar Seovic - - - - Initializes a new instance of - - - - - Initializes a new instance of from the given - - - - - Initializes a new instance of from the given - - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Initializes properties based on the specified - property file locations. - - - - - Gets or sets a list of section names variables should be loaded from. - - - All sections specified need to be handled by the - in order to be processed successfully. - - - A list of section names variables should be loaded from. - - - - - Convinience property. Gets or sets a single section - to read properties from. - - - The section specified needs to be handled by the - in order to be processed successfully. - - - A section to read properties from. - - - - - Various utility methods for .NET style .config files. - - -

- Currently supports reading custom configuration sections and returning them as - objects. -

-
- Simon White - Mark Pollack -
- - - Initializes the type members - - - - - Reads the specified configuration section into a - . - - The resource to read. - The section name. - - A newly populated - . - - - If any errors are encountered while attempting to open a stream - from the supplied . - - - If any errors are encountered while loading or reading (this only applies to - v1.1 and greater of the .NET Framework) the actual XML. - - - If any errors are encountered while loading or reading (this only applies to - v1.0 of the .NET Framework). - - - If the configuration section was otherwise invalid. - - - - - Reads the specified configuration section into the supplied - . - - The resource to read. - The section name. - - The collection that is to be populated. May be - . - - - A newly populated - . - - - If any errors are encountered while attempting to open a stream - from the supplied . - - - If any errors are encountered while loading or reading (this only applies to - v1.1 and greater of the .NET Framework) the actual XML. - - - If any errors are encountered while loading or reading (this only applies to - v1.0 of the .NET Framework). - - - If the configuration section was otherwise invalid. - - - - - Reads the specified configuration section into the supplied - . - - The resource to read. - The section name. - - The collection that is to be populated. May be - . - - - If a key already exists, is its value to be appended to the current - value or replaced? - - - The populated - . - - - If any errors are encountered while attempting to open a stream - from the supplied . - - - If any errors are encountered while loading or reading (this only applies to - v1.1 and greater of the .NET Framework) the actual XML. - - - If any errors are encountered while loading or reading (this only applies to - v1.0 of the .NET Framework). - - - If the configuration section was otherwise invalid. - - - - - Read from the specified configuration from the supplied XML - into a - . - - - - Does not support section grouping. The supplied XML - must already be loaded. - - - - The to read from. - - - The configuration section name to read. - - - A newly populated - . - - - If any errors are encountered while reading (this only applies to - v1.1 and greater of the .NET Framework). - - - If any errors are encountered while reading (this only applies to - v1.0 of the .NET Framework). - - - If the configuration section was otherwise invalid. - - - - - Returns the section from the specified resource with the given section name - - - - - Returns the typed section from the specified resource with the given section name - - - - - Returns the typed result of evaluating the specified . - - if the result's type does not match the expected type - - - - Reads the specified configuration section from the given - - - - - - - - Populates the supplied with values from - a .NET application configuration file. - - - The - to add any key-value pairs to. - - - The configuration section name in the a .NET application configuration - file. - - - If a key already exists, is its value to be appended to the current - value or replaced? - - - if the supplied - was found. - - - - - Creates a new instance of the ConfigurationReader class. - - -

- This is a utility class, and as such has no publicly visible - constructors. -

-
-
- - - Implementation of that - resolves variable name connection strings defined in - the standard .NET configuration file. - - -

- When the <connectionStrings> configuration section is processed by this class, - two variables are defined for each connection string: one for connection string and - the second one for the provider name.

-

- Variable names are generated by appending '.connectionString' and '.providerName' - literals to the value of the name attribute of the connection string element. - For example:

-
-            
-               
-            
-            
-

- will result in two variables being created: myConn.connectionString and myConn.providerName. - You can reference these variables within your object definitions, just like any other variable.

-
- Aleksandar Seovic -
- - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Initializes properties based on the specified - property file locations. - - - - - Holder for constructor argument values for an object. - - -

- Supports values for a specific index or parameter name (case - insensitive) in the constructor argument list, and generic matches by - . -

-
- Juergen Hoeller - Rick Evans (.NET) - -
- - - Can be used as an argument filler for the - - overload when one is not looking for an argument by index. - - - - - Creates a new instance of the - - class. - - - - - Creates a new instance of the - - class. - - - The - to be used to populate this instance. - - - - - Copy all given argument values into this object. - - - The - to be used to populate this instance. - - - - - Add argument value for the given index in the constructor argument list. - - - The index in the constructor argument list. - - - The argument value. - - - - - Add argument value for the given index in the constructor argument list. - - The index in the constructor argument list. - The argument value. - - The of the argument - . - - - - - Add argument value for the given name in the constructor argument list. - - The name in the constructor argument list. - The argument value. - - If the supplied is - or is composed wholly of whitespace. - - - - - Get argument value for the given index in the constructor argument list. - - The index in the constructor argument list. - - The required of the argument. - - - The - - for the argument, or if none set. - - - - - Get argument value for the given name in the constructor argument list. - - The name in the constructor argument list. - - The - - for the argument, or if none set. - - - - - Does this set of constructor arguments contain a named argument matching the - supplied name? - - - - The comparison is performed in a case-insensitive fashion. - - - The named argument to look up. - - if this set of constructor arguments - contains a named argument matching the supplied - name. - - - - - Add generic argument value to be matched by type. - - - The argument value. - - - - - Add generic argument value to be matched by type. - - The argument value. - - The of the argument - . - - - - - Look for a generic argument value that matches the given - . - - - The to match. - - - The - - for the argument, or if none set. - - - - - Look for a generic argument value that matches the given - . - - - The to match. - - - A of - - objects that have already been used in the current resolution - process and should therefore not be returned again; this allows one - to return the next generic argument match in the case of multiple - generic argument values of the same type. - - - The - - for the argument, or if none set. - - - - - Look for an argument value that either corresponds to the given index - in the constructor argument list or generically matches by - . - - - The index in the constructor argument list. - - - The to match. - - - The - - for the argument, or if none is set. - - - - - Look for an argument value that either corresponds to the given index - in the constructor argument list or generically matches by - . - - - The index in the constructor argument list. - - - The to match. - - - A of - - objects that have already been used in the current resolution - process and should therefore not be returned again; this allows one - to return the next generic argument match in the case of multiple - generic argument values of the same type. - - - The - - for the argument, or if none is set. - - - - - Look for an argument value that either corresponds to the given index - in the constructor argument list or generically matches by - . - - - The name of the argument in the constructor argument list. May be - , in which case generic matching by - is assumed. - - - The to match. - - - The - - for the argument, or if none is set. - - - - - Look for an argument value that either corresponds to the given index - in the constructor argument list or generically matches by - . - - - The name of the argument in the constructor argument list. May be - , in which case generic matching by - is assumed. - - - The to match. - - - A of - - objects that have already been used in the current resolution - process and should therefore not be returned again; this allows one - to return the next generic argument match in the case of multiple - generic argument values of the same type. - - - The - - for the argument, or if none is set. - - - - - Look for an argument value that either corresponds to the given index - in the constructor argument list, or to the named argument, or - generically matches by . - - - The index of the argument in the constructor argument list. May be - negative, to denote the fact that we are not looking for an - argument by index (see - . - - - The name of the argument in the constructor argument list. May be - . - - - The to match. - - - A of - - objects that have already been used in the current resolution - process and should therefore not be returned again; this allows one - to return the next generic argument match in the case of multiple - generic argument values of the same type. - - - The - - for the argument, or if none is set. - - - - - Return the map of indexed argument values. - - - An with - indices as keys and - s - as values. - - - - - Return the map of named argument values. - - - An with - named arguments as keys and - s - as values. - - - - - Return the set of generic argument values. - - - A of - s. - - - - - Return the number of arguments held in this instance. - - - - - Returns true if this holder does not contain any argument values, - neither indexed ones nor generic ones. - - - - - Holder for a constructor argument value, with an optional - attribute indicating the target - of the actual constructor argument. - - - - - Creates a new instance of the ValueHolder class. - - - The value of the constructor argument. - - - - - Creates a new instance of the ValueHolder class. - - - The value of the constructor argument. - - - The of the argument - . Can also be one of the common - aliases (int, bool, - float, etc). - - - - - A that represents the current - . - - - A that represents the current - . - - - - - Gets and sets the value for the constructor argument. - - -

- Only necessary for manipulating a registered value, for example in - s. -

-
-
- - - Return the of the constructor - argument. - - - - - - implementation that allows for convenient registration of custom - s. - - - - The use of this class is typically not required; the .NET - mechanism of associating a - with a - via the use of the - is the - recommended (and standard) way. This class primarily exists to cover - those cases where third party classes to which one does not have the - source need to be exposed to the type conversion mechanism. - -

- Because the - - class implements the - - interface, instances of this class that have been exposed in the - scope of an - will - automatically be picked up by the application context and made - available to the IoC container whenever type conversion is required. If - one is using a - - object definition within the scope of an - , no such automatic - pickup of the - - is performed (custom converters will have to be added manually using the - - method). For most application scenarios, one will get better - mileage using the - abstraction. -

-
- -

- The following examples all assume XML based configuration, and use - inner object definitions to define the custom - objects (nominally to - avoid polluting the object name space, but also because the - configuration simply reads better that way). -

- - - - - - - - - - - - - - - - -

- The following example illustrates a complete (albeit naieve) use case - for this class, including a custom - implementation, said - converters domain class, and the XML configuration that hooks the - converter in place and makes it available to a Spring.NET container for - use during object resolution. -

-

- The domain class is a simple data-only object that contains the data - required to send an email message (such as the host and user account - name). A developer would prefer to use a string of the form - UserName=administrator,Password=r1l0k1l3y,Host=localhost to - configure the mail settings and just let the container take care of the - conversion. -

- - namespace ExampleNamespace - { - public sealed class MailSettings - { - private string _userName; - private string _password; - private string _host; - - public string Host - { - get { return _host; } - set { _host = value; } - } - - public string UserName - { - get { return _userName; } - set { _userName = value; } - } - - public string Password - { - get { return _password; } - set { _password = value; } - } - } - - public sealed class MailSettingsConverter : TypeConverter - { - public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) - { - if (typeof (string) == sourceType) - { - return true; - } - return base.CanConvertFrom(context, sourceType); - } - - public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) - { - string text = value as string; - if(text != null) - { - MailSettings mailSettings = new MailSettings(); - string[] tokens = text.Split(','); - for (int i = 0; i < tokens.Length; ++i) - { - string token = tokens[i]; - string[] settings = token.Split('='); - typeof(MailSettings).GetProperty(settings[0]) - .SetValue(mailSettings, settings[1], null); - } - return mailSettings; - } - return base.ConvertFrom(context, culture, value); - } - } - - // a very naieve class that uses the MailSettings class... - public sealed class ExceptionLogger - { - private MailSettings _mailSettings; - - public MailSettings MailSettings { - { - set { _mailSettings = value; } - } - - public void Log(object value) - { - Exception ex = value as Exception; - if(ex != null) - { - // use _mailSettings instance... - } - } - } - } - -

- The attendant XML configuration for the above classes would be... -

- - - - - - - - - - - - - - - - Juergen Hoeller - Simon White (.NET) - - - - - - - Registers any custom converters with the supplied - . - - - The object factory to register the converters with. - - - In case of errors. - - - - - Resolves the supplied into a - instance. - - - The object that is to be resolved into a - instance. - - - A resolved instance. - - - If the supplied is , - or the supplied cannot be resolved. - - - - - The custom converters to register. - - -

- The uses the type name - of the class that requires conversion as the key, and an - instance of the - that will effect - the conversion. Alternatively, the actual - of the class that requires conversion - can be used as the key. -

-
- -

- - IDictionary converters = new Hashtable(); - converters.Add( "System.Date", new MyCustomDateConverter() ); - // a System.Type instance can also be used as the key... - converters.Add( typeof(Color), new MyCustomRBGColorConverter() ); - -

-
-
- - - implementation that - creates delegates. - - -

- Supports the creation of s for both - instance and methods. -

-
- Rick Evans -
- - - Callback method called once all factory properties have been set. - - - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - - - - - - Creates the delegate. - - - If an exception occured during object creation. - - The object returned by this factory. - - - - - The of - created by this factory. - - -

- Returns the - if accessed prior to the method - being called. -

-
-
- - - The of the - created by this factory. - - - - - The name of the method that is to be invoked by the created - delegate. - - - - - The target if the - refers to a method. - - - - - The target object if the - refers to an instance method. - - - - - A generic implementation of an , that delegates post processing to a passed delegate - - - This comes in handy when you want to perform specific tasks on an object factory, e.g. doing special initialization. - - - The example below is taken from a unit test. The snippet causes 'someObject' to be registered each time is called on - the context instance: - - IConfigurableApplicationContext ctx = new XmlApplicationContext(false, "name", false, null); - ctx.AddObjectFactoryPostProcessor(new DelegateObjectFactoryConfigurer( of => - { - of.RegisterSingleton("someObject", someObject); - })); - - - Erich Eichinger - - - - Get or Set the handler to delegate configuration to - - - - - Descriptor for a specific dependency that is about to be injected. - Wraps a constructor parameter, a method parameter or a field, - allowing unified access to their metadata. - - Juergen Hoeller - Mark Pollack - - - - Initializes a new instance of the class for a method or constructor parameter. - Considers the dependency as 'eager' - - The MethodParameter to wrap. - if set to true if the dependency is required. - - - - Initializes a new instance of the class for a method or a constructor parameter. - - The MethodParameter to wrap. - if set to true the dependency is required. - if set to true the dependency is 'eager' in the sense of - eagerly resolving potential target objects for type matching. - - - - Gets a value indicating whether this dependency is required. - - true if required; otherwise, false. - - - - Determine the declared (non-generic) type of the wrapped parameter/field. - - The type of the dependency (never null - - - - Gets a value indicating whether this is eager in the sense of - eagerly resolving potential target beans for type matching. - - true if eager; otherwise, false. - - - - Gets the wrapped MethodParameter, if any. - - The method parameter. - - - - Simple factory for shared instances. - - Juergen Hoeller - Simon White (.NET) - - - - Constructs a new instance of the target dictionary. - - The new instance. - - - - Set the source . - - -

- This value will be used to populate the - returned by this factory. -

-
-
- - - Set the of the - implementation to use. - - -

- The default is the . -

-
- - If the value is . - - - If the value is an . - - - If the value is an interface. - -
- - - The of objects created by this factory. - - - Always returns the . - - - - - A very simple, hashtable-based implementation of - - Erich Eichinger - - - - Creates a new, empty variable source - - - - - Creates a new, empty and case-insensitive variable source - - - - - Create a new variable source from a list of paired string values. - - - - The example below shows, how the dictionary is filled with { 'key1', 'value1' }, { 'key2', 'value2' } pairs: - - new DictionaryVariableSource( new string[] { "key1", "value1", "key2", "value2" } ) - - - - the argument list containing pairs, or null - - - - Creates a new variable source, reading values from another dictionary - and converting them to strings if necessary - - - - - Adds a key/value pair - - this dictionary. allows for fluent config - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Performs a variable name lookup - - - - - Specifies how instances of the - - class must apply environment variables when replacing values. - - Mark Pollack - - - - Never replace environment variables. - - - - - If properties are not specified via a resource, - then resolve using environment variables. - - - - - Apply environment variables first before applying properties from a - resource. - - - - - Implementation of that - resolves variable name against environment variables. - - Aleksandar Seovic - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Holder for event handler values for an object. - - Rick Evans (.NET) - - - - The empty array of s. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The - to be used to populate this instance. - - - - - Copy all given argument values into this object. - - - The - to be used to populate this instance. - - - - - Adds the supplied handler to the collection of event handlers. - - The handler to be added. - - - - The mapping of event names to an - of - s. - - - - - Gets the of events - that have handlers associated with them. - - - - - Gets the of - s for the supplied - event name. - - - - - Immutable placeholder class used for the value of a - object when it's a reference - to a Spring that should be evaluated at runtime. - - Aleksandar Seovic - - - - Creates a new instance of the - - class. - - The expression to resolve. - - - - Returns a string representation of this instance. - - A string representation of this instance. - - - - Gets or sets the expression string. Setting the expression string will cause - the expression to be parsed. - - The expression string. - - - - Return the expression. - - - - - Properties for this expression node. - - - - - implementation that - retrieves a static or non-static public field value. - - -

- Typically used for retrieving public constants. -

-
- -

- The following example retrieves the field value... -

- - - - - - -

- The previous example could also have been written using the convenience - - property, like so... -

- - - - - -

- This class also implements the - interface - (). - If the id (or name) of one's - - object definition is set to the - of the field to be retrieved, then the id (or - name) of one's object definition will be used for the name of the - field lookup. See below for an example of this - concise style of definition. -

- - - - - - - -

- The usage for retrieving instance fields is similar. No example is shown - because public instance fields are generally bad practice; but if - you have some legacy code that exposes public instance fields, or if you - just really like coding public instance fields, then you can use this - implementation to - retrieve such field values. -

- - Juergen Hoeller - Rick Evans (.NET) - - - - Interface to be implemented by objects that wish to be aware of their object - name in an . - - -

- Note that most objects will choose to receive references to collaborating - objects via respective properties. -

-

- For a list of all object lifecycle methods, see the - API documentation. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Set the name of the object in the object factory that created this object. - - - The name of the object in the factory. - - -

- Invoked after population of normal object properties but before an init - callback like 's - - method or a custom init-method. -

-
-
- - - Invoked by an - after it has set all object properties supplied - (and satisfied - and ApplicationContextAware). - - -

- This method allows the object instance to perform initialization only - possible when all object properties have been set and to throw an - exception in the event of misconfiguration. -

-
- - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - -
- - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - - An instance (possibly shared or independent) of the object managed by - this factory. - - - - - - The of the - field to be retrieved. - - - - - Set the name of the object in the object factory that created this object. - - - The name of the object in the factory. - - -

- In the context of the - - class, the - - value will be interepreted as the value of the - - property if no value has been explicitly assigned to the - - property. This allows for concise object definitions with just an id or name; - see the class documentation for - - for an example of this style of usage. -

-
-
- - - The name of the field the value of which is to be retrieved. - - -

- If the - - has been set (and is not ), then the value of this property - refers to an instance field name; it otherwise refers to a - field name. -

-
-
- - - The object instance on which the field is defined. - - - - - The on which the field is defined. - - - - - The of object that this - creates, or - if not known in advance. - - - - - Is the object managed by this factory a singleton or a prototype? - - - - - Extension of the - interface to be implemented by object factories that are capable of - autowiring and expose this functionality for existing object instances. - - Juergen Hoeller - Rick Evans (.NET) - - - - Create a new object instance of the given class with the specified - autowire strategy. - - - The of the object to instantiate. - - - The desired autowiring mode. - - - Whether to perform a dependency check for objects (not applicable to - autowiring a constructor, thus ignored there). - - The new object instance. - - If the wiring fails. - - - - - - Autowire the object properties of the given object instance by name or - . - - - The existing object instance. - - - The desired autowiring mode. - - - Whether to perform a dependency check for the object. - - - If the wiring fails. - - - - - - Apply s - to the given existing object instance, invoking their - - methods. - - -

- The returned object instance may be a wrapper around the original. -

-
- - The existing object instance. - - - The name of the object. - - - The object instance to use, either the original or a wrapped one. - - - If any post-processing failed. - - -
- - - Apply s - to the given existing object instance, invoking their - - methods. - - -

- The returned object instance may be a wrapper around the original. -

-
- - The existing object instance. - - - The name of the object. - - - The object instance to use, either the original or a wrapped one. - - - If any post-processing failed. - - -
- - - Resolve the specified dependency against the objects defined in this factory. - - The descriptor for the dependency. - Name of the object which declares the present dependency. - A list that all names of autowired object (used for - resolving the present dependency) are supposed to be added to. - the resolved object, or null if none found - if dependency resolution failed - - - - Extension of the interface - that injects dependencies into the object managed by the factory. - - Bruno Baia - - - - Gets the template object definition that should be used - to configure the instance of the object managed by this factory. - - - - - SPI interface to be implemented by most if not all listable object factories. - - -

- Allows for framework-internal plug'n'play, e.g. in - . -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Configuration interface to be implemented by most if not all object - factories. - - -

- Provides the means to configure an object factory in addition to the - object factory client methods in the - interface. -

-

- Allows for framework-internal plug'n'play even when needing access to object - factory configuration methods. -

-

- When disposed, it will destroy all cached singletons in this factory. Call - when you want to shutdown - the factory. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Interface that defines a registry for shared object instances. - - - Can be implemented by - implementations in order to expose their singleton management facility - in a uniform manner. - - The interface extends this interface. - - - Juergen Hoeller - Mark Pollack (.NET) - - - - Registers the given existing object as singleton in the object registry, - under the given object name. - - - - The given instance is supposed to be fully initialized; the registry - will not perform any initialization callbacks (in particular, it won't - call IInitializingObject's AfterPropertiesSet method). - The given instance will not receive any destruction callbacks - (like IDisposable's Dispose method) either. - - - If running within a full IObjectFactory: Register an object definition - instead of an existing instance if your object is supposed to receive - initialization and/or destruction callbacks. - - - Typically invoked during registry configuration, but can also be used - for runtime registration of singletons. As a consequence, a registry - implementation should synchronize singleton access; it will have to do - this anyway if it supports a BeanFactory's lazy initialization of singletons. - - - Name of the object. - The singleton object. - - - - - - Return the (raw) singleton object registered under the given name. - - - - Only checks already instantiated singletons; does not return an Object - for singleton object definitions which have not been instantiated yet. - - - The main purpose of this method is to access manually registered singletons - . Can also be used to access a singleton - defined by an object definition that already been created, in a raw fashion. - - - Name of the object to look for. - the registered singleton object, or null if none found - - - - - Check if this registry contains a singleton instance with the given name. - - - - Only checks already instantiated singletons; does not return true - for singleton bean definitions which have not been instantiated yet. - - - The main purpose of this method is to check manually registered singletons - . Can also be used to check whether a - singleton defined by an object definition has already been created. - - - To check whether an object factory contains an object definition with a given name, - use ListableBeanFactory's ContainsObjectDefinition. Calling both - ContainsObjectDefinition and ContainsSingleton answers - whether a specific object factory contains an own object with the given name. - - - Use IObjectFactory's ContainsObject for general checks whether the - factory knows about an object with a given name (whether manually registered singleton - instance or created by bean definition), also checking ancestor factories. - - - Name of the object to look for. - - true if this bean factory contains a singleton instance with the given name; otherwise, false. - - - - - - - - Gets the names of singleton objects registered in this registry. - - - - Only checks already instantiated singletons; does not return names - for singleton bean definitions which have not been instantiated yet. - - - The main purpose of this method is to check manually registered singletons - . Can also be used to check which - singletons defined by an object definition have already been created. - - - The list of names as String array (never null). - - - - - - - Gets the number of singleton beans registered in this registry. - - - - Only checks already instantiated singletons; does not count - singleton object definitions which have not been instantiated yet. - - - The main purpose of this method is to check manually registered singletons - . Can also be used to count the number of - singletons defined by an object definition that have already been created. - - - The number of singleton objects. - - - - - - - Ignore the given dependency type for autowiring. - - -

- To be invoked during factory configuration. -

-

- This will typically be used for dependencies that are resolved - in other ways, like - through . -

-
- - The to be ignored. - -
- - - Determines whether the specified object name is currently in creation.. - - Name of the object. - - true if the specified object name is currently in creation; otherwise, false. - - - - - Add a new - that will get applied to objects created by this factory. - - -

- To be invoked during factory configuration. -

-
- - The - to register. - -
- - - Given an object name, create an alias. - - -

- This is typically used to support names that are illegal within - XML ids (which are used for object names). -

-

- Typically invoked during factory configuration, but can also be - used for runtime registration of aliases. Therefore, a factory - implementation should synchronize alias access. -

-
- The name of the object. - - - The alias that will behave the same as the object name. - - - If there is no object with the given name. - - - If the alias is already in use. - -
- - - Register the given custom - for all properties of the given . - - -

- To be invoked during factory configuration. -

-
- - The required of the property. - - - The to register. - -
- - - Set the parent of this object factory. - - -

- Note that the parent shouldn't be changed: it should only be set outside - a constructor if it isn't available when an object of this class is - created. -

-
-
- - - Returns the current number of registered - s. - - - The current number of registered - s. - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - Whether to search parent object factories. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Register a new object definition with this registry. - Must support - - and . - - - The name of the object instance to register. - - - The definition of the object instance to register. - - -

- Must support - and - . -

-
- - If the object definition is invalid. - -
- - - Injects dependencies into the supplied instance - using the supplied . - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - An object definition that should be used to configure object. - - - - - - Ensure that all non-lazy-init singletons are instantiated, also - considering s. - - -

- Typically invoked at the end of factory setup, if desired. -

-

- As this is a startup method, it should destroy already created singletons if - it fails, to avoid dangling resources. In other words, after invocation - of that method, either all or no singletons at all should be - instantiated. -

-
- - If one of the singleton objects could not be created. - -
- - - Register a special dependency type with corresponding autowired value. - - - This is intended for factory/context references that are supposed - to be autowirable but are not defined as objects in the factory: - e.g. a dependency of type ApplicationContext resolved to the - ApplicationContext instance that the object is living in. - - Note there are no such default types registered in a plain IObjectFactory, - not even for the BeanFactory interface itself. - - - Type of the dependency to register. - This will typically be a base interface such as IObjectFactory, with extensions of it resolved - as well if declared as an autowiring dependency (e.g. IListableBeanFactory), - as long as the given value actually implements the extended interface. - - The autowired value. This may also be an - implementation o the interface, - which allows for lazy resolution of the actual target value. - - - - Determines whether the specified object qualifies as an autowire candidate, - to be injected into other beans which declare a dependency of matching type. - This method checks ancestor factories as well. - - Name of the object to check. - The descriptor of the dependency to resolve. - - true if the object should be considered as an autowire candidate; otherwise, false. - - if there is no object with the given name. - - - - May be used to store custom value references in object definition properties. - - - Erich Eichinger - - - - - - the object factory holding the given object definition - - - The name of the object that is having the value of one of its properties resolved. - - - The definition of the named object. - - - The name of the property the value of which is being resolved. - - - The value of the property that is being resolved. - - - - - Subinterface of - that adds - a before-destruction callback. - - - The typical usage will be to invoke custom destruction callbacks on - specific object types, matching corresponding initialization callbacks. - - Juergen Hoeller - Simon White (.NET) - - - - Apply this - to the - given new object instance before its destruction. Can invoke custom - destruction callbacks. - - The new object instance. - The name of the object. - - In case of errors. - - - - - Denotes a special placeholder collection that may contain - s or - other placeholder objects that will need to be resolved. - - -

- 'A special placeholder collection' means that the elements of this - collection can be placeholders for objects that will be resolved later by - a Spring.NET IoC container, i.e. the elements themselves will be - resolved at runtime by the enclosing IoC container. -

-

- The core Spring.NET library already provides three implementations of this interface - straight out of the box; they are... -

- - - - . - - - - - . - - - - - . - - - -

- If you have a custom collection class (i.e. a class that either implements the - directly or derives from a class that does) - that you would like to expose as a special placeholder collection (i.e. one that can - have s as elements - that will be resolved at runtime by an appropriate Spring.NET IoC container, just - implement this interface. -

-
- -

- Lets say one has a Bag class (i.e. a collection that supports bag style semantics). -

- - using System; - - using Spring.Objects.Factory.Support; - - namespace MyNamespace - { - public sealed class Bag : ICollection - { - // ICollection implementation elided for clarity... - - public void Add(object o) - { - // implementation elided for clarity... - } - } - - public class ManagedBag : Bag, IManagedCollection - { - public ICollection Resolve( - string objectName, RootObjectDefinition definition, - string propertyName, ManagedCollectionElementResolver resolver) - { - Bag newBag = new Bag(); - string elementName = propertyName + "[bag-element]"; - foreach(object element in this) - { - object resolvedElement = resolver(objectName, definition, elementName, element); - newBag.Add(resolvedElement); - } - return newBag; - } - } - } - -
- Rick Evans -
- - - Resolves this managed collection at runtime. - - - The name of the top level object that is having the value of one of it's - collection properties resolved. - - - The definition of the named top level object. - - - The name of the property the value of which is being resolved. - - - The callback that will actually do the donkey work of resolving - this managed collection. - - A fully resolved collection. - - - - Resolves a single element value of a managed collection. - - -

- If the does not need to be resolved or - converted to an appropriate , the - will be returned as-is. -

-
- - The name of the top level object that is having the value of one of it's - collection properties resolved. - - - The definition of the named top level object. - - - The name of the property the value of which is being resolved. - - - That element of a managed collection that may need to be resolved - to a concrete value. - - A fully resolved element. -
- - - Describes an object instance, which has property values, constructor - argument values, and further information supplied by concrete implementations. - - -

- This is just a minimal interface: the main intention is to allow - - (like PropertyPlaceholderConfigurer) to access and modify property values. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Return the property values to be applied to a new instance of the object. - - - - - Return the constructor argument values for this object. - - - - - Return the event handlers for any events exposed by this object. - - - - - Return a description of the resource that this object definition - came from (for the purpose of showing context in case of errors). - - - - - Is this object definition a "template", i.e. not meant to be instantiated - itself but rather just serving as an object definition for configuration - templates used by . - - - if this object definition is a "template". - - - - - Is this object definition "abstract", i.e. not meant to be instantiated - itself but rather just serving as parent for concrete child object - definitions. - - - if this object definition is "abstract". - - - - - Return whether this a Singleton, with a single, shared instance - returned on all calls. - - -

- If , an object factory will apply the Prototype - design pattern, with each caller requesting an instance getting an - independent instance. How this is defined will depend on the - object factory implementation. Singletons are the commoner type. -

-
-
- - - Is this object lazily initialized? - -

- Only applicable to a singleton object. -

-

- If , it will get instantiated on startup by object factories - that perform eager initialization of singletons. -

-
-
- - - The name of the parent definition of this object definition, if any. - - - - - The target scope for this object. - - - - - Get the role hint for this object definition - - - - - Returns the of the object definition (if any). - - - A resolved object . - - - If the of the object definition is not a - resolved or . - - - - - Returns the of the - of the object definition. - - Note that this does not have to be the actual type name used at runtime, - in case of a child definition overrding/inheriting the the type name from its - parent. It can be modifed during object factory post-processing, typically - replacing the original class name with a parsed variant of it. - Hence, do not consider this to be the definitive bean type at runtime - but rather only use it for parsing purposes at the individual object - definition level. - - - - - The autowire mode as specified in the object definition. - - -

- This determines whether any automagical detection and setting of - object references will happen. Default is - , - which means there's no autowire. -

-
-
- - - The object names that this object depends on. - - -

- The object factory will guarantee that these objects get initialized - before. -

-

- Note that dependencies are normally expressed through object properties - or constructor arguments. This property should just be necessary for - other kinds of dependencies like statics (*ugh*) or database - preparation on startup. -

-
-
- - - The name of the initializer method. - - -

- The default is , in which case there is no initializer method. -

-
-
- - - Return the name of the destroy method. - - -

- The default is , in which case there is no destroy method. -

-
-
- - - The name of the factory method to use (if any). - - -

- This method will be invoked with constructor arguments, or with no - arguments if none are specified. The static method will be invoked on - the specified . -

-
-
- - - The name of the factory object to use (if any). - - - - - Gets a value indicating whether this instance a candidate for getting autowired into some other - object. - - - true if this instance is autowire candidate; otherwise, false. - - - - - Simple factory for shared instances. - - Juergen Hoeller - Simon White (.NET) - - - - Constructs a new instance of the target dictionary. - - The new instance. - - - - Set the source . - - -

- This value will be used to populate the - returned by this factory. -

-
-
- - - Set the of the - implementation to use. - - -

- The default is the . -

-
-
- - - The of objects created by this factory. - - - Always returns the . - - - - - implementation that - creates instances of the class. - - -

- Typically used for retrieving shared - instances for common topics (such as the 'DAL', 'BLL', etc). The - - property determines the name of the - Common.Logging logger. -

-
- Rick Evans - -
- - - Creates a new instance of the - - class. - - - - - Creates a new instance of the - - class. - - - The name of the instance served up by - this factory. - - - If the supplied is - or contains only whitespace character(s). - - - - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - - An instance (possibly shared or independent) of the object - managed by this factory. - - - - - - Invoked by an - after it has set all object properties supplied - (and satisfied the - - and - interfaces). - - - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - - - - - - The name of the instance served up by - this factory. - - - The name of the instance served up by - this factory. - - - If the supplied to the setter is - or contains only whitespace character(s). - - - - - Return the type of object that this - creates, or - if not known in advance. - - - - - - Is the object managed by this factory a singleton or a prototype? - - - - - - Tag subclass used to hold a dictionary of managed elements. - - Juergen Hoeller - Rick Evans (.NET) - - - - Interface representing an object whose value set can be merged with that of a parent object. - - Rob Harrop - Mark Pollack (.NET) - - - - Merges the current value set with that of the supplied object. - - The supplied object is considered the parent, and values in the - callee's value set must override those of the supplied object. - - The parent object to merge with - The result of the merge operation - If the supplied parent is null - If merging is not enabled for this instance, - (i.e. MergeEnabled equals false. - - - - Gets a value indicating whether this instance is merge enabled for this instance - - - true if this instance is merge enabled; otherwise, false. - - - - - Initializes a new, empty instance of the class using the default initial capacity, load factor, hash code provider, and comparer. - - - - - Initializes a new, empty instance of the class using the specified initial capacity, and the default load factor, hash code provider, and comparer. - - The approximate number of elements that the object can initially contain. is less than zero. - - - - Resolves this managed collection at runtime. - - - The name of the top level object that is having the value of one of it's - collection properties resolved. - - - The definition of the named top level object. - - - The name of the property the value of which is being resolved. - - - The callback that will actually do the donkey work of resolving - this managed collection. - - A fully resolved collection. - - - - Merges the current value set with that of the supplied object. - - The supplied object is considered the parent, and values in the - callee's value set must override those of the supplied object. - - The parent object to merge with - The result of the merge operation - If the supplied parent is null - If merging is not enabled for this instance, - (i.e. MergeEnabled equals false. - - - - Gets or sets the unresolved name for the - of the keys of this managed dictionary. - - The unresolved name for the type of the keys of this managed dictionary. - - - - Gets or sets the unresolved name for the - of the values of this managed dictionary. - - The unresolved name for the type of the values of this managed dictionary. - - - - Gets a value indicating whether this instance is merge enabled for this instance - - - true if this instance is merge enabled; otherwise, false. - - - - - Tag subclass used to hold a list of managed elements. - - Rod Johnson - Rick Evans (.NET) - - - - Initializes a new instance of the ManagedList class that is empty and has the default initial capacity. - - - - - Initializes a new instance of the ManagedList class that is empty and has the specified initial capacity. - - The number of elements that the new list can initially store. is less than zero. - - - - Resolves this managed collection at runtime. - - - The name of the top level object that is having the value of one of it's - collection properties resolved. - - - The definition of the named top level object. - - - The name of the property the value of which is being resolved. - - - The callback that will actually do the donkey work of resolving - this managed collection. - - A fully resolved collection. - - - - Merges the current value set with that of the supplied object. - - The supplied object is considered the parent, and values in the - callee's value set must override those of the supplied object. - - The parent object to merge with - The result of the merge operation - If the supplied parent is null - If merging is not enabled for this instance, - (i.e. MergeEnabled equals false. - - - - Gets or sets the unresolved name for the - of the elements of this managed list. - - The unresolved name for the type of the elements of this managed list. - - - - Gets a value indicating whether this instance is merge enabled for this instance - - - true if this instance is merge enabled; otherwise, false. - - - - - Tag class which represent a Spring-managed instance that - supports merging of parent/child definitions. - - - - - Initializes a new instance of the class that is empty, has the default initial capacity and uses the default case-insensitive hash code provider and the default case-insensitive comparer. - - - - - Initializes a new instance of the class that is empty, has the specified initial capacity and uses the default case-insensitive hash code provider and the default case-insensitive comparer. - - The initial number of entries that the can contain. is less than zero. - - - - Merges the current value set with that of the supplied object. - - The supplied object is considered the parent, and values in the - callee's value set must override those of the supplied object. - - The parent object to merge with - The result of the merge operation - If the supplied parent is null - If merging is not enabled for this instance, - (i.e. MergeEnabled equals false. - - - - Gets a value indicating whether this instance is merge enabled for this instance - - - true if this instance is merge enabled; otherwise, false. - - - - - Tag subclass used to hold a set of managed elements. - - Juergen Hoeller - Rick Evans (.NET) - - - - Creates a new set instance based on either a list or a hash table, - depending on which will be more efficient based on the data-set - size. - - - - - Initializes a new instance of the class with a given capacity - - The size. - - - - Resolves this managed collection at runtime. - - - The name of the top level object that is having the value of one of it's - collection properties resolved. - - - The definition of the named top level object. - - - The name of the property the value of which is being resolved. - - - The callback that will actually do the donkey work of resolving - this managed collection. - - A fully resolved collection. - - - - Merges the current value set with that of the supplied object. - - The supplied object is considered the parent, and values in the - callee's value set must override those of the supplied object. - - The parent object to merge with - The result of the merge operation - If the supplied parent is null - If merging is not enabled for this instance, - (i.e. MergeEnabled equals false. - - - - Gets or sets the unresolved name for the - of the elements of this managed set. - - The unresolved name for the type of the elements of this managed set. - - - - Gets a value indicating whether this instance is merge enabled for this instance - - - true if this instance is merge enabled; otherwise, false. - - - - - An that returns a value - that is the result of a or instance method invocation. - - -

- Note that this class generally is expected to be used for accessing factory methods, - and as such defaults to operating in singleton mode. The first request to - - by the owning object factory will cause a method invocation, the return - value of which will be cached for all subsequent requests. The - property may be set to - , to cause this factory to invoke the target method each - time it is asked for an object. -

-

- A target method may be specified by setting the - property to a string representing - the method name, with specifying - the that the method is defined on. - Alternatively, a target instance method may be specified, by setting the - property as the target object, and - the property as the name of the - method to call on that target object. Arguments for the method invocation may be - specified by setting the property. -

-

- Another (esoteric) use case for this factory object is when one needs to call a method - that doesn't return any value (for example, a class method to - force some sort of initialization to happen)... this use case is not supported by - factory-methods, since a return value is needed to become the object. -

-

- - This class depends on the - - method being called after all properties have been set, as per the - contract. If you are - using this class outside of a Spring.NET IoC container, you must call one of either - or - yourself to ready the object's internal - state, or you will get a nasty . - -

-
- -

- The following example uses an instance of this class to call a - factory method... -

- - - - - - - - 1st - 2nd - and 3rd arguments - - - - -

- The following example is similar to the preceding example; the only pertinent difference is the fact that - a number of different objects are passed as arguments, demonstrating that not only simple value types - are valid as elements of the argument list... -

- - - - - - - - - - - 1st - - - - - - - http://www.springframework.net/ - - - - - -

- Named parameters are also supported... this next example yields the same results as - the preceding example (that did not use named arguments). -

- - - - - - - - - - 1st - and 3rd arguments - 2nd - - - - -

- Similarly, the following example uses an instance of this class to call an instance method... -

- - - - - - - - - -

- The above example could also have been written using an anonymous inner object definition... if the - object on which the method is to be invoked is not going to be used outside of the factory object - definition, then this is the preferred idiom because it limits the scope of the object on which the - method is to be invoked to the surrounding factory object. -

- - - - - - - - - - Colin Sampaleanu - Juergen Hoeller - Rick Evans (.NET) - Simon White (.NET) - - - - - - Specialisation of the class that tries - to convert the given arguments for the actual target method via an - appropriate implementation. - - Juergen Hoeller - Rick Evans - - - - - Helper class allowing one to declaratively specify a method call for later invocation. - - -

- Typically not used directly but via its subclasses such as - . -

-

- Usage: specify either the and - or the - and - properties respectively, and - (optionally) any arguments to the method. Then call the - method to prepare the invoker. - Once prepared, the invoker can be invoked any number of times. -

-
- -

- The following example uses the class to invoke the - ToString() method on the Foo class using a mixture of both named and unnamed - arguments. -

- - public class Foo - { - public string ToString(string name, int age, string address) - { - return string.Format("{0}, {1} years old, {2}", name, age, address); - } - - public static void Main() - { - Foo foo = new Foo(); - MethodInvoker invoker = new MethodInvoker(); - invoker.Arguments = new object [] {"Kaneda", "18 Kaosu Gardens, Nakatani Drive, Okinanawa"}; - invoker.AddNamedArgument("age", 29); - invoker.Prepare(); - // at this point, the arguments that will be passed to the method invocation - // will have been resolved into the following ordered array : {"Kaneda", 29, "18 Kaosu Gardens, Nakatani Drive, Okinanawa"} - string details = (string) invoker.Invoke(); - Console.WriteLine (details); - // will print out 'Kaneda, 29 years old, 18 Kaosu Gardens, Nakatani Drive, Okinanawa' - } - } - -
- Colin Sampaleanu - Juergen Hoeller - Simon White (.NET) -
- - - The used to search for - the method to be invoked. - - - - - The value returned from the invocation of a method that returns void. - - - - - The method that will be invoked. - - - - - Creates a new instance of the class. - - - - - Prepare the specified method. - - -

- The method can be invoked any number of times afterwards. -

-
- - If all required properties are not set, or a matching argument could not be found - for a named argument (typically down to a typo). - - - If the specified method could not be found. - -
- - - Searches for and returns the method that is to be invoked. - - - The return value of this method call will subsequently be returned from the - . - - The method that is to be invoked. - - If no method could be found. - - - If more than one method was found. - - - - - Adds the named argument to this instances mapping of argument names to argument values. - - - The name of an argument on the method that is to be invoked. - - - The value of the named argument on the method that is to be invoked. - - - - - Returns the prepared object that - will be invoked. - - -

- A possible use case is to determine the return of the method. -

-
- - The prepared object that - will be invoked. - -
- - - Invoke the specified method. - - -

- The invoker needs to have been prepared beforehand (via a call to the - method). -

-
- - The object returned by the method invocation, or - if the method returns void. - - - If at least one of the arguments passed to this - was incompatible with the signature of the invoked method. - -
- - - The target on which to call the target method. - - -

- Only necessary when the target method is ; - else, a target object needs to be specified. -

-
-
- - - The target object on which to call the target method. - - -

- Only necessary when the target method is not ; - else, a target class is sufficient. -

-
-
- - - The name of the method to be invoked. - - -

- Refers to either a method - or a non- method, depending on - whether or not a target object has been set. -

-
- -
- - - Arguments for the method invocation. - - -

- Ordering is significant... the order of the arguments in this - property must match the ordering of the various parameters on the target - method. There does however exist a small possibility for confusion when - the arguments in this property are supplied in addition to one or more named - arguments. In this case, each named argument is slotted into the index position - corresponding to the named argument... once once all named arguments have been - resolved, the arguments in this property are slotted into any remaining (empty) - slots in the method parameter list (see the example in the overview of the - class if this is not clear). -

-

- If this property is not set, or the value passed to the setter invocation - is or a zero-length array, a method with no (un-named) arguments is assumed. -

-
- -
- - - The resolved arguments for the method invocation. - - - - This property is not set until the target method has been resolved via a call to the - method). It is a combination of the - named and plain vanilla arguments properties, and it is this object array that - will actually be passed to the invocation of the target method. - -

- Setting the value of this property to results in basically clearing out any - previously prepared arguments... another call to the - method will then be required to prepare the arguments again (or the prepared arguments - can be set explicitly if so desired). -

-
- - -
- - - Named arguments for the method invocation. - - -

- The keys of this dictionary are the () names of the - method arguments, and the () values are the actual - argument values themselves. -

-

- If this property is not set, or the value passed to the setter invocation - is a reference, a method with no named arguments is assumed. -

-
- -
- - - Creates a new instance of the - class. - - - - - Prepare the specified method. - - -

- The method can be invoked any number of times afterwards. -

-
- - If all required properties are not set. - - - If the specified method could not be found. - -
- - - Register the given custom - for all properties of the given . - - - The of property. - - - The to register. - - - - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - -

- Returns the return value of the method that is to be invoked. -

-

- Will return the same value each time if the - - property value is . -

-
- - An instance (possibly shared or independent) of the object managed by - this factory. - - -
- - - Prepares this method invoker. - - - If all required properties are not set. - - - If the specified method could not be found. - - - - - - If a singleton should be created, or a new object on each request. - Defaults to . - - - - - Return the return value of the method - that this factory invokes, or if not - known in advance. - - -

- If the return value of the method that this factory is to invoke is - , then the - will be returned (in accordance with the - contract that - treats a value as a configuration error). -

-
- -
- - - Holder for an with - name and aliases. - - -

- Recognized by - - for inner object definitions. Registered by - , - which also uses it as general holder for a parsed object definition. -

-

- Can also be used for programmatic registration of inner object - definitions. If you don't care about the functionality offered by the - interface and the like, - registering - or is good enough. -

-
- Juergen Hoeller - Simon White (.NET) -
- - - Creates a new instance of the - class. - - - The object definition to be held by this instance. - - - The name of the object definition. - - - - - Creates a new instance of the - class. - - - The object definition to be held by this instance. - - The name of the object. - - Any aliases for the supplied - - - - - The held by this - instance. - - - - - The name of the object definition. - - - - - Any aliases for the object definition. - - -

- Guaranteed to never return ; if the associated - - does not have any aliases associated with it, then an empty - array will be returned. -

-
-
- - - Visitor class for traversing objects, in particular - the property values and constructor arguments contained in them resolving - object metadata values. - - - Used by and - to parse all string values contained in a ObjectDefinition, resolving any placeholders found. - - Mark Pollack - - - - Initializes a new instance of the class. - - The handler to be called for resolving variables contained in a string. - - - - Initializes a new instance of the class - for subclassing - - Subclasses should override the ResolveStringValue method - - - - Traverse the given ObjectDefinition object and the MutablePropertyValues - and ConstructorArgumentValues contained in them. - - The object definition to traverse. - - - - Visits the ObjectDefinition property ObjectTypeName, replacing string values using - the specified IVariableSource. - - The object definition. - - - - Visits the property values of the ObjectDefinition, replacing string values - using the specified IVariableSource. - - The object definition. - - - - Visits the indexed constructor argument values, replacing string values using the - specified IVariableSource. - - The indexed argument values. - - - - Visits the named constructor argument values, replacing string values using the - specified IVariableSource. - - The named argument values. - - - - Visits the generic constructor argument values, replacing string values using - the specified IVariableSource. - - The genreic argument values. - - - - Configures the constructor argument ValueHolder. - - The vconstructor alue holder. - - - - Resolves the given value taken from an object definition according to its type - - the value to resolve - the resolved value - - - - Visits the ManagedList property ElementTypeName and - calls for list element. - - - - - Visits the ManagedSet property ElementTypeName and - calls for list element. - - - - - Visits the ManagedSet properties KeyTypeName and ValueTypeName and - calls for dictionary's value element. - - - - - Visits the elements of a NameValueCollection and calls - for value of each element. - - - - - calls the to resolve any variables contained in the raw string. - - the raw string value containing variable placeholders to be resolved - If no has been configured. - the resolved string, having variables being replaced, if any - - - - Returns a value that is an - that - returns an object from an - . - - -

- The primary motivation of this class is to avoid having a client object - directly calling the - - method to get a prototype object out of an - , which would be a - violation of the inversion of control principle. With the use of this - class, the client object can be fed an - as a property - that directly returns one target prototype object. -

-

- The object referred to by the value of the - - property does not have to be a prototype object, but there is little - to no point in using this class in conjunction with a singleton object. -

-
- -

- The following XML configuration snippet illustrates the use of this - class... -

- - - - - - - - - - - - - - - - Colin Sampaleanu - Simon White (.NET) - - - - Interface to be implemented by objects that wish to be aware of their owning - . - - -

- For example, objects can look up collaborating objects via the factory. -

-

- Note that most objects will choose to receive references to collaborating - objects via respective properties and / or an appropriate constructor. -

-

- For a list of all object lifecycle methods, see the - API documentation. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - Callback that supplies the owning factory to an object instance. - - - Owning - (may not be ). The object can immediately - call methods on the factory. - - -

- Invoked after population of normal object properties but before an init - callback like 's - - method or a custom init-method. -

-
- - In case of initialization errors. - -
- - - Returns an instance of the object factory. - - The object factory. - - - - Invoked by an - after it has set all supplied object properties. - - - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - - - - - - Sets the name of the target object. - - - - - The target factory that will be used to perform the lookup - of the object referred to by the - property. - - - The owning - (will never be ). - - - In case of initialization errors. - - - - - - The of object created by this factory. - - - - - Interface defining a factory which can return an object instance - (possibly shared or independent) when invoked. - - - This interface is typically used to encapsulate a generic factory - which returns a new instance (prototype) on each invocation. - It is similar to the , but - implementations of the aforementioned interface are normally meant to be defined - as instances by the user in an , - while implementations of this class are normally meant to be fed as a property to - other objects; as such, the - method - has different exception handling behavior. - - Colin Sampaleanu - Simon White (.NET) - - - - Return an instance (possibly shared or independent) - of the object managed by this factory. - - - An instance of the object (should never be ). - - - - - Creates a new instance of the GenericObjectFactory class. - - - The enclosing - . - - - - - Returns the object created by the enclosed object factory. - - The created object. - - - - An implementation - that exposes an arbitrary target object under a different name. - - -

- Usually, the target object will reside in a different object - definition file, using this - to link it in - and expose it under a different name. Effectively, this corresponds - to an alias for the target object. -

- - For XML based object definition files, a <alias> - tag is available that effectively achieves the same. - -
- Juergen Hoeller - Rick Evans (.NET) - -
- - - Initialize a new default instance - - - - - Initialize this instance with the predefined and . - - - - - - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - - An instance (possibly shared or independent) of the object managed by - this factory. - - - - - - The name of the target object. - - -

- The target object may potentially be defined in a different object - definition file. -

-
- The name of the target object. -
- - - Return the type of object that this - creates, or - if not known in advance. - - - - - - Is the object managed by this factory a singleton or a prototype? - - - - - - Callback that supplies the owning factory to an object instance. - - - The owning - (may not be ). The object can immediately - call methods on the factory. - - - In case of initialization errors. - - - - - - - Erich Eichinger - - - - Role hint indicating that a is a major part of the application. Typically corresponds to a user-defined bean. - - - - - Role hint indicating that a is a supporting - part of some larger configuration, typically an outer ComponentDefinition - SUPPORT objects are considered important enough to be aware - of when looking more closely at a particular ComponentDefinition, - but not when looking at the overall configuration of an application. - - - - - Role hint indicating that a is providing an - entirely background role and has no relevance to the end-user. This hint is - used when registering objects that are completely part of the internal workings - of a ComponentDefinition. - - - - - Implementation of that - resolves variable name against Java-style property file. - - - Aleksandar Seovic - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - The variable value if able to resolve, null otherwise. - - - - - Initializes properties based on the specified - property file locations. - - - - - Gets or sets the locations of the property files - to read properties from. - - - The locations of the property files - to read properties from. - - - - - Convinience property. Gets or sets a single location - to read properties from. - - - A location to read properties from. - - - - - Overrides default values in one or more object definitions. - - -

- Instances of this class override already existing values, and is - thus best suited to replacing defaults. If you need to replace - placeholder values, consider using the - - class instead. -

-

- In contrast to the - - class, the original object definition can have default - values or no values at all for such object properties. If an overriding - configuration file does not have an entry for a certain object property, - the default object value is left as is. Also note that it is not - immediately obvious to discern which object definitions will be mutated by - one or more - s - simply by looking at the object configuration. -

-

- Each line in a referenced configuration file is expected to take the - following form... -

- - - -

- The name.property key refers to the object name and the - property that is to be overridden; and the value is the overridding - value that will be inserted into the appropriate object definition's - named property. -

-

- Please note that in the case of multiple - s - that define different values for the same object definition value, the - last overridden value will win (due to the fact that the values - supplied by previous - s - will be overridden). -

-
- -

- The following XML context definition defines an object that has a number - of properties, all of which have default values... -

- - - - - - - - -

- What follows is a .NET config file snippet for the above example (assuming - the need to override one of the default values)... -

- - - - - - -
- Juergen Hoeller - Simon White (.NET) - - - -
- - - Allows for the configuration of individual object property values from - a .NET .config file. - - -

- Useful for custom .NET .config files targetted at system administrators - that override object properties configured in the application context. -

-

- Two concrete implementations are provided in the Spring.NET core library: - - - - - for <add key="placeholderKey" value="..."/> style - overriding (pushing values from a .NET .config file into object - definitions). - - - - - - for replacing "${...}" placeholders (pulling values from a .NET .config - file into object definitions). - - - -

-

- Please refer to the API documentation for the concrete implementations - listed above for example usage. -

-
- Juergen Hoeller - Simon White (.NET) - - -
- - - The default configuration section name to use if none is explictly supplied. - - - - - - Creates a new instance of the - - class. - - -

- This is an class, and as such exposes no - public constructors. -

-
-
- - - Modify the application context's internal object factory after its - standard initialization. - - - The object factory used by the application context. - - - In case of errors. - - - - - - Loads properties from the configuration sections - specified in into . - - The instance to be filled with properties. - - - - Apply the given properties to the supplied - . - - - The - used by the application context. - - The properties to apply. - - If an error occured. - - - - - Validates the supplied . - - -

- Basically, if external locations are specified, ensure that either - one or a like number of config sections are also specified. -

-
- - The to be validated. - -
- - - Simply initializes the supplied - collection with this instances default - (if any). - - - The collection to be so initialized. - - - - - The policy for resolving conflicting property overrides from - several resources. - - -

- When merging conflicting property overrides from several resources, - should append an override with the same key be appended to the - current value, or should the property override from the last resource - processed override previous values? -

-

- The default value is ; i.e. a property - override from the last resource to be processed overrides previous - values. -

-
- - if the property override from the last resource - processed overrides previous values. - -
- - - Return the order value of this object, where a higher value means greater in - terms of sorting. - - The order value. - - - - - The default properties to be applied. - - -

- These are to be considered defaults, to be overridden by values - loaded from other resources. -

-
-
- - - The location of the .NET .config file that contains the property - overrides that are to be applied. - - - - - The locations of the .NET .config files containing the property - overrides that are to be applied. - - - - - The configuration sections to look for within the .config files. - - - - - - - Should a failure to find a .config file be ignored? - - -

- is only appropriate if the .config file is - completely optional. The default is . -

-
- - if a failure to find a .config file is to be - ignored. - -
- - - Apply the given properties to the supplied - . - - - The - used by the application context. - - The properties to apply. - - If an error occured. - - - - - Process the given key as 'name.property' entry. - - - The object factory containing the object definitions that are to be - processed. - - The key. - The value. - - If an error occurs. - - - If the property was not well formed (i.e. not in the format "name.property"). - - - - - implementation that - evaluates a property path on a given target object. - - -

- The target object can be specified directly or via an object name (see - example below). -

-

- Please note that the - is an implementation, and as such has - to comply with the contract of the - interface; more specifically, this means that the end result of the property lookup path - evaluation cannot be ( - implementations are not permitted to return ). If the resut of a - property lookup path evaluates to , an exception will be thrown. -

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - Juergen Hoeller - Rick Evans (.NET) - - - - Return an instance (possibly shared or independent) of the object - managed by this factory. - - - An instance (possibly shared or independent) of the object managed by - this factory. - - - - - - The target object that the property path lookup is to be applied to. - - -

- This would most likely be an inner object, but can of course be - any object reference. -

-
- - The target object that the property path lookup is to be applied to. - - -
- - - The (object) name of the target object that the property path lookup - is to be applied to. - - -

- Please note that any leading or trailing whitespace will be - trimmed from this name prior to resolution. The implication of this is that - one cannot use the - class in conjunction with object names that start or end with whitespace. -

-
- - The (object) name of the target object that the property path lookup - is to be applied to. - - -
- - - The property (lookup) path to be applied to the target object. - - -

- Please note that any leading or trailing whitespace will be - trimmed from this path prior to resolution. Whitespace is not a valid - identifier for property names (in part or whole) in CLS-based languages, - so this is a not unreasonable action. Please also note that whitespace - that is embedded within the property path will be left as-is (which may - or may not result in an error being thrown, depending on the context of - the whitespace). -

-
- -

- Examples of such property lookup paths can be seen below; note that - property lookup paths can be nested to an arbitrary level. -

- - name.length - accountManager.account['the key'].name - accounts[0].name - -
- - The property (lookup) path to be applied to the target object. - -
- - - The 'expected' of the result from evaluating the - property path. - - -

- This is not necessary for directly specified target objects, or - singleton target objects, where the can - be determined via reflection. Just specify this in case of a - prototype target, provided that you need matching by type (for - example, for autowiring). -

-

- It is permissable to set the value of this property to - (which in any case is the default value). -

-
- - The 'expected' of the result from evaluating the - property path. - -
- - - Return the of object that this - creates, or - if not known in advance. - - - - - - Is the object managed by this factory a singleton or a prototype? - - - - - - Set the name of the object in the object factory that created this object. - - -

- The object name of this - - will be interpreted as "objectName.property" pattern, if neither the - - - have been supplied (set). -

-

- This allows for concise object definitions with just an id or name. -

-
- - The name of the object in the factory. - -
- - - Callback that supplies the owning factory to an object instance. - - - Owning - (may not be ). The object can immediately - call methods on the factory. - - - In case of initialization errors. - - - - - Resolves placeholder values in one or more object definitions. - - -

- The default placeholder syntax follows the NAnt style: ${...}. - Instances of this class can be configured in the same way as any other - object in a Spring.NET container, and so custom placeholder prefix - and suffix values can be set via the - and properties. -

- -

- The following example XML context definition defines an object that has - a number of placeholders. The placeholders can easily be distinguished - by the presence of the ${} characters. -

- - - - - - - - -

- The associated XML configuration file for the above example containing the - values for the placeholders would contain a snippet such as .. -

- - - - - - - - -

- The preceding XML snippet listing the various property keys and their - associated values needs to be inserted into the .NET config file of - your application (or Web.config file for your ASP.NET web application, - as the case may be), like so... -

- - - - - - - - -
-

- - checks simple property values, lists, dictionaries, sets, constructor - values, object type name, and object names in - runtime object references ( - ). - Furthermore, placeholder values can also cross-reference other - placeholders, in the manner of the following example where the - rootPath property is cross-referenced by the subPath - property. -

- - - - - - - - -

- In contrast to the - - class, this configurer only permits the replacement of explicit - placeholders in object definitions. Therefore, the original definition - cannot specify any default values for its object properties, and the - placeholder configuration file is expected to contain an entry for each - defined placeholder. That is, if an object definition contains a - placeholder ${foo}, there should be an associated - <add key="foo" value="..."/> entry in the - referenced placeholder configuration file. Default property values - can be defined via the inherited - - collection to overcome any perceived limitation of this feature. -

-

- If a configurer cannot resolve a placeholder, and the value of the - - property is currently set to , an - - will be thrown. If you want to resolve properties from multiple configuration - resources, simply specify multiple resources via the - - property. Finally, please note that you can also define multiple - - instances, each with their own custom placeholder syntax. -

-
- Juergen Hoeller - Simon White (.NET) - - - -
- - - The default placeholder prefix. - - - - - The default placeholder suffix. - - - - - Initializes the new instance - - - - - Apply the given properties to the supplied - . - - - The - used by the application context. - - The properties to apply. - - If an error occured. - - - - - Parse values recursively to be able to resolve cross-references between - placeholder values. - - - The map of constructor arguments / property values. - - The string to be resolved. - The placeholders that have already been visited - during the current resolution attempt (used to detect circular references - between placeholders). Only non-null if we're parsing a nested placeholder. - - If an error occurs. - - The resolved string. - - - - Resolve the given placeholder using the given name value collection, - performing an environment variables check according to the given mode. - - -

- The default implementation delegates to - - before/afer the environment variable check. Subclasses can override - this for custom resolution strategies, including customized points - for the environment properties check. -

-
- The placeholder to resolve - - The merged name value collection of this configurer. - - The environment variable mode. - - The resolved value or if none. - - -
- - - Resolve the given placeholder using the given name value collection. - - -

- This (the default) implementation simply looks up the value of the - supplied key. -

-

- Subclasses can override this for customized placeholder-to-key - mappings or custom resolution strategies, possibly just using the - given name value collection as fallback. -

-
- The placeholder to resolve. - - The merged name value collection of this configurer. - - The resolved value. -
- - - The placeholder prefix (the default is ${). - - - - - - The placeholder suffix (the default is }) - - - - - - Indicates whether unresolved placeholders should be ignored. - - - - - Controls how environment variables will be used to - replace property placeholders. - - -

- See the overview of the - - enumeration for the available options. -

-
-
- - - implementation that - retrieves a or non-static public property value. - - -

- Typically used for retrieving public property values. -

-
- Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - - - - Invoked by an - after it has set all object properties supplied - (and satisfied - and ApplicationContextAware). - - - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - - - - - Template method that subclasses must override to construct the object - returned by this factory. - - - If an exception occured during object creation. - - The object returned by this factory. - - - - The of the static property - to be retrieved. - - - - - Arguments for the property invocation. - - -

- If this property is not set, or the value passed to the setter invocation - is a null or zero-length array, a property with no arguments is assumed. -

-
-
- - - The name of the property the value of which is to be retrieved. - - -

- Refers to either a property or a non-static property, - depending on a target object being set. -

-
-
- - - The object instance on which the property is defined. - - - - - The on which the property is defined. - - - - - Return the type of object that this - creates, or - if not known in advance. - - - - - Implementation of that - resolves variable name against registry key. - - Aleksandar Seovic - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves variable value for the specified variable name. - - - The name of the variable to resolve. - - - This implementation resolves REG_SZ as well as REG_MULTI_SZ values. In case of a REG_MULTI_SZ value, - strings are concatenated to a comma-separated list following - - - The variable value if able to resolve, null otherwise. - - - - - Gets or sets the registry key to obtain variable values from. - - - The registry key to obtain variable values from. - - - - - - implementation that allows for convenient registration of custom - IResource implementations. - - -

- Because the - class implements the - - interface, instances of this class that have been exposed in the - scope of an - will - automatically be picked up by the application context and made - available to the IoC container whenever resolution of IResources is required. -

-
- Mark Pollack - - -
- - - Registers custom IResource implementations. The supplied - is not used since IResourse implementations - are registered with a global - - - The object factory. - - - In case of errors. - - - - - The IResource implementations, i.e. resource handlers, to register. - - -

- The has the - contains the resource protocol name as the key and type as the value. - The key name can either be a string or an object, in which case - ToString() will be used to obtain the string name. - The value can be the fully qualified name of the IResource - implementation, a string, or - an actual of the IResource class - -

-
-
- - - A convenience class to create a - given the resource base - name and assembly name. - - -

- This is currently the preferred way of injecting resources into view - tier components (such as Windows Forms GUIs and ASP.NET ASPX pages). - A GUI component (typically a Windows Form) is injected with - an instance, and can - then proceed to use the various GetXxx() methods on the - to retrieve images, - strings, custom resources, etc. -

-
- Mark Pollack - - - -
- - - Creates a . - - - If an exception occured during object creation. - - The object returned by this factory. - - - - - - Invoked by an - after it has set all object properties supplied - (and satisfied the - - and - interfaces). - - - In the event of misconfiguration (such as failure to set an essential - property) or if initialization fails. - - - - - - The root name of the resources. - - -

- For example, the root name for the resource file named - "MyResource.en-US.resources" is "MyResource". -

- - The namespace is also prefixed before the resource file name. - -
-
- - - The string representation of the assembly that contains the resource. - - - - - The . - - - - - Immutable placeholder class used for the value of a - object when it's a reference - to another object in this factory to be resolved at runtime. - - Rod Johnson - Rick Evans (.NET) - - - - Creates a new instance of the - - class. - - -

- This does not mark this object as being a reference to - another object in any parent factory. -

-
- The name of the target object. -
- - - Creates a new instance of the - - class. - - -

- This variant constructor allows a client to specifiy whether or not - this object is a reference to another object in a parent factory. -

-
- The name of the target object. - - Whether this object is an explicit reference to an object in a - parent factory. - -
- - - Returns a string representation of this instance. - - A string representation of this instance. - - - - Return the target object name. - - - - - Is this is an explicit reference to an object in the parent - factory? - - - if this is an explicit reference to an - object in the parent factory. - - - - - Simple factory object for shared instances. - - Juergen Hoeller - Simon White (.NET) - - - - Constructs a new instance of the target set. - - The new instance. - - - - Set the source . - - -

- This value will be used to populate the - returned by this factory. -

-
-
- - - Set the of the - implementation to use. - - -

- The default is the . -

-
-
- - - The of objects created by this factory. - - - Always returns the . - - - - - Configure all ISharedStateAware objects, delegating concrete handling to the list of . - - - - - Creates a new empty instance. - - - - - Creates a new preconfigured instance. - - - priority value affecting order of invocation of this processor. See interface. - - - - Iterates over configured list of s until - the first provider is found that
- a) true == provider.CanProvideState( instance, name )
- b) null != provider.GetSharedState( instance, name )
-
-
- - - A NoOp for this processor - - - The new object instance. - - - The name of the object. - - - the original . - - - - - Return the order value of this object, where a higher value means greater in - terms of sorting. - - -

- Normally starting with 0 or 1, with indicating - greatest. Same order values will result in arbitrary positions for the affected - objects. -

-

- Higher value can be interpreted as lower priority, consequently the first object - has highest priority. -

-
- The order value. -
- - - Get/Set the (already ordererd!) list of instances. - - - If this list is not set, the containing object factory will automatically - be scanned for instances. - - - - - Implementation of that - resolves variable name against special folders (as defined by - enumeration). - - Aleksandar Seovic - - - - Before requesting a variable resolution, a client should - ask, whether the source can resolve a particular variable name. - - the name of the variable to resolve - true if the variable can be resolved, false otherwise - - - - Resolves specified special folder to its full path. - - - The name of the special folder to resolve. Should be one of the values - defined by the enumeration. - - - The folder path if able to resolve, null otherwise. - - - - - - implementation that allows for convenient registration of custom - type aliases. - - - Type aliases can be used instead of fully qualified type names anywhere - a type name is expected in a Spring.NET configuration file. -

- Because the - class implements the - - interface, instances of this class that have been exposed in the - scope of an - will - automatically be picked up by the application context and made - available to the IoC container whenever resolution of type aliases is required. -

-
- Mark Pollack - - -
- - - Registers any type aliases. The supplied - is not used since type aliases - are registered with a global - - - The object factory. - - - In case of errors. - - - - - The type aliases to register. - - -

- The has the - contains the alias name as the key and type as the value. - The key name can either be a string or an object, in which case - ToString() will be used to obtain the string name. - the value can be the fully qualified name of the type as a string or - an actual of the class that - being aliased. -

-
-
- - - Holder for a typed value. - - -

- Can be added to object definitions to explicitly specify - a target type for a value, - for example for collection - elements. -

-

- This holder just stores the value and the target - . The actual conversion will be performed by - the surrounding object factory. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Creates a new instance of the - - class. - - - - - Initializes a new instance of the class. - - The value. - - - - Creates a new instance of the - - class. - - - The value that is to be converted. - - - The to convert to. - - - If the supplied is - . - - - - - The value that is to be converted. - - -

- Obviously if the - - is the , no conversion - will actually be performed. -

-
-
- - - The to convert to. - - - If the setter is supplied with a value. - - - - - Gets a value indicating whether this instance has target type. - - - true if this instance has target type; otherwise, false. - - - - - Provides methods for type-safe accessing s. - - Erich Eichinger - - - - Initialize a new instance of an - - The underlying to read values from. - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The expected format of the variable's value - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The expected format of the variable's value - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - A that contains the value of the specified variable - or , if returns null. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - A that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns an of type that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - An of type that contains the value of the specified variable - or , if returns null. - - - - - Returns an of type that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns null. - - If false, suppresses exceptions if the result - of cannot be parsed - and returns instead. - - An of type that contains the value of the specified variable - or , if cannot be parsed. - - - - - Returns a that contains the value of the specified variable. - - The name of the variable to be read. - The value to be returned if returns or . - - A that contains the value of the specified variable - or , if returns null. - - - - - Resolves placeholder values in one or more object definitions - - - The placeholder syntax follows the NAnt style: ${...}. - Placeholders values are resolved against a list of - s. In case of multiple definitions - for the same property placeholder name, the first one in the - list is used. - Variable substitution is performed on simple property values, - lists, dictionaries, sets, constructor - values, object type name, and object names in - runtime object references ( - ). - Furthermore, placeholder values can also cross-reference other - placeholders, in the manner of the following example where the - rootPath property is cross-referenced by the subPath - property. - - - - - - - - - - If a configurer cannot resolve a placeholder, and the value of the - - property is currently set to , an - - will be thrown. - - Mark Pollack - - - - The default placeholder prefix. - - - - - The default placeholder suffix. - - - - - Create a new instance without any variable sources - - - - - Create a new instance and initialize with the given variable source - - - - - - Create a new instance and initialize with the given list of variable sources - - - - - Modify the application context's internal object factory after its - standard initialization. - - The object factory used by the application context. - -

- All object definitions will have been loaded, but no objects will have - been instantiated yet. This allows for overriding or adding properties - even to eager-initializing objects. -

-
- - In case of errors. - -
- - - Apply the property replacement using the specified s for all - object in the supplied - . - - - The - used by the application context. - - - If an error occured. - - - - - Sets the list of s that will be used to resolve placeholder names. - - A list of s. - - - - Sets that will be used to resolve placeholder names. - - A instance. - - - - The placeholder prefix (the default is ${). - - - - - - The placeholder suffix (the default is }) - - - - - - Indicates whether unresolved placeholders should be ignored. - - - - - Return the order value of this object, where a higher value means greater in - terms of sorting. - - The order value. - - - - - Context that gets passed along an object definition reading process, - encapsulating all relevant configuraiton as well as state. - - Rob Harrop - Juergen Hoeller - Mark Pollack (.NET) - - - - Initializes a new instance of the class. - - The resource. - - - - Gets the resource. - - The resource. - - - - Abstract superclass - that implements default object creation. - - -

- Provides object creation, initialization and wiring, supporting - autowiring and constructor resolution. Handles runtime object - references, managed collections, and object destruction. -

-

- The main template method to be implemented by subclasses is - , - used for autowiring by type. Note that this class does not implement object - definition registry capabilities - ( - does). -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - Abstract superclass for - implementations. - - -

- This class provides singleton / prototype determination, singleton caching, - object definition aliasing, - handling, and object definition merging for child object definitions. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - Marker object to be temporarily registered in the singleton cache, - while instantiating an object (in order to be able to detect circular references). - - - - - Used as value in hashtable that keeps track of singleton names currently in the - process of being created. Would not be necessary if we created a case insensitive implementation of - ISet. - - - - - The instance for this class. - - - - - Cache of singleton objects created by s: FactoryObject name -> product - - - - - Creates a new instance of the - class. - - -

- This constructor implicitly creates an - - that treats the names of objects in this factory in a case-sensitive fashion. -

-

- This is an class, and as such exposes no public constructors. -

-
-
- - - Creates a new instance of the - class. - - -

- This is an class, and as such exposes no public constructors. -

-
- - if the names of objects in this factory are to be treated in a - case-sensitive fashion. - -
- - - Creates a new instance of the - class. - - -

- This is an class, and as such exposes no public constructors. -

-
- - if the names of objects in this factory are to be treated in a - case-sensitive fashion. - - - Any parent object factory; may be . - -
- - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - - - Apply the property values of the object definition with the supplied - to the supplied . - - -

- The object definition can either define a fully self-contained object, - reusing it's property values, or just property values meant to be used - for existing object instances. -

-
- - The existing object that the property values for the named object will - be applied to. - - - The name of the object definition associated with the property values that are - to be applied. - - - In case of errors. - -
- - - Apply the property values of the object definition with the supplied - to the supplied . - - -

- The object definition can either define a fully self-contained object, - reusing it's property values, or just property values meant to be used - for existing object instances. -

-
- - The existing object that the property values for the named object will - be applied to. - - - The name of the object definition associated with the property values that are - to be applied. - - - An object definition that should be used to apply property values. - - - In case of errors. - -
- - - Create an object instance for the given object definition. - - The name of the object. - - The object definition for the object that is to be instantiated. - - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. It is invalid to use a non- arguments value - in any other case. - - - Whether eager caching of singletons is allowed... typically true for - singlton objects, but never true for inner object definitions. - - - Create instance only - suppress injecting dependencies yet. - - - A new instance of the object. - - - In case of errors. - - -

- The object definition will already have been merged with the parent - definition in case of a child definition. -

-

- All the other methods in this class invoke this method, although objects - may be cached after being instantiated by this method. All object - instantiation within this class is performed by this method. -

-
-
- - - Destroy the target object. - - -

- Must destroy objects that depend on the given object before the object itself, - nor throw an exception. -

-
- - The name of the object. - - - The target object instance to destroyed. - -
- - - Does this object factory contain an object definition with the - supplied ? - - -

- Does not consider any hierarchy this factory may participate in. - Invoked by - - when no cached singleton instance is found. -

-
- - The name of the object to look for. - - - if this object factory contains an object - definition with the supplied . - -
- - - Adds the supplied (object) to this factory's - singleton cache. - - -

- To be called for eager registration of singletons, e.g. to be able to - resolve circular references. -

- - If a singleton has already been registered under the same name as - the supplied , then the old singleton will - be replaced. - -
- The name of the object. - The singleton object. - - If the argument is - or consists wholly of whitespace characters; or if the - is . - -
- - - Return the object name, stripping out the factory dereference prefix if - necessary, and resolving aliases to canonical names. - - - The transformed name of the object. - - - - - Ensures, that the given name is prefixed with - if it incidentially already starts with this prefix. This avoids troubles when dereferencing - the object name during - - - - - Determines whether the specified name is defined as an alias as opposed - to the name of an actual object definition. - - The object name to check. - - true if the specified name is alias; otherwise, false. - - - - - Return a , - even by traversing parent if the parameter is a child definition. - - - The name of the object. - - - Are ancestors to be included in the merge? - - -

- Will ask the parent object factory if not found in this instance. -

-
- - A merged - with overridden properties. - -
- - - Return a , - even by traversing parent if the parameter is a child definition. - - - A merged - with overridden properties. - - - - - Creates the root object definition. - - The template definition to base root definition on. - Root object definition. - - - - Register a new object definition with this registry. - - - The name of the object instance to register. - - - The definition of the object instance to register. - - - If the object definition is invalid. - - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - Whether to search parent object factories. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Gets the type for the given FactoryObject. - - The factory object instance to check. - the FactoryObject's object type - - - - Gets the object type for the given FactoryObject definition, as far as possible. - Only called if there is no singleton instance registered for the target object already. - - - The default implementation creates the FactoryObject via GetObject - to call its ObjectType property. Subclasses are encouraged to optimize - this, typically by just instantiating the FactoryObject but not populating it yet, - trying whether its ObjectType property already returns a type. - If no type found, a full FactoryObject creation as performed by this implementation - should be used as fallback. - - Name of the object. - The merged object definition for the object. - The type for the object if determinable, or null otherwise - - - - Predict the eventual object type (of the processed object instance) for the - specified object. - - - Does not need to handle FactoryObjects specifically, since it is only - supposed to operate on the raw object type. - This implementation is simplistic in that it is not able to - handle factory methods and InstantiationAwareBeanPostProcessors. - It only predicts the object type correctly for a standard object. - To be overridden in subclasses, applying more sophisticated type detection. - - Name of the object. - The merged object definition to determine the type for. May be null - The type of the object, or null if not predictable - - - - Get the object for the given object instance, either the object - instance itself or its created object in case of an - . - - - The name that may include the factory dereference prefix. - - The object instance. - - The singleton instance of the object. - - - - - Get the object for the given object instance, either the object - instance itself or its created object in case of an - . - - The object instance. - - The name that may include the factory dereference prefix (=the requested name). - - - The canonical object name - - the merged object definition - - The singleton instance of the object. - - - - - Obtain an object to expose from the given IFactoryObject. - - The IFactoryObject instance. - Name of the object. - The merged object definition. - The object obtained from the IFactoryObject - If IFactoryObject object creation failed. - - - - Post-process the given object that has been obtained from the FactoryObject. - The resulting object will be exposed for object references. - - The default implementation simply returns the given object - as-is. Subclasses may override this, for example, to apply - post-processors. - The instance obtained from the IFactoryObject. - Name of the object. - The object instance to expose - if any post-processing failed. - - - - Convenience method to pull an - from this factory. - - - The name of the factory object to be retrieved. If this name is not a valid - name, it will be converted - into one. - - - The associated with the - supplied . - - - - - Is the supplied a factory object dereference? - - - - - Determines whether the type of the given object definition matches the - specified target type. - - Allows for lazy load of the actual object type, provided that the - type match can be determined otherwise. - The default implementation simply delegates to the standard - ResolveObjectType method. Subclasses may override this to use - a differnt strategy. - - Name of the object (for error handling purposes). - The merged object definition to determine the type for. - Type to match against (never null). - - true if object definition matches tye specified target type; otherwise, false. - - if we failed to load the type." - - - - Resolves the type of the object for the specified object definition resolving - an object type name to a Type (if necessary) and storing the resolved Type - in the object definition for further use. - - The merged object definition to dertermine the type for. - Name of the object (for error handling purposes). - - - - - Is the object (definition) with the supplied an - ? - - The name of the object to be checked. - - the object (definition) with the supplied - an ? - - - - - Remove the object identified by the supplied - from this factory's singleton cache. - - - The name of the object that is to be removed from the singleton - cache. - - - If the argument is or - consists wholly of whitespace characters. - - - - - Return the names of objects in the singleton cache that match the given - object type (including subclasses). - - - The class or interface to match, or for all object names. - - -

- Will not consider s - as the type of their created objects is not known before instantiation. -

-

- Does not consider any hierarchy this factory may participate in. -

-
- - The names of objects in the singleton cache that match the given - object type (including subclasses), or an empty array if none. - -
- - - Determines whether the object with the given name matches the specified type. - - More specifically, check whether a GetObject call for the given name - would return an object that is assignable to the specified target type. - Translates aliases back to the corresponding canonical bean name. - Will ask the parent factory if the bean cannot be found in this factory instance. - - The name of the object to query. - Type of the target to match against. - - true if the object type matches; otherwise, false - if it doesn't match or cannot be determined yet. - - Ff there is no object with the given name - - - - - Determines the of the object with the - supplied . - - -

- More specifically, checks the of object that - would return. - For an , returns the - of object that the - creates. -

-

- Please note that (prototype) objects created via a factory method or - objects are handled - slightly differently, in that we don't want to needlessly create - instances of such objects just to determine the - of object that they create. -

-
- The name of the object to query. - - The of the object or - if not determinable. - -
- - - Determines the of the object defined - by the supplied object . - - -

- This, the default, implementation returns - to indicate that the type cannot be determined. Subclasses are - encouraged to try to determine the actual return - here, matching their strategy of resolving - factory methods in the - Spring.Objects.Factory.Support.AbstractObjectFactory.CreateObject - implementation. -

-
- - The name associated with the supplied object . - - - The - that the is to be determined for. - - - The of the object defined by the supplied - object ; or if the - cannot be determined. - -
- - - Returns the names of the objects in the singleton cache. - - -

- Does not consider any hierarchy this factory may participate in. -

-
- The names of the objects in the singleton cache. -
- - - Returns the number of objects in the singleton cache. - - -

- Does not consider any hierarchy this factory may participate in. -

-
- The number of objects in the singleton cache. -
- - - Destroys the named singleton object. - - -

- Delegates to - - if a corresponding singleton instance is found. -

-
- - The name of the singleton object that is to be destroyed. - - -
- - - Check the supplied merged object definition for any possible - validation errors. - - - The object definition to be checked for validation errors. - - - The name of the object associated with the supplied object definition. - - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - - In the case of object validation errors. - - - - - Parent object factory, for object inheritance support - - - - - Dependency types to ignore on dependency check and autowire, as Set of - Type objects: for example, string. Default is none. - - - - - ObjectPostProcessors to apply in CreateObject - - - - - Indicates whether any IInstantiationAwareBeanPostProcessors have been registered - - - - - Indicates whether any IDestructionAwareBeanPostProcessors have been registered - - - - - Set of registered singletons, containing the bean names in registration order - - - - - Set that holds all inner objects created by this factory that implement the IDisposable - interface, to be destroyed on call to Dispose. - - - - - Determines whether the local object factory contains a bean of the given name, - ignoring object defined in ancestor contexts. - This is an alternative to ContainsObject, ignoring an object - of the given name from an ancestor object factory. - - The name of the object to query. - - true if objects with the specified name is defined in the local factory; otherwise, false. - - - - - Is this object a singleton? - - - - - - Determines whether the specified object name is prototype. That is, will GetObject - always return independent instances? - - The name of the object to query - - true if the specified object name will always deliver independent instances; otherwise, false. - - This method returning false does not clearly indicate a singleton object. - It indicated non-independent instances, which may correspond to a scoped object as - well. use the IsSingleton property to explicitly check for a shared - singleton instance. - Translates aliases back to the corresponding canonical object name. Will ask the - parent factory if the object can not be found in this factory instance. - - - if there is no object with the given name. - - - - Does this object factory or one of its parent factories contain an object with the given name? - - - This method scans the object factory hierarchy starting with the current factory instance upwards. - Use if you want to explicitely check just this object factory instance. - - . - - - - Return the aliases for the given object name, if defined. - - . - - - - Return an unconfigured(!) instance (possibly shared or independent) of the given object name. - - - - This method will only instantiate the requested object. It does NOT inject any dependencies! - - - - - Return an instance (possibly shared or independent) of the given object name. - - . - - - - Return an instance (possibly shared or independent) of the given object name. - - - - - - Return an instance (possibly shared or independent) of the given object name. - - -

- This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. -

-

- Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. -

-

- Will ask the parent factory if the object cannot be found in this factory - instance. -

-
- The name of the object to return. - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. If there is no factory method and the - arguments are not null, then match the argument values by type and - call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the supplied is . - -
- - - Return an instance (possibly shared or independent) of the given object name, - optionally injecting dependencies. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - whether to inject dependencies or not. - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - - - - Checks, if the passed instance is of the required type. - - the name of the object - the actual instance - the type contract the given instance must adhere. - the object instance passed in via (for more fluent usage) - - if is null or not assignable to . - - - - - Creates a singleton instance for the specified object name and definition. - - - The object name (will be used as the key in the singleton cache key). - - The object definition. - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. If there is no factory method and the - arguments are not null, then match the argument values by type and - call the object's constructor. - - The created object instance. - - - - Injects dependencies into the supplied instance - using the named object definition. - - - - - - Injects dependencies into the supplied instance - using the supplied . - - - - - - Destroy all cached singletons in this factory. - - - - - Ignore the given dependency type for autowiring - - . - - - - Determines whether the specified object name is currently in creation.. - - Name of the object. - - true if the specified object name is currently in creation; otherwise, false. - - - - - Add a new - that will get applied to objects created by this factory. - - - The - to register. - - . - - - - Given an object name, create an alias. - - . - - - - Register the given custom - for all properties of the given . - - . - - - - Register the given existing object as singleton in the object factory, - under the given object name. - - . - - - - Does this object factory contains a singleton instance with the - supplied ? - - - - - - Tries to find a cached object for the specified name. - - Teh object name to look for. - The cached object if found, otherwise. - - - - Determines whether the given object name is already in use within this factory, - i.e. whether there is a local object or alias registered under this name or - an inner object created with this name. - - Name of the object to check. - - true if is object name in use; otherwise, false. - - - - - Returns, whether this factory treats object names case sensitive or not. - - - - - Gets the of - s - that will be applied to objects created by this factory. - - - - - Gets the set of classes that will be ignored for autowiring. - - -

- The elements of this are - s. -

-
-
- - - Returns, whether this object factory instance contains objects. - - - - - Returns, whether this object factory instance contains objects. - - - - - Gets the temporary object that is placed - into the singleton cache during object resolution. - - - - - Set that holds all inner objects created by this factory that implement the IDisposable - interface, to be destroyed on call to Dispose. - - - - - The parent object factory, or if there is none. - - - The parent object factory, or if there is none. - - - - - Return an instance (possibly shared or independent) of the given object name. - - . - - - - Returns the current number of registered - s. - - - The current number of registered - s. - - . - - - - Gets the names of singleton objects registered in this registry. - - The list of names as String array (never null). - - - Only checks already instantiated singletons; does not return names - for singleton bean definitions which have not been instantiated yet. - - - The main purpose of this method is to check manually registered singletons - . Can also be used to check which - singletons defined by an object definition have already been created. - - - - - - - - - Gets the number of singleton beans registered in this registry. - - The number of singleton objects. - - - Only checks already instantiated singletons; does not count - singleton object definitions which have not been instantiated yet. - - - The main purpose of this method is to check manually registered singletons - . Can also be used to count the number of - singletons defined by an object definition that have already been created. - - - - - - - - - Makes a distinction between sort order and object identity. - This is important when used with , since most - implementations assume Order == Identity - - - - - Handle the case when both objects have equal sort order priority. By default returns 0, - but may be overriden for handling special cases. - - The first object to compare. - The second object to compare. - - -1 if first object is less then second, 1 if it is greater, or 0 if they are equal. - - - - - The used during the invocation and - searching for of methods. - - - - - The instance for this class. - - - - - Creates a new instance of the - - class. - - -

- This is an class, and as such exposes no public constructors. -

-
- Flag specifying whether to make this object factory case sensitive or not. -
- - - Creates a new instance of the - - class. - - -

- This is an class, and as such exposes no public constructors. -

-
- Flag specifying whether to make this object factory case sensitive or not. - The parent object factory, or if none. -
- - - Predict the eventual object type (of the processed object instance) for the - specified object. - - Name of the object. - The merged object definition to determine the type for. May be null - - The type of the object, or null if not predictable - - - - - Determines the of the object defined - by the supplied object . - - - The name associated with the supplied object . - - - The - that the is to be determined for. - - - The of the object defined by the supplied - object ; or if the - cannot be determined. - - - - - Apply the property values of the object definition with the supplied - to the supplied . - - - The existing object that the property values for the named object will - be applied to. - - - The name of the object definition associated with the property values that are - to be applied. - - - - - Apply the property values of the object definition with the supplied - to the supplied . - - - The existing object that the property values for the named object will - be applied to. - - - The name of the object definition associated with the property values that are - to be applied. - - - An object definition that should be used to apply property values. - - - - - Apply any - s. - - -

- The returned instance may be a wrapper around the original. -

-
- - The of the object that is to be - instantiated. - - - The name of the object that is to be instantiated. - - - An instance to use in place of the original instance. - - - In case of errors. - -
- - - Apply the given property values, resolving any runtime references - to other objects in this object factory. - - - The object name passed for better exception information. - - - The definition of the named object. - - - The wrapping the target object. - - - The new property values. - - -

- Must use deep copy, so that we don't permanently modify this property. -

-
-
- - - Create the value resolver strategy to use for resolving raw property values - - - - - Return an array of object-type property names that are unsatisfied. - - -

- These are probably unsatisfied references to other objects in the - factory. Does not include simple properties like primitives or - s. -

-
- - An array of object-type property names that are unsatisfied. - - - The definition of the named object. - - - The wrapping the target object. - -
- - - Destroy all cached singletons in this factory. - - -

- To be called on shutdown of a factory. -

-
-
- - - Populate the object instance in the given - with the property values from the - object definition. - - - The name of the object. - - - The definition of the named object. - - - The wrapping the target object. - - - - - Wires up any exposed events in the object instance in the given - with any event handler - values from the . - - - The name of the object. - - - The definition of the named object. - - - The wrapping the target object. - - - - - Fills in any missing property values with references to - other objects in this factory if autowire is set to - . - - - The object name to be autowired by . - - - The definition of the named object to update through autowiring. - - - The wrapping the target object (and - from which we can rip out information concerning the object). - - - The property values to register wired objects with. - - - - - Defines "autowire by type" (object properties by type) behavior. - - -

- This is like PicoContainer default, in which there must be exactly one object - of the property type in the object factory. This makes object factories simple - to configure for small namespaces, but doesn't work as well as standard Spring - behavior for bigger applications. -

-
- - The object name to be autowired by . - - - The definition of the named object to update through autowiring. - - - The wrapping the target object (and - from which we can rip out information concerning the object). - - - The property values to register wired objects with. - -
- - - Ignore the given dependency type for autowiring - - - This will typically be used by application contexts to register - dependencies that are resolved in other ways, like IOjbectFactory through - IObjectFactoryAware or IApplicationContext through IApplicationContextAware. - By default, IObjectFactoryAware and IObjectName interfaces are ignored. - For further types to ignore, invoke this method for each type. - - . - - - - Create an object instance for the given object definition. - - The name of the object. - - The object definition for the object that is to be instantiated. - - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. It is invalid to use a non- arguments value - in any other case. - - - Whether eager caching of singletons is allowed... typically true for - singlton objects, but never true for inner object definitions. - - - Suppress injecting dependencies yet. - - - A new instance of the object. - - - In case of errors. - - -

- The object definition will already have been merged with the parent - definition in case of a child definition. -

-

- All the other methods in this class invoke this method, although objects - may be cached after being instantiated by this method. All object - instantiation within this class is performed by this method. -

-
-
- - - Add the created, but yet unpopulated singleton to the singleton cache - to be able to resolve circular references - - the name of the object to add to the cache. - the definition used to create and populated the object. - the raw object instance. - - Derived classes may override this method to select the right cache based on the object definition. - - - - - Remove the specified singleton from the singleton cache that has - been added before by a call to - - the name of the object to remove from the cache. - the definition used to create and populated the object. - - Derived classes may override this method to select the right cache based on the object definition. - - - - - Creates an instance from the passed in - using constructor - - The name of the object to create - used for error messages. - The describing the object to be created. - optional arguments to pass to the constructor - An wrapping the already instantiated object - - - - Instantiates the given object using its default constructor - - Name of the object. - The definition. - IObjectWrapper for the new instance - - - - Determines candidate constructors to use for the given bean, checking all registered - - - Raw type of the object. - Name of the object. - the candidate constructors, or null if none specified - In case of errors - - - - - Instantiate an object instance using a named factory method. - - -

- The method may be static, if the - parameter specifies a class, rather than a - instance, or an - instance variable on a factory object itself configured using Dependency - Injection. -

-

- Implementation requires iterating over the static or instance methods - with the name specified in the supplied - (the method may be overloaded) and trying to match with the parameters. - We don't have the types attached to constructor args, so trial and error - is the only way to go here. -

-
- - The name associated with the supplied . - - - The definition describing the instance that is to be instantiated. - - - Any arguments to the factory method that is to be invoked. - - - The result of the factory method invocation (the instance). - -
- - - "autowire constructor" (with constructor arguments by type) behaviour. - - The name of the object to autowire by type. - The object definition to update through autowiring. - The chosen candidate constructors. - The argument values passed in programmatically via the GetObject method, - or null if none (-> use constructor argument values from object definition) - - An for the new instance. - - - - Also applied if explicit constructor argument values are specified, - matching all remaining arguments with objects from the object factory. - - - This corresponds to constructor injection: in this mode, a Spring.NET - object factory is able to host components that expect constructor-based - dependency resolution. - - - - - - Perform a dependency check that all properties exposed have been set, if desired. - - -

- Dependency checks can be objects (collaborating objects), simple (primitives - and ), or all (both). -

-
- - The name of the object. - - - The definition of the named object. - - - The wrapping the target object. - - - The property values to be checked. - - - If all of the checked dependencies were not satisfied. - -
- - - Extract a filtered set of PropertyInfos from the given IObjectWrapper, excluding - ignored dependency types. - - The object wrapper the object was created with. - The filtered PropertyInfos - - - - Determine whether the given bean property is excluded from dependency checks. - This implementation excludes properties whose type matches an ignored dependency type - or which are defined by an ignored dependency interface. - - - - the of the object property - whether the object property is excluded - - - - Give an object a chance to react now all its properties are set, - and a chance to know about its owning object factory (this object). - - -

- This means checking whether the object implements - and / or - , and invoking the - necessary callback(s) if it does. -

-

- Custom init methods are resolved in a case-insensitive manner. -

-
- - The new object instance we may need to initialise. - - - The name the object has in the factory. Used for logging output. - - - The definition of the target object instance. - -
- - - Invoke the specified custom destroy method on the given object. - - -

- This implementation invokes a no-arg method if found, else checking - for a method with a single boolean argument (passing in "true", - assuming a "force" parameter), else logging an error. -

-

- Can be overridden in subclasses for custom resolution of destroy - methods with arguments. -

-

- Custom destroy methods are resolved in a case-insensitive manner. -

-
-
- - - Destroy the target object. - - -

- Must destroy objects that depend on the given object before the object itself. - Should not throw any exceptions. -

-
- - The name of the object. - - - The target object instance to destroyed. - -
- - - Destroys all of the objects registered as dependant on the - object (definition) identified by the supplied . - - - The name of the root object (definition) that is itself being destroyed. - - - - - Resolve a reference to another object in the factory. - - - The name of the object that is having the value of one of its properties resolved. - - - The definition of the named object. - - - The name of the property the value of which is being resolved. - - - The runtime reference containing the value of the property. - - A reference to another object in the factory. - - - - Find object instances that match the required . - - -

- Called by autowiring. If a subclass cannot obtain information about object - names by , a corresponding exception should be thrown. -

-
- - The of the objects to look up. - - - An of object names and object - instances that match the required , or - if none are found. - - - In case of errors. - -
- - - Return the names of the objects that depend on the given object. - Called by DestroyObject, to be able to destroy depending objects first. - - - The name of the object to find depending objects for. - - - The array of names of depending objects, or the empty string array if none. - - - In case of errors. - - - - - Injects dependencies into the supplied instance - using the named object definition. - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - - - - Injects dependencies into the supplied instance - using the supplied . - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - An object definition that should be used to configure object. - - - - - - Configures object instance by injecting dependencies, satisfying Spring lifecycle - interfaces and applying object post-processors. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - An object definition that should be used to configure object. - - - A wrapped object instance that is to be so configured. - - - - - - Applies the PostProcessAfterInitialization callback of all - registered IObjectPostProcessors, giving them a chance to post-process - the object obtained from IFactoryObjects (for example, to auto-proxy them) - - The instance obtained from the IFactoryObject. - Name of the object. - The object instance to expose - if any post-processing failed. - - - - Create a new object instance of the given class with the specified - autowire strategy. - - - The of the object to instantiate. - - - The desired autowiring mode. - - - Whether to perform a dependency check for objects (not applicable to - autowiring a constructor, thus ignored there). - - The new object instance. - - If the wiring fails. - - - - - - Autowire the object properties of the given object instance by name or - . - - - The existing object instance. - - - The desired autowiring mode. - - - Whether to perform a dependency check for the object. - - - If the wiring fails. - - - If the supplied is not one of the - or - - values. - - - - - - Apply s - to the given existing object instance, invoking their - - methods. - - - The existing object instance. - - - The name of the object. - - - The object instance to use, either the original or a wrapped one. - - - If any post-processing failed. - - - - - - Apply s - to the given existing object instance, invoking their - - methods. - - - The existing object instance. - - - The name of the object. - - - The object instance to use, either the original or a wrapped one. - - - If any post-processing failed. - - - - - - Resolve the specified dependency against the objects defined in this factory. - - The descriptor for the dependency. - Name of the object which declares the present dependency. - A list that all names of autowired object (used for - resolving the present dependency) are supposed to be added to. - - the resolved object, or null if none found - - if dependency resolution failed - - - - Cache of filtered PropertyInfos: object Type -> PropertyInfo array - - - - - Dependency interfaces to ignore on dependency check and autowire, as Set of - Class objects. By default, only the IObjectFactoryAware and IObjectNameAware - interfaces are ignored. - - - - - The - implementation to be used to instantiate managed objects. - - - - - An - implementation that provides some convenience support for - derived classes. - - -

- This class is reserved for internal use within the framework; it is - not intended to be used by application developers using Spring.NET. -

-
- Rick Evans -
- - - Permits the (re)implementation of an arbitrary method on a Spring.NET - IoC container managed object. - - -

- Encapsulates the notion of the Method-Injection form of Dependency - Injection. -

-

- Methods that are dependency injected with implementations of this - interface may be (but need not be) , in which - case the container will create a concrete subclass of the - class prior to instantiation. -

-

- Do not use this mechanism as a means of AOP. See the reference - manual for examples of appropriate usages of this interface. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - Reimplement the supplied . - - - The instance whose is to be - (re)implemented. - - - The method that is to be (re)implemented. - - The target method's arguments. - - The result of the (re)implementation of the method call. - - - - - Creates a new instance of the - - class. - - -

- This is an class, and as such has no - publicly visible constructors. -

-
- - The object definition that is the target of the method replacement. - - - The enclosing IoC container with which the above - is associated. - - - If either of the supplied arguments is . - -
- - - Is ; derived classes must supply an implementation. - - - The instance whose is to be - (re)implemented. - - - The method that is to be (re)implemented. - - The target method's arguments. - The result of the object lookup. - - - - Helper method for subclasses to retrieve the appropriate - for the - supplied . - - - The to use to retrieve - the appropriate - . - - - The appropriate - . - - - - - Helper method for subclasses to lookup an object from an enclosing - IoC container. - - - The name of the object that is to be looked up. - - - The named object. - - - - - Common base class for object definitions, factoring out common - functionality from - and - . - - Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - - - - Describes a configurable object instance, which has property values, - constructor argument values, and further information supplied by concrete - implementations. - - Rick Evans - - - - Return the property values to be applied to a new instance of the object. - - - - - Return the constructor argument values for this object. - - - - - The method overrides (if any) for this object. - - - The method overrides (if any) for this object; may be an - empty collection but is guaranteed not to be - . - - - - - Return the event handlers for any events exposed by this object. - - - - - Get or set the role hint for this object definition - - - - - Return a description of the resource that this object definition - came from (for the purpose of showing context in case of errors). - - - - - Is this object definition "abstract", i.e. not meant to be instantiated - itself but rather just serving as parent for concrete child object - definitions. - - - if this object definition is "abstract". - - - - - Returns the of the object definition (if any). - - - A resolved object . - - - If the of the object definition is not a - resolved or . - - - - - Returns the of the - of the object definition (if any). - - - - - Return whether this a Singleton, with a single, shared instance - returned on all calls. - - -

- If , an object factory will apply the Prototype - design pattern, with each caller requesting an instance getting an - independent instance. How this is defined will depend on the - object factory implementation. Singletons are the commoner type. -

-
-
- - - Is this object lazily initialized? - -

- Only applicable to a singleton object. -

-

- If , it will get instantiated on startup by object factories - that perform eager initialization of singletons. -

-
-
- - - The autowire mode as specified in the object definition. - - -

- This determines whether any automagical detection and setting of - object references will happen. Default is - , - which means there's no autowire. -

-
-
- - - The dependency check code. - - - - - The object names that this object depends on. - - -

- The object factory will guarantee that these objects get initialized - before. -

-

- Note that dependencies are normally expressed through object properties - or constructor arguments. This property should just be necessary for - other kinds of dependencies like statics (*ugh*) or database - preparation on startup. -

-
-
- - - The name of the initializer method. - - -

- The default is , in which case there is no initializer method. -

-
-
- - - Return the name of the destroy method. - - -

- The default is , in which case there is no destroy method. -

-
-
- - - The name of the factory method to use (if any). - - -

- This method will be invoked with constructor arguments, or with no - arguments if none are specified. The static method will be invoked on - the specified . -

-
-
- - - The name of the factory object to use (if any). - - - - - Gets or sets a value indicating whether this instance a candidate for getting autowired into some other - object. - - - true if this instance is autowire candidate; otherwise, false. - - - - - Creates a new instance of the - - class. - - -

- This is an class, and as such exposes no - public constructors. -

-
-
- - - Creates a new instance of the - - class. - - -

- This is an class, and as such exposes no - public constructors. -

-
-
- - - Creates a new instance of the - - class. - - - The object definition used to initialise the member fields of this - instance. - - -

- This is an class, and as such exposes no - public constructors. -

-
-
- - - Resolves the type of the object, resolving it from a specified - object type name if necessary. - - - A resolved instance. - - - If the type cannot be resolved. - - - - - Validate this object definition. - - - In the case of a validation failure. - - - - - Validates all - - - - - Validate the supplied . - - - The - to be validated. - - - - - Override settings in this object definition from the supplied - object definition. - - - The object definition used to override the member fields of this instance. - - - - - Returns a that represents the current - . - - - A that represents the current - . - - - - - The name of the parent definition of this object definition, if any. - - - - - The property values that are to be applied to the object - upon creation. - - -

- Setting the value of this property to - will merely result in a new (and empty) - - collection being assigned to the property value. -

-
- - The property values (if any) for this object; may be an - empty collection but is guaranteed not to be - . - -
- - - Does this definition have any - ? - - - if this definition has at least one - . - - - - - The constructor argument values for this object. - - -

- Setting the value of this property to - will merely result in a new (and empty) - - collection being assigned. -

-
- - The constructor argument values (if any) for this object; may be an - empty collection but is guaranteed not to be - . - -
- - - The event handler values for this object. - - -

- Setting the value of this property to - will merely result in a new (and empty) - - collection being assigned. -

-
- - The event handler values (if any) for this object; may be an - empty collection but is guaranteed not to be - . - -
- - - The method overrides (if any) for this object. - - -

- Setting the value of this property to - will merely result in a new (and empty) - - collection being assigned to the property value. -

-
- - The method overrides (if any) for this object; may be an - empty collection but is guaranteed not to be - . - -
- - - The name of the target scope for the object. - Defaults to "singleton", ootb alternative is "prototype". Extended object factories - might support further scopes. - - - - - Get or set the role hint for this object definition - - - - - Is this definition a singleton, with - a single, shared instance returned on all calls to an enclosing - container (typically an - or - ). - - -

- If , an object factory will apply the - prototype design pattern, with each caller requesting an - instance getting an independent instance. How this is defined - will depend on the object factory implementation. singletons - are the commoner type. -

-
- -
- - - Gets a value indicating whether this instance is prototype, with an independent instance - returned for each call. - - - true if this instance is prototype; otherwise, false. - - - - - Is this object lazily initialized? - -

- Only applicable to a singleton object. -

-

- If , it will get instantiated on startup - by object factories that perform eager initialization of - singletons. -

-
-
- - - Is this object definition a "template", i.e. not meant to be instantiated - itself but rather just serving as an object definition for configuration - templates used by . - - - if this object definition is a "template". - - - - - Is this object definition "abstract", i.e. not meant to be - instantiated itself but rather just serving as a parent for concrete - child object definitions. - - - if this object definition is "abstract". - - - - - The of the object definition (if any). - - - A resolved object . - - - If the of the object definition is not a - resolved or . - - - - - - Is the of the object definition a resolved - ? - - - - - Returns the of the - of the object definition (if any). - - - - - A description of the resource that this object definition - came from (for the purpose of showing context in case of errors). - - - - - The autowire mode as specified in the object definition. - - -

- This determines whether any automagical detection and setting of - object references will happen. The default is - , - which means that no autowiring will be performed. -

-
-
- - - Gets the resolved autowire mode. - - -

- This resolves - - to one of - - or - . -

-
-
- - - The dependency checking mode. - - -

- The default is - . -

-
-
- - - The object names that this object depends on. - - -

- The object factory will guarantee that these objects get initialized - before this object definition. -

- - Dependencies are normally expressed through object properties - or constructor arguments. This property should just be necessary for - other kinds of dependencies such as statics (*ugh*) or database - preparation on startup. - -
-
- - - Gets or sets a value indicating whether this instance a candidate for getting autowired into some other - object. - - - true if this instance is autowire candidate; otherwise, false. - - - - - The name of the initializer method. - - -

- The default value is the constant, - in which case there is no initializer method. -

-
-
- - - Return the name of the destroy method. - - -

- The default value is the constant, - in which case there is no destroy method. -

-
-
- - - The name of the factory method to use (if any). - - -

- This method will be invoked with constructor arguments, or with no - arguments if none are specified. The - method will be invoked on the specified - . -

-
-
- - - The name of the factory object to use (if any). - - - - - Does this object definition have any constructor argument values? - - - if his object definition has at least one - element in it's - - property. - - - - - Abstract base class for object definition readers. - - -

- Provides common properties like the object registry to work on. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Simple interface for object definition readers. - - Juergen Hoeller - Rick Evans - - - - Load object definitions from the supplied . - - - The resource for the object definitions that are to be loaded. - - - The number of object definitions found - - - In the case of loading or parsing errors. - - - - - Load object definitions from the supplied . - - - The resources for the object definitions that are to be loaded. - - - The number of object definitions found - - - In the case of loading or parsing errors. - - - - - Loads the object definitions from the specified resource location. - - The resource location, to be loaded with the - IResourceLoader location . - - The number of object definitions found - - - - - Loads the object definitions from the specified resource locations. - - The the resource locations to be loaded with the - IResourceLoader of this object definition reader. - - The number of object definitions found - - - - - Gets the - - instance that this reader works on. - - - - - The against which any class names - will be resolved into instances. - - - - - The to use for anonymous - objects (wihtout explicit object name specified). - - - - - Gets the resource loader to use for resource locations. - - There is also a method - available for loading object definitions from a resource location. This is - a convenience to avoid explicit ResourceLoader handling. - The resource loader. - - - - The instance for this class (and derived classes). - - - - - Creates a new instance of the - - class. - - - The - instance that this reader works on. - - -

- This is an class, and as such exposes no public constructors. -

-
-
- - - Creates a new instance of the - - class. - - - The - instance that this reader works on. - - - The against which any class names - will be resolved into instances. - - -

- This is an class, and as such exposes no public constructors. -

-
-
- - - Load object definitions from the supplied . - - - The resource for the object definitions that are to be loaded. - - - The number of object definitions that were loaded. - - - In the case of loading or parsing errors. - - - - - Load object definitions from the supplied . - - - The resources for the object definitions that are to be loaded. - - - The number of object definitions found - - - In the case of loading or parsing errors. - - - - - Loads the object definitions from the specified resource location. - - The resource location, to be loaded with the - IResourceLoader location . - - The number of object definitions found - - - - - Loads the object definitions from the specified resource locations. - - The the resource locations to be loaded with the - IResourceLoader of this object definition reader. - - The number of object definitions found - - - - - Gets the - - instance that this reader works on. - - - - - The to use for anonymous - objects (wihtout explicit object name specified). - - - - - - The against which any class names - will be resolved into instances. - - - - - Gets or sets the resource loader to use for resource locations. - - The resource loader. - - - - Utility class that contains various methods useful for the implementation of - autowire-capable object factories. - - Juergen Hoeller - Rick Evans (.NET) - - - - Creates a new instance of the AutowireUtils class. - - -

- This is a utility class, and as such has no publicly - visible constructors. -

-
-
- - - Gets those s - that are applicable for autowiring the supplied . - - - The - (definition) that is being autowired by constructor. - - - The absolute minimum number of arguments that any returned constructor - must have. If this parameter is equal to zero (0), then all constructors - are valid (regardless of their argument count), including any default - constructor. - - - Those s - that are applicable for autowiring the supplied . - - - - - Determine a weight that represents the class hierarchy difference between types and - arguments. - - -

- A direct match, i.e. type MyInteger -> arg of class MyInteger, does not increase - the result - all direct matches means weight zero (0). A match between the argument type - and a MyInteger instance argument would increase the weight by - 1, due to the superclass () being one (1) steps up in the - class hierarchy being the last one that still matches the required type. -

-

- Therefore, with an argument of type , a - constructor taking a argument would be - preferred to a constructor taking an argument - which would be preferred to a constructor taking an - argument which would in turn be preferred - to a constructor taking an argument. -

-

- All argument weights get accumulated. -

-
- - The argument s to match. - - The arguments to match. - The accumulated weight for all arguments. -
- - - Algorithm that judges the match between the declared parameter types of a candidate method - and a specific list of arguments that this method is supposed to be invoked with. - - - Determines a weight that represents the class hierarchy difference between types and - arguments. The following a an example based on the Java class hierarchy for Integer. - A direct match, i.e. type Integer -> arg of class Integer, does not increase - the result - all direct matches means weight 0. A match between type Object and arg of - class Integer would increase the weight by 2, due to the superclass 2 steps up in the - hierarchy (i.e. Object) being the last one that still matches the required type Object. - Type Number and class Integer would increase the weight by 1 accordingly, due to the - superclass 1 step up the hierarchy (i.e. Number) still matching the required type Number. - Therefore, with an arg of type Integer, a constructor (Integer) would be preferred to a - constructor (Number) which would in turn be preferred to a constructor (Object). - All argument weights get accumulated. - - The param types. - The args. - - - - - Determines whether the given object property is excluded from dependency checks. - - The PropertyInfo of the object property. - - true if is excluded from dependency check; otherwise, false. - - - - - Sorts the supplied , preferring - public constructors and "greedy" ones (that have lots of arguments). - - -

- The result will contain public constructors first, with a decreasing number - of arguments, then non-public constructors, again with a decreasing number - of arguments. -

-
- - The array to be sorted. - -
- - - Determines whether the setter property is defined in any of the given interfaces. - - The PropertyInfo of the object property - The ISet of interfaces. - - true if setter property is defined in interface; otherwise, false. - - - - - Creates the autowire candidate resolver. - - A SimpleAutowireCandidateResolver - - - - Returns the list of that are not satisfied by . - - the filtered list. Is never null - - - - Object definition for definitions that inherit settings from their - parent (object definition). - - -

- Will use the - of the parent object definition if none is specified, but can also - override it. In the latter case, the child's - - must be compatible with the parent, i.e. accept the parent's property values - and constructor argument values (if any). -

-

- A will - inherit all of the , - , and - from it's parent - object definition, with the option to add new values. If the - , - , - and / or - - properties are specified, they will override the corresponding parent settings. -

-

- The remaining settings will always be taken from the child definition: - , - , - , - , - and - -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - -
- - - Creates a new instance of the - - class. - - - The name of the parent object. - - - - - Creates a new instance of the - - class. - - - The name of the parent object. - - - The additional property values (if any) of the child. - - - - - Creates a new instance of the - - class. - - - The name of the parent object. - - - The - to be applied to a new instance of the object. - - - The additional property values (if any) of the child. - - - - - Creates a new instance of the - - class. - - - The name of the parent object. - - - The class of the object to instantiate. - - - The - to be applied to a new instance of the object. - - - The additional property values (if any) of the child. - - - - - Creates a new instance of the - - class. - - - The name of the parent object. - - - The of the object to - instantiate. - - - The - to be applied to a new instance of the object. - - - The additional property values (if any) of the child. - - - - - Validate this object definition. - - -

- A common cause of validation failures is a missing value for the - - property; by - their very nature require that the - - be set. -

-
- - In the case of a validation failure. - -
- - - A that represents the current - . - - - A that represents the current - . - - - - - The name of the parent object definition. - - - This value is required. - - - The name of the parent object definition. - - - - - Helper class for resolving constructors and factory methods. - Performs constructor resolution through argument matching. - - - Operates on a and an . - Used by . - - Juergen Hoeller - Mark Pollack - - - - Initializes a new instance of the class for the given factory - and instantiation strategy. - - The object factory to work with. - The object factory as IAutowireCapableObjectFactory. - The instantiation strategy for creating objects. - the resolver to resolve property value placeholders if any - - - - "autowire constructor" (with constructor arguments by type) behavior. - Also applied if explicit constructor argument values are specified, - matching all remaining arguments with objects from the object factory. - - - This corresponds to constructor injection: In this mode, a Spring - object factory is able to host components that expect constructor-based - dependency resolution. - - Name of the object. - The merged object definition for the object. - The chosen chosen candidate constructors (or null if none). - The explicit argument values passed in programmatically via the getBean method, - or null if none (-> use constructor argument values from object definition) - An IObjectWrapper for the new instance - - - - Instantiate an object instance using a named factory method. - - -

- The method may be static, if the - parameter specifies a class, rather than a - instance, or an - instance variable on a factory object itself configured using Dependency - Injection. -

-

- Implementation requires iterating over the static or instance methods - with the name specified in the supplied - (the method may be overloaded) and trying to match with the parameters. - We don't have the types attached to constructor args, so trial and error - is the only way to go here. -

-
- - The name associated with the supplied . - - - The definition describing the instance that is to be instantiated. - - - Any arguments to the factory method that is to be invoked. - - - The result of the factory method invocation (the instance). - -
- - - Create an array of arguments to invoke a constructor or static factory method, - given the resolved constructor arguments values. - - When return value is null the out parameter UnsatisfiedDependencyExceptionData will contain - information for use in throwing a UnsatisfiedDependencyException by the caller. This avoids using - exceptions for flow control as in the original implementation. - - - - Resolves the - of the supplied . - - The name of the object that is being resolved by this factory. - The rod. - The wrapper. - The cargs. - Where the resolved constructor arguments will be placed. - - The minimum number of arguments that any constructor for the supplied - must have. - - -

- 'Resolve' can be taken to mean that all of the s - constructor arguments is resolved into a concrete object that can be plugged - into one of the s constructors. Runtime object - references to other objects in this (or a parent) factory are resolved, - type conversion is performed, etc. -

-

- These resolved values are plugged into the supplied - object, because we wouldn't want to touch - the s constructor arguments in case it (or any of - its constructor arguments) is a prototype object definition. -

-

- This method is also used for handling invocations of static factory methods. -

-
-
- - - Returns an array of all of those - methods exposed on the - that match the supplied criteria. - - - Methods that have this name (can be in the form of a regular expression). - - - Methods that have exactly this many arguments. - - - Methods that are static / instance. - - - The on which the methods (if any) are to be found. - - - An array of all of those - methods exposed on the - that match the supplied criteria. - - - - - Concrete implementation of the - and - - interfaces. - - -

- This class is a full-fledged object factory based on object definitions - that is usable straight out of the box. -

-

- Can be used as an object factory in and of itself, or as a superclass - for custom object factory implementations. Note that readers for - specific object definition formats are typically implemented separately - rather than as object factory subclasses. -

-

- For an alternative implementation of the - interface, - have a look at the - - class, which manages existing object instances rather than creating new - ones based on object definitions. -

-
- Juergen Hoeller - Rick Evans (.NET) - -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - Flag specifying whether to make this object factory case sensitive or not. - - - - Creates a new instance of the - class. - - The parent object factory. - - - - Creates a new instance of the - class. - - Flag specifying whether to make this object factory case sensitive or not. - The parent object factory. - - - - Find object instances that match the . - - -

- Called by autowiring. If a subclass cannot obtain information about object - names by , a corresponding exception should be thrown. -

-
- - The type of the objects to look up. - - - An of object names and object - instances that match the , or - if none is found. - - - In case of errors. - -
- - - Return the names of the objects that depend on the given object. - - -

- Called by the - - so that dependant objects are able to be disposed of first. -

-
- - The name of the object to find depending objects for. - - - The array of names of depending objects, or the empty string array if none. - - - In case of errors. - -
- - - Check whether the specified object matches the supplied . - - The name of the object to check. - - The to check for. - - - if the object matches the supplied , - or if the supplied is . - - - - - The instance for this class. - - - - - Whether to allow re-registration of a different definition with the - same name. - - - - - The mapping of object definition objects, keyed by object name. - - - - - List of object definition names, in registration order. - - - - - Resolver to use for checking if an object definition is an autowire candidate - - - - - IDictionary from dependency type to corresponding autowired value - - - - - Check if this registry contains a object definition with the given - name. - - - The name of the object to look for. - - - if this object factory contains an object - definition with the given name. - - - - - - Register a new object definition with this registry. - - - The name of the object instance to register. - - - The definition of the object instance to register. - - - If the object definition is invalid. - - - - - - Ensure that all non-lazy-init singletons are instantiated, also - considering s. - - - If one of the singleton objects could not be created. - - - - - - Register a special dependency type with corresponding autowired value. - - Type of the dependency to register. - This will typically be a base interface such as IObjectFactory, with extensions of it resolved - as well if declared as an autowiring dependency (e.g. IListableBeanFactory), - as long as the given value actually implements the extended interface. - The autowired value. This may also be an - implementation o the interface, - which allows for lazy resolution of the actual target value. - - This is intended for factory/context references that are supposed - to be autowirable but are not defined as objects in the factory: - e.g. a dependency of type ApplicationContext resolved to the - ApplicationContext instance that the object is living in. - - Note there are no such default types registered in a plain IObjectFactory, - not even for the BeanFactory interface itself. - - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - - The registered , - or null, if specified object definitions does not exist. - - - If is null or empty string. - - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - Whether to search parent object factories. - - The registered , - or null, if specified object definitions does not exist. - - - If is null or empty string. - - - - - - Return the names of all objects defined in this factory. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - - The (class or interface) to match. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - - - - - - Return the object instances that match the given object - (including subclasses). - - - The (class or interface) to match. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - An of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If any of the objects could not be created. - - - - - - Return the object instances that match the given object - (including subclasses). - - - The (class or interface) to match. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - An of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If any of the objects could not be created. - - - - - - Check whether the specified bean would need to be eagerly initialized - in order to determine its type. - - a factory-bean reference that the bean definition defines a factory method for - whether eager initialization is necessary - - - - Check whether the given bean is defined as a . - - the name of the object - the corresponding object definition - - - - Resolve the specified dependency against the objects defined in this factory. - - The descriptor for the dependency. - Name of the object which declares the present dependency. - A list that all names of autowired object (used for - resolving the present dependency) are supposed to be added to. - - the resolved object, or null if none found - - if dependency resolution failed - - - - Raises the no such object definition exception for an unresolvable dependency - - The type. - The dependency description. - The descriptor. - - - - Determines whether the specified object qualifies as an autowire candidate, - to be injected into other beans which declare a dependency of matching type. - This method checks ancestor factories as well. - - Name of the object to check. - The descriptor of the dependency to resolve. - - true if the object should be considered as an autowire candidate; otherwise, false. - - if there is no object with the given name. - - - - Determine whether the specified object definition qualifies as an autowire candidate, - to be injected into other beans which declare a dependency of matching type. - - Name of the object definition to check. - The merged object definiton to check. - The descriptor of the dependency to resolve. - - true if the object should be considered as an autowire candidate; otherwise, false. - - - - - Should object definitions registered under the same name as an - existing object definition be allowed? - - -

- If , then the new object definition will - replace (override) the existing object definition. If - , an exception will be thrown when - an attempt is made to register an object definition under the same - name as an already existing object definition. -

-

- The default is . -

-
- - is the registration of an object definition - under the same name as an existing object definition is allowed. - -
- - - Get or set custom autowire candidate resolver for this IObjectFactory to use - when deciding whether a bean definition should be considered as a - candidate for autowiring. Never null - - - - - Return the number of objects defined in this registry. - - - The number of objects defined in this registry. - - - - - - Default implementation of the - - interface. - - -

- Does not support per - loading. -

-
- Aleksandar Seovic -
- - - Central interface for factories that can create - - instances. - - -

- Allows for replaceable object definition factories using the Strategy - pattern. -

-
- Aleksandar Seovic -
- - - Factory style method for getting concrete - - instances. - - - The FullName of the of the defined object. - - The name of the parent object definition (if any). - - The against which any class names - will be resolved into instances. It can be null to register the - object class just by name. - - - An - - instance. - - - - - Factory style method for getting concrete - - instances. - - /// If no parent is specified, a RootObjectDefinition is created, otherwise a - ChildObjectDefinition. - The of the defined object. - The name of the parent object definition (if any). - The against which any class names - will be resolved into instances. - - An - - instance. - - - - - Default implementation of the interface, deleagting to - 's GenerateObjectName. - - Note that this implementation is only able to handle - subclasses such as - and - - Juergen Hoeller - Mark Pollack (.NET) - - - - Strategy interface for generating object names for object definitions - - Juergen Hoeller - Mark Pollack (.NET) - - - - Generates an object name for the given object definition. - - The object definition to generate a name for. - The object definitions registry that the given definition is - supposed to be registerd with - the generated object name - - - - Generates an object name for the given object definition. - - The object definition to generate a name for. - The object definitions registry that the given definition is - supposed to be registerd with - the generated object name - - - - An - implementation that delegates to an - that is - obtained as the result of a lookup in an associated IoC container. - - -

- This class is reserved for internal use within the framework; it is - not intended to be used by application developers using Spring.NET. -

-
- Rick Evans -
- - - Creates a new instance of the - - class. - - - The object definition that is the target of the method replacement. - - - The enclosing IoC container with which the above - is associated. - - - If either of the supplied arguments is . - - - - - Reimplements the supplied by delegating to - another - looked up in an enclosing IoC container. - - - The instance whose is to be - (re)implemented. - - - The method that is to be (re)implemented. - - The target method's arguments. - - The result of the delegated call to the looked up - . - - - - - The various modes of dependency checking. - - Rick Evans (.NET) - - - - DO not do any dependency checking. - - - - - Check object references. - - - - - Just check primitive (string, int, etc) values. - - - - - Check everything. - - - - - GenericObjectDefinition is a one-stop shop for standard object definition purposes. - Like any object definition, it allows for specifying a class plus optionally - constructor argument values and property values. Additionally, deriving from a - parent bean definition can be flexibly configured through the "parentName" property. - - In general, use this class for the purpose of - registering user-visible object definitions (which a post-processor might operate on, - potentially even reconfiguring the parent name). - Use / - where parent/child relationships happen to be pre-determined. - - - - Juergen Hoeller - Erich Eichinger - - - - Creates a new to be configured through its - object properties and configuration methods. - - - - - Creates a new as deep copy of the given - object definition. - - the original object definition to copy from - - - - Returns a representation of this - for debugging purposes. - - - - - The name of the parent object definition. - - - This value is required. - - - The name of the parent object definition. - - - - - Strategy interface for determining whether a specific object definition - qualifies as an autowire candidate for a specific dependency. - - Mark Fisher - Juergen hoeller - Mark Pollack (.NET) - - - - Determines whether the given object definition qualifies as an - autowire candidate for the given dependency. - - The object definition including object name and aliases. - The descriptor for the target method parameter or field. - - true if the object definition qualifies as autowire candidate; otherwise, false. - - - - - Responsible for creating instances corresponding to a - . - - Rod Johnson - Rick Evans (.NET) - - - - Instantiate an instance of the object described by the supplied - from the supplied . - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - An instance of the object described by the supplied - from the supplied . - - - - - Instantiate an instance of the object described by the supplied - from the supplied . - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - The to be used to instantiate - the object. - - - Any arguments to the supplied . May be null. - - - An instance of the object described by the supplied - from the supplied . - - - - - Instantiate an instance of the object described by the supplied - from the supplied . - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - The to be used to get the object. - - - Any arguments to the supplied . May be null. - - - An instance of the object described by the supplied - from the supplied . - - - - - Represents an override of a method that looks up an object in the same IoC context. - - -

- Methods eligible for lookup override must not have arguments. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - Represents the override of a method on a managed object by the IoC container. - - -

- Note that the override mechanism is not intended as a generic means of - inserting crosscutting code: use AOP for that. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - -

- This is an class, and as such exposes no - public constructors. -

-
- - The name of the method that is to be overridden. - - - If the supplied is or - contains only whitespace character(s). - -
- - - Does this - match the supplied ? - - -

- By 'match' one means does this particular - - instance apply to the supplied ? -

-

- This allows for argument list checking as well as method name checking. -

-
- The method to be checked. - - if this override matches the supplied - . - -
- - - The name of the method that is to be overridden. - - - - - Is the method that is ot be injected - () - to be considered as overloaded? - - -

- If (the default), then argument type matching - will be performed (because one would not want to override the wrong - method). -

-

- Setting the value of this property to can be used - to optimize runtime performance (ever so slightly). -

-
-
- - - Creates a new instance of the - class. - - -

- Methods eligible for lookup override must not have arguments. -

-
- - The name of the method that is to be overridden. - - - The name of the object in the current IoC context that the - dependency injected method must return. - - - If either of the supplied arguments is or - contains only whitespace character(s). - -
- - - Does this - match the supplied ? - - The method to be checked. - - if this override matches the supplied . - - - If the supplied is . - - - - - A that represents the current - . - - - A that represents the current - . - - - - - The name of the object in the current IoC context that the - dependency injected method must return. - - - - - An - implementation that simply returns the result of a lookup in an - associated IoC container. - - -

- This class is Spring.NET's implementation of Dependency Lookup via - Method Injection. -

-

- This class is reserved for internal use within the framework; it is - not intended to be used by application developers using Spring.NET. -

-
- Rick Evans -
- - - Creates a new instance of the - class. - - - The object definition that is the target of the method replacement. - - - The enclosing IoC container with which the above - is associated. - - - If either of the supplied arguments is . - - - - - Reimplements the supplied by returning the - result of an object lookup in an enclosing IoC container. - - - The instance whose is to be - (re)implemented. - - - The method that is to be (re)implemented. - - The target method's arguments. - - The result of the object lookup. - - - - - An - implementation that supports method injection. - - -

- Classes that want to take advantage of method injection must meet some - stringent criteria. Every method that is to be method injected - must be defined as either or - . An - will be thrown if these criteria are not met. -

-
- Rick Evans -
- - - Simple object instantiation strategy for use in - implementations. - - -

- Does not support method injection, although it provides hooks for subclasses - to override to add method injection support, for example by overriding methods. -

-
- Rod Johnson - Rick Evans (.NET) - -
- - - The shared instance for this class (and derived classes). - - - - - Instantiate an instance of the object described by the supplied - from the supplied . - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - An instance of the object described by the supplied - from the supplied . - - - - - Gets the zero arg ConstructorInfo object, if the type offers such functionality. - - The type. - Zero argument ConstructorInfo - - If the type does not have a zero-arg constructor. - - - - - Instantiate an instance of the object described by the supplied - from the supplied . - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - The to be used to instantiate - the object. - - - Any arguments to the supplied . May be null. - - - An instance of the object described by the supplied - from the supplied . - - - - - Instantiate an instance of the object described by the supplied - from the supplied . - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - The to be used to get the object. - - - Any arguments to the supplied . May be null. - - - An instance of the object described by the supplied - from the supplied . - - - - - Instantiate an instance of the object described by the supplied - from the supplied , - injecting methods as appropriate. - - -

- The default implementation of this method is to throw a - . -

-

- Derived classes can override this method if they can instantiate an object - with the Method Injection specified in the supplied - . Instantiation should use a no-arg constructor. -

-
- - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be a - or zero length string if we're autowiring an object that - doesn't belong to the supplied . - - - The owning - - - An instance of the object described by the supplied - from the supplied . - -
- - - Instantiate an instance of the object described by the supplied - from the supplied , - injecting methods as appropriate. - - -

- The default implementation of this method is to throw a - . -

-

- Derived classes can override this method if they can instantiate an object - with the Method Injection specified in the supplied - . Instantiation should use the supplied - and attendant . -

-
- - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the null - or zero length string if we're autowiring an object that doesn't belong - to the supplied . - - - The owning - - - The to be used to instantiate - the object. - - - Any arguments to the supplied . May be null. - - - An instance of the object described by the supplied - from the supplied . - -
- - - The name of the dynamic assembly that holds dynamically created code - - - - - A cache of generated instances, keyed on - the object name for which the was generated. - - - - - Instantiate an instance of the object described by the supplied - from the supplied , - injecting methods as appropriate. - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the - or zero length string if we're autowiring an - object that doesn't belong to the supplied - . - - - The owning - - - An instance of the object described by the supplied - from the supplied . - - - - - - Instantiate an instance of the object described by the supplied - from the supplied , - injecting methods as appropriate. - - - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the - or zero length string if we're autowiring an - object that doesn't belong to the supplied - . - - - The owning - - - The to be used to instantiate - the object. - - - Any arguments to the supplied . May be null. - - - An instance of the object described by the supplied - from the supplied . - - - - - - Instantiate an instance of the object described by the supplied - from the supplied , - injecting methods as appropriate. - - -

- This method dynamically generates a subclass that supports method - injection for the supplied . It then - instantiates an new instance of said type using the constructor - identified by the supplied , - passing the supplied to said - constructor. It then manually injects (generic) method replacement - and method lookup instances (of - ) into - the new instance: those methods that are 'method-injected' will - then delegate to the approriate - - instance to effect the actual method injection. -

-
- - The definition of the object that is to be instantiated. - - - The name associated with the object definition. The name can be the - or zero length string if we're autowiring an - object that doesn't belong to the supplied - . - - - The owning - - - The parameter s to use to find the - appropriate constructor to invoke. - - - The aguments that are to be passed to the appropriate constructor - when the object is being instantiated. - - - A new instance of the defined by the - supplied . - -
- - - A factory that generates subclasses of those - classes that have been configured for the Method-Injection form of - Dependency Injection. - - -

- This class is designed as for one-shot usage; i.e. it must - be used to generate exactly one method injected subclass and - then discarded (it maintains state in instance fields). -

-
-
- - - The name of the generated - property (for method replacement). - - -

- Exists so that clients of this class can use this name to set properties reflectively - on the dynamically generated subclass. -

-
-
- - - The name of the generated - property (for method lookup). - - -

- Exists so that clients of this class can use this name to set properties reflectively - on the dynamically generated subclass. -

-
-
- - - Creates a new instance of the - class. - - - The in which - the generated is to be defined. - - - The object definition that is the target of the method injection. - - - If either of the supplied arguments is . - - - - - Builds a suitable for Method-Injection. - - - A suitable for Method-Injection. - - - - - Defines overrides for those methods that are configured with an appropriate - . - - - The overarching that is defining - the generated . - - - - - Override the supplied with the logic - encapsulated by the - - defined by the supplied . - - - The builder for the subclass that is being generated. - - - The method on the superclass that is to be overridden. - - - The field defining the - - that the overridden method will delegate to to do the 'actual' - method injection logic. - - - - - Defines the parameters to the method that is being overridden. - - -

- Since we are simply overridding a method (in this method - injection context), all we do here is simply copy the - parameters (since we want a method with the exact same parameters). -

-
- - The parameters to the original method that is being overridden. - - - The builder we are using to define the new overridden method. - -
- - - Generates the MSIL for actually returning a return value if the - supplied is not - . - - - The definition of the return value; if , it - means that no return value is to required (a void - return type). - - - The to emit - the MSIL to. - - - - - Generates the MSIL for a return value if the supplied - returns a value. - - - The method to be checked. - - - The to emit - the MSIL to. - - - The return value, or if the method does not - return a value (has a void return type). - - - - - Pushes (sets up) the arguments for a call to the - - method of an appropriate - . - - - The parameters to the original method (will be bundled - up into a generic object[] and passed as the third - argument to the - - invocation. - - - The to emit - the MSIL to. - - - - - Simply generates the IL for a write only property for the - . - - - The in which the property is defined. - - - The name of the (to be) generated property. - - - The (instance) field that the property is to 'set'. - - - - - A collection (with set semantics) of method overrides, determining which, if any, - methods on a managed object the Spring.NET IoC container will override at runtime. - - Rod Johnson - Rick Evans - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - -

- Deep copy constructoe. -

-
- - The instance supplying initial overrides for this new instance. - -
- - - Copy all given method overrides into this object. - - - The overrides to be copied into this object. - - - - - Adds the supplied to the overrides contained - within this instance. - - - The to be - added. - - - - - Adds the supplied to the overloaded method names - contained within this instance. - - - The overloaded method name to be added. - - - - - Returns true if the supplied is present within - the overloaded method names contained within this instance. - - - The overloaded method name to be checked. - - - True if the supplied is present within - the overloaded method names contained within this instance. - - - - - Return the override for the given method, if any. - - - The method to check for overrides for. - - - the override for the given method, if any. - - - - - Returns an that can iterate - through a collection. - - -

- The returned is the - exposed by the - - property. -

-
- - An that can iterate through a - collection. - -
- - - The collection of method overrides. - - - - - Returns true if this instance contains no overrides. - - - - - Programmatic means of constructing a using the builder pattern. Intended primarily - for use when implementing custom namespace parsers. - - Set methods are used instead of properties, so that chaining of methods can be used to create - 'one-liner'definitions that set multiple properties at one. - Rod Johnson - Rob Harrop - Juergen Hoeller - Mark Pollack (.NET) - - - - Initializes a new instance of the class, private - to force use of factory methods. - - - - - Creates a new used to construct a . - - - - - Creates a new used to construct a . - - the of the object that the definition is being created for - - - - Creates a new used to construct a . - - the name of the of the object that the definition is being created for - - - - Create a new ObjectDefinitionBuilder used to construct a root object definition. - - The object definition factory. - The type name of the object. - A new ObjectDefinitionBuilder instance. - - - - Create a new ObjectDefinitionBuilder used to construct a root object definition. - - The object definition factory. - Name of the object type. - Name of the factory method. - A new ObjectDefinitionBuilder instance. - - - - Create a new ObjectDefinitionBuilder used to construct a root object definition. - - The object definition factory. - Type of the object. - A new ObjectDefinitionBuilder instance. - - - - Create a new ObjectDefinitionBuilder used to construct a root object definition. - - The object definition factory. - Type of the object. - Name of the factory method. - A new ObjectDefinitionBuilder instance. - - - - Create a new ObjectDefinitionBuilder used to construct a child object definition.. - - The object definition factory. - Name of the parent object. - - - - - Adds the property value under the given name. - - The name. - The value. - The current ObjectDefinitionBuilder. - - - - Adds a reference to the specified object name under the property specified. - - The name. - Name of the object. - The current ObjectDefinitionBuilder. - - - - Adds an index constructor arg value. The current index is tracked internally and all addtions are - at the present point - - The constructor arg value. - The current ObjectDefinitionBuilder. - - - - Adds a reference to the named object as a constructor argument. - - Name of the object. - - - - - Sets the name of the factory method to use for this definition. - - The factory method. - The current ObjectDefinitionBuilder. - - - - Sets the name of the factory object to use for this definition. - - The factory object. - The factory method. - The current ObjectDefinitionBuilder. - - - - Sets whether or not this definition describes a singleton object. - - if set to true [singleton]. - The current ObjectDefinitionBuilder. - - - - Sets whether objects or not this definition is abstract. - - if set to true [flag]. - The current ObjectDefinitionBuilder. - - - - Sets whether objects for this definition should be lazily initialized or not. - - if set to true [lazy]. - The current ObjectDefinitionBuilder. - - - - Sets the autowire mode for this definition. - - The autowire mode. - The current ObjectDefinitionBuilder. - - - - Sets the dependency check mode for this definition. - - The dependency check. - The current ObjectDefinitionBuilder. - - - - Sets the name of the destroy method for this definition. - - Name of the method. - The current ObjectDefinitionBuilder. - - - - Sets the name of the init method for this definition. - - Name of the method. - The current ObjectDefinitionBuilder. - - - - Sets the resource description for this definition. - - The resource description. - The current ObjectDefinitionBuilder. - - - - Adds the specified object name to the list of objects that this definition depends on. - - Name of the object. - The current ObjectDefinitionBuilder. - - - - Gets the current object definition in its raw (unvalidated) form. - - The raw object definition. - - - - Validate and gets the object definition. - - The object definition. - - - - Utility methods that are useful for - - implementations. - - Juergen Hoeller - Rick Evans (.NET) - - - - - The string used as a separator in the generation of synthetic id's - for those object definitions explicitly that aren't assigned one. - - -

- If a name or parent object definition - name is not unique, "#1", "#2" etc will be appended, until such - time that the name becomes unique. -

-
-
- - - Registers the supplied with the - supplied . - - -

- This is a convenience method that registers the - - of the supplied under the - - property value of said . If the - supplied has any - , - then those aliases will also be registered with the supplied - . -

-
- - The object definition holder containing the - that - is to be registered. - - - The registry that the supplied - is to be registered with. - - - If either of the supplied arguments is . - - - If the could not be registered - with the . - -
- - - Generates an object definition name for the supplied - that is guaranteed to be unique - within the scope of the supplied . - - The - that requires a generated name. - The - - that the supplied is to be - registered with (needed so that the uniqueness of any generated - name can be guaranteed). - if set to true if the given object - definition will be registed as an inner object or as a top level objener objects - verses top level objects. - - An object definition name for the supplied - that is guaranteed to be unique - within the scope of the supplied and - never . - - - If either of the or - arguments is . - - - If a unique name cannot be generated. - - - - - Generates the name of the object for a top-level object definition unique within the given object factory. - - The object definition to generate an object name for. - The registry to check for existing names. - The generated object name - if no unique name can be generated for the given - object definition - - - - Factory method for getting concrete - instances. - - - The name of the event handler method. This may be straight text, a regular - expression, , or empty. - - - The name of the event being wired. This too may be straight text, a regular - expression, , or empty. - - - A concrete - instance. - - - - - Creates a new instance of the - class. - - -

- This is a utility class, and as such exposes no public constructors. -

-
-
- - - Thrown when the validation of an object definition failed. - - Juergen Hoeller - Rick Evans (.NET) - - - - Creates a new instance of the - - class. - - - - - Creates a new instance of the - - class. - - The detail message. - - - - Creates a new instance of the - - class. - - - The detail message. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionValidationException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Helper class for use in object factory implementations, - resolving values contained in object definition objects - into the actual values applied to the target object instance. - - - Used by . - - Juergen Hoeller - Mark Pollack (.NET) - - - - Initializes a new instance of the class. - - The object factory. - - - - Given a property value, return a value, resolving any references to other - objects in the factory if necessary. - - -

- The value could be : - - -

- An , - which leads to the creation of a corresponding new object instance. - Singleton flags and names of such "inner objects" are always ignored: inner objects - are anonymous prototypes. -

- - -

- A , which must - be resolved. -

-
- -

- An . This is a - special placeholder collection that may contain - s or - collections that will need to be resolved. -

-
- -

- An ordinary object or , in which case it's left alone. -

-
- -

-
- - The name of the object that is having the value of one of its properties resolved. - - - The definition of the named object. - - - The name of the property the value of which is being resolved. - - - The value of the property that is being resolved. - -
- - - TODO - - - The name of the object that is having the value of one of its properties resolved. - - - The definition of the named object. - - - The name of the property the value of which is being resolved. - - - The value of the property that is being resolved. - - - - - Resolve the target type of the passed . - - The who's target type is to be resolved - The resolved target type, if any. otherwise. - - - - Resolves an inner object definition. - - - The name of the object that surrounds this inner object definition. - - - The name of the inner object definition... note: this is a synthetic - name assigned by the factory (since it makes no sense for inner object - definitions to have names). - - - The name of the property the value of which is being resolved. - - - The definition of the inner object that is to be resolved. - - - if the owner of the property is a singleton. - - - The resolved object as defined by the inner object definition. - - - - - Checks the given bean name whether it is unique. If not already unique, - a counter is added, increasing the counter until the name is unique. - - Original Name of the inner object. - The Adapted name for the inner object - - - - Resolve a reference to another object in the factory. - - - The name of the object that is having the value of one of its properties resolved. - - - The definition of the named object. - - - The name of the property the value of which is being resolved. - - - The runtime reference containing the value of the property. - - A reference to another object in the factory. - - - - Object definition reader for a simple properties format. - - - Provides object definition registration methods for - and - instances. Typically applied to a - . - - Rod Johnson - Juergen Hoeller - Simon White (.NET) - - - - Value of a T/F attribute that represents true. - Anything else represents false. Case seNsItive. - - - - - Separator between object name and property name. - - - - - Prefix for the class property of a root object definition. - - - - - Special string added to distinguish if the object will be - a singleton. - - -

- Default is true. -

-
- -

- owner.(singleton)=true -

-
-
- - - Special string added to distinguish if the object will be - lazily initialised. - - -

- Default is false. -

-
- -

- owner.(lazy-init)=true -

-
-
- - - Reserved "property" to indicate the parent of a child object definition. - - - - - Property suffix for references to other objects in the current - : e.g. - owner.dog(ref)=fido. - - -

- Whether this is a reference to a singleton or a prototype - will depend on the definition of the target object. -

-
-
- - - Prefix before values referencing other objects. - - - - - Creates a new instance of the - - class. - - - The - instance that this reader works on. - - - - - Load object definitions from the supplied . - - - The resource for the object definitions that are to be loaded. - - - The number of object definitions that were loaded. - - - In the case of loading or parsing errors. - - - - - Load object definitions from the specified properties file. - - - The resource descriptor for the properties file. - - - The match or filter for object definition names, e.g. 'objects.' - - in case of loading or parsing errors - the number of object definitions found - - - - Register object definitions contained in a - , using all property keys (i.e. - not filtering by prefix). - - - The containing object definitions. - - - In case of loading or parsing errors. - - The number of object definitions registered. - - - - Register object definitions contained in a - . - - -

- Similar syntax as for an . - This method is useful to enable standard .NET internationalization support. -

-
- - The containing object definitions. - - - The match or filter for object definition names, e.g. 'objects.' - - - In case of loading or parsing errors. - - The number of object definitions registered. -
- - - Register object definitions contained in an - , using all property keys - (i.e. not filtering by prefix). - - - The containing object definitions. - - - In case of loading or parsing errors. - - The number of object definitions registered. - - - - Registers object definitions contained in an - using all property keys ( i.e. not filtering by prefix ) - - The containing - object definitions. - - - In case of loading or parsing errors. - - The number of object definitions registered. - - - - Register object definitions contained in a - . - - -

- Ignores ineligible properties. -

-
- IDictionary name -> property (String or Object). Property values - will be strings if coming from a Properties file etc. Property names - (keys) must be strings. Type keys must be strings. - - - The match or filter within the keys in the map: e.g. 'objects.' - - - In case of loading or parsing errors. - - The number of object definitions found. -
- - - Register object definitions contained in a - . - - -

- Ignores ineligible properties. -

-
- IDictionary name -> property (String or Object). Property values - will be strings if coming from a Properties file etc. Property names - (keys) must be strings. Type keys must be strings. - - - The match or filter within the keys in the map: e.g. 'objects.' - - - The description of the resource that the - came from (for logging purposes). - - - In case of loading or parsing errors. - - The number of object definitions found. -
- - - Get all property values, given a prefix (which will be stripped) - and add the object they define to the factory with the given name - - The name of the object to define. - - The containing string pairs. - - The prefix of each entry, which will be stripped. - - The description of the resource that the - came from (for logging purposes). - - - In case of loading or parsing errors. - - - - - Name of default parent object - - - - - Gets or sets object definition factory to use. - - - - - A plain-vanilla object definition. - - -

- This is the most common type of object definition; - instances - do not derive from a parent - , and usually - (but not always - see below) have an - - and (optionally) some - and - . -

-

- Note that - instances do not have to specify an - : - This can be useful for deriving - instances - from such definitions, each with it's own - , - inheriting common property values and other settings from the parent. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - -
- - - Creates a new instance of the - class. - - - - - Creates a new instance of the - - class. - - - The of the object to instantiate. - - - - - Creates a new instance of the - - class. - - - The of the object to instantiate. - - - if this object definition defines a singleton object. - - - - - Creates a new instance of the - class - for a singleton, providing property values and constructor arguments. - - - The of the object to instantiate. - - - The - to be applied to a new instance of the object. - - - The to be applied to - a new instance of the object. - - - - - Creates a new instance of the - class - for a singleton using the supplied - . - - - The of the object to instantiate. - - - The autowiring mode. - - - - - Creates a new instance of the - class - for a singleton using the supplied - . - - - The of the object to instantiate. - - - The autowiring mode. - - - Whether to perform a dependency check for objects (not - applicable to autowiring a constructor, thus ignored there) - - - - - Creates a new instance of the - class - with the given singleton status, providing property values. - - - The of the object to instantiate. - - - The to be applied to - a new instance of the object. - - - - - Creates a new instance of the - class - with the given singleton status, providing property values. - - - The of the object to instantiate. - - - The to be applied to - a new instance of the object. - - - if this object definition defines a singleton object. - - - - - Creates a new instance of the - class - for a singleton, providing property values and constructor arguments. - - -

- Takes an object class name to avoid eager loading of the object class. -

-
- - The assembly qualified of the object to instantiate. - - - The to be applied to - a new instance of the object. - - - The - to be applied to a new instance of the object. - -
- - - Creates a new instance of the - class. - - -

- Deep copy constructor. -

-
- - The definition that is to be copied. - -
- - - Validate this object definition. - - - In the case of a validation failure. - - - - - A that represents the current - . - - - A that represents the current - . - - - - - Is always null for a . - - - It is safe to request this property's value. Setting any other value than null will - raise an . - - Raised on any attempt to set a non-null value on this property. - - - - A implementation to use that checks - the object definitions only (no attributes) - - Mark Fisher - Mark Pollack (.NET) - - - - Determines whether the given object definition qualifies as an - autowire candidate for the given dependency. - - The object definition including object name and aliases. - The descriptor for the target method parameter or field. - - true if the object definition qualifies as autowire candidate; otherwise, false. - - - - - Static factory that permits the registration of existing singleton instances. - - -

- Does not have support for prototype objects, aliases, and post startup object - configuration. -

-

- Serves as a simple example implementation of the - interface, that manages existing object instances as opposed to creating new ones - based on object definitions. -

-

- The - method is not supported by this class; this class deals exclusively with - existing singleton instances, thus the methods mentioned previously make little sense in this context. -

-
- Rod Johnson - Juergen Hoeller - Simon White (.NET) -
- - - Map from object name to object instance. - - - - - This method is not supported by . - - - - - - Return an instance of the given object name. - - The name of the object to return. - The instance of the object. - - is not currently supported. - - - - - - Return an instance (possibly shared or independent) of the given object name. - - -

- This method allows an object factory to be used as a replacement for the - Singleton or Prototype design pattern. -

-

- Note that callers should retain references to returned objects. There is no - guarantee that this method will be implemented to be efficient. For example, - it may be synchronized, or may need to run an RDBMS query. -

-

- Will ask the parent factory if the object cannot be found in this factory - instance. -

-
- The name of the object to return. - - The arguments to use if creating a prototype using explicit arguments to - a static factory method. If there is no factory method and the - arguments are not null, then match the argument values by type and - call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the supplied is . - -
- - - Return an instance (possibly shared or independent) of the given object name. - - The name of the object to return. - - The the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - - The arguments to use if creating a prototype using explicit arguments to - a factory method. If there is no factory method and the - supplied array is not , then - match the argument values by type and call the object's constructor. - - The instance of the object. - - If there's no such object definition. - - - If the object could not be created. - - - If the object is not of the required type. - - - If the supplied is . - - - - - - Return an instance of the given object name. - - The name of the object to return. - - the object may match. Can be an interface or - superclass of the actual class. For example, if the value is the - class, this method will succeed whatever the - class of the returned instance. - - The instance of the object. - - - - - Does this object factory contain an object with the given name? - - The name of the object to query. - True if an object with the given name is defined. - - - - Is this object a singleton? - - -

- That is, will - or - always return the same object? -

-
- The name of the object to query. - True if the named object is a singleton. - - If there's no such object definition. - -
- - - Determines whether the specified object name is prototype. That is, will GetObject - always return independent instances? - - This method returning false does not clearly indicate a singleton object. - It indicated non-independent instances, which may correspond to a scoped object as - well. use the IsSingleton property to explicitly check for a shared - singleton instance. - Translates aliases back to the corresponding canonical object name. Will ask the - parent factory if the object can not be found in this factory instance. - - - - The name of the object to query - - true if the specified object name will always deliver independent instances; otherwise, false. - - if there is no object with the given name. - - - - Determine the type of the object with the given name. - - -

- More specifically, checks the type of object that - would return. - For an , returns the type - of object that the creates. -

-
- The name of the object to query. - - The of the object or if - not determinable. - -
- - - Determines whether the object with the given name matches the specified type. - - The name of the object to query. - Type of the target to match against. - - true if the object type matches; otherwise, false - if it doesn't match or cannot be determined yet. - - Ff there is no object with the given name - - - - - Return the aliases for the given object name, if defined. - - The object name to check for aliases. - The aliases, or an empty array if none. - - If there's no such object definition. - - - - - Not supported. - - The name of the object. - - The registered - . - - - Always, as object definitions are not supported by this - implementation. - - - - - Return the registered - for the - given object, allowing access to its property values and constructor - argument values. - - The name of the object. - Whether to search parent object factories. - - The registered - . - - - If there is no object with the given name. - - - In the case of errors. - - - - - Return the names of all objects defined in this factory. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - - - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - -

- Will not consider s, - as the type of their created objects is not known before instantiation. -

-
- - The names of all objects defined in this factory, or an empty array if none - are defined. - -
- - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - - The (class or interface) to match, or - for all object names. - - -

- Does consider objects created by s, - or rather it considers the type of objects created by - (which means that - s will be instantiated). -

-

- Does not consider any hierarchy this factory may participate in. -

-
- - The names of all objects defined in this factory, or an empty array if none - are defined. - -
- - - Return the names of objects matching the given - (including subclasses), judging from the object definitions. - - -

- Since this implementation of the - - interface does not support the notion of ptototype objects, the - parameter is ignored. -

-
- - The (class or interface) to match, or - for all object names. - - - Whether to include prototype objects too or just singletons (also applies to - s). Ignored. - - - Whether to include s too - or just normal objects. - - - The names of all objects defined in this factory, or an empty array if none - are defined. - - -
- - - Tests whether this object factory contains an object definition for the - specified object name. - - The object name to query. - - True if an object defintion is contained within this object factory. - - - - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - -

- This version of the - method matches all kinds of object definitions, be they singletons, prototypes, or - s. Typically, the results - of this method call will be the same as a call to - IListableObjectFactory.GetObjectsOfType(type,true,true) . -

-
- - The (class or interface) to match. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - -
- - - Return the object instances that match the given object - (including subclasses), judging from either object - definitions or the value of - in the case of - s. - - - The (class or interface) to match. - - - Whether to include prototype objects too or just singletons (also applies to - s). - - - Whether to include s too - or just normal objects. - - - A of the matching objects, - containing the object names as keys and the corresponding object instances - as values. - - - If the objects could not be created. - - - - - Add a new singleton object. - - - The name to be associated with the object name. - - The singleton object. - - - - Injects dependencies into the supplied instance - using the named object definition. - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - This feature is not currently supported. - - - - - - Injects dependencies into the supplied instance - using the supplied . - - - The object instance that is to be so configured. - - - The name of the object definition expressing the dependencies that are to - be injected into the supplied instance. - - - An object definition that should be used to configure object. - - - - - - Defines a method to release allocated unmanaged resources. - - - - - Determine whether this object factory treats object names case-sensitive or not. - - - - - Return the number of objects defined in the factory. - - - The number of objects defined in the factory. - - - - - Return an instance of the given object name. - - The name of the object to return. - The instance of the object. - - - - - Abstract implementation providing - a number of convenience methods and a - template method - that subclasses must override to provide the actual parsing logic. - - - Use this implementation when you want - to parse some arbitrarily complex XML into one or more - ObjectDefinitions. If you just want to parse some - XML into a single IObjectDefinition, you may wish to consider - the simpler convenience extensions of this class, namely - and - - - Rob Harrop - Juergen Hoeller - Rick Evans - Mark Pollack (.NET) - - - - Interface used to handle custom, top-level tags. - - Implementations are free to turn the metadata in the custom tag into as - many as required. - - Rob Harrop - Mark Pollack (.NET) - - - - Parse the specified XmlElement and register the resulting - ObjectDefinitions with the IObjectDefinitionRegistry - embedded in the supplied - - -

- This method is never invoked if the parser is namespace aware - and was called to process the root node. -

-
- - The element to be parsed. - - - TThe object encapsulating the current state of the parsing process. - Provides access to a IObjectDefinitionRegistry - - - The primary object definition. - -
- - - Constant for the ID attribute - - - - - Parse the specified XmlElement and register the resulting - ObjectDefinitions with the IObjectDefinitionRegistry - embedded in the supplied - - The element to be parsed. - TThe object encapsulating the current state of the parsing process. - Provides access to a IObjectDefinitionRegistry - The primary object definition. - -

- This method is never invoked if the parser is namespace aware - and was called to process the root node. -

-
-
- - - Resolves the ID for the supplied . - - - When using generation, a name is generated automatically. - Otherwise, the ID is extracted from the "id" attribute, potentially with a - fallback to a generated id. - - The element that the object definition has been built from. - The object definition to be registered. - The the object encapsulating the current state of the parsing process; - provides access to a - the resolved id - - if no unique name could be generated for the given object definition - - - - - Registers the supplied with the supplied - . - - Subclasses can override this method to control whether or not the supplied - is actually even registered, or to - register even more objects. - - The default implementation registers the supplied - with the supplied only if the IsNested - parameter is false, because one typically does not want inner objects - to be registered as top level objects. - - - - The object definition to be registered. - The registry that the bean is to be registered with. - - - - Returns the value of the element's attribute or null, if the attribute is not specified. - - - This is a helper for bypassing the behavior of - to return if the attribute does not exist. - - - - - Returns the value of the element's attribute or , - if the attribute is not specified. - - - This is a helper for bypassing the behavior of - to return if the attribute does not exist. - - - - - Central template method to actually parse the supplied XmlElement - into one or more IObjectDefinitions. - - The element that is to be parsed into one or more s - The the object encapsulating the current state of the parsing process; - provides access to a - The primary IObjectDefinition resulting from the parsing of the supplied XmlElement - - - - Gets a value indicating whether an ID should be generated instead of read - from the passed in XmlElement. - - Note that this flag is about always generating an ID; the parser - won't even check for an "id" attribute in this case. - - true if should generate id; otherwise, false. - - - - Gets a value indicating whether an ID should be generated instead if the - passed in XmlElement does not specify an "id" attribute explicitly. - - Disabled by default; subclasses can override this to enable ID generation - as fallback: The parser will first check for an "id" attribute in this case, - only falling back to a generated ID if no value was specified. - - true if should generate id if no value was specified; otherwise, false. - - - - - Convenient base class for when there exists a one-to-one mapping - between attribute names on the element that is to be parsed and - the property names on the Type being configured. - - - - - Mark Pollack - - - - Base Type for those implementations that - need to parse and define just a single IObjectDefinition. - - - Extend this parser Type when you want to create a single object definition - from an arbitrarily complex XML element. You may wish to consider extending - the when you want to create a - single Object definition from a relatively simple custom XML element. - The resulting ObjectDefinition will be automatically registered - with the ObjectDefinitionRegistry. Your job simply is to parse the - custom XML element into a single ObjectDefinition - - Rob Harrop - Juergen Hoeller - Rick Evans - Mark Pollack (.NET) - - - - Central template method to actually parse the supplied XmlElement - into one or more IObjectDefinitions. - - The element that is to be parsed into one or more s - The the object encapsulating the current state of the parsing process; - provides access to a - - The primary IObjectDefinition resulting from the parsing of the supplied XmlElement - - - - - Determine the name for the parent of the currently parsed object, - in case of the current object being defined as a child object. - The default implementation returns null - indicating a root object definition. - - - the name of the parent object for the currently parsed object. - - - - Gets the type of the object corresponding to the supplied XmlElement. - - Note that, for application classes, it is generally preferable to override - GetObjectTypeName instad, in order to avoid a direct - dependence on the object implementation class. The ObjectDefinitionParser - and its IXmlObjectDefinitionParser (namespace parser) can be used within an - IDE add-in then, even if the application classses are not available in the add-ins - AppDomain. - - The element. - The Type of the class that is being defined via parsing the supplied - Element. - - - - Gets the name of the object type name (FullName) corresponding to the supplied XmlElement. - - The element. - The type name of the object that is being defined via parsing the supplied - XmlElement. - - - - Parse the supplied XmlElement and populate the supplied ObjectDefinitionBuilder as required. - - The default implementation delegates to the DoParse version without - ParameterContext argument. - The element. - The parser context. - The builder used to define the IObjectDefinition. - - - - Parse the supplied XmlElement and populate the supplied ObjectDefinitionBuilder as required. - - The default implementation does nothing. - The element. - The builder used to define the IObjectDefinition. - - - - Default implementation of the interface. - Resolves namespace URIs to implementation types based on mappings. - - Erich Eichinger - - - - - - Used by to locate - implementations for a particular namespace URI. - - TODO (EE): clarify naming of INamespaceParser (SPR/NET) vs. INamespaceHandler (SPR/Java), thus internal for now - Erich Eichinger - - - - - - - Lookup a for the given namespace URI. - - the namespace URI - the located namespace handler or null - - - - Resolve the namespace URI and return the corresponding - implementation. - - the namespace URI to get the matching parser for. - the matching parser or null - - - - XML resource reader. - - -

- Navigates through an XML resource and invokes parsers registered - with the . -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - SPI for parsing an XML document that contains Spring object definitions. - Used by for actually parsing a DOM - document. - - Instantiated per document to parse: Implementations can hold state in - instance variables during the execution of the RegisterObjectDefinitions - method, for example global settings that are defined for all object definitions - in the document. - - Juergen Hoeller - Rob Harrop - Mark Pollack (.NET) - - - - - Read object definitions from the given DOM element, and register - them with the given object registry. - - The DOM element containing object definitions, usually the - root (document) element. - The current context of the reader. Includes - the resource being parsed - - The number of object definitions that were loaded. - - - In case of parsing errors. - - - - - The shared instance for this class (and derived classes). - - - - - Creates a new instance of the DefaultObjectDefinitionDocumentReader class. - - - - - Read object definitions from the given DOM element, and register - them with the given object registry. - - The DOM element containing object definitions, usually the - root (document) element. - The current context of the reader. Includes - the resource being parsed - - The number of object definitions that were loaded. - - - In case of parsing errors. - - - - - Parses object definitions starting at the given - using the passed . - - The root element to start parsing from. - The instance to use. - - in case an error happens during parsing and registering object definitions - - - - - Process an alias element. - - - - - Process the object element - - - - - Loads external XML object definitions from the resource described by the supplied - . - - The XML element describing the resource. - - If the resource could not be imported. - - - - - Parses the given alias element, registering the alias with the registry. - - The alias element. - The registry. - - - - Parse an object definition and register it with the object factory.. - - The element containing the object definition. - The helper. - - - - - - Allow the XML to be extensible by processing any custom element types last, - after we finished processing the objct definitions. This method is a natural - extension point for any other custom post-processing of the XML. - - The default implementation is empty. Subclasses can override this method to - convert custom elements into standard Spring object definitions, for example. - Implementors have access to the parser's object definition reader and the - underlying XML resource, through the corresponding properties. - - - The root. - - - - Allow the XML to be extensible by processing any custom element types first, - before we start to process the object definitions. - - This method is a natural - extension point for any other custom pre-processing of the XML. -

The default implementation is empty. Subclasses can override this method to - convert custom elements into standard Spring object definitions, for example. - Implementors have access to the parser's object definition reader and the - underlying XML resource, through the corresponding properties. -

-
- The root element of the XML document. -
- - - Creates an instance for the given and element. - - the to create the - the root to start reading from - a new instance - - - - Gets the reader context. - - The reader context. - - - - Simple class that holds the defaults specified at the <objects> - level in a standard Spring XML object definition document: - default-lazy-init, default-autowire, etc. - - Juergen Hoeller - Mark Pollack (.NET) - - - - Gets or sets the autowire setting for the document that's currently parsed. - - The autowire. - - - - Gets or sets the dependency-check setting for the document that's currently parsed - - The dependency check. - - - - Gets or sets the lazy-init flag for the document that's currently parsed. - - The lazy init. - - - - Gets or sets the merge setting for the document that's currently parsed. - - The merge. - - - - Strategy interface for parsing XML object definitions. Equivalent to Spring/Java's NamespaceHandler interface. - - -

- Used by - for actually parsing a DOM document or - fragment. -

-
- Juergen Hoeller - Rick Evans (.NET) - Sandu Turcan (.NET) -
- - - Invoked by after construction but before any - elements have been parsed. - - - - - Parse the specified element and register any resulting - IObjectDefinitions with the IObjectDefinitionRegistry that is - embedded in the supplied ParserContext. - - - Implementations should return the primary IObjectDefinition - that results from the parse phase if they wish to used nested - inside (for example) a <property> tag. - Implementations may return null if they will not - be used in a nested scenario. - - - The element to be parsed into one or more IObjectDefinitions - The object encapsulating the current state of the parsing - process. - - The primary IObjectDefinition (can be null as explained above) - - - - - Parse the specified XmlNode and decorate the supplied ObjectDefinitionHolder, - returning the decorated definition. - - The XmlNode may either be an XmlAttribute or an XmlElement, depending on - whether a custom attribute or element is being parsed. - Implementations may choose to return a completely new definition, - which will replace the original definition in the resulting IApplicationContext/IObjectFactory. - - The supplied ParserContext can be used to register any additional objects needed to support - the main definition. - - The source element or attribute that is to be parsed. - The current object definition. - The object encapsulating the current state of the parsing - process. - The decorated definition (to be registered in the IApplicationContext/IObjectFactory), - or simply the original object definition if no decoration is required. A null value is strickly - speaking invalid, but will leniently treated like the case where the original object definition - gets returned. - - - - Attribute that should be used to specify the default namespace - and schema location for a custom namespace parser. - - Aleksandar Seovic - - - - Creates a new instance of . - - - - - Gets or sets the default namespace for the configuration parser. - - - The default namespace for the configuration parser. - - - - - Gets or sets the default schema location for the configuration parser. - - - The default schema location for the configuration parser. - - - If the property is set, the will always resolve to an assembly-resource - and the set will be interpreted relative to this assembly. - - - - - Gets or sets a type from the assembly containing the schema - - - If this property is set, the will always resolve to an assembly-resource - and the will be interpreted relative to this assembly. - - - - - Provides a resolution mechanism for configuration parsers. - - -

- The uses this registry - class to find the parser handling a specific namespace. -

-
- Aleksandar Seovic -
- - - Name of the .Net config section that contains definitions - for custom config parsers. - - - - - Creates a new instance of the NamespaceParserRegistry class. - - - - - Reset the list of registered parsers to "factory"-setting - - use for unit tests only - - - - Registers the type for wellknown namespaces - - true if the parser could be registered, false otherwise - - - - Constructs a "assembly://..." qualified schemaLocation url using the given type - to obtain the assembly name. - - - - - Returns a parser for the given namespace. - - - The namespace for which to lookup the parser implementation. - - - A parser for a given , or - if no parser was found. - - - - - Returns a schema collection containing validation schemas for all registered parsers. - - - A schema collection containing validation schemas for all registered parsers. - - - - - Pegisters parser, using default namespace and schema location - as defined by the . - - - The of the parser that will be activated - when an element in its default namespace is encountered. - - - If is . - - - - - Associates a parser with a namespace. - - - - Parsers registered with the same as that - of a parser that has previously been registered will overwrite the existing - parser. - - - - The of the parser that will be activated - when the attendant is - encountered. - - - The namespace with which to associate instance of the parser. - - - The location of the XML schema that should be used for validation - of the XML elements that belong to the specified namespace - (can be any valid Spring.NET resource URI). - - - If the is not a - that implements the - interface. - - - If is . - - - - - Pegisters parser, using default namespace and schema location - as defined by the . - - - The parser instance. - - - If is . - - - - - Associates a parser with a namespace. - - - - Parsers registered with the same as that - of a parser that has previously been registered will overwrite the existing - parser. - - - - The namespace with which to associate instance of the parser. - - - The parser instance. - - - The location of the XML schema that should be used for validation - of the XML elements that belong to the specified namespace - (can be any valid Spring.NET resource URI). - - - If is , or if - is not specified and parser class - does not have default value defined using . - - - - - Register a schema as well-known - - - - - - - Returns default values for the parser namespace and schema location as - defined by the . - - - A type of the parser. - - - A instance containing - default values for the parser namsepace and schema location - - - - - Resolves xml entities by using the infrastructure. - - - - - Adapts the interface to . - Only for smooth transition between 1.x and 2.0 style namespace handling, will be dropped for 2.0 - - - - - Support class for implementing custom namespace parsers. - - Parsing of individual elements is done via a ObjectDefintionParser. - Provides the RegisterObjectDefinitionParser for registering a ObjectDefintionParser - to handle a specific element. - Rob Harrop - Juergen Hoeller - Mark Pollack (.NET) - - - - Invoked by after construction but before any - elements have been parsed. - - - - - Parses an element under the root node, typically - an object definition or import statement. - - - The element to be parsed. - - - The parser context. - - - The number of object defintions created from this element. - - - - - Parse the specified XmlNode and decorate the supplied ObjectDefinitionHolder, - returning the decorated definition. - - The XmlNode may either be an XmlAttribute or an XmlElement, depending on - whether a custom attribute or element is being parsed. - Implementations may choose to return a completely new definition, - which will replace the original definition in the resulting IApplicationContext/IObjectFactory. - - The supplied ParserContext can be used to register any additional objects needed to support - the main definition. - - The source element or attribute that is to be parsed. - The current object definition. - The object encapsulating the current state of the parsing - process. - The decorated definition (to be registered in the IApplicationContext/IObjectFactory), - or simply the original object definition if no decoration is required. A null value is strickly - speaking invalid, but will leniently treated like the case where the original object definition - gets returned. - - - - Register the specified for the given - - - - - Constants defining the structure and values associated with the - Spring.NET XML object definition format. - - Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - - - - Value of a boolean attribute that represents - . - - -

- Anything else represents . -

-
-
- - - Signifies that a default value is to be applied. - - - - - Defines an external XML object definition resource. - - - - - Specifies the relative path to an external XML object definition - resource. - - - - - Defines an alias for an object definition. - - - - - Specifies the alias of an object definition. - - - - - Specifies the default lazy initialization mode. - - - - - Specifies the default dependency checking mode. - - - - - Specifies the default autowire mode. - - - - - Specifies the default collection merge mode. - - - - - Defines a single named object. - - - - - Element containing informative text describing the purpose of the - enclosing element. - - -

- Always optional. -

-

- Used primarily for user documentation of XML object definition - documents. -

-
-
- - - Specifies a . - - -

- Does not have to be fully assembly qualified, but it is recommended - that the names of one's objects are - specified explicitly. -

-
-
- - - The name or alias of the parent object definition that a child - object definition inherits from. - - - - - Objects can be identified by an id, to enable reference checking. - - -

- There are constraints on a valid XML id: if you want to reference - your object in .NET code using a name that's illegal as an XML id, - use the optional "name" attribute - (). - If neither given, the objects name is - used as id. -

-
-
- - - Can be used to create one or more aliases illegal in an id. - - -

- Multiple aliases can be separated by any number of spaces, - semicolons, or commas - (). -

-

- Always optional. -

-
-
- - - Is this object a "singleton" (one shared instance, which will - be returned by all calls to - with the id), or a - "prototype" (independent instance resulting from each call to - ). - - -

- Singletons are most commonly used, and are ideal for multi-threaded - service objects. -

-
- -
- - - Controls object scope. Only applicable to ASP.NET web applications. - - -

- Scope can be defined as either application, session or request. It - defines when "singleton" instances are initialized, but has no - effect on prototype definitions. -

-
-
- - - The names of the objects that this object depends on being - initialized. - - -

- The object factory will guarantee that these objects - get initialized before this object definition. -

- - Dependencies are normally expressed through object properties or - constructor arguments. This property should just be necessary for - other kinds of dependencies such as statics (*ugh*) or database - preparation on startup. - -
-
- - - Optional attribute for the name of the custom initialization method - to invoke after setting object properties. - - -

- The method must have no arguments. -

-
-
- - - Optional attribute for the name of the custom destroy method to - invoke on object factory shutdown. - - -

- Valid destroy methods have either of the following signatures... - - void MethodName() - void MethodName(bool force) - -

- - Only invoked on singleton objects! - -
-
- - - A constructor argument : the constructor-arg tag can have an - optional type attribute, to specify the exact type of the - constructor argument - - -

- Only needed to avoid ambiguities, e.g. in case of 2 single - argument constructors that can both be converted from a - . -

-
-
- - - The constructor-arg tag can have an optional index attribute, - to specify the exact index in the constructor argument list. - - -

- Only needed to avoid ambiguities, e.g. in case of 2 arguments of - the same type. -

-
-
- - - The constructor-arg tag can have an optional named parameter - attribute, to specify a named parameter in the constructor - argument list. - - - - - Is this object "abstract", i.e. not meant to be instantiated itself - but rather just serving as parent for concrete child object - definitions? - - -

- Default is . Specify - to tell the object factory to not try to instantiate that - particular object in any case. -

-
-
- - - A property definition : object definitions can have zero or more - properties. - - -

- Spring.NET supports primitives, references to other objects in the - same or related factories, lists, dictionaries, and name value - collections. -

-
-
- - - A reference to another managed object or static - . - - - - - ID refs must specify a name of the target object. - - - - - A reference to the name of another managed object in the same - context. - - - - - A reference to the name of another managed object in the same - context. - - -

- Local references, using the "local" attribute, have to use object - ids; they can be checked by a parser, thus should be preferred for - references within the same object factory XML file. -

-
-
- - - Alternative to type attribute for factory-method usage. - - -

- If this is specified, no type attribute should be used. This should - be set to the name of an object in the current or ancestor - factories that contains the relevant factory method. This allows - the factory itself to be configured using Dependency Injection, and - an instance (rather than static) method to be used. -

-
-
- - - Optional attribute specifying the name of a factory method to use - to create this object. - - -

- Use constructor-arg elements to specify arguments to the factory - method, if it takes arguments. Autowiring does not apply to - factory methods. -

-

- If the "type" attribute is present, the factory method will be a - static method on the type specified by the "type" attribute on - this object definition. Often this will be the same type as that - of the constructed object - for example, when the factory method - is used as an alternative to a constructor. However, it may be on - a different type. In that case, the created object will *not* be - of the type specified in the "type" attribute. This is analogous - to behaviour. -

-

- If the "factory-object" attribute is present, the "type" attribute - is not used, and the factory method will be an instance method on - the object returned from a - - call with the specified object name. The factory object may be - defined as a singleton or a prototype. -

-

- The factory method can have any number of arguments. Use indexed - constructor-arg elements in conjunction with the factory-method - attribute. -

-

- Setter Injection can be used in conjunction with a factory method. - Method Injection cannot, as the factory method returns an instance, - which will be used when the container creates the object. -

-
-
- - - A list can contain multiple inner object, ref, collection, or - value elements. - - -

- Lists are untyped, pending generics support, although references - will be strongly typed. -

-

- A list can also map to an array type. The necessary conversion is - automatically performed by the - . -

-
-
- - - A set can contain multiple inner object, ref, collection, or value - elements. - - -

- Sets are untyped, pending generics support, although references - will be strongly typed. -

-
-
- - - A Spring.NET map is a mapping from a string key to object (a .NET - ). - - -

- Dictionaries may be empty. -

-
-
- - - A lookup key (for a dictionary or name / value collection). - - - - - A lookup key (for a dictionary or name / value collection). - - - - - Contains a string representation of a value. - - -

- This is used by name-value, ctor argument, and property elements. -

-
-
- - - Contains delimiters that should be used to split delimited string values. - - -

- This is used by name-value element. -

-
-
- - - A reference to another objects. - - -

- Used as a convenience shortcut on property and constructor-arg - elements to refer to other objects. -

-
-
- - - Contains a string representation of an expression. - - -

- This is used by ctor argument and property elements. -

-
-
- - - A map entry can be an inner object, ref, collection, or value. - - -

- The name of the property is given by the "key" attribute. -

-
-
- - - Contains a string representation of a property value. - - -

- The property may be a string, or may be converted to the - required using the - - machinery. This makes it possible for application developers to - write custom - implementations that can convert strings to objects. -

- - This is recommended for simple objects only. Configure more complex - objects by setting properties to references to other objects. - -
-
- - - Contains a string representation of an expression. - - - - - Denotes value. - - -

- Necessary because an empty "value" tag will resolve to an empty - , which will not be resolved to - value unless a special - does so. -

-
-
- - - 'name-values' elements differ from dictionary elements in that - values must be strings. - - -

- May be empty. -

-
-
- - - Element content is the string value of the property. - - -

- The "key" attribute is the name of the property. -

-
-
- - - The lazy initialization mode for an individual object definition. - - - - - The dependency checking mode for an individual object definition. - - - - - Defines a subscription to one or more events published by one or - more event sources. - - - - - The name of an event handling method. - - -

- Defaults to On${event}. - Note : this default will probably change before the first 1.0 - release. -

-
-
- - - The name of an event. - - - - - The autowiring mode for an individual object definition. - - - - - Shortcut alternative to specifying a key element in a - dictionary entry element with <ref object="..."/>. - - - - - Shortcut alternative to specifying a value element in a - dictionary entry element with <ref object="..."/>. - - - - - Specify if the collection values should be merged with the parent. - - - - - The string of characters that delimit object names. - - - - - A lookup method causes the IoC container to override a given method and return - the object with the name given in the attendant object attribute. - - -

- This is a form of Method Injection. -

-

- It's particularly useful as an alternative to implementing the - interface, - in order to be able to make - - calls for non-singleton instances at runtime. In this case, Method Injection - is a less invasive alternative. -

-
-
- - - The name of a lookup method. This method must take no arguments. - - - - - The name of the object in the IoC container that the lookup method - must resolve to. - - -

- Often this object will be a prototype, in which case the lookup method - will return a distinct instance on every invocation. This is useful - for single-threaded objects. -

-
-
- - - A replaced method causes the IoC container to override a given method - with an (arbitrary) implementation at runtime. - - -

- This (again) is a form of Method Injection. -

-
-
- - - Name of the method whose implementation should be replaced by the - IoC container. - - -

- If this method is not overloaded, there's no need to use arg-type - subelements. -

-

- If this method is overloaded, arg-type subelements must be - used for all override definitions for the method. -

-
-
- - - The object name of an implementation of the - interface. - - -

- This may be a singleton or prototype. If it's a prototype, a new - instance will be used for each method replacement. Singleton usage - is the norm. -

-
-
- - - Subelement of replaced-method identifying an argument for a - replaced method in the event of method overloading. - - - - - - Specification of the of an overloaded method - argument as a . - - -

- For convenience, this may be a substring of the FQN. E.g. all the following would match - : -

-

- - - System.String - - - string - - - str - - -

-
- -
- - - Check everything. - - - - - Just check primitive (string, int, etc) values. - - - - - Check object references. - - - - - Autowire by name. - - - - - Autowire by . - - - - - Autowiring by constructor. - - - - - The autowiring strategy is to be determined by introspection - of the object's . - - - - - Creates a new instance of the - - class. - - -

- This is a utility class, and as such has no publicly visible - constructors. -

-
-
- - - Stateful class used to parse XML object definitions. - - Not all parsing code has been refactored into this class. See - BeanDefinitionParserDelegate in Java for how this class should evolve. - Rob Harrop - Juergen Hoeller - Rod Johnson - Mark Pollack (.NET) - - - - The shared instance for this class (and derived classes). - - - - - Initializes a new instance of the class. - - The reader context. - - - - Initializes a new instance of the class. - - The reader context. - The root element of the definition document to parse - - - - Initialize the default lazy-init, dependency check, and autowire settings. - - The root element - - - - Determines whether the Spring object namespace is equal to the the specified namespace URI. - - The namespace URI. - - true if is the default Spring namespace; otherwise, false. - - - - - Decorates the object definition if required. - - The element. - The holder. - - - - - Parse a standard object definition into a - , - including object name and aliases. - - The element containing the object definition. - - The parsed object definition wrapped within an - - instance. - - - - Object elements specify their canonical name via the "id" attribute - and their aliases as a delimited "name" attribute. - - - If no "id" is specified, uses the first name in the "name" attribute - as the canonical name, registering all others as aliases. - - - - - - Parse a standard object definition into a - , - including object name and aliases. - - The element containing the object definition. - The containing object definition if is a nested element. - - The parsed object definition wrapped within an - - instance. - - - - Object elements specify their canonical name via the "id" attribute - and their aliases as a delimited "name" attribute. - - - If no "id" is specified, uses the first name in the "name" attribute - as the canonical name, registering all others as aliases. - - - - - - Create an instance from the given and . - - - This method may be used as a last resort to post-process an object definition before it gets added to the registry. - - - - - Allows deriving classes to post process the name and aliases for the current element. By default - does nothing and returns the unmodified . - - - The list passed in may be modified by an implementation of this method to reflect special needs. - - the object name obtained by the default algorithm from 'id' and 'name' attributes so far. - the object aliases obtained by the default algorithm from 'name' attribute so far. - the currently processed element. - the containing object definition, may be null - the new object name to be used. - - - - Validate that the specified object name and aliases have not been used already. - - - - - Parses an element in a custom namespace. - - - the parsed object definition or null if not supported by the corresponding parser. - - - - Parses an element in a custom namespace. - - - if a nested element, the containing object definition - the parsed object definition or null if not supported by the corresponding parser. - - - - Given a string containing delimited object names, returns - a string array split on the object name delimeter. - - - The string containing delimited object names. - - - A string array split on the object name delimeter. - - - - - - Determines whether the string represents a 'true' boolean value. - - The value. - - true if is 'true' string value; otherwise, false. - - - - - Convenience method to create a builder for a root object definition. - - Name of the object type. - A builder for a root object definition. - - - - Convenience method to create a builder for a root object definition. - - Type of the object. - a builder for a root object definition - - - - Returns the value of the element's attribute or null, if the attribute is not specified. - - - This is a helper for bypassing the behavior of - to return if the attribute does not exist. - - - - - Returns the value of the element's attribute or , - if the attribute is not specified. - - - This is a helper for bypassing the behavior of - to return if the attribute does not exist. - - - - - Report a parser error. - - - - - Gets the defaults definition object, or null if the - default have not yet been initialized. - - The defaults. - - - - Gets the reader context. - - The reader context. - - - - Creates an instance - populated with the object definitions supplied in the configuration - section. - - -

- Applications will typically want to use an - , and instantiate it - via the use of the - class (which is similar in functionality to this class). This class is - provided for those times when only an - is required. -

- Creates an instance of the class XmlObjectFactory -
- -

- -

-
- Mark Pollack (.NET) -
- - - Creates a new instance of the - class. - - - - - Creates a - instance populated with the object definitions supplied in the - configuration section. - - - The configuration settings in a corresponding parent configuration - section. - - - The configuration context when called from the ASP.NET - configuration system. Otherwise, this parameter is reserved and - is . - - - The for the section. - - - A instance - populated with the object definitions supplied in the configuration - section. - - - - - Default implementation of the - interface. - - -

- Parses object definitions according to the standard Spring.NET schema. -

-

- This schema is typically located at - http://www.springframework.net/xsd/spring-objects.xsd. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - The namespace URI for the standard Spring.NET object definition schema. - - - - - The shared instance for this class (and derived classes). - - - - - Invoked by after construction but before any - elements have been parsed. - - This is a NoOp - - - - Parse the specified XmlElement and register the resulting - ObjectDefinitions with the IObjectDefinitionRegistry - embedded in the supplied - - The element to be parsed. - TThe object encapsulating the current state of the parsing process. - Provides access to a IObjectDefinitionRegistry - The primary object definition. - -

- This method is never invoked if the parser is namespace aware - and was called to process the root node. -

-
-
- - - Parse the specified element and register any resulting - IObjectDefinitions with the IObjectDefinitionRegistry that is - embedded in the supplied ParserContext. - - The element to be parsed into one or more IObjectDefinitions - The object encapsulating the current state of the parsing - process. - - The primary IObjectDefinition (can be null as explained above) - - - Implementations should return the primary IObjectDefinition - that results from the parse phase if they wish to used nested - inside (for example) a <property> tag. - Implementations may return null if they will not - be used in a nested scenario. - - - - - - Parse the specified XmlNode and decorate the supplied ObjectDefinitionHolder, - returning the decorated definition. - - The XmlNode may either be an XmlAttribute or an XmlElement, depending on - whether a custom attribute or element is being parsed. - Implementations may choose to return a completely new definition, - which will replace the original definition in the resulting IApplicationContext/IObjectFactory. - - The supplied ParserContext can be used to register any additional objects needed to support - the main definition. - - The source element or attribute that is to be parsed. - The current object definition. - The object encapsulating the current state of the parsing - process. - The decorated definition (to be registered in the IApplicationContext/IObjectFactory), - or simply the original object definition if no decoration is required. A null value is strickly - speaking invalid, but will leniently treated like the case where the original object definition - gets returned. - - - - Loads external XML object definitions from the resource described by the supplied - . - - The XML element describing the resource. - The parser context. - - If the resource could not be imported. - - - - Parses an event listener definition. - - The name associated with the object that the event handler is being defined on. - - The events being populated. - - The element containing the event listener definition. - - - The namespace-aware parser. - - - - - Parse an object definition and register it with the object factory.. - - The element containing the object definition. - The parser context. - - - - - Parse an object definition and register it with the object factory.. - - The element containing the object definition. - The parser context. - - - - - Parse an object definition and register it with the object factory.. - - The element containing the object definition. - The parser context. - - - - - Parse a standard object definition into a - , - including object name and aliases. - - The element containing the object definition. - The parser context. - if set to true if we are processing an inner - object definition. - - The object (definition) wrapped within an - - instance. - - -

- Object elements specify their canonical name via the "id" attribute - and their aliases as a delimited "name" attribute. -

-

- If no "id" is specified, uses the first name in the "name" attribute - as the canonical name, registering all others as aliases. -

-
-
- - - Calculates an id for an object definition. - - -

- Called when an object definition has not been explicitly defined - with an id. -

-
- - The element containing the object definition. - - - The list of names defined for the object; may be - or even empty. - - - A calculated object definition id. - -
- - - Parse a standard object definition. - - The element containing the object definition. - The id of the object definition. - parsing state holder - The object (definition). - - - - Parse method override argument subelements of the given object element. - - - - - Parse element and add parsed element to - - - - - Parse element and add parsed element to - - - - - Parse constructor argument subelements of the given object element. - - - - - Parse event handler subelements of the given object element. - - - - - Parse property value subelements of the given object element. - - - The name of the object (definition) associated with the property element (s) - - - The element containing the top level object definition. - - - The namespace-aware parser. - - - The property (s) associated with the object (definition). - - - - - Parse a constructor-arg element. - - - The name of the object (definition) associated with the ctor arg. - - - The list of constructor args associated with the object (definition). - - - The name of the element containing the ctor arg definition. - - - The namespace-aware parser. - - - - - Parse a property element. - - - The name of the object (definition) associated with the property. - - - The list of properties associated with the object (definition). - - - The name of the element containing the property definition. - - - The namespace-aware parser. - - - - - Get the value of a property element (may be a list). - -

- Please note that even though this method is named GetPropertyValue, - it is called by both the property and constructor argument element - handlers. -

-
- The property element. - - The name of the object associated with the property. - - - The namespace-aware parser. - -
- - - Parse a value, ref or collection subelement of a property element. - - - Subelement of property element; we don't know which yet. - - - The name of the object (definition) associated with the top level property. - - - The namespace-aware parser. - - - - - Gets a list definition. - - - The element describing the list definition. - - - The name of the object (definition) associated with the list definition. - - - The namespace-aware parser. - - The list definition. - - - - Gets a set definition. - - - The element describing the set definition. - - - The name of the object (definition) associated with the set definition. - - - The namespace-aware parser. - - The set definition. - - - - Gets a dictionary definition. - - The element describing the dictionary definition. - The name of the object (definition) associated with the dictionary definition. - The namespace-aware parser. - The dictionary definition. - - - - Selects sub-elements with a given - name. - - -

- Uses a namespace manager if necessary. -

-
- - The element to be searched in. - - - The name of the child nodes to look for. - - - The child s of the supplied - with the supplied - . - -
- - - Selects a single sub-element with a given - name. - - -

- Uses a namespace manager if necessary. -

-
- - The element to be searched in. - - - The name of the child node to look for. - - - The first child of the supplied - with the supplied - . - -
- - - Gets a name value collection mapping definition. - - - The element describing the name value collection mapping definition. - - - The name of the object (definition) associated with the - name value collection mapping definition. - - the context carrying parsing state information - The name value collection definition. - - - - Returns the text of the supplied , - or the empty string value if said is empty. - - -

- If the supplied is , - then the empty string value will be returned. -

-
-
- - - Strips the dependency check value out of the supplied string. - - -

- If the supplied is an invalid dependency - checking mode, the invalid value will be logged and this method will - return the value. - No exception will be raised. -

-
- - The string containing the dependency check value. - - The dependency check value. - -
- - - Strips the autowiring mode out of the supplied string. - - -

- If the supplied is an invalid autowiring mode, - the invalid value will be logged and this method will return the - value. No exception will be raised. -

-
- - The string containing the autowiring mode definition. - - The autowiring mode. - -
- - - Given a string containing delimited object names, returns - a string array split on the object name delimeter. - - - The string containing delimited object names. - - - A string array split on the object name delimeter. - - - - - - Context that gets passed along an object definition parsing process, encapsulating - all relevant configuraiton as well as state. - - - - - Initializes a new instance of the class. - - The parser helper. - - - - Initializes a new instance of the class. - - The parser helper. - The containing object definition. - - - - Initializes a new instance of the class. - - The reader context. - The parser helper. - - - - Initializes a new instance of the class. - - The reader context. - The parser helper. - The containing object definition. - - - - Gets the reader context. - - The reader context. - - - - Gets the registry. - - The registry. - - - - Gets the parser helper. - - The parser helper. - - - - Gets the containing object definition. - - The containing object definition. - - - - Gets a value indicating whether this instance is nested. - - true if this instance is nested; otherwise, false. - - - - Gets a value indicating whether this instance is default lazy init. - - - true if this instance is default lazy init; otherwise, false. - - - - - Represents the replacement of a method on a managed object by the IoC - container. - - -

- Note that this mechanism is not intended as a generic means of - inserting crosscutting code: use AOP for that. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - - The name of the method that is to be overridden. - - - The object name of the - instance in the surrounding IoC container. - - - If either of the supplied arguments is or - contains only whitespace character(s). - - - - - Add a fragment of a instance's - such as 'Exception or System.Excep to identify an argument - for a dependency injected method. - - - A (sub) string of a instance's . - - - If the supplied is or - contains only whitespace character(s). - - - - - - Does this - match the supplied ? - - The method to be checked. - - if this override matches the supplied . - - - If the supplied is . - - - - - A that represents the current - . - - - A that represents the current - . - - - - - The object name of the - instance in the surrounding IoC container. - - - - - Object definition reader for Spring's default XML object definition format. - - -

- Typically applied to a - instance. -

-

- This class registers each object definition with the given object factory superclass, - and relies on the latter's implementation of the - interface. -

-

- It supports singletons, prototypes, and references to either of these kinds of object. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Creates a new instance of the - class. - - - The - instance that this reader works on. - - - - - Creates a new instance of the - class. - - - The - instance that this reader works on. - - - The to be used for parsing. - - - - - Creates a new instance of the - class. - - - The - instance that this reader works on. - - - The to be used for parsing. - - the to use for creating new s - - - - Load object definitions from the supplied XML . - - - The XML resource for the object definitions that are to be loaded. - - - The number of object definitions that were loaded. - - - In the case of loading or parsing errors. - - - - - Actually load object definitions from the specified XML file. - - The input stream to read from. - The resource for the XML data. - - - - - Validation callback for a validating XML reader. - - The source of the event. - Any data pertinent to the event. - - - - Register the object definitions contained in the given DOM document. - - The DOM document. - - The original resource from where the - was read. - - - The number of object definitions that were registered. - - - In case of parsing errors. - - - - - Creates the to use for actually - reading object definitions from an XML document. - - Default implementation instantiates the specified - or if no reader type is specified. - - - - - Creates the to be passed along - during the object definition reading process. - - The underlying that is currently processed. - A new - - - - Create a instance for handling custom namespaces. - - - TODO (EE): make protected virtual, see remarks on - - - - - The to be used for parsing. - - - - - Sets the IObjectDefinitionDocumentReader implementation to use, responsible for - the actual reading of the XML object definition document.stype of the document reader. - - The type of the document reader. - - - - Specify a to use. If none is specified a default - instance will be created by - - - - - Specify a for creating instances of . - - - - - For retrying the parse process - - - - - Convenience extension of - - that reads object definitions from an XML document or element. - - -

- Delegates to - - underneath; effectively equivalent to using a - for a - . -

- - objects doesn't need to be the root element of - the XML document: this class will parse all object definition elements in the - XML stream. - -

- This class registers each object definition with the - - superclass, and relies on the latter's implementation of the - interface. It supports - singletons, prototypes and references to either of these kinds of object. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - -
- - - Creates a new instance of the class, - with the given resource, which must be parsable using DOM. - - - The XML resource to load object definitions from. - - - In the case of loading or parsing errors. - - - - - Creates a new instance of the class, - with the given resource, which must be parsable using DOM. - - - The XML resource to load object definitions from. - - Flag specifying whether to make this object factory case sensitive or not. - - In the case of loading or parsing errors. - - - - - Creates a new instance of the class, - with the given resource, which must be parsable using DOM, and the - given parent factory. - - - The XML resource to load object definitions from. - - The parent object factory (may be ). - - In the case of loading or parsing errors. - - - - - Creates a new instance of the class, - with the given resource, which must be parsable using DOM, and the - given parent factory. - - - The XML resource to load object definitions from. - - Flag specifying whether to make this object factory case sensitive or not. - The parent object factory (may be ). - - In the case of loading or parsing errors. - - - - - Gets object definition reader to use. - - - - - Extension of specific to use with an XmlObjectDefinitionReader. - Provides access to configured in - - - - - The maximum length of any XML fragment displayed in the error message - reporting. - - -

- Hopefully this will display enough context so that a user - can pinpoint the cause of the error. -

-
-
- - - Initializes a new instance of the class. - - The resource. - The reader. - - - - Initializes a new instance of the class. - - The resource. - The reader. - The factory to use for creating new instances. - - - - Generates the name of the object. - - The object definition. - the generated object name - - - - Registers the name of the with generated. - - The object definition. - the generated object name - - - - Reports a parse error by loading a - with helpful contextual - information and throwing said exception. - - -

- Derived classes can of course override this method in order to implement - validators capable of displaying a full list of errors found in the - definition. -

-
- - The node that triggered the parse error. - - - The name of the object that triggered the exception. - - - A message about the exception. - - - Always throws an instance of this exception class, that will - contain helpful contextual infomation about the parse error. - - -
- - - Reports a parse error by loading a - with helpful contextual - information and throwing said exception. - - -

- Derived classes can of course override this method in order to implement - validators capable of displaying a full list of errors found in the - definition. -

-
- - The node that triggered the parse error. - - - The name of the object that triggered the exception. - - - A message about the error. - - - The root cause of the parse error (if any - may be ). - - - Always throws an instance of this exception class, that will - contain helpful contextual infomation about the parse error. - -
- - - This method can be overwritten in order to implement validators - capable of displaying a full list of errors found in the definition. - - - The node that triggered the parse error. - - - A message about the exception. - - - - - Gets the reader. - - The reader. - - - - Gets the resource loader. - - The resource loader. - - - - Gets the registry. - - The registry. - - - - Gets or sets the object definition factory. - - The object definition factory. - - - - Get the instance to lookup parsers for custom namespaces. - - - - - Exception thrown if an - is not fully - initialized, for example if it is involved in a circular reference. - - -

- This is usually indicated by any of the variants of the - - method returning . -

-

- A circular reference with an - cannot be solved by eagerly caching singleton instances (as is the - case with normal objects. The reason is that every - needs to be fully - initialized before it can return the created object, while only specific - normal objects need to be initialized - that is, if a collaborating object - actually invokes them on initialization instead of just storing the reference. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Thrown when an - encounters an error when attempting to create an object from an object - definition. - - Juergen Hoeller - Rick Evans (.NET) - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - A message about the exception. - - - - - Creates a new instance of the - class. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - - - Creates a new instance of the - class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the - class. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the - class. - - - The description of the resource associated with the object. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - - - Creates a new instance of the - class. - - - The description of the resource associated with the object. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the - class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The name of the object that triggered the exception (if any). - - - - - The description of the resource associated with the object (if any). - - - - - Describes the creation failure trace of this exception. - - - - - Creates a new instance of the - FactoryObjectNotInitializedException class. - - - - - Creates a new instance of the FactoryObjectNotInitializedException class. - - - A message about the exception. - - - - - Creates a new instance of the FactoryObjectNotInitializedException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the - FactoryObjectCircularReferenceException class. - - - The name of the object that triggered the exception. - - - A message about the exception. - - - - - Creates a new instance of the FactoryObjectCircularReferenceException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Exception thrown when an - is asked for an object instance name for which it cannot find a definition. - - Rod Johnson - Rick Evans (.NET) - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - A message about the exception. - - - - - Creates a new instance of the - class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the - class. - - - Name of the missing object. - - - A further, detailed message describing the problem. - - - - - Initializes a new instance of the class. - - The required type of the object. - A description of the originating dependency. - A message describing the problem. - - - - Creates a new instance of the - class. - - - The of the missing object. - - - A further, detailed message describing the problem. - - - - - Creates a new instance of the - class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - Return the required of object, if it was a - lookup by that failed. - - - - - Return the name of the missing object, if it was a lookup by name that - failed. - - - - - Thrown in case of a reference to an object that is currently in creation. - - -

- Typically happens when constructor autowiring matches the currently - constructed object. -

-
- Juergen Hoeller - Rick Evans -
- - - The default error message text to be used, if none is specified. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The name of the object that triggered the exception. - - - - - Creates a new instance of the - class. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the - class. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - - - Creates a new instance of the - class. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the - class. - - - The description of the resource associated with the object. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - - - Creates a new instance of the - class. - - - The description of the resource associated with the object. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectCurrentlyInCreationException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Exception thrown when an - encounters an error when attempting to parse an object - definition. - - Federico Spinazzi (.NET) - - - - Creates a new instance of the ObjectDefinitionException class. - - - - - Creates a new instance of the ObjectDefinitionException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionException class. - - - The value of the xml class attribute thet can be resolved - as a type - - - - - Creates a new instance of the ObjectDefinitionException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The message about the exception. - - - - - Thrown when an - encounters an internal error, and its definitions are invalid. - - -

- An example of a situation when this exception would be thrown is - in the case of an XML document containing object definitions being - malformed. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - Creates a new instance of the ObjectDefinitionStoreException class. - - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - A message about the exception. - - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - The description of the resource that the object definition came from - - - The name of the object that triggered the exception. - - - A message about the exception. - - - - - Initializes a new instance of the class. - - - The description of the resource that the object definition came from - - The detail message (used as exception message as-is) - The root cause. (may be null - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - The resource location (e.g. an XML object definition file) associated - with the offending object definition. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - The resource location (e.g. an XML object definition file) associated - with the offending object definition. - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - The description of the resource that the object definition came from - - - A message about the exception. - - - The name of the object that triggered the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectDefinitionStoreException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The description of the resource associated with the object - - - - - The name of the object that trigger the exception. - - - - - The name of the object that triggered the exception (if any). - - - - - The description of the resource associated with the object (if any). - - - - - Convenience methods operating on object factories, returning object instances, - names, or counts. - - -

- The nesting hierarchy of an object factory is taken into account by the various methods - exposed by this class. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - Used to dereference an - and distinguish it from managed objects created by the factory. - - -

- For example, if the managed object identified as foo is a - factory, getting &foo will return the factory, not the - instance returned by the factory. -

-
-
- - - The string used as a separator in the generation of synthetic id's - for those object definitions explicitly that aren't assigned one. - - -

- If a name or parent object definition - name is not unique, "#1", "#2" etc will be appended, until such - time that the name becomes unique. -

-
-
- - - Creates a new instance of the - class. - - -

- This is a utility class, and as such has no publicly visible - constructors. -

-
-
- - - Count all object definitions in any hierarchy in which this - factory participates. - - -

- Includes counts of ancestor object factories. -

-

- Objects that are "overridden" (specified in a descendant factory - with the same name) are counted only once. -

-
- The object factory. - - The count of objects including those defined in ancestor factories. - -
- - - Return all object names in the factory, including ancestor factories. - - The object factory. - The array of object names, or an empty array if none. - - - - Get all object names for the given type, including those defined in ancestor - factories. - - -

- Will return unique names in case of overridden object definitions. -

-

- Does consider objects created by s - if is set to true, - which means that s will get initialized. -

-
- - If this isn't also an - , - this method will return the same as it's own - - method. - - - The that objects must match. - - - Whether to include prototype objects too or just singletons - (also applies to instances). - - - Whether to include instances - too or just normal objects. - - - The array of object names, or an empty array if none. - -
- - - Get all object names for the given type, including those defined in ancestor - factories. - - -

- Will return unique names in case of overridden object definitions. -

-

- Does consider objects created by s, - or rather it considers the type of objects created by - (which means that - s will be instantiated). -

-
- - If this isn't also an - , - this method will return the same as it's own - - method. - - - The that objects must match. - - - The array of object names, or an empty array if none. - -
- - - Return all objects of the given type or subtypes, also picking up objects - defined in ancestor object factories if the current object factory is an - . - - -

- The return list will only contain objects of this type. - Useful convenience method when we don't care about object names. -

-
- The object factory. - The of object to match. - - Whether to include prototype objects too or just singletons - (also applies to instances). - - - Whether to include instances - too or just normal objects. - - - If the objects could not be created. - - - The of object instances, or an - empty if none. - -
- - - Return a single object of the given type or subtypes, also picking up objects defined - in ancestor object factories if the current object factory is an - . - - -

- Useful convenience method when we expect a single object and don't care - about the object name. -

-
- The object factory. - The of object to match. - - Whether to include prototype objects too or just singletons - (also applies to instances). - - - Whether to include instances - too or just normal objects. - - - If the object could not be created. - - - If more than one instance of an object was found. - - - A single object of the given type or subtypes. - -
- - - Return a single object of the given type or subtypes, not looking in - ancestor factories. - - -

- Useful convenience method when we expect a single object and don't care - about the object name. -

-
- The object factory. - The of object to match. - - Whether to include prototype objects too or just singletons - (also applies to instances). - - - Whether to include instances - too or just normal objects. - - - If the object could not be created. - - - If not exactly one instance of an object was found. - - - A single object of the given type or subtypes. - -
- - - Return a single object of the given type or subtypes, not looking in - ancestor factories. - - -

- Useful convenience method when we expect a single object and don't care - about the object name. - This version of ObjectOfType automatically includes prototypes and - instances. -

-
- The object factory. - The of object to match. - - If the object could not be created. - - - If not exactly one instance of an object was found. - - - A single object of the given type or subtypes. - -
- - - Return the object name, stripping out the factory dereference prefix if necessary. - - The name of the object. - The object name sans any factory dereference prefix. - - - - Given an (object) name, builds a corresponding factory object name such that - the return value can be used as a lookup name for a factory object. - - - The name to be used to build the resulting factory object name. - - - The transformed into its factory object name - equivalent. - - - - - - - Is the supplied a factory dereference? - - -

- That is, does the supplied begin with - the - ? -

-
- The name to check. - - if the supplied is a - factory dereference; if not, or the - aupplied is or - consists solely of the - - value. - - -
- - - Exception that an object implementation is suggested to throw if its own - factory-aware initialization code fails. - thrown by object factory methods - themselves should simply be propagated as-is. - - -

- Note that non-factory-aware initialization methods like AfterPropertiesSet () - or a custom "init-method" can throw any exception. -

-
- Juergen Hoeller - Rick Evans (.NET) -
- - - Creates a new instance of the ObjectInitializationException class. - - - - - Creates a new instance of the ObjectInitializationException class. - - - A message about the exception. - - - - - Creates a new instance of the ObjectInitializationException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectInitializationException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Thrown in response to an attempt to lookup a factory object, and - the object identified by the lookup key is not a factory. - - -

- An object is a factory if it implements (either directly or indirectly - via inheritance) the - interface. -

-
- Rod Johnson - Rick Evans (.NET) -
- - - Thrown when an object doesn't match the required . - - Rod Johnson - Rick Evans (.NET) - - - - Creates a new instance of the ObjectNotOfRequiredTypeException class. - - - - - Creates a new instance of the ObjectNotOfRequiredTypeException class. - - - A message about the exception. - - - - - Creates a new instance of the ObjectNotOfRequiredTypeException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ObjectNotOfRequiredTypeException class. - - - Name of the object requested. - - - The required of the actual object - instance that was retrieved. - - - The instance actually returned, whose class did not match the - expected . - - - - - Creates a new instance of the ObjectNotOfRequiredTypeException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The actual of the actual object - instance that was retrieved. - - - - - The required of the actual object - instance that was retrieved. - - - - - The instance actually returned, whose class did not match the - expected . - - - - - The name of the object requested. - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - A message about the exception. - - - - - Creates a new instance of the - class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the - class. - - - The name of the object that was being retrieved from the factory. - - - The object instance that was retrieved. - - - - - Creates a new instance of the - class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Exception thrown when an object depends on other objects or simple properties - that were not specified in the object factory definition, although dependency - checking was enabled. - - Rod Johnson - Juergen Hoeller - Rick Evans (.NET) - - - - Creates a new instance of the UnsatisfiedDependencyException class. - - - - - Creates a new instance of the UnsatisfiedDependencyException class. - - - A message about the exception. - - - - - Creates a new instance of the UnsatisfiedDependencyException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the UnsatisfiedDependencyException class. - - - The description of the resource associated with the object. - - - The name of the object that has the unsatisfied dependency. - - - The constructor argument index at which the dependency is - unsatisfied. - - - The of the constructor argument at - which the dependency is unsatisfied. - - - A message about the exception. - - - - - Creates a new instance of the UnsatisfiedDependencyException class. - - - The description of the resource associated with the object. - - - The name of the object that has the unsatisfied dependency. - - - The name identifying the property on which the dependency is - unsatisfied. - - - A message about the exception. - - - - - Creates a new instance of the UnsatisfiedDependencyException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Base class implementation for classes that describe an event handler. - - Rick Evans - - - - Describes an event handler. - - Rick Evans - - - - Wires up the specified handler to the named event on the - supplied event source. - - - The object (an object instance, a , etc) - exposing the named event. - - - The handler for the event (an object instance, a - , etc). - - - - - The source of the event. - - - - - The name of the method that is going to handle the event. - - - - - The name of the event that is being wired up. - - - - - Creates a new instance of the - class. - - -

- This is an class, and as such exposes no public constructors. -

-
-
- - - Creates a new instance of the - class. - - - The object (possibly unresolved) that is exposing the event. - - - The name of the method on the handler that is going to handle the event. - - -

- This is an class, and as such exposes no public constructors. -

-
-
- - - Wires up the specified handler to the named event on the - supplied event source. - - - The object (an object instance, a , etc) - exposing the named event. - - - The handler for the event (an object instance, a - , etc). - - - - - Returns a stringified representation of this object. - - A stringified representation of this object. - - - - The source of the event (may be unresolved, as in the case - of a - value). - - - - - The name of the method that is going to handle the event. - - - - - The name of the event that is being wired up. - - - - - Convenience base class for implementations. - - - - - Abstracts the state sharing strategy used - by - - Erich Eichinger - - - - Indicate, whether the given instance can be served by this factory - - the instance to serve state - the name of the instance - - a boolean value indicating, whether state can - be served for the given instance or not. - - - - - Returns the shared state for the given instance. - - the instance to obtain shared state for. - the name of this instance - a dictionary containing shared state for or null. - - - - Gets a dictionary acc. to the type of . - If no dictionary is found, create it according to - - the instance to obtain shared state for - the name of the instance. - - A dictionary containing the 's state, - or null if no state can be served by this provider. - - - - - Creates a dictionary to hold the shared state identified by . - - a key to create the dictionary for. - a dictionary according to and . - - - - Indicate, whether the given instance will be served by this provider - - the instance to serve state - the name of the instance - - a boolean value indicating, whether state shall - be resolved for the given instance or not. - - - - - Create the key used for obtaining the state dictionary for . - - the instance to create the key for - the name of the instance. - - the key identifying the state dictionary to be used for - or null, if this state manager doesn't serve the given instance. - - - - Implementations may choose to return null from this method to indicate, - that they won't serve state for the given instance. - - - Note:Keys returned by this method are always treated case-sensitive! - - - - - - Create shared state dictionaries case-sensitive or case-insensitive? - - - - - A number indicating the priority of this ( for more). - - - - - Base class for all - implemenations that actually perform event wiring. - - Rick Evans - - - - Creates a new instance of the - class. - - -

- This is an class, and as such exposes no public constructors. -

-
-
- - - Creates a new instance of the - class. - - - The object (possibly unresolved) that is exposing the event. - - - The name of the method on the handler that is going to handle the event. - - -

- This is an class, and as such exposes no public constructors. -

-
-
- - - Wires up the specified handler to the named event on the - supplied event source. - - - The object (an object instance, a , etc) - exposing the named event. - - - The handler for the event (an object instance, a - , etc). - - - - - Gets the event handler. - - - The instance that is registering for the event notification. - - - Event metadata about the event. - - - The event handler. - - - - - Resolves the method metadata that describes the method that is to be used - as the argument to a delegate constructor. - - - The exposing the method. - - - The of the delegate (e.g. System.EventHandler). - - - The custom binding flags to use when searching for the method. - - The method metadata. - - If the method could not be found. - - - - - Describes an implementation - that autowires events to handler methods. - - Rick Evans - - - - Creates a new instance of the - class. - - - - - Wires up the specified handler to the named event on the supplied event source. - - - The object (an object instance, a , etc) - exposing the named event. - - - The handler for the event (an object instance, a , - etc). - - - - - The name of the method that is going to handle the event. - - - - - Performs the matching up of handler methods to one or more source events. - - -

- This class merely marshals the matching of handler methods to the events exposed - by an event source, and then delegates to a concrete - implementation (such as - or - ) to do the heavy lifting of - actually wiring a handler method to an event. -

-

- Note : the order in which handler's are wired up to events is non-deterministic. -

-
-
- - - Creates a new instance of the - class. - - - The object exposing the event (s) being wired up. - - - The name of the event that is being wired up. - - - The object exposing the method (s) being wired to the event. - - - The name of the method that is going to handle the event. - - - - - Wires up events on the source to methods exposed on the handler. - - - - - Wires up the supplied event to any handler methods that match the event - signature. - - The event being wired up. - - - - Only replaces the first occurrence of the placeholder. - - The event whose name is going to be used. - - The method name customised for the name of the supplied event. - - - - - The object exposing the event (s) being wired up. - - - - - The object exposing the method (s) being wired to an event source. - - - - - The of the object that is handling any events. - - - - - The name of the method that is going to handle the event. - - - - - The name of the event that is being wired up. - - - - - Serves shared state on a by-type basis. - - - - - Creates a new instance matching all types by default. - - - - - Creates a new instance matching only specified list of types. - - the list of types to serve. - - - - Indicate, whether the given instance will be served by this provider - - the instance to serve state - the name of the instance - - a boolean value indicating, whether state shall - be resolved for the given instance or not. - - - - - Returns the for the given . - - the instance to obtain the key for. - the name of the instance (ignored by this provider) - instance.GetType() if it matches the list. Null otherwise. - - This method will only be called if returned true previously. - - - - - Limit object types to be served by this state manager. - - - Only objects assignable to one of the types in this list - will be served state by this manager. - - - - - Describes an event handler for an object instance. - - Rick Evans - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The object (possibly unresolved) that is exposing the event. - - - The name of the method on the handler that is going to handle the event. - - - - - Gets the event handler. - - - The instance that is registering for the event notification. - - - Event metadata about the event. - - - The event handler. - - - - - Definition for sorting object instances by a property. - - Juergen Hoeller - Simon White (.NET) - - - - The name of the property to sort by. - - - - - Whether upper and lower case in string values should be ignored. - - - True if the sorting should be performed in a case-insensitive fashion. - - - - - If the sorting should be ascending or descending. - - - True if the sorting should be in the ascending order. - - - - - Mutable implementation of the - interface that - supports toggling the ascending value on setting the same property again. - - Juergen Hoeller - Jean-Pierre Pawlak - Simon White (.NET) - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class using - the specified . - - - The to use - as a source for initial property values. - - - - - Creates a new instance of the - class. - - - The name of the property to sort by. - - - Whether upper and lower case in string values should be ignored. - - - Whether or not the sorting should be ascending or descending. - - - - - Creates a new instance of the - class. - - - Whether or not the - - property should be toggled if the same name is set on the - - property. - - - - - Overrides the default method - - - The object to test against this instance for equality. - - - True if the supplied is equal to this instance. - - - - - Overrides the default method. - - The hashcode for this instance. - - - - The name of the property to sort by. - - - - - Whether upper and lower case in string values should be ignored. - - - True if the sorting should be performed in a case-insensitive fashion. - - - - - If the sorting should be ascending or descending. - - - True if the sorting should be in the ascending order. - - - - - Performs a comparison of two objects, using the specified object property via - an . - - Juergen Hoeller - Jean-Pierre Pawlak - Simon White (.NET) - - - - Creates a new instance of the - class. - - - The to use for any - sorting. - - - If the supplied is . - - - - - Compares two objects and returns a value indicating whether one is less - than, equal to or greater than the other. - - The first object to compare. - The second object to compare. - - - - - Get the 's property - value for the given object. - - The object to get the property value for. - The property value. - - - - Sort the given according to the - given sort definition. - - - The to be sorted. - - The parameters to sort by. - - In the case of a missing property name. - - - If the supplied is . - - - - - Gets the to - use for any sorting. - - - The to use for - any sorting. - - - - - Describes an event handler for a static class method. - - Rick Evans - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - The object (possibly unresolved) that is exposing the event. - - - The name of the method on the handler that is going to handle the event. - - - - - Gets the event handler. - - - The instance that is registering for the event notification. - - - Event metadata about the event. - - - The event handler. - - - - - The central interface of Spring.NET's low-level object infrastructure. - - -

- Typically not directly used by application code but rather implicitly - via an . -

-

- Implementing classes have the ability to get and set property values - (individually or in bulk), get property descriptors and query the - readability and writability of properties. -

-

- This interface supports nested properties enabling the setting - of properties on subproperties to an unlimited depth. -

-

- If a property update causes an exception, a - will be thrown. Bulk - updates continue after exceptions are encountered, throwing an exception - wrapping all exceptions encountered during the update. -

-

- implementations can be used - repeatedly, with their "target" or wrapped object changed. -

-
- Rod Johnson - Mark Pollack (.NET) -
- - Get the value of a property. - - The name of the property to get the value of. May be nested. - - The value of the property. - - if the property isn't readable, or if the getting the value throws - an exception. - - - - - Get the for a particular - property. - - - The property to be retrieved. - - - The for the particular - property. - - - - - Get the for a particular property. - - - The property the of which is to be retrieved. - - - The for a particular property.. - - - - - Get all of the instances for - all of the properties of the wrapped object. - - - An array of instances. - - - - - Set a property value. - - -

- This is the preferred way to update an individual property. -

-
- The new property value. -
- - - Set a property value. - - -

- This method is provided for convenience only. The - - method is more powerful. -

-
- - The name of the property to set value of. - - The new property value. -
- - Set a number of property values in bulk. - -

- This is the preferred way to perform a bulk update. -

-

- Note that performing a bulk update differs from performing a single update, - in that an implementation of this class will continue to update properties - if a recoverable error (such as a vetoed property change or a type - mismatch, but not an invalid property name or the like) is - encountered, throwing a - containing - all the individual errors. This exception can be examined later to see all - binding errors. Properties that were successfully updated stay changed. -

-

- Does not allow the setting of unknown fields. Equivalent to - - with an argument of false for the second parameter. -

-
- - The collection of instances to - set on the wrapped object. - -
- - - Set a number of property values in bulk with full control over behavior. - - -

- Note that performing a bulk update differs from performing a single update, - in that an implementation of this class will continue to update properties - if a recoverable error (such as a vetoed property change or a type - mismatch, but not an invalid property name or the like) is - encountered, throwing a - containing - all the individual errors. This exception can be examined later to see all - binding errors. Properties that were successfully updated stay changed. -

-

Does not allow the setting of unknown fields. -

-
- - The to set on the target object - - - Should we ignore unknown values (not found in the object!?) - -
- - - The object wrapped by the wrapper (cannot be ). - - -

- Implementations are required to allow the type of the wrapped - object to change. -

-
- The object wrapped by this wrapper. -
- - - Convenience method to return the - of the wrapped object. - - The of the wrapped object. - - - - A collection style container for - instances. - - Rod Johnson - Mark Pollack (.NET) - - - - Return the instance with the - given name. - - The name to search for. - the , or null if a - the with the supplied - did not exist in this collection. - - - - - Is there a instance for this - property name? - - The name to search for. - - True if there is a instance for - the supplied . - - - - - Return the difference (changes, additions, but not removals) of - property values between the supplied argument and the values - contained in the collection. - - -

- Subclasses should also override Equals. -

-
- The old property values. - - An containing any changes, or - an empty instance if there were - no changes. - -
- - - Return an array of the objects - held in this object. - - An array of the objects held - in this object. - - - - - This interface should be implemented by classes that want to - have access to the shared state. - - -

- Shared state is very useful if you have data that needs to be shared by all instances - of e.g. the same webform (or other IHttpHandlers). -

-

- For example, Spring.Web.UI.Page class implements this interface, which allows - each page derived from it to cache localizalization resources and parsed data binding - expressions only once and then reuse the cached values, regardless of how many instances - of the page are created. -

-
-
- - - Gets or sets the that should be used - to store shared state for this instance. - - - - - Default implementation of the - interface. - - -

- Allows simple manipulation of properties, and provides constructors to - support deep copy and construction from a number of collection types such as - and - . -

-
- Rod Johnson - Mark Pollack (.NET) - Rick Evans (.NET) -
- - - The list of objects. - - - - - Creates a new instance of the - class. - - -

- The returned instance is initially empty... - s can be added with the various - overloaded , - , - , - and - methods. -

-
- - -
- - - Creates a new instance of the - class. - - -

- Deep copy constructor. Guarantees - references are independent, although it can't deep copy objects currently - referenced by individual objects. -

-
-
- - - Creates a new instance of the - class. - - - The with property values - keyed by property name, which must be a . - - - - - Overloaded version of Add that takes a property name and a property value. - - - The name of the property. - - - The value of the property. - - - - - Add the supplied object, - replacing any existing one for the respective property. - - - The object to add. - - - - - Merges the value of the supplied 'new' with that of - the current if merging is supported and enabled. - - - The new pv. - The current pv. - The possibly merged PropertyValue - - - - Add all property values from the given - . - - - The map of property values, the keys of which must be - s. - - - - - Add all property values from the given - . - - - The list of s to be added. - - - - - Remove the given , if contained. - - - The to remove. - - - - - Removes the named , if contained. - - - The name of the property. - - - - - Modify a object held in this object. Indexed from 0. - - - - - Return the property value given the name. - - - The property name is checked in a case-insensitive fashion. - - - The name of the property. - - - The property value. - - - - - Does the container of properties contain one of this name. - - The name of the property to search for. - - True if the property is contained in this collection, false otherwise. - - - - - Return the difference (changes, additions, but not removals) of - property values between the supplied argument and the values - contained in the collection. - - Another property values collection. - - The collection of property values that are different than the supplied one. - - - - - Returns an that can iterate - through a collection. - - -

- The returned is the - exposed by the - - property. -

-
- - An that can iterate through a - collection. - -
- - - Convert the object to a string representation. - - - A string representation of the object. - - - - - Property to retrieve the array of property values. - - - - - Default implementation of the - interface that should be sufficient for all normal uses. - - -

- will convert - and array - values to the corresponding target arrays, if necessary. Custom - s that deal with - s or arrays can be written against a - comma delimited as - arrays are converted in such a format if the array itself is not assignable. -

-
- Rod Johnson - Juergen Hoeller - Jean-Pierre Pawlak - Mark Pollack (.NET) - Aleksandar Seovic(.NET) -
- - The wrapped object. - - - - The ILog instance for this class. We'll create a lot of these objects, - so we don't want a new instance every time. - - - - - Creates a new instance of the class. - - -

- The wrapped target instance will need to be set afterwards. -

-
- -
- - - Creates a new instance of the class. - - - The object wrapped by this . - - - If the supplied is . - - - - - Creates a new instance of the class, - instantiating a new instance of the specified and using - it as the . - - -

- Please note that the passed as the - argument must have a no-argument constructor. - If it does not, an exception will be thrown when this class attempts - to instantiate the supplied using it's - (non-existent) constructor. -

-
- - The to instantiate and wrap. - - - If the is , or if the - invocation of the s default (no-arg) constructor - fails (due to invalid arguments, insufficient permissions, etc). - -
- - Gets the value of a property. - - The name of the property to get the value of. - - The value of the property. - - If there is no such property, if the property isn't readable, or - if getting the property value throws an exception. - - - - Gets the value of a property. - - The property expression that should be used to retrieve the property value. - - The value of the property. - - If there is no such property, if the property isn't readable, or - if getting the property value throws an exception. - - - - - Sets a property value. - - -

- This method is provided for convenience only. The - - method is more powerful. -

-
- - The name of the property to set value of. - - The new value. -
- - - Sets a property value. - - - The property expression that should be used to set the property value. - - The new value. - - - - Sets a property value. - - -

- This is the preferred way to update an individual property. -

-
- - The object containing new property value. - -
- - Set a number of property values in bulk. - -

- Does not allow unknown fields. Equivalent to - - with and for - arguments. -

-
- - The to set on the target - object. - - - If an error is encountered while setting a property. - - - On a mismatch while setting a property, insufficient permissions, etc. - - -
- - - Perform a bulk update with full control over behavior. - - -

- This method may throw a reflection-based exception, if there is a critical - failure such as no matching field... less serious exceptions will be accumulated - and thrown as a single . -

-
- - The s to set on the target object. - - - Should we ignore unknown values (not found in the object!?). - - - If an error is encountered while setting a property (only thrown if the - parameter is set to ). - - - On a mismatch while setting a property, insufficient permissions, etc. - - -
- - - Returns PropertyInfo for the specified property - - The name of the property to search for. - The for the specified property. - If cannot be determined. - - - - Get the for a particular property. - - - The property the of which is to be retrieved. - - - The for a particular property.. - - - - - Returns MemberInfo for the specified property or field - - The name of the property or field to search for. - The or for the specified property or field. - If does not resolve to a property or field. - - - - Get the properties of the wrapped object. - - - An array of s. - - - - - This method is expensive! Only call for diagnostics and debugging reasons, - not in production. - - - A string describing the state of this object. - - - - - Attempts to parse property expression first and falls back to full expression - if that fails. Performance optimization. - - Property expression to parse. - Parsed proeprty expression. - - - - The object wrapped by this . - - - If the object cannot be changed; or an attempt is made to set the - value of this property to . - - - - - Convenience method to return the of the wrapped object. - - -

- Do not use this (convenience) method prior to setting the - property. -

-
- - The of the wrapped object. - - - If the property - is . - -
- - - Return the collection of property descriptors. - - - - - Combined exception, composed of individual binding - s. - - -

- An object of this class is created at the beginning of the binding - process, and errors added to it as necessary. -

-

- The binding process continues when it encounters application-level - s, applying those changes - that can be applied and storing rejected changes in an instance of this class. -

-
- Rod Johnson - Juergen Hoeller - Mark Pollack (.NET) -
- - - Creates a new instance of the PropertyAccessExceptionsException class. - - - - - Creates a new instance of the PropertyAccessExceptionsException class. - - - A message about the exception. - - - - - Creates a new instance of the PropertyAccessExceptionsException class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Create new empty PropertyAccessExceptionsException. - We'll add errors to it as we attempt to bind properties. - - - - - Creates a new instance of the PropertyAccessExceptionsException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Populates a with - the data needed to serialize the target object. - - - The to populate - with data. - - - The destination (see ) - for this serialization. - - - - - The IObjectWrapper wrapping the target object at the root of the exception. - - - - The list of PropertyAccessException objects. - - - - Return the - for the supplied , or - if there isn't one. - - - - - Describe the number of exceptions contained in this container class. - - A description of the instance contents. - - - - Return the that generated - this exception. - - - - - Return the object we're binding to. - - - - - If this returns zero (0), no errors were encountered during binding. - - - - - Return an array of the s - stored in this object. - - -

- Will return the empty array (not ) if there were no errors. -

-
-
- - - Describe the group of exceptions. - - - - - Holds information and value for an individual property. - - -

- Using an object here, rather than just storing all properties in a - map keyed by property name, allows for more flexibility, and the - ability to handle indexed properties in a special way if necessary. -

-

- Note that the value doesn't need to be the final required - : an - implementation must - handle any necessary conversion, as this object doesn't know anything - about the objects it will be applied to. -

-
- Rod Johnson - Mark Pollack (.NET) -
- - - Creates a new instance of the - class. - - The name of the property. - - The value of the property (possibly before type conversion). - - - If the supplied is or - contains only whitespace character(s). - - - - - Creates a new instance of the - class. - - The name of the property. - - The value of the property (possibly before type conversion). - - Pre-parsed property name. - - If the supplied or - is , or if the name contains only whitespace characters. - - - - - Print a string representation of the property. - - A string representation of the property. - - - - Determines whether the supplied - is equal to the current . - - The other instance. - - if they are equal in content. - - - - - Serves as a hash function for a particular type, suitable for use - in hashing algorithms and data structures like a hash table. - - - A hash code for the current . - - - - The name of the property. - The name of the property. - - - - Parsed property expression. - - - - - Return the value of the property. - - -

- Note that type conversion will not have occurred here. - It is the responsibility of the - implementation to - perform type conversion. -

-
- The (possibly unresolved) value of the property. -
- - - A simple pool implementation - - -

- Based on the implementation found in Concurrent Programming in Java, - 2nd ed., by Doug Lea. -

-
- Doug Lea - Federico Spinazzi - Mark Pollack -
- - - A simple pooling interface for managing and monitoring a pool - of objects. - - -

- Based on the Jakarta Commons Pool API. -

-
- Federico Spinazzi - -
- - - Obtain an instance from the pool. - - -

- By contract, clients must return the borrowed - instance using - or a related method as defined in an implementation or - sub-interface. -

-
- An instance from the pool. - - In case the pool is unusable. - - -
- - - Return an instance to the pool. - - -

- By contract, the object must have been obtained using - - or a related method as defined in an implementation or sub-interface. -

-
- The instance to be returned to the pool. - -
- - - Create an object using the factory set by - the property - or other implementation dependent mechanism - and place it into the pool. - - -

- This is an optional operation. AddObject is useful for "pre-loading" a - pool with idle objects. -

-
- - If the implementation does not support the operation. - -
- - - Close the pool and free any resources associated with it. - - - - - Clear objects sitting idle in the pool, releasing any - associated resources. - - -

- This is an optional operation. -

-
- - If the implementation does not support the operation. - -
- - - Gets the number of instances currently borrowed from the pool. - - -

- This is an optional operation. -

-
- - If the implementation does not support the operation. - -
- - - Gets the number of instances currently idle in the pool. - - -

- This is an optional operation. -

-

- This may be considered an approximation of the number of objects - that can be borrowed without creating any new instances. -

-
- - If the implementation does not support the operation. - -
- - - Set the factory used to create new instances. - - -

- This is an optional operation. -

-
- - If the implementation does not support the operation. - -
- - - Set of permits - - - - - Creates a new instance of the - class. - - - The factory used to instantiate and manage the lifecycle of pooled objects. - - The initial size of the pool. - - If the supplied is . - - - If the supplied is less than or equal to zero. - - - - - Obtain an instance from the pool. - - - In case the pool is unusable. - - - - - - - Return an instance to the pool. - - The instance to be returned to the pool. - - - - - - Create an object using the factory set by - the property - or other implementation dependent mechanism - and place it into the pool. - - -

- This implementation always throws a - . -

-
- - If the implementation does not support the operation. - -
- - - Synchronized borrow logic. - - - - - - Synchronized release logic. - - - The object to release to the pool. - - - if the object was not a busy one. - - - - - Instantiates the supplied number of instances and adds - them to the pool. - - - The initial number of objects to build. - - - If the supplied number of is - less than or equal to zero. - - - - - Close the pool and free any resources associated with it. - - - - - Clear objects sitting idle in the pool, releasing any - associated resources. - - -

- This implementation always throws a - . -

-
- - If the implementation does not support the operation. - -
- - - Change the state of the pool to unusable. - - - - - Gets the number of instances currently borrowed from the pool. - - - If the implementation does not support the operation. - - - - - - Gets the number of instances currently idle in the pool. - - - If the implementation does not support the operation. - - - - - - Set the factory used to create new instances. - - -

- This implementation always throws a - . -

-
- - If the implementation does not support the operation. - -
- - - Defines lifecycle methods for objects that are to be used in an - implementation. - - -

- The following methods summarize the contract between an - and an - an . -

- - - - is called whenever a new instance is needed. - - - - is invoked on every instance before it is returned from - the pool. - - - - is invoked on every instance when it is returned to the pool. - - - - is invoked on every instance when it is being dropped from the - pool (see - - - -

- Based on the Jakarta Commons Pool API. -

-
- Federico Spinazzi - -
- - - Creates an instance that can be returned by the pool. - - - An instance that can be returned by the pool. - - - - - Destroys an instance no longer needed by the pool. - - -

- Invoked on every instance when it is being "dropped" - from the pool (whether due to the return value from a call to the - - method, or for reasons specific to the pool implementation.) -

-
- The instance to be destroyed. -
- - - Ensures that the instance is safe to be returned by the pool. - Returns false if this object should be destroyed. - - -

- Invoked in an implementation-specific fashion to determine if an - instance is still valid to be returned by the pool. - It will only be invoked on an "activated" instance. -

-
- The instance to validate. - - if this object is not valid and - should be dropped from the pool, otherwise . - -
- - - Reinitialize an instance to be returned by the pool. - - -

- Invoked on every instance before it is returned from the pool. -

-
- The instance to be activated. -
- - - Uninitialize an instance to be returned to the pool. - - -

- Invoked on every instance when it is returned to the pool. -

-
- The instance returned to the pool. -
- - - Base class for all pooling exceptions. - - Federico Spinazzi - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class. - - - A message about the exception. - - - - - Creates a new instance of the - class. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the - class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Base class for method builders that contains common functionalities. - - Bruno Baia - - - - Defines interface that proxy method builders have to implement. - - Aleksandar Seovic - Bruno Baia - - - - Dynamically builds proxy method. - - The method to proxy. - - The interface definition of the method, if applicable. - - - The for the proxy method. - - - - - The type builder to use. - - - - - The implementation to use. - - - - - Indicates whether interfaces should be implemented explicitly. - - - - - Creates a new instance of the method builder. - - The type builder to use. - - The implementation to use. - - - if the interface is to be - implemented explicitly; otherwise . - - - - - Dynamically builds proxy method. - - The method to proxy. - - The interface definition of the method, if applicable. - - - The for the proxy method. - - - - - Generates the IL instructions that pushes - the proxy instance on stack. - - The IL generator to use. - - - - Generates the IL instructions that pushes - the target instance on which calls should be delegated to. - - The IL generator to use. - - - - Defines proxy method for the target object. - - The method to proxy. - - The interface definition of the method, if applicable. - - - if the supplied is to be - implemented explicitly; otherwise . - - - The for the proxy method. - - - - - Defines method parameters based on proxied method metadata. - - - The to use. - - The method to proxy. - - - - Defines generic method parameters based on proxied method metadata. - - - The to use. - - The method to proxy. - - - - Generates the proxy method. - - The IL generator to use. - The method to proxy. - - The interface definition of the method, if applicable. - - - - - Calls target method directly. - - The IL generator to use. - The method to invoke. - - - - Emits code to ensure that target understands the method and throw a sensible exception otherwise. - - - - - Calls base method directly. - - The IL generator to use. - The method to proxy. - - - - Replaces a raw reference with a reference to a proxy. - - -

- If the target object returns reference to itself -- 'this' -- - we need to treat it as a special case and return a reference - to a proxy object instead. -

-
- The IL generator to use. - The location of the return value. -
- - - Generates code that throws . - - IL generator to use. - the type of the exception to throw - Error message to use. - - - - Base class for proxy builders that can be used - to create a proxy for any class. - - -

- This class provides a set of template - methods that derived classes can override to provide custom behaviour - appropriate to the type of proxy that is being generated (one of - inheritance or composition-based proxying). -

-
- Aleksandar Seovic - Bruno Baia -
- - - Describes the operations for a generic proxy type builder that can be - used to create a proxy type for any class. - - Aleksandar Seovic - - - - Creates the proxy type. - - The generated proxy class. - - - - The name of the proxy . - - The name of the proxy . - - - - The of the target object. - - - - - The of the class that the proxy must - inherit from. - - - - - Gets or sets the list of interfaces proxy should implement. - - - - - Should we proxy target attributes? - - - by default. - Target type attributes, method attributes, method's return type attributes - and method's parameter attributes are copied to the proxy. - - - - - The list of custom s that the proxy - class must be decorated with. - - -

- Note that the list is composed of instances of the actual - s that are to be applied, not the - s of the s. -

-
- -

- The following code snippets show examples of how to decorate the - the proxied class with one or more s. -

- - // get a concrete implementation of an IProxyTypeBuilder... - IProxyTypeBuilder builder = ... ; - builder.TargetType = typeof( ... ); - - IDictionary typeAtts = new Hashtable(); - builder.TypeAttributes = typeAtts; - - // applies a single Attribute to the proxied class... - typeAtts = new Attribute[] { new MyCustomAttribute() }); - - // applies a number of Attributes to the proxied class... - typeAtts = new Attribute[] - { - new MyCustomAttribute(), - new AnotherAttribute(), - }); - -
-
- - - The custom s that the proxy - members must be decorated with. - - -

- This dictionary must use simple s for keys - (denoting the member names that the attributes are to be applied to), - with the corresponding values being - s. -

-

- The key may be wildcarded using the '*' character... if so, - then those proxy members that match against the key will be - decorated with the attendant list of - s. This naturally implies that using - the '*' character as a key will result in the attendant list - of s being applied to every member of - the proxied class. -

-
- -

- The following code snippets show examples of how to decorate the - members of a proxied class with one or more - s. -

- - // get a concrete implementation of an IProxyTypeBuilder... - IProxyTypeBuilder builder = ... ; - builder.TargetType = typeof( ... ); - - IDictionary memAtts = new Hashtable(); - builder.MemberAttributes = memAtts; - - // applies a single Attribute to all members of the proxied class... - memAtts ["*"] = new Attribute[] { new MyCustomAttribute() }); - - // applies a number of Attributes to all members of the proxied class... - memAtts ["*"] = new Attribute[] - { - new MyCustomAttribute(), - new AnotherAttribute(), - }); - - // applies a single Attribute to those members of the proxied class - // that have identifiers starting with 'Do' ... - memAtts ["Do*"] = new Attribute[] { new MyCustomAttribute() }); - - // applies a number of Attributes to those members of the proxied class - // that have identifiers starting with 'Do' ... - memAtts ["Do*"] = new Attribute[] - { - new MyCustomAttribute(), - new AnotherAttribute(), - }); - -
-
- - - Describes the operations that generates IL instructions - used to build the proxy type. - - Bruno Baia - - - - Generates the IL instructions that pushes - the proxy instance on stack. - - The IL generator to use. - - - - Generates the IL instructions that pushes - the target instance on which calls should be delegated to. - - The IL generator to use. - - - - The shared instance for this class (and derived classes). - - - - - Creates the proxy type. - - The generated proxy class. - - - - Generates the IL instructions that pushes - the proxy instance on stack. - - The IL generator to use. - - - - Generates the IL instructions that pushes - the target instance on which calls should be delegated to. - - The IL generator to use. - - - - Creates an appropriate type builder. - - The name to use for the proxy type name. - The type to extends if provided. - The type builder to use. - - - - Applies attributes to the proxy class. - - The type builder to use. - The proxied class. - - - - - - Applies attributes to the proxied method. - - The method builder to use. - The proxied method. - - - - - - Applies attributes to the proxied method's return type. - - The method builder to use. - The proxied method. - - - - - Applies attributes to proxied method's parameters. - - The method builder to use. - The proxied method. - - - - - Calculates and returns the list of attributes that apply to the - specified type. - - The type to find attributes for. - - A list of custom attributes that should be applied to type. - - - - - - - Calculates and returns the list of attributes that apply to the - specified method. - - The method to find attributes for. - - A list of custom attributes that should be applied to method. - - - - - - - Calculates and returns the list of attributes that apply to the - specified method's return type. - - The method to find attributes for. - - A list of custom attributes that should be applied to method's return type. - - - - - - Calculates and returns the list of attributes that apply to the - specified method's parameters. - - The method to find attributes for. - The method's parameter to find attributes for. - - A list of custom attributes that should be applied to the specified method's parameter. - - - - - - Check that the specified object is matching the passed attribute type. - - -

- The specified object can be of different type : -

- - - - - - System.Reflection.CustomAttributeData (Only with .NET 2.0) - - - - - -
- The object instance to check. - The attribute type to test against. - - if the object instance matches the attribute type; - otherwise . - -
- - - Defines the types of the parameters for the specified constructor. - - The constructor to use. - The types for constructor's parameters. - - - - Implements constructors for the proxy class. - - - The builder to use. - - - - - Generates the proxy constructor. - - The constructor builder to use. - The IL generator to use. - The constructor to use. - - - - Implements an interface. - - - Generates proxy methods that belongs to the interface - using the specified . - - The type builder to use. - - The implementation to use - - The interface to implement. - - The of the target object. - - - - - Implements an interface. - - - Generates proxy methods that belongs to the interface - using the specified . - - The type builder to use. - - The implementation to use - - The interface to implement. - - The of the target object. - - - if target virtual methods should not be proxied; - otherwise . - - - - - Gets the mapping of the interface to proxy - into the actual methods on the target type - that does not need to implement that interface. - - -

- If the target type does not implement the interface, - we return the interfaces methods as the target methods for many reasons : -

    -
  • - The target object can change for an object that implements the interface. - (See 'Spring.Aop.Framework.DynamicProxy.IAdvisedProxyMethodBuilder' - implementation in the Spring AOP framework for an example) -
  • -
  • - Allow Transparent proxies to be proxied. - (See Spring Remoting framework for an example) -
  • -
  • - Allow null target to be proxied. - (See Spring AOP framework which avoid calls to the target object - by intercepting all methods. Think "dynamic mock") - (See 'Spring.Web.Services.WebServiceProxyFactory' implementation for another example) -
  • -
-

-
- - The of the target object. - - The interface to implement. - - An interface mapping for the interface to proxy. - -
- - - Inherit from a type. - - - Generates proxy methods for base virtual methods - using the specified . - - - The builder to use for code generation. - - - The implementation to use to override base virtual methods. - - The to inherit from. - - - - Inherit from a type. - - - Generates proxy methods for base virtual methods - using the specified . - - - The builder to use for code generation. - - - The implementation to use to override base virtual methods. - - The to inherit from. - - if only members declared at the level - of the supplied 's hierarchy should be proxied; - otherwise . - - - - - Implements the specified . - - The type builder to use. - The type the property is defined on. - The property to proxy. - The implemented methods map. - - - - Implements the specified event. - - The type builder to use. - The type the event is defined on. - The event to proxy. - The implemented methods map. - - - - Returns an array of s that represent - the proxiable interfaces. - - - An interface is proxiable if it's not marked with the - . - - - The array of interfaces from which - we want to get the proxiable interfaces. - - - An array containing the interface s. - - - - - Checks if specified interface is of a special type - that should never be proxied (i.e. ISerializable). - - Interface type to check. - - true if it is, false otherwise. - - - - - The name of the proxy . - - The name of the proxy . - - - - The of the target object. - - - - - The of the class that the proxy must - inherit from. - - -

- The default value of this property is the - . -

-
-
- - - Gets or sets the list of interfaces proxy should implement. - - - The default value of this property is all the interfaces - implemented or inherited by the target type. - - - - - Should we proxy target attributes? - - - - - - The list of custom s that the proxy - class must be decorated with. - - - - - - The custom s that the proxy - members must be decorated with. - - - - - - Implementation of IProxyMethodBuilder that delegates method calls to the base class. - - Bruno Baia - - - - Creates a new instance of the method builder. - - The type builder to use. - - The implementation to use. - - - if the interface is to be - implemented explicitly; otherwise . - - - - - Generates the proxy method. - - The IL generator to use. - The method to proxy. - - The interface definition of the method, if applicable. - - - - - Builds a proxy type using composition. - - - - In order for this builder to work, the target must implement - one or more interfaces. - - - Aleksandar Seovic - Bruno Baia - - - - Target instance calls should be delegated to. - - - - - Creates a new instance of the - class. - - - - - Creates a proxy that delegates calls to an instance of the - target object. - - -

- Only interfaces can be proxied using composition, so the target - must implement one or more interfaces. -

-
- The generated proxy class. - - If the - does not implement any interfaces. - -
- - - Create an to create interface implementations - - - - - Allows subclasses to generate additional code - - - - - Generates the IL instructions that pushes - the target instance on which calls should be delegated to. - - The IL generator to use. - - - - Deaclares a field that holds the target object instance. - - - The builder to use for code generation. - - - - - Generates the proxy constructor. - - -

- This implementation creates instance of the target object for delegation - using constructor arguments. -

-
- The constructor builder to use. - The IL generator to use. - The constructor to delegate the creation to. -
- - - Gets or sets a value indicating whether interfaces should be implemented explicitly. - - - if they should be; otherwise, . - - - - - Allows easy access to existing and creation of new dynamic proxies. - - Aleksandar Seovic - Bruno Baia - - - - The name of the assembly that defines proxy types created. - - - - - The attributes of the proxy type to generate. - - - - - Creates an appropriate type builder. - - The proxy type name. - The type to extends if provided. - The type builder to use. - - - - Saves dynamically generated assembly to disk. - Can only be called in DEBUG_DYNAMIC mode, per ConditionalAttribute rules. - - - - - Builds a proxy type using inheritance. - - - - In order for this builder to work, target methods have to be either - , or belong to an interface. - - - Aleksandar Seovic - Bruno Baia - - - - Creates a new instance of the - class. - - - - - Creates a proxy that inherits the proxied object's class. - - -

- Only (non-final) methods can be proxied, - unless they are members of one of the interfaces that target class - implements. In that case, methods will be proxied using explicit - interface implementation, which means that client code will have - to cast the proxy to a specific interface in order to invoke the - methods. -

-
- The generated proxy class. -
- - - Generates the IL instructions that pushes - the target instance on which calls should be delegated to. - - The IL generator to use. - - - - Generates the proxy constructor. - - -

- This implementation delegates the call to a base class constructor. -

-
- The constructor builder to use. - The IL generator to use. - - The base class constructor to delegate the call to. - -
- - - Gets or sets a value indicating whether inherited members should be proxied. - - - if they should be; otherwise, . - - - - - This attribute can be used to mark interfaces that should not be proxied - - Bruno Baia - - - - Creates a new instance of the - class. - - - - - Implementation of IProxyMethodBuilder that delegates method calls to target object. - - Bruno Baia - - - - Creates a new instance of the method builder. - - The type builder to use. - - The implementation to use. - - - if the interface is to be - implemented explicitly; otherwise . - - - - - Generates the proxy method. - - The IL generator to use. - The method to proxy. - - The interface definition of the method, if applicable. - - - - - Base class for dynamic members. - - Aleksandar Seovic - - - - Method attributes constant. - - - - - Sets up target instance for invocation. - - IL generator to use. - Type of target instance. - - - - Sets up invocation argument. - - IL generator to use. - Argument type. - Argument position. - - - - Generates method invocation code. - - IL generator to use. - Flag specifying whether method is static. - Flag specifying whether method is on the value type. - Method to invoke. - - - - Generates code to process return value if necessary. - - IL generator to use. - Type of the return value. - - - - Generates code that throws . - - IL generator to use. - Error message to use. - - - - Defines constructors that dynamic constructor class has to implement. - - - - - Invokes dynamic constructor. - - - Constructor arguments. - - - A constructor value. - - - - - Safe wrapper for the dynamic constructor. - - - will attempt to use dynamic - constructor if possible, but it will fall back to standard - reflection if necessary. - - - - - Obtains cached constructor info or creates a new entry, if none is found. - - - - - Creates a new instance of the safe constructor wrapper. - - Constructor to wrap. - - - - Invokes dynamic constructor. - - - Constructor arguments. - - - A constructor value. - - - - - Factory class for dynamic constructors. - - Aleksandar Seovic - - - - Creates dynamic constructor instance for the specified . - - Constructor info to create dynamic constructor for. - Dynamic constructor for the specified . - - - - Defines methods that dynamic field class has to implement. - - - - - Gets the value of the dynamic field for the specified target object. - - - Target object to get field value from. - - - A field value. - - - - - Gets the value of the dynamic field for the specified target object. - - - Target object to set field value on. - - - A new field value. - - - - - Safe wrapper for the dynamic field. - - - will attempt to use dynamic - field if possible, but it will fall back to standard - reflection if necessary. - - - - - Obtains cached fieldInfo or creates a new entry, if none is found. - - - - - Creates a new instance of the safe field wrapper. - - Field to wrap. - - - - Gets the value of the dynamic field for the specified target object. - - - Target object to get field value from. - - - A field value. - - - - - Gets the value of the dynamic field for the specified target object. - - - Target object to set field value on. - - - A new field value. - - - - - Holds cached Getter/Setter delegates for a Field - - - - - Factory class for dynamic fields. - - Aleksandar Seovic - - - - Creates dynamic field instance for the specified . - - Field info to create dynamic field for. - Dynamic field for the specified . - - - - Defines methods that dynamic indexer class has to implement. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get the indexer value from. - - - Indexer argument. - - - A indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get the indexer value from. - - - Indexer argument. - - - A indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get the indexer value from. - - - Indexer arguments. - - - A indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to set the indexer value on. - - - Indexer argument. - - - A new indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to set the indexer value on. - - - Indexer argument. - - - A new indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to set the indexer value on. - - - Indexer arguments. - - - A new indexer value. - - - - - Safe wrapper for the dynamic indexer. - - - will attempt to use dynamic - indexer if possible, but it will fall back to standard - reflection if necessary. - - - - - Creates a new instance of the safe indexer wrapper. - - Indexer to wrap. - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get indexer value from. - - - Indexer arguments. - - - A indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get the indexer value from. - - - Indexer argument. - - - A indexer value. - - - - - Gets the value of the dynamic indexer for the specified target object. - - - Target object to get indexer value from. - - - Indexer arguments. - - - A indexer value. - - - - - Sets the value of the dynamic indexer for the specified target object. - - - Target object to set indexer value on. - - - Indexer arguments. - - - A new indexer value. - - - - - Sets the value of the dynamic indexer for the specified target object. - - - Target object to set indexer value on. - - - Indexer arguments. - - - A new indexer value. - - - - - Sets the value of the dynamic indexer for the specified target object. - - - Target object to set indexer value on. - - - Indexer arguments. - - - A new indexer value. - - - - - Internal PropertyInfo accessor. - - - - - Factory class for dynamic indexers. - - Aleksandar Seovic - - - - Prevent instantiation - - - - - Creates dynamic indexer instance for the specified . - - Indexer info to create dynamic indexer for. - Dynamic indexer for the specified . - - - - Defines methods that dynamic method class has to implement. - - - - - Invokes dynamic method on the specified target object. - - - Target object to invoke method on. - - - Method arguments. - - - A method return value. - - - - - Safe wrapper for the dynamic method. - - - will attempt to use dynamic - method if possible, but it will fall back to standard - reflection if necessary. - - - - - Creates a new instance of the safe method wrapper. - - Method to wrap. - - - - Invokes dynamic method. - - - Target object to invoke method on. - - - Method arguments. - - - A method return value. - - - - - Gets the class, that declares this method - - - - - Factory class for dynamic methods. - - Aleksandar Seovic - - - - Creates dynamic method instance for the specified . - - Method info to create dynamic method for. - Dynamic method for the specified . - - - - Defines methods that dynamic property class has to implement. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to get property value from. - - - A property value. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to set property value on. - - - A new property value. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to get property value from. - - Optional index values for indexed properties. This value should be null reference for non-indexed properties. - - A property value. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to set property value on. - - - A new property value. - - Optional index values for indexed properties. This value should be null reference for non-indexed properties. - - - - Safe wrapper for the dynamic property. - - - will attempt to use dynamic - property if possible, but it will fall back to standard - reflection if necessary. - - - - - Obtains cached property info or creates a new entry, if none is found. - - - - - Creates a new instance of the safe property wrapper. - - Property to wrap. - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to get property value from. - - - A property value. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to get property value from. - - Optional index values for indexed properties. This value should be null reference for non-indexed properties. - - A property value. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to set property value on. - - - A new property value. - - - - - Gets the value of the dynamic property for the specified target object. - - - Target object to set property value on. - - - A new property value. - - Optional index values for indexed properties. This value should be null reference for non-indexed properties. - - - - Internal PropertyInfo accessor. - - - - - Holds cached Getter/Setter delegates for a Property - - - - - Factory class for dynamic properties. - - Aleksandar Seovic - - - - Creates safe dynamic property instance for the specified . - - -

This factory method will create a dynamic property with a "safe" wrapper.

-

Safe wrapper will attempt to use generated dynamic property if possible, - but it will fall back to standard reflection if necessary.

-
- Property info to create dynamic property for. - Safe dynamic property for the specified . - -
- - - Creates dynamic property instance for the specified . - - Property info to create dynamic property for. - Dynamic property for the specified . - - - - Represents a Get method - - the target instance when calling an instance method - the value return by the Get method - - - - Represents a Set method - - the target instance when calling an instance method - the value to be set - - - - Represents an Indexer Get method - - the target instance when calling an instance method - - the value return by the Get method - - - - Represents a Set method - - the target instance when calling an instance method - the value to be set - - - - - Represents a method - - the target instance when calling an instance method - arguments to be passed to the method - the value return by the method. null when calling a void method - - - - Represents a constructor - - arguments to be passed to the method - the new object instance - - - - Represents a callback method used to create an from a instance. - - - - - Represents a callback method used to create an from a instance. - - - - - Represents a callback method used to create an from a instance. - - - - - Represents a callback method used to create an from a instance. - - - - - Represents a callback method used to create an from a instance. - - - - - Allows easy access to existing and creation of new dynamic relection members. - - Aleksandar Seovic - - - - The name of the assembly that defines reflection types created. - - - - - The attributes of the reflection type to generate. - - - - - Cache for dynamic property types. - - - - - Cache for dynamic field types. - - - - - Cache for dynamic indexer types. - - - - - Cache for dynamic method types. - - - - - Cache for dynamic constructor types. - - - - - Creates an appropriate type builder. - - - The base name to use for the reflection type name. - - The type builder to use. - - - - Returns dynamic property if one exists. - - Property to look up. - callback function that will be called to create the dynamic property - An for the given property info. - - - - Returns dynamic field if one exists. - - Field to look up. - callback function that will be called to create the dynamic field - An for the given field info. - - - - Returns dynamic indexer if one exists. - - Indexer to look up. - callback function that will be called to create the dynamic indexer - An for the given indexer. - - - - Returns dynamic method if one exists. - - Method to look up. - callback function that will be called to create the dynamic method - An for the given method. - - - - Returns dynamic constructor if one exists. - - Constructor to look up. - callback function that will be called to create the dynamic constructor - An for the given constructor. - - - - Saves dynamically generated assembly to disk. - Can only be called in DEBUG mode, per ConditionalAttribute rules. - - - - - Create a new Get method delegate for the specified field using - - the field to create the delegate for - a delegate that can be used to read the field - - - - Create a new Set method delegate for the specified field using - - the field to create the delegate for - a delegate that can be used to read the field. - - If the field's returns true, the returned method - will throw an when called. - - - - - Create a new Get method delegate for the specified property using - - the property to create the delegate for - a delegate that can be used to read the property. - - If the property's returns false, the returned method - will throw an when called. - - - - - Create a new Set method delegate for the specified property using - - the property to create the delegate for - a delegate that can be used to write the property. - - If the property's returns false, the returned method - will throw an when called. - - - - - Create a new method delegate for the specified method using - - the method to create the delegate for - a delegate that can be used to invoke the method. - - - - Creates a new delegate for the specified constructor. - - the constructor to create the delegate for - delegate that can be used to invoke the constructor. - - - - Creates a instance with the highest possible code access security. - - - If allowed by security policy, associates the method with the s declaring type. - Otherwise associates the dynamic method with . - - - - - Delegates a Method(object target, params object[] args) call to the actual underlying method. - - - - - Generates code to process return value if necessary. - - IL generator to use. - Type of the return value. - - - - Converts to an instance of if necessary to - e.g. avoid e.g. double/int cast exceptions. - - - - This method mimics the behavior of the compiler that - automatically performs casts like int to double in "Math.Sqrt(4)".
- See about implicit, widening type conversions on MSDN - Type Conversion Tables -
- - Note: is expected to be a value type! - -
-
- - - Generates code that throws . - - IL generator to use. - Error message to use. - - - - Indicates that an annotated class is a "component". - Such classes are considered as candidates for future features such - as auto-detection when using attribute-based configuration and assembly scanning. - - Other class-level annotations may be considered as identifying - a component as well, typically a special kind of component: - e.g. the Repository attribute. - - Mark Fisher - Mark Pollack (.NET) - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The name of the component. - - - - Gets or sets the name of the component - - The name of the component. - - - - Indicates that an annotated class is a "Repository" (or "DAO"). - - - A class with this attribute is eligible for Spring DataAccessException translation. A class - with the Repository attribute is also clarified as to its role in the overall application - architecture for the purpose of tools, aspects, etc. - - This attribute also serves as a specialization of the ComponentAttribute, allowing implementation - classes to be autodetected in future releases through assembly scanning. - - - Rod Johnson - Jueren Hoeller - Mark Pollack (.NET) - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The name of the repository. - - - - Indicates that an annotated class is a "Service" (e.g. a business service facade). - - - - This attribute also serves as a specialization of the ComponentAttribute, allowing implementation - classes to be autodetected in future releases through assembly scanning. - - - Juergen Hoeller - Mark Pollack (.NET) - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The name. - - - - Implements by using . - - Erich Eichinger - - - - Specifies the contract a strategy must be implement to store and - retrieve data that is specific to the executing thread. - - - All implementations of this interface must treat keys case-sensitive. - - Erich Eichinger - - - - Retrieves an object with the specified . - - The name of the item. - - The object in the current thread's context associated with the - specified or null if no object has been stored previously - - - - - Stores a given object and associates it with the specified . - - The name with which to associate the new item. - The object to store in the current thread's context. - - - - Empties a data slot with the specified name. - - - If the object with the specified is not found, the method does nothing. - - The name of the object to remove. - - - - Retrieves an object with the specified name. - - The name of the item. - The object in the call context associated with the specified name or null if no object has been stored previously - - - - Stores a given object and associates it with the specified name. - - The name with which to associate the new item. - The object to store in the call context. - - - - Empties a data slot with the specified name. - - The name of the data slot to empty. - - - - Acquire/Release protocol, base of many concurrency utilities. - - - -

objects isolate waiting and notification for particular logical - states, resource availability, events, and the like that are shared - across multiple threads.

- -

Use of s sometimes (but by no means always) adds - flexibility and efficiency compared to the use of plain - .Net monitor methods and locking, and are sometimes (but by no means - always) simpler to program with.

- -

Used for implementation of a

-
- - Doug Lea - Federico Spinazzi (.Net) -
- - Wait (possibly forever) until successful passage. - Fail only upon interuption. Interruptions always result in - `clean' failures. On failure, you can be sure that it has not - been acquired, and that no - corresponding release should be performed. Conversely, - a normal return guarantees that the acquire was successful. - - - - - Potentially enable others to pass. -

- Because release does not raise exceptions, - it can be used in `finally' clauses without requiring extra - embedded try/catch blocks. But keep in mind that - as with any java method, implementations may - still throw unchecked exceptions such as Error or NullPointerException - when faced with uncontinuable errors. However, these should normally - only be caught by higher-level error handlers. -

-
-
- - - Wait at most msecs to pass; report whether passed. -

- The method has best-effort semantics: - The msecs bound cannot - be guaranteed to be a precise upper bound on wait time in Java. - Implementations generally can only attempt to return as soon as possible - after the specified bound. Also, timers in Java do not stop during garbage - collection, so timeouts can occur just because a GC intervened. - So, msecs arguments should be used in - a coarse-grained manner. Further, - implementations cannot always guarantee that this method - will return at all without blocking indefinitely when used in - unintended ways. For example, deadlocks may be encountered - when called in an unintended context. -

-
- the number of milleseconds to wait - An argument less than or equal to zero means not to wait at all. - However, this may still require - access to a synchronization lock, which can impose unbounded - delay if there is a lot of contention among threads. - - true if acquired -
- - A latch is a boolean condition that is set at most once, ever. - Once a single release is issued, all acquires will pass. -

- Sample usage. Here are a set of classes that use - a latch as a start signal for a group of worker threads that - are created and started beforehand, and then later enabled. -

- - class Worker implements IRunnable { - private readonly Latch startSignal; - Worker(Latch l) - { - startSignal = l; - } - - public void Run() { - startSignal.acquire(); - DoWork(); - } - - void DoWork() { ... } - } - - class Driver { // ... - void Main() { - Latch go = new Latch(); - for (int i = 0; i < N; ++i) // make threads - new Thread(new ThreadStart(new Worker(go)).Start(); - DoSomethingElse(); // don't let run yet - go.Release(); // let all threads proceed - } - } - -
- Doug Lea - Federico Spinazzi (.Net) -
- - - can acquire ? - - - - - Method mainly used by clients who are trying to get the latch - - - - Wait at most msecs millisconds for a permit - - - - Enable all current and future acquires to pass - - - - - An abstraction to safely store "ThreadStatic" data. - - - By default, is used to store thread-specific data. - You may switch the storage strategy by calling .

- NOTE: Access to the underlying storage is not synchronized for performance reasons. - You should call only once at application startup! - - Erich Eichinger - - -

- Holds the current strategy. - - - Access to this variable is not synchronized on purpose for performance reasons. - Setting a different strategy should happen only once - at application startup. - -
- - - Set the new strategy. - - - - - Retrieves an object with the specified name. - - The name of the item. - The object in the context associated with the specified name or null if no object has been stored previously - - - - Stores a given object and associates it with the specified name. - - The name with which to associate the new item. - The object to store in the current thread's context. - - - - Empties a data slot with the specified name. - - The name of the data slot to empty. - - - -

Base class for counting semaphores based on Semaphore implementation - from Doug Lea.

-
- - -

Conceptually, a semaphore - maintains a set of permits. Each acquire() blocks if - necessary until a permit is available, and then takes it.

- -

Each release adds a permit. However, no actual permit objects are used; - the Semaphore just keeps a count of the number available - and acts accordingly.

- -

A semaphore initialized to 1 can serve as a mutual exclusion lock.

- - Used for implementation of a -
- Doug Lea - Federico Spinazzi (.Net) -
- - - current number of available permits - - - - -

Create a Semaphore with the given initial number of permits.

-

Using a seed of 1 makes the semaphore act as a mutual - exclusion lock.

- -

Negative seeds are also allowed, - in which case no acquires will proceed until the number of - releases has pushed the number of permits past 0.

-
-
- - - Release a permit - - - - - Acquire a permit - - - - - Wait at most msecs millisconds for a permit - - number of ms to wait - true if aquired - - - Release N permits. release(n) is - equivalent in effect to: -
-            for (int i = 0; i < n; ++i) release();
-            
- But may be more efficient in some semaphore implementations. -
- if n is negative. - - -
- - Return the current number of available permits. - Returns an accurate, but possibly unstable value, - that may change immediately after returning. - - - - - Utility class to use an with the - C# using () {} idiom - - - - - Creates a new trying to the given - - - the to be held - - - - Creates a new trying to the given - - - the to be held - millisecond to try to acquire the lock - - - - Releases the held - - - - - initializes and acquire access to the - - - - - - Implements by using a hashtable. - - Erich Eichinger - - - - Retrieves an object with the specified name. - - The name of the item. - The object in the call context associated with the specified name or null if no object has been stored previously - - - - Stores a given object and associates it with the specified name. - - The name with which to associate the new item. - The object to store in the call context. - - - - Empties a data slot with the specified name. - - The name of the data slot to empty. - - - Thrown by synchronization classes that report - timeouts via exceptions. The exception is treated - as a form (subclass) of InterruptedException. This both - simplifies handling, and conceptually reflects the fact that - timed-out operations are artificially interrupted by timers. - - - - - The approximate time that the operation lasted before - this timeout exception was thrown. - - - - - - Creates a new instance of the - class. - - - - - Creates a new instance of the - class with the - specified message. - - - A message about the exception. - - - - - Creates a new instance of the - class with the - specified message. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the - class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Override of GetObjectData to allow for private serialization - - serialization info - streaming context - - - Constructs a TimeoutException with given duration value. - - - - - Constructs a TimeoutException with the - specified duration value and detail message. - - - - - Gets the approximate time that the operation lasted before - this timeout exception was thrown. - - - - A TimeoutSync is an adaptor class that transforms all - calls to acquire to instead invoke attempt with a predetermined - timeout value. - - - - - - the adapted sync - - - - - timeout value - - - - Create a TimeoutSync using the given Sync object, and - using the given timeout value for all calls to acquire. - - - - - Try to acquire the sync before the timeout - - In case a time out occurred - - - - - - - - - - - - - - Support to account for differences between java nad .NET: -
    -
-
-
- - - .NET threads have not a method to check if they have been interrupted. - Moreover, differently from java threads, when entering locked - blocks, Monitor, Sleep, SpinWait and so on, a - will be raised by the runtime. -

Spring.Threading classes usually call this method before entering a lock block, to mirror java code -

Usually this is non issue because the same exception will be raised entering the monitor - associated with the lock () -

-
- if the thread has been interrupted -
- - - Normalize the given so that - is is comparable with . - - Date. - - - - - - - - - the difference between millisecodns of the first and second date - - - - Returns the number of nanoseconds for the current value of - - Current number of nanoseconds - - - - Returns the number of nano seconds represented by the - - to use - Number of nano seconds for - - - - Returns a representing the number of nanoseconds passed in via . - - Number of nanoseconds. - representing the number of nanoseconds passed in. - - - - Placeholder for java.lang.System.currentTimeMillis - - The current machine time in milliseconds - - - - Has been interrupted this thread - - - - - Miscellaneous generic collection utility methods. - - - Mainly for internal use within the framework. - - Mark Pollack (.NET) - - - - Determine whether a given collection only contains - a single unique object - - - - - - - Determines whether the contains the specified . - - The collection to check. - The object to locate in the collection. - if the element is in the collection, otherwise. - - - - Determines whether the collection contains all the elements in the specified collection. - - The collection to check. - Collection whose elements would be checked for containment. - true if the target collection contains all the elements of the specified collection. - - - - Removes all the elements from the target collection that are contained in the source collection. - - Collection where the elements will be removed. - Elements to remove from the target collection. - - - - Various utility methods relating to the manipulation of arrays. - - Aleksandar Seovic - - - - Checks if the given array or collection has elements and none of the elements is null. - - the collection to be checked. - true if the collection has a length and contains only non-null elements. - - - - Use this sort method instead of to overcome - bugs in Mono. - - - - - Checks if the given array or collection is null or has no elements. - - - - - - - Tests equality of two single-dimensional arrays by checking each element - for equality. - - The first array to be checked. - The second array to be checked. - True if arrays are the same, false otherwise. - - - - Returns hash code for an array that is generated based on the elements. - - - Hash code returned by this method is guaranteed to be the same for - arrays with equal elements. - - - Array to calculate hash code for. - - - A hash code for the specified array. - - - - - Returns string representation of an array. - - - Array to return as a string. - - - String representation of the specified . - - - - - Concatenates 2 arrays of compatible element types - - - If either of the arguments is null, the other array is returned as the result. - The array element types may differ as long as they are assignable. The result array will be of the "smaller" element type. - - - - - Assertion utility methods that simplify things such as argument checks. - - -

- Not intended to be used directly by applications. -

-
- Aleksandar Seovic - Erich Eichinger -
- - - Checks, whether may be invoked on . - Supports testing transparent proxies. - - the target instance or null - the name of the target to be used in error messages - the method to test for - - if is null - - - if it is not possible to invoke on - - - - - checks, whether supports the methods of . - Supports testing transparent proxies. - - the target instance or null - the name of the target to be used in error messages - the type to test for - - if is null - - - if it is not possible to invoke methods of - type on - - - - - Checks the value of the supplied and throws an - if it is . - - The object to check. - The argument name. - - If the supplied is . - - - - - Checks the value of the supplied and throws an - if it is . - - The object to check. - The argument name. - - An arbitrary message that will be passed to any thrown - . - - - If the supplied is . - - - - - Checks the value of the supplied string and throws an - if it is or - contains only whitespace character(s). - - The string to check. - The argument name. - - If the supplied is or - contains only whitespace character(s). - - - - - Checks the value of the supplied string and throws an - if it is or - contains only whitespace character(s). - - The string to check. - The argument name. - - An arbitrary message that will be passed to any thrown - . - - - If the supplied is or - contains only whitespace character(s). - - - - - Checks the value of the supplied and throws - an if it is or contains no elements. - - The array or collection to check. - The argument name. - - If the supplied is or - contains no elements. - - - - - Checks the value of the supplied and throws - an if it is or contains no elements. - - The array or collection to check. - The argument name. - An arbitrary message that will be passed to any thrown . - - If the supplied is or - contains no elements. - - - - - Checks the value of the supplied and throws - an if it is , contains no elements or only null elements. - - The array or collection to check. - The argument name. - - If the supplied is , - contains no elements or only null elements. - - - - - Checks whether the specified can be cast - into the . - - - The argument to check. - - - The name of the argument to check. - - - The required type for the argument. - - - An arbitrary message that will be passed to any thrown - . - - - - - Assert a boolean expression, throwing ArgumentException - if the test result is false. - - a boolean expression. - The exception message to use if the assertion fails. - - if expression is false - - - - - Assert a boolean expression, throwing ArgumentException - if the test result is false. - - a boolean expression. - - if expression is false - - - - - Assert a bool expression, throwing InvalidOperationException - if the expression is false. - - a boolean expression. - The exception message to use if the assertion fails - if expression is false - - - - Creates a new instance of the class. - - -

- This is a utility class, and as such exposes no public constructors. -

-
-
- - - General utility methods for working with annotations - - - - - Find a single Attribute of the type 'attributeType' from the supplied class, - traversing it interfaces and super classes if no attribute can be found on the - class iteslf. - - - This method explicitly handles class-level attributes which are not declared as - inherited as well as attributes on interfaces. - - The class to look for attributes on . - Type of the attribibute to look for. - the attribute of the given type found, or null - - - - Miscellaneous collection utility methods. - - - Mainly for internal use within the framework. - - Mark Pollack (.NET) - - - - Checks if the given array or collection has elements and none of the elements is null. - - the collection to be checked. - true if the collection has a length and contains only non-null elements. - - - - Checks if the given array or collection is null or has no elements. - - - - - - - Determine whether a given collection only contains - a single unique object - - - - - - - Determines whether the contains the specified . - - The collection to check. - The object to locate in the collection. - if the element is in the collection, otherwise. - - - - Adds the specified to the specified . - - The collection to add the element to. - The object to add to the collection. - - - - Adds the specified to the specified . - - The enumerable to add the element to. - The object to add to the collection. - - - - Determines whether the collection contains all the elements in the specified collection. - - The collection to check. - Collection whose elements would be checked for containment. - true if the target collection contains all the elements of the specified collection. - - - - Removes all the elements from the target collection that are contained in the source collection. - - Collection where the elements will be removed. - Elements to remove from the target collection. - - - - Converts an instance to an instance. - - The instance to be converted. - An instance in which its elements are the elements of the instance. - if the is null. - - - - Copies the elements of the to a - new array of the specified element type. - - The instance to be converted. - The element of the destination array to create and copy elements to - An array of the specified element type containing copies of the elements of the . - - - - Returns the first element contained in both, and . - - The implementation assumes that <<< - the source enumerable. may be null - the list of candidates to match against elements. may be null - the first element found in both enumerables or null - - - - Finds a value of the given type in the given collection. - - The collection to search. - The type to look for. - a value of the given type found, or null if none. - If more than one value of the given type is found - - - - Finds a value of the given type in the given collection. - - The collection to search. - The type to look for. - a collection of matching values of the given type found, empty if none found, or null if the input collection was null. - - - - Find a value of one of the given types in the given Collection, - searching the Collection for a value of the first type, then - searching for a value of the second type, etc. - - The collection to search. - The types to look for, in prioritized order. - a value of the given types found, or null if none - If more than one value of the given type is found - - - - Determines whether the specified collection is null or empty. - - The collection to check. - - true if the specified collection is empty or null; otherwise, false. - - - - - Determines whether the specified collection is null or empty. - - The collection to check. - - true if the specified collection is empty or null; otherwise, false. - - - - - Determines whether the specified dictionary is null empty. - - The dictionary to check. - - true if the specified dictionary is empty or null; otherwise, false. - - - - - A simple stable sorting routine - far from being efficient, only for small collections. - - - - - - - - A simple stable sorting routine - far from being efficient, only for small collections. - - - Sorting is not(!) done in-place. Instead a sorted copy of the original input is returned. - - input collection of items to sort - the for comparing 2 items in . - a new collection of stable sorted items. - - - - A simple stable sorting routine - far from being efficient, only for small collections. - - - Sorting is not(!) done in-place. Instead a sorted copy of the original input is returned. - - input collection of items to sort - the for comparing 2 items in . - a new collection of stable sorted items. - - - - A simple stable sorting routine - far from being efficient, only for small collections. - - - Sorting is not(!) done in-place. Instead a sorted copy of the original input is returned. - - input collection of items to sort - the for comparing 2 items in . - a new collection of stable sorted items. - - - - A callback method used for comparing to items. - - - - the first object to compare - the second object to compare - Value Condition Less than zero x is less than y. Zero x equals y. Greater than zero x is greater than y. - - - - - - Utility class containing helper methods for object comparison. - - Aleksandar Seovic - - - Compares two objects. - First object. - Second object. - - 0, if objects are equal; - less than zero, if the first object is smaller than the second one; - greater than zero, if the first object is greater than the second one. - - - - Utility class for .NET configuration files management. - - Aleksandar Seovic - - - - Avoid BeforeFieldInit pitfall - - - - - Parses the configuration section. - - -

- Primary purpose of this method is to allow us to parse and - load configuration sections using the same API regardless - of the .NET framework version. -

-

- If Microsoft paid a bit more attention to preserving backwards - compatibility we would not even need it, but... :( -

-
- Name of the configuration section. - Object created by a corresponding . -
- - - Refresh the configuration section. - - -

- Primary purpose of this method is to allow us to parse and - load configuration sections using the same API regardless - of the .NET framework version. -

-

- If Microsoft paid a bit more attention to preserving backwards - compatibility we would not even need it, but... :( -

-
- Name of the configuration section. -
- - - Creates the configuration exception. - - The message to display to the client when the exception is thrown. - The inner exception. - Name of the configuration file. - The line where exception occured. - Configuration exception. - - - - Creates the configuration exception. - - The message to display to the client when the exception is thrown. - Name of the configuration file. - The line where exception occured. - Configuration exception. - - - - Creates the configuration exception. - - The message to display to the client when the exception is thrown. - The inner exception. - XML node where exception occured. - Configuration exception. - - - - Creates the configuration exception. - - The message to display to the client when the exception is thrown. - XML node where exception occured. - Configuration exception. - - - - Creates the configuration exception. - - The message to display to the client when the exception is thrown. - The inner exception. - Configuration exception. - - - - Creates the configuration exception. - - The message to display to the client when the exception is thrown. - Configuration exception. - - - - Creates the configuration exception. - - Configuration exception. - - - - Determines whether the specified exception is configuration exception. - - The exception to check. - - true if the specified exception is configuration exception; otherwise, false. - - - - - Returns the line number of the specified node. - - Node to get the line number for. - The line number of the specified node. - - - - Returns the name of the file specified node is defined in. - - Node to get the file name for. - The name of the file specified node is defined in. - - - - Sets the current to be used by . - - - íf implements , this method invokes - on the new configSystem to chain them.
- Note, that this method requires reflection on internals of -
- the configuration system to set - bypasses the check if the current system has already been initialized - the previous config system, if any -
- - - Resets the global configuration system instance. Use for unit testing only! - - - - - An holding information about its original text source location. - - Erich Eichinger - - - - Holds text position information for e.g. error reporting purposes. - - - - - - - Gets a string specifying the file/resource name related to the configuration details. - - - - - Gets an integer specifying the line number related to the configuration details. - - - - - Gets an integer specifying the line position related to the configuration details. - - - - - Creates a new instance of , storing a copy of the passed - . - - - - - Creates a duplicate of this node. - - true to recursively clone the subtree under the specified node; false to clone only the node itself - - - - The name of the resource this element was read from - - - - - The line number within the resource this element was read from - - - - - The line position within the resource this element was read from. - - - - - An implementation, who's elements retain information - about their location in the original XML text document the were read from. - - - When loading a document, the used must implement . - Typical XmlReader implementations like support this interface. - - Erich Eichinger - - - - Overridden to create a retaining the current - text position information. - - - - - Overridden to create a retaining the current - text position information. - - - - - Load the document from the given . - Child nodes will store as their property. - - the name of the resource - The XML source - - - - Load the document from the given . - - The XML source - - - - Load the document from the given . - Child nodes will store as their property. - - the name of the resource - The XML source - - - - Load the document from the given . - Child nodes will store as their property. - - the name of the resource - The XML source - - - - Load the document from the given . - Child nodes will store as their property. - - the name of the resource - The XML source - - - - Load the document from the given . - Child nodes will store as their property. - - the name of the resource - The XML source - - - - Load the document from the given . - Child nodes will store null as their property. - - The XML source - - - - Creates an object based on the information in the . The reader must be positioned on a node or attribute. - Child nodes will store as their property. - - - The new XmlNode or null if no more nodes exist. - - the name of the resource - The XML source - The reader is positioned on a node type that does not translate to a valid DOM node (for example, EndElement or EndEntity). - - - - Creates an object based on the information in the . The reader must be positioned on a node or attribute. - Child nodes will store null as their property. - - - The new XmlNode or null if no more nodes exist. - - The XML source - The reader is positioned on a node type that does not translate to a valid DOM node (for example, EndElement or EndEntity). - - - - Get info about the current text position during loading a document. - Outside loading a document, the properties of - will always be null. - - - - - Holds the current text position during loading a document - - - - - An holding information about its original text source location. - - Erich Eichinger - - - - Creates a new instance of , storing a copy of the passed - . - - - - - Creates a duplicate of this node. - - true to recursively clone the subtree under the specified node; false to clone only the node itself - - - - The name of the resource this element was read from - - - - - The line number within the resource this element was read from - - - - - The line position within the resource this element was read from. - - - - - Discovers the attributes of a - and provides access to the - s metadata. - - Rick Evans - - - - The method name associated with a delegate invocation. - - - - - Creates a new instance of the - class. - - - The event used to extract the delegate - from. - - - if the supplied is - . - - - - - Creates a new instance of the - class. - - - The delegate . - - - If the supplied is not a subclass of the - class, or is . - - - - - Checks to see if the method encapsulated by the supplied method - metadata is compatible with the method signature associated with - this delegate type. - - The method to be checked. - - if the method signature is compatible with - the signature of this delegate; if not, or - if the supplied parameter is - . - - - - - Gets the s of the parameters of the - method signature associated with this delegate type. - - -

- This method will never return ; the returned - array may be empty, but it most certainly - will not be . -

-
- - A array of the parameter - s; or the - array if the method signature has no parameters. - -
- - - Gets the return of the - method signature associated with this delegate type. - - The return . - - - - Gets the metadata about the method signature associated - with this delegate type. - - - The metadata about the method signature associated - with this delegate type. - - - - - Determines whether the supplied - is a type. - - - The to be checked. - - - if the supplied - is a ; - if not or the supplied - is . - - - - - Checks if the signature of the supplied - is compatible with the signature expected by the supplied - . - - The event to be checked against. - - The method signature to check for compatibility. - - - if the signature of the supplied - is compatible with the signature - expected by the supplied ; - if not or either of the supplied - parameters is . - - - - - - The of the delegate. - - - - - Use this class for obtaining instances for dynamic code generation. - - -

- The purpose of this class is to provide a simple abstraction for creating and managing dynamic assemblies. -

- - Using this factory you can't define several modules within a single dynamic assembly - only a simple one2one relation between assembly/module is used. - -
- -

The following excerpt from demonstrates usage:

- - public class DynamicProxyManager - { - public const string PROXY_ASSEMBLY_NAME = "Spring.Proxy"; - - public static TypeBuilder CreateTypeBuilder(string name, Type baseType) - { - // Generates type name - string typeName = String.Format("{0}.{1}_{2}", PROXY_ASSEMBLY_NAME, name, Guid.NewGuid().ToString("N")); - ModuleBuilder module = DynamicCodeManager.GetModuleBuilder(PROXY_ASSEMBLY_NAME); - return module.DefineType(typeName, PROXY_TYPE_ATTRIBUTES); - } - } - -
- Erich Eichinger - - - -
- - - prevent instantiation - - - - - Returns the for the dynamic module within the specified assembly. - - - If the assembly does not exist yet, it will be created.
- This factory caches any dynamic assembly it creates - calling GetModule() twice with - the same name will *not* create 2 distinct modules! -
- The assembly-name of the module to be returned - the that can be used to define new types within the specified assembly -
- - - Persists the specified dynamic assembly to the file-system - - the name of the dynamic assembly to persist - - Can only be called in DEBUG_DYNAMIC mode, per ConditionalAttribute rules. - - - - - Removes all registered s. - - - - - A utility class for raising events in a generic and consistent fashion. - - Rick Evans - - - - Create a new EventRaiser instance - - - - - Raises the event encapsulated by the supplied - , passing the supplied - to the event. - - The event to be raised. - The arguments to the event. - a map of sink/exception entries that occurred during event raising - - - - Invokes the supplied , passing the supplied - to the sink. - - The sink to be invoked. - The arguments to the sink. - the map of sink/exception entries to add any exception to - - - - Raises events defensively. - - -

- Raising events defensively means that as the raised event is passed to each handler, - any thrown by a handler will be caught and silently - ignored. -

-
- Rick Evans -
- - - Defensively invokes the supplied , passing the - supplied to the sink. - - The sink to be invoked. - The arguments to the sink. - the map of sink/exception entries to add any exception to - - - - Implement this interface to create your own, delegating - and set them using - - - - - - - - - - - A strategy for handling errors. This is especially useful for handling - errors that occur during asynchronous execution as in such cases it may not be - possible to throw the error to the original caller. - - Mark Fisher - Mark Pollack (.NET) - - - - Handles the error. - - The exception. - - - - Utility methods for IO handling - - - - - Copies one stream into another. - (Don't forget to call on the destination stream!) - - - Does not close the input stream! - - - - - Reads a stream into a byte array. - - - Does not close the input stream! - - - - - Various utility methods relating to numbers. - - -

- Mainly for internal use within the framework. -

-
- Aleksandar Seovic -
- - - Determines whether the supplied is an integer. - - The object to check. - - if the supplied is an integer. - - - - - Determines whether the supplied is a decimal number. - - The object to check. - - if the supplied is a decimal number. - - - - - Determines whether the supplied is of numeric type. - - The object to check. - - true if the specified object is of numeric type; otherwise, false. - - - - - Determines whether the supplied can be converted to an integer. - - The object to check. - - if the supplied can be converted to an integer. - - - - - Determines whether the supplied can be converted to an integer. - - The object to check. - - if the supplied can be converted to an integer. - - - - - Determines whether the supplied can be converted to a number. - - The object to check. - - true if the specified object is decimal number; otherwise, false. - - - - - Is the supplied equal to zero (0)? - - The number to check. - - id the supplied is equal to zero (0). - - - - - Negates the supplied . - - The number to negate. - The supplied negated. - - If the supplied is not a supported numeric type. - - - - - Returns the bitwise not (~) of the supplied . - - The number. - The value of ~. - - If the supplied is not a supported numeric type. - - - - - Bitwise ANDs (&) the specified integral values. - - The first number. - The second number. - - If one of the supplied arguments is not a supported integral types. - - - - - Bitwise ORs (|) the specified integral values. - - The first number. - The second number. - - If one of the supplied arguments is not a supported integral types. - - - - - Bitwise XORs (^) the specified integral values. - - The first number. - The second number. - - If one of the supplied arguments is not a supported integral types. - - - - - Adds the specified numbers. - - The first number. - The second number. - - - - Subtracts the specified numbers. - - The first number. - The second number. - - - - Multiplies the specified numbers. - - The first number. - The second number. - - - - Divides the specified numbers. - - The first number. - The second number. - - - - Calculates remainder for the specified numbers. - - The first number (dividend). - The second number (divisor). - - - - Raises first number to the power of the second one. - - The first number. - The second number. - - - - Coerces the types so they can be compared. - - The right. - The left. - - - - Creates a new instance of the class. - - -

- This is a utility class, and as such exposes no public constructors. -

-
-
- - - Helper methods with regard to objects, types, properties, etc. - - -

- Not intended to be used directly by applications. -

-
- Rod Johnson - Juergen Hoeller - Rick Evans (.NET) -
- - - The instance for this class. - - - - - An empty object array. - - - - - Creates a new instance of the class. - - -

- This is a utility class, and as such exposes no public constructors. -

-
-
- - - Instantiates the type using the assembly specified to load the type. - - This is a convenience in the case of needing to instantiate a type but not - wanting to specify in the string the version, culture and public key token. - The assembly. - Name of the type. - - - If the or is - - - If cannot load the type from the assembly or the call to InstantiateType(Type) fails. - - - - - Convenience method to instantiate a using - its no-arg constructor. - - -

- As this method doesn't try to instantiate s - by name, it should avoid loading issues. -

-
- - The to instantiate* - - A new instance of the . - - If the is - - - If the is an abstract class, an interface, - an open generic type or does not have a public no-argument constructor. - -
- - - Gets the zero arg ConstructorInfo object, if the type offers such functionality. - - The type. - Zero argument ConstructorInfo - - If the type is an interface, abstract, open generic type, or does not have a zero-arg constructor. - - - - - Determines whether the specified type is instantiable, i.e. not an interface, abstract class or contains - open generic type parameters. - - The type. - - - - Convenience method to instantiate a using - the given constructor. - - -

- As this method doesn't try to instantiate s - by name, it should avoid loading issues. -

-
- - The constructor to use for the instantiation. - - - The arguments to be passed to the constructor. - - A new instance. - - If the is - - - If the 's declaring type is an abstract class, - an interface, an open generic type or does not have a public no-argument constructor. - -
- - - Checks whether the supplied is not a transparent proxy and is - assignable to the supplied . - - -

- Neccessary when dealing with server-activated remote objects, because the - object is of the type TransparentProxy and regular is testing for assignable - types does not work. -

-

- Transparent proxy instances always return when tested - with the 'is' operator (C#). This method only checks if the object - is assignable to the type if it is not a transparent proxy. -

-
- The target to be checked. - The value that should be assigned to the type. - - if the supplied is not a - transparent proxy and is assignable to the supplied . - -
- - - Determine if the given is assignable from the - given value, assuming setting by reflection and taking care of transparent proxies. - - -

- Considers primitive wrapper classes as assignable to the - corresponding primitive types. -

-

- For example used in an object factory's constructor resolution. -

-
- The target . - The value that should be assigned to the type. - True if the type is assignable from the value. -
- - - Check if the given represents a - "simple" property, - i.e. a primitive, a , a - , or a corresponding array. - - -

- Used to determine properties to check for a "simple" dependency-check. -

-
- - The to check. - -
- - - Check if the given class represents a primitive array, - i.e. boolean, byte, char, short, int, long, float, or double. - - - - - Determines whether the specified array is null or empty. - - The array to check. - - true if the specified array is null empty; otherwise, false. - - - - - Determine if the given objects are equal, returning - if both are respectively - if only one is . - - The first object to compare. - The second object to compare. - - if the given objects are equal. - - - - - Returns the first element in the supplied . - - - The to use to enumerate - elements. - - - The first element in the supplied . - - - If the supplied did not have any elements. - - - - - Returns the first element in the supplied . - - - The to use to enumerate - elements. - - - The first element in the supplied . - - - If the supplied did not have any elements. - - - If the supplied is . - - - - - Returns the element at the specified index using the supplied - . - - - The to use to enumerate - elements until the supplied is reached. - - - The index of the element in the enumeration to return. - - - The element at the specified index using the supplied - . - - - If the supplied was less than zero, or the - supplied did not contain enough elements - to be able to reach the supplied . - - - - - Returns the element at the specified index using the supplied - . - - - The to use to enumerate - elements until the supplied is reached. - - - The index of the element in the enumeration to return. - - - The element at the specified index using the supplied - . - - - If the supplied was less than zero, or the - supplied did not contain enough elements - to be able to reach the supplied . - - - If the supplied is . - - - - - Gets the qualified name of the given method, consisting of - fully qualified interface/class name + "." method name. - - The method. - qualified name of the method. - - - - Return a String representation of an object's overall identity. - - The object (may be null). - The object's identity as String representation, - or an empty String if the object was null - - - - - Gets a hex String form of an object's identity hash code. - - The obj. - The object's identity code in hex notation - - - - Support matching of file system paths in a manner similar to that of the - NAnt FileSet. - - -

- Any (back)slashes are converted to forward slashes. -

-
- - - // true - PathMatcher.Match("c:/*.bat", @"c:\autoexec.bat"); - PathMatcher.Match("c:\fo*\*.bat", @"c:/foobar/autoexec.bat"); - PathMatcher.Match("c:\fo?\*.bat", @"c:/foo/autoexec.bat"); - // false - PathMatcher.Match("c:\fo?\*.bat", @"c:/fo/autoexec.bat"); - - - Federico Spinazzi -
- - - Determines if a given path matches a NAnt-like pattern. - - - A forward or back-slashed fileset-like pattern. - - A forward or back-slashed full path. - should the match consider the case - - if the path is matched by the pattern; - otherwise . - - - - - Determines if a given path matches a NAnt-like pattern. - - - A forward or back-slashed fileset-like pattern. - - A forward or back-slashed full path. - - if the path is matched by the pattern; - otherwise . - - - - - Replaces back(slashes) with forward slashes. - - - The path or the pattern to modify. - - A forward-slashed string. - - - - Helper method to convert a NAnt-like pattern into the - appropriate pattern for a regular expression. - - The NAnt-like pattern. - A regex-compatible pattern. - - - - Creates a new instance of the class. - - -

- This is a utility class, and as such exposes no public constructors. -

-
-
- - Utility methods for simple pattern matching, in particular for - Spring's typical "xxx*", "*xxx" and "*xxx*" pattern styles. - - Juergen Hoeller - Mark Pollack - - - Match a String against the given pattern, supporting the following simple - pattern styles: "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. - - the pattern to match against - - the String to match - - whether the String matches the given pattern - - - - Match a String against the given patterns, supporting the following simple - pattern styles: "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. - - the patterns to match against - - the String to match - - whether the String matches any of the given patterns - - - - - An implementation of the Java Properties class. - - - For the complete syntax see java.util.Properties JavaDoc. - This class supports an extended syntax. There may also be sole keys on a line, in that case values are treated as null. - - - key1 = value - key2: - key3 - - will result in the name/value pairs: - - key1:="value" - key2:=string.Empty - key3:=<null> - - note, that to specify a null value, the key must not be followed by any character except newline. - - - Simon White - - - - Creates an empty property list with no default values. - - - - - Creates a property list with the specified initial properties. - - The initial properties. - - - - Reads a property list (key and element pairs) from the input stream. - - The stream to load from. - - - - Reads a property list (key and element pairs) from a text reader. - - The text reader to load from. - - - - Reads a property list (key and element pairs) from the input stream. - - the dictionary to put it in - The stream to load from. - - - - Reads a property list (key and element pairs) from a text reader. - - the dictionary to put it in - The text reader to load from. - - - - Strips whitespace from the front of the specified string. - - The string. - The string with all leading whitespace removed. - - - - Splits the specified string into a key / value pair. - - The line to split. - An array containing the key / value pair. - - - - Searches for the property with the specified key in this property list. - - The key. - The property, or null if the key was not found. - - - - Searches for the property with the specified key in this property list. - - The key. - - The default value to be returned if the key is not found. - - The property, or the default value. - - - - Writes this property list out to the specified stream. - - The stream to write to. - - - - Sets the specified property key / value pair. - - The key. - The value. - - - - Writes the properties in this instance out to the supplied stream. - - The stream to write to. - Arbitrary header information. - - - - Removes the key / value pair identified by the supplied key. - - - The key identifying the key / value pair to be removed. - - - - - Adds the specified key / object pair to this collection. - - The key. - The value. - - - - Adds the specified key / object pair to this collection. - - - - - Various reflection related methods that are missing from the standard library. - - Rod Johnson - Juergen Hoeller - Aleksandar Seovic (.NET) - Stan Dvoychenko (.NET) - Bruno Baia (.NET) - - - - Convenience value that will - match all private and public, static and instance members on a class - in a case inSenSItivE fashion. - - - - - Avoid BeforeFieldInit problem - - - - - Checks, if the specified type is a nullable - - - - - Returns signature for the specified , method name and argument - s. - - The the method is in. - The method name. - - The argument s. - - The method signature. - - - - Returns method for the specified , method - name and argument - s. - - - Searches with BindingFlags - When dealing with interface methods, you probable want to 'normalize' method references by calling - . - - - - The target to find the method on. - - The method to find. - - The argument s. May be - if the method has no arguments. - - The target method. - - - - - Resolves a given to the representing the actual implementation. - - - see article How To Get an Explicit Interface Implementation Method. - - a - the type to lookup - the representing the actual implementation method of the specified - - - - Returns an array of parameter s for the specified method - or constructor. - - The method (or constructor). - An array containing the parameter s. - - If is . - - - - - Returns an array of parameter s for the - specified parameter info array. - - The parameter info array. - An array containing parameter s. - - If is or any of the - elements is . - - - - - Returns an array of s that represent - the names of the generic type parameter. - - The method. - An array containing the parameter names. - - If is . - - - - - Returns an array of s that represent - the names of the generic type parameter. - - The parameter info array. - An array containing parameter names. - - If is or any of the - elements is . - - - - - From a given list of methods, selects the method having an exact match on the given ' types. - - the list of methods to choose from - the arguments to the method - the method matching exactly the passed ' types - - If more than 1 matching methods are found in the list. - - - - - From a given list of methods, selects the method having an exact match on the given ' types. - - the type of method (used for exception reporting only) - the list of methods to choose from - the arguments to the method - the method matching exactly the passed ' types - - If more than 1 matching methods are found in the list. - - - - - From a given list of constructors, selects the constructor having an exact match on the given ' types. - - the list of constructors to choose from - the arguments to the method - the constructor matching exactly the passed ' types - - If more than 1 matching methods are found in the list. - - - - - Packages arguments into argument list containing parameter array as a last argument. - - Argument vaklues to package. - Total number of oarameters. - Type of the param array element. - Packaged arguments. - - - - Convenience method to convert an interface - to a array that contains - all the interfaces inherited and the specified interface. - - The interface to convert. - An array of interface s. - - If the specified is not an interface. - - - If is . - - - - - Is the supplied the default indexer for the - supplied ? - - - The name of the property on the supplied to be checked. - - - The to be checked. - - - if the supplied is the - default indexer for the supplied . - - - If the supplied is . - - - - - Is the supplied declared on one of these interfaces? - - The method to check. - The array of interfaces we want to check. - - if the method is declared on one of these interfaces. - - - If any of the s specified is not an interface. - - - If or any of the specified interfaces is - . - - - - - Returns the default value for the specified - - -

- Follows the standard .NET conventions for default values where - relevant; for example, all numeric types default to the value - 0. -

-
- - The to return default value for. - - - The default value for the specified . - - - If the supplied is an enumerated type that - has no values. - -
- - - Returns an array consisting of the default values for the supplied - . - - - The array of s to return default values for. - - - An array consisting of the default values for the supplied - . - - - If any of the elements in the supplied - array is an enumerated type that has no values. - - - - - - Checks that the parameter s of the - supplied match the parameter - s of the supplied - . - - The method to be checked. - - The array of parameter s to check against. - - - if the parameter s - match. - - - - - Returns an array containing the s of the - objects in the supplied array. - - - The objects array for which the corresponding s - are needed. - - - An array containing the s of the objects - in the supplied array; this array will be empty (but not - if the supplied - is null or has no elements. - - -

- [C#]
- Given an array containing the following objects, - [83, "Foo", new object ()], the - array returned from this method call would consist of the following - elements... - [Int32, String, Object]. -

-
-
- - - Does the given and/or it's superclasses - have at least one or more methods with the given name (with any - argument types)? - - -

- Includes non-public methods in the methods searched. -

-
- - The to be checked. - - - The name of the method to be searched for. Case inSenSItivE. - - - if the given or / and it's - superclasses have at least one or more methods (with any argument types); - if not, or either of the parameters is . - -
- - - Within , counts the number of overloads for the method with the given (case-insensitive!) - - The type to be searched - the name of the method for which overloads shall be counted - The number of overloads for method within type - - - - Creates a . - - -

- Note that if a non- - is supplied, any read write properties exposed by the - will be used to overwrite values that may have been passed in via the - . That is, the will be used - to initialize the custom attribute, and then any read-write properties on the - will be plugged in. -

-
- - The desired . - - - Any constructor arguments for the attribute (may be - in the case of no arguments). - - - Source attribute to copy properties from (may be ). - - A custom attribute builder. - - If the parameter is . - - - If the parameter is not a - that derives from the class. - - -
- - - Creates a . - - - The desired . - - - Source attribute to copy properties from (may be ). - - A custom attribute builder. - - - - Creates a . - - - The source attribute to copy properties from. - - A custom attribute builder. - - If the supplied is - . - - - - - Creates a . - - - The desired . - - A custom attribute builder. - - - - Creates a . - - - The desired . - - - Any constructor arguments for the attribute (may be - in the case of no arguments). - - A custom attribute builder. - - - - Creates a . - - - The to create - the custom attribute builder from. - - A custom attribute builder. - - - - Tries to find matching methods in the specified - for each method in the supplied list. - - - The to look for matching methods in. - - The methods to match. - - A flag that specifies whether to throw an exception if a matching - method is not found. - - A list of the matched methods. - - If either of the or - parameters are . - - - - - Returns the of the supplied - . - - -

- If the is a - instance, the return value of this method call with be the - parameter cast to a - . If the is - anything other than a , the return value - will be the result of invoking the 's - method. -

-
- - A or instance. - - - The argument if it is a - or the result of invoking - on the argument if it - is an . - - - If the is . - -
- - - Unwraps the supplied - and returns the inner exception preserving the stack trace. - - - The to unwrap. - - The unwrapped exception. - - - - Is the supplied can be accessed outside the assembly ? - - The type to check. - - if the type can be accessed outside the assembly; - Otherwise . - - - - - Is the supplied can be accessed - from the supplied friendly assembly ? - - The type to check. - The friendly assembly name. - - if the type can be accessed - from the supplied friendly assembly; Otherwise . - - - - - Gets all of the interfaces implemented by - the specified . - - - The object to get the interfaces of. - - - All of the interfaces implemented by the - . - - - - - Returns the explicit that is the root cause of an exception. - - - If the InnerException property of the current exception is a null reference - or a , returns the current exception. - - The last exception thrown. - - The first explicit exception thrown in a chain of exceptions. - - - - - Copies all fields from one object to another. - - - The types of both objects must be related. This means, that either of the following is true: - - fromObject.GetType() == toObject.GetType() - fromObject.GetType() is derived from toObject.GetType() - toObject.GetType() is derived from fromObject.GetType() - - - The source object - The object, who's fields will be populated with values from the source object - If the object's types are not related - - - - Creates a . - - Bruno Baia - - - - Creates a new instance of the - class. - - The custom attribute type. - - - - Creates a new instance of the - class. - - The custom attribute type. - The custom attribute constructor arguments. - - - - Adds the specified values to the constructor argument list - used to create the custom attribute. - - An array of argument values. - - - - Adds a property value to the custom attribute. - - The property name. - The property value. - - - - Creates the . - - The created . - - - - Utility class to be used from within this assembly for executing security critical code - NEVER EVER MAKE THIS PUBLIC! - - Erich Eichinger - - - - Miscellaneous utility methods. - - -

- Mainly for internal use within the framework. -

-
- Rod Johnson - Juergen Hoeller - Keith Donald - Aleksandar Seovic (.NET) - Mark Pollack (.NET) - Rick Evans (.NET) - Erich Eichinger (.NET) -
- - - The string that signals the start of an Ant-style expression. - - - - - The string that signals the end of an Ant-style expression. - - - - - An empty array of instances. - - - - - Creates a new instance of the class. - - -

- This is a utility class, and as such exposes no public constructors. -

-
-
- - - Tokenize the given into a - array. - - -

- If is , returns an empty - array. -

-

- If is or the empty - , returns a array with one - element: itself. -

-
- The to tokenize. - - The delimiter characters, assembled as a . - - - Trim the tokens via . - - - Omit empty tokens from the result array. - An array of the tokens. -
- - - Tokenize the given into a - array. - - -

- If is , returns an empty - array. -

-

- If is or the empty - , returns a array with one - element: itself. -

-
- The to tokenize. - - The delimiter characters, assembled as a . - - - Trim the tokens via . - - - Omit empty tokens from the result array. - - - Pairs of quote characters. within a pair of quotes are ignored - - An array of the tokens. -
- - - Convert a CSV list into an array of s. - - - Values may also be quoted using doublequotes. - - A CSV list. - - An array of s, or the empty array - if is . - - - - - Take a which is a delimited list - and convert it to a array. - - -

- If the supplied is a - or zero-length string, then a single element - array composed of the supplied - will be - eturned. If the supplied - is , then an empty, - zero-length array will be returned. -

-
- - The to be parsed. - - - The delimeter (this will not be returned). Note that only the first - character of the supplied is used. - - - An array of the tokens in the list. - -
- - - Convenience method to return an - as a delimited - (e.g. CSV) . - - - The to parse. - - - The delimiter to use (probably a ','). - - The delimited string representation. - - - - Convenience method to return an - as a CSV - . - - - The to display. - - The delimited string representation. - - - - Convenience method to return an array as a CSV - . - - - The array to parse. Elements may be of any type ( - will be called on each - element). - - - - - Convenience method to return a - array as a delimited (e.g. CSV) . - - - The array to parse. Elements may be of any type ( - will be called on each - element). - - - The delimiter to use (probably a ','). - - - - Checks if a string has length. - - The string to check, may be . - - - if the string has length and is not - . - - - - StringUtils.HasLength(null) = false - StringUtils.HasLength("") = false - StringUtils.HasLength(" ") = true - StringUtils.HasLength("Hello") = true - - - - - - Checks if a has text. - - -

- More specifically, returns if the string is - not , it's is > - zero (0), and it has at least one non-whitespace character. -

-
- - The string to check, may be . - - - if the is not - , - > zero (0), and does not consist - solely of whitespace. - - - - StringUtils.HasText(null) = false - StringUtils.HasText("") = false - StringUtils.HasText(" ") = false - StringUtils.HasText("12345") = true - StringUtils.HasText(" 12345 ") = true - - -
- - - Checks if a is - or an empty string. - - -

- More specifically, returns if the string is - , it's is equal - to zero (0), or it is composed entirely of whitespace - characters. -

-
- - The string to check, may (obviously) be . - - - if the is - , has a length equal to zero (0), or - is composed entirely of whitespace characters. - - - - StringUtils.IsNullOrEmpty(null) = true - StringUtils.IsNullOrEmpty("") = true - StringUtils.IsNullOrEmpty(" ") = true - StringUtils.IsNullOrEmpty("12345") = false - StringUtils.IsNullOrEmpty(" 12345 ") = false - - -
- - - Returns , if it contains non-whitespaces. null otherwise. - - - - - Strips first and last character off the string. - - The string to strip. - The stripped string. - - - - Returns a list of Ant-style expressions from the specified text. - - The text to inspect. - - A list of expressions that exist in the specified text. - - - If any of the expressions in the supplied - is empty (${}). - - - - - Replaces Ant-style expression placeholder with expression value. - - -

- -

-
- The string to set the value in. - The name of the expression to set. - The expression value. - - A new string with the expression value set; the - value if the supplied - is , has a length - equal to zero (0), or is composed entirely of whitespace - characters. - -
- - - Surrounds (prepends and appends) the string value of the supplied - to the supplied . - - -

- The return value of this method call is always guaranteed to be non - . If every value passed as a parameter to this method is - , the string will be returned. -

-
- - The prefix and suffix that respectively will be prepended and - appended to the target . If this value - is not a value, it's attendant - value will be used. - - - The target that is to be surrounded. If this value is not a - value, it's attendant - value will be used. - - The surrounded string. -
- - - Surrounds (prepends and appends) the string values of the supplied - and to the supplied - . - - -

- The return value of this method call is always guaranteed to be non - . If every value passed as a parameter to this method is - , the string will be returned. -

-
- - The value that will be prepended to the . If this value - is not a value, it's attendant - value will be used. - - - The target that is to be surrounded. If this value is not a - value, it's attendant - value will be used. - - - The value that will be appended to the . If this value - is not a value, it's attendant - value will be used. - - The surrounded string. -
- - - Converts escaped characters (for example "\t") within a string - to their real character. - - The string to convert. - The converted string. - - - - Utility class containing miscellaneous system-level functionality. - - Aleksandar Seovic - - - - Registers assembly resolver that iterates over the - assemblies loaded into the current - in order to find an assembly that cannot be resolved. - - - This method has to be called if you need to serialize dynamically - generated types in transient assemblies, such as Spring AOP proxies, - because standard .NET serialization engine always tries to load - assembly from the disk. - - - - - Returns true if running on Mono - - Tests for the presence of the type Mono.Runtime - - - - Gets the thread id for the current thread. Use thread name is available, - otherwise use CurrentThread.GetHashCode() for .NET 1.0/1.1 and - CurrentThread.ManagedThreadId otherwise. - - The thread id. - - - - Holds text position information for e.g. error reporting purposes. - - - - - - - Creates a new TextPositionInfo instance. - - - - - Creates a new TextPositionInfo instance, copying values from another instance. - - - - - The filename related to this text position - - - - - The line number related to this text position - - - - - The line position related to this text position - - - - - UniqueKey allows for generating keys unique to a type or particular instance and a partial name, - that can e.g. be used as keys in . - - - // shows usage type-scoped keys - UniqueKey classAKey = UniqueKey.GetTypeScoped(typeof(ClassA), "myKey"); - UniqueKey classBKey = UniqueKey.GetTypeScoped(typeof(ClassB), "myKey"); - - HttpContext.Current.Items.Add( classAKey, "some value unqiue for class A having key 'myKey'"); - object value = HttpContext.Current.Items[ UniqueKey.GetTypeScoped(typeof(ClassA), "myKey") ]; - Assert.AreEqual( "some value unique for class A having key 'myKey'", value); - - HttpContext.Current.Items.Add( classBKey, "some value unqiue for class B having key 'myKey'"); - object value = HttpContext.Current.Items[ UniqueKey.GetTypeScoped(typeof(ClassB), "myKey") ]; - Assert.AreEqual( "some value unique for class B having key 'myKey'", value); - - - - - Initialize a new instance of from its string representation. - See and See for details. - - The string representation of the new instance. - - - - Compares this instance to another. - - - - - Compares this instance to another. - - - - - Returns the hash code for this key. - - - - - - Returns a string representation of this key. - - - - - Creates a new key instance unique to the given instance. - - The instance the key shall be unique to - The partial key to be made unique - - - If is of type - - - - Creates a new key instance unique to the given type. - - The type the key shall be unique to - The partial key to be made unique - - - - Returns a key unique for the given instance. - - The instance the key shall be unique to - The partial key to be made unique - A key formatted as typename[instance-id].partialkey - - - - Returns a key unique for the given type. - - The type the key shall be unique to - The partial key to be made unique - A key formatted as typename.partialkey - - - - XML utility methods. - - Aleksandar Seovic - - - - Gets an appropriate implementation - for the supplied . - - The XML that is going to be read. - XML schemas that should be used for validation. - Validation event handler. - - A validating implementation. - - - - - Gets an appropriate implementation - for the supplied . - - The XML that is going to be read. - to be used for resolving external references - XML schemas that should be used for validation. - Validation event handler. - - A validating implementation. - - - - - Gets an appropriate implementation - for the supplied . - - The XML that is going to be read. - - A non-validating implementation. - - - - - Implementation of that adds error message - to the validation errors container. - - Aleksandar Seovic - - - - Abstract base class that should be extended by all - validation actions. - - -

- This class implements template Execute method - and defines OnValid and OnInvalid methods that - can be overriden - by specific validation actions. -

-
- Aleksandar Seovic -
- - - An action that should be executed after validator is evaluated. - - -

- This interface allows us to define the actions that should be executed - after validation in a generic fashion. -

-

- For example, addition of error messages to validation errors collection - is performed by one specific implementation of this interface, . -

-
- Aleksandar Seovic -
- - - Executes the action. - - Whether associated validator is valid or not. - Validation context. - Additional context parameters. - Validation errors container. - - - - Initializes a new instance of the class. - - - - - Executes the action. - - Whether associated validator is valid or not. - Validation context. - Additional context parameters. - Validation errors container. - - - - Called when associated validator is valid. - - Validation context. - Additional context parameters. - Validation errors container. - - - - Called when associated validator is not valid. - - Validation context. - Additional context parameters. - Validation errors container. - - - - Evaluates 'when' expression. - - Root context to use for expression evaluation. - Additional context parameters. - True if the condition is true, False otherwise. - - - - Gets or sets the expression that determines if this validator should be evaluated. - - The expression that determines if this validator should be evaluated. - - - - Initializes a new instance of the class. - - Error message resource identifier. - Names of the error providers this message should be added to. - - - - Called when associated validator is invalid. - - Validation context. - Additional context parameters. - Validation errors container. - - - - Resolves the error message. - - Validation context to resolve message parameters against. - Additional context parameters. - Resolved error message - - - - Resolves the message parameters. - - List of parameters to resolve. - Validation context to resolve parameters against. - Additional context parameters. - Resolved message parameters. - - - - Sets the expressions that should be resolved to error message parameters. - - The expressions that should be resolved to error message parameters. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - Expression that defines the exception to throw when the validator is not valid. - - - - Initializes a new instance of the class with an expression - that defines the exception to throw. - - - - - Called when associated validator is invalid. - - Validation context. - Additional context parameters. - Validation errors container. - - - - Gets or sets the exception to throw - - The throws. - - - - Implementation of that allows you - to define Spring.NET expressions that should be evaluated after - validation. - - Aleksandar Seovic - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - Expression to execute when validator is valid. - Expression to execute when validator is not valid. - - - - Initializes a new instance of the class. - - Expression to execute when validator is valid. - Expression to execute when validator is not valid. - - - - Called when associated validator is valid. - - Validation context. - Additional context parameters. - Validation errors container. - - - - Called when associated validator is invalid. - - Validation context. - Additional context parameters. - Validation errors container. - - - - Gets or sets the expression to execute when validator is valid. - - The expression to execute when validator is valid. - - - - Gets or sets the expression to execute when validator is not valid. - - The expression to execute when validator is not valid. - - - - Implementation of the custom configuration parser for validator definitions. - - Aleksandar Seovic - - - - Initializes a new instance of the class. - - - - - Parse the specified element and register any resulting - IObjectDefinitions with the IObjectDefinitionRegistry that is - embedded in the supplied ParserContext. - - The element to be parsed into one or more IObjectDefinitions - The object encapsulating the current state of the parsing - process. - - The primary IObjectDefinition (can be null as explained above) - - - Implementations should return the primary IObjectDefinition - that results from the parse phase if they wish to used nested - inside (for example) a <property> tag. - Implementations may return null if they will not - be used in a nested scenario. - - - - - - Parses the validator definition. - - Validator's identifier. - The element to parse. - The parser helper. - Validator object definition. - - - - Parses the attribute of the given from the XmlElement and, if available, adds a property of the given with - the parsed value. - - - - - Parses and potentially registers a validator. - - - Only validators that have id attribute specified are registered - as separate object definitions within application context. - - Validator XML element. - The parser helper. - Validator object definition. - - - - Gets the name of the object type for the specified element. - - The element. - The name of the object type. - - - - Creates an error message action based on the specified message element. - - The message element. - The parser helper. - The error message action definition. - - - - Creates a generic action based on the specified element. - - The action definition element. - The parser helper. - Generic validation action definition. - - - - Creates object definition for the validator reference. - - The action definition element. - The parser helper. - Generic validation action definition. - - - - Evaluates validator test using condition evaluator. - - Aleksandar Seovic - - - - Base class that defines common properties for all single validators. - - -

- Custom single validators should always extend this class instead of - simply implementing interface, in - order to inherit common validator functionality. -

-
- Aleksandar Seovic - Erich Eichinger -
- - - Base class that defines common properties for all validators. - - -

- Custom validators should always extend this class instead of - simply implementing interface, in - order to inherit common validator functionality. -

-
- Aleksandar Seovic - Erich Eichinger -
- - - An object that can validate application-specific objects. - - -

- The primary motivation for this interface is to enable validation to be - decoupled from the (user) interface and placed in business objects. -

-

- Application developers writing their own custom - implementations will - typically not implement this interface directly. In most cases, custom - validators woud be better served deriving from the - class, with the - custom validation ligic being implemented in an override of the - - - template method. -

-
- Aleksandar Seovic - -
- - - Validates the specified object. - - The object to validate. - - The instance to add any error - messages to in the case of validation failure. - - - if validation was successful. - - - - - Validates the specified object. - - The object to validate. - Additional context parameters. - - The instance to add any error - messages to in the case of validation failure. - - - if validation was successful. - - - - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the class. - - The expression that determines if this validator should be evaluated. - - - - Validates the specified object. - - The object to validate. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Validates the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Evaluates when expression. - - Root context to use for expression evaluation. - Additional context parameters. - True if the condition is true, False otherwise. - - - - Processes the error messages. - - Whether validator is valid or not. - Validation context. - Additional context parameters. - Validation errors container. - - - - Gets or sets the expression that determines if this validator should be evaluated. - - The expression that determines if this validator should be evaluated. - - - - Gets or sets the validation actions. - - The actions that should be executed after validation. - - - - Creates a new instance of the validator without any - and criteria - - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Validates the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Validates test object. - - Object to validate. - True if specified object is valid, False otherwise. - - - - Evaluates test expression. - - Root context to use for expression evaluation. - Additional context parameters. - Result of the test expression evaluation, or validation context if test is null. - - - - Gets or sets the test expression. - - The test expression. - - - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Evaluates the test using condition evaluator. - - -

- Test can be any logical expression that is supported by the Spring.NET logical - expression evaluation engine, and can use any variables that can be resolved - by the variable resolver used by the validation engine. -

-
- The object to validate. - - if the supplied is valid. - -
- - - Perform credit card validations. - - - By default, all supported card types are allowed. You can specify - which credit card type validator should be used by setting - the value of property to a concrete - instance. - - - - - Creates a new instance of the UrlValidator class. - - - - - Creates a new instance of the UrlValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - Credit Card type validator to use. - - - - Creates a new instance of the UrlValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - Credit Card type validator to use. - - - - Validates the supplied . - - - In the case of the class, - the test should be a string variable that will be evaluated and the object - obtained as a result of this evaluation will be checked if it is - a valid credit card number. - - The object to validate. - - if the supplied is valid - credit card number. - - - - - Checks if the is a valid credit card number. - - - The card number to validate. - - - true if the card number is valid. - - - - - Validates card number with the specified validator. - - - Credit card number to validate. - - - true if credit card number is a valid number of credit card type specified. - - - - - Checks for a valid credit card number. - - - Credit Card Number. - - - true if the card number passes the LuhnCheck. - - - - - Credit card type validator to use. - - - Can be concrete implementations of - interface. The following are available implementations: - , , , - . - - - - - CreditCardType interface defines how validation is performed - for one type/brand of credit card. - - - - - Returns true if the card number matches this type of - credit card. - - - The card number, never null. - - - true if the number matches. - - - - - Visa credit card type validation support. - - - - - Indicates, wheter the given credit card number matches a visa number. - - - - - American Express credit card type validation support. - - - - - Indicates, wheter the given credit card number matches an amex number. - - - - - Discover credit card type validation support. - - - - - Indicates, wheter the given credit card number matches a discover number. - - - - - Mastercard credit card type validation support. - - - - - Indicates, wheter the given credit card number matches a mastercard number. - - - - - Perform email validations. - - -

- This implementation is not guaranteed to catch all possible errors in an - email address. For example, an address like nobody@noplace.nowhere will - pass validator, even though there is no TLD "nowhere". - - Goran Milosavljevic - - -

- Creates a new instance of the EmailValidator class. - -
- - - Creates a new instance of the EmailValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the EmailValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Validates the supplied . - - - In the case of the class, - the test should be a string variable that will be evaluated and the object - obtained as a result of this evaluation will be checked if it is - a valid e-mail address. - - The object to validate. - - if the supplied is valid - e-mail address. - - - - - Regular expression used for validation of object passed to this . - - - - - Validates that the object is valid ISBN-10 or ISBN-13 value. - - Goran Milosavljevic - - - - Creates a new instance of the ISBNValidator class. - - - - - Creates a new instance of the ISBNValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the ISBNValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Validates the supplied . - - - In the case of the class, - the test should be a string variable that will be evaluated and the object - obtained as a result of this evaluation will be tested using the ISBN-10 or - ISBN-13 validation rules. - - The object to validate. - - if the supplied is valid ISBN. - - - - - Validates against ISBN-10 or ISBN-13 validation - rules. - - - ISBN string to validate. - - - true if is a valid ISBN-10 or ISBN-13 code. - - - - - ISBN-10 consists of 4 groups of numbers separated by either - dashes (-) or spaces. - - - The first group is 1-5 characters, second 1-7, third 1-6, - and fourth is 1 digit or an X. - - - - - ISBN-13 consists of 5 groups of numbers separated by either - dashes (-) or spaces. - - - The first group is 978 or 979, the second group is - 1-5 characters, third 1-7, fourth 1-6, and fifth is 1 digit. - - - - - Validates that object matches specified regular expression. - - -

- The test expression must evaluate to a ; - otherwise, an exception is thrown. -

-
- Aleksandar Seovic -
- - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - The regular expression to match against. - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - The regular expression to match against. - - - - Validates an object. - - Object to validate. - - if the supplied - object is valid. - - - If the supplied is not a - - - - - - The regular expression text to match against. - - The regular expression text. - - - - The for the regular expression evaluation. - - The regular expression evaluation options. - - - - - Validates that required value is not empty. - - -

- This validator uses following rules to determine if target value is valid: - - - - - - - - - - - - - - - - - - - - - - - - - -
Target Valid Value
A .Not or an empty string.
A .Not and not .
One of the number types.Not zero.
A .Not or whitespace.
Any reference type other than .Not .
-

-

- You cannot use this validator to validate any value types other than the ones - specified in the table above. -

-
- Aleksandar Seovic -
- - - Creates a new instance of the class. - - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Validates the supplied . - - - In the case of the class, - the test should be a variable expression that will be evaluated and the object - obtained as a result of this evaluation will be tested using the rules described - in the class overview of the - class. - - The object to validate. - - if the supplied is valid. - - - - - Validates that the value is valid URL. - - Goran Milosavljevic - - - - Creates a new instance of the UrlValidator class. - - - - - Creates a new instance of the UrlValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Creates a new instance of the UrlValidator class. - - The expression to validate. - The expression that determines if this validator should be evaluated. - - - - Validates the supplied . - - - In the case of the class, - the test should be a string variable that will be evaluated and the object - obtained as a result of this evaluation will be tested using the URL validation rules. - - The object to validate. - - if the supplied is valid. - - - - - Regular expression used for validation of object passed to this . - - - - - implementation that supports grouping of validators. - - -

- This validator will be valid when one or more of the validators in the Validators - collection are valid. -

-

- ValidationErrors property will return a union of all validation error messages - for the contained validators, but only if this validator is not valid (meaning, when none - of the contained validators are valid). -

-

Note, that defaults to true for this validator type!

-
- Aleksandar Seovic - Erich Eichinger -
- - - Base class for composite validators - - - - - Initializes a new instance - - - - - Initializes a new instance - - The expression that determines if this validator should be evaluated. - - - - Initializes a new instance - - The expression that determines if this validator should be evaluated. - - - - Validates the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Actual implementation how to validate the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Gets or sets the child validators. - - The validators. - - - - When set true, shortcircuits evaluation. - - - Setting this property true causes the evaluation process to prematurely abort - if the end result is known. Any remaining child validators will not be considered then. - Setting this value false causes implementations to evaluate all child validators, regardless - of the potentially already known result. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The expression that determines if this validator should be evaluated. - - - - Initializes a new instance of the class. - - The expression that determines if this validator should be evaluated. - - - - Validates the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - implementation that supports validating collections. - - -

- This validator will be valid only when all of the validators in the Validators - collection are valid for all of the objects in the specified collection. -

-

- You can specify if you want to validate all of the collection elements regardless of the errors by - setting the property to false. -

-

Note, that defaults to true for this validator type!

-

- If you set the IncludeElementErrors property to true, - ValidationErrors collection will contain a union of all validation error messages - for the contained validators; - Otherwise it will contain only error messages that were set for this Validator. -

-
- Damjan Tomic - Aleksandar Seovic -
- - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The bool that determines if all elements of the collection should be evaluated. - regardless of the Errors - - The bool that determines whether Validate method should collect - all error messages returned by the item validators - - - - Initializes a new instance of the class. - - The expression that determines if this validator should be evaluated. - The bool that determines if this all elements of the collection should be evaluated. - regardless of the Errors - - The bool that determines whether Validate method should collect - all error messages returned by the item validators - - - - Initializes a new instance of the class. - - The expression that determines if this validator should be evaluated. - The bool that determines if this all elements of the collection should be evaluated. - regardless of the Errors - - The bool that determines whether Validate method should collect - all error messages returned by the item validators - - - - Validates the specified collection of objects. - If the IncludeElementErrors property was set to true, - collection will contain a union of all validation error messages - for the contained validators; - Otherwise it will contain only error messages that were set for this Validator. - - The collection to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Actual implementation how to validate the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Gets or sets the value that indicates whether to validate all elements of the collection - regardless of the errors. - - This is just an alias for property - - - - Gets or sets the value that indicates whether to capture all the errors of the specific - elements of the collection - - - - - Gets or sets the expression that should be used to narrow validation context. - - The expression that should be used to narrow validation context. - - - - implementation that supports grouping of validators. - - -

- This validator will be valid when one and only one of the validators in the Validators collection are valid -

-

- ValidationErrors property will return a union of all validation error messages - for the contained validators, but only if this validator is not valid (meaning, when none - of the contained validators are valid). -

-

- By default, this validator group uses == true semantics. -

-
- Aleksandar Seovic - Erich Eichinger -
- - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The expression that determines if this validator should be evaluated. - - - - Initializes a new instance of the class. - - The expression that determines if this validator should be evaluated. - - - - Actual implementation how to validate the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - An interface that validation errors containers have to implement. - - Aleksandar Seovic - - - - Adds the supplied to this - instance's collection of errors. - - - The provider that should be used for message grouping; can't be - . - - The error message to add. - - If the supplied or is . - - - - - Merges another instance of into this one. - - -

- If the supplied is , - then no errors will be added to this instance, and this method will - (silently) return. -

-
- - The validation errors to merge; can be . - -
- - - Gets the list of errors for the supplied error . - - -

- If there are no errors for the supplied , - an empty will be returned. -

-
- Error key that was used to group messages. - - A list of all s for the supplied lookup . - -
- - - Gets the list of resolved error messages for the supplied lookup . - - -

- If there are no errors for the supplied lookup , - an empty will be returned. -

-
- Error key that was used to group messages. - to resolve messages against. - - A list of resolved error messages for the supplied lookup . - -
- - - Does this instance contain any validation errors? - - -

- If this returns , this means that it (obviously) - contains no validation errors. -

-
- if this instance is empty. -
- - - Gets the list of all error providers. - - - - - Allows developers to specify which validator should be used - to validate method argument. - - Damjan Tomic - Aleksandar Seovic - - - - Creates an attribute instance. - - - The name of the validator to use (must be defined within - Spring application context). - - - - - Gets the name of the validator to use. - - The name of the validator to use. - - - - A container for validation errors. - - -

- This class groups validation errors by validator names and allows - access to both the complete errors collection and to the errors for a - certain validator. -

-
- Aleksandar Seovic - Goran Milosavljevic -
- - - Default constructor. - - - - - This property is reserved, apply the - - to the class instead. - - - An that describes the - XML representation of the object that is produced by - the - method and consumed by the - - method. - - - - - Generates an object from its XML representation. - - - The stream - from which the object is deserialized. - - - - - Converts an object into its XML representation. - - - The stream - to which the object is serialized. - - - - - Adds the supplied to this - instance's collection of errors. - - - The provider that should be used for message grouping; can't be - . - - The error message to add. - - If the supplied or is . - - - - - Merges another instance of into this one. - - -

- If the supplied is , - then no errors will be added to this instance, and this method will - (silently) return. -

-
- - The validation errors to merge; can be . - -
- - - Gets the list of errors for the supplied lookup . - - -

- If there are no errors for the supplied lookup , - an empty will be returned. -

-
- Error key that was used to group messages. - - A list of all s for the supplied lookup . - -
- - - Gets the list of resolved error messages for the supplied lookup . - - -

- If there are no errors for the supplied lookup , - an empty will be returned. -

-
- Error key that was used to group messages. - to resolve messages against. - - A list of resolved error messages for the supplied lookup . - -
- - - Does this instance contain any validation errors? - - -

- If this returns , this means that it (obviously) - contains no validation errors. -

-
- if this instance is empty. -
- - - Gets the list of all providers. - - - - - Thrown by the validation advice if the method parameters validation fails. - - Aleksandar Seovic - - - - Creates a new instance of the ValidationException class. - - - - - Creates a new instance of the ValidationException class with - specified validation errors. - - - Validation errors. - - - - - Creates a new instance of the ValidationException class with the - specified message. - - - A message about the exception. - - - - - Creates a new instance of the ValidationException class with the - specified message and validation errors. - - - A message about the exception. - - - Validation errors. - - - - - Creates a new instance of the ValidationException class with the - specified message and root cause. - - - A message about the exception. - - - The root exception that is being wrapped. - - - - - Creates a new instance of the ValidationException class with the - specified message, root cause and validation errors. - - - A message about the exception. - - - The root exception that is being wrapped. - - - Validation errors. - - - - - Creates a new instance of the ValidationException class. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Implements object serialization. - - - The - that holds the serialized object data about the exception being thrown. - - - The - that contains contextual information about the source or destination. - - - - - Gets validation errors. - - Validation errors. - - - - implementation that supports grouping of validators. - - -

- This validator will be valid only when all of the validators in the Validators - collection are valid. -

-

- ValidationErrors property will return a union of all validation error messages - for the contained validators. -

-
- Aleksandar Seovic - Erich Eichinger -
- - - Initializes a new instance - - - - - Initializes a new instance - - The expression that determines if this validator should be evaluated. - - - - Initializes a new instance - - The expression that determines if this validator should be evaluated. - - - - Actual implementation how to validate the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Represents a reference to an externally defined validator object - - -

- This class allows validation groups to reference validators that - are defined outside of the group itself. -

-

- It also allows users to narrow the context for the referenced validator - by specifying value for the Context property. -

-
- Aleksandar Seovic -
- - - Initializes a new instance of the class. - - - - - Validates the specified object. - - The object to validate. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Validates the specified object. - - The object to validate. - Additional context parameters. - instance to add error messages to. - True if validation was successful, False otherwise. - - - - Gets or sets the name of the referenced validator. - - The name of the referenced validator. - - - - Gets or sets the expression that should be used to narrow validation context. - - The expression that should be used to narrow validation context. - - - - Callback that supplies the owning factory to an object instance. - - - Owning - (may not be ). The object can immediately - call methods on the factory. - - -

- Invoked after population of normal object properties but before an init - callback like 's - - method or a custom init-method. -

-
- - In case of initialization errors. - -
- - + + + + Spring.Core + + + + + An abstract implementation that can + be used as base class for concrete implementations. + + Aleksandar Seovic + Erich Eichinger + + + + Defines a contract that all cache implementations have to fulfill. + + Aleksandar Seovic + Erich Eichinger + + + + Retrieves an item from the cache. + + + Item key. + + + Item for the specified , or null. + + + + + Removes an item from the cache. + + + Item key. + + + + + Removes collection of items from the cache. + + + Collection of keys to remove. + + + + + Removes all items from the cache. + + + + + Inserts an item into the cache. + + + Items inserted using this method have no expiration time + and default cache priority. + + + Item key. + + + Item value. + + + + + Inserts an item into the cache. + + + Items inserted using this method have default cache priority. + + + Item key. + + + Item value. + + + Item's time-to-live. + + + + + Gets the number of items in the cache. + + + + + Gets a collection of all cache item keys. + + + + + Retrieves an item from the cache. + + + Item key. + + + Item for the specified , or null. + + + + + Removes an item from the cache. + + + Item key. + + + + + Removes collection of items from the cache. + + + Collection of keys to remove. + + + + + Removes all items from the cache. + + + + + Inserts an item into the cache. + + + Items inserted using this method use the default + + + Item key. + + + Item value. + + + + + Inserts an item into the cache. + + + If equals , + or is true, this cache + instance's value will be applied. + + + Item key. + + + Item value. + + + Item's time-to-live (TTL). + + + + + Actually does the cache implementation specific insert operation into the cache. + + + Items inserted using this method have default cache priority. + + + Item key. + + + Item value. + + + Item's time-to-live (TTL). + + + + + Gets/Set the Default time-to-live (TTL) for items inserted into this cache. + Used by + + + + + Gets/Sets a value, whether the this cache instance's + shall be applied to all items, regardless of their individual TTL + when is called. + + + + + Gets the number of items in the cache. + + + May be overridden by subclasses for cache-specific efficient implementation. + + + + + Gets a collection of all cache item keys. + + + + + Abstract base class containing shared properties for all cache attributes. + + Aleksandar Seovic + + + + The instance used to parse values. + + + + + + + Creates an attribute instance. + + + + + Creates an attribute instance. + + + The name of the cache to use. + + + An expression string that should be evaluated in order to determine + the cache key for the item. + + + + + Gets or sets the name of the cache to use. + + + The name of the cache to use. + + + + + Gets or sets a SpEL expression that should be evaluated in order + to determine the cache key for the item. + + + An expression string that should be evaluated in order to determine + the cache key for the item. + + + + + Gets an expression instance that should be evaluated in order + to determine the cache key for the item. + + + An expression instance that should be evaluated in order to determine + the cache key for the item. + + + + + Gets or sets a SpEL expression that should be evaluated in order + to determine whether the item should be cached. + + + An expression string that should be evaluated in order to determine + whether the item should be cached. + + + + + Gets an expression instance that should be evaluated in order + to determine whether the item should be cached. + + + An expression instance that should be evaluated in order to determine + whether the item should be cached. + + + + + The amount of time an object should remain in the cache. + + + If no TTL is specified, the default TTL defined by the + cache's policy will be applied. + + + The amount of time object should remain in the cache + formatted to be recognizable by . + + + + + The amount of time an object should remain in the cache (in seconds). + + + If no TTL is specified, the default TTL defined by the + cache's policy will be applied. + + + The amount of time object should remain in the cache (in seconds). + + + + + This attribute should be used to mark methods whose argument(s) + need to be cached. + + +

+ This attribute allows application developers to specify that an argument + of the method should be cached, but it will not do any caching by itself. +

+

+ In order to actually cache the result, an application developer + must apply a Spring.Aspects.Cache.CacheParameterAdvice to + all of the members that have this attribute defined. +

+

+ You can specify this attribute multiple times on the same method in order to + cache several method parameters. +

+
+ Aleksandar Seovic +
+ + + Creates an attribute instance. + + + + + Creates an attribute instance. + + + The name of the cache to use. + + + An expression string that should be evaluated in order to determine + the cache key for the item. + + + + + This attribute should be used to mark methods whose result + needs to be cached. + + +

+ This attribute allows application developers to mark that a result + of the method invocation should be cached, but it will not do any + caching by itself. +

+

+ In order to actually cache the result, an application developer + must apply a Spring.Aspects.Cache.CacheResultAdvice to + all of the members that have this attribute defined. +

+
+ Aleksandar Seovic +
+ + + Creates an attribute instance. + + + + + Creates an attribute instance. + + + The name of the cache to use. + + + An expression string that should be evaluated in order to determine + the cache key for the item. + + + + + This attribute should be used with methods that return an + in order to cache each item separately. + + +

+ This attribute allows application developers to specify that each item + from the collection returned by the method should be cached, + but it will not do any caching by itself. +

+

+ In order to actually cache the result, an application developer + must apply a Spring.Aspects.Cache.CacheResultAdvice to + all of the members that have this attribute defined. +

+
+ Aleksandar Seovic +
+ + + Creates an attribute instance. + + + + + Creates an attribute instance. + + + The name of the cache to use. + + + An expression string that should be evaluated in order to determine + the cache key for the item. + + + + + This attribute should be used to mark method that should + invalidate one or more cache items when invoked. + + +

+ This attribute allows application developers to specify that some + cache items should be evicted from cache when the method is invoked, + but it will not do any eviction by itself. +

+

+ In order to actually evict cache items, an application developer + must apply a Spring.Aspects.Cache.InvalidateCacheAdvice to + all of the members that have this attribute defined. +

+
+ Aleksandar Seovic +
+ + + Creates an attribute instance. + + + + + Creates an attribute instance. + + + The name of the cache to use. + + + + + Gets or sets the name of the cache to use. + + + The name of the cache to use. + + + + + Gets or sets a SpEL expression that should be evaluated in order + to determine the keys for the items that should be evicted. + + + An expression string that should be evaluated in order + to determine the keys for the items that should be evicted. + + + + + Gets an expression instance that should be evaluated in order + to determine the keys for the items that should be evicted. + + + An expression instance that should be evaluated in order + to determine the keys for the items that should be evicted. + + + + + Gets or sets a SpEL expression that should be evaluated in order + to determine whether items should be evicted. + + + An expression string that should be evaluated in order to determine + whether items should be evicted. + + + + + Gets an expression instance that should be evaluated in order + to determine whether items should be evicted. + + + An expression instance that should be evaluated in order to determine + whether items should be evicted. + + + + + A simple implementation backed by a dictionary that + never expires cache items. + + Aleksandar Seovic + + + + Retrieves an item from the cache. + + + Item key. + + + Item for the specified , or null. + + + + + Removes an item from the cache. + + + Item key. + + + + + Removes collection of items from the cache. + + + Collection of keys to remove. + + + + + Removes all items from the cache. + + + + + Inserts an item into the cache. + + + Item key. + + + Item value. + + + Item's time-to-live (TTL) in milliseconds. + + + + + Gets the number of items in the cache. + + + + + Gets a collection of all cache item keys. + + + + + Represents a read only wrapper around a generic IDictionary. The design pattern + mirrors ReadOnlyCollection, and follows the apparent pattern that write operations + do not throw an exception, but simply make no change to the underlying collection. + + Originally put into the public domain. + http://www.simple-talk.com/community/forums/thread/2263.aspx + + + + Original from Public Domain + Mark Pollack (.NET) + + + + Inner storage for ReadOnlyDictionary + + + + + Easy access to non-generic dictionary API + + + + + Initializes a new instance of the class. + + The dictionary to wrap. + + + + Add does not change a read only Dictionary + + The object to use as the key of the element to add. + The object to use as the value of the element to add. + The is read-only. + + + + Determines whether the contains an element with the specified key. + + The key to locate in the . + + true if the contains an element with the key; otherwise, false. + + key is null. + + + + Remove does not change a read only Dictionary, will throw an exception. + + The is read-only. + + + + Tries the get value. + + The key. + The value. + + + + + Add does not change a read only Dictionary + + The object to add to the . + The is read-only. + + + + Clear does not change a read only Dictionary. + + The is read-only. + + + + Determines whether the contains a specific value. + + The object to locate in the . + + true if item is found in the ; otherwise, false. + + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in array at which copying begins. + arrayIndex is less than 0. + array is null. + array is multidimensional.-or-arrayIndex is equal to or greater than the length of array.-or-The number of elements in the source is greater than the available space from arrayIndex to the end of the destination array.-or-Type T cannot be cast automatically to the type of the destination array. + + + + Remove does not change a read only Dictionary. Throws an exception + + The object to remove from the . + + true if item was successfully removed from the ; otherwise, false. This method also returns false if item is not found in the original . + + The is read-only. + + + + Returns an enumerator that iterates through the collection. + + + A that can be used to iterate through the collection. + + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Add does not change a read only Dictionary. Throws an exception. + + The to use as the key of the element to add. + The to use as the value of the element to add. + The is read-only.-or- The has a fixed size. + + + + Determines whether the object contains an element with the specified key. + + The key to locate in the object. + + true if the contains an element with the key; otherwise, false. + + key is null. + + + + Returns an object for the object. + + + An object for the object. + + + + + Remove does not change a read only Dictionary. Throws an exception. + + The key of the element to remove. + The object is read-only.-or- The has a fixed size. + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in array at which copying begins. + array is null. + index is less than zero. + array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. + The type of the source cannot be cast automatically to the type of the destination array. + + + + Runs when the entire object graph has been deserialized. + + The object that initiated the callback. The functionality for this parameter is not currently implemented. + + + + Populates a with the data needed to serialize the target object. + + The to populate with data. + The destination (see ) for this serialization. + The caller does not have the required permission. + + + + Gets a read only containing the keys of the . + + + An containing the keys of the object that implements . + + + + Gets an containing the values in the . + + + An containing the values in the object that implements . + + + + Gets the value with the specified key. + Set will throw an exception + + + + + Gets the number of elements contained in the . + + + The number of elements contained in the . + + + + Gets a value indicating whether the is read-only. + + + true if the is read-only; otherwise, false. + + + + Gets a value indicating whether the object has a fixed size. + + + true if the object has a fixed size; otherwise, false. + + + + Gets an containing the keys of the . + + + An containing the keys of the object that implements . + + + + Gets an containing the values in the . + + + An containing the values in the object that implements . + + + + Gets the with the specified key. Set throws an exception. + + + The is read-only. + if try to set value + + + + Gets a value indicating whether access to the is synchronized (thread safe). + + + true if access to the is synchronized (thread safe); otherwise, false. + + + + Gets an object that can be used to synchronize access to the . + + + An object that can be used to synchronize access to the . + + + + This class provides skeletal implementations of some + operations. + + +

+ The implementations in this class are appropriate when the base + implementation does not allow elements. The methods + , + , and + are based on + the , + , and + methods + respectively but throw exceptions instead of indicating failure via + or returns. +

+ An implementation that extends this class must + minimally define a method + which does + not permit the insertion of elements, along with methods + , and + . Typically, + additional methods will be overridden as well. If these requirements + cannot be met, consider instead subclassing + }. +

+
+ Doug Lea + Griffin Caprio (.NET) +
+ + + A collection designed for holding elements prior to processing. + + +

+ Besides basic operations, + queues provide additional insertion, extraction, and inspection + operations. +

+

+ Each of these methods exists in two forms: one throws + an exception if the operation fails, the other returns a special + value (either or , depending on the + operation). The latter form of the insert operation is designed + specifically for use with capacity-restricted + implementations; in most implementations, insert operations cannot + fail. +

+

+ Queues typically, but do not necessarily, order elements in a + FIFO (first-in-first-out) manner. Among the exceptions are + priority queues, which order elements according to a supplied + comparator, or the elements' natural ordering, and LIFO queues (or + stacks) which order the elements LIFO (last-in-first-out). + Whatever the ordering used, the head of the queue is that + element which would be removed by a call to + or + . In a FIFO queue, all new + elements are inserted at the tail of the queue. Other kinds of queues may + use different placement rules. Every implementation + must specify its ordering properties. +

+

+ The method inserts an + element if possible, otherwise returning . This differs from the + method, which can fail to + add an element only by throwing an exception. The + method is designed for + use when failure is a normal, rather than exceptional occurrence, for example, + in fixed-capacity (or "bounded" queues. +

+

+ The + methods remove and + return the head of the queue. Exactly which element is removed from the + queue is a function of the queue's ordering policy, which differs from + implementation to implementation. The + and + methods differ only in their + behavior when the queue is empty: the + method throws an exception, + while the method returns + . +

+

+ The and + methods return, but do + not remove, the head of the queue. +

+

+ The interface does not define the blocking queue + methods, which are common in concurrent programming. +

+

+ implementations generally do not allow insertion + of elements, although some implementations, such as + a linked list, do not prohibit the insertion of . + Even in the implementations that permit it, should + not be inserted into a , as is also + used as a special return value by the + method to + indicate that the queue contains no elements. +

+

+ implementations generally do not define + element-based versions of methods + and , but instead inherit the + identity based versions from the class object, because element-based equality + is not always well-defined for queues with the same elements but different + ordering properties. +

+

+ Based on the back port of JCP JSR-166. +

+
+ Doug Lea + Griffin Caprio (.NET) +
+ + + Inserts the specified element into this queue if it is possible to do so + immediately without violating capacity restrictions, returning + upon success and throwing an + if no space is + currently available. + + + The element to add. + + + if successful. + + + If the element cannot be added at this time due to capacity restrictions. + + + If the class of the supplied prevents it + from being added to this queue. + + + If the specified element is and this queue does not + permit elements. + + + If some property of the supplied prevents + it from being added to this queue. + + + + + Inserts the specified element into this queue if it is possible to do + so immediately without violating capacity restrictions. + + +

+ When using a capacity-restricted queue, this method is generally + preferable to , + which can fail to insert an element only by throwing an exception. +

+
+ + The element to add. + + + if the element was added to this queue. + + + If the element cannot be added at this time due to capacity restrictions. + + + If the supplied is + . + + + If some property of the supplied prevents + it from being added to this queue. + +
+ + + Retrieves and removes the head of this queue. + + +

+ This method differs from + only in that it throws an exception if this queue is empty. +

+
+ + The head of this queue + + if this queue is empty +
+ + + Retrieves and removes the head of this queue, + or returns if this queue is empty. + + + The head of this queue, or if this queue is empty. + + + + + Retrieves, but does not remove, the head of this queue. + + +

+ This method differs from + only in that it throws an exception if this queue is empty. +

+
+ + The head of this queue. + + If this queue is empty. +
+ + + Retrieves, but does not remove, the head of this queue, + or returns if this queue is empty. + + + The head of this queue, or if this queue is empty. + + + + + Returns if there are no elements in the , otherwise. + + + + + Creates a new instance of the class. + + +

+ This is an abstract class, and as such has no publicly + visible constructors. +

+
+
+ + + Inserts the specified element into this queue if it is possible + to do so immediately without violating capacity restrictions. + + + The element to add. + + + if successful. + + + If the element cannot be added at this time due to capacity restrictions. + + + + + Retrieves and removes the head of this queue. + + +

+ This method differs from + only in that + it throws an exception if this queue is empty. +

+
+ + The head of this queue + + + If this queue is empty. + +
+ + + Retrieves, but does not remove, the head of this queue. + + +

+ This method differs from + only in that it throws an exception if this queue is empty. +

+

+ ALso note that this implementation returns the result of + unless the queue + is empty. +

+
+ The head of this queue. + + If this queue is empty. + +
+ + + Removes all of the elements from this queue. + + +

+ The queue will be empty after this call returns. +

+

+ This implementation repeatedly invokes + until it + returns . +

+
+
+ + + Adds all of the elements in the supplied + to this queue. + + +

+ Attempts to + + of a queue to itself result in . + Further, the behavior of this operation is undefined if the specified + collection is modified while the operation is in progress. +

+

+ This implementation iterates over the specified collection, + and adds each element returned by the iterator to this queue, in turn. + An exception encountered while trying to add an element (including, + in particular, a element) may result in only some + of the elements having been successfully added when the associated + exception is thrown. +

+
+ + The collection containing the elements to be added to this queue. + + + if this queue changed as a result of the call. + + + If the supplied or any one of its elements are . + + + If the collection is the current or + the collection size is greater than the queue capacity. + +
+ + + Inserts the specified element into this queue if it is possible to do + so immediately without violating capacity restrictions. + + +

+ When using a capacity-restricted queue, this method is generally + preferable to , + which can fail to insert an element only by throwing an exception. +

+
+ + The element to add. + + + if the element was added to this queue. + + + If the element cannot be added at this time due to capacity restrictions. + + + If the supplied is + . + + + If some property of the supplied prevents + it from being added to this queue. + +
+ + + Retrieves, but does not remove, the head of this queue, + or returns if this queue is empty. + + + The head of this queue, or if this queue is empty. + + + + + Retrieves and removes the head of this queue, + or returns if this queue is empty. + + + The head of this queue, or if this queue is empty. + + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in array at which copying begins. + array is null. + index is less than zero. + array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. + The type of the source cannot be cast automatically to the type of the destination array. 2 + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Returns if there are no elements in the , otherwise. + + + + + Returns the current capacity of this queue. + + + + + Gets the number of elements contained in the . + + + The number of elements contained in the . + + + + + Gets an object that can be used to synchronize access to the . + + + An object that can be used to synchronize access to the . + + + + + Gets a value indicating whether access to the is synchronized (thread safe). + + + true if access to the is synchronized (thread safe); otherwise, false. + + + + + Provides a performance improved hashtable with case-insensitive (string-only! based) key handling. + + Erich Eichinger + + + + Creates a case-insensitive hashtable using . + + + + + Creates a case-insensitive hashtable using the given . + + the to calculate the hashcode + + + + Creates a case-insensitive hashtable using the given , initially + populated with entries from another dictionary. + + the dictionary to copy entries from + the to calculate the hashcode + + + + Initializes a new, empty instance of the class that is serializable using the specified and objects. + + A object containing the source and destination of the serialized stream associated with the . + A object containing the information required to serialize the object. + info is null. + + + + Implements the interface and returns the data needed to serialize the . + + + A object containing the source and destination of the serialized stream associated with the . + A object containing the information required to serialize the . + info is null. + + + + Calculate the hashcode of the given string key, using the configured culture. + + + + + + + Compares two keys + + + + + Creates a shallow copy of the current instance. + + + + + is an + class that supports the creation of new + types where the underlying data + store is an instance. + + +

+ You can use any object that implements the + interface to hold set + data. You can define your own, or you can use one of the objects + provided in the framework. The type of + you + choose will affect both the performance and the behavior of the + using it. +

+

+ This object overrides the method, + but not the method, because + the class is mutable. + Therefore, it is not safe to use as a key value in a dictionary. +

+

+ To make a typed based on your + own , simply derive a new + class with a constructor that takes no parameters. Some + implmentations cannot be defined + with a default constructor. If this is the case for your class, you + will need to override clone as well. +

+

+ It is also standard practice that at least one of your constructors + takes an or an + as an argument. +

+
+ +
+ + + A collection that contains no duplicate elements. + + + + + + A collection that contains no duplicate elements. + + +

+ This interface models the mathematical + abstraction. The order of + elements in a set is dependant on (a)the data-structure implementation, and + (b)the implementation of the various + methods, and thus is not + guaranteed. +

+

+ overrides the + method to test for "equivalency": + whether the two sets contain the same elements. The "==" and "!=" + operators are not overridden by design, since it is often desirable to + compare object references for equality. +

+

+ Also, the method is not + implemented on any of the set implementations, since none of them are + truly immutable. This is by design, and it is the way almost all + collections in the .NET framework function. So as a general rule, don't + store collection objects inside + instances. You would typically want to use a keyed + instead. +

+

+ None of the implementations in + this library are guaranteed to be thread-safe in any way unless wrapped + in a . +

+

+ The following table summarizes the binary operators that are supported + by the class. +

+ + + Operation + Description + Method + + + Union (OR) + + Element included in result if it exists in either A OR + B. + + Union() + + + Intersection (AND) + + Element included in result if it exists in both A AND + B. + + InterSect() + + + Exclusive Or (XOR) + + Element included in result if it exists in one, but not both, + of A and B. + + ExclusiveOr() + + + Minus (n/a) + + Take all the elements in A. Now, if any of them exist in + B, remove them. Note that unlike the other operators, + A - B is not the same as B - A. + + Minus() + + +
+
+ + + Performs a "union" of the two sets, where all the elements + in both sets are present. + + +

+ That is, the element is included if it is in either + or this set. Neither this set nor the input + set are modified during the operation. The return value is a + clone of this set with the extra elements added in. +

+
+ A collection of elements. + + A new containing the union of + this with the specified + collection. Neither of the input objects is modified by the union. + +
+ + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. + + +

+ That is, the element is included if it exists in both sets. The + Intersect() operation does not modify the input sets. It + returns a clone of this set with the appropriate elements + removed. +

+
+ A set of elements. + + The intersection of this set with . + +
+ + + Performs a "minus" of this set from the + set. + + +

+ This returns a set of all the elements in set + , removing the elements that are also in + this set. The original sets are not modified during this operation. + The result set is a clone of this + containing the elements from + the operation. +

+
+ A set of elements. + + A set containing the elements from this set with the elements in + removed. + +
+ + + Performs an "exclusive-or" of the two sets, keeping only those + elements that are in one of the sets, but not in both. + + +

+ The original sets are not modified during this operation. The + result set is a clone of this set containing the elements + from the exclusive-or operation. +

+
+ A set of elements. + + A set containing the result of + ^ this. + +
+ + + Returns if this set contains the specified + element. + + The element to look for. + + if this set contains the specified element. + + + + + Returns if the set contains all the + elements in the specified collection. + + A collection of objects. + + if the set contains all the elements in the + specified collection. + + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + + is the object was added, + if the object was already present. + + + + + Adds all the elements in the specified collection to the set if + they are not already present. + + A collection of objects to add to the set. + + is the set changed as a result of this + operation. + + + + + Removes the specified element from the set. + + The element to be removed. + + if the set contained the specified element. + + + + + Remove all the specified elements from this set, if they exist in + this set. + + A collection of elements to remove. + + if the set was modified as a result of this + operation. + + + + + Retains only the elements in this set that are contained in the + specified collection. + + + The collection that defines the set of elements to be retained. + + + if this set changed as a result of this + operation. + + + + + Removes all objects from this set. + + + + + Returns if this set contains no elements. + + + + + Performs a "union" of the two sets, where all the elements + in both sets are present. + + A collection of elements. + + A new containing the union of + this with the specified + collection. Neither of the input objects is modified by the union. + + + + + + Performs a "union" of two sets, where all the elements in both are + present. + + +

+ That is, the element is included if it is in either + or . The return + value is a clone of one of the sets ( + if it is not ) with elements of the other set + added in. Neither of the input sets is modified by the operation. +

+
+ A set of elements. + A set of elements. + + A set containing the union of the input sets; + if both sets are . + +
+ + + Performs a "union" of two sets, where all the elements in both are + present. + + A set of elements. + A set of elements. + + A set containing the union of the input sets; + if both sets are . + + + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. + + A set of elements. + + The intersection of this set with . + + + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. + + +

+ That is, the element is included only if it exists in both + and . Neither input + object is modified by the operation. The result object is a + clone of one of the input objects ( + if it is not ) containing the elements from + the intersect operation. +

+
+ A set of elements. + A set of elements. + + The intersection of the two input sets; if + both sets are . + +
+ + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. + + A set of elements. + A set of elements. + + The intersection of the two input sets; if + both sets are . + + + + + + Performs a "minus" of this set from the + set. + + A set of elements. + + A set containing the elements from this set with the elements in + removed. + + + + + + Performs a "minus" of set from set + . + + +

+ This returns a set of all the elements in set + , removing the elements that are also in + set . The original sets are not modified + during this operation. The result set is a clone of set + containing the elements from the operation. +

+
+ A set of elements. + A set of elements. + + A set containing + - elements. + if is + . + +
+ + + Performs a "minus" of set from set + . + + A set of elements. + A set of elements. + + A set containing + - elements. + if is + . + + + + + + Performs an "exclusive-or" of the two sets, keeping only those + elements that are in one of the sets, but not in both. + + A set of elements. + + A set containing the result of + ^ this. + + + + + + Performs an "exclusive-or" of the two sets, keeping only those + elements that are in one of the sets, but not in both. + + +

+ The original sets are not modified during this operation. The + result set is a clone of one of the sets ( + if it is not ) + containing the elements from the exclusive-or operation. +

+
+ A set of elements. + A set of elements. + + A set containing the result of + ^ . + if both sets are . + +
+ + + Performs an "exclusive-or" of the two sets, keeping only those + elements that are in one of the sets, but not in both. + + A set of elements. + A set of elements. + + A set containing the result of + ^ . + if both sets are . + + + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + + is the object was added, + if the object was already present. + + + + + Adds all the elements in the specified collection to the set if + they are not already present. + + A collection of objects to add to the set. + + is the set changed as a result of this + operation. + + + + + Removes all objects from this set. + + + + + Returns if this set contains the specified + element. + + The element to look for. + + if this set contains the specified element. + + + + + Returns if the set contains all the + elements in the specified collection. + + A collection of objects. + + if the set contains all the elements in the + specified collection. + + + + + Removes the specified element from the set. + + The element to be removed. + + if the set contained the specified element. + + + + + Remove all the specified elements from this set, if they exist in + this set. + + A collection of elements to remove. + + if the set was modified as a result of this + operation. + + + + + Retains only the elements in this set that are contained in the + specified collection. + + + The collection that defines the set of elements to be retained. + + + if this set changed as a result of this + operation. + + + + + Returns a clone of the + instance. + + +

+ This will work for derived + classes if the derived class implements a constructor that takes no + arguments. +

+
+ A clone of this object. +
+ + + Copies the elements in the to + an array. + + +

+ The type of array needs to be compatible with the objects in the + , obviously. +

+
+ + An array that will be the target of the copy operation. + + + The zero-based index where copying will start. + +
+ + + Gets an enumerator for the elements in the + . + + + An over the elements + in the . + + + + + This method will test the + against another for + "equality". + + +

+ In this case, "equality" means that the two sets contain the same + elements. The "==" and "!=" operators are not overridden by design. + If you wish to check for "equivalent" + instances, use + Equals(). If you wish to check to see if two references are + actually the same object, use "==" and "!=". +

+
+ + A object to compare to. + + + if the two sets contain the same elements. + +
+ + + Gets the hashcode for the object. + + + + + Returns if this set contains no elements. + + + + + The number of elements currently contained in this collection. + + + + + Returns if the + is synchronized across + threads. + + +

+ Note that enumeration is inherently not thread-safe. Use the + to lock the object during enumeration. +

+
+
+ + + An object that can be used to synchronize this collection to make + it thread-safe. + + +

+ When implementing this, if your object uses a base object, like an + , or anything that has + a SyncRoot, return that object instead of "this". +

+
+ + An object that can be used to synchronize this collection to make + it thread-safe. + +
+ + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + + is the object was added, + if the object was already present. + + + + + Adds all the elements in the specified collection to the set if + they are not already present. + + A collection of objects to add to the set. + + is the set changed as a result of this + operation. + + + + + Removes all objects from this set. + + + + + Returns if this set contains the specified + element. + + The element to look for. + + if this set contains the specified element. + + + + + Returns if the set contains all the + elements in the specified collection. + + A collection of objects. + + if the set contains all the elements in the + specified collection; also if the + supplied is . + + + + + Removes the specified element from the set. + + The element to be removed. + + if the set contained the specified element. + + + + + Remove all the specified elements from this set, if they exist in + this set. + + A collection of elements to remove. + + if the set was modified as a result of this + operation. + + + + + Retains only the elements in this set that are contained in the + specified collection. + + + The collection that defines the set of elements to be retained. + + + if this set changed as a result of this + operation. + + + + + Copies the elements in the to + an array. + + +

+ The type of array needs to be compatible with the objects in the + , obviously. +

+
+ + An array that will be the target of the copy operation. + + + The zero-based index where copying will start. + +
+ + + Gets an enumerator for the elements in the + . + + + An over the elements + in the . + + + + + Provides the storage for elements in the + , stored as the key-set + of the object. + + +

+ Set this object in the constructor if you create your own + class. +

+
+
+ + + The placeholder object used as the value for the + instance. + + + There is a single instance of this object globally, used for all + s. + + + + + Returns if this set contains no elements. + + + + + The number of elements currently contained in this collection. + + + + + Returns if the + is synchronized across + threads. + + + + + + An object that can be used to synchronize this collection to make + it thread-safe. + + + An object that can be used to synchronize this collection to make + it thread-safe. + + + + + + Implements an based on a + hash table. + + +

+ This will give the best lookup, add, and remove performance for very + large data-sets, but iteration will occur in no particular order. +

+
+ +
+ + + Creates a new instance of the class. + + + + + Creates a new instance of the class, and + initializes it based on a collection of elements. + + + A collection of elements that defines the initial set contents. + + + + + Implements an that automatically + changes from a list based implementation to a hashtable based + implementation when the size reaches a certain threshold. + + +

+ This is good if you are unsure about whether you data-set will be tiny + or huge. +

+ + Because this uses a dual implementation, iteration order is not + guaranteed! + +
+ +
+ + + Creates a new set instance based on either a list or a hash table, + depending on which will be more efficient based on the data-set + size. + + + + + Initializes a new instance of the class with a given capacity + + The size. + + + + Creates a new set instance based on either a list or a hash table, + depending on which will be more efficient based on the data-set + size, and initializes it based on a collection of elements. + + + A collection of elements that defines the initial set contents. + + + + + Implements an immutable (read-only) + wrapper. + + +

+ Although this class is advertised as immutable, it really isn't. + Anyone with access to the wrapped + can still change the data. So + is not implemented for this , as + is the case for all + implementations in this library. This design decision was based on the + efficiency of not having to clone the wrapped + every time you wrap a mutable + . +

+
+
+ + + Constructs an immutable (read-only) + wrapper. + + + The that is to be wrapped. + + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + + is the object was added, + if the object was already present. + + + + + + Adds all the elements in the specified collection to the set if + they are not already present. + + A collection of objects to add to the set. + + is the set changed as a result of this + operation. + + + + + + Removes all objects from this set. + + + + + + Returns if this set contains the specified + element. + + The element to look for. + + if this set contains the specified element. + + + + + Returns if the set contains all the + elements in the specified collection. + + A collection of objects. + + if the set contains all the elements in the + specified collection. + + + + + Removes the specified element from the set. + + The element to be removed. + + if the set contained the specified element. + + + + + + Remove all the specified elements from this set, if they exist in + this set. + + A collection of elements to remove. + + if the set was modified as a result of this + operation. + + + + + + Retains only the elements in this set that are contained in the + specified collection. + + + The collection that defines the set of elements to be retained. + + + if this set changed as a result of this + operation. + + + + + + Copies the elements in the to + an array. + + +

+ The type of array needs to be compatible with the objects in the + , obviously. +

+
+ + An array that will be the target of the copy operation. + + + The zero-based index where copying will start. + +
+ + + Gets an enumerator for the elements in the + . + + + An over the elements + in the . + + + + + Returns a clone of the + instance. + + A clone of this object. + + + + Performs a "union" of the two sets, where all the elements + in both sets are present. + + A collection of elements. + + A new containing the union of + this with the specified + collection. Neither of the input objects is modified by the union. + + + + + + Performs an "intersection" of the two sets, where only the elements + that are present in both sets remain. + + A set of elements. + + The intersection of this set with . + + + + + + Performs a "minus" of this set from the + set. + + A set of elements. + + A set containing the elements from this set with the elements in + removed. + + + + + + Performs an "exclusive-or" of the two sets, keeping only those + elements that are in one of the sets, but not in both. + + A set of elements. + + A set containing the result of + ^ this. + + + + + + Returns if this set contains no elements. + + + + + The number of elements currently contained in this collection. + + + + + Returns if the + is synchronized across + threads. + + +

+ Note that enumeration is inherently not thread-safe. Use the + to lock the object during enumeration. +

+
+
+ + + An object that can be used to synchronize this collection to make + it thread-safe. + + + An object that can be used to synchronize this collection to make + it thread-safe. + + + + + Simple linked list implementation. + + Simon White + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class that contains all + elements of the specified list. + + + A list of elements that defines the initial contents. + + + + + Removes the object at the specified index. + + The lookup index. + + If the specified is greater than the + number of objects within the list. + + + + + Inserts an object at the specified index. + + The lookup index. + The object to be inserted. + + If the specified is greater than the + number of objects within the list. + + + + + Removes the first instance of the specified object found. + + The object to remove + + + + Returns if this list contains the specified + element. + + The element to look for. + + if this list contains the specified element. + + + + + Removes all objects from the list. + + + + + Returns the index of the first instance of the specified + found. + + The object to search for + + The index of the first instance found, or -1 if the element was not + found. + + + + + Adds the specified object to the end of the list. + + The object to add + The index that the object was added at. + + + + Adds all of the elements of the supplied + list to the end of this list. + + The list of objects to add. + + + + Checks whether the list can be modified. + + + If the list cannot be modified. + + + + + Validates the specified index. + + The lookup index. + + If the index is invalid. + + + + + Returns the node at the specified index. + + The lookup index. + The node at the specified index. + + If the specified is greater than the + number of objects within the list. + + + + + Returns the node (and index) of the first node that contains + the specified value. + + The value to search for. + + The node, or if not found. + + + + + Removes the specified node. + + The node to be removed. + + + + Copies the elements in this list to an array. + + +

+ The type of array needs to be compatible with the objects in this + list, obviously. +

+
+ + An array that will be the target of the copy operation. + + + The zero-based index where copying will start. + + + If the supplied is . + + + If the supplied is less than zero + or is greater than the length of . + + + If the supplied is of insufficient size. + +
+ + + Gets an enumerator for the elements in the + . + + +

+ Enumerators are fail fast. +

+
+ + An over the elements + in the . + +
+ + + Is list read only? + + + if the list is read only. + + + + + Returns the node at the specified index. + + +

+ This is the indexer for the + class. +

+
+ +
+ + + Is the list a fixed size? + + + if the list is a fixed size list. + + + + + Returns if the list is synchronized across + threads. + + + + This implementation always returns . + +

+ Note that enumeration is inherently not thread-safe. Use the + to lock the object during enumeration. +

+
+
+ + + The number of objects within the list. + + + + + An object that can be used to synchronize this + to make it thread-safe. + + + An object that can be used to synchronize this + to make it thread-safe. + + + + + Implements a based on a list. + + +

+ Performance is much better for very small lists than either + or . + However, performance degrades rapidly as the data-set gets bigger. Use a + instead if you are not sure your data-set + will always remain very small. Iteration produces elements in the order they were added. + However, element order is not guaranteed to be maintained by the various + mathematical operators. +

+
+
+ + + Creates a new set instance based on a list. + + + + + Creates a new set instance based on a list and initializes it based on a + collection of elements. + + + A collection of elements that defines the initial set contents. + + + + + Thrown when an element is requested from an empty . + + Griffin Caprio + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Creates a new instance of the + class with the + specified message. + + + A message about the exception. + + + + + Creates a new instance of the + class with the + specified message. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + An unbounded priority based on a priority + heap. This queue orders elements according to an order specified + at construction time, which is specified either according to their + natural order (see , or according to a + , depending on which constructor is + used. A priority queue does not permit elements. + A priority queue relying on natural ordering also does not + permit insertion of non-comparable objects (doing so will result + . + +

+ The head of this queue is the lowest element + with respect to the specified ordering. If multiple elements are + tied for lowest value, the head is one of those elements -- ties are + broken arbitrarily. + +

+ A priority queue is unbounded, but has an internal + capacity governing the size of an array used to store the + elements on the queue. It is always at least as large as the queue + size. As elements are added to a priority queue, its capacity + grows automatically. The details of the growth policy are not + specified. + +

+ This class and its enumerator implement all of the + optional methods of the and + interfaces. + The enumerator provided in method + is not guaranteed to traverse the elements of the PriorityQueue in any + particular order. + +

+ Note that this implementation is NOT synchronized. + Multiple threads should not access a + instance concurrently if any of the threads modifies the list + structurally. Instead, use the thread-safe PriorityBlockingQueue. +

+ Josh Bloch + Griffin Caprio (.NET) +
+ + + Priority queue represented as a balanced binary heap: the two children + of queue[n] are queue[2*n] and queue[2*n + 1]. The priority queue is + ordered by comparator, or by the elements' natural ordering, if + comparator is null: For each node n in the heap and each descendant d + of n, n <= d. + + The element with the lowest value is in queue[1], assuming the queue is + nonempty. (A one-based array is used in preference to the traditional + zero-based array to simplify parent and child calculations.) + + queue.length must be >= 2, even if size == 0. + + + + The number of elements in the priority queue. + + + + The comparator, or null if priority queue uses elements' + natural ordering. + + + + + The number of times this priority queue has been + structurally modified. + + + + + Creates a with the default initial capacity + (11) that orders its elements according to their natural + ordering (using ). + + + + + Creates a with the specified initial capacity + that orders its elements according to their natural ordering + (using ). + + the initial capacity for this priority queue. + + if is less than 1. + + + + Creates a with the specified initial capacity + that orders its elements according to the specified comparator. + + the initial capacity for this priority queue. + the comparator used to order this priority queue. + If then the order depends on the elements' natural ordering. + + if is less than 1. + + + + Creates a containing the elements in the + specified collection. The priority queue has an initial + capacity of 110% of the size of the specified collection or 1 + if the collection is empty. If the specified collection is an + instance of a , the priority queue will be sorted + according to the same comparator, or according to its elements' + natural order if the collection is sorted according to its + elements' natural order. Otherwise, the priority queue is + ordered according to its elements' natural order. + + the collection whose elements are to be placed into this priority queue. + if elements of cannot be + compared to one another according to the priority queue's ordering + if or any element with it is + + + + + + Common code to initialize underlying queue array across + constructors below. + + + + + Performs an unsigned bitwise right shift with the specified number + + Number to operate on + Ammount of bits to shift + The resulting number from the shift operation + + + + Establishes the heap invariant assuming the heap + satisfies the invariant except possibly for the leaf-node indexed by k + (which may have a nextExecutionTime less than its parent's). + + + This method functions by "promoting" queue[k] up the hierarchy + (by swapping it with its parent) repeatedly until queue[k] + is greater than or equal to its parent. + + + + + Establishes the heap invariant (described above) in the subtree + rooted at k, which is assumed to satisfy the heap invariant except + possibly for node k itself (which may be greater than its children). + + + This method functions by "demoting" queue[k] down the hierarchy + (by swapping it with its smaller child) repeatedly until queue[k] + is less than or equal to its children. + + + + + Establishes the heap invariant in the entire tree, + assuming nothing about the order of the elements prior to the call. + + + + + Returns the of or - 1, + whichever is smaller. + + base size + percentage to return + of + + + + Initially fill elements of the queue array under the + knowledge that it is sorted or is another , in which + case we can just place the elements in the order presented. + + + + + Initially fill elements of the queue array that is not to our knowledge + sorted, so we must rearrange the elements to guarantee the heap + invariant. + + + + + Removes and returns element located at from queue. (Recall that the queue + is one-based, so 1 <= i <= size.) + + + Normally this method leaves the elements at positions from 1 up to i-1, + inclusive, untouched. Under these circumstances, it returns . + Occasionally, in order to maintain the heap invariant, it must move + the last element of the list to some index in the range [2, i-1], + and move the element previously at position (i/2) to position i. + Under these circumstances, this method returns the element that was + previously at the end of the list and is now at some position between + 2 and i-1 inclusive. + + + + Resize array, if necessary, to be able to hold given index + + + + Inserts the specified element into this queue if it is possible to do + so immediately without violating capacity restrictions. + + +

+ When using a capacity-restricted queue, this method is generally + preferable to , + which can fail to insert an element only by throwing an exception. +

+
+ + The element to add. + + + if the element was added to this queue. + + + if the specified element cannot be compared + with elements currently in the priority queue according + to the priority queue's ordering. + + + If the element cannot be added at this time due to capacity restrictions. + + + If the supplied is + and this queue does not permit + elements. + + + If some property of the supplied prevents + it from being added to this queue. + +
+ + + Retrieves, but does not remove, the head of this queue, + or returns if this queue is empty. + + + The head of this queue, or if this queue is empty. + + + + + Inserts the specified element into this queue if it is possible to do so + immediately without violating capacity restrictions, returning + upon success and throwing an + if no space is + currently available. + + + The element to add. + + + if successful. + + + If the element cannot be added at this time due to capacity restrictions. + + + If the specified element is and this queue does not + permit elements. + + + If some property of the supplied prevents + it from being added to this queue. + + + if the specified element cannot be compared + with elements currently in the priority queue according + to the priority queue's ordering. + + + + + Removes a single instance of the specified element from this + queue, if it is present. + + + + + Returns an over the elements in this queue. + The enumeratoar does not return the elements in any particular order. + + an enumerator over the elements in this queue. + + + + Removes all elements from the priority queue. + The queue will be empty after this call returns. + + + + + Retrieves and removes the head of this queue, + or returns if this queue is empty. + + + The head of this queue, or if this queue is empty. + + + + + Queries the queue to see if it contains the specified + + element to look for. + if the queue contains the , + otherwise. + + + Returns the comparator used to order this collection, or + if this collection is sorted according to its elements natural ordering + (using ). + + + the comparator used to order this collection, or + if this collection is sorted according to its elements natural ordering. + + + + + Save the state of the instance to a stream (that + is, serialize it). + + The length of the array backing the instance is + emitted (int), followed by all of its elements (each an + ) in the proper order. + + the stream + the context + + + + Reconstitute the instance from a stream (that is, + deserialize it). + + the stream + the context + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in array at which copying begins. + array is null. + index is less than zero. + array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. + The type of the source cannot be cast automatically to the type of the destination array. 2 + + + + Copies the elements of the to an , starting at index 0. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + array is null. + index is less than zero. + array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. + The type of the source cannot be cast automatically to the type of the destination array. 2 + + + + Gets the Capacity of this queue. Will equal + + + + + Returns the queue count. + + + + + Gets an object that can be used to synchronize access to the . + + + An object that can be used to synchronize access to the . + + + + + Gets a value indicating whether access to the is synchronized (thread safe). + + + true if access to the is synchronized (thread safe); otherwise, false. + + + + + Returns if there are no elements in the , otherwise. + + + + + Index (into queue array) of element to be returned by subsequent call to next. + + + + + Implements an based on a sorted + tree. + + +

+ This gives good performance for operations on very large data-sets, + though not as good - asymptotically - as a + . However, iteration occurs + in order. +

+

+ Elements that you put into this type of collection must implement + , and they must actually be comparable. + You can't mix and + values, for example. +

+

+ This implementation does + not support elements that are . +

+
+ +
+ + + Creates a new set instance based on a sorted tree. + + + + + Creates a new set instance based on a sorted tree using for ordering. + + + + + Creates a new set instance based on a sorted tree and initializes + it based on a collection of elements. + + + A collection of elements that defines the initial set contents. + + + + + Synchronized that should be returned by synchronized + dictionary implementations in order to ensure that the enumeration is thread safe. + + Aleksandar Seovic + + + + Synchronized that should be returned by synchronized + collections in order to ensure that the enumeration is thread safe. + + Aleksandar Seovic + + + + Synchronized that, unlike hashtable created + using method, synchronizes + reads from the underlying hashtable in addition to writes. + + +

+ In addition to synchronizing reads, this implementation also fixes + IEnumerator/ICollection issue described at + http://msdn.microsoft.com/en-us/netframework/aa570326.aspx + (search for SynchronizedHashtable for issue description), by implementing + interface explicitly, and returns thread safe enumerator + implementations as well. +

+

+ This class should be used whenever a truly synchronized + is needed. +

+
+ Aleksandar Seovic +
+ + + Initializes a new instance of + + + + + Initializes a new instance of + + + + + Initializes a new instance of , copying inital entries from + handling keys depending on . + + + + + Creates a instance that + synchronizes access to the underlying . + + the hashtable to be synchronized + + + + Creates a wrapper that synchronizes + access to the passed . + + the hashtable to be synchronized + + + + Adds an element with the provided key and value to the object. + + The to use as the value of the element to add. + The to use as the key of the element to add. + An element with the same key already exists in the object. + key is null. + The is read-only.-or- The has a fixed size. 2 + + + + Removes all elements from the object. + + The object is read-only. 2 + + + + Creates a new object that is a copy of the current instance. + + + A new object that is a copy of this instance. + + + + + Determines whether the object contains an element with the specified key. + + + true if the contains an element with the key; otherwise, false. + + The key to locate in the object. + key is null. 2 + + + + Returns, whether this contains an entry with the specified . + + The key to look for + , if this contains an entry with this + + + + Returns, whether this contains an entry with the specified . + + The valúe to look for + , if this contains an entry with this + + + + Copies the elements of the to an , starting at a particular index. + + The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. + The zero-based index in array at which copying begins. + array is null. + The type of the source cannot be cast automatically to the type of the destination array. + index is less than zero. + array is multidimensional.-or- index is equal to or greater than the length of array.-or- The number of elements in the source is greater than the available space from index to the end of the destination array. 2 + + + + Returns an object for the object. + + + An object for the object. + + + + + Removes the element with the specified key from the object. + + The key of the element to remove. + The object is read-only.-or- The has a fixed size. + key is null. 2 + + + + Returns an enumerator that iterates through a collection. + + + An object that can be used to iterate through the collection. + + + + + Gets a value indicating whether the object is read-only. + + + true if the object is read-only; otherwise, false. + + + + + Gets a value indicating whether the object has a fixed size. + + + true if the object has a fixed size; otherwise, false. + + + + + Gets a value indicating whether access to the is synchronized (thread safe). + + + true if access to the is synchronized (thread safe); otherwise, false. + + + + + Gets an object containing the keys of the object. + + + An object containing the keys of the object. + + + + + Gets an object containing the values in the object. + + + An object containing the values in the object. + + + + + Gets an object that can be used to synchronize access to the . + + + An object that can be used to synchronize access to the . + + + + + Gets the number of elements contained in the . + + + The number of elements contained in the . + + + + + Gets or sets the element with the specified key. + + + The element with the specified key. + + The key of the element to get or set. + The property is set and the object is read-only.-or- The property is set, key does not exist in the collection, and the has a fixed size. + key is null. 2 + + + + Implements a thread-safe wrapper. + + +

+ The implementation is extremely conservative, serializing critical + sections to prevent possible deadlocks, and locking on everything. The + one exception is for enumeration, which is inherently not thread-safe. + For this, you have to lock the SyncRoot object for the + duration of the enumeration. +

+
+ +
+ + + Constructs a thread-safe + wrapper. + + + The object that this object + will wrap. + + + If the supplied ecposes a + SyncRoot value. + + + + + Adds the specified element to this set if it is not already present. + + The object to add to the set. + + is the object was added, + if the object was already present. + + + + + Adds all the elements in the specified collection to the set if + they are not already present. + + A collection of objects to add to the set. + + is the set changed as a result of this + operation. + + + + + Removes all objects from this set. + + + + + Returns if this set contains the specified + element. + + The element to look for. + + if this set contains the specified element. + + + + + Returns if the set contains all the + elements in the specified collection. + + A collection of objects. + + if the set contains all the elements in the + specified collection; also if the + supplied is . + + + + + Removes the specified element from the set. + + The element to be removed. + + if the set contained the specified element. + + + + + Remove all the specified elements from this set, if they exist in + this set. + + A collection of elements to remove. + + if the set was modified as a result of this + operation. + + + + + Retains only the elements in this set that are contained in the + specified collection. + + + The collection that defines the set of elements to be retained. + + + if this set changed as a result of this + operation. + + + + + Copies the elements in the to + an array. + + +

+ The type of array needs to be compatible with the objects in the + , obviously. +

+
+ + An array that will be the target of the copy operation. + + + The zero-based index where copying will start. + +
+ + + Gets an enumerator for the elements in the + . + + + An over the elements + in the . + + + + + Returns a clone of the instance. + + A clone of this object. + + + + Returns if this set contains no elements. + + + + + The number of elements currently contained in this collection. + + + + + Returns if the + is synchronized across + threads. + + + + + + An object that can be used to synchronize this collection to make + it thread-safe. + + + An object that can be used to synchronize this collection to make + it thread-safe. + + + + + + Simple listener that logs application events to the console. + + +

+ Intended for use during debugging only. +

+
+ Rod Johnson + Griffin Caprio (.NET) + +
+ + + A listener for application events. + + Rod Johnson + Griffin Caprio (.NET) + + + + Handle an application event. + + + The source of the event. + + + The event that is to be handled. + + + + + Creates a new instance of the + class. + + + + + Handle an application event. + + + The source of the event. + + + The event that is to be handled. + + + + + Event object sent to listeners registered with an + to inform them of + context lifecycle events. + + Griffin Caprio (.NET) + + + + + + + Encapsulates the data associated with an event raised by an + . + + Rod Johnson + Mark Pollack (.NET) + Griffin Caprio (.NET) + + + + + Creates a new instance of the + class. + + + + + The date and time when the event occured. + + + The date and time when the event occured. + + + + + The system time in milliseconds when the event happened. + + + The system time in milliseconds when the event happened. + + + + + Creates a new instance of the ContextEventArgs class to represent the + supplied context event. + + The type of context event. + + + + Returns a string representation of this object. + + A string representation of this object. + + + + The event type. + + + + + The various context event types. + + + + + The event type when the context is refreshed or created. + + + + + The event type when the context is closed. + + + + + Event object sent to listeners registered with an + to inform them of + context lifecycle event. + + + + + Event object sent to listeners registered with an + to inform them of + context lifecycle event. + + + + + Partial implementation of the + interface. + + +

+ Does not mandate the type of storage used for configuration, but does + implement common functionality. Uses the Template Method design + pattern, requiring concrete subclasses to implement + methods. +

+

+ In contrast to a plain vanilla + , an + is supposed + to detect special objects defined in its object factory: therefore, + this class automatically registers + s, + s + and s that are + defined as objects in the context. +

+

+ An may be also supplied as + an object in the context, with the special, well-known-name of + "messageSource". Else, message resolution is delegated to the + parent context. +

+
+ Rod Johnson + Juergan Hoeller + Griffin Caprio (.NET) + + +
+ + + Configurable implementation of the + interface. + + +

+ This implementation + supports the configuration of resource access protocols and the + corresponding .NET types that know how to handle those protocols. +

+

+ Basic protocol-to-resource type mappings are also defined by this class, + while others can be added either internally, by application contexts + extending this class, or externally, by the end user configuring the + context. +

+

+ Only one resource type can be defined for each protocol, but multiple + protocols can map to the same resource type (for example, the + "http" and "ftp" protocols both map to the + type. The protocols that are + mapped by default can be found in the following list. +

+

+ + + assembly + + + config + + + file + + + http + + + https + + +

+
+ Aleksandar Seovic + + + +
+ + + Describes an object that can load + s. + + +

+ An implementation is + generally required to support the functionality described by this + interface. +

+

+ The class is a + standalone implementation that is usable outside an + ; the aforementioned + class is also used by the + class. +

+
+ Juergen Hoeller + Mark Pollack (.NET) + + + +
+ + + Return an handle for the + specified resource. + + +

+ The handle should always be a reusable resource descriptor; this + allows one to make repeated calls to the underlying + . +

+

+

    +
  • + Must support fully qualified URLs, e.g. "file:C:/test.dat". +
  • +
  • + Should support relative file paths, e.g. "test.dat" (this will be + implementation-specific, typically provided by an + implementation). +
  • +
+

+ + An handle does not imply an + existing resource; you need to check the value of an + 's + property to determine + conclusively whether or not the resource actually exists. + +
+ The resource location. + + An appropriate handle. + + + + +
+ + + The separator between the protocol name and the resource name. + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class using the specified default protocol for unqualified resources. + + + + + Returns a that has been + mapped to the protocol of the supplied . + + The name of the resource. + + A new instance for the + supplied . + + + If a + mapping does not exist for the supplied . + + + In the case of any errors arising from the instantiation of the + returned instance. + + + + + + Checks that the supplied starts + with one of the protocol names currently mapped by this + instance. + + The name of the resource. + + if the supplied + starts with one of the known + protocols; if not, or if the supplied + is itself . + + + + + Extracts the protocol name from the supplied + . + + The name of the resource. + + The extracted protocol name or if the + supplied is unqualified (or + is itself ). + + + + + The default protocol to use for unqualified resources. + + +

+ The initial value is "file". +

+
+
+ + + Provides the means to configure an application context in addition to + the methods exposed on the + interface. + + +

+ This interface is to be implemented by most (if not all) + implementations. +

+

+ Configuration and lifecycle methods are encapsulated here to avoid + making them obvious to + client code. +

+

+ Calling will close this + application context, releasing all resources and locks that the + implementation might hold. This includes disposing all cached + singleton objects. +

+ + does not invoke the + attendant on any parent + context. + +
+ Juergen Hoeller + Mark Pollack (.NET) + + +
+ + + The central interface to Spring.NET's IoC container. + + +

+ implementations + provide: + + + + Object factory functionality inherited from the + + and + interfaces. + + + + + The ability to resolve messages, supporting internationalization. + Inherited from the + interface. + + + + + The ability to load file resources in a generic fashion. + Inherited from the + interface. + + + + + Acts an an event registry for supporting loosely coupled eventing + between objecs. Inherited from the + interface. + + + + + The ability to raise events related to the context lifecycle. Inherited + from the + interface. + + + + + Inheritance from a parent context. Definitions in a descendant context + will always take priority. + + + +

+

+ In addition to standard object factory lifecycle capabilities, + implementations need + to detect + , + , and + objects and supply + their attendant dependencies accordingly. +

+

+ This interface is the central client interface in Spring.NET's IoC + container implementation. As such it does inherit a quite sizeable + number of interfaces; implementations are strongly encouraged to use + composition to satisfy each of the inherited interfaces (where + appropriate of course). +

+
+ Rod Johnson + Juergen Hoeller + Mark Pollack (.NET) + + + + +
+ + + Extension of the interface + to be implemented by object factories that can enumerate all their object instances, + rather than attempting object lookup by name one by one as requested by clients. + + +

+ implementations that preload + all their objects (for example, DOM-based XML factories) may implement this + interface. This interface is discussed in + "Expert One-on-One J2EE Design and Development", by Rod Johnson. +

+

+ If this is an , + the return values will not take any + hierarchy into account, but + will relate only to the objects defined in the current factory. + Use the helper class to + get all objects. +

+

+ With the exception of + , + the methods and properties in this interface are not designed for frequent + invocation. Implementations may be slow. +

+
+ Rod Johnson + Rick Evans (.NET) +
+ + + The root interface for accessing a Spring.NET IoC container. + + + + This is the basic client view of a Spring.NET IoC container; further interfaces + such as and + + are available for specific purposes such as enumeration and configuration. + + + This is the root interface to be implemented by objects that can hold a number + of object definitions, each uniquely identified by a + name. An independent instance of any of these objects can be obtained + (the Prototype design pattern), or a single shared instance can be obtained + (a superior alternative to the Singleton design pattern, in which the instance is a + singleton in the scope of the factory). Which type of instance + will be returned depends on the object factory configuration - the API is the same. + The Singleton approach is more useful and hence more common in practice. + + + The point of this approach is that the IObjectFactory is a central registry of + application components, and centralizes the configuring of application components + (no more do individual objects need to read properties files, for example). + See chapters 4 and 11 of "Expert One-on-One J2EE Design and Development" for a + discussion of the benefits of this approach. + + + Normally an IObjectFactory will load object definitions stored in a configuration + source (such as an XML document), and use the + namespace to configure the objects. However, an implementation could simply return + .NET objects it creates as necessary directly in .NET code. There are no + constraints on how the definitions could be stored: LDAP, RDBMS, XML, properties + file etc. Implementations are encouraged to support references amongst objects, + to either Singletons or Prototypes. + + + In contrast to the methods in + , all of the methods + in this interface will also check parent factories if this is an + . If an object is + not found in this factory instance, the immediate parent is asked. Objects in + this factory instance are supposed to override objects of the same name in any + parent factory. + + + Object factories are supposed to support the standard object lifecycle interfaces + as far as possible. The maximum set of initialization methods and their standard + order is: + + + + + + 's + property. + + + + + 's + property. + + + + + + (only applicable if running within an ). + + + + + The + + method of + s. + + + + + 's + method. + + + + + A custom init-method definition. + + + + + The + + method of + s. + + + + +

+ + On shutdown of an object factory, the following lifecycle methods apply: + + + + + + 's + method. + + + + + A custom destroy-method definition. + + + + + + Rod Johnson + Juergen Hoeller + Rick Evans (.NET) + + +

+ Is this object a singleton? + + + + That is, will + always return the same object? + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The name of the object to query. + True if the named object is a singleton. + + If there's no such object definition. + +
+ + + Determines whether the specified object name is prototype. That is, will GetObject + always return independent instances? + + This method returning false does not clearly indicate a singleton object. + It indicated non-independent instances, which may correspond to a scoped object as + well. use the IsSingleton property to explicitly check for a shared + singleton instance. + Translates aliases back to the corresponding canonical object name. Will ask the + parent factory if the object can not be found in this factory instance. + + + + The name of the object to query + + true if the specified object name will always deliver independent instances; otherwise, false. + + if there is no object with the given name. + + + + Does this object factory contain an object with the given name? + + + + The concrete lookup strategy depends on the implementation. E.g. s + will also search their parent factory if a name isn't found . + + + The name of the object to query. + True if an object with the given name is defined. + + + + Return the aliases for the given object name, if defined. + + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The object name to check for aliases. + The aliases, or an empty array if none. + + If there's no such object definition. + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The name of the object to return. + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The name of the object to return. + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. If there is no factory method and the + arguments are not null, then match the argument values by type and + call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the supplied is . + + + + + Return an instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + Provides a measure of type safety by throwing an exception if the object is + not of the required . + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + The name of the object to return. + + the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + + + Determine the type of the object with the given name. + + + + More specifically, checks the type of object that + would return. + For an , returns the type + of object that the creates. + + + The name of the object to query. + + The type of the object or if not determinable. + + + + + Determines whether the object with the given name matches the specified type. + + More specifically, check whether a GetObject call for the given name + would return an object that is assignable to the specified target type. + Translates aliases back to the corresponding canonical bean name. + Will ask the parent factory if the bean cannot be found in this factory instance. + + The name of the object to query. + Type of the target to match against. + + true if the object type matches; otherwise, false + if it doesn't match or cannot be determined yet. + + Ff there is no object with the given name + + + + + Return an unconfigured(!) instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + The unconfigured(!) instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + This method will only instantiate the requested object. It does NOT inject any dependencies! + + + + + Injects dependencies into the supplied instance + using the named object definition. + + + + In addition to being generally useful, typically this method is used to provide + dependency injection functionality for objects that are instantiated outwith the + control of a developer. A case in point is the way that the current (1.1) + ASP.NET classes instantiate web controls... the instantiation takes place within + a private method of a compiled page, and thus cannot be hooked into the + typical Spring.NET IOC container lifecycle for dependency injection. + + + + The following code snippet assumes that the instantiated factory instance + has been configured with an object definition named + 'ExampleNamespace.BusinessObject' that has been configured to set the + Dao property of any ExampleNamespace.BusinessObject instance + to an instance of an appropriate implementation... + + namespace ExampleNamespace + { + public class BusinessObject + { + private IDao _dao; + + public BusinessObject() {} + + public IDao Dao + { + get { return _dao; } + set { _dao = value; } + } + } + } + + with the corresponding driver code looking like so... + + IObjectFactory factory = GetAnIObjectFactoryImplementation(); + BusinessObject instance = new BusinessObject(); + factory.ConfigureObject(instance, "object_definition_name"); + // at this point the dependencies for the 'instance' object will have been resolved... + + + + The object instance that is to be so configured. + + + The name of the object definition expressing the dependencies that are to + be injected into the supplied instance. + + + If there is no object definition for the supplied . + + + If any of the target object's dependencies could not be created. + + + + + Determine whether this object factory treats object names case-sensitive or not. + + + + + Return an instance (possibly shared or independent) of the given object name. + + + + This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. + + + Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. + + + Will ask the parent factory if the object cannot be found in this factory + instance. + + + This is the indexer for the + interface. + + + The name of the object to return. + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + + + Check if this object factory contains an object definition with the given name. + + +

+ Does not consider any hierarchy this factory may participate in. +

+ + Ignores any singleton objects that have been registered by other means + than object definitions. + +
+ The name of the object to look for. + + if this object factory contains an object + definition with the given name. + +
+ + + Return the names of all objects defined in this factory. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + + + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + +

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+

+ Does not consider any hierarchy this factory may participate in. +

+
+ + The (class or interface) to match, or + for all object names. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + +

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+

+ Does not consider any hierarchy this factory may participate in. + Use + to include beans in ancestor factories too. + <p>Note: Does <i>not</i> ignore singleton objects that have been registered + by other means than bean definitions. +

+
+ + The (class or interface) to match, or + for all object names. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + +

+ This version of the + method matches all kinds of object definitions, be they singletons, prototypes, or + s. Typically, the results + of this method call will be the same as a call to + IListableObjectFactory.GetObjectsOfType(type,true,true) . +

+
+ + The (class or interface) to match. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + +
+ + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + + The (class or interface) to match. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + + + + + Return the number of objects defined in the factory. + + + The number of objects defined in the factory. + + + + + Sub-interface implemented by object factories that can be part + of a hierarchy. + + Rod Johnson + Rick Evans (.NET) + + + + Determines whether the local object factory contains a bean of the given name, + ignoring object defined in ancestor contexts, also resolving a given alias if necessary. + This is an alternative to ContainsObject, ignoring an object + of the given name from an ancestor object factory. + + The name of the object to query. + + true if objects with the specified name is defined in the local factory; otherwise, false. + + + + + Return the parent object factory, or + if this factory does not have a parent. + + + The parent object factory, or + if this factory does not have a parent. + + + + + Describes an object that can resolve messages. + + +

+ This enables the parameterization and internationalization of messages. +

+

+ Spring.NET provides one out-of-the-box implementation for production + use: +

    +
  • .
  • +
+

+
+ Rod Johnson + Juergen Hoeller + Mark Pollack (.NET) + Aleksandar Seovic (.NET) + +
+ + + Resolve the message identified by the supplied + . + + +

+ If the lookup is not successful, implementations are permitted to + take one of two actions. +

+ + + Throw an exception. + + + + Return the supplied as is. + + + +
+ The name of the message to resolve. + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + +
+ + + Resolve the message identified by the supplied + . + + +

+ If the lookup is not successful, implementations are permitted to + take one of two actions. +

+ + + Throw an exception. + + + + Return the supplied as is. + + + +
+ The name of the message to resolve. + + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + +
+ + + Resolve the message identified by the supplied + . + + + Note that the fallback behavior based on CultureInfo seem to + have a bug that is fixed by installed .NET 1.1 Service Pack 1. +

+ If the lookup is not successful, implementations are permitted to + take one of two actions. +

+ + + Throw an exception. + + + + Return the supplied as is. + + + +
+ The name of the message to resolve. + + The that represents + the culture for which the resource is localized. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + +
+ + + Resolve the message identified by the supplied + . + + + Note that the fallback behavior based on CultureInfo seem to + have a bug that is fixed by installed .NET 1.1 Service Pack 1. +

+ If the lookup is not successful, implementations are permitted to + take one of two actions. +

+ + + Throw an exception. + + + + Return the supplied as is. + + + +
+ The name of the message to resolve. + + The that represents + the culture for which the resource is localized. + + + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + +
+ + + Resolve the message identified by the supplied + . + + + Note that the fallback behavior based on CultureInfo seem to + have a bug that is fixed by installed .NET 1.1 Service Pack 1. +

+ If the lookup is not successful, implementations are permitted to + take one of two actions. +

+ + + Throw an exception. + + + + Return the supplied as is. + + + +
+ The name of the message to resolve. + The default message if name is not found. + + The that represents + the culture for which the resource is localized. + + + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + +
+ + + Resolve the message using all of the attributes contained within + the supplied + argument. + + + The value object storing those attributes that are required to + properly resolve a message. + + + The that represents + the culture for which the resource is localized. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the message could not be resolved. + + + + + Gets a localized resource object identified by the supplied + . + + +

+ This method must use the + + value to obtain a resource. +

+

+ Examples of resources that may be resolved by this method include + (but are not limited to) objects such as icons and bitmaps. +

+
+ + The name of the resource object to resolve. + + + The resolved object, or if not found. + +
+ + + Gets a localized resource object identified by the supplied + . + + +

+ Examples of resources that may be resolved by this method include + (but are not limited to) objects such as icons and bitmaps. +

+
+ + The name of the resource object to resolve. + + + The with which the + resource is associated. + + + The resolved object, or if not found. + +
+ + + Applies resources to object properties. + + +

+ Resource key names are of the form objectName.propertyName. +

+
+ + An object that contains the property values to be applied. + + + The base name of the object to use for key lookup. + + + The with which the + resource is associated. + +
+ + + Encapsulates event publication functionality. + + +

+ Serves as a super-interface for the + interface. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Publishes an application context event. + + + The source of the event. May be . + + + The event that is to be raised. + + + + + A registry that manages subscriptions to and the + publishing of events. + + Griffin Caprio + + + + Publishes all events of the source object. + + + The source object containing events to publish. + + + + + Subscribes to all events published, if the subscriber + implements compatible handler methods. + + The subscriber to use. + + + + Subscribes to the published events of all objects of a given + , if the subscriber implements + compatible handler methods. + + The subscriber to use. + + The target to subscribe to. + + + + + Unsubscribes to all events published, if the subscriber + implmenets compatible handler methods. + + The subscriber to use + + + + Unsubscribes to the published events of all objects of a given + , if the subscriber implements + compatible handler methods. + + The subscriber to use. + + The target to unsubscribe from + + + + + Raised in response to an application context event. + + + + + Returns the date and time this context was loaded. + + +

+ This is to be set immediately after an + has been + instantiated and its configuration has been loaded. Implementations + are permitted to update this value if the context is reset or + refreshed in some way. +

+
+ + The representing when this context + was loaded. + + +
+ + + Gets the parent context, or if there is no + parent context. + + +

+ If the parent context is , then this context + is the root of any context hierarchy. +

+
+ + The parent context, or if there is no + parent. + +
+ + + Gets and sets a name for this context. + + + A name for this context. + + + + + Interface defining methods for start/stop lifecycle control. + The typical use case for this is to control asynchronous processing. + + + + Can be implemented by both components (typically a Spring object defined in + a spring and containers + (typically a spring . Containers will + propagate start/stop signals to all components that apply. + + + Juergen Hoeller + Mark Pollack (.NET) + + + + Starts this component. + + Should not throw an exception if the component is already running. + In the case of a container, this will propagate the start signal + to all components that apply. + + + + + Stops this component. + + + Should not throw an exception if the component isn't started yet. + In the case of a container, this will propagate the stop signal + to all components that apply. + + + + + Gets a value indicating whether this component is currently running. + + + In the case of a container, this will return true + only if all components that apply are currently running. + + + true if this component is running; otherwise, false. + + + + + Add an + + that will get applied to the internal object factory of this + application context on refresh, before any of the object + definitions are evaluated. + + +

+ To be invoked during context configuration. +

+
+ + The factory processor to register. + + +
+ + + Load or refresh the persistent representation of the configuration, + which might an XML file, properties file, or relational database schema. + + + If the configuration cannot be loaded. + + + If the object factory could not be initialized. + + + + + Return the internal object factory of this application context. + + +

+ Can be used to access specific functionality of the factory. +

+ + This is just guaranteed to return an instance that is not + after the context has been refreshed + at least once. + + + Do not use this to post-process the object factory; singletons + will already have been instantiated. Use an + + to intercept the object factory setup process before objects even + get touched. + +
+ +
+ + + Sets the parent of this application context. + + + + The parent should not be changed: it should only be set + outside a constructor if it isn't available when an instance of + this class is created. + + + + The parent context. + + + + + Interface for registries that hold object definitions, i.e. + + and + + instances. + + +

+ Typically implemented by object factories that work with the + + hierarchy internally. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Determine whether the given object name is already in use within this registry, + i.e. whether there is a local object or alias registered under this name. + + + + + Return the names of all objects defined in this registry. + + + The names of all objects defined in this registry, or an empty array + if none defined + + + + + Check if this registry contains a object definition with the given name. + + + The name of the object to look for. + + + True if this object factory contains an object definition with the + given name. + + + + + Returns the + + for the given object name. + + + The name of the object to find a definition for. + + + The for + the given name (never null). + + + If the object definition cannot be resolved. + + + In case of errors. + + + + + Register a new object definition with this registry. + Must support + + and . + + + The name of the object instance to register. + + + The definition of the object instance to register. + + +

+ Must support + and + . +

+
+ + If the object definition is invalid. + +
+ + + Return the aliases for the given object name, if defined. + + the object name to check for aliases + + +

+ Will ask the parent factory if the object cannot be found in this + factory instance. +

+
+ + The aliases, or an empty array if none. + + + If there's no such object definition. + +
+ + + Given a object name, create an alias. We typically use this method to + support names that are illegal within XML ids (used for object names). + + + The name of the object. + + + The alias that will behave the same as the object name. + + + If there is no object with the given name. + + + If the alias is already in use. + + + + + Return the number of objects defined in the registry. + + + The number of objects defined in the registry. + + + + + Name of the .Net config section that contains Spring.Net context definition. + + + + + Default name of the root context. + + + + + The special, well-known-name of the default + in the context. + + +

+ If no can be found + in the context using this lookup key, then message resolution + will be delegated to the parent context (if any). +

+
+
+ + + The special, well-known-name of the default + in the context. + + +

+ If no can be found + in the context using this lookup key, then a default + will be used. +

+
+
+ + + The instance for this class. + + + + + The instance we delegate + our implementation of said interface to. + + + + + The instance we + delegate our implementation of said interface to. + + + + + Creates a new instance of the + with no parent context. + + +

+ This is an class, and as such exposes + no public constructors. +

+
+
+ + + Creates a new instance of the + with no parent context. + + +

+ This is an class, and as such exposes + no public constructors. +

+
+ Flag specifying whether to make this context case sensitive or not. +
+ + + Creates a new instance of the + with the supplied parent context. + + +

+ This is an class, and as such exposes + no public constructors. +

+
+ The application context name. + Flag specifying whether to make this context case sensitive or not. + The parent application context. +
+ + + Adds the given to the list of standard + processors being added to the underlying + + + Each time is called on this context, the context ensures, that + all default s are registered with the underlying . + + The instance. + + + + Closes this context and disposes of any resources (such as + singleton objects in the wrapped + ). + + + + + Subclasses must implement this method to perform the actual + configuration loading. + + +

+ This method is invoked by + , + before any other initialization occurs. +

+
+ + In the case of errors encountered while refreshing the object factory. + +
+ + + Returns the internal object factory of the parent context if it implements + ; else, + returns the parent context itself. + + + The parent context's object factory, or the parent itself. + + + + + Raises an application context event. + + + Any arguments to the event. May be . + + + + + Raises an application context event. + + + The source of the event. + + + Any arguments to the event. May be . + + + + + Create the strategy to be used + + + + + Modify the application context's internal object factory after its standard + initialization. + + +

+ All object definitions will have been loaded, but no objects + will have been instantiated yet. This allows for the registration + of special + s + in certain + implementations. +

+
+ + The object factory used by the application context. + + + In the case of errors. + . +
+ + + Template method which can be overridden to add context-specific + work before the underlying object factory gets refreshed. + + + + + Template method which can be overridden to add context-specific + refresh work. + + +

+ Called on initialization of special objects, before instantiation + of singletons. +

+
+
+ + + Template method which can be overridden to add context-specific + work after the context was refreshed but before the + event gets raised. + + + + + Instantiate and invoke all registered + + objects, respecting any explicit ordering. + + + + Must be called before singleton instantiation. + + + In the case of errors. + + + + Resets the well-known ObjectPostProcessorChecker that logs an info + message when an object is created during IObjectPostProcessor + instantiation, i.e. when an object is not eligible for being + processed by all IObjectPostProcessors. + + + + + Initializes the default event registry for this context. + + + + + Returns the internal message source of the parent context if said + parent context is an , else + simply the parent context itself. + + + The internal message source of the parent context if said + parent context is an , else + simply the parent context itself. + + + + + Initializes the default message source for this context. + + +

+ Uses any parent context's message source if one is not available + in this context. +

+
+
+ + + Add a new + that will get applied to the internal object factory of this application context + on refresh, before any of the object definitions are evaluated. + + + The factory processor to register. + + + + + Load or refresh the persistent representation of the configuration, + which might an XML file, properties file, or relational database schema. + + + If the configuration cannot be loaded. + + + If the object factory could not be initialized. + + + + + Registers well-known s and + preregisters well-known dependencies using + + the raw object factory as returned from + + + + Ensures, that predefined ObjectPostProcessors are registered with this ObjectFactory + + + + + + Starts this component. + + Should not throw an exception if the component is already running. + In the case of a container, this will propagate the start signal + to all components that apply. + + + + + Stops this component. + + + Should not throw an exception if the component isn't started yet. + In the case of a container, this will propagate the stop signal + to all components that apply. + + + + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + + The (class or interface) to match, or + for all object names. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + + + + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + + The (class or interface) to match, or + for all object names. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + + + + + Return the names of all objects defined in this factory. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + + + + + Return the registered + for the + given object, allowing access to its property values and constructor + argument values. + + The name of the object. + + The registered + . + + + If there is no object with the given name. + + + In the case of errors. + + + + + Return the registered + for the + given object, allowing access to its property values and constructor + argument values. + + The name of the object. + Whether to search parent object factories. + + The registered + . + + + If there is no object with the given name. + + + In the case of errors. + + + + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + + The (class or interface) to match. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + + + + + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + + The (class or interface) to match. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + + + + + + Check if this object factory contains an object definition with the given name. + + The name of the object to look for. + + True if this object factory contains an object definition with the given name. + + + + + + Does this object factory contain an object with the given name? + + The name of the object to query. + + if an object with the given name is defined. + + + + + + Return the aliases for the given object name, if defined. + + The object name to check for aliases. + The aliases, or an empty array if none. + + If there's no such object definition. + + + + + + Return an unconfigured(!) instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + The unconfigured(!) instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + This method will only instantiate the requested object. It does NOT inject any dependencies! + + + + + Return an instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + + + + Return an instance (possibly shared or independent) of the given object name. + + The name of the object to return. + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + + + + Return an instance (possibly shared or independent) of the given object name. + + +

+ This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. +

+

+ Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. +

+

+ Will ask the parent factory if the object cannot be found in this factory + instance. +

+
+ The name of the object to return. + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. If there is no factory method and the + arguments are not null, then match the argument values by type and + call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the supplied is . + +
+ + + Return an instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + + + Is this object a singleton? + + The name of the object to query. + True if the named object is a singleton. + + If there's no such object definition. + + + + + + Determines whether the specified object name is prototype. That is, will GetObject + always return independent instances? + + The name of the object to query + + true if the specified object name will always deliver independent instances; otherwise, false. + + This method returning false does not clearly indicate a singleton object. + It indicated non-independent instances, which may correspond to a scoped object as + well. use the IsSingleton property to explicitly check for a shared + singleton instance. + Translates aliases back to the corresponding canonical object name. Will ask the + parent factory if the object can not be found in this factory instance. + + + if there is no object with the given name. + + + + Determines whether the object with the given name matches the specified type. + + More specifically, check whether a GetObject call for the given name + would return an object that is assignable to the specified target type. + Translates aliases back to the corresponding canonical bean name. + Will ask the parent factory if the bean cannot be found in this factory instance. + + The name of the object to query. + Type of the target to match against. + + true if the object type matches; otherwise, false + if it doesn't match or cannot be determined yet. + + Ff there is no object with the given name + + + + + Determine the of the object with the + given name. + + The name of the object to query. + + The of the object, or + if not determinable. + + + + + + Injects dependencies into the supplied instance + using the named object definition. + + + The object instance that is to be so configured. + + + The name of the object definition expressing the dependencies that are to + be injected into the supplied instance. + + + + + + Injects dependencies into the supplied instance + using the supplied . + + + The object instance that is to be so configured. + + + The name of the object definition expressing the dependencies that are to + be injected into the supplied instance. + + + An object definition that should be used to configure object. + + + + + + Determines whether the local object factory contains a bean of the given name, + ignoring object defined in ancestor contexts. + This is an alternative to ContainsObject, ignoring an object + of the given name from an ancestor object factory. + + + + + The name of the object to query. + + true if objects with the specified name is defined in the local factory; otherwise, false. + + + + + Determine whether the given object name is already in use within this context, + i.e. whether there is a local object. May be override by subclasses, the default + implementation simply returns + + + + + Register a new object definition with this registry. + Must support + + and . + + The name of the object instance to register. + The definition of the object instance to register. + +

+ Must support + and + . +

+
+ + If the object definition is invalid. + +
+ + + Given a object name, create an alias. We typically use this method to + support names that are illegal within XML ids (used for object names). + + The name of the object. + The alias that will behave the same as the object name. + + If there is no object with the given name. + + + If the alias is already in use. + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + + The that represents + the culture for which the resource is localized. + + + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If no message could be resolved. + + + If the supplied is . + + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + The default message. + + The that represents + the culture for which the resource is localized. + + + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If no message could be resolved. + + + If the supplied is . + + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + + The resolved message if the lookup was successful. + + + If no message could be resolved. + + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + + The resolved message if the lookup was successful. + + + If no message could be resolved. + + + If the supplied is . + + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + + The that represents + the culture for which the resource is localized. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If no message could be resolved. + + + If the supplied is . + + + + + + Resolve the message using all of the attributes contained within + the supplied + argument. + + + The value object storing those attributes that are required to + properly resolve a message. + + + The that represents + the culture for which the resource is localized. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the message could not be resolved. + + + + + + Gets a localized resource object identified by the supplied + . + + + The name of the resource object to resolve. + + + The with which the + resource is associated. + + + The resolved object, or if not found. + + + + + + Gets a localized resource object identified by the supplied + . + + + The name of the resource object to resolve. + + + The resolved object, or if not found. + + + + + + Gets a localized resource object identified by the supplied + . + + + The name of the resource object to resolve. + + + The with which the + resource is associated. + + + The resolved object, or if not found. + + + + + + Gets a localized resource object identified by the supplied + . + + + The name of the resource object to resolve. + + + The resolved object, or if not found. + + + + + + Applies resources to object properties. + + + An object that contains the property values to be applied. + + + The base name of the object to use for key lookup. + + + The with which the + resource is associated. + + + + + + Publishes all events of the source object. + + + The source object containing events to publish. + + + + + + Subscribes to all events published, if the subscriber + implements compatible handler methods. + + The subscriber to use. + + + + + Subscribes to published events of a all objects of a given + , if the subscriber implements + compatible handler methods. + + The subscriber to use. + + The target to subscribe to. + + + + + + Unsubscribes to all events published, if the subscriber + implmenets compatible handler methods. + + The subscriber to use + + + + Unsubscribes to the published events of all objects of a given + , if the subscriber implements + compatible handler methods. + + The subscriber to use. + + The target to unsubscribe from + + + + + Publishes an application context event. + + +

+ +

+
+ + The source of the event. May be . + + + The event that is to be raised. + + +
+ + + An object that can be used to synchronize access to the + + + + + Set the to be used by this context. + + + + + The timestamp when this context was first loaded. + + + The timestamp (milliseconds) when this context was first loaded. + + + + + Gets a flag indicating whether context should be case sensitive. + + true if object lookups are case sensitive; otherwise, false. + + + + The for this context. + + + If the context has not been initialized yet. + + + + + The for this context. + + + If the context has not been initialized yet. + + + + + Returns the list of the + s + that will be applied to the objects created with this factory. + + +

+ The elements of this list are instances of implementations of the + + interface. +

+
+ + The list of the + s + that will be applied to the objects created with this factory. + +
+ + + Return the internal object factory of this application context. + + + + + Gets the parent context, or if there is no + parent context. + + + The parent context, or if there is no + parent. + + + + + + Gets a value indicating whether this component is currently running. + + + true if this component is running; otherwise, false. + + + In the case of a container, this will return true + only if all components that apply are currently running. + + + + + Gets a dictionary of all singleton beans that implement the + ILifecycle interface in this context. + + A dictionary of ILifecycle objects with object name as key. + + + + Raised in response to an implementation-dependant application + context event. + + + + + The date and time this context was first loaded. + + + The representing when this context + was first loaded. + + + + + A name for this context. + + + A name for this context. + + + + + Return the number of objects defined in the factory. + + + The number of objects defined in the factory. + + + + + + Return an instance (possibly shared or independent) of the given object name. + + The name of the object to return. + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + + + + Return the parent object factory, or if there is none. + + + The parent object factory, or if there is none. + + + + + + Allows for custom modification of new object instances, e.g. + checking for marker interfaces or wrapping them with proxies. + + +

+ Application contexts can auto-detect + + objects in their object definitions and apply them before any other + objects get created. Plain object factories allow for programmatic + registration of post-processors. +

+

+ Typically, post-processors that populate objects via marker interfaces + or the like will implement + , + and post-processors that wrap objects with proxies will normally implement + . +

+
+ Juergen Hoeller + Aleksandar Seovic (.NET) + +
+ + + Apply this + to the given new object instance before any object initialization callbacks. + + +

+ The object will already be populated with property values. + The returned object instance may be a wrapper around the original. +

+
+ + The new object instance. + + + The name of the object. + + + The object instance to use, either the original or a wrapped one. + + + In case of errors. + +
+ + + Apply this to the + given new object instance after any object initialization callbacks. + + +

+ The object will already be populated with property values. The returned object + instance may be a wrapper around the original. +

+
+ + The new object instance. + + + The name of the object. + + + The object instance to use, either the original or a wrapped one. + + + In case of errors. + +
+ + + Interface that can be implemented by objects that should be orderable, e.g. in an + . + + +

+ The actual order can be interpreted as prioritization, the first object (with the + lowest order value) having the highest priority. +

+
+ Juergen Hoeller + Aleksandar Seovic (.Net) +
+ + + Return the order value of this object, where a higher value means greater in + terms of sorting. + + +

+ Normally starting with 0 or 1, with indicating + greatest. Same order values will result in arbitrary positions for the affected + objects. +

+

+ Higher value can be interpreted as lower priority, consequently the first object + has highest priority. +

+
+ The order value. +
+ + + Abstract implementation of the interface, + implementing common handling of message variants, making it easy + to implement a specific strategy for a concrete . + + +

Subclasses must implement the abstract ResolveObject + method.

+

Note: By default, message texts are only parsed through + String.Format if arguments have been passed in for the message. In case + of no arguments, message texts will be returned as-is. As a consequence, + you should only use String.Format escaping for messages with actual + arguments, and keep all other messages unescaped. +

+

Supports not only IMessageSourceResolvables as primary messages + but also resolution of message arguments that are in turn + IMessageSourceResolvables themselves. +

+

This class does not implement caching of messages per code, thus + subclasses can dynamically change messages over time. Subclasses are + encouraged to cache their messages in a modification-aware fashion, + allowing for hot deployment of updated messages. +

+
+ Rod Johnson + Juergen Hoeller + Griffin Caprio (.NET) + Harald Radi (.NET) + + + +
+ + + Sub-interface of to be + implemented by objects that can resolve messages hierarchically. + + Rod Johnson + Juergen Hoeller + Mark Pollack (.NET) + + + + + The parent message source used to try and resolve messages that + this object can't resolve. + + +

+ If the value of this property is then no + further resolution is possible. +

+
+
+ + + holds the logger instance shared with subclasses. + + + + + Initializes this instance. + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the lookup is not successful throw NoSuchMessageException + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + The that represents + the culture for which the resource is localized. + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + Note that the fallback behavior based on CultureInfo seem to + have a bug that is fixed by installed .NET 1.1 Service Pack 1. +

+ If the lookup is not successful, implementations are permitted to + take one of two actions. +

+ If the lookup is not successful throw NoSuchMessageException +
+
+ + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the lookup is not successful throw NoSuchMessageException + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + The that represents + the culture for which the resource is localized. + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + Note that the fallback behavior based on CultureInfo seem to + have a bug that is fixed by installed .NET 1.1 Service Pack 1. +

+ If the lookup is not successful throw NoSuchMessageException. +

+
+
+ + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + The default message if name is not found. + The that represents + the culture for which the resource is localized. + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + Note that the fallback behavior based on CultureInfo seem to + have a bug that is fixed by installed .NET 1.1 Service Pack 1. +

+ If the lookup is not successful throw NoSuchMessageException +

+
+
+ + + Resolve the message using all of the attributes contained within + the supplied + argument. + + The value object storing those attributes that are required to + properly resolve a message. + The that represents + the culture for which the resource is localized. + + The resolved message if the lookup was successful. + + + If the message could not be resolved. + + + + + Gets a localized resource object identified by the supplied + . + + + The name of the resource object to resolve. + + + The resolved object, or if not found. + + + + + + Gets a localized resource object identified by the supplied + . + + + Note that the fallback behavior based on CultureInfo seem to + have a bug that is fixed by installed .NET 1.1 Service Pack 1. + + + The name of the resource object to resolve. + + + The with which the + resource is associated. + + + The resolved object, or if not found. If + the resource name resolves to null, then in .NET 1.1 the return + value will be String.Empty whereas in .NET 2.0 it will return + null. + + + + + + Applies resources to object properties. + + + An object that contains the property values to be applied. + + + The base name of the object to use for key lookup. + + + The with which the + resource is associated. + + + + + Resolve the given code and arguments as message in the given culture, + returning null if not found. Does not fall back to the code + as default message. Invoked by GetMessage methods. + + The code to lookup up, such as 'calculator.noRateSet'. + array of arguments that will be filled in for params + within the message. + The with which the + resource is associated. + + The resolved message if the lookup was successful. + + + + + Try to retrieve the given message from the parent MessageSource, if any. + + The code to lookup up, such as 'calculator.noRateSet'. + array of arguments that will be filled in for params + within the message. + The with which the + resource is associated. + + The resolved message if the lookup was successful. + + + + + Return a fallback default message for the given code, if any. + + + Default is to return the code itself if "UseCodeAsDefaultMessage" + is activated, or return no fallback else. In case of no fallback, + the caller will usually receive a NoSuchMessageException from GetMessage + + The code to lookup up, such as 'calculator.noRateSet'. + The default message to use, or null if none. + + + + Renders the default message string. The default message is passed in as specified by the + caller and can be rendered into a fully formatted default message shown to the user. + + Default implementation passed he String for String.Format resolving any + argument placeholders found in them. Subclasses may override this method to plug + in custom processing of default messages. + + The default message. + The array of agruments that will be filled in for parameter + placeholders within the message, or null if none. + The with which the + resource is associated. + The rendered default message (with resolved arguments) + + + + Format the given default message String resolving any + agrument placeholders found in them. + + The message to format. + The array of agruments that will be filled in for parameter + placeholders within the message, or null if none. + The with which the + resource is associated. + The formatted message (with resolved arguments) + + + + Search through the given array of objects, find any + MessageSourceResolvable objects and resolve them. + + + Allows for messages to have MessageSourceResolvables as arguments. + + + The array of arguments for a message. + The with which the + resource is associated. + An array of arguments with any IMessageSourceResolvables resolved + + + + Gets the specified resource (e.g. Icon or Bitmap). + + The name of the resource to resolve. + + The to resolve the + code for. + + The resource if found. otherwise. + + + + Applies resources from the given name on the specified object. + + + An object that contains the property values to be applied. + + + The base name of the object to use for key lookup. + + + The with which the + resource is associated. + + + + + Subclasses must implement this method to resolve a message. + + The code to lookup up, such as 'calculator.noRateSet'. + The with which the + resource is associated. + The resolved message from the backing store of message data. + + + + Resolves an object (typically an icon or bitmap). + + +

+ Subclasses must implement this method to resolve an object. +

+
+ The code of the object to resolve. + + The to resolve the + code for. + + + The resolved object or if not found. + +
+ + + Applies resources to object properties. + + +

+ Subclasses must implement this method to apply resources + to an arbitrary object. +

+
+ + An object that contains the property values to be applied. + + + The base name of the object to use for key lookup. + + + The with which the + resource is associated. + +
+ + Gets or Sets a value indicating whether to use the message code as + default message instead of throwing a NoSuchMessageException. + Useful for development and debugging. Default is "false". + + +

Note: In case of a IMessageSourceResolvable with multiple codes + (like a FieldError) and a MessageSource that has a parent MessageSource, + do not activate "UseCodeAsDefaultMessage" in the parent: + Else, you'll get the first code returned as message by the parent, + without attempts to check further codes.

+

To be able to work with "UseCodeAsDefaultMessage" turned on in the parent, + AbstractMessageSource contains special checks + to delegate to the internal GetMessageInternal method if available. + In general, it is recommended to just use "UseCodeAsDefaultMessage" during + development and not rely on it in production in the first place, though.

+

Alternatively, consider overriding the GetDefaultMessage + method to return a custom fallback message for an unresolvable code.

+
+ + true if use the message code as default message instead of + throwing a NoSuchMessageException; otherwise, false. + +
+ + + The parent message source used to try and resolve messages that + this object can't resolve. + + + +

+ If the value of this property is then no + further resolution is possible. +

+
+
+ + + Convenient abstract superclass for + implementations that + draw their configuration from XML documents containing object + definitions as understood by an + . + + Rod Johnson + Juergen Hoeller + Griffin Caprio (.NET) + + + + Creates a new instance of the + + class. + + +

+ This is an class, and as such exposes + no public constructors. +

+
+
+ + + Creates a new instance of the + class + with the given parent context. + + +

+ This is an class, and as such exposes + no public constructors. +

+
+ The application context name. + Flag specifying whether to make this context case sensitive or not. + The parent context. +
+ + + Instantiates and populates the underlying + with the object + definitions yielded up by the + method. + + + In the case of errors encountered while refreshing the object factory. + + + In the case of errors encountered reading any of the resources + yielded by the method. + + + + + + Initialize the object definition reader used for loading the object + definitions of this context. + + +

+ The default implementation of this method is a no-op; i.e. it does + nothing. Can be overridden in subclasses to provide custom + initialization of the supplied + ; for example, a derived + class may want to turn off XML validation. +

+
+ + The object definition reader used by this context. + +
+ + + Load the object definitions with the given + . + + +

+ The lifecycle of the object factory is handled by + ; + therefore this method is just supposed to load and / or register + object definitions. +

+
+ + The reader containing object definitions. + + In case of object registration errors. + + + In the case of errors encountered reading any of the resources + yielded by the method. + +
+ + + Loads the object definitions into the given object factory, typically through + delegating to one or more object definition readers. + + The object factory to lead object definitions into + + + + + + Create a new reader instance for importing object definitions into the specified . + + the to be associated with the reader + a new instance. + + + + Customizes the internal object factory used by this context. + + Called for each attempt. +

+ The default implementation is empty. Can be overriden in subclassses to customize + DefaultListableBeanFatory's standard settings. +

+ The newly created object factory for this context +
+ + + Create an internal object factory for this context. + + +

+ Called for each attempt. + This default implementation creates a + + with the internal object factory of this context's parent serving + as the parent object factory. Can be overridden in subclasse,s + for example to customize DefaultListableBeanFactory's settings. +

+
+ The object factory for this context. +
+ + + Determine whether the given object name is already in use within this context's object factory, + i.e. whether there is a local object or alias registered under this name. + + + + + An array of resource locations, referring to the XML object + definition files that this context is to be built with. + + +

+ Examples of the format of the various strings that would be + returned by accessing this property can be found in the overview + documentation of with the + class. +

+
+ + An array of resource locations, or if none. + +
+ + + Subclasses must return their internal object factory here. + + + The internal object factory for the application context. + + + + + + + implementation that passes the application context to object that + implement the + , + , and + interfaces. + + +

+ If an object's class implements more than one of the + , + , and + interfaces, then the + order in which the interfaces are satisfied is as follows... + + + + + + + + + + + +

+

+ Application contexts will automatically register this with their + underlying object factory. Applications should thus never need to use + this class directly. +

+
+ Juergen Hoeller + Griffin Caprio (.NET) +
+ + + Creates a new instance of the + class. + + + The that this + instance will work with. + + + + + Apply this + to the given new object instance before any object + initialization callbacks. + + + The new object instance. + + + The name of the object. + + + The the object instance to use, either the original or a wrapped one. + + + In case of errors. + + + + + + Apply this to the + given new object instance after any object initialization + callbacks. + + + The new object instance. + + + The name of the object. + + + The object instance to use, either the original or a wrapped one. + + + In case of errors. + + + + + + Convenient superclass for application objects that want to be aware of + the application context, e.g. for custom lookup of collaborating object + or for context-specific resource access. + + +

+ It saves the application context reference and provides an + initialization callback method. Furthermore, it offers numerous + convenience methods for message lookup. +

+

+ There is no requirement to subclass this class: it just makes things + a little easier if you need access to the context, e.g. for access to + file resources or to the message source. Note that many application + objects do not need to be aware of the application context at all, + as they can receive collaborating objects via object references. +

+
+ Rod Johnson + Juergen Hoeller + Griffin Caprio (.NET) +
+ + + To be implemented by any object that wishes to be notified + of the that it runs in. + + +

+ Implementing this interface makes sense when an object requires access + to a set of collaborating objects. Note that configuration via object + references is preferable to implementing this interface just for object + lookup purposes. +

+

+ This interface can also be implemented if an object needs access to + file resources, i.e. wants to call + , or access to + the . However, it is + preferable to implement the more specific + + interface to receive a reference to the + object in that scenario. +

+

+ Note that dependencies can also + be exposed as object properties of the + type, populated via strings with + automatic type conversion performed by an object factory. This obviates + the need for implementing any callback interface just for the purpose + of accessing a specific file resource. +

+

+ + is a convenience implementation of this interface for your + application objects. +

+

+ For a list of all object lifecycle methods, see the overview for the + interface. +

+
+ Rod Johnson + Mark Pollack (.NET) + + + +
+ + + Sets the that this + object runs in. + + +

+ Normally this call will be used to initialize the object. +

+

+ Invoked after population of normal object properties but before an + init callback such as + 's + + or a custom init-method. Invoked after the setting of any + 's + + property. +

+
+ + In the case of application context initialization errors. + + + If thrown by any application context methods. + + +
+ + + Creates a new instance of the + class. + + +

+ This is an class, and as such exposes no + public constructors. +

+
+
+ + + Creates a new instance of the + class. + + +

+ This is an class, and as such exposes no + public constructors. +

+
+ + The that this + object runs in. + +
+ + + Intializes the wrapped + . + + +

+ This is a template method that subclasses can override for custom + initialization behavior. +

+

+ Gets called by the + + instance directly after setting the context instance. +

+ + Does not get called on reinitialization of the context. + +
+ + In the case of any initialization errors. + + + If thrown by application context methods. + +
+ + + The context class that any context passed to the + + must be an instance of. + + + The + . + + + + + Return a for the + application context used by this object, for easy message access. + + + + + Gets or sets the that this + object runs in. + + + When passed an unexpected + implementation + instance that is not compatible with the + defined by the value of the + . + property. Also, thrown when trying to re-initialize with a + different than was + originally used. + + + If thrown by any application context methods. + + + + + + + Creates an instance + using context definitions supplied in a custom configuration and + configures the with that instance. + + + Implementations of the + interface must provide the following two constructors: + + + + A constructor that takes a string array of resource locations. + + + + + A constructor that takes a reference to a parent application context + and a string array of resource locations (and in that order). + + + +

+ Note that if the type attribute is not present in the declaration + of a particular context, then a default + + is assumed. This default + + is currently the + ; please note the exact + of this default is an + implementation detail, that, while unlikely, may do so in the future. + to +

+
+ +

+ This is an example of specifying a context that reads its resources from + an embedded Spring.NET XML object configuration file... +

+ + + + +
+ + + + + + + + + +

+ This is an example of specifying a context that reads its resources from + a custom configuration section within the same application / web + configuration file and uses case insensitive object lookups. +

+

+ Please note that you must adhere to the naming + of the various sections (i.e. '<sectionGroup name="spring">' and + '<section name="context">'. +

+ + + + +
+
+ + + + + + + + + + + + +

+ And this is an example of specifying a hierarchy of contexts. The + hierarchy in this case is only a simple parent->child hierarchy, but + hopefully it illustrates the nesting of context configurations. This + nesting of contexts can be arbitrarily deep, and is one way... child + contexts know about their parent contexts, but parent contexts do not + know how many child contexts they have (if any), or have references + to any such child contexts. +

+ + + + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Mark Pollack + Aleksandar Seovic + Rick Evans + + + + + Creates an instance + using the context definitions supplied in a custom + configuration section. + + +

+ This instance is + also used to configure the . +

+
+ + The configuration settings in a corresponding parent + configuration section. + + + The configuration context when called from the ASP.NET + configuration system. Otherwise, this parameter is reserved and + is . + + + The for the section. + + + An instance + populated with the object definitions supplied in the configuration + section. + +
+ + + Create all child-contexts in the given for the given context. + + The parent context to use + The current configContext + The list of child context elements + + + + Instantiates a new context. + + + + + Gets the context's name specified in the name attribute of the context element. + + The current configContext + The context element + + + + Extracts the context-type from the context element. + If none is specified, returns the parent's type. + + + + + Extracts the case-sensitivity attribute from the context element + + + + + Gets the context specified in the type + attribute of the context element. + + +

+ If this attribute is not defined it defaults to the + type. +

+
+ + If the context type does not implement the + interface. + +
+ + + Returns the array of resources containing object definitions for + this context. + + + + + Returns the array of child contexts for this context. + + + + + The of + created if no type attribute is specified on a context element. + + + + + + Get the context's case-sensitivity to use if none is specified + + +

+ Derived handlers may override this property to change their default case-sensitivity. +

+

+ Defaults to 'true'. +

+
+
+ + + Returns if the context should be lazily + initialized. + + + + + Constants defining the structure and values associated with the + schema for laying out Spring.NET contexts in XML. + + + + + Defines a single + . + + + + + Specifies a context name. + + + + + Specifies if context should be case sensitive or not. Default is true. + + + + + Specifies a . + + +

+ Does not have to be fully assembly qualified, but its generally regarded + as better form if the names of one's objects + are specified explicitly. +

+
+
+ + + Specifies whether context should be lazy initialized. + + + + + Defines an + + + + + Specifies the URI for an + . + + + + + Provides access to a central registry of + s. + + +

+ A singleton implementation to access one or more application contexts. Application + context instances are cached. +

+

Note that the use of this class or similar is unnecessary except (sometimes) for + a small amount of glue code. Excessive usage will lead to code that is more tightly + coupled, and harder to modify or test. Consider refactoring your code to use standard + Dependency Injection techniques or implement the interface IApplicationContextAware to + obtain a reference to an application context.

+
+ Mark Pollack + Aleksandar Seovic + +
+ + + The shared instance for this class (and derived classes). + + + + + Creates a new instance of the ContextRegistry class. + + +

+ Explicit static constructor to tell C# compiler + not to mark type as beforefieldinit. +

+
+
+ + + Registers an instance of an + . + + +

+ This is usually called via a + inside a .NET + application configuration file. +

+
+ The application context to be registered. + + If a context has previously been registered using the same name + +
+ + + Handles events raised by an application context. + + + + + + + Removes the context from the registry + + + Has no effect if the context wasn't registered + + ´the context to remove from the registry + + + + Returns the root application context. + + +

+ The first call to GetContext will create the context + as specified in the .NET application configuration file + under the location spring/context. +

+
+ The root application context. +
+ + + Returns context based on specified name. + + +

+ The first call to GetContext will create the context + as specified in the .NET application configuration file + under the location spring/context. +

+
+ The context name. + The specified context, or null, if context with that name doesn't exists. + + If the context name is null or empty + +
+ + + Removes all registered + s from this + registry. + + + Raises the event while still holding a lock on + + + + + Allows to check, if a context is already registered + + The context name. + true, if the context is already registered. false otherwise + + + + This event is fired, if ContextRegistry.Clear() is called.
+ Clients may register to get informed +
+ + This event is fired while still holding a lock on the Registry.
+ 'sender' parameter is sent as typeof(ContextRegistry), EventArgs are not used +
+
+ + + Gets an object that should be used to synchronize access to ContextRegistry + from the calling code. + + + + + Default implementation of the + interface. + + +

+ Provides easy ways to store all the necessary values needed to resolve + messages from an . +

+
+ Juergen Hoeller + Griffin Caprio (.NET) + +
+ + + Describes objects that are suitable for message resolution in a + . + + +

+ Spring.NET's own validation error classes implement this interface. +

+
+ Juergen Hoeller + Mark Pollack (.NET) + + +
+ + + Return the codes to be used to resolve this message, in the order + that they are to be tried. + + +

+ The last code will therefore be the default one. +

+
+ + A array of codes which are associated + with this message. + +
+ + + Return the array of arguments to be used to resolve this message. + + + An array of objects to be used as parameters to replace + placeholders within the message text. + + + + + Return the default message to be used to resolve this message. + + + The default message, or if there is no + default. + + + + + Creates a new instance of the + class + using a single code. + + The message code to be resolved. + + + + Initializes a new instance of the class. + + The codes to be used to resolve this message + + + + Creates a new instance of the + class + using multiple codes. + + The message codes to be resolved. + + The arguments used to resolve the supplied . + + + + + Creates a new instance of the + class + using multiple codes and a default message. + + The message codes to be resolved. + + The arguments used to resolve the supplied . + + + The default message used if no code could be resolved. + + + + + Creates a new instance of the + class + from another resolvable. + + +

+ This is the copy constructor for the + class. +

+
+ + The to be copied. + + + If the supplied is . + +
+ + + Returns a representation of this + . + + + A representation of this + . + + + + + Calls the visit method on the supplied + to output a version of this class. + + The visitor to use. + + A representation of this + . + + + + + Return the codes to be used to resolve this message, in the order + that they are to be tried. + + + A array of codes which are associated + with this message. + + + + + + Return the array of arguments to be used to resolve this message. + + + An array of objects to be used as parameters to replace + placeholders within the message text. + + + + + + Return the default code for this resolvable. + + + The default code of this resolvable; this will be the last code in + the codes array, or if this instance has no + codes. + + + + + + Return the default message to be used to resolve this message. + + + The default message, or if there is no + default. + + + + + + Default section handler that can handle any configuration section. + + +

+ Simply returns the configuration section as an . +

+
+ Aleksandar Seovic +
+ + + Returns the configuration section as an + + + The configuration settings in a corresponding parent + configuration section. + + + The configuration context when called from the ASP.NET + configuration system. Otherwise, this parameter is reserved and + is a null reference. + + + The for the section. + + Config section as XmlElement. + + + + Empty implementation that + simply delegates all method calls to it's parent + . + + +

+ If no parent is available, + no messages will be resolved (and a + will be thrown). +

+

+ Used as placeholder by the + class, + if the context definition doesn't define its own + . Not intended for direct use + in applications. +

+
+ Juergan Hoeller + Rick Evans (.NET) + +
+ + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The parent message source used to try and resolve messages that + this object can't resolve. + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the message could not be resolved. + + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the message could not be resolved. + + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + + The that represents + the culture for which the resource is localized. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the message could not be resolved. + + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + + The that represents + the culture for which the resource is localized. + + + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the message could not be resolved. + + + + + + Resolve the message identified by the supplied + . + + The name of the message to resolve. + The default message. + + The that represents + the culture for which the resource is localized. + + + The array of arguments that will be filled in for parameters within + the message, or if there are no parameters + within the message. Parameters within a message should be + referenced using the same syntax as the format string for the + method. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the message could not be resolved. + + + + + + Resolve the message using all of the attributes contained within + the supplied + argument. + + + The value object storing those attributes that are required to + properly resolve a message. + + + The that represents + the culture for which the resource is localized. + + + The resolved message if the lookup was successful (see above for + the return value in the case of an unsuccessful lookup). + + + If the message could not be resolved. + + + If the message could not be resolved. + + + + + + Gets a localized resource object identified by the supplied + . + + + The name of the resource object to resolve. + + + The resolved object, or if not found. + + + + + + Gets a localized resource object identified by the supplied + . + + + The name of the resource object to resolve. + + + The with which the + resource is associated. + + + The resolved object, or if not found. + + + + + + Applies resources to object properties. + + + An object that contains the property values to be applied. + + + The base name of the object to use for key lookup. + + + The with which the + resource is associated. + + + + + + The parent message source used to try and resolve messages that + this object can't resolve. + + + + + + Generic ApplicationContext implementation that holds a single internal + instance and does not + assume a specific object definition format. + + + Implements the interface in order + to allow for aplying any object definition readers to it. + Typical usage is to register a variety of object definitions via the + interface and then call + to initialize those + objects with application context semantics (handling + , auto-detecting + ObjectFactoryPostProcessors, etc). + + In contrast to other IApplicationContext implementations that create a new internal + IObjectFactory instance for each refresh, the internal IObjectFactory of this context + is available right from the start, to be able to register object definitions on it. + may only be called once + Usage examples + + GenericApplicationContext ctx = new GenericApplicationContext(); + // register your objects and object definitions + ctx.RegisterObjectDefinition(...) + ctx.Refresh(); + + + Mark Pollack + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + if set to true names in the context are case sensitive. + + + + Initializes a new instance of the class. + + The object factory instance to use for this context. + + + + Initializes a new instance of the class. + + The parent application context. + + + + Initializes a new instance of the class. + + The name of the application context. + if set to true names in the context are case sensitive. + The parent application context. + + + + Initializes a new instance of the class. + + The object factory to use for this context + The parent applicaiton context. + + + + Initializes a new instance of the class. + + The name of the application context. + if set to true names in the context are case sensitive. + The parent application context. + The object factory to use for this context + + + + Do nothing operation. We hold a single internal ObjectFactory and rely on callers + to register objects throug our public methods (or the ObjectFactory's). + + + In the case of errors encountered while refreshing the object factory. + + + + + Determines whether the given object name is already in use within this factory, + i.e. whether there is a local object or alias registered under this name or + an inner object created with this name. + + + + + Return the internal object factory of this application context. + + + + + + Gets the underlying object factory of this context, available for + registering object definitions. + + You need to call Refresh to initialize the + objects factory and its contained objects with application context + semantics (autodecting IObjectFactoryPostProcessors, etc). + The internal object factory (as DefaultListableObjectFactory). + + + + Helper class for easy access to messages from an + , providing various + overloaded GetMessage methods. + + +

+ Available from + , but also + reusable as a standalone helper to delegate to in application objects. +

+
+ Juergen Hoeller + Griffin Caprio (.NET) + + +
+ + + Creates a new instance of the + class + that uses the current + for all locale specific lookups. + + + The to use to locate messages. + + + + + Creates a new instance of the + class + + + The to use to locate + messages. + + + The to use for + locale specific messages. + + + + + Retrieve the message for the given code and the default + . + + The code of the message. + The message. + + + + Retrieve the message for the given code and the given + . + + The code of the message. + + The to use for + lookups. + + The message. + + + + Retrieve the message for the given code and the default + . + + The code of the message. + + The arguments for the message, or if none. + + The message. + + If the message could not be found. + + + + + Retrieve the message for the given code and the given + . + + The code of the message. + + The to use for + lookups. + + + The arguments for the message, or if none. + + The message. + + If the message could not be found. + + + + + Retrieve a mesage using the given + . + + + The . + + The message. + + If the message could not be found. + + + + + Retrieve a mesage using the given + in the given + . + + + The . + + + The to use for + lookups. + + The message + + If the message could not be found. + + + + + Visitor class to represent + instances. + + +

+ Used in the first instance to supply stringified versions of + instances. +

+

+ Other methods can be added here to return different representations, + including XML, CSV, etc.. +

+
+ Griffin Caprio (.NET) +
+ + + Creates a new instance of the + class. + + + + + Outputs the supplied + as a nicely formatted . + + + The to output. + + + + + Configuration section handler for the (recommended, Spring.NET standard) parsers + config section. + + +

+ Spring.NET allows the registration of custom configuration parsers that + can be used to create simplified configuration schemas that better + describe object definitions. +

+

+ For example, Spring.NET uses this facility internally in order to + define simplified schemas for various AOP, Data and Services definitions. +

+
+ +

+ The following example shows how to configure both this section handler + and how to define custom configuration parsers within a Spring.NET + config section. +

+ + + + +
+ + + + + + + ... + + ... + + + + + Aleksandar Seovic + + + + + Registers parsers specified in the (recommended, Spring.NET standard) + parsers config section with the . + + + The configuration settings in a corresponding parent + configuration section. + + + The configuration context when called from the ASP.NET + configuration system. Otherwise, this parameter is reserved and + is . + + + The for the section. + + + This method always returns , because parsers + are registered as a side-effect of this object's execution and there + is thus no need to return anything. + + + + + An that doesn't do a whole lot. + + +

+ is an implementation of + the NullObject pattern. It should be used in those situations where a + needs to be passed (say to a + method) but where the resolution of messages is not required. +

+

+ There should not (typically) be a need to instantiate instances of this class; + does not maintan any state + and the instance is + thus safe to pass around. +

+
+ Aleksandar Seovic +
+ + + The canonical instance of the + class. + + + + + Creates a new instance of the class. + + +

+ Consider using + instead. +

+
+
+ + + Simply returns the supplied message as-is. + + The code of the message to resolve. + + The to resolve the + code for. + + + The supplied message as-is. + + + + + Always returns . + + The code of the object to resolve. + + The to resolve the + code for. + + + (always). + + + + + Does nothing. + + + An object that contains the property values to be applied. + + + The base name of the object to use for key lookup. + + + The with which the + resource is associated. + + + + + Handler for Spring.NET resourceHandlers config section. + + +

+ Spring allows registration of custom resource handlers that can be used to load + object definitions from. +

+

+ For example, if you wanted to store your object definitions in a database instead + of in the config file, you could write a custom implementation + and register it with Spring using 'db' as a protocol name. +

+

+ Afterwards, you would simply specify resource URI within the context config element + using your custom resource handler. +

+
+ +

+ The following example shows how to configure both this section handler, + how to define custom resource within Spring config section, and how to load + object definitions using custom resource handler: +

+ + + + +
+ + + + + + + + + + + + + + Aleksandar Seovic + + + + + Registers resource handlers that are specified in + the resources config section with the . + + + The configuration settings in a corresponding parent + configuration section. Ignored. + + + The configuration context when called from the ASP.NET + configuration system. Otherwise, this parameter is reserved and + is . + + + The for the section. + + + This method always returns null, because resource handlers are registered + as a sideffect of its execution and there is no need to return anything. + + + + + An implementation that + accesses resources from .resx / .resource files. + + Note that for the method + GetResourceObject if the resource name resolves to null, then in + .NET 1.1 the return value will be String.Empty whereas + in .NET 2.0 it will return null. + Griffin Caprio (.NET) + Mark Pollack (.NET) + Aleksandar Seovic (.NET) + + + + Defines a simple initialization callback for objects that need to to some + post-initialization logic after all of their dependencies have been injected. + + +

+ An implementation of the + + method might perform some additional custom initialization (over and above that + performed by the constructor), or merely check that all mandatory properties + have been set (this last example is a very typical use case of this interface). +

+ + The use of the + interface + by non-Spring.NET framework code can be avoided (and is generally + discouraged). The Spring.NET container provides support for a generic + initialization method given to the object definition in the object + configuration store (be it XML, or a database, etc). This requires + slightly more configuration (one attribute-value pair in the case of + XML configuration), but removes any dependency on Spring.NET from the + class definition. + +
+ Rod Johnson + Rick Evans (.NET) + +
+ + + Invoked by an + after it has injected all of an object's dependencies. + + +

+ This method allows the object instance to perform the kind of + initialization only possible when all of it's dependencies have + been injected (set), and to throw an appropriate exception in the + event of misconfiguration. +

+

+ Please do consult the class level documentation for the + interface for a + description of exactly when this method is invoked. In + particular, it is worth noting that the + + and + callbacks will have been invoked prior to this method being + called. +

+
+ + In the event of misconfiguration (such as the failure to set a + required property) or if initialization fails. + +
+ + + Creates a new instance of the + class. + + + + + Resolves a given code by searching through each assembly name in + the base names array. + + The code to resolve. + + The to use for lookups. + + The message from the resource set. + + + + Resolves a given code by searching through each assembly name in the array. + + The code to resolve. + + The to use for lookups. + + The object from the resource set. + + + + Uses a System.ComponentModel.ComponentResourceManager + to apply resources to object properties. + Resource key names are of the form objectName.propertyName + + + This feature is not currently supported on version 1.0 of the .NET platform. + + + An object that contains the property values to be applied. + + + The base name of the object to use for the key lookup. + + + The to use for lookups. + If , uses the + value. + + + This feature is not currently supported on version 1.0 of the .NET platform. + + + + + Resolves a code into an object given a base name. + + The to search. + The code to resolve. + + The to use for lookups. + + The object from the resource file. + + + + Returns a representation of the + . + + A representation of the + . + + + + Invoked by an + after it has set all object properties supplied. + + +

+ The list may contain objects of type or + . types + are converted to instances using the notation + resourcename, assembly partial name. +

+
+ + If the conversion from a to a + can't be performed. + +
+ + + The collection of s + in this . + + + + + that allows concrete registration of + objects and messages in code, rather than from external configuration sources. + + +

+ Mainly useful for testing. +

+
+ Rod Johnson + Griffin Caprio (.NET) +
+ + + Creates a new instance of the StaticApplicationContext class. + + + + + Creates a new instance of the StaticApplicationContext class. + + The parent application context. + + + + Creates a new, named instance of the StaticApplicationContext class. + + the context name + The parent application context. + + + + Do nothing: we rely on callers to update our public methods. + + + + + Register a singleton object with the default object factory. + + The name of the object. + The of the object. + The property values for the singleton instance. + + + + Registers a prototype object with the default object factory. + + The name of the prototype object. + The of the prototype object. + The property values for the prototype instance. + + + + Associate the given message with the given code. + + The lookup code. + + The that the message should be found within. + + The message associated with the lookup code. + + + + Simple implementation of + that allows messages to be held in an object and added programmatically. + + +

+ Mainly useful for testing. +

+

+ This supports internationalization. +

+
+ Rod Johnson + Juergen Hoeller + Griffin Caprio (.NET) + +
+ + + Creates a new instance of the + class. + + + + + Returns a format string. + + The code of the message to resolve. + + The to resolve the + code for. + + + A format string or if not found. + + + + + + Resolves an object (typically an icon or bitmap). + + The code of the object to resolve. + + The to resolve the + code for. + + + The resolved object or if not found. + + + + + + Applies resources to object properties. + + +

+ Uses a System.ComponentModel.ComponentResourceManager + internally to apply resources to object properties. Resource key + names are of the form objectName.propertyName. +

+

+ This feature is not currently supported on version 1.0 of the .NET platform. +

+
+ + An object that contains the property values to be applied. + + + The base name of the object to use for key lookup. + + + The with which the + resource is associated. + + + This feature is not currently supported on version 1.0 of the .NET platform. + + +
+ + + Associate the supplied with the + supplied . + + The lookup code. + + The to resolve the + code for. + + + The message format associated with this lookup code. + + + + + Associate the supplied with the + supplied . + + The lookup code. + + The to resolve the + code for. + + + The object associated with this lookup code. + + + + + Returns a representation of this + message source. + + + A containing all of this message + source's messages. + + + + + Configuration section handler for the Spring.NET typeAliases + config section. + + +

+ Type aliases can be used instead of fully qualified type names anywhere + a type name is expected in a Spring.NET configuration file. +

+

+ This includes type names specified within an object definition, as well + as values of the properties or constructor arguments that expect + instances. +

+
+ +

+ The following example shows how to configure both this section handler and + how to define type aliases within a Spring.NET config section: +

+ + + + +
+ + + + + + + ... + + ... + + + + + Aleksandar Seovic + + + + + Populates using values specified in + the typeAliases config section. + + + The configuration settings in a corresponding parent + configuration section. + + + The configuration context when called from the ASP.NET + configuration system. Otherwise, this parameter is reserved and + is . + + + The for the section. + + + This method always returns , because the + is populated as a side-effect of this + object's execution and thus there is no need to return anything. + + + + + Configuration section handler for the Spring.NET typeConverters + config section. + + +

+ Type converters are used to convert objects from one type into another + when injecting property values, evaluating expressions, performing data + binding, etc. +

+

+ They are a very powerful mechanism as they allow Spring.NET to automatically + convert string-based property values from the configuration file into the appropriate + type based on the target property's type or to convert string values submitted + via a web form into a type that is used by your data model when Spring.NET data + binding is used. Because they offer such tremendous help, you should always provide + a type converter implementation for your custom types that you want to be able to use + for injected properties or for data binding. +

+

+ The standard .NET mechanism for specifying type converter for a particular type is + to decorate the type with a , passing the type + of the -derived class as a parameter. +

+

+ This mechanism will still work and is a preferred way of defining type converters if + you control the source code for the type that you want to define a converter for. However, + this configuration section allows you to specify converters for the types that you don't + control and it also allows you to override some of the standard type converters, such as + the ones that are defined for some of the types in the .NET Base Class Library. +

+
+ +

+ The following example shows how to configure both this section handler and + how to define type converters within a Spring.NET config section: +

+ + + + +
+ + + + + + + ... + + ... + + + + + Aleksandar Seovic + + + + + Populates using values specified in + the typeConverters config section. + + + The configuration settings in a corresponding parent + configuration section. + + + The configuration context when called from the ASP.NET + configuration system. Otherwise, this parameter is reserved and + is . + + + The for the section. + + + This method always returns , because the + is populated as a side-effect of + its execution and thus there is no need to return anything. + + + + + An implementation that + reads context definitions from XML based resources. + + +

+ Currently, the resources that are supported are the file, + http, ftp, config and assembly resource + types. +

+

+ You can provide custom implementations of the + interface and and register them + with any that inherits + from the + + interface. +

+ + In case of multiple config locations, later object definitions will + override ones defined in previously loaded resources. This can be + leveraged to deliberately override certain object definitions via an + extra XML file. + +
+ +

+ Find below some examples of instantiating an + using a + variety of different XML resources. +

+ + // an XmlApplicationContext that reads its object definitions from an + // XML file that has been embedded in an assembly... + IApplicationContext context = new XmlApplicationContext + ( + "assembly://AssemblyName/NameSpace/ResourceName" + ); + + // an XmlApplicationContext that reads its object definitions from a + // number of disparate XML resources... + IApplicationContext context = new XmlApplicationContext + ( + // from an XML file that has been embedded in an assembly... + "assembly://AssemblyName/NameSpace/ResourceName", + // and from a (relative) filesystem-based resource... + "file://Objects/services.xml", + // and from an App.config / Web.config resource... + "config://spring/objects" + ); + +
+ Rod Johnson + Juergen Hoeller + Griffin Caprio (.NET) + + + +
+ + + Creates a new instance of the + class, + loading the definitions from the supplied XML resource locations. + + The created context will be case sensitive. + + Any number of XML based object definition resource locations. + + + + + Creates a new instance of the + class, + loading the definitions from the supplied XML resource locations. + + Flag specifying whether to make this context case sensitive or not. + + Any number of XML based object definition resource locations. + + + + + Creates a new instance of the + class, + loading the definitions from the supplied XML resource locations. + + The application context name. + Flag specifying whether to make this context case sensitive or not. + + Any number of XML based object definition resource locations. + + + + + Creates a new instance of the + class, + loading the definitions from the supplied XML resource locations, + with the given . + + + The parent context (may be ). + + + Any number of XML based object definition resource locations. + + + + + Creates a new instance of the + class, + loading the definitions from the supplied XML resource locations, + with the given . + + Flag specifying whether to make this context case sensitive or not. + + The parent context (may be ). + + + Any number of XML based object definition resource locations. + + + + + Creates a new instance of the + class, + loading the definitions from the supplied XML resource locations, + with the given . + + The application context name. + Flag specifying whether to make this context case sensitive or not. + + The parent context (may be ). + + + Any number of XML based object definition resource locations. + + + + + Creates a new instance of the + class, + loading the definitions from the supplied XML resource locations, + with the given . + + + This constructor is meant to be used by derived classes. By passing =false, it is + the responsibility of the deriving class to call to initialize the context instance. + + if true, is called automatically. + The application context name. + Flag specifying whether to make this context case sensitive or not. + + The parent context (may be ). + + + Any number of XML based object definition resource locations. + + + + + An array of resource locations, referring to the XML object + definition files that this context is to be built with. + + + An array of resource locations, or if none. + + + + + Exception thrown during application context initialization. + Rod Johnson + Mark Pollack (.NET) + + + + Thrown on an unrecoverable problem encountered in the + objects namespace or sub-namespaces, e.g. bad class or field. + + Rod Johnson + Mark Pollack (.NET) + + + + Superclass for all exceptions thrown in the Objects namespace and sub-namespaces. + + Rod Johnson + Mark Pollack (.NET) + + + Creates a new instance of the ObjectsException class. + + + + Creates a new instance of the ObjectsException class. with the specified message. + + + A message about the exception. + + + + + Creates a new instance of the ObjectsException class with the specified message + and root cause. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectsException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Creates a new instance of the FatalObjectException class. + + + + + Creates a new instance of the FatalObjectException class with the + specified message. + + + A message about the exception. + + + + + Creates a new instance of the FatalObjectException class with the + specified message. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the FatalObjectException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Creates a new instance of the + class with the + specified message. + + + A message about the exception. + + + + + Creates a new instance of the + class with the + specified message. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Marks an interface as being an application event listener. + + Griffin Caprio + + + + + Creates a new instance of the + class. + + + + + The callback for application events. + + + + + To be implemented by any object that wishes to be notified + of the associated with it. + + +

+ In the current implementation, the + will typically be the + associated that + spawned the implementing object. +

+

+ The can usually also be + passed on as an object reference to arbitrary object properties or + constructor arguments, because a + is typically defined as an + object with the well known name "messageSource" in the + associated application context. +

+
+ Juergen Hoeller + Rick Evans (.NET) + +
+ + + Sets the associated + with this object. + + +

+ Invoked after population of normal object properties but + before an initializing callback such as the + + method of the + interface + or a custom init-method. +

+

+ It is also invoked before the + + property of any + + implementation. +

+
+ + The associated + with this object. + +
+ + + Interface to be implemented by any object that wishes to be notified + of the (typically the + ) that it runs in. + + +

+ Note that dependencies can also + be exposed as object properties of type + , populated via strings with + automatic type conversion by the object factory. This obviates the + need for implementing any callback interface just for the purpose of + accessing a specific resource. +

+

+ You typically need an + when your application object has to access a variety of file resources + whose names are calculated. A good strategy is to make the object use + a default resource loader but still implement the + interface to allow + for overriding when running in an + . +

+
+ Juergen Hoeller + Mark Pollack (.NET) + + + +
+ + + Sets the + that this object runs in. + + +

+ Invoked after population of normal objects properties but + before an init callback such as + 's + + or a custom init-method. Invoked before setting + 's + + property. +

+
+
+ + + Thrown when a message cannot be resolved. + + Rod Johnson + Mark Pollack (.NET) + + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class with the + specified message. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the + class. + + + The + that holds the serialized object data about the exception being + thrown. + + + The + that contains contextual information about the source or + destination. + + + + + Creates a new instance of the + class. + + + The code that could not be resolved for given culture. + + + The that was used + to search for the code. + + + + + Creates a new instance of the + class. + + + The code that could not be resolved for the current UI culture. + + + + + Convenience base class for + implementations, pre-implementing typical behavior. + + +

+ The method will + check whether a or + can be opened; + will always return + ; + and + throw an exception; + and will + return the value of the + property. +

+
+ Juergen Hoeller + Rick Evans (.NET) + Aleksandar Seovic (.NET) + +
+ + + The central abstraction for Spring.NET's access to resources such as + s. + + +

+ This interface encapsulates a resource descriptor that abstracts away + from the underlying type of resource; possible resource types include + files, memory streams, and databases (this list is not exhaustive). +

+

+ A can definitely be opened and accessed + for every such resource; if the resource exists in a physical form (for + example, the resource is not an in-memory stream or one that has been + extracted from an assembly or ZIP file), a or + can also be accessed. The actual + behavior is implementation-specific. +

+

+ This interface, when used in tandem with the + interface, forms the backbone of + Spring.NET's resource handling. Third party extensions or libraries + that want to integrate external resources with Spring.NET's IoC + container are encouraged expose such resources via this abstraction. +

+

+ Interfaces cannot obviously mandate implementation, but derived classes + are strongly encouraged to expose a constructor that takes a + single as it's sole argument (see example). + Exposing such a constructor will make your custom + implementation integrate nicely + with the class. +

+
+ Juergen Hoeller + Rick Evans (.NET) + + +
+ + + Simple interface for objects that are sources for + s. + + +

+ This is the base interface for the abstraction encapsulated by + Spring.NET's interface. +

+
+ Juergen Hoeller + Rick Evans (.NET) + +
+ + + Return an for this resource. + + + + Clients of this interface must be aware that every access of this + property will create a fresh ; + it is the responsibility of the calling code to close any such + . + + + + An . + + + If the stream could not be opened. + + + + + Creates a resource relative to this resource. + + + The path (always resolved as relative to this resource). + + + The relative resource. + + + If the relative resource could not be created from the supplied + path. + + + If the resource does not support the notion of a relative path. + + + + + Does this resource represent a handle with an open stream? + + +

+ If , the + cannot be read multiple times, and must be read and then closed to + avoid resource leaks. +

+

+ Will be for all usual resource descriptors. +

+
+ + if this resource represents a handle with an + open stream. + + +
+ + + Returns the handle for this resource. + + +

+ For safety, always check the value of the + property prior to + accessing this property; resources that cannot be exposed as + a will typically return + from a call to the + property. +

+
+ + The handle for this resource. + + + If the resource is not available or cannot be exposed as a + . + + + +
+ + + Returns a handle for this resource. + + +

+ For safety, always check the value of the + property prior to + accessing this property; resources that cannot be exposed as + a will typically return + from a call to the + property. +

+
+ + The handle for this resource. + + + If the resource is not available on a filesystem, or cannot be + exposed as a handle. + + + +
+ + + Returns a description for this resource. + + +

+ The description is typically used for diagnostics and other such + logging when working with the resource. +

+

+ Implementations are also encouraged to return this value from their + method. +

+
+ + A description for this resource. + +
+ + + Does this resource actually exist in physical form? + + +

+ An example of a resource that physically exists would be a + file on a local filesystem. An example of a resource that does not + physically exist would be an in-memory stream. +

+
+ + if this resource actually exists in physical + form (for example on a filesystem). + + + +
+ + + The default special character that denotes the base (home, or root) + path. + + +

+ Will be resolved (by those + implementations that support it) to the home (or root) path for + the specific implementation. +

+

+ For example, in the case of a web application this will (probably) + resolve to the virtual directory of said web application. +

+
+
+ + + Creates a new instance of the + class. + + +

+ This is an class, and as such exposes no + public constructors. +

+
+
+ + + Creates a new instance of the + class. + + +

+ This is an class, and as such exposes no + public constructors. +

+
+ + A string representation of the resource. + + + If the supplied is + or contains only whitespace character(s). + +
+ + + Strips any protocol name from the supplied + . + + +

+ If the supplied does not + have any protocol associated with it, then the supplied + will be returned as-is. +

+
+ + + GetResourceNameWithoutProtocol("http://www.mycompany.com/resource.txt"); + // returns www.mycompany.com/resource.txt + + + + The name of the resource. + + + The name of the resource without the protocol name. + +
+ + + Resolves the supplied to its value + sans any leading protocol. + + + The name of the resource. + + + The name of the resource without the protocol name. + + + + + + Resolves the presence of the + value + in the supplied into a path. + + +

+ The default implementation simply returns the supplied + as is. +

+
+ + The name of the resource. + + + The string that is a placeholder for a base path. + + + The name of the resource with any + value having been resolved into an actual path. + +
+ + + This implementation returns the + of this resource. + + + + + + Determines whether the specified is + equal to the current . + + +

+ This implementation compares values. +

+
+ +
+ + + Serves as a hash function for a particular type, suitable for use + in hashing algorithms and data structures like a hash table. + + +

+ This implementation returns the hashcode of the + property. +

+
+ +
+ + + Factory Method. Create a new instance of the current resource type using the given resourceName + + + + + The ResourceLoader to be used for resolving relative resources + + + + + Does the supplied relative ? + + + The name of the resource to test. + + + if resource name is relative; + otherwise . + + + + + Creates a new resource that is relative to this resource based on the + supplied . + + +

+ This method can accept either a fully qualified resource name or a + relative resource name as it's parameter. +

+

+ A fully qualified resource is one that has a protocol prefix and + all elements of the resource name. All other resources are treated + as relative to this resource, and the following rules are used to + locate a relative resource: +

+ + + If the starts with '..', + the current resource path is navigated backwards before the + is concatenated to the current + of + this resource. + + + If the starts with '/', the + current resource path is ignored and a new resource name is + appended to the + of + this resource. + + + If the starts with '.' or a + letter, a new path is appended to the current + of + this resource. + + +
+ + The name of the resource to create. + + The relative resource. + + If the process of resolving the relative resource yielded an + invalid URI. + + + If this resource does not support the resolution of relative + resources (as determined by the value of the + + property). + + +
+ + + Calculates a new resource path based on the supplied + . + + + The relative path to evaluate. + + The newly calculated resource path. + + + + The special character that denotes the base (home, or root) + path. + + +

+ Will be resolved (by those + implementations that support it) to the home (or root) path for + the specific implementation. +

+

+ For example, in the case of a web application this will (probably) + resolve to the virtual directory of said web application. +

+
+ +
+ + + Return an for this resource. + + + An . + + + If the stream could not be opened. + + + + + + Returns a description for this resource. + + + A description for this resource. + + + + + + Returns the protocol associated with this resource (if any). + + +

+ The value of this property may be if no + protocol is associated with the resource type (for example if the + resource is a memory stream). +

+
+ + The protocol associated with this resource (if any). + +
+ + + Does this resource represent a handle with an open stream? + + +

+ This, the default implementation, always returns + . +

+
+ + if this resource represents a handle with an + open stream. + + +
+ + + Returns the handle for this resource. + + + + + + Returns a handle for this resource. + + +

+ This, the default implementation, always throws a + , assuming that the + resource cannot be resolved to an absolute file path. +

+
+ + The handle for this resource. + + + This implementation always throws a + . + + + +
+ + + Does this resource actually exist in physical form? + + +

+ This implementation checks whether a + can be opened, falling back to whether a + can be opened. +

+

+ This will cover both directories and content resources. +

+

+ This implementation will also return if + permission to the (file's) path is denied. +

+
+ + if this resource actually exists in physical + form (for example on a filesystem). + + + +
+ + + Does this support relative + resource retrieval? + + +

+ This property is generally to be consulted prior to attempting + to attempting to access a resource that is relative to this + resource (via a call to + ). +

+

+ This, the default implementation, always returns + . +

+
+ + if this + supports relative resource + retrieval. + +
+ + + Gets the root location of the resource. + + +

+ Where root resource can be taken to mean that part of the resource + descriptor that doesn't change when a relative resource is looked + up. Examples of such a root location would include a drive letter, + a web server name, an assembly name, etc. +

+
+ + The root location of the resource. + + + This, the default implementation, always throws a + . + +
+ + + Gets the current path of the resource. + + +

+ An example value of this property would be the name of the + directory containing a filesystem based resource. +

+
+ + The current path of the resource. + + + This, the default implementation, always throws a + . + +
+ + + Gets those characters that are valid path separators for the + resource type. + + +

+ An example value of this property would be the + and + values for a + filesystem based resource. +

+

+ Any derived classes that override this method are expected to + return a new array for each access of this property. +

+
+ + Those characters that are valid path separators for the resource + type. + + + This, the default implementation, always throws a + . + +
+ + + An implementation for + resources stored within assemblies. + + +

+ This implementation expects any resource name passed to the + constructor to adhere to the following format: +

+

+ assembly://assemblyName/namespace/resourceName +

+
+ Aleksandar Seovic (.NET) + Federico Spinazzi (.NET) +
+ + + Creates a new instance of the + class. + + + The name of the assembly resource. + + + If the supplied did not conform + to the expected format. + + + If the assembly specified in the supplied + was loaded twice with two + different evidences. + + + If the assembly specified in the supplied + could not be found. + + + If the caller does not have the required permission to load + the assembly specified in the supplied + . + + + + + + Does the supplied relative ? + + + The name of the resource to test. + + + if resource name is relative; + otherwise . + + + + + Return an for this resource. + + + An . + + + If the stream could not be opened. + + + If the caller does not have the required permission to load + the underlying assembly's manifest. + + + + + + + Does the embedded resource specified in the value passed to the + constructor exist? + + + if this resource actually exists in physical + form (for example on a filesystem). + + + + + + + + Does this support relative + resource retrieval? + + +

+ This implementation does support relative resource retrieval, and + so will always return . +

+
+ + if this + supports relative resource + retrieval. + + +
+ + + Gets the root location of the resource (the assembly name in this + case). + + + The root location of the resource. + + + + + + Gets the current path of the resource (the namespace in which the + target resource was embedded in this case). + + + The current path of the resource. + + + + + + Gets those characters that are valid path separators for the + resource type. + + + Those characters that are valid path separators for the resource + type. + + + + + + Returns a description for this resource. + + + A description for this resource. + + + + + + Returns the handle for this resource. + + + + + + Used when retrieving information from the standard .NET configuration + files (App.config / Web.config). + + +

+ If created with the name of a configuration section, then all methods + aside from the description return , + , or throw an exception. If created with an + , then the + property + will return a corresponding to parse. +

+
+ Mark Pollack + Rick Evans +
+ + + Creates new instance of the + class. + + + The actual XML configuration section. + + + If the supplied is . + + + + + Creates new instance of the + class. + + + The name of the configuration section. + + + If the supplied is + or contains only whitespace character(s). + + + + + Returns the handle for this resource. + + +

+ This implementation always returns . +

+
+ + . + + +
+ + + Returns a handle for this resource. + + +

+ This implementation always returns . +

+
+ + . + + +
+ + + Returns a description for this resource (the name of the + configuration section in this case). + + + A description for this resource. + + + + + + Does this resource actually exist in physical form? + + +

+ This implementation always returns . +

+
+ + + + + +
+ + + Return an for this resource. + + + An . + + + If the stream could not be opened. + + + + + + Exposes the actual for the + configuration section. + + +

+ Introduced to accomodate line info tracking during parsing. +

+
+
+ + + Holder that combines with a specific encoding to be used for reading + from the resource + + Juergen Hoeller + Erich Eichinger (.NET) + + + + Create an encoded resource, autodetecting the encoding from the resource stream. + + + + + + Create an encoded resource, autodetecting the encoding from the resource stream. + + the resource to read from. Must not be null + whether to autoDetect encoding from byte-order marks () + + + + Create an encoded resource using the specified encoding. + + the resource to read from. Must not be null + the encoding to use. If null, encoding will be autodetected. + whether to autoDetect encoding from byte-order marks () + + + + + + + + + + Determine whether equals this instance. + + + true if obj is an and both + , and are equal. + + + + + Calculate the unique hash code for this instance. + + + + + + Get a textual description of the resource. + + + + + Get the underlying resource + + + + + Get the encoding to use for reading, if any. May be null + + + + + whether to autoDetect encoding from byte-order marks () + + + + + A backed resource. + + +

+ Supports resolution as both a and a + . +

+

+ Also supports the use of the ~ character. If the ~ character + is the first character in a resource path (sans protocol), the ~ + character will be replaced with the value of the + System.AppDomain.CurrentDomain.BaseDirectory property (an example of + this can be seen in the examples below). +

+
+ +

+ Consider the example of an application that is running (has been launched + from) the C:\App\ directory. The following resource paths will map + to the following resources on the filesystem... +

+ + strings.txt C:\App\strings.txt + ~/strings.txt C:\App\strings.txt + file://~/strings.txt C:\App\strings.txt + file://~/../strings.txt C:\strings.txt + ../strings.txt C:\strings.txt + ~/../strings.txt C:\strings.txt + + // note that only a leading ~ character is resolved to the executing directory... + stri~ngs.txt C:\App\stri~ngs.txt + +
+ Juergen Hoeller + Leonardo Susatyo (.NET) + Aleksandar Seovic (.NET) +
+ + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The name of the file system resource. + + + If the supplied is + or contains only whitespace character(s). + + + + + Creates a new instance of the + class. + + + The name of the file system resource. + + + Supresses initialization of this instance. Used from derived classes. + + + If the supplied is + or contains only whitespace character(s). + + + + + Initializes this instance. + + + + + + Resolves the handle + for the supplied . + + + The name of the file system resource. + + + The handle for this resource. + + + + + Resolves the root location for the supplied . + + + The name of the file system resource. + + + The root location of the resource. + + + + + Resolves the path for the supplied . + + + The name of the file system resource. + + + The current path of the resource. + + + + + Resolves the presence of the + value + in the supplied into a path. + + + The name of the resource. + + + The string that is a placeholder for a base path. + + + The name of the resource with any + value having been resolved into an actual path. + + + + + Does the supplied relative ? + + + The name of the resource to test. + + + if resource name is relative; + otherwise . + + + + + Returns the underlying handle for + this resource. + + + The handle for this resource. + + + + + + Does this support relative + resource retrieval? + + +

+ This implementation does support relative resource retrieval, and + so will always return . +

+
+ + if this + supports relative resource + retrieval. + + +
+ + + Gets the root location of the resource (a drive or UNC file share + name in this case). + + + The root location of the resource. + + + + + + Gets the current path of the resource. + + + The current path of the resource. + + + + + + Gets those characters that are valid path separators for the + resource type. + + + Those characters that are valid path separators for the resource + type. + + + + + + + Return an for this resource. + + + An . + + + If the stream could not be opened. + + + If the underlying file could not be found. + + + + + + Returns a description for this resource. + + + A description for this resource. + + + + + + Returns the handle for this resource. + + + The handle for this resource. + + + If the resource is not available or cannot be exposed as a + . + + + + + + adapter implementation for a + . + + +

+ Should only be used if no other + implementation is applicable. +

+

+ In contrast to other + implementations, this is an adapter for an already opened + resource - the + therefore always returns . Do not use this class + if you need to keep the resource descriptor somewhere, or if you need + to read a stream multiple times. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Creates a new instance of the + class. + + + The input to use. + + + Where the input comes from. + + + If the supplied is + . + + + + + The input to use. + + + If the underlying has already + been read. + + + + + Returns a description for this resource. + + + A description for this resource. + + + + + + This implementation always returns true + + + + + This implemementation always returns true + + + + + Custom type converter for instances. + + +

+ A resource path may contain placeholder variables of the form ${...} + that will be expended to environment variables. +

+

+ Currently only supports conversion from a + instance. +

+
+ +

+ On Win9x boxes, this resource path, ${userprofile}\objects.xml will + be expanded at runtime with the value of the 'userprofile' environment + variable substituted for the '${userprofile}' portion of the path. +

+ + // assuming a user called Rick, running on a plain vanilla Windows XP setup... + // this resource path... + + ${userprofile}\objects.xml + + // will become (after expansion)... + + C:\Documents and Settings\Rick\objects.xml + +
+ Mark Pollack + + +
+ + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class using the specified resourceLoader. + + the underlying IResourceLoader to be used to resolve resources + + + + Returns whether this converter can convert an object of one + to a + + + A + that provides a format context. + + + A that represents the + you want to convert from. + + + if the conversion is possible. + + + + + Convert from a string value to a + instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + An if successful. + + + If the resource name objectained form the supplied + is malformed. + + + In the case of any errors arising from the instantiation of the + returned instance. + + + + + Resolve the given path, replacing placeholder values with + corresponding property values if necessary. + + +

+ This implementation resolves environment variables only. +

+
+ The original resource path. + The resolved resource path. +
+ + + Return the used to + resolve the string. + + + The used to resolve + the string. + + + + + Registry class that allows users to register and retrieve protocol handlers. + + + + Resource handler is an implementation of interface + that should be used to process resources with the specified protocol. + + + They are used throughout the framework to access resources from various + sources. For example, application context loads object definitions from the resources + that are processed using one of the registered resource handlers. + + Following resource handlers are registered by default: + + + Protocol + Handler Type + Description + + + config + + Resolves the resources by loading specified configuration section from the standard .NET config file. + + + file + + Resolves filesystem resources. + + + http + + Resolves remote web resources. + + + https + + Resolves remote web resources via HTTPS. + + + ftp + + Resolves ftp resources. + + + assembly + + Resolves resources that are embedded into an assembly. + + + web + Spring.Core.IO.WebResource, Spring.Web* + Resolves resources relative to the web application's virtual directory. + + + * only available in web applications. + + Users can create and register their own protocol handlers by implementing interface + and mapping custom protocol name to that implementation. See for details + on how to register custom protocol handler. + + + Aleksandar Seovic + + + + Name of the .Net config section that contains definitions + for custom resource handlers. + + + + + Registers standard and user-configured resource handlers. + + + + + Returns resource handler for the specified protocol name. + + + + This method returns object that should be used + to create an instance of the -derived type by passing + resource location as a parameter. + + + Name of the protocol to get the handler for. + Resource handler constructor for the specified protocol name. + If is null. + + + + Returns true if a handler is registered for the specified protocol, + false otherwise. + + Name of the protocol. + + true if a handler is registered for the specified protocol, false otherwise. + + If is null. + + + + Registers resource handler and maps it to the specified protocol name. + + +

+ If the mapping already exists, the existing mapping will be + silently overwritten with the new mapping. +

+
+ + The protocol to add (or override). + + + The type name of the concrete implementation of the + interface that will handle + the specified protocol. + + + If the supplied is + or contains only whitespace character(s); or + if the supplied is + . + + + If the supplied is not a + that derives from the + interface; or (having passed + this first check), the supplied + does not expose a constructor that takes a single + parameter. + +
+ + + Registers resource handler and maps it to the specified protocol name. + + +

+ If the mapping already exists, the existing mapping will be + silently overwritten with the new mapping. +

+
+ + The protocol to add (or override). + + + The concrete implementation of the + interface that will handle + the specified protocol. + + + If the supplied is + or contains only whitespace character(s); or + if the supplied is + . + + + If the supplied is not a + that derives from the + interface; or (having passed + this first check), the supplied + does not expose a constructor that takes a single + parameter. + +
+ + + Allows to create any arbitrary Url format + + + + + A adapter implementation encapsulating a simple string. + + Erich Eichinger + + + + Creates a new instance of the class. + + + + + Creates a new instance of the class. + + + + + Creates a new instance of the class. + + + + + Get the to + for accessing this resource. + + + + + Returns a description for this resource. + + + A description for this resource. + + + + + + This implementation always returns true + + + + + This implemementation always returns true + + + + + Gets the encoding used to create a byte stream of the string. + + + + + Gets the content encapsulated by this . + + + + + A backed resource + on top of + + +

+ Obviously supports resolution as a , and also + as a in the case of the "file:" + protocol. +

+
+ +

+ Some examples of the strings that can be used to initialize a new + instance of the class + include... + + + file:///Config/objects.xml + + + http://www.mycompany.com/services.txt + + +

+
+ Juergen Hoeller + Leonardo Susatyo (.NET) + Aleksandar Seovic (.NET) + + + +
+ + + Creates a new instance of the + class. + + +

+ Some examples of the values that the + can typically be expected to hold include... + + + file:///Config/objects.xml + + + http://www.mycompany.com/services.txt + + +

+
+ + A string representation of the resource. + +
+ + + Does the supplied relative ? + + + The name of the resource to test. + + + if resource name is relative; + otherwise . + + + + + Returns the instance + used for the resource resolution. + + + A instance. + + + + + + + Return an for this resource. + + + An . + + + If the stream could not be opened. + + + + + + Returns the handle for this resource. + + + The handle for this resource. + + + If the resource is not available or cannot be exposed as a + . + + + + + + Returns a handle for this resource. + + + The handle for this resource. + + + If the resource is not available on a filesystem. + + + + + + Does this support relative + resource retrieval? + + +

+ This implementation does support relative resource retrieval, and + so will always return . +

+
+ + if this + supports relative resource + retrieval. + + +
+ + + Gets the root location of the resource. + + + The root location of the resource. + + + + + + Gets the current path of the resource. + + + The current path of the resource. + + + + + + Gets those characters that are valid path separators for the + resource type. + + + Those characters that are valid path separators for the resource + type. + + + + + + Returns a description for this resource. + + + A description for this resource. + + + + + + Converts string representation of a credential for Web client authentication + into an instance of . + + +

+ Find below some examples of the XML formatted strings that this + converter will sucessfully convert. +

+ + + + + + +
+ Bruno Baia +
+ + + Can we convert from the sourcetype + to a instance ? + + +

+ Currently only supports conversion from a instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + if the conversion is possible. +
+ + + Convert from a value to an + instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A instance if successful. + + + + + A custom for any + primitive numeric type such as , + , , etc. + + +

+ Can use a given for + (locale-specific) parsing and rendering. +

+

+ This is not meant to be used as a system + but rather as a + locale-specific number converter within custom controller code, to + parse user-entered number strings into number properties of objects, + and render them in a UI form. +

+
+ Juergen Hoeller + Simon White (.NET) +
+ + + Creates a new instance of the + class. + + + The primitive numeric to convert to. + + + The to use for + (locale-specific) parsing and rendering + + + Is an empty string allowed to be converted? If + , an empty string value will be converted to + numeric 0. + + Id the supplied is not a primitive + . + + + + + + Returns whether this converter can convert an object of one + to a + + +

+ Currently only supports conversion from a + instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + + if the conversion is possible. + +
+ + + Converts the specified object (a string) to the required primitive + type. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + A primitive representation of the string value. + + + + Converter for instances. + + Juergen Hoeller + Mark Pollack (.NET) + + + + Creates a new instance of the + class. + + + + + Returns whether this converter can convert an object of one + to a + + +

+ Currently only supports conversion from a + instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + True if the conversion is possible. +
+ + + Convert from a string value to a instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A if successful. + + + + + Custom implementation for + objects. + + +

+ Handles conversion from an XML formatted string to a + object + (see below for an example of the expected XML format). +

+

+ This converter must be registered before it will be available. Standard + converters in this namespace are automatically registered by the + class. +

+
+ +

+ Find below some examples of the XML formatted strings that this + converter will sucessfully convert. Note that the name of the top level + (document) element is quite arbitrary... it is only the content that + matters (and which must be in the format + <add key="..." value="..."/>. For your continued sanity + though, you may wish to standardize on the top level name of + 'dictionary' (although you are of course free to not do so). +

+ + + + + + +

+ The following example uses a different top level (document) element + name, but is equivalent to the first example. +

+ + + + + + +
+ Rod Johnson + Juergen Hoeller + Simon White (.NET) +
+ + + Creates a new instance of the + class. + + + + + Returns whether this converter can convert an object of one + to a + + + +

+ Currently only supports conversion from an + XML formatted instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + True if the conversion is possible. +
+ + + Convert from a string value to a + instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A + if successful. + + + + + Converts string representation of a regular expression into an instance of . + + Aleksandar Seovic + + + + Can we convert from the sourcetype to a ? + + +

+ Currently only supports conversion from a instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + if the conversion is possible. +
+ + + Convert from a value to an + instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A if successful. + + + + + Converts string representation of the registry key + into instance. + + Aleksandar Seovic + + + + Can we convert from a the sourcetype to a ? + + +

+ Currently only supports conversion from a instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + if the conversion is possible. +
+ + + Convert from a value to an + instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A array if successful. + + + + + Generates partial registry key name. + + + Key elements. + + + Index of the last element to use. + + + Friendly key name containing key element from + 0 to , inclusive. + + + + + Returns for the specified + root hive name. + + + Root hive name. + + + Registry key for the specified name. + + + + + Converts a two part string, (resource name, assembly name) + to a ResourceManager instance. + + + + + This constant represents the name of the folder/assembly containing global resources. + + + + + Creates a new instance of the + class. + + + + + Returns whether this converter can convert an object of one + to a + + + +

+ Currently only supports conversion from a + instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + True if the conversion is possible. +
+ + + Convert from a string value to a + instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A + if successful. + + If the specified does not denote a valid resource + + + + Converter for from a comma separated + list of RBG values. + + +

+ Please note that this class does not implement converting + to a comma separated list of RBG values from a + . +

+
+ Federico Spinazzi +
+ + + Returns whether this converter can convert an object of one + to a + . + + +

+ Currently only supports conversion from a + instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + if the conversion is possible. +
+ + + Converts the specified object (a string) a + instance. + + + A + that provides a format context. + + + The to use + as the current culture: currently ignored. + + + The value that is to be converted, in "R,G,B", "A,R,G,B", or + symbolic color name (). + + + A representation of the string value. + + + If the input string is not in a supported format, or is not one of the + predefined system colors (). + + + + + A custom for + runtime type references. + + +

+ Currently only supports conversion to and from a + . +

+
+ Rick Evans (.NET) +
+ + + Creates a new instance of the + class. + + + + + Returns whether this converter can convert an object of one + to the + of this converter. + + +

+ Currently only supports conversion from a + instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + True if the conversion is possible. +
+ + + Returns whether this converter can convert the object to the specified + . + + + A + that provides a format context. + + + A that represents the + you want to convert to. + + True if the conversion is possible. + + + + Converts the given value to the type of this converter. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + An that represents the converted value. + + + + + Converts the given value object to the specified type, + using the specified context and culture information. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + The to convert the + parameter to. + + + An that represents the converted value. + + + + + Converter for to directly set a + property. + + Jurgen Hoeller + Mark Pollack (.NET) + + + + Create a new StreamConverter using the default + . + + + + + Create a new StreamConverter using the given + . + + + The to use. + + + + Returns whether this converter can convert an object of one + to a + + +

+ Currently only supports conversion from a + instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + True if the conversion is possible. +
+ + + Convert from a string value to a instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A if successful. + + + + + Converts a separated to a + array. + + +

+ Defaults to using the , (comma) as the list separator. Note that the value + of the current is + not used. +

+

+ If you want to provide your own list separator, you can set the value of the + + property to the value that you want. Please note that this value will be used + for all future conversions in preference to the default list separator. +

+

+ Please note that the individual elements of a string will be passed + through as is (i.e. no conversion or trimming of surrounding + whitespace will be performed). +

+

+ This should be + automatically registered with any + implementations. +

+
+ + + public class StringArrayConverterExample + { + public static void Main() + { + StringArrayConverter converter = new StringArrayConverter(); + + string csvWords = "This,Is,It"; + string[] frankBoothWords = converter.ConvertFrom(csvWords); + + // the 'frankBoothWords' array will have 3 elements, namely + // "This", "Is", "It". + + // please note that extraneous whitespace is NOT trimmed off + // in the current implementation... + string csv = " Cogito ,ergo ,sum "; + string[] descartesWords = converter.ConvertFrom(csv); + + // the 'descartesWords' array will have 3 elements, namely + // " Cogito ", "ergo ", "sum ". + // notice how the whitespace has NOT been trimmed. + } + } + + + +
+ + + Can we convert from a the sourcetype to a array? + + +

+ Currently only supports conversion from a instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + if the conversion is possible. +
+ + + Convert from a value to a + array. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A array if successful. + + + + + The value that will be used as the list separator when performing + conversions. + + + A 'single' string character that will be used as the list separator + when performing conversions. + + + If the supplied value is not and is an empty + string, or has more than one character. + + + + + Base parser for custom specifiers. + + + + + Convert int value to a Timespan based on the specifier + + + + + + + Check if the string contains the specifier and + + + + + + + Specifier + + + + + Recognize 10d as ten days + + + + + Parse value as days + + Timespan in days + + + + + Day specifier: d + + + + + Recognize 10h as ten hours + + + + + Parse value as hours + + Timespan in hours + + + + + Hour specifier: h + + + + + Recognize 10m as ten minutes + + + + + Parse value as minutes + + Timespan in minutes + + + + + Minute specifier: m + + + + + Recognize 10s as ten seconds + + + + + Parse value as seconds + + Timespan in seconds + + + + + Second specifier: s + + + + + Recognize 10ms as ten milliseconds + + + + + Parse value as milliseconds + + Timespan in milliseconds + + + + + Millisecond specifier: ms + + + + + Converter for instances. + + Bruno Baia + Roberto Paterlini + + + + Creates a new instance of the + class. + + + + + Convert from a string value to a instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A if successful. + + + + + Utility methods that are used to convert objects from one type into another. + + Aleksandar Seovic + + + + Convert the value to the required (if necessary from a string). + + The proposed change value. + + The we must convert to. + + Property name, used for error reporting purposes... + + If there is an internal error. + + The new value, possibly the result of type conversion. + + + + Utility method to create a property change event. + + + The full name of the property that has changed. + + The property old value + The property new value + + A new . + + + + + Registry class that allows users to register and retrieve type converters. + + Aleksandar Seovic + + + + Name of the .Net config section that contains Spring.Net type aliases. + + + + + Registers standard and configured type converters. + + + + + Returns for the specified type. + + Type to get the converter for. + a type converter for the specified type. + If is null. + + + + Registers for the specified type. + + Type to register the converter for. + Type converter to register. + If either of arguments is null. + + + + Registers for the specified type. + + + This is a convinience method that accepts the names of both + type to register converter for and the converter itself, + resolves them using , creates an + instance of type converter and calls overloaded + method. + + Type name of the type to register the converter for (can be a type alias). + Type name of the type converter to register (can be a type alias). + If either of arguments is null or empty string. + + If either of arguments fails to resolve to a valid . + + + If type converter does not derive from or if it cannot be instantiated. + + + + + Converts between instances of and their string representations. + + Erich Eichinger + + + + Can we convert from the sourcetype to a ? + + +

+ Currently only supports conversion from a instance. +

+
+ + A that provides a format context. + + + A that represents the you want to convert from. + + if the conversion is possible. +
+ + + Convert from a value to an instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A if successful, otherwise. + + The conversion cannot be performed. + + + + Returns whether this converter can convert the object to the specified type, using the specified context. + + An that provides a format context. + A that represents the type you want to convert to. + + true if this converter can perform the conversion; otherwise, false. + + + At the moment only conversion to string is supported. + + + + + Converts the given value object to the specified type, using the specified context and culture information. + + + + An that represents the converted value. + + + A . If null is passed, the current culture is assumed. + An that provides a format context. + The to convert the value parameter to. + The to convert. + The conversion cannot be performed. + The destinationType parameter is null. + + + + Converter for instances. + + Juergen Hoeller + Mark Pollack (.NET) + + + + Creates a new instance of the + class. + + + + + Returns whether this converter can convert an object of one + to a + + +

+ Currently only supports conversion from a + instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + True if the conversion is possible. +
+ + + Convert from a string value to a instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A if successful. + + + + + Resolves (instantiates) a by it's (possibly + assembly qualified) name, and caches the + instance against the type name. + + Rick Evans + Bruno Baia + Erich Eichinger + + + + Resolves a by name. + + +

+ The rationale behind the creation of this interface is to centralise + the resolution of type names to instances + beyond that offered by the plain vanilla + method call. +

+
+ Rick Evans +
+ + + Resolves the supplied to a + + instance. + + + The (possibly partially assembly qualified) name of a + . + + + A resolved instance. + + + If the supplied could not be resolved + to a . + + + + + The cache, mapping type names ( instances) against + instances. + + + + + Creates a new instance of the class. + + + The that this instance will delegate + actual resolution to if a + cannot be found in this instance's cache. + + + If the supplied is . + + + + + Resolves the supplied to a + + instance. + + + The (possibly partially assembly qualified) name of a + . + + + A resolved instance. + + + If the supplied could not be resolved + to a . + + + + + Holder for the generic arguments when using type parameters. + + +

+ Type parameters can be applied to classes, interfaces, + structures, methods, delegates, etc... +

+
+
+ + + The generic arguments prefix. + + + + + The generic arguments suffix. + + + + + The generic arguments prefix. + + + + + The generic arguments suffix. + + + + + The character that separates a list of generic arguments. + + + + + Creates a new instance of the GenericArgumentsHolder class. + + + The string value to parse looking for a generic definition + and retrieving its generic arguments. + + + + + Returns the array declaration portion of the definition, e.g. "[,]" + + + + + + Returns an array of unresolved generic arguments types. + + +

+ A empty string represents a type parameter that + did not have been substituted by a specific type. +

+
+ + An array of strings that represents the unresolved generic + arguments types or an empty array if not generic. + +
+ + + The (unresolved) generic type name portion + of the original value when parsing a generic type. + + + + + The (unresolved) generic method name portion + of the original value when parsing a generic method. + + + + + Is the string value contains generic arguments ? + + +

+ A generic argument can be a type parameter or a type argument. +

+
+
+ + + Is generic arguments only contains type parameters ? + + + + + Is this an array type definition? + + + + + Resolves a generic by name. + + Bruno Baia + + + + Resolves a by name. + + Rick Evans + Aleksandar Seovic + Bruno Baia + + + + Resolves the supplied to a + instance. + + + The unresolved (possibly partially assembly qualified) name + of a . + + + A resolved instance. + + + If the supplied could not be resolved + to a . + + + + + Uses + to load an and then the attendant + referred to by the + parameter. + + +

+ is + deprecated in .NET 2.0, but is still used here (even when this class is + compiled for .NET 2.0); + will + still resolve (non-.NET Framework) local assemblies when given only the + display name of an assembly (the behaviour for .NET Framework assemblies + and strongly named assemblies is documented in the docs for the + method). +

+
+ + The assembly and type to be loaded. + + + A , or . + + + + +
+ + + Uses + to load the attendant referred to by + the parameter. + + + The type to be loaded. + + + A , or . + + + + + Creates a new instance + from the given + + + + + Creates a new instance + from the given with the given inner + + + + + Resolves the supplied generic to a + instance. + + + The unresolved (possibly generic) name of a . + + + A resolved instance. + + + If the supplied could not be resolved + to a . + + + + + Holds data about a and it's + attendant . + + + + + The string that separates a name + from the name of it's attendant + in an assembly qualified type name. + + + + + Creates a new instance of the TypeAssemblyHolder class. + + + The unresolved name of a . + + + + + The (unresolved) type name portion of the original type name. + + + + + The (unresolved, possibly partial) name of the attandant assembly. + + + + + Is the type name being resolved assembly qualified? + + + + + Provides access to a central registry of aliased s. + + +

+ Simplifies configuration by allowing aliases to be used instead of + fully qualified type names. +

+

+ Comes 'pre-loaded' with a number of convenience alias' for the more + common types; an example would be the 'int' (or 'Integer' + for Visual Basic.NET developers) alias for the + type. +

+
+ Aleksandar Seovic + +
+ + + Name of the .Net config section that contains Spring.Net type aliases. + + + + + The alias around the 'int' type. + + + + + The alias around the 'Integer' type (Visual Basic.NET style). + + + + + The alias around the 'int[]' array type. + + + + + The alias around the 'Integer()' array type (Visual Basic.NET style). + + + + + The alias around the 'decimal' type. + + + + + The alias around the 'Decimal' type (Visual Basic.NET style). + + + + + The alias around the 'decimal[]' array type. + + + + + The alias around the 'Decimal()' array type (Visual Basic.NET style). + + + + + The alias around the 'char' type. + + + + + The alias around the 'Char' type (Visual Basic.NET style). + + + + + The alias around the 'char[]' array type. + + + + + The alias around the 'Char()' array type (Visual Basic.NET style). + + + + + The alias around the 'long' type. + + + + + The alias around the 'Long' type (Visual Basic.NET style). + + + + + The alias around the 'long[]' array type. + + + + + The alias around the 'Long()' array type (Visual Basic.NET style). + + + + + The alias around the 'short' type. + + + + + The alias around the 'Short' type (Visual Basic.NET style). + + + + + The alias around the 'short[]' array type. + + + + + The alias around the 'Short()' array type (Visual Basic.NET style). + + + + + The alias around the 'unsigned int' type. + + + + + The alias around the 'unsigned long' type. + + + + + The alias around the 'ulong[]' array type. + + + + + The alias around the 'uint[]' array type. + + + + + The alias around the 'unsigned short' type. + + + + + The alias around the 'ushort[]' array type. + + + + + The alias around the 'double' type. + + + + + The alias around the 'Double' type (Visual Basic.NET style). + + + + + The alias around the 'double[]' array type. + + + + + The alias around the 'Double()' array type (Visual Basic.NET style). + + + + + The alias around the 'float' type. + + + + + The alias around the 'Single' type (Visual Basic.NET style). + + + + + The alias around the 'float[]' array type. + + + + + The alias around the 'Single()' array type (Visual Basic.NET style). + + + + + The alias around the 'DateTime' type. + + + + + The alias around the 'DateTime' type (C# style). + + + + + The alias around the 'DateTime' type (Visual Basic.NET style). + + + + + The alias around the 'DateTime[]' array type. + + + + + The alias around the 'DateTime[]' array type. + + + + + The alias around the 'DateTime()' array type (Visual Basic.NET style). + + + + + The alias around the 'bool' type. + + + + + The alias around the 'Boolean' type (Visual Basic.NET style). + + + + + The alias around the 'bool[]' array type. + + + + + The alias around the 'Boolean()' array type (Visual Basic.NET style). + + + + + The alias around the 'string' type. + + + + + The alias around the 'string' type (Visual Basic.NET style). + + + + + The alias around the 'string[]' array type. + + + + + The alias around the 'string[]' array type (Visual Basic.NET style). + + + + + The alias around the 'object' type. + + + + + The alias around the 'object' type (Visual Basic.NET style). + + + + + The alias around the 'object[]' array type. + + + + + The alias around the 'object[]' array type (Visual Basic.NET style). + + + + + The alias around the 'int?' type. + + + + + The alias around the 'int?[]' array type. + + + + + The alias around the 'decimal?' type. + + + + + The alias around the 'decimal?[]' array type. + + + + + The alias around the 'char?' type. + + + + + The alias around the 'char?[]' array type. + + + + + The alias around the 'long?' type. + + + + + The alias around the 'long?[]' array type. + + + + + The alias around the 'short?' type. + + + + + The alias around the 'short?[]' array type. + + + + + The alias around the 'unsigned int?' type. + + + + + The alias around the 'unsigned long?' type. + + + + + The alias around the 'ulong?[]' array type. + + + + + The alias around the 'uint?[]' array type. + + + + + The alias around the 'unsigned short?' type. + + + + + The alias around the 'ushort?[]' array type. + + + + + The alias around the 'double?' type. + + + + + The alias around the 'double?[]' array type. + + + + + The alias around the 'float?' type. + + + + + The alias around the 'float?[]' array type. + + + + + The alias around the 'bool?' type. + + + + + The alias around the 'bool?[]' array type. + + + + + Registers standard and user-configured type aliases. + + + + + Registers an alias for the specified . + + +

+ This overload does eager resolution of the + referred to by the parameter. It will throw a + if the referred + to by the parameter cannot be resolved. +

+
+ + A string that will be used as an alias for the specified + . + + + The (possibly partially assembly qualified) name of the + to register the alias for. + + + If either of the supplied parameters is or + contains only whitespace character(s). + + + If the referred to by the supplied + cannot be loaded. + +
+ + + Registers short type name as an alias for + the supplied . + + + The to register. + + + If the supplied is . + + + + + Registers an alias for the supplied . + + + The alias for the supplied . + + + The to register the supplied under. + + + If the supplied is ; or if + the supplied is or + contains only whitespace character(s). + + + + + Resolves the supplied to a . + + + The alias to resolve. + + + The the supplied was + associated with, or if no + was previously registered for the supplied . + + + If the supplied is or + contains only whitespace character(s). + + + + + Returns a flag specifying whether TypeRegistry contains + specified alias or not. + + + Alias to check. + + + true if the specified type alias is registered, + false otherwise. + + + + + Helper methods with regard to type resolution. + + +

+ Not intended to be used directly by applications. +

+
+ Bruno Baia +
+ + + Creates a new instance of the class. + + +

+ This is a utility class, and as such exposes no public constructors. +

+
+
+ + + Resolves the supplied type name into a + instance. + + +

+ If you require special resolution, do + not use this method, but rather instantiate + your own . +

+
+ + The (possibly partially assembly qualified) name of a + . + + + A resolved instance. + + + If the type cannot be resolved. + +
+ + + Resolves a string array of interface names to + a array. + + + An array of valid interface names. Each name must include the full + interface and assembly name. + + An array of interface s. + + If any of the interfaces can't be loaded. + + + If any of the s specified is not an interface. + + + If (or any of its elements ) is + . + + + + + Match a method against the given pattern. + + the pattern to match against. + the method to match. + + if the method matches the given pattern; otherwise . + + + If the supplied is invalid. + + + + + Exception thrown when the ObjectFactory cannot load the specified type of a given object. + + Mark Pollack + + + + Thrown on an unrecoverable problem encountered in the + objects namespace or sub-namespaces, e.g. bad class or field. + + Rod Johnson + Mark Pollack (.NET) + + + + Superclass for all exceptions thrown in the Objects namespace and sub-namespaces. + + Rod Johnson + Mark Pollack (.NET) + + + Creates a new instance of the ObjectsException class. + + + + Creates a new instance of the ObjectsException class. with the specified message. + + + A message about the exception. + + + + + Creates a new instance of the ObjectsException class with the specified message + and root cause. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectsException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Creates a new instance of the FatalObjectException class. + + + + + Creates a new instance of the FatalObjectException class with the + specified message. + + + A message about the exception. + + + + + Creates a new instance of the FatalObjectException class with the + specified message. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the FatalObjectException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Initializes a new instance of the class. + + + + + Creates a new instance of the + class. + + + A message about the exception. + + + + + Creates a new instance of the + class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Initializes a new instance of the class. + + The resource description that the object definition came from. + Name of the object requested + Name of the object type. + The root cause. + + + + Creates a new instance of the + class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + Gets he name of the object we are trying to load. + + The name of the object. + + + + Gets the name of the object type we are trying to load. + + The name of the object type. + + + + Gets the resource description that the object definition came from + + The resource description. + + + + A implementation that represents + a composed collection of instances. + + + + + The criteria for an arbitrary filter. + + Rick Evans + + + + Does the supplied satisfy the criteria + encapsulated by this instance? + + + The datum to be checked by this criteria instance. + + + if the supplied + satisfies the criteria encapsulated by this instance; + if not, or the supplied + is . + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + A user-defined (child) criteria that will be composed into this instance. + + + + + Does the supplied satisfy the criteria encapsulated by + this instance? + + The data to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + + + + + Adds the supplied into the criteria + composed within this instance. + + + The to be added. + + + + + The list of composing this + instance. + + + + + Factory class to conceal any default implementation. + + Rod Johnson + Simon White (.NET) + + + + Creates a new instance of the + implementation provided by this factory. + + + A new instance of the + implementation provided by this factory. + + + + + Interface to be implemented by objects that can return information about + the current call stack. + + +

+ Useful in AOP (as an expression of the AspectJ cflow concept) but not AOP-specific. +

+
+ Rod Johnson + Aleksandar Seovic (.Net) +
+ + + Detects whether the caller is under the supplied , + according to the current stacktrace. + + + The to look for. + + + if the caller is under the supplied . + + + + + Detects whether the caller is under the supplied + and , according to the current stacktrace. + + + The to look for. + + The name of the method to look for. + + if the caller is under the supplied + and . + + + + + Does the current stack trace contain the supplied ? + + The token to match against. + + if the current stack trace contains the supplied + . + + + + + Creates a new instance of the + class. + + + + + Detects whether the caller is under the supplied , + according to the current stacktrace. + + + + + + Detects whether the caller is under the supplied + and , according to the current stacktrace. + + +

+ Matches the whole method name. +

+
+ +
+ + + Does the current stack trace contain the supplied ? + + +

+ This leaves it up to the caller to decide what matches, but is obviously less of + an abstraction because the caller must know the exact format of the underlying + stack trace. +

+
+ +
+ + + Provides methods to support various naming and other conventions used throughout the framework. + Mainly for internal use within the framework. + + Rob Harrop + Juergen Hoeller + Mark Pollack (.NET) + + + Convert Strings in attribute name format (lowercase, hyphens separating words) + into property name format (camel-cased). For example, transaction-manager is + converted into transactionManager. + + + + + Convenience class that exposes a signature that matches the + delegate. + + +

+ Useful when filtering members via the + mechanism. +

+
+ Rick Evans +
+ + + Creates a new instance of the + class. + + + + + Returns true if the supplied instance + satisfies the supplied (which must be an + implementation). + + + The instance that will be checked to see if + it matches the supplied . + + + The criteria against which to filter the supplied + instance. + + + True if the supplied instance + satisfies the supplied (which must be an + implementation); false if not or the + supplied is not an + implementation or is null. + + + + + Interface that can be implemented by exceptions etc that are error coded. + + +

+ The error code is a , rather than a number, so it can + be given user-readable values, such as "object.failureDescription". +

+
+ Rod Johnson + Aleksandar Seovic (.Net) +
+ + + Return the error code associated with this failure. + + +

+ The GUI can render this anyway it pleases, allowing for I18n etc. +

+
+ + The error code associated with this failure, + or the empty string instance if not error-coded. + +
+ + + Thrown in response to referring to an invalid property (most often via reflection). + + Rick Evans + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + A message about the exception. + + + + + Creates a new instance of the + class. + + + The that is (or rather was) the source of the + offending property. + + + The name of the offending property. + + + + + Creates a new instance of the + class. + + + The that is (or rather was) the source of the + offending property. + + + The name of the offending property. + + + A message about the exception. + + + + + Creates a new instance of the InvalidPropertyException class. + + + The that is (or rather was) the source of the + offending property. + + + The name of the offending property. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the + class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the + class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + The that is (or rather was) the source of the + offending property. + + + + + The name of the offending property. + + + + + Criteria that is satisfied if the of each of the + arguments matches each of the parameter s of a given + . + + +

+ If no array is passed to the overloaded constructor, + any method that has no parameters will satisfy an instance of this + class. The same effect could be achieved by passing the + array to the overloaded constructor. +

+
+ Rick Evans + Bruno Baia +
+ + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + +

+ If the supplied array is null, then this + constructor uses the array. +

+
+ + The array that this criteria will use to + check parameter s. + +
+ + + Does the supplied satisfy the criteria encapsulated by + this instance? + + +

+ This implementation respects the inheritance chain of any parameter + s... i.e. methods that have a base type (or + interface) that is assignable to the in the + same corresponding index of the parameter types will satisfy this + criteria instance. +

+
+ The datum to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + +
+ + + Criteria that is satisfied if the number of generic arguments to a given + matches an arbitrary number. + + +

+ This class supports checking the generic arguments count of both + generic methods and constructors. +

+
+ Bruno Baia +
+ + + Creates a new instance of the + class. + + +

+ This constructor sets the + + property to zero (0). +

+
+
+ + + Creates a new instance of the + class. + + + The number of generic arguments that a + must have to satisfy this criteria. + + + If the supplied is less + than zero. + + + + + Does the supplied satisfy the criteria encapsulated by + this instance? + + The datum to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + + + + + The number of generic arguments that a + must have to satisfy this criteria. + + + If the supplied value is less than zero. + + + + + Thrown when a method (typically a property getter or setter invoked via reflection) + throws an exception, analogous to a . + + Rod Johnson + Mark Pollack (.NET) + + + + Superclass for exceptions related to a property access, such as a + mismatch or a target invocation exception. + + Rod Johnson + Mark Pollack (.NET) + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + Create a new instance of the PropertyAccessException class. + + + A message about the exception. + + Describes the change attempted on the property. + + + + Create a new instance of the PropertyAccessException class. + + + A message about the exception. + + Describes the change attempted on the property. + + The root exception that is being wrapped. + + + + + Creates a new instance of the PropertyAccessException class. + + + + + Creates a new instance of the PropertyAccessException class. + + + A message about the exception. + + + + + Creates a new instance of the PropertyAccessExceptionsException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the PropertyAccessExceptionsException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Returns the PropertyChangeEventArgs that resulted in the problem. + + + + + The string error code used to classify the error. + + + + + Creates a new instance of the MethodInvocationException class. + + + + + Creates a new instance of the MethodInvocationException class. + + + A message about the exception. + + + + + Creates a new instance of the MethodInvocationException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Constructor to use when an exception results from a + . + + + The raised by the invoked property. + + + The that + resulted in an exception. + + + + + Creates a new instance of the MethodInvocationException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + The error code string for this exception. + + + + + Criteria that is satisfied if the method Name of an + instance matches a + supplied string pattern. + + + + Supports the following simple pattern styles: + "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. + + + Bruno Baia + + + + Creates a new instance of the + class. + + +

+ This constructor sets the + + property to * (any method name). +

+
+
+ + + Creates a new instance of the + class. + + The pattern that names + must match against in order to satisfy this criteria. + + If the supplied is null or resolve to an empty string. + + + + + Does the supplied satisfy the criteria encapsulated by + this instance? + + The datum to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + + + + + The number of parameters that a + must have to satisfy this criteria. + + + If the supplied value is null or resolve to an empty string. + + + + + Helper class that encapsulates the specification of a method parameter, i.e. + a MethodInfo or ConstructorInfo plus a parameter index. + Useful as a specification object to pass along. + + Juergen Hoeller + Rob Harrop + Mark Pollack (.NET) + + + + Initializes a new instance of the class for the given + MethodInfo. + + The MethodInfo to specify a parameter for. + Index of the parameter. + + + + Initializes a new instance of the class. + + The ConstructorInfo to specify a parameter for. + Index of the parameter. + + + + Create a new MethodParameter for the given method or donstructor. + This is a convenience constructor for scenarios where a + Method or Constructor reference is treated in a generic fashion. + + The method or constructor to specify a parameter for. + Index of the parameter. + the corresponding MethodParameter instance + + + + Parameters the name of the method/constructor parameter. + + the parameter name. + + + + Gets the type of the method/constructor parameter. + + The type of the parameter. (never null) + + + + Gets the wrapped MethodInfo, if any. Note Either MethodInfo or ConstructorInfo is available. + + The MethodInfo, or null if none. + + + + Gets wrapped ConstructorInfo, if any. Note Either MethodInfo or ConstructorInfo is available. + + The ConstructorInfo, or null if none + + + + Criteria that is satisfied if the number of parameters to a given + matches an arbitrary number. + + +

+ This class supports checking the parameter count of both methods and + constructors. +

+

+ Default parameters, etc need to taken into account. +

+
+ Rick Evans +
+ + + Creates a new instance of the + class. + + +

+ This constructor sets the + + property to zero (0). +

+
+
+ + + Creates a new instance of the + class. + + + The number of parameters that a + must have to satisfy this criteria. + + + If the supplied is less + than zero. + + + + + Does the supplied satisfy the criteria encapsulated by + this instance? + + The datum to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + + + + + The number of parameters that a + must have to satisfy this criteria. + + + If the supplied value is less than zero. + + + + + Criteria that is satisfied if the of each of the + parameters of a given matches each + of the parameter s of a given + . + + +

+ If no array is passed to the overloaded constructor, + any method that has no parameters will satisfy an instance of this + class. The same effect could be achieved by passing the + array to the overloaded constructor. +

+
+ Rick Evans + Bruno Baia +
+ + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + +

+ If the supplied array is null, then this + constructor uses the array. +

+
+ + The array that this criteria will use to + check parameter s. + +
+ + + Does the supplied satisfy the criteria encapsulated by + this instance? + + The datum to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + + + + + Criteria that is satisfied if the return of a given + matches a given . + + Rick Evans + + + + The return to match against if no + is provided explictly. + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The that the return type of a given + must match in order to satisfy + this criteria. + + + + + Does the supplied satisfy the criteria encapsulated by + this instance? + + The datum to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + + + + + The that the return type of a given + must match in order to satisfy + this criteria. + + + + + Thrown in response to a failed attempt to read a property. + + +

+ Typically thrown when attempting to read the value of a write-only + property via reflection. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + A message about the exception. + + + + + Creates a new instance of the + class. + + + The that is (or rather was) the source of the + offending property. + + + The name of the offending property. + + + + + Creates a new instance of the + class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the + class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Thrown in response to a failed attempt to write a property. + + Mark Pollack (.NET) + + + + Creates a new instance of the NotWritablePropertyException class. + + + + + Creates a new instance of the NotWritablePropertyException class. + + + A message about the exception. + + + + + Creates a new instance of the NotWritablePropertyException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the NotWritablePropertyException class. + + + The that is (or rather was) the source of the + offending property. + + + The name of the offending property. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the NotWritablePropertyException class + summarizing what property was not writable. + + + The name of the property that is not writable. + + + The in which the property is not writable. + + + + + Creates new NotWritablePropertyException with a root cause. + + + The name of the property that is not writable. + + + The in which the property is not writable. + + + The root cause indicating why the property was not writable. + + + + + Creates a new instance of the NotWritablePropertyException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Thrown in response to encountering a value + when traversing a nested path expression. + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + A message about the exception. + + + + + Creates a new instance of the + class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the + class. + + + The of the object where the property was not found. + + The name of the property not found. + + + + Creates a new instance of the + class. + + + The of the object where the property was not found. + + The name of the property not found. + A message about the exception. + + + + Creates a new instance of the + class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + The name of the offending property. + + + + + The of the class where the property was last looked for. + + + + + Comparator implementation for objects, sorting by + order value ascending (resp. by priority descending). + + +

+ Non- objects are treated as greatest order values, + thus ending up at the end of a list, in arbitrary order (just like same order values of + objects). +

+
+ Juergen Hoeller + Aleksandar Seovic (.Net) +
+ + + Compares two objects and returns a value indicating whether one is less than, + equal to or greater than the other. + + +

+ Uses direct evaluation instead of + to avoid unnecessary boxing. +

+
+ The first object to compare. + The second object to compare. + + -1 if first object is less then second, 1 if it is greater, or 0 if they are equal. + +
+ + + Handle the case when both objects have equal sort order priority. By default returns 0, + but may be overriden for handling special cases. + + The first object to compare. + The second object to compare. + + -1 if first object is less then second, 1 if it is greater, or 0 if they are equal. + + + + + Provides additional data for the PropertyChanged event. + + +

+ Provides some additional properties over and above the name of the + property that has changed (which is inherited from the + base class). + This allows calling code to determine whether or not a property has + actually changed (i.e. a PropertyChanged event may have been + raised, but the value itself may be equivalent). +

+
+ +
+ + + Create a new instance of the + class. + + + The name of the property that was changed. + The old value of the property. + the new value of the property. + + + + Get the old value for the property. + + + + + + Get the new value of the property. + + + + + + A base class for all + implementations that are regular expression based. + + Rick Evans + + + + The default pattern... matches absolutely anything. + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The regular expression pattern to be applied. + + + + + Does the supplied satisfy the criteria encapsulated by + this instance? + + The datum to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + + + + + Convenience method that calls the + + on the supplied . + + The input to match against. + True if the matches. + + + + The regular expression pattern to be applied. + + + + + The regular expression options to be applied. + + + + + The regular expression to be applied. + + + + + Criteria that is satisfied if the Name property of an + instance matches a + supplied regular expression pattern. + + Rick Evans + + + + The default event name pattern... matches pretty much any event name. + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The pattern that names + must match against in order to satisfy this criteria. + + + + + Does the supplied satisfy the criteria encapsulated by + this instance? + + The datum to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + + + + + Criteria that is satisfied if the Name property of an + instance matches a + supplied regular expression pattern. + + Rick Evans + + + + The default method name pattern... matches pretty much any method name. + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The pattern that names + must match against in order to satisfy this criteria. + + + + + Does the supplied satisfy the criteria encapsulated by + this instance? + + The datum to be checked by this criteria instance. + + True if the supplied satisfies the criteria encapsulated + by this instance; false if not or the supplied is null. + + + + + Exception thrown on a mismatch when trying to set a property + or resolve an argument to a method invocation. + + Rod Johnson + Juergen Hoeller + Mark Pollack (.NET) + + + + Creates a new instance of the TypeMismatchException class. + + + + + Creates a new instance of the TypeMismatchException class. + + + A message about the exception. + + + + + Creates a new instance of the TypeMismatchException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the TypeMismatchException class describing the + property and required type that could not used to set a property on the target object. + + + The description of the property that was to be changed. + + The target conversion type. + + + + Creates a new instance of the TypeMismatchException class describing the + property, required type, and underlying exception that could not be used + to set a property on the target object. + + + The description of the property that was to be changed. + + The target conversion type. + The underlying exception. + + + + Creates a new instance of the TypeMismatchException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + The string error code used to classify the exception. + + + + + Abstract base class for implementations. + + Aleksandar Seovic + + + + An interface that defines the methods that have to be implemented by all data bindings. + + Aleksandar Seovic + + + + Binds source object to target object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + + + Binds source object to target object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Binds target object to source object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + + + Binds target object to source object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Sets error message that should be displayed in the case + of a non-fatal binding error. + + + Resource ID of the error message. + + + List of error providers message should be added to. + + + + + The name of the always filled error provider + + + + + Gets or sets a flag specifying whether this binding is valid. + + + true if this binding evaluated without errors; + false otherwise. + + + + + Marks this binding's state as invalid for this validationErrors collection. + Returns false if is null. + + + false, if validationErrors is null + + + + Initializes a new instance of the class. + + + + + Binds source object to target object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + + + Binds target object to source object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + + + Binds source object to target object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Binds target object to source object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Sets error message that should be displayed in the case + of a non-fatal binding error. + + + Resource ID of the error message. + + + List of error providers message should be added to. + + + + + Determines whether the specified is equal to the current . + + + true if the specified is equal to the current ; otherwise, false. + + The to compare with the current . 2 + + + + Serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. + + + A hash code for the current . + + + + + Gets the unique ID of this binding instance. + + + + + Gets or sets the . + + The binding direction. + + + + Gets the error message. + + The error message. + + + + Gets the error providers. + + + + + Abstract base class for simple, one-to-one implementations. + + Aleksandar Seovic + + + + Initialize a new instance of without any + + + + + Initialize a new instance of with the + specified . + + + + + Binds source object to target object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Concrete implementation if source to target binding. + + + The source object. + + + The target object. + + + Variables that should be used during expression evaluation. + + + + + Binds target object to source object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Concrete implementation of target to source binding. + + + The source object. + + + The target object. + + + Variables that should be used during expression evaluation. + + + + + Gets the source value for the binding. + + + Source object to extract value from. + + + Variables for expression evaluation. + + + The source value for the binding. + + + + + Sets the source value for the binding. + + + The source object to set the value on. + + + The value to set. + + + Variables for expression evaluation. + + + + + Gets the target value for the binding. + + + Source object to extract value from. + + + Variables for expression evaluation. + + + The target value for the binding. + + + + + Sets the target value for the binding. + + + The target object to set the value on. + + + The value to set. + + + Variables for expression evaluation. + + + + + Gets or sets the to use. + + The formatter to use. + + + + Base implementation of the . + + Aleksandar Seovic + + + + An interface that has to be implemented by all data binding containers. + + Aleksandar Seovic + + + + Adds the binding. + + + Binding definition to add. + + + Added instance. + + + + + Adds the binding with a default + binding direction of . + + + This is a convinience method for adding SimpleExpressionBinding, + one of the most often used binding types, to the bindings list. + + + The source expression. + + + The target expression. + + + Added instance. + + + + + Adds the binding. + + + This is a convinience method for adding SimpleExpressionBinding, + one of the most often used binding types, to the bindings list. + + + The source expression. + + + The target expression. + + + Binding direction. + + + Added instance. + + + + + Adds the binding with a default + binding direction of . + + + This is a convinience method for adding SimpleExpressionBinding, + one of the most often used binding types, to the bindings list. + + + The source expression. + + + The target expression. + + + to use for value formatting and parsing. + + + Added instance. + + + + + Adds the binding. + + + This is a convinience method for adding SimpleExpressionBinding, + one of the most often used binding types, to the bindings list. + + + The source expression. + + + The target expression. + + + Binding direction. + + + to use for value formatting and parsing. + + + Added instance. + + + + + Gets a value indicating whether this data binding container + has bindings. + + + true if this data binding container has bindings; + false otherwise. + + + + + Creates a new instance of . + + + + + Adds the binding. + + + Binding definition to add. + + + Added instance. + + + + + Adds the binding with a default + binding direction of . + + + The source expression. + + + The target expression. + + + Added instance. + + + + + Adds the binding. + + + The source expression. + + + The target expression. + + + Binding direction. + + + Added instance. + + + + + Adds the binding with a default + binding direction of . + + + The source expression. + + + The target expression. + + + to use for value formatting and parsing. + + + Added instance. + + + + + Adds the binding. + + + The source expression. + + + The target expression. + + + Binding direction. + + + to use for value formatting and parsing. + + + Added instance. + + + + + Binds source object to target object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + + + Binds source object to target object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Binds target object to source object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + + + Binds target object to source object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Implemented as a NOOP for containers. + of a non-fatal binding error. + + + Resource ID of the error message. + + + List of error providers message should be added to. + + + + + Gets a list of bindings for this container. + + + A list of bindings for this container. + + + + + Gets a value indicating whether this instance has bindings. + + + true if this instance has bindings; otherwise, false. + + + + + BaseBindingManager keeps track of all registered bindings and + represents an entry point for the binding and unbinding process. + + Aleksandar Seovic + + + + Initializes a new instance of the class. + + + + + Enumeration that defines possible values for data binding direction. + + Aleksandar Seovic + + + + Specifies that value from the control property should be bound to a data model. + + + + + Specifies that value from the data model should be bound to control property. + + + + + Specifies that binding is bidirectional. + + + + + Represents an ErrorMessage specific to a binding instance. + + Erich Eichinger + + + + Represents a single validation error message. + + Aleksandar Seovic + Goran Milosavljevic + + + + Default constructor. + + + + + Initializes a new instance of the class. + + Error message resource identifier. + Parameters that should be used for message resolution. + + + + Initializes a new instance of the class copying values from another instance. + + Another Error message instance to copy values from. + + + + This property is reserved, apply the + + to the class instead. + + + An + that describes the XML representation of the object that + is produced by the + + method and consumed by the + + method. + + + + + + Generates an object from its XML representation. + + + The stream + from which the object is deserialized. + + + + + Converts an object into its XML representation. + + + The stream + to which the object is serialized. + + + + + Resolves the message against specified . + + Message source to resolve this error message against. + Resolved error message. + + + + Determines whether the specified is equal to the current . + + + true if the specified is equal to the current ; otherwise, false. + + The to compare with the current . 2 + + + + Serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. + + + A hash code for the current . + + + + + Gets or sets the resource identifier for this message. + + The resource identifier for this message. + + + + Gets or sets the message parameters. + + The message parameters. + + + + Initializes a new instance of the class. + + the id of the binding this error message is associated with + the message id + optional parameters to this message + + + + Generates an object from its XML representation. + + + The stream + from which the object is deserialized. + + + + + Converts an object into its XML representation. + + + The stream + to which the object is serialized. + + + + + Determines whether the specified is equal to the current . + + + true if the specified is equal to the current ; otherwise, false. + + The to compare with the current . 2 + + + + Serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. + + + A hash code for the current . + + + + + Get the ID of the binding this message instance relates to. + + + + + Interface that should be implemented by data bound objects, such as + web pages, user controls, windows forms, etc. + + Aleksandar Seovic + + + + Gets the binding manager. + + The binding manager. + + + + implementation that allows + data binding between collections that implement + interface. + + Aleksandar Seovic + + + + Binds source object to target object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Binds target object to source object. + + + The source object. + + + The target object. + + + Validation errors collection that type conversion errors should be added to. + + + Variables that should be used during expression evaluation. + + + + + Simple, expression-based implementation of that + binds source to target one-to-one. + + Aleksandar Seovic + + + + Initializes a new instance of the class. + + + The source expression. + + + The target expression. + + + + + Initializes a new instance of the class. + + + The source expression. + + + The target expression. + + + The formatter to use. + + + + + Gets the source value for the binding. + + + Source object to extract value from. + + + Variables for expression evaluation. + + + The source value for the binding. + + + + + Sets the source value for the binding. + + + The source object to set the value on. + + + The value to set. + + + Variables for expression evaluation. + + + + + Gets the target value for the binding. + + + Source object to extract value from. + + + Variables for expression evaluation. + + + The target value for the binding. + + + + + Sets the target value for the binding. + + + The target object to set the value on. + + + The value to set. + + + Variables for expression evaluation. + + + + + Gets the source expression. + + The source expression. + + + + Gets the target expression. + + The target expression. + + + + Minimal AST node interface used by ANTLR AST generation and tree-walker. + + + + + Add a (rightmost) child to this node + + + + + + Get the first child of this node; null if no children + + + + + Get the next sibling in line after this one + + + + + Get the token text for this node + + + + + + Get number of children of this node; if leaf, returns 0 + + Number of children + + + + Set the first child of a node. + + + + + + Set the next sibling after this one. + + + + + + Set the token text for this node + + + + + + Set the token type for this node + + + + + + Get the token type for this node + + + + + Event type. + + + + Used for creating Token instances. + + + Used for caching lookahead characters. + + + + This method is executed by ANTLR internally when it detected an illegal + state that cannot be recovered from. + The previous implementation of this method called + and writes directly to , which is usually not + appropriate when a translator is embedded into a larger application. + + Error message. + + + + A creator of Token object instances. + + + + This class and it's sub-classes exists primarily as an optimization + of the reflection-based mechanism(s) previously used exclusively to + create instances of Token objects. + + + Since Lexers in ANTLR use a single Token type, each TokenCreator can + create one class of Token objects (that's why it's not called TokenFactory). + + + + + + Constructs a instance. + + + + + Returns the fully qualified name of the Token type that this + class creates. + + + + + The fully qualified name of the Token type to create. + + + + + Type object used as a template for creating tokens by reflection. + + + + + Returns the fully qualified name of the Token type that this + class creates. + + + + + Constructs a instance. + + + + + Returns the fully qualified name of the Token type that this + class creates. + + + + This type was created in VisualAge. + + + + Report exception errors caught in nextToken() + + + + Parser error-reporting function can be overridden in subclass + + + + Parser warning-reporting function can be overridden in subclass + + + + + Represents a stream of characters fed to the lexer from that can be rewound + via mark()/rewind() methods. + + + + A dynamic array is used to buffer up all the input characters. Normally, + "k" characters are stored in the buffer. More characters may be stored + during guess mode (testing syntactic predicate), or when LT(i>k) is referenced. + Consumption of characters is deferred. In other words, reading the next + character is not done by conume(), but deferred until needed by LA or LT. + + + + + This should NOT be called from anyone other than ParserEventSupport! + + + + This should NOT be called from anyone other than ParserEventSupport! + + + + + Provides an abstract base for implementing subclasses. + + + + This abstract class is provided to make it easier to create s. + You should extend this base class rather than creating your own. + + + + + + Handle the "Done" event. + + Event source object + Event data object + + + + Handle the "CharConsumed" event. + + Event source object + Event data object + + + + Handle the "CharLA" event. + + Event source object + Event data object + + + + Handle the "Mark" event. + + Event source object + Event data object + + + + Handle the "Rewind" event. + + Event source object + Event data object + + + charBufferConsume method comment. + + + + charBufferLA method comment. + + + + + @deprecated as of 2.7.2. This method calls System.exit() and writes + directly to stderr, which is usually not appropriate when + a parser is embedded into a larger application. Since the method is + static, it cannot be overridden to avoid these problems. + ANTLR no longer uses this method internally or in generated code. + + + + + + Specify an object with support code (shared by Parser and TreeParser. + Normally, the programmer does not play with this, using + instead. + + + + + + Specify the type of node to create during tree building. + + Fully qualified AST Node type name. + + + + Specify the type of node to create during tree building. + use now to be consistent with + Token Object Type accessor. + + Fully qualified AST Node type name. + + + + + + + + Get another token object from the token stream + + + + Return the token type of the ith token of lookahead where i=1 + is the current token being examined by the parser (i.e., it + has not been matched yet). + + + + Make sure current lookahead symbol matches token type t. + Throw an exception upon mismatch, which is catch by either the + error handler or by the syntactic predicate. + + + + Make sure current lookahead symbol matches the given set + Throw an exception upon mismatch, which is catch by either the + error handler or by the syntactic predicate. + + + + Parser error-reporting function can be overridden in subclass + + + + Parser error-reporting function can be overridden in subclass + + + + Parser warning-reporting function can be overridden in subclass + + + + User can override to do their own debugging + + + + This should NOT be called from anyone other than ParserEventSupport! + + + + + Provides an abstract base for implementing subclasses. + + + + This abstract class is provided to make it easier to create s. + You should extend this base class rather than creating your own. + + + + + + Handle the "Done" event. + + Event source object + Event data object + + + + Handle the "ReportError" event. + + Event source object + Event data object + + + + Handle the "ReportWarning" event. + + Event source object + Event data object + + + This should NOT be called from anyone other than ParserEventSupport! + + + + A class to assist in firing parser events + NOTE: I intentionally _did_not_ synchronize the event firing and + add/remove listener methods. This is because the add/remove should + _only_ be called by the parser at its start/end, and the _same_thread_ + should be performing the parsing. This should help performance a tad... + + + + + Provides an abstract base for implementing subclasses. + + + + This abstract class is provided to make it easier to create s. + You should extend this base class rather than creating your own. + + + + + + Handle the "Done" event. + + Event source object + Event data object + + + + Handle the "EnterRule" event + + Event source object + Event data object + + + + Handle the "ExitRule" event + + Event source object + Event data object + + + + Handle the "Consume" event. + + Event source object + Event data object + + + + Handle the "ParserLA" event. + + Event source object + Event data object + + + + Handle the "Match" event. + + Event source object + Event data object + + + + Handle the "MatchNot" event. + + Event source object + Event data object + + + + Handle the "MisMatch" event. + + Event source object + Event data object + + + + Handle the "MisMatchNot" event. + + Event source object + Event data object + + + + Handle the "ReportError" event. + + Event source object + Event data object + + + + Handle the "ReportWarning" event. + + Event source object + Event data object + + + + Handle the "SemPreEvaluated" event. + + Event source object + Event data object + + + + Handle the "SynPredFailed" event. + + Event source object + Event data object + + + + Handle the "SynPredStarted" event. + + Event source object + Event data object + + + + Handle the "SynPredSucceeded" event. + + Event source object + Event data object + + + This should NOT be called from anyone other than ParserEventSupport! + + + + + Provides an abstract base for implementing subclasses. + + + + This abstract class is provided to make it easier to create s. + You should extend this base class rather than creating your own. + + + + + + Handle the "Done" event. + + Event source object + Event data object + + + + Handle the "Match" event. + + Event source object + Event data object + + + + Handle the "MatchNot" event. + + Event source object + Event data object + + + + Handle the "MisMatch" event. + + Event source object + Event data object + + + + Handle the "MisMatchNot" event. + + Event source object + Event data object + + + + Provides an abstract base for implementing subclasses. + + + + This abstract class is provided to make it easier to create s. + You should extend this base class rather than creating your own. + + + + + + Handle the "Done" event. + + Event source object + Event data object + + + + Handle the "EnterRule" event + + Event source object + Event data object + + + + Handle the "ExitRule" event + + Event source object + Event data object + + + This should NOT be called from anyone other than ParserEventSupport! + + + + + Provides an abstract base for implementing subclasses. + + + + This abstract class is provided to make it easier to create s. + You should extend this base class rather than creating your own. + + + + + + Handle the "Done" event. + + Event source object + Event data object + + + + Handle the "Consume" event. + + Event source object + Event data object + + + + Handle the "ParserLA" event. + + Event source object + Event data object + + + + Specifies the behaviour required (i.e. parser modifications) + specifically to support parse tree debugging and derivation. + + + + Override the standard matching and rule entry/exit routines + to build parse trees. This class is useful for 2.7.3 where + you can specify a superclass like + + + class TinyCParser extends Parser(ParseTreeDebugParser); + + + + + + Each new rule invocation must have it's own subtree. Tokens are + added to the current root so we must have a stack of subtree roots. + + + + + Track most recently created parse subtree so that when parsing + is finished, we can get to the root. + + + + + For every rule replacement with a production, we bump up count. + + + + + Adds LT(1) to the current parse subtree. + + + + Note that the match() routines add the node before checking for + correct match. This means that, upon mismatched token, there + will a token node in the tree corresponding to where that token + was expected. For no viable alternative errors, no node will + be in the tree as nothing was matched() (the lookahead failed + to predict an alternative). + + + + + + Create a rule node, add to current tree, and make it current root + + + + + + Pop current root; back to adding to old root + + + + + A class to assist in firing parser events + NOTE: I intentionally _did_not_ synchronize the event firing and + add/remove listener methods. This is because the add/remove should + _only_ be called by the parser at its start/end, and the _same_thread_ + should be performing the parsing. This should help performance a tad... + + + + This should NOT be called from anyone other than ParserEventSupport! + + + + + Provides an abstract base for implementing subclasses. + + + + This abstract class is provided to make it easier to create s. + You should extend this base class rather than creating your own. + + + + + + Handle the "Done" event. + + Event source object + Event data object + + + + Handle the "SemPreEvaluated" event. + + Event source object + Event data object + + + + Provides an abstract base for implementing subclasses. + + + + This abstract class is provided to make it easier to create s. + You should extend this base class rather than creating your own. + + + + + + Handle the "Done" event. + + Event source object + Event data object + + + + Handle the "SynPredFailed" event. + + Event source object + Event data object + + + + Handle the "SynPredStarted" event. + + Event source object + Event data object + + + + Handle the "SynPredSucceeded" event. + + Event source object + Event data object + + + This should NOT be called from anyone other than ParserEventSupport! + + + + + AST Support code shared by TreeParser and Parser. + + + + We use delegation to share code (and have only one + bit of code to maintain) rather than subclassing + or superclassing (forces AST support code to be + loaded even when you don't want to do AST stuff). + + + Typically, is used to specify the + homogeneous type of node to create, but you can override + to make heterogeneous nodes etc... + + + + + + Constructs an ASTFactory with the default AST node type of + . + + + + + Constructs an ASTFactory and use the specified AST node type + as the default. + + + Name of default AST node type for this factory. + + + + + Constructs an ASTFactory and use the specified AST node type + as the default. + + + MetaType of default AST node type for this factory. + + + + + Stores the Type of the default AST node class to be used during tree construction. + + + + + Stores the mapping between custom AST NodeTypes and their NodeTypeName/NodeTypeClass + and ASTNodeCreator. + + + + + Stores the mapping between AST node typenames and their token ID. + + + + + Specify an "override" for the type created for + the specified Token type. + + + This method is useful for situations that ANTLR cannot oridinarily deal + with (i.e., when you create a token based upon a nonliteral token symbol + like #[LT(1)]. This is a runtime value and ANTLR cannot determine the token + type (and hence the AST) statically. + + Token type to override. + + Fully qualified AST typename (or null to specify + the factory's default AST type). + + + + + Register an AST Node Type for a given Token type ID. + + The Token type ID. + The AST Node Type to register. + + + + Register an ASTNodeCreator for a given Token type ID. + + The Token type ID. + The creater to register. + + + + Register an ASTNodeCreator to be used for creating node by default. + + The ASTNodeCreator. + + + + Pre-expands the internal list of TokenTypeID-to-ASTNodeType mappings + to the specified size. + This is primarily a convenience method that can be used to prevent + unnecessary and costly re-org of the mappings list. + + Maximum Token Type ID. + + + + Add a child to the current AST + + The AST to add a child to + The child AST to be added + + + + Creates a new uninitialized AST node. Since a specific AST Node Type + wasn't indicated, the new AST node is created using the current default + AST Node type - + + An uninitialized AST node object. + + + + Creates and initializes a new AST node using the specified Token Type ID. + The used for creating this new AST node is + determined by the following: + + the current TokenTypeID-to-ASTNodeType mapping (if any) or, + the otherwise + + + Token type ID to be used to create new AST Node. + An initialized AST node object. + + + + Creates and initializes a new AST node using the specified Token Type ID. + The used for creating this new AST node is + determined by the following: + + the current TokenTypeID-to-ASTNodeType mapping (if any) or, + the otherwise + + + Token type ID to be used to create new AST Node. + Text for initializing the new AST Node. + An initialized AST node object. + + + + Creates a new AST node using the specified AST Node Type name. Once created, + the new AST node is initialized with the specified Token type ID and string. + The used for creating this new AST node is + determined solely by ASTNodeTypeName. + The AST Node type must have a default/parameterless constructor. + + Token type ID to be used to create new AST Node. + Text for initializing the new AST Node. + Fully qualified name of the Type to be used for creating the new AST Node. + An initialized AST node object. + + + + Creates a new AST node using the specified AST Node Type name. + + Token instance to be used to initialize the new AST Node. + + Fully qualified name of the Type to be used for creating the new AST Node. + + A newly created and initialized AST node object. + + Once created, the new AST node is initialized with the specified Token + instance. The used for creating this new AST + node is determined solely by ASTNodeTypeName. + The AST Node type must have a default/parameterless constructor. + + + + + Creates and initializes a new AST node using the specified AST Node instance. + the new AST node is initialized with the specified Token type ID and string. + The used for creating this new AST node is + determined solely by aNode. + The AST Node type must have a default/parameterless constructor. + + AST Node instance to be used for creating the new AST Node. + An initialized AST node object. + + + + Creates and initializes a new AST node using the specified Token instance. + The used for creating this new AST node is + determined by the following: + + the current TokenTypeID-to-ASTNodeType mapping (if any) or, + the otherwise + + + Token instance to be used to create new AST Node. + An initialized AST node object. + + + + Returns a copy of the specified AST Node instance. The copy is obtained by + using the method Clone(). + + AST Node to copy. + An AST Node (or null if t is null). + + + + Duplicate AST Node tree rooted at specified AST node and all of it's siblings. + + Root of AST Node tree. + Root node of new AST Node tree (or null if t is null). + + + + Duplicate AST Node tree rooted at specified AST node. Ignore it's siblings. + + Root of AST Node tree. + Root node of new AST Node tree (or null if t is null). + + + + Make a tree from a list of nodes. The first element in the + array is the root. If the root is null, then the tree is + a simple list not a tree. Handles null children nodes correctly. + For example, build(a, b, null, c) yields tree (a b c). build(null,a,b) + yields tree (nil a b). + + List of Nodes. + AST Node tree. + + + + Make a tree from a list of nodes, where the nodes are contained + in an ASTArray object. + + List of Nodes. + AST Node tree. + + + + Make an AST the root of current AST. + + + + + + + Sets the global default AST Node Type for this ASTFactory instance. + This method also attempts to load the instance + for the specified typename. + + Fully qualified AST Node Type name. + + + + To change where error messages go, can subclass/override this method + and then setASTFactory in Parser and TreeParser. This method removes + a prior dependency on class antlr.Tool. + + + + + + A creator of AST node instances. + + + + This class and it's sub-classes exists primarily as an optimization + of the reflection-based mechanism(s) previously used exclusively to + create instances of AST node objects. + + + Parsers and TreeParsers already use the ASTFactory class in ANTLR whenever + they need to create an AST node objeect. What this class does is to support + performant extensibility of the basic ASTFactory. The ASTFactory can now be + extnded as run-time to support more new AST node types without using needing + to use reflection. + + + + + + Constructs an instance. + + + + + Returns the fully qualified name of the AST type that this + class creates. + + + + + Summary description for ASTVisitor. + + + + + Get number of children of this node; if leaf, returns 0 + + Number of children + + + + Small buffer used to avoid reading individual chars + + + + + Small buffer used to avoid reading individual chars + + + + + Constructs a instance. + + + + + Returns the fully qualified name of the AST type that this + class creates. + + + + + Constructs a instance. + + + + + Returns the fully qualified name of the AST type that this + class creates. + + + + + A token is minimally a token type. Subclasses can add the text matched + for the token and line info. + + + + + Constructs a instance. + + + + + Returns the fully qualified name of the Token type that this + class creates. + + + + + Constructs a instance. + + + + + Returns the fully qualified name of the Token type that this + class creates. + + + + + Summary description for DumpASTVisitor. + + Simple class to dump the contents of an AST to the output + + + + Append a char to the msg buffer. If special, then show escaped version + + Message buffer + Char to append + + + + Walk parse tree and return requested number of derivation steps. + If steps less-than 0, return node text. If steps equals 1, return derivation + string at step. + + derivation steps + + + + + Get derivation and return how many you did (less than requested for + subtree roots. + + string buffer + derivation steps + + + + + Do a step-first walk, building up a buffer of tokens until + you've reached a particular step and print out any rule subroots + insteads of descending. + + derivation buffer + derivation steps + + + + + This token stream tracks the *entire* token stream coming from + a lexer, but does not pass on the whitespace (or whatever else + you want to discard) to the parser. + + + + This class can then be asked for the ith token in the input stream. + Useful for dumping out the input stream exactly after doing some + augmentation or other manipulations. Tokens are index from 0..n-1 + + + You can insert stuff, replace, and delete chunks. Note that the + operations are done lazily--only if you convert the buffer to a + string. This is very efficient because you are not moving data around + all the time. As the buffer of tokens is converted to strings, the + toString() method(s) check to see if there is an operation at the + current index. If so, the operation is done and then normal string + rendering continues on the buffer. This is like having multiple Turing + machine instruction streams (programs) operating on a single input tape. :) + + + Since the operations are done lazily at toString-time, operations do not + screw up the token index values. That is, an insert operation at token + index i does not change the index values for tokens i+1..n-1. + + + Because operations never actually alter the buffer, you may always get + the original token stream back without undoing anything. Since + the instructions are queued up, you can easily simulate transactions and + roll back any changes if there is an error just by removing instructions. + For example, + + For example: + + TokenStreamRewriteEngine rewriteEngine = new TokenStreamRewriteEngine(lexer); + JavaRecognizer parser = new JavaRecognizer(rewriteEngine); + ... + rewriteEngine.insertAfter("pass1", t, "foobar");} + rewriteEngine.insertAfter("pass2", u, "start");} + System.Console.Out.WriteLine(rewriteEngine.ToString("pass1")); + System.Console.Out.WriteLine(rewriteEngine.ToString("pass2")); + + + + You can also have multiple "instruction streams" and get multiple + rewrites from a single pass over the input. Just name the instruction + streams and use that name again when printing the buffer. This could be + useful for generating a C file and also its header file--all from the + same buffer. + + + If you don't use named rewrite streams, a "default" stream is used. + + + Terence Parr, parrt@cs.usfca.edu + University of San Francisco + February 2004 + + + + + + Track the incoming list of tokens + + + + + You may have multiple, named streams of rewrite operations. + I'm calling these things "programs." + Maps string (name) -> rewrite (List) + + + + + Map string (program name) -> Integer index + + + + + track index of tokens + + + + + Who do we suck tokens from? + + + + + Which (whitespace) token(s) to throw out + + + + + Rollback the instruction stream for a program so that + the indicated instruction (via instructionIndex) is no + longer in the stream. + + + UNTESTED! + + + + + + + Reset the program so that no instructions exist + + + + + + If op.index > lastRewriteTokenIndexes, just add to the end. + Otherwise, do linear + + + + + + Execute the rewrite operation by possibly adding to the buffer. + + rewrite buffer + The index of the next token to operate on. + + + + This token tracks it's own index 0..n-1 relative to the beginning + of the stream. It is designed to work with + in TokenStreamRewriteEngine.cs + + + + + Index into token array indicating position in input stream + + + + + @deprecated as of 2.7.2. This method calls System.exit() and writes + directly to stderr, which is usually not appropriate when + a parser is embedded into a larger application. Since the method is + static, it cannot be overridden to avoid these problems. + ANTLR no longer uses this method internally or in generated code. + + + + + + Implementation of the average aggregator. + + Aleksandar Seovic + + + + Defines an interface that should be implemented + by all collection processors and aggregators. + + + + + Processes a list of source items and returns a result. + + + The source list to process. + + + An optional processor arguments array. + + + The processing result. + + + + + Returns the average of the numeric values in the source collection. + + + The source collection to process. + + + Ignored. + + + The average of the numeric values in the source collection. + + + + + Converts all elements in the input list to a given target type. + + Erich Eichinger + + + + Processes a list of source items and returns a result. + + + The source list to process. + + + An optional processor arguments array. + + + The processing result. + + + + + Implementation of the count aggregator. + + Aleksandar Seovic + + + + Returns the number of items in the source collection. + + + The source collection to process. + + + Ignored. + + + The number of items in the source collection, + or zero if the collection is empty or null. + + + + + Converts a string literal to a instance. + + Erich Eichinger + + + + + Erich Eichinger + + + + Implementation of the distinct processor. + + Aleksandar Seovic + + + + Returns distinct items from the collection. + + + The source collection to process. + + + 0: boolean flag specifying whether to include null + in the results or not. Default is false, which means that + null values will not be included in the results. + + + A collection containing distinct source collection elements. + + + If there is more than one argument, or if the single optional argument + is not Boolean. + + + + + Implementation of the maximum aggregator. + + Aleksandar Seovic + + + + Returns the largest item in the source collection. + + + The source collection to process. + + + Ignored. + + + The largest item in the source collection. + + + + + Implementation of the minimum aggregator. + + Aleksandar Seovic + + + + Returns the smallest item in the source collection. + + + The source collection to process. + + + Ignored. + + + The smallest item in the source collection. + + + + + Implementation of the non-null processor. + + Aleksandar Seovic + + + + Returns non-null items from the collection. + + + The source collection to process. + + + Ignored. + + + A collection containing non-null source collection elements. + + + + + Implementation of the 'order by' processor. + + Aleksandar Seovic + Erich Eichinger + + + + Sorts the source collection using custom sort criteria. + + + Please note that your compare function needs to take care about + proper conversion of types to be comparable! + + + The source collection to sort. + + + Sort criteria to use. + + + A sorted array containing collection elements. + + + + + Reverts order of elements in the list + + Erich Eichinger + + + + Processes a list of source items and returns a result. + + + The source list to process. + + + An optional processor arguments array. + + + The processing result. + + + + + Implementation of the sort processor. + + Aleksandar Seovic + + + + Sorts the source collection. + + + Please not that this processor requires that collection elements + are of a uniform type and that they implement + interface. +

+ If you want to perform custom sorting based on element properties + you should consider using instead. + + + The source collection to sort. + + + Ignored. + + + An array containing sorted collection elements. + + + If collection is not empty and it is + neither nor . + + + +

+ Implementation of the sum aggregator. + + Aleksandar Seovic +
+ + + Returns the sum of the numeric values in the source collection. + + + The source collection to process. + + + Ignored. + + + The sum of the numeric values in the source collection. + + + + + Represents parsed method node in the navigation expression. + + Aleksandar Seovic + + + + Base type for nodes that accept arguments. + + Aleksandar Seovic + + + + Base type for all expression nodes. + + Aleksandar Seovic + + + + For internal purposes only. Use for expression node implementations. + + + This class is only required to enable serialization of parsed Spring expressions since antlr.CommonAST + unfortunately is not marked as [Serializable].
+
+ Note:Since SpringAST implements , deriving classes + have to explicitely override if they need to persist additional + data during serialization. +
+
+ + + The global SpringAST node factory + + + + + Create an instance + + + + + Create an instance from a token + + + + + initialize this instance from an AST + + + + + initialize this instance from an IToken + + + + + initialize this instance from a token type number and a text + + + + + sets the text of this node + + + + + gets the text of this node + + + + + Create a new instance from SerializationInfo + + + + + populate SerializationInfo from this instance + + + + + gets or sets the token type of this node + + + + + gets or sets the text of this node + + + + + Interface that all navigation expression nodes have to implement. + + Aleksandar Seovic + + + + Returns expression value. + + Value of the expression. + + + + Returns expression value. + + Object to evaluate expression against. + Value of the expression. + + + + Returns expression value. + + Object to evaluate expression against. + Expression variables map. + Value of the expression. + + + + Sets expression value. + + Object to evaluate expression against. + New value for the last node of the expression. + + + + Sets expression value. + + Object to evaluate expression against. + Expression variables map. + New value for the last node of the expression. + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns node's value. + + Node's value. + + + + Returns node's value for the given context. + + Object to evaluate node against. + Node's value. + + + + Returns node's value for the given context. + + Object to evaluate node against. + Expression variables map. + Node's value. + + + + Returns node's value for the given context. + + Node's value. + + + + Evaluates this node for the given context, switching local variables map to the ones specified in . + + + + + Sets node's value for the given context. + + Object to evaluate node against. + New value for this node. + + + + Sets node's value for the given context. + + Object to evaluate node against. + Expression variables map. + New value for this node. + + + + Sets node's value for the given context. + + +

+ This is a default implementation of Set method, which + simply throws . +

+

+ This was done in order to avoid redundant Set method implementations, + because most of the node types do not support value setting. +

+
+
+ + + Returns a string representation of this node instance. + + + + + Evaluates this node, switching local variables map to the ones specified in . + + + + + Holds the state during evaluating an expression. + + + + + Gets/Sets the root context of the current evaluation + + + + + Gets/Sets the current context of the current evaluation + + + + + Gets/Sets global variables of the current evaluation + + + + + Gets/Sets local variables of the current evaluation + + + + + Initializes a new EvaluationContext instance. + + The root context for this evaluation + dictionary of global variables used during this evaluation + + + + Switches current ThisContext. + + + + + Switches current LocalVariables. + + + + + Gets the type of the + + + + + Create a new instance + + + + + Create a new instance + + + + + Append an argument node to the list of child nodes + + + + + + Create a new instance from SerializationInfo + + + + + Initializes the node. + + + + + Asserts the argument count. + + The required count. + + + + Resolves the arguments. + + Current expression evaluation context. + An array of argument values + + + + Resolves the named arguments. + + Current expression evaluation context. + A dictionary of argument name to value mappings. + + + + Resolves the argument. + + Argument position. + Current expression evaluation context. + Resolved argument value. + + + + Resolves the argument without ensuring was called. + + Argument position. + Current expression evaluation context. + Resolved argument value. + + + + Resolves the named argument. + + Argument name. + Current expression evaluation context. + Resolved named argument value. + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Creates new instance of the type defined by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed assignment node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Assigns value of the right operand to the left one. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed attribute node in the navigation expression. + + Aleksandar Seovic + + + + Represents parsed method node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Creates new instance of the type defined by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Determines the type of object that should be instantiated. + + + The type name to resolve. + + + The type of object that should be instantiated. + + + If the type cannot be resolved. + + + + + Initializes this node by caching necessary constructor and property info. + + + + + + + Sets the named arguments (properties). + + Instance to set property values on. + Argument (property) name to value mappings. + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Tries to determine attribute type based on the specified + attribute type name. + + + Attribute type name to resolve. + + + Resolved attribute type. + + + If type cannot be resolved. + + + + + Base class for binary operators. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance with the supplied operands + + + + + + + Create a new instance from SerializationInfo + + + + + Evaluate the left operand + + + + + Evaluate the left operand + + + + + Gets the left operand. + + The left operand. + + + + Gets the right operand. + + The right operand. + + + + Represents parsed boolean literal node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the boolean literal node. + + + This is the entrypoint into evaluating this expression. + + Node's value. + + + + Represents parsed default node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns left operand if it is not null, or the right operand if it is. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Container object for the parsed expression. + + +

+ Preparing this object once and reusing it many times for expression + evaluation can result in significant performance improvements, as + expression parsing and reflection lookups are only performed once. +

+
+ Aleksandar Seovic +
+ + + Initializes a new instance of the class + by parsing specified expression string. + + Expression to parse. + + + + Registers lambda expression under the specified . + + Function name to register expression as. + Lambda expression to register. + Variables dictionary that the function will be registered in. + + + + Initializes a new instance of the class + by parsing specified primary expression string. + + Primary expression to parse. + + + + Initializes a new instance of the class + by parsing specified property expression string. + + Property expression to parse. + + + + Initializes a new instance of the class. + + + + + Create a new instance from SerializationInfo + + + + + Evaluates this expression for the specified root object and returns + value of the last node. + + Context to evaluate expressions against. + Current expression evaluation context. + Value of the last node. + + + + Evaluates this expression for the specified root object and sets + value of the last node. + + Context to evaluate expressions against. + Current expression evaluation context. + Value to set last node to. + If navigation expression is empty. + + + + Evaluates this expression for the specified root object and returns + of the last node, if possible. + + Context to evaluate expression against. + Expression variables map. + Value of the last node. + + + + Contains a list of reserved variable names. + You must not use any variable names with the reserved prefix! + + + + + Variable Names using this prefix are reserved for internal framework use + + + + + variable name of the currently processed object factory, if any + + + + + Converts string representation of expression into an instance of . + + Aleksandar Seovic + + + + Can we convert from a the sourcetype to a ? + + +

+ Currently only supports conversion from a instance. +

+
+ + A + that provides a format context. + + + A that represents the + you want to convert from. + + if the conversion is possible. +
+ + + Convert from a value to an + instance. + + + A + that provides a format context. + + + The to use + as the current culture. + + + The value that is to be converted. + + + A array if successful. + + + + + Utility class that enables easy expression evaluation. + + +

+ This class allows users to get or set properties, execute methods, and evaluate + logical and arithmetic expressions. +

+

+ Methods in this class parse expression on every invocation. + If you plan to reuse the same expression many times, you should prepare + the expression once using the static method, + and then call to evaluate it. +

+

+ This can result in significant performance improvements as it avoids expression + parsing and node resolution every time it is called. +

+

+

+
+ Aleksandar Seovic +
+ + + Parses and evaluates specified expression. + + Root object. + Expression to evaluate. + Value of the last node in the expression. + + + + Parses and evaluates specified expression. + + Root object. + Expression to evaluate. + Expression variables map. + Value of the last node in the expression. + + + + Parses and specified expression and sets the value of the + last node to the value of the newValue parameter. + + Root object. + Expression to evaluate. + Value to set last node to. + + + + Parses and specified expression and sets the value of the + last node to the value of the newValue parameter. + + Root object. + Expression to evaluate. + Expression variables map. + Value to set last node to. + + + + Represents parsed expression list node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a result of the last expression in a list. + + Context to evaluate expressions against. + Current expression evaluation context. + Result of the last expression in a list + + + + Represents parsed function node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Evaluates function represented by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Result of the function evaluation. + + + + Represents parsed hexadecimal integer literal node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the hexadecimal integer literal node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed indexer node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns node's value for the given context. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Sets node's value for the given context. + + Context to evaluate expressions against. + Current expression evaluation context. + New value for this node. + + + + Utility method that is needed by ObjectWrapper and AbstractAutowireCapableObjectFactory. + + Context to resolve property against. + Expression variables map. + PropertyInfo for this node. + + + + Represents parsed integer literal node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the integer literal node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents lambda expression. + + Aleksandar Seovic + + + + caches argumentNames of this instance + + + + + caches body expression of this lambda function + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Assigns value of the right operand to the left one. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Evaluates this node, switching local variables map to the ones specified in . + + + + + Gets argument names for this lambda expression. + + + + + Represents parsed list initializer node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Creates new instance of the list defined by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents local function node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Evaluates function represented by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Result of the function evaluation. + + + + Represents parsed variable node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns value of the local variable represented by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Sets value of the local variable represented by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + New value for this node. + + + + Represents parsed map entry node. + + Aleksandar Seovic + + + + Creates a new instance of . + + + + + Create a new instance from SerializationInfo + + + + + Creates new instance of the map entry defined by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed map initializer node in the navigation expression. + + Aleksandar Seovic + + + + Creates a new instance of . + + + + + Create a new instance from SerializationInfo + + + + + Creates new instance of the map defined by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed method node in the navigation expression. + + Aleksandar Seovic + + + + Static constructor. Initializes a map of special collection processor methods. + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns node's value for the given context. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Gets the best method given the name, argument values, for a given type. + + The type on which to search for the method. + Name of the method. + The binding flags. + The arg values. + Best matching method or null if none found. + + + + Represents parsed named argument node in the expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns the value of the named argument defined by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed null literal node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the null literal node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents arithmetic addition operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the arithmetic addition operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents AND operator (both, bitwise and logical). + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical AND operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents logical BETWEEN operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical IN operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + + true if the left operand is contained within the right operand, false otherwise. + + + + + Represents arithmetic division operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the arithmetic division operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents logical equality operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical equality operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents logical "greater than" operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical "greater than" operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents logical "greater than or equal" operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical "greater than or equal" operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents logical IN operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical IN operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + + true if the left operand is contained within the right operand, false otherwise. + + + + + Represents logical IS operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical IS operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + + true if the left operand is contained within the right operand, false otherwise. + + + + + Represents logical "less than" operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical "less than" operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents logical "less than or equal" operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical "less than or equal" operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents VB-style logical LIKE operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical LIKE operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + + true if the left operand matches the right operand, false otherwise. + + + + + Represents logical MATCHES operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical MATCHES operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + + true if the left operand matches the right operand, false otherwise. + + + + + Represents arithmetic modulus operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the arithmetic modulus operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents arithmetic multiplication operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the arithmetic multiplication operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents NOT operator (both, bitwise and logical). + + Aleksandar Seovic + + + + Base class for unary operators. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Gets the operand. + + The operand. + + + + Create a new instance + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical NOT operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents logical inequality operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical inequality operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents OR operator (both, bitwise and logical). + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical OR operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents arithmetic exponent operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the arithmetic exponent operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents arithmetic subtraction operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the arithmetic subtraction operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents unary minus operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the unary plus operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents unary plus operator. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the unary plus operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + + Erich Eichinger + + + + Create a new instance + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the logical AND operator node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed projection node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a containing results of evaluation + of projection expression against each node in the context. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents node that navigates to object's property or public field. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Initializes the node. + + The parent. + + + + Attempts to resolve property or field. + + + Type to search for a property or a field. + + + Property or field name. + + + Binding flags to use. + + + Resolved property or field accessor, or null + if specified cannot be resolved. + + + + + Returns node's value for the given context. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Sets node's value for the given context. + + Context to evaluate expressions against. + Current expression evaluation context. + New value for this node. + + + + Retrieves property or field value. + + Context to evaluate expressions against. + Current expression evaluation context. + Property or field value. + + + + Sets property value, doing any type conversions that are necessary along the way. + + Context to evaluate expressions against. + Current expression evaluation context. + New value for this node. + + + + Sets property or field value using either dynamic or standard reflection. + + Object to evaluate node against. + New value for this node, converted to appropriate type. + + + + In the case of read only collections or custom collections that are not assignable from + IList, try to add to the collection. + + Context to evaluate expressions against. + Current expression evaluation context. + New value for this node. + true if was able add to IList, IDictionary, or ISet + + + + Utility method that is needed by ObjectWrapper and AbstractAutowireCapableObjectFactory. + We try as hard as we can, but there are instances when we won't be able to obtain PropertyInfo... + + Context to resolve property against. + PropertyInfo for this node. + + + + Gets a value indicating whether this node represents a property. + + + true if this node is a property; otherwise, false. + + + + + Gets a value indicating whether this node represents a field. + + + true if this node is a field; otherwise, false. + + + + + Represents parsed named argument node in the expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns the value of the named argument defined by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Overrides getText to allow easy way to get fully + qualified identifier. + + + Fully qualified identifier as a string. + + + + + Represents parsed real literal node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the real literal node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents a reference to a Spring-managed object. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the integer literal node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed selection node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns the first context item that matches selection expression. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed selection node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns the last context item that matches selection expression. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed selection node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a containing results of evaluation + of selection expression against each node in the context. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed string literal node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the string literal node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Exception thrown when detecting invalid SpEL syntax + + Erich Eichinger + + + + TODO + + + + + TODO + + + + + + + + + + + + + + + + + + + + Gets a message that provides details on the syntax error. + + + + + The expression that caused the error + + + + + Represents ternary expression node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns a value for the string literal node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Represents parsed type node in the navigation expression. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns node's value for the given context. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Overrides getText to allow easy way to get fully + qualified typename. + + + Fully qualified typename as a string. + + + + + Represents parsed variable node. + + Aleksandar Seovic + + + + Create a new instance + + + + + Create a new instance from SerializationInfo + + + + + Returns value of the variable represented by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + Node's value. + + + + Sets value of the variable represented by this node. + + Context to evaluate expressions against. + Current expression evaluation context. + New value for this node. + + + + Implementation of that can be used to + format and parse boolean values. + + Erich Eichinger + + + + Interface that should be implemented by all formatters. + + + + Formatters assume that source value is a string, and make no assumptions + about the target value's type, which means that Parse method can return + object of any type. + + + Aleksandar Seovic + + + + Formats the specified value. + + The value to format. + Formatted . + + + + Parses the specified value. + + The value to parse. + Parsed . + + + + Initializes a new instance of the class + using default values + + + + + Initializes a new instance of the class + + + + + Formats the specified boolean value. + + The value to format. + Formatted boolean value. + If is null. + If is not of type . + + + + Parses the specified boolean value according to settings of and + + The boolean value to parse. + Parsed boolean value as a . + If does not match or . + + + + Set/Get value to control casesensitivity of + + + Defaults to true + + + + + Set/Get value to recognize as boolean "true" value + + + Defaults to + + + + + Set/Get value to recognize as boolean "false" value + + + Defaults to + + + + + Implementation of that can be used to + format and parse currency values. + + + + CurrencyFormatter uses currency related properties of the + to format and parse currency values. + + + If you use one of the constructors that accept culture as a parameter + to create an instance of CurrencyFormatter, default NumberFormatInfo + for the specified culture will be used. + + + You can also use properties exposed by the CurrencyFormatter in order + to override some of the default currency formatting parameters. + + + Aleksandar Seovic + + + + Initializes a new instance of the class + using default for the current thread's culture. + + + + + Initializes a new instance of the class + using default for the specified culture. + + The culture name. + + + + Initializes a new instance of the class + using default for the specified culture. + + The culture. + + + + Initializes a new instance of the class + using specified . + + + The instance that defines how + currency values are formatted. + + + + + Formats the specified currency value. + + The value to format. + Formatted currency . + If is null. + If is not a number. + + + + Parses the specified currency value. + + The currency value to parse. + Parsed currency value as a . + + + + Gets or sets the currency decimal digits. + + The currency decimal digits. + + + + + Gets or sets the currency decimal separator. + + The currency decimal separator. + + + + + Gets or sets the currency group sizes. + + The currency group sizes. + + + + + Gets or sets the currency group separator. + + The currency group separator. + + + + + Gets or sets the currency symbol. + + The currency symbol. + + + + + Gets or sets the currency negative pattern. + + The currency negative pattern. + + + + + Gets or sets the currency positive pattern. + + The currency positive pattern. + + + + + Implementation of that can be used to + format and parse values. + + + + DateTimeFormatter uses properties of the + to format and parse values. + + + If you use one of the constructors that accept culture as a parameter + to create an instance of DateTimeFormatter, default DateTimeFormatInfo + for the specified culture will be used. + + + You can also use properties exposed by the DateTimeFormatter in order + to override some of the default formatting parameters. + + + Aleksandar Seovic + + + + Initializes a new instance of the class + using default for the current thread's culture. + + Date/time format string. + + + + Initializes a new instance of the class + using default for the specified culture. + + Date/time format string. + The culture name. + + + + Initializes a new instance of the class + using default for the specified culture. + + Date/time format string. + The culture. + + + + Formats the specified value. + + The value to format. + Formatted value. + If is null. + If is not an instance of . + + + + Parses the specified value. + + The string to parse. + Parsed value. + + + + Provides base functionality for filtering values before they actually get parsed/formatted. + + Erich Eichinger + + + + Creates a new instance of this FilteringFormatter. + + an optional underlying formatter + + If no underlying formatter is specified, the values + get passed through "as-is" after being filtered + + + + + Parses the specified value. + + The value to parse. + Parsed . + + + + Formats the specified value. + + The value to format. + Formatted . + + + + Allows to rewrite a value before it gets parsed by the underlying formatter + + + + + Allows to change a value before it gets formatted by the underlying formatter + + + + + Implementation of that can be used to + format and parse floating point numbers. + + + + This formatter allows you to format and parse numbers that conform + to number style (leading and trailing + white space, leading sign, decimal point, exponent). + + + Aleksandar Seovic + + + + Default format string. + + + + + Initializes a new instance of the class, + using default format string of '{0:F}' and current thread's culture. + + + + + Initializes a new instance of the class, + using specified format string and current thread's culture. + + The format string. + + + + Initializes a new instance of the class, + using default format string of '{0:F}' and specified culture. + + The culture. + + + + Initializes a new instance of the class, + using specified format string and current thread's culture. + + The format string. + The culture name. + + + + Initializes a new instance of the class, + using specified format string and culture. + + The format string. + The culture. + + + + Formats the specified float value. + + The value to format. + Formatted floating point number. + If is null. + If is not a number. + + + + Parses the specified float value. + + The float value to parse. + Parsed float value as a . + + + + Replaces input strings with a given default value, + if they are null or contain whitespaces only, + + Erich Eichinger + + + + Creates a new instance of this HasTextFilteringFormatter using null as default value. + + an optional underlying formatter + + If no underlying formatter is specified, the values + get passed through "as-is" after being filtered + + + + + Creates a new instance of this HasTextFilteringFormatter. + + the default value to be returned, if input text doesn't contain text + an optional underlying formatter + + If no underlying formatter is specified, the values + get passed through "as-is" after being filtered + + + + + If value contains no text, it will be replaced by a defaultValue. + + + + + Implementation of that can be used to + format and parse integer numbers. + + + + This formatter allows you to format and parse numbers that conform + to number style (leading and trailing + white space, leading sign). + + + Aleksandar Seovic + + + + Initializes a new instance of the class, + using default format string of '{0:D}'. + + + + + Initializes a new instance of the class, + using specified format string. + + + + + Formats the specified integer value. + + The value to format. + Formatted integer number. + If is null. + If is not an integer number. + + + + Parses the specified integer value. + + The integer value to parse. + Parsed number value as a . + + + + Implementation of that simply calls . + + + This formatter is a no-operation implementation. + + Erich Eichinger + + + + Initializes a new instance of the class. + + + + + Converts the passed value to a string by calling . + + The value to convert. + to string converted value. + + + + Returns the passed string "as is". + + The value to return. + The value passed into this method. + + + + Implementation of that can be used to + format and parse numbers. + + + + NumberFormatter uses number-related properties of the + to format and parse numbers. + + + This formatter works with both integer and decimal numbers and allows + you to format and parse numbers that conform to + number style (leading and trailing white space and/or sign, thousands separator, + decimal point) + + + If you use one of the constructors that accept culture as a parameter + to create an instance of NumberFormatter, default NumberFormatInfo + for the specified culture will be used. + + + You can also use properties exposed by the NumberFormatter in order + to override some of the default number formatting parameters. + + + Aleksandar Seovic + + + + Initializes a new instance of the class + using default for the current thread's culture. + + + + + Initializes a new instance of the class + using default for the specified culture. + + The culture name. + + + + Initializes a new instance of the class + using default for the specified culture. + + The culture. + + + + Initializes a new instance of the class + using specified . + + + The instance that defines how + numbers are formatted and parsed. + + + + + Formats the specified number value. + + The value to format. + Formatted number . + If is null. + If is not a number. + + + + Parses the specified number value. + + The number value to parse. + Parsed number value as a . + + + + Gets or sets the number of decimal digits. + + The number of decimal digits. + + + + + Gets or sets the decimal separator. + + The decimal separator. + + + + + Gets or sets the number group sizes. + + The number group sizes. + + + + + Gets or sets the number group separator. + + The number group separator. + + + + + Gets or sets the negative pattern. + + The number negative pattern. + + + + + Implementation of that can be used to + format and parse numbers. + + + + PercentFormatter uses percent-related properties of the + to format and parse percentages. + + + If you use one of the constructors that accept culture as a parameter + to create an instance of PercentFormatter, default NumberFormatInfo + for the specified culture will be used. + + + You can also use properties exposed by the PercentFormatter in order + to override some of the default number formatting parameters. + + + Aleksandar Seovic + + + + Initializes a new instance of the class + using default for the current thread's culture. + + + + + Initializes a new instance of the class + using default for the specified culture. + + The culture name. + + + + Initializes a new instance of the class + using default for the specified culture. + + The culture. + + + + Initializes a new instance of the class + using specified . + + + The instance that defines how + numbers are formatted and parsed. + + + + + Formats the specified percentage value. + + The value to format. + Formatted percentage. + If is null. + If is not a number. + + + + Parses the specified percentage value. + + The percentage value to parse. + Parsed percentage value as a . + + + + Gets or sets the number of decimal digits. + + The number of decimal digits. + + + + + Gets or sets the decimal separator. + + The decimal separator. + + + + + Gets or sets the percent group sizes. + + The percent group sizes. + + + + + Gets or sets the percent group separator. + + The percent group separator. + + + + + Gets or sets the negative pattern. + + The percent negative pattern. + + + + + Gets or sets the positive pattern. + + The percent positive pattern. + + + + + Gets or sets the percent symbol. + + The percent symbol. + + + + + Gets or sets the per mille symbol. + + The per mille symbol. + + + + + Loads a list of resources that should be applied from the .NET . + + +

+ This implementation will iterate over all resource managers + within the message source and return a list of all the resources whose name starts with '$this'. +

+

+ All other resources will be ignored, but you can retrieve them by calling one of + GetMessage methods on the message source directly. +

+
+ Aleksandar Seovic +
+ + + Abstract base class that all localizers should extend + + +

+ This class contains the bulk of the localizer logic, including implementation + of the ApplyResources methods that are defined in + interface. +

+

+ All specific localizers need to do is inherit this class and implement + GetResources method that will return a list of + objects that should be applied to a specified target. +

+

+ Custom implementations can use whatever type of resource storage they want, + such as standard .NET resource sets, custom XML files, database, etc. +

+
+ Aleksandar Seovic +
+ + + Defines an interface that localizers have to implement. + + +

+ Localizers are used to automatically apply resources to object's members + using reflection. +

+
+ Aleksandar Seovic +
+ + + Applies resources of the specified culture to the specified target object. + + Target object to apply resources to. + instance to retrieve resources from. + Resource culture to use for resource lookup. + + + + Applies resources to the specified target object, using current thread's culture to resolve resources. + + Target object to apply resources to. + instance to retrieve resources from. + + + + Gets or sets the resource cache instance. + + The resource cache instance. + + + + Applies resources of the specified culture to the specified target object. + + Target object to apply resources to. + instance to retrieve resources from. + Resource culture to use for resource lookup. + + + + Applies resources to the specified target object, using current thread's uiCulture to resolve resources. + + Target object to apply resources to. + instance to retrieve resources from. + + + + Returns a list of instances that should be applied to the target. + + Target to get a list of resources for. + instance to retrieve resources from. + Resource locale. + A list of resources to apply. + + + + Loads resources from the storage and creates a list of instances that should be applied to the target. + + Target to get a list of resources for. + instance to retrieve resources from. + Resource locale. + A list of resources to apply. + + + + Gets or sets the resource cache instance. + + The resource cache instance. + + + + Loads resources from the storage and creates a list of instances that should be applied to the target. + + + This feature is not currently supported on version 1.0 of the .NET platform. + + Target to get a list of resources for. + instance to retrieve resources from. + Resource locale. + A list of resources to apply. + + + + implementation + that simply returns the + value of the + + property (if said property value is not ), or the + of the current thread if it is + . + + Aleksandar Seovic + + + + Strategy interface for + resolution. + + Aleksandar Seovic + + + + Resolves the + from some context. + + +

+ The 'context' is determined by the appropriate implementation class. + An example of such a context might be a thread local bound + , or a + sourced from an HTTP + session. +

+
+ + The that should be used + by the caller. + +
+ + + Sets the . + + +

+ This is an optional operation and does not need to be implemented + such that it actually does anything useful (i.e. it can be a no-op). +

+
+ + The new or + to clear the current . + +
+ + + Returns the default . + + +

+ It tries to get the + from the value of the + + property and falls back to the of the + current thread if the + + is . +

+
+ + The default + +
+ + + Resolves the + from some context. + + +

+ The 'context' in this implementation is the + value of the + + property (if said property value is not ), or the + of the current thread if it is + . +

+
+ + The that should be used + by the caller. + +
+ + + Sets the . + + + The new or + to clear the current . + + + + + + + The default . + + + The default . + + + + + Abstract base class that all resource cache implementations should extend. + + Aleksandar Seovic + + + + Defines an interface that resource cache adapters have to implement. + + Aleksandar Seovic + + + + Gets the list of resources from cache. + + Target to get a list of resources for. + Resource culture. + A list of cached resources for the specified target object and culture. + + + + Puts the list of resources in the cache. + + Target to cache a list of resources for. + Resource culture. + A list of resources to cache. + A list of cached resources for the specified target object and culture. + + + + Gets the list of resources from the cache. + + Target to get a list of resources for. + Resource culture. + A list of cached resources for the specified target object and culture. + + + + Puts the list of resources in the cache. + + Target to cache a list of resources for. + Resource culture. + A list of resources to cache. + A list of cached resources for the specified target object and culture. + + + + Crates resource cache key for the specified target object and culture. + + Target object to apply resources to. + Resource culture to use for resource lookup. + + + + Gets the list of resources from cache. + + Cache key to use for lookup. + A list of cached resources for the specified target object and culture. + + + + Puts the list of resources in the cache. + + Cache key to use for the specified resources. + A list of resources to cache. + A list of cached resources for the specified target object and culture. + + + + Resource cache implementation that doesn't cache resources. + + Aleksandar Seovic + + + + Gets the list of resources from cache. + + Cache key to use for lookup. + Always returns null. + + + + Puts the list of resources in the cache. + + Cache key to use for the specified resources. + A list of resources to cache. + + + + Holds mapping between control property and it's value + as read from the resource file. + + Aleksandar Seovic + + + + Creates instance of resource mapper. + + Target property. + Resource value. + + + + Gets parsed target property expression. See + for more information on object navigation expressions. + + + + + Value of the resource that target property should be set to. + + + + + Utility class to aid in the manipulation of events and delegates. + + Griffin Caprio + + + + Returns a new instance of the requested . + + +

+ Often used to wire subscribers to event publishers. +

+
+ + The of delegate to create. + + + The target subscriber object that contains the delegate implementation. + + + referencing the delegate method on the subscriber. + + + A delegate handler that can be added to an events list of handlers, or called directly. + +
+ + + Queries the input type for a signature matching the input + signature. + + + Typically used to query a potential subscriber to see if they implement an event handler. + + to match against + to query + + matching input + signature, or if there is no match. + + + + + Creates a new instance of the EventManipulationUtilities class. + + +

+ This is a utility class, and as such has no publicly visible constructors. +

+
+
+ + + Default implementation of the + interface. + + Griffin Caprio + + + + Creates a new instance of the EventRegistry class. + + + + + Adds the input object to the list of publishers. + + + This publishes all events of the source object to any object + wishing to subscribe + + The source object to publish. + + + + Subscribes to all events published, if the subscriber implements + compatible handler methods. + + The subscriber to use. + + + + Subscribes to published events of all objects of a given type, if the + subscriber implements compatible handler methods. + + The subscriber to use. + + The target to subscribe to. + + + + + Unsubscribes to all events published, if the subscriber + implmenets compatible handler methods. + + The subscriber to use + + + + Unsubscribes to the published events of all objects of a given + , if the subscriber implements + compatible handler methods. + + The subscriber to use. + The target to unsubscribe from + + + + The list of event publishers. + + The list of event publishers. + + + + To be implemented by any object that wishes to receive a reference to + an . + + +

+ This interface only applies to objects that have been instantiated + within the context of an + . This interface does + not typically need to be implemented by application code, but is rather + used by classes internal to Spring.NET. +

+
+ Mark Pollack + Rick Evans +
+ + + Set the + associated with the + that created this + object. + + +

+ This property will be set by the relevant + after all of this + object's dependencies have been resolved. This object can use the + supplied + immediately to publish or subscribe to one or more events. +

+
+
+ + + Marks a property as being 'required': that is, the setter property + must be configured to be dependency-injected with a value. + + Consult the SDK documentation for , + which, by default, checks for the presence of this annotation. + + Rob Harrop + Mark Pollack + + + + A implementation that enforces required properties to have been configured. + Required properties are detected through an attribute, by default, Spring's + attribute. + + + The motivation for the existence of this IObjectPostProcessor is to allow + developers to annotate the setter properties of their own classes with an + arbitrary attribute to indicate that the container must check + for the configuration of a dependency injected value. This neatly pushes + responsibility for such checking onto the container (where it arguably belongs), + and obviates the need (in part) for a developer to code a method that + simply checks that all required properties have actually been set. + + Please note that an 'init' method may still need to implemented (and may + still be desirable), because all that this class does is enforce that a + 'required' property has actually been configured with a value. It does + not check anything else... In particular, it does not check that a + configured value is not null. + + + Rob Harrop + Juergen Hoeller + Mark Pollack (.NET) + + + + Adapter that implements all methods on + as no-ops, which will not change normal processing of each object instantiated + by the container. Subclasses may override merely those methods that they are + actually interested in. + + + Note that this base class is only recommendable if you actually require + functionality. If all you need + is plain functionality, prefer a straight + implementation of that (simpler) interface. + + Rod Johnson + Juergen Hoeller + Mark Pollack (.NET) + + + + Extension of the interface, + adding a callback for predicting the eventual type of a processed object. + + This interface is a special purpose interface, mainly for + internal use within the framework. In general, application-provided + post-processors should simply implement the plain + interface or derive from the + class. New methods might be added to this interface even in point releases. + + + Juergen Hoeller + Mark Pollack (.NET) + + + + Subinterface of + + that adds a before-instantiation callback and a callback after instantiation but before + explicit properties are set or autowiring occurs. + + + + Typically used to suppress default instantiation for specific target objects, + for example to create proxies with special Spring.Aop.ITargetSources (pooling targets, + lazily initializing targets, etc), or to implement additional injection strategies such as field + injection. + + + This interface is a special purpose interface, mainly for internal use within the framework. + It is recommended to implement the plain interface as far as + possible, or to derive from in order to be shielded + from extension to this interface. + + + Juergen Hoeller + Rick Evans (.NET) + + + + Apply this + + before the target object gets instantiated. + + +

+ The returned object may be a proxy to use instead of the target + object, effectively suppressing the default instantiation of the + target object. +

+

+ If the object is returned by this method is not + , the object creation process will be + short-circuited. The returned object will not be processed any + further; in particular, no further + + callbacks will be applied to it. This mechanism is mainly intended + for exposing a proxy instead of an actual target object. +

+

+ This callback will only be applied to object definitions with an + object class. In particular, it will not be applied to + objects with a "factory-method" (i.e. objects that are to be + instantiated via a layer of indirection anyway). +

+
+ + The of the target object that is to be + instantiated. + + + The name of the target object. + + + The object to expose instead of a default instance of the target + object. + + + In the case of any errors. + + + +
+ + + Perform operations after the object has been instantiated, via a constructor or factory method, + but before Spring property population (from explicit properties or autowiring) occurs. + + The object instance created, but whose properties have not yet been set + Name of the object. + true if properties should be set on the object; false if property population + should be skipped. Normal implementations should return true. Returning false will also + prevent any subsequent InstantiationAwareObjectPostProcessor instances from being + invoked on this object instance. + + + + Post-process the given property values before the factory applies them + to the given object. + + Allows for checking whether all dependencies have been + satisfied, for example based on a "Required" annotation on bean property setters. + Also allows for replacing the property values to apply, typically through + creating a new MutablePropertyValues instance based on the original PropertyValues, + adding or removing specific values. + + + The property values that the factory is about to apply (never null). + he relevant property infos for the target object (with ignored + dependency types - which the factory handles specifically - already filtered out) + The object instance created, but whose properties have not yet + been set. + Name of the object. + The actual property values to apply to the given object (can be the + passed-in PropertyValues instances0 or null to skip property population. + + + + Predicts the type of the object to be eventually returned from this + processors callback. + + The raw Type of the object. + Name of the object. + The type of the object, or null if not predictable. + in case of errors + + + + Determines the candidate constructors to use for the given object. + + The raw Type of the object. + Name of the object. + The candidate constructors, or null if none specified + in case of errors + + + + Predicts the type of the object to be eventually returned from this + processors PostProcessBeforeInstantiation callback. + + The raw Type of the object. + Name of the object. + The type of the object, or null if not predictable. + in case of errors + + + + Determines the candidate constructors to use for the given object. + + The raw Type of the object. + Name of the object. + The candidate constructors, or null if none specified + in case of errors + + + + Apply this + + before the target object gets instantiated. + + +

+ The returned object may be a proxy to use instead of the target + object, effectively suppressing the default instantiation of the + target object. +

+

+ If the object is returned by this method is not + , the object creation process will be + short-circuited. The returned object will not be processed any + further; in particular, no further + + callbacks will be applied to it. This mechanism is mainly intended + for exposing a proxy instead of an actual target object. +

+

+ This callback will only be applied to object definitions with an + object class. In particular, it will not be applied to + objects with a "factory-method" (i.e. objects that are to be + instantiated via a layer of indirection anyway). +

+
+ + The of the target object that is to be + instantiated. + + + The name of the target object. + + + The object to expose instead of a default instance of the target + object. + + + In the case of any errors. + + + +
+ + + Perform operations after the object has been instantiated, via a constructor or factory method, + but before Spring property population (from explicit properties or autowiring) occurs. + + The object instance created, but whose properties have not yet been set + Name of the object. + true if properties should be set on the object; false if property population + should be skipped. Normal implementations should return true. Returning false will also + prevent any subsequent InstantiationAwareObjectPostProcessor instances from being + invoked on this object instance. + + + + Post-process the given property values before the factory applies them + to the given object. + + Allows for checking whether all dependencies have been + satisfied, for example based on a "Required" annotation on bean property setters. + Also allows for replacing the property values to apply, typically through + creating a new MutablePropertyValues instance based on the original PropertyValues, + adding or removing specific values. + + + The property values that the factory is about to apply (never null). + he relevant property infos for the target object (with ignored + dependency types - which the factory handles specifically - already filtered out) + The object instance created, but whose properties have not yet + been set. + Name of the object. + The actual property values to apply to the given object (can be the + passed-in PropertyValues instances0 or null to skip property population. + + + + Apply this + to the given new object instance before any object initialization callbacks. + + +

+ The object will already be populated with property values. + The returned object instance may be a wrapper around the original. +

+
+ + The new object instance. + + + The name of the object. + + + The object instance to use, either the original or a wrapped one. + + + In case of errors. + +
+ + + Apply this to the + given new object instance after any object initialization callbacks. + + +

+ The object will already be populated with property values. The returned object + instance may be a wrapper around the original. +

+
+ + The new object instance. + + + The name of the object. + + + The object instance to use, either the original or a wrapped one. + + + In case of errors. + +
+ + + Cache for validated object names, skipping re-validation for the same object + + + + + Post-process the given property values before the factory applies them + to the given object. Checks for the attribute specified by this PostProcessor's RequiredAttributeType. + + The property values that the factory is about to apply (never null). + The relevant property infos for the target object (with ignored + dependency types - which the factory handles specifically - already filtered out) + The object instance created, but whose properties have not yet + been set. + Name of the object. + + The actual property values to apply to the given object (can be the + passed-in PropertyValues instances or null to skip property population. + + If a required property value has not been specified + in the configuration metadata. + + + + Determines whether the supplied property is required to have a value, that is to be dependency injected. + + + This implementation looks for the existence of a "required" attribute on the supplied PropertyInfo and that + the property has a setter method. + + The target PropertyInfo + + true if the supplied property has been marked as being required;; otherwise, false if + not or if the supplied property does not have a setter method + + + + + Builds an exception message for the given list of invalid properties. + + The list of names of invalid properties. + Name of the object. + The exception message + + + + Sets the type of the required attribute, to be used on a property setter + + + The default required attribute type is the Spring-provided attribute. + This setter property exists so that developers can provide their own + (non-Spring-specific) annotation type to indicate that a property value is required. + + The type of the required attribute. + + + + Base class that provides common functionality needed for several IObjectFactoryPostProcessor + implementations + + Mark Pollack + + + + Allows for custom modification of an application context's object + definitions, adapting the object property values of the context's + underlying object factory. + + +

+ Application contexts can auto-detect + IObjectFactoryPostProcessor objects in their object definitions and + apply them before any other objects get created. +

+

+ Useful for custom config files targeted at system administrators that + override object properties configured in the application context. +

+

+ See PropertyResourceConfigurer and its concrete implementations for + out-of-the-box solutions that address such configuration needs. +

+
+ Juergen Hoeller + Rick Evans (.Net) +
+ + + Modify the application context's internal object factory after its + standard initialization. + + +

+ All object definitions will have been loaded, but no objects will have + been instantiated yet. This allows for overriding or adding properties + even to eager-initializing objects. +

+
+ + The object factory used by the application context. + + + In case of errors. + +
+ + + Modify the application context's internal object factory after its + standard initialization. + + The object factory used by the application context. + +

+ All object definitions will have been loaded, but no objects will have + been instantiated yet. This allows for overriding or adding properties + even to eager-initializing objects. +

+
+ + In case of errors. + +
+ + + Resolves the supplied into a + instance. + + The object that is to be resolved into a + instance. + The error context source. + The error context string. + A resolved . + +

+ This (default) implementation supports resolving + s and s. + Only override this method if you want to key your type alias + on something other than s + and s. +

+
+ + If the supplied is , + or the supplied cannot be resolved. + +
+ + + Return the order value of this object, with a higher value meaning + greater in terms of sorting. + + The order value. + + + + + Simple template superclass for + implementations that allows for the creation of a singleton or a prototype + instance (depending on a flag). + + + If the value of the + + property is (this is the default), this class + will create a single instance of it's object upon initialization and + subsequently return the singleton instance; else, this class will + create a new instance each time (prototype mode). Subclasses must + implement the + + template method to actually create objects. + + Juergen Hoeller + Keith Donald + Simon White (.NET) + + + + Interface to be implemented by objects used within an + that are themselves + factories. + + +

+ If an object implements this interface, it is used as a factory, + not directly as an object. s + can support singletons and prototypes + ()... + please note that an + itself can only ever be a singleton. It is a logic error to configure an + itself to be a prototype. +

+ + An object that implements this interface cannot be used as a normal object. + +
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) +
+ + + Return an instance (possibly shared or independent) of the object + managed by this factory. + + + + If this method is being called in the context of an enclosing IoC container and + returns , the IoC container will consider this factory + object as not being fully initialized and throw a corresponding (and most + probably fatal) exception. + + + + An instance (possibly shared or independent) of the object managed by + this factory. + + + + + Return the of object that this + creates, or + if not known in advance. + + + + + Is the object managed by this factory a singleton or a prototype? + + + + + Invoked by an + after it has injected all of an object's dependencies. + + + In the event of misconfiguration (such as the failure to set a + required property) or if initialization fails. + + + + + + Return an instance (possibly shared or independent) of the object + managed by this factory. + + + An instance (possibly shared or independent) of the object managed by + this factory. + + + + + + Template method that subclasses must override to construct + the object returned by this factory. + + + Invoked once immediately after the initialization of this + in the case of + a singleton; else, on each call to the + + method. + + + If an exception occured during object creation. + + + A distinct instance of the object created by this factory. + + + + + Performs cleanup on any cached singleton object. + + +

+ Only makes sense in the context of a singleton object. +

+
+ + +
+ + + Is the object managed by this factory a singleton or a prototype? + + +

+ Please note that changing the value of this property after + this factory object instance has been created by an enclosing + Spring.NET IoC container really is a programming error. This + property should really only be set once, prior to the invocation + of the + + callback method. +

+
+ +
+ + + Return the of object that this + creates, or + if not known in advance. + + + + + + The various autowiring modes. + + Rick Evans + + + + Do not autowire. + + + + + Autowire by name. + + + + + Autowire by . + + + + + Autowiring by constructor. + + + + + The autowiring strategy is to be determined by introspection + of the object's . + + + + + Implementation of that + resolves variable name against command line arguments. + + Aleksandar Seovic + + + + Defines contract that different variable sources have to implement. + + +

+ The "variable sources" are objects containing name-value pairs + that allow a variable value to be retrieved for the given name.

+

+ Out of the box, Spring.NET supports a number of variable sources, + that allow users to obtain variable values from .NET config files, + Java-style property files, environment, registry, etc.

+

+ Users can always write their own variable sources implementations, + that will allow them to load variable values from the database or + other proprietary data source.

+
+ + + + + + + Aleksandar Seovic +
+ + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Resolves variable value for the specified variable name. + + + The name of the variable to resolve. + + + The variable value if able to resolve, null otherwise. + + + + + Default constructor. + Initializes command line arguments from the environment. + + + + + Constructor that allows arguments to be passed externally. + Useful for testing. + + + + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Resolves variable value for the specified variable name. + + + The name of the variable to resolve. + + + The variable value if able to resolve, null otherwise. + + + + + Initializes command line arguments dictionary. + + + + + Gets or sets a prefix that should be used to + identify arguments to extract values from. + + + A prefix that should be used to identify arguments + to extract values from. Defaults to slash ("/"). + + + + + Gets or sets a character that should be used to + separate argument name from its value. + + + A character that should be used to separate argument + name from its value. Defaults to colon (":"). + + + + + Implementation of that + resolves variable name against name-value sections in + the standard .NET configuration file. + + Aleksandar Seovic + + + + Initializes a new instance of + + + + + Initializes a new instance of from the given + + + + + Initializes a new instance of from the given + + + + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Resolves variable value for the specified variable name. + + + The name of the variable to resolve. + + + The variable value if able to resolve, null otherwise. + + + + + Initializes properties based on the specified + property file locations. + + + + + Gets or sets a list of section names variables should be loaded from. + + + All sections specified need to be handled by the + in order to be processed successfully. + + + A list of section names variables should be loaded from. + + + + + Convinience property. Gets or sets a single section + to read properties from. + + + The section specified needs to be handled by the + in order to be processed successfully. + + + A section to read properties from. + + + + + Various utility methods for .NET style .config files. + + +

+ Currently supports reading custom configuration sections and returning them as + objects. +

+
+ Simon White + Mark Pollack +
+ + + Initializes the type members + + + + + Reads the specified configuration section into a + . + + The resource to read. + The section name. + + A newly populated + . + + + If any errors are encountered while attempting to open a stream + from the supplied . + + + If any errors are encountered while loading or reading (this only applies to + v1.1 and greater of the .NET Framework) the actual XML. + + + If any errors are encountered while loading or reading (this only applies to + v1.0 of the .NET Framework). + + + If the configuration section was otherwise invalid. + + + + + Reads the specified configuration section into the supplied + . + + The resource to read. + The section name. + + The collection that is to be populated. May be + . + + + A newly populated + . + + + If any errors are encountered while attempting to open a stream + from the supplied . + + + If any errors are encountered while loading or reading (this only applies to + v1.1 and greater of the .NET Framework) the actual XML. + + + If any errors are encountered while loading or reading (this only applies to + v1.0 of the .NET Framework). + + + If the configuration section was otherwise invalid. + + + + + Reads the specified configuration section into the supplied + . + + The resource to read. + The section name. + + The collection that is to be populated. May be + . + + + If a key already exists, is its value to be appended to the current + value or replaced? + + + The populated + . + + + If any errors are encountered while attempting to open a stream + from the supplied . + + + If any errors are encountered while loading or reading (this only applies to + v1.1 and greater of the .NET Framework) the actual XML. + + + If any errors are encountered while loading or reading (this only applies to + v1.0 of the .NET Framework). + + + If the configuration section was otherwise invalid. + + + + + Read from the specified configuration from the supplied XML + into a + . + + + + Does not support section grouping. The supplied XML + must already be loaded. + + + + The to read from. + + + The configuration section name to read. + + + A newly populated + . + + + If any errors are encountered while reading (this only applies to + v1.1 and greater of the .NET Framework). + + + If any errors are encountered while reading (this only applies to + v1.0 of the .NET Framework). + + + If the configuration section was otherwise invalid. + + + + + Returns the section from the specified resource with the given section name + + + + + Returns the typed section from the specified resource with the given section name + + + + + Returns the typed result of evaluating the specified . + + if the result's type does not match the expected type + + + + Reads the specified configuration section from the given + + + + + + + + Populates the supplied with values from + a .NET application configuration file. + + + The + to add any key-value pairs to. + + + The configuration section name in the a .NET application configuration + file. + + + If a key already exists, is its value to be appended to the current + value or replaced? + + + if the supplied + was found. + + + + + Creates a new instance of the ConfigurationReader class. + + +

+ This is a utility class, and as such has no publicly visible + constructors. +

+
+
+ + + Implementation of that + resolves variable name connection strings defined in + the standard .NET configuration file. + + +

+ When the <connectionStrings> configuration section is processed by this class, + two variables are defined for each connection string: one for connection string and + the second one for the provider name.

+

+ Variable names are generated by appending '.connectionString' and '.providerName' + literals to the value of the name attribute of the connection string element. + For example:

+
+            
+               
+            
+            
+

+ will result in two variables being created: myConn.connectionString and myConn.providerName. + You can reference these variables within your object definitions, just like any other variable.

+
+ Aleksandar Seovic +
+ + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Resolves variable value for the specified variable name. + + + The name of the variable to resolve. + + + The variable value if able to resolve, null otherwise. + + + + + Initializes properties based on the specified + property file locations. + + + + + Holder for constructor argument values for an object. + + +

+ Supports values for a specific index or parameter name (case + insensitive) in the constructor argument list, and generic matches by + . +

+
+ Juergen Hoeller + Rick Evans (.NET) + +
+ + + Can be used as an argument filler for the + + overload when one is not looking for an argument by index. + + + + + Creates a new instance of the + + class. + + + + + Creates a new instance of the + + class. + + + The + to be used to populate this instance. + + + + + Copy all given argument values into this object. + + + The + to be used to populate this instance. + + + + + Add argument value for the given index in the constructor argument list. + + + The index in the constructor argument list. + + + The argument value. + + + + + Add argument value for the given index in the constructor argument list. + + The index in the constructor argument list. + The argument value. + + The of the argument + . + + + + + Add argument value for the given name in the constructor argument list. + + The name in the constructor argument list. + The argument value. + + If the supplied is + or is composed wholly of whitespace. + + + + + Get argument value for the given index in the constructor argument list. + + The index in the constructor argument list. + + The required of the argument. + + + The + + for the argument, or if none set. + + + + + Get argument value for the given name in the constructor argument list. + + The name in the constructor argument list. + + The + + for the argument, or if none set. + + + + + Does this set of constructor arguments contain a named argument matching the + supplied name? + + + + The comparison is performed in a case-insensitive fashion. + + + The named argument to look up. + + if this set of constructor arguments + contains a named argument matching the supplied + name. + + + + + Add generic argument value to be matched by type. + + + The argument value. + + + + + Add generic argument value to be matched by type. + + The argument value. + + The of the argument + . + + + + + Look for a generic argument value that matches the given + . + + + The to match. + + + The + + for the argument, or if none set. + + + + + Look for a generic argument value that matches the given + . + + + The to match. + + + A of + + objects that have already been used in the current resolution + process and should therefore not be returned again; this allows one + to return the next generic argument match in the case of multiple + generic argument values of the same type. + + + The + + for the argument, or if none set. + + + + + Look for an argument value that either corresponds to the given index + in the constructor argument list or generically matches by + . + + + The index in the constructor argument list. + + + The to match. + + + The + + for the argument, or if none is set. + + + + + Look for an argument value that either corresponds to the given index + in the constructor argument list or generically matches by + . + + + The index in the constructor argument list. + + + The to match. + + + A of + + objects that have already been used in the current resolution + process and should therefore not be returned again; this allows one + to return the next generic argument match in the case of multiple + generic argument values of the same type. + + + The + + for the argument, or if none is set. + + + + + Look for an argument value that either corresponds to the given index + in the constructor argument list or generically matches by + . + + + The name of the argument in the constructor argument list. May be + , in which case generic matching by + is assumed. + + + The to match. + + + The + + for the argument, or if none is set. + + + + + Look for an argument value that either corresponds to the given index + in the constructor argument list or generically matches by + . + + + The name of the argument in the constructor argument list. May be + , in which case generic matching by + is assumed. + + + The to match. + + + A of + + objects that have already been used in the current resolution + process and should therefore not be returned again; this allows one + to return the next generic argument match in the case of multiple + generic argument values of the same type. + + + The + + for the argument, or if none is set. + + + + + Look for an argument value that either corresponds to the given index + in the constructor argument list, or to the named argument, or + generically matches by . + + + The index of the argument in the constructor argument list. May be + negative, to denote the fact that we are not looking for an + argument by index (see + . + + + The name of the argument in the constructor argument list. May be + . + + + The to match. + + + A of + + objects that have already been used in the current resolution + process and should therefore not be returned again; this allows one + to return the next generic argument match in the case of multiple + generic argument values of the same type. + + + The + + for the argument, or if none is set. + + + + + Return the map of indexed argument values. + + + An with + indices as keys and + s + as values. + + + + + Return the map of named argument values. + + + An with + named arguments as keys and + s + as values. + + + + + Return the set of generic argument values. + + + A of + s. + + + + + Return the number of arguments held in this instance. + + + + + Returns true if this holder does not contain any argument values, + neither indexed ones nor generic ones. + + + + + Holder for a constructor argument value, with an optional + attribute indicating the target + of the actual constructor argument. + + + + + Creates a new instance of the ValueHolder class. + + + The value of the constructor argument. + + + + + Creates a new instance of the ValueHolder class. + + + The value of the constructor argument. + + + The of the argument + . Can also be one of the common + aliases (int, bool, + float, etc). + + + + + A that represents the current + . + + + A that represents the current + . + + + + + Gets and sets the value for the constructor argument. + + +

+ Only necessary for manipulating a registered value, for example in + s. +

+
+
+ + + Return the of the constructor + argument. + + + + + + implementation that allows for convenient registration of custom + s. + + + + The use of this class is typically not required; the .NET + mechanism of associating a + with a + via the use of the + is the + recommended (and standard) way. This class primarily exists to cover + those cases where third party classes to which one does not have the + source need to be exposed to the type conversion mechanism. + +

+ Because the + + class implements the + + interface, instances of this class that have been exposed in the + scope of an + will + automatically be picked up by the application context and made + available to the IoC container whenever type conversion is required. If + one is using a + + object definition within the scope of an + , no such automatic + pickup of the + + is performed (custom converters will have to be added manually using the + + method). For most application scenarios, one will get better + mileage using the + abstraction. +

+
+ +

+ The following examples all assume XML based configuration, and use + inner object definitions to define the custom + objects (nominally to + avoid polluting the object name space, but also because the + configuration simply reads better that way). +

+ + + + + + + + + + + + + + + + +

+ The following example illustrates a complete (albeit naieve) use case + for this class, including a custom + implementation, said + converters domain class, and the XML configuration that hooks the + converter in place and makes it available to a Spring.NET container for + use during object resolution. +

+

+ The domain class is a simple data-only object that contains the data + required to send an email message (such as the host and user account + name). A developer would prefer to use a string of the form + UserName=administrator,Password=r1l0k1l3y,Host=localhost to + configure the mail settings and just let the container take care of the + conversion. +

+ + namespace ExampleNamespace + { + public sealed class MailSettings + { + private string _userName; + private string _password; + private string _host; + + public string Host + { + get { return _host; } + set { _host = value; } + } + + public string UserName + { + get { return _userName; } + set { _userName = value; } + } + + public string Password + { + get { return _password; } + set { _password = value; } + } + } + + public sealed class MailSettingsConverter : TypeConverter + { + public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) + { + if (typeof (string) == sourceType) + { + return true; + } + return base.CanConvertFrom(context, sourceType); + } + + public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) + { + string text = value as string; + if(text != null) + { + MailSettings mailSettings = new MailSettings(); + string[] tokens = text.Split(','); + for (int i = 0; i < tokens.Length; ++i) + { + string token = tokens[i]; + string[] settings = token.Split('='); + typeof(MailSettings).GetProperty(settings[0]) + .SetValue(mailSettings, settings[1], null); + } + return mailSettings; + } + return base.ConvertFrom(context, culture, value); + } + } + + // a very naieve class that uses the MailSettings class... + public sealed class ExceptionLogger + { + private MailSettings _mailSettings; + + public MailSettings MailSettings { + { + set { _mailSettings = value; } + } + + public void Log(object value) + { + Exception ex = value as Exception; + if(ex != null) + { + // use _mailSettings instance... + } + } + } + } + +

+ The attendant XML configuration for the above classes would be... +

+ + + + + + + + + + + + + + + + Juergen Hoeller + Simon White (.NET) + + + + + + + Registers any custom converters with the supplied + . + + + The object factory to register the converters with. + + + In case of errors. + + + + + Resolves the supplied into a + instance. + + + The object that is to be resolved into a + instance. + + + A resolved instance. + + + If the supplied is , + or the supplied cannot be resolved. + + + + + The custom converters to register. + + +

+ The uses the type name + of the class that requires conversion as the key, and an + instance of the + that will effect + the conversion. Alternatively, the actual + of the class that requires conversion + can be used as the key. +

+
+ +

+ + IDictionary converters = new Hashtable(); + converters.Add( "System.Date", new MyCustomDateConverter() ); + // a System.Type instance can also be used as the key... + converters.Add( typeof(Color), new MyCustomRBGColorConverter() ); + +

+
+
+ + + implementation that + creates delegates. + + +

+ Supports the creation of s for both + instance and methods. +

+
+ Rick Evans +
+ + + Callback method called once all factory properties have been set. + + + In the event of misconfiguration (such as failure to set an essential + property) or if initialization fails. + + + + + + Creates the delegate. + + + If an exception occured during object creation. + + The object returned by this factory. + + + + + The of + created by this factory. + + +

+ Returns the + if accessed prior to the method + being called. +

+
+
+ + + The of the + created by this factory. + + + + + The name of the method that is to be invoked by the created + delegate. + + + + + The target if the + refers to a method. + + + + + The target object if the + refers to an instance method. + + + + + A generic implementation of an , that delegates post processing to a passed delegate + + + This comes in handy when you want to perform specific tasks on an object factory, e.g. doing special initialization. + + + The example below is taken from a unit test. The snippet causes 'someObject' to be registered each time is called on + the context instance: + + IConfigurableApplicationContext ctx = new XmlApplicationContext(false, "name", false, null); + ctx.AddObjectFactoryPostProcessor(new DelegateObjectFactoryConfigurer( of => + { + of.RegisterSingleton("someObject", someObject); + })); + + + Erich Eichinger + + + + Get or Set the handler to delegate configuration to + + + + + Descriptor for a specific dependency that is about to be injected. + Wraps a constructor parameter, a method parameter or a field, + allowing unified access to their metadata. + + Juergen Hoeller + Mark Pollack + + + + Initializes a new instance of the class for a method or constructor parameter. + Considers the dependency as 'eager' + + The MethodParameter to wrap. + if set to true if the dependency is required. + + + + Initializes a new instance of the class for a method or a constructor parameter. + + The MethodParameter to wrap. + if set to true the dependency is required. + if set to true the dependency is 'eager' in the sense of + eagerly resolving potential target objects for type matching. + + + + Gets a value indicating whether this dependency is required. + + true if required; otherwise, false. + + + + Determine the declared (non-generic) type of the wrapped parameter/field. + + The type of the dependency (never null + + + + Gets a value indicating whether this is eager in the sense of + eagerly resolving potential target beans for type matching. + + true if eager; otherwise, false. + + + + Gets the wrapped MethodParameter, if any. + + The method parameter. + + + + Simple factory for shared instances. + + Juergen Hoeller + Simon White (.NET) + + + + Constructs a new instance of the target dictionary. + + The new instance. + + + + Set the source . + + +

+ This value will be used to populate the + returned by this factory. +

+
+
+ + + Set the of the + implementation to use. + + +

+ The default is the . +

+
+ + If the value is . + + + If the value is an . + + + If the value is an interface. + +
+ + + The of objects created by this factory. + + + Always returns the . + + + + + A very simple, hashtable-based implementation of + + Erich Eichinger + + + + Creates a new, empty variable source + + + + + Creates a new, empty and case-insensitive variable source + + + + + Create a new variable source from a list of paired string values. + + + + The example below shows, how the dictionary is filled with { 'key1', 'value1' }, { 'key2', 'value2' } pairs: + + new DictionaryVariableSource( new string[] { "key1", "value1", "key2", "value2" } ) + + + + the argument list containing pairs, or null + + + + Creates a new variable source, reading values from another dictionary + and converting them to strings if necessary + + + + + Adds a key/value pair + + this dictionary. allows for fluent config + + + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Performs a variable name lookup + + + + + Specifies how instances of the + + class must apply environment variables when replacing values. + + Mark Pollack + + + + Never replace environment variables. + + + + + If properties are not specified via a resource, + then resolve using environment variables. + + + + + Apply environment variables first before applying properties from a + resource. + + + + + Implementation of that + resolves variable name against environment variables. + + Aleksandar Seovic + + + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Resolves variable value for the specified variable name. + + + The name of the variable to resolve. + + + The variable value if able to resolve, null otherwise. + + + + + Holder for event handler values for an object. + + Rick Evans (.NET) + + + + The empty array of s. + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The + to be used to populate this instance. + + + + + Copy all given argument values into this object. + + + The + to be used to populate this instance. + + + + + Adds the supplied handler to the collection of event handlers. + + The handler to be added. + + + + The mapping of event names to an + of + s. + + + + + Gets the of events + that have handlers associated with them. + + + + + Gets the of + s for the supplied + event name. + + + + + Immutable placeholder class used for the value of a + object when it's a reference + to a Spring that should be evaluated at runtime. + + Aleksandar Seovic + + + + Creates a new instance of the + + class. + + The expression to resolve. + + + + Returns a string representation of this instance. + + A string representation of this instance. + + + + Gets or sets the expression string. Setting the expression string will cause + the expression to be parsed. + + The expression string. + + + + Return the expression. + + + + + Properties for this expression node. + + + + + implementation that + retrieves a static or non-static public field value. + + +

+ Typically used for retrieving public constants. +

+
+ +

+ The following example retrieves the field value... +

+ + + + + + +

+ The previous example could also have been written using the convenience + + property, like so... +

+ + + + + +

+ This class also implements the + interface + (). + If the id (or name) of one's + + object definition is set to the + of the field to be retrieved, then the id (or + name) of one's object definition will be used for the name of the + field lookup. See below for an example of this + concise style of definition. +

+ + + + + + + +

+ The usage for retrieving instance fields is similar. No example is shown + because public instance fields are generally bad practice; but if + you have some legacy code that exposes public instance fields, or if you + just really like coding public instance fields, then you can use this + implementation to + retrieve such field values. +

+ + Juergen Hoeller + Rick Evans (.NET) + + + + Interface to be implemented by objects that wish to be aware of their object + name in an . + + +

+ Note that most objects will choose to receive references to collaborating + objects via respective properties. +

+

+ For a list of all object lifecycle methods, see the + API documentation. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Set the name of the object in the object factory that created this object. + + + The name of the object in the factory. + + +

+ Invoked after population of normal object properties but before an init + callback like 's + + method or a custom init-method. +

+
+
+ + + Invoked by an + after it has set all object properties supplied + (and satisfied + and ApplicationContextAware). + + +

+ This method allows the object instance to perform initialization only + possible when all object properties have been set and to throw an + exception in the event of misconfiguration. +

+
+ + In the event of misconfiguration (such as failure to set an essential + property) or if initialization fails. + +
+ + + Return an instance (possibly shared or independent) of the object + managed by this factory. + + + An instance (possibly shared or independent) of the object managed by + this factory. + + + + + + The of the + field to be retrieved. + + + + + Set the name of the object in the object factory that created this object. + + + The name of the object in the factory. + + +

+ In the context of the + + class, the + + value will be interepreted as the value of the + + property if no value has been explicitly assigned to the + + property. This allows for concise object definitions with just an id or name; + see the class documentation for + + for an example of this style of usage. +

+
+
+ + + The name of the field the value of which is to be retrieved. + + +

+ If the + + has been set (and is not ), then the value of this property + refers to an instance field name; it otherwise refers to a + field name. +

+
+
+ + + The object instance on which the field is defined. + + + + + The on which the field is defined. + + + + + The of object that this + creates, or + if not known in advance. + + + + + Is the object managed by this factory a singleton or a prototype? + + + + + Extension of the + interface to be implemented by object factories that are capable of + autowiring and expose this functionality for existing object instances. + + Juergen Hoeller + Rick Evans (.NET) + + + + Create a new object instance of the given class with the specified + autowire strategy. + + + The of the object to instantiate. + + + The desired autowiring mode. + + + Whether to perform a dependency check for objects (not applicable to + autowiring a constructor, thus ignored there). + + The new object instance. + + If the wiring fails. + + + + + + Autowire the object properties of the given object instance by name or + . + + + The existing object instance. + + + The desired autowiring mode. + + + Whether to perform a dependency check for the object. + + + If the wiring fails. + + + + + + Apply s + to the given existing object instance, invoking their + + methods. + + +

+ The returned object instance may be a wrapper around the original. +

+
+ + The existing object instance. + + + The name of the object. + + + The object instance to use, either the original or a wrapped one. + + + If any post-processing failed. + + +
+ + + Apply s + to the given existing object instance, invoking their + + methods. + + +

+ The returned object instance may be a wrapper around the original. +

+
+ + The existing object instance. + + + The name of the object. + + + The object instance to use, either the original or a wrapped one. + + + If any post-processing failed. + + +
+ + + Resolve the specified dependency against the objects defined in this factory. + + The descriptor for the dependency. + Name of the object which declares the present dependency. + A list that all names of autowired object (used for + resolving the present dependency) are supposed to be added to. + the resolved object, or null if none found + if dependency resolution failed + + + + Extension of the interface + that injects dependencies into the object managed by the factory. + + Bruno Baia + + + + Gets the template object definition that should be used + to configure the instance of the object managed by this factory. + + + + + SPI interface to be implemented by most if not all listable object factories. + + +

+ Allows for framework-internal plug'n'play, e.g. in + . +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Configuration interface to be implemented by most if not all object + factories. + + +

+ Provides the means to configure an object factory in addition to the + object factory client methods in the + interface. +

+

+ Allows for framework-internal plug'n'play even when needing access to object + factory configuration methods. +

+

+ When disposed, it will destroy all cached singletons in this factory. Call + when you want to shutdown + the factory. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Interface that defines a registry for shared object instances. + + + Can be implemented by + implementations in order to expose their singleton management facility + in a uniform manner. + + The interface extends this interface. + + + Juergen Hoeller + Mark Pollack (.NET) + + + + Registers the given existing object as singleton in the object registry, + under the given object name. + + + + The given instance is supposed to be fully initialized; the registry + will not perform any initialization callbacks (in particular, it won't + call IInitializingObject's AfterPropertiesSet method). + The given instance will not receive any destruction callbacks + (like IDisposable's Dispose method) either. + + + If running within a full IObjectFactory: Register an object definition + instead of an existing instance if your object is supposed to receive + initialization and/or destruction callbacks. + + + Typically invoked during registry configuration, but can also be used + for runtime registration of singletons. As a consequence, a registry + implementation should synchronize singleton access; it will have to do + this anyway if it supports a BeanFactory's lazy initialization of singletons. + + + Name of the object. + The singleton object. + + + + + + Return the (raw) singleton object registered under the given name. + + + + Only checks already instantiated singletons; does not return an Object + for singleton object definitions which have not been instantiated yet. + + + The main purpose of this method is to access manually registered singletons + . Can also be used to access a singleton + defined by an object definition that already been created, in a raw fashion. + + + Name of the object to look for. + the registered singleton object, or null if none found + + + + + Check if this registry contains a singleton instance with the given name. + + + + Only checks already instantiated singletons; does not return true + for singleton bean definitions which have not been instantiated yet. + + + The main purpose of this method is to check manually registered singletons + . Can also be used to check whether a + singleton defined by an object definition has already been created. + + + To check whether an object factory contains an object definition with a given name, + use ListableBeanFactory's ContainsObjectDefinition. Calling both + ContainsObjectDefinition and ContainsSingleton answers + whether a specific object factory contains an own object with the given name. + + + Use IObjectFactory's ContainsObject for general checks whether the + factory knows about an object with a given name (whether manually registered singleton + instance or created by bean definition), also checking ancestor factories. + + + Name of the object to look for. + + true if this bean factory contains a singleton instance with the given name; otherwise, false. + + + + + + + + Gets the names of singleton objects registered in this registry. + + + + Only checks already instantiated singletons; does not return names + for singleton bean definitions which have not been instantiated yet. + + + The main purpose of this method is to check manually registered singletons + . Can also be used to check which + singletons defined by an object definition have already been created. + + + The list of names as String array (never null). + + + + + + + Gets the number of singleton beans registered in this registry. + + + + Only checks already instantiated singletons; does not count + singleton object definitions which have not been instantiated yet. + + + The main purpose of this method is to check manually registered singletons + . Can also be used to count the number of + singletons defined by an object definition that have already been created. + + + The number of singleton objects. + + + + + + + Ignore the given dependency type for autowiring. + + +

+ To be invoked during factory configuration. +

+

+ This will typically be used for dependencies that are resolved + in other ways, like + through . +

+
+ + The to be ignored. + +
+ + + Determines whether the specified object name is currently in creation.. + + Name of the object. + + true if the specified object name is currently in creation; otherwise, false. + + + + + Add a new + that will get applied to objects created by this factory. + + +

+ To be invoked during factory configuration. +

+
+ + The + to register. + +
+ + + Given an object name, create an alias. + + +

+ This is typically used to support names that are illegal within + XML ids (which are used for object names). +

+

+ Typically invoked during factory configuration, but can also be + used for runtime registration of aliases. Therefore, a factory + implementation should synchronize alias access. +

+
+ The name of the object. + + + The alias that will behave the same as the object name. + + + If there is no object with the given name. + + + If the alias is already in use. + +
+ + + Register the given custom + for all properties of the given . + + +

+ To be invoked during factory configuration. +

+
+ + The required of the property. + + + The to register. + +
+ + + Set the parent of this object factory. + + +

+ Note that the parent shouldn't be changed: it should only be set outside + a constructor if it isn't available when an object of this class is + created. +

+
+
+ + + Returns the current number of registered + s. + + + The current number of registered + s. + + + + + Return the registered + for the + given object, allowing access to its property values and constructor + argument values. + + The name of the object. + + The registered + . + + + If there is no object with the given name. + + + In the case of errors. + + + + + Return the registered + for the + given object, allowing access to its property values and constructor + argument values. + + The name of the object. + Whether to search parent object factories. + + The registered + . + + + If there is no object with the given name. + + + In the case of errors. + + + + + Register a new object definition with this registry. + Must support + + and . + + + The name of the object instance to register. + + + The definition of the object instance to register. + + +

+ Must support + and + . +

+
+ + If the object definition is invalid. + +
+ + + Injects dependencies into the supplied instance + using the supplied . + + + The object instance that is to be so configured. + + + The name of the object definition expressing the dependencies that are to + be injected into the supplied instance. + + + An object definition that should be used to configure object. + + + + + + Ensure that all non-lazy-init singletons are instantiated, also + considering s. + + +

+ Typically invoked at the end of factory setup, if desired. +

+

+ As this is a startup method, it should destroy already created singletons if + it fails, to avoid dangling resources. In other words, after invocation + of that method, either all or no singletons at all should be + instantiated. +

+
+ + If one of the singleton objects could not be created. + +
+ + + Register a special dependency type with corresponding autowired value. + + + This is intended for factory/context references that are supposed + to be autowirable but are not defined as objects in the factory: + e.g. a dependency of type ApplicationContext resolved to the + ApplicationContext instance that the object is living in. + + Note there are no such default types registered in a plain IObjectFactory, + not even for the BeanFactory interface itself. + + + Type of the dependency to register. + This will typically be a base interface such as IObjectFactory, with extensions of it resolved + as well if declared as an autowiring dependency (e.g. IListableBeanFactory), + as long as the given value actually implements the extended interface. + + The autowired value. This may also be an + implementation o the interface, + which allows for lazy resolution of the actual target value. + + + + Determines whether the specified object qualifies as an autowire candidate, + to be injected into other beans which declare a dependency of matching type. + This method checks ancestor factories as well. + + Name of the object to check. + The descriptor of the dependency to resolve. + + true if the object should be considered as an autowire candidate; otherwise, false. + + if there is no object with the given name. + + + + May be used to store custom value references in object definition properties. + + + Erich Eichinger + + + + + + the object factory holding the given object definition + + + The name of the object that is having the value of one of its properties resolved. + + + The definition of the named object. + + + The name of the property the value of which is being resolved. + + + The value of the property that is being resolved. + + + + + Subinterface of + that adds + a before-destruction callback. + + + The typical usage will be to invoke custom destruction callbacks on + specific object types, matching corresponding initialization callbacks. + + Juergen Hoeller + Simon White (.NET) + + + + Apply this + to the + given new object instance before its destruction. Can invoke custom + destruction callbacks. + + The new object instance. + The name of the object. + + In case of errors. + + + + + Denotes a special placeholder collection that may contain + s or + other placeholder objects that will need to be resolved. + + +

+ 'A special placeholder collection' means that the elements of this + collection can be placeholders for objects that will be resolved later by + a Spring.NET IoC container, i.e. the elements themselves will be + resolved at runtime by the enclosing IoC container. +

+

+ The core Spring.NET library already provides three implementations of this interface + straight out of the box; they are... +

+ + + + . + + + + + . + + + + + . + + + +

+ If you have a custom collection class (i.e. a class that either implements the + directly or derives from a class that does) + that you would like to expose as a special placeholder collection (i.e. one that can + have s as elements + that will be resolved at runtime by an appropriate Spring.NET IoC container, just + implement this interface. +

+
+ +

+ Lets say one has a Bag class (i.e. a collection that supports bag style semantics). +

+ + using System; + + using Spring.Objects.Factory.Support; + + namespace MyNamespace + { + public sealed class Bag : ICollection + { + // ICollection implementation elided for clarity... + + public void Add(object o) + { + // implementation elided for clarity... + } + } + + public class ManagedBag : Bag, IManagedCollection + { + public ICollection Resolve( + string objectName, RootObjectDefinition definition, + string propertyName, ManagedCollectionElementResolver resolver) + { + Bag newBag = new Bag(); + string elementName = propertyName + "[bag-element]"; + foreach(object element in this) + { + object resolvedElement = resolver(objectName, definition, elementName, element); + newBag.Add(resolvedElement); + } + return newBag; + } + } + } + +
+ Rick Evans +
+ + + Resolves this managed collection at runtime. + + + The name of the top level object that is having the value of one of it's + collection properties resolved. + + + The definition of the named top level object. + + + The name of the property the value of which is being resolved. + + + The callback that will actually do the donkey work of resolving + this managed collection. + + A fully resolved collection. + + + + Resolves a single element value of a managed collection. + + +

+ If the does not need to be resolved or + converted to an appropriate , the + will be returned as-is. +

+
+ + The name of the top level object that is having the value of one of it's + collection properties resolved. + + + The definition of the named top level object. + + + The name of the property the value of which is being resolved. + + + That element of a managed collection that may need to be resolved + to a concrete value. + + A fully resolved element. +
+ + + Describes an object instance, which has property values, constructor + argument values, and further information supplied by concrete implementations. + + +

+ This is just a minimal interface: the main intention is to allow + + (like PropertyPlaceholderConfigurer) to access and modify property values. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Return the property values to be applied to a new instance of the object. + + + + + Return the constructor argument values for this object. + + + + + Return the event handlers for any events exposed by this object. + + + + + Return a description of the resource that this object definition + came from (for the purpose of showing context in case of errors). + + + + + Is this object definition a "template", i.e. not meant to be instantiated + itself but rather just serving as an object definition for configuration + templates used by . + + + if this object definition is a "template". + + + + + Is this object definition "abstract", i.e. not meant to be instantiated + itself but rather just serving as parent for concrete child object + definitions. + + + if this object definition is "abstract". + + + + + Return whether this a Singleton, with a single, shared instance + returned on all calls. + + +

+ If , an object factory will apply the Prototype + design pattern, with each caller requesting an instance getting an + independent instance. How this is defined will depend on the + object factory implementation. Singletons are the commoner type. +

+
+
+ + + Is this object lazily initialized? + +

+ Only applicable to a singleton object. +

+

+ If , it will get instantiated on startup by object factories + that perform eager initialization of singletons. +

+
+
+ + + The name of the parent definition of this object definition, if any. + + + + + The target scope for this object. + + + + + Get the role hint for this object definition + + + + + Returns the of the object definition (if any). + + + A resolved object . + + + If the of the object definition is not a + resolved or . + + + + + Returns the of the + of the object definition. + + Note that this does not have to be the actual type name used at runtime, + in case of a child definition overrding/inheriting the the type name from its + parent. It can be modifed during object factory post-processing, typically + replacing the original class name with a parsed variant of it. + Hence, do not consider this to be the definitive bean type at runtime + but rather only use it for parsing purposes at the individual object + definition level. + + + + + The autowire mode as specified in the object definition. + + +

+ This determines whether any automagical detection and setting of + object references will happen. Default is + , + which means there's no autowire. +

+
+
+ + + The object names that this object depends on. + + +

+ The object factory will guarantee that these objects get initialized + before. +

+

+ Note that dependencies are normally expressed through object properties + or constructor arguments. This property should just be necessary for + other kinds of dependencies like statics (*ugh*) or database + preparation on startup. +

+
+
+ + + The name of the initializer method. + + +

+ The default is , in which case there is no initializer method. +

+
+
+ + + Return the name of the destroy method. + + +

+ The default is , in which case there is no destroy method. +

+
+
+ + + The name of the factory method to use (if any). + + +

+ This method will be invoked with constructor arguments, or with no + arguments if none are specified. The static method will be invoked on + the specified . +

+
+
+ + + The name of the factory object to use (if any). + + + + + Gets a value indicating whether this instance a candidate for getting autowired into some other + object. + + + true if this instance is autowire candidate; otherwise, false. + + + + + Simple factory for shared instances. + + Juergen Hoeller + Simon White (.NET) + + + + Constructs a new instance of the target dictionary. + + The new instance. + + + + Set the source . + + +

+ This value will be used to populate the + returned by this factory. +

+
+
+ + + Set the of the + implementation to use. + + +

+ The default is the . +

+
+
+ + + The of objects created by this factory. + + + Always returns the . + + + + + implementation that + creates instances of the class. + + +

+ Typically used for retrieving shared + instances for common topics (such as the 'DAL', 'BLL', etc). The + + property determines the name of the + Common.Logging logger. +

+
+ Rick Evans + +
+ + + Creates a new instance of the + + class. + + + + + Creates a new instance of the + + class. + + + The name of the instance served up by + this factory. + + + If the supplied is + or contains only whitespace character(s). + + + + + Return an instance (possibly shared or independent) of the object + managed by this factory. + + + An instance (possibly shared or independent) of the object + managed by this factory. + + + + + + Invoked by an + after it has set all object properties supplied + (and satisfied the + + and + interfaces). + + + In the event of misconfiguration (such as failure to set an essential + property) or if initialization fails. + + + + + + The name of the instance served up by + this factory. + + + The name of the instance served up by + this factory. + + + If the supplied to the setter is + or contains only whitespace character(s). + + + + + Return the type of object that this + creates, or + if not known in advance. + + + + + + Is the object managed by this factory a singleton or a prototype? + + + + + + Tag subclass used to hold a dictionary of managed elements. + + Juergen Hoeller + Rick Evans (.NET) + + + + Interface representing an object whose value set can be merged with that of a parent object. + + Rob Harrop + Mark Pollack (.NET) + + + + Merges the current value set with that of the supplied object. + + The supplied object is considered the parent, and values in the + callee's value set must override those of the supplied object. + + The parent object to merge with + The result of the merge operation + If the supplied parent is null + If merging is not enabled for this instance, + (i.e. MergeEnabled equals false. + + + + Gets a value indicating whether this instance is merge enabled for this instance + + + true if this instance is merge enabled; otherwise, false. + + + + + Initializes a new, empty instance of the class using the default initial capacity, load factor, hash code provider, and comparer. + + + + + Initializes a new, empty instance of the class using the specified initial capacity, and the default load factor, hash code provider, and comparer. + + The approximate number of elements that the object can initially contain. is less than zero. + + + + Resolves this managed collection at runtime. + + + The name of the top level object that is having the value of one of it's + collection properties resolved. + + + The definition of the named top level object. + + + The name of the property the value of which is being resolved. + + + The callback that will actually do the donkey work of resolving + this managed collection. + + A fully resolved collection. + + + + Merges the current value set with that of the supplied object. + + The supplied object is considered the parent, and values in the + callee's value set must override those of the supplied object. + + The parent object to merge with + The result of the merge operation + If the supplied parent is null + If merging is not enabled for this instance, + (i.e. MergeEnabled equals false. + + + + Gets or sets the unresolved name for the + of the keys of this managed dictionary. + + The unresolved name for the type of the keys of this managed dictionary. + + + + Gets or sets the unresolved name for the + of the values of this managed dictionary. + + The unresolved name for the type of the values of this managed dictionary. + + + + Gets a value indicating whether this instance is merge enabled for this instance + + + true if this instance is merge enabled; otherwise, false. + + + + + Tag subclass used to hold a list of managed elements. + + Rod Johnson + Rick Evans (.NET) + + + + Initializes a new instance of the ManagedList class that is empty and has the default initial capacity. + + + + + Initializes a new instance of the ManagedList class that is empty and has the specified initial capacity. + + The number of elements that the new list can initially store. is less than zero. + + + + Resolves this managed collection at runtime. + + + The name of the top level object that is having the value of one of it's + collection properties resolved. + + + The definition of the named top level object. + + + The name of the property the value of which is being resolved. + + + The callback that will actually do the donkey work of resolving + this managed collection. + + A fully resolved collection. + + + + Merges the current value set with that of the supplied object. + + The supplied object is considered the parent, and values in the + callee's value set must override those of the supplied object. + + The parent object to merge with + The result of the merge operation + If the supplied parent is null + If merging is not enabled for this instance, + (i.e. MergeEnabled equals false. + + + + Gets or sets the unresolved name for the + of the elements of this managed list. + + The unresolved name for the type of the elements of this managed list. + + + + Gets a value indicating whether this instance is merge enabled for this instance + + + true if this instance is merge enabled; otherwise, false. + + + + + Tag class which represent a Spring-managed instance that + supports merging of parent/child definitions. + + + + + Initializes a new instance of the class that is empty, has the default initial capacity and uses the default case-insensitive hash code provider and the default case-insensitive comparer. + + + + + Initializes a new instance of the class that is empty, has the specified initial capacity and uses the default case-insensitive hash code provider and the default case-insensitive comparer. + + The initial number of entries that the can contain. is less than zero. + + + + Merges the current value set with that of the supplied object. + + The supplied object is considered the parent, and values in the + callee's value set must override those of the supplied object. + + The parent object to merge with + The result of the merge operation + If the supplied parent is null + If merging is not enabled for this instance, + (i.e. MergeEnabled equals false. + + + + Gets a value indicating whether this instance is merge enabled for this instance + + + true if this instance is merge enabled; otherwise, false. + + + + + Tag subclass used to hold a set of managed elements. + + Juergen Hoeller + Rick Evans (.NET) + + + + Creates a new set instance based on either a list or a hash table, + depending on which will be more efficient based on the data-set + size. + + + + + Initializes a new instance of the class with a given capacity + + The size. + + + + Resolves this managed collection at runtime. + + + The name of the top level object that is having the value of one of it's + collection properties resolved. + + + The definition of the named top level object. + + + The name of the property the value of which is being resolved. + + + The callback that will actually do the donkey work of resolving + this managed collection. + + A fully resolved collection. + + + + Merges the current value set with that of the supplied object. + + The supplied object is considered the parent, and values in the + callee's value set must override those of the supplied object. + + The parent object to merge with + The result of the merge operation + If the supplied parent is null + If merging is not enabled for this instance, + (i.e. MergeEnabled equals false. + + + + Gets or sets the unresolved name for the + of the elements of this managed set. + + The unresolved name for the type of the elements of this managed set. + + + + Gets a value indicating whether this instance is merge enabled for this instance + + + true if this instance is merge enabled; otherwise, false. + + + + + An that returns a value + that is the result of a or instance method invocation. + + +

+ Note that this class generally is expected to be used for accessing factory methods, + and as such defaults to operating in singleton mode. The first request to + + by the owning object factory will cause a method invocation, the return + value of which will be cached for all subsequent requests. The + property may be set to + , to cause this factory to invoke the target method each + time it is asked for an object. +

+

+ A target method may be specified by setting the + property to a string representing + the method name, with specifying + the that the method is defined on. + Alternatively, a target instance method may be specified, by setting the + property as the target object, and + the property as the name of the + method to call on that target object. Arguments for the method invocation may be + specified by setting the property. +

+

+ Another (esoteric) use case for this factory object is when one needs to call a method + that doesn't return any value (for example, a class method to + force some sort of initialization to happen)... this use case is not supported by + factory-methods, since a return value is needed to become the object. +

+

+ + This class depends on the + + method being called after all properties have been set, as per the + contract. If you are + using this class outside of a Spring.NET IoC container, you must call one of either + or + yourself to ready the object's internal + state, or you will get a nasty . + +

+
+ +

+ The following example uses an instance of this class to call a + factory method... +

+ + + + + + + + 1st + 2nd + and 3rd arguments + + + + +

+ The following example is similar to the preceding example; the only pertinent difference is the fact that + a number of different objects are passed as arguments, demonstrating that not only simple value types + are valid as elements of the argument list... +

+ + + + + + + + + + + 1st + + + + + + + http://www.springframework.net/ + + + + + +

+ Named parameters are also supported... this next example yields the same results as + the preceding example (that did not use named arguments). +

+ + + + + + + + + + 1st + and 3rd arguments + 2nd + + + + +

+ Similarly, the following example uses an instance of this class to call an instance method... +

+ + + + + + + + + +

+ The above example could also have been written using an anonymous inner object definition... if the + object on which the method is to be invoked is not going to be used outside of the factory object + definition, then this is the preferred idiom because it limits the scope of the object on which the + method is to be invoked to the surrounding factory object. +

+ + + + + + + + + + Colin Sampaleanu + Juergen Hoeller + Rick Evans (.NET) + Simon White (.NET) + + + + + + Specialisation of the class that tries + to convert the given arguments for the actual target method via an + appropriate implementation. + + Juergen Hoeller + Rick Evans + + + + + Helper class allowing one to declaratively specify a method call for later invocation. + + +

+ Typically not used directly but via its subclasses such as + . +

+

+ Usage: specify either the and + or the + and + properties respectively, and + (optionally) any arguments to the method. Then call the + method to prepare the invoker. + Once prepared, the invoker can be invoked any number of times. +

+
+ +

+ The following example uses the class to invoke the + ToString() method on the Foo class using a mixture of both named and unnamed + arguments. +

+ + public class Foo + { + public string ToString(string name, int age, string address) + { + return string.Format("{0}, {1} years old, {2}", name, age, address); + } + + public static void Main() + { + Foo foo = new Foo(); + MethodInvoker invoker = new MethodInvoker(); + invoker.Arguments = new object [] {"Kaneda", "18 Kaosu Gardens, Nakatani Drive, Okinanawa"}; + invoker.AddNamedArgument("age", 29); + invoker.Prepare(); + // at this point, the arguments that will be passed to the method invocation + // will have been resolved into the following ordered array : {"Kaneda", 29, "18 Kaosu Gardens, Nakatani Drive, Okinanawa"} + string details = (string) invoker.Invoke(); + Console.WriteLine (details); + // will print out 'Kaneda, 29 years old, 18 Kaosu Gardens, Nakatani Drive, Okinanawa' + } + } + +
+ Colin Sampaleanu + Juergen Hoeller + Simon White (.NET) +
+ + + The used to search for + the method to be invoked. + + + + + The value returned from the invocation of a method that returns void. + + + + + The method that will be invoked. + + + + + Creates a new instance of the class. + + + + + Prepare the specified method. + + +

+ The method can be invoked any number of times afterwards. +

+
+ + If all required properties are not set, or a matching argument could not be found + for a named argument (typically down to a typo). + + + If the specified method could not be found. + +
+ + + Searches for and returns the method that is to be invoked. + + + The return value of this method call will subsequently be returned from the + . + + The method that is to be invoked. + + If no method could be found. + + + If more than one method was found. + + + + + Adds the named argument to this instances mapping of argument names to argument values. + + + The name of an argument on the method that is to be invoked. + + + The value of the named argument on the method that is to be invoked. + + + + + Returns the prepared object that + will be invoked. + + +

+ A possible use case is to determine the return of the method. +

+
+ + The prepared object that + will be invoked. + +
+ + + Invoke the specified method. + + +

+ The invoker needs to have been prepared beforehand (via a call to the + method). +

+
+ + The object returned by the method invocation, or + if the method returns void. + + + If at least one of the arguments passed to this + was incompatible with the signature of the invoked method. + +
+ + + The target on which to call the target method. + + +

+ Only necessary when the target method is ; + else, a target object needs to be specified. +

+
+
+ + + The target object on which to call the target method. + + +

+ Only necessary when the target method is not ; + else, a target class is sufficient. +

+
+
+ + + The name of the method to be invoked. + + +

+ Refers to either a method + or a non- method, depending on + whether or not a target object has been set. +

+
+ +
+ + + Arguments for the method invocation. + + +

+ Ordering is significant... the order of the arguments in this + property must match the ordering of the various parameters on the target + method. There does however exist a small possibility for confusion when + the arguments in this property are supplied in addition to one or more named + arguments. In this case, each named argument is slotted into the index position + corresponding to the named argument... once once all named arguments have been + resolved, the arguments in this property are slotted into any remaining (empty) + slots in the method parameter list (see the example in the overview of the + class if this is not clear). +

+

+ If this property is not set, or the value passed to the setter invocation + is or a zero-length array, a method with no (un-named) arguments is assumed. +

+
+ +
+ + + The resolved arguments for the method invocation. + + + + This property is not set until the target method has been resolved via a call to the + method). It is a combination of the + named and plain vanilla arguments properties, and it is this object array that + will actually be passed to the invocation of the target method. + +

+ Setting the value of this property to results in basically clearing out any + previously prepared arguments... another call to the + method will then be required to prepare the arguments again (or the prepared arguments + can be set explicitly if so desired). +

+
+ + +
+ + + Named arguments for the method invocation. + + +

+ The keys of this dictionary are the () names of the + method arguments, and the () values are the actual + argument values themselves. +

+

+ If this property is not set, or the value passed to the setter invocation + is a reference, a method with no named arguments is assumed. +

+
+ +
+ + + Creates a new instance of the + class. + + + + + Prepare the specified method. + + +

+ The method can be invoked any number of times afterwards. +

+
+ + If all required properties are not set. + + + If the specified method could not be found. + +
+ + + Register the given custom + for all properties of the given . + + + The of property. + + + The to register. + + + + + Return an instance (possibly shared or independent) of the object + managed by this factory. + + +

+ Returns the return value of the method that is to be invoked. +

+

+ Will return the same value each time if the + + property value is . +

+
+ + An instance (possibly shared or independent) of the object managed by + this factory. + + +
+ + + Prepares this method invoker. + + + If all required properties are not set. + + + If the specified method could not be found. + + + + + + If a singleton should be created, or a new object on each request. + Defaults to . + + + + + Return the return value of the method + that this factory invokes, or if not + known in advance. + + +

+ If the return value of the method that this factory is to invoke is + , then the + will be returned (in accordance with the + contract that + treats a value as a configuration error). +

+
+ +
+ + + Holder for an with + name and aliases. + + +

+ Recognized by + + for inner object definitions. Registered by + , + which also uses it as general holder for a parsed object definition. +

+

+ Can also be used for programmatic registration of inner object + definitions. If you don't care about the functionality offered by the + interface and the like, + registering + or is good enough. +

+
+ Juergen Hoeller + Simon White (.NET) +
+ + + Creates a new instance of the + class. + + + The object definition to be held by this instance. + + + The name of the object definition. + + + + + Creates a new instance of the + class. + + + The object definition to be held by this instance. + + The name of the object. + + Any aliases for the supplied + + + + + The held by this + instance. + + + + + The name of the object definition. + + + + + Any aliases for the object definition. + + +

+ Guaranteed to never return ; if the associated + + does not have any aliases associated with it, then an empty + array will be returned. +

+
+
+ + + Visitor class for traversing objects, in particular + the property values and constructor arguments contained in them resolving + object metadata values. + + + Used by and + to parse all string values contained in a ObjectDefinition, resolving any placeholders found. + + Mark Pollack + + + + Initializes a new instance of the class. + + The handler to be called for resolving variables contained in a string. + + + + Initializes a new instance of the class + for subclassing + + Subclasses should override the ResolveStringValue method + + + + Traverse the given ObjectDefinition object and the MutablePropertyValues + and ConstructorArgumentValues contained in them. + + The object definition to traverse. + + + + Visits the ObjectDefinition property ObjectTypeName, replacing string values using + the specified IVariableSource. + + The object definition. + + + + Visits the property values of the ObjectDefinition, replacing string values + using the specified IVariableSource. + + The object definition. + + + + Visits the indexed constructor argument values, replacing string values using the + specified IVariableSource. + + The indexed argument values. + + + + Visits the named constructor argument values, replacing string values using the + specified IVariableSource. + + The named argument values. + + + + Visits the generic constructor argument values, replacing string values using + the specified IVariableSource. + + The genreic argument values. + + + + Configures the constructor argument ValueHolder. + + The vconstructor alue holder. + + + + Resolves the given value taken from an object definition according to its type + + the value to resolve + the resolved value + + + + Visits the ManagedList property ElementTypeName and + calls for list element. + + + + + Visits the ManagedSet property ElementTypeName and + calls for list element. + + + + + Visits the ManagedSet properties KeyTypeName and ValueTypeName and + calls for dictionary's value element. + + + + + Visits the elements of a NameValueCollection and calls + for value of each element. + + + + + calls the to resolve any variables contained in the raw string. + + the raw string value containing variable placeholders to be resolved + If no has been configured. + the resolved string, having variables being replaced, if any + + + + Returns a value that is an + that + returns an object from an + . + + +

+ The primary motivation of this class is to avoid having a client object + directly calling the + + method to get a prototype object out of an + , which would be a + violation of the inversion of control principle. With the use of this + class, the client object can be fed an + as a property + that directly returns one target prototype object. +

+

+ The object referred to by the value of the + + property does not have to be a prototype object, but there is little + to no point in using this class in conjunction with a singleton object. +

+
+ +

+ The following XML configuration snippet illustrates the use of this + class... +

+ + + + + + + + + + + + + + + + Colin Sampaleanu + Simon White (.NET) + + + + Interface to be implemented by objects that wish to be aware of their owning + . + + +

+ For example, objects can look up collaborating objects via the factory. +

+

+ Note that most objects will choose to receive references to collaborating + objects via respective properties and / or an appropriate constructor. +

+

+ For a list of all object lifecycle methods, see the + API documentation. +

+
+ Rod Johnson + Rick Evans (.NET) +
+ + + Callback that supplies the owning factory to an object instance. + + + Owning + (may not be ). The object can immediately + call methods on the factory. + + +

+ Invoked after population of normal object properties but before an init + callback like 's + + method or a custom init-method. +

+
+ + In case of initialization errors. + +
+ + + Returns an instance of the object factory. + + The object factory. + + + + Invoked by an + after it has set all supplied object properties. + + + In the event of misconfiguration (such as failure to set an essential + property) or if initialization fails. + + + + + + Sets the name of the target object. + + + + + The target factory that will be used to perform the lookup + of the object referred to by the + property. + + + The owning + (will never be ). + + + In case of initialization errors. + + + + + + The of object created by this factory. + + + + + Interface defining a factory which can return an object instance + (possibly shared or independent) when invoked. + + + This interface is typically used to encapsulate a generic factory + which returns a new instance (prototype) on each invocation. + It is similar to the , but + implementations of the aforementioned interface are normally meant to be defined + as instances by the user in an , + while implementations of this class are normally meant to be fed as a property to + other objects; as such, the + method + has different exception handling behavior. + + Colin Sampaleanu + Simon White (.NET) + + + + Return an instance (possibly shared or independent) + of the object managed by this factory. + + + An instance of the object (should never be ). + + + + + Creates a new instance of the GenericObjectFactory class. + + + The enclosing + . + + + + + Returns the object created by the enclosed object factory. + + The created object. + + + + An implementation + that exposes an arbitrary target object under a different name. + + +

+ Usually, the target object will reside in a different object + definition file, using this + to link it in + and expose it under a different name. Effectively, this corresponds + to an alias for the target object. +

+ + For XML based object definition files, a <alias> + tag is available that effectively achieves the same. + +
+ Juergen Hoeller + Rick Evans (.NET) + +
+ + + Initialize a new default instance + + + + + Initialize this instance with the predefined and . + + + + + + + Return an instance (possibly shared or independent) of the object + managed by this factory. + + + An instance (possibly shared or independent) of the object managed by + this factory. + + + + + + The name of the target object. + + +

+ The target object may potentially be defined in a different object + definition file. +

+
+ The name of the target object. +
+ + + Return the type of object that this + creates, or + if not known in advance. + + + + + + Is the object managed by this factory a singleton or a prototype? + + + + + + Callback that supplies the owning factory to an object instance. + + + The owning + (may not be ). The object can immediately + call methods on the factory. + + + In case of initialization errors. + + + + + + + Erich Eichinger + + + + Role hint indicating that a is a major part of the application. Typically corresponds to a user-defined bean. + + + + + Role hint indicating that a is a supporting + part of some larger configuration, typically an outer ComponentDefinition + SUPPORT objects are considered important enough to be aware + of when looking more closely at a particular ComponentDefinition, + but not when looking at the overall configuration of an application. + + + + + Role hint indicating that a is providing an + entirely background role and has no relevance to the end-user. This hint is + used when registering objects that are completely part of the internal workings + of a ComponentDefinition. + + + + + Implementation of that + resolves variable name against Java-style property file. + + + Aleksandar Seovic + + + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Resolves variable value for the specified variable name. + + + The name of the variable to resolve. + + + The variable value if able to resolve, null otherwise. + + + + + Initializes properties based on the specified + property file locations. + + + + + Gets or sets the locations of the property files + to read properties from. + + + The locations of the property files + to read properties from. + + + + + Convinience property. Gets or sets a single location + to read properties from. + + + A location to read properties from. + + + + + Overrides default values in one or more object definitions. + + +

+ Instances of this class override already existing values, and is + thus best suited to replacing defaults. If you need to replace + placeholder values, consider using the + + class instead. +

+

+ In contrast to the + + class, the original object definition can have default + values or no values at all for such object properties. If an overriding + configuration file does not have an entry for a certain object property, + the default object value is left as is. Also note that it is not + immediately obvious to discern which object definitions will be mutated by + one or more + s + simply by looking at the object configuration. +

+

+ Each line in a referenced configuration file is expected to take the + following form... +

+ + + +

+ The name.property key refers to the object name and the + property that is to be overridden; and the value is the overridding + value that will be inserted into the appropriate object definition's + named property. +

+

+ Please note that in the case of multiple + s + that define different values for the same object definition value, the + last overridden value will win (due to the fact that the values + supplied by previous + s + will be overridden). +

+
+ +

+ The following XML context definition defines an object that has a number + of properties, all of which have default values... +

+ + + + + + + + +

+ What follows is a .NET config file snippet for the above example (assuming + the need to override one of the default values)... +

+ + + + + + +
+ Juergen Hoeller + Simon White (.NET) + + + +
+ + + Allows for the configuration of individual object property values from + a .NET .config file. + + +

+ Useful for custom .NET .config files targetted at system administrators + that override object properties configured in the application context. +

+

+ Two concrete implementations are provided in the Spring.NET core library: + + + + + for <add key="placeholderKey" value="..."/> style + overriding (pushing values from a .NET .config file into object + definitions). + + + + + + for replacing "${...}" placeholders (pulling values from a .NET .config + file into object definitions). + + + +

+

+ Please refer to the API documentation for the concrete implementations + listed above for example usage. +

+
+ Juergen Hoeller + Simon White (.NET) + + +
+ + + The default configuration section name to use if none is explictly supplied. + + + + + + Creates a new instance of the + + class. + + +

+ This is an class, and as such exposes no + public constructors. +

+
+
+ + + Modify the application context's internal object factory after its + standard initialization. + + + The object factory used by the application context. + + + In case of errors. + + + + + + Loads properties from the configuration sections + specified in into . + + The instance to be filled with properties. + + + + Apply the given properties to the supplied + . + + + The + used by the application context. + + The properties to apply. + + If an error occured. + + + + + Validates the supplied . + + +

+ Basically, if external locations are specified, ensure that either + one or a like number of config sections are also specified. +

+
+ + The to be validated. + +
+ + + Simply initializes the supplied + collection with this instances default + (if any). + + + The collection to be so initialized. + + + + + The policy for resolving conflicting property overrides from + several resources. + + +

+ When merging conflicting property overrides from several resources, + should append an override with the same key be appended to the + current value, or should the property override from the last resource + processed override previous values? +

+

+ The default value is ; i.e. a property + override from the last resource to be processed overrides previous + values. +

+
+ + if the property override from the last resource + processed overrides previous values. + +
+ + + Return the order value of this object, where a higher value means greater in + terms of sorting. + + The order value. + + + + + The default properties to be applied. + + +

+ These are to be considered defaults, to be overridden by values + loaded from other resources. +

+
+
+ + + The location of the .NET .config file that contains the property + overrides that are to be applied. + + + + + The locations of the .NET .config files containing the property + overrides that are to be applied. + + + + + The configuration sections to look for within the .config files. + + + + + + + Should a failure to find a .config file be ignored? + + +

+ is only appropriate if the .config file is + completely optional. The default is . +

+
+ + if a failure to find a .config file is to be + ignored. + +
+ + + Apply the given properties to the supplied + . + + + The + used by the application context. + + The properties to apply. + + If an error occured. + + + + + Process the given key as 'name.property' entry. + + + The object factory containing the object definitions that are to be + processed. + + The key. + The value. + + If an error occurs. + + + If the property was not well formed (i.e. not in the format "name.property"). + + + + + implementation that + evaluates a property path on a given target object. + + +

+ The target object can be specified directly or via an object name (see + example below). +

+

+ Please note that the + is an implementation, and as such has + to comply with the contract of the + interface; more specifically, this means that the end result of the property lookup path + evaluation cannot be ( + implementations are not permitted to return ). If the resut of a + property lookup path evaluates to , an exception will be thrown. +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + Juergen Hoeller + Rick Evans (.NET) + + + + Return an instance (possibly shared or independent) of the object + managed by this factory. + + + An instance (possibly shared or independent) of the object managed by + this factory. + + + + + + The target object that the property path lookup is to be applied to. + + +

+ This would most likely be an inner object, but can of course be + any object reference. +

+
+ + The target object that the property path lookup is to be applied to. + + +
+ + + The (object) name of the target object that the property path lookup + is to be applied to. + + +

+ Please note that any leading or trailing whitespace will be + trimmed from this name prior to resolution. The implication of this is that + one cannot use the + class in conjunction with object names that start or end with whitespace. +

+
+ + The (object) name of the target object that the property path lookup + is to be applied to. + + +
+ + + The property (lookup) path to be applied to the target object. + + +

+ Please note that any leading or trailing whitespace will be + trimmed from this path prior to resolution. Whitespace is not a valid + identifier for property names (in part or whole) in CLS-based languages, + so this is a not unreasonable action. Please also note that whitespace + that is embedded within the property path will be left as-is (which may + or may not result in an error being thrown, depending on the context of + the whitespace). +

+
+ +

+ Examples of such property lookup paths can be seen below; note that + property lookup paths can be nested to an arbitrary level. +

+ + name.length + accountManager.account['the key'].name + accounts[0].name + +
+ + The property (lookup) path to be applied to the target object. + +
+ + + The 'expected' of the result from evaluating the + property path. + + +

+ This is not necessary for directly specified target objects, or + singleton target objects, where the can + be determined via reflection. Just specify this in case of a + prototype target, provided that you need matching by type (for + example, for autowiring). +

+

+ It is permissable to set the value of this property to + (which in any case is the default value). +

+
+ + The 'expected' of the result from evaluating the + property path. + +
+ + + Return the of object that this + creates, or + if not known in advance. + + + + + + Is the object managed by this factory a singleton or a prototype? + + + + + + Set the name of the object in the object factory that created this object. + + +

+ The object name of this + + will be interpreted as "objectName.property" pattern, if neither the + + + have been supplied (set). +

+

+ This allows for concise object definitions with just an id or name. +

+
+ + The name of the object in the factory. + +
+ + + Callback that supplies the owning factory to an object instance. + + + Owning + (may not be ). The object can immediately + call methods on the factory. + + + In case of initialization errors. + + + + + Resolves placeholder values in one or more object definitions. + + +

+ The default placeholder syntax follows the NAnt style: ${...}. + Instances of this class can be configured in the same way as any other + object in a Spring.NET container, and so custom placeholder prefix + and suffix values can be set via the + and properties. +

+ +

+ The following example XML context definition defines an object that has + a number of placeholders. The placeholders can easily be distinguished + by the presence of the ${} characters. +

+ + + + + + + + +

+ The associated XML configuration file for the above example containing the + values for the placeholders would contain a snippet such as .. +

+ + + + + + + + +

+ The preceding XML snippet listing the various property keys and their + associated values needs to be inserted into the .NET config file of + your application (or Web.config file for your ASP.NET web application, + as the case may be), like so... +

+ + + + + + + + +
+

+ + checks simple property values, lists, dictionaries, sets, constructor + values, object type name, and object names in + runtime object references ( + ). + Furthermore, placeholder values can also cross-reference other + placeholders, in the manner of the following example where the + rootPath property is cross-referenced by the subPath + property. +

+ + + + + + + + +

+ In contrast to the + + class, this configurer only permits the replacement of explicit + placeholders in object definitions. Therefore, the original definition + cannot specify any default values for its object properties, and the + placeholder configuration file is expected to contain an entry for each + defined placeholder. That is, if an object definition contains a + placeholder ${foo}, there should be an associated + <add key="foo" value="..."/> entry in the + referenced placeholder configuration file. Default property values + can be defined via the inherited + + collection to overcome any perceived limitation of this feature. +

+

+ If a configurer cannot resolve a placeholder, and the value of the + + property is currently set to , an + + will be thrown. If you want to resolve properties from multiple configuration + resources, simply specify multiple resources via the + + property. Finally, please note that you can also define multiple + + instances, each with their own custom placeholder syntax. +

+
+ Juergen Hoeller + Simon White (.NET) + + + +
+ + + The default placeholder prefix. + + + + + The default placeholder suffix. + + + + + Initializes the new instance + + + + + Apply the given properties to the supplied + . + + + The + used by the application context. + + The properties to apply. + + If an error occured. + + + + + Parse values recursively to be able to resolve cross-references between + placeholder values. + + + The map of constructor arguments / property values. + + The string to be resolved. + The placeholders that have already been visited + during the current resolution attempt (used to detect circular references + between placeholders). Only non-null if we're parsing a nested placeholder. + + If an error occurs. + + The resolved string. + + + + Resolve the given placeholder using the given name value collection, + performing an environment variables check according to the given mode. + + +

+ The default implementation delegates to + + before/afer the environment variable check. Subclasses can override + this for custom resolution strategies, including customized points + for the environment properties check. +

+
+ The placeholder to resolve + + The merged name value collection of this configurer. + + The environment variable mode. + + The resolved value or if none. + + +
+ + + Resolve the given placeholder using the given name value collection. + + +

+ This (the default) implementation simply looks up the value of the + supplied key. +

+

+ Subclasses can override this for customized placeholder-to-key + mappings or custom resolution strategies, possibly just using the + given name value collection as fallback. +

+
+ The placeholder to resolve. + + The merged name value collection of this configurer. + + The resolved value. +
+ + + The placeholder prefix (the default is ${). + + + + + + The placeholder suffix (the default is }) + + + + + + Indicates whether unresolved placeholders should be ignored. + + + + + Controls how environment variables will be used to + replace property placeholders. + + +

+ See the overview of the + + enumeration for the available options. +

+
+
+ + + implementation that + retrieves a or non-static public property value. + + +

+ Typically used for retrieving public property values. +

+
+ Rick Evans (.NET) +
+ + + Creates a new instance of the + class. + + + + + Invoked by an + after it has set all object properties supplied + (and satisfied + and ApplicationContextAware). + + + In the event of misconfiguration (such as failure to set an essential + property) or if initialization fails. + + + + + Template method that subclasses must override to construct the object + returned by this factory. + + + If an exception occured during object creation. + + The object returned by this factory. + + + + The of the static property + to be retrieved. + + + + + Arguments for the property invocation. + + +

+ If this property is not set, or the value passed to the setter invocation + is a null or zero-length array, a property with no arguments is assumed. +

+
+
+ + + The name of the property the value of which is to be retrieved. + + +

+ Refers to either a property or a non-static property, + depending on a target object being set. +

+
+
+ + + The object instance on which the property is defined. + + + + + The on which the property is defined. + + + + + Return the type of object that this + creates, or + if not known in advance. + + + + + Implementation of that + resolves variable name against registry key. + + Aleksandar Seovic + + + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Resolves variable value for the specified variable name. + + + The name of the variable to resolve. + + + This implementation resolves REG_SZ as well as REG_MULTI_SZ values. In case of a REG_MULTI_SZ value, + strings are concatenated to a comma-separated list following + + + The variable value if able to resolve, null otherwise. + + + + + Gets or sets the registry key to obtain variable values from. + + + The registry key to obtain variable values from. + + + + + + implementation that allows for convenient registration of custom + IResource implementations. + + +

+ Because the + class implements the + + interface, instances of this class that have been exposed in the + scope of an + will + automatically be picked up by the application context and made + available to the IoC container whenever resolution of IResources is required. +

+
+ Mark Pollack + + +
+ + + Registers custom IResource implementations. The supplied + is not used since IResourse implementations + are registered with a global + + + The object factory. + + + In case of errors. + + + + + The IResource implementations, i.e. resource handlers, to register. + + +

+ The has the + contains the resource protocol name as the key and type as the value. + The key name can either be a string or an object, in which case + ToString() will be used to obtain the string name. + The value can be the fully qualified name of the IResource + implementation, a string, or + an actual of the IResource class + +

+
+
+ + + A convenience class to create a + given the resource base + name and assembly name. + + +

+ This is currently the preferred way of injecting resources into view + tier components (such as Windows Forms GUIs and ASP.NET ASPX pages). + A GUI component (typically a Windows Form) is injected with + an instance, and can + then proceed to use the various GetXxx() methods on the + to retrieve images, + strings, custom resources, etc. +

+
+ Mark Pollack + + + +
+ + + Creates a . + + + If an exception occured during object creation. + + The object returned by this factory. + + + + + + Invoked by an + after it has set all object properties supplied + (and satisfied the + + and + interfaces). + + + In the event of misconfiguration (such as failure to set an essential + property) or if initialization fails. + + + + + + The root name of the resources. + + +

+ For example, the root name for the resource file named + "MyResource.en-US.resources" is "MyResource". +

+ + The namespace is also prefixed before the resource file name. + +
+
+ + + The string representation of the assembly that contains the resource. + + + + + The . + + + + + Immutable placeholder class used for the value of a + object when it's a reference + to another object in this factory to be resolved at runtime. + + Rod Johnson + Rick Evans (.NET) + + + + Creates a new instance of the + + class. + + +

+ This does not mark this object as being a reference to + another object in any parent factory. +

+
+ The name of the target object. +
+ + + Creates a new instance of the + + class. + + +

+ This variant constructor allows a client to specifiy whether or not + this object is a reference to another object in a parent factory. +

+
+ The name of the target object. + + Whether this object is an explicit reference to an object in a + parent factory. + +
+ + + Returns a string representation of this instance. + + A string representation of this instance. + + + + Return the target object name. + + + + + Is this is an explicit reference to an object in the parent + factory? + + + if this is an explicit reference to an + object in the parent factory. + + + + + Simple factory object for shared instances. + + Juergen Hoeller + Simon White (.NET) + + + + Constructs a new instance of the target set. + + The new instance. + + + + Set the source . + + +

+ This value will be used to populate the + returned by this factory. +

+
+
+ + + Set the of the + implementation to use. + + +

+ The default is the . +

+
+
+ + + The of objects created by this factory. + + + Always returns the . + + + + + Configure all ISharedStateAware objects, delegating concrete handling to the list of . + + + + + Creates a new empty instance. + + + + + Creates a new preconfigured instance. + + + priority value affecting order of invocation of this processor. See interface. + + + + Iterates over configured list of s until + the first provider is found that
+ a) true == provider.CanProvideState( instance, name )
+ b) null != provider.GetSharedState( instance, name )
+
+
+ + + A NoOp for this processor + + + The new object instance. + + + The name of the object. + + + the original . + + + + + Return the order value of this object, where a higher value means greater in + terms of sorting. + + +

+ Normally starting with 0 or 1, with indicating + greatest. Same order values will result in arbitrary positions for the affected + objects. +

+

+ Higher value can be interpreted as lower priority, consequently the first object + has highest priority. +

+
+ The order value. +
+ + + Get/Set the (already ordererd!) list of instances. + + + If this list is not set, the containing object factory will automatically + be scanned for instances. + + + + + Implementation of that + resolves variable name against special folders (as defined by + enumeration). + + Aleksandar Seovic + + + + Before requesting a variable resolution, a client should + ask, whether the source can resolve a particular variable name. + + the name of the variable to resolve + true if the variable can be resolved, false otherwise + + + + Resolves specified special folder to its full path. + + + The name of the special folder to resolve. Should be one of the values + defined by the enumeration. + + + The folder path if able to resolve, null otherwise. + + + + + + implementation that allows for convenient registration of custom + type aliases. + + + Type aliases can be used instead of fully qualified type names anywhere + a type name is expected in a Spring.NET configuration file. +

+ Because the + class implements the + + interface, instances of this class that have been exposed in the + scope of an + will + automatically be picked up by the application context and made + available to the IoC container whenever resolution of type aliases is required. +

+
+ Mark Pollack + + +
+ + + Registers any type aliases. The supplied + is not used since type aliases + are registered with a global + + + The object factory. + + + In case of errors. + + + + + The type aliases to register. + + +

+ The has the + contains the alias name as the key and type as the value. + The key name can either be a string or an object, in which case + ToString() will be used to obtain the string name. + the value can be the fully qualified name of the type as a string or + an actual of the class that + being aliased. +

+
+
+ + + Holder for a typed value. + + +

+ Can be added to object definitions to explicitly specify + a target type for a value, + for example for collection + elements. +

+

+ This holder just stores the value and the target + . The actual conversion will be performed by + the surrounding object factory. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Creates a new instance of the + + class. + + + + + Initializes a new instance of the class. + + The value. + + + + Creates a new instance of the + + class. + + + The value that is to be converted. + + + The to convert to. + + + If the supplied is + . + + + + + The value that is to be converted. + + +

+ Obviously if the + + is the , no conversion + will actually be performed. +

+
+
+ + + The to convert to. + + + If the setter is supplied with a value. + + + + + Gets a value indicating whether this instance has target type. + + + true if this instance has target type; otherwise, false. + + + + + Provides methods for type-safe accessing s. + + Erich Eichinger + + + + Initialize a new instance of an + + The underlying to read values from. + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The expected format of the variable's value + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The expected format of the variable's value + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + A that contains the value of the specified variable + or , if returns null. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + A that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns an of type that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + An of type that contains the value of the specified variable + or , if returns null. + + + + + Returns an of type that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns null. + + If false, suppresses exceptions if the result + of cannot be parsed + and returns instead. + + An of type that contains the value of the specified variable + or , if cannot be parsed. + + + + + Returns a that contains the value of the specified variable. + + The name of the variable to be read. + The value to be returned if returns or . + + A that contains the value of the specified variable + or , if returns null. + + + + + Resolves placeholder values in one or more object definitions + + + The placeholder syntax follows the NAnt style: ${...}. + Placeholders values are resolved against a list of + s. In case of multiple definitions + for the same property placeholder name, the first one in the + list is used. + Variable substitution is performed on simple property values, + lists, dictionaries, sets, constructor + values, object type name, and object names in + runtime object references ( + ). + Furthermore, placeholder values can also cross-reference other + placeholders, in the manner of the following example where the + rootPath property is cross-referenced by the subPath + property. + + + + + + + + + + If a configurer cannot resolve a placeholder, and the value of the + + property is currently set to , an + + will be thrown. + + Mark Pollack + + + + The default placeholder prefix. + + + + + The default placeholder suffix. + + + + + Create a new instance without any variable sources + + + + + Create a new instance and initialize with the given variable source + + + + + + Create a new instance and initialize with the given list of variable sources + + + + + Modify the application context's internal object factory after its + standard initialization. + + The object factory used by the application context. + +

+ All object definitions will have been loaded, but no objects will have + been instantiated yet. This allows for overriding or adding properties + even to eager-initializing objects. +

+
+ + In case of errors. + +
+ + + Apply the property replacement using the specified s for all + object in the supplied + . + + + The + used by the application context. + + + If an error occured. + + + + + Sets the list of s that will be used to resolve placeholder names. + + A list of s. + + + + Sets that will be used to resolve placeholder names. + + A instance. + + + + The placeholder prefix (the default is ${). + + + + + + The placeholder suffix (the default is }) + + + + + + Indicates whether unresolved placeholders should be ignored. + + + + + Return the order value of this object, where a higher value means greater in + terms of sorting. + + The order value. + + + + + Context that gets passed along an object definition reading process, + encapsulating all relevant configuraiton as well as state. + + Rob Harrop + Juergen Hoeller + Mark Pollack (.NET) + + + + Initializes a new instance of the class. + + The resource. + + + + Gets the resource. + + The resource. + + + + Abstract superclass + that implements default object creation. + + +

+ Provides object creation, initialization and wiring, supporting + autowiring and constructor resolution. Handles runtime object + references, managed collections, and object destruction. +

+

+ The main template method to be implemented by subclasses is + , + used for autowiring by type. Note that this class does not implement object + definition registry capabilities + ( + does). +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) +
+ + + Abstract superclass for + implementations. + + +

+ This class provides singleton / prototype determination, singleton caching, + object definition aliasing, + handling, and object definition merging for child object definitions. +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) +
+ + + Marker object to be temporarily registered in the singleton cache, + while instantiating an object (in order to be able to detect circular references). + + + + + Used as value in hashtable that keeps track of singleton names currently in the + process of being created. Would not be necessary if we created a case insensitive implementation of + ISet. + + + + + The instance for this class. + + + + + Cache of singleton objects created by s: FactoryObject name -> product + + + + + Creates a new instance of the + class. + + +

+ This constructor implicitly creates an + + that treats the names of objects in this factory in a case-sensitive fashion. +

+

+ This is an class, and as such exposes no public constructors. +

+
+
+ + + Creates a new instance of the + class. + + +

+ This is an class, and as such exposes no public constructors. +

+
+ + if the names of objects in this factory are to be treated in a + case-sensitive fashion. + +
+ + + Creates a new instance of the + class. + + +

+ This is an class, and as such exposes no public constructors. +

+
+ + if the names of objects in this factory are to be treated in a + case-sensitive fashion. + + + Any parent object factory; may be . + +
+ + + Return an instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + + + Apply the property values of the object definition with the supplied + to the supplied . + + +

+ The object definition can either define a fully self-contained object, + reusing it's property values, or just property values meant to be used + for existing object instances. +

+
+ + The existing object that the property values for the named object will + be applied to. + + + The name of the object definition associated with the property values that are + to be applied. + + + In case of errors. + +
+ + + Apply the property values of the object definition with the supplied + to the supplied . + + +

+ The object definition can either define a fully self-contained object, + reusing it's property values, or just property values meant to be used + for existing object instances. +

+
+ + The existing object that the property values for the named object will + be applied to. + + + The name of the object definition associated with the property values that are + to be applied. + + + An object definition that should be used to apply property values. + + + In case of errors. + +
+ + + Create an object instance for the given object definition. + + The name of the object. + + The object definition for the object that is to be instantiated. + + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. It is invalid to use a non- arguments value + in any other case. + + + Whether eager caching of singletons is allowed... typically true for + singlton objects, but never true for inner object definitions. + + + Create instance only - suppress injecting dependencies yet. + + + A new instance of the object. + + + In case of errors. + + +

+ The object definition will already have been merged with the parent + definition in case of a child definition. +

+

+ All the other methods in this class invoke this method, although objects + may be cached after being instantiated by this method. All object + instantiation within this class is performed by this method. +

+
+
+ + + Destroy the target object. + + +

+ Must destroy objects that depend on the given object before the object itself, + nor throw an exception. +

+
+ + The name of the object. + + + The target object instance to destroyed. + +
+ + + Does this object factory contain an object definition with the + supplied ? + + +

+ Does not consider any hierarchy this factory may participate in. + Invoked by + + when no cached singleton instance is found. +

+
+ + The name of the object to look for. + + + if this object factory contains an object + definition with the supplied . + +
+ + + Adds the supplied (object) to this factory's + singleton cache. + + +

+ To be called for eager registration of singletons, e.g. to be able to + resolve circular references. +

+ + If a singleton has already been registered under the same name as + the supplied , then the old singleton will + be replaced. + +
+ The name of the object. + The singleton object. + + If the argument is + or consists wholly of whitespace characters; or if the + is . + +
+ + + Return the object name, stripping out the factory dereference prefix if + necessary, and resolving aliases to canonical names. + + + The transformed name of the object. + + + + + Ensures, that the given name is prefixed with + if it incidentially already starts with this prefix. This avoids troubles when dereferencing + the object name during + + + + + Determines whether the specified name is defined as an alias as opposed + to the name of an actual object definition. + + The object name to check. + + true if the specified name is alias; otherwise, false. + + + + + Return a , + even by traversing parent if the parameter is a child definition. + + + The name of the object. + + + Are ancestors to be included in the merge? + + +

+ Will ask the parent object factory if not found in this instance. +

+
+ + A merged + with overridden properties. + +
+ + + Return a , + even by traversing parent if the parameter is a child definition. + + + A merged + with overridden properties. + + + + + Creates the root object definition. + + The template definition to base root definition on. + Root object definition. + + + + Register a new object definition with this registry. + + + The name of the object instance to register. + + + The definition of the object instance to register. + + + If the object definition is invalid. + + + + + + Return the registered + for the + given object, allowing access to its property values and constructor + argument values. + + The name of the object. + + The registered + . + + + If there is no object with the given name. + + + In the case of errors. + + + + + Return the registered + for the + given object, allowing access to its property values and constructor + argument values. + + The name of the object. + Whether to search parent object factories. + + The registered + . + + + If there is no object with the given name. + + + In the case of errors. + + + + + Gets the type for the given FactoryObject. + + The factory object instance to check. + the FactoryObject's object type + + + + Gets the object type for the given FactoryObject definition, as far as possible. + Only called if there is no singleton instance registered for the target object already. + + + The default implementation creates the FactoryObject via GetObject + to call its ObjectType property. Subclasses are encouraged to optimize + this, typically by just instantiating the FactoryObject but not populating it yet, + trying whether its ObjectType property already returns a type. + If no type found, a full FactoryObject creation as performed by this implementation + should be used as fallback. + + Name of the object. + The merged object definition for the object. + The type for the object if determinable, or null otherwise + + + + Predict the eventual object type (of the processed object instance) for the + specified object. + + + Does not need to handle FactoryObjects specifically, since it is only + supposed to operate on the raw object type. + This implementation is simplistic in that it is not able to + handle factory methods and InstantiationAwareBeanPostProcessors. + It only predicts the object type correctly for a standard object. + To be overridden in subclasses, applying more sophisticated type detection. + + Name of the object. + The merged object definition to determine the type for. May be null + The type of the object, or null if not predictable + + + + Get the object for the given object instance, either the object + instance itself or its created object in case of an + . + + + The name that may include the factory dereference prefix. + + The object instance. + + The singleton instance of the object. + + + + + Get the object for the given object instance, either the object + instance itself or its created object in case of an + . + + The object instance. + + The name that may include the factory dereference prefix (=the requested name). + + + The canonical object name + + the merged object definition + + The singleton instance of the object. + + + + + Obtain an object to expose from the given IFactoryObject. + + The IFactoryObject instance. + Name of the object. + The merged object definition. + The object obtained from the IFactoryObject + If IFactoryObject object creation failed. + + + + Post-process the given object that has been obtained from the FactoryObject. + The resulting object will be exposed for object references. + + The default implementation simply returns the given object + as-is. Subclasses may override this, for example, to apply + post-processors. + The instance obtained from the IFactoryObject. + Name of the object. + The object instance to expose + if any post-processing failed. + + + + Convenience method to pull an + from this factory. + + + The name of the factory object to be retrieved. If this name is not a valid + name, it will be converted + into one. + + + The associated with the + supplied . + + + + + Is the supplied a factory object dereference? + + + + + Determines whether the type of the given object definition matches the + specified target type. + + Allows for lazy load of the actual object type, provided that the + type match can be determined otherwise. + The default implementation simply delegates to the standard + ResolveObjectType method. Subclasses may override this to use + a differnt strategy. + + Name of the object (for error handling purposes). + The merged object definition to determine the type for. + Type to match against (never null). + + true if object definition matches tye specified target type; otherwise, false. + + if we failed to load the type." + + + + Resolves the type of the object for the specified object definition resolving + an object type name to a Type (if necessary) and storing the resolved Type + in the object definition for further use. + + The merged object definition to dertermine the type for. + Name of the object (for error handling purposes). + + + + + Is the object (definition) with the supplied an + ? + + The name of the object to be checked. + + the object (definition) with the supplied + an ? + + + + + Remove the object identified by the supplied + from this factory's singleton cache. + + + The name of the object that is to be removed from the singleton + cache. + + + If the argument is or + consists wholly of whitespace characters. + + + + + Return the names of objects in the singleton cache that match the given + object type (including subclasses). + + + The class or interface to match, or for all object names. + + +

+ Will not consider s + as the type of their created objects is not known before instantiation. +

+

+ Does not consider any hierarchy this factory may participate in. +

+
+ + The names of objects in the singleton cache that match the given + object type (including subclasses), or an empty array if none. + +
+ + + Determines whether the object with the given name matches the specified type. + + More specifically, check whether a GetObject call for the given name + would return an object that is assignable to the specified target type. + Translates aliases back to the corresponding canonical bean name. + Will ask the parent factory if the bean cannot be found in this factory instance. + + The name of the object to query. + Type of the target to match against. + + true if the object type matches; otherwise, false + if it doesn't match or cannot be determined yet. + + Ff there is no object with the given name + + + + + Determines the of the object with the + supplied . + + +

+ More specifically, checks the of object that + would return. + For an , returns the + of object that the + creates. +

+

+ Please note that (prototype) objects created via a factory method or + objects are handled + slightly differently, in that we don't want to needlessly create + instances of such objects just to determine the + of object that they create. +

+
+ The name of the object to query. + + The of the object or + if not determinable. + +
+ + + Determines the of the object defined + by the supplied object . + + +

+ This, the default, implementation returns + to indicate that the type cannot be determined. Subclasses are + encouraged to try to determine the actual return + here, matching their strategy of resolving + factory methods in the + Spring.Objects.Factory.Support.AbstractObjectFactory.CreateObject + implementation. +

+
+ + The name associated with the supplied object . + + + The + that the is to be determined for. + + + The of the object defined by the supplied + object ; or if the + cannot be determined. + +
+ + + Returns the names of the objects in the singleton cache. + + +

+ Does not consider any hierarchy this factory may participate in. +

+
+ The names of the objects in the singleton cache. +
+ + + Returns the number of objects in the singleton cache. + + +

+ Does not consider any hierarchy this factory may participate in. +

+
+ The number of objects in the singleton cache. +
+ + + Destroys the named singleton object. + + +

+ Delegates to + + if a corresponding singleton instance is found. +

+
+ + The name of the singleton object that is to be destroyed. + + +
+ + + Check the supplied merged object definition for any possible + validation errors. + + + The object definition to be checked for validation errors. + + + The name of the object associated with the supplied object definition. + + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + + In the case of object validation errors. + + + + + Parent object factory, for object inheritance support + + + + + Dependency types to ignore on dependency check and autowire, as Set of + Type objects: for example, string. Default is none. + + + + + ObjectPostProcessors to apply in CreateObject + + + + + Indicates whether any IInstantiationAwareBeanPostProcessors have been registered + + + + + Indicates whether any IDestructionAwareBeanPostProcessors have been registered + + + + + Set of registered singletons, containing the bean names in registration order + + + + + Set that holds all inner objects created by this factory that implement the IDisposable + interface, to be destroyed on call to Dispose. + + + + + Determines whether the local object factory contains a bean of the given name, + ignoring object defined in ancestor contexts. + This is an alternative to ContainsObject, ignoring an object + of the given name from an ancestor object factory. + + The name of the object to query. + + true if objects with the specified name is defined in the local factory; otherwise, false. + + + + + Is this object a singleton? + + + + + + Determines whether the specified object name is prototype. That is, will GetObject + always return independent instances? + + The name of the object to query + + true if the specified object name will always deliver independent instances; otherwise, false. + + This method returning false does not clearly indicate a singleton object. + It indicated non-independent instances, which may correspond to a scoped object as + well. use the IsSingleton property to explicitly check for a shared + singleton instance. + Translates aliases back to the corresponding canonical object name. Will ask the + parent factory if the object can not be found in this factory instance. + + + if there is no object with the given name. + + + + Does this object factory or one of its parent factories contain an object with the given name? + + + This method scans the object factory hierarchy starting with the current factory instance upwards. + Use if you want to explicitely check just this object factory instance. + + . + + + + Return the aliases for the given object name, if defined. + + . + + + + Return an unconfigured(!) instance (possibly shared or independent) of the given object name. + + + + This method will only instantiate the requested object. It does NOT inject any dependencies! + + + + + Return an instance (possibly shared or independent) of the given object name. + + . + + + + Return an instance (possibly shared or independent) of the given object name. + + + + + + Return an instance (possibly shared or independent) of the given object name. + + +

+ This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. +

+

+ Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. +

+

+ Will ask the parent factory if the object cannot be found in this factory + instance. +

+
+ The name of the object to return. + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. If there is no factory method and the + arguments are not null, then match the argument values by type and + call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the supplied is . + +
+ + + Return an instance (possibly shared or independent) of the given object name, + optionally injecting dependencies. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + whether to inject dependencies or not. + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + + + + Checks, if the passed instance is of the required type. + + the name of the object + the actual instance + the type contract the given instance must adhere. + the object instance passed in via (for more fluent usage) + + if is null or not assignable to . + + + + + Creates a singleton instance for the specified object name and definition. + + + The object name (will be used as the key in the singleton cache key). + + The object definition. + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. If there is no factory method and the + arguments are not null, then match the argument values by type and + call the object's constructor. + + The created object instance. + + + + Injects dependencies into the supplied instance + using the named object definition. + + + + + + Injects dependencies into the supplied instance + using the supplied . + + + + + + Destroy all cached singletons in this factory. + + + + + Ignore the given dependency type for autowiring + + . + + + + Determines whether the specified object name is currently in creation.. + + Name of the object. + + true if the specified object name is currently in creation; otherwise, false. + + + + + Add a new + that will get applied to objects created by this factory. + + + The + to register. + + . + + + + Given an object name, create an alias. + + . + + + + Register the given custom + for all properties of the given . + + . + + + + Register the given existing object as singleton in the object factory, + under the given object name. + + . + + + + Does this object factory contains a singleton instance with the + supplied ? + + + + + + Tries to find a cached object for the specified name. + + Teh object name to look for. + The cached object if found, otherwise. + + + + Determines whether the given object name is already in use within this factory, + i.e. whether there is a local object or alias registered under this name or + an inner object created with this name. + + Name of the object to check. + + true if is object name in use; otherwise, false. + + + + + Returns, whether this factory treats object names case sensitive or not. + + + + + Gets the of + s + that will be applied to objects created by this factory. + + + + + Gets the set of classes that will be ignored for autowiring. + + +

+ The elements of this are + s. +

+
+
+ + + Returns, whether this object factory instance contains objects. + + + + + Returns, whether this object factory instance contains objects. + + + + + Gets the temporary object that is placed + into the singleton cache during object resolution. + + + + + Set that holds all inner objects created by this factory that implement the IDisposable + interface, to be destroyed on call to Dispose. + + + + + The parent object factory, or if there is none. + + + The parent object factory, or if there is none. + + + + + Return an instance (possibly shared or independent) of the given object name. + + . + + + + Returns the current number of registered + s. + + + The current number of registered + s. + + . + + + + Gets the names of singleton objects registered in this registry. + + The list of names as String array (never null). + + + Only checks already instantiated singletons; does not return names + for singleton bean definitions which have not been instantiated yet. + + + The main purpose of this method is to check manually registered singletons + . Can also be used to check which + singletons defined by an object definition have already been created. + + + + + + + + + Gets the number of singleton beans registered in this registry. + + The number of singleton objects. + + + Only checks already instantiated singletons; does not count + singleton object definitions which have not been instantiated yet. + + + The main purpose of this method is to check manually registered singletons + . Can also be used to count the number of + singletons defined by an object definition that have already been created. + + + + + + + + + Makes a distinction between sort order and object identity. + This is important when used with , since most + implementations assume Order == Identity + + + + + Handle the case when both objects have equal sort order priority. By default returns 0, + but may be overriden for handling special cases. + + The first object to compare. + The second object to compare. + + -1 if first object is less then second, 1 if it is greater, or 0 if they are equal. + + + + + The used during the invocation and + searching for of methods. + + + + + The instance for this class. + + + + + Creates a new instance of the + + class. + + +

+ This is an class, and as such exposes no public constructors. +

+
+ Flag specifying whether to make this object factory case sensitive or not. +
+ + + Creates a new instance of the + + class. + + +

+ This is an class, and as such exposes no public constructors. +

+
+ Flag specifying whether to make this object factory case sensitive or not. + The parent object factory, or if none. +
+ + + Predict the eventual object type (of the processed object instance) for the + specified object. + + Name of the object. + The merged object definition to determine the type for. May be null + + The type of the object, or null if not predictable + + + + + Determines the of the object defined + by the supplied object . + + + The name associated with the supplied object . + + + The + that the is to be determined for. + + + The of the object defined by the supplied + object ; or if the + cannot be determined. + + + + + Apply the property values of the object definition with the supplied + to the supplied . + + + The existing object that the property values for the named object will + be applied to. + + + The name of the object definition associated with the property values that are + to be applied. + + + + + Apply the property values of the object definition with the supplied + to the supplied . + + + The existing object that the property values for the named object will + be applied to. + + + The name of the object definition associated with the property values that are + to be applied. + + + An object definition that should be used to apply property values. + + + + + Apply any + s. + + +

+ The returned instance may be a wrapper around the original. +

+
+ + The of the object that is to be + instantiated. + + + The name of the object that is to be instantiated. + + + An instance to use in place of the original instance. + + + In case of errors. + +
+ + + Apply the given property values, resolving any runtime references + to other objects in this object factory. + + + The object name passed for better exception information. + + + The definition of the named object. + + + The wrapping the target object. + + + The new property values. + + +

+ Must use deep copy, so that we don't permanently modify this property. +

+
+
+ + + Create the value resolver strategy to use for resolving raw property values + + + + + Return an array of object-type property names that are unsatisfied. + + +

+ These are probably unsatisfied references to other objects in the + factory. Does not include simple properties like primitives or + s. +

+
+ + An array of object-type property names that are unsatisfied. + + + The definition of the named object. + + + The wrapping the target object. + +
+ + + Destroy all cached singletons in this factory. + + +

+ To be called on shutdown of a factory. +

+
+
+ + + Populate the object instance in the given + with the property values from the + object definition. + + + The name of the object. + + + The definition of the named object. + + + The wrapping the target object. + + + + + Wires up any exposed events in the object instance in the given + with any event handler + values from the . + + + The name of the object. + + + The definition of the named object. + + + The wrapping the target object. + + + + + Fills in any missing property values with references to + other objects in this factory if autowire is set to + . + + + The object name to be autowired by . + + + The definition of the named object to update through autowiring. + + + The wrapping the target object (and + from which we can rip out information concerning the object). + + + The property values to register wired objects with. + + + + + Defines "autowire by type" (object properties by type) behavior. + + +

+ This is like PicoContainer default, in which there must be exactly one object + of the property type in the object factory. This makes object factories simple + to configure for small namespaces, but doesn't work as well as standard Spring + behavior for bigger applications. +

+
+ + The object name to be autowired by . + + + The definition of the named object to update through autowiring. + + + The wrapping the target object (and + from which we can rip out information concerning the object). + + + The property values to register wired objects with. + +
+ + + Ignore the given dependency type for autowiring + + + This will typically be used by application contexts to register + dependencies that are resolved in other ways, like IOjbectFactory through + IObjectFactoryAware or IApplicationContext through IApplicationContextAware. + By default, IObjectFactoryAware and IObjectName interfaces are ignored. + For further types to ignore, invoke this method for each type. + + . + + + + Create an object instance for the given object definition. + + The name of the object. + + The object definition for the object that is to be instantiated. + + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. It is invalid to use a non- arguments value + in any other case. + + + Whether eager caching of singletons is allowed... typically true for + singlton objects, but never true for inner object definitions. + + + Suppress injecting dependencies yet. + + + A new instance of the object. + + + In case of errors. + + +

+ The object definition will already have been merged with the parent + definition in case of a child definition. +

+

+ All the other methods in this class invoke this method, although objects + may be cached after being instantiated by this method. All object + instantiation within this class is performed by this method. +

+
+
+ + + Add the created, but yet unpopulated singleton to the singleton cache + to be able to resolve circular references + + the name of the object to add to the cache. + the definition used to create and populated the object. + the raw object instance. + + Derived classes may override this method to select the right cache based on the object definition. + + + + + Remove the specified singleton from the singleton cache that has + been added before by a call to + + the name of the object to remove from the cache. + the definition used to create and populated the object. + + Derived classes may override this method to select the right cache based on the object definition. + + + + + Creates an instance from the passed in + using constructor + + The name of the object to create - used for error messages. + The describing the object to be created. + optional arguments to pass to the constructor + An wrapping the already instantiated object + + + + Instantiates the given object using its default constructor + + Name of the object. + The definition. + IObjectWrapper for the new instance + + + + Determines candidate constructors to use for the given bean, checking all registered + + + Raw type of the object. + Name of the object. + the candidate constructors, or null if none specified + In case of errors + + + + + Instantiate an object instance using a named factory method. + + +

+ The method may be static, if the + parameter specifies a class, rather than a + instance, or an + instance variable on a factory object itself configured using Dependency + Injection. +

+

+ Implementation requires iterating over the static or instance methods + with the name specified in the supplied + (the method may be overloaded) and trying to match with the parameters. + We don't have the types attached to constructor args, so trial and error + is the only way to go here. +

+
+ + The name associated with the supplied . + + + The definition describing the instance that is to be instantiated. + + + Any arguments to the factory method that is to be invoked. + + + The result of the factory method invocation (the instance). + +
+ + + "autowire constructor" (with constructor arguments by type) behaviour. + + The name of the object to autowire by type. + The object definition to update through autowiring. + The chosen candidate constructors. + The argument values passed in programmatically via the GetObject method, + or null if none (-> use constructor argument values from object definition) + + An for the new instance. + + + + Also applied if explicit constructor argument values are specified, + matching all remaining arguments with objects from the object factory. + + + This corresponds to constructor injection: in this mode, a Spring.NET + object factory is able to host components that expect constructor-based + dependency resolution. + + + + + + Perform a dependency check that all properties exposed have been set, if desired. + + +

+ Dependency checks can be objects (collaborating objects), simple (primitives + and ), or all (both). +

+
+ + The name of the object. + + + The definition of the named object. + + + The wrapping the target object. + + + The property values to be checked. + + + If all of the checked dependencies were not satisfied. + +
+ + + Extract a filtered set of PropertyInfos from the given IObjectWrapper, excluding + ignored dependency types. + + The object wrapper the object was created with. + The filtered PropertyInfos + + + + Determine whether the given bean property is excluded from dependency checks. + This implementation excludes properties whose type matches an ignored dependency type + or which are defined by an ignored dependency interface. + + + + the of the object property + whether the object property is excluded + + + + Give an object a chance to react now all its properties are set, + and a chance to know about its owning object factory (this object). + + +

+ This means checking whether the object implements + and / or + , and invoking the + necessary callback(s) if it does. +

+

+ Custom init methods are resolved in a case-insensitive manner. +

+
+ + The new object instance we may need to initialise. + + + The name the object has in the factory. Used for logging output. + + + The definition of the target object instance. + +
+ + + Invoke the specified custom destroy method on the given object. + + +

+ This implementation invokes a no-arg method if found, else checking + for a method with a single boolean argument (passing in "true", + assuming a "force" parameter), else logging an error. +

+

+ Can be overridden in subclasses for custom resolution of destroy + methods with arguments. +

+

+ Custom destroy methods are resolved in a case-insensitive manner. +

+
+
+ + + Destroy the target object. + + +

+ Must destroy objects that depend on the given object before the object itself. + Should not throw any exceptions. +

+
+ + The name of the object. + + + The target object instance to destroyed. + +
+ + + Destroys all of the objects registered as dependant on the + object (definition) identified by the supplied . + + + The name of the root object (definition) that is itself being destroyed. + + + + + Resolve a reference to another object in the factory. + + + The name of the object that is having the value of one of its properties resolved. + + + The definition of the named object. + + + The name of the property the value of which is being resolved. + + + The runtime reference containing the value of the property. + + A reference to another object in the factory. + + + + Find object instances that match the required . + + +

+ Called by autowiring. If a subclass cannot obtain information about object + names by , a corresponding exception should be thrown. +

+
+ + The of the objects to look up. + + + An of object names and object + instances that match the required , or + if none are found. + + + In case of errors. + +
+ + + Return the names of the objects that depend on the given object. + Called by DestroyObject, to be able to destroy depending objects first. + + + The name of the object to find depending objects for. + + + The array of names of depending objects, or the empty string array if none. + + + In case of errors. + + + + + Injects dependencies into the supplied instance + using the named object definition. + + + The object instance that is to be so configured. + + + The name of the object definition expressing the dependencies that are to + be injected into the supplied instance. + + + + + + Injects dependencies into the supplied instance + using the supplied . + + + The object instance that is to be so configured. + + + The name of the object definition expressing the dependencies that are to + be injected into the supplied instance. + + + An object definition that should be used to configure object. + + + + + + Configures object instance by injecting dependencies, satisfying Spring lifecycle + interfaces and applying object post-processors. + + + The name of the object definition expressing the dependencies that are to + be injected into the supplied instance. + + + An object definition that should be used to configure object. + + + A wrapped object instance that is to be so configured. + + + + + + Applies the PostProcessAfterInitialization callback of all + registered IObjectPostProcessors, giving them a chance to post-process + the object obtained from IFactoryObjects (for example, to auto-proxy them) + + The instance obtained from the IFactoryObject. + Name of the object. + The object instance to expose + if any post-processing failed. + + + + Create a new object instance of the given class with the specified + autowire strategy. + + + The of the object to instantiate. + + + The desired autowiring mode. + + + Whether to perform a dependency check for objects (not applicable to + autowiring a constructor, thus ignored there). + + The new object instance. + + If the wiring fails. + + + + + + Autowire the object properties of the given object instance by name or + . + + + The existing object instance. + + + The desired autowiring mode. + + + Whether to perform a dependency check for the object. + + + If the wiring fails. + + + If the supplied is not one of the + or + + values. + + + + + + Apply s + to the given existing object instance, invoking their + + methods. + + + The existing object instance. + + + The name of the object. + + + The object instance to use, either the original or a wrapped one. + + + If any post-processing failed. + + + + + + Apply s + to the given existing object instance, invoking their + + methods. + + + The existing object instance. + + + The name of the object. + + + The object instance to use, either the original or a wrapped one. + + + If any post-processing failed. + + + + + + Resolve the specified dependency against the objects defined in this factory. + + The descriptor for the dependency. + Name of the object which declares the present dependency. + A list that all names of autowired object (used for + resolving the present dependency) are supposed to be added to. + + the resolved object, or null if none found + + if dependency resolution failed + + + + Cache of filtered PropertyInfos: object Type -> PropertyInfo array + + + + + Dependency interfaces to ignore on dependency check and autowire, as Set of + Class objects. By default, only the IObjectFactoryAware and IObjectNameAware + interfaces are ignored. + + + + + The + implementation to be used to instantiate managed objects. + + + + + An + implementation that provides some convenience support for + derived classes. + + +

+ This class is reserved for internal use within the framework; it is + not intended to be used by application developers using Spring.NET. +

+
+ Rick Evans +
+ + + Permits the (re)implementation of an arbitrary method on a Spring.NET + IoC container managed object. + + +

+ Encapsulates the notion of the Method-Injection form of Dependency + Injection. +

+

+ Methods that are dependency injected with implementations of this + interface may be (but need not be) , in which + case the container will create a concrete subclass of the + class prior to instantiation. +

+

+ Do not use this mechanism as a means of AOP. See the reference + manual for examples of appropriate usages of this interface. +

+
+ Rod Johnson + Rick Evans (.NET) +
+ + + Reimplement the supplied . + + + The instance whose is to be + (re)implemented. + + + The method that is to be (re)implemented. + + The target method's arguments. + + The result of the (re)implementation of the method call. + + + + + Creates a new instance of the + + class. + + +

+ This is an class, and as such has no + publicly visible constructors. +

+
+ + The object definition that is the target of the method replacement. + + + The enclosing IoC container with which the above + is associated. + + + If either of the supplied arguments is . + +
+ + + Is ; derived classes must supply an implementation. + + + The instance whose is to be + (re)implemented. + + + The method that is to be (re)implemented. + + The target method's arguments. + The result of the object lookup. + + + + Helper method for subclasses to retrieve the appropriate + for the + supplied . + + + The to use to retrieve + the appropriate + . + + + The appropriate + . + + + + + Helper method for subclasses to lookup an object from an enclosing + IoC container. + + + The name of the object that is to be looked up. + + + The named object. + + + + + Common base class for object definitions, factoring out common + functionality from + and + . + + Rod Johnson + Juergen Hoeller + Rick Evans (.NET) + + + + Describes a configurable object instance, which has property values, + constructor argument values, and further information supplied by concrete + implementations. + + Rick Evans + + + + Return the property values to be applied to a new instance of the object. + + + + + Return the constructor argument values for this object. + + + + + The method overrides (if any) for this object. + + + The method overrides (if any) for this object; may be an + empty collection but is guaranteed not to be + . + + + + + Return the event handlers for any events exposed by this object. + + + + + Get or set the role hint for this object definition + + + + + Return a description of the resource that this object definition + came from (for the purpose of showing context in case of errors). + + + + + Is this object definition "abstract", i.e. not meant to be instantiated + itself but rather just serving as parent for concrete child object + definitions. + + + if this object definition is "abstract". + + + + + Returns the of the object definition (if any). + + + A resolved object . + + + If the of the object definition is not a + resolved or . + + + + + Returns the of the + of the object definition (if any). + + + + + Return whether this a Singleton, with a single, shared instance + returned on all calls. + + +

+ If , an object factory will apply the Prototype + design pattern, with each caller requesting an instance getting an + independent instance. How this is defined will depend on the + object factory implementation. Singletons are the commoner type. +

+
+
+ + + Is this object lazily initialized? + +

+ Only applicable to a singleton object. +

+

+ If , it will get instantiated on startup by object factories + that perform eager initialization of singletons. +

+
+
+ + + The autowire mode as specified in the object definition. + + +

+ This determines whether any automagical detection and setting of + object references will happen. Default is + , + which means there's no autowire. +

+
+
+ + + The dependency check code. + + + + + The object names that this object depends on. + + +

+ The object factory will guarantee that these objects get initialized + before. +

+

+ Note that dependencies are normally expressed through object properties + or constructor arguments. This property should just be necessary for + other kinds of dependencies like statics (*ugh*) or database + preparation on startup. +

+
+
+ + + The name of the initializer method. + + +

+ The default is , in which case there is no initializer method. +

+
+
+ + + Return the name of the destroy method. + + +

+ The default is , in which case there is no destroy method. +

+
+
+ + + The name of the factory method to use (if any). + + +

+ This method will be invoked with constructor arguments, or with no + arguments if none are specified. The static method will be invoked on + the specified . +

+
+
+ + + The name of the factory object to use (if any). + + + + + Gets or sets a value indicating whether this instance a candidate for getting autowired into some other + object. + + + true if this instance is autowire candidate; otherwise, false. + + + + + Creates a new instance of the + + class. + + +

+ This is an class, and as such exposes no + public constructors. +

+
+
+ + + Creates a new instance of the + + class. + + +

+ This is an class, and as such exposes no + public constructors. +

+
+
+ + + Creates a new instance of the + + class. + + + The object definition used to initialise the member fields of this + instance. + + +

+ This is an class, and as such exposes no + public constructors. +

+
+
+ + + Resolves the type of the object, resolving it from a specified + object type name if necessary. + + + A resolved instance. + + + If the type cannot be resolved. + + + + + Validate this object definition. + + + In the case of a validation failure. + + + + + Validates all + + + + + Validate the supplied . + + + The + to be validated. + + + + + Override settings in this object definition from the supplied + object definition. + + + The object definition used to override the member fields of this instance. + + + + + Returns a that represents the current + . + + + A that represents the current + . + + + + + The name of the parent definition of this object definition, if any. + + + + + The property values that are to be applied to the object + upon creation. + + +

+ Setting the value of this property to + will merely result in a new (and empty) + + collection being assigned to the property value. +

+
+ + The property values (if any) for this object; may be an + empty collection but is guaranteed not to be + . + +
+ + + Does this definition have any + ? + + + if this definition has at least one + . + + + + + The constructor argument values for this object. + + +

+ Setting the value of this property to + will merely result in a new (and empty) + + collection being assigned. +

+
+ + The constructor argument values (if any) for this object; may be an + empty collection but is guaranteed not to be + . + +
+ + + The event handler values for this object. + + +

+ Setting the value of this property to + will merely result in a new (and empty) + + collection being assigned. +

+
+ + The event handler values (if any) for this object; may be an + empty collection but is guaranteed not to be + . + +
+ + + The method overrides (if any) for this object. + + +

+ Setting the value of this property to + will merely result in a new (and empty) + + collection being assigned to the property value. +

+
+ + The method overrides (if any) for this object; may be an + empty collection but is guaranteed not to be + . + +
+ + + The name of the target scope for the object. + Defaults to "singleton", ootb alternative is "prototype". Extended object factories + might support further scopes. + + + + + Get or set the role hint for this object definition + + + + + Is this definition a singleton, with + a single, shared instance returned on all calls to an enclosing + container (typically an + or + ). + + +

+ If , an object factory will apply the + prototype design pattern, with each caller requesting an + instance getting an independent instance. How this is defined + will depend on the object factory implementation. singletons + are the commoner type. +

+
+ +
+ + + Gets a value indicating whether this instance is prototype, with an independent instance + returned for each call. + + + true if this instance is prototype; otherwise, false. + + + + + Is this object lazily initialized? + +

+ Only applicable to a singleton object. +

+

+ If , it will get instantiated on startup + by object factories that perform eager initialization of + singletons. +

+
+
+ + + Is this object definition a "template", i.e. not meant to be instantiated + itself but rather just serving as an object definition for configuration + templates used by . + + + if this object definition is a "template". + + + + + Is this object definition "abstract", i.e. not meant to be + instantiated itself but rather just serving as a parent for concrete + child object definitions. + + + if this object definition is "abstract". + + + + + The of the object definition (if any). + + + A resolved object . + + + If the of the object definition is not a + resolved or . + + + + + + Is the of the object definition a resolved + ? + + + + + Returns the of the + of the object definition (if any). + + + + + A description of the resource that this object definition + came from (for the purpose of showing context in case of errors). + + + + + The autowire mode as specified in the object definition. + + +

+ This determines whether any automagical detection and setting of + object references will happen. The default is + , + which means that no autowiring will be performed. +

+
+
+ + + Gets the resolved autowire mode. + + +

+ This resolves + + to one of + + or + . +

+
+
+ + + The dependency checking mode. + + +

+ The default is + . +

+
+
+ + + The object names that this object depends on. + + +

+ The object factory will guarantee that these objects get initialized + before this object definition. +

+ + Dependencies are normally expressed through object properties + or constructor arguments. This property should just be necessary for + other kinds of dependencies such as statics (*ugh*) or database + preparation on startup. + +
+
+ + + Gets or sets a value indicating whether this instance a candidate for getting autowired into some other + object. + + + true if this instance is autowire candidate; otherwise, false. + + + + + The name of the initializer method. + + +

+ The default value is the constant, + in which case there is no initializer method. +

+
+
+ + + Return the name of the destroy method. + + +

+ The default value is the constant, + in which case there is no destroy method. +

+
+
+ + + The name of the factory method to use (if any). + + +

+ This method will be invoked with constructor arguments, or with no + arguments if none are specified. The + method will be invoked on the specified + . +

+
+
+ + + The name of the factory object to use (if any). + + + + + Does this object definition have any constructor argument values? + + + if his object definition has at least one + element in it's + + property. + + + + + Abstract base class for object definition readers. + + +

+ Provides common properties like the object registry to work on. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Simple interface for object definition readers. + + Juergen Hoeller + Rick Evans + + + + Load object definitions from the supplied . + + + The resource for the object definitions that are to be loaded. + + + The number of object definitions found + + + In the case of loading or parsing errors. + + + + + Load object definitions from the supplied . + + + The resources for the object definitions that are to be loaded. + + + The number of object definitions found + + + In the case of loading or parsing errors. + + + + + Loads the object definitions from the specified resource location. + + The resource location, to be loaded with the + IResourceLoader location . + + The number of object definitions found + + + + + Loads the object definitions from the specified resource locations. + + The the resource locations to be loaded with the + IResourceLoader of this object definition reader. + + The number of object definitions found + + + + + Gets the + + instance that this reader works on. + + + + + The against which any class names + will be resolved into instances. + + + + + The to use for anonymous + objects (wihtout explicit object name specified). + + + + + Gets the resource loader to use for resource locations. + + There is also a method + available for loading object definitions from a resource location. This is + a convenience to avoid explicit ResourceLoader handling. + The resource loader. + + + + The instance for this class (and derived classes). + + + + + Creates a new instance of the + + class. + + + The + instance that this reader works on. + + +

+ This is an class, and as such exposes no public constructors. +

+
+
+ + + Creates a new instance of the + + class. + + + The + instance that this reader works on. + + + The against which any class names + will be resolved into instances. + + +

+ This is an class, and as such exposes no public constructors. +

+
+
+ + + Load object definitions from the supplied . + + + The resource for the object definitions that are to be loaded. + + + The number of object definitions that were loaded. + + + In the case of loading or parsing errors. + + + + + Load object definitions from the supplied . + + + The resources for the object definitions that are to be loaded. + + + The number of object definitions found + + + In the case of loading or parsing errors. + + + + + Loads the object definitions from the specified resource location. + + The resource location, to be loaded with the + IResourceLoader location . + + The number of object definitions found + + + + + Loads the object definitions from the specified resource locations. + + The the resource locations to be loaded with the + IResourceLoader of this object definition reader. + + The number of object definitions found + + + + + Gets the + + instance that this reader works on. + + + + + The to use for anonymous + objects (wihtout explicit object name specified). + + + + + + The against which any class names + will be resolved into instances. + + + + + Gets or sets the resource loader to use for resource locations. + + The resource loader. + + + + Utility class that contains various methods useful for the implementation of + autowire-capable object factories. + + Juergen Hoeller + Rick Evans (.NET) + + + + Creates a new instance of the AutowireUtils class. + + +

+ This is a utility class, and as such has no publicly + visible constructors. +

+
+
+ + + Gets those s + that are applicable for autowiring the supplied . + + + The + (definition) that is being autowired by constructor. + + + The absolute minimum number of arguments that any returned constructor + must have. If this parameter is equal to zero (0), then all constructors + are valid (regardless of their argument count), including any default + constructor. + + + Those s + that are applicable for autowiring the supplied . + + + + + Determine a weight that represents the class hierarchy difference between types and + arguments. + + +

+ A direct match, i.e. type MyInteger -> arg of class MyInteger, does not increase + the result - all direct matches means weight zero (0). A match between the argument type + and a MyInteger instance argument would increase the weight by + 1, due to the superclass () being one (1) steps up in the + class hierarchy being the last one that still matches the required type. +

+

+ Therefore, with an argument of type , a + constructor taking a argument would be + preferred to a constructor taking an argument + which would be preferred to a constructor taking an + argument which would in turn be preferred + to a constructor taking an argument. +

+

+ All argument weights get accumulated. +

+
+ + The argument s to match. + + The arguments to match. + The accumulated weight for all arguments. +
+ + + Algorithm that judges the match between the declared parameter types of a candidate method + and a specific list of arguments that this method is supposed to be invoked with. + + + Determines a weight that represents the class hierarchy difference between types and + arguments. The following a an example based on the Java class hierarchy for Integer. + A direct match, i.e. type Integer -> arg of class Integer, does not increase + the result - all direct matches means weight 0. A match between type Object and arg of + class Integer would increase the weight by 2, due to the superclass 2 steps up in the + hierarchy (i.e. Object) being the last one that still matches the required type Object. + Type Number and class Integer would increase the weight by 1 accordingly, due to the + superclass 1 step up the hierarchy (i.e. Number) still matching the required type Number. + Therefore, with an arg of type Integer, a constructor (Integer) would be preferred to a + constructor (Number) which would in turn be preferred to a constructor (Object). + All argument weights get accumulated. + + The param types. + The args. + + + + + Determines whether the given object property is excluded from dependency checks. + + The PropertyInfo of the object property. + + true if is excluded from dependency check; otherwise, false. + + + + + Sorts the supplied , preferring + public constructors and "greedy" ones (that have lots of arguments). + + +

+ The result will contain public constructors first, with a decreasing number + of arguments, then non-public constructors, again with a decreasing number + of arguments. +

+
+ + The array to be sorted. + +
+ + + Determines whether the setter property is defined in any of the given interfaces. + + The PropertyInfo of the object property + The ISet of interfaces. + + true if setter property is defined in interface; otherwise, false. + + + + + Creates the autowire candidate resolver. + + A SimpleAutowireCandidateResolver + + + + Returns the list of that are not satisfied by . + + the filtered list. Is never null + + + + Object definition for definitions that inherit settings from their + parent (object definition). + + +

+ Will use the + of the parent object definition if none is specified, but can also + override it. In the latter case, the child's + + must be compatible with the parent, i.e. accept the parent's property values + and constructor argument values (if any). +

+

+ A will + inherit all of the , + , and + from it's parent + object definition, with the option to add new values. If the + , + , + and / or + + properties are specified, they will override the corresponding parent settings. +

+

+ The remaining settings will always be taken from the child definition: + , + , + , + , + and + +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) + +
+ + + Creates a new instance of the + + class. + + + The name of the parent object. + + + + + Creates a new instance of the + + class. + + + The name of the parent object. + + + The additional property values (if any) of the child. + + + + + Creates a new instance of the + + class. + + + The name of the parent object. + + + The + to be applied to a new instance of the object. + + + The additional property values (if any) of the child. + + + + + Creates a new instance of the + + class. + + + The name of the parent object. + + + The class of the object to instantiate. + + + The + to be applied to a new instance of the object. + + + The additional property values (if any) of the child. + + + + + Creates a new instance of the + + class. + + + The name of the parent object. + + + The of the object to + instantiate. + + + The + to be applied to a new instance of the object. + + + The additional property values (if any) of the child. + + + + + Validate this object definition. + + +

+ A common cause of validation failures is a missing value for the + + property; by + their very nature require that the + + be set. +

+
+ + In the case of a validation failure. + +
+ + + A that represents the current + . + + + A that represents the current + . + + + + + The name of the parent object definition. + + + This value is required. + + + The name of the parent object definition. + + + + + Helper class for resolving constructors and factory methods. + Performs constructor resolution through argument matching. + + + Operates on a and an . + Used by . + + Juergen Hoeller + Mark Pollack + + + + Initializes a new instance of the class for the given factory + and instantiation strategy. + + The object factory to work with. + The object factory as IAutowireCapableObjectFactory. + The instantiation strategy for creating objects. + the resolver to resolve property value placeholders if any + + + + "autowire constructor" (with constructor arguments by type) behavior. + Also applied if explicit constructor argument values are specified, + matching all remaining arguments with objects from the object factory. + + + This corresponds to constructor injection: In this mode, a Spring + object factory is able to host components that expect constructor-based + dependency resolution. + + Name of the object. + The merged object definition for the object. + The chosen chosen candidate constructors (or null if none). + The explicit argument values passed in programmatically via the getBean method, + or null if none (-> use constructor argument values from object definition) + An IObjectWrapper for the new instance + + + + Instantiate an object instance using a named factory method. + + +

+ The method may be static, if the + parameter specifies a class, rather than a + instance, or an + instance variable on a factory object itself configured using Dependency + Injection. +

+

+ Implementation requires iterating over the static or instance methods + with the name specified in the supplied + (the method may be overloaded) and trying to match with the parameters. + We don't have the types attached to constructor args, so trial and error + is the only way to go here. +

+
+ + The name associated with the supplied . + + + The definition describing the instance that is to be instantiated. + + + Any arguments to the factory method that is to be invoked. + + + The result of the factory method invocation (the instance). + +
+ + + Create an array of arguments to invoke a constructor or static factory method, + given the resolved constructor arguments values. + + When return value is null the out parameter UnsatisfiedDependencyExceptionData will contain + information for use in throwing a UnsatisfiedDependencyException by the caller. This avoids using + exceptions for flow control as in the original implementation. + + + + Resolves the + of the supplied . + + The name of the object that is being resolved by this factory. + The rod. + The wrapper. + The cargs. + Where the resolved constructor arguments will be placed. + + The minimum number of arguments that any constructor for the supplied + must have. + + +

+ 'Resolve' can be taken to mean that all of the s + constructor arguments is resolved into a concrete object that can be plugged + into one of the s constructors. Runtime object + references to other objects in this (or a parent) factory are resolved, + type conversion is performed, etc. +

+

+ These resolved values are plugged into the supplied + object, because we wouldn't want to touch + the s constructor arguments in case it (or any of + its constructor arguments) is a prototype object definition. +

+

+ This method is also used for handling invocations of static factory methods. +

+
+
+ + + Returns an array of all of those + methods exposed on the + that match the supplied criteria. + + + Methods that have this name (can be in the form of a regular expression). + + + Methods that have exactly this many arguments. + + + Methods that are static / instance. + + + The on which the methods (if any) are to be found. + + + An array of all of those + methods exposed on the + that match the supplied criteria. + + + + + Concrete implementation of the + and + + interfaces. + + +

+ This class is a full-fledged object factory based on object definitions + that is usable straight out of the box. +

+

+ Can be used as an object factory in and of itself, or as a superclass + for custom object factory implementations. Note that readers for + specific object definition formats are typically implemented separately + rather than as object factory subclasses. +

+

+ For an alternative implementation of the + interface, + have a look at the + + class, which manages existing object instances rather than creating new + ones based on object definitions. +

+
+ Juergen Hoeller + Rick Evans (.NET) + +
+ + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + Flag specifying whether to make this object factory case sensitive or not. + + + + Creates a new instance of the + class. + + The parent object factory. + + + + Creates a new instance of the + class. + + Flag specifying whether to make this object factory case sensitive or not. + The parent object factory. + + + + Find object instances that match the . + + +

+ Called by autowiring. If a subclass cannot obtain information about object + names by , a corresponding exception should be thrown. +

+
+ + The type of the objects to look up. + + + An of object names and object + instances that match the , or + if none is found. + + + In case of errors. + +
+ + + Return the names of the objects that depend on the given object. + + +

+ Called by the + + so that dependant objects are able to be disposed of first. +

+
+ + The name of the object to find depending objects for. + + + The array of names of depending objects, or the empty string array if none. + + + In case of errors. + +
+ + + Check whether the specified object matches the supplied . + + The name of the object to check. + + The to check for. + + + if the object matches the supplied , + or if the supplied is . + + + + + The instance for this class. + + + + + Whether to allow re-registration of a different definition with the + same name. + + + + + The mapping of object definition objects, keyed by object name. + + + + + List of object definition names, in registration order. + + + + + Resolver to use for checking if an object definition is an autowire candidate + + + + + IDictionary from dependency type to corresponding autowired value + + + + + Check if this registry contains a object definition with the given + name. + + + The name of the object to look for. + + + if this object factory contains an object + definition with the given name. + + + + + + Register a new object definition with this registry. + + + The name of the object instance to register. + + + The definition of the object instance to register. + + + If the object definition is invalid. + + + + + + Ensure that all non-lazy-init singletons are instantiated, also + considering s. + + + If one of the singleton objects could not be created. + + + + + + Register a special dependency type with corresponding autowired value. + + Type of the dependency to register. + This will typically be a base interface such as IObjectFactory, with extensions of it resolved + as well if declared as an autowiring dependency (e.g. IListableBeanFactory), + as long as the given value actually implements the extended interface. + The autowired value. This may also be an + implementation o the interface, + which allows for lazy resolution of the actual target value. + + This is intended for factory/context references that are supposed + to be autowirable but are not defined as objects in the factory: + e.g. a dependency of type ApplicationContext resolved to the + ApplicationContext instance that the object is living in. + + Note there are no such default types registered in a plain IObjectFactory, + not even for the BeanFactory interface itself. + + + + + + Return the registered + for the + given object, allowing access to its property values and constructor + argument values. + + The name of the object. + + The registered , + or null, if specified object definitions does not exist. + + + If is null or empty string. + + + + + + Return the registered + for the + given object, allowing access to its property values and constructor + argument values. + + The name of the object. + Whether to search parent object factories. + + The registered , + or null, if specified object definitions does not exist. + + + If is null or empty string. + + + + + + Return the names of all objects defined in this factory. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + + + + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + + The (class or interface) to match, or + for all object names. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + + + + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + + The (class or interface) to match, or + for all object names. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + + + + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + + The (class or interface) to match, or + for all object names. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + + + + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + + The (class or interface) to match. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + + + + + + Return the object instances that match the given object + (including subclasses). + + + The (class or interface) to match. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + An of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If any of the objects could not be created. + + + + + + Return the object instances that match the given object + (including subclasses). + + + The (class or interface) to match. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + An of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If any of the objects could not be created. + + + + + + Check whether the specified bean would need to be eagerly initialized + in order to determine its type. + + a factory-bean reference that the bean definition defines a factory method for + whether eager initialization is necessary + + + + Check whether the given bean is defined as a . + + the name of the object + the corresponding object definition + + + + Resolve the specified dependency against the objects defined in this factory. + + The descriptor for the dependency. + Name of the object which declares the present dependency. + A list that all names of autowired object (used for + resolving the present dependency) are supposed to be added to. + + the resolved object, or null if none found + + if dependency resolution failed + + + + Raises the no such object definition exception for an unresolvable dependency + + The type. + The dependency description. + The descriptor. + + + + Determines whether the specified object qualifies as an autowire candidate, + to be injected into other beans which declare a dependency of matching type. + This method checks ancestor factories as well. + + Name of the object to check. + The descriptor of the dependency to resolve. + + true if the object should be considered as an autowire candidate; otherwise, false. + + if there is no object with the given name. + + + + Determine whether the specified object definition qualifies as an autowire candidate, + to be injected into other beans which declare a dependency of matching type. + + Name of the object definition to check. + The merged object definiton to check. + The descriptor of the dependency to resolve. + + true if the object should be considered as an autowire candidate; otherwise, false. + + + + + Should object definitions registered under the same name as an + existing object definition be allowed? + + +

+ If , then the new object definition will + replace (override) the existing object definition. If + , an exception will be thrown when + an attempt is made to register an object definition under the same + name as an already existing object definition. +

+

+ The default is . +

+
+ + is the registration of an object definition + under the same name as an existing object definition is allowed. + +
+ + + Get or set custom autowire candidate resolver for this IObjectFactory to use + when deciding whether a bean definition should be considered as a + candidate for autowiring. Never null + + + + + Return the number of objects defined in this registry. + + + The number of objects defined in this registry. + + + + + + Default implementation of the + + interface. + + +

+ Does not support per + loading. +

+
+ Aleksandar Seovic +
+ + + Central interface for factories that can create + + instances. + + +

+ Allows for replaceable object definition factories using the Strategy + pattern. +

+
+ Aleksandar Seovic +
+ + + Factory style method for getting concrete + + instances. + + + The FullName of the of the defined object. + + The name of the parent object definition (if any). + + The against which any class names + will be resolved into instances. It can be null to register the + object class just by name. + + + An + + instance. + + + + + Factory style method for getting concrete + + instances. + + /// If no parent is specified, a RootObjectDefinition is created, otherwise a + ChildObjectDefinition. + The of the defined object. + The name of the parent object definition (if any). + The against which any class names + will be resolved into instances. + + An + + instance. + + + + + Default implementation of the interface, deleagting to + 's GenerateObjectName. + + Note that this implementation is only able to handle + subclasses such as + and + + Juergen Hoeller + Mark Pollack (.NET) + + + + Strategy interface for generating object names for object definitions + + Juergen Hoeller + Mark Pollack (.NET) + + + + Generates an object name for the given object definition. + + The object definition to generate a name for. + The object definitions registry that the given definition is + supposed to be registerd with + the generated object name + + + + Generates an object name for the given object definition. + + The object definition to generate a name for. + The object definitions registry that the given definition is + supposed to be registerd with + the generated object name + + + + An + implementation that delegates to an + that is + obtained as the result of a lookup in an associated IoC container. + + +

+ This class is reserved for internal use within the framework; it is + not intended to be used by application developers using Spring.NET. +

+
+ Rick Evans +
+ + + Creates a new instance of the + + class. + + + The object definition that is the target of the method replacement. + + + The enclosing IoC container with which the above + is associated. + + + If either of the supplied arguments is . + + + + + Reimplements the supplied by delegating to + another + looked up in an enclosing IoC container. + + + The instance whose is to be + (re)implemented. + + + The method that is to be (re)implemented. + + The target method's arguments. + + The result of the delegated call to the looked up + . + + + + + The various modes of dependency checking. + + Rick Evans (.NET) + + + + DO not do any dependency checking. + + + + + Check object references. + + + + + Just check primitive (string, int, etc) values. + + + + + Check everything. + + + + + GenericObjectDefinition is a one-stop shop for standard object definition purposes. + Like any object definition, it allows for specifying a class plus optionally + constructor argument values and property values. Additionally, deriving from a + parent bean definition can be flexibly configured through the "parentName" property. + + In general, use this class for the purpose of + registering user-visible object definitions (which a post-processor might operate on, + potentially even reconfiguring the parent name). + Use / + where parent/child relationships happen to be pre-determined. + + + + Juergen Hoeller + Erich Eichinger + + + + Creates a new to be configured through its + object properties and configuration methods. + + + + + Creates a new as deep copy of the given + object definition. + + the original object definition to copy from + + + + Returns a representation of this + for debugging purposes. + + + + + The name of the parent object definition. + + + This value is required. + + + The name of the parent object definition. + + + + + Strategy interface for determining whether a specific object definition + qualifies as an autowire candidate for a specific dependency. + + Mark Fisher + Juergen hoeller + Mark Pollack (.NET) + + + + Determines whether the given object definition qualifies as an + autowire candidate for the given dependency. + + The object definition including object name and aliases. + The descriptor for the target method parameter or field. + + true if the object definition qualifies as autowire candidate; otherwise, false. + + + + + Responsible for creating instances corresponding to a + . + + Rod Johnson + Rick Evans (.NET) + + + + Instantiate an instance of the object described by the supplied + from the supplied . + + + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the null + or zero length string if we're autowiring an object that doesn't belong + to the supplied . + + + The owning + + + An instance of the object described by the supplied + from the supplied . + + + + + Instantiate an instance of the object described by the supplied + from the supplied . + + + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the null + or zero length string if we're autowiring an object that doesn't belong + to the supplied . + + + The owning + + + The to be used to instantiate + the object. + + + Any arguments to the supplied . May be null. + + + An instance of the object described by the supplied + from the supplied . + + + + + Instantiate an instance of the object described by the supplied + from the supplied . + + + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the null + or zero length string if we're autowiring an object that doesn't belong + to the supplied . + + + The owning + + + The to be used to get the object. + + + Any arguments to the supplied . May be null. + + + An instance of the object described by the supplied + from the supplied . + + + + + Represents an override of a method that looks up an object in the same IoC context. + + +

+ Methods eligible for lookup override must not have arguments. +

+
+ Rod Johnson + Rick Evans (.NET) +
+ + + Represents the override of a method on a managed object by the IoC container. + + +

+ Note that the override mechanism is not intended as a generic means of + inserting crosscutting code: use AOP for that. +

+
+ Rod Johnson + Rick Evans (.NET) +
+ + + Creates a new instance of the + class. + + +

+ This is an class, and as such exposes no + public constructors. +

+
+ + The name of the method that is to be overridden. + + + If the supplied is or + contains only whitespace character(s). + +
+ + + Does this + match the supplied ? + + +

+ By 'match' one means does this particular + + instance apply to the supplied ? +

+

+ This allows for argument list checking as well as method name checking. +

+
+ The method to be checked. + + if this override matches the supplied + . + +
+ + + The name of the method that is to be overridden. + + + + + Is the method that is ot be injected + () + to be considered as overloaded? + + +

+ If (the default), then argument type matching + will be performed (because one would not want to override the wrong + method). +

+

+ Setting the value of this property to can be used + to optimize runtime performance (ever so slightly). +

+
+
+ + + Creates a new instance of the + class. + + +

+ Methods eligible for lookup override must not have arguments. +

+
+ + The name of the method that is to be overridden. + + + The name of the object in the current IoC context that the + dependency injected method must return. + + + If either of the supplied arguments is or + contains only whitespace character(s). + +
+ + + Does this + match the supplied ? + + The method to be checked. + + if this override matches the supplied . + + + If the supplied is . + + + + + A that represents the current + . + + + A that represents the current + . + + + + + The name of the object in the current IoC context that the + dependency injected method must return. + + + + + An + implementation that simply returns the result of a lookup in an + associated IoC container. + + +

+ This class is Spring.NET's implementation of Dependency Lookup via + Method Injection. +

+

+ This class is reserved for internal use within the framework; it is + not intended to be used by application developers using Spring.NET. +

+
+ Rick Evans +
+ + + Creates a new instance of the + class. + + + The object definition that is the target of the method replacement. + + + The enclosing IoC container with which the above + is associated. + + + If either of the supplied arguments is . + + + + + Reimplements the supplied by returning the + result of an object lookup in an enclosing IoC container. + + + The instance whose is to be + (re)implemented. + + + The method that is to be (re)implemented. + + The target method's arguments. + + The result of the object lookup. + + + + + An + implementation that supports method injection. + + +

+ Classes that want to take advantage of method injection must meet some + stringent criteria. Every method that is to be method injected + must be defined as either or + . An + will be thrown if these criteria are not met. +

+
+ Rick Evans +
+ + + Simple object instantiation strategy for use in + implementations. + + +

+ Does not support method injection, although it provides hooks for subclasses + to override to add method injection support, for example by overriding methods. +

+
+ Rod Johnson + Rick Evans (.NET) + +
+ + + The shared instance for this class (and derived classes). + + + + + Instantiate an instance of the object described by the supplied + from the supplied . + + + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the null + or zero length string if we're autowiring an object that doesn't belong + to the supplied . + + + The owning + + + An instance of the object described by the supplied + from the supplied . + + + + + Gets the zero arg ConstructorInfo object, if the type offers such functionality. + + The type. + Zero argument ConstructorInfo + + If the type does not have a zero-arg constructor. + + + + + Instantiate an instance of the object described by the supplied + from the supplied . + + + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the null + or zero length string if we're autowiring an object that doesn't belong + to the supplied . + + + The owning + + + The to be used to instantiate + the object. + + + Any arguments to the supplied . May be null. + + + An instance of the object described by the supplied + from the supplied . + + + + + Instantiate an instance of the object described by the supplied + from the supplied . + + + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the null + or zero length string if we're autowiring an object that doesn't belong + to the supplied . + + + The owning + + + The to be used to get the object. + + + Any arguments to the supplied . May be null. + + + An instance of the object described by the supplied + from the supplied . + + + + + Instantiate an instance of the object described by the supplied + from the supplied , + injecting methods as appropriate. + + +

+ The default implementation of this method is to throw a + . +

+

+ Derived classes can override this method if they can instantiate an object + with the Method Injection specified in the supplied + . Instantiation should use a no-arg constructor. +

+
+ + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be a + or zero length string if we're autowiring an object that + doesn't belong to the supplied . + + + The owning + + + An instance of the object described by the supplied + from the supplied . + +
+ + + Instantiate an instance of the object described by the supplied + from the supplied , + injecting methods as appropriate. + + +

+ The default implementation of this method is to throw a + . +

+

+ Derived classes can override this method if they can instantiate an object + with the Method Injection specified in the supplied + . Instantiation should use the supplied + and attendant . +

+
+ + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the null + or zero length string if we're autowiring an object that doesn't belong + to the supplied . + + + The owning + + + The to be used to instantiate + the object. + + + Any arguments to the supplied . May be null. + + + An instance of the object described by the supplied + from the supplied . + +
+ + + The name of the dynamic assembly that holds dynamically created code + + + + + A cache of generated instances, keyed on + the object name for which the was generated. + + + + + Instantiate an instance of the object described by the supplied + from the supplied , + injecting methods as appropriate. + + + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the + or zero length string if we're autowiring an + object that doesn't belong to the supplied + . + + + The owning + + + An instance of the object described by the supplied + from the supplied . + + + + + + Instantiate an instance of the object described by the supplied + from the supplied , + injecting methods as appropriate. + + + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the + or zero length string if we're autowiring an + object that doesn't belong to the supplied + . + + + The owning + + + The to be used to instantiate + the object. + + + Any arguments to the supplied . May be null. + + + An instance of the object described by the supplied + from the supplied . + + + + + + Instantiate an instance of the object described by the supplied + from the supplied , + injecting methods as appropriate. + + +

+ This method dynamically generates a subclass that supports method + injection for the supplied . It then + instantiates an new instance of said type using the constructor + identified by the supplied , + passing the supplied to said + constructor. It then manually injects (generic) method replacement + and method lookup instances (of + ) into + the new instance: those methods that are 'method-injected' will + then delegate to the approriate + + instance to effect the actual method injection. +

+
+ + The definition of the object that is to be instantiated. + + + The name associated with the object definition. The name can be the + or zero length string if we're autowiring an + object that doesn't belong to the supplied + . + + + The owning + + + The parameter s to use to find the + appropriate constructor to invoke. + + + The aguments that are to be passed to the appropriate constructor + when the object is being instantiated. + + + A new instance of the defined by the + supplied . + +
+ + + A factory that generates subclasses of those + classes that have been configured for the Method-Injection form of + Dependency Injection. + + +

+ This class is designed as for one-shot usage; i.e. it must + be used to generate exactly one method injected subclass and + then discarded (it maintains state in instance fields). +

+
+
+ + + The name of the generated + property (for method replacement). + + +

+ Exists so that clients of this class can use this name to set properties reflectively + on the dynamically generated subclass. +

+
+
+ + + The name of the generated + property (for method lookup). + + +

+ Exists so that clients of this class can use this name to set properties reflectively + on the dynamically generated subclass. +

+
+
+ + + Creates a new instance of the + class. + + + The in which + the generated is to be defined. + + + The object definition that is the target of the method injection. + + + If either of the supplied arguments is . + + + + + Builds a suitable for Method-Injection. + + + A suitable for Method-Injection. + + + + + Defines overrides for those methods that are configured with an appropriate + . + + + The overarching that is defining + the generated . + + + + + Override the supplied with the logic + encapsulated by the + + defined by the supplied . + + + The builder for the subclass that is being generated. + + + The method on the superclass that is to be overridden. + + + The field defining the + + that the overridden method will delegate to to do the 'actual' + method injection logic. + + + + + Defines the parameters to the method that is being overridden. + + +

+ Since we are simply overridding a method (in this method + injection context), all we do here is simply copy the + parameters (since we want a method with the exact same parameters). +

+
+ + The parameters to the original method that is being overridden. + + + The builder we are using to define the new overridden method. + +
+ + + Generates the MSIL for actually returning a return value if the + supplied is not + . + + + The definition of the return value; if , it + means that no return value is to required (a void + return type). + + + The to emit + the MSIL to. + + + + + Generates the MSIL for a return value if the supplied + returns a value. + + + The method to be checked. + + + The to emit + the MSIL to. + + + The return value, or if the method does not + return a value (has a void return type). + + + + + Pushes (sets up) the arguments for a call to the + + method of an appropriate + . + + + The parameters to the original method (will be bundled + up into a generic object[] and passed as the third + argument to the + + invocation. + + + The to emit + the MSIL to. + + + + + Simply generates the IL for a write only property for the + . + + + The in which the property is defined. + + + The name of the (to be) generated property. + + + The (instance) field that the property is to 'set'. + + + + + A collection (with set semantics) of method overrides, determining which, if any, + methods on a managed object the Spring.NET IoC container will override at runtime. + + Rod Johnson + Rick Evans + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + +

+ Deep copy constructoe. +

+
+ + The instance supplying initial overrides for this new instance. + +
+ + + Copy all given method overrides into this object. + + + The overrides to be copied into this object. + + + + + Adds the supplied to the overrides contained + within this instance. + + + The to be + added. + + + + + Adds the supplied to the overloaded method names + contained within this instance. + + + The overloaded method name to be added. + + + + + Returns true if the supplied is present within + the overloaded method names contained within this instance. + + + The overloaded method name to be checked. + + + True if the supplied is present within + the overloaded method names contained within this instance. + + + + + Return the override for the given method, if any. + + + The method to check for overrides for. + + + the override for the given method, if any. + + + + + Returns an that can iterate + through a collection. + + +

+ The returned is the + exposed by the + + property. +

+
+ + An that can iterate through a + collection. + +
+ + + The collection of method overrides. + + + + + Returns true if this instance contains no overrides. + + + + + Programmatic means of constructing a using the builder pattern. Intended primarily + for use when implementing custom namespace parsers. + + Set methods are used instead of properties, so that chaining of methods can be used to create + 'one-liner'definitions that set multiple properties at one. + Rod Johnson + Rob Harrop + Juergen Hoeller + Mark Pollack (.NET) + + + + Initializes a new instance of the class, private + to force use of factory methods. + + + + + Creates a new used to construct a . + + + + + Creates a new used to construct a . + + the of the object that the definition is being created for + + + + Creates a new used to construct a . + + the name of the of the object that the definition is being created for + + + + Create a new ObjectDefinitionBuilder used to construct a root object definition. + + The object definition factory. + The type name of the object. + A new ObjectDefinitionBuilder instance. + + + + Create a new ObjectDefinitionBuilder used to construct a root object definition. + + The object definition factory. + Name of the object type. + Name of the factory method. + A new ObjectDefinitionBuilder instance. + + + + Create a new ObjectDefinitionBuilder used to construct a root object definition. + + The object definition factory. + Type of the object. + A new ObjectDefinitionBuilder instance. + + + + Create a new ObjectDefinitionBuilder used to construct a root object definition. + + The object definition factory. + Type of the object. + Name of the factory method. + A new ObjectDefinitionBuilder instance. + + + + Create a new ObjectDefinitionBuilder used to construct a child object definition.. + + The object definition factory. + Name of the parent object. + + + + + Adds the property value under the given name. + + The name. + The value. + The current ObjectDefinitionBuilder. + + + + Adds a reference to the specified object name under the property specified. + + The name. + Name of the object. + The current ObjectDefinitionBuilder. + + + + Adds an index constructor arg value. The current index is tracked internally and all addtions are + at the present point + + The constructor arg value. + The current ObjectDefinitionBuilder. + + + + Adds a reference to the named object as a constructor argument. + + Name of the object. + + + + + Sets the name of the factory method to use for this definition. + + The factory method. + The current ObjectDefinitionBuilder. + + + + Sets the name of the factory object to use for this definition. + + The factory object. + The factory method. + The current ObjectDefinitionBuilder. + + + + Sets whether or not this definition describes a singleton object. + + if set to true [singleton]. + The current ObjectDefinitionBuilder. + + + + Sets whether objects or not this definition is abstract. + + if set to true [flag]. + The current ObjectDefinitionBuilder. + + + + Sets whether objects for this definition should be lazily initialized or not. + + if set to true [lazy]. + The current ObjectDefinitionBuilder. + + + + Sets the autowire mode for this definition. + + The autowire mode. + The current ObjectDefinitionBuilder. + + + + Sets the dependency check mode for this definition. + + The dependency check. + The current ObjectDefinitionBuilder. + + + + Sets the name of the destroy method for this definition. + + Name of the method. + The current ObjectDefinitionBuilder. + + + + Sets the name of the init method for this definition. + + Name of the method. + The current ObjectDefinitionBuilder. + + + + Sets the resource description for this definition. + + The resource description. + The current ObjectDefinitionBuilder. + + + + Adds the specified object name to the list of objects that this definition depends on. + + Name of the object. + The current ObjectDefinitionBuilder. + + + + Gets the current object definition in its raw (unvalidated) form. + + The raw object definition. + + + + Validate and gets the object definition. + + The object definition. + + + + Utility methods that are useful for + + implementations. + + Juergen Hoeller + Rick Evans (.NET) + + + + + The string used as a separator in the generation of synthetic id's + for those object definitions explicitly that aren't assigned one. + + +

+ If a name or parent object definition + name is not unique, "#1", "#2" etc will be appended, until such + time that the name becomes unique. +

+
+
+ + + Registers the supplied with the + supplied . + + +

+ This is a convenience method that registers the + + of the supplied under the + + property value of said . If the + supplied has any + , + then those aliases will also be registered with the supplied + . +

+
+ + The object definition holder containing the + that + is to be registered. + + + The registry that the supplied + is to be registered with. + + + If either of the supplied arguments is . + + + If the could not be registered + with the . + +
+ + + Generates an object definition name for the supplied + that is guaranteed to be unique + within the scope of the supplied . + + The + that requires a generated name. + The + + that the supplied is to be + registered with (needed so that the uniqueness of any generated + name can be guaranteed). + if set to true if the given object + definition will be registed as an inner object or as a top level objener objects + verses top level objects. + + An object definition name for the supplied + that is guaranteed to be unique + within the scope of the supplied and + never . + + + If either of the or + arguments is . + + + If a unique name cannot be generated. + + + + + Generates the name of the object for a top-level object definition unique within the given object factory. + + The object definition to generate an object name for. + The registry to check for existing names. + The generated object name + if no unique name can be generated for the given + object definition + + + + Factory method for getting concrete + instances. + + + The name of the event handler method. This may be straight text, a regular + expression, , or empty. + + + The name of the event being wired. This too may be straight text, a regular + expression, , or empty. + + + A concrete + instance. + + + + + Creates a new instance of the + class. + + +

+ This is a utility class, and as such exposes no public constructors. +

+
+
+ + + Thrown when the validation of an object definition failed. + + Juergen Hoeller + Rick Evans (.NET) + + + + Creates a new instance of the + + class. + + + + + Creates a new instance of the + + class. + + The detail message. + + + + Creates a new instance of the + + class. + + + The detail message. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectDefinitionValidationException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Helper class for use in object factory implementations, + resolving values contained in object definition objects + into the actual values applied to the target object instance. + + + Used by . + + Juergen Hoeller + Mark Pollack (.NET) + + + + Initializes a new instance of the class. + + The object factory. + + + + Given a property value, return a value, resolving any references to other + objects in the factory if necessary. + + +

+ The value could be : + + +

+ An , + which leads to the creation of a corresponding new object instance. + Singleton flags and names of such "inner objects" are always ignored: inner objects + are anonymous prototypes. +

+ + +

+ A , which must + be resolved. +

+
+ +

+ An . This is a + special placeholder collection that may contain + s or + collections that will need to be resolved. +

+
+ +

+ An ordinary object or , in which case it's left alone. +

+
+ +

+
+ + The name of the object that is having the value of one of its properties resolved. + + + The definition of the named object. + + + The name of the property the value of which is being resolved. + + + The value of the property that is being resolved. + +
+ + + TODO + + + The name of the object that is having the value of one of its properties resolved. + + + The definition of the named object. + + + The name of the property the value of which is being resolved. + + + The value of the property that is being resolved. + + + + + Resolve the target type of the passed . + + The who's target type is to be resolved + The resolved target type, if any. otherwise. + + + + Resolves an inner object definition. + + + The name of the object that surrounds this inner object definition. + + + The name of the inner object definition... note: this is a synthetic + name assigned by the factory (since it makes no sense for inner object + definitions to have names). + + + The name of the property the value of which is being resolved. + + + The definition of the inner object that is to be resolved. + + + if the owner of the property is a singleton. + + + The resolved object as defined by the inner object definition. + + + + + Checks the given bean name whether it is unique. If not already unique, + a counter is added, increasing the counter until the name is unique. + + Original Name of the inner object. + The Adapted name for the inner object + + + + Resolve a reference to another object in the factory. + + + The name of the object that is having the value of one of its properties resolved. + + + The definition of the named object. + + + The name of the property the value of which is being resolved. + + + The runtime reference containing the value of the property. + + A reference to another object in the factory. + + + + Object definition reader for a simple properties format. + + + Provides object definition registration methods for + and + instances. Typically applied to a + . + + Rod Johnson + Juergen Hoeller + Simon White (.NET) + + + + Value of a T/F attribute that represents true. + Anything else represents false. Case seNsItive. + + + + + Separator between object name and property name. + + + + + Prefix for the class property of a root object definition. + + + + + Special string added to distinguish if the object will be + a singleton. + + +

+ Default is true. +

+
+ +

+ owner.(singleton)=true +

+
+
+ + + Special string added to distinguish if the object will be + lazily initialised. + + +

+ Default is false. +

+
+ +

+ owner.(lazy-init)=true +

+
+
+ + + Reserved "property" to indicate the parent of a child object definition. + + + + + Property suffix for references to other objects in the current + : e.g. + owner.dog(ref)=fido. + + +

+ Whether this is a reference to a singleton or a prototype + will depend on the definition of the target object. +

+
+
+ + + Prefix before values referencing other objects. + + + + + Creates a new instance of the + + class. + + + The + instance that this reader works on. + + + + + Load object definitions from the supplied . + + + The resource for the object definitions that are to be loaded. + + + The number of object definitions that were loaded. + + + In the case of loading or parsing errors. + + + + + Load object definitions from the specified properties file. + + + The resource descriptor for the properties file. + + + The match or filter for object definition names, e.g. 'objects.' + + in case of loading or parsing errors + the number of object definitions found + + + + Register object definitions contained in a + , using all property keys (i.e. + not filtering by prefix). + + + The containing object definitions. + + + In case of loading or parsing errors. + + The number of object definitions registered. + + + + Register object definitions contained in a + . + + +

+ Similar syntax as for an . + This method is useful to enable standard .NET internationalization support. +

+
+ + The containing object definitions. + + + The match or filter for object definition names, e.g. 'objects.' + + + In case of loading or parsing errors. + + The number of object definitions registered. +
+ + + Register object definitions contained in an + , using all property keys + (i.e. not filtering by prefix). + + + The containing object definitions. + + + In case of loading or parsing errors. + + The number of object definitions registered. + + + + Registers object definitions contained in an + using all property keys ( i.e. not filtering by prefix ) + + The containing + object definitions. + + + In case of loading or parsing errors. + + The number of object definitions registered. + + + + Register object definitions contained in a + . + + +

+ Ignores ineligible properties. +

+
+ IDictionary name -> property (String or Object). Property values + will be strings if coming from a Properties file etc. Property names + (keys) must be strings. Type keys must be strings. + + + The match or filter within the keys in the map: e.g. 'objects.' + + + In case of loading or parsing errors. + + The number of object definitions found. +
+ + + Register object definitions contained in a + . + + +

+ Ignores ineligible properties. +

+
+ IDictionary name -> property (String or Object). Property values + will be strings if coming from a Properties file etc. Property names + (keys) must be strings. Type keys must be strings. + + + The match or filter within the keys in the map: e.g. 'objects.' + + + The description of the resource that the + came from (for logging purposes). + + + In case of loading or parsing errors. + + The number of object definitions found. +
+ + + Get all property values, given a prefix (which will be stripped) + and add the object they define to the factory with the given name + + The name of the object to define. + + The containing string pairs. + + The prefix of each entry, which will be stripped. + + The description of the resource that the + came from (for logging purposes). + + + In case of loading or parsing errors. + + + + + Name of default parent object + + + + + Gets or sets object definition factory to use. + + + + + A plain-vanilla object definition. + + +

+ This is the most common type of object definition; + instances + do not derive from a parent + , and usually + (but not always - see below) have an + + and (optionally) some + and + . +

+

+ Note that + instances do not have to specify an + : + This can be useful for deriving + instances + from such definitions, each with it's own + , + inheriting common property values and other settings from the parent. +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) + +
+ + + Creates a new instance of the + class. + + + + + Creates a new instance of the + + class. + + + The of the object to instantiate. + + + + + Creates a new instance of the + + class. + + + The of the object to instantiate. + + + if this object definition defines a singleton object. + + + + + Creates a new instance of the + class + for a singleton, providing property values and constructor arguments. + + + The of the object to instantiate. + + + The + to be applied to a new instance of the object. + + + The to be applied to + a new instance of the object. + + + + + Creates a new instance of the + class + for a singleton using the supplied + . + + + The of the object to instantiate. + + + The autowiring mode. + + + + + Creates a new instance of the + class + for a singleton using the supplied + . + + + The of the object to instantiate. + + + The autowiring mode. + + + Whether to perform a dependency check for objects (not + applicable to autowiring a constructor, thus ignored there) + + + + + Creates a new instance of the + class + with the given singleton status, providing property values. + + + The of the object to instantiate. + + + The to be applied to + a new instance of the object. + + + + + Creates a new instance of the + class + with the given singleton status, providing property values. + + + The of the object to instantiate. + + + The to be applied to + a new instance of the object. + + + if this object definition defines a singleton object. + + + + + Creates a new instance of the + class + for a singleton, providing property values and constructor arguments. + + +

+ Takes an object class name to avoid eager loading of the object class. +

+
+ + The assembly qualified of the object to instantiate. + + + The to be applied to + a new instance of the object. + + + The + to be applied to a new instance of the object. + +
+ + + Creates a new instance of the + class. + + +

+ Deep copy constructor. +

+
+ + The definition that is to be copied. + +
+ + + Validate this object definition. + + + In the case of a validation failure. + + + + + A that represents the current + . + + + A that represents the current + . + + + + + Is always null for a . + + + It is safe to request this property's value. Setting any other value than null will + raise an . + + Raised on any attempt to set a non-null value on this property. + + + + A implementation to use that checks + the object definitions only (no attributes) + + Mark Fisher + Mark Pollack (.NET) + + + + Determines whether the given object definition qualifies as an + autowire candidate for the given dependency. + + The object definition including object name and aliases. + The descriptor for the target method parameter or field. + + true if the object definition qualifies as autowire candidate; otherwise, false. + + + + + Static factory that permits the registration of existing singleton instances. + + +

+ Does not have support for prototype objects, aliases, and post startup object + configuration. +

+

+ Serves as a simple example implementation of the + interface, that manages existing object instances as opposed to creating new ones + based on object definitions. +

+

+ The + method is not supported by this class; this class deals exclusively with + existing singleton instances, thus the methods mentioned previously make little sense in this context. +

+
+ Rod Johnson + Juergen Hoeller + Simon White (.NET) +
+ + + Map from object name to object instance. + + + + + This method is not supported by . + + + + + + Return an instance of the given object name. + + The name of the object to return. + The instance of the object. + + is not currently supported. + + + + + + Return an instance (possibly shared or independent) of the given object name. + + +

+ This method allows an object factory to be used as a replacement for the + Singleton or Prototype design pattern. +

+

+ Note that callers should retain references to returned objects. There is no + guarantee that this method will be implemented to be efficient. For example, + it may be synchronized, or may need to run an RDBMS query. +

+

+ Will ask the parent factory if the object cannot be found in this factory + instance. +

+
+ The name of the object to return. + + The arguments to use if creating a prototype using explicit arguments to + a static factory method. If there is no factory method and the + arguments are not null, then match the argument values by type and + call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the supplied is . + +
+ + + Return an instance (possibly shared or independent) of the given object name. + + The name of the object to return. + + The the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + + The arguments to use if creating a prototype using explicit arguments to + a factory method. If there is no factory method and the + supplied array is not , then + match the argument values by type and call the object's constructor. + + The instance of the object. + + If there's no such object definition. + + + If the object could not be created. + + + If the object is not of the required type. + + + If the supplied is . + + + + + + Return an instance of the given object name. + + The name of the object to return. + + the object may match. Can be an interface or + superclass of the actual class. For example, if the value is the + class, this method will succeed whatever the + class of the returned instance. + + The instance of the object. + + + + + Does this object factory contain an object with the given name? + + The name of the object to query. + True if an object with the given name is defined. + + + + Is this object a singleton? + + +

+ That is, will + or + always return the same object? +

+
+ The name of the object to query. + True if the named object is a singleton. + + If there's no such object definition. + +
+ + + Determines whether the specified object name is prototype. That is, will GetObject + always return independent instances? + + This method returning false does not clearly indicate a singleton object. + It indicated non-independent instances, which may correspond to a scoped object as + well. use the IsSingleton property to explicitly check for a shared + singleton instance. + Translates aliases back to the corresponding canonical object name. Will ask the + parent factory if the object can not be found in this factory instance. + + + + The name of the object to query + + true if the specified object name will always deliver independent instances; otherwise, false. + + if there is no object with the given name. + + + + Determine the type of the object with the given name. + + +

+ More specifically, checks the type of object that + would return. + For an , returns the type + of object that the creates. +

+
+ The name of the object to query. + + The of the object or if + not determinable. + +
+ + + Determines whether the object with the given name matches the specified type. + + The name of the object to query. + Type of the target to match against. + + true if the object type matches; otherwise, false + if it doesn't match or cannot be determined yet. + + Ff there is no object with the given name + + + + + Return the aliases for the given object name, if defined. + + The object name to check for aliases. + The aliases, or an empty array if none. + + If there's no such object definition. + + + + + Not supported. + + The name of the object. + + The registered + . + + + Always, as object definitions are not supported by this + implementation. + + + + + Return the registered + for the + given object, allowing access to its property values and constructor + argument values. + + The name of the object. + Whether to search parent object factories. + + The registered + . + + + If there is no object with the given name. + + + In the case of errors. + + + + + Return the names of all objects defined in this factory. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + + + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + + The (class or interface) to match, or + for all object names. + + +

+ Will not consider s, + as the type of their created objects is not known before instantiation. +

+
+ + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + + The (class or interface) to match, or + for all object names. + + +

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+

+ Does not consider any hierarchy this factory may participate in. +

+
+ + The names of all objects defined in this factory, or an empty array if none + are defined. + +
+ + + Return the names of objects matching the given + (including subclasses), judging from the object definitions. + + +

+ Since this implementation of the + + interface does not support the notion of ptototype objects, the + parameter is ignored. +

+
+ + The (class or interface) to match, or + for all object names. + + + Whether to include prototype objects too or just singletons (also applies to + s). Ignored. + + + Whether to include s too + or just normal objects. + + + The names of all objects defined in this factory, or an empty array if none + are defined. + + +
+ + + Tests whether this object factory contains an object definition for the + specified object name. + + The object name to query. + + True if an object defintion is contained within this object factory. + + + + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + +

+ This version of the + method matches all kinds of object definitions, be they singletons, prototypes, or + s. Typically, the results + of this method call will be the same as a call to + IListableObjectFactory.GetObjectsOfType(type,true,true) . +

+
+ + The (class or interface) to match. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + +
+ + + Return the object instances that match the given object + (including subclasses), judging from either object + definitions or the value of + in the case of + s. + + + The (class or interface) to match. + + + Whether to include prototype objects too or just singletons (also applies to + s). + + + Whether to include s too + or just normal objects. + + + A of the matching objects, + containing the object names as keys and the corresponding object instances + as values. + + + If the objects could not be created. + + + + + Add a new singleton object. + + + The name to be associated with the object name. + + The singleton object. + + + + Injects dependencies into the supplied instance + using the named object definition. + + + The object instance that is to be so configured. + + + The name of the object definition expressing the dependencies that are to + be injected into the supplied instance. + + + This feature is not currently supported. + + + + + + Injects dependencies into the supplied instance + using the supplied . + + + The object instance that is to be so configured. + + + The name of the object definition expressing the dependencies that are to + be injected into the supplied instance. + + + An object definition that should be used to configure object. + + + + + + Defines a method to release allocated unmanaged resources. + + + + + Determine whether this object factory treats object names case-sensitive or not. + + + + + Return the number of objects defined in the factory. + + + The number of objects defined in the factory. + + + + + Return an instance of the given object name. + + The name of the object to return. + The instance of the object. + + + + + Abstract implementation providing + a number of convenience methods and a + template method + that subclasses must override to provide the actual parsing logic. + + + Use this implementation when you want + to parse some arbitrarily complex XML into one or more + ObjectDefinitions. If you just want to parse some + XML into a single IObjectDefinition, you may wish to consider + the simpler convenience extensions of this class, namely + and + + + Rob Harrop + Juergen Hoeller + Rick Evans + Mark Pollack (.NET) + + + + Interface used to handle custom, top-level tags. + + Implementations are free to turn the metadata in the custom tag into as + many as required. + + Rob Harrop + Mark Pollack (.NET) + + + + Parse the specified XmlElement and register the resulting + ObjectDefinitions with the IObjectDefinitionRegistry + embedded in the supplied + + +

+ This method is never invoked if the parser is namespace aware + and was called to process the root node. +

+
+ + The element to be parsed. + + + TThe object encapsulating the current state of the parsing process. + Provides access to a IObjectDefinitionRegistry + + + The primary object definition. + +
+ + + Constant for the ID attribute + + + + + Parse the specified XmlElement and register the resulting + ObjectDefinitions with the IObjectDefinitionRegistry + embedded in the supplied + + The element to be parsed. + TThe object encapsulating the current state of the parsing process. + Provides access to a IObjectDefinitionRegistry + The primary object definition. + +

+ This method is never invoked if the parser is namespace aware + and was called to process the root node. +

+
+
+ + + Resolves the ID for the supplied . + + + When using generation, a name is generated automatically. + Otherwise, the ID is extracted from the "id" attribute, potentially with a + fallback to a generated id. + + The element that the object definition has been built from. + The object definition to be registered. + The the object encapsulating the current state of the parsing process; + provides access to a + the resolved id + + if no unique name could be generated for the given object definition + + + + + Registers the supplied with the supplied + . + + Subclasses can override this method to control whether or not the supplied + is actually even registered, or to + register even more objects. + + The default implementation registers the supplied + with the supplied only if the IsNested + parameter is false, because one typically does not want inner objects + to be registered as top level objects. + + + + The object definition to be registered. + The registry that the bean is to be registered with. + + + + Returns the value of the element's attribute or null, if the attribute is not specified. + + + This is a helper for bypassing the behavior of + to return if the attribute does not exist. + + + + + Returns the value of the element's attribute or , + if the attribute is not specified. + + + This is a helper for bypassing the behavior of + to return if the attribute does not exist. + + + + + Central template method to actually parse the supplied XmlElement + into one or more IObjectDefinitions. + + The element that is to be parsed into one or more s + The the object encapsulating the current state of the parsing process; + provides access to a + The primary IObjectDefinition resulting from the parsing of the supplied XmlElement + + + + Gets a value indicating whether an ID should be generated instead of read + from the passed in XmlElement. + + Note that this flag is about always generating an ID; the parser + won't even check for an "id" attribute in this case. + + true if should generate id; otherwise, false. + + + + Gets a value indicating whether an ID should be generated instead if the + passed in XmlElement does not specify an "id" attribute explicitly. + + Disabled by default; subclasses can override this to enable ID generation + as fallback: The parser will first check for an "id" attribute in this case, + only falling back to a generated ID if no value was specified. + + true if should generate id if no value was specified; otherwise, false. + + + + + Convenient base class for when there exists a one-to-one mapping + between attribute names on the element that is to be parsed and + the property names on the Type being configured. + + + + + Mark Pollack + + + + Base Type for those implementations that + need to parse and define just a single IObjectDefinition. + + + Extend this parser Type when you want to create a single object definition + from an arbitrarily complex XML element. You may wish to consider extending + the when you want to create a + single Object definition from a relatively simple custom XML element. + The resulting ObjectDefinition will be automatically registered + with the ObjectDefinitionRegistry. Your job simply is to parse the + custom XML element into a single ObjectDefinition + + Rob Harrop + Juergen Hoeller + Rick Evans + Mark Pollack (.NET) + + + + Central template method to actually parse the supplied XmlElement + into one or more IObjectDefinitions. + + The element that is to be parsed into one or more s + The the object encapsulating the current state of the parsing process; + provides access to a + + The primary IObjectDefinition resulting from the parsing of the supplied XmlElement + + + + + Determine the name for the parent of the currently parsed object, + in case of the current object being defined as a child object. + The default implementation returns null + indicating a root object definition. + + + the name of the parent object for the currently parsed object. + + + + Gets the type of the object corresponding to the supplied XmlElement. + + Note that, for application classes, it is generally preferable to override + GetObjectTypeName instad, in order to avoid a direct + dependence on the object implementation class. The ObjectDefinitionParser + and its IXmlObjectDefinitionParser (namespace parser) can be used within an + IDE add-in then, even if the application classses are not available in the add-ins + AppDomain. + + The element. + The Type of the class that is being defined via parsing the supplied + Element. + + + + Gets the name of the object type name (FullName) corresponding to the supplied XmlElement. + + The element. + The type name of the object that is being defined via parsing the supplied + XmlElement. + + + + Parse the supplied XmlElement and populate the supplied ObjectDefinitionBuilder as required. + + The default implementation delegates to the DoParse version without + ParameterContext argument. + The element. + The parser context. + The builder used to define the IObjectDefinition. + + + + Parse the supplied XmlElement and populate the supplied ObjectDefinitionBuilder as required. + + The default implementation does nothing. + The element. + The builder used to define the IObjectDefinition. + + + + Default implementation of the interface. + Resolves namespace URIs to implementation types based on mappings. + + Erich Eichinger + + + + + + Used by to locate + implementations for a particular namespace URI. + + TODO (EE): clarify naming of INamespaceParser (SPR/NET) vs. INamespaceHandler (SPR/Java), thus internal for now + Erich Eichinger + + + + + + + Lookup a for the given namespace URI. + + the namespace URI + the located namespace handler or null + + + + Resolve the namespace URI and return the corresponding + implementation. + + the namespace URI to get the matching parser for. + the matching parser or null + + + + XML resource reader. + + +

+ Navigates through an XML resource and invokes parsers registered + with the . +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) +
+ + + SPI for parsing an XML document that contains Spring object definitions. + Used by for actually parsing a DOM + document. + + Instantiated per document to parse: Implementations can hold state in + instance variables during the execution of the RegisterObjectDefinitions + method, for example global settings that are defined for all object definitions + in the document. + + Juergen Hoeller + Rob Harrop + Mark Pollack (.NET) + + + + + Read object definitions from the given DOM element, and register + them with the given object registry. + + The DOM element containing object definitions, usually the + root (document) element. + The current context of the reader. Includes + the resource being parsed + + The number of object definitions that were loaded. + + + In case of parsing errors. + + + + + The shared instance for this class (and derived classes). + + + + + Creates a new instance of the DefaultObjectDefinitionDocumentReader class. + + + + + Read object definitions from the given DOM element, and register + them with the given object registry. + + The DOM element containing object definitions, usually the + root (document) element. + The current context of the reader. Includes + the resource being parsed + + The number of object definitions that were loaded. + + + In case of parsing errors. + + + + + Parses object definitions starting at the given + using the passed . + + The root element to start parsing from. + The instance to use. + + in case an error happens during parsing and registering object definitions + + + + + Process an alias element. + + + + + Process the object element + + + + + Loads external XML object definitions from the resource described by the supplied + . + + The XML element describing the resource. + + If the resource could not be imported. + + + + + Parses the given alias element, registering the alias with the registry. + + The alias element. + The registry. + + + + Parse an object definition and register it with the object factory.. + + The element containing the object definition. + The helper. + + + + + + Allow the XML to be extensible by processing any custom element types last, + after we finished processing the objct definitions. This method is a natural + extension point for any other custom post-processing of the XML. + + The default implementation is empty. Subclasses can override this method to + convert custom elements into standard Spring object definitions, for example. + Implementors have access to the parser's object definition reader and the + underlying XML resource, through the corresponding properties. + + + The root. + + + + Allow the XML to be extensible by processing any custom element types first, + before we start to process the object definitions. + + This method is a natural + extension point for any other custom pre-processing of the XML. +

The default implementation is empty. Subclasses can override this method to + convert custom elements into standard Spring object definitions, for example. + Implementors have access to the parser's object definition reader and the + underlying XML resource, through the corresponding properties. +

+
+ The root element of the XML document. +
+ + + Creates an instance for the given and element. + + the to create the + the root to start reading from + a new instance + + + + Gets the reader context. + + The reader context. + + + + Simple class that holds the defaults specified at the <objects> + level in a standard Spring XML object definition document: + default-lazy-init, default-autowire, etc. + + Juergen Hoeller + Mark Pollack (.NET) + + + + Gets or sets the autowire setting for the document that's currently parsed. + + The autowire. + + + + Gets or sets the dependency-check setting for the document that's currently parsed + + The dependency check. + + + + Gets or sets the lazy-init flag for the document that's currently parsed. + + The lazy init. + + + + Gets or sets the merge setting for the document that's currently parsed. + + The merge. + + + + Strategy interface for parsing XML object definitions. Equivalent to Spring/Java's NamespaceHandler interface. + + +

+ Used by + for actually parsing a DOM document or + fragment. +

+
+ Juergen Hoeller + Rick Evans (.NET) + Sandu Turcan (.NET) +
+ + + Invoked by after construction but before any + elements have been parsed. + + + + + Parse the specified element and register any resulting + IObjectDefinitions with the IObjectDefinitionRegistry that is + embedded in the supplied ParserContext. + + + Implementations should return the primary IObjectDefinition + that results from the parse phase if they wish to used nested + inside (for example) a <property> tag. + Implementations may return null if they will not + be used in a nested scenario. + + + The element to be parsed into one or more IObjectDefinitions + The object encapsulating the current state of the parsing + process. + + The primary IObjectDefinition (can be null as explained above) + + + + + Parse the specified XmlNode and decorate the supplied ObjectDefinitionHolder, + returning the decorated definition. + + The XmlNode may either be an XmlAttribute or an XmlElement, depending on + whether a custom attribute or element is being parsed. + Implementations may choose to return a completely new definition, + which will replace the original definition in the resulting IApplicationContext/IObjectFactory. + + The supplied ParserContext can be used to register any additional objects needed to support + the main definition. + + The source element or attribute that is to be parsed. + The current object definition. + The object encapsulating the current state of the parsing + process. + The decorated definition (to be registered in the IApplicationContext/IObjectFactory), + or simply the original object definition if no decoration is required. A null value is strickly + speaking invalid, but will leniently treated like the case where the original object definition + gets returned. + + + + Attribute that should be used to specify the default namespace + and schema location for a custom namespace parser. + + Aleksandar Seovic + + + + Creates a new instance of . + + + + + Gets or sets the default namespace for the configuration parser. + + + The default namespace for the configuration parser. + + + + + Gets or sets the default schema location for the configuration parser. + + + The default schema location for the configuration parser. + + + If the property is set, the will always resolve to an assembly-resource + and the set will be interpreted relative to this assembly. + + + + + Gets or sets a type from the assembly containing the schema + + + If this property is set, the will always resolve to an assembly-resource + and the will be interpreted relative to this assembly. + + + + + Provides a resolution mechanism for configuration parsers. + + +

+ The uses this registry + class to find the parser handling a specific namespace. +

+
+ Aleksandar Seovic +
+ + + Name of the .Net config section that contains definitions + for custom config parsers. + + + + + Creates a new instance of the NamespaceParserRegistry class. + + + + + Reset the list of registered parsers to "factory"-setting + + use for unit tests only + + + + Registers the type for wellknown namespaces + + true if the parser could be registered, false otherwise + + + + Constructs a "assembly://..." qualified schemaLocation url using the given type + to obtain the assembly name. + + + + + Returns a parser for the given namespace. + + + The namespace for which to lookup the parser implementation. + + + A parser for a given , or + if no parser was found. + + + + + Returns a schema collection containing validation schemas for all registered parsers. + + + A schema collection containing validation schemas for all registered parsers. + + + + + Pegisters parser, using default namespace and schema location + as defined by the . + + + The of the parser that will be activated + when an element in its default namespace is encountered. + + + If is . + + + + + Associates a parser with a namespace. + + + + Parsers registered with the same as that + of a parser that has previously been registered will overwrite the existing + parser. + + + + The of the parser that will be activated + when the attendant is + encountered. + + + The namespace with which to associate instance of the parser. + + + The location of the XML schema that should be used for validation + of the XML elements that belong to the specified namespace + (can be any valid Spring.NET resource URI). + + + If the is not a + that implements the + interface. + + + If is . + + + + + Pegisters parser, using default namespace and schema location + as defined by the . + + + The parser instance. + + + If is . + + + + + Associates a parser with a namespace. + + + + Parsers registered with the same as that + of a parser that has previously been registered will overwrite the existing + parser. + + + + The namespace with which to associate instance of the parser. + + + The parser instance. + + + The location of the XML schema that should be used for validation + of the XML elements that belong to the specified namespace + (can be any valid Spring.NET resource URI). + + + If is , or if + is not specified and parser class + does not have default value defined using . + + + + + Register a schema as well-known + + + + + + + Returns default values for the parser namespace and schema location as + defined by the . + + + A type of the parser. + + + A instance containing + default values for the parser namsepace and schema location + + + + + Resolves xml entities by using the infrastructure. + + + + + Adapts the interface to . + Only for smooth transition between 1.x and 2.0 style namespace handling, will be dropped for 2.0 + + + + + Support class for implementing custom namespace parsers. + + Parsing of individual elements is done via a ObjectDefintionParser. + Provides the RegisterObjectDefinitionParser for registering a ObjectDefintionParser + to handle a specific element. + Rob Harrop + Juergen Hoeller + Mark Pollack (.NET) + + + + Invoked by after construction but before any + elements have been parsed. + + + + + Parses an element under the root node, typically + an object definition or import statement. + + + The element to be parsed. + + + The parser context. + + + The number of object defintions created from this element. + + + + + Parse the specified XmlNode and decorate the supplied ObjectDefinitionHolder, + returning the decorated definition. + + The XmlNode may either be an XmlAttribute or an XmlElement, depending on + whether a custom attribute or element is being parsed. + Implementations may choose to return a completely new definition, + which will replace the original definition in the resulting IApplicationContext/IObjectFactory. + + The supplied ParserContext can be used to register any additional objects needed to support + the main definition. + + The source element or attribute that is to be parsed. + The current object definition. + The object encapsulating the current state of the parsing + process. + The decorated definition (to be registered in the IApplicationContext/IObjectFactory), + or simply the original object definition if no decoration is required. A null value is strickly + speaking invalid, but will leniently treated like the case where the original object definition + gets returned. + + + + Register the specified for the given + + + + + Constants defining the structure and values associated with the + Spring.NET XML object definition format. + + Rod Johnson + Juergen Hoeller + Rick Evans (.NET) + + + + Value of a boolean attribute that represents + . + + +

+ Anything else represents . +

+
+
+ + + Signifies that a default value is to be applied. + + + + + Defines an external XML object definition resource. + + + + + Specifies the relative path to an external XML object definition + resource. + + + + + Defines an alias for an object definition. + + + + + Specifies the alias of an object definition. + + + + + Specifies the default lazy initialization mode. + + + + + Specifies the default dependency checking mode. + + + + + Specifies the default autowire mode. + + + + + Specifies the default collection merge mode. + + + + + Defines a single named object. + + + + + Element containing informative text describing the purpose of the + enclosing element. + + +

+ Always optional. +

+

+ Used primarily for user documentation of XML object definition + documents. +

+
+
+ + + Specifies a . + + +

+ Does not have to be fully assembly qualified, but it is recommended + that the names of one's objects are + specified explicitly. +

+
+
+ + + The name or alias of the parent object definition that a child + object definition inherits from. + + + + + Objects can be identified by an id, to enable reference checking. + + +

+ There are constraints on a valid XML id: if you want to reference + your object in .NET code using a name that's illegal as an XML id, + use the optional "name" attribute + (). + If neither given, the objects name is + used as id. +

+
+
+ + + Can be used to create one or more aliases illegal in an id. + + +

+ Multiple aliases can be separated by any number of spaces, + semicolons, or commas + (). +

+

+ Always optional. +

+
+
+ + + Is this object a "singleton" (one shared instance, which will + be returned by all calls to + with the id), or a + "prototype" (independent instance resulting from each call to + ). + + +

+ Singletons are most commonly used, and are ideal for multi-threaded + service objects. +

+
+ +
+ + + Controls object scope. Only applicable to ASP.NET web applications. + + +

+ Scope can be defined as either application, session or request. It + defines when "singleton" instances are initialized, but has no + effect on prototype definitions. +

+
+
+ + + The names of the objects that this object depends on being + initialized. + + +

+ The object factory will guarantee that these objects + get initialized before this object definition. +

+ + Dependencies are normally expressed through object properties or + constructor arguments. This property should just be necessary for + other kinds of dependencies such as statics (*ugh*) or database + preparation on startup. + +
+
+ + + Optional attribute for the name of the custom initialization method + to invoke after setting object properties. + + +

+ The method must have no arguments. +

+
+
+ + + Optional attribute for the name of the custom destroy method to + invoke on object factory shutdown. + + +

+ Valid destroy methods have either of the following signatures... + + void MethodName() + void MethodName(bool force) + +

+ + Only invoked on singleton objects! + +
+
+ + + A constructor argument : the constructor-arg tag can have an + optional type attribute, to specify the exact type of the + constructor argument + + +

+ Only needed to avoid ambiguities, e.g. in case of 2 single + argument constructors that can both be converted from a + . +

+
+
+ + + The constructor-arg tag can have an optional index attribute, + to specify the exact index in the constructor argument list. + + +

+ Only needed to avoid ambiguities, e.g. in case of 2 arguments of + the same type. +

+
+
+ + + The constructor-arg tag can have an optional named parameter + attribute, to specify a named parameter in the constructor + argument list. + + + + + Is this object "abstract", i.e. not meant to be instantiated itself + but rather just serving as parent for concrete child object + definitions? + + +

+ Default is . Specify + to tell the object factory to not try to instantiate that + particular object in any case. +

+
+
+ + + A property definition : object definitions can have zero or more + properties. + + +

+ Spring.NET supports primitives, references to other objects in the + same or related factories, lists, dictionaries, and name value + collections. +

+
+
+ + + A reference to another managed object or static + . + + + + + ID refs must specify a name of the target object. + + + + + A reference to the name of another managed object in the same + context. + + + + + A reference to the name of another managed object in the same + context. + + +

+ Local references, using the "local" attribute, have to use object + ids; they can be checked by a parser, thus should be preferred for + references within the same object factory XML file. +

+
+
+ + + Alternative to type attribute for factory-method usage. + + +

+ If this is specified, no type attribute should be used. This should + be set to the name of an object in the current or ancestor + factories that contains the relevant factory method. This allows + the factory itself to be configured using Dependency Injection, and + an instance (rather than static) method to be used. +

+
+
+ + + Optional attribute specifying the name of a factory method to use + to create this object. + + +

+ Use constructor-arg elements to specify arguments to the factory + method, if it takes arguments. Autowiring does not apply to + factory methods. +

+

+ If the "type" attribute is present, the factory method will be a + static method on the type specified by the "type" attribute on + this object definition. Often this will be the same type as that + of the constructed object - for example, when the factory method + is used as an alternative to a constructor. However, it may be on + a different type. In that case, the created object will *not* be + of the type specified in the "type" attribute. This is analogous + to behaviour. +

+

+ If the "factory-object" attribute is present, the "type" attribute + is not used, and the factory method will be an instance method on + the object returned from a + + call with the specified object name. The factory object may be + defined as a singleton or a prototype. +

+

+ The factory method can have any number of arguments. Use indexed + constructor-arg elements in conjunction with the factory-method + attribute. +

+

+ Setter Injection can be used in conjunction with a factory method. + Method Injection cannot, as the factory method returns an instance, + which will be used when the container creates the object. +

+
+
+ + + A list can contain multiple inner object, ref, collection, or + value elements. + + +

+ Lists are untyped, pending generics support, although references + will be strongly typed. +

+

+ A list can also map to an array type. The necessary conversion is + automatically performed by the + . +

+
+
+ + + A set can contain multiple inner object, ref, collection, or value + elements. + + +

+ Sets are untyped, pending generics support, although references + will be strongly typed. +

+
+
+ + + A Spring.NET map is a mapping from a string key to object (a .NET + ). + + +

+ Dictionaries may be empty. +

+
+
+ + + A lookup key (for a dictionary or name / value collection). + + + + + A lookup key (for a dictionary or name / value collection). + + + + + Contains a string representation of a value. + + +

+ This is used by name-value, ctor argument, and property elements. +

+
+
+ + + Contains delimiters that should be used to split delimited string values. + + +

+ This is used by name-value element. +

+
+
+ + + A reference to another objects. + + +

+ Used as a convenience shortcut on property and constructor-arg + elements to refer to other objects. +

+
+
+ + + Contains a string representation of an expression. + + +

+ This is used by ctor argument and property elements. +

+
+
+ + + A map entry can be an inner object, ref, collection, or value. + + +

+ The name of the property is given by the "key" attribute. +

+
+
+ + + Contains a string representation of a property value. + + +

+ The property may be a string, or may be converted to the + required using the + + machinery. This makes it possible for application developers to + write custom + implementations that can convert strings to objects. +

+ + This is recommended for simple objects only. Configure more complex + objects by setting properties to references to other objects. + +
+
+ + + Contains a string representation of an expression. + + + + + Denotes value. + + +

+ Necessary because an empty "value" tag will resolve to an empty + , which will not be resolved to + value unless a special + does so. +

+
+
+ + + 'name-values' elements differ from dictionary elements in that + values must be strings. + + +

+ May be empty. +

+
+
+ + + Element content is the string value of the property. + + +

+ The "key" attribute is the name of the property. +

+
+
+ + + The lazy initialization mode for an individual object definition. + + + + + The dependency checking mode for an individual object definition. + + + + + Defines a subscription to one or more events published by one or + more event sources. + + + + + The name of an event handling method. + + +

+ Defaults to On${event}. + Note : this default will probably change before the first 1.0 + release. +

+
+
+ + + The name of an event. + + + + + The autowiring mode for an individual object definition. + + + + + Shortcut alternative to specifying a key element in a + dictionary entry element with <ref object="..."/>. + + + + + Shortcut alternative to specifying a value element in a + dictionary entry element with <ref object="..."/>. + + + + + Specify if the collection values should be merged with the parent. + + + + + The string of characters that delimit object names. + + + + + A lookup method causes the IoC container to override a given method and return + the object with the name given in the attendant object attribute. + + +

+ This is a form of Method Injection. +

+

+ It's particularly useful as an alternative to implementing the + interface, + in order to be able to make + + calls for non-singleton instances at runtime. In this case, Method Injection + is a less invasive alternative. +

+
+
+ + + The name of a lookup method. This method must take no arguments. + + + + + The name of the object in the IoC container that the lookup method + must resolve to. + + +

+ Often this object will be a prototype, in which case the lookup method + will return a distinct instance on every invocation. This is useful + for single-threaded objects. +

+
+
+ + + A replaced method causes the IoC container to override a given method + with an (arbitrary) implementation at runtime. + + +

+ This (again) is a form of Method Injection. +

+
+
+ + + Name of the method whose implementation should be replaced by the + IoC container. + + +

+ If this method is not overloaded, there's no need to use arg-type + subelements. +

+

+ If this method is overloaded, arg-type subelements must be + used for all override definitions for the method. +

+
+
+ + + The object name of an implementation of the + interface. + + +

+ This may be a singleton or prototype. If it's a prototype, a new + instance will be used for each method replacement. Singleton usage + is the norm. +

+
+
+ + + Subelement of replaced-method identifying an argument for a + replaced method in the event of method overloading. + + + + + + Specification of the of an overloaded method + argument as a . + + +

+ For convenience, this may be a substring of the FQN. E.g. all the following would match + : +

+

+ + + System.String + + + string + + + str + + +

+
+ +
+ + + Check everything. + + + + + Just check primitive (string, int, etc) values. + + + + + Check object references. + + + + + Autowire by name. + + + + + Autowire by . + + + + + Autowiring by constructor. + + + + + The autowiring strategy is to be determined by introspection + of the object's . + + + + + Creates a new instance of the + + class. + + +

+ This is a utility class, and as such has no publicly visible + constructors. +

+
+
+ + + Stateful class used to parse XML object definitions. + + Not all parsing code has been refactored into this class. See + BeanDefinitionParserDelegate in Java for how this class should evolve. + Rob Harrop + Juergen Hoeller + Rod Johnson + Mark Pollack (.NET) + + + + The shared instance for this class (and derived classes). + + + + + Initializes a new instance of the class. + + The reader context. + + + + Initializes a new instance of the class. + + The reader context. + The root element of the definition document to parse + + + + Initialize the default lazy-init, dependency check, and autowire settings. + + The root element + + + + Determines whether the Spring object namespace is equal to the the specified namespace URI. + + The namespace URI. + + true if is the default Spring namespace; otherwise, false. + + + + + Decorates the object definition if required. + + The element. + The holder. + + + + + Parse a standard object definition into a + , + including object name and aliases. + + The element containing the object definition. + + The parsed object definition wrapped within an + + instance. + + + + Object elements specify their canonical name via the "id" attribute + and their aliases as a delimited "name" attribute. + + + If no "id" is specified, uses the first name in the "name" attribute + as the canonical name, registering all others as aliases. + + + + + + Parse a standard object definition into a + , + including object name and aliases. + + The element containing the object definition. + The containing object definition if is a nested element. + + The parsed object definition wrapped within an + + instance. + + + + Object elements specify their canonical name via the "id" attribute + and their aliases as a delimited "name" attribute. + + + If no "id" is specified, uses the first name in the "name" attribute + as the canonical name, registering all others as aliases. + + + + + + Create an instance from the given and . + + + This method may be used as a last resort to post-process an object definition before it gets added to the registry. + + + + + Allows deriving classes to post process the name and aliases for the current element. By default + does nothing and returns the unmodified . + + + The list passed in may be modified by an implementation of this method to reflect special needs. + + the object name obtained by the default algorithm from 'id' and 'name' attributes so far. + the object aliases obtained by the default algorithm from 'name' attribute so far. + the currently processed element. + the containing object definition, may be null + the new object name to be used. + + + + Validate that the specified object name and aliases have not been used already. + + + + + Parses an element in a custom namespace. + + + the parsed object definition or null if not supported by the corresponding parser. + + + + Parses an element in a custom namespace. + + + if a nested element, the containing object definition + the parsed object definition or null if not supported by the corresponding parser. + + + + Given a string containing delimited object names, returns + a string array split on the object name delimeter. + + + The string containing delimited object names. + + + A string array split on the object name delimeter. + + + + + + Determines whether the string represents a 'true' boolean value. + + The value. + + true if is 'true' string value; otherwise, false. + + + + + Convenience method to create a builder for a root object definition. + + Name of the object type. + A builder for a root object definition. + + + + Convenience method to create a builder for a root object definition. + + Type of the object. + a builder for a root object definition + + + + Returns the value of the element's attribute or null, if the attribute is not specified. + + + This is a helper for bypassing the behavior of + to return if the attribute does not exist. + + + + + Returns the value of the element's attribute or , + if the attribute is not specified. + + + This is a helper for bypassing the behavior of + to return if the attribute does not exist. + + + + + Report a parser error. + + + + + Gets the defaults definition object, or null if the + default have not yet been initialized. + + The defaults. + + + + Gets the reader context. + + The reader context. + + + + Creates an instance + populated with the object definitions supplied in the configuration + section. + + +

+ Applications will typically want to use an + , and instantiate it + via the use of the + class (which is similar in functionality to this class). This class is + provided for those times when only an + is required. +

+ Creates an instance of the class XmlObjectFactory +
+ +

+ +

+
+ Mark Pollack (.NET) +
+ + + Creates a new instance of the + class. + + + + + Creates a + instance populated with the object definitions supplied in the + configuration section. + + + The configuration settings in a corresponding parent configuration + section. + + + The configuration context when called from the ASP.NET + configuration system. Otherwise, this parameter is reserved and + is . + + + The for the section. + + + A instance + populated with the object definitions supplied in the configuration + section. + + + + + Default implementation of the + interface. + + +

+ Parses object definitions according to the standard Spring.NET schema. +

+

+ This schema is typically located at + http://www.springframework.net/xsd/spring-objects.xsd. +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) +
+ + + The namespace URI for the standard Spring.NET object definition schema. + + + + + The shared instance for this class (and derived classes). + + + + + Invoked by after construction but before any + elements have been parsed. + + This is a NoOp + + + + Parse the specified XmlElement and register the resulting + ObjectDefinitions with the IObjectDefinitionRegistry + embedded in the supplied + + The element to be parsed. + TThe object encapsulating the current state of the parsing process. + Provides access to a IObjectDefinitionRegistry + The primary object definition. + +

+ This method is never invoked if the parser is namespace aware + and was called to process the root node. +

+
+
+ + + Parse the specified element and register any resulting + IObjectDefinitions with the IObjectDefinitionRegistry that is + embedded in the supplied ParserContext. + + The element to be parsed into one or more IObjectDefinitions + The object encapsulating the current state of the parsing + process. + + The primary IObjectDefinition (can be null as explained above) + + + Implementations should return the primary IObjectDefinition + that results from the parse phase if they wish to used nested + inside (for example) a <property> tag. + Implementations may return null if they will not + be used in a nested scenario. + + + + + + Parse the specified XmlNode and decorate the supplied ObjectDefinitionHolder, + returning the decorated definition. + + The XmlNode may either be an XmlAttribute or an XmlElement, depending on + whether a custom attribute or element is being parsed. + Implementations may choose to return a completely new definition, + which will replace the original definition in the resulting IApplicationContext/IObjectFactory. + + The supplied ParserContext can be used to register any additional objects needed to support + the main definition. + + The source element or attribute that is to be parsed. + The current object definition. + The object encapsulating the current state of the parsing + process. + The decorated definition (to be registered in the IApplicationContext/IObjectFactory), + or simply the original object definition if no decoration is required. A null value is strickly + speaking invalid, but will leniently treated like the case where the original object definition + gets returned. + + + + Loads external XML object definitions from the resource described by the supplied + . + + The XML element describing the resource. + The parser context. + + If the resource could not be imported. + + + + Parses an event listener definition. + + The name associated with the object that the event handler is being defined on. + + The events being populated. + + The element containing the event listener definition. + + + The namespace-aware parser. + + + + + Parse an object definition and register it with the object factory.. + + The element containing the object definition. + The parser context. + + + + + Parse an object definition and register it with the object factory.. + + The element containing the object definition. + The parser context. + + + + + Parse an object definition and register it with the object factory.. + + The element containing the object definition. + The parser context. + + + + + Parse a standard object definition into a + , + including object name and aliases. + + The element containing the object definition. + The parser context. + if set to true if we are processing an inner + object definition. + + The object (definition) wrapped within an + + instance. + + +

+ Object elements specify their canonical name via the "id" attribute + and their aliases as a delimited "name" attribute. +

+

+ If no "id" is specified, uses the first name in the "name" attribute + as the canonical name, registering all others as aliases. +

+
+
+ + + Calculates an id for an object definition. + + +

+ Called when an object definition has not been explicitly defined + with an id. +

+
+ + The element containing the object definition. + + + The list of names defined for the object; may be + or even empty. + + + A calculated object definition id. + +
+ + + Parse a standard object definition. + + The element containing the object definition. + The id of the object definition. + parsing state holder + The object (definition). + + + + Parse method override argument subelements of the given object element. + + + + + Parse element and add parsed element to + + + + + Parse element and add parsed element to + + + + + Parse constructor argument subelements of the given object element. + + + + + Parse event handler subelements of the given object element. + + + + + Parse property value subelements of the given object element. + + + The name of the object (definition) associated with the property element (s) + + + The element containing the top level object definition. + + + The namespace-aware parser. + + + The property (s) associated with the object (definition). + + + + + Parse a constructor-arg element. + + + The name of the object (definition) associated with the ctor arg. + + + The list of constructor args associated with the object (definition). + + + The name of the element containing the ctor arg definition. + + + The namespace-aware parser. + + + + + Parse a property element. + + + The name of the object (definition) associated with the property. + + + The list of properties associated with the object (definition). + + + The name of the element containing the property definition. + + + The namespace-aware parser. + + + + + Get the value of a property element (may be a list). + +

+ Please note that even though this method is named GetPropertyValue, + it is called by both the property and constructor argument element + handlers. +

+
+ The property element. + + The name of the object associated with the property. + + + The namespace-aware parser. + +
+ + + Parse a value, ref or collection subelement of a property element. + + + Subelement of property element; we don't know which yet. + + + The name of the object (definition) associated with the top level property. + + + The namespace-aware parser. + + + + + Gets a list definition. + + + The element describing the list definition. + + + The name of the object (definition) associated with the list definition. + + + The namespace-aware parser. + + The list definition. + + + + Gets a set definition. + + + The element describing the set definition. + + + The name of the object (definition) associated with the set definition. + + + The namespace-aware parser. + + The set definition. + + + + Gets a dictionary definition. + + The element describing the dictionary definition. + The name of the object (definition) associated with the dictionary definition. + The namespace-aware parser. + The dictionary definition. + + + + Selects sub-elements with a given + name. + + +

+ Uses a namespace manager if necessary. +

+
+ + The element to be searched in. + + + The name of the child nodes to look for. + + + The child s of the supplied + with the supplied + . + +
+ + + Selects a single sub-element with a given + name. + + +

+ Uses a namespace manager if necessary. +

+
+ + The element to be searched in. + + + The name of the child node to look for. + + + The first child of the supplied + with the supplied + . + +
+ + + Gets a name value collection mapping definition. + + + The element describing the name value collection mapping definition. + + + The name of the object (definition) associated with the + name value collection mapping definition. + + the context carrying parsing state information + The name value collection definition. + + + + Returns the text of the supplied , + or the empty string value if said is empty. + + +

+ If the supplied is , + then the empty string value will be returned. +

+
+
+ + + Strips the dependency check value out of the supplied string. + + +

+ If the supplied is an invalid dependency + checking mode, the invalid value will be logged and this method will + return the value. + No exception will be raised. +

+
+ + The string containing the dependency check value. + + The dependency check value. + +
+ + + Strips the autowiring mode out of the supplied string. + + +

+ If the supplied is an invalid autowiring mode, + the invalid value will be logged and this method will return the + value. No exception will be raised. +

+
+ + The string containing the autowiring mode definition. + + The autowiring mode. + +
+ + + Given a string containing delimited object names, returns + a string array split on the object name delimeter. + + + The string containing delimited object names. + + + A string array split on the object name delimeter. + + + + + + Context that gets passed along an object definition parsing process, encapsulating + all relevant configuraiton as well as state. + + + + + Initializes a new instance of the class. + + The parser helper. + + + + Initializes a new instance of the class. + + The parser helper. + The containing object definition. + + + + Initializes a new instance of the class. + + The reader context. + The parser helper. + + + + Initializes a new instance of the class. + + The reader context. + The parser helper. + The containing object definition. + + + + Gets the reader context. + + The reader context. + + + + Gets the registry. + + The registry. + + + + Gets the parser helper. + + The parser helper. + + + + Gets the containing object definition. + + The containing object definition. + + + + Gets a value indicating whether this instance is nested. + + true if this instance is nested; otherwise, false. + + + + Gets a value indicating whether this instance is default lazy init. + + + true if this instance is default lazy init; otherwise, false. + + + + + Represents the replacement of a method on a managed object by the IoC + container. + + +

+ Note that this mechanism is not intended as a generic means of + inserting crosscutting code: use AOP for that. +

+
+ Rod Johnson + Rick Evans (.NET) +
+ + + Creates a new instance of the + class. + + + The name of the method that is to be overridden. + + + The object name of the + instance in the surrounding IoC container. + + + If either of the supplied arguments is or + contains only whitespace character(s). + + + + + Add a fragment of a instance's + such as 'Exception or System.Excep to identify an argument + for a dependency injected method. + + + A (sub) string of a instance's . + + + If the supplied is or + contains only whitespace character(s). + + + + + + Does this + match the supplied ? + + The method to be checked. + + if this override matches the supplied . + + + If the supplied is . + + + + + A that represents the current + . + + + A that represents the current + . + + + + + The object name of the + instance in the surrounding IoC container. + + + + + Object definition reader for Spring's default XML object definition format. + + +

+ Typically applied to a + instance. +

+

+ This class registers each object definition with the given object factory superclass, + and relies on the latter's implementation of the + interface. +

+

+ It supports singletons, prototypes, and references to either of these kinds of object. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Creates a new instance of the + class. + + + The + instance that this reader works on. + + + + + Creates a new instance of the + class. + + + The + instance that this reader works on. + + + The to be used for parsing. + + + + + Creates a new instance of the + class. + + + The + instance that this reader works on. + + + The to be used for parsing. + + the to use for creating new s + + + + Load object definitions from the supplied XML . + + + The XML resource for the object definitions that are to be loaded. + + + The number of object definitions that were loaded. + + + In the case of loading or parsing errors. + + + + + Actually load object definitions from the specified XML file. + + The input stream to read from. + The resource for the XML data. + + + + + Validation callback for a validating XML reader. + + The source of the event. + Any data pertinent to the event. + + + + Register the object definitions contained in the given DOM document. + + The DOM document. + + The original resource from where the + was read. + + + The number of object definitions that were registered. + + + In case of parsing errors. + + + + + Creates the to use for actually + reading object definitions from an XML document. + + Default implementation instantiates the specified + or if no reader type is specified. + + + + + Creates the to be passed along + during the object definition reading process. + + The underlying that is currently processed. + A new + + + + Create a instance for handling custom namespaces. + + + TODO (EE): make protected virtual, see remarks on + + + + + The to be used for parsing. + + + + + Sets the IObjectDefinitionDocumentReader implementation to use, responsible for + the actual reading of the XML object definition document.stype of the document reader. + + The type of the document reader. + + + + Specify a to use. If none is specified a default + instance will be created by + + + + + Specify a for creating instances of . + + + + + For retrying the parse process + + + + + Convenience extension of + + that reads object definitions from an XML document or element. + + +

+ Delegates to + + underneath; effectively equivalent to using a + for a + . +

+ + objects doesn't need to be the root element of + the XML document: this class will parse all object definition elements in the + XML stream. + +

+ This class registers each object definition with the + + superclass, and relies on the latter's implementation of the + interface. It supports + singletons, prototypes and references to either of these kinds of object. +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) + +
+ + + Creates a new instance of the class, + with the given resource, which must be parsable using DOM. + + + The XML resource to load object definitions from. + + + In the case of loading or parsing errors. + + + + + Creates a new instance of the class, + with the given resource, which must be parsable using DOM. + + + The XML resource to load object definitions from. + + Flag specifying whether to make this object factory case sensitive or not. + + In the case of loading or parsing errors. + + + + + Creates a new instance of the class, + with the given resource, which must be parsable using DOM, and the + given parent factory. + + + The XML resource to load object definitions from. + + The parent object factory (may be ). + + In the case of loading or parsing errors. + + + + + Creates a new instance of the class, + with the given resource, which must be parsable using DOM, and the + given parent factory. + + + The XML resource to load object definitions from. + + Flag specifying whether to make this object factory case sensitive or not. + The parent object factory (may be ). + + In the case of loading or parsing errors. + + + + + Gets object definition reader to use. + + + + + Extension of specific to use with an XmlObjectDefinitionReader. + Provides access to configured in + + + + + The maximum length of any XML fragment displayed in the error message + reporting. + + +

+ Hopefully this will display enough context so that a user + can pinpoint the cause of the error. +

+
+
+ + + Initializes a new instance of the class. + + The resource. + The reader. + + + + Initializes a new instance of the class. + + The resource. + The reader. + The factory to use for creating new instances. + + + + Generates the name of the object. + + The object definition. + the generated object name + + + + Registers the name of the with generated. + + The object definition. + the generated object name + + + + Reports a parse error by loading a + with helpful contextual + information and throwing said exception. + + +

+ Derived classes can of course override this method in order to implement + validators capable of displaying a full list of errors found in the + definition. +

+
+ + The node that triggered the parse error. + + + The name of the object that triggered the exception. + + + A message about the exception. + + + Always throws an instance of this exception class, that will + contain helpful contextual infomation about the parse error. + + +
+ + + Reports a parse error by loading a + with helpful contextual + information and throwing said exception. + + +

+ Derived classes can of course override this method in order to implement + validators capable of displaying a full list of errors found in the + definition. +

+
+ + The node that triggered the parse error. + + + The name of the object that triggered the exception. + + + A message about the error. + + + The root cause of the parse error (if any - may be ). + + + Always throws an instance of this exception class, that will + contain helpful contextual infomation about the parse error. + +
+ + + This method can be overwritten in order to implement validators + capable of displaying a full list of errors found in the definition. + + + The node that triggered the parse error. + + + A message about the exception. + + + + + Gets the reader. + + The reader. + + + + Gets the resource loader. + + The resource loader. + + + + Gets the registry. + + The registry. + + + + Gets or sets the object definition factory. + + The object definition factory. + + + + Get the instance to lookup parsers for custom namespaces. + + + + + Exception thrown if an + is not fully + initialized, for example if it is involved in a circular reference. + + +

+ This is usually indicated by any of the variants of the + + method returning . +

+

+ A circular reference with an + cannot be solved by eagerly caching singleton instances (as is the + case with normal objects. The reason is that every + needs to be fully + initialized before it can return the created object, while only specific + normal objects need to be initialized - that is, if a collaborating object + actually invokes them on initialization instead of just storing the reference. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Thrown when an + encounters an error when attempting to create an object from an object + definition. + + Juergen Hoeller + Rick Evans (.NET) + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + A message about the exception. + + + + + Creates a new instance of the + class. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + + + Creates a new instance of the + class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the + class. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the + class. + + + The description of the resource associated with the object. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + + + Creates a new instance of the + class. + + + The description of the resource associated with the object. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the + class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + The name of the object that triggered the exception (if any). + + + + + The description of the resource associated with the object (if any). + + + + + Describes the creation failure trace of this exception. + + + + + Creates a new instance of the + FactoryObjectNotInitializedException class. + + + + + Creates a new instance of the FactoryObjectNotInitializedException class. + + + A message about the exception. + + + + + Creates a new instance of the FactoryObjectNotInitializedException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the + FactoryObjectCircularReferenceException class. + + + The name of the object that triggered the exception. + + + A message about the exception. + + + + + Creates a new instance of the FactoryObjectCircularReferenceException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Exception thrown when an + is asked for an object instance name for which it cannot find a definition. + + Rod Johnson + Rick Evans (.NET) + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + A message about the exception. + + + + + Creates a new instance of the + class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the + class. + + + Name of the missing object. + + + A further, detailed message describing the problem. + + + + + Initializes a new instance of the class. + + The required type of the object. + A description of the originating dependency. + A message describing the problem. + + + + Creates a new instance of the + class. + + + The of the missing object. + + + A further, detailed message describing the problem. + + + + + Creates a new instance of the + class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + Return the required of object, if it was a + lookup by that failed. + + + + + Return the name of the missing object, if it was a lookup by name that + failed. + + + + + Thrown in case of a reference to an object that is currently in creation. + + +

+ Typically happens when constructor autowiring matches the currently + constructed object. +

+
+ Juergen Hoeller + Rick Evans +
+ + + The default error message text to be used, if none is specified. + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The name of the object that triggered the exception. + + + + + Creates a new instance of the + class. + + + The name of the object that triggered the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the + class. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + + + Creates a new instance of the + class. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the + class. + + + The description of the resource associated with the object. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + + + Creates a new instance of the + class. + + + The description of the resource associated with the object. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectCurrentlyInCreationException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Exception thrown when an + encounters an error when attempting to parse an object + definition. + + Federico Spinazzi (.NET) + + + + Creates a new instance of the ObjectDefinitionException class. + + + + + Creates a new instance of the ObjectDefinitionException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectDefinitionException class. + + + The value of the xml class attribute thet can be resolved + as a type + + + + + Creates a new instance of the ObjectDefinitionException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + The message about the exception. + + + + + Thrown when an + encounters an internal error, and its definitions are invalid. + + +

+ An example of a situation when this exception would be thrown is + in the case of an XML document containing object definitions being + malformed. +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) +
+ + + Creates a new instance of the ObjectDefinitionStoreException class. + + + + + Creates a new instance of the ObjectDefinitionStoreException class. + + + A message about the exception. + + + + + Creates a new instance of the ObjectDefinitionStoreException class. + + + The description of the resource that the object definition came from + + + The name of the object that triggered the exception. + + + A message about the exception. + + + + + Initializes a new instance of the class. + + + The description of the resource that the object definition came from + + The detail message (used as exception message as-is) + The root cause. (may be null + + + + Creates a new instance of the ObjectDefinitionStoreException class. + + + The resource location (e.g. an XML object definition file) associated + with the offending object definition. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + + + Creates a new instance of the ObjectDefinitionStoreException class. + + + The resource location (e.g. an XML object definition file) associated + with the offending object definition. + + + A message about the exception. + + + The name of the object that triggered the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectDefinitionStoreException class. + + + The description of the resource that the object definition came from + + + A message about the exception. + + + The name of the object that triggered the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectDefinitionStoreException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectDefinitionStoreException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + The description of the resource associated with the object + + + + + The name of the object that trigger the exception. + + + + + The name of the object that triggered the exception (if any). + + + + + The description of the resource associated with the object (if any). + + + + + Convenience methods operating on object factories, returning object instances, + names, or counts. + + +

+ The nesting hierarchy of an object factory is taken into account by the various methods + exposed by this class. +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) +
+ + + Used to dereference an + and distinguish it from managed objects created by the factory. + + +

+ For example, if the managed object identified as foo is a + factory, getting &foo will return the factory, not the + instance returned by the factory. +

+
+
+ + + The string used as a separator in the generation of synthetic id's + for those object definitions explicitly that aren't assigned one. + + +

+ If a name or parent object definition + name is not unique, "#1", "#2" etc will be appended, until such + time that the name becomes unique. +

+
+
+ + + Creates a new instance of the + class. + + +

+ This is a utility class, and as such has no publicly visible + constructors. +

+
+
+ + + Count all object definitions in any hierarchy in which this + factory participates. + + +

+ Includes counts of ancestor object factories. +

+

+ Objects that are "overridden" (specified in a descendant factory + with the same name) are counted only once. +

+
+ The object factory. + + The count of objects including those defined in ancestor factories. + +
+ + + Return all object names in the factory, including ancestor factories. + + The object factory. + The array of object names, or an empty array if none. + + + + Get all object names for the given type, including those defined in ancestor + factories. + + +

+ Will return unique names in case of overridden object definitions. +

+

+ Does consider objects created by s + if is set to true, + which means that s will get initialized. +

+
+ + If this isn't also an + , + this method will return the same as it's own + + method. + + + The that objects must match. + + + Whether to include prototype objects too or just singletons + (also applies to instances). + + + Whether to include instances + too or just normal objects. + + + The array of object names, or an empty array if none. + +
+ + + Get all object names for the given type, including those defined in ancestor + factories. + + +

+ Will return unique names in case of overridden object definitions. +

+

+ Does consider objects created by s, + or rather it considers the type of objects created by + (which means that + s will be instantiated). +

+
+ + If this isn't also an + , + this method will return the same as it's own + + method. + + + The that objects must match. + + + The array of object names, or an empty array if none. + +
+ + + Return all objects of the given type or subtypes, also picking up objects + defined in ancestor object factories if the current object factory is an + . + + +

+ The return list will only contain objects of this type. + Useful convenience method when we don't care about object names. +

+
+ The object factory. + The of object to match. + + Whether to include prototype objects too or just singletons + (also applies to instances). + + + Whether to include instances + too or just normal objects. + + + If the objects could not be created. + + + The of object instances, or an + empty if none. + +
+ + + Return a single object of the given type or subtypes, also picking up objects defined + in ancestor object factories if the current object factory is an + . + + +

+ Useful convenience method when we expect a single object and don't care + about the object name. +

+
+ The object factory. + The of object to match. + + Whether to include prototype objects too or just singletons + (also applies to instances). + + + Whether to include instances + too or just normal objects. + + + If the object could not be created. + + + If more than one instance of an object was found. + + + A single object of the given type or subtypes. + +
+ + + Return a single object of the given type or subtypes, not looking in + ancestor factories. + + +

+ Useful convenience method when we expect a single object and don't care + about the object name. +

+
+ The object factory. + The of object to match. + + Whether to include prototype objects too or just singletons + (also applies to instances). + + + Whether to include instances + too or just normal objects. + + + If the object could not be created. + + + If not exactly one instance of an object was found. + + + A single object of the given type or subtypes. + +
+ + + Return a single object of the given type or subtypes, not looking in + ancestor factories. + + +

+ Useful convenience method when we expect a single object and don't care + about the object name. + This version of ObjectOfType automatically includes prototypes and + instances. +

+
+ The object factory. + The of object to match. + + If the object could not be created. + + + If not exactly one instance of an object was found. + + + A single object of the given type or subtypes. + +
+ + + Return the object name, stripping out the factory dereference prefix if necessary. + + The name of the object. + The object name sans any factory dereference prefix. + + + + Given an (object) name, builds a corresponding factory object name such that + the return value can be used as a lookup name for a factory object. + + + The name to be used to build the resulting factory object name. + + + The transformed into its factory object name + equivalent. + + + + + + + Is the supplied a factory dereference? + + +

+ That is, does the supplied begin with + the + ? +

+
+ The name to check. + + if the supplied is a + factory dereference; if not, or the + aupplied is or + consists solely of the + + value. + + +
+ + + Exception that an object implementation is suggested to throw if its own + factory-aware initialization code fails. + thrown by object factory methods + themselves should simply be propagated as-is. + + +

+ Note that non-factory-aware initialization methods like AfterPropertiesSet () + or a custom "init-method" can throw any exception. +

+
+ Juergen Hoeller + Rick Evans (.NET) +
+ + + Creates a new instance of the ObjectInitializationException class. + + + + + Creates a new instance of the ObjectInitializationException class. + + + A message about the exception. + + + + + Creates a new instance of the ObjectInitializationException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectInitializationException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Thrown in response to an attempt to lookup a factory object, and + the object identified by the lookup key is not a factory. + + +

+ An object is a factory if it implements (either directly or indirectly + via inheritance) the + interface. +

+
+ Rod Johnson + Rick Evans (.NET) +
+ + + Thrown when an object doesn't match the required . + + Rod Johnson + Rick Evans (.NET) + + + + Creates a new instance of the ObjectNotOfRequiredTypeException class. + + + + + Creates a new instance of the ObjectNotOfRequiredTypeException class. + + + A message about the exception. + + + + + Creates a new instance of the ObjectNotOfRequiredTypeException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ObjectNotOfRequiredTypeException class. + + + Name of the object requested. + + + The required of the actual object + instance that was retrieved. + + + The instance actually returned, whose class did not match the + expected . + + + + + Creates a new instance of the ObjectNotOfRequiredTypeException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + The actual of the actual object + instance that was retrieved. + + + + + The required of the actual object + instance that was retrieved. + + + + + The instance actually returned, whose class did not match the + expected . + + + + + The name of the object requested. + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + A message about the exception. + + + + + Creates a new instance of the + class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the + class. + + + The name of the object that was being retrieved from the factory. + + + The object instance that was retrieved. + + + + + Creates a new instance of the + class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Exception thrown when an object depends on other objects or simple properties + that were not specified in the object factory definition, although dependency + checking was enabled. + + Rod Johnson + Juergen Hoeller + Rick Evans (.NET) + + + + Creates a new instance of the UnsatisfiedDependencyException class. + + + + + Creates a new instance of the UnsatisfiedDependencyException class. + + + A message about the exception. + + + + + Creates a new instance of the UnsatisfiedDependencyException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the UnsatisfiedDependencyException class. + + + The description of the resource associated with the object. + + + The name of the object that has the unsatisfied dependency. + + + The constructor argument index at which the dependency is + unsatisfied. + + + The of the constructor argument at + which the dependency is unsatisfied. + + + A message about the exception. + + + + + Creates a new instance of the UnsatisfiedDependencyException class. + + + The description of the resource associated with the object. + + + The name of the object that has the unsatisfied dependency. + + + The name identifying the property on which the dependency is + unsatisfied. + + + A message about the exception. + + + + + Creates a new instance of the UnsatisfiedDependencyException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Base class implementation for classes that describe an event handler. + + Rick Evans + + + + Describes an event handler. + + Rick Evans + + + + Wires up the specified handler to the named event on the + supplied event source. + + + The object (an object instance, a , etc) + exposing the named event. + + + The handler for the event (an object instance, a + , etc). + + + + + The source of the event. + + + + + The name of the method that is going to handle the event. + + + + + The name of the event that is being wired up. + + + + + Creates a new instance of the + class. + + +

+ This is an class, and as such exposes no public constructors. +

+
+
+ + + Creates a new instance of the + class. + + + The object (possibly unresolved) that is exposing the event. + + + The name of the method on the handler that is going to handle the event. + + +

+ This is an class, and as such exposes no public constructors. +

+
+
+ + + Wires up the specified handler to the named event on the + supplied event source. + + + The object (an object instance, a , etc) + exposing the named event. + + + The handler for the event (an object instance, a + , etc). + + + + + Returns a stringified representation of this object. + + A stringified representation of this object. + + + + The source of the event (may be unresolved, as in the case + of a + value). + + + + + The name of the method that is going to handle the event. + + + + + The name of the event that is being wired up. + + + + + Convenience base class for implementations. + + + + + Abstracts the state sharing strategy used + by + + Erich Eichinger + + + + Indicate, whether the given instance can be served by this factory + + the instance to serve state + the name of the instance + + a boolean value indicating, whether state can + be served for the given instance or not. + + + + + Returns the shared state for the given instance. + + the instance to obtain shared state for. + the name of this instance + a dictionary containing shared state for or null. + + + + Gets a dictionary acc. to the type of . + If no dictionary is found, create it according to + + the instance to obtain shared state for + the name of the instance. + + A dictionary containing the 's state, + or null if no state can be served by this provider. + + + + + Creates a dictionary to hold the shared state identified by . + + a key to create the dictionary for. + a dictionary according to and . + + + + Indicate, whether the given instance will be served by this provider + + the instance to serve state + the name of the instance + + a boolean value indicating, whether state shall + be resolved for the given instance or not. + + + + + Create the key used for obtaining the state dictionary for . + + the instance to create the key for + the name of the instance. + + the key identifying the state dictionary to be used for + or null, if this state manager doesn't serve the given instance. + + + + Implementations may choose to return null from this method to indicate, + that they won't serve state for the given instance. + + + Note:Keys returned by this method are always treated case-sensitive! + + + + + + Create shared state dictionaries case-sensitive or case-insensitive? + + + + + A number indicating the priority of this ( for more). + + + + + Base class for all + implemenations that actually perform event wiring. + + Rick Evans + + + + Creates a new instance of the + class. + + +

+ This is an class, and as such exposes no public constructors. +

+
+
+ + + Creates a new instance of the + class. + + + The object (possibly unresolved) that is exposing the event. + + + The name of the method on the handler that is going to handle the event. + + +

+ This is an class, and as such exposes no public constructors. +

+
+
+ + + Wires up the specified handler to the named event on the + supplied event source. + + + The object (an object instance, a , etc) + exposing the named event. + + + The handler for the event (an object instance, a + , etc). + + + + + Gets the event handler. + + + The instance that is registering for the event notification. + + + Event metadata about the event. + + + The event handler. + + + + + Resolves the method metadata that describes the method that is to be used + as the argument to a delegate constructor. + + + The exposing the method. + + + The of the delegate (e.g. System.EventHandler). + + + The custom binding flags to use when searching for the method. + + The method metadata. + + If the method could not be found. + + + + + Describes an implementation + that autowires events to handler methods. + + Rick Evans + + + + Creates a new instance of the + class. + + + + + Wires up the specified handler to the named event on the supplied event source. + + + The object (an object instance, a , etc) + exposing the named event. + + + The handler for the event (an object instance, a , + etc). + + + + + The name of the method that is going to handle the event. + + + + + Performs the matching up of handler methods to one or more source events. + + +

+ This class merely marshals the matching of handler methods to the events exposed + by an event source, and then delegates to a concrete + implementation (such as + or + ) to do the heavy lifting of + actually wiring a handler method to an event. +

+

+ Note : the order in which handler's are wired up to events is non-deterministic. +

+
+
+ + + Creates a new instance of the + class. + + + The object exposing the event (s) being wired up. + + + The name of the event that is being wired up. + + + The object exposing the method (s) being wired to the event. + + + The name of the method that is going to handle the event. + + + + + Wires up events on the source to methods exposed on the handler. + + + + + Wires up the supplied event to any handler methods that match the event + signature. + + The event being wired up. + + + + Only replaces the first occurrence of the placeholder. + + The event whose name is going to be used. + + The method name customised for the name of the supplied event. + + + + + The object exposing the event (s) being wired up. + + + + + The object exposing the method (s) being wired to an event source. + + + + + The of the object that is handling any events. + + + + + The name of the method that is going to handle the event. + + + + + The name of the event that is being wired up. + + + + + Serves shared state on a by-type basis. + + + + + Creates a new instance matching all types by default. + + + + + Creates a new instance matching only specified list of types. + + the list of types to serve. + + + + Indicate, whether the given instance will be served by this provider + + the instance to serve state + the name of the instance + + a boolean value indicating, whether state shall + be resolved for the given instance or not. + + + + + Returns the for the given . + + the instance to obtain the key for. + the name of the instance (ignored by this provider) + instance.GetType() if it matches the list. Null otherwise. + + This method will only be called if returned true previously. + + + + + Limit object types to be served by this state manager. + + + Only objects assignable to one of the types in this list + will be served state by this manager. + + + + + Describes an event handler for an object instance. + + Rick Evans + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The object (possibly unresolved) that is exposing the event. + + + The name of the method on the handler that is going to handle the event. + + + + + Gets the event handler. + + + The instance that is registering for the event notification. + + + Event metadata about the event. + + + The event handler. + + + + + Definition for sorting object instances by a property. + + Juergen Hoeller + Simon White (.NET) + + + + The name of the property to sort by. + + + + + Whether upper and lower case in string values should be ignored. + + + True if the sorting should be performed in a case-insensitive fashion. + + + + + If the sorting should be ascending or descending. + + + True if the sorting should be in the ascending order. + + + + + Mutable implementation of the + interface that + supports toggling the ascending value on setting the same property again. + + Juergen Hoeller + Jean-Pierre Pawlak + Simon White (.NET) + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class using + the specified . + + + The to use + as a source for initial property values. + + + + + Creates a new instance of the + class. + + + The name of the property to sort by. + + + Whether upper and lower case in string values should be ignored. + + + Whether or not the sorting should be ascending or descending. + + + + + Creates a new instance of the + class. + + + Whether or not the + + property should be toggled if the same name is set on the + + property. + + + + + Overrides the default method + + + The object to test against this instance for equality. + + + True if the supplied is equal to this instance. + + + + + Overrides the default method. + + The hashcode for this instance. + + + + The name of the property to sort by. + + + + + Whether upper and lower case in string values should be ignored. + + + True if the sorting should be performed in a case-insensitive fashion. + + + + + If the sorting should be ascending or descending. + + + True if the sorting should be in the ascending order. + + + + + Performs a comparison of two objects, using the specified object property via + an . + + Juergen Hoeller + Jean-Pierre Pawlak + Simon White (.NET) + + + + Creates a new instance of the + class. + + + The to use for any + sorting. + + + If the supplied is . + + + + + Compares two objects and returns a value indicating whether one is less + than, equal to or greater than the other. + + The first object to compare. + The second object to compare. + + + + + Get the 's property + value for the given object. + + The object to get the property value for. + The property value. + + + + Sort the given according to the + given sort definition. + + + The to be sorted. + + The parameters to sort by. + + In the case of a missing property name. + + + If the supplied is . + + + + + Gets the to + use for any sorting. + + + The to use for + any sorting. + + + + + Describes an event handler for a static class method. + + Rick Evans + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + The object (possibly unresolved) that is exposing the event. + + + The name of the method on the handler that is going to handle the event. + + + + + Gets the event handler. + + + The instance that is registering for the event notification. + + + Event metadata about the event. + + + The event handler. + + + + + The central interface of Spring.NET's low-level object infrastructure. + + +

+ Typically not directly used by application code but rather implicitly + via an . +

+

+ Implementing classes have the ability to get and set property values + (individually or in bulk), get property descriptors and query the + readability and writability of properties. +

+

+ This interface supports nested properties enabling the setting + of properties on subproperties to an unlimited depth. +

+

+ If a property update causes an exception, a + will be thrown. Bulk + updates continue after exceptions are encountered, throwing an exception + wrapping all exceptions encountered during the update. +

+

+ implementations can be used + repeatedly, with their "target" or wrapped object changed. +

+
+ Rod Johnson + Mark Pollack (.NET) +
+ + Get the value of a property. + + The name of the property to get the value of. May be nested. + + The value of the property. + + if the property isn't readable, or if the getting the value throws + an exception. + + + + + Get the for a particular + property. + + + The property to be retrieved. + + + The for the particular + property. + + + + + Get the for a particular property. + + + The property the of which is to be retrieved. + + + The for a particular property.. + + + + + Get all of the instances for + all of the properties of the wrapped object. + + + An array of instances. + + + + + Set a property value. + + +

+ This is the preferred way to update an individual property. +

+
+ The new property value. +
+ + + Set a property value. + + +

+ This method is provided for convenience only. The + + method is more powerful. +

+
+ + The name of the property to set value of. + + The new property value. +
+ + Set a number of property values in bulk. + +

+ This is the preferred way to perform a bulk update. +

+

+ Note that performing a bulk update differs from performing a single update, + in that an implementation of this class will continue to update properties + if a recoverable error (such as a vetoed property change or a type + mismatch, but not an invalid property name or the like) is + encountered, throwing a + containing + all the individual errors. This exception can be examined later to see all + binding errors. Properties that were successfully updated stay changed. +

+

+ Does not allow the setting of unknown fields. Equivalent to + + with an argument of false for the second parameter. +

+
+ + The collection of instances to + set on the wrapped object. + +
+ + + Set a number of property values in bulk with full control over behavior. + + +

+ Note that performing a bulk update differs from performing a single update, + in that an implementation of this class will continue to update properties + if a recoverable error (such as a vetoed property change or a type + mismatch, but not an invalid property name or the like) is + encountered, throwing a + containing + all the individual errors. This exception can be examined later to see all + binding errors. Properties that were successfully updated stay changed. +

+

Does not allow the setting of unknown fields. +

+
+ + The to set on the target object + + + Should we ignore unknown values (not found in the object!?) + +
+ + + The object wrapped by the wrapper (cannot be ). + + +

+ Implementations are required to allow the type of the wrapped + object to change. +

+
+ The object wrapped by this wrapper. +
+ + + Convenience method to return the + of the wrapped object. + + The of the wrapped object. + + + + A collection style container for + instances. + + Rod Johnson + Mark Pollack (.NET) + + + + Return the instance with the + given name. + + The name to search for. + the , or null if a + the with the supplied + did not exist in this collection. + + + + + Is there a instance for this + property name? + + The name to search for. + + True if there is a instance for + the supplied . + + + + + Return the difference (changes, additions, but not removals) of + property values between the supplied argument and the values + contained in the collection. + + +

+ Subclasses should also override Equals. +

+
+ The old property values. + + An containing any changes, or + an empty instance if there were + no changes. + +
+ + + Return an array of the objects + held in this object. + + An array of the objects held + in this object. + + + + + This interface should be implemented by classes that want to + have access to the shared state. + + +

+ Shared state is very useful if you have data that needs to be shared by all instances + of e.g. the same webform (or other IHttpHandlers). +

+

+ For example, Spring.Web.UI.Page class implements this interface, which allows + each page derived from it to cache localizalization resources and parsed data binding + expressions only once and then reuse the cached values, regardless of how many instances + of the page are created. +

+
+
+ + + Gets or sets the that should be used + to store shared state for this instance. + + + + + Default implementation of the + interface. + + +

+ Allows simple manipulation of properties, and provides constructors to + support deep copy and construction from a number of collection types such as + and + . +

+
+ Rod Johnson + Mark Pollack (.NET) + Rick Evans (.NET) +
+ + + The list of objects. + + + + + Creates a new instance of the + class. + + +

+ The returned instance is initially empty... + s can be added with the various + overloaded , + , + , + and + methods. +

+
+ + +
+ + + Creates a new instance of the + class. + + +

+ Deep copy constructor. Guarantees + references are independent, although it can't deep copy objects currently + referenced by individual objects. +

+
+
+ + + Creates a new instance of the + class. + + + The with property values + keyed by property name, which must be a . + + + + + Overloaded version of Add that takes a property name and a property value. + + + The name of the property. + + + The value of the property. + + + + + Add the supplied object, + replacing any existing one for the respective property. + + + The object to add. + + + + + Merges the value of the supplied 'new' with that of + the current if merging is supported and enabled. + + + The new pv. + The current pv. + The possibly merged PropertyValue + + + + Add all property values from the given + . + + + The map of property values, the keys of which must be + s. + + + + + Add all property values from the given + . + + + The list of s to be added. + + + + + Remove the given , if contained. + + + The to remove. + + + + + Removes the named , if contained. + + + The name of the property. + + + + + Modify a object held in this object. Indexed from 0. + + + + + Return the property value given the name. + + + The property name is checked in a case-insensitive fashion. + + + The name of the property. + + + The property value. + + + + + Does the container of properties contain one of this name. + + The name of the property to search for. + + True if the property is contained in this collection, false otherwise. + + + + + Return the difference (changes, additions, but not removals) of + property values between the supplied argument and the values + contained in the collection. + + Another property values collection. + + The collection of property values that are different than the supplied one. + + + + + Returns an that can iterate + through a collection. + + +

+ The returned is the + exposed by the + + property. +

+
+ + An that can iterate through a + collection. + +
+ + + Convert the object to a string representation. + + + A string representation of the object. + + + + + Property to retrieve the array of property values. + + + + + Default implementation of the + interface that should be sufficient for all normal uses. + + +

+ will convert + and array + values to the corresponding target arrays, if necessary. Custom + s that deal with + s or arrays can be written against a + comma delimited as + arrays are converted in such a format if the array itself is not assignable. +

+
+ Rod Johnson + Juergen Hoeller + Jean-Pierre Pawlak + Mark Pollack (.NET) + Aleksandar Seovic(.NET) +
+ + The wrapped object. + + + + The ILog instance for this class. We'll create a lot of these objects, + so we don't want a new instance every time. + + + + + Creates a new instance of the class. + + +

+ The wrapped target instance will need to be set afterwards. +

+
+ +
+ + + Creates a new instance of the class. + + + The object wrapped by this . + + + If the supplied is . + + + + + Creates a new instance of the class, + instantiating a new instance of the specified and using + it as the . + + +

+ Please note that the passed as the + argument must have a no-argument constructor. + If it does not, an exception will be thrown when this class attempts + to instantiate the supplied using it's + (non-existent) constructor. +

+
+ + The to instantiate and wrap. + + + If the is , or if the + invocation of the s default (no-arg) constructor + fails (due to invalid arguments, insufficient permissions, etc). + +
+ + Gets the value of a property. + + The name of the property to get the value of. + + The value of the property. + + If there is no such property, if the property isn't readable, or + if getting the property value throws an exception. + + + + Gets the value of a property. + + The property expression that should be used to retrieve the property value. + + The value of the property. + + If there is no such property, if the property isn't readable, or + if getting the property value throws an exception. + + + + + Sets a property value. + + +

+ This method is provided for convenience only. The + + method is more powerful. +

+
+ + The name of the property to set value of. + + The new value. +
+ + + Sets a property value. + + + The property expression that should be used to set the property value. + + The new value. + + + + Sets a property value. + + +

+ This is the preferred way to update an individual property. +

+
+ + The object containing new property value. + +
+ + Set a number of property values in bulk. + +

+ Does not allow unknown fields. Equivalent to + + with and for + arguments. +

+
+ + The to set on the target + object. + + + If an error is encountered while setting a property. + + + On a mismatch while setting a property, insufficient permissions, etc. + + +
+ + + Perform a bulk update with full control over behavior. + + +

+ This method may throw a reflection-based exception, if there is a critical + failure such as no matching field... less serious exceptions will be accumulated + and thrown as a single . +

+
+ + The s to set on the target object. + + + Should we ignore unknown values (not found in the object!?). + + + If an error is encountered while setting a property (only thrown if the + parameter is set to ). + + + On a mismatch while setting a property, insufficient permissions, etc. + + +
+ + + Returns PropertyInfo for the specified property + + The name of the property to search for. + The for the specified property. + If cannot be determined. + + + + Get the for a particular property. + + + The property the of which is to be retrieved. + + + The for a particular property.. + + + + + Returns MemberInfo for the specified property or field + + The name of the property or field to search for. + The or for the specified property or field. + If does not resolve to a property or field. + + + + Get the properties of the wrapped object. + + + An array of s. + + + + + This method is expensive! Only call for diagnostics and debugging reasons, + not in production. + + + A string describing the state of this object. + + + + + Attempts to parse property expression first and falls back to full expression + if that fails. Performance optimization. + + Property expression to parse. + Parsed proeprty expression. + + + + The object wrapped by this . + + + If the object cannot be changed; or an attempt is made to set the + value of this property to . + + + + + Convenience method to return the of the wrapped object. + + +

+ Do not use this (convenience) method prior to setting the + property. +

+
+ + The of the wrapped object. + + + If the property + is . + +
+ + + Return the collection of property descriptors. + + + + + Combined exception, composed of individual binding + s. + + +

+ An object of this class is created at the beginning of the binding + process, and errors added to it as necessary. +

+

+ The binding process continues when it encounters application-level + s, applying those changes + that can be applied and storing rejected changes in an instance of this class. +

+
+ Rod Johnson + Juergen Hoeller + Mark Pollack (.NET) +
+ + + Creates a new instance of the PropertyAccessExceptionsException class. + + + + + Creates a new instance of the PropertyAccessExceptionsException class. + + + A message about the exception. + + + + + Creates a new instance of the PropertyAccessExceptionsException class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Create new empty PropertyAccessExceptionsException. + We'll add errors to it as we attempt to bind properties. + + + + + Creates a new instance of the PropertyAccessExceptionsException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Populates a with + the data needed to serialize the target object. + + + The to populate + with data. + + + The destination (see ) + for this serialization. + + + + + The IObjectWrapper wrapping the target object at the root of the exception. + + + + The list of PropertyAccessException objects. + + + + Return the + for the supplied , or + if there isn't one. + + + + + Describe the number of exceptions contained in this container class. + + A description of the instance contents. + + + + Return the that generated + this exception. + + + + + Return the object we're binding to. + + + + + If this returns zero (0), no errors were encountered during binding. + + + + + Return an array of the s + stored in this object. + + +

+ Will return the empty array (not ) if there were no errors. +

+
+
+ + + Describe the group of exceptions. + + + + + Holds information and value for an individual property. + + +

+ Using an object here, rather than just storing all properties in a + map keyed by property name, allows for more flexibility, and the + ability to handle indexed properties in a special way if necessary. +

+

+ Note that the value doesn't need to be the final required + : an + implementation must + handle any necessary conversion, as this object doesn't know anything + about the objects it will be applied to. +

+
+ Rod Johnson + Mark Pollack (.NET) +
+ + + Creates a new instance of the + class. + + The name of the property. + + The value of the property (possibly before type conversion). + + + If the supplied is or + contains only whitespace character(s). + + + + + Creates a new instance of the + class. + + The name of the property. + + The value of the property (possibly before type conversion). + + Pre-parsed property name. + + If the supplied or + is , or if the name contains only whitespace characters. + + + + + Print a string representation of the property. + + A string representation of the property. + + + + Determines whether the supplied + is equal to the current . + + The other instance. + + if they are equal in content. + + + + + Serves as a hash function for a particular type, suitable for use + in hashing algorithms and data structures like a hash table. + + + A hash code for the current . + + + + The name of the property. + The name of the property. + + + + Parsed property expression. + + + + + Return the value of the property. + + +

+ Note that type conversion will not have occurred here. + It is the responsibility of the + implementation to + perform type conversion. +

+
+ The (possibly unresolved) value of the property. +
+ + + A simple pool implementation + + +

+ Based on the implementation found in Concurrent Programming in Java, + 2nd ed., by Doug Lea. +

+
+ Doug Lea + Federico Spinazzi + Mark Pollack +
+ + + A simple pooling interface for managing and monitoring a pool + of objects. + + +

+ Based on the Jakarta Commons Pool API. +

+
+ Federico Spinazzi + +
+ + + Obtain an instance from the pool. + + +

+ By contract, clients must return the borrowed + instance using + or a related method as defined in an implementation or + sub-interface. +

+
+ An instance from the pool. + + In case the pool is unusable. + + +
+ + + Return an instance to the pool. + + +

+ By contract, the object must have been obtained using + + or a related method as defined in an implementation or sub-interface. +

+
+ The instance to be returned to the pool. + +
+ + + Create an object using the factory set by + the property + or other implementation dependent mechanism + and place it into the pool. + + +

+ This is an optional operation. AddObject is useful for "pre-loading" a + pool with idle objects. +

+
+ + If the implementation does not support the operation. + +
+ + + Close the pool and free any resources associated with it. + + + + + Clear objects sitting idle in the pool, releasing any + associated resources. + + +

+ This is an optional operation. +

+
+ + If the implementation does not support the operation. + +
+ + + Gets the number of instances currently borrowed from the pool. + + +

+ This is an optional operation. +

+
+ + If the implementation does not support the operation. + +
+ + + Gets the number of instances currently idle in the pool. + + +

+ This is an optional operation. +

+

+ This may be considered an approximation of the number of objects + that can be borrowed without creating any new instances. +

+
+ + If the implementation does not support the operation. + +
+ + + Set the factory used to create new instances. + + +

+ This is an optional operation. +

+
+ + If the implementation does not support the operation. + +
+ + + Set of permits + + + + + Creates a new instance of the + class. + + + The factory used to instantiate and manage the lifecycle of pooled objects. + + The initial size of the pool. + + If the supplied is . + + + If the supplied is less than or equal to zero. + + + + + Obtain an instance from the pool. + + + In case the pool is unusable. + + + + + + + Return an instance to the pool. + + The instance to be returned to the pool. + + + + + + Create an object using the factory set by + the property + or other implementation dependent mechanism + and place it into the pool. + + +

+ This implementation always throws a + . +

+
+ + If the implementation does not support the operation. + +
+ + + Synchronized borrow logic. + + + + + + Synchronized release logic. + + + The object to release to the pool. + + + if the object was not a busy one. + + + + + Instantiates the supplied number of instances and adds + them to the pool. + + + The initial number of objects to build. + + + If the supplied number of is + less than or equal to zero. + + + + + Close the pool and free any resources associated with it. + + + + + Clear objects sitting idle in the pool, releasing any + associated resources. + + +

+ This implementation always throws a + . +

+
+ + If the implementation does not support the operation. + +
+ + + Change the state of the pool to unusable. + + + + + Gets the number of instances currently borrowed from the pool. + + + If the implementation does not support the operation. + + + + + + Gets the number of instances currently idle in the pool. + + + If the implementation does not support the operation. + + + + + + Set the factory used to create new instances. + + +

+ This implementation always throws a + . +

+
+ + If the implementation does not support the operation. + +
+ + + Defines lifecycle methods for objects that are to be used in an + implementation. + + +

+ The following methods summarize the contract between an + and an + an . +

+ + + + is called whenever a new instance is needed. + + + + is invoked on every instance before it is returned from + the pool. + + + + is invoked on every instance when it is returned to the pool. + + + + is invoked on every instance when it is being dropped from the + pool (see + + + +

+ Based on the Jakarta Commons Pool API. +

+
+ Federico Spinazzi + +
+ + + Creates an instance that can be returned by the pool. + + + An instance that can be returned by the pool. + + + + + Destroys an instance no longer needed by the pool. + + +

+ Invoked on every instance when it is being "dropped" + from the pool (whether due to the return value from a call to the + + method, or for reasons specific to the pool implementation.) +

+
+ The instance to be destroyed. +
+ + + Ensures that the instance is safe to be returned by the pool. + Returns false if this object should be destroyed. + + +

+ Invoked in an implementation-specific fashion to determine if an + instance is still valid to be returned by the pool. + It will only be invoked on an "activated" instance. +

+
+ The instance to validate. + + if this object is not valid and + should be dropped from the pool, otherwise . + +
+ + + Reinitialize an instance to be returned by the pool. + + +

+ Invoked on every instance before it is returned from the pool. +

+
+ The instance to be activated. +
+ + + Uninitialize an instance to be returned to the pool. + + +

+ Invoked on every instance when it is returned to the pool. +

+
+ The instance returned to the pool. +
+ + + Base class for all pooling exceptions. + + Federico Spinazzi + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class. + + + A message about the exception. + + + + + Creates a new instance of the + class. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the + class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Base class for method builders that contains common functionalities. + + Bruno Baia + + + + Defines interface that proxy method builders have to implement. + + Aleksandar Seovic + Bruno Baia + + + + Dynamically builds proxy method. + + The method to proxy. + + The interface definition of the method, if applicable. + + + The for the proxy method. + + + + + The type builder to use. + + + + + The implementation to use. + + + + + Indicates whether interfaces should be implemented explicitly. + + + + + Creates a new instance of the method builder. + + The type builder to use. + + The implementation to use. + + + if the interface is to be + implemented explicitly; otherwise . + + + + + Dynamically builds proxy method. + + The method to proxy. + + The interface definition of the method, if applicable. + + + The for the proxy method. + + + + + Generates the IL instructions that pushes + the proxy instance on stack. + + The IL generator to use. + + + + Generates the IL instructions that pushes + the target instance on which calls should be delegated to. + + The IL generator to use. + + + + Defines proxy method for the target object. + + The method to proxy. + + The interface definition of the method, if applicable. + + + if the supplied is to be + implemented explicitly; otherwise . + + + The for the proxy method. + + + + + Defines method parameters based on proxied method metadata. + + + The to use. + + The method to proxy. + + + + Defines generic method parameters based on proxied method metadata. + + + The to use. + + The method to proxy. + + + + Generates the proxy method. + + The IL generator to use. + The method to proxy. + + The interface definition of the method, if applicable. + + + + + Calls target method directly. + + The IL generator to use. + The method to invoke. + + + + Emits code to ensure that target understands the method and throw a sensible exception otherwise. + + + + + Calls base method directly. + + The IL generator to use. + The method to proxy. + + + + Replaces a raw reference with a reference to a proxy. + + +

+ If the target object returns reference to itself -- 'this' -- + we need to treat it as a special case and return a reference + to a proxy object instead. +

+
+ The IL generator to use. + The location of the return value. +
+ + + Generates code that throws . + + IL generator to use. + the type of the exception to throw + Error message to use. + + + + Base class for proxy builders that can be used + to create a proxy for any class. + + +

+ This class provides a set of template + methods that derived classes can override to provide custom behaviour + appropriate to the type of proxy that is being generated (one of + inheritance or composition-based proxying). +

+
+ Aleksandar Seovic + Bruno Baia +
+ + + Describes the operations for a generic proxy type builder that can be + used to create a proxy type for any class. + + Aleksandar Seovic + + + + Creates the proxy type. + + The generated proxy class. + + + + The name of the proxy . + + The name of the proxy . + + + + The of the target object. + + + + + The of the class that the proxy must + inherit from. + + + + + Gets or sets the list of interfaces proxy should implement. + + + + + Should we proxy target attributes? + + + by default. + Target type attributes, method attributes, method's return type attributes + and method's parameter attributes are copied to the proxy. + + + + + The list of custom s that the proxy + class must be decorated with. + + +

+ Note that the list is composed of instances of the actual + s that are to be applied, not the + s of the s. +

+
+ +

+ The following code snippets show examples of how to decorate the + the proxied class with one or more s. +

+ + // get a concrete implementation of an IProxyTypeBuilder... + IProxyTypeBuilder builder = ... ; + builder.TargetType = typeof( ... ); + + IDictionary typeAtts = new Hashtable(); + builder.TypeAttributes = typeAtts; + + // applies a single Attribute to the proxied class... + typeAtts = new Attribute[] { new MyCustomAttribute() }); + + // applies a number of Attributes to the proxied class... + typeAtts = new Attribute[] + { + new MyCustomAttribute(), + new AnotherAttribute(), + }); + +
+
+ + + The custom s that the proxy + members must be decorated with. + + +

+ This dictionary must use simple s for keys + (denoting the member names that the attributes are to be applied to), + with the corresponding values being + s. +

+

+ The key may be wildcarded using the '*' character... if so, + then those proxy members that match against the key will be + decorated with the attendant list of + s. This naturally implies that using + the '*' character as a key will result in the attendant list + of s being applied to every member of + the proxied class. +

+
+ +

+ The following code snippets show examples of how to decorate the + members of a proxied class with one or more + s. +

+ + // get a concrete implementation of an IProxyTypeBuilder... + IProxyTypeBuilder builder = ... ; + builder.TargetType = typeof( ... ); + + IDictionary memAtts = new Hashtable(); + builder.MemberAttributes = memAtts; + + // applies a single Attribute to all members of the proxied class... + memAtts ["*"] = new Attribute[] { new MyCustomAttribute() }); + + // applies a number of Attributes to all members of the proxied class... + memAtts ["*"] = new Attribute[] + { + new MyCustomAttribute(), + new AnotherAttribute(), + }); + + // applies a single Attribute to those members of the proxied class + // that have identifiers starting with 'Do' ... + memAtts ["Do*"] = new Attribute[] { new MyCustomAttribute() }); + + // applies a number of Attributes to those members of the proxied class + // that have identifiers starting with 'Do' ... + memAtts ["Do*"] = new Attribute[] + { + new MyCustomAttribute(), + new AnotherAttribute(), + }); + +
+
+ + + Describes the operations that generates IL instructions + used to build the proxy type. + + Bruno Baia + + + + Generates the IL instructions that pushes + the proxy instance on stack. + + The IL generator to use. + + + + Generates the IL instructions that pushes + the target instance on which calls should be delegated to. + + The IL generator to use. + + + + The shared instance for this class (and derived classes). + + + + + Creates the proxy type. + + The generated proxy class. + + + + Generates the IL instructions that pushes + the proxy instance on stack. + + The IL generator to use. + + + + Generates the IL instructions that pushes + the target instance on which calls should be delegated to. + + The IL generator to use. + + + + Creates an appropriate type builder. + + The name to use for the proxy type name. + The type to extends if provided. + The type builder to use. + + + + Applies attributes to the proxy class. + + The type builder to use. + The proxied class. + + + + + + Applies attributes to the proxied method. + + The method builder to use. + The proxied method. + + + + + + Applies attributes to the proxied method's return type. + + The method builder to use. + The proxied method. + + + + + Applies attributes to proxied method's parameters. + + The method builder to use. + The proxied method. + + + + + Calculates and returns the list of attributes that apply to the + specified type. + + The type to find attributes for. + + A list of custom attributes that should be applied to type. + + + + + + + Calculates and returns the list of attributes that apply to the + specified method. + + The method to find attributes for. + + A list of custom attributes that should be applied to method. + + + + + + + Calculates and returns the list of attributes that apply to the + specified method's return type. + + The method to find attributes for. + + A list of custom attributes that should be applied to method's return type. + + + + + + Calculates and returns the list of attributes that apply to the + specified method's parameters. + + The method to find attributes for. + The method's parameter to find attributes for. + + A list of custom attributes that should be applied to the specified method's parameter. + + + + + + Check that the specified object is matching the passed attribute type. + + +

+ The specified object can be of different type : +

+ + + + + + System.Reflection.CustomAttributeData (Only with .NET 2.0) + + + + + +
+ The object instance to check. + The attribute type to test against. + + if the object instance matches the attribute type; + otherwise . + +
+ + + Defines the types of the parameters for the specified constructor. + + The constructor to use. + The types for constructor's parameters. + + + + Implements constructors for the proxy class. + + + The builder to use. + + + + + Generates the proxy constructor. + + The constructor builder to use. + The IL generator to use. + The constructor to use. + + + + Implements an interface. + + + Generates proxy methods that belongs to the interface + using the specified . + + The type builder to use. + + The implementation to use + + The interface to implement. + + The of the target object. + + + + + Implements an interface. + + + Generates proxy methods that belongs to the interface + using the specified . + + The type builder to use. + + The implementation to use + + The interface to implement. + + The of the target object. + + + if target virtual methods should not be proxied; + otherwise . + + + + + Gets the mapping of the interface to proxy + into the actual methods on the target type + that does not need to implement that interface. + + +

+ If the target type does not implement the interface, + we return the interfaces methods as the target methods for many reasons : +

    +
  • + The target object can change for an object that implements the interface. + (See 'Spring.Aop.Framework.DynamicProxy.IAdvisedProxyMethodBuilder' + implementation in the Spring AOP framework for an example) +
  • +
  • + Allow Transparent proxies to be proxied. + (See Spring Remoting framework for an example) +
  • +
  • + Allow null target to be proxied. + (See Spring AOP framework which avoid calls to the target object + by intercepting all methods. Think "dynamic mock") + (See 'Spring.Web.Services.WebServiceProxyFactory' implementation for another example) +
  • +
+

+
+ + The of the target object. + + The interface to implement. + + An interface mapping for the interface to proxy. + +
+ + + Inherit from a type. + + + Generates proxy methods for base virtual methods + using the specified . + + + The builder to use for code generation. + + + The implementation to use to override base virtual methods. + + The to inherit from. + + + + Inherit from a type. + + + Generates proxy methods for base virtual methods + using the specified . + + + The builder to use for code generation. + + + The implementation to use to override base virtual methods. + + The to inherit from. + + if only members declared at the level + of the supplied 's hierarchy should be proxied; + otherwise . + + + + + Implements the specified . + + The type builder to use. + The type the property is defined on. + The property to proxy. + The implemented methods map. + + + + Implements the specified event. + + The type builder to use. + The type the event is defined on. + The event to proxy. + The implemented methods map. + + + + Returns an array of s that represent + the proxiable interfaces. + + + An interface is proxiable if it's not marked with the + . + + + The array of interfaces from which + we want to get the proxiable interfaces. + + + An array containing the interface s. + + + + + Checks if specified interface is of a special type + that should never be proxied (i.e. ISerializable). + + Interface type to check. + + true if it is, false otherwise. + + + + + The name of the proxy . + + The name of the proxy . + + + + The of the target object. + + + + + The of the class that the proxy must + inherit from. + + +

+ The default value of this property is the + . +

+
+
+ + + Gets or sets the list of interfaces proxy should implement. + + + The default value of this property is all the interfaces + implemented or inherited by the target type. + + + + + Should we proxy target attributes? + + + + + + The list of custom s that the proxy + class must be decorated with. + + + + + + The custom s that the proxy + members must be decorated with. + + + + + + Implementation of IProxyMethodBuilder that delegates method calls to the base class. + + Bruno Baia + + + + Creates a new instance of the method builder. + + The type builder to use. + + The implementation to use. + + + if the interface is to be + implemented explicitly; otherwise . + + + + + Generates the proxy method. + + The IL generator to use. + The method to proxy. + + The interface definition of the method, if applicable. + + + + + Builds a proxy type using composition. + + + + In order for this builder to work, the target must implement + one or more interfaces. + + + Aleksandar Seovic + Bruno Baia + + + + Target instance calls should be delegated to. + + + + + Creates a new instance of the + class. + + + + + Creates a proxy that delegates calls to an instance of the + target object. + + +

+ Only interfaces can be proxied using composition, so the target + must implement one or more interfaces. +

+
+ The generated proxy class. + + If the + does not implement any interfaces. + +
+ + + Create an to create interface implementations + + + + + Allows subclasses to generate additional code + + + + + Generates the IL instructions that pushes + the target instance on which calls should be delegated to. + + The IL generator to use. + + + + Deaclares a field that holds the target object instance. + + + The builder to use for code generation. + + + + + Generates the proxy constructor. + + +

+ This implementation creates instance of the target object for delegation + using constructor arguments. +

+
+ The constructor builder to use. + The IL generator to use. + The constructor to delegate the creation to. +
+ + + Gets or sets a value indicating whether interfaces should be implemented explicitly. + + + if they should be; otherwise, . + + + + + Allows easy access to existing and creation of new dynamic proxies. + + Aleksandar Seovic + Bruno Baia + + + + The name of the assembly that defines proxy types created. + + + + + The attributes of the proxy type to generate. + + + + + Creates an appropriate type builder. + + The proxy type name. + The type to extends if provided. + The type builder to use. + + + + Saves dynamically generated assembly to disk. + Can only be called in DEBUG_DYNAMIC mode, per ConditionalAttribute rules. + + + + + Builds a proxy type using inheritance. + + + + In order for this builder to work, target methods have to be either + , or belong to an interface. + + + Aleksandar Seovic + Bruno Baia + + + + Creates a new instance of the + class. + + + + + Creates a proxy that inherits the proxied object's class. + + +

+ Only (non-final) methods can be proxied, + unless they are members of one of the interfaces that target class + implements. In that case, methods will be proxied using explicit + interface implementation, which means that client code will have + to cast the proxy to a specific interface in order to invoke the + methods. +

+
+ The generated proxy class. +
+ + + Generates the IL instructions that pushes + the target instance on which calls should be delegated to. + + The IL generator to use. + + + + Generates the proxy constructor. + + +

+ This implementation delegates the call to a base class constructor. +

+
+ The constructor builder to use. + The IL generator to use. + + The base class constructor to delegate the call to. + +
+ + + Gets or sets a value indicating whether inherited members should be proxied. + + + if they should be; otherwise, . + + + + + This attribute can be used to mark interfaces that should not be proxied + + Bruno Baia + + + + Creates a new instance of the + class. + + + + + Implementation of IProxyMethodBuilder that delegates method calls to target object. + + Bruno Baia + + + + Creates a new instance of the method builder. + + The type builder to use. + + The implementation to use. + + + if the interface is to be + implemented explicitly; otherwise . + + + + + Generates the proxy method. + + The IL generator to use. + The method to proxy. + + The interface definition of the method, if applicable. + + + + + Base class for dynamic members. + + Aleksandar Seovic + + + + Method attributes constant. + + + + + Sets up target instance for invocation. + + IL generator to use. + Type of target instance. + + + + Sets up invocation argument. + + IL generator to use. + Argument type. + Argument position. + + + + Generates method invocation code. + + IL generator to use. + Flag specifying whether method is static. + Flag specifying whether method is on the value type. + Method to invoke. + + + + Generates code to process return value if necessary. + + IL generator to use. + Type of the return value. + + + + Generates code that throws . + + IL generator to use. + Error message to use. + + + + Defines constructors that dynamic constructor class has to implement. + + + + + Invokes dynamic constructor. + + + Constructor arguments. + + + A constructor value. + + + + + Safe wrapper for the dynamic constructor. + + + will attempt to use dynamic + constructor if possible, but it will fall back to standard + reflection if necessary. + + + + + Obtains cached constructor info or creates a new entry, if none is found. + + + + + Creates a new instance of the safe constructor wrapper. + + Constructor to wrap. + + + + Invokes dynamic constructor. + + + Constructor arguments. + + + A constructor value. + + + + + Factory class for dynamic constructors. + + Aleksandar Seovic + + + + Creates dynamic constructor instance for the specified . + + Constructor info to create dynamic constructor for. + Dynamic constructor for the specified . + + + + Defines methods that dynamic field class has to implement. + + + + + Gets the value of the dynamic field for the specified target object. + + + Target object to get field value from. + + + A field value. + + + + + Gets the value of the dynamic field for the specified target object. + + + Target object to set field value on. + + + A new field value. + + + + + Safe wrapper for the dynamic field. + + + will attempt to use dynamic + field if possible, but it will fall back to standard + reflection if necessary. + + + + + Obtains cached fieldInfo or creates a new entry, if none is found. + + + + + Creates a new instance of the safe field wrapper. + + Field to wrap. + + + + Gets the value of the dynamic field for the specified target object. + + + Target object to get field value from. + + + A field value. + + + + + Gets the value of the dynamic field for the specified target object. + + + Target object to set field value on. + + + A new field value. + + + + + Holds cached Getter/Setter delegates for a Field + + + + + Factory class for dynamic fields. + + Aleksandar Seovic + + + + Creates dynamic field instance for the specified . + + Field info to create dynamic field for. + Dynamic field for the specified . + + + + Defines methods that dynamic indexer class has to implement. + + + + + Gets the value of the dynamic indexer for the specified target object. + + + Target object to get the indexer value from. + + + Indexer argument. + + + A indexer value. + + + + + Gets the value of the dynamic indexer for the specified target object. + + + Target object to get the indexer value from. + + + Indexer argument. + + + A indexer value. + + + + + Gets the value of the dynamic indexer for the specified target object. + + + Target object to get the indexer value from. + + + Indexer arguments. + + + A indexer value. + + + + + Gets the value of the dynamic indexer for the specified target object. + + + Target object to set the indexer value on. + + + Indexer argument. + + + A new indexer value. + + + + + Gets the value of the dynamic indexer for the specified target object. + + + Target object to set the indexer value on. + + + Indexer argument. + + + A new indexer value. + + + + + Gets the value of the dynamic indexer for the specified target object. + + + Target object to set the indexer value on. + + + Indexer arguments. + + + A new indexer value. + + + + + Safe wrapper for the dynamic indexer. + + + will attempt to use dynamic + indexer if possible, but it will fall back to standard + reflection if necessary. + + + + + Creates a new instance of the safe indexer wrapper. + + Indexer to wrap. + + + + Gets the value of the dynamic indexer for the specified target object. + + + Target object to get indexer value from. + + + Indexer arguments. + + + A indexer value. + + + + + Gets the value of the dynamic indexer for the specified target object. + + + Target object to get the indexer value from. + + + Indexer argument. + + + A indexer value. + + + + + Gets the value of the dynamic indexer for the specified target object. + + + Target object to get indexer value from. + + + Indexer arguments. + + + A indexer value. + + + + + Sets the value of the dynamic indexer for the specified target object. + + + Target object to set indexer value on. + + + Indexer arguments. + + + A new indexer value. + + + + + Sets the value of the dynamic indexer for the specified target object. + + + Target object to set indexer value on. + + + Indexer arguments. + + + A new indexer value. + + + + + Sets the value of the dynamic indexer for the specified target object. + + + Target object to set indexer value on. + + + Indexer arguments. + + + A new indexer value. + + + + + Internal PropertyInfo accessor. + + + + + Factory class for dynamic indexers. + + Aleksandar Seovic + + + + Prevent instantiation + + + + + Creates dynamic indexer instance for the specified . + + Indexer info to create dynamic indexer for. + Dynamic indexer for the specified . + + + + Defines methods that dynamic method class has to implement. + + + + + Invokes dynamic method on the specified target object. + + + Target object to invoke method on. + + + Method arguments. + + + A method return value. + + + + + Safe wrapper for the dynamic method. + + + will attempt to use dynamic + method if possible, but it will fall back to standard + reflection if necessary. + + + + + Creates a new instance of the safe method wrapper. + + Method to wrap. + + + + Invokes dynamic method. + + + Target object to invoke method on. + + + Method arguments. + + + A method return value. + + + + + Gets the class, that declares this method + + + + + Factory class for dynamic methods. + + Aleksandar Seovic + + + + Creates dynamic method instance for the specified . + + Method info to create dynamic method for. + Dynamic method for the specified . + + + + Defines methods that dynamic property class has to implement. + + + + + Gets the value of the dynamic property for the specified target object. + + + Target object to get property value from. + + + A property value. + + + + + Gets the value of the dynamic property for the specified target object. + + + Target object to set property value on. + + + A new property value. + + + + + Gets the value of the dynamic property for the specified target object. + + + Target object to get property value from. + + Optional index values for indexed properties. This value should be null reference for non-indexed properties. + + A property value. + + + + + Gets the value of the dynamic property for the specified target object. + + + Target object to set property value on. + + + A new property value. + + Optional index values for indexed properties. This value should be null reference for non-indexed properties. + + + + Safe wrapper for the dynamic property. + + + will attempt to use dynamic + property if possible, but it will fall back to standard + reflection if necessary. + + + + + Obtains cached property info or creates a new entry, if none is found. + + + + + Creates a new instance of the safe property wrapper. + + Property to wrap. + + + + Gets the value of the dynamic property for the specified target object. + + + Target object to get property value from. + + + A property value. + + + + + Gets the value of the dynamic property for the specified target object. + + + Target object to get property value from. + + Optional index values for indexed properties. This value should be null reference for non-indexed properties. + + A property value. + + + + + Gets the value of the dynamic property for the specified target object. + + + Target object to set property value on. + + + A new property value. + + + + + Gets the value of the dynamic property for the specified target object. + + + Target object to set property value on. + + + A new property value. + + Optional index values for indexed properties. This value should be null reference for non-indexed properties. + + + + Internal PropertyInfo accessor. + + + + + Holds cached Getter/Setter delegates for a Property + + + + + Factory class for dynamic properties. + + Aleksandar Seovic + + + + Creates safe dynamic property instance for the specified . + + +

This factory method will create a dynamic property with a "safe" wrapper.

+

Safe wrapper will attempt to use generated dynamic property if possible, + but it will fall back to standard reflection if necessary.

+
+ Property info to create dynamic property for. + Safe dynamic property for the specified . + +
+ + + Creates dynamic property instance for the specified . + + Property info to create dynamic property for. + Dynamic property for the specified . + + + + Represents a Get method + + the target instance when calling an instance method + the value return by the Get method + + + + Represents a Set method + + the target instance when calling an instance method + the value to be set + + + + Represents an Indexer Get method + + the target instance when calling an instance method + + the value return by the Get method + + + + Represents a Set method + + the target instance when calling an instance method + the value to be set + + + + + Represents a method + + the target instance when calling an instance method + arguments to be passed to the method + the value return by the method. null when calling a void method + + + + Represents a constructor + + arguments to be passed to the method + the new object instance + + + + Represents a callback method used to create an from a instance. + + + + + Represents a callback method used to create an from a instance. + + + + + Represents a callback method used to create an from a instance. + + + + + Represents a callback method used to create an from a instance. + + + + + Represents a callback method used to create an from a instance. + + + + + Allows easy access to existing and creation of new dynamic relection members. + + Aleksandar Seovic + + + + The name of the assembly that defines reflection types created. + + + + + The attributes of the reflection type to generate. + + + + + Cache for dynamic property types. + + + + + Cache for dynamic field types. + + + + + Cache for dynamic indexer types. + + + + + Cache for dynamic method types. + + + + + Cache for dynamic constructor types. + + + + + Creates an appropriate type builder. + + + The base name to use for the reflection type name. + + The type builder to use. + + + + Returns dynamic property if one exists. + + Property to look up. + callback function that will be called to create the dynamic property + An for the given property info. + + + + Returns dynamic field if one exists. + + Field to look up. + callback function that will be called to create the dynamic field + An for the given field info. + + + + Returns dynamic indexer if one exists. + + Indexer to look up. + callback function that will be called to create the dynamic indexer + An for the given indexer. + + + + Returns dynamic method if one exists. + + Method to look up. + callback function that will be called to create the dynamic method + An for the given method. + + + + Returns dynamic constructor if one exists. + + Constructor to look up. + callback function that will be called to create the dynamic constructor + An for the given constructor. + + + + Saves dynamically generated assembly to disk. + Can only be called in DEBUG mode, per ConditionalAttribute rules. + + + + + Create a new Get method delegate for the specified field using + + the field to create the delegate for + a delegate that can be used to read the field + + + + Create a new Set method delegate for the specified field using + + the field to create the delegate for + a delegate that can be used to read the field. + + If the field's returns true, the returned method + will throw an when called. + + + + + Create a new Get method delegate for the specified property using + + the property to create the delegate for + a delegate that can be used to read the property. + + If the property's returns false, the returned method + will throw an when called. + + + + + Create a new Set method delegate for the specified property using + + the property to create the delegate for + a delegate that can be used to write the property. + + If the property's returns false, the returned method + will throw an when called. + + + + + Create a new method delegate for the specified method using + + the method to create the delegate for + a delegate that can be used to invoke the method. + + + + Creates a new delegate for the specified constructor. + + the constructor to create the delegate for + delegate that can be used to invoke the constructor. + + + + Creates a instance with the highest possible code access security. + + + If allowed by security policy, associates the method with the s declaring type. + Otherwise associates the dynamic method with . + + + + + Delegates a Method(object target, params object[] args) call to the actual underlying method. + + + + + Generates code to process return value if necessary. + + IL generator to use. + Type of the return value. + + + + Converts to an instance of if necessary to + e.g. avoid e.g. double/int cast exceptions. + + + + This method mimics the behavior of the compiler that + automatically performs casts like int to double in "Math.Sqrt(4)".
+ See about implicit, widening type conversions on MSDN - Type Conversion Tables +
+ + Note: is expected to be a value type! + +
+
+ + + Generates code that throws . + + IL generator to use. + Error message to use. + + + + Indicates that an annotated class is a "component". + Such classes are considered as candidates for future features such + as auto-detection when using attribute-based configuration and assembly scanning. + + Other class-level annotations may be considered as identifying + a component as well, typically a special kind of component: + e.g. the Repository attribute. + + Mark Fisher + Mark Pollack (.NET) + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The name of the component. + + + + Gets or sets the name of the component + + The name of the component. + + + + Indicates that an annotated class is a "Repository" (or "DAO"). + + + A class with this attribute is eligible for Spring DataAccessException translation. A class + with the Repository attribute is also clarified as to its role in the overall application + architecture for the purpose of tools, aspects, etc. + + This attribute also serves as a specialization of the ComponentAttribute, allowing implementation + classes to be autodetected in future releases through assembly scanning. + + + Rod Johnson + Jueren Hoeller + Mark Pollack (.NET) + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The name of the repository. + + + + Indicates that an annotated class is a "Service" (e.g. a business service facade). + + + + This attribute also serves as a specialization of the ComponentAttribute, allowing implementation + classes to be autodetected in future releases through assembly scanning. + + + Juergen Hoeller + Mark Pollack (.NET) + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The name. + + + + Implements by using . + + Erich Eichinger + + + + Specifies the contract a strategy must be implement to store and + retrieve data that is specific to the executing thread. + + + All implementations of this interface must treat keys case-sensitive. + + Erich Eichinger + + + + Retrieves an object with the specified . + + The name of the item. + + The object in the current thread's context associated with the + specified or null if no object has been stored previously + + + + + Stores a given object and associates it with the specified . + + The name with which to associate the new item. + The object to store in the current thread's context. + + + + Empties a data slot with the specified name. + + + If the object with the specified is not found, the method does nothing. + + The name of the object to remove. + + + + Retrieves an object with the specified name. + + The name of the item. + The object in the call context associated with the specified name or null if no object has been stored previously + + + + Stores a given object and associates it with the specified name. + + The name with which to associate the new item. + The object to store in the call context. + + + + Empties a data slot with the specified name. + + The name of the data slot to empty. + + + + Acquire/Release protocol, base of many concurrency utilities. + + + +

objects isolate waiting and notification for particular logical + states, resource availability, events, and the like that are shared + across multiple threads.

+ +

Use of s sometimes (but by no means always) adds + flexibility and efficiency compared to the use of plain + .Net monitor methods and locking, and are sometimes (but by no means + always) simpler to program with.

+ +

Used for implementation of a

+
+ + Doug Lea + Federico Spinazzi (.Net) +
+ + Wait (possibly forever) until successful passage. + Fail only upon interuption. Interruptions always result in + `clean' failures. On failure, you can be sure that it has not + been acquired, and that no + corresponding release should be performed. Conversely, + a normal return guarantees that the acquire was successful. + + + + + Potentially enable others to pass. +

+ Because release does not raise exceptions, + it can be used in `finally' clauses without requiring extra + embedded try/catch blocks. But keep in mind that + as with any java method, implementations may + still throw unchecked exceptions such as Error or NullPointerException + when faced with uncontinuable errors. However, these should normally + only be caught by higher-level error handlers. +

+
+
+ + + Wait at most msecs to pass; report whether passed. +

+ The method has best-effort semantics: + The msecs bound cannot + be guaranteed to be a precise upper bound on wait time in Java. + Implementations generally can only attempt to return as soon as possible + after the specified bound. Also, timers in Java do not stop during garbage + collection, so timeouts can occur just because a GC intervened. + So, msecs arguments should be used in + a coarse-grained manner. Further, + implementations cannot always guarantee that this method + will return at all without blocking indefinitely when used in + unintended ways. For example, deadlocks may be encountered + when called in an unintended context. +

+
+ the number of milleseconds to wait + An argument less than or equal to zero means not to wait at all. + However, this may still require + access to a synchronization lock, which can impose unbounded + delay if there is a lot of contention among threads. + + true if acquired +
+ + A latch is a boolean condition that is set at most once, ever. + Once a single release is issued, all acquires will pass. +

+ Sample usage. Here are a set of classes that use + a latch as a start signal for a group of worker threads that + are created and started beforehand, and then later enabled. +

+ + class Worker implements IRunnable { + private readonly Latch startSignal; + Worker(Latch l) + { + startSignal = l; + } + + public void Run() { + startSignal.acquire(); + DoWork(); + } + + void DoWork() { ... } + } + + class Driver { // ... + void Main() { + Latch go = new Latch(); + for (int i = 0; i < N; ++i) // make threads + new Thread(new ThreadStart(new Worker(go)).Start(); + DoSomethingElse(); // don't let run yet + go.Release(); // let all threads proceed + } + } + +
+ Doug Lea + Federico Spinazzi (.Net) +
+ + + can acquire ? + + + + + Method mainly used by clients who are trying to get the latch + + + + Wait at most msecs millisconds for a permit + + + + Enable all current and future acquires to pass + + + + + An abstraction to safely store "ThreadStatic" data. + + + By default, is used to store thread-specific data. + You may switch the storage strategy by calling .

+ NOTE: Access to the underlying storage is not synchronized for performance reasons. + You should call only once at application startup! + + Erich Eichinger + + +

+ Holds the current strategy. + + + Access to this variable is not synchronized on purpose for performance reasons. + Setting a different strategy should happen only once + at application startup. + +
+ + + Set the new strategy. + + + + + Retrieves an object with the specified name. + + The name of the item. + The object in the context associated with the specified name or null if no object has been stored previously + + + + Stores a given object and associates it with the specified name. + + The name with which to associate the new item. + The object to store in the current thread's context. + + + + Empties a data slot with the specified name. + + The name of the data slot to empty. + + + +

Base class for counting semaphores based on Semaphore implementation + from Doug Lea.

+
+ + +

Conceptually, a semaphore + maintains a set of permits. Each acquire() blocks if + necessary until a permit is available, and then takes it.

+ +

Each release adds a permit. However, no actual permit objects are used; + the Semaphore just keeps a count of the number available + and acts accordingly.

+ +

A semaphore initialized to 1 can serve as a mutual exclusion lock.

+ + Used for implementation of a +
+ Doug Lea + Federico Spinazzi (.Net) +
+ + + current number of available permits + + + + +

Create a Semaphore with the given initial number of permits.

+

Using a seed of 1 makes the semaphore act as a mutual + exclusion lock.

+ +

Negative seeds are also allowed, + in which case no acquires will proceed until the number of + releases has pushed the number of permits past 0.

+
+
+ + + Release a permit + + + + + Acquire a permit + + + + + Wait at most msecs millisconds for a permit + + number of ms to wait + true if aquired + + + Release N permits. release(n) is + equivalent in effect to: +
+            for (int i = 0; i < n; ++i) release();
+            
+ But may be more efficient in some semaphore implementations. +
+ if n is negative. + + +
+ + Return the current number of available permits. + Returns an accurate, but possibly unstable value, + that may change immediately after returning. + + + + + Utility class to use an with the + C# using () {} idiom + + + + + Creates a new trying to the given + + + the to be held + + + + Creates a new trying to the given + + + the to be held + millisecond to try to acquire the lock + + + + Releases the held + + + + + initializes and acquire access to the + + + + + + Implements by using a hashtable. + + Erich Eichinger + + + + Retrieves an object with the specified name. + + The name of the item. + The object in the call context associated with the specified name or null if no object has been stored previously + + + + Stores a given object and associates it with the specified name. + + The name with which to associate the new item. + The object to store in the call context. + + + + Empties a data slot with the specified name. + + The name of the data slot to empty. + + + Thrown by synchronization classes that report + timeouts via exceptions. The exception is treated + as a form (subclass) of InterruptedException. This both + simplifies handling, and conceptually reflects the fact that + timed-out operations are artificially interrupted by timers. + + + + + The approximate time that the operation lasted before + this timeout exception was thrown. + + + + + + Creates a new instance of the + class. + + + + + Creates a new instance of the + class with the + specified message. + + + A message about the exception. + + + + + Creates a new instance of the + class with the + specified message. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the + class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Override of GetObjectData to allow for private serialization + + serialization info + streaming context + + + Constructs a TimeoutException with given duration value. + + + + + Constructs a TimeoutException with the + specified duration value and detail message. + + + + + Gets the approximate time that the operation lasted before + this timeout exception was thrown. + + + + A TimeoutSync is an adaptor class that transforms all + calls to acquire to instead invoke attempt with a predetermined + timeout value. + + + + + + the adapted sync + + + + + timeout value + + + + Create a TimeoutSync using the given Sync object, and + using the given timeout value for all calls to acquire. + + + + + Try to acquire the sync before the timeout + + In case a time out occurred + + + + + + + + + + + + + + Support to account for differences between java nad .NET: +
    +
+
+
+ + + .NET threads have not a method to check if they have been interrupted. + Moreover, differently from java threads, when entering locked + blocks, Monitor, Sleep, SpinWait and so on, a + will be raised by the runtime. +

Spring.Threading classes usually call this method before entering a lock block, to mirror java code +

Usually this is non issue because the same exception will be raised entering the monitor + associated with the lock () +

+
+ if the thread has been interrupted +
+ + + Normalize the given so that + is is comparable with . + + Date. + + + + + + + + + the difference between millisecodns of the first and second date + + + + Returns the number of nanoseconds for the current value of + + Current number of nanoseconds + + + + Returns the number of nano seconds represented by the + + to use + Number of nano seconds for + + + + Returns a representing the number of nanoseconds passed in via . + + Number of nanoseconds. + representing the number of nanoseconds passed in. + + + + Placeholder for java.lang.System.currentTimeMillis + + The current machine time in milliseconds + + + + Has been interrupted this thread + + + + + Miscellaneous generic collection utility methods. + + + Mainly for internal use within the framework. + + Mark Pollack (.NET) + + + + Determine whether a given collection only contains + a single unique object + + + + + + + Determines whether the contains the specified . + + The collection to check. + The object to locate in the collection. + if the element is in the collection, otherwise. + + + + Determines whether the collection contains all the elements in the specified collection. + + The collection to check. + Collection whose elements would be checked for containment. + true if the target collection contains all the elements of the specified collection. + + + + Removes all the elements from the target collection that are contained in the source collection. + + Collection where the elements will be removed. + Elements to remove from the target collection. + + + + Various utility methods relating to the manipulation of arrays. + + Aleksandar Seovic + + + + Checks if the given array or collection has elements and none of the elements is null. + + the collection to be checked. + true if the collection has a length and contains only non-null elements. + + + + Use this sort method instead of to overcome + bugs in Mono. + + + + + Checks if the given array or collection is null or has no elements. + + + + + + + Tests equality of two single-dimensional arrays by checking each element + for equality. + + The first array to be checked. + The second array to be checked. + True if arrays are the same, false otherwise. + + + + Returns hash code for an array that is generated based on the elements. + + + Hash code returned by this method is guaranteed to be the same for + arrays with equal elements. + + + Array to calculate hash code for. + + + A hash code for the specified array. + + + + + Returns string representation of an array. + + + Array to return as a string. + + + String representation of the specified . + + + + + Concatenates 2 arrays of compatible element types + + + If either of the arguments is null, the other array is returned as the result. + The array element types may differ as long as they are assignable. The result array will be of the "smaller" element type. + + + + + Assertion utility methods that simplify things such as argument checks. + + +

+ Not intended to be used directly by applications. +

+
+ Aleksandar Seovic + Erich Eichinger +
+ + + Checks, whether may be invoked on . + Supports testing transparent proxies. + + the target instance or null + the name of the target to be used in error messages + the method to test for + + if is null + + + if it is not possible to invoke on + + + + + checks, whether supports the methods of . + Supports testing transparent proxies. + + the target instance or null + the name of the target to be used in error messages + the type to test for + + if is null + + + if it is not possible to invoke methods of + type on + + + + + Checks the value of the supplied and throws an + if it is . + + The object to check. + The argument name. + + If the supplied is . + + + + + Checks the value of the supplied and throws an + if it is . + + The object to check. + The argument name. + + An arbitrary message that will be passed to any thrown + . + + + If the supplied is . + + + + + Checks the value of the supplied string and throws an + if it is or + contains only whitespace character(s). + + The string to check. + The argument name. + + If the supplied is or + contains only whitespace character(s). + + + + + Checks the value of the supplied string and throws an + if it is or + contains only whitespace character(s). + + The string to check. + The argument name. + + An arbitrary message that will be passed to any thrown + . + + + If the supplied is or + contains only whitespace character(s). + + + + + Checks the value of the supplied and throws + an if it is or contains no elements. + + The array or collection to check. + The argument name. + + If the supplied is or + contains no elements. + + + + + Checks the value of the supplied and throws + an if it is or contains no elements. + + The array or collection to check. + The argument name. + An arbitrary message that will be passed to any thrown . + + If the supplied is or + contains no elements. + + + + + Checks the value of the supplied and throws + an if it is , contains no elements or only null elements. + + The array or collection to check. + The argument name. + + If the supplied is , + contains no elements or only null elements. + + + + + Checks whether the specified can be cast + into the . + + + The argument to check. + + + The name of the argument to check. + + + The required type for the argument. + + + An arbitrary message that will be passed to any thrown + . + + + + + Assert a boolean expression, throwing ArgumentException + if the test result is false. + + a boolean expression. + The exception message to use if the assertion fails. + + if expression is false + + + + + Assert a boolean expression, throwing ArgumentException + if the test result is false. + + a boolean expression. + + if expression is false + + + + + Assert a bool expression, throwing InvalidOperationException + if the expression is false. + + a boolean expression. + The exception message to use if the assertion fails + if expression is false + + + + Creates a new instance of the class. + + +

+ This is a utility class, and as such exposes no public constructors. +

+
+
+ + + General utility methods for working with annotations + + + + + Find a single Attribute of the type 'attributeType' from the supplied class, + traversing it interfaces and super classes if no attribute can be found on the + class iteslf. + + + This method explicitly handles class-level attributes which are not declared as + inherited as well as attributes on interfaces. + + The class to look for attributes on . + Type of the attribibute to look for. + the attribute of the given type found, or null + + + + Miscellaneous collection utility methods. + + + Mainly for internal use within the framework. + + Mark Pollack (.NET) + + + + Checks if the given array or collection has elements and none of the elements is null. + + the collection to be checked. + true if the collection has a length and contains only non-null elements. + + + + Checks if the given array or collection is null or has no elements. + + + + + + + Determine whether a given collection only contains + a single unique object + + + + + + + Determines whether the contains the specified . + + The collection to check. + The object to locate in the collection. + if the element is in the collection, otherwise. + + + + Adds the specified to the specified . + + The collection to add the element to. + The object to add to the collection. + + + + Adds the specified to the specified . + + The enumerable to add the element to. + The object to add to the collection. + + + + Determines whether the collection contains all the elements in the specified collection. + + The collection to check. + Collection whose elements would be checked for containment. + true if the target collection contains all the elements of the specified collection. + + + + Removes all the elements from the target collection that are contained in the source collection. + + Collection where the elements will be removed. + Elements to remove from the target collection. + + + + Converts an instance to an instance. + + The instance to be converted. + An instance in which its elements are the elements of the instance. + if the is null. + + + + Copies the elements of the to a + new array of the specified element type. + + The instance to be converted. + The element of the destination array to create and copy elements to + An array of the specified element type containing copies of the elements of the . + + + + Returns the first element contained in both, and . + + The implementation assumes that <<< + the source enumerable. may be null + the list of candidates to match against elements. may be null + the first element found in both enumerables or null + + + + Finds a value of the given type in the given collection. + + The collection to search. + The type to look for. + a value of the given type found, or null if none. + If more than one value of the given type is found + + + + Finds a value of the given type in the given collection. + + The collection to search. + The type to look for. + a collection of matching values of the given type found, empty if none found, or null if the input collection was null. + + + + Find a value of one of the given types in the given Collection, + searching the Collection for a value of the first type, then + searching for a value of the second type, etc. + + The collection to search. + The types to look for, in prioritized order. + a value of the given types found, or null if none + If more than one value of the given type is found + + + + Determines whether the specified collection is null or empty. + + The collection to check. + + true if the specified collection is empty or null; otherwise, false. + + + + + Determines whether the specified collection is null or empty. + + The collection to check. + + true if the specified collection is empty or null; otherwise, false. + + + + + Determines whether the specified dictionary is null empty. + + The dictionary to check. + + true if the specified dictionary is empty or null; otherwise, false. + + + + + A simple stable sorting routine - far from being efficient, only for small collections. + + + + + + + + A simple stable sorting routine - far from being efficient, only for small collections. + + + Sorting is not(!) done in-place. Instead a sorted copy of the original input is returned. + + input collection of items to sort + the for comparing 2 items in . + a new collection of stable sorted items. + + + + A simple stable sorting routine - far from being efficient, only for small collections. + + + Sorting is not(!) done in-place. Instead a sorted copy of the original input is returned. + + input collection of items to sort + the for comparing 2 items in . + a new collection of stable sorted items. + + + + A simple stable sorting routine - far from being efficient, only for small collections. + + + Sorting is not(!) done in-place. Instead a sorted copy of the original input is returned. + + input collection of items to sort + the for comparing 2 items in . + a new collection of stable sorted items. + + + + A callback method used for comparing to items. + + + + the first object to compare + the second object to compare + Value Condition Less than zero x is less than y. Zero x equals y. Greater than zero x is greater than y. + + + + + + Utility class containing helper methods for object comparison. + + Aleksandar Seovic + + + Compares two objects. + First object. + Second object. + + 0, if objects are equal; + less than zero, if the first object is smaller than the second one; + greater than zero, if the first object is greater than the second one. + + + + Utility class for .NET configuration files management. + + Aleksandar Seovic + + + + Avoid BeforeFieldInit pitfall + + + + + Parses the configuration section. + + +

+ Primary purpose of this method is to allow us to parse and + load configuration sections using the same API regardless + of the .NET framework version. +

+

+ If Microsoft paid a bit more attention to preserving backwards + compatibility we would not even need it, but... :( +

+
+ Name of the configuration section. + Object created by a corresponding . +
+ + + Refresh the configuration section. + + +

+ Primary purpose of this method is to allow us to parse and + load configuration sections using the same API regardless + of the .NET framework version. +

+

+ If Microsoft paid a bit more attention to preserving backwards + compatibility we would not even need it, but... :( +

+
+ Name of the configuration section. +
+ + + Creates the configuration exception. + + The message to display to the client when the exception is thrown. + The inner exception. + Name of the configuration file. + The line where exception occured. + Configuration exception. + + + + Creates the configuration exception. + + The message to display to the client when the exception is thrown. + Name of the configuration file. + The line where exception occured. + Configuration exception. + + + + Creates the configuration exception. + + The message to display to the client when the exception is thrown. + The inner exception. + XML node where exception occured. + Configuration exception. + + + + Creates the configuration exception. + + The message to display to the client when the exception is thrown. + XML node where exception occured. + Configuration exception. + + + + Creates the configuration exception. + + The message to display to the client when the exception is thrown. + The inner exception. + Configuration exception. + + + + Creates the configuration exception. + + The message to display to the client when the exception is thrown. + Configuration exception. + + + + Creates the configuration exception. + + Configuration exception. + + + + Determines whether the specified exception is configuration exception. + + The exception to check. + + true if the specified exception is configuration exception; otherwise, false. + + + + + Returns the line number of the specified node. + + Node to get the line number for. + The line number of the specified node. + + + + Returns the name of the file specified node is defined in. + + Node to get the file name for. + The name of the file specified node is defined in. + + + + Sets the current to be used by . + + + íf implements , this method invokes + on the new configSystem to chain them.
+ Note, that this method requires reflection on internals of +
+ the configuration system to set + bypasses the check if the current system has already been initialized + the previous config system, if any +
+ + + Resets the global configuration system instance. Use for unit testing only! + + + + + An holding information about its original text source location. + + Erich Eichinger + + + + Holds text position information for e.g. error reporting purposes. + + + + + + + Gets a string specifying the file/resource name related to the configuration details. + + + + + Gets an integer specifying the line number related to the configuration details. + + + + + Gets an integer specifying the line position related to the configuration details. + + + + + Creates a new instance of , storing a copy of the passed + . + + + + + Creates a duplicate of this node. + + true to recursively clone the subtree under the specified node; false to clone only the node itself + + + + The name of the resource this element was read from + + + + + The line number within the resource this element was read from + + + + + The line position within the resource this element was read from. + + + + + An implementation, who's elements retain information + about their location in the original XML text document the were read from. + + + When loading a document, the used must implement . + Typical XmlReader implementations like support this interface. + + Erich Eichinger + + + + Overridden to create a retaining the current + text position information. + + + + + Overridden to create a retaining the current + text position information. + + + + + Load the document from the given . + Child nodes will store as their property. + + the name of the resource + The XML source + + + + Load the document from the given . + + The XML source + + + + Load the document from the given . + Child nodes will store as their property. + + the name of the resource + The XML source + + + + Load the document from the given . + Child nodes will store as their property. + + the name of the resource + The XML source + + + + Load the document from the given . + Child nodes will store as their property. + + the name of the resource + The XML source + + + + Load the document from the given . + Child nodes will store as their property. + + the name of the resource + The XML source + + + + Load the document from the given . + Child nodes will store null as their property. + + The XML source + + + + Creates an object based on the information in the . The reader must be positioned on a node or attribute. + Child nodes will store as their property. + + + The new XmlNode or null if no more nodes exist. + + the name of the resource + The XML source + The reader is positioned on a node type that does not translate to a valid DOM node (for example, EndElement or EndEntity). + + + + Creates an object based on the information in the . The reader must be positioned on a node or attribute. + Child nodes will store null as their property. + + + The new XmlNode or null if no more nodes exist. + + The XML source + The reader is positioned on a node type that does not translate to a valid DOM node (for example, EndElement or EndEntity). + + + + Get info about the current text position during loading a document. + Outside loading a document, the properties of + will always be null. + + + + + Holds the current text position during loading a document + + + + + An holding information about its original text source location. + + Erich Eichinger + + + + Creates a new instance of , storing a copy of the passed + . + + + + + Creates a duplicate of this node. + + true to recursively clone the subtree under the specified node; false to clone only the node itself + + + + The name of the resource this element was read from + + + + + The line number within the resource this element was read from + + + + + The line position within the resource this element was read from. + + + + + Discovers the attributes of a + and provides access to the + s metadata. + + Rick Evans + + + + The method name associated with a delegate invocation. + + + + + Creates a new instance of the + class. + + + The event used to extract the delegate + from. + + + if the supplied is + . + + + + + Creates a new instance of the + class. + + + The delegate . + + + If the supplied is not a subclass of the + class, or is . + + + + + Checks to see if the method encapsulated by the supplied method + metadata is compatible with the method signature associated with + this delegate type. + + The method to be checked. + + if the method signature is compatible with + the signature of this delegate; if not, or + if the supplied parameter is + . + + + + + Gets the s of the parameters of the + method signature associated with this delegate type. + + +

+ This method will never return ; the returned + array may be empty, but it most certainly + will not be . +

+
+ + A array of the parameter + s; or the + array if the method signature has no parameters. + +
+ + + Gets the return of the + method signature associated with this delegate type. + + The return . + + + + Gets the metadata about the method signature associated + with this delegate type. + + + The metadata about the method signature associated + with this delegate type. + + + + + Determines whether the supplied + is a type. + + + The to be checked. + + + if the supplied + is a ; + if not or the supplied + is . + + + + + Checks if the signature of the supplied + is compatible with the signature expected by the supplied + . + + The event to be checked against. + + The method signature to check for compatibility. + + + if the signature of the supplied + is compatible with the signature + expected by the supplied ; + if not or either of the supplied + parameters is . + + + + + + The of the delegate. + + + + + Use this class for obtaining instances for dynamic code generation. + + +

+ The purpose of this class is to provide a simple abstraction for creating and managing dynamic assemblies. +

+ + Using this factory you can't define several modules within a single dynamic assembly - only a simple one2one relation between assembly/module is used. + +
+ +

The following excerpt from demonstrates usage:

+ + public class DynamicProxyManager + { + public const string PROXY_ASSEMBLY_NAME = "Spring.Proxy"; + + public static TypeBuilder CreateTypeBuilder(string name, Type baseType) + { + // Generates type name + string typeName = String.Format("{0}.{1}_{2}", PROXY_ASSEMBLY_NAME, name, Guid.NewGuid().ToString("N")); + ModuleBuilder module = DynamicCodeManager.GetModuleBuilder(PROXY_ASSEMBLY_NAME); + return module.DefineType(typeName, PROXY_TYPE_ATTRIBUTES); + } + } + +
+ Erich Eichinger + + + +
+ + + prevent instantiation + + + + + Returns the for the dynamic module within the specified assembly. + + + If the assembly does not exist yet, it will be created.
+ This factory caches any dynamic assembly it creates - calling GetModule() twice with + the same name will *not* create 2 distinct modules! +
+ The assembly-name of the module to be returned + the that can be used to define new types within the specified assembly +
+ + + Persists the specified dynamic assembly to the file-system + + the name of the dynamic assembly to persist + + Can only be called in DEBUG_DYNAMIC mode, per ConditionalAttribute rules. + + + + + Removes all registered s. + + + + + A utility class for raising events in a generic and consistent fashion. + + Rick Evans + + + + Create a new EventRaiser instance + + + + + Raises the event encapsulated by the supplied + , passing the supplied + to the event. + + The event to be raised. + The arguments to the event. + a map of sink/exception entries that occurred during event raising + + + + Invokes the supplied , passing the supplied + to the sink. + + The sink to be invoked. + The arguments to the sink. + the map of sink/exception entries to add any exception to + + + + Raises events defensively. + + +

+ Raising events defensively means that as the raised event is passed to each handler, + any thrown by a handler will be caught and silently + ignored. +

+
+ Rick Evans +
+ + + Defensively invokes the supplied , passing the + supplied to the sink. + + The sink to be invoked. + The arguments to the sink. + the map of sink/exception entries to add any exception to + + + + Implement this interface to create your own, delegating + and set them using + + + + + + + + + + + A strategy for handling errors. This is especially useful for handling + errors that occur during asynchronous execution as in such cases it may not be + possible to throw the error to the original caller. + + Mark Fisher + Mark Pollack (.NET) + + + + Handles the error. + + The exception. + + + + Utility methods for IO handling + + + + + Copies one stream into another. + (Don't forget to call on the destination stream!) + + + Does not close the input stream! + + + + + Reads a stream into a byte array. + + + Does not close the input stream! + + + + + Various utility methods relating to numbers. + + +

+ Mainly for internal use within the framework. +

+
+ Aleksandar Seovic +
+ + + Determines whether the supplied is an integer. + + The object to check. + + if the supplied is an integer. + + + + + Determines whether the supplied is a decimal number. + + The object to check. + + if the supplied is a decimal number. + + + + + Determines whether the supplied is of numeric type. + + The object to check. + + true if the specified object is of numeric type; otherwise, false. + + + + + Determines whether the supplied can be converted to an integer. + + The object to check. + + if the supplied can be converted to an integer. + + + + + Determines whether the supplied can be converted to an integer. + + The object to check. + + if the supplied can be converted to an integer. + + + + + Determines whether the supplied can be converted to a number. + + The object to check. + + true if the specified object is decimal number; otherwise, false. + + + + + Is the supplied equal to zero (0)? + + The number to check. + + id the supplied is equal to zero (0). + + + + + Negates the supplied . + + The number to negate. + The supplied negated. + + If the supplied is not a supported numeric type. + + + + + Returns the bitwise not (~) of the supplied . + + The number. + The value of ~. + + If the supplied is not a supported numeric type. + + + + + Bitwise ANDs (&) the specified integral values. + + The first number. + The second number. + + If one of the supplied arguments is not a supported integral types. + + + + + Bitwise ORs (|) the specified integral values. + + The first number. + The second number. + + If one of the supplied arguments is not a supported integral types. + + + + + Bitwise XORs (^) the specified integral values. + + The first number. + The second number. + + If one of the supplied arguments is not a supported integral types. + + + + + Adds the specified numbers. + + The first number. + The second number. + + + + Subtracts the specified numbers. + + The first number. + The second number. + + + + Multiplies the specified numbers. + + The first number. + The second number. + + + + Divides the specified numbers. + + The first number. + The second number. + + + + Calculates remainder for the specified numbers. + + The first number (dividend). + The second number (divisor). + + + + Raises first number to the power of the second one. + + The first number. + The second number. + + + + Coerces the types so they can be compared. + + The right. + The left. + + + + Creates a new instance of the class. + + +

+ This is a utility class, and as such exposes no public constructors. +

+
+
+ + + Helper methods with regard to objects, types, properties, etc. + + +

+ Not intended to be used directly by applications. +

+
+ Rod Johnson + Juergen Hoeller + Rick Evans (.NET) +
+ + + The instance for this class. + + + + + An empty object array. + + + + + Creates a new instance of the class. + + +

+ This is a utility class, and as such exposes no public constructors. +

+
+
+ + + Instantiates the type using the assembly specified to load the type. + + This is a convenience in the case of needing to instantiate a type but not + wanting to specify in the string the version, culture and public key token. + The assembly. + Name of the type. + + + If the or is + + + If cannot load the type from the assembly or the call to InstantiateType(Type) fails. + + + + + Convenience method to instantiate a using + its no-arg constructor. + + +

+ As this method doesn't try to instantiate s + by name, it should avoid loading issues. +

+
+ + The to instantiate* + + A new instance of the . + + If the is + + + If the is an abstract class, an interface, + an open generic type or does not have a public no-argument constructor. + +
+ + + Gets the zero arg ConstructorInfo object, if the type offers such functionality. + + The type. + Zero argument ConstructorInfo + + If the type is an interface, abstract, open generic type, or does not have a zero-arg constructor. + + + + + Determines whether the specified type is instantiable, i.e. not an interface, abstract class or contains + open generic type parameters. + + The type. + + + + Convenience method to instantiate a using + the given constructor. + + +

+ As this method doesn't try to instantiate s + by name, it should avoid loading issues. +

+
+ + The constructor to use for the instantiation. + + + The arguments to be passed to the constructor. + + A new instance. + + If the is + + + If the 's declaring type is an abstract class, + an interface, an open generic type or does not have a public no-argument constructor. + +
+ + + Checks whether the supplied is not a transparent proxy and is + assignable to the supplied . + + +

+ Neccessary when dealing with server-activated remote objects, because the + object is of the type TransparentProxy and regular is testing for assignable + types does not work. +

+

+ Transparent proxy instances always return when tested + with the 'is' operator (C#). This method only checks if the object + is assignable to the type if it is not a transparent proxy. +

+
+ The target to be checked. + The value that should be assigned to the type. + + if the supplied is not a + transparent proxy and is assignable to the supplied . + +
+ + + Determine if the given is assignable from the + given value, assuming setting by reflection and taking care of transparent proxies. + + +

+ Considers primitive wrapper classes as assignable to the + corresponding primitive types. +

+

+ For example used in an object factory's constructor resolution. +

+
+ The target . + The value that should be assigned to the type. + True if the type is assignable from the value. +
+ + + Check if the given represents a + "simple" property, + i.e. a primitive, a , a + , or a corresponding array. + + +

+ Used to determine properties to check for a "simple" dependency-check. +

+
+ + The to check. + +
+ + + Check if the given class represents a primitive array, + i.e. boolean, byte, char, short, int, long, float, or double. + + + + + Determines whether the specified array is null or empty. + + The array to check. + + true if the specified array is null empty; otherwise, false. + + + + + Determine if the given objects are equal, returning + if both are respectively + if only one is . + + The first object to compare. + The second object to compare. + + if the given objects are equal. + + + + + Returns the first element in the supplied . + + + The to use to enumerate + elements. + + + The first element in the supplied . + + + If the supplied did not have any elements. + + + + + Returns the first element in the supplied . + + + The to use to enumerate + elements. + + + The first element in the supplied . + + + If the supplied did not have any elements. + + + If the supplied is . + + + + + Returns the element at the specified index using the supplied + . + + + The to use to enumerate + elements until the supplied is reached. + + + The index of the element in the enumeration to return. + + + The element at the specified index using the supplied + . + + + If the supplied was less than zero, or the + supplied did not contain enough elements + to be able to reach the supplied . + + + + + Returns the element at the specified index using the supplied + . + + + The to use to enumerate + elements until the supplied is reached. + + + The index of the element in the enumeration to return. + + + The element at the specified index using the supplied + . + + + If the supplied was less than zero, or the + supplied did not contain enough elements + to be able to reach the supplied . + + + If the supplied is . + + + + + Gets the qualified name of the given method, consisting of + fully qualified interface/class name + "." method name. + + The method. + qualified name of the method. + + + + Return a String representation of an object's overall identity. + + The object (may be null). + The object's identity as String representation, + or an empty String if the object was null + + + + + Gets a hex String form of an object's identity hash code. + + The obj. + The object's identity code in hex notation + + + + Support matching of file system paths in a manner similar to that of the + NAnt FileSet. + + +

+ Any (back)slashes are converted to forward slashes. +

+
+ + + // true + PathMatcher.Match("c:/*.bat", @"c:\autoexec.bat"); + PathMatcher.Match("c:\fo*\*.bat", @"c:/foobar/autoexec.bat"); + PathMatcher.Match("c:\fo?\*.bat", @"c:/foo/autoexec.bat"); + // false + PathMatcher.Match("c:\fo?\*.bat", @"c:/fo/autoexec.bat"); + + + Federico Spinazzi +
+ + + Determines if a given path matches a NAnt-like pattern. + + + A forward or back-slashed fileset-like pattern. + + A forward or back-slashed full path. + should the match consider the case + + if the path is matched by the pattern; + otherwise . + + + + + Determines if a given path matches a NAnt-like pattern. + + + A forward or back-slashed fileset-like pattern. + + A forward or back-slashed full path. + + if the path is matched by the pattern; + otherwise . + + + + + Replaces back(slashes) with forward slashes. + + + The path or the pattern to modify. + + A forward-slashed string. + + + + Helper method to convert a NAnt-like pattern into the + appropriate pattern for a regular expression. + + The NAnt-like pattern. + A regex-compatible pattern. + + + + Creates a new instance of the class. + + +

+ This is a utility class, and as such exposes no public constructors. +

+
+
+ + Utility methods for simple pattern matching, in particular for + Spring's typical "xxx*", "*xxx" and "*xxx*" pattern styles. + + Juergen Hoeller + Mark Pollack + + + Match a String against the given pattern, supporting the following simple + pattern styles: "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. + + the pattern to match against + + the String to match + + whether the String matches the given pattern + + + + Match a String against the given patterns, supporting the following simple + pattern styles: "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. + + the patterns to match against + + the String to match + + whether the String matches any of the given patterns + + + + + An implementation of the Java Properties class. + + + For the complete syntax see java.util.Properties JavaDoc. + This class supports an extended syntax. There may also be sole keys on a line, in that case values are treated as null. + + + key1 = value + key2: + key3 + + will result in the name/value pairs: + + key1:="value" + key2:=string.Empty + key3:=<null> + + note, that to specify a null value, the key must not be followed by any character except newline. + + + Simon White + + + + Creates an empty property list with no default values. + + + + + Creates a property list with the specified initial properties. + + The initial properties. + + + + Reads a property list (key and element pairs) from the input stream. + + The stream to load from. + + + + Reads a property list (key and element pairs) from a text reader. + + The text reader to load from. + + + + Reads a property list (key and element pairs) from the input stream. + + the dictionary to put it in + The stream to load from. + + + + Reads a property list (key and element pairs) from a text reader. + + the dictionary to put it in + The text reader to load from. + + + + Strips whitespace from the front of the specified string. + + The string. + The string with all leading whitespace removed. + + + + Splits the specified string into a key / value pair. + + The line to split. + An array containing the key / value pair. + + + + Searches for the property with the specified key in this property list. + + The key. + The property, or null if the key was not found. + + + + Searches for the property with the specified key in this property list. + + The key. + + The default value to be returned if the key is not found. + + The property, or the default value. + + + + Writes this property list out to the specified stream. + + The stream to write to. + + + + Sets the specified property key / value pair. + + The key. + The value. + + + + Writes the properties in this instance out to the supplied stream. + + The stream to write to. + Arbitrary header information. + + + + Removes the key / value pair identified by the supplied key. + + + The key identifying the key / value pair to be removed. + + + + + Adds the specified key / object pair to this collection. + + The key. + The value. + + + + Adds the specified key / object pair to this collection. + + + + + Various reflection related methods that are missing from the standard library. + + Rod Johnson + Juergen Hoeller + Aleksandar Seovic (.NET) + Stan Dvoychenko (.NET) + Bruno Baia (.NET) + + + + Convenience value that will + match all private and public, static and instance members on a class + in a case inSenSItivE fashion. + + + + + Avoid BeforeFieldInit problem + + + + + Checks, if the specified type is a nullable + + + + + Returns signature for the specified , method name and argument + s. + + The the method is in. + The method name. + + The argument s. + + The method signature. + + + + Returns method for the specified , method + name and argument + s. + + + Searches with BindingFlags + When dealing with interface methods, you probable want to 'normalize' method references by calling + . + + + + The target to find the method on. + + The method to find. + + The argument s. May be + if the method has no arguments. + + The target method. + + + + + Resolves a given to the representing the actual implementation. + + + see article How To Get an Explicit Interface Implementation Method. + + a + the type to lookup + the representing the actual implementation method of the specified + + + + Returns an array of parameter s for the specified method + or constructor. + + The method (or constructor). + An array containing the parameter s. + + If is . + + + + + Returns an array of parameter s for the + specified parameter info array. + + The parameter info array. + An array containing parameter s. + + If is or any of the + elements is . + + + + + Returns an array of s that represent + the names of the generic type parameter. + + The method. + An array containing the parameter names. + + If is . + + + + + Returns an array of s that represent + the names of the generic type parameter. + + The parameter info array. + An array containing parameter names. + + If is or any of the + elements is . + + + + + From a given list of methods, selects the method having an exact match on the given ' types. + + the list of methods to choose from + the arguments to the method + the method matching exactly the passed ' types + + If more than 1 matching methods are found in the list. + + + + + From a given list of methods, selects the method having an exact match on the given ' types. + + the type of method (used for exception reporting only) + the list of methods to choose from + the arguments to the method + the method matching exactly the passed ' types + + If more than 1 matching methods are found in the list. + + + + + From a given list of constructors, selects the constructor having an exact match on the given ' types. + + the list of constructors to choose from + the arguments to the method + the constructor matching exactly the passed ' types + + If more than 1 matching methods are found in the list. + + + + + Packages arguments into argument list containing parameter array as a last argument. + + Argument vaklues to package. + Total number of oarameters. + Type of the param array element. + Packaged arguments. + + + + Convenience method to convert an interface + to a array that contains + all the interfaces inherited and the specified interface. + + The interface to convert. + An array of interface s. + + If the specified is not an interface. + + + If is . + + + + + Is the supplied the default indexer for the + supplied ? + + + The name of the property on the supplied to be checked. + + + The to be checked. + + + if the supplied is the + default indexer for the supplied . + + + If the supplied is . + + + + + Is the supplied declared on one of these interfaces? + + The method to check. + The array of interfaces we want to check. + + if the method is declared on one of these interfaces. + + + If any of the s specified is not an interface. + + + If or any of the specified interfaces is + . + + + + + Returns the default value for the specified + + +

+ Follows the standard .NET conventions for default values where + relevant; for example, all numeric types default to the value + 0. +

+
+ + The to return default value for. + + + The default value for the specified . + + + If the supplied is an enumerated type that + has no values. + +
+ + + Returns an array consisting of the default values for the supplied + . + + + The array of s to return default values for. + + + An array consisting of the default values for the supplied + . + + + If any of the elements in the supplied + array is an enumerated type that has no values. + + + + + + Checks that the parameter s of the + supplied match the parameter + s of the supplied + . + + The method to be checked. + + The array of parameter s to check against. + + + if the parameter s + match. + + + + + Returns an array containing the s of the + objects in the supplied array. + + + The objects array for which the corresponding s + are needed. + + + An array containing the s of the objects + in the supplied array; this array will be empty (but not + if the supplied + is null or has no elements. + + +

+ [C#]
+ Given an array containing the following objects, + [83, "Foo", new object ()], the + array returned from this method call would consist of the following + elements... + [Int32, String, Object]. +

+
+
+ + + Does the given and/or it's superclasses + have at least one or more methods with the given name (with any + argument types)? + + +

+ Includes non-public methods in the methods searched. +

+
+ + The to be checked. + + + The name of the method to be searched for. Case inSenSItivE. + + + if the given or / and it's + superclasses have at least one or more methods (with any argument types); + if not, or either of the parameters is . + +
+ + + Within , counts the number of overloads for the method with the given (case-insensitive!) + + The type to be searched + the name of the method for which overloads shall be counted + The number of overloads for method within type + + + + Creates a . + + +

+ Note that if a non- + is supplied, any read write properties exposed by the + will be used to overwrite values that may have been passed in via the + . That is, the will be used + to initialize the custom attribute, and then any read-write properties on the + will be plugged in. +

+
+ + The desired . + + + Any constructor arguments for the attribute (may be + in the case of no arguments). + + + Source attribute to copy properties from (may be ). + + A custom attribute builder. + + If the parameter is . + + + If the parameter is not a + that derives from the class. + + +
+ + + Creates a . + + + The desired . + + + Source attribute to copy properties from (may be ). + + A custom attribute builder. + + + + Creates a . + + + The source attribute to copy properties from. + + A custom attribute builder. + + If the supplied is + . + + + + + Creates a . + + + The desired . + + A custom attribute builder. + + + + Creates a . + + + The desired . + + + Any constructor arguments for the attribute (may be + in the case of no arguments). + + A custom attribute builder. + + + + Creates a . + + + The to create + the custom attribute builder from. + + A custom attribute builder. + + + + Tries to find matching methods in the specified + for each method in the supplied list. + + + The to look for matching methods in. + + The methods to match. + + A flag that specifies whether to throw an exception if a matching + method is not found. + + A list of the matched methods. + + If either of the or + parameters are . + + + + + Returns the of the supplied + . + + +

+ If the is a + instance, the return value of this method call with be the + parameter cast to a + . If the is + anything other than a , the return value + will be the result of invoking the 's + method. +

+
+ + A or instance. + + + The argument if it is a + or the result of invoking + on the argument if it + is an . + + + If the is . + +
+ + + Unwraps the supplied + and returns the inner exception preserving the stack trace. + + + The to unwrap. + + The unwrapped exception. + + + + Is the supplied can be accessed outside the assembly ? + + The type to check. + + if the type can be accessed outside the assembly; + Otherwise . + + + + + Is the supplied can be accessed + from the supplied friendly assembly ? + + The type to check. + The friendly assembly name. + + if the type can be accessed + from the supplied friendly assembly; Otherwise . + + + + + Gets all of the interfaces implemented by + the specified . + + + The object to get the interfaces of. + + + All of the interfaces implemented by the + . + + + + + Returns the explicit that is the root cause of an exception. + + + If the InnerException property of the current exception is a null reference + or a , returns the current exception. + + The last exception thrown. + + The first explicit exception thrown in a chain of exceptions. + + + + + Copies all fields from one object to another. + + + The types of both objects must be related. This means, that either of the following is true: + + fromObject.GetType() == toObject.GetType() + fromObject.GetType() is derived from toObject.GetType() + toObject.GetType() is derived from fromObject.GetType() + + + The source object + The object, who's fields will be populated with values from the source object + If the object's types are not related + + + + Creates a . + + Bruno Baia + + + + Creates a new instance of the + class. + + The custom attribute type. + + + + Creates a new instance of the + class. + + The custom attribute type. + The custom attribute constructor arguments. + + + + Adds the specified values to the constructor argument list + used to create the custom attribute. + + An array of argument values. + + + + Adds a property value to the custom attribute. + + The property name. + The property value. + + + + Creates the . + + The created . + + + + Utility class to be used from within this assembly for executing security critical code + NEVER EVER MAKE THIS PUBLIC! + + Erich Eichinger + + + + Miscellaneous utility methods. + + +

+ Mainly for internal use within the framework. +

+
+ Rod Johnson + Juergen Hoeller + Keith Donald + Aleksandar Seovic (.NET) + Mark Pollack (.NET) + Rick Evans (.NET) + Erich Eichinger (.NET) +
+ + + The string that signals the start of an Ant-style expression. + + + + + The string that signals the end of an Ant-style expression. + + + + + An empty array of instances. + + + + + Creates a new instance of the class. + + +

+ This is a utility class, and as such exposes no public constructors. +

+
+
+ + + Tokenize the given into a + array. + + +

+ If is , returns an empty + array. +

+

+ If is or the empty + , returns a array with one + element: itself. +

+
+ The to tokenize. + + The delimiter characters, assembled as a . + + + Trim the tokens via . + + + Omit empty tokens from the result array. + An array of the tokens. +
+ + + Tokenize the given into a + array. + + +

+ If is , returns an empty + array. +

+

+ If is or the empty + , returns a array with one + element: itself. +

+
+ The to tokenize. + + The delimiter characters, assembled as a . + + + Trim the tokens via . + + + Omit empty tokens from the result array. + + + Pairs of quote characters. within a pair of quotes are ignored + + An array of the tokens. +
+ + + Convert a CSV list into an array of s. + + + Values may also be quoted using doublequotes. + + A CSV list. + + An array of s, or the empty array + if is . + + + + + Take a which is a delimited list + and convert it to a array. + + +

+ If the supplied is a + or zero-length string, then a single element + array composed of the supplied + will be + eturned. If the supplied + is , then an empty, + zero-length array will be returned. +

+
+ + The to be parsed. + + + The delimeter (this will not be returned). Note that only the first + character of the supplied is used. + + + An array of the tokens in the list. + +
+ + + Convenience method to return an + as a delimited + (e.g. CSV) . + + + The to parse. + + + The delimiter to use (probably a ','). + + The delimited string representation. + + + + Convenience method to return an + as a CSV + . + + + The to display. + + The delimited string representation. + + + + Convenience method to return an array as a CSV + . + + + The array to parse. Elements may be of any type ( + will be called on each + element). + + + + + Convenience method to return a + array as a delimited (e.g. CSV) . + + + The array to parse. Elements may be of any type ( + will be called on each + element). + + + The delimiter to use (probably a ','). + + + + Checks if a string has length. + + The string to check, may be . + + + if the string has length and is not + . + + + + StringUtils.HasLength(null) = false + StringUtils.HasLength("") = false + StringUtils.HasLength(" ") = true + StringUtils.HasLength("Hello") = true + + + + + + Checks if a has text. + + +

+ More specifically, returns if the string is + not , it's is > + zero (0), and it has at least one non-whitespace character. +

+
+ + The string to check, may be . + + + if the is not + , + > zero (0), and does not consist + solely of whitespace. + + + + StringUtils.HasText(null) = false + StringUtils.HasText("") = false + StringUtils.HasText(" ") = false + StringUtils.HasText("12345") = true + StringUtils.HasText(" 12345 ") = true + + +
+ + + Checks if a is + or an empty string. + + +

+ More specifically, returns if the string is + , it's is equal + to zero (0), or it is composed entirely of whitespace + characters. +

+
+ + The string to check, may (obviously) be . + + + if the is + , has a length equal to zero (0), or + is composed entirely of whitespace characters. + + + + StringUtils.IsNullOrEmpty(null) = true + StringUtils.IsNullOrEmpty("") = true + StringUtils.IsNullOrEmpty(" ") = true + StringUtils.IsNullOrEmpty("12345") = false + StringUtils.IsNullOrEmpty(" 12345 ") = false + + +
+ + + Returns , if it contains non-whitespaces. null otherwise. + + + + + Strips first and last character off the string. + + The string to strip. + The stripped string. + + + + Returns a list of Ant-style expressions from the specified text. + + The text to inspect. + + A list of expressions that exist in the specified text. + + + If any of the expressions in the supplied + is empty (${}). + + + + + Replaces Ant-style expression placeholder with expression value. + + +

+ +

+
+ The string to set the value in. + The name of the expression to set. + The expression value. + + A new string with the expression value set; the + value if the supplied + is , has a length + equal to zero (0), or is composed entirely of whitespace + characters. + +
+ + + Surrounds (prepends and appends) the string value of the supplied + to the supplied . + + +

+ The return value of this method call is always guaranteed to be non + . If every value passed as a parameter to this method is + , the string will be returned. +

+
+ + The prefix and suffix that respectively will be prepended and + appended to the target . If this value + is not a value, it's attendant + value will be used. + + + The target that is to be surrounded. If this value is not a + value, it's attendant + value will be used. + + The surrounded string. +
+ + + Surrounds (prepends and appends) the string values of the supplied + and to the supplied + . + + +

+ The return value of this method call is always guaranteed to be non + . If every value passed as a parameter to this method is + , the string will be returned. +

+
+ + The value that will be prepended to the . If this value + is not a value, it's attendant + value will be used. + + + The target that is to be surrounded. If this value is not a + value, it's attendant + value will be used. + + + The value that will be appended to the . If this value + is not a value, it's attendant + value will be used. + + The surrounded string. +
+ + + Converts escaped characters (for example "\t") within a string + to their real character. + + The string to convert. + The converted string. + + + + Utility class containing miscellaneous system-level functionality. + + Aleksandar Seovic + + + + Registers assembly resolver that iterates over the + assemblies loaded into the current + in order to find an assembly that cannot be resolved. + + + This method has to be called if you need to serialize dynamically + generated types in transient assemblies, such as Spring AOP proxies, + because standard .NET serialization engine always tries to load + assembly from the disk. + + + + + Returns true if running on Mono + + Tests for the presence of the type Mono.Runtime + + + + Gets the thread id for the current thread. Use thread name is available, + otherwise use CurrentThread.GetHashCode() for .NET 1.0/1.1 and + CurrentThread.ManagedThreadId otherwise. + + The thread id. + + + + Holds text position information for e.g. error reporting purposes. + + + + + + + Creates a new TextPositionInfo instance. + + + + + Creates a new TextPositionInfo instance, copying values from another instance. + + + + + The filename related to this text position + + + + + The line number related to this text position + + + + + The line position related to this text position + + + + + UniqueKey allows for generating keys unique to a type or particular instance and a partial name, + that can e.g. be used as keys in . + + + // shows usage type-scoped keys + UniqueKey classAKey = UniqueKey.GetTypeScoped(typeof(ClassA), "myKey"); + UniqueKey classBKey = UniqueKey.GetTypeScoped(typeof(ClassB), "myKey"); + + HttpContext.Current.Items.Add( classAKey, "some value unqiue for class A having key 'myKey'"); + object value = HttpContext.Current.Items[ UniqueKey.GetTypeScoped(typeof(ClassA), "myKey") ]; + Assert.AreEqual( "some value unique for class A having key 'myKey'", value); + + HttpContext.Current.Items.Add( classBKey, "some value unqiue for class B having key 'myKey'"); + object value = HttpContext.Current.Items[ UniqueKey.GetTypeScoped(typeof(ClassB), "myKey") ]; + Assert.AreEqual( "some value unique for class B having key 'myKey'", value); + + + + + Initialize a new instance of from its string representation. + See and See for details. + + The string representation of the new instance. + + + + Compares this instance to another. + + + + + Compares this instance to another. + + + + + Returns the hash code for this key. + + + + + + Returns a string representation of this key. + + + + + Creates a new key instance unique to the given instance. + + The instance the key shall be unique to + The partial key to be made unique + + + If is of type + + + + Creates a new key instance unique to the given type. + + The type the key shall be unique to + The partial key to be made unique + + + + Returns a key unique for the given instance. + + The instance the key shall be unique to + The partial key to be made unique + A key formatted as typename[instance-id].partialkey + + + + Returns a key unique for the given type. + + The type the key shall be unique to + The partial key to be made unique + A key formatted as typename.partialkey + + + + XML utility methods. + + Aleksandar Seovic + + + + Gets an appropriate implementation + for the supplied . + + The XML that is going to be read. + XML schemas that should be used for validation. + Validation event handler. + + A validating implementation. + + + + + Gets an appropriate implementation + for the supplied . + + The XML that is going to be read. + to be used for resolving external references + XML schemas that should be used for validation. + Validation event handler. + + A validating implementation. + + + + + Gets an appropriate implementation + for the supplied . + + The XML that is going to be read. + + A non-validating implementation. + + + + + Implementation of that adds error message + to the validation errors container. + + Aleksandar Seovic + + + + Abstract base class that should be extended by all + validation actions. + + +

+ This class implements template Execute method + and defines OnValid and OnInvalid methods that + can be overriden + by specific validation actions. +

+
+ Aleksandar Seovic +
+ + + An action that should be executed after validator is evaluated. + + +

+ This interface allows us to define the actions that should be executed + after validation in a generic fashion. +

+

+ For example, addition of error messages to validation errors collection + is performed by one specific implementation of this interface, . +

+
+ Aleksandar Seovic +
+ + + Executes the action. + + Whether associated validator is valid or not. + Validation context. + Additional context parameters. + Validation errors container. + + + + Initializes a new instance of the class. + + + + + Executes the action. + + Whether associated validator is valid or not. + Validation context. + Additional context parameters. + Validation errors container. + + + + Called when associated validator is valid. + + Validation context. + Additional context parameters. + Validation errors container. + + + + Called when associated validator is not valid. + + Validation context. + Additional context parameters. + Validation errors container. + + + + Evaluates 'when' expression. + + Root context to use for expression evaluation. + Additional context parameters. + True if the condition is true, False otherwise. + + + + Gets or sets the expression that determines if this validator should be evaluated. + + The expression that determines if this validator should be evaluated. + + + + Initializes a new instance of the class. + + Error message resource identifier. + Names of the error providers this message should be added to. + + + + Called when associated validator is invalid. + + Validation context. + Additional context parameters. + Validation errors container. + + + + Resolves the error message. + + Validation context to resolve message parameters against. + Additional context parameters. + Resolved error message + + + + Resolves the message parameters. + + List of parameters to resolve. + Validation context to resolve parameters against. + Additional context parameters. + Resolved message parameters. + + + + Sets the expressions that should be resolved to error message parameters. + + The expressions that should be resolved to error message parameters. + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Expression that defines the exception to throw when the validator is not valid. + + + + Initializes a new instance of the class with an expression + that defines the exception to throw. + + + + + Called when associated validator is invalid. + + Validation context. + Additional context parameters. + Validation errors container. + + + + Gets or sets the exception to throw + + The throws. + + + + Implementation of that allows you + to define Spring.NET expressions that should be evaluated after + validation. + + Aleksandar Seovic + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + Expression to execute when validator is valid. + Expression to execute when validator is not valid. + + + + Initializes a new instance of the class. + + Expression to execute when validator is valid. + Expression to execute when validator is not valid. + + + + Called when associated validator is valid. + + Validation context. + Additional context parameters. + Validation errors container. + + + + Called when associated validator is invalid. + + Validation context. + Additional context parameters. + Validation errors container. + + + + Gets or sets the expression to execute when validator is valid. + + The expression to execute when validator is valid. + + + + Gets or sets the expression to execute when validator is not valid. + + The expression to execute when validator is not valid. + + + + Implementation of the custom configuration parser for validator definitions. + + Aleksandar Seovic + + + + Initializes a new instance of the class. + + + + + Parse the specified element and register any resulting + IObjectDefinitions with the IObjectDefinitionRegistry that is + embedded in the supplied ParserContext. + + The element to be parsed into one or more IObjectDefinitions + The object encapsulating the current state of the parsing + process. + + The primary IObjectDefinition (can be null as explained above) + + + Implementations should return the primary IObjectDefinition + that results from the parse phase if they wish to used nested + inside (for example) a <property> tag. + Implementations may return null if they will not + be used in a nested scenario. + + + + + + Parses the validator definition. + + Validator's identifier. + The element to parse. + The parser helper. + Validator object definition. + + + + Parses the attribute of the given from the XmlElement and, if available, adds a property of the given with + the parsed value. + + + + + Parses and potentially registers a validator. + + + Only validators that have id attribute specified are registered + as separate object definitions within application context. + + Validator XML element. + The parser helper. + Validator object definition. + + + + Gets the name of the object type for the specified element. + + The element. + The name of the object type. + + + + Creates an error message action based on the specified message element. + + The message element. + The parser helper. + The error message action definition. + + + + Creates a generic action based on the specified element. + + The action definition element. + The parser helper. + Generic validation action definition. + + + + Creates object definition for the validator reference. + + The action definition element. + The parser helper. + Generic validation action definition. + + + + Evaluates validator test using condition evaluator. + + Aleksandar Seovic + + + + Base class that defines common properties for all single validators. + + +

+ Custom single validators should always extend this class instead of + simply implementing interface, in + order to inherit common validator functionality. +

+
+ Aleksandar Seovic + Erich Eichinger +
+ + + Base class that defines common properties for all validators. + + +

+ Custom validators should always extend this class instead of + simply implementing interface, in + order to inherit common validator functionality. +

+
+ Aleksandar Seovic + Erich Eichinger +
+ + + An object that can validate application-specific objects. + + +

+ The primary motivation for this interface is to enable validation to be + decoupled from the (user) interface and placed in business objects. +

+

+ Application developers writing their own custom + implementations will + typically not implement this interface directly. In most cases, custom + validators woud be better served deriving from the + class, with the + custom validation ligic being implemented in an override of the + + + template method. +

+
+ Aleksandar Seovic + +
+ + + Validates the specified object. + + The object to validate. + + The instance to add any error + messages to in the case of validation failure. + + + if validation was successful. + + + + + Validates the specified object. + + The object to validate. + Additional context parameters. + + The instance to add any error + messages to in the case of validation failure. + + + if validation was successful. + + + + + Creates a new instance of the class. + + + + + Creates a new instance of the class. + + The expression that determines if this validator should be evaluated. + + + + Creates a new instance of the class. + + The expression that determines if this validator should be evaluated. + + + + Validates the specified object. + + The object to validate. + instance to add error messages to. + True if validation was successful, False otherwise. + + + + Validates the specified object. + + The object to validate. + Additional context parameters. + instance to add error messages to. + True if validation was successful, False otherwise. + + + + Evaluates when expression. + + Root context to use for expression evaluation. + Additional context parameters. + True if the condition is true, False otherwise. + + + + Processes the error messages. + + Whether validator is valid or not. + Validation context. + Additional context parameters. + Validation errors container. + + + + Gets or sets the expression that determines if this validator should be evaluated. + + The expression that determines if this validator should be evaluated. + + + + Gets or sets the validation actions. + + The actions that should be executed after validation. + + + + Creates a new instance of the validator without any + and criteria + + + + + Creates a new instance of the class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Creates a new instance of the class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Validates the specified object. + + The object to validate. + Additional context parameters. + instance to add error messages to. + True if validation was successful, False otherwise. + + + + Validates test object. + + Object to validate. + True if specified object is valid, False otherwise. + + + + Evaluates test expression. + + Root context to use for expression evaluation. + Additional context parameters. + Result of the test expression evaluation, or validation context if test is null. + + + + Gets or sets the test expression. + + The test expression. + + + + Creates a new instance of the class. + + + + + Creates a new instance of the class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Creates a new instance of the class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Evaluates the test using condition evaluator. + + +

+ Test can be any logical expression that is supported by the Spring.NET logical + expression evaluation engine, and can use any variables that can be resolved + by the variable resolver used by the validation engine. +

+
+ The object to validate. + + if the supplied is valid. + +
+ + + Perform credit card validations. + + + By default, all supported card types are allowed. You can specify + which credit card type validator should be used by setting + the value of property to a concrete + instance. + + + + + Creates a new instance of the UrlValidator class. + + + + + Creates a new instance of the UrlValidator class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + Credit Card type validator to use. + + + + Creates a new instance of the UrlValidator class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + Credit Card type validator to use. + + + + Validates the supplied . + + + In the case of the class, + the test should be a string variable that will be evaluated and the object + obtained as a result of this evaluation will be checked if it is + a valid credit card number. + + The object to validate. + + if the supplied is valid + credit card number. + + + + + Checks if the is a valid credit card number. + + + The card number to validate. + + + true if the card number is valid. + + + + + Validates card number with the specified validator. + + + Credit card number to validate. + + + true if credit card number is a valid number of credit card type specified. + + + + + Checks for a valid credit card number. + + + Credit Card Number. + + + true if the card number passes the LuhnCheck. + + + + + Credit card type validator to use. + + + Can be concrete implementations of + interface. The following are available implementations: + , , , + . + + + + + CreditCardType interface defines how validation is performed + for one type/brand of credit card. + + + + + Returns true if the card number matches this type of + credit card. + + + The card number, never null. + + + true if the number matches. + + + + + Visa credit card type validation support. + + + + + Indicates, wheter the given credit card number matches a visa number. + + + + + American Express credit card type validation support. + + + + + Indicates, wheter the given credit card number matches an amex number. + + + + + Discover credit card type validation support. + + + + + Indicates, wheter the given credit card number matches a discover number. + + + + + Mastercard credit card type validation support. + + + + + Indicates, wheter the given credit card number matches a mastercard number. + + + + + Perform email validations. + + +

+ This implementation is not guaranteed to catch all possible errors in an + email address. For example, an address like nobody@noplace.nowhere will + pass validator, even though there is no TLD "nowhere". + + Goran Milosavljevic + + +

+ Creates a new instance of the EmailValidator class. + +
+ + + Creates a new instance of the EmailValidator class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Creates a new instance of the EmailValidator class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Validates the supplied . + + + In the case of the class, + the test should be a string variable that will be evaluated and the object + obtained as a result of this evaluation will be checked if it is + a valid e-mail address. + + The object to validate. + + if the supplied is valid + e-mail address. + + + + + Regular expression used for validation of object passed to this . + + + + + Validates that the object is valid ISBN-10 or ISBN-13 value. + + Goran Milosavljevic + + + + Creates a new instance of the ISBNValidator class. + + + + + Creates a new instance of the ISBNValidator class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Creates a new instance of the ISBNValidator class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Validates the supplied . + + + In the case of the class, + the test should be a string variable that will be evaluated and the object + obtained as a result of this evaluation will be tested using the ISBN-10 or + ISBN-13 validation rules. + + The object to validate. + + if the supplied is valid ISBN. + + + + + Validates against ISBN-10 or ISBN-13 validation + rules. + + + ISBN string to validate. + + + true if is a valid ISBN-10 or ISBN-13 code. + + + + + ISBN-10 consists of 4 groups of numbers separated by either + dashes (-) or spaces. + + + The first group is 1-5 characters, second 1-7, third 1-6, + and fourth is 1 digit or an X. + + + + + ISBN-13 consists of 5 groups of numbers separated by either + dashes (-) or spaces. + + + The first group is 978 or 979, the second group is + 1-5 characters, third 1-7, fourth 1-6, and fifth is 1 digit. + + + + + Validates that object matches specified regular expression. + + +

+ The test expression must evaluate to a ; + otherwise, an exception is thrown. +

+
+ Aleksandar Seovic +
+ + + Creates a new instance of the class. + + + + + Creates a new instance of the class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + The regular expression to match against. + + + + Creates a new instance of the class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + The regular expression to match against. + + + + Validates an object. + + Object to validate. + + if the supplied + object is valid. + + + If the supplied is not a + + + + + + The regular expression text to match against. + + The regular expression text. + + + + The for the regular expression evaluation. + + The regular expression evaluation options. + + + + + Validates that required value is not empty. + + +

+ This validator uses following rules to determine if target value is valid: + + + + + + + + + + + + + + + + + + + + + + + + + +
Target Valid Value
A .Not or an empty string.
A .Not and not .
One of the number types.Not zero.
A .Not or whitespace.
Any reference type other than .Not .
+

+

+ You cannot use this validator to validate any value types other than the ones + specified in the table above. +

+
+ Aleksandar Seovic +
+ + + Creates a new instance of the class. + + + + + Creates a new instance of the class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Creates a new instance of the class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Validates the supplied . + + + In the case of the class, + the test should be a variable expression that will be evaluated and the object + obtained as a result of this evaluation will be tested using the rules described + in the class overview of the + class. + + The object to validate. + + if the supplied is valid. + + + + + Validates that the value is valid URL. + + Goran Milosavljevic + + + + Creates a new instance of the UrlValidator class. + + + + + Creates a new instance of the UrlValidator class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Creates a new instance of the UrlValidator class. + + The expression to validate. + The expression that determines if this validator should be evaluated. + + + + Validates the supplied . + + + In the case of the class, + the test should be a string variable that will be evaluated and the object + obtained as a result of this evaluation will be tested using the URL validation rules. + + The object to validate. + + if the supplied is valid. + + + + + Regular expression used for validation of object passed to this . + + + + + implementation that supports grouping of validators. + + +

+ This validator will be valid when one or more of the validators in the Validators + collection are valid. +

+

+ ValidationErrors property will return a union of all validation error messages + for the contained validators, but only if this validator is not valid (meaning, when none + of the contained validators are valid). +

+

Note, that defaults to true for this validator type!

+
+ Aleksandar Seovic + Erich Eichinger +
+ + + Base class for composite validators + + + + + Initializes a new instance + + + + + Initializes a new instance + + The expression that determines if this validator should be evaluated. + + + + Initializes a new instance + + The expression that determines if this validator should be evaluated. + + + + Validates the specified object. + + The object to validate. + Additional context parameters. + instance to add error messages to. + True if validation was successful, False otherwise. + + + + Actual implementation how to validate the specified object. + + The object to validate. + Additional context parameters. + instance to add error messages to. + True if validation was successful, False otherwise. + + + + Gets or sets the child validators. + + The validators. + + + + When set true, shortcircuits evaluation. + + + Setting this property true causes the evaluation process to prematurely abort + if the end result is known. Any remaining child validators will not be considered then. + Setting this value false causes implementations to evaluate all child validators, regardless + of the potentially already known result. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The expression that determines if this validator should be evaluated. + + + + Initializes a new instance of the class. + + The expression that determines if this validator should be evaluated. + + + + Validates the specified object. + + The object to validate. + Additional context parameters. + instance to add error messages to. + True if validation was successful, False otherwise. + + + + implementation that supports validating collections. + + +

+ This validator will be valid only when all of the validators in the Validators + collection are valid for all of the objects in the specified collection. +

+

+ You can specify if you want to validate all of the collection elements regardless of the errors by + setting the property to false. +

+

Note, that defaults to true for this validator type!

+

+ If you set the IncludeElementErrors property to true, + ValidationErrors collection will contain a union of all validation error messages + for the contained validators; + Otherwise it will contain only error messages that were set for this Validator. +

+
+ Damjan Tomic + Aleksandar Seovic +
+ + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The bool that determines if all elements of the collection should be evaluated. + regardless of the Errors + + The bool that determines whether Validate method should collect + all error messages returned by the item validators + + + + Initializes a new instance of the class. + + The expression that determines if this validator should be evaluated. + The bool that determines if this all elements of the collection should be evaluated. + regardless of the Errors + + The bool that determines whether Validate method should collect + all error messages returned by the item validators + + + + Initializes a new instance of the class. + + The expression that determines if this validator should be evaluated. + The bool that determines if this all elements of the collection should be evaluated. + regardless of the Errors + + The bool that determines whether Validate method should collect + all error messages returned by the item validators + + + + Validates the specified collection of objects. + If the IncludeElementErrors property was set to true, + collection will contain a union of all validation error messages + for the contained validators; + Otherwise it will contain only error messages that were set for this Validator. + + The collection to validate. + Additional context parameters. + instance to add error messages to. + True if validation was successful, False otherwise. + + + + Actual implementation how to validate the specified object. + + The object to validate. + Additional context parameters. + instance to add error messages to. + True if validation was successful, False otherwise. + + + + Gets or sets the value that indicates whether to validate all elements of the collection + regardless of the errors. + + This is just an alias for property + + + + Gets or sets the value that indicates whether to capture all the errors of the specific + elements of the collection + + + + + Gets or sets the expression that should be used to narrow validation context. + + The expression that should be used to narrow validation context. + + + + implementation that supports grouping of validators. + + +

+ This validator will be valid when one and only one of the validators in the Validators collection are valid +

+

+ ValidationErrors property will return a union of all validation error messages + for the contained validators, but only if this validator is not valid (meaning, when none + of the contained validators are valid). +

+

+ By default, this validator group uses == true semantics. +

+
+ Aleksandar Seovic + Erich Eichinger +
+ + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + The expression that determines if this validator should be evaluated. + + + + Initializes a new instance of the class. + + The expression that determines if this validator should be evaluated. + + + + Actual implementation how to validate the specified object. + + The object to validate. + Additional context parameters. + instance to add error messages to. + True if validation was successful, False otherwise. + + + + An interface that validation errors containers have to implement. + + Aleksandar Seovic + + + + Adds the supplied to this + instance's collection of errors. + + + The provider that should be used for message grouping; can't be + . + + The error message to add. + + If the supplied or is . + + + + + Merges another instance of into this one. + + +

+ If the supplied is , + then no errors will be added to this instance, and this method will + (silently) return. +

+
+ + The validation errors to merge; can be . + +
+ + + Gets the list of errors for the supplied error . + + +

+ If there are no errors for the supplied , + an empty will be returned. +

+
+ Error key that was used to group messages. + + A list of all s for the supplied lookup . + +
+ + + Gets the list of resolved error messages for the supplied lookup . + + +

+ If there are no errors for the supplied lookup , + an empty will be returned. +

+
+ Error key that was used to group messages. + to resolve messages against. + + A list of resolved error messages for the supplied lookup . + +
+ + + Does this instance contain any validation errors? + + +

+ If this returns , this means that it (obviously) + contains no validation errors. +

+
+ if this instance is empty. +
+ + + Gets the list of all error providers. + + + + + Allows developers to specify which validator should be used + to validate method argument. + + Damjan Tomic + Aleksandar Seovic + + + + Creates an attribute instance. + + + The name of the validator to use (must be defined within + Spring application context). + + + + + Gets the name of the validator to use. + + The name of the validator to use. + + + + A container for validation errors. + + +

+ This class groups validation errors by validator names and allows + access to both the complete errors collection and to the errors for a + certain validator. +

+
+ Aleksandar Seovic + Goran Milosavljevic +
+ + + Default constructor. + + + + + This property is reserved, apply the + + to the class instead. + + + An that describes the + XML representation of the object that is produced by + the + method and consumed by the + + method. + + + + + Generates an object from its XML representation. + + + The stream + from which the object is deserialized. + + + + + Converts an object into its XML representation. + + + The stream + to which the object is serialized. + + + + + Adds the supplied to this + instance's collection of errors. + + + The provider that should be used for message grouping; can't be + . + + The error message to add. + + If the supplied or is . + + + + + Merges another instance of into this one. + + +

+ If the supplied is , + then no errors will be added to this instance, and this method will + (silently) return. +

+
+ + The validation errors to merge; can be . + +
+ + + Gets the list of errors for the supplied lookup . + + +

+ If there are no errors for the supplied lookup , + an empty will be returned. +

+
+ Error key that was used to group messages. + + A list of all s for the supplied lookup . + +
+ + + Gets the list of resolved error messages for the supplied lookup . + + +

+ If there are no errors for the supplied lookup , + an empty will be returned. +

+
+ Error key that was used to group messages. + to resolve messages against. + + A list of resolved error messages for the supplied lookup . + +
+ + + Does this instance contain any validation errors? + + +

+ If this returns , this means that it (obviously) + contains no validation errors. +

+
+ if this instance is empty. +
+ + + Gets the list of all providers. + + + + + Thrown by the validation advice if the method parameters validation fails. + + Aleksandar Seovic + + + + Creates a new instance of the ValidationException class. + + + + + Creates a new instance of the ValidationException class with + specified validation errors. + + + Validation errors. + + + + + Creates a new instance of the ValidationException class with the + specified message. + + + A message about the exception. + + + + + Creates a new instance of the ValidationException class with the + specified message and validation errors. + + + A message about the exception. + + + Validation errors. + + + + + Creates a new instance of the ValidationException class with the + specified message and root cause. + + + A message about the exception. + + + The root exception that is being wrapped. + + + + + Creates a new instance of the ValidationException class with the + specified message, root cause and validation errors. + + + A message about the exception. + + + The root exception that is being wrapped. + + + Validation errors. + + + + + Creates a new instance of the ValidationException class. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Implements object serialization. + + + The + that holds the serialized object data about the exception being thrown. + + + The + that contains contextual information about the source or destination. + + + + + Gets validation errors. + + Validation errors. + + + + implementation that supports grouping of validators. + + +

+ This validator will be valid only when all of the validators in the Validators + collection are valid. +

+

+ ValidationErrors property will return a union of all validation error messages + for the contained validators. +

+
+ Aleksandar Seovic + Erich Eichinger +
+ + + Initializes a new instance + + + + + Initializes a new instance + + The expression that determines if this validator should be evaluated. + + + + Initializes a new instance + + The expression that determines if this validator should be evaluated. + + + + Actual implementation how to validate the specified object. + + The object to validate. + Additional context parameters. + instance to add error messages to. + True if validation was successful, False otherwise. + + + + Represents a reference to an externally defined validator object + + +

+ This class allows validation groups to reference validators that + are defined outside of the group itself. +

+

+ It also allows users to narrow the context for the referenced validator + by specifying value for the Context property. +

+
+ Aleksandar Seovic +
+ + + Initializes a new instance of the class. + + + + + Validates the specified object. + + The object to validate. + instance to add error messages to. + True if validation was successful, False otherwise. + + + + Validates the specified object. + + The object to validate. + Additional context parameters. + instance to add error messages to. + True if validation was successful, False otherwise. + + + + Gets or sets the name of the referenced validator. + + The name of the referenced validator. + + + + Gets or sets the expression that should be used to narrow validation context. + + The expression that should be used to narrow validation context. + + + + Callback that supplies the owning factory to an object instance. + + + Owning + (may not be ). The object can immediately + call methods on the factory. + + +

+ Invoked after population of normal object properties but before an init + callback like 's + + method or a custom init-method. +

+
+ + In case of initialization errors. + +
+ + diff --git a/lib/System.Web.Mvc.xml b/lib/System.Web.Mvc.xml index 179908e6f52..a98dde87ae3 100644 --- a/lib/System.Web.Mvc.xml +++ b/lib/System.Web.Mvc.xml @@ -1,8318 +1,8318 @@ - - - - System.Web.Mvc - - - - Represents an attribute that specifies which HTTP verbs an action method will respond to. - - - Initializes a new instance of the class by using a list of HTTP verbs that the action method will respond to. - The HTTP verbs that the action method will respond to. - The parameter is null or zero length. - - - Initializes a new instance of the class using the HTTP verbs that the action method will respond to. - The HTTP verbs that the action method will respond to. - - - Determines whether the specified method information is valid for the specified controller context. - true if the method information is valid; otherwise, false. - The controller context. - The method information. - The parameter is null. - - - Gets or sets the list of HTTP verbs that the action method will respond to. - The list of HTTP verbs that the action method will respond to. - - - Provides information about an action method, such as its name, controller, parameters, attributes, and filters. - - - Initializes a new instance of the class. - - - Gets the name of the action method. - The name of the action method. - - - Gets the controller descriptor. - The controller descriptor. - - - Executes the action method by using the specified parameters and controller context. - The result of executing the action method. - The controller context. - The parameters of the action method. - - - Returns an array of custom attributes that are defined for this member, excluding named attributes. - An array of custom attributes, or an empty array if no custom attributes exist. - true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. - The custom attribute type cannot be loaded. - There is more than one attribute of type defined for this member. - - - Returns an array of custom attributes that are defined for this member, identified by type. - An array of custom attributes, or an empty array if no custom attributes of the specified type exist. - The type of the custom attributes. - true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. - The custom attribute type cannot be loaded. - There is more than one attribute of type defined for this member. - The parameter is null. - - - Returns the filters that are associated with this action method. - The filters that are associated with this action method. - - - Returns the parameters of the action method. - The parameters of the action method. - - - Returns the action-method selectors. - The action-method selectors. - - - Determines whether one or more instances of the specified attribute type are defined for this member. - true if the is defined for this member; otherwise, false. - The type of the custom attribute. - true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. - The parameter is null. - - - Provides the context for the ActionExecuted method of the class. - - - Initializes a new instance of the class. - - - Initializes a new instance of the class. - The controller context. - The action method descriptor. - true if the action is canceled. - The exception object. - The parameter is null. - - - Gets or sets the action descriptor. - The action descriptor. - - - Gets or sets a value that indicates that this object is canceled. - true if the context canceled; otherwise, false. - - - Gets or sets the exception that occurred during the execution of the action method, if any. - The exception that occurred during the execution of the action method. - - - Gets or sets a value that indicates whether the exception is handled. - true if the exception is handled; otherwise, false. - - - Gets or sets the result returned by the action method. - The result returned by the action method. - - - Provides the context for the ActionExecuting method of the class. - - - Initializes a new instance of the class. - - - Initializes a new instance of the class by using the specified controller context, action descriptor, and action-method parameters. - The controller context. - The action descriptor. - The action-method parameters. - The or parameter is null. - - - Gets or sets the action descriptor. - The action descriptor. - - - Gets or sets the action-method parameters. - The action-method parameters. - - - Gets or sets the result that is returned by the action method. - The result that is returned by the action method. - - - Represents the base class for all action-filter attributes. - - - Initializes a new instance of the class. - - - Called by the MVC framework after the action method executes. - The filter context. - - - Called by the MVC framework before the action method executes. - The filter context. - - - Called by the MVC framework after the action result executes. - The filter context. - - - Called by the MVC framework before the action result executes. - The filter context. - - - Represents an attribute that is used to influence the selection of an action method. - - - Initializes a new instance of the class. - - - Determines whether the action method selection is valid for the specified controller context. - true if the action method selection is valid for the specified controller context; otherwise, false. - The controller context. - Information about the action method. - - - Represents an attribute that is used for the name of an action. - - - Initializes a new instance of the class. - Name of the action. - The parameter is null or empty. - - - Determines whether the action name is valid within the specified controller context. - true if the action name is valid within the specified controller context; otherwise, false. - The controller context. - The name of the action. - Information about the action method. - - - Gets or sets the name of the action. - The name of the action. - - - Represents an attribute that affects the selection of an action method. - - - Initializes a new instance of the class. - - - Determines whether the action name is valid in the specified controller context. - true if the action name is valid in the specified controller context; otherwise, false. - The controller context. - The name of the action. - Information about the action method. - - - Encapsulates the result of an action method and is used to perform a framework-level operation on behalf of the action method. - - - Initializes a new instance of the class. - - - Enables processing of the result of an action method by a custom type that inherits from the class. - The context in which the result is executed. The context information includes the controller, HTTP content, request context, and route data. - - - Represents a delegate that contains the logic for selecting an action method. - true if an action method was successfully selected; otherwise, false. - The current HTTP request context. - - - Represents support for rendering HTML in AJAX scenarios within a view. - - - Initializes a new instance of the class using the specified view context and view data container. - The view context. - The view data container. - One or both of the parameters is null. - - - Initializes a new instance of the class by using the specified view context, view data container, and route collection. - The view context. - The view data container. - The URL route collection. - One or more of the parameters is null. - - - Gets or sets the root path for the location to use for globalization script files. - The location of the folder where globalization script files are stored. The default location is "~/Scripts/Globalization". - - - Serializes the specified message and returns the resulting JSON-formatted string. - The serialized message as a JSON-formatted string. - The message to serialize. - - - Gets the collection of URL routes for the application. - The collection of routes for the application. - - - Gets the context information about the view. - The context of the view. - - - Gets the current view data dictionary. - The view data dictionary. - - - Gets the view data container. - The view data container. - - - Represents support for rendering HTML in AJAX scenarios within a strongly typed view. - The type of the model. - - - Initializes a new instance of the class by using the specified view context and view data container. - The view context. - The view data container. - - - Initializes a new instance of the class by using the specified view context, view data container, and URL route collection. - The view context. - The view data container. - The URL route collection. - - - Gets the strongly typed version of the view data dictionary. - The strongly typed data dictionary of the view. - - - Represents a class that extends the class by adding the ability to determine whether an HTTP request is an AJAX request. - - - Determines whether the specified HTTP request is an AJAX request. - true if the specified HTTP request is an AJAX request; otherwise, false. - The HTTP request. - The parameter is null (Nothing in Visual Basic). - - - Provides a way to register one or more areas in an ASP.NET MVC application. - - - Initializes a new instance of the class. - - - Gets the name of the area to be registered. - The name of the area to be registered. - - - Registers all areas in an ASP.NET MVC application. - - - Registers all areas in an ASP.NET MVC application by using the specified user-defined state information. - An object that contains user-defined information to pass to the area. - - - Registers an area in an ASP.NET MVC application using the specified area's context information. - Encapsulates the information that is required in order to register the area. - - - Encapsulates the information that is required in order to register an area within an ASP.NET MVC application. - - - Initializes a new instance of the class using the specified area name and routes collection. - The name of the area to register. - The collection of routes for the application. - - - Initializes a new instance of the class using the specified area name, routes collection, and user-defined data. - The name of the area to register. - The collection of routes for the application. - An object that contains user-defined information to pass to the area. - - - Gets the name of the area to register. - The name of the area to register. - - - Maps the specified URL route and associates it with the area that is specified by the property. - A reference to the mapped route. - The name of the route. - The URL pattern for the route. - The parameter is null. - - - Maps the specified URL route and associates it with the area that is specified by the property, using the specified route default values. - A reference to the mapped route. - The name of the route. - The URL pattern for the route. - An object that contains default route values. - The parameter is null. - - - Maps the specified URL route and associates it with the area that is specified by the property, using the specified route default values and constraint. - A reference to the mapped route. - The name of the route. - The URL pattern for the route. - An object that contains default route values. - A set of expressions that specify valid values for a URL parameter. - The parameter is null. - - - Maps the specified URL route and associates it with the area that is specified by the property, using the specified route default values, constraints, and namespaces. - A reference to the mapped route. - The name of the route. - The URL pattern for the route. - An object that contains default route values. - A set of expressions that specify valid values for a URL parameter. - An enumerable set of namespaces for the application. - The parameter is null. - - - Maps the specified URL route and associates it with the area that is specified by the property, using the specified route default values and namespaces. - A reference to the mapped route. - The name of the route. - The URL pattern for the route. - An object that contains default route values. - An enumerable set of namespaces for the application. - The parameter is null. - - - Maps the specified URL route and associates it with the area that is specified by the property, using the specified namespaces. - A reference to the mapped route. - The name of the route. - The URL pattern for the route. - An enumerable set of namespaces for the application. - The parameter is null. - - - Gets the namespaces for the application. - An enumerable set of namespaces for the application. - - - Gets a collection of defined routes for the application. - A collection of defined routes for the application. - - - Gets an object that contains user-defined information to pass to the area. - An object that contains user-defined information to pass to the area. - - - Provides an abstract class to implement a metadata provider. - - - Called from constructors in a derived class to initialize the class. - - - When overridden in a derived class, creates the model metadata for the property. - The model metadata for the property. - The set of attributes. - The type of the container. - The model accessor. - The type of the model. - The name of the property. - - - Gets a list of attributes. - A list of attributes. - The type of the container. - The property descriptor. - The attribute container. - - - Returns a list of properties for the model. - A list of properties for the model. - The model container. - The type of the container. - - - Returns the metadata for the specified property using the container type and property descriptor. - The metadata for the specified property. - The model accessor. - The type of the container. - The property descriptor. - - - Returns the metadata for the specified property using the container type and property name. - The metadata for the specified property. - The model accessor. - The type of the container. - The name of the property. - - - Returns the metadata for the specified property using the type of the model. - The metadata for the specified property. - The model accessor. - The type of the container. - - - Returns the type descriptor from the specified type. - The type descriptor. - The type. - - - Provides an abstract class for classes that implement a validation provider. - - - Called from constructors in derived classes to initialize the class. - - - Gets a type descriptor for the specified type. - A type descriptor for the specified type. - The type of the validation provider. - - - Gets the validators for the model using the metadata and controller context. - The validators for the model. - The metadata. - The controller context. - - - Gets the validators for the model using the metadata, the controller context, and a list of attributes. - The validators for the model. - The metadata. - The controller context. - The list of attributes. - - - Provides the base class for asynchronous controllers. - - - Initializes a new instance of the class. - - - Gets the asynchronous manager instance. - The asynchronous manager instance. - - - Called by ASP.NET to initialize asynchronous request processing. - The status of the asynchronous operation. - The request context. - The asynchronous callback method. - The state object. - - - Called by ASP.NET during initialization of asynchronous request processing. - The status of the asynchronous operation. - The asynchronous callback method. - The state object. - - - Creates an action invoker. - An action invoker. - - - Cancels the execution of an asynchronous action method. - The status of the asynchronous result. - - - Called by ASP.NET when the current asynchronous action has completed. - The status of the asynchronous result. - - - Called by ASP.NET to begin the execution of an asynchronous action method. - The status of the asynchronous operation. - The request context. - The asynchronous callback method. - An object that contains information to be used by the callback method. This parameter can be null. - - - Cancels the execution of an asynchronous action method by ASP.NET at the end of the execution of an asynchronous action method. - The status of the asynchronous result. - - - Represents an attribute that is used to set the timeout value, in milliseconds, for an asynchronous method. - - - Initializes a new instance of the class. - The timeout value, in milliseconds. - - - Gets the timeout duration, in milliseconds. - The timeout duration, in milliseconds. - - - Called by ASP.NET before the asynchronous action method executes. - The filter context. - - - Encapsulates the information that is required for using an attribute. - - - Initializes a new instance of the class. - - - Initializes a new instance of the class using the specified controller context. - The context within which the result is executed. The context information includes the controller, HTTP content, request context, and route data. - - - Initializes a new instance of the class using the specified controller context and action descriptor. - The context in which the result is executed. The context information includes the controller, HTTP content, request context, and route data. - An object that provides information about an action method, such as its name, controller, parameters, attributes, and filters. - - - Provides information about the action method that is marked by the attribute, such as its name, controller, parameters, attributes, and filters. - The action descriptor for the action method that is marked by the attribute. - - - Gets or sets the result that is returned by an action method. - The result that is returned by an action method. - - - Represents an attribute that is used to restrict access by callers to an action method. - - - Initializes a new instance of the class. - - - Determines whether access to the core framework is authorized. - true if access is authorized; otherwise, false. - The HTTP context, which encapsulates all HTTP-specific information about an individual HTTP request. - The parameter is null. - - - Processes HTTP requests that fail authorization. - Encapsulates the information for using . The object contains the controller, HTTP context, request context, action result, and route data. - - - Called when a process requests authorization. - The filter context, which encapsulates information for using . - The parameter is null. - - - Called when the caching module requests authorization. - A reference to the validation status. - The HTTP context, which encapsulates all HTTP-specific information about an individual HTTP request. - The parameter is null. - - - Gets or sets the user roles. - The user roles. - - - Gets the unique identifier for this attribute. - The unique identifier for this attribute. - - - Gets or sets the authorized users. - The authorized users. - - - Represents an attribute that is used to provide details about how model binding to a parameter should occur. - - - Initializes a new instance of the class. - - - Gets or sets a comma-delimited list of property names for which binding is not allowed. - The exclude list. - - - Gets or sets a comma-delimited list of property names for which binding is allowed. - The include list. - - - Determines whether the specified property is allowed. - true if the specified property is allowed; otherwise, false. - The name of the property. - - - Gets or sets the prefix to use when markup is rendered for binding to an action argument or to a model property. - The prefix to use. - - - Maps a browser request to a byte array. - - - Initializes a new instance of the class. - - - Binds the model by using the specified controller context and binding context. - The bound data object. - The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data. - The context within which the model is bound. The context includes information such as the model object, model name, model type, property filter, and value provider. - The parameter is null. - - - Represents an attribute that is used to indicate that an action method should be called only as a child action. - - - Initializes a new instance of the class. - - - Called when authorization is required. - An object that encapsulates the information that is required in order to authorize access to the child action. - - - Returns the client data-type model validators. - - - Initializes a new instance of the class. - - - Returns the client data-type model validators. - The client data-type model validators. - The metadata. - The context. - - - Represents a user-defined content type that is the result of an action method. - - - Initializes a new instance of the class. - - - Gets or sets the content. - The content. - - - Gets or sets the content encoding. - The content encoding. - - - Gets or sets the type of the content. - The type of the content. - - - Enables processing of the result of an action method by a custom type that inherits from the class. - The context within which the result is executed. - The parameter is null. - - - Provides methods that respond to HTTP requests that are made to an ASP.NET MVC Web site. - - - Initializes a new instance of the class. - - - Gets the action invoker for the controller. - The action invoker. - - - Gets or sets the binder. - The binder. - - - Creates a content result object by using a string. - The content result instance. - The content to write to the response. - - - Creates a content result object by using a string and the content type. - The content result instance. - The content to write to the response. - The content type (MIME type). - - - Creates a content result object by using a string, the content type, and content encoding. - The content result instance. - The content to write to the response. - The content type (MIME type). - The content encoding. - - - Creates an action invoker. - An action invoker. - - - Creates a temporary data provider. - A temporary data provider. - - - Releases all resources that are used by the current instance of the class. - - - Releases unmanaged resources and optionally releases managed resources. - true to release both managed and unmanaged resources; false to release only unmanaged resources. - - - Invokes the action in the current controller context. - - - Creates a object by using the file contents and file type. - The file-content result object. - The binary content to send to the response. - The content type (MIME type). - - - Creates a object by using the file contents, content type, and the destination file name. - The file-content result object. - The binary content to send to the response. - The content type (MIME type). - The file name to use in the file-download dialog box that is displayed in the browser. - - - Creates a object by using the object and content type. - The file-content result object. - The stream to send to the response. - The content type (MIME type). - - - Creates a object using the object, the content type, and the target file name. - The file-stream result object. - The stream to send to the response. - The content type (MIME type) - The file name to use in the file-download dialog box that is displayed in the browser. - - - Creates a object by using the file name and the content type. - The file-stream result object. - The path of the file to send to the response. - The content type (MIME type). - - - Creates a object by using the file name, the content type, and the file download name. - The file-stream result object. - The path of the file to send to the response. - The content type (MIME type). - The file name to use in the file-download dialog box that is displayed in the browser. - - - Called when a request matches this controller, but no method with the specified action name is found in the controller. - The name of the attempted action. - - - Gets HTTP-specific information about an individual HTTP request. - The HTTP context. - - - Initializes data that might not be available when the constructor is called. - The HTTP context and route data. - - - Creates a object. - The object that writes the script to the response. - The JavaScript code to run on the client - - - Creates a object that serializes the specified object to JavaScript Object Notation (JSON). - The JSON result object that serializes the specified object to JSON format. The result object that is prepared by this method is written to the response by the MVC framework when the object is executed. - The JavaScript object graph to serialize. - - - Creates a object that serializes the specified object to JavaScript Object Notation (JSON) format. - The JSON result object that serializes the specified object to JSON format. - The JavaScript object graph to serialize. - The content type (MIME type). - - - Creates a object that serializes the specified object to JavaScript Object Notation (JSON) format. - The JSON result object that serializes the specified object to JSON format. - The JavaScript object graph to serialize. - The content type (MIME type). - The content encoding. - - - Creates a object that serializes the specified object to JavaScript Object Notation (JSON) format using the content type, content encoding, and the JSON request behavior. - The result object that serializes the specified object to JSON format. - The JavaScript object graph to serialize. - The content type (MIME type). - The content encoding. - The JSON request behavior - - - Creates a object that serializes the specified object to JavaScript Object Notation (JSON) format using the specified content type and JSON request behavior. - The result object that serializes the specified object to JSON format. - The JavaScript object graph to serialize. - The content type (MIME type). - The JSON request behavior - - - Creates a object that serializes the specified object to JavaScript Object Notation (JSON) format using the specified JSON request behavior. - The result object that serializes the specified object to JSON format. - The JavaScript object graph to serialize. - The content type (MIME type). - - - Gets the model state dictionary object that contains the state of the model and of model-binding validation. - The model state dictionary. - - - Called after the action method is invoked. - Information about the current request and action. - - - Called before the action method is invoked. - Information about the current request and action. - - - Called when authorization occurs. - Information about the current request and action. - - - Called when an unhandled exception occurs in the action. - Information about the current request and action. - - - Called after the action result that is returned by an action method is executed. - Information about the current request and action result - - - Called before the action result that is returned by an action method is executed. - Information about the current request and action result - - - Creates a object that renders a partial view. - A partial-view result object. - - - Creates a object that renders a partial view, by using the specified model. - A partial-view result object. - The model that is rendered by the partial view - - - Creates a object that renders a partial view, by using the specified view name. - A partial-view result object. - The name of the view that is rendered to the response. - - - Creates a object that renders a partial view, by using the specified view name and model. - A partial-view result object. - The name of the view that is rendered to the response. - The model that is rendered by the partial view - - - Creates a object that redirects to the specified URL. - The redirect result object. - The URL to redirect to. - - - Redirects to the specified action using the action name. - The redirect result object. - The name of the action. - - - Redirects to the specified action using the action name and route values. - The redirect result object. - The name of the action. - The parameters for a route. - - - Redirects to the specified action using the action name and controller name. - The redirect result object. - The name of the action. - The name of the controller - - - Redirects to the specified action using the action name, controller name, and route values. - The redirect result object. - The name of the action. - The name of the controller - The parameters for a route. - - - Redirects to the specified action using the action name, controller name, and route dictionary. - The redirect result object. - The name of the action. - The name of the controller - The parameters for a route. - - - Redirects to the specified action using the action name and route dictionary. - The redirect result object. - The name of the action. - The parameters for a route. - - - Redirects to the specified route using the specified route values. - The redirect-to-route result object. - The parameters for a route. - - - Redirects to the specified route using the route name. - The redirect-to-route result object. - The name of the route - - - Redirects to the specified route using the route name and route values. - The redirect-to-route result object. - The name of the route - The parameters for a route. - - - Redirects to the specified route using the route name and route dictionary. - The redirect-to-route result object. - The name of the route - The parameters for a route. - - - Redirects to the specified route using the route dictionary. - The redirect-to-route result object. - The parameters for a route. - - - Gets the object for the current HTTP request. - The request object. - - - Gets the object for the current HTTP response. - The response object. - - - Gets the route data for the current request. - The route data. - - - Gets the object that provides methods that are used during Web request processing. - The HTTP server object. - - - Gets the object for the current HTTP request. - The HTTP session-state object for the current HTTP request. - - - This API supports the MVC infrastructure and is not intended to be used directly from your code. This method calls the method. - The filter context. - - - This API supports the MVC infrastructure and is not intended to be used directly from your code. This method calls the method. - The filter context. - - - This API supports the MVC infrastructure and is not intended to be used directly from your code. This method calls the method. - The filter context. - - - This API supports the MVC infrastructure and is not intended to be used directly from your code. This method calls the method. - The filter context. - - - This API supports the MVC infrastructure and is not intended to be used directly from your code. This method calls the method. - The filter context. - - - This API supports the MVC infrastructure and is not intended to be used directly from your code. This method calls the method. - The filter context. - - - Gets the temporary-data provider object that is used to store data for the next request. - The temporary-data provider. - - - Updates the specified model instance using values from the controller's current value provider. - true if the update is successful; otherwise, false. - The model instance to update. - The type of the model object. - The parameter or the property is null. - - - Updates the specified model instance using values from the controller's current value provider and a prefix. - true if the update is successful; otherwise, false. - The model instance to update. - The prefix to use when looking up values in the value provider. - The type of the model object. - The parameter or the property is null. - - - Updates the specified model instance using values from the controller's current value provider, a prefix, and included properties. - true if the update is successful; otherwise, false. - The model instance to update. - The prefix to use when looking up values in the value provider. - A list of properties of the model to update. - The type of the model object. - The parameter or the property is null. - - - Updates the specified model instance using values from the controller's current value provider, a prefix, a list of properties to exclude, and a list of properties to include. - true if the update is successful; otherwise, false. - The model instance to update. - The prefix to use when looking up values in the value provider - A list of properties of the model to update. - A list of properties to explicitly exclude from the update. These are excluded even if they are listed in the parameter list. - The type of the model object. - The parameter or the property is null. - - - Updates the specified model instance using values from the value provider, a prefix, a list of properties to exclude , and a list of properties to include. - true if the update is successful; otherwise, false. - The model instance to update. - The prefix to use when looking up values in the value provider. - A list of properties of the model to update. - A list of properties to explicitly exclude from the update. These are excluded even if they are listed in the parameter list. - A dictionary of values that is used to update the model. - The type of the model object. - - - Updates the specified model instance using values from the value provider, a prefix, and included properties. - true if the update is successful; otherwise, false. - The model instance to update. - The prefix to use when looking up values in the value provider. - A list of properties of the model to update. - A dictionary of values that is used to update the model. - The type of the model object. - - - Updates the specified model instance using values from the value provider and a prefix. - true if the update is successful; otherwise, false. - The model instance to update. - The prefix to use when looking up values in the value provider. - A dictionary of values that is used to update the model. - The type of the model object. - - - Updates the specified model instance using values from the controller's current value provider and included properties. - true if the update is successful; otherwise, false. - The model instance to update. - A list of properties of the model to update. - The type of the model object. - The parameter or the property is null. - - - Updates the specified model instance using values from the value provider and a list of properties to include. - true if the update is successful; otherwise, false. - The model instance to update. - A list of properties of the model to update. - A dictionary of values that is used to update the model. - The type of the model object. - - - Updates the specified model instance using values from the value provider. - true if the update is successful; otherwise, false. - The model instance to update. - A dictionary of values that is used to update the model. - The type of the model object. - - - Validates the specified model instance. - true if the model validation is successful; otherwise, false. - The model instance to validate. - - - Validates the specified model instance using an HTML prefix. - true if the model validation is successful; otherwise, false. - The model to validate. - The prefix to use when looking up values in the model provider. - - - Updates the specified model instance using values from the controller's current value provider. - The model instance to update. - The type of the model object. - The model was not successfully updated. - - - Updates the specified model instance using values from the controller's current value provider and a prefix. - The model instance to update. - A prefix to use when looking up values in the value provider. - The type of the model object. - - - Updates the specified model instance using values from the controller's current value provider, a prefix, and included properties. - The model instance to update. - A prefix to use when looking up values in the value provider. - A list of properties of the model to update. - The type of the model object. - - - Updates the specified model instance using values from the controller's current value provider, a prefix, a list of properties to exclude, and a list of properties to include. - The model instance to update. - A prefix to use when looking up values in the value provider. - A list of properties of the model to update. - A list of properties to explicitly exclude from the update. These are excluded even if they are listed in the list. - The type of the model object. - - - Updates the specified model instance using values from the value provider, a prefix, a list of properties to exclude, and a list of properties to include. - The model instance to update. - The prefix to use when looking up values in the value provider. - A list of properties of the model to update. - A list of properties to explicitly exclude from the update. These are excluded even if they are listed in the parameter list. - A dictionary of values that is used to update the model. - The type of the model object. - - - Updates the specified model instance using values from the value provider, a prefix, and a list of properties to include. - The model instance to update. - The prefix to use when looking up values in the value provider. - A list of properties of the model to update. - A dictionary of values that is used to update the model. - The type of the model object. - - - Updates the specified model instance using values from the value provider and a prefix. - The model instance to update. - The prefix to use when looking up values in the value provider. - A dictionary of values that is used to update the model. - The type of the model object. - - - Updates the specified model instance using values from the controller object's current value provider. - The model instance to update. - A list of properties of the model to update. - The type of the model object. - - - Updates the specified model instance using values from the value provider, a prefix, and a list of properties to include. - The model instance to update. - A list of properties of the model to update. - A dictionary of values that is used to update the model. - The type of the model object. - - - Updates the specified model instance using values from the value provider. - The model instance to update. - A dictionary of values that is used to update the model. - The type of the model object. - - - Gets the URL helper object that is used to generate URLs by using routing. - The URL helper object. - - - Gets the user security information for the current HTTP request. - The user security information for the current HTTP request. - - - Validates the specified model instance. - The model to validate. - - - Validates the specified model instance using an HTML prefix. - The model to validate. - The prefix to use when looking up values in the model provider. - - - Creates a object that renders a view to the response. - The view result that renders a view to the response. - - - Creates a object by using the model that renders a view to the response. - The view result. - The model that is rendered by the view. - - - Creates a object by using the view name that renders a view. - The view result. - The name of the view that is rendered to the response. - - - Creates a object by using the view name and model that renders a view to the response. - The view result. - The name of the view that is rendered to the response. - The model that is rendered by the view. - - - Creates a object using the view name and master-page name that renders a view to the response. - The view result. - The name of the view that is rendered to the response. - The name of the master page or template to use when the view is rendered. - - - Creates a object using the view name, master-page name, and model that renders a view. - The view result. - The name of the view that is rendered to the response. - The name of the master page or template to use when the view is rendered. - The model that is rendered by the view. - - - Creates a object that renders the specified object. - The view result. - The view that is rendered to the response. - - - Creates a object that renders the specified object. - The view result. - The view that is rendered to the response. - The model that is rendered by the view. - - - Represents a class that is responsible for invoking the action methods of a controller. - - - Initializes a new instance of the class. - - - Gets or sets the model binders that are associated with the action. - The model binders that are associated with the action. - - - Creates the action result. - The action result object. - The controller context. - The action descriptor. - The action return value. - - - Finds the information about the action method. - Information about the action method. - The controller context. - The controller descriptor. - The name of the action. - - - Retrieves information about the controller by using the specified controller context. - Information about the controller. - The controller context. - - - Retrieves information about the action filters. - Information about the action filters. - The controller context. - The action descriptor. - - - Gets the value of the specified action-method parameter. - The value of the action-method parameter. - The controller context. - The parameter descriptor. - - - Gets the values of the action-method parameters. - The values of the action-method parameters. - The controller context. - The action descriptor. - - - Invokes the specified action by using the specified controller context. - The result of executing the action. - The controller context. - The name of the action to invoke. - The parameter is null. - The parameter is null or empty. - The thread was aborted during invocation of the action. - An unspecified error occurred during invocation of the action. - - - Invokes the specified action method by using the specified parameters and the controller context. - The result of executing the action method. - The controller context. - The action descriptor. - The parameters. - - - Invokes the specified action method by using the specified parameters, controller context, and action filters. - The context for the ActionExecuted method of the class. - The controller context. - The action filters. - The action descriptor. - The parameters. - - - Invokes the specified action result by using the specified controller context. - The controller context. - The action result. - - - Invokes the specified action result by using the specified action filters and the controller context. - The context for the ResultExecuted method of the class. - The controller context. - The action filters. - The action result. - - - Invokes the specified authorization filters by using the specified action descriptor and controller context. - The context for the object. - The controller context. - The authorization filters. - The action descriptor. - - - Invokes the specified exception filters by using the specified exception and controller context. - The context for the object. - The controller context. - The exception filters. - The exception. - - - Represents the base class for all MVC controllers. - - - Initializes a new instance of the class. - - - Gets or sets the controller context. - The controller context. - - - Executes the specified request context. - The request context. - The parameter is null. - - - Executes the request. - - - Initializes the specified request context. - The request context. - - - Executes the specified request context. - The request context. - - - Gets or sets the dictionary for temporary data. - The dictionary for temporary data. - - - Gets or sets a value that indicates whether request validation is enabled for this request. - true if request validation is enabled for this request; otherwise, false. The default is true. - - - Gets or sets the value provider for the controller. - The value provider for the controller. - - - Gets or sets the dictionary for view data. - The dictionary for the view data. - - - Represents a class that is responsible for dynamically building a controller. - - - Initializes a new instance of the class. - - - Gets the current controller builder object. - The current controller builder. - - - Gets the default namespaces. - The default namespaces. - - - Gets the associated controller factory. - The controller factory. - - - Sets the controller factory by using the specified type. - The type of the controller factory. - The parameter is null. - The controller factory cannot be assigned from the type in the parameter. - An error occurred while the controller factory was being set. - - - Sets the specified controller factory. - The controller factory. - The parameter is null. - - - Encapsulates information about an HTTP request that matches specified and instances. - - - Initializes a new instance of the class. - - - Initializes a new instance of the class by using the specified HTTP context, URL route data, and controller. - The HTTP context. - The route data. - The controller. - - - Initializes a new instance of the class by using the specified controller context. - The controller context. - The parameter is null. - - - Initializes a new instance of the class by using the specified request context and controller. - The request context. - The controller. - One or both parameters are null. - - - Gets or sets the controller. - The controller. - - - Gets or sets the HTTP context. - The HTTP context. - - - Gets a value that indicates whether the associated action method is a child action. - true if the associated action method is a child action; otherwise, false. - - - Gets an object that contains the view context information for the parent action method. - An object that contains the view context information for the parent action method. - - - Gets or sets the request context. - The request context. - - - Gets or sets the URL route data. - The URL route data. - - - Encapsulates information that describes a controller, such as its name, type, and actions. - - - Initializes a new instance of the class. - - - Gets the name of the controller. - The name of the controller. - - - Gets the type of the controller. - The type of the controller. - - - Finds an action method by using the specified name and controller context. - The information about the action method. - The controller context. - The name of the action. - - - Retrieves a list of action-method descriptors in the controller. - A list of action-method descriptors in the controller. - - - Retrieves custom attributes that are defined for this member, excluding named attributes. - An array of custom attributes, or an empty array if no custom attributes exist. - true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. - The custom attribute type cannot be loaded. - There is more than one attribute of type defined for this member. - - - Retrieves custom attributes of a specified type that are defined for this member, excluding named attributes. - An array of custom attributes, or an empty array if no custom attributes exist. - The type of the custom attributes. - true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. - The custom attribute type cannot be loaded. - There is more than one attribute of type defined for this member. - The parameter is null (Nothing in Visual Basic). - - - Retrieves a value that indicates whether one or more instance of the specified custom attribute are defined for this member. - true if the is defined for this member; otherwise, false. - The type of the custom attribute. - true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. - The parameter is null (Nothing in Visual Basic). - - - Represents an attribute that invokes a custom model binder. - - - Initializes a new instance of the class. - - - Retrieves the associated model binder. - A reference to an object that implements the interface. - - - Provides a container for common metadata, for the class, and for the class for a data model. - - - Initializes a new instance of the class. - The data-annotations model metadata provider. - The type of the container. - The model accessor. - The type of the model. - The name of the property. - The display column attribute. - - - Returns simple text for the model data. - Simple text for the model data. - - - Implements the default model metadata provider for ASP.NET MVC. - - - Initializes a new instance of the class. - - - Gets the metadata for the specified property. - The metadata for the property. - The attributes. - The type of the container. - The model accessor. - The type of the model. - The name of the property. - - - Represents the method that creates a instance. - - - Provides a model validator. - - - Initializes a new instance of the class. - The metadata for the model. - The controller context for the model. - The validation attribute for the model. - - - Gets the validation attribute for the model validator. - The validation attribute for the model validator. - - - Gets the error message for the validation failure. - The error message for the validation failure. - - - Gets a value that indicates whether model validation is required. - true if model validation is required; otherwise, false. - - - Returns a list of validation error messages for the model. - A list of validation error messages for the model, or an empty list if no errors have occurred. - The container for the model. - - - Provides a model validator for a specified validation type. - - - - Initializes a new instance of the class. - The metadata for the model. - The controller context for the model. - The validation attribute for the model. - - - Gets the validation attribute from the model validator. - The validation attribute from the model validator. - - - Implements the default validation provider for MVC. - - - Initializes a new instance of the class. - - - Gets or sets a value that indicates whether non-nullable value types are required. - true if non-nullable value types are required; otherwise, false. - - - Gets a list of validators. - A list of validators. - The metadata. - The context. - The list of validation attributes. - - - Registers an adapter to provide client-side validation. - The type of the validation attribute. - The type of the adapter. - - - Registers an adapter factory for the validation provider. - The type of the attribute. - The factory that will be used to create the object for the specified attribute. - - - Registers the default adapter. - The type of the adapter. - - - Registers the default adapter factory. - The factory that will be used to create the object for the default adapter. - - - Provides a container for the error-information model validator. - - - Initializes a new instance of the class. - - - Gets a list of error-information model validators. - A list of error-information model validators. - The model metadata. - The controller context. - - - Represents the controller factory that is registered by default. - - - Initializes a new instance of the class. - - - Creates the specified controller by using the specified request context. - A reference to the controller. - The context of the HTTP request, which includes the HTTP context and route data. - The name of the controller. - The parameter is null. - The parameter is null or empty. - - - Retrieves the controller instance for the specified request context and controller type. - The controller instance. - The context of the HTTP request, which includes the HTTP context and route data. - The type of the controller. - - is null. - - cannot be assigned. - An instance of cannot be created. - - - Retrieves the controller type for the specified name and request context. - The controller type. - The context of the HTTP request, which includes the HTTP context and route data. - The name of the controller. - - - Releases the specified controller. - The controller to release. - - - Maps a browser request to a data object. This class provides a concrete implementation of a model binder. - - - Initializes a new instance of the class. - - - Gets or sets the model binders for the application. - The model binders for the application. - - - Binds the model by using the specified controller context and binding context. - The bound object. - The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data. - The context within which the model is bound. The context includes information such as the model object, model name, model type, property filter, and value provider. - The parameter is null. - - - Binds the specified property by using the specified controller context and binding context and the specified property descriptor. - The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data. - The context within which the model is bound. The context includes information such as the model object, model name, model type, property filter, and value provider. - Describes a property to be bound. The descriptor provides information such as the component type, property type, and property value. It also provides methods to get or set the property value. - - - Creates the specified model type by using the specified controller context and binding context. - A data object of the specified type. - The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data. - The context within which the model is bound. The context includes information such as the model object, model name, model type, property filter, and value provider. - The type of the model object to return. - - - Creates an index (a subindex) based on a category of components that make up a larger index, where the specified index value is an integer. - The name of the subindex. - The prefix for the subindex. - The index value. - - - Creates an index (a subindex) based on a category of components that make up a larger index, where the specified index value is a string. - The name of the subindex. - The prefix for the subindex. - The index value. - - - Creates the name of the subproperty by using the specified prefix and property name. - The name of the subproperty. - The prefix for the subproperty. - The name of the property. - - - Returns a set of properties that match the property filter restrictions that are established by the specified . - An enumerable set of property descriptors. - The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data. - The context within which the model is bound. The context includes information such as the model object, model name, model type, property filter, and value provider. - - - Returns the properties of the model by using the specified controller context and binding context. - A collection of property descriptors. - The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data. - The context within which the model is bound. The context includes information such as the model object, model name, model type, property filter, and value provider. - - - Returns the value of a property using the specified controller context, binding context, property descriptor, and property binder. - An object that represents the property value. - The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data. - The context within which the model is bound. The context includes information such as the model object, model name, model type, property filter, and value provider. - The descriptor for the property to access. The descriptor provides information such as the component type, property type, and property value. It also provides methods to get or set the property value. - An object that provides a way to bind the property. - - - Returns the descriptor object for a type that is specified by its controller context and binding context. - A custom type descriptor object. - The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data. - The context within which the model is bound. The context includes information such as the model object, model name, model type, property filter, and value provider. - - - Determines whether a data model is valid for the specified binding context. - true if the model is valid; otherwise, false. - The context within which the model is bound. The context includes information such as the model object, model name, model type, property filter, and value provider. - The parameter is null. - - - Called when the model is updated. - The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data. - The context within which the model is bound. The context includes information such as the model object, model name, model type, property filter, and value provider. - - - Called when the model is updating. - true if the model is updating; otherwise, false. - The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data. - The context within which the model is bound. The context includes information such as the model object, model name, model type, property filter, and value provider. - - - Called when the specified property is validated. - The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data. - The context within which the model is bound. The context includes information such as the model object, model name, model type, property filter, and value provider. - Describes a property to be validated. The descriptor provides information such as the component type, property type, and property value. It also provides methods to get or set the property value. - The value to set for the property. - - - Called when the specified property is validating. - true if the property is validating; otherwise, false. - The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data. - The context within which the model is bound. The context includes information such as the model object, model name, model type, property filter, and value provider. - Describes a property being validated. The descriptor provides information such as component type, property type, and property value. It also provides methods to get or set the property value. - The value to set for the property. - - - Gets or sets the name of the resource file (class key) that contains localized string values. - The name of the resource file (class key). - - - Sets the specified property by using the specified controller context, binding context, and property value. - The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data. - The context within which the model is bound. The context includes information such as the model object, model name, model type, property filter, and value provider. - Describes a property to be set. The descriptor provides information such as the component type, property type, and property value. It also provides methods to get or set the property value. - The value to set for the property. - - - Represents a memory cache for view locations. - - - Initializes a new instance of the class. - - - Initializes a new instance of the class by using the specified cache time span. - The cache time span. - The Ticks attribute of the parameter is set to a negative number. - - - Retrieves the default view location by using the specified HTTP context and cache key. - The default view location. - The HTTP context. - The cache key - The parameter is null. - - - Inserts the view in the specified virtual path by using the specified HTTP context, cache key, and virtual path. - The HTTP context. - The cache key. - The virtual path - The parameter is null. - - - Creates an empty view location cache. - - - Gets or sets the cache time span. - The cache time span. - - - Represents the base class for value providers whose values come from a collection that implements the interface. - The type of the value. - - - Initializes a new instance of the class. - The name/value pairs that are used to initialize the value provider. - Information about a specific culture, such as the names of the culture, the writing system, and the calendar used. - The parameter is null. - - - Determines whether the collection contains the specified prefix. - true if the collection contains the specified prefix; otherwise, false. - The prefix to search for. - The parameter is null. - - - Returns a value object using the specified key and controller context. - The value object for the specified key. - The key of the value object to retrieve. - The parameter is null. - - - Provides an empty metadata provider for data models that do not require metadata. - - - Initializes a new instance of the class. - - - Creates a new instance of the class. - An empty instance of the model metadata. - The attributes. - The type of the container. - The model accessor. - The type of the model. - The name of the model. - - - Provides an empty validation provider for models that do not require a validator. - - - Initializes a new instance of the class. - - - Gets the empty model validator. - The empty model validator. - The metadata. - The context. - - - Represents a result that does nothing, such as a controller action method that returns nothing. - - - Initializes a new instance of the class. - - - Executes the specified result context. - The result context. - - - Provides the context for using the class. - - - Initializes a new instance of the class. - - - Initializes a new instance of the class for the specified exception by using the specified controller context. - The controller context. - The exception. - The parameter is null. - - - Gets or sets the exception object. - The exception object. - - - Gets or sets a value that indicates whether the exception has been handled. - true if the exception has been handled; otherwise, false. - - - Gets or sets the action result. - The action result. - - - Provides a helper class to get the model name from an expression. - - - Gets the model name from a lambda expression. - The model name. - The expression. - - - Gets the model name from a string expression. - The model name. - The expression. - - - Provides a container for client-side field validation metadata. - - - Initializes a new instance of the class. - - - Gets or sets the name of the data field. - The name of the data field. - - - Gets or sets a value that indicates whether the validation message contents should be replaced with the client validation error. - true if the validation message contents should be replaced with the client validation error; otherwise, false. - - - Gets or sets the validator message ID. - The validator message ID. - - - Gets the client validation rules. - The client validation rules. - - - Sends the contents of a binary file to the response. - - - Initializes a new instance of the class by using the specified file contents and content type. - The byte array to send to the response. - The content type to use for the response. - The parameter is null (Nothing in Visual Basic). - - - The binary content to send to the response. - The file contents. - - - Writes the file content to the response. - The response. - - - Sends the contents of a file to the response. - - - Initializes a new instance of the class by using the specified file name and content type. - The name of the file to send to the response. - The content type of the response. - The parameter is null or empty. - - - Gets or sets the path of the file that is sent to the response. - The path of the file that is sent to the response. - - - Writes the file to the response. - The response. - - - Represents a base class that is used to send binary file content to the response. - - - Initializes a new instance of the class. - The type of the content. - The parameter is null or empty. - - - Gets the content type to use for the response. - The type of the content. - - - Enables processing of the result of an action method by a custom type that inherits from the class. - The context within which the result is executed. - The parameter is null. - - - Gets or sets the content-disposition header so that a file-download dialog box is displayed in the browser with the specified file name. - The name of the file. - - - Writes the file to the response. - The response. - - - Sends binary content to the response by using a instance. - - - Initializes a new instance of the class. - The stream to send to the response. - The content type to use for the response. - The parameter is null (Nothing in Visual Basic). - - - Gets the stream that will be sent to the response. - The file stream. - - - Writes the file to the response. - The response. - - - Represents the base class for action-filter attributes. - - - Initializes a new instance of the class. - - - Gets or sets the order in which the action filters are executed. - The order in which the action filters are executed. - - - Encapsulates information about the available action filters. - - - Initializes a new instance of the class. - - - Gets all the action filters in the application. - All action filters. - - - Gets all the authorization filters in the application. - The authorization filters. - - - Gets all the exception filters in the application. - The exception filters. - - - Gets all the result filters in the application. - The result filters. - - - Contains the form value providers for the application. - - - Initializes a new instance of the class. - - - Initializes a new instance of the class. - The collection. - The parameter is null. - - - Gets the specified value provider. - The value provider. - The name of the value provider to get. - The parameter is null or empty. - - - Gets a value that indicates whether the value provider contains an entry that has the specified prefix. - true if the value provider contains an entry that has the specified prefix; otherwise, false. - The prefix to look for. - - - Gets a value from a value provider using the specified key. - A value from a value provider. - The key. - - - Returns a dictionary that contains the value providers. - A dictionary of value providers. - - - Encapsulates information that is required in order to validate and process the input data from an HTML form. - - - Initializes a new instance of the class. - - - Gets the field validators for the form. - A dictionary of field validators for the form. - - - Gets or sets the form identifier. - The form identifier. - - - Retrieves a serialized object that contains the form identifier and field-validation values for the form. - A serialized object that contains the form identifier and field-validation values for the form. - - - Retrieves the validation value for the specified input field. - The value to validate the field input with. - The name of the field to retrieve the validation value for. - The parameter is either null or empty. - - - Retrieves the validation value for the specified input field and a value that indicates what to do if the validation value is not found. - The value to validate the field input with. - The name of the field to retrieve the validation value for. - true to create a validation value if one is not found; otherwise, false. - The parameter is either null or empty. - - - Determines whether client validation errors should be dynamically added to the validation summary. - true if client validation errors should be added to the validation summary; otherwise, false. - - - Gets or sets the identifier for the validation summary. - The identifier for the validation summary. - - - Enumerates the HTTP request types for a form. - - - Specifies a GET request. - - - Specifies a POST request. - - - Represents a value provider for form values that are contained in a object. - - - Initializes a new instance of the class. - An object that encapsulates information about the current HTTP request. - - - Represents a class that is responsible for creating a new instance of a form-value provider object. - - - Initializes a new instance of the class. - - - Returns a form-value provider object for the specified controller context. - A form-value provider object. - An object that encapsulates information about the current HTTP request. - The parameter is null. - - - Represents an attribute that is used to handle an exception that is thrown by an action method. - - - Initializes a new instance of the class. - - - Gets or sets the type of the exception. - The type of the exception. - - - Gets or sets the master view for displaying exception information. - The master view. - - - Called when an exception occurs. - The action-filter context. - The parameter is null. - - - Gets the unique identifier for this attribute. - The unique identifier for this attribute. - - - Gets or sets the page view for displaying exception information. - The page view. - - - Encapsulates information for handling an error that was thrown by an action method. - - - Initializes a new instance of the class. - The exception. - The name of the controller. - The name of the action. - The parameter is null. - The or parameter is null or empty. - - - Gets or sets the name of the action that was executing when the exception was thrown. - The name of the action. - - - Gets or sets the name of the controller that contains the action method that threw the exception. - The name of the controller. - - - Gets or sets the exception object. - The exception object. - - - Represents an attribute that is used to indicate whether a property or field value should be rendered as a hidden input element. - - - Initializes a new instance of the class. - - - Gets or sets a value that indicates whether to display the value of the hidden input element. - true if the value should be displayed; otherwise, false. - - - Represents support for rendering HTML controls in a view. - - - Initializes a new instance of the class by using the specified view context and view data container. - The view context. - The view data container. - The or the parameter is null. - - - Initializes a new instance of the class by using the specified view context, view data container, and route collection. - The view context. - The view data container. - The route collection. - One or more parameters is null. - - - Generates a hidden form field (anti-forgery token) that is validated when the form is submitted. - The generated form field (anti-forgery token). - - - Generates a hidden form field (anti-forgery token) that is validated when the form is submitted. The field value is generated using the specified salt value. - The generated form field (anti-forgery token). - The salt value, which can be any non-empty string. - - - Generates a hidden form field (anti-forgery token) that is validated when the form is submitted. The field value is generated using the specified salt value, domain, and path. - The generated form field (anti-forgery token). - The salt value, which can be any non-empty string. - The application domain. - The virtual path. - - - Converts the specified attribute object to an HTML-encoded string. - The HTML-encoded string. If the value parameter is null or empty, this method returns an empty string. - The object to encode. - - - Converts the specified attribute string to an HTML-encoded string. - The HTML-encoded string. If the value parameter is null or empty, this method returns an empty string. - The string to encode. - - - Enables input validation that is performed by using client script in the browser. - - - Converts the value of the specified object to an HTML-encoded string. - The HTML-encoded string. - The object to encode. - - - Converts the specified string to an HTML-encoded string. - The HTML-encoded string. - The string to encode. - - - Creates an HTML element ID using the specified element name. - The ID of the HTML element. - The name of the HTML element. - The parameter is null. - - - Creates an HTML element ID using the specified element name and a string that replaces dots in the name. - The ID of the HTML element. - The name of the HTML element. - The string that replaces dots (.) in the parameter. - The parameter or the parameter is null. - - - Generates an HTML anchor element (a element) that links to the specified action method, and enables the user to specify the communication protocol, name of the host, and a URL fragment. - An HTML element that links to the specified action method. - The context of the HTTP request. - The collection of URL routes. - The text caption to display for the link. - The name of the route that is used to return a virtual path. - The name of the action method. - The name of the controller. - The communication protocol, such as HTTP or HTTPS. If this parameter is null, the protocol defaults to HTTP. - The name of the host. - The fragment identifier. - An object that contains the parameters for a route. - An object that contains the HTML attributes for the element. - - - Generates an HTML anchor element (a element) that links to the specified action method. - An HTML element that links to the specified action method. - The context of the HTTP request. - The collection of URL routes. - The text caption to display for the link. - The name of the route that is used to return a virtual path. - The name of the action method. - The name of the controller. - An object that contains the parameters for a route. - An object that contains the HTML attributes for the element. - - - Generates an HTML anchor element (a element) that links to the specified URL route, and enables the user to specify the communication protocol, name of the host, and a URL fragment. - An HTML element that links to the specified URL route. - The context of the HTTP request. - The collection of URL routes. - The text caption to display for the link. - The name of the route that is used to return a virtual path. - The communication protocol, such as HTTP or HTTPS. If this parameter is null, the protocol defaults to HTTP. - The name of the host. - The fragment identifier. - An object that contains the parameters for a route. - An object that contains the HTML attributes for the element. - - - Generates an HTML anchor element (a element) that links to the specified URL route. - An HTML element that links to the specified URL route. - The context of the HTTP request. - The collection of URL routes. - The text caption to display for the link. - The name of the route that is used to return a virtual path. - An object that contains the parameters for a route. - An object that contains the HTML attributes for the element. - - - Returns the HTTP method that handles form input (GET or POST) as a string. - The form method string, either "get" or "post". - The HTTP method that handles the form. - - - Returns the HTML input control type as a string. - The input type string ("checkbox", "hidden", "password", "radio", or "text"). - The enumerated input type. - - - Returns a hidden input element that identifies the override method for the specified HTTP data-transfer method that was used by the client. - The override method that uses the HTTP data-transfer method that was used by the client. - The HTTP data-transfer method that was used by the client (DELETE, HEAD, or PUT). - The parameter is not "PUT", "DELETE", or "HEAD". - - - Returns a hidden input element that identifies the override method for the specified verb that represents the HTTP data-transfer method used by the client. - The override method that uses the verb that represents the HTTP data-transfer method used by the client. - The verb that represents the HTTP data-transfer method used by the client. - The parameter is not "PUT", "DELETE", or "HEAD". - - - Gets or sets the character that replaces periods in the ID attribute of an element. - The character that replaces periods in the ID attribute of an element. - - - Gets or sets the collection of routes for the application. - The collection of routes for the application. - - - The name of the CSS class that is used to style an input field when a validation error occurs. - - - The name of the CSS class that is used to style an input field when the input is valid. - - - The name of the CSS class that is used to style the error message when a validation error occurs. - - - The name of the CSS class that is used to style the validation message when the input is valid. - - - The name of the CSS class that is used to style validation summary error messages. - - - The name of the CSS class that is used to style the validation summary when the input is valid. - - - Gets or sets the context information about the view. - The context of the view. - - - Gets the current view data dictionary. - The view data dictionary. - - - Gets or sets the view data container. - The view data container. - - - Represents support for rendering HTML controls in a strongly typed view. - The type of the model. - - - Initializes a new instance of the class by using the specified view context and view data container. - The view context. - The view data container. - - - Initializes a new instance of the class by using the specified view context, view data container, and route collection. - The view context. - The view data container. - The route collection. - - - Gets the strongly typed view data dictionary. - The strongly typed view data dictionary. - - - Represents an HTTP anti-forgery exception. - - - Initializes a new instance of the class by using a system-supplied message that describes the error. - - - Initializes a new instance of the class by using a specified message that describes the error. - The message that describes the exception. The caller of this constructor must make sure that this string has been localized for the current system culture. - - - Initializes a new instance of the class by using a specified error message and a reference to the inner exception that is the cause of this exception. - The message that describes the exception. The caller of this constructor must make sure that this string has been localized for the current system culture. - The exception that is the cause of the current exception. If the parameter is not null, the current exception is raised in a catch block that handles the inner exception. - - - Represents an attribute that is used to restrict an action method so that the method handles only HTTP DELETE requests. - - - Initializes a new instance of the class. - - - Determines whether a request is a valid HTTP DELETE request. - true if the request is valid; otherwise, false. - The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data. - Encapsulates information about a method, such as its type, return type, and arguments. - - - Represents a value provider to use with values that come from a collection of HTTP files. - - - Initializes a new instance of the class. - An object that encapsulates information about the current HTTP request. - - - Represents a class that is responsible for creating a new instance of an HTTP file collection value provider object. - - - Initializes a new instance of the class. - - - Returns a value provider object for the specified controller context. - An HTTP file collection value provider. - An object that encapsulates information about the HTTP request. - The parameter is null. - - - Represents an attribute that is used to restrict an action method so that the method handles only HTTP GET requests. - - - Initializes a new instance of the class. - - - Determines whether a request is a valid HTTP GET request. - true if the request is valid; otherwise, false. - The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data. - Encapsulates information about a method, such as its type, return type, and arguments. - - - Represents an attribute that is used to restrict an action method so that the method handles only HTTP POST requests. - - - Initializes a new instance of the class. - - - Determines whether a request is a valid HTTP POST request. - true if the request is valid; otherwise, false. - The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data. - Encapsulates information about a method, such as its type, return type, and arguments. - - - Binds a model to a posted file. - - - Initializes a new instance of the class. - - - Binds the model. - The bound value. - The controller context. - The binding context. - One or both parameters are null. - - - Represents an attribute that is used to restrict an action method so that the method handles only HTTP PUT requests. - - - Initializes a new instance of the class. - - - Determines whether a request is a valid HTTP PUT request. - true if the request is valid; otherwise, false. - The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data. - Encapsulates information about a method, such as its type, return type, and arguments. - - - Extends the class that contains the HTTP values that were sent by a client during a Web request. - - - Retrieves the HTTP data-transfer method override that was used by the client. - The HTTP data-transfer method override that was used by the client. - An object that contains the HTTP values that were sent by a client during a Web request. - The parameter is null. - The HTTP data-transfer method override was not implemented. - - - Represents the result of an unauthorized HTTP request. - - - Initializes a new instance of the class. - - - Enables processing of the result of an action method by a custom type that inherits from the class. - The context within which the result is executed. - The parameter is null. - - - Enumerates the HTTP verbs. - - - Retrieves the information or entity that is identified by the URI of the request. - - - Posts a new entity as an addition to a URI. - - - Replaces an entity that is identified by a URI. - - - Requests that a specified URI be deleted. - - - Retrieves the message headers for the information or entity that is identified by the URI of the request. - - - Defines the methods that are used in an action filter. - - - Called after the action method executes. - The filter context. - - - Called before an action method executes. - The filter context. - - - Defines the contract for an action invoker, which is used to invoke an action in response to an HTTP request. - - - Invokes the specified action by using the specified controller context. - true if the action was found; otherwise, false. - The controller context. - The name of the action. - - - Defines the methods that are required for an authorization filter. - - - Called when authorization is required. - The filter context. - - - Defines the methods that are required for a controller. - - - Executes the specified request context. - The request context. - - - Defines the methods that are required for a controller factory. - - - Creates the specified controller by using the specified request context. - The controller. - The request context. - The name of the controller. - - - Releases the specified controller. - The controller. - - - Defines the methods that are required for an exception filter. - - - Called when an exception occurs. - The filter context. - - - Defines the methods that are required for a model binder. - - - Binds the model to a value by using the specified controller context and binding context. - The bound value. - The controller context. - The binding context. - - - Enumerates the types of input controls. - - - A check box. - - - A hidden field. - - - A password box. - - - A radio button. - - - A text box. - - - Defines the methods that are required for a result filter. - - - Called after an action result executes. - The filter context. - - - Called before an action result executes. - The filter context. - - - Associates a route with an area in an ASP.NET MVC application. - - - Gets the name of the area to associate the route with. - The name of the area to associate the route with. - - - Defines the contract for temporary-data providers that store data that is viewed on the next request. - - - Loads the temporary data. - The temporary data. - The controller context. - - - Saves the temporary data. - The controller context. - The values. - - - Defines the methods that are required for a value provider in ASP.NET MVC. - - - Determines whether the collection contains the specified prefix. - true if the collection contains the specified prefix; otherwise, false. - The prefix to search for. - - - Retrieves a value object using the specified key. - The value object for the specified key. - The key of the value object to retrieve. - - - Defines the methods that are required for a view. - - - Renders the specified view context by using the specified the writer object. - The view context. - The writer object. - - - Defines the methods that are required for a view data dictionary. - - - Gets or sets the view data dictionary. - The view data dictionary. - - - Defines the methods that are required for a view engine. - - - Finds the specified partial view by using the specified controller context. - The partial view. - The controller context. - The name of the partial view. - true to specify that the view engine returns the cached view, if a cached view exists; otherwise, false. - - - Finds the specified view by using the specified controller context. - The page view. - The controller context. - The name of the view. - The name of the master. - true to specify that the view engine returns the cached view, if a cached view exists; otherwise, false. - - - Releases the specified view by using the specified controller context. - The controller context. - The view. - - - Defines the methods that are required in order to cache view locations in memory. - - - Gets the view location by using the specified HTTP context and the cache key. - The view location. - The HTTP context. - The cache key. - - - Inserts the specified view location into the cache by using the specified HTTP context and the cache key. - The HTTP context. - The cache key. - The virtual path. - - - Sends JavaScript content to the response. - - - Initializes a new instance of the class. - - - Enables processing of the result of an action method by a custom type that inherits from the class. - The context within which the result is executed. - The parameter is null. - - - Gets or sets the script. - The script. - - - Specifies whether HTTP GET requests from the client are allowed. - - - HTTP GET requests from the client are allowed. - - - HTTP GET requests from the client are not allowed. - - - Represents a class that is used to send JSON-formatted content to the response. - - - Initializes a new instance of the class. - - - Gets or sets the content encoding. - The content encoding. - - - Gets or sets the type of the content. - The type of the content. - - - Gets or sets the data. - The data. - - - Enables processing of the result of an action method by a custom type that inherits from the class. - The context within which the result is executed. - The parameter is null. - - - Gets or sets a value that indicates whether HTTP GET requests from the client are allowed. - A value that indicates whether HTTP GET requests from the client are allowed. - - - Maps a browser request to a LINQ object. - - - Initializes a new instance of the class. - - - Binds the model by using the specified controller context and binding context. - The bound data object. If the model cannot be bound, this method returns null. - The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data. - The context within which the model is bound. The context includes information such as the model object, model name, model type, property filter, and value provider. - - - Represents an attribute that is used to associate a model type to a model-builder type. - - - Initializes a new instance of the class. - The type of the binder. - The parameter is null. - - - Gets or sets the type of the binder. - The type of the binder. - - - Retrieves an instance of the model binder. - A reference to an object that implements the interface. - An error occurred while an instance of the model binder was being created. - - - Represents a class that contains all model binders for the application, listed by binder type. - - - Initializes a new instance of the class. - - - Adds the specified item to the model binder dictionary. - The object to add to the instance. - The object is read-only. - - - Adds the specified item to the model binder dictionary using the specified key. - The key of the element to add. - The value of the element to add. - The object is read-only. - - is null. - An element that has the same key already exists in the object. - - - Removes all items from the model binder dictionary. - The object is read-only. - - - Determines whether the model binder dictionary contains a specified value. - true if is found in the model binder dictionary; otherwise, false. - The object to locate in the object. - - - Determines whether the model binder dictionary contains an element that has the specified key. - true if the model binder dictionary contains an element that has the specified key; otherwise, false. - The key to locate in the object. - - is null. - - - Copies the elements of the model binder dictionary to an array, starting at a specified index. - The one-dimensional array that is the destination of the elements copied from . The array must have zero-based indexing. - The zero-based index in at which copying starts. - - is null. - - is less than 0. - - is multidimensional.-or- is equal to or greater than the length of .-or- The number of elements in the source object is greater than the available space from to the end of the destination array. -or- Type cannot be cast automatically to the type of the destination array. - - - Gets the number of elements in the model binder dictionary. - The number of elements in the model binder dictionary. - - - Gets or sets the default model binder. - The default model binder. - - - Retrieves the model binder for the specified type. - The model binder. - The type of the model to retrieve. - The parameter is null. - - - Retrieves the model binder for the specified type or retrieves the default model binder. - The model binder. - The type of the model to retrieve. - true to retrieve the default model binder. - The parameter is null. - - - Returns an enumerator that can be used to iterate through the collection. - An enumerator that can be used to iterate through the collection. - - - Gets a value that indicates whether the model binder dictionary is read-only. - true if the model binder dictionary is read-only; otherwise, false. - - - Gets or sets the specified key in an object that implements the interface. - The key for the specified item. - The item key. - - - Gets a collection that contains the keys in the model binder dictionary. - A collection that contains the keys in the model binder dictionary. - - - Removes the first occurrence of the specified element from the model binder dictionary. - true if was successfully removed from the model binder dictionary; otherwise, false. This method also returns false if is not found in the model binder dictionary. - The object to remove from the object. - The object is read-only. - - - Removes the element that has the specified key from the model binder dictionary. - true if the element is successfully removed; otherwise, false. This method also returns false if was not found in the model binder dictionary. - The key of the element to remove. - The object is read-only. - - is null. - - - Returns an enumerator that can be used to iterate through a collection. - An enumerator that can be used to iterate through the collection. - - - Gets the value that is associated with the specified key. - true if the object that implements contains an element that has the specified key; otherwise, false. - The key of the value to get. - When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the parameter. This parameter is passed uninitialized. - - is null. - - - Gets a collection that contains the values in the model binder dictionary. - A collection that contains the values in the model binder dictionary. - - - Provides global access to the model binders for the application. - - - Gets the model binders for the application. - The model binders for the application. - - - Provides the context in which a model binder functions. - - - Initializes a new instance of the class. - - - Initializes a new instance of the class using the binding context. - The binding context. - - - Gets or sets a value that indicates whether the binder should use an empty prefix. - true if the binder should use an empty prefix; otherwise, false. - - - Gets or sets the model. - The model. - - - Gets or sets the model metadata. - The model metadata. - - - Gets or sets the name of the model. - The name of the model. - - - Gets or sets the state of the model. - The state of the model. - - - Gets or sets the type of the model. - The type of the model. - - - Gets or sets the property filter. - The property filter. - - - Gets the property metadata. - The property metadata. - - - Gets or sets the value provider. - The value provider. - - - Provides a container for a range-validation rule that is sent to the browser. - - - Initializes a new instance of the class. - The error message. - The minimum value. - The maximum value. - - - Provides a container for a regular-expression client validation rule that is sent to the browser. - - - Initializes a new instance of the class. - The error message to display when the regular expression validation fails. - The regular expression. - - - Provides a container for client validation for required field. - - - Initializes a new instance of the class. - The error message to display when a value for the required field is not provided. - - - Provides a base class container for a client validation rule that is sent to the browser. - - - Initializes a new instance of the class. - - - Gets or sets the error message for the client validation rule. - The error message for the client validation rule. - - - Gets the list of validation parameters. - A list of validation parameters. - - - Gets or sets the validation type. - The validation type. - - - Provides a container for a string-length validation rule that is sent to the browser. - - - Initializes a new instance of the class. - The validation error message. - The minimum length of the string. - The maximum length of the string. - - - Represents an error that occurs during model binding. - - - Initializes a new instance of the class by using the specified exception. - The exception. - The parameter is null. - - - Initializes a new instance of the class by using the specified exception and error message. - The exception. - The error message. - The parameter is null. - - - Initializes a new instance of the class by using the specified error message. - The error message. - - - Gets or sets the error message. - The error message. - - - Gets or sets the exception object. - The exception object. - - - A collection of instances. - - - Initializes a new instance of the class. - - - Adds the specified object to the model-error collection. - The exception. - - - Adds the specified error message to the model-error collection. - The error message. - - - Provides a container for common metadata, for the class, and for the class for a data model. - - - Initializes a new instance of the class. - The provider. - The type of the container. - The model accessor. - The type of the model. - The name of the property. - - - Gets a dictionary that contains additional metadata about the model. - A dictionary that contains additional metadata about the model. - - - Gets or sets the type of the container for the model. - The type of the container for the model. - - - Gets or sets a value that indicates whether empty strings that are posted back in forms should be converted to null. - true if empty strings that are posted back in forms should be converted to null; otherwise, false. The default value is true. - - - Gets or sets meta information about the data type. - Meta information about the data type. - - - Gets or sets the description of the model. - The description of the model. The default value is null. - - - Gets or sets the display format string for the model. - The display format string for the model. - - - Gets or sets the display name of the model. - The display name of the model. - - - Gets or sets the edit format string of the model. - The edit format string of the model. - - - Gets the metadata from the parameter for the model. - The metadata for the model. - An expression that identifies the model. - The view data dictionary. - The type of the parameter. - The type of the value. - - - Gets the metadata from the expression parameter for the model. - The metadata for the model. - An expression that identifies the model. - The view data dictionary. - - - Gets the display name for the model. - The display name for the model. - - - Returns the simple description of the model. - The simple description of the model. - - - Gets a list of validators for the model. - A list of validators for the model. - The controller context. - - - Gets or sets a value that indicates whether the model object should be rendered using associated HTML elements. - true if the associated HTML elements that contains the model object should be included with the object; otherwise, false. - - - Gets or sets a value that indicates whether the model is a complex type. - A value that indicates whether the model is considered a complex type by the MVC framework. - - - Gets a value that indicates whether the type is nullable. - true if the type is nullable; otherwise, false. - - - Gets or sets a value that indicates whether the model is read-only. - true if the model is read-only; otherwise, false. - - - Gets or sets a value that indicates whether the model is required. - true if the model is required; otherwise, false. - - - Gets the value of the model. - The value of the model. For more information about , see the entry ASP.NET MVC 2 Templates, Part 2: ModelMetadata on Brad Wilson's blog - - - Gets the type of the model. - The type of the model. - - - Gets or sets the string to display for null values. - The string to display for null values. - - - Gets a collection of model metadata objects that describe the properties of the model. - A collection of model metadata objects that describe the properties of the model. - - - Gets the property name. - The property name. - - - Gets or sets the provider. - The provider. - - - Gets or sets a short display name. - The short display name. - - - Gets or sets a value that indicates whether the property should be displayed in read-only views such as list and detail views. - true if the model should be displayed in read-only views; otherwise, false. - - - Gets or sets a value that indicates whether the model should be displayed in editable views. - true if the model should be displayed in editable views; otherwise, false. - - - Gets or sets the simple display string for the model. - The simple display string for the model. - - - Gets or sets a hint that suggests what template to use for this model. - A hint that suggests what template to use for this model. - - - Gets or sets a value that can be used as a watermark. - The watermark. - - - Provides an abstract base class for a custom metadata provider. - - - When overridden in a derived class, initializes a new instance of the object that derives from the class. - - - Gets a object for each property of a model. - A object for each property of a model. - The container. - The type of the container. - - - Gets metadata for the specified property. - The metadata model for the specified property. - The model accessor. - The type of the container. - The property to get the metadata model for. - - - Gets metadata for the specified model accessor and model type. - The metadata. - The model accessor. - They type of the model. - - - Provides a container for the current instance. - - - Gets or sets the current object. - The current object. - - - Encapsulates the state of model binding to a property of an action-method argument, or to the argument itself. - - - Initializes a new instance of the class. - - - Returns a object that contains any errors that occurred during model binding. - The errors. - - - Returns a object that encapsulates the value that was being bound during model binding. - The value. - - - Represents the state of an attempt to bind a posted form to an action method, which includes validation information. - - - Initializes a new instance of the class. - - - Initializes a new instance of the class by using values that are copied from the specified model-state dictionary. - The model-state dictionary. - The parameter is null. - - - Adds the specified item to the model-state dictionary. - The object to add to the model-state dictionary. - The model-state dictionary is read-only. - - - Adds an element that has the specified key and value to the model-state dictionary. - The key of the element to add. - The value of the element to add. - The model-state dictionary is read-only. - - is null. - An element that has the specified key already occurs in the model-state dictionary. - - - Adds the specified model error to the errors collection for the model-state dictionary that is associated with the specified key. - The key. - The exception. - - - Adds the specified error message to the errors collection for the model-state dictionary that is associated with the specified key. - The key. - The error message. - - - Removes all items from the model-state dictionary. - The model-state dictionary is read-only. - - - Determines whether the model-state dictionary contains a specific value. - true if is found in the model-state dictionary; otherwise, false. - The object to locate in the model-state dictionary. - - - Determines whether the model-state dictionary contains the specified key. - true if the model-state dictionary contains the specified key; otherwise, false. - The key to locate in the model-state dictionary. - - - Copies the elements of the model-state dictionary to an array, starting at a specified index. - The one-dimensional array that is the destination of the elements copied from the object. The array must have zero-based indexing. - The zero-based index in at which copying starts. - - is null. - - is less than 0. - - is multidimensional.-or- is equal to or greater than the length of .-or- The number of elements in the source collection is greater than the available space from to the end of the destination .-or- Type cannot be cast automatically to the type of the destination . - - - Gets the number of key/value pairs in the collection. - The number of key/value pairs in the collection. - - - Returns an enumerator that can be used to iterate through the collection. - An enumerator that can be used to iterate through the collection. - - - Gets a value that indicates whether the collection is read-only. - true if the collection is read-only; otherwise, false. - - - Gets a value that indicates whether this instance of the model-state dictionary is valid. - true if this instance is valid; otherwise, false. - - - Determines whether there are any objects that are associated with or prefixed with the specified key. - true if the model-state dictionary contains a value that is associated with the specified key; otherwise, false. - The key. - The parameter is null. - - - Gets or sets the value that is associated with the specified key. - The model state item. - The key. - - - Gets a collection that contains the keys in the dictionary. - A collection that contains the keys of the model-state dictionary. - - - Copies the values from the specified object into this dictionary, overwriting existing values if keys are the same. - The dictionary. - - - Removes the first occurrence of the specified object from the model-state dictionary. - true if was successfully removed the model-state dictionary; otherwise, false. This method also returns false if is not found in the model-state dictionary. - The object to remove from the model-state dictionary. - The model-state dictionary is read-only. - - - Removes the element that has the specified key from the model-state dictionary. - true if the element is successfully removed; otherwise, false. This method also returns false if was not found in the model-state dictionary. - The key of the element to remove. - The model-state dictionary is read-only. - - is null. - - - Sets the value for the specified key by using the specified value provider dictionary. - The key. - The value. - - - Returns an enumerator that can be used to iterate through the collection. - An enumerator that can be used to iterate through the collection. - - - Attempts to gets the value that is associated with the specified key. - true if the object that implements contains an element that has the specified key; otherwise, false. - The key of the value to get. - When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the parameter. This parameter is passed uninitialized. - - is null. - - - Gets a collection that contains the values in the dictionary. - A collection that contains the values of the model-state dictionary. - - - Provides a container for a validation result. - - - Initializes a new instance of the class. - - - Gets or sets the name of the member. - The name of the member. - - - Gets or sets the validation result message. - The validation result message. - - - Provides a base class for implementing validation logic. - - - Called from constructors in derived classes to initialize the class. - The metadata. - The controller context. - - - Gets the controller context. - The controller context. - - - When implemented in a derived class, returns metadata for client validation. - The metadata for client validation. - - - Returns a composite model validator for the model. - A composite model validator for the model. - The metadata. - The controller context. - - - Gets or sets a value that indicates whether a model property is required. - true if the model property is required; otherwise, false. - - - Gets the metadata for the model validator. - The metadata for the model validator. - - - When implemented in a derived class, validates the object. - A list of validation results. - The container. - - - Provides a list of validators for a model. - - - When implemented in a derived class, initializes a new instance of the class. - - - Gets a list of validators. - A list of validators. - The metadata. - The context. - - - Provides a container for a list of validation providers. - - - Initializes a new instance of the class. - - - Initializes a new instance of the class using a list of model-validation providers. - A list of model-validation providers. - - - Returns the list of model validators. - The list of model validators. - The model metadata. - The controller context. - - - Inserts a model-validator provider into the collection. - The zero-based index at which item should be inserted. - The model-validator provider object to insert. - - - Replaces the model-validator provider element at the specified index. - The zero-based index of the model-validator provider element to replace. - The new value for the model-validator provider element. - - - Provides a container for the current validation provider. - - - Gets the model validator provider collection. - The model validator provider collection. - - - Represents a list of items that users can select more than one item from. - - - Initializes a new instance of the class by using the specified items to include in the list. - The items. - The parameter is null. - - - Initializes a new instance of the class by using the specified items to include in the list and the selected values. - The items. - The selected values. - The parameter is null. - - - Initializes a new instance of the class by using the items to include in the list, the data value field, and the data text field. - The items. - The data value field. - The data text field. - The parameter is null. - - - Initializes a new instance of the class by using the items to include in the list, the data value field, the data text field, and the selected values. - The items. - The data value field. - The data text field. - The selected values. - The parameter is null. - - - Gets or sets the data text field. - The data text field. - - - Gets or sets the data value field. - The data value field. - - - Returns an enumerator that can be used to iterate through the collection. - An enumerator that can be used to iterate through the collection. - - - Gets or sets the items in the list. - The items in the list. - - - Gets or sets the selected values. - The selected values. - - - Returns an enumerator can be used to iterate through a collection. - An enumerator that can be used to iterate through the collection. - - - Selects the controller that will handle an HTTP request. - - - Initializes a new instance of the class. - The request context. - The parameter is null. - - - Adds the version header by using the specified HTTP context. - The HTTP context. - - - Called by ASP.NET to begin asynchronous request processing. - The status of the asynchronous call. - The HTTP context. - The asynchronous callback method. - The state of the asynchronous object. - - - Called by ASP.NET to begin asynchronous request processing using the base HTTP context. - The status of the asynchronous call. - The HTTP context. - The asynchronous callback method. - The state of the asynchronous object. - - - Gets or sets a value that indicates whether the MVC response header is disabled. - true if the MVC response header is disabled; otherwise, false. - - - Called by ASP.NET when asynchronous request processing has ended. - The asynchronous result. - - - Gets a value that indicates whether another request can use the instance. - true if the instance is reusable; otherwise, false. - - - Contains the header name of the ASP.NET MVC version. - - - Processes the request by using the specified HTTP request context. - The HTTP context. - - - Processes the request by using the specified base HTTP request context. - The HTTP context. - - - Gets the request context. - The request context. - - - Called by ASP.NET to begin asynchronous request processing using the base HTTP context. - The status of the asynchronous call. - The HTTP context. - The asynchronous callback method. - The data. - - - Called by ASP.NET when asynchronous request processing has ended. - The asynchronous result. - - - Gets a value that indicates whether another request can use the instance. - true if the instance is reusable; otherwise, false. - - - Enables processing of HTTP Web requests by a custom HTTP handler that implements the interface. - An object that provides references to the intrinsic server objects (for example, Request, Response, Session, and Server) that are used to service HTTP requests. - - - Represents an HTML-encoded string that should not be encoded again. - - - Initializes a new instance of the class. - The string to create. If no value is assigned, the object is created using an empty-string value. - - - Creates an HTML-encoded string using the specified text value. - An HTML-encoded string. - The value of the string to create . - - - Contains an empty HTML string. - - - Determines whether the specified string contains content or is either null or empty. - true if the string is null or empty; otherwise, false. - The string. - - - Returns an HTML-encoded string that represents the current object. - An HTML-encoded string that represents the current object. - - - Returns a string that represents the current object. - A string that represents the current object. - - - Verifies and processes an HTTP request. - - - Initializes a new instance of the class. - - - Called by ASP.NET to begin asynchronous request processing. - The status of the asynchronous call. - The HTTP context. - The asynchronous callback method. - The state. - - - Called by ASP.NET to begin asynchronous request processing. - The status of the asynchronous call. - The base HTTP context. - The asynchronous callback method. - The state. - - - Called by ASP.NET when asynchronous request processing has ended. - The asynchronous result. - - - Called by ASP.NET to begin asynchronous request processing. - The status of the asynchronous call. - The context. - The asynchronous callback method. - An object that contains data. - - - Called by ASP.NET when asynchronous request processing has ended. - The status of the asynchronous operations. - - - Verifies and processes an HTTP request. - The HTTP handler. - The HTTP context. - - - Creates an object that implements the IHttpHandler interface and gives it the request context. - - - Initializes a new instance of the class. - - - Retrieves the HTTP handler by using the specified HTTP context. - The HTTP handler. - The request context. - - - Retrieves the HTTP handler by using the specified request context. - The HTTP handler. - The request context. - - - Extends a NameValueCollection object so that the collection can be copied to a specified dictionary. - - - Copies the specified collection to the specified destination. - The collection. - The destination. - - - Copies the specified collection to the specified destination, and optionally replaces previous entries. - The collection. - The destination. - true to replace previous entries; otherwise, false. - - - Represents the base class for value providers whose values come from a object. - - - Initializes a new instance of the class. - A collection that contains the values that are used to initialize the provider. - An object that contains information about the target culture. - The parameter is null. - - - Determines whether the collection contains the specified prefix. - true if the collection contains the specified prefix; otherwise, false. - The prefix to search for. - The parameter is null. - - - Returns a value object using the specified key. - The value object for the specified key. - The key of the value object to retrieve. - The parameter is null. - - - Provides a convenience wrapper for the attribute. - - - Initializes a new instance of the class. - - - Represents an attribute that is used to indicate that a controller method is not an action method. - - - Initializes a new instance of the class. - - - Determines whether the attribute marks a method that is not an action method by using the specified controller context. - true if the attribute marks a valid non-action method; otherwise, false. - The controller context. - The method information. - - - Represents an attribute that is used to mark an action method whose output will be cached. - - - Initializes a new instance of the class. - - - Gets or sets the cache profile name. - The cache profile name. - - - Gets or sets the cache duration. - The cache duration. - - - Gets or sets the location. - The location. - - - Gets or sets a value that indicates whether to store the cache. - true if the cache should be stored; otherwise, false. - - - Called before the action result executes. - The filter context, which encapsulates information for using . - The parameter is null. - - - Gets or sets the SQL dependency. - The SQL dependency. - - - Gets or sets the vary-by-content encoding. - The vary-by-content encoding. - - - Gets or sets the vary-by-custom value. - The vary-by-custom value. - - - Gets or sets the vary-by-header value. - The vary-by-header value. - - - Gets or sets the vary-by-param value. - The vary-by-param value. - - - Encapsulates information for binding action-method parameters to a data model. - - - Initializes a new instance of the class. - - - Gets the model binder. - The model binder. - - - Gets a comma-delimited list of property names for which binding is disabled. - The exclude list. - - - Gets a comma-delimited list of property names for which binding is enabled. - The include list. - - - Gets the prefix to use when the MVC framework binds a value to an action parameter or to a model property. - The prefix. - - - Contains information that describes a parameter. - - - Initializes a new instance of the class. - - - Gets the action descriptor. - The action descriptor. - - - Gets the binding information. - The binding information. - - - Gets the default value of the parameter. - The default value of the parameter. - - - Returns an array of custom attributes that are defined for this member, excluding named attributes. - An array of custom attributes, or an empty array if no custom attributes exist. - true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. - The custom attribute type cannot be loaded. - There is more than one attribute of type defined for this member. - - - Returns an array of custom attributes that are defined for this member, identified by type. - An array of custom attributes, or an empty array if no custom attributes exist. - The type of the custom attributes. - true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. - The custom attribute type cannot be loaded. - There is more than one attribute of type defined for this member. - The parameter is null. - - - Indicates whether one or more instances of a custom attribute type are defined for this member. - true if the custom attribute type is defined for this member; otherwise, false. - The type of the custom attributes. - true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. - The parameter is null. - - - Gets the name of the parameter. - The name of the parameter. - - - Gets the type of the parameter. - The type of the parameter. - - - Represents a base class that is used to send a partial view to the response. - - - Initializes a new instance of the class. - - - Returns the object that is used to render the view. - The view engine result. - The controller context. - An error occurred while the method was attempting to find the view. - - - Represents a value provider for query strings that are contained in a object. - - - Initializes a new instance of the class. - An object that encapsulates information about the current HTTP request. - - - Represents a class that is responsible for creating a new instance of a query-string value-provider object. - - - Initializes a new instance of the class. - - - Returns a value-provider object for the specified controller context. - A query-string value-provider object. - An object that encapsulates information about the current HTTP request. - The parameter is null. - - - Provides an adapter for the attribute. - - - Initializes a new instance of the class. - The model metadata. - The controller context. - The range attribute. - - - Gets a list of client validation rules for a range check. - A list of client validation rules for a range check. - - - Controls the processing of application actions by redirecting to a specified URI. - - - Initializes a new instance of the class. - The target URL. - The parameter is null. - - - Enables processing of the result of an action method by a custom type that inherits from the class. - The context within which the result is executed. - The parameter is null. - - - Gets or sets the target URL. - The target URL. - - - Represents a result that performs a redirection by using the specified route values dictionary. - - - Initializes a new instance of the class by using the specified route name and route values. - The name of the route. - The route values. - - - Initializes a new instance of the class by using the specified route values. - The route values. - - - Enables processing of the result of an action method by a custom type that inherits from the class. - The context within which the result is executed. - The parameter is null. - - - Gets or sets the name of the route. - The name of the route. - - - Gets or sets the route values. - The route values. - - - Contains information that describes a reflected action method. - - - Initializes a new instance of the class. - The action-method information. - The name of the action. - The controller descriptor. - Either the or parameter is null. - The parameter is null or empty. - - - Gets the name of the action. - The name of the action. - - - Gets the controller descriptor. - The controller descriptor. - - - Executes the specified controller context by using the specified action-method parameters. - The action return value. - The controller context. - The parameters. - The or parameter is null. - - - Returns an array of custom attributes defined for this member, excluding named attributes. - An array of custom attributes, or an empty array if no custom attributes exist. - true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. - The custom attribute type cannot be loaded. - There is more than one attribute of type defined for this member. - - - Returns an array of custom attributes defined for this member, identified by type. - An array of custom attributes, or an empty array if no custom attributes exist. - The type of the custom attributes. - true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. - The custom attribute type cannot be loaded. - There is more than one attribute of type defined for this member. - - - Retrieves information about action filters. - The filter information. - - - Retrieves the parameters of the action method. - The parameters of the action method. - - - Retrieves the action selectors. - The action selectors. - - - Indicates whether one or more instances of a custom attribute type are defined for this member. - true if the custom attribute type is defined for this member; otherwise, false. - The type of the custom attributes. - true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. - - - Gets or sets the action-method information. - The action-method information. - - - Contains information that describes a reflected controller. - - - Initializes a new instance of the class. - The type of the controller. - The parameter is null. - - - Gets the type of the controller. - The type of the controller. - - - Finds the specified action for the specified controller context. - The information about the action. - The controller context. - The name of the action. - The parameter is null. - The parameter is null or empty. - - - Returns the list of actions for the controller. - A list of action descriptors for the controller. - - - Returns an array of custom attributes that are defined for this member, excluding named attributes. - An array of custom attributes, or an empty array if no custom attributes exist. - true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. - The custom attribute type cannot be loaded. - There is more than one attribute of type defined for this member. - - - Returns an array of custom attributes that are defined for this member, identified by type. - An array of custom attributes, or an empty array if no custom attributes exist. - The type of the custom attributes. - true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. - The custom attribute type cannot be loaded. - There is more than one attribute of type defined for this member. - - - Returns a value that indicates whether one or more instances of a custom attribute type are defined for this member. - true if the custom attribute type is defined for this member; otherwise, false. - The type of the custom attributes. - true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. - - - Contains information that describes a reflected action-method parameter. - - - Initializes a new instance of the class. - The parameter information. - The action descriptor. - The or parameter is null. - - - Gets the action descriptor. - The action descriptor. - - - Gets the binding information. - The binding information. - - - Gets the default value of the reflected parameter. - The default value of the reflected parameter. - - - Returns an array of custom attributes that are defined for this member, excluding named attributes. - An array of custom attributes, or an empty array if no custom attributes exist. - true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. - The custom attribute type cannot be loaded. - There is more than one attribute of type defined for this member. - - - Returns an array of custom attributes that are defined for this member, identified by type. - An array of custom attributes, or an empty array if no custom attributes exist. - The type of the custom attributes. - true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. - The custom attribute type cannot be loaded. - There is more than one attribute of type defined for this member. - - - Returns a value that indicates whether one or more instances of a custom attribute type are defined for this member. - true if the custom attribute type is defined for this member; otherwise, false. - The type of the custom attributes. - true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. - - - Gets or sets the parameter information. - The parameter information. - - - Gets the name of the parameter. - The name of the parameter. - - - Gets the type of the parameter. - The type of the parameter. - - - Provides an adapter for the attribute. - - - Initializes a new instance of the class. - The model metadata. - The controller context. - The regular expression attribute. - - - Gets a list of regular-expression client validation rules. - A list of regular-expression client validation rules. - - - Provides an adapter for the attribute. - - - Initializes a new instance of the class. - The model metadata. - The controller context. - The required attribute. - - - Gets a list of required-value client validation rules. - A list of required-value client validation rules. - - - Represents an attribute that forces an unsecured HTTP request to be re-sent over HTTPS. - - - Initializes a new instance of the class. - - - Handles unsecured HTTP requests that are sent to the action method. - An object that encapsulates information that is required in order to use the attribute. - The HTTP request contains an invalid transfer method override. All GET requests are considered invalid. - - - Determines whether a request is secured (HTTPS) and, if it is not, calls the method. - An object that encapsulates information that is required in order to use the attribute. - The parameter is null. - - - Provides the context for the method of the class. - - - Initializes a new instance of the class. - - - Initializes a new instance of the class. - The controller context. - The result object. - true to cancel execution; otherwise, false. - The exception object. - The parameter is null. - - - Gets or sets a value that indicates whether this instance is canceled. - true if the instance is canceled; otherwise, false. - - - Gets or sets the exception object. - The exception object. - - - Gets or sets a value that indicates whether the exception has been handled. - true if the exception has been handled; otherwise, false. - - - Gets or sets the action result. - The action result. - - - Provides the context for the method of the class. - - - Initializes a new instance of the class. - - - Initializes a new instance of the class by using the specified controller context and action result. - The controller context. - The action result. - The parameter is null. - - - Gets or sets a value that indicates whether this value is "cancel". - true if the value is "cancel"; otherwise, false. - - - Gets or sets the action result. - The action result. - - - Extends a object for MVC routing. - - - Returns an object that contains information about the route and virtual path that are the result of generating a URL in the current area. - An object that contains information about the route and virtual path that are the result of generating a URL in the current area. - An object that contains the routes for the applications. - An object that encapsulates information about the requested route. - The name of the route to use when information about the URL path is retrieved. - An object that contains the parameters for a route. - - - Returns an object that contains information about the route and virtual path that are the result of generating a URL in the current area. - An object that contains information about the route and virtual path that are the result of generating a URL in the current area. - An object that contains the routes for the applications. - An object that encapsulates information about the requested route. - An object that contains the parameters for a route. - - - Ignores the specified URL route for the given list of available routes. - A collection of routes for the application. - The URL pattern for the route to ignore. - The or parameter is null. - - - Ignores the specified URL route for the given list of the available routes and a list of constraints. - A collection of routes for the application. - The URL pattern for the route to ignore. - A set of expressions that specify values for the parameter. - The or parameter is null. - - - Maps the specified URL route. - A reference to the mapped route. - A collection of routes for the application. - The name of the route to map. - The URL pattern for the route. - The or parameter is null. - - - Maps the specified URL route and sets default route values. - A reference to the mapped route. - A collection of routes for the application. - The name of the route to map. - The URL pattern for the route. - An object that contains default route values. - The or parameter is null. - - - Maps the specified URL route and sets default route values and constraints. - A reference to the mapped route. - A collection of routes for the application. - The name of the route to map. - The URL pattern for the route. - An object that contains default route values. - A set of expressions that specify values for the parameter. - The or parameter is null. - - - Maps the specified URL route and sets default route values, constraints, and namespaces. - A reference to the mapped route. - A collection of routes for the application. - The name of the route to map. - The URL pattern for the route. - An object that contains default route values. - A set of expressions that specify values for the parameter. - A set of namespaces for the application. - The or parameter is null. - - - Maps the specified URL route and sets default route values and namespaces. - A reference to the mapped route. - A collection of routes for the application. - The name of the route to map. - The URL pattern for the route. - An object that contains default route values. - A set of namespaces for the application. - The or parameter is null. - - - Maps the specified URL route and sets the namespaces. - A reference to the mapped route. - A collection of routes for the application. - The name of the route to map. - The URL pattern for the route. - A set of namespaces for the application. - The or parameter is null. - - - Represents a value provider for route data that is contained in an object that implements the interface. - - - Initializes a new instance of the class. - An object that contain information about the HTTP request. - - - Represents a factory for creating route-data value provider objects. - - - Initialized a new instance of the class. - - - Returns a value-provider object for the specified controller context. - A value-provider object. - An object that encapsulates information about the current HTTP request. - The parameter is null. - - - Represents a list that lets users select one item. - - - Initializes a new instance of the class by using the specified items for the list. - The items. - - - Initializes a new instance of the class by using the specified items for the list and a selected value. - The items. - The selected value. - - - Initializes a new instance of the class by using the specified items for the list, the data value field, and the data text field. - The items. - The data value field. - The data text field. - - - Initializes a new instance of the class by using the specified items for the list, the data value field, the data text field, and a selected value. - The items. - The data value field. - The data text field. - The selected value. - - - Gets or sets the selected value. - The selected value. - - - Represents the selected item in an instance of the class. - - - Initializes a new instance of the class. - - - Gets or sets a value that indicates whether this is selected. - true if the item is selected; otherwise, false. - - - Gets or sets the text of the selected item. - The text. - - - Gets or sets the value of the selected item. - The value. - - - Provides session-state data to the current object. - - - Initializes a new instance of the class. - - - Loads the temporary data by using the specified controller context. - The temporary data. - The controller context. - An error occurred when the session context was being retrieved. - - - Saves the specified values in the temporary data dictionary by using the specified controller context. - The controller context. - The values. - An error occurred the session context was being retrieved. - - - Provides an adapter for the attribute. - - - Initializes a new instance of the class. - The model metadata. - The controller context. - The string-length attribute. - - - Gets a list of string-length client validation rules. - A list of string-length client validation rules. - - - Represents a class that is used by HTML helpers to build HTML elements. - - - Initializes a new instance of the class. - The name of the tag. - - - Adds the specified CSS class to the tag-builder attributes. - The CSS class value string. - - - Gets or sets the collection of attributes for the tag. - The collection of attributes for the tag. - - - Generates the id attribute for the tag by using the specified name. - The name to use to generate the id value. - - - Gets or sets the character that is used to replace the periods (dots) in the id attribute. - The character that is used to replace periods (dots) in the id attribute. - - - Gets or sets the inner HTML for the tag (element). - The inner HTML for the tag (element). - - - Adds an attribute to the tag by using the specified key/value pair. - The key. - The value. - The parameter is null or empty. - - - Adds an attribute to the tag by using the specified key/value pair. - The key. - The value. - true to replace the existing attribute. - The parameter is null or empty. - - - Adds an attribute to the specified collection of attributes for the tag. - The attributes. - The type of the key. - The type of the value. - - - Adds an attribute to the specified collection of attributes for the tag. - The attributes. - true to replace the existing attributes. - The type of the key. - The type of the value. - - - Sets the inner text of the tag (element). - The inner text for the tag (element). - - - Gets or sets the name of the tag. - The name of the tag. - - - Returns a string that represents the current object. - A string that represents the current object. - - - Returns a string that represents the current object by using the specified tag-render mode. - A string that represents the current object. - The tag-render mode. - - - Enumerates the modes that are available for rendering HTML tags. - - - Represents normal mode. - - - Represents the start-tag mode. - - - Represents end-tag mode. - - - Represents self-closing-tag mode. - - - Represents a set of data that persists only from one request to the next. - - - Initializes a new instance of the class. - - - Initializes a new instance of the class. - The information. - The controller context. - - - Adds an element that has the specified key and value to the object. - The key of the element to add. - The value of the element to add. - The object is read-only. - - is null. - An element that has the same key already exists in the object. - - - Removes all items from the instance. - The object is read-only. - - - Determines whether the instance contains an element that has the specified key. - true if the instance contains an element that has the specified key; otherwise, false. - The key to locate in the instance. - - is null. - - - Determines whether the dictionary contains the specified value. - true if the dictionary contains the specified value; otherwise, false. - The value. - - - Gets the number of elements in the object. - The number of elements in the object. - - - Gets the enumerator. - The enumerator. - - - Populates a class by using the data that is that is required to serialize the target object. - The object to populate with data. - The destination for this serialization. For more information, see . - The caller does not have the required permission. - - - Gets or sets the object that has the specified key. - The object that has the specified key. - The key to access. - - - Marks all keys in the dictionary for retention. - - - Marks the specified key in the dictionary for retention. - The key to retain in the dictionary. - - - Gets an object that contains the keys of elements in the object. - The keys of the elements in the object. - - - Loads the specified controller context by using the specified data provider. - The controller context. - The temporary data provider. - - - Returns an object that contains the element that is associated with the specified key, without marking the key for deletion. - An object that contains the element that is associated with the specified key. - The key of the element to return. - - - Removes the element that has the specified key from the object. - true if the element was removed successfully; otherwise, false. This method also returns false if was not found in the . instance. - The key of the element to remove. - The object is read-only. - - is null. - - - Saves the specified controller context by using the specified data provider. - The controller context. - The temporary data provider. - - - Adds the specified key/value pair to the dictionary. - The key/value pair. - - - Determines whether a sequence contains a specified element by using the default equality comparer. - true if the dictionary contains the specified key/value pair; otherwise, false. - The key/value pair to search for. - - - Copies a key/value pair to the specified array at the specified index. - The target array. - The index. - - - Gets a value that indicates whether the dictionary is read-only. - true if the dictionary is read-only; otherwise, false. - - - Deletes the specified key/value pair from the dictionary. - true if the key/value pair was removed successfully; otherwise, false. - The key/value pair. - - - Returns an enumerator that can be used to iterate through a collection. - An object that can be used to iterate through the collection. - - - Populates a object by using the data that is that is required to serialize the target object. - The object to populate with data. - The destination for this serialization. For more information, see . - The caller does not have the required permission. - - - Gets the value of the element that has the specified key. - true if the object that implements contains an element that has the specified key; otherwise, false. - The key of the value to get. - When this method returns, the value that is associated with the specified key, if the key is found; otherwise, the default value for the type of the parameter. This parameter is passed uninitialized. - - is null. - - - Gets the object that contains the values in the object. - The values of the elements in the object that implements . - - - Encapsulates information about the current template context. - - - Initializes a new instance of the class. - - - Gets or sets the formatted model value. - The formatted model value. - - - Retrieves the full DOM ID of a field using the specified HTML name attribute. - The full DOM ID. - The value of the HTML name attribute. - - - Retrieves the fully qualified name (including a prefix) for a field using the specified HTML name attribute. - The prefixed name of the field. - The value of the HTML name attribute. - - - Gets or sets the HTML field prefix. - The HTML field prefix. - - - Contains the number of objects that were visited by the user. - The number of objects. - - - Determines whether the template has been visited by the user. - true if the template has been visited by the user; otherwise, false. - An object that encapsulates information that describes the model. - - - Contains methods to build URLs for ASP.NET MVC within an application. - - - Initializes a new instance of the class using the specified request context. - An object that contains information about the current request and about the route that it matched. - The parameter is null. - - - Initializes a new instance of the class by using the specified request context and route collection. - An object that contains information about the current request and about the route that it matched. - A collection of routes. - The or the parameter is null. - - - Generates a fully qualified URL to an action method by using the specified action name. - The fully qualified URL to an action method. - The name of the action method. - - - Generates a fully qualified URL to an action method by using the specified action name and route values. - The fully qualified URL to an action method. - The name of the action method. - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. The object is typically created by using object initializer syntax. - - - Generates a fully qualified URL to an action method by using the specified action name and controller name. - The fully qualified URL to an action method. - The name of the action method. - The name of the controller. - - - Generates a fully qualified URL to an action method by using the specified action name, controller name, and route values. - The fully qualified URL to an action method. - The name of the action method. - The name of the controller. - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. The object is typically created by using object initializer syntax. - - - Generates a fully qualified URL to an action method by using the specified action name, controller name, route values, and protocol to use. - The fully qualified URL to an action method. - The name of the action method. - The name of the controller. - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. The object is typically created by using object initializer syntax. - The protocol for the URL, such as "http" or "https". - - - Generates a fully qualified URL to an action method by using the specified action name, controller name, and route values. - The fully qualified URL to an action method. - The name of the action method. - The name of the controller. - An object that contains the parameters for a route. - - - Generates a fully qualified URL for an action method by using the specified action name, controller name, route values, protocol to use, and host name. - The fully qualified URL to an action method. - The name of the action method. - The name of the controller. - An object that contains the parameters for a route. - The protocol for the URL, such as "http" or "https". - The host name for the URL. - - - Generates a fully qualified URL to an action method for the specified action name and route values. - The fully qualified URL to an action method. - The name of the action method. - An object that contains the parameters for a route. - - - Converts a virtual (relative) path to an application absolute path. - The application absolute path. - The virtual path of the content. - - - Encodes special characters in a URL string into character-entity equivalents. - An encoded URL string. - The text to encode. - - - Returns a string that contains a content URL. - A string that contains a content URL. - The content path. - The HTTP context. - - - Returns a string that contains a URL. - A string that contains a URL. - The route name. - The action name. - The controller name. - The HTTP protocol. - The host name. - The fragment. - The route values. - The route collection. - The request context. - true to include implicit MVC values; otherwise false. - - - Returns a string that contains a URL. - A string that contains a URL. - The route name. - The action name. - The controller name. - The route values. - The route collection. - The request context. - true to include implicit MVC values; otherwise. false. - - - Gets information about an HTTP request that matches a defined route. - The request context. - - - Gets a collection that contains the routes that are registered for the application. - The route collection. - - - Generates a fully qualified URL for the specified route values. - The fully qualified URL. - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. The object is typically created by using object initializer syntax. - - - Generates a fully qualified URL for the specified route name. - The fully qualified URL. - The name of the route that is used to generate the URL. - - - Generates a fully qualified URL for the specified route values by using a route name. - The fully qualified URL. - The name of the route that is used to generate the URL. - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. The object is typically created by using object initializer syntax. - - - Generates a fully qualified URL for the specified route values by using a route name and the protocol to use. - The fully qualified URL. - The name of the route that is used to generate the URL. - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. The object is typically created by using object initializer syntax. - The protocol for the URL, such as "http" or "https". - - - Generates a fully qualified URL for the specified route values by using a route name. - The fully qualified URL. - The name of the route that is used to generate the URL. - An object that contains the parameters for a route. - - - Generates a fully qualified URL for the specified route values by using the specified route name, protocol to use, and host name. - The fully qualified URL. - The name of the route that is used to generate the URL. - An object that contains the parameters for a route. - The protocol for the URL, such as "http" or "https". - The host name for the URL. - - - Generates a fully qualified URL for the specified route values. - The fully qualified URL. - An object that contains the parameters for a route. - - - Represents an optional parameter that is used by the class during routing. - - - Contains the read-only value for the optional parameter. - - - Represents an attribute that is used to detect whether a server request has been tampered with. - - - Initializes a new instance of the class. - - - Called when authorization is required. - The filter context. - The parameter is null. - - - Gets or sets the salt string. - The salt string. - - - Represents an attribute that is used to mark action methods whose input must be validated. - - - Initializes a new instance of the class. - true to enable validation. - - - Gets or sets a value that indicates whether to enable validation. - true if validation is enabled; otherwise, false. - - - Called when authorization is required. - The filter context. - The parameter is null. - - - Represents the collection of value-provider objects for the application. - - - Initializes a new instance of the class. - - - Initializes a new instance of the class and registers the specified value providers. - A list of value providers to register. - - - Determines whether the collection contains the specified prefix. - true if the collection contains the specified prefix; otherwise, false. - The prefix to search for. - - - Returns a value object using the specified key. - The value object for the specified key - The key of the value object to retrieve. - - - Inserts the specified value-provider object into the collection at the specified index location. - The zero-based index location at which to insert the value provider into the collection. - The value-provider object to insert. - The parameter is null. - - - Replaces the value provider at the specified index location with a new value provider. - The zero-based index of the element to replace. - The new value for the element at the specified index. - The parameter is null. - - - Represents a dictionary of value providers for the application. - - - Initializes a new instance of the class. - The controller context. - - - Adds the specified item to the collection of value providers. - The object to add to the object. - The object is read-only. - - - Adds an element that has the specified key and value to the collection of value providers. - The key of the element to add. - The value of the element to add. - The object is read-only. - - is null. - An element that has the specified key already exists in the object. - - - Adds an element that has the specified key and value to the collection of value providers. - The key of the element to add. - The value of the element to add. - The object is read-only. - - is null. - An element that has the specified key already exists in the object. - - - Removes all items from the collection of value providers. - The object is read-only. - - - Determines whether the collection of value providers contains the specified item. - true if is found in the collection of value providers; otherwise, false. - The object to locate in the instance. - - - Determines whether the collection of value providers contains an element that has the specified key. - true if the collection of value providers contains an element that has the key; otherwise, false. - The key of the element to find in the instance. - - is null. - - - Gets or sets the controller context. - The controller context. - - - Copies the elements of the collection to an array, starting at the specified index. - The one-dimensional array that is the destination of the elements copied from the object. The array must have zero-based indexing. - The zero-based index in at which copying starts. - - is null. - - is less than 0. - - is multidimensional.-or- is equal to or greater than the length of .-or-The number of elements in the source collection is greater than the available space from to the end of the destination .-or-Type cannot be cast automatically to the type of the destination array. - - - Gets the number of elements in the collection. - The number of elements in the collection. - - - Returns an enumerator that can be used to iterate through the collection. - An enumerator that can be used to iterate through the collection. - - - Gets a value that indicates whether the collection is read-only. - true if the collection is read-only; otherwise, false. - - - Gets or sets the object that has the specified key. - The object. - The key. - - - Gets a collection that contains the keys of the instance. - A collection that contains the keys of the object that implements the interface. - - - Removes the first occurrence of the specified item from the collection of value providers. - true if was successfully removed from the collection; otherwise, false. This method also returns false if is not found in the collection. - The object to remove from the instance. - The object is read-only. - - - Removes the element that has the specified key from the collection of value providers. - true if the element was successfully removed; otherwise, false. This method also returns false if was not found in the collection. - The key of the element to remove. - The object is read-only. - - is null. - - - Returns an enumerator that can be used to iterate through a collection. - An enumerator that can be used to iterate through the collection. - - - Determines whether the collection contains the specified prefix. - true if the collection contains the specified prefix; otherwise, false. - The prefix to search for. - - - Returns a value object using the specified key. - The value object for the specified key. - The key of the value object to return. - - - Gets the value of the element that has the specified key. - true if the object that implements contains an element that has the specified key; otherwise, false. - The key of the element to get. - When this method returns, the value that is associated with the specified key, if the key is found; otherwise, the default value for the type of the parameter. This parameter is passed uninitialized. - - is null. - - - Gets a collection that contains the values in the object. - A collection of the values in the object that implements the interface. - - - Represents a container for value-provider factory objects. - - - Gets the collection of value-provider factories for the application. - The collection of value-provider factory objects. - - - Represents a factory for creating value-provider objects. - - - Initializes a new instance of the class. - - - Returns a value-provider object for the specified controller context. - A value-provider object. - An object that encapsulates information about the current HTTP request. - - - Represents the collection of value-provider factories for the application. - - - Initializes a new instance of the class. - - - Initializes a new instance of the class using the specified list of value-provider factories. - A list of value-provider factories to initialize the collection with. - - - Returns the value-provider factory for the specified controller context. - The value-provider factory object for the specified controller context. - An object that encapsulates information about the current HTTP request. - - - Inserts the specified value-provider factory object at the specified index location. - The zero-based index location at which to insert the value provider into the collection. - The value-provider factory object to insert. - The parameter is null. - - - Sets the specified value-provider factory object at the given index location. - The zero-based index location at which to insert the value provider into the collection. - The value-provider factory object to set. - The parameter is null. - - - Represents the result of binding a value (such as from a form post or query string) to an action-method argument property, or to the argument itself. - - - Initializes a new instance of the class. - - - Initializes a new instance of the class by using the specified raw value, attempted value, and culture information. - The raw value. - The attempted value. - The culture. - - - Gets or sets the raw value that is converted to a string for display. - The raw value. - - - Converts the value that is encapsulated by this result to the specified type. - The converted value. - The target type. - The parameter is null. - - - Converts the value that is encapsulated by this result to the specified type by using the specified culture information. - The converted value. - The target type. - The culture to use in the conversion. - The parameter is null. - - - Gets or sets the culture. - The culture. - - - Gets or set the raw value that is supplied by the value provider. - The raw value. - - - Encapsulates information that is related to rendering a view. - - - Initializes a new instance of the class. - - - Initializes a new instance of the class by using the specified controller context, view, view data dictionary, temporary data dictionary, and text writer. - Encapsulates information about the HTTP request. - The view to render. - The dictionary that contains the data that is required in order to render the view. - The dictionary that contains temporary data for the view. - The text writer object that is used to write HTML output. - One of the parameters is null. - - - Gets or sets a value that indicates whether client-side validation is enabled. - true if client-side validation is enabled; otherwise, false. - - - Gets or sets an object that encapsulates information that is required in order to validate and process the input data from an HTML form. - An object that encapsulates information that is required in order to validate and process the input data from an HTML form. - - - Writes the client validation information to the HTTP response. - - - Gets data that is associated with this request and that is available for only one request. - The temporary data. - - - Gets an object that implements the interface to render in the browser. - The view. - - - Gets the view data that is passed to the view. - The view data. - - - Gets or sets the text writer object that is used to write HTML output. - The object that is used to write the HTML output. - - - Represents a container that is used to pass data between a controller and a view. - - - Initializes a new instance of the class. - - - Initializes a new instance of the class by using the specified model. - The model. - - - Initializes a new instance of the class by using the specified dictionary. - The dictionary. - The parameter is null. - - - Adds the specified item to the collection. - The object to add to the collection. - The collection is read-only. - - - Adds an element to the collection using the specified key and value . - The key of the element to add. - The value of the element to add. - The object is read-only. - - is null. - An element with the same key already exists in the object. - - - Removes all items from the collection. - The object is read-only. - - - Determines whether the collection contains the specified item. - true if is found in the collection; otherwise, false. - The object to locate in the collection. - - - Determines whether the collection contains an element that has the specified key. - true if the collection contains an element that has the specified key; otherwise, false. - The key of the element to locate in the collection. - - is null. - - - Copies the elements of the collection to an array, starting at a particular index. - The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. - The zero-based index in at which copying begins. - - is null. - - is less than 0. - - is multidimensional.-or- is equal to or greater than the length of .-or- The number of elements in the source collection is greater than the available space from to the end of the destination .-or- Type cannot be cast automatically to the type of the destination . - - - Gets the number of elements in the collection. - The number of elements in the collection. - - - Evaluates the specified expression. - The results of the evaluation. - The expression. - The parameter is null or empty. - - - Evaluates the specified expression by using the specified format. - The results of the evaluation. - The expression. - The format. - - - Returns an enumerator that can be used to iterate through the collection. - An enumerator that can be used to iterate through the collection. - - - Returns information about the view data as defined by the parameter. - An object that contains the view data information that is defined by the parameter. - A set of key/value pairs that define the view-data information to return. - The parameter is either null or empty. - - - Gets a value that indicates whether the collection is read-only. - true if the collection is read-only; otherwise, false. - - - Gets or sets the item that is associated with the specified key. - The value of the selected item. - The key. - - - Gets a collection that contains the keys of this dictionary. - A collection that contains the keys of the object that implements . - - - Gets or sets the model that is associated with the view data. - The model that is associated with the view data. - - - Gets or sets information about the model. - Information about the model. - - - Gets the state of the model. - The state of the model. - - - Removes the first occurrence of a specified object from the collection. - true if was successfully removed from the collection; otherwise, false. This method also returns false if is not found in the collection. - The object to remove from the collection. - The collection is read-only. - - - Removes the element from the collection using the specified key. - true if the element is successfully removed; otherwise, false. This method also returns false if was not found in the original collection. - The key of the element to remove. - The collection is read-only. - - is null. - - - Sets the data model to use for the view. - The data model to use for the view. - - - Returns an enumerator that can be used to iterate through the collection. - An enumerator that can be used to iterate through the collection. - - - Gets or sets an object that encapsulates information about the current template context. - An object that contains information about the current template. - - - Attempts to retrieve the value that is associated with the specified key. - true if the collection contains an element with the specified key; otherwise, false. - The key of the value to get. - When this method returns, the value that is associated with the specified key, if the key is found; otherwise, the default value for the type of the parameter. This parameter is passed uninitialized. - - is null. - - - Gets a collection that contains the values in this dictionary. - A collection that contains the values of the object that implements . - - - Represents a container that is used to pass strongly typed data between a controller and a view. - The type of the model. - - - Initializes a new instance of the class. - - - Initializes a new instance of the class by using the specified view data dictionary. - An existing view data dictionary to copy into this instance. - - - Initializes a new instance of the class by using the specified model. - The data model to use for the view. - - - Gets or sets the model. - A reference to the data model. - - - Gets or sets information about the model. - Information about the model. - - - Sets the data model to use for the view. - The data model to use for the view. - An error occurred while the model was being set. - - - Encapsulates information about the current template content that is used to develop templates and about HTML helpers that interact with templates. - - - Initializes a new instance of the class. - - - Initializes a new instance of the class and associates a delegate for accessing the view data information. - A delegate that defines how the view data information is accessed. - - - Gets or sets the object that contains the values to be displayed by the template. - The object that contains the values to be displayed by the template. - - - Gets or sets the description of the property to be displayed by the template. - The description of the property to be displayed by the template. - - - Gets or sets the current value to be displayed by the template. - The current value to be displayed by the template. - - - Represents a collection of view engines that are available to the application. - - - Initializes a new instance of the class. - - - Initializes a new instance of the class by using the specified list of view engines. - The list that is wrapped by the new collection. - - is null. - - - Finds the specified partial view by using the specified controller context. - The partial view. - The controller context. - The name of the partial view. - The parameter is null. - The parameter is null or empty. - - - Finds the specified view by using the specified controller context and master view. - The view. - The controller context. - The name of the view. - The name of the master view. - The parameter is null. - The parameter is null or empty. - - - Inserts an element into the collection at the specified index. - The zero-based index at which should be inserted. - The object to insert. - - is less than zero.-or- is greater than the number of items in the collection. - The parameter is null. - - - Replaces the element at the specified index. - The zero-based index of the element to replace. - The new value for the element at the specified index. - - is less than zero.-or- is greater than the number of items in the collection. - The parameter is null. - - - Represents the result of locating a view engine. - - - Initializes a new instance of the class by using the specified searched locations. - The searched locations. - The parameter is null. - - - Initializes a new instance of the class by using the specified view and view engine. - The view. - The view engine. - The or parameter is null. - - - Gets or sets the searched locations. - The searched locations. - - - Gets or sets the view. - The view. - - - Gets or sets the view engine. - The view engine. - - - Represents a collection of view engines that are available to the application. - - - Gets the view engines. - The view engines. - - - Represents the information that is needed to build a master view page. - - - Initializes a new instance of the class. - - - Gets the AJAX script for the master page. - The AJAX script for the master page. - - - Gets the HTML for the master page. - The HTML for the master page. - - - Gets the model. - The model. - - - Gets the temporary data. - The temporary data. - - - Gets the URL. - The URL. - - - Gets the view context. - The view context. - - - Gets the view data. - The view data. - - - Gets the writer that is used to render the master page. - The writer that is used to render the master page. - - - Represents the information that is required in order to build a strongly typed master view page. - The type of the model. - - - Initializes a new instance of the class. - - - Gets the AJAX script for the master page. - The AJAX script for the master page. - - - Gets the HTML for the master page. - The HTML for the master page. - - - Gets the model. - A reference to the data model. - - - Gets the view data. - The view data. - - - Represents the properties and methods that are needed to render a view as a Web Forms page. - - - Initializes a new instance of the class. - - - Gets or sets the object that is used to render HTML in Ajax scenarios. - The Ajax helper object that is associated with the view. - - - Gets or sets the object that is used to render HTML elements. - The HTML helper object that is associated with the view. - - - Initializes the , , and properties. - - - Gets or sets the path of the master view. - The path of the master view. - - - Gets the Model property of the associated object. - The Model property of the associated object. - - - Raises the event at the beginning of page initialization. - The event data. - - - Enables processing of the specified HTTP request by the ASP.NET MVC framework. - An object that encapsulates HTTP-specific information about the current HTTP request. - - - Initializes the object that receives the page content to be rendered. - The object that receives the page content. - - - Renders the view page to the response using the specified view context. - An object that encapsulates the information that is required in order to render the view, which includes the controller context, form context, the temporary data, and the view data for the associated view. - - - Sets the text writer that is used to render the view to the response. - The writer that is used to render the view to the response. - - - Sets the view data dictionary for the associated view. - A dictionary of data to pass to the view. - - - Gets the temporary data to pass to the view. - The temporary data to pass to the view. - - - Gets or sets the URL of the rendered page. - The URL of the rendered page. - - - Gets or sets the information that is used to render the view. - The information that is used to render the view, which includes the form context, the temporary data, and the view data of the associated view. - - - Gets or sets a dictionary that contains data to pass between the controller and the view. - A dictionary that contains data to pass between the controller and the view. - - - Gets the text writer that is used to render the view to the response. - The text writer that is used to render the view to the response. - - - Represents the information that is required in order to render a strongly typed view as a Web Forms page. - The type of the model. - - - Initializes a new instance of the class. - - - Gets or sets the object that supports rendering HTML in Ajax scenarios. - The Ajax helper object that is associated with the view. - - - Gets or sets the object that provides support for rendering elements. - The HTML helper object that is associated with the view. - - - Instantiates and initializes the and properties. - - - Gets the property of the associated object. - A reference to the data model. - - - Sets the view data dictionary for the associated view. - A dictionary of data to pass to the view. - - - Gets or sets a dictionary that contains data to pass between the controller and the view. - A dictionary that contains data to pass between the controller and the view. - - - Represents a class that is used to render a view by using an instance that is returned by an object. - - - Initializes a new instance of the class. - - - Searches the registered view engines and returns the object that is used to render the view. - The object that is used to render the view. - The controller context. - An error occurred while the method was searching for the view. - - - Gets the name of the master view (such as a master page or template) to use when the view is rendered. - The name of the master view. - - - Represents a base class that is used to provide the model to the view and then render the view to the response. - - - Initializes a new instance of the class. - - - When called by the action invoker, renders the view to the response. - The context that the result is executed in. - The parameter is null. - - - Returns the object that is used to render the view. - The view engine. - The context. - - - Gets or sets the object for this result. - The temporary data. - - - Gets or sets the object that is rendered to the response. - The view. - - - Gets or sets the view data object for this result. - The view data. - - - Gets or sets the collection of view engines that are associated with this result. - The collection of view engines. - - - Gets or sets the name of the view to render. - The name of the view. - - - Provides a container for objects. - - - Initializes a new instance of the class. - - - Provides a container for objects. - The type of the model. - - - Initializes a new instance of the class. - - - Gets the formatted value. - The formatted value. - - - Represents the type of a view. - - - Initializes a new instance of the class. - - - Gets or sets the name of the type. - The name of the type. - - - Represents the information that is needed to build a user control. - - - Initializes a new instance of the class. - - - Gets the AJAX script for the view. - The AJAX script for the view. - - - Ensures that view data is added to the object of the user control if the view data exists. - - - Gets the HTML for the view. - The HTML for the view. - - - Gets the model. - The model. - - - Renders the view by using the specified view context. - The view context. - - - Sets the text writer that is used to render the view to the response. - The writer that is used to render the view to the response. - - - Sets the view-data dictionary by using the specified view data. - The view data. - - - Gets the temporary-data dictionary. - The temporary-data dictionary. - - - Gets the URL for the view. - The URL for the view. - - - Gets or sets the view context. - The view context. - - - Gets or sets the view-data dictionary. - The view-data dictionary. - - - Gets or sets the view-data key. - The view-data key. - - - Gets the writer that is used to render the view to the response. - The writer that is used to render the view to the response. - - - Represents the information that is required in order to build a strongly typed user control. - The type of the model. - - - Initializes a new instance of the class. - - - Gets the AJAX script for the view. - The AJAX script for the view. - - - Gets the HTML for the view. - The HTML for the view. - - - Gets the model. - A reference to the data model. - - - Sets the view data for the view. - The view data. - - - Gets or sets the view data. - The view data. - - - Represents an abstract base-class implementation of the interface. - - - Initializes a new instance of the class. - - - Gets or sets the area-enabled master location formats. - The area-enabled master location formats. - - - Gets or sets the area-enabled partial-view location formats. - The area-enabled partial-view location formats. - - - Gets or sets the area-enabled view location formats. - The area-enabled view location formats. - - - Creates the specified partial view by using the specified controller context. - A reference to the partial view. - The controller context. - The partial path for the new partial view. - - - Creates the specified view by using the controller context, path of the view, and path of the master view. - A reference to the view. - The controller context. - The path of the view. - The path of the master view. - - - Returns a value that indicates whether the file is in the specified path by using the specified controller context. - true if the file is in the specified path; otherwise, false. - The controller context. - The virtual path. - - - Finds the specified partial view by using the specified controller context. - The partial view. - The controller context. - The name of the partial view. - true to use the cached partial view. - The parameter is null (Nothing in Visual Basic). - The parameter is null or empty. - - - Finds the specified view by using the specified controller context and master view name. - The page view. - The controller context. - The name of the view. - The name of the master view. - true to use the cached view. - The parameter is null (Nothing in Visual Basic). - The parameter is null or empty. - - - Gets or sets the master location formats. - The master location formats. - - - Gets or sets the partial-view location formats. - The partial-view location formats. - - - Releases the specified view by using the specified controller context. - The controller context. - The view to release. - - - Gets or sets the view location cache. - The view location cache. - - - Gets or sets the view location formats. - The view location formats. - - - Gets or sets the virtual path provider. - The virtual path provider. - - - Represents the information that is needed to build a Web Forms page in MVC. - - - Initializes a new instance of the class by using the specified path to the view. - The view path. - The parameter is null (Nothing in Visual Basic). - - - Initializes a new instance of the class by using the specified paths to the view and master view. - The view path. - The master path. - The parameter is null (Nothing in Visual Basic). - - - Gets or sets the master path. - The master path. - - - Renders the specified view context by using the specified writer for rendering the view to the response. - The view context. - The writer that is used to render the view to the response. - The parameter is null (Nothing in Visual Basic). - An error occurred while attempting to render the view. - - - Gets or sets the view path. - The view path. - - - Represents a view engine that is used to render a Web Forms page to the response. - - - Initializes a new instance of the class. - - - Creates the specified partial view by using the specified controller context. - The partial view. - The controller context. - The partial path. - - - Creates the specified view by using the specified controller context and the paths of the view and master view. - The view. - The controller context. - The view path. - The master-view path. - - - Determines whether a file at the specified location exists for the specified controller context. - true if the file exists; otherwise, false. - The controller context. - The virtual path. - - - Represents support for ASP.NET AJAX within an ASP.NET MVC application. - - - Returns an anchor element that contains the URL to the specified action method; when the action link is clicked, the action method is invoked asynchronously by using JavaScript. - An anchor element. - The AJAX helper. - The inner text of the anchor element. - The name of the action method. - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. - An object that provides options for the asynchronous request. - The parameter is null or empty. - - - Returns an anchor element that contains the URL to the specified action method; when the action link is clicked, the action method is invoked asynchronously by using JavaScript. - An anchor element. - The AJAX helper. - The inner text of the anchor element. - The name of the action method. - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. - An object that provides options for the asynchronous request. - An object that contains the HTML attributes to set for the element. - The parameter is null or empty. - - - Returns an anchor element that contains the URL to the specified action method; when the action link is clicked, the action method is invoked asynchronously by using JavaScript. - An anchor element. - The AJAX helper. - The inner text of the anchor element. - The name of the action method. - The name of the controller. - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. - An object that provides options for the asynchronous request. - The parameter is null or empty. - - - Returns an anchor element that contains the URL to the specified action method; when the action link is clicked, the action method is invoked asynchronously by using JavaScript. - An anchor element. - The AJAX helper. - The inner text of the anchor element. - The name of the action method. - The name of the controller. - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. - An object that provides options for the asynchronous request. - An object that contains the HTML attributes to set for the element. - The parameter is null or empty. - - - Returns an anchor element that contains the URL to the specified action method; when the action link is clicked, the action method is invoked asynchronously by using JavaScript. - An anchor element. - The AJAX helper. - The inner text of the anchor element. - The name of the action method. - The name of the controller. - The protocol for the URL, such as "http" or "https". - The host name for the URL. - The URL fragment name (the anchor name). - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. - An object that provides options for the asynchronous request. - An object that contains the HTML attributes to set for the element. - The parameter is null or empty. - - - Returns an anchor element that contains the URL to the specified action method; when the action link is clicked, the action method is invoked asynchronously by using JavaScript. - An anchor element. - The AJAX helper. - The inner text of the anchor element. - The name of the action method. - The name of the controller. - The protocol for the URL, such as "http" or "https". - The host name for the URL. - The URL fragment name (the anchor name). - An object that contains the parameters for a route. - An object that provides options for the asynchronous request. - An object that contains the HTML attributes to set for the element. - The parameter is null or empty. - - - Returns an anchor element that contains the URL to the specified action method; when the action link is clicked, the action method is invoked asynchronously by using JavaScript. - An anchor element. - The AJAX helper. - The inner text of the anchor element. - The name of the action method. - The name of the controller. - An object that provides options for the asynchronous request. - The parameter is null or empty. - - - Returns an anchor element that contains the URL to the specified action method; when the action link is clicked, the action method is invoked asynchronously by using JavaScript. - An anchor element. - The AJAX helper. - The inner text of the anchor element. - The name of the action method. - The name of the controller. - An object that contains the parameters for a route. - An object that provides options for the asynchronous request. - The parameter is null or empty. - - - Returns an anchor element that contains the URL to the specified action method; when the action link is clicked, the action method is invoked asynchronously by using JavaScript. - An anchor element. - The AJAX helper. - The inner text of the anchor element. - The name of the action method. - The name of the controller. - An object that contains the parameters for a route. - An object that provides options for the asynchronous request. - An object that contains the HTML attributes to set for the element. - The parameter is null or empty. - - - Returns an anchor element that contains the URL to the specified action method; when the action link is clicked, the action method is invoked asynchronously by using JavaScript. - An anchor element. - The AJAX helper. - The inner text of the anchor element. - The name of the action method. - An object that provides options for the asynchronous request. - The parameter is null or empty. - - - Returns an anchor element that contains the URL to the specified action method; when the action link is clicked, the action method is invoked asynchronously by using JavaScript. - An anchor element. - The AJAX helper. - The inner text of the anchor element. - The name of the action method. - An object that contains the parameters for a route. - An object that provides options for the asynchronous request. - The parameter is null or empty. - - - Returns an anchor element that contains the URL to the specified action method; when the action link is clicked, the action method is invoked asynchronously by using JavaScript. - An anchor element. - The AJAX helper. - The inner text of the anchor element. - The name of the action method. - An object that contains the parameters for a route. - An object that provides options for the asynchronous request. - An object that contains the HTML attributes to set for the element. - The parameter is null or empty. - - - Writes an opening <form> tag to the response. - An opening <form> tag. - The AJAX helper. - The name of the action method that will handle the request. - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. - An object that provides options for the asynchronous request. - - - Writes an opening <form> tag to the response. - An opening <form> tag. - The AJAX helper. - The name of the action method that will handle the request. - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. - An object that provides options for the asynchronous request. - An object that contains the HTML attributes to set for the element. - - - Writes an opening <form> tag to the response. - An opening <form> tag. - The AJAX helper. - The name of the action method that will handle the request. - The name of the controller. - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. - An object that provides options for the asynchronous request. - - - Writes an opening <form> tag to the response. - An opening <form> tag. - The AJAX helper. - The name of the action method that will handle the request. - The name of the controller. - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. - An object that provides options for the asynchronous request. - An object that contains the HTML attributes to set for the element. - - - Writes an opening <form> tag to the response. - An opening <form> tag. - The AJAX helper. - The name of the action method that will handle the request. - The name of the controller. - An object that provides options for the asynchronous request. - - - Writes an opening <form> tag to the response. - An opening <form> tag. - The AJAX helper. - The name of the action method that will handle the request. - The name of the controller. - An object that contains the parameters for a route. - An object that provides options for the asynchronous request. - - - Writes an opening <form> tag to the response. - An opening <form> tag. - The AJAX helper. - The name of the action method that will handle the request. - The name of the controller. - An object that contains the parameters for a route. - An object that provides options for the asynchronous request. - An object that contains the HTML attributes to set for the element. - - - Writes an opening <form> tag to the response. - An opening <form> tag. - The AJAX helper. - The name of the action method that will handle the request. - An object that provides options for the asynchronous request. - - - Writes an opening <form> tag to the response. - An opening <form> tag. - The AJAX helper. - The name of the action method that will handle the request. - An object that contains the parameters for a route. - An object that provides options for the asynchronous request. - - - Writes an opening <form> tag to the response. - An opening <form> tag. - The AJAX helper. - The name of the action method that will handle the request. - An object that contains the parameters for a route. - An object that provides options for the asynchronous request. - An object that contains the HTML attributes to set for the element.. - - - Writes an opening <form> tag to the response. - An opening <form> tag. - The AJAX helper. - An object that provides options for the asynchronous request. - - - Writes an opening <form> tag to the response using the specified routing information. - An opening <form> tag. - The AJAX helper. - The name of the route to use to obtain the form post URL. - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. - An object that provides options for the asynchronous request. - - - Writes an opening <form> tag to the response using the specified routing information. - An opening <form> tag. - The AJAX helper. - The name of the route to use to obtain the form post URL. - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. - An object that provides options for the asynchronous request. - An object that contains the HTML attributes to set for the element. - - - Writes an opening <form> tag to the response using the specified routing information. - An opening <form> tag. - The AJAX helper. - The name of the route to use to obtain the form post URL. - An object that provides options for the asynchronous request. - - - Writes an opening <form> tag to the response using the specified routing information. - An opening <form> tag. - The AJAX helper. - The name of the route to use to obtain the form post URL. - An object that contains the parameters for a route. - An object that provides options for the asynchronous request. - - - Writes an opening <form> tag to the response using the specified routing information. - An opening <form> tag. - The AJAX helper. - The name of the route to use to obtain the form post URL. - An object that contains the parameters for a route. - An object that provides options for the asynchronous request. - An object that contains the HTML attributes to set for the element. - - - Returns an HTML script element that contains a reference to a globalization script that defines the culture information. - A script element whose src attribute is set to the globalization script, as in the following example: <script type="text/javascript" src="/MvcApplication1/Scripts/Globalization/en-US.js"></script> - The AJAX helper object that this method extends. - - - Returns an HTML script element that contains a reference to a globalization script that defines the specified culture information. - An HTML script element whose src attribute is set to the globalization script, as in the following example:<script type="text/javascript" src="/MvcApplication1/Scripts/Globalization/en-US.js"></script> - The AJAX helper object that this method extends. - Encapsulates information about the target culture, such as date formats. - The parameter is null. - - - Returns an anchor element that contains the virtual path for the specified route values; when the link is clicked, a request is made to the virtual path asynchronously by using JavaScript. - An anchor element. - The AJAX helper. - The inner text of the anchor element. - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. - An object that provides options for the asynchronous request. - The parameter is null or empty. - - - Returns an anchor element that contains the virtual path for the specified route values; when the link is clicked, a request is made to the virtual path asynchronously by using JavaScript. - An anchor element. - The AJAX helper. - The inner text of the anchor element. - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. - An object that provides options for the asynchronous request. - An object that contains the HTML attributes to set for the element. - The parameter is null or empty. - - - Returns an anchor element that contains the virtual path for the specified route values; when the link is clicked, a request is made to the virtual path asynchronously by using JavaScript. - An anchor element. - The AJAX helper. - The inner text of the anchor element. - The name of the route to use to obtain the form post URL. - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. - An object that provides options for the asynchronous request. - The parameter is null or empty. - - - Returns an anchor element that contains the virtual path for the specified route values; when the link is clicked, a request is made to the virtual path asynchronously by using JavaScript. - An anchor element. - The AJAX helper. - The inner text of the anchor element. - The name of the route to use to obtain the form post URL. - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. - An object that provides options for the asynchronous request. - An object that contains the HTML attributes to set for the element. - The parameter is null or empty. - - - Returns an anchor element that contains the virtual path for the specified route values; when the link is clicked, a request is made to the virtual path asynchronously by using JavaScript. - An anchor element. - The AJAX helper. - The inner text of the anchor element. - The name of the route to use to obtain the form post URL. - The protocol for the URL, such as "http" or "https". - The host name for the URL. - The URL fragment name (the anchor name). - An object that contains the parameters for a route. - An object that provides options for the asynchronous request. - An object that contains the HTML attributes to set for the element. - The parameter is null or empty. - - - Returns an anchor element that contains the virtual path for the specified route values; when the link is clicked, a request is made to the virtual path asynchronously by using JavaScript. - An anchor element. - The AJAX helper. - The inner text of the anchor element. - The name of the route to use to obtain the form post URL. - An object that provides options for the asynchronous request. - The parameter is null or empty. - - - Returns an anchor element that contains the virtual path for the specified route values; when the link is clicked, a request is made to the virtual path asynchronously by using JavaScript. - An anchor element. - The AJAX helper. - The inner text of the anchor element. - The name of the route to use to obtain the form post URL. - An object that provides options for the asynchronous request. - An object that contains the HTML attributes to set for the element. - The parameter is null or empty. - - - Returns an anchor element that contains the virtual path for the specified route values; when the link is clicked, a request is made to the virtual path asynchronously by using JavaScript. - An anchor element. - The AJAX helper. - The inner text of the anchor element. - The name of the route to use to obtain the form post URL. - An object that provides options for the asynchronous request. - An object that contains the HTML attributes to set for the element. - The parameter is null or empty. - - - Returns an anchor element that contains the virtual path for the specified route values; when the link is clicked, a request is made to the virtual path asynchronously by using JavaScript. - An anchor element. - The AJAX helper. - The inner text of the anchor element. - The name of the route to use to obtain the form post URL. - An object that contains the parameters for a route. - An object that provides options for the asynchronous request. - The parameter is null or empty. - - - Returns an anchor element that contains the virtual path for the specified route values; when the link is clicked, a request is made to the virtual path asynchronously by using JavaScript. - An anchor element. - The AJAX helper. - The inner text of the anchor element. - The name of the route to use to obtain the form post URL. - An object that contains the parameters for a route. - An object that provides options for the asynchronous request. - An object that contains the HTML attributes to set for the element. - The parameter is null or empty. - - - Returns an anchor element that contains the virtual path for the specified route values; when the link is clicked, a request is made to the virtual path asynchronously by using JavaScript. - An anchor element. - The AJAX helper. - The inner text of the anchor element. - An object that contains the parameters for a route. - An object that provides options for the asynchronous request. - The parameter is null or empty. - - - Returns an anchor element that contains the virtual path for the specified route values; when the link is clicked, a request is made to the virtual path asynchronously by using JavaScript. - An anchor element. - The AJAX helper. - The inner text of the anchor element. - An object that contains the parameters for a route. - An object that provides options for the asynchronous request. - An object that contains the HTML attributes to set for the element. - The parameter is null or empty. - - - Represents option settings for running AJAX scripts in an MVC application. - - - Initializes a new instance of the class. - - - Gets or sets the message to display in a confirmation window before a request is submitted. - The message to display in a confirmation window. - - - Gets or sets the HTTP request method ("Get" or "Post"). - The HTTP request method. - - - Gets or sets the mode that specifies how to insert the response into the target DOM element. - The insertion mode ("InsertAfter", "InsertBefore", or "Replace"). - - - Gets or sets the id attribute of an HTML element that is displayed while the Ajax function is loading. - The ID of the element that is displayed while the Ajax function is loading. - - - Gets or sets the name of the JavaScript function to call immediately before the page is updated. - The name of the JavaScript function to call before the page is updated. - - - Gets or sets the JavaScript function to call when response data has been instantiated but before the page is updated. - The JavaScript function to call when the response data has been instantiated. - - - Gets or sets the JavaScript function to call if the page update fails. - The JavaScript function to call if the page update fails. - - - Gets or sets the JavaScript function to call after the page is successfully updated. - The JavaScript function to call after the page is successfully updated. - - - Gets or sets the ID of the DOM element to update by using the response from the server. - The ID of the DOM element to update. - - - Gets or sets the URL to make the request to. - The URL to make the request to. - - - Enumerates the AJAX script insertion modes. - - - Replace the element. - - - Insert before the element. - - - Insert after the element. - - - Provides information about an asynchronous action method, such as its name, controller, parameters, attributes, and filters. - - - Initializes a new instance of the class. - - - Invokes the asynchronous action method by using the specified parameters and controller context. - An object that contains the result of an asynchronous call. - The controller context. - The parameters of the action method. - The callback method. - An object that contains information to be used by the callback method. This parameter can be null. - - - Returns the result of an asynchronous operation. - The result of an asynchronous operation. - An object that represents the status of an asynchronous operation. - - - Executes the asynchronous action method by using the specified parameters and controller context. - The result of executing the asynchronous action method. - The controller context. - The parameters of the action method. - - - Represents a class that is responsible for invoking the action methods of an asynchronous controller. - - - Initializes a new instance of the class. - - - Invokes the asynchronous action method by using the specified controller context, action name, callback method, and state. - An object that contains the result of an asynchronous operation. - The controller context. - The name of the action. - The callback method. - An object that contains information to be used by the callback method. This parameter can be null. - - - Invokes the asynchronous action method by using the specified controller context, action descriptor, parameters, callback method, and state. - An object that contains the result of an asynchronous operation. - The controller context. - The action descriptor. - The parameters for the asynchronous action method. - The callback method. - An object that contains information to be used by the callback method. This parameter can be null. - - - Invokes the asynchronous action method by using the specified controller context, filters, action descriptor, parameters, callback method, and state. - An object that contains the result of an asynchronous operation. - The controller context. - The filters. - The action descriptor. - The parameters for the asynchronous action method. - The callback method. - An object that contains information to be used by the callback method. This parameter can be null. - - - Cancels the action. - true if the action was canceled; otherwise, false. - The user-defined object that qualifies or contains information about an asynchronous operation. - - - Cancels the action. - true if the action was canceled; otherwise, false. - The user-defined object that qualifies or contains information about an asynchronous operation. - - - Cancels the action. - true if the action was canceled; otherwise, false. - The user-defined object that qualifies or contains information about an asynchronous operation. - - - Returns the controller descriptor. - The controller descriptor. - The controller context. - - - Provides asynchronous operations for the class. - - - Initializes a new instance of the class. - - - Initializes a new instance of the class using the synchronization context. - The synchronization context. - - - Notifies ASP.NET that all asynchronous operations are complete. - - - Occurs when the method is called. - - - Gets the number of outstanding operations. - The number of outstanding operations. - - - Gets the parameters that were passed to the asynchronous completion method. - The parameters that were passed to the asynchronous completion method. - - - Executes a callback in the current synchronization context. - The asynchronous action. - - - Gets or sets the asynchronous timeout value, in milliseconds. - The asynchronous timeout value, in milliseconds. - - - Defines the interface for an action invoker, which is used to invoke an asynchronous action in response to an HTTP request. - - - Invokes the specified action. - The status of the asynchronous result. - The controller context. - The name of the asynchronous action. - The callback method. - The state. - - - Cancels the asynchronous action. - true if the asynchronous method could be canceled; otherwise, false. - The asynchronous result. - - - Defines the methods that are required for an asynchronous controller. - - - Executes the specified request context. - The status of the asynchronous operation. - The request context. - The asynchronous callback method. - The state. - - - Ends the asynchronous operation. - The asynchronous result. - - - Provides a container for the asynchronous manager object. - - - Gets the asynchronous manager object. - The asynchronous manager object. - - - Provides a container that maintains a count of pending asynchronous operations. - - - Initializes a new instance of the class. - - - Occurs when an asynchronous method completes. - - - Gets the operation count. - The operation count. - - - Reduces the operation count by 1. - The updated operation count. - - - Reduces the operation count by the specified value. - The updated operation count. - The number of operations to reduce the count by. - - - Increments the operation count by one. - The updated operation count. - - - Increments the operation count by the specified value. - The updated operation count. - The number of operations to increment the count by. - - - Provides information about an asynchronous action method, such as its name, controller, parameters, attributes, and filters. - - - Initializes a new instance of the class. - An object that contains information about the method that begins the asynchronous operation (the method whose name ends with "Asynch"). - An object that contains information about the completion method (method whose name ends with "Completed"). - The name of the action. - The controller descriptor. - - - Gets the name of the action method. - The name of the action method. - - - Gets the method information for the asynchronous action method. - The method information for the asynchronous action method. - - - Begins running the asynchronous action method by using the specified parameters and controller context. - An object that contains the result of an asynchronous call. - The controller context. - The parameters of the action method. - The callback method. - An object that contains information to be used by the callback method. This parameter can be null. - - - Gets the method information for the asynchronous completion method. - The method information for the asynchronous completion method. - - - Gets the controller descriptor for the asynchronous action method. - The controller descriptor for the asynchronous action method. - - - Returns the result of an asynchronous operation. - The result of an asynchronous operation. - An object that represents the status of an asynchronous operation. - - - Returns an array of custom attributes that are defined for this member, excluding named attributes. - An array of custom attributes, or an empty array if no custom attributes exist. - true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. - - - Returns an array of custom attributes that are defined for this member, identified by type. - An array of custom attributes, or an empty array if no custom attributes of the specified type exist. - The type of the custom attributes to return. - true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. - - - Returns the filters that are associated with the action method. - The filters that are associated with the action method. - - - Returns the parameters of the action method. - The parameters of the action method. - - - Returns the action method selectors. - The action method selectors. - - - Determines whether one or more instances of the specified attribute type are defined for the action member. - true if an attribute of type that is represented by is defined for this member; otherwise, false. - The type of the custom attribute. - true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. - - - Encapsulates information that describes an asynchronous controller, such as its name, type, and actions. - - - Initializes a new instance of the class. - The type of the controller. - - - Gets the type of the controller. - The type of the controller. - - - Finds an action method by using the specified name and controller context. - The information about the action method. - The controller context. - The name of the action. - - - Returns a list of action method descriptors in the controller. - A list of action method descriptors in the controller. - - - Returns custom attributes that are defined for this member, excluding named attributes. - An array of custom attributes, or an empty array if no custom attributes exist. - true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. - - - Returns custom attributes of a specified type that are defined for this member, excluding named attributes. - An array of custom attributes, or an empty array if no custom attributes exist. - The type of the custom attributes. - true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. - - - Returns a value that indicates whether one or more instances of the specified custom attribute are defined for this member. - true if an attribute of the type represented by is defined for this member; otherwise, false. - The type of the custom attribute. - true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. - - - Represents an exception that occurred during the synchronous processing of an HTTP request in an ASP.NET MVC application. - - - Initializes a new instance of the class using a system-supplied message. - - - Initializes a new instance of the class using the specified message. - The message that describes the exception. The caller of this constructor must make sure that this string has been localized for the current system culture. - - - Initializes a new instance of the class using a specified error message and a reference to the inner exception that is the cause of this exception. - The message that describes the exception. The caller of this constructor must make sure that this string has been localized for the current system culture. - The exception that is the cause of the current exception. If the parameter is not null, the current exception is raised in a catch block that handles the inner exception. - - - Represents support for calling child action methods and rendering the result inline in a parent view. - - - Invokes the specified child action method and returns the result as an HTML string. - The child action result as an HTML string. - The HTML helper instance that this method extends. - The name of the action method to invoke. - The parameter is null. - The parameter is null or empty. - The required virtual path data cannot be found. - - - Invokes the specified child action method with the specified parameters and returns the result as an HTML string. - The child action result as an HTML string. - The HTML helper instance that this method extends. - The name of the action method to invoke. - An object that contains the parameters for a route. You can use to provide the parameters that are bound to the action method parameters. The parameter is merged with the original route values and overrides them. - The parameter is null. - The parameter is null or empty. - The required virtual path data cannot be found. - - - Invokes the specified child action method using the specified controller name and returns the result as an HTML string. - The child action result as an HTML string. - The HTML helper instance that this method extends. - The name of the action method to invoke. - The name of the controller that contains the action method. - The parameter is null. - The parameter is null or empty. - The required virtual path data cannot be found. - - - Invokes the specified child action method using the specified parameters and controller name and returns the result as an HTML string. - The child action result as an HTML string. - The HTML helper instance that this method extends. - The name of the action method to invoke. - The name of the controller that contains the action method. - An object that contains the parameters for a route. You can use to provide the parameters that are bound to the action method parameters. The parameter is merged with the original route values and overrides them. - The parameter is null. - The parameter is null or empty. - The required virtual path data cannot be found. - - - Invokes the specified child action method using the specified parameters and controller name and returns the result as an HTML string. - The child action result as an HTML string. - The HTML helper instance that this method extends. - The name of the action method to invoke. - The name of the controller that contains the action method. - A dictionary that contains the parameters for a route. You can use to provide the parameters that are bound to the action method parameters. The parameter is merged with the original route values and overrides them. - The parameter is null. - The parameter is null or empty. - The required virtual path data cannot be found. - - - Invokes the specified child action method using the specified parameters and returns the result as an HTML string. - The child action result as an HTML string. - The HTML helper instance that this method extends. - The name of the action method to invoke. - A dictionary that contains the parameters for a route. You can use to provide the parameters that are bound to the action method parameters. The parameter is merged with the original route values and overrides them. - The parameter is null. - The parameter is null or empty. - The required virtual path data cannot be found. - - - Invokes the specified child action method and renders the result inline in the parent view. - The HTML helper instance that this method extends. - The name of the child action method to invoke. - The parameter is null. - The parameter is null or empty. - The required virtual path data cannot be found. - - - Invokes the specified child action method using the specified parameters and renders the result inline in the parent view. - The HTML helper instance that this method extends. - The name of the child action method to invoke. - An object that contains the parameters for a route. You can use to provide the parameters that are bound to the action method parameters. The parameter is merged with the original route values and overrides them. - The parameter is null. - The parameter is null or empty. - The required virtual path data cannot be found. - - - Invokes the specified child action method using the specified controller name and renders the result inline in the parent view. - The HTML helper instance that this method extends. - The name of the child action method to invoke. - The name of the controller that contains the action method. - The parameter is null. - The parameter is null or empty. - The required virtual path data cannot be found. - - - Invokes the specified child action method using the specified parameters and controller name and renders the result inline in the parent view. - The HTML helper instance that this method extends. - The name of the child action method to invoke. - The name of the controller that contains the action method. - An object that contains the parameters for a route. You can use to provide the parameters that are bound to the action method parameters. The parameter is merged with the original route values and overrides them. - The parameter is null. - The parameter is null or empty. - The required virtual path data cannot be found. - - - Invokes the specified child action method using the specified parameters and controller name and renders the result inline in the parent view. - The HTML helper instance that this method extends. - The name of the child action method to invoke. - The name of the controller that contains the action method. - A dictionary that contains the parameters for a route. You can use to provide the parameters that are bound to the action method parameters. The parameter is merged with the original route values and overrides them. - The parameter is null. - The parameter is null or empty. - The required virtual path data cannot be found. - - - Invokes the specified child action method using the specified parameters and renders the result inline in the parent view. - The HTML helper instance that this method extends. - The name of the child action method to invoke. - A dictionary that contains the parameters for a route. You can use to provide the parameters that are bound to the action method parameters. The parameter is merged with the original route values and overrides them. - The parameter is null. - The parameter is null or empty. - The required virtual path data cannot be found. - - - Represents support for rendering object values as HTML. - - - Returns HTML markup for each property in the object that is represented by a string expression. - The HTML markup for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to display. - - - Returns HTML markup for each property in the object that is represented by a string expression, using additional view data. - The HTML markup for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to display. - An anonymous object that can contain additional view data that will be merged into the instance that is created for the template. - - - Returns HTML markup for each property in the object that is represented by the expression, using the specified template. - The HTML markup for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to display. - The name of the template that is used to render the object. - - - Returns HTML markup for each property in the object that is represented by the expression, using the specified template and additional view data. - The HTML markup for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to display. - The name of the template that is used to render the object. - An anonymous object that can contain additional view data that will be merged into the instance that is created for the template. - - - Returns HTML markup for each property in the object that is represented by the expression, using the specified template and an HTML field ID. - The HTML markup for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to display. - The name of the template that is used to render the object. - A string that is used to disambiguate the names of HTML input elements that are rendered for properties that have the same name. - - - Returns HTML markup for each property in the object that is represented by the expression, using the specified template, HTML field ID, and additional view data. - The HTML markup for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to display. - The name of the template that is used to render the object. - A string that is used to disambiguate the names of HTML input elements that are rendered for properties that have the same name. - - - - Returns HTML markup for each property in the object that is represented by the expression. - The HTML markup for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to display. - The type of the model. - The type of the value. - - - Returns a string that contains each property value in the object that is represented by the specified expression, using additional view data. - The HTML markup for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to display. - An anonymous object that can contain additional view data that will be merged into the instance that is created for the template. - The type of the model. - The type of the value. - - - Returns a string that contains each property value in the object that is represented by the , using the specified template. - The HTML markup for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to display. - The name of the template that is used to render the object. - The type of the model. - The type of the value. - - - Returns a string that contains each property value in the object that is represented by the specified expression, using the specified template and additional view data. - The HTML markup for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to display. - The name of the template that is used to render the object. - An anonymous object that can contain additional view data that will be merged into the instance that is created for the template. - The type of the model. - The type of the value. - - - Returns HTML markup for each property in the object that is represented by the , using the specified template and an HTML field ID. - The HTML markup for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to display. - The name of the template that is used to render the object. - A string that is used to disambiguate the names of HTML input elements that are rendered for properties that have the same name. - The type of the model. - The type of the value. - - - Returns HTML markup for each property in the object that is represented by the specified expression, using the template, an HTML field ID, and additional view data. - The HTML markup for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to display. - The name of the template that is used to render the object. - A string that is used to disambiguate the names of HTML input elements that are rendered for properties that have the same name. - An anonymous object that can contain additional view data that will be merged into the instance that is created for the template. - The type of the model. - The type of the value. - - - Returns HTML markup for each property in the model. - The HTML markup for each property in the model. - The HTML helper instance that this method extends. - - - Returns HTML markup for each property in the model, using the additional view data. - The HTML markup for each property in the model. - The HTML helper instance that this method extends. - An anonymous object that can contain additional view data that will be merged into the instance that is created for the template. - - - Returns HTML markup for each property in the model using the specified template. - The HTML markup for each property in the model. - The HTML helper instance that this method extends. - The name of the template that is used to render the object. - - - Returns HTML markup for each property in the model, using the specified template and additional view data. - The HTML markup for each property in the model. - The HTML helper instance that this method extends. - The name of the template that is used to render the object. - An anonymous object that can contain additional view data that will be merged into the instance that is created for the template. - - - Returns HTML markup for each property in the model using the specified template and HTML field ID. - The HTML markup for each property in the model. - The HTML helper instance that this method extends. - The name of the template that is used to render the object. - A string that is used to disambiguate the names of HTML input elements that are rendered for properties that have the same name. - - - Returns HTML markup for each property in the model, using the specified template, an HTML field ID, and additional view data. - The HTML markup for each property in the model. - The HTML helper instance that this method extends. - The name of the template that is used to render the object. - A string that is used to disambiguate the names of HTML input elements that are rendered for properties that have the same name. - An anonymous object that can contain additional view data that will be merged into the instance that is created for the template. - - - Provides a way to render object values as HTML. - - - Returns HTML markup for each property in the object that is represented by the specified expression. - The HTML markup for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to display. - - - Returns HTML markup for each property in the object that is represented by the specified expression. - The HTML markup for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to display. - The type of the model. - The type of the value. - - - Represents support for the HTML input element in an application. - - - Returns an HTML input element for each property in the object that is represented by the expression. - An HTML input element for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to display. - - - Returns an HTML input element for each property in the object that is represented by the expression, using the additional view data. - An HTML input element for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to display. - An anonymous object that can contain additional view data that will be merged into the instance that is created for the template. - - - Returns an HTML input element for each property in the object that is represented by the expression, using the specified template. - An HTML input element for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to display. - The name of the template to use to render the object. - - - Returns an HTML input element for each property in the object that is represented by the expression, using the specified template and additional view data. - An HTML input element for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to display. - The name of the template to use to render the object. - An anonymous object that can contain additional view data that will be merged into the instance that is created for the template. - - - Returns an HTML input element for each property in the object that is represented by the expression, using the specified template and HTML field name. - An HTML input element for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to display. - The name of the template to use to render the object. - A string that is used to disambiguate the names of HTML input elements that are rendered for properties that have the same name. - - - Returns an HTML input element for each property in the object that is represented by the expression, using the specified template, HTML field name, and additional view data. - An HTML input element for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to display. - The name of the template to use to render the object. - A string that is used to disambiguate the names of HTML input elements that are rendered for properties that have the same name. - An anonymous object that can contain additional view data that will be merged into the instance that is created for the template. - - - Returns an HTML input element for each property in the object that is represented by the expression. - An HTML input element for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to display. - The type of the model. - The type of the value. - - - Returns an HTML input element for each property in the object that is represented by the expression, using the additional view data. - An HTML input element for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to display. - An anonymous object that can contain additional view data that will be merged into the instance that is created for the template. - The type of the model. - The type of the value. - - - Returns an HTML input element for each property in the object that is represented by the expression, using the specified template. - An HTML input element for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to display. - The name of the template to use to render the object. - The type of the model. - The type of the value. - - - Returns an HTML input element for each property in the object that is represented by the expression, using the specified template and additional view data. - An HTML input element for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to display. - The name of the template to use to render the object. - An anonymous object that can contain additional view data that will be merged into the instance that is created for the template. - The type of the model. - The type of the value. - - - Returns an HTML input element for each property in the object that is represented by the expression, using the specified template and HTML field name. - An HTML input element for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to display. - The name of the template to use to render the object. - A string that is used to disambiguate the names of HTML input elements that are rendered for properties that have the same name. - The type of the model. - The type of the value. - - - Returns an HTML input element for each property in the object that is represented by the expression, using the specified template, HTML field name, and additional view data. - An HTML input element for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to display. - The name of the template to use to render the object. - A string that is used to disambiguate the names of HTML input elements that are rendered for properties that have the same name. - An anonymous object that can contain additional view data that will be merged into the instance that is created for the template. - The type of the model. - The type of the value. - - - Returns an HTML input element for each property in the model. - An HTML input element for each property in the model. - The HTML helper instance that this method extends. - - - Returns an HTML input element for each property in the model, using additional view data. - An HTML input element for each property in the model. - The HTML helper instance that this method extends. - An anonymous object that can contain additional view data that will be merged into the instance that is created for the template. - - - Returns an HTML input element for each property in the model, using the specified template. - An HTML input element for each property in the model and in the specified template. - The HTML helper instance that this method extends. - The name of the template to use to render the object. - - - Returns an HTML input element for each property in the model, using the specified template and additional view data. - An HTML input element for each property in the model. - The HTML helper instance that this method extends. - The name of the template to use to render the object. - An anonymous object that can contain additional view data that will be merged into the instance that is created for the template. - - - Returns an HTML input element for each property in the model, using the specified template name and HTML field name. - An HTML input element for each property in the model and in the named template. - The HTML helper instance that this method extends. - The name of the template to use to render the object. - A string that is used to disambiguate the names of HTML input elements that are rendered for properties that have the same name. - - - Returns an HTML input element for each property in the model, using the template name, HTML field name and additional view data. - An HTML input element for each property in the model. - The HTML helper instance that this method extends. - The name of the template to use to render the object. - A string that is used to disambiguate the names of HTML input elements that are rendered for properties that have the same name. - An anonymous object that can contain additional view data that will be merged into the instance that is created for the template. - - - Represents support for HTML in an application. - - - Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by an action method. - An opening <form> tag. - The HTML helper instance that this method extends. - - - Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by an action method. - An opening <form> tag. - The HTML helper instance that this method extends. - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. - - - Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by an action method. - An opening <form> tag. - The HTML helper instance that this method extends. - The name of the action method. - The name of the controller. - - - Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by an action method. - An opening <form> tag. - The HTML helper instance that this method extends. - The name of the action method. - The name of the controller. - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. - - - Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by an action method. - An opening <form> tag. - The HTML helper instance that this method extends. - The name of the action method. - The name of the controller. - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. - The HTTP method for processing the form, either GET or POST. - - - Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by an action method. - An opening <form> tag. - The HTML helper instance that this method extends. - The name of the action method. - The name of the controller. - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. - The HTTP method for processing the form, either GET or POST. - An object that contains the HTML attributes to set for the element. - - - Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by an action method. - An opening <form> tag. - The HTML helper instance that this method extends. - The name of the action method. - The name of the controller. - The HTTP method for processing the form, either GET or POST. - - - Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by an action method. - An opening <form> tag. - The HTML helper instance that this method extends. - The name of the action method. - The name of the controller. - The HTTP method for processing the form, either GET or POST. - An object that contains the HTML attributes to set for the element. - - - Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by an action method. - An opening <form> tag. - The HTML helper instance that this method extends. - The name of the action method. - The name of the controller. - The HTTP method for processing the form, either GET or POST. - An object that contains the HTML attributes to set for the element. - - - Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by an action method. - An opening <form> tag. - The HTML helper instance that this method extends. - The name of the action method. - The name of the controller. - An object that contains the parameters for a route. - - - Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by an action method. - An opening <form> tag. - The HTML helper instance that this method extends. - The name of the action method. - The name of the controller. - An object that contains the parameters for a route. - The HTTP method for processing the form, either GET or POST. - - - Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by an action method. - An opening <form> tag. - The HTML helper instance that this method extends. - The name of the action method. - The name of the controller. - An object that contains the parameters for a route. - The HTTP method for processing the form, either GET or POST. - An object that contains the HTML attributes to set for the element. - - - Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by an action method. - An opening <form> tag. - The HTML helper instance that this method extends. - An object that contains the parameters for a route. - - - Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by the route target. - An opening <form> tag. - The HTML helper instance that this method extends. - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. - - - Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by the route target. - An opening <form> tag. - The HTML helper instance that this method extends. - The name of the route to use to obtain the form-post URL. - - - Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by the route target. - An opening <form> tag. - The HTML helper instance that this method extends. - The name of the route to use to obtain the form-post URL. - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. - - - Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by the route target. - An opening <form> tag. - The HTML helper instance that this method extends. - The name of the route to use to obtain the form-post URL. - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. - The HTTP method for processing the form, either GET or POST. - - - Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by the route target. - An opening <form> tag. - The HTML helper instance that this method extends. - The name of the route to use to obtain the form-post URL. - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. - The HTTP method for processing the form, either GET or POST. - An object that contains the HTML attributes to set for the element. - - - Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by the route target. - An opening <form> tag. - The HTML helper instance that this method extends. - The name of the route to use to obtain the form-post URL. - The HTTP method for processing the form, either GET or POST. - - - Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by the route target. - An opening <form> tag. - The HTML helper instance that this method extends. - The name of the route to use to obtain the form-post URL. - The HTTP method for processing the form, either GET or POST. - An object that contains the HTML attributes to set for the element. - - - Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by the route target. - An opening <form> tag. - The HTML helper instance that this method extends. - The name of the route to use to obtain the form-post URL. - The HTTP method for processing the form, either GET or POST. - An object that contains the HTML attributes to set for the element. - - - Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by the route target. - An opening <form> tag. - The HTML helper instance that this method extends. - The name of the route to use to obtain the form-post URL. - An object that contains the parameters for a route - - - Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by the route target. - An opening <form> tag. - The HTML helper instance that this method extends. - The name of the route to use to obtain the form-post URL. - An object that contains the parameters for a route - The HTTP method for processing the form, either GET or POST. - - - Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by the route target. - An opening <form> tag. - The HTML helper instance that this method extends. - The name of the route to use to obtain the form-post URL. - An object that contains the parameters for a route - The HTTP method for processing the form, either GET or POST. - An object that contains the HTML attributes to set for the element. - - - Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by the route target. - An opening <form> tag. - The HTML helper instance that this method extends. - An object that contains the parameters for a route - - - Renders the closing </form> tag to the response. - The HTML helper instance that this method extends. - - - Represents support for HTML input controls in an application. - - - Returns a check box input element by using the specified HTML helper and the name of the form field. - An input element whose type attribute is set to "checkbox". - The HTML helper instance that this method extends. - The name of the form field. - - - Returns a check box input element by using the specified HTML helper, the name of the form field, and a value to indicate whether the check box is selected. - An input element whose type attribute is set to "checkbox". - The HTML helper instance that this method extends. - The name of the form field. - true to select the check box; otherwise, false. - - - Returns a check box input element by using the specified HTML helper, the name of the form field, a value to indicate whether the check box is selected, and the HTML attributes. - An input element whose type attribute is set to "checkbox". - The HTML helper instance that this method extends. - The name of the form field. - true to select the check box; otherwise, false. - An object that contains the HTML attributes to set for the element. - - - Returns a check box input element by using the specified HTML helper, the name of the form field, a value that indicates whether the check box is selected, and the HTML attributes. - An input element whose type attribute is set to "checkbox". - The HTML helper instance that this method extends. - The name of the form field. - true to select the check box; otherwise, false. - An object that contains the HTML attributes to set for the element. - - - Returns a check box input element by using the specified HTML helper, the name of the form field, and the HTML attributes. - An input element whose type attribute is set to "checkbox". - The HTML helper instance that this method extends. - The name of the form field. - An object that contains the HTML attributes to set for the element. - - - Returns a check box input element by using the specified HTML helper, the name of the form field, and the HTML attributes. - An input element whose type attribute is set to "checkbox". - The HTML helper instance that this method extends. - The name of the form field. - An object that contains the HTML attributes to set for the element. - - - Returns a check box input element for each property in the object that is represented by the specified expression. - An HTML input element whose type attribute is set to "checkbox" for each property in the object that is represented by the specified expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to render. - The type of the model. - The parameter is null. - - - Returns a check box input element for each property in the object that is represented by the specified expression, using the specified HTML attributes. - An HTML input element whose type attribute is set to "checkbox" for each property in the object that is represented by the specified expression, using the specified HTML attributes. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to render. - A dictionary that contains the HTML attributes to set for the element. - The type of the model. - The parameter is null. - - - Returns a check box input element for each property in the object that is represented by the specified expression, using the specified HTML attributes. - An HTML input element whose type attribute is set to "checkbox" for each property in the object that is represented by the specified expression, using the specified HTML attributes. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to render. - An object that contains the HTML attributes to set for the element. - The type of the model. - The parameter is null. - - - Returns a hidden input element by using the specified HTML helper and the name of the form field. - An input element whose type attribute is set to "hidden". - The HTML helper instance that this method extends. - The name of the form field and the key that is used to look up the value. - - - Returns a hidden input element by using the specified HTML helper, the name of the form field, and the value. - An input element whose type attribute is set to "hidden". - The HTML helper instance that this method extends. - The name of the form field and the key that is used to look up the value. - The value of the hidden input element. If this value is null, the value of the element is retrieved from the object. If no value exists there, the value is retrieved from the object. - - - Returns a hidden input element by using the specified HTML helper, the name of the form field, the value, and the HTML attributes. - An input element whose type attribute is set to "hidden". - The HTML helper instance that this method extends. - The name of the form field and the key that is used to look up the value. - The value of the hidden input element. If this value is null, the value of the element is retrieved from the object. If no value exists there, the value is retrieved from the object. - An object that contains the HTML attributes to set for the element. - - - Returns a hidden input element by using the specified HTML helper, the name of the form field, the value, and the HTML attributes. - An input element whose type attribute is set to "hidden". - The HTML helper instance that this method extends. - The name of the form field and the key that is used to look up the value. - The value of the hidden input element. If this value is null, the value of the element is retrieved from the object. If no value exists there, the value is retrieved from the object. - An object that contains the HTML attributes to set for the element. - - - Returns an HTML hidden input element for each property in the object that is represented by the specified expression. - An input element whose type attribute is set to "hidden" for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to render. - The type of the model. - The type of the value. - The parameter is null or empty. - - - Returns an HTML hidden input element for each property in the object that is represented by the specified expression, using the specified HTML attributes. - An input element whose type attribute is set to "hidden" for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to render. - A dictionary that contains the HTML attributes to set for the element. - The type of the model. - The type of the value. - The parameter is null or empty. - - - Returns an HTML hidden input element for each property in the object that is represented by the specified expression, using the specified HTML attributes. - An input element whose type attribute is set to "hidden" for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to render. - An object that contains the HTML attributes to set for the element. - The type of the model. - The type of the value. - The parameter is null or empty. - - - Returns a password input element by using the specified HTML helper and the name of the form field. - An input element whose type attribute is set to "password". - The HTML helper instance that this method extends. - The name of the form field and the key that is used to look up the value. - - - Returns a password input element by using the specified HTML helper, the name of the form field, and the value. - An input element whose type attribute is set to "password". - The HTML helper instance that this method extends. - The name of the form field and the key that is used to look up the value. - The value of the password input element. If this value is null, the value of the element is retrieved from the object. If no value exists there, the value is retrieved from the object. - - - Returns a password input element by using the specified HTML helper, the name of the form field, the value, and the HTML attributes. - An input element whose type attribute is set to "password". - The HTML helper instance that this method extends. - The name of the form field and the key that is used to look up the value. - The value of the password input element. If this value is null, the value of the element is retrieved from the object. If no value exists there, the value is retrieved from the object. - An object that contains the HTML attributes to set for the element. - - - Returns a password input element by using the specified HTML helper, the name of the form field, the value, and the HTML attributes. - An input element whose type attribute is set to "password". - The HTML helper instance that this method extends. - The name of the form field and the key that is used to look up the value. - The value of the password input element. If this value is null, the value of the element is retrieved from the object. If no value exists there, the value is retrieved from the object. - An object that contains the HTML attributes to set for the element. - - - Returns a password input element for each property in the object that is represented by the specified expression. - An HTML input element whose type attribute is set to "password" for each property in the object that is represented by the specified expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to render. - The type of the model. - The type of the value. - The parameter is null. - - - Returns a password input element for each property in the object that is represented by the specified expression, using the specified HTML attributes. - An HTML input element whose type attribute is set to "password" for each property in the object that is represented by the specified expression, using the specified HTML attributes. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to render. - A dictionary that contains the HTML attributes to set for the element. - The type of the model. - The type of the value. - The parameter is null. - - - Returns a password input element for each property in the object that is represented by the specified expression, using the specified HTML attributes. - An HTML input element whose type attribute is set to "password" for each property in the object that is represented by the specified expression, using the specified HTML attributes. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to render. - An object that contains the HTML attributes to set for the element. - The type of the model. - The type of the value. - The parameter is null. - - - Returns a radio button input element that is used to present mutually exclusive options. - An input element whose type attribute is set to "radio". - The HTML helper instance that this method extends. - The name of the form field and the key that is used to look up the value. - If this radio button is selected, the value of the radio button that is submitted when the form is posted. If the value of the selected radio button in the or the object matches this value, this radio button is selected. - The parameter is null or empty. - The parameter is null. - - - Returns a radio button input element that is used to present mutually exclusive options. - An input element whose type attribute is set to "radio". - The HTML helper instance that this method extends. - The name of the form field and the key that is used to look up the value. - If this radio button is selected, the value of the radio button that is submitted when the form is posted. If the value of the selected radio button in the or the object matches this value, this radio button is selected. - true to select the radio button; otherwise, false. - The parameter is null or empty. - The parameter is null. - - - Returns a radio button input element that is used to present mutually exclusive options. - An input element whose type attribute is set to "radio". - The HTML helper instance that this method extends. - The name of the form field and the key that is used to look up the value. - If this radio button is selected, the value of the radio button that is submitted when the form is posted. If the value of the selected radio button in the or the object matches this value, this radio button is selected. - true to select the radio button; otherwise, false. - An object that contains the HTML attributes to set for the element. - The parameter is null or empty. - The parameter is null. - - - Returns a radio button input element that is used to present mutually exclusive options. - An input element whose type attribute is set to "radio". - The HTML helper instance that this method extends. - The name of the form field and the key that is used to look up the value. - If this radio button is selected, the value of the radio button that is submitted when the form is posted. If the value of the selected radio button in the or the object matches this value, this radio button is selected. - true to select the radio button; otherwise, false. - An object that contains the HTML attributes to set for the element. - The parameter is null or empty. - The parameter is null. - - - Returns a radio button input element that is used to present mutually exclusive options. - An input element whose type attribute is set to "radio". - The HTML helper instance that this method extends. - The name of the form field and the key that is used to look up the value. - If this radio button is selected, the value of the radio button that is submitted when the form is posted. If the value of the selected radio button in the or the object matches this value, this radio button is selected. - An object that contains the HTML attributes to set for the element. - The parameter is null or empty. - The parameter is null. - - - Returns a radio button input element that is used to present mutually exclusive options. - An input element whose type attribute is set to "radio". - The HTML helper instance that this method extends. - The name of the form field and the key that is used to look up the value. - If this radio button is selected, the value of the radio button that is submitted when the form is posted. If the value of the selected radio button in the or the object matches this value, this radio button is selected. - An object that contains the HTML attributes to set for the element. - The parameter is null or empty. - The parameter is null. - - - Returns a radio button input element for each property in the object that is represented by the specified expression. - An HTML input element whose type attribute is set to "radio" for each property in the object that is represented by the specified expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to render. - If this radio button is selected, the value of the radio button that is submitted when the form is posted. If the value of the selected radio button in the or the object matches this value, this radio button is selected. - The type of the model. - The type of the value. - The parameter is null. - - - Returns a radio button input element for each property in the object that is represented by the specified expression, using the specified HTML attributes. - An HTML input element whose type attribute is set to "radio" for each property in the object that is represented by the specified expression, using the specified HTML attributes. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to render. - If this radio button is selected, the value of the radio button that is submitted when the form is posted. If the value of the selected radio button in the or the object matches this value, this radio button is selected. - A dictionary that contains the HTML attributes to set for the element. - The type of the model. - The type of the value. - The parameter is null. - - - Returns a radio button input element for each property in the object that is represented by the specified expression, using the specified HTML attributes. - An HTML input element whose type attribute is set to "radio" for each property in the object that is represented by the specified expression, using the specified HTML attributes. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to render. - If this radio button is selected, the value of the radio button that is submitted when the form is posted. If the value of the selected radio button in the or the object matches this value, this radio button is selected. - An object that contains the HTML attributes to set for the element. - The type of the model. - The type of the value. - The parameter is null. - - - Returns a text input element by using the specified HTML helper and the name of the form field. - An input element whose type attribute is set to "text". - The HTML helper instance that this method extends. - The name of the form field and the key that is used to look up the value. - - - Returns a text input element by using the specified HTML helper, the name of the form field, and the value. - An input element whose type attribute is set to "text". - The HTML helper instance that this method extends. - The name of the form field and the key that is used to look up the value. - The value of the text input element. If this value is null, the value of the element is retrieved from the object. If no value exists there, the value is retrieved from the object. - - - Returns a text input element by using the specified HTML helper, the name of the form field, the value, and the HTML attributes. - An input element whose type attribute is set to "text". - The HTML helper instance that this method extends. - The name of the form field and the key that is used to look up the value. - The value of the text input element. If this value is null, the value of the element is retrieved from the object. If no value exists there, the value is retrieved from the object. - An object that contains the HTML attributes to set for the element. - - - Returns a text input element by using the specified HTML helper, the name of the form field, the value, and the HTML attributes. - An input element whose type attribute is set to "text". - The HTML helper instance that this method extends. - The name of the form field and the key that is used to look up the value. - The value of the text input element. If this value is null, the value of the element is retrieved from the object. If no value exists there, the value is retrieved from the object. - An object that contains the HTML attributes to set for the element. - - - Returns a text input element for each property in the object that is represented by the specified expression. - An HTML input element whose type attribute is set to "text" for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to render. - The type of the model. - The type of the value. - The parameter is null or empty. - - - Returns a text input element for each property in the object that is represented by the specified expression, using the specified HTML attributes. - An HTML input element type attribute is set to "text" for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to render. - A dictionary that contains the HTML attributes to set for the element. - The type of the model. - The type of the value. - The parameter is null or empty. - - - Returns a text input element for each property in the object that is represented by the specified expression, using the specified HTML attributes. - An HTML input element whose type attribute is set to "text" for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to render. - An object that contains the HTML attributes to set for the element. - The type of the model. - The type of the value. - The parameter is null or empty. - - - Represents support for the HTML label element in an ASP.NET MVC view. - - - Returns an HTML label element and the property name of the property that is represented by the specified expression. - An HTML label element and the property name of the property that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the property to display. - - - Returns an HTML label element and the property name of the property that is represented by the specified expression. - An HTML label element and the property name of the property that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the property to display. - The type of the model. - The type of the value. - - - Returns an HTML label element and the property name of the property that is represented by the model. - An HTML label element and the property name of the property that is represented by the model. - The HTML helper instance that this method extends. - - - Represents support for HTML links in an application. - - - Returns an anchor element (a element) that contains the virtual path of the specified action. - An anchor element (a element). - The HTML helper instance that this method extends. - The inner text of the anchor element. - The name of the action. - The parameter is null or empty. - - - Returns an anchor element (a element) that contains the virtual path of the specified action. - An anchor element (a element). - The HTML helper instance that this method extends. - The inner text of the anchor element. - The name of the action. - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. The object is typically created by using object initializer syntax. - The parameter is null or empty. - - - Returns an anchor element (a element) that contains the virtual path of the specified action. - An anchor element (a element). - The HTML helper instance that this method extends. - The inner text of the anchor element. - The name of the action. - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. The object is typically created by using object initializer syntax. - An object that contains the HTML attributes for the element. The attributes are retrieved through reflection by examining the properties of the object. The object is typically created by using object initializer syntax. - The parameter is null or empty. - - - Returns an anchor element (a element) that contains the virtual path of the specified action. - An anchor element (a element). - The HTML helper instance that this method extends. - The inner text of the anchor element. - The name of the action. - The name of the controller. - The parameter is null or empty. - - - Returns an anchor element (a element) that contains the virtual path of the specified action. - An anchor element (a element). - The HTML helper instance that this method extends. - The inner text of the anchor element. - The name of the action. - The name of the controller. - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. The object is typically created by using object initializer syntax. - An object that contains the HTML attributes to set for the element. - The parameter is null or empty. - - - Returns an anchor element (a element) that contains the virtual path of the specified action. - An anchor element (a element). - The HTML helper instance that this method extends. - The inner text of the anchor element. - The name of the action. - The name of the controller. - The protocol for the URL, such as "http" or "https". - The host name for the URL. - The URL fragment name (the anchor name). - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. The object is typically created by using object initializer syntax. - An object that contains the HTML attributes to set for the element. - The parameter is null or empty. - - - Returns an anchor element (a element) that contains the virtual path of the specified action. - An anchor element (a element). - The HTML helper instance that this method extends. - The inner text of the anchor element. - The name of the action. - The name of the controller. - The protocol for the URL, such as "http" or "https". - The host name for the URL. - The URL fragment name (the anchor name). - An object that contains the parameters for a route. - An object that contains the HTML attributes to set for the element. - The parameter is null or empty. - - - Returns an anchor element (a element) that contains the virtual path of the specified action. - An anchor element (a element). - The HTML helper instance that this method extends. - The inner text of the anchor element. - The name of the action. - The name of the controller. - An object that contains the parameters for a route. - An object that contains the HTML attributes to set for the element. - The parameter is null or empty. - - - Returns an anchor element (a element) that contains the virtual path of the specified action. - An anchor element (a element). - The HTML helper instance that this method extends. - The inner text of the anchor element. - The name of the action. - An object that contains the parameters for a route. - The parameter is null or empty. - - - Returns an anchor element (a element) that contains the virtual path of the specified action. - An anchor element (a element). - The HTML helper instance that this method extends. - The inner text of the anchor element. - The name of the action. - An object that contains the parameters for a route. - An object that contains the HTML attributes to set for the element. - The parameter is null or empty. - - - Returns an anchor element (a element) that contains the virtual path of the specified action. - An anchor element (a element). - The HTML helper instance that this method extends. - The inner text of the anchor element. - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. The object is typically created by using object initializer syntax. - The parameter is null or empty. - - - Returns an anchor element (a element) that contains the virtual path of the specified action. - An anchor element (a element). - The HTML helper instance that this method extends. - The inner text of the anchor element. - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. The object is typically created by using object initializer syntax. - An object that contains the HTML attributes to set for the element. - The parameter is null or empty. - - - Returns an anchor element (a element) that contains the virtual path of the specified action. - An anchor element (a element). - The HTML helper instance that this method extends. - The inner text of the anchor element. - The name of the route that is used to return a virtual path. - The parameter is null or empty. - - - Returns an anchor element (a element) that contains the virtual path of the specified action. - An anchor element (a element). - The HTML helper instance that this method extends. - The inner text of the anchor element. - The name of the route that is used to return a virtual path. - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. The object is typically created by using object initializer syntax. - The parameter is null or empty. - - - Returns an anchor element (a element) that contains the virtual path of the specified action. - An anchor element (a element). - The HTML helper instance that this method extends. - The inner text of the anchor element. - The name of the route that is used to return a virtual path. - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. The object is typically created by using object initializer syntax. - An object that contains the HTML attributes to set for the element. - The parameter is null or empty. - - - Returns an anchor element (a element) that contains the virtual path of the specified action. - An anchor element (a element). - The HTML helper instance that this method extends. - The inner text of the anchor element. - The name of the route that is used to return a virtual path. - The protocol for the URL, such as "http" or "https". - The host name for the URL. - The URL fragment name (the anchor name). - An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. The object is typically created by using object initializer syntax. - An object that contains the HTML attributes to set for the element. - The parameter is null or empty. - - - Returns an anchor element (a element) that contains the virtual path of the specified action. - An anchor element (a element). - The HTML helper instance that this method extends. - The inner text of the anchor element. - The name of the route that is used to return a virtual path. - The protocol for the URL, such as "http" or "https". - The host name for the URL. - The URL fragment name (the anchor name). - An object that contains the parameters for a route. - An object that contains the HTML attributes to set for the element. - The parameter is null or empty. - - - Returns an anchor element (a element) that contains the virtual path of the specified action. - An anchor element (a element). - The HTML helper instance that this method extends. - The inner text of the anchor element. - The name of the route that is used to return a virtual path. - An object that contains the parameters for a route. - The parameter is null or empty. - - - Returns an anchor element (a element) that contains the virtual path of the specified action. - An anchor element (a element). - The HTML helper instance that this method extends. - The inner text of the anchor element. - The name of the route that is used to return a virtual path. - An object that contains the parameters for a route. - An object that contains the HTML attributes to set for the element. - The parameter is null or empty. - - - Returns an anchor element (a element) that contains the virtual path of the specified action. - An anchor element (a element). - The HTML helper instance that this method extends. - The inner text of the anchor element. - An object that contains the parameters for a route. - The parameter is null or empty. - - - Returns an anchor element (a element) that contains the virtual path of the specified action. - An anchor element (a element). - The HTML helper instance that this method extends. - The inner text of the anchor element. - An object that contains the parameters for a route. - An object that contains the HTML attributes to set for the element. - The parameter is null or empty. - - - Represents an HTML form element in an MVC view. - - - Initializes a new instance of the class using the specified HTTP response object. - The HTTP response object. - The parameter is null. - - - Initializes a new instance of the class using the specified view context. - An object that encapsulates the information that is required in order to render a view. - The parameter is null. - - - Releases all resources that are used by the current instance of the class. - - - Releases unmanaged and, optionally, managed resources used by the current instance of the class. - true to release both managed and unmanaged resources; false to release only unmanaged resources. - - - Ends the form and disposes of all form resources. - - - Represents the functionality to render a partial view as an HTML-encoded string. - - - Renders the specified partial view as an HTML-encoded string. - The partial view that is rendered as an HTML-encoded string. - The HTML helper instance that this method extends. - The name of the partial view to render. - - - Renders the specified partial view as an HTML-encoded string. - The partial view that is rendered as an HTML-encoded string. - The HTML helper instance that this method extends. - The name of the partial view to render. - The model for the partial view. - - - Renders the specified partial view as an HTML-encoded string. - The partial view that is rendered as an HTML-encoded string. - The HTML helper instance that this method extends. - The name of the partial view. - The model for the partial view. - The view data dictionary for the partial view. - - - Renders the specified partial view as an HTML-encoded string. - The partial view that is rendered as an HTML-encoded string. - The HTML helper instance that this method extends. - The name of the partial view to render. - The view data dictionary for the partial view. - - - Provides support for rendering a partial view. - - - Renders the specified partial view by using the specified HMTL helper. - The HTML helper. - The name of the partial view - - - Renders the specified partial view, passing it a copy of the current object, but with the Model property set to the specified model. - The HTML helper. - The name of the partial view. - The model. - - - Renders the specified partial view, replacing the partial view's ViewData property with the specified object and setting the Model property of the view data to the specified model. - The HTML helper. - The name of the partial view. - The model for the partial view. - The view data for the partial view. - - - Renders the specified partial view, replacing its ViewData property with the specified object. - The HTML helper. - The name of the partial view. - The view data. - - - Represents support for making selections in a list. - - - Returns a single-selection select element using the specified HTML helper and the name of the form field. - An HTML select element. - The HTML helper instance that this method extends. - The name of the form field to return. - The parameter is null or empty. - - - Returns a single-selection select element using the specified HTML helper, the name of the form field, and the specified list items. - An HTML select element with an option subelement for each item in the list. - The HTML helper instance that this method extends. - The name of the form field to return. - A collection of objects that are used to populate the drop-down list. - The parameter is null or empty. - - - Returns a single-selection select element using the specified HTML helper, the name of the form field, the specified list items, and the specified HTML attributes. - An HTML select element with an option subelement for each item in the list. - The HTML helper instance that this method extends. - The name of the form field to return. - A collection of objects that are used to populate the drop-down list. - An object that contains the HTML attributes to set for the element. - The parameter is null or empty. - - - Returns a single-selection select element using the specified HTML helper, the name of the form field, the specified list items, and the specified HTML attributes. - An HTML select element with an option subelement for each item in the list. - The HTML helper instance that this method extends. - The name of the form field to return. - A collection of objects that are used to populate the drop-down list. - An object that contains the HTML attributes to set for the element. - The parameter is null or empty. - - - Returns a single-selection select element using the specified HTML helper, the name of the form field, the specified list items, and an option label. - An HTML select element with an option subelement for each item in the list. - The HTML helper instance that this method extends. - The name of the form field to return. - A collection of objects that are used to populate the drop-down list. - The text for a default empty item. This parameter can be null. - The parameter is null or empty. - - - Returns a single-selection select element using the specified HTML helper, the name of the form field, the specified list items, an option label, and the specified HTML attributes. - An HTML select element with an option subelement for each item in the list. - The HTML helper instance that this method extends. - The name of the form field to return. - A collection of objects that are used to populate the drop-down list. - The text for a default empty item. This parameter can be null. - An object that contains the HTML attributes to set for the element. - The parameter is null or empty. - - - Returns a single-selection select element using the specified HTML helper, the name of the form field, the specified list items, an option label, and the specified HTML attributes. - An HTML select element with an option subelement for each item in the list. - The HTML helper instance that this method extends. - The name of the form field to return. - A collection of objects that are used to populate the drop-down list. - The text for a default empty item. This parameter can be null. - An object that contains the HTML attributes to set for the element. - The parameter is null or empty. - - - Returns a single-selection select element using the specified HTML helper, the name of the form field, and an option label. - An HTML select element with an option subelement for each item in the list. - The HTML helper instance that this method extends. - The name of the form field to return. - The text for a default empty item. This parameter can be null. - The parameter is null or empty. - - - Returns an HTML select element for each property in the object that is represented by the specified expression using the specified list items. - An HTML select element for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to render. - A collection of objects that are used to populate the drop-down list. - The type of the model. - The type of the value. - The parameter is null. - - - Returns an HTML select element for each property in the object that is represented by the specified expression using the specified list items and HTML attributes. - An HTML select element for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to render. - A collection of objects that are used to populate the drop-down list. - A dictionary that contains the HTML attributes to set for the element. - The type of the model. - The type of the value. - The parameter is null. - - - Returns an HTML select element for each property in the object that is represented by the specified expression using the specified list items and HTML attributes. - An HTML select element for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to render. - A collection of objects that are used to populate the drop-down list. - An object that contains the HTML attributes to set for the element. - The type of the model. - The type of the value. - The parameter is null. - - - Returns an HTML select element for each property in the object that is represented by the specified expression using the specified list items and option label. - An HTML select element for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to render. - A collection of objects that are used to populate the drop-down list. - The text for a default empty item. This parameter can be null. - The type of the model. - The type of the value. - The parameter is null. - - - Returns an HTML select element for each property in the object that is represented by the specified expression using the specified list items, option label, and HTML attributes. - An HTML select element for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to render. - A collection of objects that are used to populate the drop-down list. - The text for a default empty item. This parameter can be null. - A dictionary that contains the HTML attributes to set for the element. - The type of the model. - The type of the value. - The parameter is null. - - - Returns an HTML select element for each property in the object that is represented by the specified expression using the specified list items, option label, and HTML attributes. - An HTML select element for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to render. - A collection of objects that are used to populate the drop-down list. - The text for a default empty item. This parameter can be null. - An object that contains the HTML attributes to set for the element. - The type of the model. - The type of the value. - - - Returns a multi-select select element using the specified HTML helper and the name of the form field. - An HTML select element. - The HTML helper instance that this method extends. - The name of the form field to return. - The parameter is null or empty. - - - Returns a multi-select select element using the specified HTML helper, the name of the form field, and the specified list items. - An HTML select element with an option subelement for each item in the list. - The HTML helper instance that this method extends. - The name of the form field to return. - A collection of objects that are used to populate the drop-down list. - The parameter is null or empty. - - - Returns a multi-select select element using the specified HTML helper, the name of the form field, the specified list items, and the specified HMTL attributes. - An HTML select element with an option subelement for each item in the list.. - The HTML helper instance that this method extends. - The name of the form field to return. - A collection of objects that are used to populate the drop-down list. - An object that contains the HTML attributes to set for the element. - The parameter is null or empty. - - - Returns a multi-select select element using the specified HTML helper, the name of the form field, and the specified list items. - An HTML select element with an option subelement for each item in the list.. - The HTML helper instance that this method extends. - The name of the form field to return. - A collection of objects that are used to populate the drop-down list. - An object that contains the HTML attributes to set for the element. - The parameter is null or empty. - - - Returns an HTML select element for each property in the object that is represented by the specified expression and using the specified list items. - An HTML select element for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to render. - A collection of objects that are used to populate the list. - The type of the model. - The type of the value. - The parameter is null. - - - Returns an HTML select element for each property in the object that is represented by the specified expression using the specified list items and HTML attributes. - An HTML select element for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to render. - A collection of objects that are used to populate the list. - A dictionary that contains the HTML attributes to set for the element. - The type of the model. - The type of the value. - The parameter is null. - - - Returns an HTML select element for each property in the object that is represented by the specified expression using the specified list items and HTML attributes. - An HTML select element for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to render. - A collection of objects that are used to populate the list. - An object that contains the HTML attributes to set for the element. - The type of the model. - The type of the value. - The parameter is null. - - - Represents support for HTML textarea controls. - - - Returns the specified textarea element by using the specified HTML helper and the name of the form field. - The textarea element. - The HTML helper instance that this method extends. - The name of the form field to return. - - - Returns the specified textarea element by using the specified HTML helper, the name of the form field, and the specified HTML attributes. - The textarea element. - The HTML helper instance that this method extends. - The name of the form field to return. - An object that contains the HTML attributes to set for the element. - - - Returns the specified textarea element by using the specified HTML helper and HTML attributes. - The textarea element. - The HTML helper instance that this method extends. - The name of the form field to return. - An object that contains the HTML attributes to set for the element. - - - Returns the specified textarea element by using the specified HTML helper, the name of the form field, and the text content. - The textarea element. - The HTML helper instance that this method extends. - The name of the form field to return. - The text content. - - - Returns the specified textarea element by using the specified HTML helper, the name of the form field, the text content, and the specified HTML attributes. - The textarea element. - The HTML helper instance that this method extends. - The name of the form field to return. - The text content. - An object that contains the HTML attributes to set for the element. - - - Returns the specified textarea element by using the specified HTML helper, the name of the form field, the text content, the number of rows and columns, and the specified HTML attributes. - The textarea element. - The HTML helper instance that this method extends. - The name of the form field to return. - The text content. - The number of rows. - The number of columns. - An object that contains the HTML attributes to set for the element. - - - Returns the specified textarea element by using the specified HTML helper, the name of the form field, the text content, the number of rows and columns, and the specified HTML attributes. - The textarea element. - The HTML helper instance that this method extends. - The name of the form field to return. - The text content. - The number of rows. - The number of columns. - An object that contains the HTML attributes to set for the element. - - - Returns the specified textarea element by using the specified HTML helper, the name of the form field, the text content, and the specified HTML attributes. - The textarea element. - The HTML helper instance that this method extends. - The name of the form field to return. - The text content. - An object that contains the HTML attributes to set for the element. - - - Returns an HTML textarea element for each property in the object that is represented by the specified expression. - An HTML textarea element for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to render. - The type of the model. - The type of the value. - The parameter is null. - - - Returns an HTML textarea element for each property in the object that is represented by the specified expression using the specified HTML attributes. - An HTML textarea element for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to render. - A dictionary that contains the HTML attributes to set for the element. - The type of the model. - The type of the value. - The parameter is null. - - - Returns an HTML textarea element for each property in the object that is represented by the specified expression using the specified HTML attributes and the number of rows and columns. - An HTML textarea element for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to render. - The number of rows. - The number of columns. - A dictionary that contains the HTML attributes to set for the element. - The type of the model. - The type of the value. - The parameter is null. - - - Returns an HTML textarea element for each property in the object that is represented by the specified expression using the specified HTML attributes and the number of rows and columns. - An HTML textarea element for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to render. - The number of rows. - The number of columns. - An object that contains the HTML attributes to set for the element. - The type of the model. - The type of the value. - The parameter is null. - - - Returns an HTML textarea element for each property in the object that is represented by the specified expression using the specified HTML attributes. - An HTML textarea element for each property in the object that is represented by the expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to render. - An object that contains the HTML attributes to set for the element. - The type of the model. - The type of the value. - The parameter is null. - - - Provides support for validating the input from an HTML form. - - - Gets or sets the name of the resource file (class key) that contains localized string values. - The name of the resource file (class key). - - - Retrieves the validation metadata for the specified model and applies each rule to the data field. - The HTML helper instance that this method extends. - The name of the property or model object that is being validated. - The parameter is null. - - - Retrieves the validation metadata and validates each data field that is represented by the specified expression. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to render. - The type of the model. - The type of the value. - - - Displays a validation message if an error exists for the specified field in the object. - If the property or object is valid, an empty string; otherwise, a span element that contains an error message. - The HTML helper instance that this method extends. - The name of the property or model object that is being validated. - - - Displays a validation message if an error exists for the specified field in the object. - If the property or object is valid, an empty string; otherwise, a span element that contains an error message. - The HTML helper instance that this method extends. - The name of the property or model object that is being validated. - An object that contains the HTML attributes for the element. - - - Displays a validation message if an error exists for the specified field in the object. - If the property or object is valid, an empty string; otherwise, a span element that contains an error message. - The HTML helper instance that this method extends. - The name of the property or model object that is being validated. - An object that contains the HTML attributes for the element. - - - Displays a validation message if an error exists for the specified field in the object. - If the property or object is valid, an empty string; otherwise, a span element that contains an error message. - The HTML helper instance that this method extends. - The name of the property or model object that is being validated. - The message to display if the specified field contains an error. - - - Displays a validation message if an error exists for the specified field in the object. - If the property or object is valid, an empty string; otherwise, a span element that contains an error message. - The HTML helper instance that this method extends. - The name of the property or model object that is being validated. - The message to display if the specified field contains an error. - An object that contains the HTML attributes for the element. - - - Displays a validation message if an error exists for the specified field in the object. - If the property or object is valid, an empty string; otherwise, a span element that contains an error message. - The HTML helper instance that this method extends. - The name of the property or model object that is being validated. - The message to display if the specified field contains an error. - An object that contains the HTML attributes for the element. - - - Returns the HTML markup for a validation-error message for each data field that is represented by the specified expression. - The HTML markup for a validation-error message for each data field that is represented by the expression. If no validation error occurs or client validation is disabled, this method returns null. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to render. - The type of the model. - The type of the value. - - - Returns the HTML markup for a validation-error message for each data field that is represented by the specified expression, using the specified message. - The HTML markup for a validation-error message for each data field that is represented by the expression. If no validation error occurs or client validation is disabled, this method returns null. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to render. - The message to display if the specified field contains an error. - The type of the model. - The type of the value. - - - Returns the HTML markup for a validation-error message for each data field that is represented by the specified expression, using the specified message and HTML attributes. - The HTML markup for a validation-error message for each data field that is represented by the expression. If no validation error occurs or client validation is disabled, this method returns null. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to render. - The message to display if the specified field contains an error. - A dictionary that contains the HTML attributes for the element. - The type of the model. - The type of the value. - - - Returns the HTML markup for a validation-error message for each data field that is represented by the specified expression, using the specified message and HTML attributes. - The HTML markup for a validation-error message for each data field that is represented by the expression. If no validation error occurs or client validation is disabled, this method returns null. - The HTML helper instance that this method extends. - An expression that identifies the object that contains the properties to render. - The message to display if the specified field contains an error. - An object that contains the HTML attributes for the element. - The type of the model. - The type of the value. - - - Returns an unordered list (ul element) of validation messages that are in the object. - A string that contains an unordered list (ul element) of validation messages. - The HTML helper instance that this method extends. - - - Returns an unordered list (ul element) of validation messages that are in the object and optionally displays only model-level errors. - A string that contains an unordered list (ul element) of validation messages. - The HTML helper instance that this method extends. - true to have the summary display model-level errors only, or false to have the summary display all errors. - - - Returns an unordered list (ul element) of validation messages that are in the object and optionally displays only model-level errors. - A string that contains an unordered list (ul element) of validation messages. - The HTML helper instance that this method extends. - true to have the summary display model-level errors only, or false to have the summary display all errors. - The message to display with the validation summary. - - - Returns an unordered list (ul element) of validation messages that are in the object and optionally displays only model-level errors. - A string that contains an unordered list (ul element) of validation messages. - The HTML helper instance that this method extends. - true to have the summary display model-level errors only, or false to have the summary display all errors. - The message to display with the validation summary. - A dictionary that contains the HTML attributes for the element. - - - Returns an unordered list (ul element) of validation messages that are in the object and optionally displays only model-level errors. - A string that contains an unordered list (ul element) of validation messages. - The HTML helper instance that this method extends. - true to have the summary display model-level errors only, or false to have the summary display all errors. - The message to display with the validation summary. - An object that contains the HTML attributes for the element. - - - Returns an unordered list (ul element) of validation messages that are in the object. - A string that contains an unordered list (ul element) of validation messages. - The HMTL helper instance that this method extends. - The message to display if the specified field contains an error. - - - Returns an unordered list (ul element) of validation messages that are in the object. - A string that contains an unordered list (ul element) of validation messages. - The HTML helper instance that this method extends. - The message to display if the specified field contains an error. - A dictionary that contains the HTML attributes for the element. - - - Returns an unordered list (ul element) of validation messages in the object. - A string that contains an unordered list (ul element) of validation messages. - The HTML helper instance that this method extends. - The message to display if the specified field contains an error. - An object that contains the HTML attributes for the element. - - + + + + System.Web.Mvc + + + + Represents an attribute that specifies which HTTP verbs an action method will respond to. + + + Initializes a new instance of the class by using a list of HTTP verbs that the action method will respond to. + The HTTP verbs that the action method will respond to. + The parameter is null or zero length. + + + Initializes a new instance of the class using the HTTP verbs that the action method will respond to. + The HTTP verbs that the action method will respond to. + + + Determines whether the specified method information is valid for the specified controller context. + true if the method information is valid; otherwise, false. + The controller context. + The method information. + The parameter is null. + + + Gets or sets the list of HTTP verbs that the action method will respond to. + The list of HTTP verbs that the action method will respond to. + + + Provides information about an action method, such as its name, controller, parameters, attributes, and filters. + + + Initializes a new instance of the class. + + + Gets the name of the action method. + The name of the action method. + + + Gets the controller descriptor. + The controller descriptor. + + + Executes the action method by using the specified parameters and controller context. + The result of executing the action method. + The controller context. + The parameters of the action method. + + + Returns an array of custom attributes that are defined for this member, excluding named attributes. + An array of custom attributes, or an empty array if no custom attributes exist. + true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. + The custom attribute type cannot be loaded. + There is more than one attribute of type defined for this member. + + + Returns an array of custom attributes that are defined for this member, identified by type. + An array of custom attributes, or an empty array if no custom attributes of the specified type exist. + The type of the custom attributes. + true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. + The custom attribute type cannot be loaded. + There is more than one attribute of type defined for this member. + The parameter is null. + + + Returns the filters that are associated with this action method. + The filters that are associated with this action method. + + + Returns the parameters of the action method. + The parameters of the action method. + + + Returns the action-method selectors. + The action-method selectors. + + + Determines whether one or more instances of the specified attribute type are defined for this member. + true if the is defined for this member; otherwise, false. + The type of the custom attribute. + true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. + The parameter is null. + + + Provides the context for the ActionExecuted method of the class. + + + Initializes a new instance of the class. + + + Initializes a new instance of the class. + The controller context. + The action method descriptor. + true if the action is canceled. + The exception object. + The parameter is null. + + + Gets or sets the action descriptor. + The action descriptor. + + + Gets or sets a value that indicates that this object is canceled. + true if the context canceled; otherwise, false. + + + Gets or sets the exception that occurred during the execution of the action method, if any. + The exception that occurred during the execution of the action method. + + + Gets or sets a value that indicates whether the exception is handled. + true if the exception is handled; otherwise, false. + + + Gets or sets the result returned by the action method. + The result returned by the action method. + + + Provides the context for the ActionExecuting method of the class. + + + Initializes a new instance of the class. + + + Initializes a new instance of the class by using the specified controller context, action descriptor, and action-method parameters. + The controller context. + The action descriptor. + The action-method parameters. + The or parameter is null. + + + Gets or sets the action descriptor. + The action descriptor. + + + Gets or sets the action-method parameters. + The action-method parameters. + + + Gets or sets the result that is returned by the action method. + The result that is returned by the action method. + + + Represents the base class for all action-filter attributes. + + + Initializes a new instance of the class. + + + Called by the MVC framework after the action method executes. + The filter context. + + + Called by the MVC framework before the action method executes. + The filter context. + + + Called by the MVC framework after the action result executes. + The filter context. + + + Called by the MVC framework before the action result executes. + The filter context. + + + Represents an attribute that is used to influence the selection of an action method. + + + Initializes a new instance of the class. + + + Determines whether the action method selection is valid for the specified controller context. + true if the action method selection is valid for the specified controller context; otherwise, false. + The controller context. + Information about the action method. + + + Represents an attribute that is used for the name of an action. + + + Initializes a new instance of the class. + Name of the action. + The parameter is null or empty. + + + Determines whether the action name is valid within the specified controller context. + true if the action name is valid within the specified controller context; otherwise, false. + The controller context. + The name of the action. + Information about the action method. + + + Gets or sets the name of the action. + The name of the action. + + + Represents an attribute that affects the selection of an action method. + + + Initializes a new instance of the class. + + + Determines whether the action name is valid in the specified controller context. + true if the action name is valid in the specified controller context; otherwise, false. + The controller context. + The name of the action. + Information about the action method. + + + Encapsulates the result of an action method and is used to perform a framework-level operation on behalf of the action method. + + + Initializes a new instance of the class. + + + Enables processing of the result of an action method by a custom type that inherits from the class. + The context in which the result is executed. The context information includes the controller, HTTP content, request context, and route data. + + + Represents a delegate that contains the logic for selecting an action method. + true if an action method was successfully selected; otherwise, false. + The current HTTP request context. + + + Represents support for rendering HTML in AJAX scenarios within a view. + + + Initializes a new instance of the class using the specified view context and view data container. + The view context. + The view data container. + One or both of the parameters is null. + + + Initializes a new instance of the class by using the specified view context, view data container, and route collection. + The view context. + The view data container. + The URL route collection. + One or more of the parameters is null. + + + Gets or sets the root path for the location to use for globalization script files. + The location of the folder where globalization script files are stored. The default location is "~/Scripts/Globalization". + + + Serializes the specified message and returns the resulting JSON-formatted string. + The serialized message as a JSON-formatted string. + The message to serialize. + + + Gets the collection of URL routes for the application. + The collection of routes for the application. + + + Gets the context information about the view. + The context of the view. + + + Gets the current view data dictionary. + The view data dictionary. + + + Gets the view data container. + The view data container. + + + Represents support for rendering HTML in AJAX scenarios within a strongly typed view. + The type of the model. + + + Initializes a new instance of the class by using the specified view context and view data container. + The view context. + The view data container. + + + Initializes a new instance of the class by using the specified view context, view data container, and URL route collection. + The view context. + The view data container. + The URL route collection. + + + Gets the strongly typed version of the view data dictionary. + The strongly typed data dictionary of the view. + + + Represents a class that extends the class by adding the ability to determine whether an HTTP request is an AJAX request. + + + Determines whether the specified HTTP request is an AJAX request. + true if the specified HTTP request is an AJAX request; otherwise, false. + The HTTP request. + The parameter is null (Nothing in Visual Basic). + + + Provides a way to register one or more areas in an ASP.NET MVC application. + + + Initializes a new instance of the class. + + + Gets the name of the area to be registered. + The name of the area to be registered. + + + Registers all areas in an ASP.NET MVC application. + + + Registers all areas in an ASP.NET MVC application by using the specified user-defined state information. + An object that contains user-defined information to pass to the area. + + + Registers an area in an ASP.NET MVC application using the specified area's context information. + Encapsulates the information that is required in order to register the area. + + + Encapsulates the information that is required in order to register an area within an ASP.NET MVC application. + + + Initializes a new instance of the class using the specified area name and routes collection. + The name of the area to register. + The collection of routes for the application. + + + Initializes a new instance of the class using the specified area name, routes collection, and user-defined data. + The name of the area to register. + The collection of routes for the application. + An object that contains user-defined information to pass to the area. + + + Gets the name of the area to register. + The name of the area to register. + + + Maps the specified URL route and associates it with the area that is specified by the property. + A reference to the mapped route. + The name of the route. + The URL pattern for the route. + The parameter is null. + + + Maps the specified URL route and associates it with the area that is specified by the property, using the specified route default values. + A reference to the mapped route. + The name of the route. + The URL pattern for the route. + An object that contains default route values. + The parameter is null. + + + Maps the specified URL route and associates it with the area that is specified by the property, using the specified route default values and constraint. + A reference to the mapped route. + The name of the route. + The URL pattern for the route. + An object that contains default route values. + A set of expressions that specify valid values for a URL parameter. + The parameter is null. + + + Maps the specified URL route and associates it with the area that is specified by the property, using the specified route default values, constraints, and namespaces. + A reference to the mapped route. + The name of the route. + The URL pattern for the route. + An object that contains default route values. + A set of expressions that specify valid values for a URL parameter. + An enumerable set of namespaces for the application. + The parameter is null. + + + Maps the specified URL route and associates it with the area that is specified by the property, using the specified route default values and namespaces. + A reference to the mapped route. + The name of the route. + The URL pattern for the route. + An object that contains default route values. + An enumerable set of namespaces for the application. + The parameter is null. + + + Maps the specified URL route and associates it with the area that is specified by the property, using the specified namespaces. + A reference to the mapped route. + The name of the route. + The URL pattern for the route. + An enumerable set of namespaces for the application. + The parameter is null. + + + Gets the namespaces for the application. + An enumerable set of namespaces for the application. + + + Gets a collection of defined routes for the application. + A collection of defined routes for the application. + + + Gets an object that contains user-defined information to pass to the area. + An object that contains user-defined information to pass to the area. + + + Provides an abstract class to implement a metadata provider. + + + Called from constructors in a derived class to initialize the class. + + + When overridden in a derived class, creates the model metadata for the property. + The model metadata for the property. + The set of attributes. + The type of the container. + The model accessor. + The type of the model. + The name of the property. + + + Gets a list of attributes. + A list of attributes. + The type of the container. + The property descriptor. + The attribute container. + + + Returns a list of properties for the model. + A list of properties for the model. + The model container. + The type of the container. + + + Returns the metadata for the specified property using the container type and property descriptor. + The metadata for the specified property. + The model accessor. + The type of the container. + The property descriptor. + + + Returns the metadata for the specified property using the container type and property name. + The metadata for the specified property. + The model accessor. + The type of the container. + The name of the property. + + + Returns the metadata for the specified property using the type of the model. + The metadata for the specified property. + The model accessor. + The type of the container. + + + Returns the type descriptor from the specified type. + The type descriptor. + The type. + + + Provides an abstract class for classes that implement a validation provider. + + + Called from constructors in derived classes to initialize the class. + + + Gets a type descriptor for the specified type. + A type descriptor for the specified type. + The type of the validation provider. + + + Gets the validators for the model using the metadata and controller context. + The validators for the model. + The metadata. + The controller context. + + + Gets the validators for the model using the metadata, the controller context, and a list of attributes. + The validators for the model. + The metadata. + The controller context. + The list of attributes. + + + Provides the base class for asynchronous controllers. + + + Initializes a new instance of the class. + + + Gets the asynchronous manager instance. + The asynchronous manager instance. + + + Called by ASP.NET to initialize asynchronous request processing. + The status of the asynchronous operation. + The request context. + The asynchronous callback method. + The state object. + + + Called by ASP.NET during initialization of asynchronous request processing. + The status of the asynchronous operation. + The asynchronous callback method. + The state object. + + + Creates an action invoker. + An action invoker. + + + Cancels the execution of an asynchronous action method. + The status of the asynchronous result. + + + Called by ASP.NET when the current asynchronous action has completed. + The status of the asynchronous result. + + + Called by ASP.NET to begin the execution of an asynchronous action method. + The status of the asynchronous operation. + The request context. + The asynchronous callback method. + An object that contains information to be used by the callback method. This parameter can be null. + + + Cancels the execution of an asynchronous action method by ASP.NET at the end of the execution of an asynchronous action method. + The status of the asynchronous result. + + + Represents an attribute that is used to set the timeout value, in milliseconds, for an asynchronous method. + + + Initializes a new instance of the class. + The timeout value, in milliseconds. + + + Gets the timeout duration, in milliseconds. + The timeout duration, in milliseconds. + + + Called by ASP.NET before the asynchronous action method executes. + The filter context. + + + Encapsulates the information that is required for using an attribute. + + + Initializes a new instance of the class. + + + Initializes a new instance of the class using the specified controller context. + The context within which the result is executed. The context information includes the controller, HTTP content, request context, and route data. + + + Initializes a new instance of the class using the specified controller context and action descriptor. + The context in which the result is executed. The context information includes the controller, HTTP content, request context, and route data. + An object that provides information about an action method, such as its name, controller, parameters, attributes, and filters. + + + Provides information about the action method that is marked by the attribute, such as its name, controller, parameters, attributes, and filters. + The action descriptor for the action method that is marked by the attribute. + + + Gets or sets the result that is returned by an action method. + The result that is returned by an action method. + + + Represents an attribute that is used to restrict access by callers to an action method. + + + Initializes a new instance of the class. + + + Determines whether access to the core framework is authorized. + true if access is authorized; otherwise, false. + The HTTP context, which encapsulates all HTTP-specific information about an individual HTTP request. + The parameter is null. + + + Processes HTTP requests that fail authorization. + Encapsulates the information for using . The object contains the controller, HTTP context, request context, action result, and route data. + + + Called when a process requests authorization. + The filter context, which encapsulates information for using . + The parameter is null. + + + Called when the caching module requests authorization. + A reference to the validation status. + The HTTP context, which encapsulates all HTTP-specific information about an individual HTTP request. + The parameter is null. + + + Gets or sets the user roles. + The user roles. + + + Gets the unique identifier for this attribute. + The unique identifier for this attribute. + + + Gets or sets the authorized users. + The authorized users. + + + Represents an attribute that is used to provide details about how model binding to a parameter should occur. + + + Initializes a new instance of the class. + + + Gets or sets a comma-delimited list of property names for which binding is not allowed. + The exclude list. + + + Gets or sets a comma-delimited list of property names for which binding is allowed. + The include list. + + + Determines whether the specified property is allowed. + true if the specified property is allowed; otherwise, false. + The name of the property. + + + Gets or sets the prefix to use when markup is rendered for binding to an action argument or to a model property. + The prefix to use. + + + Maps a browser request to a byte array. + + + Initializes a new instance of the class. + + + Binds the model by using the specified controller context and binding context. + The bound data object. + The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data. + The context within which the model is bound. The context includes information such as the model object, model name, model type, property filter, and value provider. + The parameter is null. + + + Represents an attribute that is used to indicate that an action method should be called only as a child action. + + + Initializes a new instance of the class. + + + Called when authorization is required. + An object that encapsulates the information that is required in order to authorize access to the child action. + + + Returns the client data-type model validators. + + + Initializes a new instance of the class. + + + Returns the client data-type model validators. + The client data-type model validators. + The metadata. + The context. + + + Represents a user-defined content type that is the result of an action method. + + + Initializes a new instance of the class. + + + Gets or sets the content. + The content. + + + Gets or sets the content encoding. + The content encoding. + + + Gets or sets the type of the content. + The type of the content. + + + Enables processing of the result of an action method by a custom type that inherits from the class. + The context within which the result is executed. + The parameter is null. + + + Provides methods that respond to HTTP requests that are made to an ASP.NET MVC Web site. + + + Initializes a new instance of the class. + + + Gets the action invoker for the controller. + The action invoker. + + + Gets or sets the binder. + The binder. + + + Creates a content result object by using a string. + The content result instance. + The content to write to the response. + + + Creates a content result object by using a string and the content type. + The content result instance. + The content to write to the response. + The content type (MIME type). + + + Creates a content result object by using a string, the content type, and content encoding. + The content result instance. + The content to write to the response. + The content type (MIME type). + The content encoding. + + + Creates an action invoker. + An action invoker. + + + Creates a temporary data provider. + A temporary data provider. + + + Releases all resources that are used by the current instance of the class. + + + Releases unmanaged resources and optionally releases managed resources. + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + Invokes the action in the current controller context. + + + Creates a object by using the file contents and file type. + The file-content result object. + The binary content to send to the response. + The content type (MIME type). + + + Creates a object by using the file contents, content type, and the destination file name. + The file-content result object. + The binary content to send to the response. + The content type (MIME type). + The file name to use in the file-download dialog box that is displayed in the browser. + + + Creates a object by using the object and content type. + The file-content result object. + The stream to send to the response. + The content type (MIME type). + + + Creates a object using the object, the content type, and the target file name. + The file-stream result object. + The stream to send to the response. + The content type (MIME type) + The file name to use in the file-download dialog box that is displayed in the browser. + + + Creates a object by using the file name and the content type. + The file-stream result object. + The path of the file to send to the response. + The content type (MIME type). + + + Creates a object by using the file name, the content type, and the file download name. + The file-stream result object. + The path of the file to send to the response. + The content type (MIME type). + The file name to use in the file-download dialog box that is displayed in the browser. + + + Called when a request matches this controller, but no method with the specified action name is found in the controller. + The name of the attempted action. + + + Gets HTTP-specific information about an individual HTTP request. + The HTTP context. + + + Initializes data that might not be available when the constructor is called. + The HTTP context and route data. + + + Creates a object. + The object that writes the script to the response. + The JavaScript code to run on the client + + + Creates a object that serializes the specified object to JavaScript Object Notation (JSON). + The JSON result object that serializes the specified object to JSON format. The result object that is prepared by this method is written to the response by the MVC framework when the object is executed. + The JavaScript object graph to serialize. + + + Creates a object that serializes the specified object to JavaScript Object Notation (JSON) format. + The JSON result object that serializes the specified object to JSON format. + The JavaScript object graph to serialize. + The content type (MIME type). + + + Creates a object that serializes the specified object to JavaScript Object Notation (JSON) format. + The JSON result object that serializes the specified object to JSON format. + The JavaScript object graph to serialize. + The content type (MIME type). + The content encoding. + + + Creates a object that serializes the specified object to JavaScript Object Notation (JSON) format using the content type, content encoding, and the JSON request behavior. + The result object that serializes the specified object to JSON format. + The JavaScript object graph to serialize. + The content type (MIME type). + The content encoding. + The JSON request behavior + + + Creates a object that serializes the specified object to JavaScript Object Notation (JSON) format using the specified content type and JSON request behavior. + The result object that serializes the specified object to JSON format. + The JavaScript object graph to serialize. + The content type (MIME type). + The JSON request behavior + + + Creates a object that serializes the specified object to JavaScript Object Notation (JSON) format using the specified JSON request behavior. + The result object that serializes the specified object to JSON format. + The JavaScript object graph to serialize. + The content type (MIME type). + + + Gets the model state dictionary object that contains the state of the model and of model-binding validation. + The model state dictionary. + + + Called after the action method is invoked. + Information about the current request and action. + + + Called before the action method is invoked. + Information about the current request and action. + + + Called when authorization occurs. + Information about the current request and action. + + + Called when an unhandled exception occurs in the action. + Information about the current request and action. + + + Called after the action result that is returned by an action method is executed. + Information about the current request and action result + + + Called before the action result that is returned by an action method is executed. + Information about the current request and action result + + + Creates a object that renders a partial view. + A partial-view result object. + + + Creates a object that renders a partial view, by using the specified model. + A partial-view result object. + The model that is rendered by the partial view + + + Creates a object that renders a partial view, by using the specified view name. + A partial-view result object. + The name of the view that is rendered to the response. + + + Creates a object that renders a partial view, by using the specified view name and model. + A partial-view result object. + The name of the view that is rendered to the response. + The model that is rendered by the partial view + + + Creates a object that redirects to the specified URL. + The redirect result object. + The URL to redirect to. + + + Redirects to the specified action using the action name. + The redirect result object. + The name of the action. + + + Redirects to the specified action using the action name and route values. + The redirect result object. + The name of the action. + The parameters for a route. + + + Redirects to the specified action using the action name and controller name. + The redirect result object. + The name of the action. + The name of the controller + + + Redirects to the specified action using the action name, controller name, and route values. + The redirect result object. + The name of the action. + The name of the controller + The parameters for a route. + + + Redirects to the specified action using the action name, controller name, and route dictionary. + The redirect result object. + The name of the action. + The name of the controller + The parameters for a route. + + + Redirects to the specified action using the action name and route dictionary. + The redirect result object. + The name of the action. + The parameters for a route. + + + Redirects to the specified route using the specified route values. + The redirect-to-route result object. + The parameters for a route. + + + Redirects to the specified route using the route name. + The redirect-to-route result object. + The name of the route + + + Redirects to the specified route using the route name and route values. + The redirect-to-route result object. + The name of the route + The parameters for a route. + + + Redirects to the specified route using the route name and route dictionary. + The redirect-to-route result object. + The name of the route + The parameters for a route. + + + Redirects to the specified route using the route dictionary. + The redirect-to-route result object. + The parameters for a route. + + + Gets the object for the current HTTP request. + The request object. + + + Gets the object for the current HTTP response. + The response object. + + + Gets the route data for the current request. + The route data. + + + Gets the object that provides methods that are used during Web request processing. + The HTTP server object. + + + Gets the object for the current HTTP request. + The HTTP session-state object for the current HTTP request. + + + This API supports the MVC infrastructure and is not intended to be used directly from your code. This method calls the method. + The filter context. + + + This API supports the MVC infrastructure and is not intended to be used directly from your code. This method calls the method. + The filter context. + + + This API supports the MVC infrastructure and is not intended to be used directly from your code. This method calls the method. + The filter context. + + + This API supports the MVC infrastructure and is not intended to be used directly from your code. This method calls the method. + The filter context. + + + This API supports the MVC infrastructure and is not intended to be used directly from your code. This method calls the method. + The filter context. + + + This API supports the MVC infrastructure and is not intended to be used directly from your code. This method calls the method. + The filter context. + + + Gets the temporary-data provider object that is used to store data for the next request. + The temporary-data provider. + + + Updates the specified model instance using values from the controller's current value provider. + true if the update is successful; otherwise, false. + The model instance to update. + The type of the model object. + The parameter or the property is null. + + + Updates the specified model instance using values from the controller's current value provider and a prefix. + true if the update is successful; otherwise, false. + The model instance to update. + The prefix to use when looking up values in the value provider. + The type of the model object. + The parameter or the property is null. + + + Updates the specified model instance using values from the controller's current value provider, a prefix, and included properties. + true if the update is successful; otherwise, false. + The model instance to update. + The prefix to use when looking up values in the value provider. + A list of properties of the model to update. + The type of the model object. + The parameter or the property is null. + + + Updates the specified model instance using values from the controller's current value provider, a prefix, a list of properties to exclude, and a list of properties to include. + true if the update is successful; otherwise, false. + The model instance to update. + The prefix to use when looking up values in the value provider + A list of properties of the model to update. + A list of properties to explicitly exclude from the update. These are excluded even if they are listed in the parameter list. + The type of the model object. + The parameter or the property is null. + + + Updates the specified model instance using values from the value provider, a prefix, a list of properties to exclude , and a list of properties to include. + true if the update is successful; otherwise, false. + The model instance to update. + The prefix to use when looking up values in the value provider. + A list of properties of the model to update. + A list of properties to explicitly exclude from the update. These are excluded even if they are listed in the parameter list. + A dictionary of values that is used to update the model. + The type of the model object. + + + Updates the specified model instance using values from the value provider, a prefix, and included properties. + true if the update is successful; otherwise, false. + The model instance to update. + The prefix to use when looking up values in the value provider. + A list of properties of the model to update. + A dictionary of values that is used to update the model. + The type of the model object. + + + Updates the specified model instance using values from the value provider and a prefix. + true if the update is successful; otherwise, false. + The model instance to update. + The prefix to use when looking up values in the value provider. + A dictionary of values that is used to update the model. + The type of the model object. + + + Updates the specified model instance using values from the controller's current value provider and included properties. + true if the update is successful; otherwise, false. + The model instance to update. + A list of properties of the model to update. + The type of the model object. + The parameter or the property is null. + + + Updates the specified model instance using values from the value provider and a list of properties to include. + true if the update is successful; otherwise, false. + The model instance to update. + A list of properties of the model to update. + A dictionary of values that is used to update the model. + The type of the model object. + + + Updates the specified model instance using values from the value provider. + true if the update is successful; otherwise, false. + The model instance to update. + A dictionary of values that is used to update the model. + The type of the model object. + + + Validates the specified model instance. + true if the model validation is successful; otherwise, false. + The model instance to validate. + + + Validates the specified model instance using an HTML prefix. + true if the model validation is successful; otherwise, false. + The model to validate. + The prefix to use when looking up values in the model provider. + + + Updates the specified model instance using values from the controller's current value provider. + The model instance to update. + The type of the model object. + The model was not successfully updated. + + + Updates the specified model instance using values from the controller's current value provider and a prefix. + The model instance to update. + A prefix to use when looking up values in the value provider. + The type of the model object. + + + Updates the specified model instance using values from the controller's current value provider, a prefix, and included properties. + The model instance to update. + A prefix to use when looking up values in the value provider. + A list of properties of the model to update. + The type of the model object. + + + Updates the specified model instance using values from the controller's current value provider, a prefix, a list of properties to exclude, and a list of properties to include. + The model instance to update. + A prefix to use when looking up values in the value provider. + A list of properties of the model to update. + A list of properties to explicitly exclude from the update. These are excluded even if they are listed in the list. + The type of the model object. + + + Updates the specified model instance using values from the value provider, a prefix, a list of properties to exclude, and a list of properties to include. + The model instance to update. + The prefix to use when looking up values in the value provider. + A list of properties of the model to update. + A list of properties to explicitly exclude from the update. These are excluded even if they are listed in the parameter list. + A dictionary of values that is used to update the model. + The type of the model object. + + + Updates the specified model instance using values from the value provider, a prefix, and a list of properties to include. + The model instance to update. + The prefix to use when looking up values in the value provider. + A list of properties of the model to update. + A dictionary of values that is used to update the model. + The type of the model object. + + + Updates the specified model instance using values from the value provider and a prefix. + The model instance to update. + The prefix to use when looking up values in the value provider. + A dictionary of values that is used to update the model. + The type of the model object. + + + Updates the specified model instance using values from the controller object's current value provider. + The model instance to update. + A list of properties of the model to update. + The type of the model object. + + + Updates the specified model instance using values from the value provider, a prefix, and a list of properties to include. + The model instance to update. + A list of properties of the model to update. + A dictionary of values that is used to update the model. + The type of the model object. + + + Updates the specified model instance using values from the value provider. + The model instance to update. + A dictionary of values that is used to update the model. + The type of the model object. + + + Gets the URL helper object that is used to generate URLs by using routing. + The URL helper object. + + + Gets the user security information for the current HTTP request. + The user security information for the current HTTP request. + + + Validates the specified model instance. + The model to validate. + + + Validates the specified model instance using an HTML prefix. + The model to validate. + The prefix to use when looking up values in the model provider. + + + Creates a object that renders a view to the response. + The view result that renders a view to the response. + + + Creates a object by using the model that renders a view to the response. + The view result. + The model that is rendered by the view. + + + Creates a object by using the view name that renders a view. + The view result. + The name of the view that is rendered to the response. + + + Creates a object by using the view name and model that renders a view to the response. + The view result. + The name of the view that is rendered to the response. + The model that is rendered by the view. + + + Creates a object using the view name and master-page name that renders a view to the response. + The view result. + The name of the view that is rendered to the response. + The name of the master page or template to use when the view is rendered. + + + Creates a object using the view name, master-page name, and model that renders a view. + The view result. + The name of the view that is rendered to the response. + The name of the master page or template to use when the view is rendered. + The model that is rendered by the view. + + + Creates a object that renders the specified object. + The view result. + The view that is rendered to the response. + + + Creates a object that renders the specified object. + The view result. + The view that is rendered to the response. + The model that is rendered by the view. + + + Represents a class that is responsible for invoking the action methods of a controller. + + + Initializes a new instance of the class. + + + Gets or sets the model binders that are associated with the action. + The model binders that are associated with the action. + + + Creates the action result. + The action result object. + The controller context. + The action descriptor. + The action return value. + + + Finds the information about the action method. + Information about the action method. + The controller context. + The controller descriptor. + The name of the action. + + + Retrieves information about the controller by using the specified controller context. + Information about the controller. + The controller context. + + + Retrieves information about the action filters. + Information about the action filters. + The controller context. + The action descriptor. + + + Gets the value of the specified action-method parameter. + The value of the action-method parameter. + The controller context. + The parameter descriptor. + + + Gets the values of the action-method parameters. + The values of the action-method parameters. + The controller context. + The action descriptor. + + + Invokes the specified action by using the specified controller context. + The result of executing the action. + The controller context. + The name of the action to invoke. + The parameter is null. + The parameter is null or empty. + The thread was aborted during invocation of the action. + An unspecified error occurred during invocation of the action. + + + Invokes the specified action method by using the specified parameters and the controller context. + The result of executing the action method. + The controller context. + The action descriptor. + The parameters. + + + Invokes the specified action method by using the specified parameters, controller context, and action filters. + The context for the ActionExecuted method of the class. + The controller context. + The action filters. + The action descriptor. + The parameters. + + + Invokes the specified action result by using the specified controller context. + The controller context. + The action result. + + + Invokes the specified action result by using the specified action filters and the controller context. + The context for the ResultExecuted method of the class. + The controller context. + The action filters. + The action result. + + + Invokes the specified authorization filters by using the specified action descriptor and controller context. + The context for the object. + The controller context. + The authorization filters. + The action descriptor. + + + Invokes the specified exception filters by using the specified exception and controller context. + The context for the object. + The controller context. + The exception filters. + The exception. + + + Represents the base class for all MVC controllers. + + + Initializes a new instance of the class. + + + Gets or sets the controller context. + The controller context. + + + Executes the specified request context. + The request context. + The parameter is null. + + + Executes the request. + + + Initializes the specified request context. + The request context. + + + Executes the specified request context. + The request context. + + + Gets or sets the dictionary for temporary data. + The dictionary for temporary data. + + + Gets or sets a value that indicates whether request validation is enabled for this request. + true if request validation is enabled for this request; otherwise, false. The default is true. + + + Gets or sets the value provider for the controller. + The value provider for the controller. + + + Gets or sets the dictionary for view data. + The dictionary for the view data. + + + Represents a class that is responsible for dynamically building a controller. + + + Initializes a new instance of the class. + + + Gets the current controller builder object. + The current controller builder. + + + Gets the default namespaces. + The default namespaces. + + + Gets the associated controller factory. + The controller factory. + + + Sets the controller factory by using the specified type. + The type of the controller factory. + The parameter is null. + The controller factory cannot be assigned from the type in the parameter. + An error occurred while the controller factory was being set. + + + Sets the specified controller factory. + The controller factory. + The parameter is null. + + + Encapsulates information about an HTTP request that matches specified and instances. + + + Initializes a new instance of the class. + + + Initializes a new instance of the class by using the specified HTTP context, URL route data, and controller. + The HTTP context. + The route data. + The controller. + + + Initializes a new instance of the class by using the specified controller context. + The controller context. + The parameter is null. + + + Initializes a new instance of the class by using the specified request context and controller. + The request context. + The controller. + One or both parameters are null. + + + Gets or sets the controller. + The controller. + + + Gets or sets the HTTP context. + The HTTP context. + + + Gets a value that indicates whether the associated action method is a child action. + true if the associated action method is a child action; otherwise, false. + + + Gets an object that contains the view context information for the parent action method. + An object that contains the view context information for the parent action method. + + + Gets or sets the request context. + The request context. + + + Gets or sets the URL route data. + The URL route data. + + + Encapsulates information that describes a controller, such as its name, type, and actions. + + + Initializes a new instance of the class. + + + Gets the name of the controller. + The name of the controller. + + + Gets the type of the controller. + The type of the controller. + + + Finds an action method by using the specified name and controller context. + The information about the action method. + The controller context. + The name of the action. + + + Retrieves a list of action-method descriptors in the controller. + A list of action-method descriptors in the controller. + + + Retrieves custom attributes that are defined for this member, excluding named attributes. + An array of custom attributes, or an empty array if no custom attributes exist. + true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. + The custom attribute type cannot be loaded. + There is more than one attribute of type defined for this member. + + + Retrieves custom attributes of a specified type that are defined for this member, excluding named attributes. + An array of custom attributes, or an empty array if no custom attributes exist. + The type of the custom attributes. + true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. + The custom attribute type cannot be loaded. + There is more than one attribute of type defined for this member. + The parameter is null (Nothing in Visual Basic). + + + Retrieves a value that indicates whether one or more instance of the specified custom attribute are defined for this member. + true if the is defined for this member; otherwise, false. + The type of the custom attribute. + true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. + The parameter is null (Nothing in Visual Basic). + + + Represents an attribute that invokes a custom model binder. + + + Initializes a new instance of the class. + + + Retrieves the associated model binder. + A reference to an object that implements the interface. + + + Provides a container for common metadata, for the class, and for the class for a data model. + + + Initializes a new instance of the class. + The data-annotations model metadata provider. + The type of the container. + The model accessor. + The type of the model. + The name of the property. + The display column attribute. + + + Returns simple text for the model data. + Simple text for the model data. + + + Implements the default model metadata provider for ASP.NET MVC. + + + Initializes a new instance of the class. + + + Gets the metadata for the specified property. + The metadata for the property. + The attributes. + The type of the container. + The model accessor. + The type of the model. + The name of the property. + + + Represents the method that creates a instance. + + + Provides a model validator. + + + Initializes a new instance of the class. + The metadata for the model. + The controller context for the model. + The validation attribute for the model. + + + Gets the validation attribute for the model validator. + The validation attribute for the model validator. + + + Gets the error message for the validation failure. + The error message for the validation failure. + + + Gets a value that indicates whether model validation is required. + true if model validation is required; otherwise, false. + + + Returns a list of validation error messages for the model. + A list of validation error messages for the model, or an empty list if no errors have occurred. + The container for the model. + + + Provides a model validator for a specified validation type. + + + + Initializes a new instance of the class. + The metadata for the model. + The controller context for the model. + The validation attribute for the model. + + + Gets the validation attribute from the model validator. + The validation attribute from the model validator. + + + Implements the default validation provider for MVC. + + + Initializes a new instance of the class. + + + Gets or sets a value that indicates whether non-nullable value types are required. + true if non-nullable value types are required; otherwise, false. + + + Gets a list of validators. + A list of validators. + The metadata. + The context. + The list of validation attributes. + + + Registers an adapter to provide client-side validation. + The type of the validation attribute. + The type of the adapter. + + + Registers an adapter factory for the validation provider. + The type of the attribute. + The factory that will be used to create the object for the specified attribute. + + + Registers the default adapter. + The type of the adapter. + + + Registers the default adapter factory. + The factory that will be used to create the object for the default adapter. + + + Provides a container for the error-information model validator. + + + Initializes a new instance of the class. + + + Gets a list of error-information model validators. + A list of error-information model validators. + The model metadata. + The controller context. + + + Represents the controller factory that is registered by default. + + + Initializes a new instance of the class. + + + Creates the specified controller by using the specified request context. + A reference to the controller. + The context of the HTTP request, which includes the HTTP context and route data. + The name of the controller. + The parameter is null. + The parameter is null or empty. + + + Retrieves the controller instance for the specified request context and controller type. + The controller instance. + The context of the HTTP request, which includes the HTTP context and route data. + The type of the controller. + + is null. + + cannot be assigned. + An instance of cannot be created. + + + Retrieves the controller type for the specified name and request context. + The controller type. + The context of the HTTP request, which includes the HTTP context and route data. + The name of the controller. + + + Releases the specified controller. + The controller to release. + + + Maps a browser request to a data object. This class provides a concrete implementation of a model binder. + + + Initializes a new instance of the class. + + + Gets or sets the model binders for the application. + The model binders for the application. + + + Binds the model by using the specified controller context and binding context. + The bound object. + The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data. + The context within which the model is bound. The context includes information such as the model object, model name, model type, property filter, and value provider. + The parameter is null. + + + Binds the specified property by using the specified controller context and binding context and the specified property descriptor. + The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data. + The context within which the model is bound. The context includes information such as the model object, model name, model type, property filter, and value provider. + Describes a property to be bound. The descriptor provides information such as the component type, property type, and property value. It also provides methods to get or set the property value. + + + Creates the specified model type by using the specified controller context and binding context. + A data object of the specified type. + The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data. + The context within which the model is bound. The context includes information such as the model object, model name, model type, property filter, and value provider. + The type of the model object to return. + + + Creates an index (a subindex) based on a category of components that make up a larger index, where the specified index value is an integer. + The name of the subindex. + The prefix for the subindex. + The index value. + + + Creates an index (a subindex) based on a category of components that make up a larger index, where the specified index value is a string. + The name of the subindex. + The prefix for the subindex. + The index value. + + + Creates the name of the subproperty by using the specified prefix and property name. + The name of the subproperty. + The prefix for the subproperty. + The name of the property. + + + Returns a set of properties that match the property filter restrictions that are established by the specified . + An enumerable set of property descriptors. + The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data. + The context within which the model is bound. The context includes information such as the model object, model name, model type, property filter, and value provider. + + + Returns the properties of the model by using the specified controller context and binding context. + A collection of property descriptors. + The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data. + The context within which the model is bound. The context includes information such as the model object, model name, model type, property filter, and value provider. + + + Returns the value of a property using the specified controller context, binding context, property descriptor, and property binder. + An object that represents the property value. + The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data. + The context within which the model is bound. The context includes information such as the model object, model name, model type, property filter, and value provider. + The descriptor for the property to access. The descriptor provides information such as the component type, property type, and property value. It also provides methods to get or set the property value. + An object that provides a way to bind the property. + + + Returns the descriptor object for a type that is specified by its controller context and binding context. + A custom type descriptor object. + The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data. + The context within which the model is bound. The context includes information such as the model object, model name, model type, property filter, and value provider. + + + Determines whether a data model is valid for the specified binding context. + true if the model is valid; otherwise, false. + The context within which the model is bound. The context includes information such as the model object, model name, model type, property filter, and value provider. + The parameter is null. + + + Called when the model is updated. + The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data. + The context within which the model is bound. The context includes information such as the model object, model name, model type, property filter, and value provider. + + + Called when the model is updating. + true if the model is updating; otherwise, false. + The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data. + The context within which the model is bound. The context includes information such as the model object, model name, model type, property filter, and value provider. + + + Called when the specified property is validated. + The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data. + The context within which the model is bound. The context includes information such as the model object, model name, model type, property filter, and value provider. + Describes a property to be validated. The descriptor provides information such as the component type, property type, and property value. It also provides methods to get or set the property value. + The value to set for the property. + + + Called when the specified property is validating. + true if the property is validating; otherwise, false. + The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data. + The context within which the model is bound. The context includes information such as the model object, model name, model type, property filter, and value provider. + Describes a property being validated. The descriptor provides information such as component type, property type, and property value. It also provides methods to get or set the property value. + The value to set for the property. + + + Gets or sets the name of the resource file (class key) that contains localized string values. + The name of the resource file (class key). + + + Sets the specified property by using the specified controller context, binding context, and property value. + The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data. + The context within which the model is bound. The context includes information such as the model object, model name, model type, property filter, and value provider. + Describes a property to be set. The descriptor provides information such as the component type, property type, and property value. It also provides methods to get or set the property value. + The value to set for the property. + + + Represents a memory cache for view locations. + + + Initializes a new instance of the class. + + + Initializes a new instance of the class by using the specified cache time span. + The cache time span. + The Ticks attribute of the parameter is set to a negative number. + + + Retrieves the default view location by using the specified HTTP context and cache key. + The default view location. + The HTTP context. + The cache key + The parameter is null. + + + Inserts the view in the specified virtual path by using the specified HTTP context, cache key, and virtual path. + The HTTP context. + The cache key. + The virtual path + The parameter is null. + + + Creates an empty view location cache. + + + Gets or sets the cache time span. + The cache time span. + + + Represents the base class for value providers whose values come from a collection that implements the interface. + The type of the value. + + + Initializes a new instance of the class. + The name/value pairs that are used to initialize the value provider. + Information about a specific culture, such as the names of the culture, the writing system, and the calendar used. + The parameter is null. + + + Determines whether the collection contains the specified prefix. + true if the collection contains the specified prefix; otherwise, false. + The prefix to search for. + The parameter is null. + + + Returns a value object using the specified key and controller context. + The value object for the specified key. + The key of the value object to retrieve. + The parameter is null. + + + Provides an empty metadata provider for data models that do not require metadata. + + + Initializes a new instance of the class. + + + Creates a new instance of the class. + An empty instance of the model metadata. + The attributes. + The type of the container. + The model accessor. + The type of the model. + The name of the model. + + + Provides an empty validation provider for models that do not require a validator. + + + Initializes a new instance of the class. + + + Gets the empty model validator. + The empty model validator. + The metadata. + The context. + + + Represents a result that does nothing, such as a controller action method that returns nothing. + + + Initializes a new instance of the class. + + + Executes the specified result context. + The result context. + + + Provides the context for using the class. + + + Initializes a new instance of the class. + + + Initializes a new instance of the class for the specified exception by using the specified controller context. + The controller context. + The exception. + The parameter is null. + + + Gets or sets the exception object. + The exception object. + + + Gets or sets a value that indicates whether the exception has been handled. + true if the exception has been handled; otherwise, false. + + + Gets or sets the action result. + The action result. + + + Provides a helper class to get the model name from an expression. + + + Gets the model name from a lambda expression. + The model name. + The expression. + + + Gets the model name from a string expression. + The model name. + The expression. + + + Provides a container for client-side field validation metadata. + + + Initializes a new instance of the class. + + + Gets or sets the name of the data field. + The name of the data field. + + + Gets or sets a value that indicates whether the validation message contents should be replaced with the client validation error. + true if the validation message contents should be replaced with the client validation error; otherwise, false. + + + Gets or sets the validator message ID. + The validator message ID. + + + Gets the client validation rules. + The client validation rules. + + + Sends the contents of a binary file to the response. + + + Initializes a new instance of the class by using the specified file contents and content type. + The byte array to send to the response. + The content type to use for the response. + The parameter is null (Nothing in Visual Basic). + + + The binary content to send to the response. + The file contents. + + + Writes the file content to the response. + The response. + + + Sends the contents of a file to the response. + + + Initializes a new instance of the class by using the specified file name and content type. + The name of the file to send to the response. + The content type of the response. + The parameter is null or empty. + + + Gets or sets the path of the file that is sent to the response. + The path of the file that is sent to the response. + + + Writes the file to the response. + The response. + + + Represents a base class that is used to send binary file content to the response. + + + Initializes a new instance of the class. + The type of the content. + The parameter is null or empty. + + + Gets the content type to use for the response. + The type of the content. + + + Enables processing of the result of an action method by a custom type that inherits from the class. + The context within which the result is executed. + The parameter is null. + + + Gets or sets the content-disposition header so that a file-download dialog box is displayed in the browser with the specified file name. + The name of the file. + + + Writes the file to the response. + The response. + + + Sends binary content to the response by using a instance. + + + Initializes a new instance of the class. + The stream to send to the response. + The content type to use for the response. + The parameter is null (Nothing in Visual Basic). + + + Gets the stream that will be sent to the response. + The file stream. + + + Writes the file to the response. + The response. + + + Represents the base class for action-filter attributes. + + + Initializes a new instance of the class. + + + Gets or sets the order in which the action filters are executed. + The order in which the action filters are executed. + + + Encapsulates information about the available action filters. + + + Initializes a new instance of the class. + + + Gets all the action filters in the application. + All action filters. + + + Gets all the authorization filters in the application. + The authorization filters. + + + Gets all the exception filters in the application. + The exception filters. + + + Gets all the result filters in the application. + The result filters. + + + Contains the form value providers for the application. + + + Initializes a new instance of the class. + + + Initializes a new instance of the class. + The collection. + The parameter is null. + + + Gets the specified value provider. + The value provider. + The name of the value provider to get. + The parameter is null or empty. + + + Gets a value that indicates whether the value provider contains an entry that has the specified prefix. + true if the value provider contains an entry that has the specified prefix; otherwise, false. + The prefix to look for. + + + Gets a value from a value provider using the specified key. + A value from a value provider. + The key. + + + Returns a dictionary that contains the value providers. + A dictionary of value providers. + + + Encapsulates information that is required in order to validate and process the input data from an HTML form. + + + Initializes a new instance of the class. + + + Gets the field validators for the form. + A dictionary of field validators for the form. + + + Gets or sets the form identifier. + The form identifier. + + + Retrieves a serialized object that contains the form identifier and field-validation values for the form. + A serialized object that contains the form identifier and field-validation values for the form. + + + Retrieves the validation value for the specified input field. + The value to validate the field input with. + The name of the field to retrieve the validation value for. + The parameter is either null or empty. + + + Retrieves the validation value for the specified input field and a value that indicates what to do if the validation value is not found. + The value to validate the field input with. + The name of the field to retrieve the validation value for. + true to create a validation value if one is not found; otherwise, false. + The parameter is either null or empty. + + + Determines whether client validation errors should be dynamically added to the validation summary. + true if client validation errors should be added to the validation summary; otherwise, false. + + + Gets or sets the identifier for the validation summary. + The identifier for the validation summary. + + + Enumerates the HTTP request types for a form. + + + Specifies a GET request. + + + Specifies a POST request. + + + Represents a value provider for form values that are contained in a object. + + + Initializes a new instance of the class. + An object that encapsulates information about the current HTTP request. + + + Represents a class that is responsible for creating a new instance of a form-value provider object. + + + Initializes a new instance of the class. + + + Returns a form-value provider object for the specified controller context. + A form-value provider object. + An object that encapsulates information about the current HTTP request. + The parameter is null. + + + Represents an attribute that is used to handle an exception that is thrown by an action method. + + + Initializes a new instance of the class. + + + Gets or sets the type of the exception. + The type of the exception. + + + Gets or sets the master view for displaying exception information. + The master view. + + + Called when an exception occurs. + The action-filter context. + The parameter is null. + + + Gets the unique identifier for this attribute. + The unique identifier for this attribute. + + + Gets or sets the page view for displaying exception information. + The page view. + + + Encapsulates information for handling an error that was thrown by an action method. + + + Initializes a new instance of the class. + The exception. + The name of the controller. + The name of the action. + The parameter is null. + The or parameter is null or empty. + + + Gets or sets the name of the action that was executing when the exception was thrown. + The name of the action. + + + Gets or sets the name of the controller that contains the action method that threw the exception. + The name of the controller. + + + Gets or sets the exception object. + The exception object. + + + Represents an attribute that is used to indicate whether a property or field value should be rendered as a hidden input element. + + + Initializes a new instance of the class. + + + Gets or sets a value that indicates whether to display the value of the hidden input element. + true if the value should be displayed; otherwise, false. + + + Represents support for rendering HTML controls in a view. + + + Initializes a new instance of the class by using the specified view context and view data container. + The view context. + The view data container. + The or the parameter is null. + + + Initializes a new instance of the class by using the specified view context, view data container, and route collection. + The view context. + The view data container. + The route collection. + One or more parameters is null. + + + Generates a hidden form field (anti-forgery token) that is validated when the form is submitted. + The generated form field (anti-forgery token). + + + Generates a hidden form field (anti-forgery token) that is validated when the form is submitted. The field value is generated using the specified salt value. + The generated form field (anti-forgery token). + The salt value, which can be any non-empty string. + + + Generates a hidden form field (anti-forgery token) that is validated when the form is submitted. The field value is generated using the specified salt value, domain, and path. + The generated form field (anti-forgery token). + The salt value, which can be any non-empty string. + The application domain. + The virtual path. + + + Converts the specified attribute object to an HTML-encoded string. + The HTML-encoded string. If the value parameter is null or empty, this method returns an empty string. + The object to encode. + + + Converts the specified attribute string to an HTML-encoded string. + The HTML-encoded string. If the value parameter is null or empty, this method returns an empty string. + The string to encode. + + + Enables input validation that is performed by using client script in the browser. + + + Converts the value of the specified object to an HTML-encoded string. + The HTML-encoded string. + The object to encode. + + + Converts the specified string to an HTML-encoded string. + The HTML-encoded string. + The string to encode. + + + Creates an HTML element ID using the specified element name. + The ID of the HTML element. + The name of the HTML element. + The parameter is null. + + + Creates an HTML element ID using the specified element name and a string that replaces dots in the name. + The ID of the HTML element. + The name of the HTML element. + The string that replaces dots (.) in the parameter. + The parameter or the parameter is null. + + + Generates an HTML anchor element (a element) that links to the specified action method, and enables the user to specify the communication protocol, name of the host, and a URL fragment. + An HTML element that links to the specified action method. + The context of the HTTP request. + The collection of URL routes. + The text caption to display for the link. + The name of the route that is used to return a virtual path. + The name of the action method. + The name of the controller. + The communication protocol, such as HTTP or HTTPS. If this parameter is null, the protocol defaults to HTTP. + The name of the host. + The fragment identifier. + An object that contains the parameters for a route. + An object that contains the HTML attributes for the element. + + + Generates an HTML anchor element (a element) that links to the specified action method. + An HTML element that links to the specified action method. + The context of the HTTP request. + The collection of URL routes. + The text caption to display for the link. + The name of the route that is used to return a virtual path. + The name of the action method. + The name of the controller. + An object that contains the parameters for a route. + An object that contains the HTML attributes for the element. + + + Generates an HTML anchor element (a element) that links to the specified URL route, and enables the user to specify the communication protocol, name of the host, and a URL fragment. + An HTML element that links to the specified URL route. + The context of the HTTP request. + The collection of URL routes. + The text caption to display for the link. + The name of the route that is used to return a virtual path. + The communication protocol, such as HTTP or HTTPS. If this parameter is null, the protocol defaults to HTTP. + The name of the host. + The fragment identifier. + An object that contains the parameters for a route. + An object that contains the HTML attributes for the element. + + + Generates an HTML anchor element (a element) that links to the specified URL route. + An HTML element that links to the specified URL route. + The context of the HTTP request. + The collection of URL routes. + The text caption to display for the link. + The name of the route that is used to return a virtual path. + An object that contains the parameters for a route. + An object that contains the HTML attributes for the element. + + + Returns the HTTP method that handles form input (GET or POST) as a string. + The form method string, either "get" or "post". + The HTTP method that handles the form. + + + Returns the HTML input control type as a string. + The input type string ("checkbox", "hidden", "password", "radio", or "text"). + The enumerated input type. + + + Returns a hidden input element that identifies the override method for the specified HTTP data-transfer method that was used by the client. + The override method that uses the HTTP data-transfer method that was used by the client. + The HTTP data-transfer method that was used by the client (DELETE, HEAD, or PUT). + The parameter is not "PUT", "DELETE", or "HEAD". + + + Returns a hidden input element that identifies the override method for the specified verb that represents the HTTP data-transfer method used by the client. + The override method that uses the verb that represents the HTTP data-transfer method used by the client. + The verb that represents the HTTP data-transfer method used by the client. + The parameter is not "PUT", "DELETE", or "HEAD". + + + Gets or sets the character that replaces periods in the ID attribute of an element. + The character that replaces periods in the ID attribute of an element. + + + Gets or sets the collection of routes for the application. + The collection of routes for the application. + + + The name of the CSS class that is used to style an input field when a validation error occurs. + + + The name of the CSS class that is used to style an input field when the input is valid. + + + The name of the CSS class that is used to style the error message when a validation error occurs. + + + The name of the CSS class that is used to style the validation message when the input is valid. + + + The name of the CSS class that is used to style validation summary error messages. + + + The name of the CSS class that is used to style the validation summary when the input is valid. + + + Gets or sets the context information about the view. + The context of the view. + + + Gets the current view data dictionary. + The view data dictionary. + + + Gets or sets the view data container. + The view data container. + + + Represents support for rendering HTML controls in a strongly typed view. + The type of the model. + + + Initializes a new instance of the class by using the specified view context and view data container. + The view context. + The view data container. + + + Initializes a new instance of the class by using the specified view context, view data container, and route collection. + The view context. + The view data container. + The route collection. + + + Gets the strongly typed view data dictionary. + The strongly typed view data dictionary. + + + Represents an HTTP anti-forgery exception. + + + Initializes a new instance of the class by using a system-supplied message that describes the error. + + + Initializes a new instance of the class by using a specified message that describes the error. + The message that describes the exception. The caller of this constructor must make sure that this string has been localized for the current system culture. + + + Initializes a new instance of the class by using a specified error message and a reference to the inner exception that is the cause of this exception. + The message that describes the exception. The caller of this constructor must make sure that this string has been localized for the current system culture. + The exception that is the cause of the current exception. If the parameter is not null, the current exception is raised in a catch block that handles the inner exception. + + + Represents an attribute that is used to restrict an action method so that the method handles only HTTP DELETE requests. + + + Initializes a new instance of the class. + + + Determines whether a request is a valid HTTP DELETE request. + true if the request is valid; otherwise, false. + The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data. + Encapsulates information about a method, such as its type, return type, and arguments. + + + Represents a value provider to use with values that come from a collection of HTTP files. + + + Initializes a new instance of the class. + An object that encapsulates information about the current HTTP request. + + + Represents a class that is responsible for creating a new instance of an HTTP file collection value provider object. + + + Initializes a new instance of the class. + + + Returns a value provider object for the specified controller context. + An HTTP file collection value provider. + An object that encapsulates information about the HTTP request. + The parameter is null. + + + Represents an attribute that is used to restrict an action method so that the method handles only HTTP GET requests. + + + Initializes a new instance of the class. + + + Determines whether a request is a valid HTTP GET request. + true if the request is valid; otherwise, false. + The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data. + Encapsulates information about a method, such as its type, return type, and arguments. + + + Represents an attribute that is used to restrict an action method so that the method handles only HTTP POST requests. + + + Initializes a new instance of the class. + + + Determines whether a request is a valid HTTP POST request. + true if the request is valid; otherwise, false. + The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data. + Encapsulates information about a method, such as its type, return type, and arguments. + + + Binds a model to a posted file. + + + Initializes a new instance of the class. + + + Binds the model. + The bound value. + The controller context. + The binding context. + One or both parameters are null. + + + Represents an attribute that is used to restrict an action method so that the method handles only HTTP PUT requests. + + + Initializes a new instance of the class. + + + Determines whether a request is a valid HTTP PUT request. + true if the request is valid; otherwise, false. + The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data. + Encapsulates information about a method, such as its type, return type, and arguments. + + + Extends the class that contains the HTTP values that were sent by a client during a Web request. + + + Retrieves the HTTP data-transfer method override that was used by the client. + The HTTP data-transfer method override that was used by the client. + An object that contains the HTTP values that were sent by a client during a Web request. + The parameter is null. + The HTTP data-transfer method override was not implemented. + + + Represents the result of an unauthorized HTTP request. + + + Initializes a new instance of the class. + + + Enables processing of the result of an action method by a custom type that inherits from the class. + The context within which the result is executed. + The parameter is null. + + + Enumerates the HTTP verbs. + + + Retrieves the information or entity that is identified by the URI of the request. + + + Posts a new entity as an addition to a URI. + + + Replaces an entity that is identified by a URI. + + + Requests that a specified URI be deleted. + + + Retrieves the message headers for the information or entity that is identified by the URI of the request. + + + Defines the methods that are used in an action filter. + + + Called after the action method executes. + The filter context. + + + Called before an action method executes. + The filter context. + + + Defines the contract for an action invoker, which is used to invoke an action in response to an HTTP request. + + + Invokes the specified action by using the specified controller context. + true if the action was found; otherwise, false. + The controller context. + The name of the action. + + + Defines the methods that are required for an authorization filter. + + + Called when authorization is required. + The filter context. + + + Defines the methods that are required for a controller. + + + Executes the specified request context. + The request context. + + + Defines the methods that are required for a controller factory. + + + Creates the specified controller by using the specified request context. + The controller. + The request context. + The name of the controller. + + + Releases the specified controller. + The controller. + + + Defines the methods that are required for an exception filter. + + + Called when an exception occurs. + The filter context. + + + Defines the methods that are required for a model binder. + + + Binds the model to a value by using the specified controller context and binding context. + The bound value. + The controller context. + The binding context. + + + Enumerates the types of input controls. + + + A check box. + + + A hidden field. + + + A password box. + + + A radio button. + + + A text box. + + + Defines the methods that are required for a result filter. + + + Called after an action result executes. + The filter context. + + + Called before an action result executes. + The filter context. + + + Associates a route with an area in an ASP.NET MVC application. + + + Gets the name of the area to associate the route with. + The name of the area to associate the route with. + + + Defines the contract for temporary-data providers that store data that is viewed on the next request. + + + Loads the temporary data. + The temporary data. + The controller context. + + + Saves the temporary data. + The controller context. + The values. + + + Defines the methods that are required for a value provider in ASP.NET MVC. + + + Determines whether the collection contains the specified prefix. + true if the collection contains the specified prefix; otherwise, false. + The prefix to search for. + + + Retrieves a value object using the specified key. + The value object for the specified key. + The key of the value object to retrieve. + + + Defines the methods that are required for a view. + + + Renders the specified view context by using the specified the writer object. + The view context. + The writer object. + + + Defines the methods that are required for a view data dictionary. + + + Gets or sets the view data dictionary. + The view data dictionary. + + + Defines the methods that are required for a view engine. + + + Finds the specified partial view by using the specified controller context. + The partial view. + The controller context. + The name of the partial view. + true to specify that the view engine returns the cached view, if a cached view exists; otherwise, false. + + + Finds the specified view by using the specified controller context. + The page view. + The controller context. + The name of the view. + The name of the master. + true to specify that the view engine returns the cached view, if a cached view exists; otherwise, false. + + + Releases the specified view by using the specified controller context. + The controller context. + The view. + + + Defines the methods that are required in order to cache view locations in memory. + + + Gets the view location by using the specified HTTP context and the cache key. + The view location. + The HTTP context. + The cache key. + + + Inserts the specified view location into the cache by using the specified HTTP context and the cache key. + The HTTP context. + The cache key. + The virtual path. + + + Sends JavaScript content to the response. + + + Initializes a new instance of the class. + + + Enables processing of the result of an action method by a custom type that inherits from the class. + The context within which the result is executed. + The parameter is null. + + + Gets or sets the script. + The script. + + + Specifies whether HTTP GET requests from the client are allowed. + + + HTTP GET requests from the client are allowed. + + + HTTP GET requests from the client are not allowed. + + + Represents a class that is used to send JSON-formatted content to the response. + + + Initializes a new instance of the class. + + + Gets or sets the content encoding. + The content encoding. + + + Gets or sets the type of the content. + The type of the content. + + + Gets or sets the data. + The data. + + + Enables processing of the result of an action method by a custom type that inherits from the class. + The context within which the result is executed. + The parameter is null. + + + Gets or sets a value that indicates whether HTTP GET requests from the client are allowed. + A value that indicates whether HTTP GET requests from the client are allowed. + + + Maps a browser request to a LINQ object. + + + Initializes a new instance of the class. + + + Binds the model by using the specified controller context and binding context. + The bound data object. If the model cannot be bound, this method returns null. + The context within which the controller operates. The context information includes the controller, HTTP content, request context, and route data. + The context within which the model is bound. The context includes information such as the model object, model name, model type, property filter, and value provider. + + + Represents an attribute that is used to associate a model type to a model-builder type. + + + Initializes a new instance of the class. + The type of the binder. + The parameter is null. + + + Gets or sets the type of the binder. + The type of the binder. + + + Retrieves an instance of the model binder. + A reference to an object that implements the interface. + An error occurred while an instance of the model binder was being created. + + + Represents a class that contains all model binders for the application, listed by binder type. + + + Initializes a new instance of the class. + + + Adds the specified item to the model binder dictionary. + The object to add to the instance. + The object is read-only. + + + Adds the specified item to the model binder dictionary using the specified key. + The key of the element to add. + The value of the element to add. + The object is read-only. + + is null. + An element that has the same key already exists in the object. + + + Removes all items from the model binder dictionary. + The object is read-only. + + + Determines whether the model binder dictionary contains a specified value. + true if is found in the model binder dictionary; otherwise, false. + The object to locate in the object. + + + Determines whether the model binder dictionary contains an element that has the specified key. + true if the model binder dictionary contains an element that has the specified key; otherwise, false. + The key to locate in the object. + + is null. + + + Copies the elements of the model binder dictionary to an array, starting at a specified index. + The one-dimensional array that is the destination of the elements copied from . The array must have zero-based indexing. + The zero-based index in at which copying starts. + + is null. + + is less than 0. + + is multidimensional.-or- is equal to or greater than the length of .-or- The number of elements in the source object is greater than the available space from to the end of the destination array. -or- Type cannot be cast automatically to the type of the destination array. + + + Gets the number of elements in the model binder dictionary. + The number of elements in the model binder dictionary. + + + Gets or sets the default model binder. + The default model binder. + + + Retrieves the model binder for the specified type. + The model binder. + The type of the model to retrieve. + The parameter is null. + + + Retrieves the model binder for the specified type or retrieves the default model binder. + The model binder. + The type of the model to retrieve. + true to retrieve the default model binder. + The parameter is null. + + + Returns an enumerator that can be used to iterate through the collection. + An enumerator that can be used to iterate through the collection. + + + Gets a value that indicates whether the model binder dictionary is read-only. + true if the model binder dictionary is read-only; otherwise, false. + + + Gets or sets the specified key in an object that implements the interface. + The key for the specified item. + The item key. + + + Gets a collection that contains the keys in the model binder dictionary. + A collection that contains the keys in the model binder dictionary. + + + Removes the first occurrence of the specified element from the model binder dictionary. + true if was successfully removed from the model binder dictionary; otherwise, false. This method also returns false if is not found in the model binder dictionary. + The object to remove from the object. + The object is read-only. + + + Removes the element that has the specified key from the model binder dictionary. + true if the element is successfully removed; otherwise, false. This method also returns false if was not found in the model binder dictionary. + The key of the element to remove. + The object is read-only. + + is null. + + + Returns an enumerator that can be used to iterate through a collection. + An enumerator that can be used to iterate through the collection. + + + Gets the value that is associated with the specified key. + true if the object that implements contains an element that has the specified key; otherwise, false. + The key of the value to get. + When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the parameter. This parameter is passed uninitialized. + + is null. + + + Gets a collection that contains the values in the model binder dictionary. + A collection that contains the values in the model binder dictionary. + + + Provides global access to the model binders for the application. + + + Gets the model binders for the application. + The model binders for the application. + + + Provides the context in which a model binder functions. + + + Initializes a new instance of the class. + + + Initializes a new instance of the class using the binding context. + The binding context. + + + Gets or sets a value that indicates whether the binder should use an empty prefix. + true if the binder should use an empty prefix; otherwise, false. + + + Gets or sets the model. + The model. + + + Gets or sets the model metadata. + The model metadata. + + + Gets or sets the name of the model. + The name of the model. + + + Gets or sets the state of the model. + The state of the model. + + + Gets or sets the type of the model. + The type of the model. + + + Gets or sets the property filter. + The property filter. + + + Gets the property metadata. + The property metadata. + + + Gets or sets the value provider. + The value provider. + + + Provides a container for a range-validation rule that is sent to the browser. + + + Initializes a new instance of the class. + The error message. + The minimum value. + The maximum value. + + + Provides a container for a regular-expression client validation rule that is sent to the browser. + + + Initializes a new instance of the class. + The error message to display when the regular expression validation fails. + The regular expression. + + + Provides a container for client validation for required field. + + + Initializes a new instance of the class. + The error message to display when a value for the required field is not provided. + + + Provides a base class container for a client validation rule that is sent to the browser. + + + Initializes a new instance of the class. + + + Gets or sets the error message for the client validation rule. + The error message for the client validation rule. + + + Gets the list of validation parameters. + A list of validation parameters. + + + Gets or sets the validation type. + The validation type. + + + Provides a container for a string-length validation rule that is sent to the browser. + + + Initializes a new instance of the class. + The validation error message. + The minimum length of the string. + The maximum length of the string. + + + Represents an error that occurs during model binding. + + + Initializes a new instance of the class by using the specified exception. + The exception. + The parameter is null. + + + Initializes a new instance of the class by using the specified exception and error message. + The exception. + The error message. + The parameter is null. + + + Initializes a new instance of the class by using the specified error message. + The error message. + + + Gets or sets the error message. + The error message. + + + Gets or sets the exception object. + The exception object. + + + A collection of instances. + + + Initializes a new instance of the class. + + + Adds the specified object to the model-error collection. + The exception. + + + Adds the specified error message to the model-error collection. + The error message. + + + Provides a container for common metadata, for the class, and for the class for a data model. + + + Initializes a new instance of the class. + The provider. + The type of the container. + The model accessor. + The type of the model. + The name of the property. + + + Gets a dictionary that contains additional metadata about the model. + A dictionary that contains additional metadata about the model. + + + Gets or sets the type of the container for the model. + The type of the container for the model. + + + Gets or sets a value that indicates whether empty strings that are posted back in forms should be converted to null. + true if empty strings that are posted back in forms should be converted to null; otherwise, false. The default value is true. + + + Gets or sets meta information about the data type. + Meta information about the data type. + + + Gets or sets the description of the model. + The description of the model. The default value is null. + + + Gets or sets the display format string for the model. + The display format string for the model. + + + Gets or sets the display name of the model. + The display name of the model. + + + Gets or sets the edit format string of the model. + The edit format string of the model. + + + Gets the metadata from the parameter for the model. + The metadata for the model. + An expression that identifies the model. + The view data dictionary. + The type of the parameter. + The type of the value. + + + Gets the metadata from the expression parameter for the model. + The metadata for the model. + An expression that identifies the model. + The view data dictionary. + + + Gets the display name for the model. + The display name for the model. + + + Returns the simple description of the model. + The simple description of the model. + + + Gets a list of validators for the model. + A list of validators for the model. + The controller context. + + + Gets or sets a value that indicates whether the model object should be rendered using associated HTML elements. + true if the associated HTML elements that contains the model object should be included with the object; otherwise, false. + + + Gets or sets a value that indicates whether the model is a complex type. + A value that indicates whether the model is considered a complex type by the MVC framework. + + + Gets a value that indicates whether the type is nullable. + true if the type is nullable; otherwise, false. + + + Gets or sets a value that indicates whether the model is read-only. + true if the model is read-only; otherwise, false. + + + Gets or sets a value that indicates whether the model is required. + true if the model is required; otherwise, false. + + + Gets the value of the model. + The value of the model. For more information about , see the entry ASP.NET MVC 2 Templates, Part 2: ModelMetadata on Brad Wilson's blog + + + Gets the type of the model. + The type of the model. + + + Gets or sets the string to display for null values. + The string to display for null values. + + + Gets a collection of model metadata objects that describe the properties of the model. + A collection of model metadata objects that describe the properties of the model. + + + Gets the property name. + The property name. + + + Gets or sets the provider. + The provider. + + + Gets or sets a short display name. + The short display name. + + + Gets or sets a value that indicates whether the property should be displayed in read-only views such as list and detail views. + true if the model should be displayed in read-only views; otherwise, false. + + + Gets or sets a value that indicates whether the model should be displayed in editable views. + true if the model should be displayed in editable views; otherwise, false. + + + Gets or sets the simple display string for the model. + The simple display string for the model. + + + Gets or sets a hint that suggests what template to use for this model. + A hint that suggests what template to use for this model. + + + Gets or sets a value that can be used as a watermark. + The watermark. + + + Provides an abstract base class for a custom metadata provider. + + + When overridden in a derived class, initializes a new instance of the object that derives from the class. + + + Gets a object for each property of a model. + A object for each property of a model. + The container. + The type of the container. + + + Gets metadata for the specified property. + The metadata model for the specified property. + The model accessor. + The type of the container. + The property to get the metadata model for. + + + Gets metadata for the specified model accessor and model type. + The metadata. + The model accessor. + They type of the model. + + + Provides a container for the current instance. + + + Gets or sets the current object. + The current object. + + + Encapsulates the state of model binding to a property of an action-method argument, or to the argument itself. + + + Initializes a new instance of the class. + + + Returns a object that contains any errors that occurred during model binding. + The errors. + + + Returns a object that encapsulates the value that was being bound during model binding. + The value. + + + Represents the state of an attempt to bind a posted form to an action method, which includes validation information. + + + Initializes a new instance of the class. + + + Initializes a new instance of the class by using values that are copied from the specified model-state dictionary. + The model-state dictionary. + The parameter is null. + + + Adds the specified item to the model-state dictionary. + The object to add to the model-state dictionary. + The model-state dictionary is read-only. + + + Adds an element that has the specified key and value to the model-state dictionary. + The key of the element to add. + The value of the element to add. + The model-state dictionary is read-only. + + is null. + An element that has the specified key already occurs in the model-state dictionary. + + + Adds the specified model error to the errors collection for the model-state dictionary that is associated with the specified key. + The key. + The exception. + + + Adds the specified error message to the errors collection for the model-state dictionary that is associated with the specified key. + The key. + The error message. + + + Removes all items from the model-state dictionary. + The model-state dictionary is read-only. + + + Determines whether the model-state dictionary contains a specific value. + true if is found in the model-state dictionary; otherwise, false. + The object to locate in the model-state dictionary. + + + Determines whether the model-state dictionary contains the specified key. + true if the model-state dictionary contains the specified key; otherwise, false. + The key to locate in the model-state dictionary. + + + Copies the elements of the model-state dictionary to an array, starting at a specified index. + The one-dimensional array that is the destination of the elements copied from the object. The array must have zero-based indexing. + The zero-based index in at which copying starts. + + is null. + + is less than 0. + + is multidimensional.-or- is equal to or greater than the length of .-or- The number of elements in the source collection is greater than the available space from to the end of the destination .-or- Type cannot be cast automatically to the type of the destination . + + + Gets the number of key/value pairs in the collection. + The number of key/value pairs in the collection. + + + Returns an enumerator that can be used to iterate through the collection. + An enumerator that can be used to iterate through the collection. + + + Gets a value that indicates whether the collection is read-only. + true if the collection is read-only; otherwise, false. + + + Gets a value that indicates whether this instance of the model-state dictionary is valid. + true if this instance is valid; otherwise, false. + + + Determines whether there are any objects that are associated with or prefixed with the specified key. + true if the model-state dictionary contains a value that is associated with the specified key; otherwise, false. + The key. + The parameter is null. + + + Gets or sets the value that is associated with the specified key. + The model state item. + The key. + + + Gets a collection that contains the keys in the dictionary. + A collection that contains the keys of the model-state dictionary. + + + Copies the values from the specified object into this dictionary, overwriting existing values if keys are the same. + The dictionary. + + + Removes the first occurrence of the specified object from the model-state dictionary. + true if was successfully removed the model-state dictionary; otherwise, false. This method also returns false if is not found in the model-state dictionary. + The object to remove from the model-state dictionary. + The model-state dictionary is read-only. + + + Removes the element that has the specified key from the model-state dictionary. + true if the element is successfully removed; otherwise, false. This method also returns false if was not found in the model-state dictionary. + The key of the element to remove. + The model-state dictionary is read-only. + + is null. + + + Sets the value for the specified key by using the specified value provider dictionary. + The key. + The value. + + + Returns an enumerator that can be used to iterate through the collection. + An enumerator that can be used to iterate through the collection. + + + Attempts to gets the value that is associated with the specified key. + true if the object that implements contains an element that has the specified key; otherwise, false. + The key of the value to get. + When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the parameter. This parameter is passed uninitialized. + + is null. + + + Gets a collection that contains the values in the dictionary. + A collection that contains the values of the model-state dictionary. + + + Provides a container for a validation result. + + + Initializes a new instance of the class. + + + Gets or sets the name of the member. + The name of the member. + + + Gets or sets the validation result message. + The validation result message. + + + Provides a base class for implementing validation logic. + + + Called from constructors in derived classes to initialize the class. + The metadata. + The controller context. + + + Gets the controller context. + The controller context. + + + When implemented in a derived class, returns metadata for client validation. + The metadata for client validation. + + + Returns a composite model validator for the model. + A composite model validator for the model. + The metadata. + The controller context. + + + Gets or sets a value that indicates whether a model property is required. + true if the model property is required; otherwise, false. + + + Gets the metadata for the model validator. + The metadata for the model validator. + + + When implemented in a derived class, validates the object. + A list of validation results. + The container. + + + Provides a list of validators for a model. + + + When implemented in a derived class, initializes a new instance of the class. + + + Gets a list of validators. + A list of validators. + The metadata. + The context. + + + Provides a container for a list of validation providers. + + + Initializes a new instance of the class. + + + Initializes a new instance of the class using a list of model-validation providers. + A list of model-validation providers. + + + Returns the list of model validators. + The list of model validators. + The model metadata. + The controller context. + + + Inserts a model-validator provider into the collection. + The zero-based index at which item should be inserted. + The model-validator provider object to insert. + + + Replaces the model-validator provider element at the specified index. + The zero-based index of the model-validator provider element to replace. + The new value for the model-validator provider element. + + + Provides a container for the current validation provider. + + + Gets the model validator provider collection. + The model validator provider collection. + + + Represents a list of items that users can select more than one item from. + + + Initializes a new instance of the class by using the specified items to include in the list. + The items. + The parameter is null. + + + Initializes a new instance of the class by using the specified items to include in the list and the selected values. + The items. + The selected values. + The parameter is null. + + + Initializes a new instance of the class by using the items to include in the list, the data value field, and the data text field. + The items. + The data value field. + The data text field. + The parameter is null. + + + Initializes a new instance of the class by using the items to include in the list, the data value field, the data text field, and the selected values. + The items. + The data value field. + The data text field. + The selected values. + The parameter is null. + + + Gets or sets the data text field. + The data text field. + + + Gets or sets the data value field. + The data value field. + + + Returns an enumerator that can be used to iterate through the collection. + An enumerator that can be used to iterate through the collection. + + + Gets or sets the items in the list. + The items in the list. + + + Gets or sets the selected values. + The selected values. + + + Returns an enumerator can be used to iterate through a collection. + An enumerator that can be used to iterate through the collection. + + + Selects the controller that will handle an HTTP request. + + + Initializes a new instance of the class. + The request context. + The parameter is null. + + + Adds the version header by using the specified HTTP context. + The HTTP context. + + + Called by ASP.NET to begin asynchronous request processing. + The status of the asynchronous call. + The HTTP context. + The asynchronous callback method. + The state of the asynchronous object. + + + Called by ASP.NET to begin asynchronous request processing using the base HTTP context. + The status of the asynchronous call. + The HTTP context. + The asynchronous callback method. + The state of the asynchronous object. + + + Gets or sets a value that indicates whether the MVC response header is disabled. + true if the MVC response header is disabled; otherwise, false. + + + Called by ASP.NET when asynchronous request processing has ended. + The asynchronous result. + + + Gets a value that indicates whether another request can use the instance. + true if the instance is reusable; otherwise, false. + + + Contains the header name of the ASP.NET MVC version. + + + Processes the request by using the specified HTTP request context. + The HTTP context. + + + Processes the request by using the specified base HTTP request context. + The HTTP context. + + + Gets the request context. + The request context. + + + Called by ASP.NET to begin asynchronous request processing using the base HTTP context. + The status of the asynchronous call. + The HTTP context. + The asynchronous callback method. + The data. + + + Called by ASP.NET when asynchronous request processing has ended. + The asynchronous result. + + + Gets a value that indicates whether another request can use the instance. + true if the instance is reusable; otherwise, false. + + + Enables processing of HTTP Web requests by a custom HTTP handler that implements the interface. + An object that provides references to the intrinsic server objects (for example, Request, Response, Session, and Server) that are used to service HTTP requests. + + + Represents an HTML-encoded string that should not be encoded again. + + + Initializes a new instance of the class. + The string to create. If no value is assigned, the object is created using an empty-string value. + + + Creates an HTML-encoded string using the specified text value. + An HTML-encoded string. + The value of the string to create . + + + Contains an empty HTML string. + + + Determines whether the specified string contains content or is either null or empty. + true if the string is null or empty; otherwise, false. + The string. + + + Returns an HTML-encoded string that represents the current object. + An HTML-encoded string that represents the current object. + + + Returns a string that represents the current object. + A string that represents the current object. + + + Verifies and processes an HTTP request. + + + Initializes a new instance of the class. + + + Called by ASP.NET to begin asynchronous request processing. + The status of the asynchronous call. + The HTTP context. + The asynchronous callback method. + The state. + + + Called by ASP.NET to begin asynchronous request processing. + The status of the asynchronous call. + The base HTTP context. + The asynchronous callback method. + The state. + + + Called by ASP.NET when asynchronous request processing has ended. + The asynchronous result. + + + Called by ASP.NET to begin asynchronous request processing. + The status of the asynchronous call. + The context. + The asynchronous callback method. + An object that contains data. + + + Called by ASP.NET when asynchronous request processing has ended. + The status of the asynchronous operations. + + + Verifies and processes an HTTP request. + The HTTP handler. + The HTTP context. + + + Creates an object that implements the IHttpHandler interface and gives it the request context. + + + Initializes a new instance of the class. + + + Retrieves the HTTP handler by using the specified HTTP context. + The HTTP handler. + The request context. + + + Retrieves the HTTP handler by using the specified request context. + The HTTP handler. + The request context. + + + Extends a NameValueCollection object so that the collection can be copied to a specified dictionary. + + + Copies the specified collection to the specified destination. + The collection. + The destination. + + + Copies the specified collection to the specified destination, and optionally replaces previous entries. + The collection. + The destination. + true to replace previous entries; otherwise, false. + + + Represents the base class for value providers whose values come from a object. + + + Initializes a new instance of the class. + A collection that contains the values that are used to initialize the provider. + An object that contains information about the target culture. + The parameter is null. + + + Determines whether the collection contains the specified prefix. + true if the collection contains the specified prefix; otherwise, false. + The prefix to search for. + The parameter is null. + + + Returns a value object using the specified key. + The value object for the specified key. + The key of the value object to retrieve. + The parameter is null. + + + Provides a convenience wrapper for the attribute. + + + Initializes a new instance of the class. + + + Represents an attribute that is used to indicate that a controller method is not an action method. + + + Initializes a new instance of the class. + + + Determines whether the attribute marks a method that is not an action method by using the specified controller context. + true if the attribute marks a valid non-action method; otherwise, false. + The controller context. + The method information. + + + Represents an attribute that is used to mark an action method whose output will be cached. + + + Initializes a new instance of the class. + + + Gets or sets the cache profile name. + The cache profile name. + + + Gets or sets the cache duration. + The cache duration. + + + Gets or sets the location. + The location. + + + Gets or sets a value that indicates whether to store the cache. + true if the cache should be stored; otherwise, false. + + + Called before the action result executes. + The filter context, which encapsulates information for using . + The parameter is null. + + + Gets or sets the SQL dependency. + The SQL dependency. + + + Gets or sets the vary-by-content encoding. + The vary-by-content encoding. + + + Gets or sets the vary-by-custom value. + The vary-by-custom value. + + + Gets or sets the vary-by-header value. + The vary-by-header value. + + + Gets or sets the vary-by-param value. + The vary-by-param value. + + + Encapsulates information for binding action-method parameters to a data model. + + + Initializes a new instance of the class. + + + Gets the model binder. + The model binder. + + + Gets a comma-delimited list of property names for which binding is disabled. + The exclude list. + + + Gets a comma-delimited list of property names for which binding is enabled. + The include list. + + + Gets the prefix to use when the MVC framework binds a value to an action parameter or to a model property. + The prefix. + + + Contains information that describes a parameter. + + + Initializes a new instance of the class. + + + Gets the action descriptor. + The action descriptor. + + + Gets the binding information. + The binding information. + + + Gets the default value of the parameter. + The default value of the parameter. + + + Returns an array of custom attributes that are defined for this member, excluding named attributes. + An array of custom attributes, or an empty array if no custom attributes exist. + true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. + The custom attribute type cannot be loaded. + There is more than one attribute of type defined for this member. + + + Returns an array of custom attributes that are defined for this member, identified by type. + An array of custom attributes, or an empty array if no custom attributes exist. + The type of the custom attributes. + true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. + The custom attribute type cannot be loaded. + There is more than one attribute of type defined for this member. + The parameter is null. + + + Indicates whether one or more instances of a custom attribute type are defined for this member. + true if the custom attribute type is defined for this member; otherwise, false. + The type of the custom attributes. + true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. + The parameter is null. + + + Gets the name of the parameter. + The name of the parameter. + + + Gets the type of the parameter. + The type of the parameter. + + + Represents a base class that is used to send a partial view to the response. + + + Initializes a new instance of the class. + + + Returns the object that is used to render the view. + The view engine result. + The controller context. + An error occurred while the method was attempting to find the view. + + + Represents a value provider for query strings that are contained in a object. + + + Initializes a new instance of the class. + An object that encapsulates information about the current HTTP request. + + + Represents a class that is responsible for creating a new instance of a query-string value-provider object. + + + Initializes a new instance of the class. + + + Returns a value-provider object for the specified controller context. + A query-string value-provider object. + An object that encapsulates information about the current HTTP request. + The parameter is null. + + + Provides an adapter for the attribute. + + + Initializes a new instance of the class. + The model metadata. + The controller context. + The range attribute. + + + Gets a list of client validation rules for a range check. + A list of client validation rules for a range check. + + + Controls the processing of application actions by redirecting to a specified URI. + + + Initializes a new instance of the class. + The target URL. + The parameter is null. + + + Enables processing of the result of an action method by a custom type that inherits from the class. + The context within which the result is executed. + The parameter is null. + + + Gets or sets the target URL. + The target URL. + + + Represents a result that performs a redirection by using the specified route values dictionary. + + + Initializes a new instance of the class by using the specified route name and route values. + The name of the route. + The route values. + + + Initializes a new instance of the class by using the specified route values. + The route values. + + + Enables processing of the result of an action method by a custom type that inherits from the class. + The context within which the result is executed. + The parameter is null. + + + Gets or sets the name of the route. + The name of the route. + + + Gets or sets the route values. + The route values. + + + Contains information that describes a reflected action method. + + + Initializes a new instance of the class. + The action-method information. + The name of the action. + The controller descriptor. + Either the or parameter is null. + The parameter is null or empty. + + + Gets the name of the action. + The name of the action. + + + Gets the controller descriptor. + The controller descriptor. + + + Executes the specified controller context by using the specified action-method parameters. + The action return value. + The controller context. + The parameters. + The or parameter is null. + + + Returns an array of custom attributes defined for this member, excluding named attributes. + An array of custom attributes, or an empty array if no custom attributes exist. + true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. + The custom attribute type cannot be loaded. + There is more than one attribute of type defined for this member. + + + Returns an array of custom attributes defined for this member, identified by type. + An array of custom attributes, or an empty array if no custom attributes exist. + The type of the custom attributes. + true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. + The custom attribute type cannot be loaded. + There is more than one attribute of type defined for this member. + + + Retrieves information about action filters. + The filter information. + + + Retrieves the parameters of the action method. + The parameters of the action method. + + + Retrieves the action selectors. + The action selectors. + + + Indicates whether one or more instances of a custom attribute type are defined for this member. + true if the custom attribute type is defined for this member; otherwise, false. + The type of the custom attributes. + true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. + + + Gets or sets the action-method information. + The action-method information. + + + Contains information that describes a reflected controller. + + + Initializes a new instance of the class. + The type of the controller. + The parameter is null. + + + Gets the type of the controller. + The type of the controller. + + + Finds the specified action for the specified controller context. + The information about the action. + The controller context. + The name of the action. + The parameter is null. + The parameter is null or empty. + + + Returns the list of actions for the controller. + A list of action descriptors for the controller. + + + Returns an array of custom attributes that are defined for this member, excluding named attributes. + An array of custom attributes, or an empty array if no custom attributes exist. + true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. + The custom attribute type cannot be loaded. + There is more than one attribute of type defined for this member. + + + Returns an array of custom attributes that are defined for this member, identified by type. + An array of custom attributes, or an empty array if no custom attributes exist. + The type of the custom attributes. + true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. + The custom attribute type cannot be loaded. + There is more than one attribute of type defined for this member. + + + Returns a value that indicates whether one or more instances of a custom attribute type are defined for this member. + true if the custom attribute type is defined for this member; otherwise, false. + The type of the custom attributes. + true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. + + + Contains information that describes a reflected action-method parameter. + + + Initializes a new instance of the class. + The parameter information. + The action descriptor. + The or parameter is null. + + + Gets the action descriptor. + The action descriptor. + + + Gets the binding information. + The binding information. + + + Gets the default value of the reflected parameter. + The default value of the reflected parameter. + + + Returns an array of custom attributes that are defined for this member, excluding named attributes. + An array of custom attributes, or an empty array if no custom attributes exist. + true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. + The custom attribute type cannot be loaded. + There is more than one attribute of type defined for this member. + + + Returns an array of custom attributes that are defined for this member, identified by type. + An array of custom attributes, or an empty array if no custom attributes exist. + The type of the custom attributes. + true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. + The custom attribute type cannot be loaded. + There is more than one attribute of type defined for this member. + + + Returns a value that indicates whether one or more instances of a custom attribute type are defined for this member. + true if the custom attribute type is defined for this member; otherwise, false. + The type of the custom attributes. + true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. + + + Gets or sets the parameter information. + The parameter information. + + + Gets the name of the parameter. + The name of the parameter. + + + Gets the type of the parameter. + The type of the parameter. + + + Provides an adapter for the attribute. + + + Initializes a new instance of the class. + The model metadata. + The controller context. + The regular expression attribute. + + + Gets a list of regular-expression client validation rules. + A list of regular-expression client validation rules. + + + Provides an adapter for the attribute. + + + Initializes a new instance of the class. + The model metadata. + The controller context. + The required attribute. + + + Gets a list of required-value client validation rules. + A list of required-value client validation rules. + + + Represents an attribute that forces an unsecured HTTP request to be re-sent over HTTPS. + + + Initializes a new instance of the class. + + + Handles unsecured HTTP requests that are sent to the action method. + An object that encapsulates information that is required in order to use the attribute. + The HTTP request contains an invalid transfer method override. All GET requests are considered invalid. + + + Determines whether a request is secured (HTTPS) and, if it is not, calls the method. + An object that encapsulates information that is required in order to use the attribute. + The parameter is null. + + + Provides the context for the method of the class. + + + Initializes a new instance of the class. + + + Initializes a new instance of the class. + The controller context. + The result object. + true to cancel execution; otherwise, false. + The exception object. + The parameter is null. + + + Gets or sets a value that indicates whether this instance is canceled. + true if the instance is canceled; otherwise, false. + + + Gets or sets the exception object. + The exception object. + + + Gets or sets a value that indicates whether the exception has been handled. + true if the exception has been handled; otherwise, false. + + + Gets or sets the action result. + The action result. + + + Provides the context for the method of the class. + + + Initializes a new instance of the class. + + + Initializes a new instance of the class by using the specified controller context and action result. + The controller context. + The action result. + The parameter is null. + + + Gets or sets a value that indicates whether this value is "cancel". + true if the value is "cancel"; otherwise, false. + + + Gets or sets the action result. + The action result. + + + Extends a object for MVC routing. + + + Returns an object that contains information about the route and virtual path that are the result of generating a URL in the current area. + An object that contains information about the route and virtual path that are the result of generating a URL in the current area. + An object that contains the routes for the applications. + An object that encapsulates information about the requested route. + The name of the route to use when information about the URL path is retrieved. + An object that contains the parameters for a route. + + + Returns an object that contains information about the route and virtual path that are the result of generating a URL in the current area. + An object that contains information about the route and virtual path that are the result of generating a URL in the current area. + An object that contains the routes for the applications. + An object that encapsulates information about the requested route. + An object that contains the parameters for a route. + + + Ignores the specified URL route for the given list of available routes. + A collection of routes for the application. + The URL pattern for the route to ignore. + The or parameter is null. + + + Ignores the specified URL route for the given list of the available routes and a list of constraints. + A collection of routes for the application. + The URL pattern for the route to ignore. + A set of expressions that specify values for the parameter. + The or parameter is null. + + + Maps the specified URL route. + A reference to the mapped route. + A collection of routes for the application. + The name of the route to map. + The URL pattern for the route. + The or parameter is null. + + + Maps the specified URL route and sets default route values. + A reference to the mapped route. + A collection of routes for the application. + The name of the route to map. + The URL pattern for the route. + An object that contains default route values. + The or parameter is null. + + + Maps the specified URL route and sets default route values and constraints. + A reference to the mapped route. + A collection of routes for the application. + The name of the route to map. + The URL pattern for the route. + An object that contains default route values. + A set of expressions that specify values for the parameter. + The or parameter is null. + + + Maps the specified URL route and sets default route values, constraints, and namespaces. + A reference to the mapped route. + A collection of routes for the application. + The name of the route to map. + The URL pattern for the route. + An object that contains default route values. + A set of expressions that specify values for the parameter. + A set of namespaces for the application. + The or parameter is null. + + + Maps the specified URL route and sets default route values and namespaces. + A reference to the mapped route. + A collection of routes for the application. + The name of the route to map. + The URL pattern for the route. + An object that contains default route values. + A set of namespaces for the application. + The or parameter is null. + + + Maps the specified URL route and sets the namespaces. + A reference to the mapped route. + A collection of routes for the application. + The name of the route to map. + The URL pattern for the route. + A set of namespaces for the application. + The or parameter is null. + + + Represents a value provider for route data that is contained in an object that implements the interface. + + + Initializes a new instance of the class. + An object that contain information about the HTTP request. + + + Represents a factory for creating route-data value provider objects. + + + Initialized a new instance of the class. + + + Returns a value-provider object for the specified controller context. + A value-provider object. + An object that encapsulates information about the current HTTP request. + The parameter is null. + + + Represents a list that lets users select one item. + + + Initializes a new instance of the class by using the specified items for the list. + The items. + + + Initializes a new instance of the class by using the specified items for the list and a selected value. + The items. + The selected value. + + + Initializes a new instance of the class by using the specified items for the list, the data value field, and the data text field. + The items. + The data value field. + The data text field. + + + Initializes a new instance of the class by using the specified items for the list, the data value field, the data text field, and a selected value. + The items. + The data value field. + The data text field. + The selected value. + + + Gets or sets the selected value. + The selected value. + + + Represents the selected item in an instance of the class. + + + Initializes a new instance of the class. + + + Gets or sets a value that indicates whether this is selected. + true if the item is selected; otherwise, false. + + + Gets or sets the text of the selected item. + The text. + + + Gets or sets the value of the selected item. + The value. + + + Provides session-state data to the current object. + + + Initializes a new instance of the class. + + + Loads the temporary data by using the specified controller context. + The temporary data. + The controller context. + An error occurred when the session context was being retrieved. + + + Saves the specified values in the temporary data dictionary by using the specified controller context. + The controller context. + The values. + An error occurred the session context was being retrieved. + + + Provides an adapter for the attribute. + + + Initializes a new instance of the class. + The model metadata. + The controller context. + The string-length attribute. + + + Gets a list of string-length client validation rules. + A list of string-length client validation rules. + + + Represents a class that is used by HTML helpers to build HTML elements. + + + Initializes a new instance of the class. + The name of the tag. + + + Adds the specified CSS class to the tag-builder attributes. + The CSS class value string. + + + Gets or sets the collection of attributes for the tag. + The collection of attributes for the tag. + + + Generates the id attribute for the tag by using the specified name. + The name to use to generate the id value. + + + Gets or sets the character that is used to replace the periods (dots) in the id attribute. + The character that is used to replace periods (dots) in the id attribute. + + + Gets or sets the inner HTML for the tag (element). + The inner HTML for the tag (element). + + + Adds an attribute to the tag by using the specified key/value pair. + The key. + The value. + The parameter is null or empty. + + + Adds an attribute to the tag by using the specified key/value pair. + The key. + The value. + true to replace the existing attribute. + The parameter is null or empty. + + + Adds an attribute to the specified collection of attributes for the tag. + The attributes. + The type of the key. + The type of the value. + + + Adds an attribute to the specified collection of attributes for the tag. + The attributes. + true to replace the existing attributes. + The type of the key. + The type of the value. + + + Sets the inner text of the tag (element). + The inner text for the tag (element). + + + Gets or sets the name of the tag. + The name of the tag. + + + Returns a string that represents the current object. + A string that represents the current object. + + + Returns a string that represents the current object by using the specified tag-render mode. + A string that represents the current object. + The tag-render mode. + + + Enumerates the modes that are available for rendering HTML tags. + + + Represents normal mode. + + + Represents the start-tag mode. + + + Represents end-tag mode. + + + Represents self-closing-tag mode. + + + Represents a set of data that persists only from one request to the next. + + + Initializes a new instance of the class. + + + Initializes a new instance of the class. + The information. + The controller context. + + + Adds an element that has the specified key and value to the object. + The key of the element to add. + The value of the element to add. + The object is read-only. + + is null. + An element that has the same key already exists in the object. + + + Removes all items from the instance. + The object is read-only. + + + Determines whether the instance contains an element that has the specified key. + true if the instance contains an element that has the specified key; otherwise, false. + The key to locate in the instance. + + is null. + + + Determines whether the dictionary contains the specified value. + true if the dictionary contains the specified value; otherwise, false. + The value. + + + Gets the number of elements in the object. + The number of elements in the object. + + + Gets the enumerator. + The enumerator. + + + Populates a class by using the data that is that is required to serialize the target object. + The object to populate with data. + The destination for this serialization. For more information, see . + The caller does not have the required permission. + + + Gets or sets the object that has the specified key. + The object that has the specified key. + The key to access. + + + Marks all keys in the dictionary for retention. + + + Marks the specified key in the dictionary for retention. + The key to retain in the dictionary. + + + Gets an object that contains the keys of elements in the object. + The keys of the elements in the object. + + + Loads the specified controller context by using the specified data provider. + The controller context. + The temporary data provider. + + + Returns an object that contains the element that is associated with the specified key, without marking the key for deletion. + An object that contains the element that is associated with the specified key. + The key of the element to return. + + + Removes the element that has the specified key from the object. + true if the element was removed successfully; otherwise, false. This method also returns false if was not found in the . instance. + The key of the element to remove. + The object is read-only. + + is null. + + + Saves the specified controller context by using the specified data provider. + The controller context. + The temporary data provider. + + + Adds the specified key/value pair to the dictionary. + The key/value pair. + + + Determines whether a sequence contains a specified element by using the default equality comparer. + true if the dictionary contains the specified key/value pair; otherwise, false. + The key/value pair to search for. + + + Copies a key/value pair to the specified array at the specified index. + The target array. + The index. + + + Gets a value that indicates whether the dictionary is read-only. + true if the dictionary is read-only; otherwise, false. + + + Deletes the specified key/value pair from the dictionary. + true if the key/value pair was removed successfully; otherwise, false. + The key/value pair. + + + Returns an enumerator that can be used to iterate through a collection. + An object that can be used to iterate through the collection. + + + Populates a object by using the data that is that is required to serialize the target object. + The object to populate with data. + The destination for this serialization. For more information, see . + The caller does not have the required permission. + + + Gets the value of the element that has the specified key. + true if the object that implements contains an element that has the specified key; otherwise, false. + The key of the value to get. + When this method returns, the value that is associated with the specified key, if the key is found; otherwise, the default value for the type of the parameter. This parameter is passed uninitialized. + + is null. + + + Gets the object that contains the values in the object. + The values of the elements in the object that implements . + + + Encapsulates information about the current template context. + + + Initializes a new instance of the class. + + + Gets or sets the formatted model value. + The formatted model value. + + + Retrieves the full DOM ID of a field using the specified HTML name attribute. + The full DOM ID. + The value of the HTML name attribute. + + + Retrieves the fully qualified name (including a prefix) for a field using the specified HTML name attribute. + The prefixed name of the field. + The value of the HTML name attribute. + + + Gets or sets the HTML field prefix. + The HTML field prefix. + + + Contains the number of objects that were visited by the user. + The number of objects. + + + Determines whether the template has been visited by the user. + true if the template has been visited by the user; otherwise, false. + An object that encapsulates information that describes the model. + + + Contains methods to build URLs for ASP.NET MVC within an application. + + + Initializes a new instance of the class using the specified request context. + An object that contains information about the current request and about the route that it matched. + The parameter is null. + + + Initializes a new instance of the class by using the specified request context and route collection. + An object that contains information about the current request and about the route that it matched. + A collection of routes. + The or the parameter is null. + + + Generates a fully qualified URL to an action method by using the specified action name. + The fully qualified URL to an action method. + The name of the action method. + + + Generates a fully qualified URL to an action method by using the specified action name and route values. + The fully qualified URL to an action method. + The name of the action method. + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. The object is typically created by using object initializer syntax. + + + Generates a fully qualified URL to an action method by using the specified action name and controller name. + The fully qualified URL to an action method. + The name of the action method. + The name of the controller. + + + Generates a fully qualified URL to an action method by using the specified action name, controller name, and route values. + The fully qualified URL to an action method. + The name of the action method. + The name of the controller. + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. The object is typically created by using object initializer syntax. + + + Generates a fully qualified URL to an action method by using the specified action name, controller name, route values, and protocol to use. + The fully qualified URL to an action method. + The name of the action method. + The name of the controller. + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. The object is typically created by using object initializer syntax. + The protocol for the URL, such as "http" or "https". + + + Generates a fully qualified URL to an action method by using the specified action name, controller name, and route values. + The fully qualified URL to an action method. + The name of the action method. + The name of the controller. + An object that contains the parameters for a route. + + + Generates a fully qualified URL for an action method by using the specified action name, controller name, route values, protocol to use, and host name. + The fully qualified URL to an action method. + The name of the action method. + The name of the controller. + An object that contains the parameters for a route. + The protocol for the URL, such as "http" or "https". + The host name for the URL. + + + Generates a fully qualified URL to an action method for the specified action name and route values. + The fully qualified URL to an action method. + The name of the action method. + An object that contains the parameters for a route. + + + Converts a virtual (relative) path to an application absolute path. + The application absolute path. + The virtual path of the content. + + + Encodes special characters in a URL string into character-entity equivalents. + An encoded URL string. + The text to encode. + + + Returns a string that contains a content URL. + A string that contains a content URL. + The content path. + The HTTP context. + + + Returns a string that contains a URL. + A string that contains a URL. + The route name. + The action name. + The controller name. + The HTTP protocol. + The host name. + The fragment. + The route values. + The route collection. + The request context. + true to include implicit MVC values; otherwise false. + + + Returns a string that contains a URL. + A string that contains a URL. + The route name. + The action name. + The controller name. + The route values. + The route collection. + The request context. + true to include implicit MVC values; otherwise. false. + + + Gets information about an HTTP request that matches a defined route. + The request context. + + + Gets a collection that contains the routes that are registered for the application. + The route collection. + + + Generates a fully qualified URL for the specified route values. + The fully qualified URL. + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. The object is typically created by using object initializer syntax. + + + Generates a fully qualified URL for the specified route name. + The fully qualified URL. + The name of the route that is used to generate the URL. + + + Generates a fully qualified URL for the specified route values by using a route name. + The fully qualified URL. + The name of the route that is used to generate the URL. + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. The object is typically created by using object initializer syntax. + + + Generates a fully qualified URL for the specified route values by using a route name and the protocol to use. + The fully qualified URL. + The name of the route that is used to generate the URL. + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. The object is typically created by using object initializer syntax. + The protocol for the URL, such as "http" or "https". + + + Generates a fully qualified URL for the specified route values by using a route name. + The fully qualified URL. + The name of the route that is used to generate the URL. + An object that contains the parameters for a route. + + + Generates a fully qualified URL for the specified route values by using the specified route name, protocol to use, and host name. + The fully qualified URL. + The name of the route that is used to generate the URL. + An object that contains the parameters for a route. + The protocol for the URL, such as "http" or "https". + The host name for the URL. + + + Generates a fully qualified URL for the specified route values. + The fully qualified URL. + An object that contains the parameters for a route. + + + Represents an optional parameter that is used by the class during routing. + + + Contains the read-only value for the optional parameter. + + + Represents an attribute that is used to detect whether a server request has been tampered with. + + + Initializes a new instance of the class. + + + Called when authorization is required. + The filter context. + The parameter is null. + + + Gets or sets the salt string. + The salt string. + + + Represents an attribute that is used to mark action methods whose input must be validated. + + + Initializes a new instance of the class. + true to enable validation. + + + Gets or sets a value that indicates whether to enable validation. + true if validation is enabled; otherwise, false. + + + Called when authorization is required. + The filter context. + The parameter is null. + + + Represents the collection of value-provider objects for the application. + + + Initializes a new instance of the class. + + + Initializes a new instance of the class and registers the specified value providers. + A list of value providers to register. + + + Determines whether the collection contains the specified prefix. + true if the collection contains the specified prefix; otherwise, false. + The prefix to search for. + + + Returns a value object using the specified key. + The value object for the specified key + The key of the value object to retrieve. + + + Inserts the specified value-provider object into the collection at the specified index location. + The zero-based index location at which to insert the value provider into the collection. + The value-provider object to insert. + The parameter is null. + + + Replaces the value provider at the specified index location with a new value provider. + The zero-based index of the element to replace. + The new value for the element at the specified index. + The parameter is null. + + + Represents a dictionary of value providers for the application. + + + Initializes a new instance of the class. + The controller context. + + + Adds the specified item to the collection of value providers. + The object to add to the object. + The object is read-only. + + + Adds an element that has the specified key and value to the collection of value providers. + The key of the element to add. + The value of the element to add. + The object is read-only. + + is null. + An element that has the specified key already exists in the object. + + + Adds an element that has the specified key and value to the collection of value providers. + The key of the element to add. + The value of the element to add. + The object is read-only. + + is null. + An element that has the specified key already exists in the object. + + + Removes all items from the collection of value providers. + The object is read-only. + + + Determines whether the collection of value providers contains the specified item. + true if is found in the collection of value providers; otherwise, false. + The object to locate in the instance. + + + Determines whether the collection of value providers contains an element that has the specified key. + true if the collection of value providers contains an element that has the key; otherwise, false. + The key of the element to find in the instance. + + is null. + + + Gets or sets the controller context. + The controller context. + + + Copies the elements of the collection to an array, starting at the specified index. + The one-dimensional array that is the destination of the elements copied from the object. The array must have zero-based indexing. + The zero-based index in at which copying starts. + + is null. + + is less than 0. + + is multidimensional.-or- is equal to or greater than the length of .-or-The number of elements in the source collection is greater than the available space from to the end of the destination .-or-Type cannot be cast automatically to the type of the destination array. + + + Gets the number of elements in the collection. + The number of elements in the collection. + + + Returns an enumerator that can be used to iterate through the collection. + An enumerator that can be used to iterate through the collection. + + + Gets a value that indicates whether the collection is read-only. + true if the collection is read-only; otherwise, false. + + + Gets or sets the object that has the specified key. + The object. + The key. + + + Gets a collection that contains the keys of the instance. + A collection that contains the keys of the object that implements the interface. + + + Removes the first occurrence of the specified item from the collection of value providers. + true if was successfully removed from the collection; otherwise, false. This method also returns false if is not found in the collection. + The object to remove from the instance. + The object is read-only. + + + Removes the element that has the specified key from the collection of value providers. + true if the element was successfully removed; otherwise, false. This method also returns false if was not found in the collection. + The key of the element to remove. + The object is read-only. + + is null. + + + Returns an enumerator that can be used to iterate through a collection. + An enumerator that can be used to iterate through the collection. + + + Determines whether the collection contains the specified prefix. + true if the collection contains the specified prefix; otherwise, false. + The prefix to search for. + + + Returns a value object using the specified key. + The value object for the specified key. + The key of the value object to return. + + + Gets the value of the element that has the specified key. + true if the object that implements contains an element that has the specified key; otherwise, false. + The key of the element to get. + When this method returns, the value that is associated with the specified key, if the key is found; otherwise, the default value for the type of the parameter. This parameter is passed uninitialized. + + is null. + + + Gets a collection that contains the values in the object. + A collection of the values in the object that implements the interface. + + + Represents a container for value-provider factory objects. + + + Gets the collection of value-provider factories for the application. + The collection of value-provider factory objects. + + + Represents a factory for creating value-provider objects. + + + Initializes a new instance of the class. + + + Returns a value-provider object for the specified controller context. + A value-provider object. + An object that encapsulates information about the current HTTP request. + + + Represents the collection of value-provider factories for the application. + + + Initializes a new instance of the class. + + + Initializes a new instance of the class using the specified list of value-provider factories. + A list of value-provider factories to initialize the collection with. + + + Returns the value-provider factory for the specified controller context. + The value-provider factory object for the specified controller context. + An object that encapsulates information about the current HTTP request. + + + Inserts the specified value-provider factory object at the specified index location. + The zero-based index location at which to insert the value provider into the collection. + The value-provider factory object to insert. + The parameter is null. + + + Sets the specified value-provider factory object at the given index location. + The zero-based index location at which to insert the value provider into the collection. + The value-provider factory object to set. + The parameter is null. + + + Represents the result of binding a value (such as from a form post or query string) to an action-method argument property, or to the argument itself. + + + Initializes a new instance of the class. + + + Initializes a new instance of the class by using the specified raw value, attempted value, and culture information. + The raw value. + The attempted value. + The culture. + + + Gets or sets the raw value that is converted to a string for display. + The raw value. + + + Converts the value that is encapsulated by this result to the specified type. + The converted value. + The target type. + The parameter is null. + + + Converts the value that is encapsulated by this result to the specified type by using the specified culture information. + The converted value. + The target type. + The culture to use in the conversion. + The parameter is null. + + + Gets or sets the culture. + The culture. + + + Gets or set the raw value that is supplied by the value provider. + The raw value. + + + Encapsulates information that is related to rendering a view. + + + Initializes a new instance of the class. + + + Initializes a new instance of the class by using the specified controller context, view, view data dictionary, temporary data dictionary, and text writer. + Encapsulates information about the HTTP request. + The view to render. + The dictionary that contains the data that is required in order to render the view. + The dictionary that contains temporary data for the view. + The text writer object that is used to write HTML output. + One of the parameters is null. + + + Gets or sets a value that indicates whether client-side validation is enabled. + true if client-side validation is enabled; otherwise, false. + + + Gets or sets an object that encapsulates information that is required in order to validate and process the input data from an HTML form. + An object that encapsulates information that is required in order to validate and process the input data from an HTML form. + + + Writes the client validation information to the HTTP response. + + + Gets data that is associated with this request and that is available for only one request. + The temporary data. + + + Gets an object that implements the interface to render in the browser. + The view. + + + Gets the view data that is passed to the view. + The view data. + + + Gets or sets the text writer object that is used to write HTML output. + The object that is used to write the HTML output. + + + Represents a container that is used to pass data between a controller and a view. + + + Initializes a new instance of the class. + + + Initializes a new instance of the class by using the specified model. + The model. + + + Initializes a new instance of the class by using the specified dictionary. + The dictionary. + The parameter is null. + + + Adds the specified item to the collection. + The object to add to the collection. + The collection is read-only. + + + Adds an element to the collection using the specified key and value . + The key of the element to add. + The value of the element to add. + The object is read-only. + + is null. + An element with the same key already exists in the object. + + + Removes all items from the collection. + The object is read-only. + + + Determines whether the collection contains the specified item. + true if is found in the collection; otherwise, false. + The object to locate in the collection. + + + Determines whether the collection contains an element that has the specified key. + true if the collection contains an element that has the specified key; otherwise, false. + The key of the element to locate in the collection. + + is null. + + + Copies the elements of the collection to an array, starting at a particular index. + The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. + The zero-based index in at which copying begins. + + is null. + + is less than 0. + + is multidimensional.-or- is equal to or greater than the length of .-or- The number of elements in the source collection is greater than the available space from to the end of the destination .-or- Type cannot be cast automatically to the type of the destination . + + + Gets the number of elements in the collection. + The number of elements in the collection. + + + Evaluates the specified expression. + The results of the evaluation. + The expression. + The parameter is null or empty. + + + Evaluates the specified expression by using the specified format. + The results of the evaluation. + The expression. + The format. + + + Returns an enumerator that can be used to iterate through the collection. + An enumerator that can be used to iterate through the collection. + + + Returns information about the view data as defined by the parameter. + An object that contains the view data information that is defined by the parameter. + A set of key/value pairs that define the view-data information to return. + The parameter is either null or empty. + + + Gets a value that indicates whether the collection is read-only. + true if the collection is read-only; otherwise, false. + + + Gets or sets the item that is associated with the specified key. + The value of the selected item. + The key. + + + Gets a collection that contains the keys of this dictionary. + A collection that contains the keys of the object that implements . + + + Gets or sets the model that is associated with the view data. + The model that is associated with the view data. + + + Gets or sets information about the model. + Information about the model. + + + Gets the state of the model. + The state of the model. + + + Removes the first occurrence of a specified object from the collection. + true if was successfully removed from the collection; otherwise, false. This method also returns false if is not found in the collection. + The object to remove from the collection. + The collection is read-only. + + + Removes the element from the collection using the specified key. + true if the element is successfully removed; otherwise, false. This method also returns false if was not found in the original collection. + The key of the element to remove. + The collection is read-only. + + is null. + + + Sets the data model to use for the view. + The data model to use for the view. + + + Returns an enumerator that can be used to iterate through the collection. + An enumerator that can be used to iterate through the collection. + + + Gets or sets an object that encapsulates information about the current template context. + An object that contains information about the current template. + + + Attempts to retrieve the value that is associated with the specified key. + true if the collection contains an element with the specified key; otherwise, false. + The key of the value to get. + When this method returns, the value that is associated with the specified key, if the key is found; otherwise, the default value for the type of the parameter. This parameter is passed uninitialized. + + is null. + + + Gets a collection that contains the values in this dictionary. + A collection that contains the values of the object that implements . + + + Represents a container that is used to pass strongly typed data between a controller and a view. + The type of the model. + + + Initializes a new instance of the class. + + + Initializes a new instance of the class by using the specified view data dictionary. + An existing view data dictionary to copy into this instance. + + + Initializes a new instance of the class by using the specified model. + The data model to use for the view. + + + Gets or sets the model. + A reference to the data model. + + + Gets or sets information about the model. + Information about the model. + + + Sets the data model to use for the view. + The data model to use for the view. + An error occurred while the model was being set. + + + Encapsulates information about the current template content that is used to develop templates and about HTML helpers that interact with templates. + + + Initializes a new instance of the class. + + + Initializes a new instance of the class and associates a delegate for accessing the view data information. + A delegate that defines how the view data information is accessed. + + + Gets or sets the object that contains the values to be displayed by the template. + The object that contains the values to be displayed by the template. + + + Gets or sets the description of the property to be displayed by the template. + The description of the property to be displayed by the template. + + + Gets or sets the current value to be displayed by the template. + The current value to be displayed by the template. + + + Represents a collection of view engines that are available to the application. + + + Initializes a new instance of the class. + + + Initializes a new instance of the class by using the specified list of view engines. + The list that is wrapped by the new collection. + + is null. + + + Finds the specified partial view by using the specified controller context. + The partial view. + The controller context. + The name of the partial view. + The parameter is null. + The parameter is null or empty. + + + Finds the specified view by using the specified controller context and master view. + The view. + The controller context. + The name of the view. + The name of the master view. + The parameter is null. + The parameter is null or empty. + + + Inserts an element into the collection at the specified index. + The zero-based index at which should be inserted. + The object to insert. + + is less than zero.-or- is greater than the number of items in the collection. + The parameter is null. + + + Replaces the element at the specified index. + The zero-based index of the element to replace. + The new value for the element at the specified index. + + is less than zero.-or- is greater than the number of items in the collection. + The parameter is null. + + + Represents the result of locating a view engine. + + + Initializes a new instance of the class by using the specified searched locations. + The searched locations. + The parameter is null. + + + Initializes a new instance of the class by using the specified view and view engine. + The view. + The view engine. + The or parameter is null. + + + Gets or sets the searched locations. + The searched locations. + + + Gets or sets the view. + The view. + + + Gets or sets the view engine. + The view engine. + + + Represents a collection of view engines that are available to the application. + + + Gets the view engines. + The view engines. + + + Represents the information that is needed to build a master view page. + + + Initializes a new instance of the class. + + + Gets the AJAX script for the master page. + The AJAX script for the master page. + + + Gets the HTML for the master page. + The HTML for the master page. + + + Gets the model. + The model. + + + Gets the temporary data. + The temporary data. + + + Gets the URL. + The URL. + + + Gets the view context. + The view context. + + + Gets the view data. + The view data. + + + Gets the writer that is used to render the master page. + The writer that is used to render the master page. + + + Represents the information that is required in order to build a strongly typed master view page. + The type of the model. + + + Initializes a new instance of the class. + + + Gets the AJAX script for the master page. + The AJAX script for the master page. + + + Gets the HTML for the master page. + The HTML for the master page. + + + Gets the model. + A reference to the data model. + + + Gets the view data. + The view data. + + + Represents the properties and methods that are needed to render a view as a Web Forms page. + + + Initializes a new instance of the class. + + + Gets or sets the object that is used to render HTML in Ajax scenarios. + The Ajax helper object that is associated with the view. + + + Gets or sets the object that is used to render HTML elements. + The HTML helper object that is associated with the view. + + + Initializes the , , and properties. + + + Gets or sets the path of the master view. + The path of the master view. + + + Gets the Model property of the associated object. + The Model property of the associated object. + + + Raises the event at the beginning of page initialization. + The event data. + + + Enables processing of the specified HTTP request by the ASP.NET MVC framework. + An object that encapsulates HTTP-specific information about the current HTTP request. + + + Initializes the object that receives the page content to be rendered. + The object that receives the page content. + + + Renders the view page to the response using the specified view context. + An object that encapsulates the information that is required in order to render the view, which includes the controller context, form context, the temporary data, and the view data for the associated view. + + + Sets the text writer that is used to render the view to the response. + The writer that is used to render the view to the response. + + + Sets the view data dictionary for the associated view. + A dictionary of data to pass to the view. + + + Gets the temporary data to pass to the view. + The temporary data to pass to the view. + + + Gets or sets the URL of the rendered page. + The URL of the rendered page. + + + Gets or sets the information that is used to render the view. + The information that is used to render the view, which includes the form context, the temporary data, and the view data of the associated view. + + + Gets or sets a dictionary that contains data to pass between the controller and the view. + A dictionary that contains data to pass between the controller and the view. + + + Gets the text writer that is used to render the view to the response. + The text writer that is used to render the view to the response. + + + Represents the information that is required in order to render a strongly typed view as a Web Forms page. + The type of the model. + + + Initializes a new instance of the class. + + + Gets or sets the object that supports rendering HTML in Ajax scenarios. + The Ajax helper object that is associated with the view. + + + Gets or sets the object that provides support for rendering elements. + The HTML helper object that is associated with the view. + + + Instantiates and initializes the and properties. + + + Gets the property of the associated object. + A reference to the data model. + + + Sets the view data dictionary for the associated view. + A dictionary of data to pass to the view. + + + Gets or sets a dictionary that contains data to pass between the controller and the view. + A dictionary that contains data to pass between the controller and the view. + + + Represents a class that is used to render a view by using an instance that is returned by an object. + + + Initializes a new instance of the class. + + + Searches the registered view engines and returns the object that is used to render the view. + The object that is used to render the view. + The controller context. + An error occurred while the method was searching for the view. + + + Gets the name of the master view (such as a master page or template) to use when the view is rendered. + The name of the master view. + + + Represents a base class that is used to provide the model to the view and then render the view to the response. + + + Initializes a new instance of the class. + + + When called by the action invoker, renders the view to the response. + The context that the result is executed in. + The parameter is null. + + + Returns the object that is used to render the view. + The view engine. + The context. + + + Gets or sets the object for this result. + The temporary data. + + + Gets or sets the object that is rendered to the response. + The view. + + + Gets or sets the view data object for this result. + The view data. + + + Gets or sets the collection of view engines that are associated with this result. + The collection of view engines. + + + Gets or sets the name of the view to render. + The name of the view. + + + Provides a container for objects. + + + Initializes a new instance of the class. + + + Provides a container for objects. + The type of the model. + + + Initializes a new instance of the class. + + + Gets the formatted value. + The formatted value. + + + Represents the type of a view. + + + Initializes a new instance of the class. + + + Gets or sets the name of the type. + The name of the type. + + + Represents the information that is needed to build a user control. + + + Initializes a new instance of the class. + + + Gets the AJAX script for the view. + The AJAX script for the view. + + + Ensures that view data is added to the object of the user control if the view data exists. + + + Gets the HTML for the view. + The HTML for the view. + + + Gets the model. + The model. + + + Renders the view by using the specified view context. + The view context. + + + Sets the text writer that is used to render the view to the response. + The writer that is used to render the view to the response. + + + Sets the view-data dictionary by using the specified view data. + The view data. + + + Gets the temporary-data dictionary. + The temporary-data dictionary. + + + Gets the URL for the view. + The URL for the view. + + + Gets or sets the view context. + The view context. + + + Gets or sets the view-data dictionary. + The view-data dictionary. + + + Gets or sets the view-data key. + The view-data key. + + + Gets the writer that is used to render the view to the response. + The writer that is used to render the view to the response. + + + Represents the information that is required in order to build a strongly typed user control. + The type of the model. + + + Initializes a new instance of the class. + + + Gets the AJAX script for the view. + The AJAX script for the view. + + + Gets the HTML for the view. + The HTML for the view. + + + Gets the model. + A reference to the data model. + + + Sets the view data for the view. + The view data. + + + Gets or sets the view data. + The view data. + + + Represents an abstract base-class implementation of the interface. + + + Initializes a new instance of the class. + + + Gets or sets the area-enabled master location formats. + The area-enabled master location formats. + + + Gets or sets the area-enabled partial-view location formats. + The area-enabled partial-view location formats. + + + Gets or sets the area-enabled view location formats. + The area-enabled view location formats. + + + Creates the specified partial view by using the specified controller context. + A reference to the partial view. + The controller context. + The partial path for the new partial view. + + + Creates the specified view by using the controller context, path of the view, and path of the master view. + A reference to the view. + The controller context. + The path of the view. + The path of the master view. + + + Returns a value that indicates whether the file is in the specified path by using the specified controller context. + true if the file is in the specified path; otherwise, false. + The controller context. + The virtual path. + + + Finds the specified partial view by using the specified controller context. + The partial view. + The controller context. + The name of the partial view. + true to use the cached partial view. + The parameter is null (Nothing in Visual Basic). + The parameter is null or empty. + + + Finds the specified view by using the specified controller context and master view name. + The page view. + The controller context. + The name of the view. + The name of the master view. + true to use the cached view. + The parameter is null (Nothing in Visual Basic). + The parameter is null or empty. + + + Gets or sets the master location formats. + The master location formats. + + + Gets or sets the partial-view location formats. + The partial-view location formats. + + + Releases the specified view by using the specified controller context. + The controller context. + The view to release. + + + Gets or sets the view location cache. + The view location cache. + + + Gets or sets the view location formats. + The view location formats. + + + Gets or sets the virtual path provider. + The virtual path provider. + + + Represents the information that is needed to build a Web Forms page in MVC. + + + Initializes a new instance of the class by using the specified path to the view. + The view path. + The parameter is null (Nothing in Visual Basic). + + + Initializes a new instance of the class by using the specified paths to the view and master view. + The view path. + The master path. + The parameter is null (Nothing in Visual Basic). + + + Gets or sets the master path. + The master path. + + + Renders the specified view context by using the specified writer for rendering the view to the response. + The view context. + The writer that is used to render the view to the response. + The parameter is null (Nothing in Visual Basic). + An error occurred while attempting to render the view. + + + Gets or sets the view path. + The view path. + + + Represents a view engine that is used to render a Web Forms page to the response. + + + Initializes a new instance of the class. + + + Creates the specified partial view by using the specified controller context. + The partial view. + The controller context. + The partial path. + + + Creates the specified view by using the specified controller context and the paths of the view and master view. + The view. + The controller context. + The view path. + The master-view path. + + + Determines whether a file at the specified location exists for the specified controller context. + true if the file exists; otherwise, false. + The controller context. + The virtual path. + + + Represents support for ASP.NET AJAX within an ASP.NET MVC application. + + + Returns an anchor element that contains the URL to the specified action method; when the action link is clicked, the action method is invoked asynchronously by using JavaScript. + An anchor element. + The AJAX helper. + The inner text of the anchor element. + The name of the action method. + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. + An object that provides options for the asynchronous request. + The parameter is null or empty. + + + Returns an anchor element that contains the URL to the specified action method; when the action link is clicked, the action method is invoked asynchronously by using JavaScript. + An anchor element. + The AJAX helper. + The inner text of the anchor element. + The name of the action method. + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. + An object that provides options for the asynchronous request. + An object that contains the HTML attributes to set for the element. + The parameter is null or empty. + + + Returns an anchor element that contains the URL to the specified action method; when the action link is clicked, the action method is invoked asynchronously by using JavaScript. + An anchor element. + The AJAX helper. + The inner text of the anchor element. + The name of the action method. + The name of the controller. + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. + An object that provides options for the asynchronous request. + The parameter is null or empty. + + + Returns an anchor element that contains the URL to the specified action method; when the action link is clicked, the action method is invoked asynchronously by using JavaScript. + An anchor element. + The AJAX helper. + The inner text of the anchor element. + The name of the action method. + The name of the controller. + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. + An object that provides options for the asynchronous request. + An object that contains the HTML attributes to set for the element. + The parameter is null or empty. + + + Returns an anchor element that contains the URL to the specified action method; when the action link is clicked, the action method is invoked asynchronously by using JavaScript. + An anchor element. + The AJAX helper. + The inner text of the anchor element. + The name of the action method. + The name of the controller. + The protocol for the URL, such as "http" or "https". + The host name for the URL. + The URL fragment name (the anchor name). + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. + An object that provides options for the asynchronous request. + An object that contains the HTML attributes to set for the element. + The parameter is null or empty. + + + Returns an anchor element that contains the URL to the specified action method; when the action link is clicked, the action method is invoked asynchronously by using JavaScript. + An anchor element. + The AJAX helper. + The inner text of the anchor element. + The name of the action method. + The name of the controller. + The protocol for the URL, such as "http" or "https". + The host name for the URL. + The URL fragment name (the anchor name). + An object that contains the parameters for a route. + An object that provides options for the asynchronous request. + An object that contains the HTML attributes to set for the element. + The parameter is null or empty. + + + Returns an anchor element that contains the URL to the specified action method; when the action link is clicked, the action method is invoked asynchronously by using JavaScript. + An anchor element. + The AJAX helper. + The inner text of the anchor element. + The name of the action method. + The name of the controller. + An object that provides options for the asynchronous request. + The parameter is null or empty. + + + Returns an anchor element that contains the URL to the specified action method; when the action link is clicked, the action method is invoked asynchronously by using JavaScript. + An anchor element. + The AJAX helper. + The inner text of the anchor element. + The name of the action method. + The name of the controller. + An object that contains the parameters for a route. + An object that provides options for the asynchronous request. + The parameter is null or empty. + + + Returns an anchor element that contains the URL to the specified action method; when the action link is clicked, the action method is invoked asynchronously by using JavaScript. + An anchor element. + The AJAX helper. + The inner text of the anchor element. + The name of the action method. + The name of the controller. + An object that contains the parameters for a route. + An object that provides options for the asynchronous request. + An object that contains the HTML attributes to set for the element. + The parameter is null or empty. + + + Returns an anchor element that contains the URL to the specified action method; when the action link is clicked, the action method is invoked asynchronously by using JavaScript. + An anchor element. + The AJAX helper. + The inner text of the anchor element. + The name of the action method. + An object that provides options for the asynchronous request. + The parameter is null or empty. + + + Returns an anchor element that contains the URL to the specified action method; when the action link is clicked, the action method is invoked asynchronously by using JavaScript. + An anchor element. + The AJAX helper. + The inner text of the anchor element. + The name of the action method. + An object that contains the parameters for a route. + An object that provides options for the asynchronous request. + The parameter is null or empty. + + + Returns an anchor element that contains the URL to the specified action method; when the action link is clicked, the action method is invoked asynchronously by using JavaScript. + An anchor element. + The AJAX helper. + The inner text of the anchor element. + The name of the action method. + An object that contains the parameters for a route. + An object that provides options for the asynchronous request. + An object that contains the HTML attributes to set for the element. + The parameter is null or empty. + + + Writes an opening <form> tag to the response. + An opening <form> tag. + The AJAX helper. + The name of the action method that will handle the request. + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. + An object that provides options for the asynchronous request. + + + Writes an opening <form> tag to the response. + An opening <form> tag. + The AJAX helper. + The name of the action method that will handle the request. + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. + An object that provides options for the asynchronous request. + An object that contains the HTML attributes to set for the element. + + + Writes an opening <form> tag to the response. + An opening <form> tag. + The AJAX helper. + The name of the action method that will handle the request. + The name of the controller. + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. + An object that provides options for the asynchronous request. + + + Writes an opening <form> tag to the response. + An opening <form> tag. + The AJAX helper. + The name of the action method that will handle the request. + The name of the controller. + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. + An object that provides options for the asynchronous request. + An object that contains the HTML attributes to set for the element. + + + Writes an opening <form> tag to the response. + An opening <form> tag. + The AJAX helper. + The name of the action method that will handle the request. + The name of the controller. + An object that provides options for the asynchronous request. + + + Writes an opening <form> tag to the response. + An opening <form> tag. + The AJAX helper. + The name of the action method that will handle the request. + The name of the controller. + An object that contains the parameters for a route. + An object that provides options for the asynchronous request. + + + Writes an opening <form> tag to the response. + An opening <form> tag. + The AJAX helper. + The name of the action method that will handle the request. + The name of the controller. + An object that contains the parameters for a route. + An object that provides options for the asynchronous request. + An object that contains the HTML attributes to set for the element. + + + Writes an opening <form> tag to the response. + An opening <form> tag. + The AJAX helper. + The name of the action method that will handle the request. + An object that provides options for the asynchronous request. + + + Writes an opening <form> tag to the response. + An opening <form> tag. + The AJAX helper. + The name of the action method that will handle the request. + An object that contains the parameters for a route. + An object that provides options for the asynchronous request. + + + Writes an opening <form> tag to the response. + An opening <form> tag. + The AJAX helper. + The name of the action method that will handle the request. + An object that contains the parameters for a route. + An object that provides options for the asynchronous request. + An object that contains the HTML attributes to set for the element.. + + + Writes an opening <form> tag to the response. + An opening <form> tag. + The AJAX helper. + An object that provides options for the asynchronous request. + + + Writes an opening <form> tag to the response using the specified routing information. + An opening <form> tag. + The AJAX helper. + The name of the route to use to obtain the form post URL. + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. + An object that provides options for the asynchronous request. + + + Writes an opening <form> tag to the response using the specified routing information. + An opening <form> tag. + The AJAX helper. + The name of the route to use to obtain the form post URL. + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. + An object that provides options for the asynchronous request. + An object that contains the HTML attributes to set for the element. + + + Writes an opening <form> tag to the response using the specified routing information. + An opening <form> tag. + The AJAX helper. + The name of the route to use to obtain the form post URL. + An object that provides options for the asynchronous request. + + + Writes an opening <form> tag to the response using the specified routing information. + An opening <form> tag. + The AJAX helper. + The name of the route to use to obtain the form post URL. + An object that contains the parameters for a route. + An object that provides options for the asynchronous request. + + + Writes an opening <form> tag to the response using the specified routing information. + An opening <form> tag. + The AJAX helper. + The name of the route to use to obtain the form post URL. + An object that contains the parameters for a route. + An object that provides options for the asynchronous request. + An object that contains the HTML attributes to set for the element. + + + Returns an HTML script element that contains a reference to a globalization script that defines the culture information. + A script element whose src attribute is set to the globalization script, as in the following example: <script type="text/javascript" src="/MvcApplication1/Scripts/Globalization/en-US.js"></script> + The AJAX helper object that this method extends. + + + Returns an HTML script element that contains a reference to a globalization script that defines the specified culture information. + An HTML script element whose src attribute is set to the globalization script, as in the following example:<script type="text/javascript" src="/MvcApplication1/Scripts/Globalization/en-US.js"></script> + The AJAX helper object that this method extends. + Encapsulates information about the target culture, such as date formats. + The parameter is null. + + + Returns an anchor element that contains the virtual path for the specified route values; when the link is clicked, a request is made to the virtual path asynchronously by using JavaScript. + An anchor element. + The AJAX helper. + The inner text of the anchor element. + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. + An object that provides options for the asynchronous request. + The parameter is null or empty. + + + Returns an anchor element that contains the virtual path for the specified route values; when the link is clicked, a request is made to the virtual path asynchronously by using JavaScript. + An anchor element. + The AJAX helper. + The inner text of the anchor element. + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. + An object that provides options for the asynchronous request. + An object that contains the HTML attributes to set for the element. + The parameter is null or empty. + + + Returns an anchor element that contains the virtual path for the specified route values; when the link is clicked, a request is made to the virtual path asynchronously by using JavaScript. + An anchor element. + The AJAX helper. + The inner text of the anchor element. + The name of the route to use to obtain the form post URL. + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. + An object that provides options for the asynchronous request. + The parameter is null or empty. + + + Returns an anchor element that contains the virtual path for the specified route values; when the link is clicked, a request is made to the virtual path asynchronously by using JavaScript. + An anchor element. + The AJAX helper. + The inner text of the anchor element. + The name of the route to use to obtain the form post URL. + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. + An object that provides options for the asynchronous request. + An object that contains the HTML attributes to set for the element. + The parameter is null or empty. + + + Returns an anchor element that contains the virtual path for the specified route values; when the link is clicked, a request is made to the virtual path asynchronously by using JavaScript. + An anchor element. + The AJAX helper. + The inner text of the anchor element. + The name of the route to use to obtain the form post URL. + The protocol for the URL, such as "http" or "https". + The host name for the URL. + The URL fragment name (the anchor name). + An object that contains the parameters for a route. + An object that provides options for the asynchronous request. + An object that contains the HTML attributes to set for the element. + The parameter is null or empty. + + + Returns an anchor element that contains the virtual path for the specified route values; when the link is clicked, a request is made to the virtual path asynchronously by using JavaScript. + An anchor element. + The AJAX helper. + The inner text of the anchor element. + The name of the route to use to obtain the form post URL. + An object that provides options for the asynchronous request. + The parameter is null or empty. + + + Returns an anchor element that contains the virtual path for the specified route values; when the link is clicked, a request is made to the virtual path asynchronously by using JavaScript. + An anchor element. + The AJAX helper. + The inner text of the anchor element. + The name of the route to use to obtain the form post URL. + An object that provides options for the asynchronous request. + An object that contains the HTML attributes to set for the element. + The parameter is null or empty. + + + Returns an anchor element that contains the virtual path for the specified route values; when the link is clicked, a request is made to the virtual path asynchronously by using JavaScript. + An anchor element. + The AJAX helper. + The inner text of the anchor element. + The name of the route to use to obtain the form post URL. + An object that provides options for the asynchronous request. + An object that contains the HTML attributes to set for the element. + The parameter is null or empty. + + + Returns an anchor element that contains the virtual path for the specified route values; when the link is clicked, a request is made to the virtual path asynchronously by using JavaScript. + An anchor element. + The AJAX helper. + The inner text of the anchor element. + The name of the route to use to obtain the form post URL. + An object that contains the parameters for a route. + An object that provides options for the asynchronous request. + The parameter is null or empty. + + + Returns an anchor element that contains the virtual path for the specified route values; when the link is clicked, a request is made to the virtual path asynchronously by using JavaScript. + An anchor element. + The AJAX helper. + The inner text of the anchor element. + The name of the route to use to obtain the form post URL. + An object that contains the parameters for a route. + An object that provides options for the asynchronous request. + An object that contains the HTML attributes to set for the element. + The parameter is null or empty. + + + Returns an anchor element that contains the virtual path for the specified route values; when the link is clicked, a request is made to the virtual path asynchronously by using JavaScript. + An anchor element. + The AJAX helper. + The inner text of the anchor element. + An object that contains the parameters for a route. + An object that provides options for the asynchronous request. + The parameter is null or empty. + + + Returns an anchor element that contains the virtual path for the specified route values; when the link is clicked, a request is made to the virtual path asynchronously by using JavaScript. + An anchor element. + The AJAX helper. + The inner text of the anchor element. + An object that contains the parameters for a route. + An object that provides options for the asynchronous request. + An object that contains the HTML attributes to set for the element. + The parameter is null or empty. + + + Represents option settings for running AJAX scripts in an MVC application. + + + Initializes a new instance of the class. + + + Gets or sets the message to display in a confirmation window before a request is submitted. + The message to display in a confirmation window. + + + Gets or sets the HTTP request method ("Get" or "Post"). + The HTTP request method. + + + Gets or sets the mode that specifies how to insert the response into the target DOM element. + The insertion mode ("InsertAfter", "InsertBefore", or "Replace"). + + + Gets or sets the id attribute of an HTML element that is displayed while the Ajax function is loading. + The ID of the element that is displayed while the Ajax function is loading. + + + Gets or sets the name of the JavaScript function to call immediately before the page is updated. + The name of the JavaScript function to call before the page is updated. + + + Gets or sets the JavaScript function to call when response data has been instantiated but before the page is updated. + The JavaScript function to call when the response data has been instantiated. + + + Gets or sets the JavaScript function to call if the page update fails. + The JavaScript function to call if the page update fails. + + + Gets or sets the JavaScript function to call after the page is successfully updated. + The JavaScript function to call after the page is successfully updated. + + + Gets or sets the ID of the DOM element to update by using the response from the server. + The ID of the DOM element to update. + + + Gets or sets the URL to make the request to. + The URL to make the request to. + + + Enumerates the AJAX script insertion modes. + + + Replace the element. + + + Insert before the element. + + + Insert after the element. + + + Provides information about an asynchronous action method, such as its name, controller, parameters, attributes, and filters. + + + Initializes a new instance of the class. + + + Invokes the asynchronous action method by using the specified parameters and controller context. + An object that contains the result of an asynchronous call. + The controller context. + The parameters of the action method. + The callback method. + An object that contains information to be used by the callback method. This parameter can be null. + + + Returns the result of an asynchronous operation. + The result of an asynchronous operation. + An object that represents the status of an asynchronous operation. + + + Executes the asynchronous action method by using the specified parameters and controller context. + The result of executing the asynchronous action method. + The controller context. + The parameters of the action method. + + + Represents a class that is responsible for invoking the action methods of an asynchronous controller. + + + Initializes a new instance of the class. + + + Invokes the asynchronous action method by using the specified controller context, action name, callback method, and state. + An object that contains the result of an asynchronous operation. + The controller context. + The name of the action. + The callback method. + An object that contains information to be used by the callback method. This parameter can be null. + + + Invokes the asynchronous action method by using the specified controller context, action descriptor, parameters, callback method, and state. + An object that contains the result of an asynchronous operation. + The controller context. + The action descriptor. + The parameters for the asynchronous action method. + The callback method. + An object that contains information to be used by the callback method. This parameter can be null. + + + Invokes the asynchronous action method by using the specified controller context, filters, action descriptor, parameters, callback method, and state. + An object that contains the result of an asynchronous operation. + The controller context. + The filters. + The action descriptor. + The parameters for the asynchronous action method. + The callback method. + An object that contains information to be used by the callback method. This parameter can be null. + + + Cancels the action. + true if the action was canceled; otherwise, false. + The user-defined object that qualifies or contains information about an asynchronous operation. + + + Cancels the action. + true if the action was canceled; otherwise, false. + The user-defined object that qualifies or contains information about an asynchronous operation. + + + Cancels the action. + true if the action was canceled; otherwise, false. + The user-defined object that qualifies or contains information about an asynchronous operation. + + + Returns the controller descriptor. + The controller descriptor. + The controller context. + + + Provides asynchronous operations for the class. + + + Initializes a new instance of the class. + + + Initializes a new instance of the class using the synchronization context. + The synchronization context. + + + Notifies ASP.NET that all asynchronous operations are complete. + + + Occurs when the method is called. + + + Gets the number of outstanding operations. + The number of outstanding operations. + + + Gets the parameters that were passed to the asynchronous completion method. + The parameters that were passed to the asynchronous completion method. + + + Executes a callback in the current synchronization context. + The asynchronous action. + + + Gets or sets the asynchronous timeout value, in milliseconds. + The asynchronous timeout value, in milliseconds. + + + Defines the interface for an action invoker, which is used to invoke an asynchronous action in response to an HTTP request. + + + Invokes the specified action. + The status of the asynchronous result. + The controller context. + The name of the asynchronous action. + The callback method. + The state. + + + Cancels the asynchronous action. + true if the asynchronous method could be canceled; otherwise, false. + The asynchronous result. + + + Defines the methods that are required for an asynchronous controller. + + + Executes the specified request context. + The status of the asynchronous operation. + The request context. + The asynchronous callback method. + The state. + + + Ends the asynchronous operation. + The asynchronous result. + + + Provides a container for the asynchronous manager object. + + + Gets the asynchronous manager object. + The asynchronous manager object. + + + Provides a container that maintains a count of pending asynchronous operations. + + + Initializes a new instance of the class. + + + Occurs when an asynchronous method completes. + + + Gets the operation count. + The operation count. + + + Reduces the operation count by 1. + The updated operation count. + + + Reduces the operation count by the specified value. + The updated operation count. + The number of operations to reduce the count by. + + + Increments the operation count by one. + The updated operation count. + + + Increments the operation count by the specified value. + The updated operation count. + The number of operations to increment the count by. + + + Provides information about an asynchronous action method, such as its name, controller, parameters, attributes, and filters. + + + Initializes a new instance of the class. + An object that contains information about the method that begins the asynchronous operation (the method whose name ends with "Asynch"). + An object that contains information about the completion method (method whose name ends with "Completed"). + The name of the action. + The controller descriptor. + + + Gets the name of the action method. + The name of the action method. + + + Gets the method information for the asynchronous action method. + The method information for the asynchronous action method. + + + Begins running the asynchronous action method by using the specified parameters and controller context. + An object that contains the result of an asynchronous call. + The controller context. + The parameters of the action method. + The callback method. + An object that contains information to be used by the callback method. This parameter can be null. + + + Gets the method information for the asynchronous completion method. + The method information for the asynchronous completion method. + + + Gets the controller descriptor for the asynchronous action method. + The controller descriptor for the asynchronous action method. + + + Returns the result of an asynchronous operation. + The result of an asynchronous operation. + An object that represents the status of an asynchronous operation. + + + Returns an array of custom attributes that are defined for this member, excluding named attributes. + An array of custom attributes, or an empty array if no custom attributes exist. + true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. + + + Returns an array of custom attributes that are defined for this member, identified by type. + An array of custom attributes, or an empty array if no custom attributes of the specified type exist. + The type of the custom attributes to return. + true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. + + + Returns the filters that are associated with the action method. + The filters that are associated with the action method. + + + Returns the parameters of the action method. + The parameters of the action method. + + + Returns the action method selectors. + The action method selectors. + + + Determines whether one or more instances of the specified attribute type are defined for the action member. + true if an attribute of type that is represented by is defined for this member; otherwise, false. + The type of the custom attribute. + true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. + + + Encapsulates information that describes an asynchronous controller, such as its name, type, and actions. + + + Initializes a new instance of the class. + The type of the controller. + + + Gets the type of the controller. + The type of the controller. + + + Finds an action method by using the specified name and controller context. + The information about the action method. + The controller context. + The name of the action. + + + Returns a list of action method descriptors in the controller. + A list of action method descriptors in the controller. + + + Returns custom attributes that are defined for this member, excluding named attributes. + An array of custom attributes, or an empty array if no custom attributes exist. + true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. + + + Returns custom attributes of a specified type that are defined for this member, excluding named attributes. + An array of custom attributes, or an empty array if no custom attributes exist. + The type of the custom attributes. + true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. + + + Returns a value that indicates whether one or more instances of the specified custom attribute are defined for this member. + true if an attribute of the type represented by is defined for this member; otherwise, false. + The type of the custom attribute. + true to look up the hierarchy chain for the inherited custom attribute; otherwise, false. + + + Represents an exception that occurred during the synchronous processing of an HTTP request in an ASP.NET MVC application. + + + Initializes a new instance of the class using a system-supplied message. + + + Initializes a new instance of the class using the specified message. + The message that describes the exception. The caller of this constructor must make sure that this string has been localized for the current system culture. + + + Initializes a new instance of the class using a specified error message and a reference to the inner exception that is the cause of this exception. + The message that describes the exception. The caller of this constructor must make sure that this string has been localized for the current system culture. + The exception that is the cause of the current exception. If the parameter is not null, the current exception is raised in a catch block that handles the inner exception. + + + Represents support for calling child action methods and rendering the result inline in a parent view. + + + Invokes the specified child action method and returns the result as an HTML string. + The child action result as an HTML string. + The HTML helper instance that this method extends. + The name of the action method to invoke. + The parameter is null. + The parameter is null or empty. + The required virtual path data cannot be found. + + + Invokes the specified child action method with the specified parameters and returns the result as an HTML string. + The child action result as an HTML string. + The HTML helper instance that this method extends. + The name of the action method to invoke. + An object that contains the parameters for a route. You can use to provide the parameters that are bound to the action method parameters. The parameter is merged with the original route values and overrides them. + The parameter is null. + The parameter is null or empty. + The required virtual path data cannot be found. + + + Invokes the specified child action method using the specified controller name and returns the result as an HTML string. + The child action result as an HTML string. + The HTML helper instance that this method extends. + The name of the action method to invoke. + The name of the controller that contains the action method. + The parameter is null. + The parameter is null or empty. + The required virtual path data cannot be found. + + + Invokes the specified child action method using the specified parameters and controller name and returns the result as an HTML string. + The child action result as an HTML string. + The HTML helper instance that this method extends. + The name of the action method to invoke. + The name of the controller that contains the action method. + An object that contains the parameters for a route. You can use to provide the parameters that are bound to the action method parameters. The parameter is merged with the original route values and overrides them. + The parameter is null. + The parameter is null or empty. + The required virtual path data cannot be found. + + + Invokes the specified child action method using the specified parameters and controller name and returns the result as an HTML string. + The child action result as an HTML string. + The HTML helper instance that this method extends. + The name of the action method to invoke. + The name of the controller that contains the action method. + A dictionary that contains the parameters for a route. You can use to provide the parameters that are bound to the action method parameters. The parameter is merged with the original route values and overrides them. + The parameter is null. + The parameter is null or empty. + The required virtual path data cannot be found. + + + Invokes the specified child action method using the specified parameters and returns the result as an HTML string. + The child action result as an HTML string. + The HTML helper instance that this method extends. + The name of the action method to invoke. + A dictionary that contains the parameters for a route. You can use to provide the parameters that are bound to the action method parameters. The parameter is merged with the original route values and overrides them. + The parameter is null. + The parameter is null or empty. + The required virtual path data cannot be found. + + + Invokes the specified child action method and renders the result inline in the parent view. + The HTML helper instance that this method extends. + The name of the child action method to invoke. + The parameter is null. + The parameter is null or empty. + The required virtual path data cannot be found. + + + Invokes the specified child action method using the specified parameters and renders the result inline in the parent view. + The HTML helper instance that this method extends. + The name of the child action method to invoke. + An object that contains the parameters for a route. You can use to provide the parameters that are bound to the action method parameters. The parameter is merged with the original route values and overrides them. + The parameter is null. + The parameter is null or empty. + The required virtual path data cannot be found. + + + Invokes the specified child action method using the specified controller name and renders the result inline in the parent view. + The HTML helper instance that this method extends. + The name of the child action method to invoke. + The name of the controller that contains the action method. + The parameter is null. + The parameter is null or empty. + The required virtual path data cannot be found. + + + Invokes the specified child action method using the specified parameters and controller name and renders the result inline in the parent view. + The HTML helper instance that this method extends. + The name of the child action method to invoke. + The name of the controller that contains the action method. + An object that contains the parameters for a route. You can use to provide the parameters that are bound to the action method parameters. The parameter is merged with the original route values and overrides them. + The parameter is null. + The parameter is null or empty. + The required virtual path data cannot be found. + + + Invokes the specified child action method using the specified parameters and controller name and renders the result inline in the parent view. + The HTML helper instance that this method extends. + The name of the child action method to invoke. + The name of the controller that contains the action method. + A dictionary that contains the parameters for a route. You can use to provide the parameters that are bound to the action method parameters. The parameter is merged with the original route values and overrides them. + The parameter is null. + The parameter is null or empty. + The required virtual path data cannot be found. + + + Invokes the specified child action method using the specified parameters and renders the result inline in the parent view. + The HTML helper instance that this method extends. + The name of the child action method to invoke. + A dictionary that contains the parameters for a route. You can use to provide the parameters that are bound to the action method parameters. The parameter is merged with the original route values and overrides them. + The parameter is null. + The parameter is null or empty. + The required virtual path data cannot be found. + + + Represents support for rendering object values as HTML. + + + Returns HTML markup for each property in the object that is represented by a string expression. + The HTML markup for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to display. + + + Returns HTML markup for each property in the object that is represented by a string expression, using additional view data. + The HTML markup for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to display. + An anonymous object that can contain additional view data that will be merged into the instance that is created for the template. + + + Returns HTML markup for each property in the object that is represented by the expression, using the specified template. + The HTML markup for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to display. + The name of the template that is used to render the object. + + + Returns HTML markup for each property in the object that is represented by the expression, using the specified template and additional view data. + The HTML markup for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to display. + The name of the template that is used to render the object. + An anonymous object that can contain additional view data that will be merged into the instance that is created for the template. + + + Returns HTML markup for each property in the object that is represented by the expression, using the specified template and an HTML field ID. + The HTML markup for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to display. + The name of the template that is used to render the object. + A string that is used to disambiguate the names of HTML input elements that are rendered for properties that have the same name. + + + Returns HTML markup for each property in the object that is represented by the expression, using the specified template, HTML field ID, and additional view data. + The HTML markup for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to display. + The name of the template that is used to render the object. + A string that is used to disambiguate the names of HTML input elements that are rendered for properties that have the same name. + + + + Returns HTML markup for each property in the object that is represented by the expression. + The HTML markup for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to display. + The type of the model. + The type of the value. + + + Returns a string that contains each property value in the object that is represented by the specified expression, using additional view data. + The HTML markup for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to display. + An anonymous object that can contain additional view data that will be merged into the instance that is created for the template. + The type of the model. + The type of the value. + + + Returns a string that contains each property value in the object that is represented by the , using the specified template. + The HTML markup for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to display. + The name of the template that is used to render the object. + The type of the model. + The type of the value. + + + Returns a string that contains each property value in the object that is represented by the specified expression, using the specified template and additional view data. + The HTML markup for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to display. + The name of the template that is used to render the object. + An anonymous object that can contain additional view data that will be merged into the instance that is created for the template. + The type of the model. + The type of the value. + + + Returns HTML markup for each property in the object that is represented by the , using the specified template and an HTML field ID. + The HTML markup for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to display. + The name of the template that is used to render the object. + A string that is used to disambiguate the names of HTML input elements that are rendered for properties that have the same name. + The type of the model. + The type of the value. + + + Returns HTML markup for each property in the object that is represented by the specified expression, using the template, an HTML field ID, and additional view data. + The HTML markup for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to display. + The name of the template that is used to render the object. + A string that is used to disambiguate the names of HTML input elements that are rendered for properties that have the same name. + An anonymous object that can contain additional view data that will be merged into the instance that is created for the template. + The type of the model. + The type of the value. + + + Returns HTML markup for each property in the model. + The HTML markup for each property in the model. + The HTML helper instance that this method extends. + + + Returns HTML markup for each property in the model, using the additional view data. + The HTML markup for each property in the model. + The HTML helper instance that this method extends. + An anonymous object that can contain additional view data that will be merged into the instance that is created for the template. + + + Returns HTML markup for each property in the model using the specified template. + The HTML markup for each property in the model. + The HTML helper instance that this method extends. + The name of the template that is used to render the object. + + + Returns HTML markup for each property in the model, using the specified template and additional view data. + The HTML markup for each property in the model. + The HTML helper instance that this method extends. + The name of the template that is used to render the object. + An anonymous object that can contain additional view data that will be merged into the instance that is created for the template. + + + Returns HTML markup for each property in the model using the specified template and HTML field ID. + The HTML markup for each property in the model. + The HTML helper instance that this method extends. + The name of the template that is used to render the object. + A string that is used to disambiguate the names of HTML input elements that are rendered for properties that have the same name. + + + Returns HTML markup for each property in the model, using the specified template, an HTML field ID, and additional view data. + The HTML markup for each property in the model. + The HTML helper instance that this method extends. + The name of the template that is used to render the object. + A string that is used to disambiguate the names of HTML input elements that are rendered for properties that have the same name. + An anonymous object that can contain additional view data that will be merged into the instance that is created for the template. + + + Provides a way to render object values as HTML. + + + Returns HTML markup for each property in the object that is represented by the specified expression. + The HTML markup for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to display. + + + Returns HTML markup for each property in the object that is represented by the specified expression. + The HTML markup for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to display. + The type of the model. + The type of the value. + + + Represents support for the HTML input element in an application. + + + Returns an HTML input element for each property in the object that is represented by the expression. + An HTML input element for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to display. + + + Returns an HTML input element for each property in the object that is represented by the expression, using the additional view data. + An HTML input element for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to display. + An anonymous object that can contain additional view data that will be merged into the instance that is created for the template. + + + Returns an HTML input element for each property in the object that is represented by the expression, using the specified template. + An HTML input element for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to display. + The name of the template to use to render the object. + + + Returns an HTML input element for each property in the object that is represented by the expression, using the specified template and additional view data. + An HTML input element for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to display. + The name of the template to use to render the object. + An anonymous object that can contain additional view data that will be merged into the instance that is created for the template. + + + Returns an HTML input element for each property in the object that is represented by the expression, using the specified template and HTML field name. + An HTML input element for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to display. + The name of the template to use to render the object. + A string that is used to disambiguate the names of HTML input elements that are rendered for properties that have the same name. + + + Returns an HTML input element for each property in the object that is represented by the expression, using the specified template, HTML field name, and additional view data. + An HTML input element for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to display. + The name of the template to use to render the object. + A string that is used to disambiguate the names of HTML input elements that are rendered for properties that have the same name. + An anonymous object that can contain additional view data that will be merged into the instance that is created for the template. + + + Returns an HTML input element for each property in the object that is represented by the expression. + An HTML input element for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to display. + The type of the model. + The type of the value. + + + Returns an HTML input element for each property in the object that is represented by the expression, using the additional view data. + An HTML input element for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to display. + An anonymous object that can contain additional view data that will be merged into the instance that is created for the template. + The type of the model. + The type of the value. + + + Returns an HTML input element for each property in the object that is represented by the expression, using the specified template. + An HTML input element for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to display. + The name of the template to use to render the object. + The type of the model. + The type of the value. + + + Returns an HTML input element for each property in the object that is represented by the expression, using the specified template and additional view data. + An HTML input element for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to display. + The name of the template to use to render the object. + An anonymous object that can contain additional view data that will be merged into the instance that is created for the template. + The type of the model. + The type of the value. + + + Returns an HTML input element for each property in the object that is represented by the expression, using the specified template and HTML field name. + An HTML input element for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to display. + The name of the template to use to render the object. + A string that is used to disambiguate the names of HTML input elements that are rendered for properties that have the same name. + The type of the model. + The type of the value. + + + Returns an HTML input element for each property in the object that is represented by the expression, using the specified template, HTML field name, and additional view data. + An HTML input element for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to display. + The name of the template to use to render the object. + A string that is used to disambiguate the names of HTML input elements that are rendered for properties that have the same name. + An anonymous object that can contain additional view data that will be merged into the instance that is created for the template. + The type of the model. + The type of the value. + + + Returns an HTML input element for each property in the model. + An HTML input element for each property in the model. + The HTML helper instance that this method extends. + + + Returns an HTML input element for each property in the model, using additional view data. + An HTML input element for each property in the model. + The HTML helper instance that this method extends. + An anonymous object that can contain additional view data that will be merged into the instance that is created for the template. + + + Returns an HTML input element for each property in the model, using the specified template. + An HTML input element for each property in the model and in the specified template. + The HTML helper instance that this method extends. + The name of the template to use to render the object. + + + Returns an HTML input element for each property in the model, using the specified template and additional view data. + An HTML input element for each property in the model. + The HTML helper instance that this method extends. + The name of the template to use to render the object. + An anonymous object that can contain additional view data that will be merged into the instance that is created for the template. + + + Returns an HTML input element for each property in the model, using the specified template name and HTML field name. + An HTML input element for each property in the model and in the named template. + The HTML helper instance that this method extends. + The name of the template to use to render the object. + A string that is used to disambiguate the names of HTML input elements that are rendered for properties that have the same name. + + + Returns an HTML input element for each property in the model, using the template name, HTML field name and additional view data. + An HTML input element for each property in the model. + The HTML helper instance that this method extends. + The name of the template to use to render the object. + A string that is used to disambiguate the names of HTML input elements that are rendered for properties that have the same name. + An anonymous object that can contain additional view data that will be merged into the instance that is created for the template. + + + Represents support for HTML in an application. + + + Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by an action method. + An opening <form> tag. + The HTML helper instance that this method extends. + + + Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by an action method. + An opening <form> tag. + The HTML helper instance that this method extends. + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. + + + Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by an action method. + An opening <form> tag. + The HTML helper instance that this method extends. + The name of the action method. + The name of the controller. + + + Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by an action method. + An opening <form> tag. + The HTML helper instance that this method extends. + The name of the action method. + The name of the controller. + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. + + + Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by an action method. + An opening <form> tag. + The HTML helper instance that this method extends. + The name of the action method. + The name of the controller. + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. + The HTTP method for processing the form, either GET or POST. + + + Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by an action method. + An opening <form> tag. + The HTML helper instance that this method extends. + The name of the action method. + The name of the controller. + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. + The HTTP method for processing the form, either GET or POST. + An object that contains the HTML attributes to set for the element. + + + Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by an action method. + An opening <form> tag. + The HTML helper instance that this method extends. + The name of the action method. + The name of the controller. + The HTTP method for processing the form, either GET or POST. + + + Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by an action method. + An opening <form> tag. + The HTML helper instance that this method extends. + The name of the action method. + The name of the controller. + The HTTP method for processing the form, either GET or POST. + An object that contains the HTML attributes to set for the element. + + + Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by an action method. + An opening <form> tag. + The HTML helper instance that this method extends. + The name of the action method. + The name of the controller. + The HTTP method for processing the form, either GET or POST. + An object that contains the HTML attributes to set for the element. + + + Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by an action method. + An opening <form> tag. + The HTML helper instance that this method extends. + The name of the action method. + The name of the controller. + An object that contains the parameters for a route. + + + Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by an action method. + An opening <form> tag. + The HTML helper instance that this method extends. + The name of the action method. + The name of the controller. + An object that contains the parameters for a route. + The HTTP method for processing the form, either GET or POST. + + + Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by an action method. + An opening <form> tag. + The HTML helper instance that this method extends. + The name of the action method. + The name of the controller. + An object that contains the parameters for a route. + The HTTP method for processing the form, either GET or POST. + An object that contains the HTML attributes to set for the element. + + + Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by an action method. + An opening <form> tag. + The HTML helper instance that this method extends. + An object that contains the parameters for a route. + + + Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by the route target. + An opening <form> tag. + The HTML helper instance that this method extends. + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. + + + Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by the route target. + An opening <form> tag. + The HTML helper instance that this method extends. + The name of the route to use to obtain the form-post URL. + + + Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by the route target. + An opening <form> tag. + The HTML helper instance that this method extends. + The name of the route to use to obtain the form-post URL. + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. + + + Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by the route target. + An opening <form> tag. + The HTML helper instance that this method extends. + The name of the route to use to obtain the form-post URL. + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. + The HTTP method for processing the form, either GET or POST. + + + Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by the route target. + An opening <form> tag. + The HTML helper instance that this method extends. + The name of the route to use to obtain the form-post URL. + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. This object is typically created by using object initializer syntax. + The HTTP method for processing the form, either GET or POST. + An object that contains the HTML attributes to set for the element. + + + Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by the route target. + An opening <form> tag. + The HTML helper instance that this method extends. + The name of the route to use to obtain the form-post URL. + The HTTP method for processing the form, either GET or POST. + + + Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by the route target. + An opening <form> tag. + The HTML helper instance that this method extends. + The name of the route to use to obtain the form-post URL. + The HTTP method for processing the form, either GET or POST. + An object that contains the HTML attributes to set for the element. + + + Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by the route target. + An opening <form> tag. + The HTML helper instance that this method extends. + The name of the route to use to obtain the form-post URL. + The HTTP method for processing the form, either GET or POST. + An object that contains the HTML attributes to set for the element. + + + Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by the route target. + An opening <form> tag. + The HTML helper instance that this method extends. + The name of the route to use to obtain the form-post URL. + An object that contains the parameters for a route + + + Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by the route target. + An opening <form> tag. + The HTML helper instance that this method extends. + The name of the route to use to obtain the form-post URL. + An object that contains the parameters for a route + The HTTP method for processing the form, either GET or POST. + + + Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by the route target. + An opening <form> tag. + The HTML helper instance that this method extends. + The name of the route to use to obtain the form-post URL. + An object that contains the parameters for a route + The HTTP method for processing the form, either GET or POST. + An object that contains the HTML attributes to set for the element. + + + Writes an opening <form> tag to the response. When the user submits the form, the request will be processed by the route target. + An opening <form> tag. + The HTML helper instance that this method extends. + An object that contains the parameters for a route + + + Renders the closing </form> tag to the response. + The HTML helper instance that this method extends. + + + Represents support for HTML input controls in an application. + + + Returns a check box input element by using the specified HTML helper and the name of the form field. + An input element whose type attribute is set to "checkbox". + The HTML helper instance that this method extends. + The name of the form field. + + + Returns a check box input element by using the specified HTML helper, the name of the form field, and a value to indicate whether the check box is selected. + An input element whose type attribute is set to "checkbox". + The HTML helper instance that this method extends. + The name of the form field. + true to select the check box; otherwise, false. + + + Returns a check box input element by using the specified HTML helper, the name of the form field, a value to indicate whether the check box is selected, and the HTML attributes. + An input element whose type attribute is set to "checkbox". + The HTML helper instance that this method extends. + The name of the form field. + true to select the check box; otherwise, false. + An object that contains the HTML attributes to set for the element. + + + Returns a check box input element by using the specified HTML helper, the name of the form field, a value that indicates whether the check box is selected, and the HTML attributes. + An input element whose type attribute is set to "checkbox". + The HTML helper instance that this method extends. + The name of the form field. + true to select the check box; otherwise, false. + An object that contains the HTML attributes to set for the element. + + + Returns a check box input element by using the specified HTML helper, the name of the form field, and the HTML attributes. + An input element whose type attribute is set to "checkbox". + The HTML helper instance that this method extends. + The name of the form field. + An object that contains the HTML attributes to set for the element. + + + Returns a check box input element by using the specified HTML helper, the name of the form field, and the HTML attributes. + An input element whose type attribute is set to "checkbox". + The HTML helper instance that this method extends. + The name of the form field. + An object that contains the HTML attributes to set for the element. + + + Returns a check box input element for each property in the object that is represented by the specified expression. + An HTML input element whose type attribute is set to "checkbox" for each property in the object that is represented by the specified expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to render. + The type of the model. + The parameter is null. + + + Returns a check box input element for each property in the object that is represented by the specified expression, using the specified HTML attributes. + An HTML input element whose type attribute is set to "checkbox" for each property in the object that is represented by the specified expression, using the specified HTML attributes. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to render. + A dictionary that contains the HTML attributes to set for the element. + The type of the model. + The parameter is null. + + + Returns a check box input element for each property in the object that is represented by the specified expression, using the specified HTML attributes. + An HTML input element whose type attribute is set to "checkbox" for each property in the object that is represented by the specified expression, using the specified HTML attributes. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to render. + An object that contains the HTML attributes to set for the element. + The type of the model. + The parameter is null. + + + Returns a hidden input element by using the specified HTML helper and the name of the form field. + An input element whose type attribute is set to "hidden". + The HTML helper instance that this method extends. + The name of the form field and the key that is used to look up the value. + + + Returns a hidden input element by using the specified HTML helper, the name of the form field, and the value. + An input element whose type attribute is set to "hidden". + The HTML helper instance that this method extends. + The name of the form field and the key that is used to look up the value. + The value of the hidden input element. If this value is null, the value of the element is retrieved from the object. If no value exists there, the value is retrieved from the object. + + + Returns a hidden input element by using the specified HTML helper, the name of the form field, the value, and the HTML attributes. + An input element whose type attribute is set to "hidden". + The HTML helper instance that this method extends. + The name of the form field and the key that is used to look up the value. + The value of the hidden input element. If this value is null, the value of the element is retrieved from the object. If no value exists there, the value is retrieved from the object. + An object that contains the HTML attributes to set for the element. + + + Returns a hidden input element by using the specified HTML helper, the name of the form field, the value, and the HTML attributes. + An input element whose type attribute is set to "hidden". + The HTML helper instance that this method extends. + The name of the form field and the key that is used to look up the value. + The value of the hidden input element. If this value is null, the value of the element is retrieved from the object. If no value exists there, the value is retrieved from the object. + An object that contains the HTML attributes to set for the element. + + + Returns an HTML hidden input element for each property in the object that is represented by the specified expression. + An input element whose type attribute is set to "hidden" for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to render. + The type of the model. + The type of the value. + The parameter is null or empty. + + + Returns an HTML hidden input element for each property in the object that is represented by the specified expression, using the specified HTML attributes. + An input element whose type attribute is set to "hidden" for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to render. + A dictionary that contains the HTML attributes to set for the element. + The type of the model. + The type of the value. + The parameter is null or empty. + + + Returns an HTML hidden input element for each property in the object that is represented by the specified expression, using the specified HTML attributes. + An input element whose type attribute is set to "hidden" for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to render. + An object that contains the HTML attributes to set for the element. + The type of the model. + The type of the value. + The parameter is null or empty. + + + Returns a password input element by using the specified HTML helper and the name of the form field. + An input element whose type attribute is set to "password". + The HTML helper instance that this method extends. + The name of the form field and the key that is used to look up the value. + + + Returns a password input element by using the specified HTML helper, the name of the form field, and the value. + An input element whose type attribute is set to "password". + The HTML helper instance that this method extends. + The name of the form field and the key that is used to look up the value. + The value of the password input element. If this value is null, the value of the element is retrieved from the object. If no value exists there, the value is retrieved from the object. + + + Returns a password input element by using the specified HTML helper, the name of the form field, the value, and the HTML attributes. + An input element whose type attribute is set to "password". + The HTML helper instance that this method extends. + The name of the form field and the key that is used to look up the value. + The value of the password input element. If this value is null, the value of the element is retrieved from the object. If no value exists there, the value is retrieved from the object. + An object that contains the HTML attributes to set for the element. + + + Returns a password input element by using the specified HTML helper, the name of the form field, the value, and the HTML attributes. + An input element whose type attribute is set to "password". + The HTML helper instance that this method extends. + The name of the form field and the key that is used to look up the value. + The value of the password input element. If this value is null, the value of the element is retrieved from the object. If no value exists there, the value is retrieved from the object. + An object that contains the HTML attributes to set for the element. + + + Returns a password input element for each property in the object that is represented by the specified expression. + An HTML input element whose type attribute is set to "password" for each property in the object that is represented by the specified expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to render. + The type of the model. + The type of the value. + The parameter is null. + + + Returns a password input element for each property in the object that is represented by the specified expression, using the specified HTML attributes. + An HTML input element whose type attribute is set to "password" for each property in the object that is represented by the specified expression, using the specified HTML attributes. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to render. + A dictionary that contains the HTML attributes to set for the element. + The type of the model. + The type of the value. + The parameter is null. + + + Returns a password input element for each property in the object that is represented by the specified expression, using the specified HTML attributes. + An HTML input element whose type attribute is set to "password" for each property in the object that is represented by the specified expression, using the specified HTML attributes. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to render. + An object that contains the HTML attributes to set for the element. + The type of the model. + The type of the value. + The parameter is null. + + + Returns a radio button input element that is used to present mutually exclusive options. + An input element whose type attribute is set to "radio". + The HTML helper instance that this method extends. + The name of the form field and the key that is used to look up the value. + If this radio button is selected, the value of the radio button that is submitted when the form is posted. If the value of the selected radio button in the or the object matches this value, this radio button is selected. + The parameter is null or empty. + The parameter is null. + + + Returns a radio button input element that is used to present mutually exclusive options. + An input element whose type attribute is set to "radio". + The HTML helper instance that this method extends. + The name of the form field and the key that is used to look up the value. + If this radio button is selected, the value of the radio button that is submitted when the form is posted. If the value of the selected radio button in the or the object matches this value, this radio button is selected. + true to select the radio button; otherwise, false. + The parameter is null or empty. + The parameter is null. + + + Returns a radio button input element that is used to present mutually exclusive options. + An input element whose type attribute is set to "radio". + The HTML helper instance that this method extends. + The name of the form field and the key that is used to look up the value. + If this radio button is selected, the value of the radio button that is submitted when the form is posted. If the value of the selected radio button in the or the object matches this value, this radio button is selected. + true to select the radio button; otherwise, false. + An object that contains the HTML attributes to set for the element. + The parameter is null or empty. + The parameter is null. + + + Returns a radio button input element that is used to present mutually exclusive options. + An input element whose type attribute is set to "radio". + The HTML helper instance that this method extends. + The name of the form field and the key that is used to look up the value. + If this radio button is selected, the value of the radio button that is submitted when the form is posted. If the value of the selected radio button in the or the object matches this value, this radio button is selected. + true to select the radio button; otherwise, false. + An object that contains the HTML attributes to set for the element. + The parameter is null or empty. + The parameter is null. + + + Returns a radio button input element that is used to present mutually exclusive options. + An input element whose type attribute is set to "radio". + The HTML helper instance that this method extends. + The name of the form field and the key that is used to look up the value. + If this radio button is selected, the value of the radio button that is submitted when the form is posted. If the value of the selected radio button in the or the object matches this value, this radio button is selected. + An object that contains the HTML attributes to set for the element. + The parameter is null or empty. + The parameter is null. + + + Returns a radio button input element that is used to present mutually exclusive options. + An input element whose type attribute is set to "radio". + The HTML helper instance that this method extends. + The name of the form field and the key that is used to look up the value. + If this radio button is selected, the value of the radio button that is submitted when the form is posted. If the value of the selected radio button in the or the object matches this value, this radio button is selected. + An object that contains the HTML attributes to set for the element. + The parameter is null or empty. + The parameter is null. + + + Returns a radio button input element for each property in the object that is represented by the specified expression. + An HTML input element whose type attribute is set to "radio" for each property in the object that is represented by the specified expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to render. + If this radio button is selected, the value of the radio button that is submitted when the form is posted. If the value of the selected radio button in the or the object matches this value, this radio button is selected. + The type of the model. + The type of the value. + The parameter is null. + + + Returns a radio button input element for each property in the object that is represented by the specified expression, using the specified HTML attributes. + An HTML input element whose type attribute is set to "radio" for each property in the object that is represented by the specified expression, using the specified HTML attributes. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to render. + If this radio button is selected, the value of the radio button that is submitted when the form is posted. If the value of the selected radio button in the or the object matches this value, this radio button is selected. + A dictionary that contains the HTML attributes to set for the element. + The type of the model. + The type of the value. + The parameter is null. + + + Returns a radio button input element for each property in the object that is represented by the specified expression, using the specified HTML attributes. + An HTML input element whose type attribute is set to "radio" for each property in the object that is represented by the specified expression, using the specified HTML attributes. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to render. + If this radio button is selected, the value of the radio button that is submitted when the form is posted. If the value of the selected radio button in the or the object matches this value, this radio button is selected. + An object that contains the HTML attributes to set for the element. + The type of the model. + The type of the value. + The parameter is null. + + + Returns a text input element by using the specified HTML helper and the name of the form field. + An input element whose type attribute is set to "text". + The HTML helper instance that this method extends. + The name of the form field and the key that is used to look up the value. + + + Returns a text input element by using the specified HTML helper, the name of the form field, and the value. + An input element whose type attribute is set to "text". + The HTML helper instance that this method extends. + The name of the form field and the key that is used to look up the value. + The value of the text input element. If this value is null, the value of the element is retrieved from the object. If no value exists there, the value is retrieved from the object. + + + Returns a text input element by using the specified HTML helper, the name of the form field, the value, and the HTML attributes. + An input element whose type attribute is set to "text". + The HTML helper instance that this method extends. + The name of the form field and the key that is used to look up the value. + The value of the text input element. If this value is null, the value of the element is retrieved from the object. If no value exists there, the value is retrieved from the object. + An object that contains the HTML attributes to set for the element. + + + Returns a text input element by using the specified HTML helper, the name of the form field, the value, and the HTML attributes. + An input element whose type attribute is set to "text". + The HTML helper instance that this method extends. + The name of the form field and the key that is used to look up the value. + The value of the text input element. If this value is null, the value of the element is retrieved from the object. If no value exists there, the value is retrieved from the object. + An object that contains the HTML attributes to set for the element. + + + Returns a text input element for each property in the object that is represented by the specified expression. + An HTML input element whose type attribute is set to "text" for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to render. + The type of the model. + The type of the value. + The parameter is null or empty. + + + Returns a text input element for each property in the object that is represented by the specified expression, using the specified HTML attributes. + An HTML input element type attribute is set to "text" for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to render. + A dictionary that contains the HTML attributes to set for the element. + The type of the model. + The type of the value. + The parameter is null or empty. + + + Returns a text input element for each property in the object that is represented by the specified expression, using the specified HTML attributes. + An HTML input element whose type attribute is set to "text" for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to render. + An object that contains the HTML attributes to set for the element. + The type of the model. + The type of the value. + The parameter is null or empty. + + + Represents support for the HTML label element in an ASP.NET MVC view. + + + Returns an HTML label element and the property name of the property that is represented by the specified expression. + An HTML label element and the property name of the property that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the property to display. + + + Returns an HTML label element and the property name of the property that is represented by the specified expression. + An HTML label element and the property name of the property that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the property to display. + The type of the model. + The type of the value. + + + Returns an HTML label element and the property name of the property that is represented by the model. + An HTML label element and the property name of the property that is represented by the model. + The HTML helper instance that this method extends. + + + Represents support for HTML links in an application. + + + Returns an anchor element (a element) that contains the virtual path of the specified action. + An anchor element (a element). + The HTML helper instance that this method extends. + The inner text of the anchor element. + The name of the action. + The parameter is null or empty. + + + Returns an anchor element (a element) that contains the virtual path of the specified action. + An anchor element (a element). + The HTML helper instance that this method extends. + The inner text of the anchor element. + The name of the action. + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. The object is typically created by using object initializer syntax. + The parameter is null or empty. + + + Returns an anchor element (a element) that contains the virtual path of the specified action. + An anchor element (a element). + The HTML helper instance that this method extends. + The inner text of the anchor element. + The name of the action. + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. The object is typically created by using object initializer syntax. + An object that contains the HTML attributes for the element. The attributes are retrieved through reflection by examining the properties of the object. The object is typically created by using object initializer syntax. + The parameter is null or empty. + + + Returns an anchor element (a element) that contains the virtual path of the specified action. + An anchor element (a element). + The HTML helper instance that this method extends. + The inner text of the anchor element. + The name of the action. + The name of the controller. + The parameter is null or empty. + + + Returns an anchor element (a element) that contains the virtual path of the specified action. + An anchor element (a element). + The HTML helper instance that this method extends. + The inner text of the anchor element. + The name of the action. + The name of the controller. + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. The object is typically created by using object initializer syntax. + An object that contains the HTML attributes to set for the element. + The parameter is null or empty. + + + Returns an anchor element (a element) that contains the virtual path of the specified action. + An anchor element (a element). + The HTML helper instance that this method extends. + The inner text of the anchor element. + The name of the action. + The name of the controller. + The protocol for the URL, such as "http" or "https". + The host name for the URL. + The URL fragment name (the anchor name). + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. The object is typically created by using object initializer syntax. + An object that contains the HTML attributes to set for the element. + The parameter is null or empty. + + + Returns an anchor element (a element) that contains the virtual path of the specified action. + An anchor element (a element). + The HTML helper instance that this method extends. + The inner text of the anchor element. + The name of the action. + The name of the controller. + The protocol for the URL, such as "http" or "https". + The host name for the URL. + The URL fragment name (the anchor name). + An object that contains the parameters for a route. + An object that contains the HTML attributes to set for the element. + The parameter is null or empty. + + + Returns an anchor element (a element) that contains the virtual path of the specified action. + An anchor element (a element). + The HTML helper instance that this method extends. + The inner text of the anchor element. + The name of the action. + The name of the controller. + An object that contains the parameters for a route. + An object that contains the HTML attributes to set for the element. + The parameter is null or empty. + + + Returns an anchor element (a element) that contains the virtual path of the specified action. + An anchor element (a element). + The HTML helper instance that this method extends. + The inner text of the anchor element. + The name of the action. + An object that contains the parameters for a route. + The parameter is null or empty. + + + Returns an anchor element (a element) that contains the virtual path of the specified action. + An anchor element (a element). + The HTML helper instance that this method extends. + The inner text of the anchor element. + The name of the action. + An object that contains the parameters for a route. + An object that contains the HTML attributes to set for the element. + The parameter is null or empty. + + + Returns an anchor element (a element) that contains the virtual path of the specified action. + An anchor element (a element). + The HTML helper instance that this method extends. + The inner text of the anchor element. + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. The object is typically created by using object initializer syntax. + The parameter is null or empty. + + + Returns an anchor element (a element) that contains the virtual path of the specified action. + An anchor element (a element). + The HTML helper instance that this method extends. + The inner text of the anchor element. + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. The object is typically created by using object initializer syntax. + An object that contains the HTML attributes to set for the element. + The parameter is null or empty. + + + Returns an anchor element (a element) that contains the virtual path of the specified action. + An anchor element (a element). + The HTML helper instance that this method extends. + The inner text of the anchor element. + The name of the route that is used to return a virtual path. + The parameter is null or empty. + + + Returns an anchor element (a element) that contains the virtual path of the specified action. + An anchor element (a element). + The HTML helper instance that this method extends. + The inner text of the anchor element. + The name of the route that is used to return a virtual path. + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. The object is typically created by using object initializer syntax. + The parameter is null or empty. + + + Returns an anchor element (a element) that contains the virtual path of the specified action. + An anchor element (a element). + The HTML helper instance that this method extends. + The inner text of the anchor element. + The name of the route that is used to return a virtual path. + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. The object is typically created by using object initializer syntax. + An object that contains the HTML attributes to set for the element. + The parameter is null or empty. + + + Returns an anchor element (a element) that contains the virtual path of the specified action. + An anchor element (a element). + The HTML helper instance that this method extends. + The inner text of the anchor element. + The name of the route that is used to return a virtual path. + The protocol for the URL, such as "http" or "https". + The host name for the URL. + The URL fragment name (the anchor name). + An object that contains the parameters for a route. The parameters are retrieved through reflection by examining the properties of the object. The object is typically created by using object initializer syntax. + An object that contains the HTML attributes to set for the element. + The parameter is null or empty. + + + Returns an anchor element (a element) that contains the virtual path of the specified action. + An anchor element (a element). + The HTML helper instance that this method extends. + The inner text of the anchor element. + The name of the route that is used to return a virtual path. + The protocol for the URL, such as "http" or "https". + The host name for the URL. + The URL fragment name (the anchor name). + An object that contains the parameters for a route. + An object that contains the HTML attributes to set for the element. + The parameter is null or empty. + + + Returns an anchor element (a element) that contains the virtual path of the specified action. + An anchor element (a element). + The HTML helper instance that this method extends. + The inner text of the anchor element. + The name of the route that is used to return a virtual path. + An object that contains the parameters for a route. + The parameter is null or empty. + + + Returns an anchor element (a element) that contains the virtual path of the specified action. + An anchor element (a element). + The HTML helper instance that this method extends. + The inner text of the anchor element. + The name of the route that is used to return a virtual path. + An object that contains the parameters for a route. + An object that contains the HTML attributes to set for the element. + The parameter is null or empty. + + + Returns an anchor element (a element) that contains the virtual path of the specified action. + An anchor element (a element). + The HTML helper instance that this method extends. + The inner text of the anchor element. + An object that contains the parameters for a route. + The parameter is null or empty. + + + Returns an anchor element (a element) that contains the virtual path of the specified action. + An anchor element (a element). + The HTML helper instance that this method extends. + The inner text of the anchor element. + An object that contains the parameters for a route. + An object that contains the HTML attributes to set for the element. + The parameter is null or empty. + + + Represents an HTML form element in an MVC view. + + + Initializes a new instance of the class using the specified HTTP response object. + The HTTP response object. + The parameter is null. + + + Initializes a new instance of the class using the specified view context. + An object that encapsulates the information that is required in order to render a view. + The parameter is null. + + + Releases all resources that are used by the current instance of the class. + + + Releases unmanaged and, optionally, managed resources used by the current instance of the class. + true to release both managed and unmanaged resources; false to release only unmanaged resources. + + + Ends the form and disposes of all form resources. + + + Represents the functionality to render a partial view as an HTML-encoded string. + + + Renders the specified partial view as an HTML-encoded string. + The partial view that is rendered as an HTML-encoded string. + The HTML helper instance that this method extends. + The name of the partial view to render. + + + Renders the specified partial view as an HTML-encoded string. + The partial view that is rendered as an HTML-encoded string. + The HTML helper instance that this method extends. + The name of the partial view to render. + The model for the partial view. + + + Renders the specified partial view as an HTML-encoded string. + The partial view that is rendered as an HTML-encoded string. + The HTML helper instance that this method extends. + The name of the partial view. + The model for the partial view. + The view data dictionary for the partial view. + + + Renders the specified partial view as an HTML-encoded string. + The partial view that is rendered as an HTML-encoded string. + The HTML helper instance that this method extends. + The name of the partial view to render. + The view data dictionary for the partial view. + + + Provides support for rendering a partial view. + + + Renders the specified partial view by using the specified HMTL helper. + The HTML helper. + The name of the partial view + + + Renders the specified partial view, passing it a copy of the current object, but with the Model property set to the specified model. + The HTML helper. + The name of the partial view. + The model. + + + Renders the specified partial view, replacing the partial view's ViewData property with the specified object and setting the Model property of the view data to the specified model. + The HTML helper. + The name of the partial view. + The model for the partial view. + The view data for the partial view. + + + Renders the specified partial view, replacing its ViewData property with the specified object. + The HTML helper. + The name of the partial view. + The view data. + + + Represents support for making selections in a list. + + + Returns a single-selection select element using the specified HTML helper and the name of the form field. + An HTML select element. + The HTML helper instance that this method extends. + The name of the form field to return. + The parameter is null or empty. + + + Returns a single-selection select element using the specified HTML helper, the name of the form field, and the specified list items. + An HTML select element with an option subelement for each item in the list. + The HTML helper instance that this method extends. + The name of the form field to return. + A collection of objects that are used to populate the drop-down list. + The parameter is null or empty. + + + Returns a single-selection select element using the specified HTML helper, the name of the form field, the specified list items, and the specified HTML attributes. + An HTML select element with an option subelement for each item in the list. + The HTML helper instance that this method extends. + The name of the form field to return. + A collection of objects that are used to populate the drop-down list. + An object that contains the HTML attributes to set for the element. + The parameter is null or empty. + + + Returns a single-selection select element using the specified HTML helper, the name of the form field, the specified list items, and the specified HTML attributes. + An HTML select element with an option subelement for each item in the list. + The HTML helper instance that this method extends. + The name of the form field to return. + A collection of objects that are used to populate the drop-down list. + An object that contains the HTML attributes to set for the element. + The parameter is null or empty. + + + Returns a single-selection select element using the specified HTML helper, the name of the form field, the specified list items, and an option label. + An HTML select element with an option subelement for each item in the list. + The HTML helper instance that this method extends. + The name of the form field to return. + A collection of objects that are used to populate the drop-down list. + The text for a default empty item. This parameter can be null. + The parameter is null or empty. + + + Returns a single-selection select element using the specified HTML helper, the name of the form field, the specified list items, an option label, and the specified HTML attributes. + An HTML select element with an option subelement for each item in the list. + The HTML helper instance that this method extends. + The name of the form field to return. + A collection of objects that are used to populate the drop-down list. + The text for a default empty item. This parameter can be null. + An object that contains the HTML attributes to set for the element. + The parameter is null or empty. + + + Returns a single-selection select element using the specified HTML helper, the name of the form field, the specified list items, an option label, and the specified HTML attributes. + An HTML select element with an option subelement for each item in the list. + The HTML helper instance that this method extends. + The name of the form field to return. + A collection of objects that are used to populate the drop-down list. + The text for a default empty item. This parameter can be null. + An object that contains the HTML attributes to set for the element. + The parameter is null or empty. + + + Returns a single-selection select element using the specified HTML helper, the name of the form field, and an option label. + An HTML select element with an option subelement for each item in the list. + The HTML helper instance that this method extends. + The name of the form field to return. + The text for a default empty item. This parameter can be null. + The parameter is null or empty. + + + Returns an HTML select element for each property in the object that is represented by the specified expression using the specified list items. + An HTML select element for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to render. + A collection of objects that are used to populate the drop-down list. + The type of the model. + The type of the value. + The parameter is null. + + + Returns an HTML select element for each property in the object that is represented by the specified expression using the specified list items and HTML attributes. + An HTML select element for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to render. + A collection of objects that are used to populate the drop-down list. + A dictionary that contains the HTML attributes to set for the element. + The type of the model. + The type of the value. + The parameter is null. + + + Returns an HTML select element for each property in the object that is represented by the specified expression using the specified list items and HTML attributes. + An HTML select element for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to render. + A collection of objects that are used to populate the drop-down list. + An object that contains the HTML attributes to set for the element. + The type of the model. + The type of the value. + The parameter is null. + + + Returns an HTML select element for each property in the object that is represented by the specified expression using the specified list items and option label. + An HTML select element for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to render. + A collection of objects that are used to populate the drop-down list. + The text for a default empty item. This parameter can be null. + The type of the model. + The type of the value. + The parameter is null. + + + Returns an HTML select element for each property in the object that is represented by the specified expression using the specified list items, option label, and HTML attributes. + An HTML select element for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to render. + A collection of objects that are used to populate the drop-down list. + The text for a default empty item. This parameter can be null. + A dictionary that contains the HTML attributes to set for the element. + The type of the model. + The type of the value. + The parameter is null. + + + Returns an HTML select element for each property in the object that is represented by the specified expression using the specified list items, option label, and HTML attributes. + An HTML select element for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to render. + A collection of objects that are used to populate the drop-down list. + The text for a default empty item. This parameter can be null. + An object that contains the HTML attributes to set for the element. + The type of the model. + The type of the value. + + + Returns a multi-select select element using the specified HTML helper and the name of the form field. + An HTML select element. + The HTML helper instance that this method extends. + The name of the form field to return. + The parameter is null or empty. + + + Returns a multi-select select element using the specified HTML helper, the name of the form field, and the specified list items. + An HTML select element with an option subelement for each item in the list. + The HTML helper instance that this method extends. + The name of the form field to return. + A collection of objects that are used to populate the drop-down list. + The parameter is null or empty. + + + Returns a multi-select select element using the specified HTML helper, the name of the form field, the specified list items, and the specified HMTL attributes. + An HTML select element with an option subelement for each item in the list.. + The HTML helper instance that this method extends. + The name of the form field to return. + A collection of objects that are used to populate the drop-down list. + An object that contains the HTML attributes to set for the element. + The parameter is null or empty. + + + Returns a multi-select select element using the specified HTML helper, the name of the form field, and the specified list items. + An HTML select element with an option subelement for each item in the list.. + The HTML helper instance that this method extends. + The name of the form field to return. + A collection of objects that are used to populate the drop-down list. + An object that contains the HTML attributes to set for the element. + The parameter is null or empty. + + + Returns an HTML select element for each property in the object that is represented by the specified expression and using the specified list items. + An HTML select element for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to render. + A collection of objects that are used to populate the list. + The type of the model. + The type of the value. + The parameter is null. + + + Returns an HTML select element for each property in the object that is represented by the specified expression using the specified list items and HTML attributes. + An HTML select element for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to render. + A collection of objects that are used to populate the list. + A dictionary that contains the HTML attributes to set for the element. + The type of the model. + The type of the value. + The parameter is null. + + + Returns an HTML select element for each property in the object that is represented by the specified expression using the specified list items and HTML attributes. + An HTML select element for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to render. + A collection of objects that are used to populate the list. + An object that contains the HTML attributes to set for the element. + The type of the model. + The type of the value. + The parameter is null. + + + Represents support for HTML textarea controls. + + + Returns the specified textarea element by using the specified HTML helper and the name of the form field. + The textarea element. + The HTML helper instance that this method extends. + The name of the form field to return. + + + Returns the specified textarea element by using the specified HTML helper, the name of the form field, and the specified HTML attributes. + The textarea element. + The HTML helper instance that this method extends. + The name of the form field to return. + An object that contains the HTML attributes to set for the element. + + + Returns the specified textarea element by using the specified HTML helper and HTML attributes. + The textarea element. + The HTML helper instance that this method extends. + The name of the form field to return. + An object that contains the HTML attributes to set for the element. + + + Returns the specified textarea element by using the specified HTML helper, the name of the form field, and the text content. + The textarea element. + The HTML helper instance that this method extends. + The name of the form field to return. + The text content. + + + Returns the specified textarea element by using the specified HTML helper, the name of the form field, the text content, and the specified HTML attributes. + The textarea element. + The HTML helper instance that this method extends. + The name of the form field to return. + The text content. + An object that contains the HTML attributes to set for the element. + + + Returns the specified textarea element by using the specified HTML helper, the name of the form field, the text content, the number of rows and columns, and the specified HTML attributes. + The textarea element. + The HTML helper instance that this method extends. + The name of the form field to return. + The text content. + The number of rows. + The number of columns. + An object that contains the HTML attributes to set for the element. + + + Returns the specified textarea element by using the specified HTML helper, the name of the form field, the text content, the number of rows and columns, and the specified HTML attributes. + The textarea element. + The HTML helper instance that this method extends. + The name of the form field to return. + The text content. + The number of rows. + The number of columns. + An object that contains the HTML attributes to set for the element. + + + Returns the specified textarea element by using the specified HTML helper, the name of the form field, the text content, and the specified HTML attributes. + The textarea element. + The HTML helper instance that this method extends. + The name of the form field to return. + The text content. + An object that contains the HTML attributes to set for the element. + + + Returns an HTML textarea element for each property in the object that is represented by the specified expression. + An HTML textarea element for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to render. + The type of the model. + The type of the value. + The parameter is null. + + + Returns an HTML textarea element for each property in the object that is represented by the specified expression using the specified HTML attributes. + An HTML textarea element for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to render. + A dictionary that contains the HTML attributes to set for the element. + The type of the model. + The type of the value. + The parameter is null. + + + Returns an HTML textarea element for each property in the object that is represented by the specified expression using the specified HTML attributes and the number of rows and columns. + An HTML textarea element for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to render. + The number of rows. + The number of columns. + A dictionary that contains the HTML attributes to set for the element. + The type of the model. + The type of the value. + The parameter is null. + + + Returns an HTML textarea element for each property in the object that is represented by the specified expression using the specified HTML attributes and the number of rows and columns. + An HTML textarea element for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to render. + The number of rows. + The number of columns. + An object that contains the HTML attributes to set for the element. + The type of the model. + The type of the value. + The parameter is null. + + + Returns an HTML textarea element for each property in the object that is represented by the specified expression using the specified HTML attributes. + An HTML textarea element for each property in the object that is represented by the expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to render. + An object that contains the HTML attributes to set for the element. + The type of the model. + The type of the value. + The parameter is null. + + + Provides support for validating the input from an HTML form. + + + Gets or sets the name of the resource file (class key) that contains localized string values. + The name of the resource file (class key). + + + Retrieves the validation metadata for the specified model and applies each rule to the data field. + The HTML helper instance that this method extends. + The name of the property or model object that is being validated. + The parameter is null. + + + Retrieves the validation metadata and validates each data field that is represented by the specified expression. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to render. + The type of the model. + The type of the value. + + + Displays a validation message if an error exists for the specified field in the object. + If the property or object is valid, an empty string; otherwise, a span element that contains an error message. + The HTML helper instance that this method extends. + The name of the property or model object that is being validated. + + + Displays a validation message if an error exists for the specified field in the object. + If the property or object is valid, an empty string; otherwise, a span element that contains an error message. + The HTML helper instance that this method extends. + The name of the property or model object that is being validated. + An object that contains the HTML attributes for the element. + + + Displays a validation message if an error exists for the specified field in the object. + If the property or object is valid, an empty string; otherwise, a span element that contains an error message. + The HTML helper instance that this method extends. + The name of the property or model object that is being validated. + An object that contains the HTML attributes for the element. + + + Displays a validation message if an error exists for the specified field in the object. + If the property or object is valid, an empty string; otherwise, a span element that contains an error message. + The HTML helper instance that this method extends. + The name of the property or model object that is being validated. + The message to display if the specified field contains an error. + + + Displays a validation message if an error exists for the specified field in the object. + If the property or object is valid, an empty string; otherwise, a span element that contains an error message. + The HTML helper instance that this method extends. + The name of the property or model object that is being validated. + The message to display if the specified field contains an error. + An object that contains the HTML attributes for the element. + + + Displays a validation message if an error exists for the specified field in the object. + If the property or object is valid, an empty string; otherwise, a span element that contains an error message. + The HTML helper instance that this method extends. + The name of the property or model object that is being validated. + The message to display if the specified field contains an error. + An object that contains the HTML attributes for the element. + + + Returns the HTML markup for a validation-error message for each data field that is represented by the specified expression. + The HTML markup for a validation-error message for each data field that is represented by the expression. If no validation error occurs or client validation is disabled, this method returns null. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to render. + The type of the model. + The type of the value. + + + Returns the HTML markup for a validation-error message for each data field that is represented by the specified expression, using the specified message. + The HTML markup for a validation-error message for each data field that is represented by the expression. If no validation error occurs or client validation is disabled, this method returns null. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to render. + The message to display if the specified field contains an error. + The type of the model. + The type of the value. + + + Returns the HTML markup for a validation-error message for each data field that is represented by the specified expression, using the specified message and HTML attributes. + The HTML markup for a validation-error message for each data field that is represented by the expression. If no validation error occurs or client validation is disabled, this method returns null. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to render. + The message to display if the specified field contains an error. + A dictionary that contains the HTML attributes for the element. + The type of the model. + The type of the value. + + + Returns the HTML markup for a validation-error message for each data field that is represented by the specified expression, using the specified message and HTML attributes. + The HTML markup for a validation-error message for each data field that is represented by the expression. If no validation error occurs or client validation is disabled, this method returns null. + The HTML helper instance that this method extends. + An expression that identifies the object that contains the properties to render. + The message to display if the specified field contains an error. + An object that contains the HTML attributes for the element. + The type of the model. + The type of the value. + + + Returns an unordered list (ul element) of validation messages that are in the object. + A string that contains an unordered list (ul element) of validation messages. + The HTML helper instance that this method extends. + + + Returns an unordered list (ul element) of validation messages that are in the object and optionally displays only model-level errors. + A string that contains an unordered list (ul element) of validation messages. + The HTML helper instance that this method extends. + true to have the summary display model-level errors only, or false to have the summary display all errors. + + + Returns an unordered list (ul element) of validation messages that are in the object and optionally displays only model-level errors. + A string that contains an unordered list (ul element) of validation messages. + The HTML helper instance that this method extends. + true to have the summary display model-level errors only, or false to have the summary display all errors. + The message to display with the validation summary. + + + Returns an unordered list (ul element) of validation messages that are in the object and optionally displays only model-level errors. + A string that contains an unordered list (ul element) of validation messages. + The HTML helper instance that this method extends. + true to have the summary display model-level errors only, or false to have the summary display all errors. + The message to display with the validation summary. + A dictionary that contains the HTML attributes for the element. + + + Returns an unordered list (ul element) of validation messages that are in the object and optionally displays only model-level errors. + A string that contains an unordered list (ul element) of validation messages. + The HTML helper instance that this method extends. + true to have the summary display model-level errors only, or false to have the summary display all errors. + The message to display with the validation summary. + An object that contains the HTML attributes for the element. + + + Returns an unordered list (ul element) of validation messages that are in the object. + A string that contains an unordered list (ul element) of validation messages. + The HMTL helper instance that this method extends. + The message to display if the specified field contains an error. + + + Returns an unordered list (ul element) of validation messages that are in the object. + A string that contains an unordered list (ul element) of validation messages. + The HTML helper instance that this method extends. + The message to display if the specified field contains an error. + A dictionary that contains the HTML attributes for the element. + + + Returns an unordered list (ul element) of validation messages in the object. + A string that contains an unordered list (ul element) of validation messages. + The HTML helper instance that this method extends. + The message to display if the specified field contains an error. + An object that contains the HTML attributes for the element. + + \ No newline at end of file diff --git a/lib/log4net.license.txt b/lib/log4net.license.txt index 29f81d812f3..261eeb9e9f8 100644 --- a/lib/log4net.license.txt +++ b/lib/log4net.license.txt @@ -1,201 +1,201 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/lib/log4net.xml b/lib/log4net.xml index fab7af26df6..db9e99f9e7e 100644 --- a/lib/log4net.xml +++ b/lib/log4net.xml @@ -1,28655 +1,28655 @@ - - - - log4net - - - - - Appender that logs to a database. - - - - appends logging events to a table within a - database. The appender can be configured to specify the connection - string by setting the property. - The connection type (provider) can be specified by setting the - property. For more information on database connection strings for - your specific database see http://www.connectionstrings.com/. - - - Records are written into the database either using a prepared - statement or a stored procedure. The property - is set to (System.Data.CommandType.Text) to specify a prepared statement - or to (System.Data.CommandType.StoredProcedure) to specify a stored - procedure. - - - The prepared statement text or the name of the stored procedure - must be set in the property. - - - The prepared statement or stored procedure can take a number - of parameters. Parameters are added using the - method. This adds a single to the - ordered list of parameters. The - type may be subclassed if required to provide database specific - functionality. The specifies - the parameter name, database type, size, and how the value should - be generated using a . - - - - An example of a SQL Server table that could be logged to: - - CREATE TABLE [dbo].[Log] ( - [ID] [int] IDENTITY (1, 1) NOT NULL , - [Date] [datetime] NOT NULL , - [Thread] [varchar] (255) NOT NULL , - [Level] [varchar] (20) NOT NULL , - [Logger] [varchar] (255) NOT NULL , - [Message] [varchar] (4000) NOT NULL - ) ON [PRIMARY] - - - - An example configuration to log to the above table: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Julian Biddle - Nicko Cadell - Gert Driesen - Lance Nehring - - - - Abstract base class implementation of that - buffers events in a fixed size buffer. - - - - This base class should be used by appenders that need to buffer a - number of events before logging them. For example the - buffers events and then submits the entire contents of the buffer to - the underlying database in one go. - - - Subclasses should override the - method to deliver the buffered events. - - The BufferingAppenderSkeleton maintains a fixed size cyclic - buffer of events. The size of the buffer is set using - the property. - - A is used to inspect - each event as it arrives in the appender. If the - triggers, then the current buffer is sent immediately - (see ). Otherwise the event - is stored in the buffer. For example, an evaluator can be used to - deliver the events immediately when an ERROR event arrives. - - - The buffering appender can be configured in a mode. - By default the appender is NOT lossy. When the buffer is full all - the buffered events are sent with . - If the property is set to true then the - buffer will not be sent when it is full, and new events arriving - in the appender will overwrite the oldest event in the buffer. - In lossy mode the buffer will only be sent when the - triggers. This can be useful behavior when you need to know about - ERROR events but not about events with a lower level, configure an - evaluator that will trigger when an ERROR event arrives, the whole - buffer will be sent which gives a history of events leading up to - the ERROR event. - - - Nicko Cadell - Gert Driesen - - - - Abstract base class implementation of . - - - - This class provides the code for common functionality, such - as support for threshold filtering and support for general filters. - - - Appenders can also implement the interface. Therefore - they would require that the method - be called after the appenders properties have been configured. - - - Nicko Cadell - Gert Driesen - - - - Implement this interface for your own strategies for printing log statements. - - - - Implementors should consider extending the - class which provides a default implementation of this interface. - - - Appenders can also implement the interface. Therefore - they would require that the method - be called after the appenders properties have been configured. - - - Nicko Cadell - Gert Driesen - - - - Closes the appender and releases resources. - - - - Releases any resources allocated within the appender such as file handles, - network connections, etc. - - - It is a programming error to append to a closed appender. - - - - - - Log the logging event in Appender specific way. - - The event to log - - - This method is called to log a message into this appender. - - - - - - Gets or sets the name of this appender. - - The name of the appender. - - The name uniquely identifies the appender. - - - - - Interface for appenders that support bulk logging. - - - - This interface extends the interface to - support bulk logging of objects. Appenders - should only implement this interface if they can bulk log efficiently. - - - Nicko Cadell - - - - Log the array of logging events in Appender specific way. - - The events to log - - - This method is called to log an array of events into this appender. - - - - - - Interface used to delay activate a configured object. - - - - This allows an object to defer activation of its options until all - options have been set. This is required for components which have - related options that remain ambiguous until all are set. - - - If a component implements this interface then the method - must be called by the container after its all the configured properties have been set - and before the component can be used. - - - Nicko Cadell - - - - Activate the options that were previously set with calls to properties. - - - - This allows an object to defer activation of its options until all - options have been set. This is required for components which have - related options that remain ambiguous until all are set. - - - If a component implements this interface then this method must be called - after its properties have been set before the component can be used. - - - - - - Initial buffer size - - - - - Maximum buffer size before it is recycled - - - - - Default constructor - - - Empty default constructor - - - - - Finalizes this appender by calling the implementation's - method. - - - - If this appender has not been closed then the Finalize method - will call . - - - - - - Initialize the appender based on the options set - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - - - - Closes the appender and release resources. - - - - Release any resources allocated within the appender such as file handles, - network connections, etc. - - - It is a programming error to append to a closed appender. - - - This method cannot be overridden by subclasses. This method - delegates the closing of the appender to the - method which must be overridden in the subclass. - - - - - - Performs threshold checks and invokes filters before - delegating actual logging to the subclasses specific - method. - - The event to log. - - - This method cannot be overridden by derived classes. A - derived class should override the method - which is called by this method. - - - The implementation of this method is as follows: - - - - - - Checks that the severity of the - is greater than or equal to the of this - appender. - - - - Checks that the chain accepts the - . - - - - - Calls and checks that - it returns true. - - - - - If all of the above steps succeed then the - will be passed to the abstract method. - - - - - - Performs threshold checks and invokes filters before - delegating actual logging to the subclasses specific - method. - - The array of events to log. - - - This method cannot be overridden by derived classes. A - derived class should override the method - which is called by this method. - - - The implementation of this method is as follows: - - - - - - Checks that the severity of the - is greater than or equal to the of this - appender. - - - - Checks that the chain accepts the - . - - - - - Calls and checks that - it returns true. - - - - - If all of the above steps succeed then the - will be passed to the method. - - - - - - Test if the logging event should we output by this appender - - the event to test - true if the event should be output, false if the event should be ignored - - - This method checks the logging event against the threshold level set - on this appender and also against the filters specified on this - appender. - - - The implementation of this method is as follows: - - - - - - Checks that the severity of the - is greater than or equal to the of this - appender. - - - - Checks that the chain accepts the - . - - - - - - - - - Adds a filter to the end of the filter chain. - - the filter to add to this appender - - - The Filters are organized in a linked list. - - - Setting this property causes the new filter to be pushed onto the - back of the filter chain. - - - - - - Clears the filter list for this appender. - - - - Clears the filter list for this appender. - - - - - - Checks if the message level is below this appender's threshold. - - to test against. - - - If there is no threshold set, then the return value is always true. - - - - true if the meets the - requirements of this appender. - - - - - Is called when the appender is closed. Derived classes should override - this method if resources need to be released. - - - - Releases any resources allocated within the appender such as file handles, - network connections, etc. - - - It is a programming error to append to a closed appender. - - - - - - Subclasses of should implement this method - to perform actual logging. - - The event to append. - - - A subclass must implement this method to perform - logging of the . - - This method will be called by - if all the conditions listed for that method are met. - - - To restrict the logging of events in the appender - override the method. - - - - - - Append a bulk array of logging events. - - the array of logging events - - - This base class implementation calls the - method for each element in the bulk array. - - - A sub class that can better process a bulk array of events should - override this method in addition to . - - - - - - Called before as a precondition. - - - - This method is called by - before the call to the abstract method. - - - This method can be overridden in a subclass to extend the checks - made before the event is passed to the method. - - - A subclass should ensure that they delegate this call to - this base class if it is overridden. - - - true if the call to should proceed. - - - - Renders the to a string. - - The event to render. - The event rendered as a string. - - - Helper method to render a to - a string. This appender must have a - set to render the to - a string. - - If there is exception data in the logging event and - the layout does not process the exception, this method - will append the exception text to the rendered string. - - - Where possible use the alternative version of this method - . - That method streams the rendering onto an existing Writer - which can give better performance if the caller already has - a open and ready for writing. - - - - - - Renders the to a string. - - The event to render. - The TextWriter to write the formatted event to - - - Helper method to render a to - a string. This appender must have a - set to render the to - a string. - - If there is exception data in the logging event and - the layout does not process the exception, this method - will append the exception text to the rendered string. - - - Use this method in preference to - where possible. If, however, the caller needs to render the event - to a string then does - provide an efficient mechanism for doing so. - - - - - - The layout of this appender. - - - See for more information. - - - - - The name of this appender. - - - See for more information. - - - - - The level threshold of this appender. - - - - There is no level threshold filtering by default. - - - See for more information. - - - - - - It is assumed and enforced that errorHandler is never null. - - - - It is assumed and enforced that errorHandler is never null. - - - See for more information. - - - - - - The first filter in the filter chain. - - - - Set to null initially. - - - See for more information. - - - - - - The last filter in the filter chain. - - - See for more information. - - - - - Flag indicating if this appender is closed. - - - See for more information. - - - - - The guard prevents an appender from repeatedly calling its own DoAppend method - - - - - StringWriter used to render events - - - - - Gets or sets the threshold of this appender. - - - The threshold of the appender. - - - - All log events with lower level than the threshold level are ignored - by the appender. - - - In configuration files this option is specified by setting the - value of the option to a level - string, such as "DEBUG", "INFO" and so on. - - - - - - Gets or sets the for this appender. - - The of the appender - - - The provides a default - implementation for the property. - - - - - - The filter chain. - - The head of the filter chain filter chain. - - - Returns the head Filter. The Filters are organized in a linked list - and so all Filters on this Appender are available through the result. - - - - - - Gets or sets the for this appender. - - The layout of the appender. - - - See for more information. - - - - - - - Gets or sets the name of this appender. - - The name of the appender. - - - The name uniquely identifies the appender. - - - - - - Tests if this appender requires a to be set. - - - - In the rather exceptional case, where the appender - implementation admits a layout but can also work without it, - then the appender should return true. - - - This default implementation always returns true. - - - - true if the appender requires a layout object, otherwise false. - - - - - The default buffer size. - - - The default size of the cyclic buffer used to store events. - This is set to 512 by default. - - - - - Initializes a new instance of the class. - - - - Protected default constructor to allow subclassing. - - - - - - Initializes a new instance of the class. - - the events passed through this appender must be - fixed by the time that they arrive in the derived class' SendBuffer method. - - - Protected constructor to allow subclassing. - - - The should be set if the subclass - expects the events delivered to be fixed even if the - is set to zero, i.e. when no buffering occurs. - - - - - - Flush the currently buffered events - - - - Flushes any events that have been buffered. - - - If the appender is buffering in mode then the contents - of the buffer will NOT be flushed to the appender. - - - - - - Flush the currently buffered events - - set to true to flush the buffer of lossy events - - - Flushes events that have been buffered. If is - false then events will only be flushed if this buffer is non-lossy mode. - - - If the appender is buffering in mode then the contents - of the buffer will only be flushed if is true. - In this case the contents of the buffer will be tested against the - and if triggering will be output. All other buffered - events will be discarded. - - - If is true then the buffer will always - be emptied by calling this method. - - - - - - Initialize the appender based on the options set - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - - - - Close this appender instance. - - - - Close this appender instance. If this appender is marked - as not then the remaining events in - the buffer must be sent when the appender is closed. - - - - - - This method is called by the method. - - the event to log - - - Stores the in the cyclic buffer. - - - The buffer will be sent (i.e. passed to the - method) if one of the following conditions is met: - - - - The cyclic buffer is full and this appender is - marked as not lossy (see ) - - - An is set and - it is triggered for the - specified. - - - - Before the event is stored in the buffer it is fixed - (see ) to ensure that - any data referenced by the event will be valid when the buffer - is processed. - - - - - - Sends the contents of the buffer. - - The first logging event. - The buffer containing the events that need to be send. - - - The subclass must override . - - - - - - Sends the events. - - The events that need to be send. - - - The subclass must override this method to process the buffered events. - - - - - - The size of the cyclic buffer used to hold the logging events. - - - Set to by default. - - - - - The cyclic buffer used to store the logging events. - - - - - The triggering event evaluator that causes the buffer to be sent immediately. - - - The object that is used to determine if an event causes the entire - buffer to be sent immediately. This field can be null, which - indicates that event triggering is not to be done. The evaluator - can be set using the property. If this appender - has the ( property) set to - true then an must be set. - - - - - Indicates if the appender should overwrite events in the cyclic buffer - when it becomes full, or if the buffer should be flushed when the - buffer is full. - - - If this field is set to true then an must - be set. - - - - - The triggering event evaluator filters discarded events. - - - The object that is used to determine if an event that is discarded should - really be discarded or if it should be sent to the appenders. - This field can be null, which indicates that all discarded events will - be discarded. - - - - - Value indicating which fields in the event should be fixed - - - By default all fields are fixed - - - - - The events delivered to the subclass must be fixed. - - - - - Gets or sets a value that indicates whether the appender is lossy. - - - true if the appender is lossy, otherwise false. The default is false. - - - - This appender uses a buffer to store logging events before - delivering them. A triggering event causes the whole buffer - to be send to the remote sink. If the buffer overruns before - a triggering event then logging events could be lost. Set - to false to prevent logging events - from being lost. - - If is set to true then an - must be specified. - - - - - Gets or sets the size of the cyclic buffer used to hold the - logging events. - - - The size of the cyclic buffer used to hold the logging events. - - - - The option takes a positive integer - representing the maximum number of logging events to collect in - a cyclic buffer. When the is reached, - oldest events are deleted as new events are added to the - buffer. By default the size of the cyclic buffer is 512 events. - - - If the is set to a value less than - or equal to 1 then no buffering will occur. The logging event - will be delivered synchronously (depending on the - and properties). Otherwise the event will - be buffered. - - - - - - Gets or sets the that causes the - buffer to be sent immediately. - - - The that causes the buffer to be - sent immediately. - - - - The evaluator will be called for each event that is appended to this - appender. If the evaluator triggers then the current buffer will - immediately be sent (see ). - - If is set to true then an - must be specified. - - - - - Gets or sets the value of the to use. - - - The value of the to use. - - - - The evaluator will be called for each event that is discarded from this - appender. If the evaluator triggers then the current buffer will immediately - be sent (see ). - - - - - - Gets or sets a value indicating if only part of the logging event data - should be fixed. - - - true if the appender should only fix part of the logging event - data, otherwise false. The default is false. - - - - Setting this property to true will cause only part of the - event data to be fixed and serialized. This will improve performance. - - - See for more information. - - - - - - Gets or sets a the fields that will be fixed in the event - - - The event fields that will be fixed before the event is buffered - - - - The logging event needs to have certain thread specific values - captured before it can be buffered. See - for details. - - - - - - - Initializes a new instance of the class. - - - Public default constructor to initialize a new instance of this class. - - - - - Initialize the appender based on the options set - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - - - - Override the parent method to close the database - - - - Closes the database command and database connection. - - - - - - Inserts the events into the database. - - The events to insert into the database. - - - Insert all the events specified in the - array into the database. - - - - - - Adds a parameter to the command. - - The parameter to add to the command. - - - Adds a parameter to the ordered list of command parameters. - - - - - - Writes the events to the database using the transaction specified. - - The transaction that the events will be executed under. - The array of events to insert into the database. - - - The transaction argument can be null if the appender has been - configured not to use transactions. See - property for more information. - - - - - - Formats the log message into database statement text. - - The event being logged. - - This method can be overridden by subclasses to provide - more control over the format of the database statement. - - - Text that can be passed to a . - - - - - Connects to the database. - - - - - Retrieves the class type of the ADO.NET provider. - - - - Gets the Type of the ADO.NET provider to use to connect to the - database. This method resolves the type specified in the - property. - - - Subclasses can override this method to return a different type - if necessary. - - - The of the ADO.NET provider - - - - Prepares the database command and initialize the parameters. - - - - - Flag to indicate if we are using a command object - - - - Set to true when the appender is to use a prepared - statement or stored procedure to insert into the database. - - - - - - The list of objects. - - - - The list of objects. - - - - - - The security context to use for privileged calls - - - - - The that will be used - to insert logging events into a database. - - - - - The database command. - - - - - Database connection string. - - - - - String type name of the type name. - - - - - The text of the command. - - - - - The command type. - - - - - Indicates whether to use transactions when writing to the database. - - - - - Indicates whether to use transactions when writing to the database. - - - - - Gets or sets the database connection string that is used to connect to - the database. - - - The database connection string used to connect to the database. - - - - The connections string is specific to the connection type. - See for more information. - - - Connection string for MS Access via ODBC: - "DSN=MS Access Database;UID=admin;PWD=;SystemDB=C:\data\System.mdw;SafeTransactions = 0;FIL=MS Access;DriverID = 25;DBQ=C:\data\train33.mdb" - - Another connection string for MS Access via ODBC: - "Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Work\cvs_root\log4net-1.2\access.mdb;UID=;PWD=;" - - Connection string for MS Access via OLE DB: - "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Work\cvs_root\log4net-1.2\access.mdb;User Id=;Password=;" - - - - - Gets or sets the type name of the connection - that should be created. - - - The type name of the connection. - - - - The type name of the ADO.NET provider to use. - - - The default is to use the OLE DB provider. - - - Use the OLE DB Provider. This is the default value. - System.Data.OleDb.OleDbConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Use the MS SQL Server Provider. - System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Use the ODBC Provider. - Microsoft.Data.Odbc.OdbcConnection,Microsoft.Data.Odbc,version=1.0.3300.0,publicKeyToken=b77a5c561934e089,culture=neutral - This is an optional package that you can download from - http://msdn.microsoft.com/downloads - search for ODBC .NET Data Provider. - - Use the Oracle Provider. - System.Data.OracleClient.OracleConnection, System.Data.OracleClient, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - This is an optional package that you can download from - http://msdn.microsoft.com/downloads - search for .NET Managed Provider for Oracle. - - - - - Gets or sets the command text that is used to insert logging events - into the database. - - - The command text used to insert logging events into the database. - - - - Either the text of the prepared statement or the - name of the stored procedure to execute to write into - the database. - - - The property determines if - this text is a prepared statement or a stored procedure. - - - - - - Gets or sets the command type to execute. - - - The command type to execute. - - - - This value may be either (System.Data.CommandType.Text) to specify - that the is a prepared statement to execute, - or (System.Data.CommandType.StoredProcedure) to specify that the - property is the name of a stored procedure - to execute. - - - The default value is (System.Data.CommandType.Text). - - - - - - Should transactions be used to insert logging events in the database. - - - true if transactions should be used to insert logging events in - the database, otherwise false. The default value is true. - - - - Gets or sets a value that indicates whether transactions should be used - to insert logging events in the database. - - - When set a single transaction will be used to insert the buffered events - into the database. Otherwise each event will be inserted without using - an explicit transaction. - - - - - - Gets or sets the used to call the NetSend method. - - - The used to call the NetSend method. - - - - Unless a specified here for this appender - the is queried for the - security context to use. The default behavior is to use the security context - of the current thread. - - - - - - Should this appender try to reconnect to the database on error. - - - true if the appender should try to reconnect to the database after an - error has occurred, otherwise false. The default value is false, - i.e. not to try to reconnect. - - - - The default behaviour is for the appender not to try to reconnect to the - database if an error occurs. Subsequent logging events are discarded. - - - To force the appender to attempt to reconnect to the database set this - property to true. - - - When the appender attempts to connect to the database there may be a - delay of up to the connection timeout specified in the connection string. - This delay will block the calling application's thread. - Until the connection can be reestablished this potential delay may occur multiple times. - - - - - - Gets or sets the underlying . - - - The underlying . - - - creates a to insert - logging events into a database. Classes deriving from - can use this property to get or set this . Use the - underlying returned from if - you require access beyond that which provides. - - - - - Parameter type used by the . - - - - This class provides the basic database parameter properties - as defined by the interface. - - This type can be subclassed to provide database specific - functionality. The two methods that are called externally are - and . - - - - - - Initializes a new instance of the class. - - - Default constructor for the AdoNetAppenderParameter class. - - - - - Prepare the specified database command object. - - The command to prepare. - - - Prepares the database command object by adding - this parameter to its collection of parameters. - - - - - - Renders the logging event and set the parameter value in the command. - - The command containing the parameter. - The event to be rendered. - - - Renders the logging event using this parameters layout - object. Sets the value of the parameter on the command object. - - - - - - The name of this parameter. - - - - - The database type for this parameter. - - - - - Flag to infer type rather than use the DbType - - - - - The precision for this parameter. - - - - - The scale for this parameter. - - - - - The size for this parameter. - - - - - The to use to render the - logging event into an object for this parameter. - - - - - Gets or sets the name of this parameter. - - - The name of this parameter. - - - - The name of this parameter. The parameter name - must match up to a named parameter to the SQL stored procedure - or prepared statement. - - - - - - Gets or sets the database type for this parameter. - - - The database type for this parameter. - - - - The database type for this parameter. This property should - be set to the database type from the - enumeration. See . - - - This property is optional. If not specified the ADO.NET provider - will attempt to infer the type from the value. - - - - - - - Gets or sets the precision for this parameter. - - - The precision for this parameter. - - - - The maximum number of digits used to represent the Value. - - - This property is optional. If not specified the ADO.NET provider - will attempt to infer the precision from the value. - - - - - - - Gets or sets the scale for this parameter. - - - The scale for this parameter. - - - - The number of decimal places to which Value is resolved. - - - This property is optional. If not specified the ADO.NET provider - will attempt to infer the scale from the value. - - - - - - - Gets or sets the size for this parameter. - - - The size for this parameter. - - - - The maximum size, in bytes, of the data within the column. - - - This property is optional. If not specified the ADO.NET provider - will attempt to infer the size from the value. - - - - - - - Gets or sets the to use to - render the logging event into an object for this - parameter. - - - The used to render the - logging event into an object for this parameter. - - - - The that renders the value for this - parameter. - - - The can be used to adapt - any into a - for use in the property. - - - - - - Appends logging events to the terminal using ANSI color escape sequences. - - - - AnsiColorTerminalAppender appends log events to the standard output stream - or the error output stream using a layout specified by the - user. It also allows the color of a specific level of message to be set. - - - This appender expects the terminal to understand the VT100 control set - in order to interpret the color codes. If the terminal or console does not - understand the control codes the behavior is not defined. - - - By default, all output is written to the console's standard output stream. - The property can be set to direct the output to the - error stream. - - - NOTE: This appender writes each message to the System.Console.Out or - System.Console.Error that is set at the time the event is appended. - Therefore it is possible to programmatically redirect the output of this appender - (for example NUnit does this to capture program output). While this is the desired - behavior of this appender it may have security implications in your application. - - - When configuring the ANSI colored terminal appender, a mapping should be - specified to map a logging level to a color. For example: - - - - - - - - - - - - - - - The Level is the standard log4net logging level and ForeColor and BackColor can be any - of the following values: - - Blue - Green - Red - White - Yellow - Purple - Cyan - - These color values cannot be combined together to make new colors. - - - The attributes can be any combination of the following: - - Brightforeground is brighter - Dimforeground is dimmer - Underscoremessage is underlined - Blinkforeground is blinking (does not work on all terminals) - Reverseforeground and background are reversed - Hiddenoutput is hidden - Strikethroughmessage has a line through it - - While any of these attributes may be combined together not all combinations - work well together, for example setting both Bright and Dim attributes makes - no sense. - - - Patrick Wagstrom - Nicko Cadell - - - - The to use when writing to the Console - standard output stream. - - - - The to use when writing to the Console - standard output stream. - - - - - - The to use when writing to the Console - standard error output stream. - - - - The to use when writing to the Console - standard error output stream. - - - - - - Ansi code to reset terminal - - - - - Initializes a new instance of the class. - - - The instance of the class is set up to write - to the standard output stream. - - - - - Add a mapping of level to color - - The mapping to add - - - Add a mapping to this appender. - Each mapping defines the foreground and background colours - for a level. - - - - - - This method is called by the method. - - The event to log. - - - Writes the event to the console. - - - The format of the output will depend on the appender's layout. - - - - - - Initialize the options for this appender - - - - Initialize the level to color mappings set on this appender. - - - - - - Flag to write output to the error stream rather than the standard output stream - - - - - Mapping from level object to color value - - - - - Target is the value of the console output stream. - - - Target is the value of the console output stream. - This is either "Console.Out" or "Console.Error". - - - - Target is the value of the console output stream. - This is either "Console.Out" or "Console.Error". - - - - - - This appender requires a to be set. - - true - - - This appender requires a to be set. - - - - - - The enum of possible display attributes - - - - The following flags can be combined together to - form the ANSI color attributes. - - - - - - - text is bright - - - - - text is dim - - - - - text is underlined - - - - - text is blinking - - - Not all terminals support this attribute - - - - - text and background colors are reversed - - - - - text is hidden - - - - - text is displayed with a strikethrough - - - - - The enum of possible foreground or background color values for - use with the color mapping method - - - - The output can be in one for the following ANSI colors. - - - - - - - color is black - - - - - color is red - - - - - color is green - - - - - color is yellow - - - - - color is blue - - - - - color is magenta - - - - - color is cyan - - - - - color is white - - - - - A class to act as a mapping between the level that a logging call is made at and - the color it should be displayed as. - - - - Defines the mapping between a level and the color it should be displayed in. - - - - - - An entry in the - - - - This is an abstract base class for types that are stored in the - object. - - - Nicko Cadell - - - - Default protected constructor - - - - Default protected constructor - - - - - - Initialize any options defined on this entry - - - - Should be overridden by any classes that need to initialise based on their options - - - - - - The level that is the key for this mapping - - - The that is the key for this mapping - - - - Get or set the that is the key for this - mapping subclass. - - - - - - Initialize the options for the object - - - - Combine the and together - and append the attributes. - - - - - - The mapped foreground color for the specified level - - - - Required property. - The mapped foreground color for the specified level - - - - - - The mapped background color for the specified level - - - - Required property. - The mapped background color for the specified level - - - - - - The color attributes for the specified level - - - - Required property. - The color attributes for the specified level - - - - - - The combined , and - suitable for setting the ansi terminal color. - - - - - A strongly-typed collection of objects. - - Nicko Cadell - - - - Creates a read-only wrapper for a AppenderCollection instance. - - list to create a readonly wrapper arround - - An AppenderCollection wrapper that is read-only. - - - - - An empty readonly static AppenderCollection - - - - - Initializes a new instance of the AppenderCollection class - that is empty and has the default initial capacity. - - - - - Initializes a new instance of the AppenderCollection class - that has the specified initial capacity. - - - The number of elements that the new AppenderCollection is initially capable of storing. - - - - - Initializes a new instance of the AppenderCollection class - that contains elements copied from the specified AppenderCollection. - - The AppenderCollection whose elements are copied to the new collection. - - - - Initializes a new instance of the AppenderCollection class - that contains elements copied from the specified array. - - The array whose elements are copied to the new list. - - - - Initializes a new instance of the AppenderCollection class - that contains elements copied from the specified collection. - - The collection whose elements are copied to the new list. - - - - Allow subclasses to avoid our default constructors - - - - - - - Copies the entire AppenderCollection to a one-dimensional - array. - - The one-dimensional array to copy to. - - - - Copies the entire AppenderCollection to a one-dimensional - array, starting at the specified index of the target array. - - The one-dimensional array to copy to. - The zero-based index in at which copying begins. - - - - Adds a to the end of the AppenderCollection. - - The to be added to the end of the AppenderCollection. - The index at which the value has been added. - - - - Removes all elements from the AppenderCollection. - - - - - Creates a shallow copy of the . - - A new with a shallow copy of the collection data. - - - - Determines whether a given is in the AppenderCollection. - - The to check for. - true if is found in the AppenderCollection; otherwise, false. - - - - Returns the zero-based index of the first occurrence of a - in the AppenderCollection. - - The to locate in the AppenderCollection. - - The zero-based index of the first occurrence of - in the entire AppenderCollection, if found; otherwise, -1. - - - - - Inserts an element into the AppenderCollection at the specified index. - - The zero-based index at which should be inserted. - The to insert. - - is less than zero - -or- - is equal to or greater than . - - - - - Removes the first occurrence of a specific from the AppenderCollection. - - The to remove from the AppenderCollection. - - The specified was not found in the AppenderCollection. - - - - - Removes the element at the specified index of the AppenderCollection. - - The zero-based index of the element to remove. - - is less than zero - -or- - is equal to or greater than . - - - - - Returns an enumerator that can iterate through the AppenderCollection. - - An for the entire AppenderCollection. - - - - Adds the elements of another AppenderCollection to the current AppenderCollection. - - The AppenderCollection whose elements should be added to the end of the current AppenderCollection. - The new of the AppenderCollection. - - - - Adds the elements of a array to the current AppenderCollection. - - The array whose elements should be added to the end of the AppenderCollection. - The new of the AppenderCollection. - - - - Adds the elements of a collection to the current AppenderCollection. - - The collection whose elements should be added to the end of the AppenderCollection. - The new of the AppenderCollection. - - - - Sets the capacity to the actual number of elements. - - - - - Return the collection elements as an array - - the array - - - - is less than zero - -or- - is equal to or greater than . - - - - - is less than zero - -or- - is equal to or greater than . - - - - - Gets the number of elements actually contained in the AppenderCollection. - - - - - Gets a value indicating whether access to the collection is synchronized (thread-safe). - - true if access to the ICollection is synchronized (thread-safe); otherwise, false. - - - - Gets an object that can be used to synchronize access to the collection. - - - - - Gets or sets the at the specified index. - - The zero-based index of the element to get or set. - - is less than zero - -or- - is equal to or greater than . - - - - - Gets a value indicating whether the collection has a fixed size. - - true if the collection has a fixed size; otherwise, false. The default is false - - - - Gets a value indicating whether the IList is read-only. - - true if the collection is read-only; otherwise, false. The default is false - - - - Gets or sets the number of elements the AppenderCollection can contain. - - - - - Supports type-safe iteration over a . - - - - - - Advances the enumerator to the next element in the collection. - - - true if the enumerator was successfully advanced to the next element; - false if the enumerator has passed the end of the collection. - - - The collection was modified after the enumerator was created. - - - - - Sets the enumerator to its initial position, before the first element in the collection. - - - - - Gets the current element in the collection. - - - - - Type visible only to our subclasses - Used to access protected constructor - - - - - - A value - - - - - Supports simple iteration over a . - - - - - - Initializes a new instance of the Enumerator class. - - - - - - Advances the enumerator to the next element in the collection. - - - true if the enumerator was successfully advanced to the next element; - false if the enumerator has passed the end of the collection. - - - The collection was modified after the enumerator was created. - - - - - Sets the enumerator to its initial position, before the first element in the collection. - - - - - Gets the current element in the collection. - - - - - - - - - Appends log events to the ASP.NET system. - - - - - Diagnostic information and tracing messages that you specify are appended to the output - of the page that is sent to the requesting browser. Optionally, you can view this information - from a separate trace viewer (Trace.axd) that displays trace information for every page in a - given application. - - - Trace statements are processed and displayed only when tracing is enabled. You can control - whether tracing is displayed to a page, to the trace viewer, or both. - - - The logging event is passed to the or - method depending on the level of the logging event. - - - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the class. - - - - Default constructor. - - - - - - Write the logging event to the ASP.NET trace - - the event to log - - - Write the logging event to the ASP.NET trace - HttpContext.Current.Trace - (). - - - - - - This appender requires a to be set. - - true - - - This appender requires a to be set. - - - - - - Buffers events and then forwards them to attached appenders. - - - - The events are buffered in this appender until conditions are - met to allow the appender to deliver the events to the attached - appenders. See for the - conditions that cause the buffer to be sent. - - The forwarding appender can be used to specify different - thresholds and filters for the same appender at different locations - within the hierarchy. - - - Nicko Cadell - Gert Driesen - - - - Interface for attaching appenders to objects. - - - - Interface for attaching, removing and retrieving appenders. - - - Nicko Cadell - Gert Driesen - - - - Attaches an appender. - - The appender to add. - - - Add the specified appender. The implementation may - choose to allow or deny duplicate appenders. - - - - - - Gets an attached appender with the specified name. - - The name of the appender to get. - - The appender with the name specified, or null if no appender with the - specified name is found. - - - - Returns an attached appender with the specified. - If no appender with the specified name is found null will be - returned. - - - - - - Removes all attached appenders. - - - - Removes and closes all attached appenders - - - - - - Removes the specified appender from the list of attached appenders. - - The appender to remove. - The appender removed from the list - - - The appender removed is not closed. - If you are discarding the appender you must call - on the appender removed. - - - - - - Removes the appender with the specified name from the list of appenders. - - The name of the appender to remove. - The appender removed from the list - - - The appender removed is not closed. - If you are discarding the appender you must call - on the appender removed. - - - - - - Gets all attached appenders. - - - A collection of attached appenders. - - - - Gets a collection of attached appenders. - If there are no attached appenders the - implementation should return an empty - collection rather than null. - - - - - - Initializes a new instance of the class. - - - - Default constructor. - - - - - - Closes the appender and releases resources. - - - - Releases any resources allocated within the appender such as file handles, - network connections, etc. - - - It is a programming error to append to a closed appender. - - - - - - Send the events. - - The events that need to be send. - - - Forwards the events to the attached appenders. - - - - - - Adds an to the list of appenders of this - instance. - - The to add to this appender. - - - If the specified is already in the list of - appenders, then it won't be added again. - - - - - - Looks for the appender with the specified name. - - The name of the appender to lookup. - - The appender with the specified name, or null. - - - - Get the named appender attached to this buffering appender. - - - - - - Removes all previously added appenders from this appender. - - - - This is useful when re-reading configuration information. - - - - - - Removes the specified appender from the list of appenders. - - The appender to remove. - The appender removed from the list - - The appender removed is not closed. - If you are discarding the appender you must call - on the appender removed. - - - - - Removes the appender with the specified name from the list of appenders. - - The name of the appender to remove. - The appender removed from the list - - The appender removed is not closed. - If you are discarding the appender you must call - on the appender removed. - - - - - Implementation of the interface - - - - - Gets the appenders contained in this appender as an - . - - - If no appenders can be found, then an - is returned. - - - A collection of the appenders in this appender. - - - - - Appends logging events to the console. - - - - ColoredConsoleAppender appends log events to the standard output stream - or the error output stream using a layout specified by the - user. It also allows the color of a specific type of message to be set. - - - By default, all output is written to the console's standard output stream. - The property can be set to direct the output to the - error stream. - - - NOTE: This appender writes directly to the application's attached console - not to the System.Console.Out or System.Console.Error TextWriter. - The System.Console.Out and System.Console.Error streams can be - programmatically redirected (for example NUnit does this to capture program output). - This appender will ignore these redirections because it needs to use Win32 - API calls to colorize the output. To respect these redirections the - must be used. - - - When configuring the colored console appender, mapping should be - specified to map a logging level to a color. For example: - - - - - - - - - - - - - - The Level is the standard log4net logging level and ForeColor and BackColor can be any - combination of the following values: - - Blue - Green - Red - White - Yellow - Purple - Cyan - HighIntensity - - - - Rick Hobbs - Nicko Cadell - - - - The to use when writing to the Console - standard output stream. - - - - The to use when writing to the Console - standard output stream. - - - - - - The to use when writing to the Console - standard error output stream. - - - - The to use when writing to the Console - standard error output stream. - - - - - - Initializes a new instance of the class. - - - The instance of the class is set up to write - to the standard output stream. - - - - - Initializes a new instance of the class - with the specified layout. - - the layout to use for this appender - - The instance of the class is set up to write - to the standard output stream. - - - - - Initializes a new instance of the class - with the specified layout. - - the layout to use for this appender - flag set to true to write to the console error stream - - When is set to true, output is written to - the standard error output stream. Otherwise, output is written to the standard - output stream. - - - - - Add a mapping of level to color - done by the config file - - The mapping to add - - - Add a mapping to this appender. - Each mapping defines the foreground and background colors - for a level. - - - - - - This method is called by the method. - - The event to log. - - - Writes the event to the console. - - - The format of the output will depend on the appender's layout. - - - - - - Initialize the options for this appender - - - - Initialize the level to color mappings set on this appender. - - - - - - Flag to write output to the error stream rather than the standard output stream - - - - - Mapping from level object to color value - - - - - The console output stream writer to write to - - - - This writer is not thread safe. - - - - - - Target is the value of the console output stream. - This is either "Console.Out" or "Console.Error". - - - Target is the value of the console output stream. - This is either "Console.Out" or "Console.Error". - - - - Target is the value of the console output stream. - This is either "Console.Out" or "Console.Error". - - - - - - This appender requires a to be set. - - true - - - This appender requires a to be set. - - - - - - The enum of possible color values for use with the color mapping method - - - - The following flags can be combined together to - form the colors. - - - - - - - color is blue - - - - - color is green - - - - - color is red - - - - - color is white - - - - - color is yellow - - - - - color is purple - - - - - color is cyan - - - - - color is intensified - - - - - A class to act as a mapping between the level that a logging call is made at and - the color it should be displayed as. - - - - Defines the mapping between a level and the color it should be displayed in. - - - - - - Initialize the options for the object - - - - Combine the and together. - - - - - - The mapped foreground color for the specified level - - - - Required property. - The mapped foreground color for the specified level. - - - - - - The mapped background color for the specified level - - - - Required property. - The mapped background color for the specified level. - - - - - - The combined and suitable for - setting the console color. - - - - - Appends logging events to the console. - - - - ConsoleAppender appends log events to the standard output stream - or the error output stream using a layout specified by the - user. - - - By default, all output is written to the console's standard output stream. - The property can be set to direct the output to the - error stream. - - - NOTE: This appender writes each message to the System.Console.Out or - System.Console.Error that is set at the time the event is appended. - Therefore it is possible to programmatically redirect the output of this appender - (for example NUnit does this to capture program output). While this is the desired - behavior of this appender it may have security implications in your application. - - - Nicko Cadell - Gert Driesen - - - - The to use when writing to the Console - standard output stream. - - - - The to use when writing to the Console - standard output stream. - - - - - - The to use when writing to the Console - standard error output stream. - - - - The to use when writing to the Console - standard error output stream. - - - - - - Initializes a new instance of the class. - - - The instance of the class is set up to write - to the standard output stream. - - - - - Initializes a new instance of the class - with the specified layout. - - the layout to use for this appender - - The instance of the class is set up to write - to the standard output stream. - - - - - Initializes a new instance of the class - with the specified layout. - - the layout to use for this appender - flag set to true to write to the console error stream - - When is set to true, output is written to - the standard error output stream. Otherwise, output is written to the standard - output stream. - - - - - This method is called by the method. - - The event to log. - - - Writes the event to the console. - - - The format of the output will depend on the appender's layout. - - - - - - Target is the value of the console output stream. - This is either "Console.Out" or "Console.Error". - - - Target is the value of the console output stream. - This is either "Console.Out" or "Console.Error". - - - - Target is the value of the console output stream. - This is either "Console.Out" or "Console.Error". - - - - - - This appender requires a to be set. - - true - - - This appender requires a to be set. - - - - - - Appends log events to the system. - - - - The application configuration file can be used to control what listeners - are actually used. See the MSDN documentation for the - class for details on configuring the - debug system. - - - Events are written using the - method. The event's logger name is passed as the value for the category name to the Write method. - - - Nicko Cadell - - - - Initializes a new instance of the . - - - - Default constructor. - - - - - - Initializes a new instance of the - with a specified layout. - - The layout to use with this appender. - - - Obsolete constructor. - - - - - - Writes the logging event to the system. - - The event to log. - - - Writes the logging event to the system. - If is true then the - is called. - - - - - - Immediate flush means that the underlying writer or output stream - will be flushed at the end of each append operation. - - - - Immediate flush is slower but ensures that each append request is - actually written. If is set to - false, then there is a good chance that the last few - logs events are not actually written to persistent media if and - when the application crashes. - - - The default value is true. - - - - - Gets or sets a value that indicates whether the appender will - flush at the end of each write. - - - The default behavior is to flush at the end of each - write. If the option is set tofalse, then the underlying - stream can defer writing to physical medium to a later time. - - - Avoiding the flush operation at the end of each append results - in a performance gain of 10 to 20 percent. However, there is safety - trade-off involved in skipping flushing. Indeed, when flushing is - skipped, then it is likely that the last few log events will not - be recorded on disk when the application exits. This is a high - price to pay even for a 20% performance gain. - - - - - - This appender requires a to be set. - - true - - - This appender requires a to be set. - - - - - - Writes events to the system event log. - - - - The EventID of the event log entry can be - set using the EventLogEventID property () - on the . - - - There is a limit of 32K characters for an event log message - - - When configuring the EventLogAppender a mapping can be - specified to map a logging level to an event log entry type. For example: - - - <mapping> - <level value="ERROR" /> - <eventLogEntryType value="Error" /> - </mapping> - <mapping> - <level value="DEBUG" /> - <eventLogEntryType value="Information" /> - </mapping> - - - The Level is the standard log4net logging level and eventLogEntryType can be any value - from the enum, i.e.: - - Erroran error event - Warninga warning event - Informationan informational event - - - - Aspi Havewala - Douglas de la Torre - Nicko Cadell - Gert Driesen - Thomas Voss - - - - Initializes a new instance of the class. - - - - Default constructor. - - - - - - Initializes a new instance of the class - with the specified . - - The to use with this appender. - - - Obsolete constructor. - - - - - - Add a mapping of level to - done by the config file - - The mapping to add - - - Add a mapping to this appender. - Each mapping defines the event log entry type for a level. - - - - - - Initialize the appender based on the options set - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - - - - Create an event log source - - - Uses different API calls under NET_2_0 - - - - - This method is called by the - method. - - the event to log - - Writes the event to the system event log using the - . - - If the event has an EventID property (see ) - set then this integer will be used as the event log event id. - - - There is a limit of 32K characters for an event log message - - - - - - Get the equivalent for a - - the Level to convert to an EventLogEntryType - The equivalent for a - - Because there are fewer applicable - values to use in logging levels than there are in the - this is a one way mapping. There is - a loss of information during the conversion. - - - - - The log name is the section in the event logs where the messages - are stored. - - - - - Name of the application to use when logging. This appears in the - application column of the event log named by . - - - - - The name of the machine which holds the event log. This is - currently only allowed to be '.' i.e. the current machine. - - - - - Mapping from level object to EventLogEntryType - - - - - The security context to use for privileged calls - - - - - The name of the log where messages will be stored. - - - The string name of the log where messages will be stored. - - - This is the name of the log as it appears in the Event Viewer - tree. The default value is to log into the Application - log, this is where most applications write their events. However - if you need a separate log for your application (or applications) - then you should set the appropriately. - This should not be used to distinguish your event log messages - from those of other applications, the - property should be used to distinguish events. This property should be - used to group together events into a single log. - - - - - - Property used to set the Application name. This appears in the - event logs when logging. - - - The string used to distinguish events from different sources. - - - Sets the event log source property. - - - - - This property is used to return the name of the computer to use - when accessing the event logs. Currently, this is the current - computer, denoted by a dot "." - - - The string name of the machine holding the event log that - will be logged into. - - - This property cannot be changed. It is currently set to '.' - i.e. the local machine. This may be changed in future. - - - - - Gets or sets the used to write to the EventLog. - - - The used to write to the EventLog. - - - - The system security context used to write to the EventLog. - - - Unless a specified here for this appender - the is queried for the - security context to use. The default behavior is to use the security context - of the current thread. - - - - - - This appender requires a to be set. - - true - - - This appender requires a to be set. - - - - - - A class to act as a mapping between the level that a logging call is made at and - the color it should be displayed as. - - - - Defines the mapping between a level and its event log entry type. - - - - - - The for this entry - - - - Required property. - The for this entry - - - - - - Appends logging events to a file. - - - - Logging events are sent to the file specified by - the property. - - - The file can be opened in either append or overwrite mode - by specifying the property. - If the file path is relative it is taken as relative from - the application base directory. The file encoding can be - specified by setting the property. - - - The layout's and - values will be written each time the file is opened and closed - respectively. If the property is - then the file may contain multiple copies of the header and footer. - - - This appender will first try to open the file for writing when - is called. This will typically be during configuration. - If the file cannot be opened for writing the appender will attempt - to open the file again each time a message is logged to the appender. - If the file cannot be opened for writing when a message is logged then - the message will be discarded by this appender. - - - The supports pluggable file locking models via - the property. - The default behavior, implemented by - is to obtain an exclusive write lock on the file until this appender is closed. - The alternative model, , only holds a - write lock while the appender is writing a logging event. - - - Nicko Cadell - Gert Driesen - Rodrigo B. de Oliveira - Douglas de la Torre - Niall Daley - - - - Sends logging events to a . - - - - An Appender that writes to a . - - - This appender may be used stand alone if initialized with an appropriate - writer, however it is typically used as a base class for an appender that - can open a to write to. - - - Nicko Cadell - Gert Driesen - Douglas de la Torre - - - - Initializes a new instance of the class. - - - - Default constructor. - - - - - - Initializes a new instance of the class and - sets the output destination to a new initialized - with the specified . - - The layout to use with this appender. - The to output to. - - - Obsolete constructor. - - - - - - Initializes a new instance of the class and sets - the output destination to the specified . - - The layout to use with this appender - The to output to - - The must have been previously opened. - - - - Obsolete constructor. - - - - - - This method determines if there is a sense in attempting to append. - - - - This method checked if an output target has been set and if a - layout has been set. - - - false if any of the preconditions fail. - - - - This method is called by the - method. - - The event to log. - - - Writes a log statement to the output stream if the output stream exists - and is writable. - - - The format of the output will depend on the appender's layout. - - - - - - This method is called by the - method. - - The array of events to log. - - - This method writes all the bulk logged events to the output writer - before flushing the stream. - - - - - - Close this appender instance. The underlying stream or writer is also closed. - - - Closed appenders cannot be reused. - - - - - Writes the footer and closes the underlying . - - - - Writes the footer and closes the underlying . - - - - - - Closes the underlying . - - - - Closes the underlying . - - - - - - Clears internal references to the underlying - and other variables. - - - - Subclasses can override this method for an alternate closing behavior. - - - - - - Writes a footer as produced by the embedded layout's property. - - - - Writes a footer as produced by the embedded layout's property. - - - - - - Writes a header produced by the embedded layout's property. - - - - Writes a header produced by the embedded layout's property. - - - - - - Called to allow a subclass to lazily initialize the writer - - - - This method is called when an event is logged and the or - have not been set. This allows a subclass to - attempt to initialize the writer multiple times. - - - - - - This is the where logging events - will be written to. - - - - - Immediate flush means that the underlying - or output stream will be flushed at the end of each append operation. - - - - Immediate flush is slower but ensures that each append request is - actually written. If is set to - false, then there is a good chance that the last few - logging events are not actually persisted if and when the application - crashes. - - - The default value is true. - - - - - - Gets or set whether the appender will flush at the end - of each append operation. - - - - The default behavior is to flush at the end of each - append operation. - - - If this option is set to false, then the underlying - stream can defer persisting the logging event to a later - time. - - - - Avoiding the flush operation at the end of each append results in - a performance gain of 10 to 20 percent. However, there is safety - trade-off involved in skipping flushing. Indeed, when flushing is - skipped, then it is likely that the last few log events will not - be recorded on disk when the application exits. This is a high - price to pay even for a 20% performance gain. - - - - - Sets the where the log output will go. - - - - The specified must be open and writable. - - - The will be closed when the appender - instance is closed. - - - Note: Logging to an unopened will fail. - - - - - - Gets or set the and the underlying - , if any, for this appender. - - - The for this appender. - - - - - This appender requires a to be set. - - true - - - This appender requires a to be set. - - - - - - Gets or sets the where logging events - will be written to. - - - The where logging events are written. - - - - This is the where logging events - will be written to. - - - - - - Default constructor - - - - Default constructor - - - - - - Construct a new appender using the layout, file and append mode. - - the layout to use with this appender - the full path to the file to write to - flag to indicate if the file should be appended to - - - Obsolete constructor. - - - - - - Construct a new appender using the layout and file specified. - The file will be appended to. - - the layout to use with this appender - the full path to the file to write to - - - Obsolete constructor. - - - - - - Activate the options on the file appender. - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - This will cause the file to be opened. - - - - - - Closes any previously opened file and calls the parent's . - - - - Resets the filename and the file stream. - - - - - - Called to initialize the file writer - - - - Will be called for each logged message until the file is - successfully opened. - - - - - - This method is called by the - method. - - The event to log. - - - Writes a log statement to the output stream if the output stream exists - and is writable. - - - The format of the output will depend on the appender's layout. - - - - - - This method is called by the - method. - - The array of events to log. - - - Acquires the output file locks once before writing all the events to - the stream. - - - - - - Writes a footer as produced by the embedded layout's property. - - - - Writes a footer as produced by the embedded layout's property. - - - - - - Writes a header produced by the embedded layout's property. - - - - Writes a header produced by the embedded layout's property. - - - - - - Closes the underlying . - - - - Closes the underlying . - - - - - - Closes the previously opened file. - - - - Writes the to the file and then - closes the file. - - - - - - Sets and opens the file where the log output will go. The specified file must be writable. - - The path to the log file. Must be a fully qualified path. - If true will append to fileName. Otherwise will truncate fileName - - - Calls but guarantees not to throw an exception. - Errors are passed to the . - - - - - - Sets and opens the file where the log output will go. The specified file must be writable. - - The path to the log file. Must be a fully qualified path. - If true will append to fileName. Otherwise will truncate fileName - - - If there was already an opened file, then the previous file - is closed first. - - - This method will ensure that the directory structure - for the specified exists. - - - - - - Sets the quiet writer used for file output - - the file stream that has been opened for writing - - - This implementation of creates a - over the and passes it to the - method. - - - This method can be overridden by sub classes that want to wrap the - in some way, for example to encrypt the output - data using a System.Security.Cryptography.CryptoStream. - - - - - - Sets the quiet writer being used. - - the writer over the file stream that has been opened for writing - - - This method can be overridden by sub classes that want to - wrap the in some way. - - - - - - Convert a path into a fully qualified path. - - The path to convert. - The fully qualified path. - - - Converts the path specified to a fully - qualified path. If the path is relative it is - taken as relative from the application base - directory. - - - - - - Flag to indicate if we should append to the file - or overwrite the file. The default is to append. - - - - - The name of the log file. - - - - - The encoding to use for the file stream. - - - - - The security context to use for privileged calls - - - - - The stream to log to. Has added locking semantics - - - - - The locking model to use - - - - - Gets or sets the path to the file that logging will be written to. - - - The path to the file that logging will be written to. - - - - If the path is relative it is taken as relative from - the application base directory. - - - - - - Gets or sets a flag that indicates whether the file should be - appended to or overwritten. - - - Indicates whether the file should be appended to or overwritten. - - - - If the value is set to false then the file will be overwritten, if - it is set to true then the file will be appended to. - - The default value is true. - - - - - Gets or sets used to write to the file. - - - The used to write to the file. - - - - The default encoding set is - which is the encoding for the system's current ANSI code page. - - - - - - Gets or sets the used to write to the file. - - - The used to write to the file. - - - - Unless a specified here for this appender - the is queried for the - security context to use. The default behavior is to use the security context - of the current thread. - - - - - - Gets or sets the used to handle locking of the file. - - - The used to lock the file. - - - - Gets or sets the used to handle locking of the file. - - - There are two built in locking models, and . - The former locks the file from the start of logging to the end and the - later lock only for the minimal amount of time when logging each message. - - - The default locking model is the . - - - - - - Write only that uses the - to manage access to an underlying resource. - - - - - True asynchronous writes are not supported, the implementation forces a synchronous write. - - - - - Exception base type for log4net. - - - - This type extends . It - does not add any new functionality but does differentiate the - type of exception being thrown. - - - Nicko Cadell - Gert Driesen - - - - Constructor - - - - Initializes a new instance of the class. - - - - - - Constructor - - A message to include with the exception. - - - Initializes a new instance of the class with - the specified message. - - - - - - Constructor - - A message to include with the exception. - A nested exception to include. - - - Initializes a new instance of the class - with the specified message and inner exception. - - - - - - Serialization constructor - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - - - Initializes a new instance of the class - with serialized data. - - - - - - Locking model base class - - - - Base class for the locking models available to the derived loggers. - - - - - - Open the output file - - The filename to use - Whether to append to the file, or overwrite - The encoding to use - - - Open the file specified and prepare for logging. - No writes will be made until is called. - Must be called before any calls to , - and . - - - - - - Close the file - - - - Close the file. No further writes will be made. - - - - - - Acquire the lock on the file - - A stream that is ready to be written to. - - - Acquire the lock on the file in preparation for writing to it. - Return a stream pointing to the file. - must be called to release the lock on the output file. - - - - - - Release the lock on the file - - - - Release the lock on the file. No further writes will be made to the - stream until is called again. - - - - - - Gets or sets the for this LockingModel - - - The for this LockingModel - - - - The file appender this locking model is attached to and working on - behalf of. - - - The file appender is used to locate the security context and the error handler to use. - - - The value of this property will be set before is - called. - - - - - - Hold an exclusive lock on the output file - - - - Open the file once for writing and hold it open until is called. - Maintains an exclusive lock on the file during this time. - - - - - - Open the file specified and prepare for logging. - - The filename to use - Whether to append to the file, or overwrite - The encoding to use - - - Open the file specified and prepare for logging. - No writes will be made until is called. - Must be called before any calls to , - and . - - - - - - Close the file - - - - Close the file. No further writes will be made. - - - - - - Acquire the lock on the file - - A stream that is ready to be written to. - - - Does nothing. The lock is already taken - - - - - - Release the lock on the file - - - - Does nothing. The lock will be released when the file is closed. - - - - - - Acquires the file lock for each write - - - - Opens the file once for each / cycle, - thus holding the lock for the minimal amount of time. This method of locking - is considerably slower than but allows - other processes to move/delete the log file whilst logging continues. - - - - - - Prepares to open the file when the first message is logged. - - The filename to use - Whether to append to the file, or overwrite - The encoding to use - - - Open the file specified and prepare for logging. - No writes will be made until is called. - Must be called before any calls to , - and . - - - - - - Close the file - - - - Close the file. No further writes will be made. - - - - - - Acquire the lock on the file - - A stream that is ready to be written to. - - - Acquire the lock on the file in preparation for writing to it. - Return a stream pointing to the file. - must be called to release the lock on the output file. - - - - - - Release the lock on the file - - - - Release the lock on the file. No further writes will be made to the - stream until is called again. - - - - - - This appender forwards logging events to attached appenders. - - - - The forwarding appender can be used to specify different thresholds - and filters for the same appender at different locations within the hierarchy. - - - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the class. - - - - Default constructor. - - - - - - Closes the appender and releases resources. - - - - Releases any resources allocated within the appender such as file handles, - network connections, etc. - - - It is a programming error to append to a closed appender. - - - - - - Forward the logging event to the attached appenders - - The event to log. - - - Delivers the logging event to all the attached appenders. - - - - - - Forward the logging events to the attached appenders - - The array of events to log. - - - Delivers the logging events to all the attached appenders. - - - - - - Adds an to the list of appenders of this - instance. - - The to add to this appender. - - - If the specified is already in the list of - appenders, then it won't be added again. - - - - - - Looks for the appender with the specified name. - - The name of the appender to lookup. - - The appender with the specified name, or null. - - - - Get the named appender attached to this appender. - - - - - - Removes all previously added appenders from this appender. - - - - This is useful when re-reading configuration information. - - - - - - Removes the specified appender from the list of appenders. - - The appender to remove. - The appender removed from the list - - The appender removed is not closed. - If you are discarding the appender you must call - on the appender removed. - - - - - Removes the appender with the specified name from the list of appenders. - - The name of the appender to remove. - The appender removed from the list - - The appender removed is not closed. - If you are discarding the appender you must call - on the appender removed. - - - - - Implementation of the interface - - - - - Gets the appenders contained in this appender as an - . - - - If no appenders can be found, then an - is returned. - - - A collection of the appenders in this appender. - - - - - Logs events to a local syslog service. - - - - This appender uses the POSIX libc library functions openlog, syslog, and closelog. - If these functions are not available on the local system then this appender will not work! - - - The functions openlog, syslog, and closelog are specified in SUSv2 and - POSIX 1003.1-2001 standards. These are used to log messages to the local syslog service. - - - This appender talks to a local syslog service. If you need to log to a remote syslog - daemon and you cannot configure your local syslog service to do this you may be - able to use the to log via UDP. - - - Syslog messages must have a facility and and a severity. The severity - is derived from the Level of the logging event. - The facility must be chosen from the set of defined syslog - values. The facilities list is predefined - and cannot be extended. - - - An identifier is specified with each log message. This can be specified - by setting the property. The identity (also know - as the tag) must not contain white space. The default value for the - identity is the application name (from ). - - - Rob Lyon - Nicko Cadell - - - - Initializes a new instance of the class. - - - This instance of the class is set up to write - to a local syslog service. - - - - - Add a mapping of level to severity - - The mapping to add - - - Adds a to this appender. - - - - - - Initialize the appender based on the options set. - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - - - - This method is called by the method. - - The event to log. - - - Writes the event to a remote syslog daemon. - - - The format of the output will depend on the appender's layout. - - - - - - Close the syslog when the appender is closed - - - - Close the syslog when the appender is closed - - - - - - Translates a log4net level to a syslog severity. - - A log4net level. - A syslog severity. - - - Translates a log4net level to a syslog severity. - - - - - - Generate a syslog priority. - - The syslog facility. - The syslog severity. - A syslog priority. - - - - The facility. The default facility is . - - - - - The message identity - - - - - Marshaled handle to the identity string. We have to hold on to the - string as the openlog and syslog APIs just hold the - pointer to the ident and dereference it for each log message. - - - - - Mapping from level object to syslog severity - - - - - Open connection to system logger. - - - - - Generate a log message. - - - - The libc syslog method takes a format string and a variable argument list similar - to the classic printf function. As this type of vararg list is not supported - by C# we need to specify the arguments explicitly. Here we have specified the - format string with a single message argument. The caller must set the format - string to "%s". - - - - - - Close descriptor used to write to system logger. - - - - - Message identity - - - - An identifier is specified with each log message. This can be specified - by setting the property. The identity (also know - as the tag) must not contain white space. The default value for the - identity is the application name (from ). - - - - - - Syslog facility - - - Set to one of the values. The list of - facilities is predefined and cannot be extended. The default value - is . - - - - - This appender requires a to be set. - - true - - - This appender requires a to be set. - - - - - - syslog severities - - - - The log4net Level maps to a syslog severity using the - method and the - class. The severity is set on . - - - - - - system is unusable - - - - - action must be taken immediately - - - - - critical conditions - - - - - error conditions - - - - - warning conditions - - - - - normal but significant condition - - - - - informational - - - - - debug-level messages - - - - - syslog facilities - - - - The syslog facility defines which subsystem the logging comes from. - This is set on the property. - - - - - - kernel messages - - - - - random user-level messages - - - - - mail system - - - - - system daemons - - - - - security/authorization messages - - - - - messages generated internally by syslogd - - - - - line printer subsystem - - - - - network news subsystem - - - - - UUCP subsystem - - - - - clock (cron/at) daemon - - - - - security/authorization messages (private) - - - - - ftp daemon - - - - - NTP subsystem - - - - - log audit - - - - - log alert - - - - - clock daemon - - - - - reserved for local use - - - - - reserved for local use - - - - - reserved for local use - - - - - reserved for local use - - - - - reserved for local use - - - - - reserved for local use - - - - - reserved for local use - - - - - reserved for local use - - - - - A class to act as a mapping between the level that a logging call is made at and - the syslog severity that is should be logged at. - - - - A class to act as a mapping between the level that a logging call is made at and - the syslog severity that is should be logged at. - - - - - - The mapped syslog severity for the specified level - - - - Required property. - The mapped syslog severity for the specified level - - - - - - Stores logging events in an array. - - - - The memory appender stores all the logging events - that are appended in an in-memory array. - - - Use the method to get - the current list of events that have been appended. - - - Use the method to clear the - current list of events. - - - Julian Biddle - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the class. - - - - Default constructor. - - - - - - Gets the events that have been logged. - - The events that have been logged - - - Gets the events that have been logged. - - - - - - This method is called by the method. - - the event to log - - Stores the in the events list. - - - - - Clear the list of events - - - Clear the list of events - - - - - The list of events that have been appended. - - - - - Value indicating which fields in the event should be fixed - - - By default all fields are fixed - - - - - Gets or sets a value indicating whether only part of the logging event - data should be fixed. - - - true if the appender should only fix part of the logging event - data, otherwise false. The default is false. - - - - Setting this property to true will cause only part of the event - data to be fixed and stored in the appender, hereby improving performance. - - - See for more information. - - - - - - Gets or sets the fields that will be fixed in the event - - - - The logging event needs to have certain thread specific values - captured before it can be buffered. See - for details. - - - - - - Logs entries by sending network messages using the - native function. - - - - You can send messages only to names that are active - on the network. If you send the message to a user name, - that user must be logged on and running the Messenger - service to receive the message. - - - The receiver will get a top most window displaying the - messages one at a time, therefore this appender should - not be used to deliver a high volume of messages. - - - The following table lists some possible uses for this appender : - - - - - Action - Property Value(s) - - - Send a message to a user account on the local machine - - - = <name of the local machine> - - - = <user name> - - - - - Send a message to a user account on a remote machine - - - = <name of the remote machine> - - - = <user name> - - - - - Send a message to a domain user account - - - = <name of a domain controller | uninitialized> - - - = <user name> - - - - - Send a message to all the names in a workgroup or domain - - - = <workgroup name | domain name>* - - - - - Send a message from the local machine to a remote machine - - - = <name of the local machine | uninitialized> - - - = <name of the remote machine> - - - - - - - Note : security restrictions apply for sending - network messages, see - for more information. - - - - - An example configuration section to log information - using this appender from the local machine, named - LOCAL_PC, to machine OPERATOR_PC : - - - - - - - - - - Nicko Cadell - Gert Driesen - - - - The DNS or NetBIOS name of the server on which the function is to execute. - - - - - The sender of the network message. - - - - - The message alias to which the message should be sent. - - - - - The security context to use for privileged calls - - - - - Initializes the appender. - - - The default constructor initializes all fields to their default values. - - - - - Initialize the appender based on the options set. - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - The appender will be ignored if no was specified. - - - The required property was not specified. - - - - This method is called by the method. - - The event to log. - - - Sends the event using a network message. - - - - - - Sends a buffer of information to a registered message alias. - - The DNS or NetBIOS name of the server on which the function is to execute. - The message alias to which the message buffer should be sent - The originator of the message. - The message text. - The length, in bytes, of the message text. - - - The following restrictions apply for sending network messages: - - - - - Platform - Requirements - - - Windows NT - - - No special group membership is required to send a network message. - - - Admin, Accounts, Print, or Server Operator group membership is required to - successfully send a network message on a remote server. - - - - - Windows 2000 or later - - - If you send a message on a domain controller that is running Active Directory, - access is allowed or denied based on the access control list (ACL) for the securable - object. The default ACL permits only Domain Admins and Account Operators to send a network message. - - - On a member server or workstation, only Administrators and Server Operators can send a network message. - - - - - - - For more information see Security Requirements for the Network Management Functions. - - - - - If the function succeeds, the return value is zero. - - - - - - Gets or sets the sender of the message. - - - The sender of the message. - - - If this property is not specified, the message is sent from the local computer. - - - - - Gets or sets the message alias to which the message should be sent. - - - The recipient of the message. - - - This property should always be specified in order to send a message. - - - - - Gets or sets the DNS or NetBIOS name of the remote server on which the function is to execute. - - - DNS or NetBIOS name of the remote server on which the function is to execute. - - - - For Windows NT 4.0 and earlier, the string should begin with \\. - - - If this property is not specified, the local computer is used. - - - - - - Gets or sets the used to call the NetSend method. - - - The used to call the NetSend method. - - - - Unless a specified here for this appender - the is queried for the - security context to use. The default behavior is to use the security context - of the current thread. - - - - - - This appender requires a to be set. - - true - - - This appender requires a to be set. - - - - - - Appends log events to the OutputDebugString system. - - - - OutputDebugStringAppender appends log events to the - OutputDebugString system. - - - The string is passed to the native OutputDebugString - function. - - - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the class. - - - - Default constructor. - - - - - - Write the logging event to the output debug string API - - the event to log - - - Write the logging event to the output debug string API - - - - - - Stub for OutputDebugString native method - - the string to output - - - Stub for OutputDebugString native method - - - - - - This appender requires a to be set. - - true - - - This appender requires a to be set. - - - - - - Logs events to a remote syslog daemon. - - - - The BSD syslog protocol is used to remotely log to - a syslog daemon. The syslogd listens for for messages - on UDP port 514. - - - The syslog UDP protocol is not authenticated. Most syslog daemons - do not accept remote log messages because of the security implications. - You may be able to use the LocalSyslogAppender to talk to a local - syslog service. - - - There is an RFC 3164 that claims to document the BSD Syslog Protocol. - This RFC can be seen here: http://www.faqs.org/rfcs/rfc3164.html. - This appender generates what the RFC calls an "Original Device Message", - i.e. does not include the TIMESTAMP or HOSTNAME fields. By observation - this format of message will be accepted by all current syslog daemon - implementations. The daemon will attach the current time and the source - hostname or IP address to any messages received. - - - Syslog messages must have a facility and and a severity. The severity - is derived from the Level of the logging event. - The facility must be chosen from the set of defined syslog - values. The facilities list is predefined - and cannot be extended. - - - An identifier is specified with each log message. This can be specified - by setting the property. The identity (also know - as the tag) must not contain white space. The default value for the - identity is the application name (from ). - - - Rob Lyon - Nicko Cadell - - - - Sends logging events as connectionless UDP datagrams to a remote host or a - multicast group using an . - - - - UDP guarantees neither that messages arrive, nor that they arrive in the correct order. - - - To view the logging results, a custom application can be developed that listens for logging - events. - - - When decoding events send via this appender remember to use the same encoding - to decode the events as was used to send the events. See the - property to specify the encoding to use. - - - - This example shows how to log receive logging events that are sent - on IP address 244.0.0.1 and port 8080 to the console. The event is - encoded in the packet as a unicode string and it is decoded as such. - - IPEndPoint remoteEndPoint = new IPEndPoint(IPAddress.Any, 0); - UdpClient udpClient; - byte[] buffer; - string loggingEvent; - - try - { - udpClient = new UdpClient(8080); - - while(true) - { - buffer = udpClient.Receive(ref remoteEndPoint); - loggingEvent = System.Text.Encoding.Unicode.GetString(buffer); - Console.WriteLine(loggingEvent); - } - } - catch(Exception e) - { - Console.WriteLine(e.ToString()); - } - - - Dim remoteEndPoint as IPEndPoint - Dim udpClient as UdpClient - Dim buffer as Byte() - Dim loggingEvent as String - - Try - remoteEndPoint = new IPEndPoint(IPAddress.Any, 0) - udpClient = new UdpClient(8080) - - While True - buffer = udpClient.Receive(ByRef remoteEndPoint) - loggingEvent = System.Text.Encoding.Unicode.GetString(buffer) - Console.WriteLine(loggingEvent) - Wend - Catch e As Exception - Console.WriteLine(e.ToString()) - End Try - - - An example configuration section to log information using this appender to the - IP 224.0.0.1 on port 8080: - - - - - - - - - - Gert Driesen - Nicko Cadell - - - - Initializes a new instance of the class. - - - The default constructor initializes all fields to their default values. - - - - - Initialize the appender based on the options set. - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - The appender will be ignored if no was specified or - an invalid remote or local TCP port number was specified. - - - The required property was not specified. - The TCP port number assigned to or is less than or greater than . - - - - This method is called by the method. - - The event to log. - - - Sends the event using an UDP datagram. - - - Exceptions are passed to the . - - - - - - Closes the UDP connection and releases all resources associated with - this instance. - - - - Disables the underlying and releases all managed - and unmanaged resources associated with the . - - - - - - Initializes the underlying connection. - - - - The underlying is initialized and binds to the - port number from which you intend to communicate. - - - Exceptions are passed to the . - - - - - - The IP address of the remote host or multicast group to which - the logging event will be sent. - - - - - The TCP port number of the remote host or multicast group to - which the logging event will be sent. - - - - - The cached remote endpoint to which the logging events will be sent. - - - - - The TCP port number from which the will communicate. - - - - - The instance that will be used for sending the - logging events. - - - - - The encoding to use for the packet. - - - - - Gets or sets the IP address of the remote host or multicast group to which - the underlying should sent the logging event. - - - The IP address of the remote host or multicast group to which the logging event - will be sent. - - - - Multicast addresses are identified by IP class D addresses (in the range 224.0.0.0 to - 239.255.255.255). Multicast packets can pass across different networks through routers, so - it is possible to use multicasts in an Internet scenario as long as your network provider - supports multicasting. - - - Hosts that want to receive particular multicast messages must register their interest by joining - the multicast group. Multicast messages are not sent to networks where no host has joined - the multicast group. Class D IP addresses are used for multicast groups, to differentiate - them from normal host addresses, allowing nodes to easily detect if a message is of interest. - - - Static multicast addresses that are needed globally are assigned by IANA. A few examples are listed in the table below: - - - - - IP Address - Description - - - 224.0.0.1 - - - Sends a message to all system on the subnet. - - - - - 224.0.0.2 - - - Sends a message to all routers on the subnet. - - - - - 224.0.0.12 - - - The DHCP server answers messages on the IP address 224.0.0.12, but only on a subnet. - - - - - - - A complete list of actually reserved multicast addresses and their owners in the ranges - defined by RFC 3171 can be found at the IANA web site. - - - The address range 239.0.0.0 to 239.255.255.255 is reserved for administrative scope-relative - addresses. These addresses can be reused with other local groups. Routers are typically - configured with filters to prevent multicast traffic in this range from flowing outside - of the local network. - - - - - - Gets or sets the TCP port number of the remote host or multicast group to which - the underlying should sent the logging event. - - - An integer value in the range to - indicating the TCP port number of the remote host or multicast group to which the logging event - will be sent. - - - The underlying will send messages to this TCP port number - on the remote host or multicast group. - - The value specified is less than or greater than . - - - - Gets or sets the TCP port number from which the underlying will communicate. - - - An integer value in the range to - indicating the TCP port number from which the underlying will communicate. - - - - The underlying will bind to this port for sending messages. - - - Setting the value to 0 (the default) will cause the udp client not to bind to - a local port. - - - The value specified is less than or greater than . - - - - Gets or sets used to write the packets. - - - The used to write the packets. - - - - The used to write the packets. - - - - - - Gets or sets the underlying . - - - The underlying . - - - creates a to send logging events - over a network. Classes deriving from can use this - property to get or set this . Use the underlying - returned from if you require access beyond that which - provides. - - - - - Gets or sets the cached remote endpoint to which the logging events should be sent. - - - The cached remote endpoint to which the logging events will be sent. - - - The method will initialize the remote endpoint - with the values of the and - properties. - - - - - This appender requires a to be set. - - true - - - This appender requires a to be set. - - - - - - Syslog port 514 - - - - - Initializes a new instance of the class. - - - This instance of the class is set up to write - to a remote syslog daemon. - - - - - Add a mapping of level to severity - - The mapping to add - - - Add a mapping to this appender. - - - - - - This method is called by the method. - - The event to log. - - - Writes the event to a remote syslog daemon. - - - The format of the output will depend on the appender's layout. - - - - - - Initialize the options for this appender - - - - Initialize the level to syslog severity mappings set on this appender. - - - - - - Translates a log4net level to a syslog severity. - - A log4net level. - A syslog severity. - - - Translates a log4net level to a syslog severity. - - - - - - Generate a syslog priority. - - The syslog facility. - The syslog severity. - A syslog priority. - - - Generate a syslog priority. - - - - - - The facility. The default facility is . - - - - - The message identity - - - - - Mapping from level object to syslog severity - - - - - Message identity - - - - An identifier is specified with each log message. This can be specified - by setting the property. The identity (also know - as the tag) must not contain white space. The default value for the - identity is the application name (from ). - - - - - - Syslog facility - - - Set to one of the values. The list of - facilities is predefined and cannot be extended. The default value - is . - - - - - syslog severities - - - - The syslog severities. - - - - - - system is unusable - - - - - action must be taken immediately - - - - - critical conditions - - - - - error conditions - - - - - warning conditions - - - - - normal but significant condition - - - - - informational - - - - - debug-level messages - - - - - syslog facilities - - - - The syslog facilities - - - - - - kernel messages - - - - - random user-level messages - - - - - mail system - - - - - system daemons - - - - - security/authorization messages - - - - - messages generated internally by syslogd - - - - - line printer subsystem - - - - - network news subsystem - - - - - UUCP subsystem - - - - - clock (cron/at) daemon - - - - - security/authorization messages (private) - - - - - ftp daemon - - - - - NTP subsystem - - - - - log audit - - - - - log alert - - - - - clock daemon - - - - - reserved for local use - - - - - reserved for local use - - - - - reserved for local use - - - - - reserved for local use - - - - - reserved for local use - - - - - reserved for local use - - - - - reserved for local use - - - - - reserved for local use - - - - - A class to act as a mapping between the level that a logging call is made at and - the syslog severity that is should be logged at. - - - - A class to act as a mapping between the level that a logging call is made at and - the syslog severity that is should be logged at. - - - - - - The mapped syslog severity for the specified level - - - - Required property. - The mapped syslog severity for the specified level - - - - - - Delivers logging events to a remote logging sink. - - - - This Appender is designed to deliver events to a remote sink. - That is any object that implements the - interface. It delivers the events using .NET remoting. The - object to deliver events to is specified by setting the - appenders property. - - The RemotingAppender buffers events before sending them. This allows it to - make more efficient use of the remoting infrastructure. - - Once the buffer is full the events are still not sent immediately. - They are scheduled to be sent using a pool thread. The effect is that - the send occurs asynchronously. This is very important for a - number of non obvious reasons. The remoting infrastructure will - flow thread local variables (stored in the ), - if they are marked as , across the - remoting boundary. If the server is not contactable then - the remoting infrastructure will clear the - objects from the . To prevent a logging failure from - having side effects on the calling application the remoting call must be made - from a separate thread to the one used by the application. A - thread is used for this. If no thread is available then - the events will block in the thread pool manager until a thread is available. - - Because the events are sent asynchronously using pool threads it is possible to close - this appender before all the queued events have been sent. - When closing the appender attempts to wait until all the queued events have been sent, but - this will timeout after 30 seconds regardless. - - If this appender is being closed because the - event has fired it may not be possible to send all the queued events. During process - exit the runtime limits the time that a - event handler is allowed to run for. If the runtime terminates the threads before - the queued events have been sent then they will be lost. To ensure that all events - are sent the appender must be closed before the application exits. See - for details on how to shutdown - log4net programmatically. - - - Nicko Cadell - Gert Driesen - Daniel Cazzulino - - - - Initializes a new instance of the class. - - - - Default constructor. - - - - - - Initialize the appender based on the options set - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - - - - Send the contents of the buffer to the remote sink. - - - The events are not sent immediately. They are scheduled to be sent - using a pool thread. The effect is that the send occurs asynchronously. - This is very important for a number of non obvious reasons. The remoting - infrastructure will flow thread local variables (stored in the ), - if they are marked as , across the - remoting boundary. If the server is not contactable then - the remoting infrastructure will clear the - objects from the . To prevent a logging failure from - having side effects on the calling application the remoting call must be made - from a separate thread to the one used by the application. A - thread is used for this. If no thread is available then - the events will block in the thread pool manager until a thread is available. - - The events to send. - - - - Override base class close. - - - - This method waits while there are queued work items. The events are - sent asynchronously using work items. These items - will be sent once a thread pool thread is available to send them, therefore - it is possible to close the appender before all the queued events have been - sent. - - This method attempts to wait until all the queued events have been sent, but this - method will timeout after 30 seconds regardless. - - If the appender is being closed because the - event has fired it may not be possible to send all the queued events. During process - exit the runtime limits the time that a - event handler is allowed to run for. - - - - - A work item is being queued into the thread pool - - - - - A work item from the thread pool has completed - - - - - Send the contents of the buffer to the remote sink. - - - This method is designed to be used with the . - This method expects to be passed an array of - objects in the state param. - - the logging events to send - - - - The URL of the remote sink. - - - - - The local proxy (.NET remoting) for the remote logging sink. - - - - - The number of queued callbacks currently waiting or executing - - - - - Event used to signal when there are no queued work items - - - This event is set when there are no queued work items. In this - state it is safe to close the appender. - - - - - Gets or sets the URL of the well-known object that will accept - the logging events. - - - The well-known URL of the remote sink. - - - - The URL of the remoting sink that will accept logging events. - The sink must implement the - interface. - - - - - - Interface used to deliver objects to a remote sink. - - - This interface must be implemented by a remoting sink - if the is to be used - to deliver logging events to the sink. - - - - - Delivers logging events to the remote sink - - Array of events to log. - - - Delivers logging events to the remote sink - - - - - - Appender that rolls log files based on size or date or both. - - - - RollingFileAppender can roll log files based on size or date or both - depending on the setting of the property. - When set to the log file will be rolled - once its size exceeds the . - When set to the log file will be rolled - once the date boundary specified in the property - is crossed. - When set to the log file will be - rolled once the date boundary specified in the property - is crossed, but within a date boundary the file will also be rolled - once its size exceeds the . - When set to the log file will be rolled when - the appender is configured. This effectively means that the log file can be - rolled once per program execution. - - - A of few additional optional features have been added: - - Attach date pattern for current log file - Backup number increments for newer files - Infinite number of backups by file size - - - - - - For large or infinite numbers of backup files a - greater than zero is highly recommended, otherwise all the backup files need - to be renamed each time a new backup is created. - - - When Date/Time based rolling is used setting - to will reduce the number of file renamings to few or none. - - - - - - Changing or without clearing - the log file directory of backup files will cause unexpected and unwanted side effects. - - - - - If Date/Time based rolling is enabled this appender will attempt to roll existing files - in the directory without a Date/Time tag based on the last write date of the base log file. - The appender only rolls the log file when a message is logged. If Date/Time based rolling - is enabled then the appender will not roll the log file at the Date/Time boundary but - at the point when the next message is logged after the boundary has been crossed. - - - - The extends the and - has the same behavior when opening the log file. - The appender will first try to open the file for writing when - is called. This will typically be during configuration. - If the file cannot be opened for writing the appender will attempt - to open the file again each time a message is logged to the appender. - If the file cannot be opened for writing when a message is logged then - the message will be discarded by this appender. - - - When rolling a backup file necessitates deleting an older backup file the - file to be deleted is moved to a temporary name before being deleted. - - - - - A maximum number of backup files when rolling on date/time boundaries is not supported. - - - - Nicko Cadell - Gert Driesen - Aspi Havewala - Douglas de la Torre - Edward Smit - - - - Initializes a new instance of the class. - - - - Default constructor. - - - - - - Sets the quiet writer being used. - - - This method can be overridden by sub classes. - - the writer to set - - - - Write out a logging event. - - the event to write to file. - - - Handles append time behavior for RollingFileAppender. This checks - if a roll over either by date (checked first) or time (checked second) - is need and then appends to the file last. - - - - - - Write out an array of logging events. - - the events to write to file. - - - Handles append time behavior for RollingFileAppender. This checks - if a roll over either by date (checked first) or time (checked second) - is need and then appends to the file last. - - - - - - Performs any required rolling before outputting the next event - - - - Handles append time behavior for RollingFileAppender. This checks - if a roll over either by date (checked first) or time (checked second) - is need and then appends to the file last. - - - - - - Creates and opens the file for logging. If - is false then the fully qualified name is determined and used. - - the name of the file to open - true to append to existing file - - This method will ensure that the directory structure - for the specified exists. - - - - - Get the current output file name - - the base file name - the output file name - - The output file name is based on the base fileName specified. - If is set then the output - file name is the same as the base file passed in. Otherwise - the output file depends on the date pattern, on the count - direction or both. - - - - - Determines curSizeRollBackups (only within the current roll point) - - - - - Generates a wildcard pattern that can be used to find all files - that are similar to the base file name. - - - - - - - Builds a list of filenames for all files matching the base filename plus a file - pattern. - - - - - - - Initiates a roll over if needed for crossing a date boundary since the last run. - - - - - Initializes based on existing conditions at time of . - - - - Initializes based on existing conditions at time of . - The following is done - - determine curSizeRollBackups (only within the current roll point) - initiates a roll over if needed for crossing a date boundary since the last run. - - - - - - - Does the work of bumping the 'current' file counter higher - to the highest count when an incremental file name is seen. - The highest count is either the first file (when count direction - is greater than 0) or the last file (when count direction less than 0). - In either case, we want to know the highest count that is present. - - - - - - - Takes a list of files and a base file name, and looks for - 'incremented' versions of the base file. Bumps the max - count up to the highest count seen. - - - - - - - Calculates the RollPoint for the datePattern supplied. - - the date pattern to calculate the check period for - The RollPoint that is most accurate for the date pattern supplied - - Essentially the date pattern is examined to determine what the - most suitable roll point is. The roll point chosen is the roll point - with the smallest period that can be detected using the date pattern - supplied. i.e. if the date pattern only outputs the year, month, day - and hour then the smallest roll point that can be detected would be - and hourly roll point as minutes could not be detected. - - - - - Initialize the appender based on the options set - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - Sets initial conditions including date/time roll over information, first check, - scheduledFilename, and calls to initialize - the current number of backups. - - - - - - Rollover the file(s) to date/time tagged file(s). - - set to true if the file to be rolled is currently open - - - Rollover the file(s) to date/time tagged file(s). - Resets curSizeRollBackups. - If fileIsOpen is set then the new file is opened (through SafeOpenFile). - - - - - - Renames file to file . - - Name of existing file to roll. - New name for file. - - - Renames file to file . It - also checks for existence of target file and deletes if it does. - - - - - - Test if a file exists at a specified path - - the path to the file - true if the file exists - - - Test if a file exists at a specified path - - - - - - Deletes the specified file if it exists. - - The file to delete. - - - Delete a file if is exists. - The file is first moved to a new filename then deleted. - This allows the file to be removed even when it cannot - be deleted, but it still can be moved. - - - - - - Implements file roll base on file size. - - - - If the maximum number of size based backups is reached - (curSizeRollBackups == maxSizeRollBackups) then the oldest - file is deleted -- its index determined by the sign of countDirection. - If countDirection < 0, then files - {File.1, ..., File.curSizeRollBackups -1} - are renamed to {File.2, ..., - File.curSizeRollBackups}. Moreover, File is - renamed File.1 and closed. - - - A new file is created to receive further log output. - - - If maxSizeRollBackups is equal to zero, then the - File is truncated with no backup files created. - - - If maxSizeRollBackups < 0, then File is - renamed if needed and no files are deleted. - - - - - - Implements file roll. - - the base name to rename - - - If the maximum number of size based backups is reached - (curSizeRollBackups == maxSizeRollBackups) then the oldest - file is deleted -- its index determined by the sign of countDirection. - If countDirection < 0, then files - {File.1, ..., File.curSizeRollBackups -1} - are renamed to {File.2, ..., - File.curSizeRollBackups}. - - - If maxSizeRollBackups is equal to zero, then the - File is truncated with no backup files created. - - - If maxSizeRollBackups < 0, then File is - renamed if needed and no files are deleted. - - - This is called by to rename the files. - - - - - - Get the start time of the next window for the current rollpoint - - the current date - the type of roll point we are working with - the start time for the next roll point an interval after the currentDateTime date - - - Returns the date of the next roll point after the currentDateTime date passed to the method. - - - The basic strategy is to subtract the time parts that are less significant - than the rollpoint from the current time. This should roll the time back to - the start of the time window for the current rollpoint. Then we add 1 window - worth of time and get the start time of the next window for the rollpoint. - - - - - - This object supplies the current date/time. Allows test code to plug in - a method to control this class when testing date/time based rolling. - - - - - The date pattern. By default, the pattern is set to ".yyyy-MM-dd" - meaning daily rollover. - - - - - The actual formatted filename that is currently being written to - or will be the file transferred to on roll over - (based on staticLogFileName). - - - - - The timestamp when we shall next recompute the filename. - - - - - Holds date of last roll over - - - - - The type of rolling done - - - - - The default maximum file size is 10MB - - - - - There is zero backup files by default - - - - - How many sized based backups have been made so far - - - - - The rolling file count direction. - - - - - The rolling mode used in this appender. - - - - - Cache flag set if we are rolling by date. - - - - - Cache flag set if we are rolling by size. - - - - - Value indicating whether to always log to the same file. - - - - - FileName provided in configuration. Used for rolling properly - - - - - The 1st of January 1970 in UTC - - - - - Gets or sets the date pattern to be used for generating file names - when rolling over on date. - - - The date pattern to be used for generating file names when rolling - over on date. - - - - Takes a string in the same format as expected by - . - - - This property determines the rollover schedule when rolling over - on date. - - - - - - Gets or sets the maximum number of backup files that are kept before - the oldest is erased. - - - The maximum number of backup files that are kept before the oldest is - erased. - - - - If set to zero, then there will be no backup files and the log file - will be truncated when it reaches . - - - If a negative number is supplied then no deletions will be made. Note - that this could result in very slow performance as a large number of - files are rolled over unless is used. - - - The maximum applies to each time based group of files and - not the total. - - - - - - Gets or sets the maximum size that the output file is allowed to reach - before being rolled over to backup files. - - - The maximum size in bytes that the output file is allowed to reach before being - rolled over to backup files. - - - - This property is equivalent to except - that it is required for differentiating the setter taking a - argument from the setter taking a - argument. - - - The default maximum file size is 10MB (10*1024*1024). - - - - - - Gets or sets the maximum size that the output file is allowed to reach - before being rolled over to backup files. - - - The maximum size that the output file is allowed to reach before being - rolled over to backup files. - - - - This property allows you to specify the maximum size with the - suffixes "KB", "MB" or "GB" so that the size is interpreted being - expressed respectively in kilobytes, megabytes or gigabytes. - - - For example, the value "10KB" will be interpreted as 10240 bytes. - - - The default maximum file size is 10MB. - - - If you have the option to set the maximum file size programmatically - consider using the property instead as this - allows you to set the size in bytes as a . - - - - - - Gets or sets the rolling file count direction. - - - The rolling file count direction. - - - - Indicates if the current file is the lowest numbered file or the - highest numbered file. - - - By default newer files have lower numbers ( < 0), - i.e. log.1 is most recent, log.5 is the 5th backup, etc... - - - >= 0 does the opposite i.e. - log.1 is the first backup made, log.5 is the 5th backup made, etc. - For infinite backups use >= 0 to reduce - rollover costs. - - The default file count direction is -1. - - - - - Gets or sets the rolling style. - - The rolling style. - - - The default rolling style is . - - - When set to this appender's - property is set to false, otherwise - the appender would append to a single file rather than rolling - the file each time it is opened. - - - - - - Gets or sets a value indicating whether to always log to - the same file. - - - true if always should be logged to the same file, otherwise false. - - - - By default file.log is always the current file. Optionally - file.log.yyyy-mm-dd for current formatted datePattern can by the currently - logging file (or file.log.curSizeRollBackup or even - file.log.yyyy-mm-dd.curSizeRollBackup). - - - This will make time based rollovers with a large number of backups - much faster as the appender it won't have to rename all the backups! - - - - - - Style of rolling to use - - - - Style of rolling to use - - - - - - Roll files once per program execution - - - - Roll files once per program execution. - Well really once each time this appender is - configured. - - - Setting this option also sets AppendToFile to - false on the RollingFileAppender, otherwise - this appender would just be a normal file appender. - - - - - - Roll files based only on the size of the file - - - - - Roll files based only on the date - - - - - Roll files based on both the size and date of the file - - - - - The code assumes that the following 'time' constants are in a increasing sequence. - - - - The code assumes that the following 'time' constants are in a increasing sequence. - - - - - - Roll the log not based on the date - - - - - Roll the log for each minute - - - - - Roll the log for each hour - - - - - Roll the log twice a day (midday and midnight) - - - - - Roll the log each day (midnight) - - - - - Roll the log each week - - - - - Roll the log each month - - - - - This interface is used to supply Date/Time information to the . - - - This interface is used to supply Date/Time information to the . - Used primarily to allow test classes to plug themselves in so they can - supply test date/times. - - - - - Gets the current time. - - The current time. - - - Gets the current time. - - - - - - Default implementation of that returns the current time. - - - - - Gets the current time. - - The current time. - - - Gets the current time. - - - - - - Send an e-mail when a specific logging event occurs, typically on errors - or fatal errors. - - - - The number of logging events delivered in this e-mail depend on - the value of option. The - keeps only the last - logging events in its - cyclic buffer. This keeps memory requirements at a reasonable level while - still delivering useful application context. - - - Authentication and setting the server Port are only available on the MS .NET 1.1 runtime. - For these features to be enabled you need to ensure that you are using a version of - the log4net assembly that is built against the MS .NET 1.1 framework and that you are - running the your application on the MS .NET 1.1 runtime. On all other platforms only sending - unauthenticated messages to a server listening on port 25 (the default) is supported. - - - Authentication is supported by setting the property to - either or . - If using authentication then the - and properties must also be set. - - - To set the SMTP server port use the property. The default port is 25. - - - Nicko Cadell - Gert Driesen - - - - Default constructor - - - - Default constructor - - - - - - Sends the contents of the cyclic buffer as an e-mail message. - - The logging events to send. - - - - Send the email message - - the body text to include in the mail - - - - Gets or sets a semicolon-delimited list of recipient e-mail addresses. - - - A semicolon-delimited list of e-mail addresses. - - - - A semicolon-delimited list of recipient e-mail addresses. - - - - - - Gets or sets the e-mail address of the sender. - - - The e-mail address of the sender. - - - - The e-mail address of the sender. - - - - - - Gets or sets the subject line of the e-mail message. - - - The subject line of the e-mail message. - - - - The subject line of the e-mail message. - - - - - - Gets or sets the name of the SMTP relay mail server to use to send - the e-mail messages. - - - The name of the e-mail relay server. If SmtpServer is not set, the - name of the local SMTP server is used. - - - - The name of the e-mail relay server. If SmtpServer is not set, the - name of the local SMTP server is used. - - - - - - Obsolete - - - Use the BufferingAppenderSkeleton Fix methods instead - - - - Obsolete property. - - - - - - The mode to use to authentication with the SMTP server - - - Authentication is only available on the MS .NET 1.1 runtime. - - Valid Authentication mode values are: , - , and . - The default value is . When using - you must specify the - and to use to authenticate. - When using the Windows credentials for the current - thread, if impersonating, or the process will be used to authenticate. - - - - - - The username to use to authenticate with the SMTP server - - - Authentication is only available on the MS .NET 1.1 runtime. - - A and must be specified when - is set to , - otherwise the username will be ignored. - - - - - - The password to use to authenticate with the SMTP server - - - Authentication is only available on the MS .NET 1.1 runtime. - - A and must be specified when - is set to , - otherwise the password will be ignored. - - - - - - The port on which the SMTP server is listening - - - Server Port is only available on the MS .NET 1.1 runtime. - - The port on which the SMTP server is listening. The default - port is 25. The Port can only be changed when running on - the MS .NET 1.1 runtime. - - - - - - Gets or sets the priority of the e-mail message - - - One of the values. - - - - Sets the priority of the e-mails generated by this - appender. The default priority is . - - - If you are using this appender to report errors then - you may want to set the priority to . - - - - - - This appender requires a to be set. - - true - - - This appender requires a to be set. - - - - - - Values for the property. - - - - SMTP authentication modes. - - - - - - No authentication - - - - - Basic authentication. - - - Requires a username and password to be supplied - - - - - Integrated authentication - - - Uses the Windows credentials from the current thread or process to authenticate. - - - - - Send an email when a specific logging event occurs, typically on errors - or fatal errors. Rather than sending via smtp it writes a file into the - directory specified by . This allows services such - as the IIS SMTP agent to manage sending the messages. - - - - The configuration for this appender is identical to that of the SMTPAppender, - except that instead of specifying the SMTPAppender.SMTPHost you specify - . - - - The number of logging events delivered in this e-mail depend on - the value of option. The - keeps only the last - logging events in its - cyclic buffer. This keeps memory requirements at a reasonable level while - still delivering useful application context. - - - Niall Daley - Nicko Cadell - - - - Default constructor - - - - Default constructor - - - - - - Sends the contents of the cyclic buffer as an e-mail message. - - The logging events to send. - - - Sends the contents of the cyclic buffer as an e-mail message. - - - - - - Activate the options on this appender. - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - - - - Convert a path into a fully qualified path. - - The path to convert. - The fully qualified path. - - - Converts the path specified to a fully - qualified path. If the path is relative it is - taken as relative from the application base - directory. - - - - - - The security context to use for privileged calls - - - - - Gets or sets a semicolon-delimited list of recipient e-mail addresses. - - - A semicolon-delimited list of e-mail addresses. - - - - A semicolon-delimited list of e-mail addresses. - - - - - - Gets or sets the e-mail address of the sender. - - - The e-mail address of the sender. - - - - The e-mail address of the sender. - - - - - - Gets or sets the subject line of the e-mail message. - - - The subject line of the e-mail message. - - - - The subject line of the e-mail message. - - - - - - Gets or sets the path to write the messages to. - - - - Gets or sets the path to write the messages to. This should be the same - as that used by the agent sending the messages. - - - - - - Gets or sets the used to write to the pickup directory. - - - The used to write to the pickup directory. - - - - Unless a specified here for this appender - the is queried for the - security context to use. The default behavior is to use the security context - of the current thread. - - - - - - This appender requires a to be set. - - true - - - This appender requires a to be set. - - - - - - Appender that allows clients to connect via Telnet to receive log messages - - - - The TelnetAppender accepts socket connections and streams logging messages - back to the client. - The output is provided in a telnet-friendly way so that a log can be monitored - over a TCP/IP socket. - This allows simple remote monitoring of application logging. - - - The default is 23 (the telnet port). - - - Keith Long - Nicko Cadell - - - - Default constructor - - - - Default constructor - - - - - - Overrides the parent method to close the socket handler - - - - Closes all the outstanding connections. - - - - - - Initialize the appender based on the options set. - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - Create the socket handler and wait for connections - - - - - - Writes the logging event to each connected client. - - The event to log. - - - Writes the logging event to each connected client. - - - - - - Gets or sets the TCP port number on which this will listen for connections. - - - An integer value in the range to - indicating the TCP port number on which this will listen for connections. - - - - The default value is 23 (the telnet port). - - - The value specified is less than - or greater than . - - - - This appender requires a to be set. - - true - - - This appender requires a to be set. - - - - - - Helper class to manage connected clients - - - - The SocketHandler class is used to accept connections from - clients. It is threaded so that clients can connect/disconnect - asynchronously. - - - - - - Opens a new server port on - - the local port to listen on for connections - - - Creates a socket handler on the specified local server port. - - - - - - Sends a string message to each of the connected clients - - the text to send - - - Sends a string message to each of the connected clients - - - - - - Add a client to the internal clients list - - client to add - - - - Remove a client from the internal clients list - - client to remove - - - - Callback used to accept a connection on the server socket - - The result of the asynchronous operation - - - On connection adds to the list of connections - if there are two many open connections you will be disconnected - - - - - - Close all network connections - - - - Make sure we close all network connections - - - - - - Test if this handler has active connections - - - true if this handler has active connections - - - - This property will be true while this handler has - active connections, that is at least one connection that - the handler will attempt to send a message to. - - - - - - Class that represents a client connected to this handler - - - - Class that represents a client connected to this handler - - - - - - Create this for the specified - - the client's socket - - - Opens a stream writer on the socket. - - - - - - Write a string to the client - - string to send - - - Write a string to the client - - - - - - Cleanup the clients connection - - - - Close the socket connection. - - - - - - Appends log events to the system. - - - - The application configuration file can be used to control what listeners - are actually used. See the MSDN documentation for the - class for details on configuring the - trace system. - - - Events are written using the System.Diagnostics.Trace.Write(string,string) - method. The event's logger name is passed as the value for the category name to the Write method. - - - Compact Framework
- The Compact Framework does not support the - class for any operation except Assert. When using the Compact Framework this - appender will write to the system rather than - the Trace system. This appender will therefore behave like the . -
-
- Douglas de la Torre - Nicko Cadell - Gert Driesen -
- - - Initializes a new instance of the . - - - - Default constructor. - - - - - - Initializes a new instance of the - with a specified layout. - - The layout to use with this appender. - - - Obsolete constructor. - - - - - - Writes the logging event to the system. - - The event to log. - - - Writes the logging event to the system. - - - - - - Immediate flush means that the underlying writer or output stream - will be flushed at the end of each append operation. - - - - Immediate flush is slower but ensures that each append request is - actually written. If is set to - false, then there is a good chance that the last few - logs events are not actually written to persistent media if and - when the application crashes. - - - The default value is true. - - - - - Gets or sets a value that indicates whether the appender will - flush at the end of each write. - - - The default behavior is to flush at the end of each - write. If the option is set tofalse, then the underlying - stream can defer writing to physical medium to a later time. - - - Avoiding the flush operation at the end of each append results - in a performance gain of 10 to 20 percent. However, there is safety - trade-off involved in skipping flushing. Indeed, when flushing is - skipped, then it is likely that the last few log events will not - be recorded on disk when the application exits. This is a high - price to pay even for a 20% performance gain. - - - - - - This appender requires a to be set. - - true - - - This appender requires a to be set. - - - - - - Assembly level attribute that specifies a domain to alias to this assembly's repository. - - - - AliasDomainAttribute is obsolete. Use AliasRepositoryAttribute instead of AliasDomainAttribute. - - - An assembly's logger repository is defined by its , - however this can be overridden by an assembly loaded before the target assembly. - - - An assembly can alias another assembly's domain to its repository by - specifying this attribute with the name of the target domain. - - - This attribute can only be specified on the assembly and may be used - as many times as necessary to alias all the required domains. - - - Nicko Cadell - Gert Driesen - - - - Assembly level attribute that specifies a repository to alias to this assembly's repository. - - - - An assembly's logger repository is defined by its , - however this can be overridden by an assembly loaded before the target assembly. - - - An assembly can alias another assembly's repository to its repository by - specifying this attribute with the name of the target repository. - - - This attribute can only be specified on the assembly and may be used - as many times as necessary to alias all the required repositories. - - - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the class with - the specified repository to alias to this assembly's repository. - - The repository to alias to this assemby's repository. - - - Initializes a new instance of the class with - the specified repository to alias to this assembly's repository. - - - - - - Gets or sets the repository to alias to this assemby's repository. - - - The repository to alias to this assemby's repository. - - - - The name of the repository to alias to this assemby's repository. - - - - - - Initializes a new instance of the class with - the specified domain to alias to this assembly's repository. - - The domain to alias to this assemby's repository. - - - Obsolete. Use instead of . - - - - - - Use this class to quickly configure a . - - - - Allows very simple programmatic configuration of log4net. - - - Only one appender can be configured using this configurator. - The appender is set at the root of the hierarchy and all logging - events will be delivered to that appender. - - - Appenders can also implement the interface. Therefore - they would require that the method - be called after the appenders properties have been configured. - - - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the class. - - - - Uses a private access modifier to prevent instantiation of this class. - - - - - - Initializes the log4net system with a default configuration. - - - - Initializes the log4net logging system using a - that will write to Console.Out. The log messages are - formatted using the layout object - with the - layout style. - - - - - - Initializes the log4net system using the specified appender. - - The appender to use to log all logging events. - - - Initializes the log4net system using the specified appender. - - - - - - Initializes the with a default configuration. - - The repository to configure. - - - Initializes the specified repository using a - that will write to Console.Out. The log messages are - formatted using the layout object - with the - layout style. - - - - - - Initializes the using the specified appender. - - The repository to configure. - The appender to use to log all logging events. - - - Initializes the using the specified appender. - - - - - - Base class for all log4net configuration attributes. - - - This is an abstract class that must be extended by - specific configurators. This attribute allows the - configurator to be parameterized by an assembly level - attribute. - - Nicko Cadell - Gert Driesen - - - - Constructor used by subclasses. - - the ordering priority for this configurator - - - The is used to order the configurator - attributes before they are invoked. Higher priority configurators are executed - before lower priority ones. - - - - - - Configures the for the specified assembly. - - The assembly that this attribute was defined on. - The repository to configure. - - - Abstract method implemented by a subclass. When this method is called - the subclass should configure the . - - - - - - Compare this instance to another ConfiguratorAttribute - - the object to compare to - see - - - Compares the priorities of the two instances. - Sorts by priority in descending order. Objects with the same priority are - randomly ordered. - - - - - - Assembly level attribute that specifies the logging domain for the assembly. - - - - DomainAttribute is obsolete. Use RepositoryAttribute instead of DomainAttribute. - - - Assemblies are mapped to logging domains. Each domain has its own - logging repository. This attribute specified on the assembly controls - the configuration of the domain. The property specifies the name - of the domain that this assembly is a part of. The - specifies the type of the repository objects to create for the domain. If - this attribute is not specified and a is not specified - then the assembly will be part of the default shared logging domain. - - - This attribute can only be specified on the assembly and may only be used - once per assembly. - - - Nicko Cadell - Gert Driesen - - - - Assembly level attribute that specifies the logging repository for the assembly. - - - - Assemblies are mapped to logging repository. This attribute specified - on the assembly controls - the configuration of the repository. The property specifies the name - of the repository that this assembly is a part of. The - specifies the type of the object - to create for the assembly. If this attribute is not specified or a - is not specified then the assembly will be part of the default shared logging repository. - - - This attribute can only be specified on the assembly and may only be used - once per assembly. - - - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the class. - - - - Default constructor. - - - - - - Initialize a new instance of the class - with the name of the repository. - - The name of the repository. - - - Initialize the attribute with the name for the assembly's repository. - - - - - - Gets or sets the name of the logging repository. - - - The string name to use as the name of the repository associated with this - assembly. - - - - This value does not have to be unique. Several assemblies can share the - same repository. They will share the logging configuration of the repository. - - - - - - Gets or sets the type of repository to create for this assembly. - - - The type of repository to create for this assembly. - - - - The type of the repository to create for the assembly. - The type must implement the - interface. - - - This will be the type of repository created when - the repository is created. If multiple assemblies reference the - same repository then the repository is only created once using the - of the first assembly to call into the - repository. - - - - - - Initializes a new instance of the class. - - - - Obsolete. Use RepositoryAttribute instead of DomainAttribute. - - - - - - Initialize a new instance of the class - with the name of the domain. - - The name of the domain. - - - Obsolete. Use RepositoryAttribute instead of DomainAttribute. - - - - - - Use this class to initialize the log4net environment using an Xml tree. - - - - DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. - - - Configures a using an Xml tree. - - - Nicko Cadell - Gert Driesen - - - - Private constructor - - - - - Automatically configures the log4net system based on the - application's configuration settings. - - - - DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. - - Each application has a configuration file. This has the - same name as the application with '.config' appended. - This file is XML and calling this function prompts the - configurator to look in that file for a section called - log4net that contains the configuration data. - - - - - Automatically configures the using settings - stored in the application's configuration file. - - - - DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. - - Each application has a configuration file. This has the - same name as the application with '.config' appended. - This file is XML and calling this function prompts the - configurator to look in that file for a section called - log4net that contains the configuration data. - - The repository to configure. - - - - Configures log4net using a log4net element - - - - DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. - - Loads the log4net configuration from the XML element - supplied as . - - The element to parse. - - - - Configures the using the specified XML - element. - - - - DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. - - Loads the log4net configuration from the XML element - supplied as . - - The repository to configure. - The element to parse. - - - - Configures log4net using the specified configuration file. - - The XML file to load the configuration from. - - - DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. - - - The configuration file must be valid XML. It must contain - at least one element called log4net that holds - the log4net configuration data. - - - The log4net configuration file can possible be specified in the application's - configuration file (either MyAppName.exe.config for a - normal application on Web.config for an ASP.NET application). - - - The following example configures log4net using a configuration file, of which the - location is stored in the application's configuration file : - - - using log4net.Config; - using System.IO; - using System.Configuration; - - ... - - DOMConfigurator.Configure(new FileInfo(ConfigurationSettings.AppSettings["log4net-config-file"])); - - - In the .config file, the path to the log4net can be specified like this : - - - - - - - - - - - - - Configures log4net using the specified configuration file. - - A stream to load the XML configuration from. - - - DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. - - - The configuration data must be valid XML. It must contain - at least one element called log4net that holds - the log4net configuration data. - - - Note that this method will NOT close the stream parameter. - - - - - - Configures the using the specified configuration - file. - - The repository to configure. - The XML file to load the configuration from. - - - DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. - - - The configuration file must be valid XML. It must contain - at least one element called log4net that holds - the configuration data. - - - The log4net configuration file can possible be specified in the application's - configuration file (either MyAppName.exe.config for a - normal application on Web.config for an ASP.NET application). - - - The following example configures log4net using a configuration file, of which the - location is stored in the application's configuration file : - - - using log4net.Config; - using System.IO; - using System.Configuration; - - ... - - DOMConfigurator.Configure(new FileInfo(ConfigurationSettings.AppSettings["log4net-config-file"])); - - - In the .config file, the path to the log4net can be specified like this : - - - - - - - - - - - - - Configures the using the specified configuration - file. - - The repository to configure. - The stream to load the XML configuration from. - - - DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. - - - The configuration data must be valid XML. It must contain - at least one element called log4net that holds - the configuration data. - - - Note that this method will NOT close the stream parameter. - - - - - - Configures log4net using the file specified, monitors the file for changes - and reloads the configuration if a change is detected. - - The XML file to load the configuration from. - - - DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. - - - The configuration file must be valid XML. It must contain - at least one element called log4net that holds - the configuration data. - - - The configuration file will be monitored using a - and depends on the behavior of that class. - - - For more information on how to configure log4net using - a separate configuration file, see . - - - - - - - Configures the using the file specified, - monitors the file for changes and reloads the configuration if a change - is detected. - - The repository to configure. - The XML file to load the configuration from. - - - DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. - - - The configuration file must be valid XML. It must contain - at least one element called log4net that holds - the configuration data. - - - The configuration file will be monitored using a - and depends on the behavior of that class. - - - For more information on how to configure log4net using - a separate configuration file, see . - - - - - - - Assembly level attribute to configure the . - - - - AliasDomainAttribute is obsolete. Use AliasRepositoryAttribute instead of AliasDomainAttribute. - - - This attribute may only be used at the assembly scope and can only - be used once per assembly. - - - Use this attribute to configure the - without calling one of the - methods. - - - Nicko Cadell - Gert Driesen - - - - Assembly level attribute to configure the . - - - - This attribute may only be used at the assembly scope and can only - be used once per assembly. - - - Use this attribute to configure the - without calling one of the - methods. - - - If neither of the or - properties are set the configuration is loaded from the application's .config file. - If set the property takes priority over the - property. The property - specifies a path to a file to load the config from. The path is relative to the - application's base directory; . - The property is used as a postfix to the assembly file name. - The config file must be located in the application's base directory; . - For example in a console application setting the to - config has the same effect as not specifying the or - properties. - - - The property can be set to cause the - to watch the configuration file for changes. - - - - Log4net will only look for assembly level configuration attributes once. - When using the log4net assembly level attributes to control the configuration - of log4net you must ensure that the first call to any of the - methods is made from the assembly with the configuration - attributes. - - - If you cannot guarantee the order in which log4net calls will be made from - different assemblies you must use programmatic configuration instead, i.e. - call the method directly. - - - - Nicko Cadell - Gert Driesen - - - - Default constructor - - - - Default constructor - - - - - - Configures the for the specified assembly. - - The assembly that this attribute was defined on. - The repository to configure. - - - Configure the repository using the . - The specified must extend the - class otherwise the will not be able to - configure it. - - - The does not extend . - - - - Attempt to load configuration from the local file system - - The assembly that this attribute was defined on. - The repository to configure. - - - - Configure the specified repository using a - - The repository to configure. - the FileInfo pointing to the config file - - - - Attempt to load configuration from a URI - - The assembly that this attribute was defined on. - The repository to configure. - - - - Gets or sets the filename of the configuration file. - - - The filename of the configuration file. - - - - If specified, this is the name of the configuration file to use with - the . This file path is relative to the - application base directory (). - - - The takes priority over the . - - - - - - Gets or sets the extension of the configuration file. - - - The extension of the configuration file. - - - - If specified this is the extension for the configuration file. - The path to the config file is built by using the application - base directory (), - the assembly file name and the config file extension. - - - If the is set to MyExt then - possible config file names would be: MyConsoleApp.exe.MyExt or - MyClassLibrary.dll.MyExt. - - - The takes priority over the . - - - - - - Gets or sets a value indicating whether to watch the configuration file. - - - true if the configuration should be watched, false otherwise. - - - - If this flag is specified and set to true then the framework - will watch the configuration file and will reload the config each time - the file is modified. - - - The config file can only be watched if it is loaded from local disk. - In a No-Touch (Smart Client) deployment where the application is downloaded - from a web server the config file may not reside on the local disk - and therefore it may not be able to watch it. - - - Watching configuration is not supported on the SSCLI. - - - - - - Class to register for the log4net section of the configuration file - - - The log4net section of the configuration file needs to have a section - handler registered. This is the section handler used. It simply returns - the XML element that is the root of the section. - - - Example of registering the log4net section handler : - - - -
- - - log4net configuration XML goes here - - - - - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the class. - - - - Default constructor. - - - - - - Parses the configuration section. - - The configuration settings in a corresponding parent configuration section. - The configuration context when called from the ASP.NET configuration system. Otherwise, this parameter is reserved and is a null reference. - The for the log4net section. - The for the log4net section. - - - Returns the containing the configuration data, - - - - - - Assembly level attribute that specifies a plugin to attach to - the repository. - - - - Specifies the type of a plugin to create and attach to the - assembly's repository. The plugin type must implement the - interface. - - - Nicko Cadell - Gert Driesen - - - - Interface used to create plugins. - - - - Interface used to create a plugin. - - - Nicko Cadell - Gert Driesen - - - - Creates the plugin object. - - the new plugin instance - - - Create and return a new plugin instance. - - - - - - Initializes a new instance of the class - with the specified type. - - The type name of plugin to create. - - - Create the attribute with the plugin type specified. - - - Where possible use the constructor that takes a . - - - - - - Initializes a new instance of the class - with the specified type. - - The type of plugin to create. - - - Create the attribute with the plugin type specified. - - - - - - Creates the plugin object defined by this attribute. - - - - Creates the instance of the object as - specified by this attribute. - - - The plugin object. - - - - Returns a representation of the properties of this object. - - - - Overrides base class method to - return a representation of the properties of this object. - - - A representation of the properties of this object - - - - Gets or sets the type for the plugin. - - - The type for the plugin. - - - - The type for the plugin. - - - - - - Gets or sets the type name for the plugin. - - - The type name for the plugin. - - - - The type name for the plugin. - - - Where possible use the property instead. - - - - - - Assembly level attribute to configure the . - - - - This attribute may only be used at the assembly scope and can only - be used once per assembly. - - - Use this attribute to configure the - without calling one of the - methods. - - - Nicko Cadell - - - - Construct provider attribute with type specified - - the type of the provider to use - - - The provider specified must subclass the - class. - - - - - - Configures the SecurityContextProvider - - The assembly that this attribute was defined on. - The repository to configure. - - - Creates a provider instance from the specified. - Sets this as the default security context provider . - - - - - - Gets or sets the type of the provider to use. - - - the type of the provider to use. - - - - The provider specified must subclass the - class. - - - - - - Use this class to initialize the log4net environment using an Xml tree. - - - - Configures a using an Xml tree. - - - Nicko Cadell - Gert Driesen - - - - Private constructor - - - - - Automatically configures the log4net system based on the - application's configuration settings. - - - - Each application has a configuration file. This has the - same name as the application with '.config' appended. - This file is XML and calling this function prompts the - configurator to look in that file for a section called - log4net that contains the configuration data. - - - To use this method to configure log4net you must specify - the section - handler for the log4net configuration section. See the - for an example. - - - - - - - Automatically configures the using settings - stored in the application's configuration file. - - - - Each application has a configuration file. This has the - same name as the application with '.config' appended. - This file is XML and calling this function prompts the - configurator to look in that file for a section called - log4net that contains the configuration data. - - - To use this method to configure log4net you must specify - the section - handler for the log4net configuration section. See the - for an example. - - - The repository to configure. - - - - Configures log4net using a log4net element - - - - Loads the log4net configuration from the XML element - supplied as . - - - The element to parse. - - - - Configures the using the specified XML - element. - - - Loads the log4net configuration from the XML element - supplied as . - - The repository to configure. - The element to parse. - - - - Configures log4net using the specified configuration file. - - The XML file to load the configuration from. - - - The configuration file must be valid XML. It must contain - at least one element called log4net that holds - the log4net configuration data. - - - The log4net configuration file can possible be specified in the application's - configuration file (either MyAppName.exe.config for a - normal application on Web.config for an ASP.NET application). - - - The first element matching <configuration> will be read as the - configuration. If this file is also a .NET .config file then you must specify - a configuration section for the log4net element otherwise .NET will - complain. Set the type for the section handler to , for example: - - -
- - - - - The following example configures log4net using a configuration file, of which the - location is stored in the application's configuration file : - - - using log4net.Config; - using System.IO; - using System.Configuration; - - ... - - XmlConfigurator.Configure(new FileInfo(ConfigurationSettings.AppSettings["log4net-config-file"])); - - - In the .config file, the path to the log4net can be specified like this : - - - - - - - - - - - - - Configures log4net using the specified configuration URI. - - A URI to load the XML configuration from. - - - The configuration data must be valid XML. It must contain - at least one element called log4net that holds - the log4net configuration data. - - - The must support the URI scheme specified. - - - - - - Configures log4net using the specified configuration data stream. - - A stream to load the XML configuration from. - - - The configuration data must be valid XML. It must contain - at least one element called log4net that holds - the log4net configuration data. - - - Note that this method will NOT close the stream parameter. - - - - - - Configures the using the specified configuration - file. - - The repository to configure. - The XML file to load the configuration from. - - - The configuration file must be valid XML. It must contain - at least one element called log4net that holds - the configuration data. - - - The log4net configuration file can possible be specified in the application's - configuration file (either MyAppName.exe.config for a - normal application on Web.config for an ASP.NET application). - - - The first element matching <configuration> will be read as the - configuration. If this file is also a .NET .config file then you must specify - a configuration section for the log4net element otherwise .NET will - complain. Set the type for the section handler to , for example: - - -
- - - - - The following example configures log4net using a configuration file, of which the - location is stored in the application's configuration file : - - - using log4net.Config; - using System.IO; - using System.Configuration; - - ... - - XmlConfigurator.Configure(new FileInfo(ConfigurationSettings.AppSettings["log4net-config-file"])); - - - In the .config file, the path to the log4net can be specified like this : - - - - - - - - - - - - - Configures the using the specified configuration - URI. - - The repository to configure. - A URI to load the XML configuration from. - - - The configuration data must be valid XML. It must contain - at least one element called log4net that holds - the configuration data. - - - The must support the URI scheme specified. - - - - - - Configures the using the specified configuration - file. - - The repository to configure. - The stream to load the XML configuration from. - - - The configuration data must be valid XML. It must contain - at least one element called log4net that holds - the configuration data. - - - Note that this method will NOT close the stream parameter. - - - - - - Configures log4net using the file specified, monitors the file for changes - and reloads the configuration if a change is detected. - - The XML file to load the configuration from. - - - The configuration file must be valid XML. It must contain - at least one element called log4net that holds - the configuration data. - - - The configuration file will be monitored using a - and depends on the behavior of that class. - - - For more information on how to configure log4net using - a separate configuration file, see . - - - - - - - Configures the using the file specified, - monitors the file for changes and reloads the configuration if a change - is detected. - - The repository to configure. - The XML file to load the configuration from. - - - The configuration file must be valid XML. It must contain - at least one element called log4net that holds - the configuration data. - - - The configuration file will be monitored using a - and depends on the behavior of that class. - - - For more information on how to configure log4net using - a separate configuration file, see . - - - - - - - Configures the specified repository using a log4net element. - - The hierarchy to configure. - The element to parse. - - - Loads the log4net configuration from the XML element - supplied as . - - - This method is ultimately called by one of the Configure methods - to load the configuration from an . - - - - - - Class used to watch config files. - - - - Uses the to monitor - changes to a specified file. Because multiple change notifications - may be raised when the file is modified, a timer is used to - compress the notifications into a single event. The timer - waits for time before delivering - the event notification. If any further - change notifications arrive while the timer is waiting it - is reset and waits again for to - elapse. - - - - - - The default amount of time to wait after receiving notification - before reloading the config file. - - - - - Watch a specified config file used to configure a repository - - The repository to configure. - The configuration file to watch. - - - Watch a specified config file used to configure a repository - - - - - - Holds the FileInfo used to configure the XmlConfigurator - - - - - Holds the repository being configured. - - - - - The timer used to compress the notification events. - - - - - Initializes a new instance of the class. - - The repository to configure. - The configuration file to watch. - - - Initializes a new instance of the class. - - - - - - Event handler used by . - - The firing the event. - The argument indicates the file that caused the event to be fired. - - - This handler reloads the configuration from the file when the event is fired. - - - - - - Event handler used by . - - The firing the event. - The argument indicates the file that caused the event to be fired. - - - This handler reloads the configuration from the file when the event is fired. - - - - - - Called by the timer when the configuration has been updated. - - null - - - - The implementation of the interface suitable - for use with the compact framework - - - - This implementation is a simple - mapping between repository name and - object. - - - The .NET Compact Framework 1.0 does not support retrieving assembly - level attributes therefore unlike the DefaultRepositorySelector - this selector does not examine the calling assembly for attributes. - - - Nicko Cadell - - - - Interface used by the to select the . - - - - The uses a - to specify the policy for selecting the correct - to return to the caller. - - - Nicko Cadell - Gert Driesen - - - - Gets the for the specified assembly. - - The assembly to use to lookup to the - The for the assembly. - - - Gets the for the specified assembly. - - - How the association between and - is made is not defined. The implementation may choose any method for - this association. The results of this method must be repeatable, i.e. - when called again with the same arguments the result must be the - save value. - - - - - - Gets the named . - - The name to use to lookup to the . - The named - - Lookup a named . This is the repository created by - calling . - - - - - Creates a new repository for the assembly specified. - - The assembly to use to create the domain to associate with the . - The type of repository to create, must implement . - The repository created. - - - The created will be associated with the domain - specified such that a call to with the - same assembly specified will return the same repository instance. - - - How the association between and - is made is not defined. The implementation may choose any method for - this association. - - - - - - Creates a new repository with the name specified. - - The name to associate with the . - The type of repository to create, must implement . - The repository created. - - - The created will be associated with the name - specified such that a call to with the - same name will return the same repository instance. - - - - - - Test if a named repository exists - - the named repository to check - true if the repository exists - - - Test if a named repository exists. Use - to create a new repository and to retrieve - a repository. - - - - - - Gets an array of all currently defined repositories. - - - An array of the instances created by - this . - - - Gets an array of all of the repositories created by this selector. - - - - - - Event to notify that a logger repository has been created. - - - Event to notify that a logger repository has been created. - - - - Event raised when a new repository is created. - The event source will be this selector. The event args will - be a which - holds the newly created . - - - - - - Create a new repository selector - - the type of the repositories to create, must implement - - - Create an new compact repository selector. - The default type for repositories must be specified, - an appropriate value would be . - - - throw if is null - throw if does not implement - - - - Get the for the specified assembly - - not used - The default - - - The argument is not used. This selector does not create a - separate repository for each assembly. - - - As a named repository is not specified the default repository is - returned. The default repository is named log4net-default-repository. - - - - - - Get the named - - the name of the repository to lookup - The named - - - Get the named . The default - repository is log4net-default-repository. Other repositories - must be created using the . - If the named repository does not exist an exception is thrown. - - - throw if is null - throw if the does not exist - - - - Create a new repository for the assembly specified - - not used - the type of repository to create, must implement - the repository created - - - The argument is not used. This selector does not create a - separate repository for each assembly. - - - If the is null then the - default repository type specified to the constructor is used. - - - As a named repository is not specified the default repository is - returned. The default repository is named log4net-default-repository. - - - - - - Create a new repository for the repository specified - - the repository to associate with the - the type of repository to create, must implement . - If this param is null then the default repository type is used. - the repository created - - - The created will be associated with the repository - specified such that a call to with the - same repository specified will return the same repository instance. - - - If the named repository already exists an exception will be thrown. - - - If is null then the default - repository type specified to the constructor is used. - - - throw if is null - throw if the already exists - - - - Test if a named repository exists - - the named repository to check - true if the repository exists - - - Test if a named repository exists. Use - to create a new repository and to retrieve - a repository. - - - - - - Gets a list of objects - - an array of all known objects - - - Gets an array of all of the repositories created by this selector. - - - - - - Notify the registered listeners that the repository has been created - - The repository that has been created - - - Raises the LoggerRepositoryCreatedEvent - event. - - - - - - Event to notify that a logger repository has been created. - - - Event to notify that a logger repository has been created. - - - - Event raised when a new repository is created. - The event source will be this selector. The event args will - be a which - holds the newly created . - - - - - - The default implementation of the interface. - - - - Uses attributes defined on the calling assembly to determine how to - configure the hierarchy for the repository. - - - Nicko Cadell - Gert Driesen - - - - Creates a new repository selector. - - The type of the repositories to create, must implement - - - Create an new repository selector. - The default type for repositories must be specified, - an appropriate value would be . - - - is . - does not implement . - - - - Gets the for the specified assembly. - - The assembly use to lookup the . - - - The type of the created and the repository - to create can be overridden by specifying the - attribute on the . - - - The default values are to use the - implementation of the interface and to use the - as the name of the repository. - - - The created will be automatically configured using - any attributes defined on - the . - - - The for the assembly - is . - - - - Gets the for the specified repository. - - The repository to use to lookup the . - The for the specified repository. - - - Returns the named repository. If is null - a is thrown. If the repository - does not exist a is thrown. - - - Use to create a repository. - - - is . - does not exist. - - - - Create a new repository for the assembly specified - - the assembly to use to create the repository to associate with the . - The type of repository to create, must implement . - The repository created. - - - The created will be associated with the repository - specified such that a call to with the - same assembly specified will return the same repository instance. - - - The type of the created and - the repository to create can be overridden by specifying the - attribute on the - . The default values are to use the - implementation of the - interface and to use the - as the name of the repository. - - - The created will be automatically - configured using any - attributes defined on the . - - - If a repository for the already exists - that repository will be returned. An error will not be raised and that - repository may be of a different type to that specified in . - Also the attribute on the - assembly may be used to override the repository type specified in - . - - - is . - - - - Creates a new repository for the assembly specified. - - the assembly to use to create the repository to associate with the . - The type of repository to create, must implement . - The name to assign to the created repository - Set to true to read and apply the assembly attributes - The repository created. - - - The created will be associated with the repository - specified such that a call to with the - same assembly specified will return the same repository instance. - - - The type of the created and - the repository to create can be overridden by specifying the - attribute on the - . The default values are to use the - implementation of the - interface and to use the - as the name of the repository. - - - The created will be automatically - configured using any - attributes defined on the . - - - If a repository for the already exists - that repository will be returned. An error will not be raised and that - repository may be of a different type to that specified in . - Also the attribute on the - assembly may be used to override the repository type specified in - . - - - is . - - - - Creates a new repository for the specified repository. - - The repository to associate with the . - The type of repository to create, must implement . - If this param is then the default repository type is used. - The new repository. - - - The created will be associated with the repository - specified such that a call to with the - same repository specified will return the same repository instance. - - - is . - already exists. - - - - Test if a named repository exists - - the named repository to check - true if the repository exists - - - Test if a named repository exists. Use - to create a new repository and to retrieve - a repository. - - - - - - Gets a list of objects - - an array of all known objects - - - Gets an array of all of the repositories created by this selector. - - - - - - Aliases a repository to an existing repository. - - The repository to alias. - The repository that the repository is aliased to. - - - The repository specified will be aliased to the repository when created. - The repository must not already exist. - - - When the repository is created it must utilize the same repository type as - the repository it is aliased to, otherwise the aliasing will fail. - - - - is . - -or- - is . - - - - - Notifies the registered listeners that the repository has been created. - - The repository that has been created. - - - Raises the event. - - - - - - Gets the repository name and repository type for the specified assembly. - - The assembly that has a . - in/out param to hold the repository name to use for the assembly, caller should set this to the default value before calling. - in/out param to hold the type of the repository to create for the assembly, caller should set this to the default value before calling. - is . - - - - Configures the repository using information from the assembly. - - The assembly containing - attributes which define the configuration for the repository. - The repository to configure. - - is . - -or- - is . - - - - - Loads the attribute defined plugins on the assembly. - - The assembly that contains the attributes. - The repository to add the plugins to. - - is . - -or- - is . - - - - - Loads the attribute defined aliases on the assembly. - - The assembly that contains the attributes. - The repository to alias to. - - is . - -or- - is . - - - - - Event to notify that a logger repository has been created. - - - Event to notify that a logger repository has been created. - - - - Event raised when a new repository is created. - The event source will be this selector. The event args will - be a which - holds the newly created . - - - - - - Defined error codes that can be passed to the method. - - - - Values passed to the method. - - - Nicko Cadell - - - - A general error - - - - - Error while writing output - - - - - Failed to flush file - - - - - Failed to close file - - - - - Unable to open output file - - - - - No layout specified - - - - - Failed to parse address - - - - - Appenders may delegate their error handling to an . - - - - Error handling is a particularly tedious to get right because by - definition errors are hard to predict and to reproduce. - - - Nicko Cadell - Gert Driesen - - - - Handles the error and information about the error condition is passed as - a parameter. - - The message associated with the error. - The that was thrown when the error occurred. - The error code associated with the error. - - - Handles the error and information about the error condition is passed as - a parameter. - - - - - - Prints the error message passed as a parameter. - - The message associated with the error. - The that was thrown when the error occurred. - - - See . - - - - - - Prints the error message passed as a parameter. - - The message associated with the error. - - - See . - - - - - - Interface for objects that require fixing. - - - - Interface that indicates that the object requires fixing before it - can be taken outside the context of the appender's - method. - - - When objects that implement this interface are stored - in the context properties maps - and - are fixed - (see ) the - method will be called. - - - Nicko Cadell - - - - Get a portable version of this object - - the portable instance of this object - - - Get a portable instance object that represents the current - state of this object. The portable object can be stored - and logged from any thread with identical results. - - - - - - Interface that all loggers implement - - - - This interface supports logging events and testing if a level - is enabled for logging. - - - These methods will not throw exceptions. Note to implementor, ensure - that the implementation of these methods cannot allow an exception - to be thrown to the caller. - - - Nicko Cadell - Gert Driesen - - - - This generic form is intended to be used by wrappers. - - The declaring type of the method that is - the stack boundary into the logging system for this call. - The level of the message to be logged. - The message object to log. - the exception to log, including its stack trace. Pass null to not log an exception. - - - Generates a logging event for the specified using - the and . - - - - - - This is the most generic printing method that is intended to be used - by wrappers. - - The event being logged. - - - Logs the specified logging event through this logger. - - - - - - Checks if this logger is enabled for a given passed as parameter. - - The level to check. - - true if this logger is enabled for level, otherwise false. - - - - Test if this logger is going to log events of the specified . - - - - - - Gets the name of the logger. - - - The name of the logger. - - - - The name of this logger - - - - - - Gets the where this - Logger instance is attached to. - - - The that this logger belongs to. - - - - Gets the where this - Logger instance is attached to. - - - - - - Base interface for all wrappers - - - - Base interface for all wrappers. - - - All wrappers must implement this interface. - - - Nicko Cadell - - - - Get the implementation behind this wrapper object. - - - The object that in implementing this object. - - - - The object that in implementing this - object. The Logger object may not - be the same object as this object because of logger decorators. - This gets the actual underlying objects that is used to process - the log events. - - - - - - Delegate used to handle logger repository creation event notifications - - The which created the repository. - The event args - that holds the instance that has been created. - - - Delegate used to handle logger repository creation event notifications. - - - - - - Provides data for the event. - - - - A - event is raised every time a is created. - - - - - - The created - - - - - Construct instance using specified - - the that has been created - - - Construct instance using specified - - - - - - The that has been created - - - The that has been created - - - - The that has been created - - - - - - Test if an triggers an action - - - - Implementations of this interface allow certain appenders to decide - when to perform an appender specific action. - - - The action or behavior triggered is defined by the implementation. - - - Nicko Cadell - - - - Test if this event triggers the action - - The event to check - true if this event triggers the action, otherwise false - - - Return true if this event triggers the action - - - - - - Defines the default set of levels recognized by the system. - - - - Each has an associated . - - - Levels have a numeric that defines the relative - ordering between levels. Two Levels with the same - are deemed to be equivalent. - - - The levels that are recognized by log4net are set for each - and each repository can have different levels defined. The levels are stored - in the on the repository. Levels are - looked up by name from the . - - - When logging at level INFO the actual level used is not but - the value of LoggerRepository.LevelMap["INFO"]. The default value for this is - , but this can be changed by reconfiguring the level map. - - - Each level has a in addition to its . The - is the string that is written into the output log. By default - the display name is the same as the level name, but this can be used to alias levels - or to localize the log output. - - - Some of the predefined levels recognized by the system are: - - - - . - - - . - - - . - - - . - - - . - - - . - - - . - - - - Nicko Cadell - Gert Driesen - - - - Constructor - - Integer value for this level, higher values represent more severe levels. - The string name of this level. - The display name for this level. This may be localized or otherwise different from the name - - - Initializes a new instance of the class with - the specified level name and value. - - - - - - Constructor - - Integer value for this level, higher values represent more severe levels. - The string name of this level. - - - Initializes a new instance of the class with - the specified level name and value. - - - - - - Returns the representation of the current - . - - - A representation of the current . - - - - Returns the level . - - - - - - Compares levels. - - The object to compare against. - true if the objects are equal. - - - Compares the levels of instances, and - defers to base class if the target object is not a - instance. - - - - - - Returns a hash code - - A hash code for the current . - - - Returns a hash code suitable for use in hashing algorithms and data - structures like a hash table. - - - Returns the hash code of the level . - - - - - - Compares this instance to a specified object and returns an - indication of their relative values. - - A instance or to compare with this instance. - - A 32-bit signed integer that indicates the relative order of the - values compared. The return value has these meanings: - - - Value - Meaning - - - Less than zero - This instance is less than . - - - Zero - This instance is equal to . - - - Greater than zero - - This instance is greater than . - -or- - is . - - - - - - - must be an instance of - or ; otherwise, an exception is thrown. - - - is not a . - - - - Returns a value indicating whether a specified - is greater than another specified . - - A - A - - true if is greater than - ; otherwise, false. - - - - Compares two levels. - - - - - - Returns a value indicating whether a specified - is less than another specified . - - A - A - - true if is less than - ; otherwise, false. - - - - Compares two levels. - - - - - - Returns a value indicating whether a specified - is greater than or equal to another specified . - - A - A - - true if is greater than or equal to - ; otherwise, false. - - - - Compares two levels. - - - - - - Returns a value indicating whether a specified - is less than or equal to another specified . - - A - A - - true if is less than or equal to - ; otherwise, false. - - - - Compares two levels. - - - - - - Returns a value indicating whether two specified - objects have the same value. - - A or . - A or . - - true if the value of is the same as the - value of ; otherwise, false. - - - - Compares two levels. - - - - - - Returns a value indicating whether two specified - objects have different values. - - A or . - A or . - - true if the value of is different from - the value of ; otherwise, false. - - - - Compares two levels. - - - - - - Compares two specified instances. - - The first to compare. - The second to compare. - - A 32-bit signed integer that indicates the relative order of the - two values compared. The return value has these meanings: - - - Value - Meaning - - - Less than zero - is less than . - - - Zero - is equal to . - - - Greater than zero - is greater than . - - - - - - Compares two levels. - - - - - - The level designates a higher level than all the rest. - - - - - The level designates very severe error events. - System unusable, emergencies. - - - - - The level designates very severe error events - that will presumably lead the application to abort. - - - - - The level designates very severe error events. - Take immediate action, alerts. - - - - - The level designates very severe error events. - Critical condition, critical. - - - - - The level designates very severe error events. - - - - - The level designates error events that might - still allow the application to continue running. - - - - - The level designates potentially harmful - situations. - - - - - The level designates informational messages - that highlight the progress of the application at the highest level. - - - - - The level designates informational messages that - highlight the progress of the application at coarse-grained level. - - - - - The level designates fine-grained informational - events that are most useful to debug an application. - - - - - The level designates fine-grained informational - events that are most useful to debug an application. - - - - - The level designates fine-grained informational - events that are most useful to debug an application. - - - - - The level designates fine-grained informational - events that are most useful to debug an application. - - - - - The level designates fine-grained informational - events that are most useful to debug an application. - - - - - The level designates fine-grained informational - events that are most useful to debug an application. - - - - - The level designates the lowest level possible. - - - - - Gets the name of this level. - - - The name of this level. - - - - Gets the name of this level. - - - - - - Gets the value of this level. - - - The value of this level. - - - - Gets the value of this level. - - - - - - Gets the display name of this level. - - - The display name of this level. - - - - Gets the display name of this level. - - - - - - A strongly-typed collection of objects. - - Nicko Cadell - - - - Creates a read-only wrapper for a LevelCollection instance. - - list to create a readonly wrapper arround - - A LevelCollection wrapper that is read-only. - - - - - Initializes a new instance of the LevelCollection class - that is empty and has the default initial capacity. - - - - - Initializes a new instance of the LevelCollection class - that has the specified initial capacity. - - - The number of elements that the new LevelCollection is initially capable of storing. - - - - - Initializes a new instance of the LevelCollection class - that contains elements copied from the specified LevelCollection. - - The LevelCollection whose elements are copied to the new collection. - - - - Initializes a new instance of the LevelCollection class - that contains elements copied from the specified array. - - The array whose elements are copied to the new list. - - - - Initializes a new instance of the LevelCollection class - that contains elements copied from the specified collection. - - The collection whose elements are copied to the new list. - - - - Allow subclasses to avoid our default constructors - - - - - - Copies the entire LevelCollection to a one-dimensional - array. - - The one-dimensional array to copy to. - - - - Copies the entire LevelCollection to a one-dimensional - array, starting at the specified index of the target array. - - The one-dimensional array to copy to. - The zero-based index in at which copying begins. - - - - Adds a to the end of the LevelCollection. - - The to be added to the end of the LevelCollection. - The index at which the value has been added. - - - - Removes all elements from the LevelCollection. - - - - - Creates a shallow copy of the . - - A new with a shallow copy of the collection data. - - - - Determines whether a given is in the LevelCollection. - - The to check for. - true if is found in the LevelCollection; otherwise, false. - - - - Returns the zero-based index of the first occurrence of a - in the LevelCollection. - - The to locate in the LevelCollection. - - The zero-based index of the first occurrence of - in the entire LevelCollection, if found; otherwise, -1. - - - - - Inserts an element into the LevelCollection at the specified index. - - The zero-based index at which should be inserted. - The to insert. - - is less than zero - -or- - is equal to or greater than . - - - - - Removes the first occurrence of a specific from the LevelCollection. - - The to remove from the LevelCollection. - - The specified was not found in the LevelCollection. - - - - - Removes the element at the specified index of the LevelCollection. - - The zero-based index of the element to remove. - - is less than zero - -or- - is equal to or greater than . - - - - - Returns an enumerator that can iterate through the LevelCollection. - - An for the entire LevelCollection. - - - - Adds the elements of another LevelCollection to the current LevelCollection. - - The LevelCollection whose elements should be added to the end of the current LevelCollection. - The new of the LevelCollection. - - - - Adds the elements of a array to the current LevelCollection. - - The array whose elements should be added to the end of the LevelCollection. - The new of the LevelCollection. - - - - Adds the elements of a collection to the current LevelCollection. - - The collection whose elements should be added to the end of the LevelCollection. - The new of the LevelCollection. - - - - Sets the capacity to the actual number of elements. - - - - - is less than zero - -or- - is equal to or greater than . - - - - - is less than zero - -or- - is equal to or greater than . - - - - - Gets the number of elements actually contained in the LevelCollection. - - - - - Gets a value indicating whether access to the collection is synchronized (thread-safe). - - true if access to the ICollection is synchronized (thread-safe); otherwise, false. - - - - Gets an object that can be used to synchronize access to the collection. - - - - - Gets or sets the at the specified index. - - The zero-based index of the element to get or set. - - is less than zero - -or- - is equal to or greater than . - - - - - Gets a value indicating whether the collection has a fixed size. - - true if the collection has a fixed size; otherwise, false. The default is false - - - - Gets a value indicating whether the IList is read-only. - - true if the collection is read-only; otherwise, false. The default is false - - - - Gets or sets the number of elements the LevelCollection can contain. - - - - - Supports type-safe iteration over a . - - - - - Advances the enumerator to the next element in the collection. - - - true if the enumerator was successfully advanced to the next element; - false if the enumerator has passed the end of the collection. - - - The collection was modified after the enumerator was created. - - - - - Sets the enumerator to its initial position, before the first element in the collection. - - - - - Gets the current element in the collection. - - - - - Type visible only to our subclasses - Used to access protected constructor - - - - - A value - - - - - Supports simple iteration over a . - - - - - Initializes a new instance of the Enumerator class. - - - - - - Advances the enumerator to the next element in the collection. - - - true if the enumerator was successfully advanced to the next element; - false if the enumerator has passed the end of the collection. - - - The collection was modified after the enumerator was created. - - - - - Sets the enumerator to its initial position, before the first element in the collection. - - - - - Gets the current element in the collection. - - - - - An evaluator that triggers at a threshold level - - - - This evaluator will trigger if the level of the event - passed to - is equal to or greater than the - level. - - - Nicko Cadell - - - - The threshold for triggering - - - - - Create a new evaluator using the threshold. - - - - Create a new evaluator using the threshold. - - - This evaluator will trigger if the level of the event - passed to - is equal to or greater than the - level. - - - - - - Create a new evaluator using the specified threshold. - - the threshold to trigger at - - - Create a new evaluator using the specified threshold. - - - This evaluator will trigger if the level of the event - passed to - is equal to or greater than the - level. - - - - - - Is this the triggering event? - - The event to check - This method returns true, if the event level - is equal or higher than the . - Otherwise it returns false - - - This evaluator will trigger if the level of the event - passed to - is equal to or greater than the - level. - - - - - - the threshold to trigger at - - - The that will cause this evaluator to trigger - - - - This evaluator will trigger if the level of the event - passed to - is equal to or greater than the - level. - - - - - - Mapping between string name and Level object - - - - Mapping between string name and object. - This mapping is held separately for each . - The level name is case insensitive. - - - Nicko Cadell - - - - Mapping from level name to Level object. The - level name is case insensitive - - - - - Construct the level map - - - - Construct the level map. - - - - - - Clear the internal maps of all levels - - - - Clear the internal maps of all levels - - - - - - Create a new Level and add it to the map - - the string to display for the Level - the level value to give to the Level - - - Create a new Level and add it to the map - - - - - - - Create a new Level and add it to the map - - the string to display for the Level - the level value to give to the Level - the display name to give to the Level - - - Create a new Level and add it to the map - - - - - - Add a Level to the map - - the Level to add - - - Add a Level to the map - - - - - - Lookup a named level from the map - - the name of the level to lookup is taken from this level. - If the level is not set on the map then this level is added - the level in the map with the name specified - - - Lookup a named level from the map. The name of the level to lookup is taken - from the property of the - argument. - - - If no level with the specified name is found then the - argument is added to the level map - and returned. - - - - - - Lookup a by name - - The name of the Level to lookup - a Level from the map with the name specified - - - Returns the from the - map with the name specified. If the no level is - found then null is returned. - - - - - - Return all possible levels as a list of Level objects. - - all possible levels as a list of Level objects - - - Return all possible levels as a list of Level objects. - - - - - - The internal representation of caller location information. - - - - This class uses the System.Diagnostics.StackTrace class to generate - a call stack. The caller's information is then extracted from this stack. - - - The System.Diagnostics.StackTrace class is not supported on the - .NET Compact Framework 1.0 therefore caller location information is not - available on that framework. - - - The System.Diagnostics.StackTrace class has this to say about Release builds: - - - "StackTrace information will be most informative with Debug build configurations. - By default, Debug builds include debug symbols, while Release builds do not. The - debug symbols contain most of the file, method name, line number, and column - information used in constructing StackFrame and StackTrace objects. StackTrace - might not report as many method calls as expected, due to code transformations - that occur during optimization." - - - This means that in a Release build the caller information may be incomplete or may - not exist at all! Therefore caller location information cannot be relied upon in a Release build. - - - Nicko Cadell - Gert Driesen - - - - When location information is not available the constant - NA is returned. Current value of this string - constant is ?. - - - - - Constructor - - The declaring type of the method that is - the stack boundary into the logging system for this call. - - - Initializes a new instance of the - class based on the current thread. - - - - - - Constructor - - The fully qualified class name. - The method name. - The file name. - The line number of the method within the file. - - - Initializes a new instance of the - class with the specified data. - - - - - - Gets the fully qualified class name of the caller making the logging - request. - - - The fully qualified class name of the caller making the logging - request. - - - - Gets the fully qualified class name of the caller making the logging - request. - - - - - - Gets the file name of the caller. - - - The file name of the caller. - - - - Gets the file name of the caller. - - - - - - Gets the line number of the caller. - - - The line number of the caller. - - - - Gets the line number of the caller. - - - - - - Gets the method name of the caller. - - - The method name of the caller. - - - - Gets the method name of the caller. - - - - - - Gets all available caller information - - - All available caller information, in the format - fully.qualified.classname.of.caller.methodName(Filename:line) - - - - Gets all available caller information, in the format - fully.qualified.classname.of.caller.methodName(Filename:line) - - - - - - Static manager that controls the creation of repositories - - - - Static manager that controls the creation of repositories - - - This class is used by the wrapper managers (e.g. ) - to provide access to the objects. - - - This manager also holds the that is used to - lookup and create repositories. The selector can be set either programmatically using - the property, or by setting the log4net.RepositorySelector - AppSetting in the applications config file to the fully qualified type name of the - selector to use. - - - Nicko Cadell - Gert Driesen - - - - Private constructor to prevent instances. Only static methods should be used. - - - - Private constructor to prevent instances. Only static methods should be used. - - - - - - Hook the shutdown event - - - - On the full .NET runtime, the static constructor hooks up the - AppDomain.ProcessExit and AppDomain.DomainUnload> events. - These are used to shutdown the log4net system as the application exits. - - - - - - Register for ProcessExit and DomainUnload events on the AppDomain - - - - This needs to be in a separate method because the events make - a LinkDemand for the ControlAppDomain SecurityPermission. Because - this is a LinkDemand it is demanded at JIT time. Therefore we cannot - catch the exception in the method itself, we have to catch it in the - caller. - - - - - - Return the default instance. - - the repository to lookup in - Return the default instance - - - Gets the for the repository specified - by the argument. - - - - - - Returns the default instance. - - The assembly to use to lookup the repository. - The default instance. - - - - Return the default instance. - - the repository to lookup in - Return the default instance - - - Gets the for the repository specified - by the argument. - - - - - - Returns the default instance. - - The assembly to use to lookup the repository. - The default instance. - - - Returns the default instance. - - - - - - Returns the named logger if it exists. - - The repository to lookup in. - The fully qualified logger name to look for. - - The logger found, or null if the named logger does not exist in the - specified repository. - - - - If the named logger exists (in the specified repository) then it - returns a reference to the logger, otherwise it returns - null. - - - - - - Returns the named logger if it exists. - - The assembly to use to lookup the repository. - The fully qualified logger name to look for. - - The logger found, or null if the named logger does not exist in the - specified assembly's repository. - - - - If the named logger exists (in the specified assembly's repository) then it - returns a reference to the logger, otherwise it returns - null. - - - - - - Returns all the currently defined loggers in the specified repository. - - The repository to lookup in. - All the defined loggers. - - - The root logger is not included in the returned array. - - - - - - Returns all the currently defined loggers in the specified assembly's repository. - - The assembly to use to lookup the repository. - All the defined loggers. - - - The root logger is not included in the returned array. - - - - - - Retrieves or creates a named logger. - - The repository to lookup in. - The name of the logger to retrieve. - The logger with the name specified. - - - Retrieves a logger named as the - parameter. If the named logger already exists, then the - existing instance will be returned. Otherwise, a new instance is - created. - - - By default, loggers do not have a set level but inherit - it from the hierarchy. This is one of the central features of - log4net. - - - - - - Retrieves or creates a named logger. - - The assembly to use to lookup the repository. - The name of the logger to retrieve. - The logger with the name specified. - - - Retrieves a logger named as the - parameter. If the named logger already exists, then the - existing instance will be returned. Otherwise, a new instance is - created. - - - By default, loggers do not have a set level but inherit - it from the hierarchy. This is one of the central features of - log4net. - - - - - - Shorthand for . - - The repository to lookup in. - The of which the fullname will be used as the name of the logger to retrieve. - The logger with the name specified. - - - Gets the logger for the fully qualified name of the type specified. - - - - - - Shorthand for . - - the assembly to use to lookup the repository - The of which the fullname will be used as the name of the logger to retrieve. - The logger with the name specified. - - - Gets the logger for the fully qualified name of the type specified. - - - - - - Shuts down the log4net system. - - - - Calling this method will safely close and remove all - appenders in all the loggers including root contained in all the - default repositories. - - - Some appenders need to be closed before the application exists. - Otherwise, pending logging events might be lost. - - - The shutdown method is careful to close nested - appenders before closing regular appenders. This is allows - configurations where a regular appender is attached to a logger - and again to a nested appender. - - - - - - Shuts down the repository for the repository specified. - - The repository to shutdown. - - - Calling this method will safely close and remove all - appenders in all the loggers including root contained in the - repository for the specified. - - - Some appenders need to be closed before the application exists. - Otherwise, pending logging events might be lost. - - - The shutdown method is careful to close nested - appenders before closing regular appenders. This is allows - configurations where a regular appender is attached to a logger - and again to a nested appender. - - - - - - Shuts down the repository for the repository specified. - - The assembly to use to lookup the repository. - - - Calling this method will safely close and remove all - appenders in all the loggers including root contained in the - repository for the repository. The repository is looked up using - the specified. - - - Some appenders need to be closed before the application exists. - Otherwise, pending logging events might be lost. - - - The shutdown method is careful to close nested - appenders before closing regular appenders. This is allows - configurations where a regular appender is attached to a logger - and again to a nested appender. - - - - - - Resets all values contained in this repository instance to their defaults. - - The repository to reset. - - - Resets all values contained in the repository instance to their - defaults. This removes all appenders from all loggers, sets - the level of all non-root loggers to null, - sets their additivity flag to true and sets the level - of the root logger to . Moreover, - message disabling is set its default "off" value. - - - - - - Resets all values contained in this repository instance to their defaults. - - The assembly to use to lookup the repository to reset. - - - Resets all values contained in the repository instance to their - defaults. This removes all appenders from all loggers, sets - the level of all non-root loggers to null, - sets their additivity flag to true and sets the level - of the root logger to . Moreover, - message disabling is set its default "off" value. - - - - - - Creates a repository with the specified name. - - The name of the repository, this must be unique amongst repositories. - The created for the repository. - - - CreateDomain is obsolete. Use CreateRepository instead of CreateDomain. - - - Creates the default type of which is a - object. - - - The name must be unique. Repositories cannot be redefined. - An will be thrown if the repository already exists. - - - The specified repository already exists. - - - - Creates a repository with the specified name. - - The name of the repository, this must be unique amongst repositories. - The created for the repository. - - - Creates the default type of which is a - object. - - - The name must be unique. Repositories cannot be redefined. - An will be thrown if the repository already exists. - - - The specified repository already exists. - - - - Creates a repository with the specified name and repository type. - - The name of the repository, this must be unique to the repository. - A that implements - and has a no arg constructor. An instance of this type will be created to act - as the for the repository specified. - The created for the repository. - - - CreateDomain is obsolete. Use CreateRepository instead of CreateDomain. - - - The name must be unique. Repositories cannot be redefined. - An Exception will be thrown if the repository already exists. - - - The specified repository already exists. - - - - Creates a repository with the specified name and repository type. - - The name of the repository, this must be unique to the repository. - A that implements - and has a no arg constructor. An instance of this type will be created to act - as the for the repository specified. - The created for the repository. - - - The name must be unique. Repositories cannot be redefined. - An Exception will be thrown if the repository already exists. - - - The specified repository already exists. - - - - Creates a repository for the specified assembly and repository type. - - The assembly to use to get the name of the repository. - A that implements - and has a no arg constructor. An instance of this type will be created to act - as the for the repository specified. - The created for the repository. - - - CreateDomain is obsolete. Use CreateRepository instead of CreateDomain. - - - The created will be associated with the repository - specified such that a call to with the - same assembly specified will return the same repository instance. - - - - - - Creates a repository for the specified assembly and repository type. - - The assembly to use to get the name of the repository. - A that implements - and has a no arg constructor. An instance of this type will be created to act - as the for the repository specified. - The created for the repository. - - - The created will be associated with the repository - specified such that a call to with the - same assembly specified will return the same repository instance. - - - - - - Gets an array of all currently defined repositories. - - An array of all the known objects. - - - Gets an array of all currently defined repositories. - - - - - - Internal method to get pertinent version info. - - A string of version info. - - - - Called when the event fires - - the that is exiting - null - - - Called when the event fires. - - - When the event is triggered the log4net system is . - - - - - - Called when the event fires - - the that is exiting - null - - - Called when the event fires. - - - When the event is triggered the log4net system is . - - - - - - Initialize the default repository selector - - - - - Gets or sets the repository selector used by the . - - - The repository selector used by the . - - - - The repository selector () is used by - the to create and select repositories - (). - - - The caller to supplies either a string name - or an assembly (if not supplied the assembly is inferred using - ). - - - This context is used by the selector to lookup a specific repository. - - - For the full .NET Framework, the default repository is DefaultRepositorySelector; - for the .NET Compact Framework CompactRepositorySelector is the default - repository. - - - - - - Implementation of the interface. - - - - This class should be used as the base for all wrapper implementations. - - - Nicko Cadell - Gert Driesen - - - - Constructs a new wrapper for the specified logger. - - The logger to wrap. - - - Constructs a new wrapper for the specified logger. - - - - - - The logger that this object is wrapping - - - - - Gets the implementation behind this wrapper object. - - - The object that this object is implementing. - - - - The Logger object may not be the same object as this object - because of logger decorators. - - - This gets the actual underlying objects that is used to process - the log events. - - - - - - Portable data structure used by - - - - Portable data structure used by - - - Nicko Cadell - - - - The logger name. - - - - The logger name. - - - - - - Level of logging event. - - - - Level of logging event. Level cannot be Serializable - because it is a flyweight. Due to its special serialization it - cannot be declared final either. - - - - - - The application supplied message. - - - - The application supplied message of logging event. - - - - - - The name of thread - - - - The name of thread in which this logging event was generated - - - - - - The time the event was logged - - - - The TimeStamp is stored in the local time zone for this computer. - - - - - - Location information for the caller. - - - - Location information for the caller. - - - - - - String representation of the user - - - - String representation of the user's windows name, - like DOMAIN\username - - - - - - String representation of the identity. - - - - String representation of the current thread's principal identity. - - - - - - The string representation of the exception - - - - The string representation of the exception - - - - - - String representation of the AppDomain. - - - - String representation of the AppDomain. - - - - - - Additional event specific properties - - - - A logger or an appender may attach additional - properties to specific events. These properties - have a string key and an object value. - - - - - - Flags passed to the property - - - - Flags passed to the property - - - Nicko Cadell - - - - Fix the MDC - - - - - Fix the NDC - - - - - Fix the rendered message - - - - - Fix the thread name - - - - - Fix the callers location information - - - CAUTION: Very slow to generate - - - - - Fix the callers windows user name - - - CAUTION: Slow to generate - - - - - Fix the domain friendly name - - - - - Fix the callers principal name - - - CAUTION: May be slow to generate - - - - - Fix the exception text - - - - - Fix the event properties - - - - - No fields fixed - - - - - All fields fixed - - - - - Partial fields fixed - - - - This set of partial fields gives good performance. The following fields are fixed: - - - - - - - - - - - - - The internal representation of logging events. - - - - When an affirmative decision is made to log then a - instance is created. This instance - is passed around to the different log4net components. - - - This class is of concern to those wishing to extend log4net. - - - Some of the values in instances of - are considered volatile, that is the values are correct at the - time the event is delivered to appenders, but will not be consistent - at any time afterwards. If an event is to be stored and then processed - at a later time these volatile values must be fixed by calling - . There is a performance penalty - for incurred by calling but it - is essential to maintaining data consistency. - - - Nicko Cadell - Gert Driesen - Douglas de la Torre - Daniel Cazzulino - - - - The key into the Properties map for the host name value. - - - - - The key into the Properties map for the thread identity value. - - - - - The key into the Properties map for the user name value. - - - - - Initializes a new instance of the class - from the supplied parameters. - - The declaring type of the method that is - the stack boundary into the logging system for this call. - The repository this event is logged in. - The name of the logger of this event. - The level of this event. - The message of this event. - The exception for this event. - - - Except , and , - all fields of LoggingEvent are filled when actually needed. Call - to cache all data locally - to prevent inconsistencies. - - This method is called by the log4net framework - to create a logging event. - - - - - - Initializes a new instance of the class - using specific data. - - The declaring type of the method that is - the stack boundary into the logging system for this call. - The repository this event is logged in. - Data used to initialize the logging event. - The fields in the struct that have already been fixed. - - - This constructor is provided to allow a - to be created independently of the log4net framework. This can - be useful if you require a custom serialization scheme. - - - Use the method to obtain an - instance of the class. - - - The parameter should be used to specify which fields in the - struct have been preset. Fields not specified in the - will be captured from the environment if requested or fixed. - - - - - - Initializes a new instance of the class - using specific data. - - The declaring type of the method that is - the stack boundary into the logging system for this call. - The repository this event is logged in. - Data used to initialize the logging event. - - - This constructor is provided to allow a - to be created independently of the log4net framework. This can - be useful if you require a custom serialization scheme. - - - Use the method to obtain an - instance of the class. - - - This constructor sets this objects flags to , - this assumes that all the data relating to this event is passed in via the - parameter and no other data should be captured from the environment. - - - - - - Initializes a new instance of the class - using specific data. - - Data used to initialize the logging event. - - - This constructor is provided to allow a - to be created independently of the log4net framework. This can - be useful if you require a custom serialization scheme. - - - Use the method to obtain an - instance of the class. - - - This constructor sets this objects flags to , - this assumes that all the data relating to this event is passed in via the - parameter and no other data should be captured from the environment. - - - - - - Serialization constructor - - The that holds the serialized object data. - The that contains contextual information about the source or destination. - - - Initializes a new instance of the class - with serialized data. - - - - - - Ensure that the repository is set. - - the value for the repository - - - - Write the rendered message to a TextWriter - - the writer to write the message to - - - Unlike the property this method - does store the message data in the internal cache. Therefore - if called only once this method should be faster than the - property, however if the message is - to be accessed multiple times then the property will be more efficient. - - - - - - Serializes this object into the provided. - - The to populate with data. - The destination for this serialization. - - - The data in this event must be fixed before it can be serialized. - - - The method must be called during the - method call if this event - is to be used outside that method. - - - - - - Gets the portable data for this . - - The for this event. - - - A new can be constructed using a - instance. - - - Does a fix of the data - in the logging event before returning the event data. - - - - - - Gets the portable data for this . - - The set of data to ensure is fixed in the LoggingEventData - The for this event. - - - A new can be constructed using a - instance. - - - - - - Returns this event's exception's rendered using the - . - - - This event's exception's rendered using the . - - - - Obsolete. Use instead. - - - - - - Returns this event's exception's rendered using the - . - - - This event's exception's rendered using the . - - - - Returns this event's exception's rendered using the - . - - - - - - Fix instance fields that hold volatile data. - - - - Some of the values in instances of - are considered volatile, that is the values are correct at the - time the event is delivered to appenders, but will not be consistent - at any time afterwards. If an event is to be stored and then processed - at a later time these volatile values must be fixed by calling - . There is a performance penalty - incurred by calling but it - is essential to maintaining data consistency. - - - Calling is equivalent to - calling passing the parameter - false. - - - See for more - information. - - - - - - Fixes instance fields that hold volatile data. - - Set to true to not fix data that takes a long time to fix. - - - Some of the values in instances of - are considered volatile, that is the values are correct at the - time the event is delivered to appenders, but will not be consistent - at any time afterwards. If an event is to be stored and then processed - at a later time these volatile values must be fixed by calling - . There is a performance penalty - for incurred by calling but it - is essential to maintaining data consistency. - - - The param controls the data that - is fixed. Some of the data that can be fixed takes a long time to - generate, therefore if you do not require those settings to be fixed - they can be ignored by setting the param - to true. This setting will ignore the - and settings. - - - Set to false to ensure that all - settings are fixed. - - - - - - Fix the fields specified by the parameter - - the fields to fix - - - Only fields specified in the will be fixed. - Fields will not be fixed if they have previously been fixed. - It is not possible to 'unfix' a field. - - - - - - Lookup a composite property in this event - - the key for the property to lookup - the value for the property - - - This event has composite properties that combine together properties from - several different contexts in the following order: - - - this events properties - - This event has that can be set. These - properties are specific to this event only. - - - - the thread properties - - The that are set on the current - thread. These properties are shared by all events logged on this thread. - - - - the global properties - - The that are set globally. These - properties are shared by all the threads in the AppDomain. - - - - - - - - - Get all the composite properties in this event - - the containing all the properties - - - See for details of the composite properties - stored by the event. - - - This method returns a single containing all the - properties defined for this event. - - - - - - The internal logging event data. - - - - - The internal logging event data. - - - - - The internal logging event data. - - - - - The fully qualified Type of the calling - logger class in the stack frame (i.e. the declaring type of the method). - - - - - The application supplied message of logging event. - - - - - The exception that was thrown. - - - This is not serialized. The string representation - is serialized instead. - - - - - The repository that generated the logging event - - - This is not serialized. - - - - - The fix state for this event - - - These flags indicate which fields have been fixed. - Not serialized. - - - - - Indicated that the internal cache is updateable (ie not fixed) - - - This is a seperate flag to m_fixFlags as it allows incrementel fixing and simpler - changes in the caching strategy. - - - - - Gets the time when the current process started. - - - This is the time when this process started. - - - - The TimeStamp is stored in the local time zone for this computer. - - - Tries to get the start time for the current process. - Failing that it returns the time of the first call to - this property. - - - Note that AppDomains may be loaded and unloaded within the - same process without the process terminating and therefore - without the process start time being reset. - - - - - - Gets the of the logging event. - - - The of the logging event. - - - - Gets the of the logging event. - - - - - - Gets the time of the logging event. - - - The time of the logging event. - - - - The TimeStamp is stored in the local time zone for this computer. - - - - - - Gets the name of the logger that logged the event. - - - The name of the logger that logged the event. - - - - Gets the name of the logger that logged the event. - - - - - - Gets the location information for this logging event. - - - The location information for this logging event. - - - - The collected information is cached for future use. - - - See the class for more information on - supported frameworks and the different behavior in Debug and - Release builds. - - - - - - Gets the message object used to initialize this event. - - - The message object used to initialize this event. - - - - Gets the message object used to initialize this event. - Note that this event may not have a valid message object. - If the event is serialized the message object will not - be transferred. To get the text of the message the - property must be used - not this property. - - - If there is no defined message object for this event then - null will be returned. - - - - - - Gets the exception object used to initialize this event. - - - The exception object used to initialize this event. - - - - Gets the exception object used to initialize this event. - Note that this event may not have a valid exception object. - If the event is serialized the exception object will not - be transferred. To get the text of the exception the - method must be used - not this property. - - - If there is no defined exception object for this event then - null will be returned. - - - - - - The that this event was created in. - - - - The that this event was created in. - - - - - - Gets the message, rendered through the . - - - The message rendered through the . - - - - The collected information is cached for future use. - - - - - - Gets the name of the current thread. - - - The name of the current thread, or the thread ID when - the name is not available. - - - - The collected information is cached for future use. - - - - - - Gets the name of the current user. - - - The name of the current user, or NOT AVAILABLE when the - underlying runtime has no support for retrieving the name of the - current user. - - - - Calls WindowsIdentity.GetCurrent().Name to get the name of - the current windows user. - - - To improve performance, we could cache the string representation of - the name, and reuse that as long as the identity stayed constant. - Once the identity changed, we would need to re-assign and re-render - the string. - - - However, the WindowsIdentity.GetCurrent() call seems to - return different objects every time, so the current implementation - doesn't do this type of caching. - - - Timing for these operations: - - - - Method - Results - - - WindowsIdentity.GetCurrent() - 10000 loops, 00:00:00.2031250 seconds - - - WindowsIdentity.GetCurrent().Name - 10000 loops, 00:00:08.0468750 seconds - - - - This means we could speed things up almost 40 times by caching the - value of the WindowsIdentity.GetCurrent().Name property, since - this takes (8.04-0.20) = 7.84375 seconds. - - - - - - Gets the identity of the current thread principal. - - - The string name of the identity of the current thread principal. - - - - Calls System.Threading.Thread.CurrentPrincipal.Identity.Name to get - the name of the current thread principal. - - - - - - Gets the AppDomain friendly name. - - - The AppDomain friendly name. - - - - Gets the AppDomain friendly name. - - - - - - Additional event specific properties. - - - Additional event specific properties. - - - - A logger or an appender may attach additional - properties to specific events. These properties - have a string key and an object value. - - - This property is for events that have been added directly to - this event. The aggregate properties (which include these - event properties) can be retrieved using - and . - - - Once the properties have been fixed this property - returns the combined cached properties. This ensures that updates to - this property are always reflected in the underlying storage. When - returning the combined properties there may be more keys in the - Dictionary than expected. - - - - - - The fixed fields in this event - - - The set of fields that are fixed in this event - - - - Fields will not be fixed if they have previously been fixed. - It is not possible to 'unfix' a field. - - - - - - Implementation of wrapper interface. - - - - This implementation of the interface - forwards to the held by the base class. - - - This logger has methods to allow the caller to log at the following - levels: - - - - DEBUG - - The and methods log messages - at the DEBUG level. That is the level with that name defined in the - repositories . The default value - for this level is . The - property tests if this level is enabled for logging. - - - - INFO - - The and methods log messages - at the INFO level. That is the level with that name defined in the - repositories . The default value - for this level is . The - property tests if this level is enabled for logging. - - - - WARN - - The and methods log messages - at the WARN level. That is the level with that name defined in the - repositories . The default value - for this level is . The - property tests if this level is enabled for logging. - - - - ERROR - - The and methods log messages - at the ERROR level. That is the level with that name defined in the - repositories . The default value - for this level is . The - property tests if this level is enabled for logging. - - - - FATAL - - The and methods log messages - at the FATAL level. That is the level with that name defined in the - repositories . The default value - for this level is . The - property tests if this level is enabled for logging. - - - - - The values for these levels and their semantic meanings can be changed by - configuring the for the repository. - - - Nicko Cadell - Gert Driesen - - - - The ILog interface is use by application to log messages into - the log4net framework. - - - - Use the to obtain logger instances - that implement this interface. The - static method is used to get logger instances. - - - This class contains methods for logging at different levels and also - has properties for determining if those logging levels are - enabled in the current configuration. - - - This interface can be implemented in different ways. This documentation - specifies reasonable behavior that a caller can expect from the actual - implementation, however different implementations reserve the right to - do things differently. - - - Simple example of logging messages - - ILog log = LogManager.GetLogger("application-log"); - - log.Info("Application Start"); - log.Debug("This is a debug message"); - - if (log.IsDebugEnabled) - { - log.Debug("This is another debug message"); - } - - - - - Nicko Cadell - Gert Driesen - - - Log a message object with the level. - - Log a message object with the level. - - The message object to log. - - - This method first checks if this logger is DEBUG - enabled by comparing the level of this logger with the - level. If this logger is - DEBUG enabled, then it converts the message object - (passed as parameter) to a string by invoking the appropriate - . It then - proceeds to call all the registered appenders in this logger - and also higher in the hierarchy depending on the value of - the additivity flag. - - WARNING Note that passing an - to this method will print the name of the - but no stack trace. To print a stack trace use the - form instead. - - - - - - - - Log a message object with the level including - the stack trace of the passed - as a parameter. - - The message object to log. - The exception to log, including its stack trace. - - - See the form for more detailed information. - - - - - - - Log a formatted string with the level. - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object to format - An Object to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object to format - An Object to format - An Object to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - An that supplies culture-specific formatting information - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - Log a message object with the level. - - Logs a message object with the level. - - - - This method first checks if this logger is INFO - enabled by comparing the level of this logger with the - level. If this logger is - INFO enabled, then it converts the message object - (passed as parameter) to a string by invoking the appropriate - . It then - proceeds to call all the registered appenders in this logger - and also higher in the hierarchy depending on the value of the - additivity flag. - - WARNING Note that passing an - to this method will print the name of the - but no stack trace. To print a stack trace use the - form instead. - - - The message object to log. - - - - - - Logs a message object with the INFO level including - the stack trace of the passed - as a parameter. - - The message object to log. - The exception to log, including its stack trace. - - - See the form for more detailed information. - - - - - - - Log a formatted message string with the level. - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object to format - An Object to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object to format - An Object to format - An Object to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - An that supplies culture-specific formatting information - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - Log a message object with the level. - - Log a message object with the level. - - - - This method first checks if this logger is WARN - enabled by comparing the level of this logger with the - level. If this logger is - WARN enabled, then it converts the message object - (passed as parameter) to a string by invoking the appropriate - . It then - proceeds to call all the registered appenders in this logger - and also higher in the hierarchy depending on the value of the - additivity flag. - - WARNING Note that passing an - to this method will print the name of the - but no stack trace. To print a stack trace use the - form instead. - - - The message object to log. - - - - - - Log a message object with the level including - the stack trace of the passed - as a parameter. - - The message object to log. - The exception to log, including its stack trace. - - - See the form for more detailed information. - - - - - - - Log a formatted message string with the level. - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object to format - An Object to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object to format - An Object to format - An Object to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - An that supplies culture-specific formatting information - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - Log a message object with the level. - - Logs a message object with the level. - - The message object to log. - - - This method first checks if this logger is ERROR - enabled by comparing the level of this logger with the - level. If this logger is - ERROR enabled, then it converts the message object - (passed as parameter) to a string by invoking the appropriate - . It then - proceeds to call all the registered appenders in this logger - and also higher in the hierarchy depending on the value of the - additivity flag. - - WARNING Note that passing an - to this method will print the name of the - but no stack trace. To print a stack trace use the - form instead. - - - - - - - - Log a message object with the level including - the stack trace of the passed - as a parameter. - - The message object to log. - The exception to log, including its stack trace. - - - See the form for more detailed information. - - - - - - - Log a formatted message string with the level. - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object to format - An Object to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object to format - An Object to format - An Object to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - An that supplies culture-specific formatting information - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - Log a message object with the level. - - Log a message object with the level. - - - - This method first checks if this logger is FATAL - enabled by comparing the level of this logger with the - level. If this logger is - FATAL enabled, then it converts the message object - (passed as parameter) to a string by invoking the appropriate - . It then - proceeds to call all the registered appenders in this logger - and also higher in the hierarchy depending on the value of the - additivity flag. - - WARNING Note that passing an - to this method will print the name of the - but no stack trace. To print a stack trace use the - form instead. - - - The message object to log. - - - - - - Log a message object with the level including - the stack trace of the passed - as a parameter. - - The message object to log. - The exception to log, including its stack trace. - - - See the form for more detailed information. - - - - - - - Log a formatted message string with the level. - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object to format - An Object to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - A String containing zero or more format items - An Object to format - An Object to format - An Object to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Logs a formatted message string with the level. - - An that supplies culture-specific formatting information - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the String.Format method. See - for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - - - Checks if this logger is enabled for the level. - - - true if this logger is enabled for events, false otherwise. - - - - This function is intended to lessen the computational cost of - disabled log debug statements. - - For some ILog interface log, when you write: - - log.Debug("This is entry number: " + i ); - - - You incur the cost constructing the message, string construction and concatenation in - this case, regardless of whether the message is logged or not. - - - If you are worried about speed (who isn't), then you should write: - - - if (log.IsDebugEnabled) - { - log.Debug("This is entry number: " + i ); - } - - - This way you will not incur the cost of parameter - construction if debugging is disabled for log. On - the other hand, if the log is debug enabled, you - will incur the cost of evaluating whether the logger is debug - enabled twice. Once in and once in - the . This is an insignificant overhead - since evaluating a logger takes about 1% of the time it - takes to actually log. This is the preferred style of logging. - - Alternatively if your logger is available statically then the is debug - enabled state can be stored in a static variable like this: - - - private static readonly bool isDebugEnabled = log.IsDebugEnabled; - - - Then when you come to log you can write: - - - if (isDebugEnabled) - { - log.Debug("This is entry number: " + i ); - } - - - This way the debug enabled state is only queried once - when the class is loaded. Using a private static readonly - variable is the most efficient because it is a run time constant - and can be heavily optimized by the JIT compiler. - - - Of course if you use a static readonly variable to - hold the enabled state of the logger then you cannot - change the enabled state at runtime to vary the logging - that is produced. You have to decide if you need absolute - speed or runtime flexibility. - - - - - - - - Checks if this logger is enabled for the level. - - - true if this logger is enabled for events, false otherwise. - - - For more information see . - - - - - - - - Checks if this logger is enabled for the level. - - - true if this logger is enabled for events, false otherwise. - - - For more information see . - - - - - - - - Checks if this logger is enabled for the level. - - - true if this logger is enabled for events, false otherwise. - - - For more information see . - - - - - - - - Checks if this logger is enabled for the level. - - - true if this logger is enabled for events, false otherwise. - - - For more information see . - - - - - - - - Construct a new wrapper for the specified logger. - - The logger to wrap. - - - Construct a new wrapper for the specified logger. - - - - - - Virtual method called when the configuration of the repository changes - - the repository holding the levels - - - Virtual method called when the configuration of the repository changes - - - - - - Logs a message object with the DEBUG level. - - The message object to log. - - - This method first checks if this logger is DEBUG - enabled by comparing the level of this logger with the - DEBUG level. If this logger is - DEBUG enabled, then it converts the message object - (passed as parameter) to a string by invoking the appropriate - . It then - proceeds to call all the registered appenders in this logger - and also higher in the hierarchy depending on the value of the - additivity flag. - - - WARNING Note that passing an - to this method will print the name of the - but no stack trace. To print a stack trace use the - form instead. - - - - - - Logs a message object with the DEBUG level - - The message object to log. - The exception to log, including its stack trace. - - - Logs a message object with the DEBUG level including - the stack trace of the passed - as a parameter. - - - See the form for more detailed information. - - - - - - - Logs a formatted message string with the DEBUG level. - - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the DEBUG level. - - A String containing zero or more format items - An Object to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the DEBUG level. - - A String containing zero or more format items - An Object to format - An Object to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the DEBUG level. - - A String containing zero or more format items - An Object to format - An Object to format - An Object to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the DEBUG level. - - An that supplies culture-specific formatting information - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a message object with the INFO level. - - The message object to log. - - - This method first checks if this logger is INFO - enabled by comparing the level of this logger with the - INFO level. If this logger is - INFO enabled, then it converts the message object - (passed as parameter) to a string by invoking the appropriate - . It then - proceeds to call all the registered appenders in this logger - and also higher in the hierarchy depending on the value of - the additivity flag. - - - WARNING Note that passing an - to this method will print the name of the - but no stack trace. To print a stack trace use the - form instead. - - - - - - Logs a message object with the INFO level. - - The message object to log. - The exception to log, including its stack trace. - - - Logs a message object with the INFO level including - the stack trace of the - passed as a parameter. - - - See the form for more detailed information. - - - - - - - Logs a formatted message string with the INFO level. - - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the INFO level. - - A String containing zero or more format items - An Object to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the INFO level. - - A String containing zero or more format items - An Object to format - An Object to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the INFO level. - - A String containing zero or more format items - An Object to format - An Object to format - An Object to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the INFO level. - - An that supplies culture-specific formatting information - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a message object with the WARN level. - - the message object to log - - - This method first checks if this logger is WARN - enabled by comparing the level of this logger with the - WARN level. If this logger is - WARN enabled, then it converts the message object - (passed as parameter) to a string by invoking the appropriate - . It then - proceeds to call all the registered appenders in this logger and - also higher in the hierarchy depending on the value of the - additivity flag. - - - WARNING Note that passing an to this - method will print the name of the but no - stack trace. To print a stack trace use the - form instead. - - - - - - Logs a message object with the WARN level - - The message object to log. - The exception to log, including its stack trace. - - - Logs a message object with the WARN level including - the stack trace of the - passed as a parameter. - - - See the form for more detailed information. - - - - - - - Logs a formatted message string with the WARN level. - - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the WARN level. - - A String containing zero or more format items - An Object to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the WARN level. - - A String containing zero or more format items - An Object to format - An Object to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the WARN level. - - A String containing zero or more format items - An Object to format - An Object to format - An Object to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the WARN level. - - An that supplies culture-specific formatting information - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a message object with the ERROR level. - - The message object to log. - - - This method first checks if this logger is ERROR - enabled by comparing the level of this logger with the - ERROR level. If this logger is - ERROR enabled, then it converts the message object - (passed as parameter) to a string by invoking the appropriate - . It then - proceeds to call all the registered appenders in this logger and - also higher in the hierarchy depending on the value of the - additivity flag. - - - WARNING Note that passing an to this - method will print the name of the but no - stack trace. To print a stack trace use the - form instead. - - - - - - Logs a message object with the ERROR level - - The message object to log. - The exception to log, including its stack trace. - - - Logs a message object with the ERROR level including - the stack trace of the - passed as a parameter. - - - See the form for more detailed information. - - - - - - - Logs a formatted message string with the ERROR level. - - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the ERROR level. - - A String containing zero or more format items - An Object to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the ERROR level. - - A String containing zero or more format items - An Object to format - An Object to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the ERROR level. - - A String containing zero or more format items - An Object to format - An Object to format - An Object to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the ERROR level. - - An that supplies culture-specific formatting information - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a message object with the FATAL level. - - The message object to log. - - - This method first checks if this logger is FATAL - enabled by comparing the level of this logger with the - FATAL level. If this logger is - FATAL enabled, then it converts the message object - (passed as parameter) to a string by invoking the appropriate - . It then - proceeds to call all the registered appenders in this logger and - also higher in the hierarchy depending on the value of the - additivity flag. - - - WARNING Note that passing an to this - method will print the name of the but no - stack trace. To print a stack trace use the - form instead. - - - - - - Logs a message object with the FATAL level - - The message object to log. - The exception to log, including its stack trace. - - - Logs a message object with the FATAL level including - the stack trace of the - passed as a parameter. - - - See the form for more detailed information. - - - - - - - Logs a formatted message string with the FATAL level. - - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the FATAL level. - - A String containing zero or more format items - An Object to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the FATAL level. - - A String containing zero or more format items - An Object to format - An Object to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the FATAL level. - - A String containing zero or more format items - An Object to format - An Object to format - An Object to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - The string is formatted using the - format provider. To specify a localized provider use the - method. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Logs a formatted message string with the FATAL level. - - An that supplies culture-specific formatting information - A String containing zero or more format items - An Object array containing zero or more objects to format - - - The message is formatted using the method. See - String.Format for details of the syntax of the format string and the behavior - of the formatting. - - - This method does not take an object to include in the - log event. To pass an use one of the - methods instead. - - - - - - Event handler for the event - - the repository - Empty - - - - The fully qualified name of this declaring type not the type of any subclass. - - - - - Checks if this logger is enabled for the DEBUG - level. - - - true if this logger is enabled for DEBUG events, - false otherwise. - - - - This function is intended to lessen the computational cost of - disabled log debug statements. - - - For some log Logger object, when you write: - - - log.Debug("This is entry number: " + i ); - - - You incur the cost constructing the message, concatenation in - this case, regardless of whether the message is logged or not. - - - If you are worried about speed, then you should write: - - - if (log.IsDebugEnabled()) - { - log.Debug("This is entry number: " + i ); - } - - - This way you will not incur the cost of parameter - construction if debugging is disabled for log. On - the other hand, if the log is debug enabled, you - will incur the cost of evaluating whether the logger is debug - enabled twice. Once in IsDebugEnabled and once in - the Debug. This is an insignificant overhead - since evaluating a logger takes about 1% of the time it - takes to actually log. - - - - - - Checks if this logger is enabled for the INFO level. - - - true if this logger is enabled for INFO events, - false otherwise. - - - - See for more information and examples - of using this method. - - - - - - - Checks if this logger is enabled for the WARN level. - - - true if this logger is enabled for WARN events, - false otherwise. - - - - See for more information and examples - of using this method. - - - - - - - Checks if this logger is enabled for the ERROR level. - - - true if this logger is enabled for ERROR events, - false otherwise. - - - - See for more information and examples of using this method. - - - - - - - Checks if this logger is enabled for the FATAL level. - - - true if this logger is enabled for FATAL events, - false otherwise. - - - - See for more information and examples of using this method. - - - - - - - A SecurityContext used by log4net when interacting with protected resources - - - - A SecurityContext used by log4net when interacting with protected resources - for example with operating system services. This can be used to impersonate - a principal that has been granted privileges on the system resources. - - - Nicko Cadell - - - - Impersonate this SecurityContext - - State supplied by the caller - An instance that will - revoke the impersonation of this SecurityContext, or null - - - Impersonate this security context. Further calls on the current - thread should now be made in the security context provided - by this object. When the result - method is called the security - context of the thread should be reverted to the state it was in - before was called. - - - - - - The providers default instances. - - - - A configured component that interacts with potentially protected system - resources uses a to provide the elevated - privileges required. If the object has - been not been explicitly provided to the component then the component - will request one from this . - - - By default the is - an instance of which returns only - objects. This is a reasonable default - where the privileges required are not know by the system. - - - This default behavior can be overridden by subclassing the - and overriding the method to return - the desired objects. The default provider - can be replaced by programmatically setting the value of the - property. - - - An alternative is to use the log4net.Config.SecurityContextProviderAttribute - This attribute can be applied to an assembly in the same way as the - log4net.Config.XmlConfiguratorAttribute". The attribute takes - the type to use as the as an argument. - - - Nicko Cadell - - - - The default provider - - - - - Protected default constructor to allow subclassing - - - - Protected default constructor to allow subclassing - - - - - - Create a SecurityContext for a consumer - - The consumer requesting the SecurityContext - An impersonation context - - - The default implementation is to return a . - - - Subclasses should override this method to provide their own - behavior. - - - - - - Gets or sets the default SecurityContextProvider - - - The default SecurityContextProvider - - - - The default provider is used by configured components that - require a and have not had one - given to them. - - - By default this is an instance of - that returns objects. - - - The default provider can be set programmatically by setting - the value of this property to a sub class of - that has the desired behavior. - - - - - - Delegate used to handle creation of new wrappers. - - The logger to wrap in a wrapper. - - - Delegate used to handle creation of new wrappers. This delegate - is called from the - method to construct the wrapper for the specified logger. - - - The delegate to use is supplied to the - constructor. - - - - - - Maps between logger objects and wrapper objects. - - - - This class maintains a mapping between objects and - objects. Use the method to - lookup the for the specified . - - - New wrapper instances are created by the - method. The default behavior is for this method to delegate construction - of the wrapper to the delegate supplied - to the constructor. This allows specialization of the behavior without - requiring subclassing of this type. - - - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the - - The handler to use to create the wrapper objects. - - - Initializes a new instance of the class with - the specified handler to create the wrapper objects. - - - - - - Gets the wrapper object for the specified logger. - - The wrapper object for the specified logger - - - If the logger is null then the corresponding wrapper is null. - - - Looks up the wrapper it it has previously been requested and - returns it. If the wrapper has never been requested before then - the virtual method is - called. - - - - - - Creates the wrapper object for the specified logger. - - The logger to wrap in a wrapper. - The wrapper object for the logger. - - - This implementation uses the - passed to the constructor to create the wrapper. This method - can be overridden in a subclass. - - - - - - Called when a monitored repository shutdown event is received. - - The that is shutting down - - - This method is called when a that this - is holding loggers for has signaled its shutdown - event . The default - behavior of this method is to release the references to the loggers - and their wrappers generated for this repository. - - - - - - Event handler for repository shutdown event. - - The sender of the event. - The event args. - - - - Map of logger repositories to hashtables of ILogger to ILoggerWrapper mappings - - - - - The handler to use to create the extension wrapper objects. - - - - - Internal reference to the delegate used to register for repository shutdown events. - - - - - Gets the map of logger repositories. - - - Map of logger repositories. - - - - Gets the hashtable that is keyed on . The - values are hashtables keyed on with the - value being the corresponding . - - - - - - Formats a as "HH:mm:ss,fff". - - - - Formats a in the format "HH:mm:ss,fff" for example, "15:49:37,459". - - - Nicko Cadell - Gert Driesen - - - - Render a as a string. - - - - Interface to abstract the rendering of a - instance into a string. - - - The method is used to render the - date to a text writer. - - - Nicko Cadell - Gert Driesen - - - - Formats the specified date as a string. - - The date to format. - The writer to write to. - - - Format the as a string and write it - to the provided. - - - - - - String constant used to specify AbsoluteTimeDateFormat in layouts. Current value is ABSOLUTE. - - - - - String constant used to specify DateTimeDateFormat in layouts. Current value is DATE. - - - - - String constant used to specify ISO8601DateFormat in layouts. Current value is ISO8601. - - - - - Renders the date into a string. Format is "HH:mm:ss". - - The date to render into a string. - The string builder to write to. - - - Subclasses should override this method to render the date - into a string using a precision up to the second. This method - will be called at most once per second and the result will be - reused if it is needed again during the same second. - - - - - - Renders the date into a string. Format is "HH:mm:ss,fff". - - The date to render into a string. - The writer to write to. - - - Uses the method to generate the - time string up to the seconds and then appends the current - milliseconds. The results from are - cached and is called at most once - per second. - - - Sub classes should override - rather than . - - - - - - Last stored time with precision up to the second. - - - - - Last stored time with precision up to the second, formatted - as a string. - - - - - Last stored time with precision up to the second, formatted - as a string. - - - - - Formats a as "dd MMM yyyy HH:mm:ss,fff" - - - - Formats a in the format - "dd MMM yyyy HH:mm:ss,fff" for example, - "06 Nov 1994 15:49:37,459". - - - Nicko Cadell - Gert Driesen - Angelika Schnagl - - - - Default constructor. - - - - Initializes a new instance of the class. - - - - - - Formats the date without the milliseconds part - - The date to format. - The string builder to write to. - - - Formats a DateTime in the format "dd MMM yyyy HH:mm:ss" - for example, "06 Nov 1994 15:49:37". - - - The base class will append the ",fff" milliseconds section. - This method will only be called at most once per second. - - - - - - The format info for the invariant culture. - - - - - Formats the as "yyyy-MM-dd HH:mm:ss,fff". - - - - Formats the specified as a string: "yyyy-MM-dd HH:mm:ss,fff". - - - Nicko Cadell - Gert Driesen - - - - Default constructor - - - - Initializes a new instance of the class. - - - - - - Formats the date without the milliseconds part - - The date to format. - The string builder to write to. - - - Formats the date specified as a string: "yyyy-MM-dd HH:mm:ss". - - - The base class will append the ",fff" milliseconds section. - This method will only be called at most once per second. - - - - - - Formats the using the method. - - - - Formats the using the method. - - - Nicko Cadell - Gert Driesen - - - - Constructor - - The format string. - - - Initializes a new instance of the class - with the specified format string. - - - The format string must be compatible with the options - that can be supplied to . - - - - - - Formats the date using . - - The date to convert to a string. - The writer to write to. - - - Uses the date format string supplied to the constructor to call - the method to format the date. - - - - - - The format string used to format the . - - - - The format string must be compatible with the options - that can be supplied to . - - - - - - This filter drops all . - - - - You can add this filter to the end of a filter chain to - switch from the default "accept all unless instructed otherwise" - filtering behavior to a "deny all unless instructed otherwise" - behavior. - - - Nicko Cadell - Gert Driesen - - - - Subclass this type to implement customized logging event filtering - - - - Users should extend this class to implement customized logging - event filtering. Note that and - , the parent class of all standard - appenders, have built-in filtering rules. It is suggested that you - first use and understand the built-in rules before rushing to write - your own custom filters. - - - This abstract class assumes and also imposes that filters be - organized in a linear chain. The - method of each filter is called sequentially, in the order of their - addition to the chain. - - - The method must return one - of the integer constants , - or . - - - If the value is returned, then the log event is dropped - immediately without consulting with the remaining filters. - - - If the value is returned, then the next filter - in the chain is consulted. If there are no more filters in the - chain, then the log event is logged. Thus, in the presence of no - filters, the default behavior is to log all logging events. - - - If the value is returned, then the log - event is logged without consulting the remaining filters. - - - The philosophy of log4net filters is largely inspired from the - Linux ipchains. - - - Nicko Cadell - Gert Driesen - - - - Implement this interface to provide customized logging event filtering - - - - Users should implement this interface to implement customized logging - event filtering. Note that and - , the parent class of all standard - appenders, have built-in filtering rules. It is suggested that you - first use and understand the built-in rules before rushing to write - your own custom filters. - - - This abstract class assumes and also imposes that filters be - organized in a linear chain. The - method of each filter is called sequentially, in the order of their - addition to the chain. - - - The method must return one - of the integer constants , - or . - - - If the value is returned, then the log event is dropped - immediately without consulting with the remaining filters. - - - If the value is returned, then the next filter - in the chain is consulted. If there are no more filters in the - chain, then the log event is logged. Thus, in the presence of no - filters, the default behavior is to log all logging events. - - - If the value is returned, then the log - event is logged without consulting the remaining filters. - - - The philosophy of log4net filters is largely inspired from the - Linux ipchains. - - - Nicko Cadell - Gert Driesen - - - - Decide if the logging event should be logged through an appender. - - The LoggingEvent to decide upon - The decision of the filter - - - If the decision is , then the event will be - dropped. If the decision is , then the next - filter, if any, will be invoked. If the decision is then - the event will be logged without consulting with other filters in - the chain. - - - - - - Property to get and set the next filter - - - The next filter in the chain - - - - Filters are typically composed into chains. This property allows the next filter in - the chain to be accessed. - - - - - - Points to the next filter in the filter chain. - - - - See for more information. - - - - - - Initialize the filter with the options set - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - Typically filter's options become active immediately on set, - however this method must still be called. - - - - - - Decide if the should be logged through an appender. - - The to decide upon - The decision of the filter - - - If the decision is , then the event will be - dropped. If the decision is , then the next - filter, if any, will be invoked. If the decision is then - the event will be logged without consulting with other filters in - the chain. - - - This method is marked abstract and must be implemented - in a subclass. - - - - - - Property to get and set the next filter - - - The next filter in the chain - - - - Filters are typically composed into chains. This property allows the next filter in - the chain to be accessed. - - - - - - Default constructor - - - - - Always returns the integer constant - - the LoggingEvent to filter - Always returns - - - Ignores the event being logged and just returns - . This can be used to change the default filter - chain behavior from to . This filter - should only be used as the last filter in the chain - as any further filters will be ignored! - - - - - - The return result from - - - - The return result from - - - - - - The log event must be dropped immediately without - consulting with the remaining filters, if any, in the chain. - - - - - This filter is neutral with respect to the log event. - The remaining filters, if any, should be consulted for a final decision. - - - - - The log event must be logged immediately without - consulting with the remaining filters, if any, in the chain. - - - - - This is a very simple filter based on matching. - - - - The filter admits two options and - . If there is an exact match between the value - of the option and the of the - , then the method returns in - case the option value is set - to true, if it is false then - is returned. If the does not match then - the result will be . - - - Nicko Cadell - Gert Driesen - - - - flag to indicate if the filter should on a match - - - - - the to match against - - - - - Default constructor - - - - - Tests if the of the logging event matches that of the filter - - the event to filter - see remarks - - - If the of the event matches the level of the - filter then the result of the function depends on the - value of . If it is true then - the function will return , it it is false then it - will return . If the does not match then - the result will be . - - - - - - when matching - - - - The property is a flag that determines - the behavior when a matching is found. If the - flag is set to true then the filter will the - logging event, otherwise it will the event. - - - The default is true i.e. to the event. - - - - - - The that the filter will match - - - - The level that this filter will attempt to match against the - level. If a match is found then - the result depends on the value of . - - - - - - This is a simple filter based on matching. - - - - The filter admits three options and - that determine the range of priorities that are matched, and - . If there is a match between the range - of priorities and the of the , then the - method returns in case the - option value is set to true, if it is false - then is returned. If there is no match, is returned. - - - Nicko Cadell - Gert Driesen - - - - Flag to indicate the behavior when matching a - - - - - the minimum value to match - - - - - the maximum value to match - - - - - Default constructor - - - - - Check if the event should be logged. - - the logging event to check - see remarks - - - If the of the logging event is outside the range - matched by this filter then - is returned. If the is matched then the value of - is checked. If it is true then - is returned, otherwise - is returned. - - - - - - when matching and - - - - The property is a flag that determines - the behavior when a matching is found. If the - flag is set to true then the filter will the - logging event, otherwise it will the event. - - - The default is true i.e. to the event. - - - - - - Set the minimum matched - - - - The minimum level that this filter will attempt to match against the - level. If a match is found then - the result depends on the value of . - - - - - - Sets the maximum matched - - - - The maximum level that this filter will attempt to match against the - level. If a match is found then - the result depends on the value of . - - - - - - Simple filter to match a string in the event's logger name. - - - - The works very similar to the . It admits two - options and . If the - of the starts - with the value of the option, then the - method returns in - case the option value is set to true, - if it is false then is returned. - - - Daniel Cazzulino - - - - Flag to indicate the behavior when we have a match - - - - - The logger name string to substring match against the event - - - - - Default constructor - - - - - Check if this filter should allow the event to be logged - - the event being logged - see remarks - - - The rendered message is matched against the . - If the equals the beginning of - the incoming () - then a match will have occurred. If no match occurs - this function will return - allowing other filters to check the event. If a match occurs then - the value of is checked. If it is - true then is returned otherwise - is returned. - - - - - - when matching - - - - The property is a flag that determines - the behavior when a matching is found. If the - flag is set to true then the filter will the - logging event, otherwise it will the event. - - - The default is true i.e. to the event. - - - - - - The that the filter will match - - - - This filter will attempt to match this value against logger name in - the following way. The match will be done against the beginning of the - logger name (using ). The match is - case sensitive. If a match is found then - the result depends on the value of . - - - - - - Simple filter to match a keyed string in the - - - - Simple filter to match a keyed string in the - - - As the MDC has been replaced with layered properties the - should be used instead. - - - Nicko Cadell - Gert Driesen - - - - Simple filter to match a string an event property - - - - Simple filter to match a string in the value for a - specific event property - - - Nicko Cadell - - - - Simple filter to match a string in the rendered message - - - - Simple filter to match a string in the rendered message - - - Nicko Cadell - Gert Driesen - - - - Flag to indicate the behavior when we have a match - - - - - The string to substring match against the message - - - - - A string regex to match - - - - - A regex object to match (generated from m_stringRegexToMatch) - - - - - Default constructor - - - - - Initialize and precompile the Regex if required - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - - - - Check if this filter should allow the event to be logged - - the event being logged - see remarks - - - The rendered message is matched against the . - If the occurs as a substring within - the message then a match will have occurred. If no match occurs - this function will return - allowing other filters to check the event. If a match occurs then - the value of is checked. If it is - true then is returned otherwise - is returned. - - - - - - when matching or - - - - The property is a flag that determines - the behavior when a matching is found. If the - flag is set to true then the filter will the - logging event, otherwise it will the event. - - - The default is true i.e. to the event. - - - - - - Sets the static string to match - - - - The string that will be substring matched against - the rendered message. If the message contains this - string then the filter will match. If a match is found then - the result depends on the value of . - - - One of or - must be specified. - - - - - - Sets the regular expression to match - - - - The regular expression pattern that will be matched against - the rendered message. If the message matches this - pattern then the filter will match. If a match is found then - the result depends on the value of . - - - One of or - must be specified. - - - - - - The key to use to lookup the string from the event properties - - - - - Default constructor - - - - - Check if this filter should allow the event to be logged - - the event being logged - see remarks - - - The event property for the is matched against - the . - If the occurs as a substring within - the property value then a match will have occurred. If no match occurs - this function will return - allowing other filters to check the event. If a match occurs then - the value of is checked. If it is - true then is returned otherwise - is returned. - - - - - - The key to lookup in the event properties and then match against. - - - - The key name to use to lookup in the properties map of the - . The match will be performed against - the value of this property if it exists. - - - - - - Simple filter to match a string in the - - - - Simple filter to match a string in the - - - As the MDC has been replaced with named stacks stored in the - properties collections the should - be used instead. - - - Nicko Cadell - Gert Driesen - - - - Default constructor - - - - Sets the to "NDC". - - - - - - Write the event appdomain name to the output - - - - Writes the to the output writer. - - - Daniel Cazzulino - Nicko Cadell - - - - Abstract class that provides the formatting functionality that - derived classes need. - - - Conversion specifiers in a conversion patterns are parsed to - individual PatternConverters. Each of which is responsible for - converting a logging event in a converter specific manner. - - Nicko Cadell - - - - Abstract class that provides the formatting functionality that - derived classes need. - - - - Conversion specifiers in a conversion patterns are parsed to - individual PatternConverters. Each of which is responsible for - converting a logging event in a converter specific manner. - - - Nicko Cadell - Gert Driesen - - - - Initial buffer size - - - - - Maximum buffer size before it is recycled - - - - - Protected constructor - - - - Initializes a new instance of the class. - - - - - - Evaluate this pattern converter and write the output to a writer. - - that will receive the formatted result. - The state object on which the pattern converter should be executed. - - - Derived pattern converters must override this method in order to - convert conversion specifiers in the appropriate way. - - - - - - Set the next pattern converter in the chains - - the pattern converter that should follow this converter in the chain - the next converter - - - The PatternConverter can merge with its neighbor during this method (or a sub class). - Therefore the return value may or may not be the value of the argument passed in. - - - - - - Write the pattern converter to the writer with appropriate formatting - - that will receive the formatted result. - The state object on which the pattern converter should be executed. - - - This method calls to allow the subclass to perform - appropriate conversion of the pattern converter. If formatting options have - been specified via the then this method will - apply those formattings before writing the output. - - - - - - Fast space padding method. - - to which the spaces will be appended. - The number of spaces to be padded. - - - Fast space padding method. - - - - - - The option string to the converter - - - - - Write an dictionary to a - - the writer to write to - a to use for object conversion - the value to write to the writer - - - Writes the to a writer in the form: - - - {key1=value1, key2=value2, key3=value3} - - - If the specified - is not null then it is used to render the key and value to text, otherwise - the object's ToString method is called. - - - - - - Write an object to a - - the writer to write to - a to use for object conversion - the value to write to the writer - - - Writes the Object to a writer. If the specified - is not null then it is used to render the object to text, otherwise - the object's ToString method is called. - - - - - - Get the next pattern converter in the chain - - - the next pattern converter in the chain - - - - Get the next pattern converter in the chain - - - - - - Gets or sets the formatting info for this converter - - - The formatting info for this converter - - - - Gets or sets the formatting info for this converter - - - - - - Gets or sets the option value for this converter - - - The option for this converter - - - - Gets or sets the option value for this converter - - - - - - Initializes a new instance of the class. - - - - - Derived pattern converters must override this method in order to - convert conversion specifiers in the correct way. - - that will receive the formatted result. - The on which the pattern converter should be executed. - - - - Derived pattern converters must override this method in order to - convert conversion specifiers in the correct way. - - that will receive the formatted result. - The state object on which the pattern converter should be executed. - - - - Flag indicating if this converter handles exceptions - - - false if this converter handles exceptions - - - - - Flag indicating if this converter handles the logging event exception - - false if this converter handles the logging event exception - - - If this converter handles the exception object contained within - , then this property should be set to - false. Otherwise, if the layout ignores the exception - object, then the property should be set to true. - - - Set this value to override a this default setting. The default - value is true, this converter does not handle the exception. - - - - - - Write the event appdomain name to the output - - that will receive the formatted result. - the event being logged - - - Writes the to the output . - - - - - - Date pattern converter, uses a to format - the date of a . - - - - Render the to the writer as a string. - - - The value of the determines - the formatting of the date. The following values are allowed: - - - Option value - Output - - - ISO8601 - - Uses the formatter. - Formats using the "yyyy-MM-dd HH:mm:ss,fff" pattern. - - - - DATE - - Uses the formatter. - Formats using the "dd MMM yyyy HH:mm:ss,fff" for example, "06 Nov 1994 15:49:37,459". - - - - ABSOLUTE - - Uses the formatter. - Formats using the "HH:mm:ss,yyyy" for example, "15:49:37,459". - - - - other - - Any other pattern string uses the formatter. - This formatter passes the pattern string to the - method. - For details on valid patterns see - DateTimeFormatInfo Class. - - - - - - The is in the local time zone and is rendered in that zone. - To output the time in Universal time see . - - - Nicko Cadell - - - - The used to render the date to a string - - - - The used to render the date to a string - - - - - - Initialize the converter pattern based on the property. - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - - - - Convert the pattern into the rendered message - - that will receive the formatted result. - the event being logged - - - Pass the to the - for it to render it to the writer. - - - The passed is in the local time zone. - - - - - - Write the exception text to the output - - - - If an exception object is stored in the logging event - it will be rendered into the pattern output with a - trailing newline. - - - If there is no exception then nothing will be output - and no trailing newline will be appended. - It is typical to put a newline before the exception - and to have the exception as the last data in the pattern. - - - Nicko Cadell - - - - Default constructor - - - - - Write the exception text to the output - - that will receive the formatted result. - the event being logged - - - If an exception object is stored in the logging event - it will be rendered into the pattern output with a - trailing newline. - - - If there is no exception then nothing will be output - and no trailing newline will be appended. - It is typical to put a newline before the exception - and to have the exception as the last data in the pattern. - - - - - - Writes the caller location file name to the output - - - - Writes the value of the for - the event to the output writer. - - - Nicko Cadell - - - - Write the caller location file name to the output - - that will receive the formatted result. - the event being logged - - - Writes the value of the for - the to the output . - - - - - - Write the caller location info to the output - - - - Writes the to the output writer. - - - Nicko Cadell - - - - Write the caller location info to the output - - that will receive the formatted result. - the event being logged - - - Writes the to the output writer. - - - - - - Writes the event identity to the output - - - - Writes the value of the to - the output writer. - - - Daniel Cazzulino - Nicko Cadell - - - - Writes the event identity to the output - - that will receive the formatted result. - the event being logged - - - Writes the value of the - to - the output . - - - - - - Write the event level to the output - - - - Writes the display name of the event - to the writer. - - - Nicko Cadell - - - - Write the event level to the output - - that will receive the formatted result. - the event being logged - - - Writes the of the - to the . - - - - - - Write the caller location line number to the output - - - - Writes the value of the for - the event to the output writer. - - - Nicko Cadell - - - - Write the caller location line number to the output - - that will receive the formatted result. - the event being logged - - - Writes the value of the for - the to the output . - - - - - - Converter for logger name - - - - Outputs the of the event. - - - Nicko Cadell - - - - Converter to output and truncate '.' separated strings - - - - This abstract class supports truncating a '.' separated string - to show a specified number of elements from the right hand side. - This is used to truncate class names that are fully qualified. - - - Subclasses should override the method to - return the fully qualified string. - - - Nicko Cadell - - - - Initialize the converter - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - - - - Get the fully qualified string data - - the event being logged - the fully qualified name - - - Overridden by subclasses to get the fully qualified name before the - precision is applied to it. - - - Return the fully qualified '.' (dot/period) separated string. - - - - - - Convert the pattern to the rendered message - - that will receive the formatted result. - the event being logged - - Render the to the precision - specified by the property. - - - - - Gets the fully qualified name of the logger - - the event being logged - The fully qualified logger name - - - Returns the of the . - - - - - - Writes the event message to the output - - - - Uses the method - to write out the event message. - - - Nicko Cadell - - - - Writes the event message to the output - - that will receive the formatted result. - the event being logged - - - Uses the method - to write out the event message. - - - - - - Write the method name to the output - - - - Writes the caller location to - the output. - - - Nicko Cadell - - - - Write the method name to the output - - that will receive the formatted result. - the event being logged - - - Writes the caller location to - the output. - - - - - - Converter to include event NDC - - - - Outputs the value of the event property named NDC. - - - The should be used instead. - - - Nicko Cadell - - - - Write the event NDC to the output - - that will receive the formatted result. - the event being logged - - - As the thread context stacks are now stored in named event properties - this converter simply looks up the value of the NDC property. - - - The should be used instead. - - - - - - Property pattern converter - - - - Writes out the value of a named property. The property name - should be set in the - property. - - - If the is set to null - then all the properties are written as key value pairs. - - - Nicko Cadell - - - - Write the property value to the output - - that will receive the formatted result. - the event being logged - - - Writes out the value of a named property. The property name - should be set in the - property. - - - If the is set to null - then all the properties are written as key value pairs. - - - - - - Converter to output the relative time of the event - - - - Converter to output the time of the event relative to the start of the program. - - - Nicko Cadell - - - - Write the relative time to the output - - that will receive the formatted result. - the event being logged - - - Writes out the relative time of the event in milliseconds. - That is the number of milliseconds between the event - and the . - - - - - - Helper method to get the time difference between two DateTime objects - - start time (in the current local time zone) - end time (in the current local time zone) - the time difference in milliseconds - - - - Converter to include event thread name - - - - Writes the to the output. - - - Nicko Cadell - - - - Write the ThreadName to the output - - that will receive the formatted result. - the event being logged - - - Writes the to the . - - - - - - Pattern converter for the class name - - - - Outputs the of the event. - - - Nicko Cadell - - - - Gets the fully qualified name of the class - - the event being logged - The fully qualified type name for the caller location - - - Returns the of the . - - - - - - Converter to include event user name - - Douglas de la Torre - Nicko Cadell - - - - Convert the pattern to the rendered message - - that will receive the formatted result. - the event being logged - - - - Write the TimeStamp to the output - - - - Date pattern converter, uses a to format - the date of a . - - - Uses a to format the - in Universal time. - - - See the for details on the date pattern syntax. - - - - Nicko Cadell - - - - Write the TimeStamp to the output - - that will receive the formatted result. - the event being logged - - - Pass the to the - for it to render it to the writer. - - - The passed is in the local time zone, this is converted - to Universal time before it is rendered. - - - - - - - A Layout that renders only the Exception text from the logging event - - - - A Layout that renders only the Exception text from the logging event. - - - This Layout should only be used with appenders that utilize multiple - layouts (e.g. ). - - - Nicko Cadell - Gert Driesen - - - - Extend this abstract class to create your own log layout format. - - - - This is the base implementation of the - interface. Most layout objects should extend this class. - - - - - - Subclasses must implement the - method. - - - Subclasses should set the in their default - constructor. - - - - Nicko Cadell - Gert Driesen - - - - Interface implemented by layout objects - - - - An object is used to format a - as text. The method is called by an - appender to transform the into a string. - - - The layout can also supply and - text that is appender before any events and after all the events respectively. - - - Nicko Cadell - Gert Driesen - - - - Implement this method to create your own layout format. - - The TextWriter to write the formatted event to - The event to format - - - This method is called by an appender to format - the as text and output to a writer. - - - If the caller does not have a and prefers the - event to be formatted as a then the following - code can be used to format the event into a . - - - StringWriter writer = new StringWriter(); - Layout.Format(writer, loggingEvent); - string formattedEvent = writer.ToString(); - - - - - - The content type output by this layout. - - The content type - - - The content type output by this layout. - - - This is a MIME type e.g. "text/plain". - - - - - - The header for the layout format. - - the layout header - - - The Header text will be appended before any logging events - are formatted and appended. - - - - - - The footer for the layout format. - - the layout footer - - - The Footer text will be appended after all the logging events - have been formatted and appended. - - - - - - Flag indicating if this layout handle exceptions - - false if this layout handles exceptions - - - If this layout handles the exception object contained within - , then the layout should return - false. Otherwise, if the layout ignores the exception - object, then the layout should return true. - - - - - - The header text - - - - See for more information. - - - - - - The footer text - - - - See for more information. - - - - - - Flag indicating if this layout handles exceptions - - - - false if this layout handles exceptions - - - - - - Empty default constructor - - - - Empty default constructor - - - - - - Activate component options - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - This method must be implemented by the subclass. - - - - - - Implement this method to create your own layout format. - - The TextWriter to write the formatted event to - The event to format - - - This method is called by an appender to format - the as text. - - - - - - The content type output by this layout. - - The content type is "text/plain" - - - The content type output by this layout. - - - This base class uses the value "text/plain". - To change this value a subclass must override this - property. - - - - - - The header for the layout format. - - the layout header - - - The Header text will be appended before any logging events - are formatted and appended. - - - - - - The footer for the layout format. - - the layout footer - - - The Footer text will be appended after all the logging events - have been formatted and appended. - - - - - - Flag indicating if this layout handles exceptions - - false if this layout handles exceptions - - - If this layout handles the exception object contained within - , then the layout should return - false. Otherwise, if the layout ignores the exception - object, then the layout should return true. - - - Set this value to override a this default setting. The default - value is true, this layout does not handle the exception. - - - - - - Default constructor - - - - Constructs a ExceptionLayout - - - - - - Activate component options - - - - Part of the component activation - framework. - - - This method does nothing as options become effective immediately. - - - - - - Gets the exception text from the logging event - - The TextWriter to write the formatted event to - the event being logged - - - Write the exception string to the . - The exception string is retrieved from . - - - - - - Interface for raw layout objects - - - - Interface used to format a - to an object. - - - This interface should not be confused with the - interface. This interface is used in - only certain specialized situations where a raw object is - required rather than a formatted string. The - is not generally useful than this interface. - - - Nicko Cadell - Gert Driesen - - - - Implement this method to create your own layout format. - - The event to format - returns the formatted event - - - Implement this method to create your own layout format. - - - - - - Adapts any to a - - - - Where an is required this adapter - allows a to be specified. - - - Nicko Cadell - Gert Driesen - - - - The layout to adapt - - - - - Construct a new adapter - - the layout to adapt - - - Create the adapter for the specified . - - - - - - Format the logging event as an object. - - The event to format - returns the formatted event - - - Format the logging event as an object. - - - Uses the object supplied to - the constructor to perform the formatting. - - - - - - A flexible layout configurable with pattern string. - - - - The goal of this class is to a - as a string. The results - depend on the conversion pattern. - - - The conversion pattern is closely related to the conversion - pattern of the printf function in C. A conversion pattern is - composed of literal text and format control expressions called - conversion specifiers. - - - You are free to insert any literal text within the conversion - pattern. - - - Each conversion specifier starts with a percent sign (%) and is - followed by optional format modifiers and a conversion - pattern name. The conversion pattern name specifies the type of - data, e.g. logger, level, date, thread name. The format - modifiers control such things as field width, padding, left and - right justification. The following is a simple example. - - - Let the conversion pattern be "%-5level [%thread]: %message%newline" and assume - that the log4net environment was set to use a PatternLayout. Then the - statements - - - ILog log = LogManager.GetLogger(typeof(TestApp)); - log.Debug("Message 1"); - log.Warn("Message 2"); - - would yield the output - - DEBUG [main]: Message 1 - WARN [main]: Message 2 - - - Note that there is no explicit separator between text and - conversion specifiers. The pattern parser knows when it has reached - the end of a conversion specifier when it reads a conversion - character. In the example above the conversion specifier - %-5level means the level of the logging event should be left - justified to a width of five characters. - - - The recognized conversion pattern names are: - - - - Conversion Pattern Name - Effect - - - a - Equivalent to appdomain - - - appdomain - - Used to output the friendly name of the AppDomain where the - logging event was generated. - - - - c - Equivalent to logger - - - C - Equivalent to type - - - class - Equivalent to type - - - d - Equivalent to date - - - date - - - Used to output the date of the logging event in the local time zone. - To output the date in universal time use the %utcdate pattern. - The date conversion - specifier may be followed by a date format specifier enclosed - between braces. For example, %date{HH:mm:ss,fff} or - %date{dd MMM yyyy HH:mm:ss,fff}. If no date format specifier is - given then ISO8601 format is - assumed (). - - - The date format specifier admits the same syntax as the - time pattern string of the . - - - For better results it is recommended to use the log4net date - formatters. These can be specified using one of the strings - "ABSOLUTE", "DATE" and "ISO8601" for specifying - , - and respectively - . For example, - %date{ISO8601} or %date{ABSOLUTE}. - - - These dedicated date formatters perform significantly - better than . - - - - - exception - - - Used to output the exception passed in with the log message. - - - If an exception object is stored in the logging event - it will be rendered into the pattern output with a - trailing newline. - If there is no exception then nothing will be output - and no trailing newline will be appended. - It is typical to put a newline before the exception - and to have the exception as the last data in the pattern. - - - - - F - Equivalent to file - - - file - - - Used to output the file name where the logging request was - issued. - - - WARNING Generating caller location information is - extremely slow. Its use should be avoided unless execution speed - is not an issue. - - - See the note below on the availability of caller location information. - - - - - identity - - - Used to output the user name for the currently active user - (Principal.Identity.Name). - - - WARNING Generating caller information is - extremely slow. Its use should be avoided unless execution speed - is not an issue. - - - - - l - Equivalent to location - - - L - Equivalent to line - - - location - - - Used to output location information of the caller which generated - the logging event. - - - The location information depends on the CLI implementation but - usually consists of the fully qualified name of the calling - method followed by the callers source the file name and line - number between parentheses. - - - The location information can be very useful. However, its - generation is extremely slow. Its use should be avoided - unless execution speed is not an issue. - - - See the note below on the availability of caller location information. - - - - - level - - - Used to output the level of the logging event. - - - - - line - - - Used to output the line number from where the logging request - was issued. - - - WARNING Generating caller location information is - extremely slow. Its use should be avoided unless execution speed - is not an issue. - - - See the note below on the availability of caller location information. - - - - - logger - - - Used to output the logger of the logging event. The - logger conversion specifier can be optionally followed by - precision specifier, that is a decimal constant in - brackets. - - - If a precision specifier is given, then only the corresponding - number of right most components of the logger name will be - printed. By default the logger name is printed in full. - - - For example, for the logger name "a.b.c" the pattern - %logger{2} will output "b.c". - - - - - m - Equivalent to message - - - M - Equivalent to method - - - message - - - Used to output the application supplied message associated with - the logging event. - - - - - mdc - - - The MDC (old name for the ThreadContext.Properties) is now part of the - combined event properties. This pattern is supported for compatibility - but is equivalent to property. - - - - - method - - - Used to output the method name where the logging request was - issued. - - - WARNING Generating caller location information is - extremely slow. Its use should be avoided unless execution speed - is not an issue. - - - See the note below on the availability of caller location information. - - - - - n - Equivalent to newline - - - newline - - - Outputs the platform dependent line separator character or - characters. - - - This conversion pattern offers the same performance as using - non-portable line separator strings such as "\n", or "\r\n". - Thus, it is the preferred way of specifying a line separator. - - - - - ndc - - - Used to output the NDC (nested diagnostic context) associated - with the thread that generated the logging event. - - - - - p - Equivalent to level - - - P - Equivalent to property - - - properties - Equivalent to property - - - property - - - Used to output the an event specific property. The key to - lookup must be specified within braces and directly following the - pattern specifier, e.g. %property{user} would include the value - from the property that is keyed by the string 'user'. Each property value - that is to be included in the log must be specified separately. - Properties are added to events by loggers or appenders. By default - the log4net:HostName property is set to the name of machine on - which the event was originally logged. - - - If no key is specified, e.g. %property then all the keys and their - values are printed in a comma separated list. - - - The properties of an event are combined from a number of different - contexts. These are listed below in the order in which they are searched. - - - - the event properties - - The event has that can be set. These - properties are specific to this event only. - - - - the thread properties - - The that are set on the current - thread. These properties are shared by all events logged on this thread. - - - - the global properties - - The that are set globally. These - properties are shared by all the threads in the AppDomain. - - - - - - - - r - Equivalent to timestamp - - - t - Equivalent to thread - - - timestamp - - - Used to output the number of milliseconds elapsed since the start - of the application until the creation of the logging event. - - - - - thread - - - Used to output the name of the thread that generated the - logging event. Uses the thread number if no name is available. - - - - - type - - - Used to output the fully qualified type name of the caller - issuing the logging request. This conversion specifier - can be optionally followed by precision specifier, that - is a decimal constant in brackets. - - - If a precision specifier is given, then only the corresponding - number of right most components of the class name will be - printed. By default the class name is output in fully qualified form. - - - For example, for the class name "log4net.Layout.PatternLayout", the - pattern %type{1} will output "PatternLayout". - - - WARNING Generating the caller class information is - slow. Thus, its use should be avoided unless execution speed is - not an issue. - - - See the note below on the availability of caller location information. - - - - - u - Equivalent to identity - - - username - - - Used to output the WindowsIdentity for the currently - active user. - - - WARNING Generating caller WindowsIdentity information is - extremely slow. Its use should be avoided unless execution speed - is not an issue. - - - - - utcdate - - - Used to output the date of the logging event in universal time. - The date conversion - specifier may be followed by a date format specifier enclosed - between braces. For example, %utcdate{HH:mm:ss,fff} or - %utcdate{dd MMM yyyy HH:mm:ss,fff}. If no date format specifier is - given then ISO8601 format is - assumed (). - - - The date format specifier admits the same syntax as the - time pattern string of the . - - - For better results it is recommended to use the log4net date - formatters. These can be specified using one of the strings - "ABSOLUTE", "DATE" and "ISO8601" for specifying - , - and respectively - . For example, - %utcdate{ISO8601} or %utcdate{ABSOLUTE}. - - - These dedicated date formatters perform significantly - better than . - - - - - w - Equivalent to username - - - x - Equivalent to ndc - - - X - Equivalent to mdc - - - % - - - The sequence %% outputs a single percent sign. - - - - - - The single letter patterns are deprecated in favor of the - longer more descriptive pattern names. - - - By default the relevant information is output as is. However, - with the aid of format modifiers it is possible to change the - minimum field width, the maximum field width and justification. - - - The optional format modifier is placed between the percent sign - and the conversion pattern name. - - - The first optional format modifier is the left justification - flag which is just the minus (-) character. Then comes the - optional minimum field width modifier. This is a decimal - constant that represents the minimum number of characters to - output. If the data item requires fewer characters, it is padded on - either the left or the right until the minimum width is - reached. The default is to pad on the left (right justify) but you - can specify right padding with the left justification flag. The - padding character is space. If the data item is larger than the - minimum field width, the field is expanded to accommodate the - data. The value is never truncated. - - - This behavior can be changed using the maximum field - width modifier which is designated by a period followed by a - decimal constant. If the data item is longer than the maximum - field, then the extra characters are removed from the - beginning of the data item and not from the end. For - example, it the maximum field width is eight and the data item is - ten characters long, then the first two characters of the data item - are dropped. This behavior deviates from the printf function in C - where truncation is done from the end. - - - Below are various format modifier examples for the logger - conversion specifier. - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Format modifierleft justifyminimum widthmaximum widthcomment
%20loggerfalse20none - - Left pad with spaces if the logger name is less than 20 - characters long. - -
%-20loggertrue20none - - Right pad with spaces if the logger - name is less than 20 characters long. - -
%.30loggerNAnone30 - - Truncate from the beginning if the logger - name is longer than 30 characters. - -
%20.30loggerfalse2030 - - Left pad with spaces if the logger name is shorter than 20 - characters. However, if logger name is longer than 30 characters, - then truncate from the beginning. - -
%-20.30loggertrue2030 - - Right pad with spaces if the logger name is shorter than 20 - characters. However, if logger name is longer than 30 characters, - then truncate from the beginning. - -
-
- - Note about caller location information.
- The following patterns %type %file %line %method %location %class %C %F %L %l %M - all generate caller location information. - Location information uses the System.Diagnostics.StackTrace class to generate - a call stack. The caller's information is then extracted from this stack. -
- - - The System.Diagnostics.StackTrace class is not supported on the - .NET Compact Framework 1.0 therefore caller location information is not - available on that framework. - - - - - The System.Diagnostics.StackTrace class has this to say about Release builds: - - - "StackTrace information will be most informative with Debug build configurations. - By default, Debug builds include debug symbols, while Release builds do not. The - debug symbols contain most of the file, method name, line number, and column - information used in constructing StackFrame and StackTrace objects. StackTrace - might not report as many method calls as expected, due to code transformations - that occur during optimization." - - - This means that in a Release build the caller information may be incomplete or may - not exist at all! Therefore caller location information cannot be relied upon in a Release build. - - - - Additional pattern converters may be registered with a specific - instance using the method. - -
- - This is a more detailed pattern. - %timestamp [%thread] %level %logger %ndc - %message%newline - - - A similar pattern except that the relative time is - right padded if less than 6 digits, thread name is right padded if - less than 15 characters and truncated if longer and the logger - name is left padded if shorter than 30 characters and truncated if - longer. - %-6timestamp [%15.15thread] %-5level %30.30logger %ndc - %message%newline - - Nicko Cadell - Gert Driesen - Douglas de la Torre - Daniel Cazzulino -
- - - Default pattern string for log output. - - - - Default pattern string for log output. - Currently set to the string "%message%newline" - which just prints the application supplied message. - - - - - - A detailed conversion pattern - - - - A conversion pattern which includes Time, Thread, Logger, and Nested Context. - Current value is %timestamp [%thread] %level %logger %ndc - %message%newline. - - - - - - Internal map of converter identifiers to converter types. - - - - This static map is overridden by the m_converterRegistry instance map - - - - - - the pattern - - - - - the head of the pattern converter chain - - - - - patterns defined on this PatternLayout only - - - - - Initialize the global registry - - - - Defines the builtin global rules. - - - - - - Constructs a PatternLayout using the DefaultConversionPattern - - - - The default pattern just produces the application supplied message. - - - Note to Inheritors: This constructor calls the virtual method - . If you override this method be - aware that it will be called before your is called constructor. - - - As per the contract the - method must be called after the properties on this object have been - configured. - - - - - - Constructs a PatternLayout using the supplied conversion pattern - - the pattern to use - - - Note to Inheritors: This constructor calls the virtual method - . If you override this method be - aware that it will be called before your is called constructor. - - - When using this constructor the method - need not be called. This may not be the case when using a subclass. - - - - - - Create the pattern parser instance - - the pattern to parse - The that will format the event - - - Creates the used to parse the conversion string. Sets the - global and instance rules on the . - - - - - - Initialize layout options - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - - - - Produces a formatted string as specified by the conversion pattern. - - the event being logged - The TextWriter to write the formatted event to - - - Parse the using the patter format - specified in the property. - - - - - - Add a converter to this PatternLayout - - the converter info - - - This version of the method is used by the configurator. - Programmatic users should use the alternative method. - - - - - - Add a converter to this PatternLayout - - the name of the conversion pattern for this converter - the type of the converter - - - Add a named pattern converter to this instance. This - converter will be used in the formatting of the event. - This method must be called before . - - - The specified must extend the - type. - - - - - - The pattern formatting string - - - - The ConversionPattern option. This is the string which - controls formatting and consists of a mix of literal content and - conversion specifiers. - - - - - - Wrapper class used to map converter names to converter types - - - - Pattern converter info class used during configuration to - pass to the - method. - - - - - - default constructor - - - - - Gets or sets the name of the conversion pattern - - - - The name of the pattern in the format string - - - - - - Gets or sets the type of the converter - - - - The value specified must extend the - type. - - - - - - Type converter for the interface - - - - Used to convert objects to the interface. - Supports converting from the interface to - the interface using the . - - - Nicko Cadell - Gert Driesen - - - - Interface supported by type converters - - - - This interface supports conversion from arbitrary types - to a single target type. See . - - - Nicko Cadell - Gert Driesen - - - - Can the source type be converted to the type supported by this object - - the type to convert - true if the conversion is possible - - - Test if the can be converted to the - type supported by this converter. - - - - - - Convert the source object to the type supported by this object - - the object to convert - the converted object - - - Converts the to the type supported - by this converter. - - - - - - Can the sourceType be converted to an - - the source to be to be converted - true if the source type can be converted to - - - Test if the can be converted to a - . Only is supported - as the . - - - - - - Convert the value to a object - - the value to convert - the object - - - Convert the object to a - object. If the object - is a then the - is used to adapt between the two interfaces, otherwise an - exception is thrown. - - - - - - Extract the value of a property from the - - - - Extract the value of a property from the - - - Nicko Cadell - - - - Constructs a RawPropertyLayout - - - - - Lookup the property for - - The event to format - returns property value - - - Looks up and returns the object value of the property - named . If there is no property defined - with than name then null will be returned. - - - - - - The name of the value to lookup in the LoggingEvent Properties collection. - - - Value to lookup in the LoggingEvent Properties collection - - - - String name of the property to lookup in the . - - - - - - Extract the date from the - - - - Extract the date from the - - - Nicko Cadell - Gert Driesen - - - - Constructs a RawTimeStampLayout - - - - - Gets the as a . - - The event to format - returns the time stamp - - - Gets the as a . - - - The time stamp is in local time. To format the time stamp - in universal time use . - - - - - - Extract the date from the - - - - Extract the date from the - - - Nicko Cadell - Gert Driesen - - - - Constructs a RawUtcTimeStampLayout - - - - - Gets the as a . - - The event to format - returns the time stamp - - - Gets the as a . - - - The time stamp is in universal time. To format the time stamp - in local time use . - - - - - - A very simple layout - - - - SimpleLayout consists of the level of the log statement, - followed by " - " and then the log message itself. For example, - - DEBUG - Hello world - - - - Nicko Cadell - Gert Driesen - - - - Constructs a SimpleLayout - - - - - Initialize layout options - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - - - - Produces a simple formatted output. - - the event being logged - The TextWriter to write the formatted event to - - - Formats the event as the level of the even, - followed by " - " and then the log message itself. The - output is terminated by a newline. - - - - - - Layout that formats the log events as XML elements. - - - - The output of the consists of a series of - log4net:event elements. It does not output a complete well-formed XML - file. The output is designed to be included as an external entity - in a separate file to form a correct XML file. - - - For example, if abc is the name of the file where - the output goes, then a well-formed XML file would - be: - - - <?xml version="1.0" ?> - - <!DOCTYPE log4net:events SYSTEM "log4net-events.dtd" [<!ENTITY data SYSTEM "abc">]> - - <log4net:events version="1.2" xmlns:log4net="http://logging.apache.org/log4net/schemas/log4net-events-1.2> - &data; - </log4net:events> - - - This approach enforces the independence of the - and the appender where it is embedded. - - - The version attribute helps components to correctly - interpret output generated by . The value of - this attribute should be "1.2" for release 1.2 and later. - - - Alternatively the Header and Footer properties can be - configured to output the correct XML header, open tag and close tag. - When setting the Header and Footer properties it is essential - that the underlying data store not be appendable otherwise the data - will become invalid XML. - - - Nicko Cadell - Gert Driesen - - - - Layout that formats the log events as XML elements. - - - - This is an abstract class that must be subclassed by an implementation - to conform to a specific schema. - - - Deriving classes must implement the method. - - - Nicko Cadell - Gert Driesen - - - - Protected constructor to support subclasses - - - - Initializes a new instance of the class - with no location info. - - - - - - Protected constructor to support subclasses - - - - The parameter determines whether - location information will be output by the layout. If - is set to true, then the - file name and line number of the statement at the origin of the log - statement will be output. - - - If you are embedding this layout within an SMTPAppender - then make sure to set the LocationInfo option of that - appender as well. - - - - - - Initialize layout options - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - - - - Produces a formatted string. - - The event being logged. - The TextWriter to write the formatted event to - - - Format the and write it to the . - - - This method creates an that writes to the - . The is passed - to the method. Subclasses should override the - method rather than this method. - - - - - - Does the actual writing of the XML. - - The writer to use to output the event to. - The event to write. - - - Subclasses should override this method to format - the as XML. - - - - - - Flag to indicate if location information should be included in - the XML events. - - - - - Writer adapter that ignores Close - - - - - The string to replace invalid chars with - - - - - Gets a value indicating whether to include location information in - the XML events. - - - true if location information should be included in the XML - events; otherwise, false. - - - - If is set to true, then the file - name and line number of the statement at the origin of the log - statement will be output. - - - If you are embedding this layout within an SMTPAppender - then make sure to set the LocationInfo option of that - appender as well. - - - - - - The string to replace characters that can not be expressed in XML with. - - - Not all characters may be expressed in XML. This property contains the - string to replace those that can not with. This defaults to a ?. Set it - to the empty string to simply remove offending characters. For more - details on the allowed character ranges see http://www.w3.org/TR/REC-xml/#charsets - Character replacement will occur in the log message, the property names - and the property values. - - - - - - - Gets the content type output by this layout. - - - As this is the XML layout, the value is always "text/xml". - - - - As this is the XML layout, the value is always "text/xml". - - - - - - Constructs an XmlLayout - - - - - Constructs an XmlLayout. - - - - The LocationInfo option takes a boolean value. By - default, it is set to false which means there will be no location - information output by this layout. If the the option is set to - true, then the file name and line number of the statement - at the origin of the log statement will be output. - - - If you are embedding this layout within an SmtpAppender - then make sure to set the LocationInfo option of that - appender as well. - - - - - - Initialize layout options - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - Builds a cache of the element names - - - - - - Does the actual writing of the XML. - - The writer to use to output the event to. - The event to write. - - - Override the base class method - to write the to the . - - - - - - The prefix to use for all generated element names - - - - - The prefix to use for all element names - - - - The default prefix is log4net. Set this property - to change the prefix. If the prefix is set to an empty string - then no prefix will be written. - - - - - - Set whether or not to base64 encode the message. - - - - By default the log message will be written as text to the xml - output. This can cause problems when the message contains binary - data. By setting this to true the contents of the message will be - base64 encoded. If this is set then invalid character replacement - (see ) will not be performed - on the log message. - - - - - - Set whether or not to base64 encode the property values. - - - - By default the properties will be written as text to the xml - output. This can cause problems when one or more properties contain - binary data. By setting this to true the values of the properties - will be base64 encoded. If this is set then invalid character replacement - (see ) will not be performed - on the property values. - - - - - - Layout that formats the log events as XML elements compatible with the log4j schema - - - - Formats the log events according to the http://logging.apache.org/log4j schema. - - - Nicko Cadell - - - - The 1st of January 1970 in UTC - - - - - Constructs an XMLLayoutSchemaLog4j - - - - - Constructs an XMLLayoutSchemaLog4j. - - - - The LocationInfo option takes a boolean value. By - default, it is set to false which means there will be no location - information output by this layout. If the the option is set to - true, then the file name and line number of the statement - at the origin of the log statement will be output. - - - If you are embedding this layout within an SMTPAppender - then make sure to set the LocationInfo option of that - appender as well. - - - - - - Actually do the writing of the xml - - the writer to use - the event to write - - - Generate XML that is compatible with the log4j schema. - - - - - - The version of the log4j schema to use. - - - - Only version 1.2 of the log4j schema is supported. - - - - - - The default object Renderer. - - - - The default renderer supports rendering objects and collections to strings. - - - See the method for details of the output. - - - Nicko Cadell - Gert Driesen - - - - Implement this interface in order to render objects as strings - - - - Certain types require special case conversion to - string form. This conversion is done by an object renderer. - Object renderers implement the - interface. - - - Nicko Cadell - Gert Driesen - - - - Render the object to a string - - The map used to lookup renderers - The object to render - The writer to render to - - - Render the object to a - string. - - - The parameter is - provided to lookup and render other objects. This is - very useful where contains - nested objects of unknown type. The - method can be used to render these objects. - - - - - - Default constructor - - - - Default constructor - - - - - - Render the object to a string - - The map used to lookup renderers - The object to render - The writer to render to - - - Render the object to a string. - - - The parameter is - provided to lookup and render other objects. This is - very useful where contains - nested objects of unknown type. The - method can be used to render these objects. - - - The default renderer supports rendering objects to strings as follows: - - - - Value - Rendered String - - - null - - "(null)" - - - - - - - For a one dimensional array this is the - array type name, an open brace, followed by a comma - separated list of the elements (using the appropriate - renderer), followed by a close brace. - - - For example: int[] {1, 2, 3}. - - - If the array is not one dimensional the - Array.ToString() is returned. - - - - - , & - - - Rendered as an open brace, followed by a comma - separated list of the elements (using the appropriate - renderer), followed by a close brace. - - - For example: {a, b, c}. - - - All collection classes that implement its subclasses, - or generic equivalents all implement the interface. - - - - - - - - Rendered as the key, an equals sign ('='), and the value (using the appropriate - renderer). - - - For example: key=value. - - - - - other - - Object.ToString() - - - - - - - - Render the array argument into a string - - The map used to lookup renderers - the array to render - The writer to render to - - - For a one dimensional array this is the - array type name, an open brace, followed by a comma - separated list of the elements (using the appropriate - renderer), followed by a close brace. For example: - int[] {1, 2, 3}. - - - If the array is not one dimensional the - Array.ToString() is returned. - - - - - - Render the enumerator argument into a string - - The map used to lookup renderers - the enumerator to render - The writer to render to - - - Rendered as an open brace, followed by a comma - separated list of the elements (using the appropriate - renderer), followed by a close brace. For example: - {a, b, c}. - - - - - - Render the DictionaryEntry argument into a string - - The map used to lookup renderers - the DictionaryEntry to render - The writer to render to - - - Render the key, an equals sign ('='), and the value (using the appropriate - renderer). For example: key=value. - - - - - - Map class objects to an . - - - - Maintains a mapping between types that require special - rendering and the that - is used to render them. - - - The method is used to render an - object using the appropriate renderers defined in this map. - - - Nicko Cadell - Gert Driesen - - - - Default Constructor - - - - Default constructor. - - - - - - Render using the appropriate renderer. - - the object to render to a string - the object rendered as a string - - - This is a convenience method used to render an object to a string. - The alternative method - should be used when streaming output to a . - - - - - - Render using the appropriate renderer. - - the object to render to a string - The writer to render to - - - Find the appropriate renderer for the type of the - parameter. This is accomplished by calling the - method. Once a renderer is found, it is - applied on the object and the result is returned - as a . - - - - - - Gets the renderer for the specified object type - - the object to lookup the renderer for - the renderer for - - - Gets the renderer for the specified object type. - - - Syntactic sugar method that calls - with the type of the object parameter. - - - - - - Gets the renderer for the specified type - - the type to lookup the renderer for - the renderer for the specified type - - - Returns the renderer for the specified type. - If no specific renderer has been defined the - will be returned. - - - - - - Internal function to recursively search interfaces - - the type to lookup the renderer for - the renderer for the specified type - - - - Clear the map of renderers - - - - Clear the custom renderers defined by using - . The - cannot be removed. - - - - - - Register an for . - - the type that will be rendered by - the renderer for - - - Register an object renderer for a specific source type. - This renderer will be returned from a call to - specifying the same as an argument. - - - - - - Get the default renderer instance - - the default renderer - - - Get the default renderer - - - - - - Interface implemented by logger repository plugins. - - - - Plugins define additional behavior that can be associated - with a . - The held by the - property is used to store the plugins for a repository. - - - The log4net.Config.PluginAttribute can be used to - attach plugins to repositories created using configuration - attributes. - - - Nicko Cadell - Gert Driesen - - - - Attaches the plugin to the specified . - - The that this plugin should be attached to. - - - A plugin may only be attached to a single repository. - - - This method is called when the plugin is attached to the repository. - - - - - - Is called when the plugin is to shutdown. - - - - This method is called to notify the plugin that - it should stop operating and should detach from - the repository. - - - - - - Gets the name of the plugin. - - - The name of the plugin. - - - - Plugins are stored in the - keyed by name. Each plugin instance attached to a - repository must be a unique name. - - - - - - A strongly-typed collection of objects. - - Nicko Cadell - - - - Creates a read-only wrapper for a PluginCollection instance. - - list to create a readonly wrapper arround - - A PluginCollection wrapper that is read-only. - - - - - Initializes a new instance of the PluginCollection class - that is empty and has the default initial capacity. - - - - - Initializes a new instance of the PluginCollection class - that has the specified initial capacity. - - - The number of elements that the new PluginCollection is initially capable of storing. - - - - - Initializes a new instance of the PluginCollection class - that contains elements copied from the specified PluginCollection. - - The PluginCollection whose elements are copied to the new collection. - - - - Initializes a new instance of the PluginCollection class - that contains elements copied from the specified array. - - The array whose elements are copied to the new list. - - - - Initializes a new instance of the PluginCollection class - that contains elements copied from the specified collection. - - The collection whose elements are copied to the new list. - - - - Allow subclasses to avoid our default constructors - - - - - - - Copies the entire PluginCollection to a one-dimensional - array. - - The one-dimensional array to copy to. - - - - Copies the entire PluginCollection to a one-dimensional - array, starting at the specified index of the target array. - - The one-dimensional array to copy to. - The zero-based index in at which copying begins. - - - - Adds a to the end of the PluginCollection. - - The to be added to the end of the PluginCollection. - The index at which the value has been added. - - - - Removes all elements from the PluginCollection. - - - - - Creates a shallow copy of the . - - A new with a shallow copy of the collection data. - - - - Determines whether a given is in the PluginCollection. - - The to check for. - true if is found in the PluginCollection; otherwise, false. - - - - Returns the zero-based index of the first occurrence of a - in the PluginCollection. - - The to locate in the PluginCollection. - - The zero-based index of the first occurrence of - in the entire PluginCollection, if found; otherwise, -1. - - - - - Inserts an element into the PluginCollection at the specified index. - - The zero-based index at which should be inserted. - The to insert. - - is less than zero - -or- - is equal to or greater than . - - - - - Removes the first occurrence of a specific from the PluginCollection. - - The to remove from the PluginCollection. - - The specified was not found in the PluginCollection. - - - - - Removes the element at the specified index of the PluginCollection. - - The zero-based index of the element to remove. - - is less than zero. - -or- - is equal to or greater than . - - - - - Returns an enumerator that can iterate through the PluginCollection. - - An for the entire PluginCollection. - - - - Adds the elements of another PluginCollection to the current PluginCollection. - - The PluginCollection whose elements should be added to the end of the current PluginCollection. - The new of the PluginCollection. - - - - Adds the elements of a array to the current PluginCollection. - - The array whose elements should be added to the end of the PluginCollection. - The new of the PluginCollection. - - - - Adds the elements of a collection to the current PluginCollection. - - The collection whose elements should be added to the end of the PluginCollection. - The new of the PluginCollection. - - - - Sets the capacity to the actual number of elements. - - - - - is less than zero. - -or- - is equal to or greater than . - - - - - is less than zero. - -or- - is equal to or greater than . - - - - - Gets the number of elements actually contained in the PluginCollection. - - - - - Gets a value indicating whether access to the collection is synchronized (thread-safe). - - true if access to the ICollection is synchronized (thread-safe); otherwise, false. - - - - Gets an object that can be used to synchronize access to the collection. - - - An object that can be used to synchronize access to the collection. - - - - - Gets or sets the at the specified index. - - - The at the specified index. - - The zero-based index of the element to get or set. - - is less than zero. - -or- - is equal to or greater than . - - - - - Gets a value indicating whether the collection has a fixed size. - - true if the collection has a fixed size; otherwise, false. The default is false. - - - - Gets a value indicating whether the IList is read-only. - - true if the collection is read-only; otherwise, false. The default is false. - - - - Gets or sets the number of elements the PluginCollection can contain. - - - The number of elements the PluginCollection can contain. - - - - - Supports type-safe iteration over a . - - - - - - Advances the enumerator to the next element in the collection. - - - true if the enumerator was successfully advanced to the next element; - false if the enumerator has passed the end of the collection. - - - The collection was modified after the enumerator was created. - - - - - Sets the enumerator to its initial position, before the first element in the collection. - - - - - Gets the current element in the collection. - - - - - Type visible only to our subclasses - Used to access protected constructor - - - - - - A value - - - - - Supports simple iteration over a . - - - - - - Initializes a new instance of the Enumerator class. - - - - - - Advances the enumerator to the next element in the collection. - - - true if the enumerator was successfully advanced to the next element; - false if the enumerator has passed the end of the collection. - - - The collection was modified after the enumerator was created. - - - - - Sets the enumerator to its initial position, before the first element in the collection. - - - - - Gets the current element in the collection. - - - The current element in the collection. - - - - - - - - Map of repository plugins. - - - - This class is a name keyed map of the plugins that are - attached to a repository. - - - Nicko Cadell - Gert Driesen - - - - Constructor - - The repository that the plugins should be attached to. - - - Initialize a new instance of the class with a - repository that the plugins should be attached to. - - - - - - Adds a to the map. - - The to add to the map. - - - The will be attached to the repository when added. - - - If there already exists a plugin with the same name - attached to the repository then the old plugin will - be and replaced with - the new plugin. - - - - - - Removes a from the map. - - The to remove from the map. - - - Remove a specific plugin from this map. - - - - - - Gets a by name. - - The name of the to lookup. - - The from the map with the name specified, or - null if no plugin is found. - - - - Lookup a plugin by name. If the plugin is not found null - will be returned. - - - - - - Gets all possible plugins as a list of objects. - - All possible plugins as a list of objects. - - - Get a collection of all the plugins defined in this map. - - - - - - Base implementation of - - - - Default abstract implementation of the - interface. This base class can be used by implementors - of the interface. - - - Nicko Cadell - Gert Driesen - - - - Constructor - - the name of the plugin - - Initializes a new Plugin with the specified name. - - - - - Attaches this plugin to a . - - The that this plugin should be attached to. - - - A plugin may only be attached to a single repository. - - - This method is called when the plugin is attached to the repository. - - - - - - Is called when the plugin is to shutdown. - - - - This method is called to notify the plugin that - it should stop operating and should detach from - the repository. - - - - - - The name of this plugin. - - - - - The repository this plugin is attached to. - - - - - Gets or sets the name of the plugin. - - - The name of the plugin. - - - - Plugins are stored in the - keyed by name. Each plugin instance attached to a - repository must be a unique name. - - - The name of the plugin must not change one the - plugin has been attached to a repository. - - - - - - The repository for this plugin - - - The that this plugin is attached to. - - - - Gets or sets the that this plugin is - attached to. - - - - - - Plugin that listens for events from the - - - - This plugin publishes an instance of - on a specified . This listens for logging events delivered from - a remote . - - - When an event is received it is relogged within the attached repository - as if it had been raised locally. - - - Nicko Cadell - Gert Driesen - - - - Default constructor - - - - Initializes a new instance of the class. - - - The property must be set. - - - - - - Construct with sink Uri. - - The name to publish the sink under in the remoting infrastructure. - See for more details. - - - Initializes a new instance of the class - with specified name. - - - - - - Attaches this plugin to a . - - The that this plugin should be attached to. - - - A plugin may only be attached to a single repository. - - - This method is called when the plugin is attached to the repository. - - - - - - Is called when the plugin is to shutdown. - - - - When the plugin is shutdown the remote logging - sink is disconnected. - - - - - - Gets or sets the URI of this sink. - - - The URI of this sink. - - - - This is the name under which the object is marshaled. - - - - - - - Delivers objects to a remote sink. - - - - Internal class used to listen for logging events - and deliver them to the local repository. - - - - - - Constructor - - The repository to log to. - - - Initializes a new instance of the for the - specified . - - - - - - Logs the events to the repository. - - The events to log. - - - The events passed are logged to the - - - - - - Obtains a lifetime service object to control the lifetime - policy for this instance. - - null to indicate that this instance should live forever. - - - Obtains a lifetime service object to control the lifetime - policy for this instance. This object should live forever - therefore this implementation returns null. - - - - - - The underlying that events should - be logged to. - - - - - Default implementation of - - - - This default implementation of the - interface is used to create the default subclass - of the object. - - - Nicko Cadell - Gert Driesen - - - - Interface abstracts creation of instances - - - - This interface is used by the to - create new objects. - - - The method is called - to create a named . - - - Implement this interface to create new subclasses of . - - - Nicko Cadell - Gert Driesen - - - - Create a new instance - - The name of the . - The instance for the specified name. - - - Create a new instance with the - specified name. - - - Called by the to create - new named instances. - - - If the is null then the root logger - must be returned. - - - - - - Default constructor - - - - Initializes a new instance of the class. - - - - - - Create a new instance - - The name of the . - The instance for the specified name. - - - Create a new instance with the - specified name. - - - Called by the to create - new named instances. - - - If the is null then the root logger - must be returned. - - - - - - Default internal subclass of - - - - This subclass has no additional behavior over the - class but does allow instances - to be created. - - - - - - Implementation of used by - - - - Internal class used to provide implementation of - interface. Applications should use to get - logger instances. - - - This is one of the central classes in the log4net implementation. One of the - distinctive features of log4net are hierarchical loggers and their - evaluation. The organizes the - instances into a rooted tree hierarchy. - - - The class is abstract. Only concrete subclasses of - can be created. The - is used to create instances of this type for the . - - - Nicko Cadell - Gert Driesen - Aspi Havewala - Douglas de la Torre - - - - This constructor created a new instance and - sets its name. - - The name of the . - - - This constructor is protected and designed to be used by - a subclass that is not abstract. - - - Loggers are constructed by - objects. See for the default - logger creator. - - - - - - Add to the list of appenders of this - Logger instance. - - An appender to add to this logger - - - Add to the list of appenders of this - Logger instance. - - - If is already in the list of - appenders, then it won't be added again. - - - - - - Look for the appender named as name - - The name of the appender to lookup - The appender with the name specified, or null. - - - Returns the named appender, or null if the appender is not found. - - - - - - Remove all previously added appenders from this Logger instance. - - - - Remove all previously added appenders from this Logger instance. - - - This is useful when re-reading configuration information. - - - - - - Remove the appender passed as parameter form the list of appenders. - - The appender to remove - The appender removed from the list - - - Remove the appender passed as parameter form the list of appenders. - The appender removed is not closed. - If you are discarding the appender you must call - on the appender removed. - - - - - - Remove the appender passed as parameter form the list of appenders. - - The name of the appender to remove - The appender removed from the list - - - Remove the named appender passed as parameter form the list of appenders. - The appender removed is not closed. - If you are discarding the appender you must call - on the appender removed. - - - - - - This generic form is intended to be used by wrappers. - - The declaring type of the method that is - the stack boundary into the logging system for this call. - The level of the message to be logged. - The message object to log. - The exception to log, including its stack trace. - - - Generate a logging event for the specified using - the and . - - - This method must not throw any exception to the caller. - - - - - - This is the most generic printing method that is intended to be used - by wrappers. - - The event being logged. - - - Logs the specified logging event through this logger. - - - This method must not throw any exception to the caller. - - - - - - Checks if this logger is enabled for a given passed as parameter. - - The level to check. - - true if this logger is enabled for level, otherwise false. - - - - Test if this logger is going to log events of the specified . - - - This method must not throw any exception to the caller. - - - - - - Deliver the to the attached appenders. - - The event to log. - - - Call the appenders in the hierarchy starting at - this. If no appenders could be found, emit a - warning. - - - This method calls all the appenders inherited from the - hierarchy circumventing any evaluation of whether to log or not - to log the particular log request. - - - - - - Closes all attached appenders implementing the interface. - - - - Used to ensure that the appenders are correctly shutdown. - - - - - - This is the most generic printing method. This generic form is intended to be used by wrappers - - The level of the message to be logged. - The message object to log. - The exception to log, including its stack trace. - - - Generate a logging event for the specified using - the . - - - - - - Creates a new logging event and logs the event without further checks. - - The declaring type of the method that is - the stack boundary into the logging system for this call. - The level of the message to be logged. - The message object to log. - The exception to log, including its stack trace. - - - Generates a logging event and delivers it to the attached - appenders. - - - - - - Creates a new logging event and logs the event without further checks. - - The event being logged. - - - Delivers the logging event to the attached appenders. - - - - - - The fully qualified type of the Logger class. - - - - - The name of this logger. - - - - - The assigned level of this logger. - - - - The level variable need not be - assigned a value in which case it is inherited - form the hierarchy. - - - - - - The parent of this logger. - - - - The parent of this logger. - All loggers have at least one ancestor which is the root logger. - - - - - - Loggers need to know what Hierarchy they are in. - - - - Loggers need to know what Hierarchy they are in. - The hierarchy that this logger is a member of is stored - here. - - - - - - Helper implementation of the interface - - - - - Flag indicating if child loggers inherit their parents appenders - - - - Additivity is set to true by default, that is children inherit - the appenders of their ancestors by default. If this variable is - set to false then the appenders found in the - ancestors of this logger are not used. However, the children - of this logger will inherit its appenders, unless the children - have their additivity flag set to false too. See - the user manual for more details. - - - - - - Lock to protect AppenderAttachedImpl variable m_appenderAttachedImpl - - - - - Gets or sets the parent logger in the hierarchy. - - - The parent logger in the hierarchy. - - - - Part of the Composite pattern that makes the hierarchy. - The hierarchy is parent linked rather than child linked. - - - - - - Gets or sets a value indicating if child loggers inherit their parent's appenders. - - - true if child loggers inherit their parent's appenders. - - - - Additivity is set to true by default, that is children inherit - the appenders of their ancestors by default. If this variable is - set to false then the appenders found in the - ancestors of this logger are not used. However, the children - of this logger will inherit its appenders, unless the children - have their additivity flag set to false too. See - the user manual for more details. - - - - - - Gets the effective level for this logger. - - The nearest level in the logger hierarchy. - - - Starting from this logger, searches the logger hierarchy for a - non-null level and returns it. Otherwise, returns the level of the - root logger. - - The Logger class is designed so that this method executes as - quickly as possible. - - - - - Gets or sets the where this - Logger instance is attached to. - - The hierarchy that this logger belongs to. - - - This logger must be attached to a single . - - - - - - Gets or sets the assigned , if any, for this Logger. - - - The of this logger. - - - - The assigned can be null. - - - - - - Get the appenders contained in this logger as an - . - - A collection of the appenders in this logger - - - Get the appenders contained in this logger as an - . If no appenders - can be found, then a is returned. - - - - - - Gets the logger name. - - - The name of the logger. - - - - The name of this logger - - - - - - Gets the where this - Logger instance is attached to. - - - The that this logger belongs to. - - - - Gets the where this - Logger instance is attached to. - - - - - - Construct a new Logger - - the name of the logger - - - Initializes a new instance of the class - with the specified name. - - - - - - Delegate used to handle logger creation event notifications. - - The in which the has been created. - The event args that hold the instance that has been created. - - - Delegate used to handle logger creation event notifications. - - - - - - Provides data for the event. - - - - A event is raised every time a - is created. - - - - - - The created - - - - - Constructor - - The that has been created. - - - Initializes a new instance of the event argument - class,with the specified . - - - - - - Gets the that has been created. - - - The that has been created. - - - - The that has been created. - - - - - - Hierarchical organization of loggers - - - - The casual user should not have to deal with this class - directly. - - - This class is specialized in retrieving loggers by name and - also maintaining the logger hierarchy. Implements the - interface. - - - The structure of the logger hierarchy is maintained by the - method. The hierarchy is such that children - link to their parent but parents do not have any references to their - children. Moreover, loggers can be instantiated in any order, in - particular descendant before ancestor. - - - In case a descendant is created before a particular ancestor, - then it creates a provision node for the ancestor and adds itself - to the provision node. Other descendants of the same ancestor add - themselves to the previously created provision node. - - - Nicko Cadell - Gert Driesen - - - - Base implementation of - - - - Default abstract implementation of the interface. - - - Skeleton implementation of the interface. - All types can extend this type. - - - Nicko Cadell - Gert Driesen - - - - Interface implemented by logger repositories. - - - - This interface is implemented by logger repositories. e.g. - . - - - This interface is used by the - to obtain interfaces. - - - Nicko Cadell - Gert Driesen - - - - Check if the named logger exists in the repository. If so return - its reference, otherwise returns null. - - The name of the logger to lookup - The Logger object with the name specified - - - If the names logger exists it is returned, otherwise - null is returned. - - - - - - Returns all the currently defined loggers as an Array. - - All the defined loggers - - - Returns all the currently defined loggers as an Array. - - - - - - Returns a named logger instance - - The name of the logger to retrieve - The logger object with the name specified - - - Returns a named logger instance. - - - If a logger of that name already exists, then it will be - returned. Otherwise, a new logger will be instantiated and - then linked with its existing ancestors as well as children. - - - - - Shutdown the repository - - - Shutting down a repository will safely close and remove - all appenders in all loggers including the root logger. - - - Some appenders need to be closed before the - application exists. Otherwise, pending logging events might be - lost. - - - The method is careful to close nested - appenders before closing regular appenders. This is allows - configurations where a regular appender is attached to a logger - and again to a nested appender. - - - - - - Reset the repositories configuration to a default state - - - - Reset all values contained in this instance to their - default state. - - - Existing loggers are not removed. They are just reset. - - - This method should be used sparingly and with care as it will - block all logging until it is completed. - - - - - - Log the through this repository. - - the event to log - - - This method should not normally be used to log. - The interface should be used - for routine logging. This interface can be obtained - using the method. - - - The logEvent is delivered to the appropriate logger and - that logger is then responsible for logging the event. - - - - - - Returns all the Appenders that are configured as an Array. - - All the Appenders - - - Returns all the Appenders that are configured as an Array. - - - - - - The name of the repository - - - The name of the repository - - - - The name of the repository. - - - - - - RendererMap accesses the object renderer map for this repository. - - - RendererMap accesses the object renderer map for this repository. - - - - RendererMap accesses the object renderer map for this repository. - - - The RendererMap holds a mapping between types and - objects. - - - - - - The plugin map for this repository. - - - The plugin map for this repository. - - - - The plugin map holds the instances - that have been attached to this repository. - - - - - - Get the level map for the Repository. - - - - Get the level map for the Repository. - - - The level map defines the mappings between - level names and objects in - this repository. - - - - - - The threshold for all events in this repository - - - The threshold for all events in this repository - - - - The threshold for all events in this repository. - - - - - - Flag indicates if this repository has been configured. - - - Flag indicates if this repository has been configured. - - - - Flag indicates if this repository has been configured. - - - - - - Event to notify that the repository has been shutdown. - - - Event to notify that the repository has been shutdown. - - - - Event raised when the repository has been shutdown. - - - - - - Event to notify that the repository has had its configuration reset. - - - Event to notify that the repository has had its configuration reset. - - - - Event raised when the repository's configuration has been - reset to default. - - - - - - Event to notify that the repository has had its configuration changed. - - - Event to notify that the repository has had its configuration changed. - - - - Event raised when the repository's configuration has been changed. - - - - - - Repository specific properties - - - Repository specific properties - - - - These properties can be specified on a repository specific basis. - - - - - - Default Constructor - - - - Initializes the repository with default (empty) properties. - - - - - - Construct the repository using specific properties - - the properties to set for this repository - - - Initializes the repository with specified properties. - - - - - - Test if logger exists - - The name of the logger to lookup - The Logger object with the name specified - - - Check if the named logger exists in the repository. If so return - its reference, otherwise returns null. - - - - - - Returns all the currently defined loggers in the repository - - All the defined loggers - - - Returns all the currently defined loggers in the repository as an Array. - - - - - - Return a new logger instance - - The name of the logger to retrieve - The logger object with the name specified - - - Return a new logger instance. - - - If a logger of that name already exists, then it will be - returned. Otherwise, a new logger will be instantiated and - then linked with its existing ancestors as well as children. - - - - - - Shutdown the repository - - - - Shutdown the repository. Can be overridden in a subclass. - This base class implementation notifies the - listeners and all attached plugins of the shutdown event. - - - - - - Reset the repositories configuration to a default state - - - - Reset all values contained in this instance to their - default state. - - - Existing loggers are not removed. They are just reset. - - - This method should be used sparingly and with care as it will - block all logging until it is completed. - - - - - - Log the logEvent through this repository. - - the event to log - - - This method should not normally be used to log. - The interface should be used - for routine logging. This interface can be obtained - using the method. - - - The logEvent is delivered to the appropriate logger and - that logger is then responsible for logging the event. - - - - - - Returns all the Appenders that are configured as an Array. - - All the Appenders - - - Returns all the Appenders that are configured as an Array. - - - - - - Adds an object renderer for a specific class. - - The type that will be rendered by the renderer supplied. - The object renderer used to render the object. - - - Adds an object renderer for a specific class. - - - - - - Notify the registered listeners that the repository is shutting down - - Empty EventArgs - - - Notify any listeners that this repository is shutting down. - - - - - - Notify the registered listeners that the repository has had its configuration reset - - Empty EventArgs - - - Notify any listeners that this repository's configuration has been reset. - - - - - - Notify the registered listeners that the repository has had its configuration changed - - Empty EventArgs - - - Notify any listeners that this repository's configuration has changed. - - - - - - Raise a configuration changed event on this repository - - EventArgs.Empty - - - Applications that programmatically change the configuration of the repository should - raise this event notification to notify listeners. - - - - - - The name of the repository - - - The string name of the repository - - - - The name of this repository. The name is - used to store and lookup the repositories - stored by the . - - - - - - The threshold for all events in this repository - - - The threshold for all events in this repository - - - - The threshold for all events in this repository - - - - - - RendererMap accesses the object renderer map for this repository. - - - RendererMap accesses the object renderer map for this repository. - - - - RendererMap accesses the object renderer map for this repository. - - - The RendererMap holds a mapping between types and - objects. - - - - - - The plugin map for this repository. - - - The plugin map for this repository. - - - - The plugin map holds the instances - that have been attached to this repository. - - - - - - Get the level map for the Repository. - - - - Get the level map for the Repository. - - - The level map defines the mappings between - level names and objects in - this repository. - - - - - - Flag indicates if this repository has been configured. - - - Flag indicates if this repository has been configured. - - - - Flag indicates if this repository has been configured. - - - - - - Event to notify that the repository has been shutdown. - - - Event to notify that the repository has been shutdown. - - - - Event raised when the repository has been shutdown. - - - - - - Event to notify that the repository has had its configuration reset. - - - Event to notify that the repository has had its configuration reset. - - - - Event raised when the repository's configuration has been - reset to default. - - - - - - Event to notify that the repository has had its configuration changed. - - - Event to notify that the repository has had its configuration changed. - - - - Event raised when the repository's configuration has been changed. - - - - - - Repository specific properties - - - Repository specific properties - - - These properties can be specified on a repository specific basis - - - - - Basic Configurator interface for repositories - - - - Interface used by basic configurator to configure a - with a default . - - - A should implement this interface to support - configuration by the . - - - Nicko Cadell - Gert Driesen - - - - Initialize the repository using the specified appender - - the appender to use to log all logging events - - - Configure the repository to route all logging events to the - specified appender. - - - - - - Configure repository using XML - - - - Interface used by Xml configurator to configure a . - - - A should implement this interface to support - configuration by the . - - - Nicko Cadell - Gert Driesen - - - - Initialize the repository using the specified config - - the element containing the root of the config - - - The schema for the XML configuration data is defined by - the implementation. - - - - - - Default constructor - - - - Initializes a new instance of the class. - - - - - - Construct with properties - - The properties to pass to this repository. - - - Initializes a new instance of the class. - - - - - - Construct with a logger factory - - The factory to use to create new logger instances. - - - Initializes a new instance of the class with - the specified . - - - - - - Construct with properties and a logger factory - - The properties to pass to this repository. - The factory to use to create new logger instances. - - - Initializes a new instance of the class with - the specified . - - - - - - Test if a logger exists - - The name of the logger to lookup - The Logger object with the name specified - - - Check if the named logger exists in the hierarchy. If so return - its reference, otherwise returns null. - - - - - - Returns all the currently defined loggers in the hierarchy as an Array - - All the defined loggers - - - Returns all the currently defined loggers in the hierarchy as an Array. - The root logger is not included in the returned - enumeration. - - - - - - Return a new logger instance named as the first parameter using - the default factory. - - - - Return a new logger instance named as the first parameter using - the default factory. - - - If a logger of that name already exists, then it will be - returned. Otherwise, a new logger will be instantiated and - then linked with its existing ancestors as well as children. - - - The name of the logger to retrieve - The logger object with the name specified - - - - Shutting down a hierarchy will safely close and remove - all appenders in all loggers including the root logger. - - - - Shutting down a hierarchy will safely close and remove - all appenders in all loggers including the root logger. - - - Some appenders need to be closed before the - application exists. Otherwise, pending logging events might be - lost. - - - The Shutdown method is careful to close nested - appenders before closing regular appenders. This is allows - configurations where a regular appender is attached to a logger - and again to a nested appender. - - - - - - Reset all values contained in this hierarchy instance to their default. - - - - Reset all values contained in this hierarchy instance to their - default. This removes all appenders from all loggers, sets - the level of all non-root loggers to null, - sets their additivity flag to true and sets the level - of the root logger to . Moreover, - message disabling is set its default "off" value. - - - Existing loggers are not removed. They are just reset. - - - This method should be used sparingly and with care as it will - block all logging until it is completed. - - - - - - Log the logEvent through this hierarchy. - - the event to log - - - This method should not normally be used to log. - The interface should be used - for routine logging. This interface can be obtained - using the method. - - - The logEvent is delivered to the appropriate logger and - that logger is then responsible for logging the event. - - - - - - Returns all the Appenders that are currently configured - - An array containing all the currently configured appenders - - - Returns all the instances that are currently configured. - All the loggers are searched for appenders. The appenders may also be containers - for appenders and these are also searched for additional loggers. - - - The list returned is unordered but does not contain duplicates. - - - - - - Collect the appenders from an . - The appender may also be a container. - - - - - - - Collect the appenders from an container - - - - - - - Initialize the log4net system using the specified appender - - the appender to use to log all logging events - - - - Initialize the log4net system using the specified appender - - the appender to use to log all logging events - - - This method provides the same functionality as the - method implemented - on this object, but it is protected and therefore can be called by subclasses. - - - - - - Initialize the log4net system using the specified config - - the element containing the root of the config - - - - Initialize the log4net system using the specified config - - the element containing the root of the config - - - This method provides the same functionality as the - method implemented - on this object, but it is protected and therefore can be called by subclasses. - - - - - - Test if this hierarchy is disabled for the specified . - - The level to check against. - - true if the repository is disabled for the level argument, false otherwise. - - - - If this hierarchy has not been configured then this method will - always return true. - - - This method will return true if this repository is - disabled for level object passed as parameter and - false otherwise. - - - See also the property. - - - - - - Clear all logger definitions from the internal hashtable - - - - This call will clear all logger definitions from the internal - hashtable. Invoking this method will irrevocably mess up the - logger hierarchy. - - - You should really know what you are doing before - invoking this method. - - - - - - Return a new logger instance named as the first parameter using - . - - The name of the logger to retrieve - The factory that will make the new logger instance - The logger object with the name specified - - - If a logger of that name already exists, then it will be - returned. Otherwise, a new logger will be instantiated by the - parameter and linked with its existing - ancestors as well as children. - - - - - - Sends a logger creation event to all registered listeners - - The newly created logger - - Raises the logger creation event. - - - - - Updates all the parents of the specified logger - - The logger to update the parents for - - - This method loops through all the potential parents of - . There 3 possible cases: - - - - No entry for the potential parent of exists - - We create a ProvisionNode for this potential - parent and insert in that provision node. - - - - The entry is of type Logger for the potential parent. - - The entry is 's nearest existing parent. We - update 's parent field with this entry. We also break from - he loop because updating our parent's parent is our parent's - responsibility. - - - - The entry is of type ProvisionNode for this potential parent. - - We add to the list of children for this - potential parent. - - - - - - - - Replace a with a in the hierarchy. - - - - - - We update the links for all the children that placed themselves - in the provision node 'pn'. The second argument 'log' is a - reference for the newly created Logger, parent of all the - children in 'pn'. - - - We loop on all the children 'c' in 'pn'. - - - If the child 'c' has been already linked to a child of - 'log' then there is no need to update 'c'. - - - Otherwise, we set log's parent field to c's parent and set - c's parent field to log. - - - - - - Define or redefine a Level using the values in the argument - - the level values - - - Define or redefine a Level using the values in the argument - - - Supports setting levels via the configuration file. - - - - - - Set a Property using the values in the argument - - the property value - - - Set a Property using the values in the argument. - - - Supports setting property values via the configuration file. - - - - - - Event used to notify that a logger has been created. - - - - Event raised when a logger is created. - - - - - - Has no appender warning been emitted - - - - Flag to indicate if we have already issued a warning - about not having an appender warning. - - - - - - Get the root of this hierarchy - - - - Get the root of this hierarchy. - - - - - - Gets or sets the default instance. - - The default - - - The logger factory is used to create logger instances. - - - - - - A class to hold the value, name and display name for a level - - - - A class to hold the value, name and display name for a level - - - - - - Override Object.ToString to return sensible debug info - - string info about this object - - - - Value of the level - - - - If the value is not set (defaults to -1) the value will be looked - up for the current level with the same name. - - - - - - Name of the level - - - The name of the level - - - - The name of the level. - - - - - - Display name for the level - - - The display name of the level - - - - The display name of the level. - - - - - - A class to hold the key and data for a property set in the config file - - - - A class to hold the key and data for a property set in the config file - - - - - - Override Object.ToString to return sensible debug info - - string info about this object - - - - Property Key - - - Property Key - - - - Property Key. - - - - - - Property Value - - - Property Value - - - - Property Value. - - - - - - Used internally to accelerate hash table searches. - - - - Internal class used to improve performance of - string keyed hashtables. - - - The hashcode of the string is cached for reuse. - The string is stored as an interned value. - When comparing two objects for equality - the reference equality of the interned strings is compared. - - - Nicko Cadell - Gert Driesen - - - - Construct key with string name - - - - Initializes a new instance of the class - with the specified name. - - - Stores the hashcode of the string and interns - the string key to optimize comparisons. - - - The Compact Framework 1.0 the - method does not work. On the Compact Framework - the string keys are not interned nor are they - compared by reference. - - - The name of the logger. - - - - Returns a hash code for the current instance. - - A hash code for the current instance. - - - Returns the cached hashcode. - - - - - - Determines whether two instances - are equal. - - The to compare with the current . - - true if the specified is equal to the current ; otherwise, false. - - - - Compares the references of the interned strings. - - - - - - Provision nodes are used where no logger instance has been specified - - - - instances are used in the - when there is no specified - for that node. - - - A provision node holds a list of child loggers on behalf of - a logger that does not exist. - - - Nicko Cadell - Gert Driesen - - - - Create a new provision node with child node - - A child logger to add to this node. - - - Initializes a new instance of the class - with the specified child logger. - - - - - - The sits at the root of the logger hierarchy tree. - - - - The is a regular except - that it provides several guarantees. - - - First, it cannot be assigned a null - level. Second, since the root logger cannot have a parent, the - property always returns the value of the - level field without walking the hierarchy. - - - Nicko Cadell - Gert Driesen - - - - Construct a - - The level to assign to the root logger. - - - Initializes a new instance of the class with - the specified logging level. - - - The root logger names itself as "root". However, the root - logger cannot be retrieved by name. - - - - - - Gets the assigned level value without walking the logger hierarchy. - - The assigned level value without walking the logger hierarchy. - - - Because the root logger cannot have a parent and its level - must not be null this property just returns the - value of . - - - - - - Gets or sets the assigned for the root logger. - - - The of the root logger. - - - - Setting the level of the root logger to a null reference - may have catastrophic results. We prevent this here. - - - - - - Initializes the log4net environment using an XML DOM. - - - - Configures a using an XML DOM. - - - Nicko Cadell - Gert Driesen - - - - Construct the configurator for a hierarchy - - The hierarchy to build. - - - Initializes a new instance of the class - with the specified . - - - - - - Configure the hierarchy by parsing a DOM tree of XML elements. - - The root element to parse. - - - Configure the hierarchy by parsing a DOM tree of XML elements. - - - - - - Parse appenders by IDREF. - - The appender ref element. - The instance of the appender that the ref refers to. - - - Parse an XML element that represents an appender and return - the appender. - - - - - - Parses an appender element. - - The appender element. - The appender instance or null when parsing failed. - - - Parse an XML element that represents an appender and return - the appender instance. - - - - - - Parses a logger element. - - The logger element. - - - Parse an XML element that represents a logger. - - - - - - Parses the root logger element. - - The root element. - - - Parse an XML element that represents the root logger. - - - - - - Parses the children of a logger element. - - The category element. - The logger instance. - Flag to indicate if the logger is the root logger. - - - Parse the child elements of a <logger> element. - - - - - - Parses an object renderer. - - The renderer element. - - - Parse an XML element that represents a renderer. - - - - - - Parses a level element. - - The level element. - The logger object to set the level on. - Flag to indicate if the logger is the root logger. - - - Parse an XML element that represents a level. - - - - - - Sets a parameter on an object. - - The parameter element. - The object to set the parameter on. - - The parameter name must correspond to a writable property - on the object. The value of the parameter is a string, - therefore this function will attempt to set a string - property first. If unable to set a string property it - will inspect the property and its argument type. It will - attempt to call a static method called Parse on the - type of the property. This method will take a single - string argument and return a value that can be used to - set the property. - - - - - Test if an element has no attributes or child elements - - the element to inspect - true if the element has any attributes or child elements, false otherwise - - - - Test if a is constructible with Activator.CreateInstance. - - the type to inspect - true if the type is creatable using a default constructor, false otherwise - - - - Look for a method on the that matches the supplied - - the type that has the method - the name of the method - the method info found - - - The method must be a public instance method on the . - The method must be named or "Add" followed by . - The method must take a single parameter. - - - - - - Converts a string value to a target type. - - The type of object to convert the string to. - The string value to use as the value of the object. - - - An object of type with value or - null when the conversion could not be performed. - - - - - - Creates an object as specified in XML. - - The XML element that contains the definition of the object. - The object type to use if not explicitly specified. - The type that the returned object must be or must inherit from. - The object or null - - - Parse an XML element and create an object instance based on the configuration - data. - - - The type of the instance may be specified in the XML. If not - specified then the is used - as the type. However the type is specified it must support the - type. - - - - - - key: appenderName, value: appender. - - - - - The Hierarchy being configured. - - - - - Delegate used to handle logger repository shutdown event notifications - - The that is shutting down. - Empty event args - - - Delegate used to handle logger repository shutdown event notifications. - - - - - - Delegate used to handle logger repository configuration reset event notifications - - The that has had its configuration reset. - Empty event args - - - Delegate used to handle logger repository configuration reset event notifications. - - - - - - Delegate used to handle event notifications for logger repository configuration changes. - - The that has had its configuration changed. - Empty event arguments. - - - Delegate used to handle event notifications for logger repository configuration changes. - - - - - - Write the name of the current AppDomain to the output - - - - Write the name of the current AppDomain to the output writer - - - Nicko Cadell - - - - Write the name of the current AppDomain to the output - - the writer to write to - null, state is not set - - - Writes name of the current AppDomain to the output . - - - - - - Write the current date to the output - - - - Date pattern converter, uses a to format - the current date and time to the writer as a string. - - - The value of the determines - the formatting of the date. The following values are allowed: - - - Option value - Output - - - ISO8601 - - Uses the formatter. - Formats using the "yyyy-MM-dd HH:mm:ss,fff" pattern. - - - - DATE - - Uses the formatter. - Formats using the "dd MMM yyyy HH:mm:ss,fff" for example, "06 Nov 1994 15:49:37,459". - - - - ABSOLUTE - - Uses the formatter. - Formats using the "HH:mm:ss,fff" for example, "15:49:37,459". - - - - other - - Any other pattern string uses the formatter. - This formatter passes the pattern string to the - method. - For details on valid patterns see - DateTimeFormatInfo Class. - - - - - - The date and time is in the local time zone and is rendered in that zone. - To output the time in Universal time see . - - - Nicko Cadell - - - - The used to render the date to a string - - - - The used to render the date to a string - - - - - - Initialize the converter options - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - - - - Write the current date to the output - - that will receive the formatted result. - null, state is not set - - - Pass the current date and time to the - for it to render it to the writer. - - - The date and time passed is in the local time zone. - - - - - - Write an environment variable to the output - - - - Write an environment variable to the output writer. - The value of the determines - the name of the variable to output. - - - Nicko Cadell - - - - Write an environment variable to the output - - the writer to write to - null, state is not set - - - Writes the environment variable to the output . - The name of the environment variable to output must be set - using the - property. - - - - - - Write the current thread identity to the output - - - - Write the current thread identity to the output writer - - - Nicko Cadell - - - - Write the current thread identity to the output - - the writer to write to - null, state is not set - - - Writes the current thread identity to the output . - - - - - - Pattern converter for literal string instances in the pattern - - - - Writes the literal string value specified in the - property to - the output. - - - Nicko Cadell - - - - Set the next converter in the chain - - The next pattern converter in the chain - The next pattern converter - - - Special case the building of the pattern converter chain - for instances. Two adjacent - literals in the pattern can be represented by a single combined - pattern converter. This implementation detects when a - is added to the chain - after this converter and combines its value with this converter's - literal value. - - - - - - Write the literal to the output - - the writer to write to - null, not set - - - Override the formatting behavior to ignore the FormattingInfo - because we have a literal instead. - - - Writes the value of - to the output . - - - - - - Convert this pattern into the rendered message - - that will receive the formatted result. - null, not set - - - This method is not used. - - - - - - Writes a newline to the output - - - - Writes the system dependent line terminator to the output. - This behavior can be overridden by setting the : - - - - Option Value - Output - - - DOS - DOS or Windows line terminator "\r\n" - - - UNIX - UNIX line terminator "\n" - - - - Nicko Cadell - - - - Initialize the converter - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - - - - Write the current process ID to the output - - - - Write the current process ID to the output writer - - - Nicko Cadell - - - - Write the current process ID to the output - - the writer to write to - null, state is not set - - - Write the current process ID to the output . - - - - - - Property pattern converter - - - - This pattern converter reads the thread and global properties. - The thread properties take priority over global properties. - See for details of the - thread properties. See for - details of the global properties. - - - If the is specified then that will be used to - lookup a single property. If no is specified - then all properties will be dumped as a list of key value pairs. - - - Nicko Cadell - - - - Write the property value to the output - - that will receive the formatted result. - null, state is not set - - - Writes out the value of a named property. The property name - should be set in the - property. - - - If the is set to null - then all the properties are written as key value pairs. - - - - - - A Pattern converter that generates a string of random characters - - - - The converter generates a string of random characters. By default - the string is length 4. This can be changed by setting the - to the string value of the length required. - - - The random characters in the string are limited to uppercase letters - and numbers only. - - - The random number generator used by this class is not cryptographically secure. - - - Nicko Cadell - - - - Shared random number generator - - - - - Length of random string to generate. Default length 4. - - - - - Initialize the converter options - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - - - - Write a randoim string to the output - - the writer to write to - null, state is not set - - - Write a randoim string to the output . - - - - - - Write the current threads username to the output - - - - Write the current threads username to the output writer - - - Nicko Cadell - - - - Write the current threads username to the output - - the writer to write to - null, state is not set - - - Write the current threads username to the output . - - - - - - Write the UTC date time to the output - - - - Date pattern converter, uses a to format - the current date and time in Universal time. - - - See the for details on the date pattern syntax. - - - - Nicko Cadell - - - - Write the current date and time to the output - - that will receive the formatted result. - null, state is not set - - - Pass the current date and time to the - for it to render it to the writer. - - - The date is in Universal time when it is rendered. - - - - - - - Type converter for Boolean. - - - - Supports conversion from string to bool type. - - - - - - Nicko Cadell - Gert Driesen - - - - Can the source type be converted to the type supported by this object - - the type to convert - true if the conversion is possible - - - Returns true if the is - the type. - - - - - - Convert the source object to the type supported by this object - - the object to convert - the converted object - - - Uses the method to convert the - argument to a . - - - - The object cannot be converted to the - target type. To check for this condition use the - method. - - - - - Exception base type for conversion errors. - - - - This type extends . It - does not add any new functionality but does differentiate the - type of exception being thrown. - - - Nicko Cadell - Gert Driesen - - - - Constructor - - - - Initializes a new instance of the class. - - - - - - Constructor - - A message to include with the exception. - - - Initializes a new instance of the class - with the specified message. - - - - - - Constructor - - A message to include with the exception. - A nested exception to include. - - - Initializes a new instance of the class - with the specified message and inner exception. - - - - - - Serialization constructor - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - - - Initializes a new instance of the class - with serialized data. - - - - - - Creates a new instance of the class. - - The conversion destination type. - The value to convert. - An instance of the . - - - Creates a new instance of the class. - - - - - - Creates a new instance of the class. - - The conversion destination type. - The value to convert. - A nested exception to include. - An instance of the . - - - Creates a new instance of the class. - - - - - - Register of type converters for specific types. - - - - Maintains a registry of type converters used to convert between - types. - - - Use the and - methods to register new converters. - The and methods - lookup appropriate converters to use. - - - - - Nicko Cadell - Gert Driesen - - - - Private constructor - - - Initializes a new instance of the class. - - - - - Static constructor. - - - - This constructor defines the intrinsic type converters. - - - - - - Adds a converter for a specific type. - - The type being converted to. - The type converter to use to convert to the destination type. - - - Adds a converter instance for a specific type. - - - - - - Adds a converter for a specific type. - - The type being converted to. - The type of the type converter to use to convert to the destination type. - - - Adds a converter for a specific type. - - - - - - Gets the type converter to use to convert values to the destination type. - - The type being converted from. - The type being converted to. - - The type converter instance to use for type conversions or null - if no type converter is found. - - - - Gets the type converter to use to convert values to the destination type. - - - - - - Gets the type converter to use to convert values to the destination type. - - The type being converted to. - - The type converter instance to use for type conversions or null - if no type converter is found. - - - - Gets the type converter to use to convert values to the destination type. - - - - - - Lookups the type converter to use as specified by the attributes on the - destination type. - - The type being converted to. - - The type converter instance to use for type conversions or null - if no type converter is found. - - - - - Creates the instance of the type converter. - - The type of the type converter. - - The type converter instance to use for type conversions or null - if no type converter is found. - - - - The type specified for the type converter must implement - the or interfaces - and must have a public default (no argument) constructor. - - - - - - Mapping from to type converter. - - - - - Supports conversion from string to type. - - - - Supports conversion from string to type. - - - - - - Nicko Cadell - Gert Driesen - - - - Can the source type be converted to the type supported by this object - - the type to convert - true if the conversion is possible - - - Returns true if the is - the type. - - - - - - Overrides the ConvertFrom method of IConvertFrom. - - the object to convert to an encoding - the encoding - - - Uses the method to - convert the argument to an . - - - - The object cannot be converted to the - target type. To check for this condition use the - method. - - - - - Interface supported by type converters - - - - This interface supports conversion from a single type to arbitrary types. - See . - - - Nicko Cadell - - - - Returns whether this converter can convert the object to the specified type - - A Type that represents the type you want to convert to - true if the conversion is possible - - - Test if the type supported by this converter can be converted to the - . - - - - - - Converts the given value object to the specified type, using the arguments - - the object to convert - The Type to convert the value parameter to - the converted object - - - Converts the (which must be of the type supported - by this converter) to the specified.. - - - - - - Supports conversion from string to type. - - - - Supports conversion from string to type. - - - - - Nicko Cadell - - - - Can the source type be converted to the type supported by this object - - the type to convert - true if the conversion is possible - - - Returns true if the is - the type. - - - - - - Overrides the ConvertFrom method of IConvertFrom. - - the object to convert to an IPAddress - the IPAddress - - - Uses the method to convert the - argument to an . - If that fails then the string is resolved as a DNS hostname. - - - - The object cannot be converted to the - target type. To check for this condition use the - method. - - - - - Valid characters in an IPv4 or IPv6 address string. (Does not support subnets) - - - - - Supports conversion from string to type. - - - - Supports conversion from string to type. - - - The string is used as the - of the . - - - - - - Nicko Cadell - - - - Can the source type be converted to the type supported by this object - - the type to convert - true if the conversion is possible - - - Returns true if the is - the type. - - - - - - Overrides the ConvertFrom method of IConvertFrom. - - the object to convert to a PatternLayout - the PatternLayout - - - Creates and returns a new using - the as the - . - - - - The object cannot be converted to the - target type. To check for this condition use the - method. - - - - - Convert between string and - - - - Supports conversion from string to type, - and from a type to a string. - - - The string is used as the - of the . - - - - - - Nicko Cadell - - - - Can the target type be converted to the type supported by this object - - A that represents the type you want to convert to - true if the conversion is possible - - - Returns true if the is - assignable from a type. - - - - - - Converts the given value object to the specified type, using the arguments - - the object to convert - The Type to convert the value parameter to - the converted object - - - Uses the method to convert the - argument to a . - - - - The object cannot be converted to the - . To check for this condition use the - method. - - - - - Can the source type be converted to the type supported by this object - - the type to convert - true if the conversion is possible - - - Returns true if the is - the type. - - - - - - Overrides the ConvertFrom method of IConvertFrom. - - the object to convert to a PatternString - the PatternString - - - Creates and returns a new using - the as the - . - - - - The object cannot be converted to the - target type. To check for this condition use the - method. - - - - - Supports conversion from string to type. - - - - Supports conversion from string to type. - - - - - - Nicko Cadell - - - - Can the source type be converted to the type supported by this object - - the type to convert - true if the conversion is possible - - - Returns true if the is - the type. - - - - - - Overrides the ConvertFrom method of IConvertFrom. - - the object to convert to a Type - the Type - - - Uses the method to convert the - argument to a . - Additional effort is made to locate partially specified types - by searching the loaded assemblies. - - - - The object cannot be converted to the - target type. To check for this condition use the - method. - - - - - Attribute used to associate a type converter - - - - Class and Interface level attribute that specifies a type converter - to use with the associated type. - - - To associate a type converter with a target type apply a - TypeConverterAttribute to the target type. Specify the - type of the type converter on the attribute. - - - Nicko Cadell - Gert Driesen - - - - The string type name of the type converter - - - - - Default constructor - - - - Default constructor - - - - - - Create a new type converter attribute for the specified type name - - The string type name of the type converter - - - The type specified must implement the - or the interfaces. - - - - - - Create a new type converter attribute for the specified type - - The type of the type converter - - - The type specified must implement the - or the interfaces. - - - - - - The string type name of the type converter - - - The string type name of the type converter - - - - The type specified must implement the - or the interfaces. - - - - - - A straightforward implementation of the interface. - - - - This is the default implementation of the - interface. Implementors of the interface - should aggregate an instance of this type. - - - Nicko Cadell - Gert Driesen - - - - Constructor - - - - Initializes a new instance of the class. - - - - - - Append on on all attached appenders. - - The event being logged. - The number of appenders called. - - - Calls the method on all - attached appenders. - - - - - - Append on on all attached appenders. - - The array of events being logged. - The number of appenders called. - - - Calls the method on all - attached appenders. - - - - - - Calls the DoAppende method on the with - the objects supplied. - - The appender - The events - - - If the supports the - interface then the will be passed - through using that interface. Otherwise the - objects in the array will be passed one at a time. - - - - - - Attaches an appender. - - The appender to add. - - - If the appender is already in the list it won't be added again. - - - - - - Gets an attached appender with the specified name. - - The name of the appender to get. - - The appender with the name specified, or null if no appender with the - specified name is found. - - - - Lookup an attached appender by name. - - - - - - Removes all attached appenders. - - - - Removes and closes all attached appenders - - - - - - Removes the specified appender from the list of attached appenders. - - The appender to remove. - The appender removed from the list - - - The appender removed is not closed. - If you are discarding the appender you must call - on the appender removed. - - - - - - Removes the appender with the specified name from the list of appenders. - - The name of the appender to remove. - The appender removed from the list - - - The appender removed is not closed. - If you are discarding the appender you must call - on the appender removed. - - - - - - List of appenders - - - - - Array of appenders, used to cache the m_appenderList - - - - - Gets all attached appenders. - - - A collection of attached appenders, or null if there - are no attached appenders. - - - - The read only collection of all currently attached appenders. - - - - - - This class aggregates several PropertiesDictionary collections together. - - - - Provides a dictionary style lookup over an ordered list of - collections. - - - Nicko Cadell - - - - Constructor - - - - Initializes a new instance of the class. - - - - - - Add a Properties Dictionary to this composite collection - - the properties to add - - - Properties dictionaries added first take precedence over dictionaries added - later. - - - - - - Flatten this composite collection into a single properties dictionary - - the flattened dictionary - - - Reduces the collection of ordered dictionaries to a single dictionary - containing the resultant values for the keys. - - - - - - Gets the value of a property - - - The value for the property with the specified key - - - - Looks up the value for the specified. - The collections are searched - in the order in which they were added to this collection. The value - returned is the value held by the first collection that contains - the specified key. - - - If none of the collections contain the specified key then - null is returned. - - - - - - Base class for Context Properties implementations - - - - This class defines a basic property get set accessor - - - Nicko Cadell - - - - Gets or sets the value of a property - - - The value for the property with the specified key - - - - Gets or sets the value of a property - - - - - - Subclass of that maintains a count of - the number of bytes written. - - - - This writer counts the number of bytes written. - - - Nicko Cadell - Gert Driesen - - - - that does not leak exceptions - - - - does not throw exceptions when things go wrong. - Instead, it delegates error handling to its . - - - Nicko Cadell - Gert Driesen - - - - Adapter that extends and forwards all - messages to an instance of . - - - - Adapter that extends and forwards all - messages to an instance of . - - - Nicko Cadell - - - - The writer to forward messages to - - - - - Create an instance of that forwards all - messages to a . - - The to forward to - - - Create an instance of that forwards all - messages to a . - - - - - - Closes the writer and releases any system resources associated with the writer - - - - - - - - - Dispose this writer - - flag indicating if we are being disposed - - - Dispose this writer - - - - - - Flushes any buffered output - - - - Clears all buffers for the writer and causes any buffered data to be written - to the underlying device - - - - - - Writes a character to the wrapped TextWriter - - the value to write to the TextWriter - - - Writes a character to the wrapped TextWriter - - - - - - Writes a character buffer to the wrapped TextWriter - - the data buffer - the start index - the number of characters to write - - - Writes a character buffer to the wrapped TextWriter - - - - - - Writes a string to the wrapped TextWriter - - the value to write to the TextWriter - - - Writes a string to the wrapped TextWriter - - - - - - Gets or sets the underlying . - - - The underlying . - - - - Gets or sets the underlying . - - - - - - The Encoding in which the output is written - - - The - - - - The Encoding in which the output is written - - - - - - Gets an object that controls formatting - - - The format provider - - - - Gets an object that controls formatting - - - - - - Gets or sets the line terminator string used by the TextWriter - - - The line terminator to use - - - - Gets or sets the line terminator string used by the TextWriter - - - - - - Constructor - - the writer to actually write to - the error handler to report error to - - - Create a new QuietTextWriter using a writer and error handler - - - - - - Writes a character to the underlying writer - - the char to write - - - Writes a character to the underlying writer - - - - - - Writes a buffer to the underlying writer - - the buffer to write - the start index to write from - the number of characters to write - - - Writes a buffer to the underlying writer - - - - - - Writes a string to the output. - - The string data to write to the output. - - - Writes a string to the output. - - - - - - Closes the underlying output writer. - - - - Closes the underlying output writer. - - - - - - The error handler instance to pass all errors to - - - - - Flag to indicate if this writer is closed - - - - - Gets or sets the error handler that all errors are passed to. - - - The error handler that all errors are passed to. - - - - Gets or sets the error handler that all errors are passed to. - - - - - - Gets a value indicating whether this writer is closed. - - - true if this writer is closed, otherwise false. - - - - Gets a value indicating whether this writer is closed. - - - - - - Constructor - - The to actually write to. - The to report errors to. - - - Creates a new instance of the class - with the specified and . - - - - - - Writes a character to the underlying writer and counts the number of bytes written. - - the char to write - - - Overrides implementation of . Counts - the number of bytes written. - - - - - - Writes a buffer to the underlying writer and counts the number of bytes written. - - the buffer to write - the start index to write from - the number of characters to write - - - Overrides implementation of . Counts - the number of bytes written. - - - - - - Writes a string to the output and counts the number of bytes written. - - The string data to write to the output. - - - Overrides implementation of . Counts - the number of bytes written. - - - - - - Total number of bytes written. - - - - - Gets or sets the total number of bytes written. - - - The total number of bytes written. - - - - Gets or sets the total number of bytes written. - - - - - - A fixed size rolling buffer of logging events. - - - - An array backed fixed size leaky bucket. - - - Nicko Cadell - Gert Driesen - - - - Constructor - - The maximum number of logging events in the buffer. - - - Initializes a new instance of the class with - the specified maximum number of buffered logging events. - - - The argument is not a positive integer. - - - - Appends a to the buffer. - - The event to append to the buffer. - The event discarded from the buffer, if the buffer is full, otherwise null. - - - Append an event to the buffer. If the buffer still contains free space then - null is returned. If the buffer is full then an event will be dropped - to make space for the new event, the event dropped is returned. - - - - - - Get and remove the oldest event in the buffer. - - The oldest logging event in the buffer - - - Gets the oldest (first) logging event in the buffer and removes it - from the buffer. - - - - - - Pops all the logging events from the buffer into an array. - - An array of all the logging events in the buffer. - - - Get all the events in the buffer and clear the buffer. - - - - - - Clear the buffer - - - - Clear the buffer of all events. The events in the buffer are lost. - - - - - - Gets the th oldest event currently in the buffer. - - The th oldest event currently in the buffer. - - - If is outside the range 0 to the number of events - currently in the buffer, then null is returned. - - - - - - Gets the maximum size of the buffer. - - The maximum size of the buffer. - - - Gets the maximum size of the buffer - - - - - - Gets the number of logging events in the buffer. - - The number of logging events in the buffer. - - - This number is guaranteed to be in the range 0 to - (inclusive). - - - - - - An always empty . - - - - A singleton implementation of the - interface that always represents an empty collection. - - - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the class. - - - - Uses a private access modifier to enforce the singleton pattern. - - - - - - Copies the elements of the to an - , starting at a particular Array index. - - The one-dimensional - that is the destination of the elements copied from - . The Array must have zero-based - indexing. - The zero-based index in array at which - copying begins. - - - As the collection is empty no values are copied into the array. - - - - - - Returns an enumerator that can iterate through a collection. - - - An that can be used to - iterate through the collection. - - - - As the collection is empty a is returned. - - - - - - The singleton instance of the empty collection. - - - - - Gets the singleton instance of the empty collection. - - The singleton instance of the empty collection. - - - Gets the singleton instance of the empty collection. - - - - - - Gets a value indicating if access to the is synchronized (thread-safe). - - - true if access to the is synchronized (thread-safe); otherwise, false. - - - - For the this property is always true. - - - - - - Gets the number of elements contained in the . - - - The number of elements contained in the . - - - - As the collection is empty the is always 0. - - - - - - Gets an object that can be used to synchronize access to the . - - - An object that can be used to synchronize access to the . - - - - As the collection is empty and thread safe and synchronized this instance is also - the object. - - - - - - An always empty . - - - - A singleton implementation of the - interface that always represents an empty collection. - - - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the class. - - - - Uses a private access modifier to enforce the singleton pattern. - - - - - - Copies the elements of the to an - , starting at a particular Array index. - - The one-dimensional - that is the destination of the elements copied from - . The Array must have zero-based - indexing. - The zero-based index in array at which - copying begins. - - - As the collection is empty no values are copied into the array. - - - - - - Returns an enumerator that can iterate through a collection. - - - An that can be used to - iterate through the collection. - - - - As the collection is empty a is returned. - - - - - - Adds an element with the provided key and value to the - . - - The to use as the key of the element to add. - The to use as the value of the element to add. - - - As the collection is empty no new values can be added. A - is thrown if this method is called. - - - This dictionary is always empty and cannot be modified. - - - - Removes all elements from the . - - - - As the collection is empty no values can be removed. A - is thrown if this method is called. - - - This dictionary is always empty and cannot be modified. - - - - Determines whether the contains an element - with the specified key. - - The key to locate in the . - false - - - As the collection is empty the method always returns false. - - - - - - Returns an enumerator that can iterate through a collection. - - - An that can be used to - iterate through the collection. - - - - As the collection is empty a is returned. - - - - - - Removes the element with the specified key from the . - - The key of the element to remove. - - - As the collection is empty no values can be removed. A - is thrown if this method is called. - - - This dictionary is always empty and cannot be modified. - - - - The singleton instance of the empty dictionary. - - - - - Gets the singleton instance of the . - - The singleton instance of the . - - - Gets the singleton instance of the . - - - - - - Gets a value indicating if access to the is synchronized (thread-safe). - - - true if access to the is synchronized (thread-safe); otherwise, false. - - - - For the this property is always true. - - - - - - Gets the number of elements contained in the - - - The number of elements contained in the . - - - - As the collection is empty the is always 0. - - - - - - Gets an object that can be used to synchronize access to the . - - - An object that can be used to synchronize access to the . - - - - As the collection is empty and thread safe and synchronized this instance is also - the object. - - - - - - Gets a value indicating whether the has a fixed size. - - true - - - As the collection is empty always returns true. - - - - - - Gets a value indicating whether the is read-only. - - true - - - As the collection is empty always returns true. - - - - - - Gets an containing the keys of the . - - An containing the keys of the . - - - As the collection is empty a is returned. - - - - - - Gets an containing the values of the . - - An containing the values of the . - - - As the collection is empty a is returned. - - - - - - Gets or sets the element with the specified key. - - The key of the element to get or set. - null - - - As the collection is empty no values can be looked up or stored. - If the index getter is called then null is returned. - A is thrown if the setter is called. - - - This dictionary is always empty and cannot be modified. - - - - Contain the information obtained when parsing formatting modifiers - in conversion modifiers. - - - - Holds the formatting information extracted from the format string by - the . This is used by the - objects when rendering the output. - - - Nicko Cadell - Gert Driesen - - - - Defaut Constructor - - - - Initializes a new instance of the class. - - - - - - Constructor - - - - Initializes a new instance of the class - with the specified parameters. - - - - - - Gets or sets the minimum value. - - - The minimum value. - - - - Gets or sets the minimum value. - - - - - - Gets or sets the maximum value. - - - The maximum value. - - - - Gets or sets the maximum value. - - - - - - Gets or sets a flag indicating whether left align is enabled - or not. - - - A flag indicating whether left align is enabled or not. - - - - Gets or sets a flag indicating whether left align is enabled or not. - - - - - - Implementation of Properties collection for the - - - - This class implements a properties collection that is thread safe and supports both - storing properties and capturing a read only copy of the current propertied. - - - This class is optimized to the scenario where the properties are read frequently - and are modified infrequently. - - - Nicko Cadell - - - - The read only copy of the properties. - - - - This variable is declared volatile to prevent the compiler and JIT from - reordering reads and writes of this thread performed on different threads. - - - - - - Lock object used to synchronize updates within this instance - - - - - Constructor - - - - Initializes a new instance of the class. - - - - - - Remove a property from the global context - - the key for the entry to remove - - - Removing an entry from the global context properties is relatively expensive compared - with reading a value. - - - - - - Clear the global context properties - - - - - Get a readonly immutable copy of the properties - - the current global context properties - - - This implementation is fast because the GlobalContextProperties class - stores a readonly copy of the properties. - - - - - - Gets or sets the value of a property - - - The value for the property with the specified key - - - - Reading the value for a key is faster than setting the value. - When the value is written a new read only copy of - the properties is created. - - - - - - Manages a mapping from levels to - - - - Manages an ordered mapping from instances - to subclasses. - - - Nicko Cadell - - - - Default constructor - - - - Initialise a new instance of . - - - - - - Add a to this mapping - - the entry to add - - - If a has previously been added - for the same then that entry will be - overwritten. - - - - - - Lookup the mapping for the specified level - - the level to lookup - the for the level or null if no mapping found - - - Lookup the value for the specified level. Finds the nearest - mapping value for the level that is equal to or less than the - specified. - - - If no mapping could be found then null is returned. - - - - - - Initialize options - - - - Caches the sorted list of in an array - - - - - - Implementation of Properties collection for the - - - - Class implements a collection of properties that is specific to each thread. - The class is not synchronized as each thread has its own . - - - Nicko Cadell - - - - Constructor - - - - Initializes a new instance of the class. - - - - - - Remove a property - - the key for the entry to remove - - - Remove the value for the specified from the context. - - - - - - Clear all the context properties - - - - Clear all the context properties - - - - - - Get the PropertiesDictionary stored in the LocalDataStoreSlot for this thread. - - create the dictionary if it does not exist, otherwise return null if is does not exist - the properties for this thread - - - The collection returned is only to be used on the calling thread. If the - caller needs to share the collection between different threads then the - caller must clone the collection before doings so. - - - - - - Gets or sets the value of a property - - - The value for the property with the specified key - - - - Get or set the property value for the specified. - - - - - - Outputs log statements from within the log4net assembly. - - - - Log4net components cannot make log4net logging calls. However, it is - sometimes useful for the user to learn about what log4net is - doing. - - - All log4net internal debug calls go to the standard output stream - whereas internal error messages are sent to the standard error output - stream. - - - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the class. - - - - Uses a private access modifier to prevent instantiation of this class. - - - - - - Static constructor that initializes logging by reading - settings from the application configuration file. - - - - The log4net.Internal.Debug application setting - controls internal debugging. This setting should be set - to true to enable debugging. - - - The log4net.Internal.Quiet application setting - suppresses all internal logging including error messages. - This setting should be set to true to enable message - suppression. - - - - - - Writes log4net internal debug messages to the - standard output stream. - - The message to log. - - - All internal debug messages are prepended with - the string "log4net: ". - - - - - - Writes log4net internal debug messages to the - standard output stream. - - The message to log. - An exception to log. - - - All internal debug messages are prepended with - the string "log4net: ". - - - - - - Writes log4net internal warning messages to the - standard error stream. - - The message to log. - - - All internal warning messages are prepended with - the string "log4net:WARN ". - - - - - - Writes log4net internal warning messages to the - standard error stream. - - The message to log. - An exception to log. - - - All internal warning messages are prepended with - the string "log4net:WARN ". - - - - - - Writes log4net internal error messages to the - standard error stream. - - The message to log. - - - All internal error messages are prepended with - the string "log4net:ERROR ". - - - - - - Writes log4net internal error messages to the - standard error stream. - - The message to log. - An exception to log. - - - All internal debug messages are prepended with - the string "log4net:ERROR ". - - - - - - Writes output to the standard output stream. - - The message to log. - - - Writes to both Console.Out and System.Diagnostics.Trace. - Note that the System.Diagnostics.Trace is not supported - on the Compact Framework. - - - If the AppDomain is not configured with a config file then - the call to System.Diagnostics.Trace may fail. This is only - an issue if you are programmatically creating your own AppDomains. - - - - - - Writes output to the standard error stream. - - The message to log. - - - Writes to both Console.Error and System.Diagnostics.Trace. - Note that the System.Diagnostics.Trace is not supported - on the Compact Framework. - - - If the AppDomain is not configured with a config file then - the call to System.Diagnostics.Trace may fail. This is only - an issue if you are programmatically creating your own AppDomains. - - - - - - Default debug level - - - - - In quietMode not even errors generate any output. - - - - - Gets or sets a value indicating whether log4net internal logging - is enabled or disabled. - - - true if log4net internal logging is enabled, otherwise - false. - - - - When set to true, internal debug level logging will be - displayed. - - - This value can be set by setting the application setting - log4net.Internal.Debug in the application configuration - file. - - - The default value is false, i.e. debugging is - disabled. - - - - - The following example enables internal debugging using the - application configuration file : - - - - - - - - - - - - - Gets or sets a value indicating whether log4net should generate no output - from internal logging, not even for errors. - - - true if log4net should generate no output at all from internal - logging, otherwise false. - - - - When set to true will cause internal logging at all levels to be - suppressed. This means that no warning or error reports will be logged. - This option overrides the setting and - disables all debug also. - - This value can be set by setting the application setting - log4net.Internal.Quiet in the application configuration file. - - - The default value is false, i.e. internal logging is not - disabled. - - - - The following example disables internal logging using the - application configuration file : - - - - - - - - - - - - Test if LogLog.Debug is enabled for output. - - - true if Debug is enabled - - - - Test if LogLog.Debug is enabled for output. - - - - - - Test if LogLog.Warn is enabled for output. - - - true if Warn is enabled - - - - Test if LogLog.Warn is enabled for output. - - - - - - Test if LogLog.Error is enabled for output. - - - true if Error is enabled - - - - Test if LogLog.Error is enabled for output. - - - - - - Represents a native error code and message. - - - - Represents a Win32 platform native error. - - - Nicko Cadell - Gert Driesen - - - - Create an instance of the class with the specified - error number and message. - - The number of the native error. - The message of the native error. - - - Create an instance of the class with the specified - error number and message. - - - - - - Create a new instance of the class for the last Windows error. - - - An instance of the class for the last windows error. - - - - The message for the error number is lookup up using the - native Win32 FormatMessage function. - - - - - - Create a new instance of the class. - - the error number for the native error - - An instance of the class for the specified - error number. - - - - The message for the specified error number is lookup up using the - native Win32 FormatMessage function. - - - - - - Retrieves the message corresponding with a Win32 message identifier. - - Message identifier for the requested message. - - The message corresponding with the specified message identifier. - - - - The message will be searched for in system message-table resource(s) - using the native FormatMessage function. - - - - - - Return error information string - - error information string - - - Return error information string - - - - - - Formats a message string. - - Formatting options, and how to interpret the parameter. - Location of the message definition. - Message identifier for the requested message. - Language identifier for the requested message. - If includes FORMAT_MESSAGE_ALLOCATE_BUFFER, the function allocates a buffer using the LocalAlloc function, and places the pointer to the buffer at the address specified in . - If the FORMAT_MESSAGE_ALLOCATE_BUFFER flag is not set, this parameter specifies the maximum number of TCHARs that can be stored in the output buffer. If FORMAT_MESSAGE_ALLOCATE_BUFFER is set, this parameter specifies the minimum number of TCHARs to allocate for an output buffer. - Pointer to an array of values that are used as insert values in the formatted message. - - - The function requires a message definition as input. The message definition can come from a - buffer passed into the function. It can come from a message table resource in an - already-loaded module. Or the caller can ask the function to search the system's message - table resource(s) for the message definition. The function finds the message definition - in a message table resource based on a message identifier and a language identifier. - The function copies the formatted message text to an output buffer, processing any embedded - insert sequences if requested. - - - To prevent the usage of unsafe code, this stub does not support inserting values in the formatted message. - - - - - If the function succeeds, the return value is the number of TCHARs stored in the output - buffer, excluding the terminating null character. - - - If the function fails, the return value is zero. To get extended error information, - call . - - - - - - Gets the number of the native error. - - - The number of the native error. - - - - Gets the number of the native error. - - - - - - Gets the message of the native error. - - - The message of the native error. - - - - - Gets the message of the native error. - - - - - An always empty . - - - - A singleton implementation of the over a collection - that is empty and not modifiable. - - - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the class. - - - - Uses a private access modifier to enforce the singleton pattern. - - - - - - Test if the enumerator can advance, if so advance. - - false as the cannot advance. - - - As the enumerator is over an empty collection its - value cannot be moved over a valid position, therefore - will always return false. - - - - - - Resets the enumerator back to the start. - - - - As the enumerator is over an empty collection does nothing. - - - - - - The singleton instance of the . - - - - - Gets the singleton instance of the . - - The singleton instance of the . - - - Gets the singleton instance of the . - - - - - - Gets the current object from the enumerator. - - - Throws an because the - never has a current value. - - - - As the enumerator is over an empty collection its - value cannot be moved over a valid position, therefore - will throw an . - - - The collection is empty and - cannot be positioned over a valid location. - - - - Gets the current key from the enumerator. - - - Throws an exception because the - never has a current value. - - - - As the enumerator is over an empty collection its - value cannot be moved over a valid position, therefore - will throw an . - - - The collection is empty and - cannot be positioned over a valid location. - - - - Gets the current value from the enumerator. - - The current value from the enumerator. - - Throws an because the - never has a current value. - - - - As the enumerator is over an empty collection its - value cannot be moved over a valid position, therefore - will throw an . - - - The collection is empty and - cannot be positioned over a valid location. - - - - Gets the current entry from the enumerator. - - - Throws an because the - never has a current entry. - - - - As the enumerator is over an empty collection its - value cannot be moved over a valid position, therefore - will throw an . - - - The collection is empty and - cannot be positioned over a valid location. - - - - An always empty . - - - - A singleton implementation of the over a collection - that is empty and not modifiable. - - - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the class. - - - - Uses a private access modifier to enforce the singleton pattern. - - - - - - Test if the enumerator can advance, if so advance - - false as the cannot advance. - - - As the enumerator is over an empty collection its - value cannot be moved over a valid position, therefore - will always return false. - - - - - - Resets the enumerator back to the start. - - - - As the enumerator is over an empty collection does nothing. - - - - - - The singleton instance of the . - - - - - Get the singleton instance of the . - - The singleton instance of the . - - - Gets the singleton instance of the . - - - - - - Gets the current object from the enumerator. - - - Throws an because the - never has a current value. - - - - As the enumerator is over an empty collection its - value cannot be moved over a valid position, therefore - will throw an . - - - The collection is empty and - cannot be positioned over a valid location. - - - - A SecurityContext used when a SecurityContext is not required - - - - The is a no-op implementation of the - base class. It is used where a - is required but one has not been provided. - - - Nicko Cadell - - - - Singleton instance of - - - - Singleton instance of - - - - - - Private constructor - - - - Private constructor for singleton pattern. - - - - - - Impersonate this SecurityContext - - State supplied by the caller - null - - - No impersonation is done and null is always returned. - - - - - - Implements log4net's default error handling policy which consists - of emitting a message for the first error in an appender and - ignoring all subsequent errors. - - - - The error message is printed on the standard error output stream. - - - This policy aims at protecting an otherwise working application - from being flooded with error messages when logging fails. - - - Nicko Cadell - Gert Driesen - - - - Default Constructor - - - - Initializes a new instance of the class. - - - - - - Constructor - - The prefix to use for each message. - - - Initializes a new instance of the class - with the specified prefix. - - - - - - Log an Error - - The error message. - The exception. - The internal error code. - - - Prints the message and the stack trace of the exception on the standard - error output stream. - - - - - - Log an Error - - The error message. - The exception. - - - Prints the message and the stack trace of the exception on the standard - error output stream. - - - - - - Log an error - - The error message. - - - Print a the error message passed as parameter on the standard - error output stream. - - - - - - Flag to indicate if it is the first error - - - - - String to prefix each message with - - - - - Is error logging enabled - - - - Is error logging enabled. Logging is only enabled for the - first error delivered to the . - - - - - - A convenience class to convert property values to specific types. - - - - Utility functions for converting types and parsing values. - - - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the class. - - - - Uses a private access modifier to prevent instantiation of this class. - - - - - - Converts a string to a value. - - String to convert. - The default value. - The value of . - - - If is "true", then true is returned. - If is "false", then false is returned. - Otherwise, is returned. - - - - - - Parses a file size into a number. - - String to parse. - The default value. - The value of . - - - Parses a file size of the form: number[KB|MB|GB] into a - long value. It is scaled with the appropriate multiplier. - - - is returned when - cannot be converted to a value. - - - - - - Converts a string to an object. - - The target type to convert to. - The string to convert to an object. - - The object converted from a string or null when the - conversion failed. - - - - Converts a string to an object. Uses the converter registry to try - to convert the string value into the specified target type. - - - - - - Checks if there is an appropriate type conversion from the source type to the target type. - - The type to convert from. - The type to convert to. - true if there is a conversion from the source type to the target type. - - Checks if there is an appropriate type conversion from the source type to the target type. - - - - - - - Converts an object to the target type. - - The object to convert to the target type. - The type to convert to. - The converted object. - - - Converts an object to the target type. - - - - - - Instantiates an object given a class name. - - The fully qualified class name of the object to instantiate. - The class to which the new object should belong. - The object to return in case of non-fulfillment. - - An instance of the or - if the object could not be instantiated. - - - - Checks that the is a subclass of - . If that test fails or the object could - not be instantiated, then is returned. - - - - - - Performs variable substitution in string from the - values of keys found in . - - The string on which variable substitution is performed. - The dictionary to use to lookup variables. - The result of the substitutions. - - - The variable substitution delimiters are ${ and }. - - - For example, if props contains key=value, then the call - - - - string s = OptionConverter.SubstituteVariables("Value of key is ${key}."); - - - - will set the variable s to "Value of key is value.". - - - If no value could be found for the specified key, then substitution - defaults to an empty string. - - - For example, if system properties contains no value for the key - "nonExistentKey", then the call - - - - string s = OptionConverter.SubstituteVariables("Value of nonExistentKey is [${nonExistentKey}]"); - - - - will set s to "Value of nonExistentKey is []". - - - An Exception is thrown if contains a start - delimiter "${" which is not balanced by a stop delimiter "}". - - - - - - Converts the string representation of the name or numeric value of one or - more enumerated constants to an equivalent enumerated object. - - The type to convert to. - The enum string value. - If true, ignore case; otherwise, regard case. - An object of type whose value is represented by . - - - - Most of the work of the class - is delegated to the PatternParser class. - - - - The PatternParser processes a pattern string and - returns a chain of objects. - - - Nicko Cadell - Gert Driesen - - - - Constructor - - The pattern to parse. - - - Initializes a new instance of the class - with the specified pattern string. - - - - - - Parses the pattern into a chain of pattern converters. - - The head of a chain of pattern converters. - - - Parses the pattern into a chain of pattern converters. - - - - - - Build the unified cache of converters from the static and instance maps - - the list of all the converter names - - - Build the unified cache of converters from the static and instance maps - - - - - - Internal method to parse the specified pattern to find specified matches - - the pattern to parse - the converter names to match in the pattern - - - The matches param must be sorted such that longer strings come before shorter ones. - - - - - - Process a parsed literal - - the literal text - - - - Process a parsed converter pattern - - the name of the converter - the optional option for the converter - the formatting info for the converter - - - - Resets the internal state of the parser and adds the specified pattern converter - to the chain. - - The pattern converter to add. - - - - The first pattern converter in the chain - - - - - the last pattern converter in the chain - - - - - The pattern - - - - - Internal map of converter identifiers to converter types - - - - This map overrides the static s_globalRulesRegistry map. - - - - - - Get the converter registry used by this parser - - - The converter registry used by this parser - - - - Get the converter registry used by this parser - - - - - - Sort strings by length - - - - that orders strings by string length. - The longest strings are placed first - - - - - - This class implements a patterned string. - - - - This string has embedded patterns that are resolved and expanded - when the string is formatted. - - - This class functions similarly to the - in that it accepts a pattern and renders it to a string. Unlike the - however the PatternString - does not render the properties of a specific but - of the process in general. - - - The recognized conversion pattern names are: - - - - Conversion Pattern Name - Effect - - - appdomain - - - Used to output the friendly name of the current AppDomain. - - - - - date - - - Used to output the date of the logging event in the local time zone. - To output the date in universal time use the %utcdate pattern. - The date conversion - specifier may be followed by a date format specifier enclosed - between braces. For example, %date{HH:mm:ss,fff} or - %date{dd MMM yyyy HH:mm:ss,fff}. If no date format specifier is - given then ISO8601 format is - assumed (). - - - The date format specifier admits the same syntax as the - time pattern string of the . - - - For better results it is recommended to use the log4net date - formatters. These can be specified using one of the strings - "ABSOLUTE", "DATE" and "ISO8601" for specifying - , - and respectively - . For example, - %date{ISO8601} or %date{ABSOLUTE}. - - - These dedicated date formatters perform significantly - better than . - - - - - env - - - Used to output the a specific environment variable. The key to - lookup must be specified within braces and directly following the - pattern specifier, e.g. %env{COMPUTERNAME} would include the value - of the COMPUTERNAME environment variable. - - - The env pattern is not supported on the .NET Compact Framework. - - - - - identity - - - Used to output the user name for the currently active user - (Principal.Identity.Name). - - - - - newline - - - Outputs the platform dependent line separator character or - characters. - - - This conversion pattern name offers the same performance as using - non-portable line separator strings such as "\n", or "\r\n". - Thus, it is the preferred way of specifying a line separator. - - - - - processid - - - Used to output the system process ID for the current process. - - - - - property - - - Used to output a specific context property. The key to - lookup must be specified within braces and directly following the - pattern specifier, e.g. %property{user} would include the value - from the property that is keyed by the string 'user'. Each property value - that is to be included in the log must be specified separately. - Properties are stored in logging contexts. By default - the log4net:HostName property is set to the name of machine on - which the event was originally logged. - - - If no key is specified, e.g. %property then all the keys and their - values are printed in a comma separated list. - - - The properties of an event are combined from a number of different - contexts. These are listed below in the order in which they are searched. - - - - the thread properties - - The that are set on the current - thread. These properties are shared by all events logged on this thread. - - - - the global properties - - The that are set globally. These - properties are shared by all the threads in the AppDomain. - - - - - - - random - - - Used to output a random string of characters. The string is made up of - uppercase letters and numbers. By default the string is 4 characters long. - The length of the string can be specified within braces directly following the - pattern specifier, e.g. %random{8} would output an 8 character string. - - - - - username - - - Used to output the WindowsIdentity for the currently - active user. - - - - - utcdate - - - Used to output the date of the logging event in universal time. - The date conversion - specifier may be followed by a date format specifier enclosed - between braces. For example, %utcdate{HH:mm:ss,fff} or - %utcdate{dd MMM yyyy HH:mm:ss,fff}. If no date format specifier is - given then ISO8601 format is - assumed (). - - - The date format specifier admits the same syntax as the - time pattern string of the . - - - For better results it is recommended to use the log4net date - formatters. These can be specified using one of the strings - "ABSOLUTE", "DATE" and "ISO8601" for specifying - , - and respectively - . For example, - %utcdate{ISO8601} or %utcdate{ABSOLUTE}. - - - These dedicated date formatters perform significantly - better than . - - - - - % - - - The sequence %% outputs a single percent sign. - - - - - - Additional pattern converters may be registered with a specific - instance using or - . - - - See the for details on the - format modifiers supported by the patterns. - - - Nicko Cadell - - - - Internal map of converter identifiers to converter types. - - - - - the pattern - - - - - the head of the pattern converter chain - - - - - patterns defined on this PatternString only - - - - - Initialize the global registry - - - - - Default constructor - - - - Initialize a new instance of - - - - - - Constructs a PatternString - - The pattern to use with this PatternString - - - Initialize a new instance of with the pattern specified. - - - - - - Initialize object options - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - - - - Create the used to parse the pattern - - the pattern to parse - The - - - Returns PatternParser used to parse the conversion string. Subclasses - may override this to return a subclass of PatternParser which recognize - custom conversion pattern name. - - - - - - Produces a formatted string as specified by the conversion pattern. - - The TextWriter to write the formatted event to - - - Format the pattern to the . - - - - - - Format the pattern as a string - - the pattern formatted as a string - - - Format the pattern to a string. - - - - - - Add a converter to this PatternString - - the converter info - - - This version of the method is used by the configurator. - Programmatic users should use the alternative method. - - - - - - Add a converter to this PatternString - - the name of the conversion pattern for this converter - the type of the converter - - - Add a converter to this PatternString - - - - - - Gets or sets the pattern formatting string - - - The pattern formatting string - - - - The ConversionPattern option. This is the string which - controls formatting and consists of a mix of literal content and - conversion specifiers. - - - - - - Wrapper class used to map converter names to converter types - - - - Wrapper class used to map converter names to converter types - - - - - - default constructor - - - - - Gets or sets the name of the conversion pattern - - - The name of the conversion pattern - - - - Gets or sets the name of the conversion pattern - - - - - - Gets or sets the type of the converter - - - The type of the converter - - - - Gets or sets the type of the converter - - - - - - String keyed object map. - - - - While this collection is serializable only member - objects that are serializable will - be serialized along with this collection. - - - Nicko Cadell - Gert Driesen - - - - String keyed object map that is read only. - - - - This collection is readonly and cannot be modified. - - - While this collection is serializable only member - objects that are serializable will - be serialized along with this collection. - - - Nicko Cadell - Gert Driesen - - - - The Hashtable used to store the properties data - - - - - Constructor - - - - Initializes a new instance of the class. - - - - - - Copy Constructor - - properties to copy - - - Initializes a new instance of the class. - - - - - - Deserialization constructor - - The that holds the serialized object data. - The that contains contextual information about the source or destination. - - - Initializes a new instance of the class - with serialized data. - - - - - - Gets the key names. - - An array of all the keys. - - - Gets the key names. - - - - - - Test if the dictionary contains a specified key - - the key to look for - true if the dictionary contains the specified key - - - Test if the dictionary contains a specified key - - - - - - Serializes this object into the provided. - - The to populate with data. - The destination for this serialization. - - - Serializes this object into the provided. - - - - - - See - - - - - See - - - - - - See - - - - - - - Remove all properties from the properties collection - - - - - See - - - - - - - See - - - - - - - See - - - - - Gets or sets the value of the property with the specified key. - - - The value of the property with the specified key. - - The key of the property to get or set. - - - The property value will only be serialized if it is serializable. - If it cannot be serialized it will be silently ignored if - a serialization operation is performed. - - - - - - The hashtable used to store the properties - - - The internal collection used to store the properties - - - - The hashtable used to store the properties - - - - - - See - - - - - See - - - - - See - - - - - See - - - - - See - - - - - See - - - - - The number of properties in this collection - - - - - See - - - - - Constructor - - - - Initializes a new instance of the class. - - - - - - Constructor - - properties to copy - - - Initializes a new instance of the class. - - - - - - Initializes a new instance of the class - with serialized data. - - The that holds the serialized object data. - The that contains contextual information about the source or destination. - - - Because this class is sealed the serialization constructor is private. - - - - - - Remove the entry with the specified key from this dictionary - - the key for the entry to remove - - - Remove the entry with the specified key from this dictionary - - - - - - See - - an enumerator - - - Returns a over the contest of this collection. - - - - - - See - - the key to remove - - - Remove the entry with the specified key from this dictionary - - - - - - See - - the key to lookup in the collection - true if the collection contains the specified key - - - Test if this collection contains a specified key. - - - - - - Remove all properties from the properties collection - - - - Remove all properties from the properties collection - - - - - - See - - the key - the value to store for the key - - - Store a value for the specified . - - - Thrown if the is not a string - - - - See - - - - - - - See - - - - - Gets or sets the value of the property with the specified key. - - - The value of the property with the specified key. - - The key of the property to get or set. - - - The property value will only be serialized if it is serializable. - If it cannot be serialized it will be silently ignored if - a serialization operation is performed. - - - - - - See - - - false - - - - This collection is modifiable. This property always - returns false. - - - - - - See - - - The value for the key specified. - - - - Get or set a value for the specified . - - - Thrown if the is not a string - - - - See - - - - - See - - - - - See - - - - - See - - - - - See - - - - - A that ignores the message - - - - This writer is used in special cases where it is necessary - to protect a writer from being closed by a client. - - - Nicko Cadell - - - - Constructor - - the writer to actually write to - - - Create a new ProtectCloseTextWriter using a writer - - - - - - Attach this instance to a different underlying - - the writer to attach to - - - Attach this instance to a different underlying - - - - - - Does not close the underlying output writer. - - - - Does not close the underlying output writer. - This method does nothing. - - - - - - Defines a lock that supports single writers and multiple readers - - - - ReaderWriterLock is used to synchronize access to a resource. - At any given time, it allows either concurrent read access for - multiple threads, or write access for a single thread. In a - situation where a resource is changed infrequently, a - ReaderWriterLock provides better throughput than a simple - one-at-a-time lock, such as . - - - If a platform does not support a System.Threading.ReaderWriterLock - implementation then all readers and writers are serialized. Therefore - the caller must not rely on multiple simultaneous readers. - - - Nicko Cadell - - - - Constructor - - - - Initializes a new instance of the class. - - - - - - Acquires a reader lock - - - - blocks if a different thread has the writer - lock, or if at least one thread is waiting for the writer lock. - - - - - - Decrements the lock count - - - - decrements the lock count. When the count - reaches zero, the lock is released. - - - - - - Acquires the writer lock - - - - This method blocks if another thread has a reader lock or writer lock. - - - - - - Decrements the lock count on the writer lock - - - - ReleaseWriterLock decrements the writer lock count. - When the count reaches zero, the writer lock is released. - - - - - - A that can be and reused - - - - A that can be and reused. - This uses a single buffer for string operations. - - - Nicko Cadell - - - - Create an instance of - - the format provider to use - - - Create an instance of - - - - - - Override Dispose to prevent closing of writer - - flag - - - Override Dispose to prevent closing of writer - - - - - - Reset this string writer so that it can be reused. - - the maximum buffer capacity before it is trimmed - the default size to make the buffer - - - Reset this string writer so that it can be reused. - The internal buffers are cleared and reset. - - - - - - Utility class for system specific information. - - - - Utility class of static methods for system specific information. - - - Nicko Cadell - Gert Driesen - Alexey Solofnenko - - - - Private constructor to prevent instances. - - - - Only static methods are exposed from this type. - - - - - - Initialize default values for private static fields. - - - - Only static methods are exposed from this type. - - - - - - Gets the assembly location path for the specified assembly. - - The assembly to get the location for. - The location of the assembly. - - - This method does not guarantee to return the correct path - to the assembly. If only tries to give an indication as to - where the assembly was loaded from. - - - - - - Gets the fully qualified name of the , including - the name of the assembly from which the was - loaded. - - The to get the fully qualified name for. - The fully qualified name for the . - - - This is equivalent to the Type.AssemblyQualifiedName property, - but this method works on the .NET Compact Framework 1.0 as well as - the full .NET runtime. - - - - - - Gets the short name of the . - - The to get the name for. - The short name of the . - - - The short name of the assembly is the - without the version, culture, or public key. i.e. it is just the - assembly's file name without the extension. - - - Use this rather than Assembly.GetName().Name because that - is not available on the Compact Framework. - - - Because of a FileIOPermission security demand we cannot do - the obvious Assembly.GetName().Name. We are allowed to get - the of the assembly so we - start from there and strip out just the assembly name. - - - - - - Gets the file name portion of the , including the extension. - - The to get the file name for. - The file name of the assembly. - - - Gets the file name portion of the , including the extension. - - - - - - Loads the type specified in the type string. - - A sibling type to use to load the type. - The name of the type to load. - Flag set to true to throw an exception if the type cannot be loaded. - true to ignore the case of the type name; otherwise, false - The type loaded or null if it could not be loaded. - - - If the type name is fully qualified, i.e. if contains an assembly name in - the type name, the type will be loaded from the system using - . - - - If the type name is not fully qualified, it will be loaded from the assembly - containing the specified relative type. If the type is not found in the assembly - then all the loaded assemblies will be searched for the type. - - - - - - Loads the type specified in the type string. - - The name of the type to load. - Flag set to true to throw an exception if the type cannot be loaded. - true to ignore the case of the type name; otherwise, false - The type loaded or null if it could not be loaded. - - - If the type name is fully qualified, i.e. if contains an assembly name in - the type name, the type will be loaded from the system using - . - - - If the type name is not fully qualified it will be loaded from the - assembly that is directly calling this method. If the type is not found - in the assembly then all the loaded assemblies will be searched for the type. - - - - - - Loads the type specified in the type string. - - An assembly to load the type from. - The name of the type to load. - Flag set to true to throw an exception if the type cannot be loaded. - true to ignore the case of the type name; otherwise, false - The type loaded or null if it could not be loaded. - - - If the type name is fully qualified, i.e. if contains an assembly name in - the type name, the type will be loaded from the system using - . - - - If the type name is not fully qualified it will be loaded from the specified - assembly. If the type is not found in the assembly then all the loaded assemblies - will be searched for the type. - - - - - - Generate a new guid - - A new Guid - - - Generate a new guid - - - - - - Create an - - The name of the parameter that caused the exception - The value of the argument that causes this exception - The message that describes the error - the ArgumentOutOfRangeException object - - - Create a new instance of the class - with a specified error message, the parameter name, and the value - of the argument. - - - The Compact Framework does not support the 3 parameter constructor for the - type. This method provides an - implementation that works for all platforms. - - - - - - Parse a string into an value - - the string to parse - out param where the parsed value is placed - true if the string was able to be parsed into an integer - - - Attempts to parse the string into an integer. If the string cannot - be parsed then this method returns false. The method does not throw an exception. - - - - - - Parse a string into an value - - the string to parse - out param where the parsed value is placed - true if the string was able to be parsed into an integer - - - Attempts to parse the string into an integer. If the string cannot - be parsed then this method returns false. The method does not throw an exception. - - - - - - Lookup an application setting - - the application settings key to lookup - the value for the key, or null - - - Configuration APIs are not supported under the Compact Framework - - - - - - Convert a path into a fully qualified local file path. - - The path to convert. - The fully qualified path. - - - Converts the path specified to a fully - qualified path. If the path is relative it is - taken as relative from the application base - directory. - - - The path specified must be a local file path, a URI is not supported. - - - - - - Creates a new case-insensitive instance of the class with the default initial capacity. - - A new case-insensitive instance of the class with the default initial capacity - - - The new Hashtable instance uses the default load factor, the CaseInsensitiveHashCodeProvider, and the CaseInsensitiveComparer. - - - - - - Gets an empty array of types. - - - - The Type.EmptyTypes field is not available on - the .NET Compact Framework 1.0. - - - - - - Cache the host name for the current machine - - - - - Cache the application friendly name - - - - - Text to output when a null is encountered. - - - - - Text to output when an unsupported feature is requested. - - - - - Start time for the current process. - - - - - Gets the system dependent line terminator. - - - The system dependent line terminator. - - - - Gets the system dependent line terminator. - - - - - - Gets the base directory for this . - - The base directory path for the current . - - - Gets the base directory for this . - - - The value returned may be either a local file path or a URI. - - - - - - Gets the path to the configuration file for the current . - - The path to the configuration file for the current . - - - The .NET Compact Framework 1.0 does not have a concept of a configuration - file. For this runtime, we use the entry assembly location as the root for - the configuration file name. - - - The value returned may be either a local file path or a URI. - - - - - - Gets the path to the file that first executed in the current . - - The path to the entry assembly. - - - Gets the path to the file that first executed in the current . - - - - - - Gets the ID of the current thread. - - The ID of the current thread. - - - On the .NET framework, the AppDomain.GetCurrentThreadId method - is used to obtain the thread ID for the current thread. This is the - operating system ID for the thread. - - - On the .NET Compact Framework 1.0 it is not possible to get the - operating system thread ID for the current thread. The native method - GetCurrentThreadId is implemented inline in a header file - and cannot be called. - - - On the .NET Framework 2.0 the Thread.ManagedThreadId is used as this - gives a stable id unrelated to the operating system thread ID which may - change if the runtime is using fibers. - - - - - - Get the host name or machine name for the current machine - - - The hostname or machine name - - - - Get the host name or machine name for the current machine - - - The host name () or - the machine name (Environment.MachineName) for - the current machine, or if neither of these are available - then NOT AVAILABLE is returned. - - - - - - Get this application's friendly name - - - The friendly name of this application as a string - - - - If available the name of the application is retrieved from - the AppDomain using AppDomain.CurrentDomain.FriendlyName. - - - Otherwise the file name of the entry assembly is used. - - - - - - Get the start time for the current process. - - - - This is the time at which the log4net library was loaded into the - AppDomain. Due to reports of a hang in the call to System.Diagnostics.Process.StartTime - this is not the start time for the current process. - - - The log4net library should be loaded by an application early during its - startup, therefore this start time should be a good approximation for - the actual start time. - - - Note that AppDomains may be loaded and unloaded within the - same process without the process terminating, however this start time - will be set per AppDomain. - - - - - - Text to output when a null is encountered. - - - - Use this value to indicate a null has been encountered while - outputting a string representation of an item. - - - The default value is (null). This value can be overridden by specifying - a value for the log4net.NullText appSetting in the application's - .config file. - - - - - - Text to output when an unsupported feature is requested. - - - - Use this value when an unsupported feature is requested. - - - The default value is NOT AVAILABLE. This value can be overridden by specifying - a value for the log4net.NotAvailableText appSetting in the application's - .config file. - - - - - - Utility class that represents a format string. - - - - Utility class that represents a format string. - - - Nicko Cadell - - - - Initialise the - - An that supplies culture-specific formatting information. - A containing zero or more format items. - An array containing zero or more objects to format. - - - - Format the string and arguments - - the formatted string - - - - Replaces the format item in a specified with the text equivalent - of the value of a corresponding instance in a specified array. - A specified parameter supplies culture-specific formatting information. - - An that supplies culture-specific formatting information. - A containing zero or more format items. - An array containing zero or more objects to format. - - A copy of format in which the format items have been replaced by the - equivalent of the corresponding instances of in args. - - - - This method does not throw exceptions. If an exception thrown while formatting the result the - exception and arguments are returned in the result string. - - - - - - Process an error during StringFormat - - - - - Dump the contents of an array into a string builder - - - - - Dump an object to a string - - - - - Implementation of Properties collection for the - - - - Class implements a collection of properties that is specific to each thread. - The class is not synchronized as each thread has its own . - - - Nicko Cadell - - - - The thread local data slot to use to store a PropertiesDictionary. - - - - - Internal constructor - - - - Initializes a new instance of the class. - - - - - - Remove a property - - the key for the entry to remove - - - Remove a property - - - - - - Clear all properties - - - - Clear all properties - - - - - - Get the PropertiesDictionary for this thread. - - create the dictionary if it does not exist, otherwise return null if is does not exist - the properties for this thread - - - The collection returned is only to be used on the calling thread. If the - caller needs to share the collection between different threads then the - caller must clone the collection before doing so. - - - - - - Gets or sets the value of a property - - - The value for the property with the specified key - - - - Gets or sets the value of a property - - - - - - Implementation of Stack for the - - - - Implementation of Stack for the - - - Nicko Cadell - - - - The stack store. - - - - - Internal constructor - - - - Initializes a new instance of the class. - - - - - - Clears all the contextual information held in this stack. - - - - Clears all the contextual information held in this stack. - Only call this if you think that this tread is being reused after - a previous call execution which may not have completed correctly. - You do not need to use this method if you always guarantee to call - the method of the - returned from even in exceptional circumstances, - for example by using the using(log4net.ThreadContext.Stacks["NDC"].Push("Stack_Message")) - syntax. - - - - - - Removes the top context from this stack. - - The message in the context that was removed from the top of this stack. - - - Remove the top context from this stack, and return - it to the caller. If this stack is empty then an - empty string (not ) is returned. - - - - - - Pushes a new context message into this stack. - - The new context message. - - An that can be used to clean up the context stack. - - - - Pushes a new context onto this stack. An - is returned that can be used to clean up this stack. This - can be easily combined with the using keyword to scope the - context. - - - Simple example of using the Push method with the using keyword. - - using(log4net.ThreadContext.Stacks["NDC"].Push("Stack_Message")) - { - log.Warn("This should have an ThreadContext Stack message"); - } - - - - - - Gets the current context information for this stack. - - The current context information. - - - - Gets the current context information for this stack. - - Gets the current context information - - - Gets the current context information for this stack. - - - - - - Get a portable version of this object - - the portable instance of this object - - - Get a cross thread portable version of this object - - - - - - The number of messages in the stack - - - The current number of messages in the stack - - - - The current number of messages in the stack. That is - the number of times has been called - minus the number of times has been called. - - - - - - Gets and sets the internal stack used by this - - The internal storage stack - - - This property is provided only to support backward compatability - of the . Tytpically the internal stack should not - be modified. - - - - - - Inner class used to represent a single context frame in the stack. - - - - Inner class used to represent a single context frame in the stack. - - - - - - Constructor - - The message for this context. - The parent context in the chain. - - - Initializes a new instance of the class - with the specified message and parent context. - - - - - - Get the message. - - The message. - - - Get the message. - - - - - - Gets the full text of the context down to the root level. - - - The full text of the context down to the root level. - - - - Gets the full text of the context down to the root level. - - - - - - Struct returned from the method. - - - - This struct implements the and is designed to be used - with the pattern to remove the stack frame at the end of the scope. - - - - - - The ThreadContextStack internal stack - - - - - The depth to trim the stack to when this instance is disposed - - - - - Constructor - - The internal stack used by the ThreadContextStack. - The depth to return the stack to when this object is disposed. - - - Initializes a new instance of the class with - the specified stack and return depth. - - - - - - Returns the stack to the correct depth. - - - - Returns the stack to the correct depth. - - - - - - Implementation of Stacks collection for the - - - - Implementation of Stacks collection for the - - - Nicko Cadell - - - - Internal constructor - - - - Initializes a new instance of the class. - - - - - - Gets the named thread context stack - - - The named stack - - - - Gets the named thread context stack - - - - - - Utility class for transforming strings. - - - - Utility class for transforming strings. - - - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the class. - - - - Uses a private access modifier to prevent instantiation of this class. - - - - - - Write a string to an - - the writer to write to - the string to write - The string to replace non XML compliant chars with - - - The test is escaped either using XML escape entities - or using CDATA sections. - - - - - - Replace invalid XML characters in text string - - the XML text input string - the string to use in place of invalid characters - A string that does not contain invalid XML characters. - - - Certain Unicode code points are not allowed in the XML InfoSet, for - details see: http://www.w3.org/TR/REC-xml/#charsets. - - - This method replaces any illegal characters in the input string - with the mask string specified. - - - - - - Count the number of times that the substring occurs in the text - - the text to search - the substring to find - the number of times the substring occurs in the text - - - The substring is assumed to be non repeating within itself. - - - - - - Impersonate a Windows Account - - - - This impersonates a Windows account. - - - How the impersonation is done depends on the value of . - This allows the context to either impersonate a set of user credentials specified - using username, domain name and password or to revert to the process credentials. - - - - - - Default constructor - - - - Default constructor - - - - - - Initialize the SecurityContext based on the options set. - - - - This is part of the delayed object - activation scheme. The method must - be called on this object after the configuration properties have - been set. Until is called this - object is in an undefined state and must not be used. - - - If any of the configuration properties are modified then - must be called again. - - - The security context will try to Logon the specified user account and - capture a primary token for impersonation. - - - The required , - or properties were not specified. - - - - Impersonate the Windows account specified by the and properties. - - caller provided state - - An instance that will revoke the impersonation of this SecurityContext - - - - Depending on the property either - impersonate a user using credentials supplied or revert - to the process credentials. - - - - - - Create a given the userName, domainName and password. - - the user name - the domain name - the password - the for the account specified - - - Uses the Windows API call LogonUser to get a principal token for the account. This - token is used to initialize the WindowsIdentity. - - - - - - Gets or sets the impersonation mode for this security context - - - The impersonation mode for this security context - - - - Impersonate either a user with user credentials or - revert this thread to the credentials of the process. - The value is one of the - enum. - - - The default value is - - - When the mode is set to - the user's credentials are established using the - , and - values. - - - When the mode is set to - no other properties need to be set. If the calling thread is - impersonating then it will be reverted back to the process credentials. - - - - - - Gets or sets the Windows username for this security context - - - The Windows username for this security context - - - - This property must be set if - is set to (the default setting). - - - - - - Gets or sets the Windows domain name for this security context - - - The Windows domain name for this security context - - - - The default value for is the local machine name - taken from the property. - - - This property must be set if - is set to (the default setting). - - - - - - Sets the password for the Windows account specified by the and properties. - - - The password for the Windows account specified by the and properties. - - - - This property must be set if - is set to (the default setting). - - - - - - The impersonation modes for the - - - - See the property for - details. - - - - - - Impersonate a user using the credentials supplied - - - - - Revert this the thread to the credentials of the process - - - - - Adds to - - - - Helper class to expose the - through the interface. - - - - - - Constructor - - the impersonation context being wrapped - - - Constructor - - - - - - Revert the impersonation - - - - Revert the impersonation - - - - - - The log4net Global Context. - - - - The GlobalContext provides a location for global debugging - information to be stored. - - - The global context has a properties map and these properties can - be included in the output of log messages. The - supports selecting and outputing these properties. - - - By default the log4net:HostName property is set to the name of - the current machine. - - - - - GlobalContext.Properties["hostname"] = Environment.MachineName; - - - - Nicko Cadell - - - - Private Constructor. - - - Uses a private access modifier to prevent instantiation of this class. - - - - - The global context properties instance - - - - - The global properties map. - - - The global properties map. - - - - The global properties map. - - - - - - The log4net Logical Thread Context. - - - - The LogicalThreadContext provides a location for specific debugging - information to be stored. - The LogicalThreadContext properties override any or - properties with the same name. - - - The Logical Thread Context has a properties map and a stack. - The properties and stack can - be included in the output of log messages. The - supports selecting and outputting these properties. - - - The Logical Thread Context provides a diagnostic context for the current call context. - This is an instrument for distinguishing interleaved log - output from different sources. Log output is typically interleaved - when a server handles multiple clients near-simultaneously. - - - The Logical Thread Context is managed on a per basis. - - - Example of using the thread context properties to store a username. - - LogicalThreadContext.Properties["user"] = userName; - log.Info("This log message has a LogicalThreadContext Property called 'user'"); - - - Example of how to push a message into the context stack - - using(LogicalThreadContext.Stacks["LDC"].Push("my context message")) - { - log.Info("This log message has a LogicalThreadContext Stack message that includes 'my context message'"); - - } // at the end of the using block the message is automatically popped - - - - Nicko Cadell - - - - Private Constructor. - - - - Uses a private access modifier to prevent instantiation of this class. - - - - - - The thread context properties instance - - - - - The thread context stacks instance - - - - - The thread properties map - - - The thread properties map - - - - The LogicalThreadContext properties override any - or properties with the same name. - - - - - - The thread stacks - - - stack map - - - - The logical thread stacks. - - - - - - This class is used by client applications to request logger instances. - - - - This class has static methods that are used by a client to request - a logger instance. The method is - used to retrieve a logger. - - - See the interface for more details. - - - Simple example of logging messages - - ILog log = LogManager.GetLogger("application-log"); - - log.Info("Application Start"); - log.Debug("This is a debug message"); - - if (log.IsDebugEnabled) - { - log.Debug("This is another debug message"); - } - - - - - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the class. - - - Uses a private access modifier to prevent instantiation of this class. - - - - Returns the named logger if it exists. - - Returns the named logger if it exists. - - - - If the named logger exists (in the default repository) then it - returns a reference to the logger, otherwise it returns null. - - - The fully qualified logger name to look for. - The logger found, or null if no logger could be found. - - - - Returns the named logger if it exists. - - - - If the named logger exists (in the specified repository) then it - returns a reference to the logger, otherwise it returns - null. - - - The repository to lookup in. - The fully qualified logger name to look for. - - The logger found, or null if the logger doesn't exist in the specified - repository. - - - - - Returns the named logger if it exists. - - - - If the named logger exists (in the repository for the specified assembly) then it - returns a reference to the logger, otherwise it returns - null. - - - The assembly to use to lookup the repository. - The fully qualified logger name to look for. - - The logger, or null if the logger doesn't exist in the specified - assembly's repository. - - - - Get the currently defined loggers. - - Returns all the currently defined loggers in the default repository. - - - The root logger is not included in the returned array. - - All the defined loggers. - - - - Returns all the currently defined loggers in the specified repository. - - The repository to lookup in. - - The root logger is not included in the returned array. - - All the defined loggers. - - - - Returns all the currently defined loggers in the specified assembly's repository. - - The assembly to use to lookup the repository. - - The root logger is not included in the returned array. - - All the defined loggers. - - - Get or create a logger. - - Retrieves or creates a named logger. - - - - Retrieves a logger named as the - parameter. If the named logger already exists, then the - existing instance will be returned. Otherwise, a new instance is - created. - - By default, loggers do not have a set level but inherit - it from the hierarchy. This is one of the central features of - log4net. - - - The name of the logger to retrieve. - The logger with the name specified. - - - - Retrieves or creates a named logger. - - - - Retrieve a logger named as the - parameter. If the named logger already exists, then the - existing instance will be returned. Otherwise, a new instance is - created. - - - By default, loggers do not have a set level but inherit - it from the hierarchy. This is one of the central features of - log4net. - - - The repository to lookup in. - The name of the logger to retrieve. - The logger with the name specified. - - - - Retrieves or creates a named logger. - - - - Retrieve a logger named as the - parameter. If the named logger already exists, then the - existing instance will be returned. Otherwise, a new instance is - created. - - - By default, loggers do not have a set level but inherit - it from the hierarchy. This is one of the central features of - log4net. - - - The assembly to use to lookup the repository. - The name of the logger to retrieve. - The logger with the name specified. - - - - Shorthand for . - - - Get the logger for the fully qualified name of the type specified. - - The full name of will be used as the name of the logger to retrieve. - The logger with the name specified. - - - - Shorthand for . - - - Gets the logger for the fully qualified name of the type specified. - - The repository to lookup in. - The full name of will be used as the name of the logger to retrieve. - The logger with the name specified. - - - - Shorthand for . - - - Gets the logger for the fully qualified name of the type specified. - - The assembly to use to lookup the repository. - The full name of will be used as the name of the logger to retrieve. - The logger with the name specified. - - - - Shuts down the log4net system. - - - - Calling this method will safely close and remove all - appenders in all the loggers including root contained in all the - default repositories. - - - Some appenders need to be closed before the application exists. - Otherwise, pending logging events might be lost. - - The shutdown method is careful to close nested - appenders before closing regular appenders. This is allows - configurations where a regular appender is attached to a logger - and again to a nested appender. - - - - - Shutdown a logger repository. - - Shuts down the default repository. - - - - Calling this method will safely close and remove all - appenders in all the loggers including root contained in the - default repository. - - Some appenders need to be closed before the application exists. - Otherwise, pending logging events might be lost. - - The shutdown method is careful to close nested - appenders before closing regular appenders. This is allows - configurations where a regular appender is attached to a logger - and again to a nested appender. - - - - - - Shuts down the repository for the repository specified. - - - - Calling this method will safely close and remove all - appenders in all the loggers including root contained in the - specified. - - - Some appenders need to be closed before the application exists. - Otherwise, pending logging events might be lost. - - The shutdown method is careful to close nested - appenders before closing regular appenders. This is allows - configurations where a regular appender is attached to a logger - and again to a nested appender. - - - The repository to shutdown. - - - - Shuts down the repository specified. - - - - Calling this method will safely close and remove all - appenders in all the loggers including root contained in the - repository. The repository is looked up using - the specified. - - - Some appenders need to be closed before the application exists. - Otherwise, pending logging events might be lost. - - - The shutdown method is careful to close nested - appenders before closing regular appenders. This is allows - configurations where a regular appender is attached to a logger - and again to a nested appender. - - - The assembly to use to lookup the repository. - - - Reset the configuration of a repository - - Resets all values contained in this repository instance to their defaults. - - - - Resets all values contained in the repository instance to their - defaults. This removes all appenders from all loggers, sets - the level of all non-root loggers to null, - sets their additivity flag to true and sets the level - of the root logger to . Moreover, - message disabling is set to its default "off" value. - - - - - - Resets all values contained in this repository instance to their defaults. - - - - Reset all values contained in the repository instance to their - defaults. This removes all appenders from all loggers, sets - the level of all non-root loggers to null, - sets their additivity flag to true and sets the level - of the root logger to . Moreover, - message disabling is set to its default "off" value. - - - The repository to reset. - - - - Resets all values contained in this repository instance to their defaults. - - - - Reset all values contained in the repository instance to their - defaults. This removes all appenders from all loggers, sets - the level of all non-root loggers to null, - sets their additivity flag to true and sets the level - of the root logger to . Moreover, - message disabling is set to its default "off" value. - - - The assembly to use to lookup the repository to reset. - - - Get the logger repository. - - Returns the default instance. - - - - Gets the for the repository specified - by the callers assembly (). - - - The instance for the default repository. - - - - Returns the default instance. - - The default instance. - - - Gets the for the repository specified - by the argument. - - - The repository to lookup in. - - - - Returns the default instance. - - The default instance. - - - Gets the for the repository specified - by the argument. - - - The assembly to use to lookup the repository. - - - Get a logger repository. - - Returns the default instance. - - - - Gets the for the repository specified - by the callers assembly (). - - - The instance for the default repository. - - - - Returns the default instance. - - The default instance. - - - Gets the for the repository specified - by the argument. - - - The repository to lookup in. - - - - Returns the default instance. - - The default instance. - - - Gets the for the repository specified - by the argument. - - - The assembly to use to lookup the repository. - - - Create a domain - - Creates a repository with the specified repository type. - - - - CreateDomain is obsolete. Use CreateRepository instead of CreateDomain. - - - The created will be associated with the repository - specified such that a call to will return - the same repository instance. - - - A that implements - and has a no arg constructor. An instance of this type will be created to act - as the for the repository specified. - The created for the repository. - - - Create a logger repository. - - Creates a repository with the specified repository type. - - A that implements - and has a no arg constructor. An instance of this type will be created to act - as the for the repository specified. - The created for the repository. - - - The created will be associated with the repository - specified such that a call to will return - the same repository instance. - - - - - - Creates a repository with the specified name. - - - - CreateDomain is obsolete. Use CreateRepository instead of CreateDomain. - - - Creates the default type of which is a - object. - - - The name must be unique. Repositories cannot be redefined. - An will be thrown if the repository already exists. - - - The name of the repository, this must be unique amongst repositories. - The created for the repository. - The specified repository already exists. - - - - Creates a repository with the specified name. - - - - Creates the default type of which is a - object. - - - The name must be unique. Repositories cannot be redefined. - An will be thrown if the repository already exists. - - - The name of the repository, this must be unique amongst repositories. - The created for the repository. - The specified repository already exists. - - - - Creates a repository with the specified name and repository type. - - - - CreateDomain is obsolete. Use CreateRepository instead of CreateDomain. - - - The name must be unique. Repositories cannot be redefined. - An will be thrown if the repository already exists. - - - The name of the repository, this must be unique to the repository. - A that implements - and has a no arg constructor. An instance of this type will be created to act - as the for the repository specified. - The created for the repository. - The specified repository already exists. - - - - Creates a repository with the specified name and repository type. - - - - The name must be unique. Repositories cannot be redefined. - An will be thrown if the repository already exists. - - - The name of the repository, this must be unique to the repository. - A that implements - and has a no arg constructor. An instance of this type will be created to act - as the for the repository specified. - The created for the repository. - The specified repository already exists. - - - - Creates a repository for the specified assembly and repository type. - - - - CreateDomain is obsolete. Use CreateRepository instead of CreateDomain. - - - The created will be associated with the repository - specified such that a call to with the - same assembly specified will return the same repository instance. - - - The assembly to use to get the name of the repository. - A that implements - and has a no arg constructor. An instance of this type will be created to act - as the for the repository specified. - The created for the repository. - - - - Creates a repository for the specified assembly and repository type. - - - - The created will be associated with the repository - specified such that a call to with the - same assembly specified will return the same repository instance. - - - The assembly to use to get the name of the repository. - A that implements - and has a no arg constructor. An instance of this type will be created to act - as the for the repository specified. - The created for the repository. - - - - Gets the list of currently defined repositories. - - - - Get an array of all the objects that have been created. - - - An array of all the known objects. - - - - Looks up the wrapper object for the logger specified. - - The logger to get the wrapper for. - The wrapper for the logger specified. - - - - Looks up the wrapper objects for the loggers specified. - - The loggers to get the wrappers for. - The wrapper objects for the loggers specified. - - - - Create the objects used by - this manager. - - The logger to wrap. - The wrapper for the logger specified. - - - - The wrapper map to use to hold the objects. - - - - - Implementation of Mapped Diagnostic Contexts. - - - - - The MDC is deprecated and has been replaced by the . - The current MDC implementation forwards to the ThreadContext.Properties. - - - - The MDC class is similar to the class except that it is - based on a map instead of a stack. It provides mapped - diagnostic contexts. A Mapped Diagnostic Context, or - MDC in short, is an instrument for distinguishing interleaved log - output from different sources. Log output is typically interleaved - when a server handles multiple clients near-simultaneously. - - - The MDC is managed on a per thread basis. - - - - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the class. - - - Uses a private access modifier to prevent instantiation of this class. - - - - - Gets the context value identified by the parameter. - - The key to lookup in the MDC. - The string value held for the key, or a null reference if no corresponding value is found. - - - - The MDC is deprecated and has been replaced by the . - The current MDC implementation forwards to the ThreadContext.Properties. - - - - If the parameter does not look up to a - previously defined context then null will be returned. - - - - - - Add an entry to the MDC - - The key to store the value under. - The value to store. - - - - The MDC is deprecated and has been replaced by the . - The current MDC implementation forwards to the ThreadContext.Properties. - - - - Puts a context value (the parameter) as identified - with the parameter into the current thread's - context map. - - - If a value is already defined for the - specified then the value will be replaced. If the - is specified as null then the key value mapping will be removed. - - - - - - Removes the key value mapping for the key specified. - - The key to remove. - - - - The MDC is deprecated and has been replaced by the . - The current MDC implementation forwards to the ThreadContext.Properties. - - - - Remove the specified entry from this thread's MDC - - - - - - Clear all entries in the MDC - - - - - The MDC is deprecated and has been replaced by the . - The current MDC implementation forwards to the ThreadContext.Properties. - - - - Remove all the entries from this thread's MDC - - - - - - Implementation of Nested Diagnostic Contexts. - - - - - The NDC is deprecated and has been replaced by the . - The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. - - - - A Nested Diagnostic Context, or NDC in short, is an instrument - to distinguish interleaved log output from different sources. Log - output is typically interleaved when a server handles multiple - clients near-simultaneously. - - - Interleaved log output can still be meaningful if each log entry - from different contexts had a distinctive stamp. This is where NDCs - come into play. - - - Note that NDCs are managed on a per thread basis. The NDC class - is made up of static methods that operate on the context of the - calling thread. - - - How to push a message into the context - - using(NDC.Push("my context message")) - { - ... all log calls will have 'my context message' included ... - - } // at the end of the using block the message is automatically removed - - - - Nicko Cadell - Gert Driesen - - - - Initializes a new instance of the class. - - - Uses a private access modifier to prevent instantiation of this class. - - - - - Clears all the contextual information held on the current thread. - - - - - The NDC is deprecated and has been replaced by the . - The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. - - - - Clears the stack of NDC data held on the current thread. - - - - - - Creates a clone of the stack of context information. - - A clone of the context info for this thread. - - - - The NDC is deprecated and has been replaced by the . - The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. - - - - The results of this method can be passed to the - method to allow child threads to inherit the context of their - parent thread. - - - - - - Inherits the contextual information from another thread. - - The context stack to inherit. - - - - The NDC is deprecated and has been replaced by the . - The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. - - - - This thread will use the context information from the stack - supplied. This can be used to initialize child threads with - the same contextual information as their parent threads. These - contexts will NOT be shared. Any further contexts that - are pushed onto the stack will not be visible to the other. - Call to obtain a stack to pass to - this method. - - - - - - Removes the top context from the stack. - - - The message in the context that was removed from the top - of the stack. - - - - - The NDC is deprecated and has been replaced by the . - The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. - - - - Remove the top context from the stack, and return - it to the caller. If the stack is empty then an - empty string (not null) is returned. - - - - - - Pushes a new context message. - - The new context message. - - An that can be used to clean up - the context stack. - - - - - The NDC is deprecated and has been replaced by the . - The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. - - - - Pushes a new context onto the context stack. An - is returned that can be used to clean up the context stack. This - can be easily combined with the using keyword to scope the - context. - - - Simple example of using the Push method with the using keyword. - - using(log4net.NDC.Push("NDC_Message")) - { - log.Warn("This should have an NDC message"); - } - - - - - - Removes the context information for this thread. It is - not required to call this method. - - - - - The NDC is deprecated and has been replaced by the . - The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. - - - - This method is not implemented. - - - - - - Forces the stack depth to be at most . - - The maximum depth of the stack - - - - The NDC is deprecated and has been replaced by the . - The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. - - - - Forces the stack depth to be at most . - This may truncate the head of the stack. This only affects the - stack in the current thread. Also it does not prevent it from - growing, it only sets the maximum depth at the time of the - call. This can be used to return to a known context depth. - - - - - - Gets the current context depth. - - The current context depth. - - - - The NDC is deprecated and has been replaced by the . - The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. - - - - The number of context values pushed onto the context stack. - - - Used to record the current depth of the context. This can then - be restored using the method. - - - - - - - The log4net Thread Context. - - - - The ThreadContext provides a location for thread specific debugging - information to be stored. - The ThreadContext properties override any - properties with the same name. - - - The thread context has a properties map and a stack. - The properties and stack can - be included in the output of log messages. The - supports selecting and outputting these properties. - - - The Thread Context provides a diagnostic context for the current thread. - This is an instrument for distinguishing interleaved log - output from different sources. Log output is typically interleaved - when a server handles multiple clients near-simultaneously. - - - The Thread Context is managed on a per thread basis. - - - Example of using the thread context properties to store a username. - - ThreadContext.Properties["user"] = userName; - log.Info("This log message has a ThreadContext Property called 'user'"); - - - Example of how to push a message into the context stack - - using(ThreadContext.Stacks["NDC"].Push("my context message")) - { - log.Info("This log message has a ThreadContext Stack message that includes 'my context message'"); - - } // at the end of the using block the message is automatically popped - - - - Nicko Cadell - - - - Private Constructor. - - - - Uses a private access modifier to prevent instantiation of this class. - - - - - - The thread context properties instance - - - - - The thread context stacks instance - - - - - The thread properties map - - - The thread properties map - - - - The ThreadContext properties override any - properties with the same name. - - - - - - The thread stacks - - - stack map - - - - The thread local stacks. - - - - - + + + + log4net + + + + + Appender that logs to a database. + + + + appends logging events to a table within a + database. The appender can be configured to specify the connection + string by setting the property. + The connection type (provider) can be specified by setting the + property. For more information on database connection strings for + your specific database see http://www.connectionstrings.com/. + + + Records are written into the database either using a prepared + statement or a stored procedure. The property + is set to (System.Data.CommandType.Text) to specify a prepared statement + or to (System.Data.CommandType.StoredProcedure) to specify a stored + procedure. + + + The prepared statement text or the name of the stored procedure + must be set in the property. + + + The prepared statement or stored procedure can take a number + of parameters. Parameters are added using the + method. This adds a single to the + ordered list of parameters. The + type may be subclassed if required to provide database specific + functionality. The specifies + the parameter name, database type, size, and how the value should + be generated using a . + + + + An example of a SQL Server table that could be logged to: + + CREATE TABLE [dbo].[Log] ( + [ID] [int] IDENTITY (1, 1) NOT NULL , + [Date] [datetime] NOT NULL , + [Thread] [varchar] (255) NOT NULL , + [Level] [varchar] (20) NOT NULL , + [Logger] [varchar] (255) NOT NULL , + [Message] [varchar] (4000) NOT NULL + ) ON [PRIMARY] + + + + An example configuration to log to the above table: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Julian Biddle + Nicko Cadell + Gert Driesen + Lance Nehring + + + + Abstract base class implementation of that + buffers events in a fixed size buffer. + + + + This base class should be used by appenders that need to buffer a + number of events before logging them. For example the + buffers events and then submits the entire contents of the buffer to + the underlying database in one go. + + + Subclasses should override the + method to deliver the buffered events. + + The BufferingAppenderSkeleton maintains a fixed size cyclic + buffer of events. The size of the buffer is set using + the property. + + A is used to inspect + each event as it arrives in the appender. If the + triggers, then the current buffer is sent immediately + (see ). Otherwise the event + is stored in the buffer. For example, an evaluator can be used to + deliver the events immediately when an ERROR event arrives. + + + The buffering appender can be configured in a mode. + By default the appender is NOT lossy. When the buffer is full all + the buffered events are sent with . + If the property is set to true then the + buffer will not be sent when it is full, and new events arriving + in the appender will overwrite the oldest event in the buffer. + In lossy mode the buffer will only be sent when the + triggers. This can be useful behavior when you need to know about + ERROR events but not about events with a lower level, configure an + evaluator that will trigger when an ERROR event arrives, the whole + buffer will be sent which gives a history of events leading up to + the ERROR event. + + + Nicko Cadell + Gert Driesen + + + + Abstract base class implementation of . + + + + This class provides the code for common functionality, such + as support for threshold filtering and support for general filters. + + + Appenders can also implement the interface. Therefore + they would require that the method + be called after the appenders properties have been configured. + + + Nicko Cadell + Gert Driesen + + + + Implement this interface for your own strategies for printing log statements. + + + + Implementors should consider extending the + class which provides a default implementation of this interface. + + + Appenders can also implement the interface. Therefore + they would require that the method + be called after the appenders properties have been configured. + + + Nicko Cadell + Gert Driesen + + + + Closes the appender and releases resources. + + + + Releases any resources allocated within the appender such as file handles, + network connections, etc. + + + It is a programming error to append to a closed appender. + + + + + + Log the logging event in Appender specific way. + + The event to log + + + This method is called to log a message into this appender. + + + + + + Gets or sets the name of this appender. + + The name of the appender. + + The name uniquely identifies the appender. + + + + + Interface for appenders that support bulk logging. + + + + This interface extends the interface to + support bulk logging of objects. Appenders + should only implement this interface if they can bulk log efficiently. + + + Nicko Cadell + + + + Log the array of logging events in Appender specific way. + + The events to log + + + This method is called to log an array of events into this appender. + + + + + + Interface used to delay activate a configured object. + + + + This allows an object to defer activation of its options until all + options have been set. This is required for components which have + related options that remain ambiguous until all are set. + + + If a component implements this interface then the method + must be called by the container after its all the configured properties have been set + and before the component can be used. + + + Nicko Cadell + + + + Activate the options that were previously set with calls to properties. + + + + This allows an object to defer activation of its options until all + options have been set. This is required for components which have + related options that remain ambiguous until all are set. + + + If a component implements this interface then this method must be called + after its properties have been set before the component can be used. + + + + + + Initial buffer size + + + + + Maximum buffer size before it is recycled + + + + + Default constructor + + + Empty default constructor + + + + + Finalizes this appender by calling the implementation's + method. + + + + If this appender has not been closed then the Finalize method + will call . + + + + + + Initialize the appender based on the options set + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Closes the appender and release resources. + + + + Release any resources allocated within the appender such as file handles, + network connections, etc. + + + It is a programming error to append to a closed appender. + + + This method cannot be overridden by subclasses. This method + delegates the closing of the appender to the + method which must be overridden in the subclass. + + + + + + Performs threshold checks and invokes filters before + delegating actual logging to the subclasses specific + method. + + The event to log. + + + This method cannot be overridden by derived classes. A + derived class should override the method + which is called by this method. + + + The implementation of this method is as follows: + + + + + + Checks that the severity of the + is greater than or equal to the of this + appender. + + + + Checks that the chain accepts the + . + + + + + Calls and checks that + it returns true. + + + + + If all of the above steps succeed then the + will be passed to the abstract method. + + + + + + Performs threshold checks and invokes filters before + delegating actual logging to the subclasses specific + method. + + The array of events to log. + + + This method cannot be overridden by derived classes. A + derived class should override the method + which is called by this method. + + + The implementation of this method is as follows: + + + + + + Checks that the severity of the + is greater than or equal to the of this + appender. + + + + Checks that the chain accepts the + . + + + + + Calls and checks that + it returns true. + + + + + If all of the above steps succeed then the + will be passed to the method. + + + + + + Test if the logging event should we output by this appender + + the event to test + true if the event should be output, false if the event should be ignored + + + This method checks the logging event against the threshold level set + on this appender and also against the filters specified on this + appender. + + + The implementation of this method is as follows: + + + + + + Checks that the severity of the + is greater than or equal to the of this + appender. + + + + Checks that the chain accepts the + . + + + + + + + + + Adds a filter to the end of the filter chain. + + the filter to add to this appender + + + The Filters are organized in a linked list. + + + Setting this property causes the new filter to be pushed onto the + back of the filter chain. + + + + + + Clears the filter list for this appender. + + + + Clears the filter list for this appender. + + + + + + Checks if the message level is below this appender's threshold. + + to test against. + + + If there is no threshold set, then the return value is always true. + + + + true if the meets the + requirements of this appender. + + + + + Is called when the appender is closed. Derived classes should override + this method if resources need to be released. + + + + Releases any resources allocated within the appender such as file handles, + network connections, etc. + + + It is a programming error to append to a closed appender. + + + + + + Subclasses of should implement this method + to perform actual logging. + + The event to append. + + + A subclass must implement this method to perform + logging of the . + + This method will be called by + if all the conditions listed for that method are met. + + + To restrict the logging of events in the appender + override the method. + + + + + + Append a bulk array of logging events. + + the array of logging events + + + This base class implementation calls the + method for each element in the bulk array. + + + A sub class that can better process a bulk array of events should + override this method in addition to . + + + + + + Called before as a precondition. + + + + This method is called by + before the call to the abstract method. + + + This method can be overridden in a subclass to extend the checks + made before the event is passed to the method. + + + A subclass should ensure that they delegate this call to + this base class if it is overridden. + + + true if the call to should proceed. + + + + Renders the to a string. + + The event to render. + The event rendered as a string. + + + Helper method to render a to + a string. This appender must have a + set to render the to + a string. + + If there is exception data in the logging event and + the layout does not process the exception, this method + will append the exception text to the rendered string. + + + Where possible use the alternative version of this method + . + That method streams the rendering onto an existing Writer + which can give better performance if the caller already has + a open and ready for writing. + + + + + + Renders the to a string. + + The event to render. + The TextWriter to write the formatted event to + + + Helper method to render a to + a string. This appender must have a + set to render the to + a string. + + If there is exception data in the logging event and + the layout does not process the exception, this method + will append the exception text to the rendered string. + + + Use this method in preference to + where possible. If, however, the caller needs to render the event + to a string then does + provide an efficient mechanism for doing so. + + + + + + The layout of this appender. + + + See for more information. + + + + + The name of this appender. + + + See for more information. + + + + + The level threshold of this appender. + + + + There is no level threshold filtering by default. + + + See for more information. + + + + + + It is assumed and enforced that errorHandler is never null. + + + + It is assumed and enforced that errorHandler is never null. + + + See for more information. + + + + + + The first filter in the filter chain. + + + + Set to null initially. + + + See for more information. + + + + + + The last filter in the filter chain. + + + See for more information. + + + + + Flag indicating if this appender is closed. + + + See for more information. + + + + + The guard prevents an appender from repeatedly calling its own DoAppend method + + + + + StringWriter used to render events + + + + + Gets or sets the threshold of this appender. + + + The threshold of the appender. + + + + All log events with lower level than the threshold level are ignored + by the appender. + + + In configuration files this option is specified by setting the + value of the option to a level + string, such as "DEBUG", "INFO" and so on. + + + + + + Gets or sets the for this appender. + + The of the appender + + + The provides a default + implementation for the property. + + + + + + The filter chain. + + The head of the filter chain filter chain. + + + Returns the head Filter. The Filters are organized in a linked list + and so all Filters on this Appender are available through the result. + + + + + + Gets or sets the for this appender. + + The layout of the appender. + + + See for more information. + + + + + + + Gets or sets the name of this appender. + + The name of the appender. + + + The name uniquely identifies the appender. + + + + + + Tests if this appender requires a to be set. + + + + In the rather exceptional case, where the appender + implementation admits a layout but can also work without it, + then the appender should return true. + + + This default implementation always returns true. + + + + true if the appender requires a layout object, otherwise false. + + + + + The default buffer size. + + + The default size of the cyclic buffer used to store events. + This is set to 512 by default. + + + + + Initializes a new instance of the class. + + + + Protected default constructor to allow subclassing. + + + + + + Initializes a new instance of the class. + + the events passed through this appender must be + fixed by the time that they arrive in the derived class' SendBuffer method. + + + Protected constructor to allow subclassing. + + + The should be set if the subclass + expects the events delivered to be fixed even if the + is set to zero, i.e. when no buffering occurs. + + + + + + Flush the currently buffered events + + + + Flushes any events that have been buffered. + + + If the appender is buffering in mode then the contents + of the buffer will NOT be flushed to the appender. + + + + + + Flush the currently buffered events + + set to true to flush the buffer of lossy events + + + Flushes events that have been buffered. If is + false then events will only be flushed if this buffer is non-lossy mode. + + + If the appender is buffering in mode then the contents + of the buffer will only be flushed if is true. + In this case the contents of the buffer will be tested against the + and if triggering will be output. All other buffered + events will be discarded. + + + If is true then the buffer will always + be emptied by calling this method. + + + + + + Initialize the appender based on the options set + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Close this appender instance. + + + + Close this appender instance. If this appender is marked + as not then the remaining events in + the buffer must be sent when the appender is closed. + + + + + + This method is called by the method. + + the event to log + + + Stores the in the cyclic buffer. + + + The buffer will be sent (i.e. passed to the + method) if one of the following conditions is met: + + + + The cyclic buffer is full and this appender is + marked as not lossy (see ) + + + An is set and + it is triggered for the + specified. + + + + Before the event is stored in the buffer it is fixed + (see ) to ensure that + any data referenced by the event will be valid when the buffer + is processed. + + + + + + Sends the contents of the buffer. + + The first logging event. + The buffer containing the events that need to be send. + + + The subclass must override . + + + + + + Sends the events. + + The events that need to be send. + + + The subclass must override this method to process the buffered events. + + + + + + The size of the cyclic buffer used to hold the logging events. + + + Set to by default. + + + + + The cyclic buffer used to store the logging events. + + + + + The triggering event evaluator that causes the buffer to be sent immediately. + + + The object that is used to determine if an event causes the entire + buffer to be sent immediately. This field can be null, which + indicates that event triggering is not to be done. The evaluator + can be set using the property. If this appender + has the ( property) set to + true then an must be set. + + + + + Indicates if the appender should overwrite events in the cyclic buffer + when it becomes full, or if the buffer should be flushed when the + buffer is full. + + + If this field is set to true then an must + be set. + + + + + The triggering event evaluator filters discarded events. + + + The object that is used to determine if an event that is discarded should + really be discarded or if it should be sent to the appenders. + This field can be null, which indicates that all discarded events will + be discarded. + + + + + Value indicating which fields in the event should be fixed + + + By default all fields are fixed + + + + + The events delivered to the subclass must be fixed. + + + + + Gets or sets a value that indicates whether the appender is lossy. + + + true if the appender is lossy, otherwise false. The default is false. + + + + This appender uses a buffer to store logging events before + delivering them. A triggering event causes the whole buffer + to be send to the remote sink. If the buffer overruns before + a triggering event then logging events could be lost. Set + to false to prevent logging events + from being lost. + + If is set to true then an + must be specified. + + + + + Gets or sets the size of the cyclic buffer used to hold the + logging events. + + + The size of the cyclic buffer used to hold the logging events. + + + + The option takes a positive integer + representing the maximum number of logging events to collect in + a cyclic buffer. When the is reached, + oldest events are deleted as new events are added to the + buffer. By default the size of the cyclic buffer is 512 events. + + + If the is set to a value less than + or equal to 1 then no buffering will occur. The logging event + will be delivered synchronously (depending on the + and properties). Otherwise the event will + be buffered. + + + + + + Gets or sets the that causes the + buffer to be sent immediately. + + + The that causes the buffer to be + sent immediately. + + + + The evaluator will be called for each event that is appended to this + appender. If the evaluator triggers then the current buffer will + immediately be sent (see ). + + If is set to true then an + must be specified. + + + + + Gets or sets the value of the to use. + + + The value of the to use. + + + + The evaluator will be called for each event that is discarded from this + appender. If the evaluator triggers then the current buffer will immediately + be sent (see ). + + + + + + Gets or sets a value indicating if only part of the logging event data + should be fixed. + + + true if the appender should only fix part of the logging event + data, otherwise false. The default is false. + + + + Setting this property to true will cause only part of the + event data to be fixed and serialized. This will improve performance. + + + See for more information. + + + + + + Gets or sets a the fields that will be fixed in the event + + + The event fields that will be fixed before the event is buffered + + + + The logging event needs to have certain thread specific values + captured before it can be buffered. See + for details. + + + + + + + Initializes a new instance of the class. + + + Public default constructor to initialize a new instance of this class. + + + + + Initialize the appender based on the options set + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Override the parent method to close the database + + + + Closes the database command and database connection. + + + + + + Inserts the events into the database. + + The events to insert into the database. + + + Insert all the events specified in the + array into the database. + + + + + + Adds a parameter to the command. + + The parameter to add to the command. + + + Adds a parameter to the ordered list of command parameters. + + + + + + Writes the events to the database using the transaction specified. + + The transaction that the events will be executed under. + The array of events to insert into the database. + + + The transaction argument can be null if the appender has been + configured not to use transactions. See + property for more information. + + + + + + Formats the log message into database statement text. + + The event being logged. + + This method can be overridden by subclasses to provide + more control over the format of the database statement. + + + Text that can be passed to a . + + + + + Connects to the database. + + + + + Retrieves the class type of the ADO.NET provider. + + + + Gets the Type of the ADO.NET provider to use to connect to the + database. This method resolves the type specified in the + property. + + + Subclasses can override this method to return a different type + if necessary. + + + The of the ADO.NET provider + + + + Prepares the database command and initialize the parameters. + + + + + Flag to indicate if we are using a command object + + + + Set to true when the appender is to use a prepared + statement or stored procedure to insert into the database. + + + + + + The list of objects. + + + + The list of objects. + + + + + + The security context to use for privileged calls + + + + + The that will be used + to insert logging events into a database. + + + + + The database command. + + + + + Database connection string. + + + + + String type name of the type name. + + + + + The text of the command. + + + + + The command type. + + + + + Indicates whether to use transactions when writing to the database. + + + + + Indicates whether to use transactions when writing to the database. + + + + + Gets or sets the database connection string that is used to connect to + the database. + + + The database connection string used to connect to the database. + + + + The connections string is specific to the connection type. + See for more information. + + + Connection string for MS Access via ODBC: + "DSN=MS Access Database;UID=admin;PWD=;SystemDB=C:\data\System.mdw;SafeTransactions = 0;FIL=MS Access;DriverID = 25;DBQ=C:\data\train33.mdb" + + Another connection string for MS Access via ODBC: + "Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Work\cvs_root\log4net-1.2\access.mdb;UID=;PWD=;" + + Connection string for MS Access via OLE DB: + "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Work\cvs_root\log4net-1.2\access.mdb;User Id=;Password=;" + + + + + Gets or sets the type name of the connection + that should be created. + + + The type name of the connection. + + + + The type name of the ADO.NET provider to use. + + + The default is to use the OLE DB provider. + + + Use the OLE DB Provider. This is the default value. + System.Data.OleDb.OleDbConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Use the MS SQL Server Provider. + System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Use the ODBC Provider. + Microsoft.Data.Odbc.OdbcConnection,Microsoft.Data.Odbc,version=1.0.3300.0,publicKeyToken=b77a5c561934e089,culture=neutral + This is an optional package that you can download from + http://msdn.microsoft.com/downloads + search for ODBC .NET Data Provider. + + Use the Oracle Provider. + System.Data.OracleClient.OracleConnection, System.Data.OracleClient, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + This is an optional package that you can download from + http://msdn.microsoft.com/downloads + search for .NET Managed Provider for Oracle. + + + + + Gets or sets the command text that is used to insert logging events + into the database. + + + The command text used to insert logging events into the database. + + + + Either the text of the prepared statement or the + name of the stored procedure to execute to write into + the database. + + + The property determines if + this text is a prepared statement or a stored procedure. + + + + + + Gets or sets the command type to execute. + + + The command type to execute. + + + + This value may be either (System.Data.CommandType.Text) to specify + that the is a prepared statement to execute, + or (System.Data.CommandType.StoredProcedure) to specify that the + property is the name of a stored procedure + to execute. + + + The default value is (System.Data.CommandType.Text). + + + + + + Should transactions be used to insert logging events in the database. + + + true if transactions should be used to insert logging events in + the database, otherwise false. The default value is true. + + + + Gets or sets a value that indicates whether transactions should be used + to insert logging events in the database. + + + When set a single transaction will be used to insert the buffered events + into the database. Otherwise each event will be inserted without using + an explicit transaction. + + + + + + Gets or sets the used to call the NetSend method. + + + The used to call the NetSend method. + + + + Unless a specified here for this appender + the is queried for the + security context to use. The default behavior is to use the security context + of the current thread. + + + + + + Should this appender try to reconnect to the database on error. + + + true if the appender should try to reconnect to the database after an + error has occurred, otherwise false. The default value is false, + i.e. not to try to reconnect. + + + + The default behaviour is for the appender not to try to reconnect to the + database if an error occurs. Subsequent logging events are discarded. + + + To force the appender to attempt to reconnect to the database set this + property to true. + + + When the appender attempts to connect to the database there may be a + delay of up to the connection timeout specified in the connection string. + This delay will block the calling application's thread. + Until the connection can be reestablished this potential delay may occur multiple times. + + + + + + Gets or sets the underlying . + + + The underlying . + + + creates a to insert + logging events into a database. Classes deriving from + can use this property to get or set this . Use the + underlying returned from if + you require access beyond that which provides. + + + + + Parameter type used by the . + + + + This class provides the basic database parameter properties + as defined by the interface. + + This type can be subclassed to provide database specific + functionality. The two methods that are called externally are + and . + + + + + + Initializes a new instance of the class. + + + Default constructor for the AdoNetAppenderParameter class. + + + + + Prepare the specified database command object. + + The command to prepare. + + + Prepares the database command object by adding + this parameter to its collection of parameters. + + + + + + Renders the logging event and set the parameter value in the command. + + The command containing the parameter. + The event to be rendered. + + + Renders the logging event using this parameters layout + object. Sets the value of the parameter on the command object. + + + + + + The name of this parameter. + + + + + The database type for this parameter. + + + + + Flag to infer type rather than use the DbType + + + + + The precision for this parameter. + + + + + The scale for this parameter. + + + + + The size for this parameter. + + + + + The to use to render the + logging event into an object for this parameter. + + + + + Gets or sets the name of this parameter. + + + The name of this parameter. + + + + The name of this parameter. The parameter name + must match up to a named parameter to the SQL stored procedure + or prepared statement. + + + + + + Gets or sets the database type for this parameter. + + + The database type for this parameter. + + + + The database type for this parameter. This property should + be set to the database type from the + enumeration. See . + + + This property is optional. If not specified the ADO.NET provider + will attempt to infer the type from the value. + + + + + + + Gets or sets the precision for this parameter. + + + The precision for this parameter. + + + + The maximum number of digits used to represent the Value. + + + This property is optional. If not specified the ADO.NET provider + will attempt to infer the precision from the value. + + + + + + + Gets or sets the scale for this parameter. + + + The scale for this parameter. + + + + The number of decimal places to which Value is resolved. + + + This property is optional. If not specified the ADO.NET provider + will attempt to infer the scale from the value. + + + + + + + Gets or sets the size for this parameter. + + + The size for this parameter. + + + + The maximum size, in bytes, of the data within the column. + + + This property is optional. If not specified the ADO.NET provider + will attempt to infer the size from the value. + + + + + + + Gets or sets the to use to + render the logging event into an object for this + parameter. + + + The used to render the + logging event into an object for this parameter. + + + + The that renders the value for this + parameter. + + + The can be used to adapt + any into a + for use in the property. + + + + + + Appends logging events to the terminal using ANSI color escape sequences. + + + + AnsiColorTerminalAppender appends log events to the standard output stream + or the error output stream using a layout specified by the + user. It also allows the color of a specific level of message to be set. + + + This appender expects the terminal to understand the VT100 control set + in order to interpret the color codes. If the terminal or console does not + understand the control codes the behavior is not defined. + + + By default, all output is written to the console's standard output stream. + The property can be set to direct the output to the + error stream. + + + NOTE: This appender writes each message to the System.Console.Out or + System.Console.Error that is set at the time the event is appended. + Therefore it is possible to programmatically redirect the output of this appender + (for example NUnit does this to capture program output). While this is the desired + behavior of this appender it may have security implications in your application. + + + When configuring the ANSI colored terminal appender, a mapping should be + specified to map a logging level to a color. For example: + + + + + + + + + + + + + + + The Level is the standard log4net logging level and ForeColor and BackColor can be any + of the following values: + + Blue + Green + Red + White + Yellow + Purple + Cyan + + These color values cannot be combined together to make new colors. + + + The attributes can be any combination of the following: + + Brightforeground is brighter + Dimforeground is dimmer + Underscoremessage is underlined + Blinkforeground is blinking (does not work on all terminals) + Reverseforeground and background are reversed + Hiddenoutput is hidden + Strikethroughmessage has a line through it + + While any of these attributes may be combined together not all combinations + work well together, for example setting both Bright and Dim attributes makes + no sense. + + + Patrick Wagstrom + Nicko Cadell + + + + The to use when writing to the Console + standard output stream. + + + + The to use when writing to the Console + standard output stream. + + + + + + The to use when writing to the Console + standard error output stream. + + + + The to use when writing to the Console + standard error output stream. + + + + + + Ansi code to reset terminal + + + + + Initializes a new instance of the class. + + + The instance of the class is set up to write + to the standard output stream. + + + + + Add a mapping of level to color + + The mapping to add + + + Add a mapping to this appender. + Each mapping defines the foreground and background colours + for a level. + + + + + + This method is called by the method. + + The event to log. + + + Writes the event to the console. + + + The format of the output will depend on the appender's layout. + + + + + + Initialize the options for this appender + + + + Initialize the level to color mappings set on this appender. + + + + + + Flag to write output to the error stream rather than the standard output stream + + + + + Mapping from level object to color value + + + + + Target is the value of the console output stream. + + + Target is the value of the console output stream. + This is either "Console.Out" or "Console.Error". + + + + Target is the value of the console output stream. + This is either "Console.Out" or "Console.Error". + + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + The enum of possible display attributes + + + + The following flags can be combined together to + form the ANSI color attributes. + + + + + + + text is bright + + + + + text is dim + + + + + text is underlined + + + + + text is blinking + + + Not all terminals support this attribute + + + + + text and background colors are reversed + + + + + text is hidden + + + + + text is displayed with a strikethrough + + + + + The enum of possible foreground or background color values for + use with the color mapping method + + + + The output can be in one for the following ANSI colors. + + + + + + + color is black + + + + + color is red + + + + + color is green + + + + + color is yellow + + + + + color is blue + + + + + color is magenta + + + + + color is cyan + + + + + color is white + + + + + A class to act as a mapping between the level that a logging call is made at and + the color it should be displayed as. + + + + Defines the mapping between a level and the color it should be displayed in. + + + + + + An entry in the + + + + This is an abstract base class for types that are stored in the + object. + + + Nicko Cadell + + + + Default protected constructor + + + + Default protected constructor + + + + + + Initialize any options defined on this entry + + + + Should be overridden by any classes that need to initialise based on their options + + + + + + The level that is the key for this mapping + + + The that is the key for this mapping + + + + Get or set the that is the key for this + mapping subclass. + + + + + + Initialize the options for the object + + + + Combine the and together + and append the attributes. + + + + + + The mapped foreground color for the specified level + + + + Required property. + The mapped foreground color for the specified level + + + + + + The mapped background color for the specified level + + + + Required property. + The mapped background color for the specified level + + + + + + The color attributes for the specified level + + + + Required property. + The color attributes for the specified level + + + + + + The combined , and + suitable for setting the ansi terminal color. + + + + + A strongly-typed collection of objects. + + Nicko Cadell + + + + Creates a read-only wrapper for a AppenderCollection instance. + + list to create a readonly wrapper arround + + An AppenderCollection wrapper that is read-only. + + + + + An empty readonly static AppenderCollection + + + + + Initializes a new instance of the AppenderCollection class + that is empty and has the default initial capacity. + + + + + Initializes a new instance of the AppenderCollection class + that has the specified initial capacity. + + + The number of elements that the new AppenderCollection is initially capable of storing. + + + + + Initializes a new instance of the AppenderCollection class + that contains elements copied from the specified AppenderCollection. + + The AppenderCollection whose elements are copied to the new collection. + + + + Initializes a new instance of the AppenderCollection class + that contains elements copied from the specified array. + + The array whose elements are copied to the new list. + + + + Initializes a new instance of the AppenderCollection class + that contains elements copied from the specified collection. + + The collection whose elements are copied to the new list. + + + + Allow subclasses to avoid our default constructors + + + + + + + Copies the entire AppenderCollection to a one-dimensional + array. + + The one-dimensional array to copy to. + + + + Copies the entire AppenderCollection to a one-dimensional + array, starting at the specified index of the target array. + + The one-dimensional array to copy to. + The zero-based index in at which copying begins. + + + + Adds a to the end of the AppenderCollection. + + The to be added to the end of the AppenderCollection. + The index at which the value has been added. + + + + Removes all elements from the AppenderCollection. + + + + + Creates a shallow copy of the . + + A new with a shallow copy of the collection data. + + + + Determines whether a given is in the AppenderCollection. + + The to check for. + true if is found in the AppenderCollection; otherwise, false. + + + + Returns the zero-based index of the first occurrence of a + in the AppenderCollection. + + The to locate in the AppenderCollection. + + The zero-based index of the first occurrence of + in the entire AppenderCollection, if found; otherwise, -1. + + + + + Inserts an element into the AppenderCollection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + is less than zero + -or- + is equal to or greater than . + + + + + Removes the first occurrence of a specific from the AppenderCollection. + + The to remove from the AppenderCollection. + + The specified was not found in the AppenderCollection. + + + + + Removes the element at the specified index of the AppenderCollection. + + The zero-based index of the element to remove. + + is less than zero + -or- + is equal to or greater than . + + + + + Returns an enumerator that can iterate through the AppenderCollection. + + An for the entire AppenderCollection. + + + + Adds the elements of another AppenderCollection to the current AppenderCollection. + + The AppenderCollection whose elements should be added to the end of the current AppenderCollection. + The new of the AppenderCollection. + + + + Adds the elements of a array to the current AppenderCollection. + + The array whose elements should be added to the end of the AppenderCollection. + The new of the AppenderCollection. + + + + Adds the elements of a collection to the current AppenderCollection. + + The collection whose elements should be added to the end of the AppenderCollection. + The new of the AppenderCollection. + + + + Sets the capacity to the actual number of elements. + + + + + Return the collection elements as an array + + the array + + + + is less than zero + -or- + is equal to or greater than . + + + + + is less than zero + -or- + is equal to or greater than . + + + + + Gets the number of elements actually contained in the AppenderCollection. + + + + + Gets a value indicating whether access to the collection is synchronized (thread-safe). + + true if access to the ICollection is synchronized (thread-safe); otherwise, false. + + + + Gets an object that can be used to synchronize access to the collection. + + + + + Gets or sets the at the specified index. + + The zero-based index of the element to get or set. + + is less than zero + -or- + is equal to or greater than . + + + + + Gets a value indicating whether the collection has a fixed size. + + true if the collection has a fixed size; otherwise, false. The default is false + + + + Gets a value indicating whether the IList is read-only. + + true if the collection is read-only; otherwise, false. The default is false + + + + Gets or sets the number of elements the AppenderCollection can contain. + + + + + Supports type-safe iteration over a . + + + + + + Advances the enumerator to the next element in the collection. + + + true if the enumerator was successfully advanced to the next element; + false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, before the first element in the collection. + + + + + Gets the current element in the collection. + + + + + Type visible only to our subclasses + Used to access protected constructor + + + + + + A value + + + + + Supports simple iteration over a . + + + + + + Initializes a new instance of the Enumerator class. + + + + + + Advances the enumerator to the next element in the collection. + + + true if the enumerator was successfully advanced to the next element; + false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, before the first element in the collection. + + + + + Gets the current element in the collection. + + + + + + + + + Appends log events to the ASP.NET system. + + + + + Diagnostic information and tracing messages that you specify are appended to the output + of the page that is sent to the requesting browser. Optionally, you can view this information + from a separate trace viewer (Trace.axd) that displays trace information for every page in a + given application. + + + Trace statements are processed and displayed only when tracing is enabled. You can control + whether tracing is displayed to a page, to the trace viewer, or both. + + + The logging event is passed to the or + method depending on the level of the logging event. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Default constructor. + + + + + + Write the logging event to the ASP.NET trace + + the event to log + + + Write the logging event to the ASP.NET trace + HttpContext.Current.Trace + (). + + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + Buffers events and then forwards them to attached appenders. + + + + The events are buffered in this appender until conditions are + met to allow the appender to deliver the events to the attached + appenders. See for the + conditions that cause the buffer to be sent. + + The forwarding appender can be used to specify different + thresholds and filters for the same appender at different locations + within the hierarchy. + + + Nicko Cadell + Gert Driesen + + + + Interface for attaching appenders to objects. + + + + Interface for attaching, removing and retrieving appenders. + + + Nicko Cadell + Gert Driesen + + + + Attaches an appender. + + The appender to add. + + + Add the specified appender. The implementation may + choose to allow or deny duplicate appenders. + + + + + + Gets an attached appender with the specified name. + + The name of the appender to get. + + The appender with the name specified, or null if no appender with the + specified name is found. + + + + Returns an attached appender with the specified. + If no appender with the specified name is found null will be + returned. + + + + + + Removes all attached appenders. + + + + Removes and closes all attached appenders + + + + + + Removes the specified appender from the list of attached appenders. + + The appender to remove. + The appender removed from the list + + + The appender removed is not closed. + If you are discarding the appender you must call + on the appender removed. + + + + + + Removes the appender with the specified name from the list of appenders. + + The name of the appender to remove. + The appender removed from the list + + + The appender removed is not closed. + If you are discarding the appender you must call + on the appender removed. + + + + + + Gets all attached appenders. + + + A collection of attached appenders. + + + + Gets a collection of attached appenders. + If there are no attached appenders the + implementation should return an empty + collection rather than null. + + + + + + Initializes a new instance of the class. + + + + Default constructor. + + + + + + Closes the appender and releases resources. + + + + Releases any resources allocated within the appender such as file handles, + network connections, etc. + + + It is a programming error to append to a closed appender. + + + + + + Send the events. + + The events that need to be send. + + + Forwards the events to the attached appenders. + + + + + + Adds an to the list of appenders of this + instance. + + The to add to this appender. + + + If the specified is already in the list of + appenders, then it won't be added again. + + + + + + Looks for the appender with the specified name. + + The name of the appender to lookup. + + The appender with the specified name, or null. + + + + Get the named appender attached to this buffering appender. + + + + + + Removes all previously added appenders from this appender. + + + + This is useful when re-reading configuration information. + + + + + + Removes the specified appender from the list of appenders. + + The appender to remove. + The appender removed from the list + + The appender removed is not closed. + If you are discarding the appender you must call + on the appender removed. + + + + + Removes the appender with the specified name from the list of appenders. + + The name of the appender to remove. + The appender removed from the list + + The appender removed is not closed. + If you are discarding the appender you must call + on the appender removed. + + + + + Implementation of the interface + + + + + Gets the appenders contained in this appender as an + . + + + If no appenders can be found, then an + is returned. + + + A collection of the appenders in this appender. + + + + + Appends logging events to the console. + + + + ColoredConsoleAppender appends log events to the standard output stream + or the error output stream using a layout specified by the + user. It also allows the color of a specific type of message to be set. + + + By default, all output is written to the console's standard output stream. + The property can be set to direct the output to the + error stream. + + + NOTE: This appender writes directly to the application's attached console + not to the System.Console.Out or System.Console.Error TextWriter. + The System.Console.Out and System.Console.Error streams can be + programmatically redirected (for example NUnit does this to capture program output). + This appender will ignore these redirections because it needs to use Win32 + API calls to colorize the output. To respect these redirections the + must be used. + + + When configuring the colored console appender, mapping should be + specified to map a logging level to a color. For example: + + + + + + + + + + + + + + The Level is the standard log4net logging level and ForeColor and BackColor can be any + combination of the following values: + + Blue + Green + Red + White + Yellow + Purple + Cyan + HighIntensity + + + + Rick Hobbs + Nicko Cadell + + + + The to use when writing to the Console + standard output stream. + + + + The to use when writing to the Console + standard output stream. + + + + + + The to use when writing to the Console + standard error output stream. + + + + The to use when writing to the Console + standard error output stream. + + + + + + Initializes a new instance of the class. + + + The instance of the class is set up to write + to the standard output stream. + + + + + Initializes a new instance of the class + with the specified layout. + + the layout to use for this appender + + The instance of the class is set up to write + to the standard output stream. + + + + + Initializes a new instance of the class + with the specified layout. + + the layout to use for this appender + flag set to true to write to the console error stream + + When is set to true, output is written to + the standard error output stream. Otherwise, output is written to the standard + output stream. + + + + + Add a mapping of level to color - done by the config file + + The mapping to add + + + Add a mapping to this appender. + Each mapping defines the foreground and background colors + for a level. + + + + + + This method is called by the method. + + The event to log. + + + Writes the event to the console. + + + The format of the output will depend on the appender's layout. + + + + + + Initialize the options for this appender + + + + Initialize the level to color mappings set on this appender. + + + + + + Flag to write output to the error stream rather than the standard output stream + + + + + Mapping from level object to color value + + + + + The console output stream writer to write to + + + + This writer is not thread safe. + + + + + + Target is the value of the console output stream. + This is either "Console.Out" or "Console.Error". + + + Target is the value of the console output stream. + This is either "Console.Out" or "Console.Error". + + + + Target is the value of the console output stream. + This is either "Console.Out" or "Console.Error". + + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + The enum of possible color values for use with the color mapping method + + + + The following flags can be combined together to + form the colors. + + + + + + + color is blue + + + + + color is green + + + + + color is red + + + + + color is white + + + + + color is yellow + + + + + color is purple + + + + + color is cyan + + + + + color is intensified + + + + + A class to act as a mapping between the level that a logging call is made at and + the color it should be displayed as. + + + + Defines the mapping between a level and the color it should be displayed in. + + + + + + Initialize the options for the object + + + + Combine the and together. + + + + + + The mapped foreground color for the specified level + + + + Required property. + The mapped foreground color for the specified level. + + + + + + The mapped background color for the specified level + + + + Required property. + The mapped background color for the specified level. + + + + + + The combined and suitable for + setting the console color. + + + + + Appends logging events to the console. + + + + ConsoleAppender appends log events to the standard output stream + or the error output stream using a layout specified by the + user. + + + By default, all output is written to the console's standard output stream. + The property can be set to direct the output to the + error stream. + + + NOTE: This appender writes each message to the System.Console.Out or + System.Console.Error that is set at the time the event is appended. + Therefore it is possible to programmatically redirect the output of this appender + (for example NUnit does this to capture program output). While this is the desired + behavior of this appender it may have security implications in your application. + + + Nicko Cadell + Gert Driesen + + + + The to use when writing to the Console + standard output stream. + + + + The to use when writing to the Console + standard output stream. + + + + + + The to use when writing to the Console + standard error output stream. + + + + The to use when writing to the Console + standard error output stream. + + + + + + Initializes a new instance of the class. + + + The instance of the class is set up to write + to the standard output stream. + + + + + Initializes a new instance of the class + with the specified layout. + + the layout to use for this appender + + The instance of the class is set up to write + to the standard output stream. + + + + + Initializes a new instance of the class + with the specified layout. + + the layout to use for this appender + flag set to true to write to the console error stream + + When is set to true, output is written to + the standard error output stream. Otherwise, output is written to the standard + output stream. + + + + + This method is called by the method. + + The event to log. + + + Writes the event to the console. + + + The format of the output will depend on the appender's layout. + + + + + + Target is the value of the console output stream. + This is either "Console.Out" or "Console.Error". + + + Target is the value of the console output stream. + This is either "Console.Out" or "Console.Error". + + + + Target is the value of the console output stream. + This is either "Console.Out" or "Console.Error". + + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + Appends log events to the system. + + + + The application configuration file can be used to control what listeners + are actually used. See the MSDN documentation for the + class for details on configuring the + debug system. + + + Events are written using the + method. The event's logger name is passed as the value for the category name to the Write method. + + + Nicko Cadell + + + + Initializes a new instance of the . + + + + Default constructor. + + + + + + Initializes a new instance of the + with a specified layout. + + The layout to use with this appender. + + + Obsolete constructor. + + + + + + Writes the logging event to the system. + + The event to log. + + + Writes the logging event to the system. + If is true then the + is called. + + + + + + Immediate flush means that the underlying writer or output stream + will be flushed at the end of each append operation. + + + + Immediate flush is slower but ensures that each append request is + actually written. If is set to + false, then there is a good chance that the last few + logs events are not actually written to persistent media if and + when the application crashes. + + + The default value is true. + + + + + Gets or sets a value that indicates whether the appender will + flush at the end of each write. + + + The default behavior is to flush at the end of each + write. If the option is set tofalse, then the underlying + stream can defer writing to physical medium to a later time. + + + Avoiding the flush operation at the end of each append results + in a performance gain of 10 to 20 percent. However, there is safety + trade-off involved in skipping flushing. Indeed, when flushing is + skipped, then it is likely that the last few log events will not + be recorded on disk when the application exits. This is a high + price to pay even for a 20% performance gain. + + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + Writes events to the system event log. + + + + The EventID of the event log entry can be + set using the EventLogEventID property () + on the . + + + There is a limit of 32K characters for an event log message + + + When configuring the EventLogAppender a mapping can be + specified to map a logging level to an event log entry type. For example: + + + <mapping> + <level value="ERROR" /> + <eventLogEntryType value="Error" /> + </mapping> + <mapping> + <level value="DEBUG" /> + <eventLogEntryType value="Information" /> + </mapping> + + + The Level is the standard log4net logging level and eventLogEntryType can be any value + from the enum, i.e.: + + Erroran error event + Warninga warning event + Informationan informational event + + + + Aspi Havewala + Douglas de la Torre + Nicko Cadell + Gert Driesen + Thomas Voss + + + + Initializes a new instance of the class. + + + + Default constructor. + + + + + + Initializes a new instance of the class + with the specified . + + The to use with this appender. + + + Obsolete constructor. + + + + + + Add a mapping of level to - done by the config file + + The mapping to add + + + Add a mapping to this appender. + Each mapping defines the event log entry type for a level. + + + + + + Initialize the appender based on the options set + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Create an event log source + + + Uses different API calls under NET_2_0 + + + + + This method is called by the + method. + + the event to log + + Writes the event to the system event log using the + . + + If the event has an EventID property (see ) + set then this integer will be used as the event log event id. + + + There is a limit of 32K characters for an event log message + + + + + + Get the equivalent for a + + the Level to convert to an EventLogEntryType + The equivalent for a + + Because there are fewer applicable + values to use in logging levels than there are in the + this is a one way mapping. There is + a loss of information during the conversion. + + + + + The log name is the section in the event logs where the messages + are stored. + + + + + Name of the application to use when logging. This appears in the + application column of the event log named by . + + + + + The name of the machine which holds the event log. This is + currently only allowed to be '.' i.e. the current machine. + + + + + Mapping from level object to EventLogEntryType + + + + + The security context to use for privileged calls + + + + + The name of the log where messages will be stored. + + + The string name of the log where messages will be stored. + + + This is the name of the log as it appears in the Event Viewer + tree. The default value is to log into the Application + log, this is where most applications write their events. However + if you need a separate log for your application (or applications) + then you should set the appropriately. + This should not be used to distinguish your event log messages + from those of other applications, the + property should be used to distinguish events. This property should be + used to group together events into a single log. + + + + + + Property used to set the Application name. This appears in the + event logs when logging. + + + The string used to distinguish events from different sources. + + + Sets the event log source property. + + + + + This property is used to return the name of the computer to use + when accessing the event logs. Currently, this is the current + computer, denoted by a dot "." + + + The string name of the machine holding the event log that + will be logged into. + + + This property cannot be changed. It is currently set to '.' + i.e. the local machine. This may be changed in future. + + + + + Gets or sets the used to write to the EventLog. + + + The used to write to the EventLog. + + + + The system security context used to write to the EventLog. + + + Unless a specified here for this appender + the is queried for the + security context to use. The default behavior is to use the security context + of the current thread. + + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + A class to act as a mapping between the level that a logging call is made at and + the color it should be displayed as. + + + + Defines the mapping between a level and its event log entry type. + + + + + + The for this entry + + + + Required property. + The for this entry + + + + + + Appends logging events to a file. + + + + Logging events are sent to the file specified by + the property. + + + The file can be opened in either append or overwrite mode + by specifying the property. + If the file path is relative it is taken as relative from + the application base directory. The file encoding can be + specified by setting the property. + + + The layout's and + values will be written each time the file is opened and closed + respectively. If the property is + then the file may contain multiple copies of the header and footer. + + + This appender will first try to open the file for writing when + is called. This will typically be during configuration. + If the file cannot be opened for writing the appender will attempt + to open the file again each time a message is logged to the appender. + If the file cannot be opened for writing when a message is logged then + the message will be discarded by this appender. + + + The supports pluggable file locking models via + the property. + The default behavior, implemented by + is to obtain an exclusive write lock on the file until this appender is closed. + The alternative model, , only holds a + write lock while the appender is writing a logging event. + + + Nicko Cadell + Gert Driesen + Rodrigo B. de Oliveira + Douglas de la Torre + Niall Daley + + + + Sends logging events to a . + + + + An Appender that writes to a . + + + This appender may be used stand alone if initialized with an appropriate + writer, however it is typically used as a base class for an appender that + can open a to write to. + + + Nicko Cadell + Gert Driesen + Douglas de la Torre + + + + Initializes a new instance of the class. + + + + Default constructor. + + + + + + Initializes a new instance of the class and + sets the output destination to a new initialized + with the specified . + + The layout to use with this appender. + The to output to. + + + Obsolete constructor. + + + + + + Initializes a new instance of the class and sets + the output destination to the specified . + + The layout to use with this appender + The to output to + + The must have been previously opened. + + + + Obsolete constructor. + + + + + + This method determines if there is a sense in attempting to append. + + + + This method checked if an output target has been set and if a + layout has been set. + + + false if any of the preconditions fail. + + + + This method is called by the + method. + + The event to log. + + + Writes a log statement to the output stream if the output stream exists + and is writable. + + + The format of the output will depend on the appender's layout. + + + + + + This method is called by the + method. + + The array of events to log. + + + This method writes all the bulk logged events to the output writer + before flushing the stream. + + + + + + Close this appender instance. The underlying stream or writer is also closed. + + + Closed appenders cannot be reused. + + + + + Writes the footer and closes the underlying . + + + + Writes the footer and closes the underlying . + + + + + + Closes the underlying . + + + + Closes the underlying . + + + + + + Clears internal references to the underlying + and other variables. + + + + Subclasses can override this method for an alternate closing behavior. + + + + + + Writes a footer as produced by the embedded layout's property. + + + + Writes a footer as produced by the embedded layout's property. + + + + + + Writes a header produced by the embedded layout's property. + + + + Writes a header produced by the embedded layout's property. + + + + + + Called to allow a subclass to lazily initialize the writer + + + + This method is called when an event is logged and the or + have not been set. This allows a subclass to + attempt to initialize the writer multiple times. + + + + + + This is the where logging events + will be written to. + + + + + Immediate flush means that the underlying + or output stream will be flushed at the end of each append operation. + + + + Immediate flush is slower but ensures that each append request is + actually written. If is set to + false, then there is a good chance that the last few + logging events are not actually persisted if and when the application + crashes. + + + The default value is true. + + + + + + Gets or set whether the appender will flush at the end + of each append operation. + + + + The default behavior is to flush at the end of each + append operation. + + + If this option is set to false, then the underlying + stream can defer persisting the logging event to a later + time. + + + + Avoiding the flush operation at the end of each append results in + a performance gain of 10 to 20 percent. However, there is safety + trade-off involved in skipping flushing. Indeed, when flushing is + skipped, then it is likely that the last few log events will not + be recorded on disk when the application exits. This is a high + price to pay even for a 20% performance gain. + + + + + Sets the where the log output will go. + + + + The specified must be open and writable. + + + The will be closed when the appender + instance is closed. + + + Note: Logging to an unopened will fail. + + + + + + Gets or set the and the underlying + , if any, for this appender. + + + The for this appender. + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + Gets or sets the where logging events + will be written to. + + + The where logging events are written. + + + + This is the where logging events + will be written to. + + + + + + Default constructor + + + + Default constructor + + + + + + Construct a new appender using the layout, file and append mode. + + the layout to use with this appender + the full path to the file to write to + flag to indicate if the file should be appended to + + + Obsolete constructor. + + + + + + Construct a new appender using the layout and file specified. + The file will be appended to. + + the layout to use with this appender + the full path to the file to write to + + + Obsolete constructor. + + + + + + Activate the options on the file appender. + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + This will cause the file to be opened. + + + + + + Closes any previously opened file and calls the parent's . + + + + Resets the filename and the file stream. + + + + + + Called to initialize the file writer + + + + Will be called for each logged message until the file is + successfully opened. + + + + + + This method is called by the + method. + + The event to log. + + + Writes a log statement to the output stream if the output stream exists + and is writable. + + + The format of the output will depend on the appender's layout. + + + + + + This method is called by the + method. + + The array of events to log. + + + Acquires the output file locks once before writing all the events to + the stream. + + + + + + Writes a footer as produced by the embedded layout's property. + + + + Writes a footer as produced by the embedded layout's property. + + + + + + Writes a header produced by the embedded layout's property. + + + + Writes a header produced by the embedded layout's property. + + + + + + Closes the underlying . + + + + Closes the underlying . + + + + + + Closes the previously opened file. + + + + Writes the to the file and then + closes the file. + + + + + + Sets and opens the file where the log output will go. The specified file must be writable. + + The path to the log file. Must be a fully qualified path. + If true will append to fileName. Otherwise will truncate fileName + + + Calls but guarantees not to throw an exception. + Errors are passed to the . + + + + + + Sets and opens the file where the log output will go. The specified file must be writable. + + The path to the log file. Must be a fully qualified path. + If true will append to fileName. Otherwise will truncate fileName + + + If there was already an opened file, then the previous file + is closed first. + + + This method will ensure that the directory structure + for the specified exists. + + + + + + Sets the quiet writer used for file output + + the file stream that has been opened for writing + + + This implementation of creates a + over the and passes it to the + method. + + + This method can be overridden by sub classes that want to wrap the + in some way, for example to encrypt the output + data using a System.Security.Cryptography.CryptoStream. + + + + + + Sets the quiet writer being used. + + the writer over the file stream that has been opened for writing + + + This method can be overridden by sub classes that want to + wrap the in some way. + + + + + + Convert a path into a fully qualified path. + + The path to convert. + The fully qualified path. + + + Converts the path specified to a fully + qualified path. If the path is relative it is + taken as relative from the application base + directory. + + + + + + Flag to indicate if we should append to the file + or overwrite the file. The default is to append. + + + + + The name of the log file. + + + + + The encoding to use for the file stream. + + + + + The security context to use for privileged calls + + + + + The stream to log to. Has added locking semantics + + + + + The locking model to use + + + + + Gets or sets the path to the file that logging will be written to. + + + The path to the file that logging will be written to. + + + + If the path is relative it is taken as relative from + the application base directory. + + + + + + Gets or sets a flag that indicates whether the file should be + appended to or overwritten. + + + Indicates whether the file should be appended to or overwritten. + + + + If the value is set to false then the file will be overwritten, if + it is set to true then the file will be appended to. + + The default value is true. + + + + + Gets or sets used to write to the file. + + + The used to write to the file. + + + + The default encoding set is + which is the encoding for the system's current ANSI code page. + + + + + + Gets or sets the used to write to the file. + + + The used to write to the file. + + + + Unless a specified here for this appender + the is queried for the + security context to use. The default behavior is to use the security context + of the current thread. + + + + + + Gets or sets the used to handle locking of the file. + + + The used to lock the file. + + + + Gets or sets the used to handle locking of the file. + + + There are two built in locking models, and . + The former locks the file from the start of logging to the end and the + later lock only for the minimal amount of time when logging each message. + + + The default locking model is the . + + + + + + Write only that uses the + to manage access to an underlying resource. + + + + + True asynchronous writes are not supported, the implementation forces a synchronous write. + + + + + Exception base type for log4net. + + + + This type extends . It + does not add any new functionality but does differentiate the + type of exception being thrown. + + + Nicko Cadell + Gert Driesen + + + + Constructor + + + + Initializes a new instance of the class. + + + + + + Constructor + + A message to include with the exception. + + + Initializes a new instance of the class with + the specified message. + + + + + + Constructor + + A message to include with the exception. + A nested exception to include. + + + Initializes a new instance of the class + with the specified message and inner exception. + + + + + + Serialization constructor + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + + + Initializes a new instance of the class + with serialized data. + + + + + + Locking model base class + + + + Base class for the locking models available to the derived loggers. + + + + + + Open the output file + + The filename to use + Whether to append to the file, or overwrite + The encoding to use + + + Open the file specified and prepare for logging. + No writes will be made until is called. + Must be called before any calls to , + and . + + + + + + Close the file + + + + Close the file. No further writes will be made. + + + + + + Acquire the lock on the file + + A stream that is ready to be written to. + + + Acquire the lock on the file in preparation for writing to it. + Return a stream pointing to the file. + must be called to release the lock on the output file. + + + + + + Release the lock on the file + + + + Release the lock on the file. No further writes will be made to the + stream until is called again. + + + + + + Gets or sets the for this LockingModel + + + The for this LockingModel + + + + The file appender this locking model is attached to and working on + behalf of. + + + The file appender is used to locate the security context and the error handler to use. + + + The value of this property will be set before is + called. + + + + + + Hold an exclusive lock on the output file + + + + Open the file once for writing and hold it open until is called. + Maintains an exclusive lock on the file during this time. + + + + + + Open the file specified and prepare for logging. + + The filename to use + Whether to append to the file, or overwrite + The encoding to use + + + Open the file specified and prepare for logging. + No writes will be made until is called. + Must be called before any calls to , + and . + + + + + + Close the file + + + + Close the file. No further writes will be made. + + + + + + Acquire the lock on the file + + A stream that is ready to be written to. + + + Does nothing. The lock is already taken + + + + + + Release the lock on the file + + + + Does nothing. The lock will be released when the file is closed. + + + + + + Acquires the file lock for each write + + + + Opens the file once for each / cycle, + thus holding the lock for the minimal amount of time. This method of locking + is considerably slower than but allows + other processes to move/delete the log file whilst logging continues. + + + + + + Prepares to open the file when the first message is logged. + + The filename to use + Whether to append to the file, or overwrite + The encoding to use + + + Open the file specified and prepare for logging. + No writes will be made until is called. + Must be called before any calls to , + and . + + + + + + Close the file + + + + Close the file. No further writes will be made. + + + + + + Acquire the lock on the file + + A stream that is ready to be written to. + + + Acquire the lock on the file in preparation for writing to it. + Return a stream pointing to the file. + must be called to release the lock on the output file. + + + + + + Release the lock on the file + + + + Release the lock on the file. No further writes will be made to the + stream until is called again. + + + + + + This appender forwards logging events to attached appenders. + + + + The forwarding appender can be used to specify different thresholds + and filters for the same appender at different locations within the hierarchy. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Default constructor. + + + + + + Closes the appender and releases resources. + + + + Releases any resources allocated within the appender such as file handles, + network connections, etc. + + + It is a programming error to append to a closed appender. + + + + + + Forward the logging event to the attached appenders + + The event to log. + + + Delivers the logging event to all the attached appenders. + + + + + + Forward the logging events to the attached appenders + + The array of events to log. + + + Delivers the logging events to all the attached appenders. + + + + + + Adds an to the list of appenders of this + instance. + + The to add to this appender. + + + If the specified is already in the list of + appenders, then it won't be added again. + + + + + + Looks for the appender with the specified name. + + The name of the appender to lookup. + + The appender with the specified name, or null. + + + + Get the named appender attached to this appender. + + + + + + Removes all previously added appenders from this appender. + + + + This is useful when re-reading configuration information. + + + + + + Removes the specified appender from the list of appenders. + + The appender to remove. + The appender removed from the list + + The appender removed is not closed. + If you are discarding the appender you must call + on the appender removed. + + + + + Removes the appender with the specified name from the list of appenders. + + The name of the appender to remove. + The appender removed from the list + + The appender removed is not closed. + If you are discarding the appender you must call + on the appender removed. + + + + + Implementation of the interface + + + + + Gets the appenders contained in this appender as an + . + + + If no appenders can be found, then an + is returned. + + + A collection of the appenders in this appender. + + + + + Logs events to a local syslog service. + + + + This appender uses the POSIX libc library functions openlog, syslog, and closelog. + If these functions are not available on the local system then this appender will not work! + + + The functions openlog, syslog, and closelog are specified in SUSv2 and + POSIX 1003.1-2001 standards. These are used to log messages to the local syslog service. + + + This appender talks to a local syslog service. If you need to log to a remote syslog + daemon and you cannot configure your local syslog service to do this you may be + able to use the to log via UDP. + + + Syslog messages must have a facility and and a severity. The severity + is derived from the Level of the logging event. + The facility must be chosen from the set of defined syslog + values. The facilities list is predefined + and cannot be extended. + + + An identifier is specified with each log message. This can be specified + by setting the property. The identity (also know + as the tag) must not contain white space. The default value for the + identity is the application name (from ). + + + Rob Lyon + Nicko Cadell + + + + Initializes a new instance of the class. + + + This instance of the class is set up to write + to a local syslog service. + + + + + Add a mapping of level to severity + + The mapping to add + + + Adds a to this appender. + + + + + + Initialize the appender based on the options set. + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + This method is called by the method. + + The event to log. + + + Writes the event to a remote syslog daemon. + + + The format of the output will depend on the appender's layout. + + + + + + Close the syslog when the appender is closed + + + + Close the syslog when the appender is closed + + + + + + Translates a log4net level to a syslog severity. + + A log4net level. + A syslog severity. + + + Translates a log4net level to a syslog severity. + + + + + + Generate a syslog priority. + + The syslog facility. + The syslog severity. + A syslog priority. + + + + The facility. The default facility is . + + + + + The message identity + + + + + Marshaled handle to the identity string. We have to hold on to the + string as the openlog and syslog APIs just hold the + pointer to the ident and dereference it for each log message. + + + + + Mapping from level object to syslog severity + + + + + Open connection to system logger. + + + + + Generate a log message. + + + + The libc syslog method takes a format string and a variable argument list similar + to the classic printf function. As this type of vararg list is not supported + by C# we need to specify the arguments explicitly. Here we have specified the + format string with a single message argument. The caller must set the format + string to "%s". + + + + + + Close descriptor used to write to system logger. + + + + + Message identity + + + + An identifier is specified with each log message. This can be specified + by setting the property. The identity (also know + as the tag) must not contain white space. The default value for the + identity is the application name (from ). + + + + + + Syslog facility + + + Set to one of the values. The list of + facilities is predefined and cannot be extended. The default value + is . + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + syslog severities + + + + The log4net Level maps to a syslog severity using the + method and the + class. The severity is set on . + + + + + + system is unusable + + + + + action must be taken immediately + + + + + critical conditions + + + + + error conditions + + + + + warning conditions + + + + + normal but significant condition + + + + + informational + + + + + debug-level messages + + + + + syslog facilities + + + + The syslog facility defines which subsystem the logging comes from. + This is set on the property. + + + + + + kernel messages + + + + + random user-level messages + + + + + mail system + + + + + system daemons + + + + + security/authorization messages + + + + + messages generated internally by syslogd + + + + + line printer subsystem + + + + + network news subsystem + + + + + UUCP subsystem + + + + + clock (cron/at) daemon + + + + + security/authorization messages (private) + + + + + ftp daemon + + + + + NTP subsystem + + + + + log audit + + + + + log alert + + + + + clock daemon + + + + + reserved for local use + + + + + reserved for local use + + + + + reserved for local use + + + + + reserved for local use + + + + + reserved for local use + + + + + reserved for local use + + + + + reserved for local use + + + + + reserved for local use + + + + + A class to act as a mapping between the level that a logging call is made at and + the syslog severity that is should be logged at. + + + + A class to act as a mapping between the level that a logging call is made at and + the syslog severity that is should be logged at. + + + + + + The mapped syslog severity for the specified level + + + + Required property. + The mapped syslog severity for the specified level + + + + + + Stores logging events in an array. + + + + The memory appender stores all the logging events + that are appended in an in-memory array. + + + Use the method to get + the current list of events that have been appended. + + + Use the method to clear the + current list of events. + + + Julian Biddle + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Default constructor. + + + + + + Gets the events that have been logged. + + The events that have been logged + + + Gets the events that have been logged. + + + + + + This method is called by the method. + + the event to log + + Stores the in the events list. + + + + + Clear the list of events + + + Clear the list of events + + + + + The list of events that have been appended. + + + + + Value indicating which fields in the event should be fixed + + + By default all fields are fixed + + + + + Gets or sets a value indicating whether only part of the logging event + data should be fixed. + + + true if the appender should only fix part of the logging event + data, otherwise false. The default is false. + + + + Setting this property to true will cause only part of the event + data to be fixed and stored in the appender, hereby improving performance. + + + See for more information. + + + + + + Gets or sets the fields that will be fixed in the event + + + + The logging event needs to have certain thread specific values + captured before it can be buffered. See + for details. + + + + + + Logs entries by sending network messages using the + native function. + + + + You can send messages only to names that are active + on the network. If you send the message to a user name, + that user must be logged on and running the Messenger + service to receive the message. + + + The receiver will get a top most window displaying the + messages one at a time, therefore this appender should + not be used to deliver a high volume of messages. + + + The following table lists some possible uses for this appender : + + + + + Action + Property Value(s) + + + Send a message to a user account on the local machine + + + = <name of the local machine> + + + = <user name> + + + + + Send a message to a user account on a remote machine + + + = <name of the remote machine> + + + = <user name> + + + + + Send a message to a domain user account + + + = <name of a domain controller | uninitialized> + + + = <user name> + + + + + Send a message to all the names in a workgroup or domain + + + = <workgroup name | domain name>* + + + + + Send a message from the local machine to a remote machine + + + = <name of the local machine | uninitialized> + + + = <name of the remote machine> + + + + + + + Note : security restrictions apply for sending + network messages, see + for more information. + + + + + An example configuration section to log information + using this appender from the local machine, named + LOCAL_PC, to machine OPERATOR_PC : + + + + + + + + + + Nicko Cadell + Gert Driesen + + + + The DNS or NetBIOS name of the server on which the function is to execute. + + + + + The sender of the network message. + + + + + The message alias to which the message should be sent. + + + + + The security context to use for privileged calls + + + + + Initializes the appender. + + + The default constructor initializes all fields to their default values. + + + + + Initialize the appender based on the options set. + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + The appender will be ignored if no was specified. + + + The required property was not specified. + + + + This method is called by the method. + + The event to log. + + + Sends the event using a network message. + + + + + + Sends a buffer of information to a registered message alias. + + The DNS or NetBIOS name of the server on which the function is to execute. + The message alias to which the message buffer should be sent + The originator of the message. + The message text. + The length, in bytes, of the message text. + + + The following restrictions apply for sending network messages: + + + + + Platform + Requirements + + + Windows NT + + + No special group membership is required to send a network message. + + + Admin, Accounts, Print, or Server Operator group membership is required to + successfully send a network message on a remote server. + + + + + Windows 2000 or later + + + If you send a message on a domain controller that is running Active Directory, + access is allowed or denied based on the access control list (ACL) for the securable + object. The default ACL permits only Domain Admins and Account Operators to send a network message. + + + On a member server or workstation, only Administrators and Server Operators can send a network message. + + + + + + + For more information see Security Requirements for the Network Management Functions. + + + + + If the function succeeds, the return value is zero. + + + + + + Gets or sets the sender of the message. + + + The sender of the message. + + + If this property is not specified, the message is sent from the local computer. + + + + + Gets or sets the message alias to which the message should be sent. + + + The recipient of the message. + + + This property should always be specified in order to send a message. + + + + + Gets or sets the DNS or NetBIOS name of the remote server on which the function is to execute. + + + DNS or NetBIOS name of the remote server on which the function is to execute. + + + + For Windows NT 4.0 and earlier, the string should begin with \\. + + + If this property is not specified, the local computer is used. + + + + + + Gets or sets the used to call the NetSend method. + + + The used to call the NetSend method. + + + + Unless a specified here for this appender + the is queried for the + security context to use. The default behavior is to use the security context + of the current thread. + + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + Appends log events to the OutputDebugString system. + + + + OutputDebugStringAppender appends log events to the + OutputDebugString system. + + + The string is passed to the native OutputDebugString + function. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Default constructor. + + + + + + Write the logging event to the output debug string API + + the event to log + + + Write the logging event to the output debug string API + + + + + + Stub for OutputDebugString native method + + the string to output + + + Stub for OutputDebugString native method + + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + Logs events to a remote syslog daemon. + + + + The BSD syslog protocol is used to remotely log to + a syslog daemon. The syslogd listens for for messages + on UDP port 514. + + + The syslog UDP protocol is not authenticated. Most syslog daemons + do not accept remote log messages because of the security implications. + You may be able to use the LocalSyslogAppender to talk to a local + syslog service. + + + There is an RFC 3164 that claims to document the BSD Syslog Protocol. + This RFC can be seen here: http://www.faqs.org/rfcs/rfc3164.html. + This appender generates what the RFC calls an "Original Device Message", + i.e. does not include the TIMESTAMP or HOSTNAME fields. By observation + this format of message will be accepted by all current syslog daemon + implementations. The daemon will attach the current time and the source + hostname or IP address to any messages received. + + + Syslog messages must have a facility and and a severity. The severity + is derived from the Level of the logging event. + The facility must be chosen from the set of defined syslog + values. The facilities list is predefined + and cannot be extended. + + + An identifier is specified with each log message. This can be specified + by setting the property. The identity (also know + as the tag) must not contain white space. The default value for the + identity is the application name (from ). + + + Rob Lyon + Nicko Cadell + + + + Sends logging events as connectionless UDP datagrams to a remote host or a + multicast group using an . + + + + UDP guarantees neither that messages arrive, nor that they arrive in the correct order. + + + To view the logging results, a custom application can be developed that listens for logging + events. + + + When decoding events send via this appender remember to use the same encoding + to decode the events as was used to send the events. See the + property to specify the encoding to use. + + + + This example shows how to log receive logging events that are sent + on IP address 244.0.0.1 and port 8080 to the console. The event is + encoded in the packet as a unicode string and it is decoded as such. + + IPEndPoint remoteEndPoint = new IPEndPoint(IPAddress.Any, 0); + UdpClient udpClient; + byte[] buffer; + string loggingEvent; + + try + { + udpClient = new UdpClient(8080); + + while(true) + { + buffer = udpClient.Receive(ref remoteEndPoint); + loggingEvent = System.Text.Encoding.Unicode.GetString(buffer); + Console.WriteLine(loggingEvent); + } + } + catch(Exception e) + { + Console.WriteLine(e.ToString()); + } + + + Dim remoteEndPoint as IPEndPoint + Dim udpClient as UdpClient + Dim buffer as Byte() + Dim loggingEvent as String + + Try + remoteEndPoint = new IPEndPoint(IPAddress.Any, 0) + udpClient = new UdpClient(8080) + + While True + buffer = udpClient.Receive(ByRef remoteEndPoint) + loggingEvent = System.Text.Encoding.Unicode.GetString(buffer) + Console.WriteLine(loggingEvent) + Wend + Catch e As Exception + Console.WriteLine(e.ToString()) + End Try + + + An example configuration section to log information using this appender to the + IP 224.0.0.1 on port 8080: + + + + + + + + + + Gert Driesen + Nicko Cadell + + + + Initializes a new instance of the class. + + + The default constructor initializes all fields to their default values. + + + + + Initialize the appender based on the options set. + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + The appender will be ignored if no was specified or + an invalid remote or local TCP port number was specified. + + + The required property was not specified. + The TCP port number assigned to or is less than or greater than . + + + + This method is called by the method. + + The event to log. + + + Sends the event using an UDP datagram. + + + Exceptions are passed to the . + + + + + + Closes the UDP connection and releases all resources associated with + this instance. + + + + Disables the underlying and releases all managed + and unmanaged resources associated with the . + + + + + + Initializes the underlying connection. + + + + The underlying is initialized and binds to the + port number from which you intend to communicate. + + + Exceptions are passed to the . + + + + + + The IP address of the remote host or multicast group to which + the logging event will be sent. + + + + + The TCP port number of the remote host or multicast group to + which the logging event will be sent. + + + + + The cached remote endpoint to which the logging events will be sent. + + + + + The TCP port number from which the will communicate. + + + + + The instance that will be used for sending the + logging events. + + + + + The encoding to use for the packet. + + + + + Gets or sets the IP address of the remote host or multicast group to which + the underlying should sent the logging event. + + + The IP address of the remote host or multicast group to which the logging event + will be sent. + + + + Multicast addresses are identified by IP class D addresses (in the range 224.0.0.0 to + 239.255.255.255). Multicast packets can pass across different networks through routers, so + it is possible to use multicasts in an Internet scenario as long as your network provider + supports multicasting. + + + Hosts that want to receive particular multicast messages must register their interest by joining + the multicast group. Multicast messages are not sent to networks where no host has joined + the multicast group. Class D IP addresses are used for multicast groups, to differentiate + them from normal host addresses, allowing nodes to easily detect if a message is of interest. + + + Static multicast addresses that are needed globally are assigned by IANA. A few examples are listed in the table below: + + + + + IP Address + Description + + + 224.0.0.1 + + + Sends a message to all system on the subnet. + + + + + 224.0.0.2 + + + Sends a message to all routers on the subnet. + + + + + 224.0.0.12 + + + The DHCP server answers messages on the IP address 224.0.0.12, but only on a subnet. + + + + + + + A complete list of actually reserved multicast addresses and their owners in the ranges + defined by RFC 3171 can be found at the IANA web site. + + + The address range 239.0.0.0 to 239.255.255.255 is reserved for administrative scope-relative + addresses. These addresses can be reused with other local groups. Routers are typically + configured with filters to prevent multicast traffic in this range from flowing outside + of the local network. + + + + + + Gets or sets the TCP port number of the remote host or multicast group to which + the underlying should sent the logging event. + + + An integer value in the range to + indicating the TCP port number of the remote host or multicast group to which the logging event + will be sent. + + + The underlying will send messages to this TCP port number + on the remote host or multicast group. + + The value specified is less than or greater than . + + + + Gets or sets the TCP port number from which the underlying will communicate. + + + An integer value in the range to + indicating the TCP port number from which the underlying will communicate. + + + + The underlying will bind to this port for sending messages. + + + Setting the value to 0 (the default) will cause the udp client not to bind to + a local port. + + + The value specified is less than or greater than . + + + + Gets or sets used to write the packets. + + + The used to write the packets. + + + + The used to write the packets. + + + + + + Gets or sets the underlying . + + + The underlying . + + + creates a to send logging events + over a network. Classes deriving from can use this + property to get or set this . Use the underlying + returned from if you require access beyond that which + provides. + + + + + Gets or sets the cached remote endpoint to which the logging events should be sent. + + + The cached remote endpoint to which the logging events will be sent. + + + The method will initialize the remote endpoint + with the values of the and + properties. + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + Syslog port 514 + + + + + Initializes a new instance of the class. + + + This instance of the class is set up to write + to a remote syslog daemon. + + + + + Add a mapping of level to severity + + The mapping to add + + + Add a mapping to this appender. + + + + + + This method is called by the method. + + The event to log. + + + Writes the event to a remote syslog daemon. + + + The format of the output will depend on the appender's layout. + + + + + + Initialize the options for this appender + + + + Initialize the level to syslog severity mappings set on this appender. + + + + + + Translates a log4net level to a syslog severity. + + A log4net level. + A syslog severity. + + + Translates a log4net level to a syslog severity. + + + + + + Generate a syslog priority. + + The syslog facility. + The syslog severity. + A syslog priority. + + + Generate a syslog priority. + + + + + + The facility. The default facility is . + + + + + The message identity + + + + + Mapping from level object to syslog severity + + + + + Message identity + + + + An identifier is specified with each log message. This can be specified + by setting the property. The identity (also know + as the tag) must not contain white space. The default value for the + identity is the application name (from ). + + + + + + Syslog facility + + + Set to one of the values. The list of + facilities is predefined and cannot be extended. The default value + is . + + + + + syslog severities + + + + The syslog severities. + + + + + + system is unusable + + + + + action must be taken immediately + + + + + critical conditions + + + + + error conditions + + + + + warning conditions + + + + + normal but significant condition + + + + + informational + + + + + debug-level messages + + + + + syslog facilities + + + + The syslog facilities + + + + + + kernel messages + + + + + random user-level messages + + + + + mail system + + + + + system daemons + + + + + security/authorization messages + + + + + messages generated internally by syslogd + + + + + line printer subsystem + + + + + network news subsystem + + + + + UUCP subsystem + + + + + clock (cron/at) daemon + + + + + security/authorization messages (private) + + + + + ftp daemon + + + + + NTP subsystem + + + + + log audit + + + + + log alert + + + + + clock daemon + + + + + reserved for local use + + + + + reserved for local use + + + + + reserved for local use + + + + + reserved for local use + + + + + reserved for local use + + + + + reserved for local use + + + + + reserved for local use + + + + + reserved for local use + + + + + A class to act as a mapping between the level that a logging call is made at and + the syslog severity that is should be logged at. + + + + A class to act as a mapping between the level that a logging call is made at and + the syslog severity that is should be logged at. + + + + + + The mapped syslog severity for the specified level + + + + Required property. + The mapped syslog severity for the specified level + + + + + + Delivers logging events to a remote logging sink. + + + + This Appender is designed to deliver events to a remote sink. + That is any object that implements the + interface. It delivers the events using .NET remoting. The + object to deliver events to is specified by setting the + appenders property. + + The RemotingAppender buffers events before sending them. This allows it to + make more efficient use of the remoting infrastructure. + + Once the buffer is full the events are still not sent immediately. + They are scheduled to be sent using a pool thread. The effect is that + the send occurs asynchronously. This is very important for a + number of non obvious reasons. The remoting infrastructure will + flow thread local variables (stored in the ), + if they are marked as , across the + remoting boundary. If the server is not contactable then + the remoting infrastructure will clear the + objects from the . To prevent a logging failure from + having side effects on the calling application the remoting call must be made + from a separate thread to the one used by the application. A + thread is used for this. If no thread is available then + the events will block in the thread pool manager until a thread is available. + + Because the events are sent asynchronously using pool threads it is possible to close + this appender before all the queued events have been sent. + When closing the appender attempts to wait until all the queued events have been sent, but + this will timeout after 30 seconds regardless. + + If this appender is being closed because the + event has fired it may not be possible to send all the queued events. During process + exit the runtime limits the time that a + event handler is allowed to run for. If the runtime terminates the threads before + the queued events have been sent then they will be lost. To ensure that all events + are sent the appender must be closed before the application exits. See + for details on how to shutdown + log4net programmatically. + + + Nicko Cadell + Gert Driesen + Daniel Cazzulino + + + + Initializes a new instance of the class. + + + + Default constructor. + + + + + + Initialize the appender based on the options set + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Send the contents of the buffer to the remote sink. + + + The events are not sent immediately. They are scheduled to be sent + using a pool thread. The effect is that the send occurs asynchronously. + This is very important for a number of non obvious reasons. The remoting + infrastructure will flow thread local variables (stored in the ), + if they are marked as , across the + remoting boundary. If the server is not contactable then + the remoting infrastructure will clear the + objects from the . To prevent a logging failure from + having side effects on the calling application the remoting call must be made + from a separate thread to the one used by the application. A + thread is used for this. If no thread is available then + the events will block in the thread pool manager until a thread is available. + + The events to send. + + + + Override base class close. + + + + This method waits while there are queued work items. The events are + sent asynchronously using work items. These items + will be sent once a thread pool thread is available to send them, therefore + it is possible to close the appender before all the queued events have been + sent. + + This method attempts to wait until all the queued events have been sent, but this + method will timeout after 30 seconds regardless. + + If the appender is being closed because the + event has fired it may not be possible to send all the queued events. During process + exit the runtime limits the time that a + event handler is allowed to run for. + + + + + A work item is being queued into the thread pool + + + + + A work item from the thread pool has completed + + + + + Send the contents of the buffer to the remote sink. + + + This method is designed to be used with the . + This method expects to be passed an array of + objects in the state param. + + the logging events to send + + + + The URL of the remote sink. + + + + + The local proxy (.NET remoting) for the remote logging sink. + + + + + The number of queued callbacks currently waiting or executing + + + + + Event used to signal when there are no queued work items + + + This event is set when there are no queued work items. In this + state it is safe to close the appender. + + + + + Gets or sets the URL of the well-known object that will accept + the logging events. + + + The well-known URL of the remote sink. + + + + The URL of the remoting sink that will accept logging events. + The sink must implement the + interface. + + + + + + Interface used to deliver objects to a remote sink. + + + This interface must be implemented by a remoting sink + if the is to be used + to deliver logging events to the sink. + + + + + Delivers logging events to the remote sink + + Array of events to log. + + + Delivers logging events to the remote sink + + + + + + Appender that rolls log files based on size or date or both. + + + + RollingFileAppender can roll log files based on size or date or both + depending on the setting of the property. + When set to the log file will be rolled + once its size exceeds the . + When set to the log file will be rolled + once the date boundary specified in the property + is crossed. + When set to the log file will be + rolled once the date boundary specified in the property + is crossed, but within a date boundary the file will also be rolled + once its size exceeds the . + When set to the log file will be rolled when + the appender is configured. This effectively means that the log file can be + rolled once per program execution. + + + A of few additional optional features have been added: + + Attach date pattern for current log file + Backup number increments for newer files + Infinite number of backups by file size + + + + + + For large or infinite numbers of backup files a + greater than zero is highly recommended, otherwise all the backup files need + to be renamed each time a new backup is created. + + + When Date/Time based rolling is used setting + to will reduce the number of file renamings to few or none. + + + + + + Changing or without clearing + the log file directory of backup files will cause unexpected and unwanted side effects. + + + + + If Date/Time based rolling is enabled this appender will attempt to roll existing files + in the directory without a Date/Time tag based on the last write date of the base log file. + The appender only rolls the log file when a message is logged. If Date/Time based rolling + is enabled then the appender will not roll the log file at the Date/Time boundary but + at the point when the next message is logged after the boundary has been crossed. + + + + The extends the and + has the same behavior when opening the log file. + The appender will first try to open the file for writing when + is called. This will typically be during configuration. + If the file cannot be opened for writing the appender will attempt + to open the file again each time a message is logged to the appender. + If the file cannot be opened for writing when a message is logged then + the message will be discarded by this appender. + + + When rolling a backup file necessitates deleting an older backup file the + file to be deleted is moved to a temporary name before being deleted. + + + + + A maximum number of backup files when rolling on date/time boundaries is not supported. + + + + Nicko Cadell + Gert Driesen + Aspi Havewala + Douglas de la Torre + Edward Smit + + + + Initializes a new instance of the class. + + + + Default constructor. + + + + + + Sets the quiet writer being used. + + + This method can be overridden by sub classes. + + the writer to set + + + + Write out a logging event. + + the event to write to file. + + + Handles append time behavior for RollingFileAppender. This checks + if a roll over either by date (checked first) or time (checked second) + is need and then appends to the file last. + + + + + + Write out an array of logging events. + + the events to write to file. + + + Handles append time behavior for RollingFileAppender. This checks + if a roll over either by date (checked first) or time (checked second) + is need and then appends to the file last. + + + + + + Performs any required rolling before outputting the next event + + + + Handles append time behavior for RollingFileAppender. This checks + if a roll over either by date (checked first) or time (checked second) + is need and then appends to the file last. + + + + + + Creates and opens the file for logging. If + is false then the fully qualified name is determined and used. + + the name of the file to open + true to append to existing file + + This method will ensure that the directory structure + for the specified exists. + + + + + Get the current output file name + + the base file name + the output file name + + The output file name is based on the base fileName specified. + If is set then the output + file name is the same as the base file passed in. Otherwise + the output file depends on the date pattern, on the count + direction or both. + + + + + Determines curSizeRollBackups (only within the current roll point) + + + + + Generates a wildcard pattern that can be used to find all files + that are similar to the base file name. + + + + + + + Builds a list of filenames for all files matching the base filename plus a file + pattern. + + + + + + + Initiates a roll over if needed for crossing a date boundary since the last run. + + + + + Initializes based on existing conditions at time of . + + + + Initializes based on existing conditions at time of . + The following is done + + determine curSizeRollBackups (only within the current roll point) + initiates a roll over if needed for crossing a date boundary since the last run. + + + + + + + Does the work of bumping the 'current' file counter higher + to the highest count when an incremental file name is seen. + The highest count is either the first file (when count direction + is greater than 0) or the last file (when count direction less than 0). + In either case, we want to know the highest count that is present. + + + + + + + Takes a list of files and a base file name, and looks for + 'incremented' versions of the base file. Bumps the max + count up to the highest count seen. + + + + + + + Calculates the RollPoint for the datePattern supplied. + + the date pattern to calculate the check period for + The RollPoint that is most accurate for the date pattern supplied + + Essentially the date pattern is examined to determine what the + most suitable roll point is. The roll point chosen is the roll point + with the smallest period that can be detected using the date pattern + supplied. i.e. if the date pattern only outputs the year, month, day + and hour then the smallest roll point that can be detected would be + and hourly roll point as minutes could not be detected. + + + + + Initialize the appender based on the options set + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + Sets initial conditions including date/time roll over information, first check, + scheduledFilename, and calls to initialize + the current number of backups. + + + + + + Rollover the file(s) to date/time tagged file(s). + + set to true if the file to be rolled is currently open + + + Rollover the file(s) to date/time tagged file(s). + Resets curSizeRollBackups. + If fileIsOpen is set then the new file is opened (through SafeOpenFile). + + + + + + Renames file to file . + + Name of existing file to roll. + New name for file. + + + Renames file to file . It + also checks for existence of target file and deletes if it does. + + + + + + Test if a file exists at a specified path + + the path to the file + true if the file exists + + + Test if a file exists at a specified path + + + + + + Deletes the specified file if it exists. + + The file to delete. + + + Delete a file if is exists. + The file is first moved to a new filename then deleted. + This allows the file to be removed even when it cannot + be deleted, but it still can be moved. + + + + + + Implements file roll base on file size. + + + + If the maximum number of size based backups is reached + (curSizeRollBackups == maxSizeRollBackups) then the oldest + file is deleted -- its index determined by the sign of countDirection. + If countDirection < 0, then files + {File.1, ..., File.curSizeRollBackups -1} + are renamed to {File.2, ..., + File.curSizeRollBackups}. Moreover, File is + renamed File.1 and closed. + + + A new file is created to receive further log output. + + + If maxSizeRollBackups is equal to zero, then the + File is truncated with no backup files created. + + + If maxSizeRollBackups < 0, then File is + renamed if needed and no files are deleted. + + + + + + Implements file roll. + + the base name to rename + + + If the maximum number of size based backups is reached + (curSizeRollBackups == maxSizeRollBackups) then the oldest + file is deleted -- its index determined by the sign of countDirection. + If countDirection < 0, then files + {File.1, ..., File.curSizeRollBackups -1} + are renamed to {File.2, ..., + File.curSizeRollBackups}. + + + If maxSizeRollBackups is equal to zero, then the + File is truncated with no backup files created. + + + If maxSizeRollBackups < 0, then File is + renamed if needed and no files are deleted. + + + This is called by to rename the files. + + + + + + Get the start time of the next window for the current rollpoint + + the current date + the type of roll point we are working with + the start time for the next roll point an interval after the currentDateTime date + + + Returns the date of the next roll point after the currentDateTime date passed to the method. + + + The basic strategy is to subtract the time parts that are less significant + than the rollpoint from the current time. This should roll the time back to + the start of the time window for the current rollpoint. Then we add 1 window + worth of time and get the start time of the next window for the rollpoint. + + + + + + This object supplies the current date/time. Allows test code to plug in + a method to control this class when testing date/time based rolling. + + + + + The date pattern. By default, the pattern is set to ".yyyy-MM-dd" + meaning daily rollover. + + + + + The actual formatted filename that is currently being written to + or will be the file transferred to on roll over + (based on staticLogFileName). + + + + + The timestamp when we shall next recompute the filename. + + + + + Holds date of last roll over + + + + + The type of rolling done + + + + + The default maximum file size is 10MB + + + + + There is zero backup files by default + + + + + How many sized based backups have been made so far + + + + + The rolling file count direction. + + + + + The rolling mode used in this appender. + + + + + Cache flag set if we are rolling by date. + + + + + Cache flag set if we are rolling by size. + + + + + Value indicating whether to always log to the same file. + + + + + FileName provided in configuration. Used for rolling properly + + + + + The 1st of January 1970 in UTC + + + + + Gets or sets the date pattern to be used for generating file names + when rolling over on date. + + + The date pattern to be used for generating file names when rolling + over on date. + + + + Takes a string in the same format as expected by + . + + + This property determines the rollover schedule when rolling over + on date. + + + + + + Gets or sets the maximum number of backup files that are kept before + the oldest is erased. + + + The maximum number of backup files that are kept before the oldest is + erased. + + + + If set to zero, then there will be no backup files and the log file + will be truncated when it reaches . + + + If a negative number is supplied then no deletions will be made. Note + that this could result in very slow performance as a large number of + files are rolled over unless is used. + + + The maximum applies to each time based group of files and + not the total. + + + + + + Gets or sets the maximum size that the output file is allowed to reach + before being rolled over to backup files. + + + The maximum size in bytes that the output file is allowed to reach before being + rolled over to backup files. + + + + This property is equivalent to except + that it is required for differentiating the setter taking a + argument from the setter taking a + argument. + + + The default maximum file size is 10MB (10*1024*1024). + + + + + + Gets or sets the maximum size that the output file is allowed to reach + before being rolled over to backup files. + + + The maximum size that the output file is allowed to reach before being + rolled over to backup files. + + + + This property allows you to specify the maximum size with the + suffixes "KB", "MB" or "GB" so that the size is interpreted being + expressed respectively in kilobytes, megabytes or gigabytes. + + + For example, the value "10KB" will be interpreted as 10240 bytes. + + + The default maximum file size is 10MB. + + + If you have the option to set the maximum file size programmatically + consider using the property instead as this + allows you to set the size in bytes as a . + + + + + + Gets or sets the rolling file count direction. + + + The rolling file count direction. + + + + Indicates if the current file is the lowest numbered file or the + highest numbered file. + + + By default newer files have lower numbers ( < 0), + i.e. log.1 is most recent, log.5 is the 5th backup, etc... + + + >= 0 does the opposite i.e. + log.1 is the first backup made, log.5 is the 5th backup made, etc. + For infinite backups use >= 0 to reduce + rollover costs. + + The default file count direction is -1. + + + + + Gets or sets the rolling style. + + The rolling style. + + + The default rolling style is . + + + When set to this appender's + property is set to false, otherwise + the appender would append to a single file rather than rolling + the file each time it is opened. + + + + + + Gets or sets a value indicating whether to always log to + the same file. + + + true if always should be logged to the same file, otherwise false. + + + + By default file.log is always the current file. Optionally + file.log.yyyy-mm-dd for current formatted datePattern can by the currently + logging file (or file.log.curSizeRollBackup or even + file.log.yyyy-mm-dd.curSizeRollBackup). + + + This will make time based rollovers with a large number of backups + much faster as the appender it won't have to rename all the backups! + + + + + + Style of rolling to use + + + + Style of rolling to use + + + + + + Roll files once per program execution + + + + Roll files once per program execution. + Well really once each time this appender is + configured. + + + Setting this option also sets AppendToFile to + false on the RollingFileAppender, otherwise + this appender would just be a normal file appender. + + + + + + Roll files based only on the size of the file + + + + + Roll files based only on the date + + + + + Roll files based on both the size and date of the file + + + + + The code assumes that the following 'time' constants are in a increasing sequence. + + + + The code assumes that the following 'time' constants are in a increasing sequence. + + + + + + Roll the log not based on the date + + + + + Roll the log for each minute + + + + + Roll the log for each hour + + + + + Roll the log twice a day (midday and midnight) + + + + + Roll the log each day (midnight) + + + + + Roll the log each week + + + + + Roll the log each month + + + + + This interface is used to supply Date/Time information to the . + + + This interface is used to supply Date/Time information to the . + Used primarily to allow test classes to plug themselves in so they can + supply test date/times. + + + + + Gets the current time. + + The current time. + + + Gets the current time. + + + + + + Default implementation of that returns the current time. + + + + + Gets the current time. + + The current time. + + + Gets the current time. + + + + + + Send an e-mail when a specific logging event occurs, typically on errors + or fatal errors. + + + + The number of logging events delivered in this e-mail depend on + the value of option. The + keeps only the last + logging events in its + cyclic buffer. This keeps memory requirements at a reasonable level while + still delivering useful application context. + + + Authentication and setting the server Port are only available on the MS .NET 1.1 runtime. + For these features to be enabled you need to ensure that you are using a version of + the log4net assembly that is built against the MS .NET 1.1 framework and that you are + running the your application on the MS .NET 1.1 runtime. On all other platforms only sending + unauthenticated messages to a server listening on port 25 (the default) is supported. + + + Authentication is supported by setting the property to + either or . + If using authentication then the + and properties must also be set. + + + To set the SMTP server port use the property. The default port is 25. + + + Nicko Cadell + Gert Driesen + + + + Default constructor + + + + Default constructor + + + + + + Sends the contents of the cyclic buffer as an e-mail message. + + The logging events to send. + + + + Send the email message + + the body text to include in the mail + + + + Gets or sets a semicolon-delimited list of recipient e-mail addresses. + + + A semicolon-delimited list of e-mail addresses. + + + + A semicolon-delimited list of recipient e-mail addresses. + + + + + + Gets or sets the e-mail address of the sender. + + + The e-mail address of the sender. + + + + The e-mail address of the sender. + + + + + + Gets or sets the subject line of the e-mail message. + + + The subject line of the e-mail message. + + + + The subject line of the e-mail message. + + + + + + Gets or sets the name of the SMTP relay mail server to use to send + the e-mail messages. + + + The name of the e-mail relay server. If SmtpServer is not set, the + name of the local SMTP server is used. + + + + The name of the e-mail relay server. If SmtpServer is not set, the + name of the local SMTP server is used. + + + + + + Obsolete + + + Use the BufferingAppenderSkeleton Fix methods instead + + + + Obsolete property. + + + + + + The mode to use to authentication with the SMTP server + + + Authentication is only available on the MS .NET 1.1 runtime. + + Valid Authentication mode values are: , + , and . + The default value is . When using + you must specify the + and to use to authenticate. + When using the Windows credentials for the current + thread, if impersonating, or the process will be used to authenticate. + + + + + + The username to use to authenticate with the SMTP server + + + Authentication is only available on the MS .NET 1.1 runtime. + + A and must be specified when + is set to , + otherwise the username will be ignored. + + + + + + The password to use to authenticate with the SMTP server + + + Authentication is only available on the MS .NET 1.1 runtime. + + A and must be specified when + is set to , + otherwise the password will be ignored. + + + + + + The port on which the SMTP server is listening + + + Server Port is only available on the MS .NET 1.1 runtime. + + The port on which the SMTP server is listening. The default + port is 25. The Port can only be changed when running on + the MS .NET 1.1 runtime. + + + + + + Gets or sets the priority of the e-mail message + + + One of the values. + + + + Sets the priority of the e-mails generated by this + appender. The default priority is . + + + If you are using this appender to report errors then + you may want to set the priority to . + + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + Values for the property. + + + + SMTP authentication modes. + + + + + + No authentication + + + + + Basic authentication. + + + Requires a username and password to be supplied + + + + + Integrated authentication + + + Uses the Windows credentials from the current thread or process to authenticate. + + + + + Send an email when a specific logging event occurs, typically on errors + or fatal errors. Rather than sending via smtp it writes a file into the + directory specified by . This allows services such + as the IIS SMTP agent to manage sending the messages. + + + + The configuration for this appender is identical to that of the SMTPAppender, + except that instead of specifying the SMTPAppender.SMTPHost you specify + . + + + The number of logging events delivered in this e-mail depend on + the value of option. The + keeps only the last + logging events in its + cyclic buffer. This keeps memory requirements at a reasonable level while + still delivering useful application context. + + + Niall Daley + Nicko Cadell + + + + Default constructor + + + + Default constructor + + + + + + Sends the contents of the cyclic buffer as an e-mail message. + + The logging events to send. + + + Sends the contents of the cyclic buffer as an e-mail message. + + + + + + Activate the options on this appender. + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Convert a path into a fully qualified path. + + The path to convert. + The fully qualified path. + + + Converts the path specified to a fully + qualified path. If the path is relative it is + taken as relative from the application base + directory. + + + + + + The security context to use for privileged calls + + + + + Gets or sets a semicolon-delimited list of recipient e-mail addresses. + + + A semicolon-delimited list of e-mail addresses. + + + + A semicolon-delimited list of e-mail addresses. + + + + + + Gets or sets the e-mail address of the sender. + + + The e-mail address of the sender. + + + + The e-mail address of the sender. + + + + + + Gets or sets the subject line of the e-mail message. + + + The subject line of the e-mail message. + + + + The subject line of the e-mail message. + + + + + + Gets or sets the path to write the messages to. + + + + Gets or sets the path to write the messages to. This should be the same + as that used by the agent sending the messages. + + + + + + Gets or sets the used to write to the pickup directory. + + + The used to write to the pickup directory. + + + + Unless a specified here for this appender + the is queried for the + security context to use. The default behavior is to use the security context + of the current thread. + + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + Appender that allows clients to connect via Telnet to receive log messages + + + + The TelnetAppender accepts socket connections and streams logging messages + back to the client. + The output is provided in a telnet-friendly way so that a log can be monitored + over a TCP/IP socket. + This allows simple remote monitoring of application logging. + + + The default is 23 (the telnet port). + + + Keith Long + Nicko Cadell + + + + Default constructor + + + + Default constructor + + + + + + Overrides the parent method to close the socket handler + + + + Closes all the outstanding connections. + + + + + + Initialize the appender based on the options set. + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + Create the socket handler and wait for connections + + + + + + Writes the logging event to each connected client. + + The event to log. + + + Writes the logging event to each connected client. + + + + + + Gets or sets the TCP port number on which this will listen for connections. + + + An integer value in the range to + indicating the TCP port number on which this will listen for connections. + + + + The default value is 23 (the telnet port). + + + The value specified is less than + or greater than . + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + Helper class to manage connected clients + + + + The SocketHandler class is used to accept connections from + clients. It is threaded so that clients can connect/disconnect + asynchronously. + + + + + + Opens a new server port on + + the local port to listen on for connections + + + Creates a socket handler on the specified local server port. + + + + + + Sends a string message to each of the connected clients + + the text to send + + + Sends a string message to each of the connected clients + + + + + + Add a client to the internal clients list + + client to add + + + + Remove a client from the internal clients list + + client to remove + + + + Callback used to accept a connection on the server socket + + The result of the asynchronous operation + + + On connection adds to the list of connections + if there are two many open connections you will be disconnected + + + + + + Close all network connections + + + + Make sure we close all network connections + + + + + + Test if this handler has active connections + + + true if this handler has active connections + + + + This property will be true while this handler has + active connections, that is at least one connection that + the handler will attempt to send a message to. + + + + + + Class that represents a client connected to this handler + + + + Class that represents a client connected to this handler + + + + + + Create this for the specified + + the client's socket + + + Opens a stream writer on the socket. + + + + + + Write a string to the client + + string to send + + + Write a string to the client + + + + + + Cleanup the clients connection + + + + Close the socket connection. + + + + + + Appends log events to the system. + + + + The application configuration file can be used to control what listeners + are actually used. See the MSDN documentation for the + class for details on configuring the + trace system. + + + Events are written using the System.Diagnostics.Trace.Write(string,string) + method. The event's logger name is passed as the value for the category name to the Write method. + + + Compact Framework
+ The Compact Framework does not support the + class for any operation except Assert. When using the Compact Framework this + appender will write to the system rather than + the Trace system. This appender will therefore behave like the . +
+
+ Douglas de la Torre + Nicko Cadell + Gert Driesen +
+ + + Initializes a new instance of the . + + + + Default constructor. + + + + + + Initializes a new instance of the + with a specified layout. + + The layout to use with this appender. + + + Obsolete constructor. + + + + + + Writes the logging event to the system. + + The event to log. + + + Writes the logging event to the system. + + + + + + Immediate flush means that the underlying writer or output stream + will be flushed at the end of each append operation. + + + + Immediate flush is slower but ensures that each append request is + actually written. If is set to + false, then there is a good chance that the last few + logs events are not actually written to persistent media if and + when the application crashes. + + + The default value is true. + + + + + Gets or sets a value that indicates whether the appender will + flush at the end of each write. + + + The default behavior is to flush at the end of each + write. If the option is set tofalse, then the underlying + stream can defer writing to physical medium to a later time. + + + Avoiding the flush operation at the end of each append results + in a performance gain of 10 to 20 percent. However, there is safety + trade-off involved in skipping flushing. Indeed, when flushing is + skipped, then it is likely that the last few log events will not + be recorded on disk when the application exits. This is a high + price to pay even for a 20% performance gain. + + + + + + This appender requires a to be set. + + true + + + This appender requires a to be set. + + + + + + Assembly level attribute that specifies a domain to alias to this assembly's repository. + + + + AliasDomainAttribute is obsolete. Use AliasRepositoryAttribute instead of AliasDomainAttribute. + + + An assembly's logger repository is defined by its , + however this can be overridden by an assembly loaded before the target assembly. + + + An assembly can alias another assembly's domain to its repository by + specifying this attribute with the name of the target domain. + + + This attribute can only be specified on the assembly and may be used + as many times as necessary to alias all the required domains. + + + Nicko Cadell + Gert Driesen + + + + Assembly level attribute that specifies a repository to alias to this assembly's repository. + + + + An assembly's logger repository is defined by its , + however this can be overridden by an assembly loaded before the target assembly. + + + An assembly can alias another assembly's repository to its repository by + specifying this attribute with the name of the target repository. + + + This attribute can only be specified on the assembly and may be used + as many times as necessary to alias all the required repositories. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class with + the specified repository to alias to this assembly's repository. + + The repository to alias to this assemby's repository. + + + Initializes a new instance of the class with + the specified repository to alias to this assembly's repository. + + + + + + Gets or sets the repository to alias to this assemby's repository. + + + The repository to alias to this assemby's repository. + + + + The name of the repository to alias to this assemby's repository. + + + + + + Initializes a new instance of the class with + the specified domain to alias to this assembly's repository. + + The domain to alias to this assemby's repository. + + + Obsolete. Use instead of . + + + + + + Use this class to quickly configure a . + + + + Allows very simple programmatic configuration of log4net. + + + Only one appender can be configured using this configurator. + The appender is set at the root of the hierarchy and all logging + events will be delivered to that appender. + + + Appenders can also implement the interface. Therefore + they would require that the method + be called after the appenders properties have been configured. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Uses a private access modifier to prevent instantiation of this class. + + + + + + Initializes the log4net system with a default configuration. + + + + Initializes the log4net logging system using a + that will write to Console.Out. The log messages are + formatted using the layout object + with the + layout style. + + + + + + Initializes the log4net system using the specified appender. + + The appender to use to log all logging events. + + + Initializes the log4net system using the specified appender. + + + + + + Initializes the with a default configuration. + + The repository to configure. + + + Initializes the specified repository using a + that will write to Console.Out. The log messages are + formatted using the layout object + with the + layout style. + + + + + + Initializes the using the specified appender. + + The repository to configure. + The appender to use to log all logging events. + + + Initializes the using the specified appender. + + + + + + Base class for all log4net configuration attributes. + + + This is an abstract class that must be extended by + specific configurators. This attribute allows the + configurator to be parameterized by an assembly level + attribute. + + Nicko Cadell + Gert Driesen + + + + Constructor used by subclasses. + + the ordering priority for this configurator + + + The is used to order the configurator + attributes before they are invoked. Higher priority configurators are executed + before lower priority ones. + + + + + + Configures the for the specified assembly. + + The assembly that this attribute was defined on. + The repository to configure. + + + Abstract method implemented by a subclass. When this method is called + the subclass should configure the . + + + + + + Compare this instance to another ConfiguratorAttribute + + the object to compare to + see + + + Compares the priorities of the two instances. + Sorts by priority in descending order. Objects with the same priority are + randomly ordered. + + + + + + Assembly level attribute that specifies the logging domain for the assembly. + + + + DomainAttribute is obsolete. Use RepositoryAttribute instead of DomainAttribute. + + + Assemblies are mapped to logging domains. Each domain has its own + logging repository. This attribute specified on the assembly controls + the configuration of the domain. The property specifies the name + of the domain that this assembly is a part of. The + specifies the type of the repository objects to create for the domain. If + this attribute is not specified and a is not specified + then the assembly will be part of the default shared logging domain. + + + This attribute can only be specified on the assembly and may only be used + once per assembly. + + + Nicko Cadell + Gert Driesen + + + + Assembly level attribute that specifies the logging repository for the assembly. + + + + Assemblies are mapped to logging repository. This attribute specified + on the assembly controls + the configuration of the repository. The property specifies the name + of the repository that this assembly is a part of. The + specifies the type of the object + to create for the assembly. If this attribute is not specified or a + is not specified then the assembly will be part of the default shared logging repository. + + + This attribute can only be specified on the assembly and may only be used + once per assembly. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Default constructor. + + + + + + Initialize a new instance of the class + with the name of the repository. + + The name of the repository. + + + Initialize the attribute with the name for the assembly's repository. + + + + + + Gets or sets the name of the logging repository. + + + The string name to use as the name of the repository associated with this + assembly. + + + + This value does not have to be unique. Several assemblies can share the + same repository. They will share the logging configuration of the repository. + + + + + + Gets or sets the type of repository to create for this assembly. + + + The type of repository to create for this assembly. + + + + The type of the repository to create for the assembly. + The type must implement the + interface. + + + This will be the type of repository created when + the repository is created. If multiple assemblies reference the + same repository then the repository is only created once using the + of the first assembly to call into the + repository. + + + + + + Initializes a new instance of the class. + + + + Obsolete. Use RepositoryAttribute instead of DomainAttribute. + + + + + + Initialize a new instance of the class + with the name of the domain. + + The name of the domain. + + + Obsolete. Use RepositoryAttribute instead of DomainAttribute. + + + + + + Use this class to initialize the log4net environment using an Xml tree. + + + + DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. + + + Configures a using an Xml tree. + + + Nicko Cadell + Gert Driesen + + + + Private constructor + + + + + Automatically configures the log4net system based on the + application's configuration settings. + + + + DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. + + Each application has a configuration file. This has the + same name as the application with '.config' appended. + This file is XML and calling this function prompts the + configurator to look in that file for a section called + log4net that contains the configuration data. + + + + + Automatically configures the using settings + stored in the application's configuration file. + + + + DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. + + Each application has a configuration file. This has the + same name as the application with '.config' appended. + This file is XML and calling this function prompts the + configurator to look in that file for a section called + log4net that contains the configuration data. + + The repository to configure. + + + + Configures log4net using a log4net element + + + + DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. + + Loads the log4net configuration from the XML element + supplied as . + + The element to parse. + + + + Configures the using the specified XML + element. + + + + DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. + + Loads the log4net configuration from the XML element + supplied as . + + The repository to configure. + The element to parse. + + + + Configures log4net using the specified configuration file. + + The XML file to load the configuration from. + + + DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. + + + The configuration file must be valid XML. It must contain + at least one element called log4net that holds + the log4net configuration data. + + + The log4net configuration file can possible be specified in the application's + configuration file (either MyAppName.exe.config for a + normal application on Web.config for an ASP.NET application). + + + The following example configures log4net using a configuration file, of which the + location is stored in the application's configuration file : + + + using log4net.Config; + using System.IO; + using System.Configuration; + + ... + + DOMConfigurator.Configure(new FileInfo(ConfigurationSettings.AppSettings["log4net-config-file"])); + + + In the .config file, the path to the log4net can be specified like this : + + + + + + + + + + + + + Configures log4net using the specified configuration file. + + A stream to load the XML configuration from. + + + DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. + + + The configuration data must be valid XML. It must contain + at least one element called log4net that holds + the log4net configuration data. + + + Note that this method will NOT close the stream parameter. + + + + + + Configures the using the specified configuration + file. + + The repository to configure. + The XML file to load the configuration from. + + + DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. + + + The configuration file must be valid XML. It must contain + at least one element called log4net that holds + the configuration data. + + + The log4net configuration file can possible be specified in the application's + configuration file (either MyAppName.exe.config for a + normal application on Web.config for an ASP.NET application). + + + The following example configures log4net using a configuration file, of which the + location is stored in the application's configuration file : + + + using log4net.Config; + using System.IO; + using System.Configuration; + + ... + + DOMConfigurator.Configure(new FileInfo(ConfigurationSettings.AppSettings["log4net-config-file"])); + + + In the .config file, the path to the log4net can be specified like this : + + + + + + + + + + + + + Configures the using the specified configuration + file. + + The repository to configure. + The stream to load the XML configuration from. + + + DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. + + + The configuration data must be valid XML. It must contain + at least one element called log4net that holds + the configuration data. + + + Note that this method will NOT close the stream parameter. + + + + + + Configures log4net using the file specified, monitors the file for changes + and reloads the configuration if a change is detected. + + The XML file to load the configuration from. + + + DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. + + + The configuration file must be valid XML. It must contain + at least one element called log4net that holds + the configuration data. + + + The configuration file will be monitored using a + and depends on the behavior of that class. + + + For more information on how to configure log4net using + a separate configuration file, see . + + + + + + + Configures the using the file specified, + monitors the file for changes and reloads the configuration if a change + is detected. + + The repository to configure. + The XML file to load the configuration from. + + + DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator. + + + The configuration file must be valid XML. It must contain + at least one element called log4net that holds + the configuration data. + + + The configuration file will be monitored using a + and depends on the behavior of that class. + + + For more information on how to configure log4net using + a separate configuration file, see . + + + + + + + Assembly level attribute to configure the . + + + + AliasDomainAttribute is obsolete. Use AliasRepositoryAttribute instead of AliasDomainAttribute. + + + This attribute may only be used at the assembly scope and can only + be used once per assembly. + + + Use this attribute to configure the + without calling one of the + methods. + + + Nicko Cadell + Gert Driesen + + + + Assembly level attribute to configure the . + + + + This attribute may only be used at the assembly scope and can only + be used once per assembly. + + + Use this attribute to configure the + without calling one of the + methods. + + + If neither of the or + properties are set the configuration is loaded from the application's .config file. + If set the property takes priority over the + property. The property + specifies a path to a file to load the config from. The path is relative to the + application's base directory; . + The property is used as a postfix to the assembly file name. + The config file must be located in the application's base directory; . + For example in a console application setting the to + config has the same effect as not specifying the or + properties. + + + The property can be set to cause the + to watch the configuration file for changes. + + + + Log4net will only look for assembly level configuration attributes once. + When using the log4net assembly level attributes to control the configuration + of log4net you must ensure that the first call to any of the + methods is made from the assembly with the configuration + attributes. + + + If you cannot guarantee the order in which log4net calls will be made from + different assemblies you must use programmatic configuration instead, i.e. + call the method directly. + + + + Nicko Cadell + Gert Driesen + + + + Default constructor + + + + Default constructor + + + + + + Configures the for the specified assembly. + + The assembly that this attribute was defined on. + The repository to configure. + + + Configure the repository using the . + The specified must extend the + class otherwise the will not be able to + configure it. + + + The does not extend . + + + + Attempt to load configuration from the local file system + + The assembly that this attribute was defined on. + The repository to configure. + + + + Configure the specified repository using a + + The repository to configure. + the FileInfo pointing to the config file + + + + Attempt to load configuration from a URI + + The assembly that this attribute was defined on. + The repository to configure. + + + + Gets or sets the filename of the configuration file. + + + The filename of the configuration file. + + + + If specified, this is the name of the configuration file to use with + the . This file path is relative to the + application base directory (). + + + The takes priority over the . + + + + + + Gets or sets the extension of the configuration file. + + + The extension of the configuration file. + + + + If specified this is the extension for the configuration file. + The path to the config file is built by using the application + base directory (), + the assembly file name and the config file extension. + + + If the is set to MyExt then + possible config file names would be: MyConsoleApp.exe.MyExt or + MyClassLibrary.dll.MyExt. + + + The takes priority over the . + + + + + + Gets or sets a value indicating whether to watch the configuration file. + + + true if the configuration should be watched, false otherwise. + + + + If this flag is specified and set to true then the framework + will watch the configuration file and will reload the config each time + the file is modified. + + + The config file can only be watched if it is loaded from local disk. + In a No-Touch (Smart Client) deployment where the application is downloaded + from a web server the config file may not reside on the local disk + and therefore it may not be able to watch it. + + + Watching configuration is not supported on the SSCLI. + + + + + + Class to register for the log4net section of the configuration file + + + The log4net section of the configuration file needs to have a section + handler registered. This is the section handler used. It simply returns + the XML element that is the root of the section. + + + Example of registering the log4net section handler : + + + +
+ + + log4net configuration XML goes here + + + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Default constructor. + + + + + + Parses the configuration section. + + The configuration settings in a corresponding parent configuration section. + The configuration context when called from the ASP.NET configuration system. Otherwise, this parameter is reserved and is a null reference. + The for the log4net section. + The for the log4net section. + + + Returns the containing the configuration data, + + + + + + Assembly level attribute that specifies a plugin to attach to + the repository. + + + + Specifies the type of a plugin to create and attach to the + assembly's repository. The plugin type must implement the + interface. + + + Nicko Cadell + Gert Driesen + + + + Interface used to create plugins. + + + + Interface used to create a plugin. + + + Nicko Cadell + Gert Driesen + + + + Creates the plugin object. + + the new plugin instance + + + Create and return a new plugin instance. + + + + + + Initializes a new instance of the class + with the specified type. + + The type name of plugin to create. + + + Create the attribute with the plugin type specified. + + + Where possible use the constructor that takes a . + + + + + + Initializes a new instance of the class + with the specified type. + + The type of plugin to create. + + + Create the attribute with the plugin type specified. + + + + + + Creates the plugin object defined by this attribute. + + + + Creates the instance of the object as + specified by this attribute. + + + The plugin object. + + + + Returns a representation of the properties of this object. + + + + Overrides base class method to + return a representation of the properties of this object. + + + A representation of the properties of this object + + + + Gets or sets the type for the plugin. + + + The type for the plugin. + + + + The type for the plugin. + + + + + + Gets or sets the type name for the plugin. + + + The type name for the plugin. + + + + The type name for the plugin. + + + Where possible use the property instead. + + + + + + Assembly level attribute to configure the . + + + + This attribute may only be used at the assembly scope and can only + be used once per assembly. + + + Use this attribute to configure the + without calling one of the + methods. + + + Nicko Cadell + + + + Construct provider attribute with type specified + + the type of the provider to use + + + The provider specified must subclass the + class. + + + + + + Configures the SecurityContextProvider + + The assembly that this attribute was defined on. + The repository to configure. + + + Creates a provider instance from the specified. + Sets this as the default security context provider . + + + + + + Gets or sets the type of the provider to use. + + + the type of the provider to use. + + + + The provider specified must subclass the + class. + + + + + + Use this class to initialize the log4net environment using an Xml tree. + + + + Configures a using an Xml tree. + + + Nicko Cadell + Gert Driesen + + + + Private constructor + + + + + Automatically configures the log4net system based on the + application's configuration settings. + + + + Each application has a configuration file. This has the + same name as the application with '.config' appended. + This file is XML and calling this function prompts the + configurator to look in that file for a section called + log4net that contains the configuration data. + + + To use this method to configure log4net you must specify + the section + handler for the log4net configuration section. See the + for an example. + + + + + + + Automatically configures the using settings + stored in the application's configuration file. + + + + Each application has a configuration file. This has the + same name as the application with '.config' appended. + This file is XML and calling this function prompts the + configurator to look in that file for a section called + log4net that contains the configuration data. + + + To use this method to configure log4net you must specify + the section + handler for the log4net configuration section. See the + for an example. + + + The repository to configure. + + + + Configures log4net using a log4net element + + + + Loads the log4net configuration from the XML element + supplied as . + + + The element to parse. + + + + Configures the using the specified XML + element. + + + Loads the log4net configuration from the XML element + supplied as . + + The repository to configure. + The element to parse. + + + + Configures log4net using the specified configuration file. + + The XML file to load the configuration from. + + + The configuration file must be valid XML. It must contain + at least one element called log4net that holds + the log4net configuration data. + + + The log4net configuration file can possible be specified in the application's + configuration file (either MyAppName.exe.config for a + normal application on Web.config for an ASP.NET application). + + + The first element matching <configuration> will be read as the + configuration. If this file is also a .NET .config file then you must specify + a configuration section for the log4net element otherwise .NET will + complain. Set the type for the section handler to , for example: + + +
+ + + + + The following example configures log4net using a configuration file, of which the + location is stored in the application's configuration file : + + + using log4net.Config; + using System.IO; + using System.Configuration; + + ... + + XmlConfigurator.Configure(new FileInfo(ConfigurationSettings.AppSettings["log4net-config-file"])); + + + In the .config file, the path to the log4net can be specified like this : + + + + + + + + + + + + + Configures log4net using the specified configuration URI. + + A URI to load the XML configuration from. + + + The configuration data must be valid XML. It must contain + at least one element called log4net that holds + the log4net configuration data. + + + The must support the URI scheme specified. + + + + + + Configures log4net using the specified configuration data stream. + + A stream to load the XML configuration from. + + + The configuration data must be valid XML. It must contain + at least one element called log4net that holds + the log4net configuration data. + + + Note that this method will NOT close the stream parameter. + + + + + + Configures the using the specified configuration + file. + + The repository to configure. + The XML file to load the configuration from. + + + The configuration file must be valid XML. It must contain + at least one element called log4net that holds + the configuration data. + + + The log4net configuration file can possible be specified in the application's + configuration file (either MyAppName.exe.config for a + normal application on Web.config for an ASP.NET application). + + + The first element matching <configuration> will be read as the + configuration. If this file is also a .NET .config file then you must specify + a configuration section for the log4net element otherwise .NET will + complain. Set the type for the section handler to , for example: + + +
+ + + + + The following example configures log4net using a configuration file, of which the + location is stored in the application's configuration file : + + + using log4net.Config; + using System.IO; + using System.Configuration; + + ... + + XmlConfigurator.Configure(new FileInfo(ConfigurationSettings.AppSettings["log4net-config-file"])); + + + In the .config file, the path to the log4net can be specified like this : + + + + + + + + + + + + + Configures the using the specified configuration + URI. + + The repository to configure. + A URI to load the XML configuration from. + + + The configuration data must be valid XML. It must contain + at least one element called log4net that holds + the configuration data. + + + The must support the URI scheme specified. + + + + + + Configures the using the specified configuration + file. + + The repository to configure. + The stream to load the XML configuration from. + + + The configuration data must be valid XML. It must contain + at least one element called log4net that holds + the configuration data. + + + Note that this method will NOT close the stream parameter. + + + + + + Configures log4net using the file specified, monitors the file for changes + and reloads the configuration if a change is detected. + + The XML file to load the configuration from. + + + The configuration file must be valid XML. It must contain + at least one element called log4net that holds + the configuration data. + + + The configuration file will be monitored using a + and depends on the behavior of that class. + + + For more information on how to configure log4net using + a separate configuration file, see . + + + + + + + Configures the using the file specified, + monitors the file for changes and reloads the configuration if a change + is detected. + + The repository to configure. + The XML file to load the configuration from. + + + The configuration file must be valid XML. It must contain + at least one element called log4net that holds + the configuration data. + + + The configuration file will be monitored using a + and depends on the behavior of that class. + + + For more information on how to configure log4net using + a separate configuration file, see . + + + + + + + Configures the specified repository using a log4net element. + + The hierarchy to configure. + The element to parse. + + + Loads the log4net configuration from the XML element + supplied as . + + + This method is ultimately called by one of the Configure methods + to load the configuration from an . + + + + + + Class used to watch config files. + + + + Uses the to monitor + changes to a specified file. Because multiple change notifications + may be raised when the file is modified, a timer is used to + compress the notifications into a single event. The timer + waits for time before delivering + the event notification. If any further + change notifications arrive while the timer is waiting it + is reset and waits again for to + elapse. + + + + + + The default amount of time to wait after receiving notification + before reloading the config file. + + + + + Watch a specified config file used to configure a repository + + The repository to configure. + The configuration file to watch. + + + Watch a specified config file used to configure a repository + + + + + + Holds the FileInfo used to configure the XmlConfigurator + + + + + Holds the repository being configured. + + + + + The timer used to compress the notification events. + + + + + Initializes a new instance of the class. + + The repository to configure. + The configuration file to watch. + + + Initializes a new instance of the class. + + + + + + Event handler used by . + + The firing the event. + The argument indicates the file that caused the event to be fired. + + + This handler reloads the configuration from the file when the event is fired. + + + + + + Event handler used by . + + The firing the event. + The argument indicates the file that caused the event to be fired. + + + This handler reloads the configuration from the file when the event is fired. + + + + + + Called by the timer when the configuration has been updated. + + null + + + + The implementation of the interface suitable + for use with the compact framework + + + + This implementation is a simple + mapping between repository name and + object. + + + The .NET Compact Framework 1.0 does not support retrieving assembly + level attributes therefore unlike the DefaultRepositorySelector + this selector does not examine the calling assembly for attributes. + + + Nicko Cadell + + + + Interface used by the to select the . + + + + The uses a + to specify the policy for selecting the correct + to return to the caller. + + + Nicko Cadell + Gert Driesen + + + + Gets the for the specified assembly. + + The assembly to use to lookup to the + The for the assembly. + + + Gets the for the specified assembly. + + + How the association between and + is made is not defined. The implementation may choose any method for + this association. The results of this method must be repeatable, i.e. + when called again with the same arguments the result must be the + save value. + + + + + + Gets the named . + + The name to use to lookup to the . + The named + + Lookup a named . This is the repository created by + calling . + + + + + Creates a new repository for the assembly specified. + + The assembly to use to create the domain to associate with the . + The type of repository to create, must implement . + The repository created. + + + The created will be associated with the domain + specified such that a call to with the + same assembly specified will return the same repository instance. + + + How the association between and + is made is not defined. The implementation may choose any method for + this association. + + + + + + Creates a new repository with the name specified. + + The name to associate with the . + The type of repository to create, must implement . + The repository created. + + + The created will be associated with the name + specified such that a call to with the + same name will return the same repository instance. + + + + + + Test if a named repository exists + + the named repository to check + true if the repository exists + + + Test if a named repository exists. Use + to create a new repository and to retrieve + a repository. + + + + + + Gets an array of all currently defined repositories. + + + An array of the instances created by + this . + + + Gets an array of all of the repositories created by this selector. + + + + + + Event to notify that a logger repository has been created. + + + Event to notify that a logger repository has been created. + + + + Event raised when a new repository is created. + The event source will be this selector. The event args will + be a which + holds the newly created . + + + + + + Create a new repository selector + + the type of the repositories to create, must implement + + + Create an new compact repository selector. + The default type for repositories must be specified, + an appropriate value would be . + + + throw if is null + throw if does not implement + + + + Get the for the specified assembly + + not used + The default + + + The argument is not used. This selector does not create a + separate repository for each assembly. + + + As a named repository is not specified the default repository is + returned. The default repository is named log4net-default-repository. + + + + + + Get the named + + the name of the repository to lookup + The named + + + Get the named . The default + repository is log4net-default-repository. Other repositories + must be created using the . + If the named repository does not exist an exception is thrown. + + + throw if is null + throw if the does not exist + + + + Create a new repository for the assembly specified + + not used + the type of repository to create, must implement + the repository created + + + The argument is not used. This selector does not create a + separate repository for each assembly. + + + If the is null then the + default repository type specified to the constructor is used. + + + As a named repository is not specified the default repository is + returned. The default repository is named log4net-default-repository. + + + + + + Create a new repository for the repository specified + + the repository to associate with the + the type of repository to create, must implement . + If this param is null then the default repository type is used. + the repository created + + + The created will be associated with the repository + specified such that a call to with the + same repository specified will return the same repository instance. + + + If the named repository already exists an exception will be thrown. + + + If is null then the default + repository type specified to the constructor is used. + + + throw if is null + throw if the already exists + + + + Test if a named repository exists + + the named repository to check + true if the repository exists + + + Test if a named repository exists. Use + to create a new repository and to retrieve + a repository. + + + + + + Gets a list of objects + + an array of all known objects + + + Gets an array of all of the repositories created by this selector. + + + + + + Notify the registered listeners that the repository has been created + + The repository that has been created + + + Raises the LoggerRepositoryCreatedEvent + event. + + + + + + Event to notify that a logger repository has been created. + + + Event to notify that a logger repository has been created. + + + + Event raised when a new repository is created. + The event source will be this selector. The event args will + be a which + holds the newly created . + + + + + + The default implementation of the interface. + + + + Uses attributes defined on the calling assembly to determine how to + configure the hierarchy for the repository. + + + Nicko Cadell + Gert Driesen + + + + Creates a new repository selector. + + The type of the repositories to create, must implement + + + Create an new repository selector. + The default type for repositories must be specified, + an appropriate value would be . + + + is . + does not implement . + + + + Gets the for the specified assembly. + + The assembly use to lookup the . + + + The type of the created and the repository + to create can be overridden by specifying the + attribute on the . + + + The default values are to use the + implementation of the interface and to use the + as the name of the repository. + + + The created will be automatically configured using + any attributes defined on + the . + + + The for the assembly + is . + + + + Gets the for the specified repository. + + The repository to use to lookup the . + The for the specified repository. + + + Returns the named repository. If is null + a is thrown. If the repository + does not exist a is thrown. + + + Use to create a repository. + + + is . + does not exist. + + + + Create a new repository for the assembly specified + + the assembly to use to create the repository to associate with the . + The type of repository to create, must implement . + The repository created. + + + The created will be associated with the repository + specified such that a call to with the + same assembly specified will return the same repository instance. + + + The type of the created and + the repository to create can be overridden by specifying the + attribute on the + . The default values are to use the + implementation of the + interface and to use the + as the name of the repository. + + + The created will be automatically + configured using any + attributes defined on the . + + + If a repository for the already exists + that repository will be returned. An error will not be raised and that + repository may be of a different type to that specified in . + Also the attribute on the + assembly may be used to override the repository type specified in + . + + + is . + + + + Creates a new repository for the assembly specified. + + the assembly to use to create the repository to associate with the . + The type of repository to create, must implement . + The name to assign to the created repository + Set to true to read and apply the assembly attributes + The repository created. + + + The created will be associated with the repository + specified such that a call to with the + same assembly specified will return the same repository instance. + + + The type of the created and + the repository to create can be overridden by specifying the + attribute on the + . The default values are to use the + implementation of the + interface and to use the + as the name of the repository. + + + The created will be automatically + configured using any + attributes defined on the . + + + If a repository for the already exists + that repository will be returned. An error will not be raised and that + repository may be of a different type to that specified in . + Also the attribute on the + assembly may be used to override the repository type specified in + . + + + is . + + + + Creates a new repository for the specified repository. + + The repository to associate with the . + The type of repository to create, must implement . + If this param is then the default repository type is used. + The new repository. + + + The created will be associated with the repository + specified such that a call to with the + same repository specified will return the same repository instance. + + + is . + already exists. + + + + Test if a named repository exists + + the named repository to check + true if the repository exists + + + Test if a named repository exists. Use + to create a new repository and to retrieve + a repository. + + + + + + Gets a list of objects + + an array of all known objects + + + Gets an array of all of the repositories created by this selector. + + + + + + Aliases a repository to an existing repository. + + The repository to alias. + The repository that the repository is aliased to. + + + The repository specified will be aliased to the repository when created. + The repository must not already exist. + + + When the repository is created it must utilize the same repository type as + the repository it is aliased to, otherwise the aliasing will fail. + + + + is . + -or- + is . + + + + + Notifies the registered listeners that the repository has been created. + + The repository that has been created. + + + Raises the event. + + + + + + Gets the repository name and repository type for the specified assembly. + + The assembly that has a . + in/out param to hold the repository name to use for the assembly, caller should set this to the default value before calling. + in/out param to hold the type of the repository to create for the assembly, caller should set this to the default value before calling. + is . + + + + Configures the repository using information from the assembly. + + The assembly containing + attributes which define the configuration for the repository. + The repository to configure. + + is . + -or- + is . + + + + + Loads the attribute defined plugins on the assembly. + + The assembly that contains the attributes. + The repository to add the plugins to. + + is . + -or- + is . + + + + + Loads the attribute defined aliases on the assembly. + + The assembly that contains the attributes. + The repository to alias to. + + is . + -or- + is . + + + + + Event to notify that a logger repository has been created. + + + Event to notify that a logger repository has been created. + + + + Event raised when a new repository is created. + The event source will be this selector. The event args will + be a which + holds the newly created . + + + + + + Defined error codes that can be passed to the method. + + + + Values passed to the method. + + + Nicko Cadell + + + + A general error + + + + + Error while writing output + + + + + Failed to flush file + + + + + Failed to close file + + + + + Unable to open output file + + + + + No layout specified + + + + + Failed to parse address + + + + + Appenders may delegate their error handling to an . + + + + Error handling is a particularly tedious to get right because by + definition errors are hard to predict and to reproduce. + + + Nicko Cadell + Gert Driesen + + + + Handles the error and information about the error condition is passed as + a parameter. + + The message associated with the error. + The that was thrown when the error occurred. + The error code associated with the error. + + + Handles the error and information about the error condition is passed as + a parameter. + + + + + + Prints the error message passed as a parameter. + + The message associated with the error. + The that was thrown when the error occurred. + + + See . + + + + + + Prints the error message passed as a parameter. + + The message associated with the error. + + + See . + + + + + + Interface for objects that require fixing. + + + + Interface that indicates that the object requires fixing before it + can be taken outside the context of the appender's + method. + + + When objects that implement this interface are stored + in the context properties maps + and + are fixed + (see ) the + method will be called. + + + Nicko Cadell + + + + Get a portable version of this object + + the portable instance of this object + + + Get a portable instance object that represents the current + state of this object. The portable object can be stored + and logged from any thread with identical results. + + + + + + Interface that all loggers implement + + + + This interface supports logging events and testing if a level + is enabled for logging. + + + These methods will not throw exceptions. Note to implementor, ensure + that the implementation of these methods cannot allow an exception + to be thrown to the caller. + + + Nicko Cadell + Gert Driesen + + + + This generic form is intended to be used by wrappers. + + The declaring type of the method that is + the stack boundary into the logging system for this call. + The level of the message to be logged. + The message object to log. + the exception to log, including its stack trace. Pass null to not log an exception. + + + Generates a logging event for the specified using + the and . + + + + + + This is the most generic printing method that is intended to be used + by wrappers. + + The event being logged. + + + Logs the specified logging event through this logger. + + + + + + Checks if this logger is enabled for a given passed as parameter. + + The level to check. + + true if this logger is enabled for level, otherwise false. + + + + Test if this logger is going to log events of the specified . + + + + + + Gets the name of the logger. + + + The name of the logger. + + + + The name of this logger + + + + + + Gets the where this + Logger instance is attached to. + + + The that this logger belongs to. + + + + Gets the where this + Logger instance is attached to. + + + + + + Base interface for all wrappers + + + + Base interface for all wrappers. + + + All wrappers must implement this interface. + + + Nicko Cadell + + + + Get the implementation behind this wrapper object. + + + The object that in implementing this object. + + + + The object that in implementing this + object. The Logger object may not + be the same object as this object because of logger decorators. + This gets the actual underlying objects that is used to process + the log events. + + + + + + Delegate used to handle logger repository creation event notifications + + The which created the repository. + The event args + that holds the instance that has been created. + + + Delegate used to handle logger repository creation event notifications. + + + + + + Provides data for the event. + + + + A + event is raised every time a is created. + + + + + + The created + + + + + Construct instance using specified + + the that has been created + + + Construct instance using specified + + + + + + The that has been created + + + The that has been created + + + + The that has been created + + + + + + Test if an triggers an action + + + + Implementations of this interface allow certain appenders to decide + when to perform an appender specific action. + + + The action or behavior triggered is defined by the implementation. + + + Nicko Cadell + + + + Test if this event triggers the action + + The event to check + true if this event triggers the action, otherwise false + + + Return true if this event triggers the action + + + + + + Defines the default set of levels recognized by the system. + + + + Each has an associated . + + + Levels have a numeric that defines the relative + ordering between levels. Two Levels with the same + are deemed to be equivalent. + + + The levels that are recognized by log4net are set for each + and each repository can have different levels defined. The levels are stored + in the on the repository. Levels are + looked up by name from the . + + + When logging at level INFO the actual level used is not but + the value of LoggerRepository.LevelMap["INFO"]. The default value for this is + , but this can be changed by reconfiguring the level map. + + + Each level has a in addition to its . The + is the string that is written into the output log. By default + the display name is the same as the level name, but this can be used to alias levels + or to localize the log output. + + + Some of the predefined levels recognized by the system are: + + + + . + + + . + + + . + + + . + + + . + + + . + + + . + + + + Nicko Cadell + Gert Driesen + + + + Constructor + + Integer value for this level, higher values represent more severe levels. + The string name of this level. + The display name for this level. This may be localized or otherwise different from the name + + + Initializes a new instance of the class with + the specified level name and value. + + + + + + Constructor + + Integer value for this level, higher values represent more severe levels. + The string name of this level. + + + Initializes a new instance of the class with + the specified level name and value. + + + + + + Returns the representation of the current + . + + + A representation of the current . + + + + Returns the level . + + + + + + Compares levels. + + The object to compare against. + true if the objects are equal. + + + Compares the levels of instances, and + defers to base class if the target object is not a + instance. + + + + + + Returns a hash code + + A hash code for the current . + + + Returns a hash code suitable for use in hashing algorithms and data + structures like a hash table. + + + Returns the hash code of the level . + + + + + + Compares this instance to a specified object and returns an + indication of their relative values. + + A instance or to compare with this instance. + + A 32-bit signed integer that indicates the relative order of the + values compared. The return value has these meanings: + + + Value + Meaning + + + Less than zero + This instance is less than . + + + Zero + This instance is equal to . + + + Greater than zero + + This instance is greater than . + -or- + is . + + + + + + + must be an instance of + or ; otherwise, an exception is thrown. + + + is not a . + + + + Returns a value indicating whether a specified + is greater than another specified . + + A + A + + true if is greater than + ; otherwise, false. + + + + Compares two levels. + + + + + + Returns a value indicating whether a specified + is less than another specified . + + A + A + + true if is less than + ; otherwise, false. + + + + Compares two levels. + + + + + + Returns a value indicating whether a specified + is greater than or equal to another specified . + + A + A + + true if is greater than or equal to + ; otherwise, false. + + + + Compares two levels. + + + + + + Returns a value indicating whether a specified + is less than or equal to another specified . + + A + A + + true if is less than or equal to + ; otherwise, false. + + + + Compares two levels. + + + + + + Returns a value indicating whether two specified + objects have the same value. + + A or . + A or . + + true if the value of is the same as the + value of ; otherwise, false. + + + + Compares two levels. + + + + + + Returns a value indicating whether two specified + objects have different values. + + A or . + A or . + + true if the value of is different from + the value of ; otherwise, false. + + + + Compares two levels. + + + + + + Compares two specified instances. + + The first to compare. + The second to compare. + + A 32-bit signed integer that indicates the relative order of the + two values compared. The return value has these meanings: + + + Value + Meaning + + + Less than zero + is less than . + + + Zero + is equal to . + + + Greater than zero + is greater than . + + + + + + Compares two levels. + + + + + + The level designates a higher level than all the rest. + + + + + The level designates very severe error events. + System unusable, emergencies. + + + + + The level designates very severe error events + that will presumably lead the application to abort. + + + + + The level designates very severe error events. + Take immediate action, alerts. + + + + + The level designates very severe error events. + Critical condition, critical. + + + + + The level designates very severe error events. + + + + + The level designates error events that might + still allow the application to continue running. + + + + + The level designates potentially harmful + situations. + + + + + The level designates informational messages + that highlight the progress of the application at the highest level. + + + + + The level designates informational messages that + highlight the progress of the application at coarse-grained level. + + + + + The level designates fine-grained informational + events that are most useful to debug an application. + + + + + The level designates fine-grained informational + events that are most useful to debug an application. + + + + + The level designates fine-grained informational + events that are most useful to debug an application. + + + + + The level designates fine-grained informational + events that are most useful to debug an application. + + + + + The level designates fine-grained informational + events that are most useful to debug an application. + + + + + The level designates fine-grained informational + events that are most useful to debug an application. + + + + + The level designates the lowest level possible. + + + + + Gets the name of this level. + + + The name of this level. + + + + Gets the name of this level. + + + + + + Gets the value of this level. + + + The value of this level. + + + + Gets the value of this level. + + + + + + Gets the display name of this level. + + + The display name of this level. + + + + Gets the display name of this level. + + + + + + A strongly-typed collection of objects. + + Nicko Cadell + + + + Creates a read-only wrapper for a LevelCollection instance. + + list to create a readonly wrapper arround + + A LevelCollection wrapper that is read-only. + + + + + Initializes a new instance of the LevelCollection class + that is empty and has the default initial capacity. + + + + + Initializes a new instance of the LevelCollection class + that has the specified initial capacity. + + + The number of elements that the new LevelCollection is initially capable of storing. + + + + + Initializes a new instance of the LevelCollection class + that contains elements copied from the specified LevelCollection. + + The LevelCollection whose elements are copied to the new collection. + + + + Initializes a new instance of the LevelCollection class + that contains elements copied from the specified array. + + The array whose elements are copied to the new list. + + + + Initializes a new instance of the LevelCollection class + that contains elements copied from the specified collection. + + The collection whose elements are copied to the new list. + + + + Allow subclasses to avoid our default constructors + + + + + + Copies the entire LevelCollection to a one-dimensional + array. + + The one-dimensional array to copy to. + + + + Copies the entire LevelCollection to a one-dimensional + array, starting at the specified index of the target array. + + The one-dimensional array to copy to. + The zero-based index in at which copying begins. + + + + Adds a to the end of the LevelCollection. + + The to be added to the end of the LevelCollection. + The index at which the value has been added. + + + + Removes all elements from the LevelCollection. + + + + + Creates a shallow copy of the . + + A new with a shallow copy of the collection data. + + + + Determines whether a given is in the LevelCollection. + + The to check for. + true if is found in the LevelCollection; otherwise, false. + + + + Returns the zero-based index of the first occurrence of a + in the LevelCollection. + + The to locate in the LevelCollection. + + The zero-based index of the first occurrence of + in the entire LevelCollection, if found; otherwise, -1. + + + + + Inserts an element into the LevelCollection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + is less than zero + -or- + is equal to or greater than . + + + + + Removes the first occurrence of a specific from the LevelCollection. + + The to remove from the LevelCollection. + + The specified was not found in the LevelCollection. + + + + + Removes the element at the specified index of the LevelCollection. + + The zero-based index of the element to remove. + + is less than zero + -or- + is equal to or greater than . + + + + + Returns an enumerator that can iterate through the LevelCollection. + + An for the entire LevelCollection. + + + + Adds the elements of another LevelCollection to the current LevelCollection. + + The LevelCollection whose elements should be added to the end of the current LevelCollection. + The new of the LevelCollection. + + + + Adds the elements of a array to the current LevelCollection. + + The array whose elements should be added to the end of the LevelCollection. + The new of the LevelCollection. + + + + Adds the elements of a collection to the current LevelCollection. + + The collection whose elements should be added to the end of the LevelCollection. + The new of the LevelCollection. + + + + Sets the capacity to the actual number of elements. + + + + + is less than zero + -or- + is equal to or greater than . + + + + + is less than zero + -or- + is equal to or greater than . + + + + + Gets the number of elements actually contained in the LevelCollection. + + + + + Gets a value indicating whether access to the collection is synchronized (thread-safe). + + true if access to the ICollection is synchronized (thread-safe); otherwise, false. + + + + Gets an object that can be used to synchronize access to the collection. + + + + + Gets or sets the at the specified index. + + The zero-based index of the element to get or set. + + is less than zero + -or- + is equal to or greater than . + + + + + Gets a value indicating whether the collection has a fixed size. + + true if the collection has a fixed size; otherwise, false. The default is false + + + + Gets a value indicating whether the IList is read-only. + + true if the collection is read-only; otherwise, false. The default is false + + + + Gets or sets the number of elements the LevelCollection can contain. + + + + + Supports type-safe iteration over a . + + + + + Advances the enumerator to the next element in the collection. + + + true if the enumerator was successfully advanced to the next element; + false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, before the first element in the collection. + + + + + Gets the current element in the collection. + + + + + Type visible only to our subclasses + Used to access protected constructor + + + + + A value + + + + + Supports simple iteration over a . + + + + + Initializes a new instance of the Enumerator class. + + + + + + Advances the enumerator to the next element in the collection. + + + true if the enumerator was successfully advanced to the next element; + false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, before the first element in the collection. + + + + + Gets the current element in the collection. + + + + + An evaluator that triggers at a threshold level + + + + This evaluator will trigger if the level of the event + passed to + is equal to or greater than the + level. + + + Nicko Cadell + + + + The threshold for triggering + + + + + Create a new evaluator using the threshold. + + + + Create a new evaluator using the threshold. + + + This evaluator will trigger if the level of the event + passed to + is equal to or greater than the + level. + + + + + + Create a new evaluator using the specified threshold. + + the threshold to trigger at + + + Create a new evaluator using the specified threshold. + + + This evaluator will trigger if the level of the event + passed to + is equal to or greater than the + level. + + + + + + Is this the triggering event? + + The event to check + This method returns true, if the event level + is equal or higher than the . + Otherwise it returns false + + + This evaluator will trigger if the level of the event + passed to + is equal to or greater than the + level. + + + + + + the threshold to trigger at + + + The that will cause this evaluator to trigger + + + + This evaluator will trigger if the level of the event + passed to + is equal to or greater than the + level. + + + + + + Mapping between string name and Level object + + + + Mapping between string name and object. + This mapping is held separately for each . + The level name is case insensitive. + + + Nicko Cadell + + + + Mapping from level name to Level object. The + level name is case insensitive + + + + + Construct the level map + + + + Construct the level map. + + + + + + Clear the internal maps of all levels + + + + Clear the internal maps of all levels + + + + + + Create a new Level and add it to the map + + the string to display for the Level + the level value to give to the Level + + + Create a new Level and add it to the map + + + + + + + Create a new Level and add it to the map + + the string to display for the Level + the level value to give to the Level + the display name to give to the Level + + + Create a new Level and add it to the map + + + + + + Add a Level to the map + + the Level to add + + + Add a Level to the map + + + + + + Lookup a named level from the map + + the name of the level to lookup is taken from this level. + If the level is not set on the map then this level is added + the level in the map with the name specified + + + Lookup a named level from the map. The name of the level to lookup is taken + from the property of the + argument. + + + If no level with the specified name is found then the + argument is added to the level map + and returned. + + + + + + Lookup a by name + + The name of the Level to lookup + a Level from the map with the name specified + + + Returns the from the + map with the name specified. If the no level is + found then null is returned. + + + + + + Return all possible levels as a list of Level objects. + + all possible levels as a list of Level objects + + + Return all possible levels as a list of Level objects. + + + + + + The internal representation of caller location information. + + + + This class uses the System.Diagnostics.StackTrace class to generate + a call stack. The caller's information is then extracted from this stack. + + + The System.Diagnostics.StackTrace class is not supported on the + .NET Compact Framework 1.0 therefore caller location information is not + available on that framework. + + + The System.Diagnostics.StackTrace class has this to say about Release builds: + + + "StackTrace information will be most informative with Debug build configurations. + By default, Debug builds include debug symbols, while Release builds do not. The + debug symbols contain most of the file, method name, line number, and column + information used in constructing StackFrame and StackTrace objects. StackTrace + might not report as many method calls as expected, due to code transformations + that occur during optimization." + + + This means that in a Release build the caller information may be incomplete or may + not exist at all! Therefore caller location information cannot be relied upon in a Release build. + + + Nicko Cadell + Gert Driesen + + + + When location information is not available the constant + NA is returned. Current value of this string + constant is ?. + + + + + Constructor + + The declaring type of the method that is + the stack boundary into the logging system for this call. + + + Initializes a new instance of the + class based on the current thread. + + + + + + Constructor + + The fully qualified class name. + The method name. + The file name. + The line number of the method within the file. + + + Initializes a new instance of the + class with the specified data. + + + + + + Gets the fully qualified class name of the caller making the logging + request. + + + The fully qualified class name of the caller making the logging + request. + + + + Gets the fully qualified class name of the caller making the logging + request. + + + + + + Gets the file name of the caller. + + + The file name of the caller. + + + + Gets the file name of the caller. + + + + + + Gets the line number of the caller. + + + The line number of the caller. + + + + Gets the line number of the caller. + + + + + + Gets the method name of the caller. + + + The method name of the caller. + + + + Gets the method name of the caller. + + + + + + Gets all available caller information + + + All available caller information, in the format + fully.qualified.classname.of.caller.methodName(Filename:line) + + + + Gets all available caller information, in the format + fully.qualified.classname.of.caller.methodName(Filename:line) + + + + + + Static manager that controls the creation of repositories + + + + Static manager that controls the creation of repositories + + + This class is used by the wrapper managers (e.g. ) + to provide access to the objects. + + + This manager also holds the that is used to + lookup and create repositories. The selector can be set either programmatically using + the property, or by setting the log4net.RepositorySelector + AppSetting in the applications config file to the fully qualified type name of the + selector to use. + + + Nicko Cadell + Gert Driesen + + + + Private constructor to prevent instances. Only static methods should be used. + + + + Private constructor to prevent instances. Only static methods should be used. + + + + + + Hook the shutdown event + + + + On the full .NET runtime, the static constructor hooks up the + AppDomain.ProcessExit and AppDomain.DomainUnload> events. + These are used to shutdown the log4net system as the application exits. + + + + + + Register for ProcessExit and DomainUnload events on the AppDomain + + + + This needs to be in a separate method because the events make + a LinkDemand for the ControlAppDomain SecurityPermission. Because + this is a LinkDemand it is demanded at JIT time. Therefore we cannot + catch the exception in the method itself, we have to catch it in the + caller. + + + + + + Return the default instance. + + the repository to lookup in + Return the default instance + + + Gets the for the repository specified + by the argument. + + + + + + Returns the default instance. + + The assembly to use to lookup the repository. + The default instance. + + + + Return the default instance. + + the repository to lookup in + Return the default instance + + + Gets the for the repository specified + by the argument. + + + + + + Returns the default instance. + + The assembly to use to lookup the repository. + The default instance. + + + Returns the default instance. + + + + + + Returns the named logger if it exists. + + The repository to lookup in. + The fully qualified logger name to look for. + + The logger found, or null if the named logger does not exist in the + specified repository. + + + + If the named logger exists (in the specified repository) then it + returns a reference to the logger, otherwise it returns + null. + + + + + + Returns the named logger if it exists. + + The assembly to use to lookup the repository. + The fully qualified logger name to look for. + + The logger found, or null if the named logger does not exist in the + specified assembly's repository. + + + + If the named logger exists (in the specified assembly's repository) then it + returns a reference to the logger, otherwise it returns + null. + + + + + + Returns all the currently defined loggers in the specified repository. + + The repository to lookup in. + All the defined loggers. + + + The root logger is not included in the returned array. + + + + + + Returns all the currently defined loggers in the specified assembly's repository. + + The assembly to use to lookup the repository. + All the defined loggers. + + + The root logger is not included in the returned array. + + + + + + Retrieves or creates a named logger. + + The repository to lookup in. + The name of the logger to retrieve. + The logger with the name specified. + + + Retrieves a logger named as the + parameter. If the named logger already exists, then the + existing instance will be returned. Otherwise, a new instance is + created. + + + By default, loggers do not have a set level but inherit + it from the hierarchy. This is one of the central features of + log4net. + + + + + + Retrieves or creates a named logger. + + The assembly to use to lookup the repository. + The name of the logger to retrieve. + The logger with the name specified. + + + Retrieves a logger named as the + parameter. If the named logger already exists, then the + existing instance will be returned. Otherwise, a new instance is + created. + + + By default, loggers do not have a set level but inherit + it from the hierarchy. This is one of the central features of + log4net. + + + + + + Shorthand for . + + The repository to lookup in. + The of which the fullname will be used as the name of the logger to retrieve. + The logger with the name specified. + + + Gets the logger for the fully qualified name of the type specified. + + + + + + Shorthand for . + + the assembly to use to lookup the repository + The of which the fullname will be used as the name of the logger to retrieve. + The logger with the name specified. + + + Gets the logger for the fully qualified name of the type specified. + + + + + + Shuts down the log4net system. + + + + Calling this method will safely close and remove all + appenders in all the loggers including root contained in all the + default repositories. + + + Some appenders need to be closed before the application exists. + Otherwise, pending logging events might be lost. + + + The shutdown method is careful to close nested + appenders before closing regular appenders. This is allows + configurations where a regular appender is attached to a logger + and again to a nested appender. + + + + + + Shuts down the repository for the repository specified. + + The repository to shutdown. + + + Calling this method will safely close and remove all + appenders in all the loggers including root contained in the + repository for the specified. + + + Some appenders need to be closed before the application exists. + Otherwise, pending logging events might be lost. + + + The shutdown method is careful to close nested + appenders before closing regular appenders. This is allows + configurations where a regular appender is attached to a logger + and again to a nested appender. + + + + + + Shuts down the repository for the repository specified. + + The assembly to use to lookup the repository. + + + Calling this method will safely close and remove all + appenders in all the loggers including root contained in the + repository for the repository. The repository is looked up using + the specified. + + + Some appenders need to be closed before the application exists. + Otherwise, pending logging events might be lost. + + + The shutdown method is careful to close nested + appenders before closing regular appenders. This is allows + configurations where a regular appender is attached to a logger + and again to a nested appender. + + + + + + Resets all values contained in this repository instance to their defaults. + + The repository to reset. + + + Resets all values contained in the repository instance to their + defaults. This removes all appenders from all loggers, sets + the level of all non-root loggers to null, + sets their additivity flag to true and sets the level + of the root logger to . Moreover, + message disabling is set its default "off" value. + + + + + + Resets all values contained in this repository instance to their defaults. + + The assembly to use to lookup the repository to reset. + + + Resets all values contained in the repository instance to their + defaults. This removes all appenders from all loggers, sets + the level of all non-root loggers to null, + sets their additivity flag to true and sets the level + of the root logger to . Moreover, + message disabling is set its default "off" value. + + + + + + Creates a repository with the specified name. + + The name of the repository, this must be unique amongst repositories. + The created for the repository. + + + CreateDomain is obsolete. Use CreateRepository instead of CreateDomain. + + + Creates the default type of which is a + object. + + + The name must be unique. Repositories cannot be redefined. + An will be thrown if the repository already exists. + + + The specified repository already exists. + + + + Creates a repository with the specified name. + + The name of the repository, this must be unique amongst repositories. + The created for the repository. + + + Creates the default type of which is a + object. + + + The name must be unique. Repositories cannot be redefined. + An will be thrown if the repository already exists. + + + The specified repository already exists. + + + + Creates a repository with the specified name and repository type. + + The name of the repository, this must be unique to the repository. + A that implements + and has a no arg constructor. An instance of this type will be created to act + as the for the repository specified. + The created for the repository. + + + CreateDomain is obsolete. Use CreateRepository instead of CreateDomain. + + + The name must be unique. Repositories cannot be redefined. + An Exception will be thrown if the repository already exists. + + + The specified repository already exists. + + + + Creates a repository with the specified name and repository type. + + The name of the repository, this must be unique to the repository. + A that implements + and has a no arg constructor. An instance of this type will be created to act + as the for the repository specified. + The created for the repository. + + + The name must be unique. Repositories cannot be redefined. + An Exception will be thrown if the repository already exists. + + + The specified repository already exists. + + + + Creates a repository for the specified assembly and repository type. + + The assembly to use to get the name of the repository. + A that implements + and has a no arg constructor. An instance of this type will be created to act + as the for the repository specified. + The created for the repository. + + + CreateDomain is obsolete. Use CreateRepository instead of CreateDomain. + + + The created will be associated with the repository + specified such that a call to with the + same assembly specified will return the same repository instance. + + + + + + Creates a repository for the specified assembly and repository type. + + The assembly to use to get the name of the repository. + A that implements + and has a no arg constructor. An instance of this type will be created to act + as the for the repository specified. + The created for the repository. + + + The created will be associated with the repository + specified such that a call to with the + same assembly specified will return the same repository instance. + + + + + + Gets an array of all currently defined repositories. + + An array of all the known objects. + + + Gets an array of all currently defined repositories. + + + + + + Internal method to get pertinent version info. + + A string of version info. + + + + Called when the event fires + + the that is exiting + null + + + Called when the event fires. + + + When the event is triggered the log4net system is . + + + + + + Called when the event fires + + the that is exiting + null + + + Called when the event fires. + + + When the event is triggered the log4net system is . + + + + + + Initialize the default repository selector + + + + + Gets or sets the repository selector used by the . + + + The repository selector used by the . + + + + The repository selector () is used by + the to create and select repositories + (). + + + The caller to supplies either a string name + or an assembly (if not supplied the assembly is inferred using + ). + + + This context is used by the selector to lookup a specific repository. + + + For the full .NET Framework, the default repository is DefaultRepositorySelector; + for the .NET Compact Framework CompactRepositorySelector is the default + repository. + + + + + + Implementation of the interface. + + + + This class should be used as the base for all wrapper implementations. + + + Nicko Cadell + Gert Driesen + + + + Constructs a new wrapper for the specified logger. + + The logger to wrap. + + + Constructs a new wrapper for the specified logger. + + + + + + The logger that this object is wrapping + + + + + Gets the implementation behind this wrapper object. + + + The object that this object is implementing. + + + + The Logger object may not be the same object as this object + because of logger decorators. + + + This gets the actual underlying objects that is used to process + the log events. + + + + + + Portable data structure used by + + + + Portable data structure used by + + + Nicko Cadell + + + + The logger name. + + + + The logger name. + + + + + + Level of logging event. + + + + Level of logging event. Level cannot be Serializable + because it is a flyweight. Due to its special serialization it + cannot be declared final either. + + + + + + The application supplied message. + + + + The application supplied message of logging event. + + + + + + The name of thread + + + + The name of thread in which this logging event was generated + + + + + + The time the event was logged + + + + The TimeStamp is stored in the local time zone for this computer. + + + + + + Location information for the caller. + + + + Location information for the caller. + + + + + + String representation of the user + + + + String representation of the user's windows name, + like DOMAIN\username + + + + + + String representation of the identity. + + + + String representation of the current thread's principal identity. + + + + + + The string representation of the exception + + + + The string representation of the exception + + + + + + String representation of the AppDomain. + + + + String representation of the AppDomain. + + + + + + Additional event specific properties + + + + A logger or an appender may attach additional + properties to specific events. These properties + have a string key and an object value. + + + + + + Flags passed to the property + + + + Flags passed to the property + + + Nicko Cadell + + + + Fix the MDC + + + + + Fix the NDC + + + + + Fix the rendered message + + + + + Fix the thread name + + + + + Fix the callers location information + + + CAUTION: Very slow to generate + + + + + Fix the callers windows user name + + + CAUTION: Slow to generate + + + + + Fix the domain friendly name + + + + + Fix the callers principal name + + + CAUTION: May be slow to generate + + + + + Fix the exception text + + + + + Fix the event properties + + + + + No fields fixed + + + + + All fields fixed + + + + + Partial fields fixed + + + + This set of partial fields gives good performance. The following fields are fixed: + + + + + + + + + + + + + The internal representation of logging events. + + + + When an affirmative decision is made to log then a + instance is created. This instance + is passed around to the different log4net components. + + + This class is of concern to those wishing to extend log4net. + + + Some of the values in instances of + are considered volatile, that is the values are correct at the + time the event is delivered to appenders, but will not be consistent + at any time afterwards. If an event is to be stored and then processed + at a later time these volatile values must be fixed by calling + . There is a performance penalty + for incurred by calling but it + is essential to maintaining data consistency. + + + Nicko Cadell + Gert Driesen + Douglas de la Torre + Daniel Cazzulino + + + + The key into the Properties map for the host name value. + + + + + The key into the Properties map for the thread identity value. + + + + + The key into the Properties map for the user name value. + + + + + Initializes a new instance of the class + from the supplied parameters. + + The declaring type of the method that is + the stack boundary into the logging system for this call. + The repository this event is logged in. + The name of the logger of this event. + The level of this event. + The message of this event. + The exception for this event. + + + Except , and , + all fields of LoggingEvent are filled when actually needed. Call + to cache all data locally + to prevent inconsistencies. + + This method is called by the log4net framework + to create a logging event. + + + + + + Initializes a new instance of the class + using specific data. + + The declaring type of the method that is + the stack boundary into the logging system for this call. + The repository this event is logged in. + Data used to initialize the logging event. + The fields in the struct that have already been fixed. + + + This constructor is provided to allow a + to be created independently of the log4net framework. This can + be useful if you require a custom serialization scheme. + + + Use the method to obtain an + instance of the class. + + + The parameter should be used to specify which fields in the + struct have been preset. Fields not specified in the + will be captured from the environment if requested or fixed. + + + + + + Initializes a new instance of the class + using specific data. + + The declaring type of the method that is + the stack boundary into the logging system for this call. + The repository this event is logged in. + Data used to initialize the logging event. + + + This constructor is provided to allow a + to be created independently of the log4net framework. This can + be useful if you require a custom serialization scheme. + + + Use the method to obtain an + instance of the class. + + + This constructor sets this objects flags to , + this assumes that all the data relating to this event is passed in via the + parameter and no other data should be captured from the environment. + + + + + + Initializes a new instance of the class + using specific data. + + Data used to initialize the logging event. + + + This constructor is provided to allow a + to be created independently of the log4net framework. This can + be useful if you require a custom serialization scheme. + + + Use the method to obtain an + instance of the class. + + + This constructor sets this objects flags to , + this assumes that all the data relating to this event is passed in via the + parameter and no other data should be captured from the environment. + + + + + + Serialization constructor + + The that holds the serialized object data. + The that contains contextual information about the source or destination. + + + Initializes a new instance of the class + with serialized data. + + + + + + Ensure that the repository is set. + + the value for the repository + + + + Write the rendered message to a TextWriter + + the writer to write the message to + + + Unlike the property this method + does store the message data in the internal cache. Therefore + if called only once this method should be faster than the + property, however if the message is + to be accessed multiple times then the property will be more efficient. + + + + + + Serializes this object into the provided. + + The to populate with data. + The destination for this serialization. + + + The data in this event must be fixed before it can be serialized. + + + The method must be called during the + method call if this event + is to be used outside that method. + + + + + + Gets the portable data for this . + + The for this event. + + + A new can be constructed using a + instance. + + + Does a fix of the data + in the logging event before returning the event data. + + + + + + Gets the portable data for this . + + The set of data to ensure is fixed in the LoggingEventData + The for this event. + + + A new can be constructed using a + instance. + + + + + + Returns this event's exception's rendered using the + . + + + This event's exception's rendered using the . + + + + Obsolete. Use instead. + + + + + + Returns this event's exception's rendered using the + . + + + This event's exception's rendered using the . + + + + Returns this event's exception's rendered using the + . + + + + + + Fix instance fields that hold volatile data. + + + + Some of the values in instances of + are considered volatile, that is the values are correct at the + time the event is delivered to appenders, but will not be consistent + at any time afterwards. If an event is to be stored and then processed + at a later time these volatile values must be fixed by calling + . There is a performance penalty + incurred by calling but it + is essential to maintaining data consistency. + + + Calling is equivalent to + calling passing the parameter + false. + + + See for more + information. + + + + + + Fixes instance fields that hold volatile data. + + Set to true to not fix data that takes a long time to fix. + + + Some of the values in instances of + are considered volatile, that is the values are correct at the + time the event is delivered to appenders, but will not be consistent + at any time afterwards. If an event is to be stored and then processed + at a later time these volatile values must be fixed by calling + . There is a performance penalty + for incurred by calling but it + is essential to maintaining data consistency. + + + The param controls the data that + is fixed. Some of the data that can be fixed takes a long time to + generate, therefore if you do not require those settings to be fixed + they can be ignored by setting the param + to true. This setting will ignore the + and settings. + + + Set to false to ensure that all + settings are fixed. + + + + + + Fix the fields specified by the parameter + + the fields to fix + + + Only fields specified in the will be fixed. + Fields will not be fixed if they have previously been fixed. + It is not possible to 'unfix' a field. + + + + + + Lookup a composite property in this event + + the key for the property to lookup + the value for the property + + + This event has composite properties that combine together properties from + several different contexts in the following order: + + + this events properties + + This event has that can be set. These + properties are specific to this event only. + + + + the thread properties + + The that are set on the current + thread. These properties are shared by all events logged on this thread. + + + + the global properties + + The that are set globally. These + properties are shared by all the threads in the AppDomain. + + + + + + + + + Get all the composite properties in this event + + the containing all the properties + + + See for details of the composite properties + stored by the event. + + + This method returns a single containing all the + properties defined for this event. + + + + + + The internal logging event data. + + + + + The internal logging event data. + + + + + The internal logging event data. + + + + + The fully qualified Type of the calling + logger class in the stack frame (i.e. the declaring type of the method). + + + + + The application supplied message of logging event. + + + + + The exception that was thrown. + + + This is not serialized. The string representation + is serialized instead. + + + + + The repository that generated the logging event + + + This is not serialized. + + + + + The fix state for this event + + + These flags indicate which fields have been fixed. + Not serialized. + + + + + Indicated that the internal cache is updateable (ie not fixed) + + + This is a seperate flag to m_fixFlags as it allows incrementel fixing and simpler + changes in the caching strategy. + + + + + Gets the time when the current process started. + + + This is the time when this process started. + + + + The TimeStamp is stored in the local time zone for this computer. + + + Tries to get the start time for the current process. + Failing that it returns the time of the first call to + this property. + + + Note that AppDomains may be loaded and unloaded within the + same process without the process terminating and therefore + without the process start time being reset. + + + + + + Gets the of the logging event. + + + The of the logging event. + + + + Gets the of the logging event. + + + + + + Gets the time of the logging event. + + + The time of the logging event. + + + + The TimeStamp is stored in the local time zone for this computer. + + + + + + Gets the name of the logger that logged the event. + + + The name of the logger that logged the event. + + + + Gets the name of the logger that logged the event. + + + + + + Gets the location information for this logging event. + + + The location information for this logging event. + + + + The collected information is cached for future use. + + + See the class for more information on + supported frameworks and the different behavior in Debug and + Release builds. + + + + + + Gets the message object used to initialize this event. + + + The message object used to initialize this event. + + + + Gets the message object used to initialize this event. + Note that this event may not have a valid message object. + If the event is serialized the message object will not + be transferred. To get the text of the message the + property must be used + not this property. + + + If there is no defined message object for this event then + null will be returned. + + + + + + Gets the exception object used to initialize this event. + + + The exception object used to initialize this event. + + + + Gets the exception object used to initialize this event. + Note that this event may not have a valid exception object. + If the event is serialized the exception object will not + be transferred. To get the text of the exception the + method must be used + not this property. + + + If there is no defined exception object for this event then + null will be returned. + + + + + + The that this event was created in. + + + + The that this event was created in. + + + + + + Gets the message, rendered through the . + + + The message rendered through the . + + + + The collected information is cached for future use. + + + + + + Gets the name of the current thread. + + + The name of the current thread, or the thread ID when + the name is not available. + + + + The collected information is cached for future use. + + + + + + Gets the name of the current user. + + + The name of the current user, or NOT AVAILABLE when the + underlying runtime has no support for retrieving the name of the + current user. + + + + Calls WindowsIdentity.GetCurrent().Name to get the name of + the current windows user. + + + To improve performance, we could cache the string representation of + the name, and reuse that as long as the identity stayed constant. + Once the identity changed, we would need to re-assign and re-render + the string. + + + However, the WindowsIdentity.GetCurrent() call seems to + return different objects every time, so the current implementation + doesn't do this type of caching. + + + Timing for these operations: + + + + Method + Results + + + WindowsIdentity.GetCurrent() + 10000 loops, 00:00:00.2031250 seconds + + + WindowsIdentity.GetCurrent().Name + 10000 loops, 00:00:08.0468750 seconds + + + + This means we could speed things up almost 40 times by caching the + value of the WindowsIdentity.GetCurrent().Name property, since + this takes (8.04-0.20) = 7.84375 seconds. + + + + + + Gets the identity of the current thread principal. + + + The string name of the identity of the current thread principal. + + + + Calls System.Threading.Thread.CurrentPrincipal.Identity.Name to get + the name of the current thread principal. + + + + + + Gets the AppDomain friendly name. + + + The AppDomain friendly name. + + + + Gets the AppDomain friendly name. + + + + + + Additional event specific properties. + + + Additional event specific properties. + + + + A logger or an appender may attach additional + properties to specific events. These properties + have a string key and an object value. + + + This property is for events that have been added directly to + this event. The aggregate properties (which include these + event properties) can be retrieved using + and . + + + Once the properties have been fixed this property + returns the combined cached properties. This ensures that updates to + this property are always reflected in the underlying storage. When + returning the combined properties there may be more keys in the + Dictionary than expected. + + + + + + The fixed fields in this event + + + The set of fields that are fixed in this event + + + + Fields will not be fixed if they have previously been fixed. + It is not possible to 'unfix' a field. + + + + + + Implementation of wrapper interface. + + + + This implementation of the interface + forwards to the held by the base class. + + + This logger has methods to allow the caller to log at the following + levels: + + + + DEBUG + + The and methods log messages + at the DEBUG level. That is the level with that name defined in the + repositories . The default value + for this level is . The + property tests if this level is enabled for logging. + + + + INFO + + The and methods log messages + at the INFO level. That is the level with that name defined in the + repositories . The default value + for this level is . The + property tests if this level is enabled for logging. + + + + WARN + + The and methods log messages + at the WARN level. That is the level with that name defined in the + repositories . The default value + for this level is . The + property tests if this level is enabled for logging. + + + + ERROR + + The and methods log messages + at the ERROR level. That is the level with that name defined in the + repositories . The default value + for this level is . The + property tests if this level is enabled for logging. + + + + FATAL + + The and methods log messages + at the FATAL level. That is the level with that name defined in the + repositories . The default value + for this level is . The + property tests if this level is enabled for logging. + + + + + The values for these levels and their semantic meanings can be changed by + configuring the for the repository. + + + Nicko Cadell + Gert Driesen + + + + The ILog interface is use by application to log messages into + the log4net framework. + + + + Use the to obtain logger instances + that implement this interface. The + static method is used to get logger instances. + + + This class contains methods for logging at different levels and also + has properties for determining if those logging levels are + enabled in the current configuration. + + + This interface can be implemented in different ways. This documentation + specifies reasonable behavior that a caller can expect from the actual + implementation, however different implementations reserve the right to + do things differently. + + + Simple example of logging messages + + ILog log = LogManager.GetLogger("application-log"); + + log.Info("Application Start"); + log.Debug("This is a debug message"); + + if (log.IsDebugEnabled) + { + log.Debug("This is another debug message"); + } + + + + + Nicko Cadell + Gert Driesen + + + Log a message object with the level. + + Log a message object with the level. + + The message object to log. + + + This method first checks if this logger is DEBUG + enabled by comparing the level of this logger with the + level. If this logger is + DEBUG enabled, then it converts the message object + (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of + the additivity flag. + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + + + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The message object to log. + The exception to log, including its stack trace. + + + See the form for more detailed information. + + + + + + + Log a formatted string with the level. + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + An that supplies culture-specific formatting information + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + Log a message object with the level. + + Logs a message object with the level. + + + + This method first checks if this logger is INFO + enabled by comparing the level of this logger with the + level. If this logger is + INFO enabled, then it converts the message object + (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of the + additivity flag. + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + The message object to log. + + + + + + Logs a message object with the INFO level including + the stack trace of the passed + as a parameter. + + The message object to log. + The exception to log, including its stack trace. + + + See the form for more detailed information. + + + + + + + Log a formatted message string with the level. + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + An that supplies culture-specific formatting information + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + Log a message object with the level. + + Log a message object with the level. + + + + This method first checks if this logger is WARN + enabled by comparing the level of this logger with the + level. If this logger is + WARN enabled, then it converts the message object + (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of the + additivity flag. + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + The message object to log. + + + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The message object to log. + The exception to log, including its stack trace. + + + See the form for more detailed information. + + + + + + + Log a formatted message string with the level. + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + An that supplies culture-specific formatting information + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + Log a message object with the level. + + Logs a message object with the level. + + The message object to log. + + + This method first checks if this logger is ERROR + enabled by comparing the level of this logger with the + level. If this logger is + ERROR enabled, then it converts the message object + (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of the + additivity flag. + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + + + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The message object to log. + The exception to log, including its stack trace. + + + See the form for more detailed information. + + + + + + + Log a formatted message string with the level. + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + An that supplies culture-specific formatting information + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + Log a message object with the level. + + Log a message object with the level. + + + + This method first checks if this logger is FATAL + enabled by comparing the level of this logger with the + level. If this logger is + FATAL enabled, then it converts the message object + (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of the + additivity flag. + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + The message object to log. + + + + + + Log a message object with the level including + the stack trace of the passed + as a parameter. + + The message object to log. + The exception to log, including its stack trace. + + + See the form for more detailed information. + + + + + + + Log a formatted message string with the level. + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Logs a formatted message string with the level. + + An that supplies culture-specific formatting information + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the String.Format method. See + for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + + + Checks if this logger is enabled for the level. + + + true if this logger is enabled for events, false otherwise. + + + + This function is intended to lessen the computational cost of + disabled log debug statements. + + For some ILog interface log, when you write: + + log.Debug("This is entry number: " + i ); + + + You incur the cost constructing the message, string construction and concatenation in + this case, regardless of whether the message is logged or not. + + + If you are worried about speed (who isn't), then you should write: + + + if (log.IsDebugEnabled) + { + log.Debug("This is entry number: " + i ); + } + + + This way you will not incur the cost of parameter + construction if debugging is disabled for log. On + the other hand, if the log is debug enabled, you + will incur the cost of evaluating whether the logger is debug + enabled twice. Once in and once in + the . This is an insignificant overhead + since evaluating a logger takes about 1% of the time it + takes to actually log. This is the preferred style of logging. + + Alternatively if your logger is available statically then the is debug + enabled state can be stored in a static variable like this: + + + private static readonly bool isDebugEnabled = log.IsDebugEnabled; + + + Then when you come to log you can write: + + + if (isDebugEnabled) + { + log.Debug("This is entry number: " + i ); + } + + + This way the debug enabled state is only queried once + when the class is loaded. Using a private static readonly + variable is the most efficient because it is a run time constant + and can be heavily optimized by the JIT compiler. + + + Of course if you use a static readonly variable to + hold the enabled state of the logger then you cannot + change the enabled state at runtime to vary the logging + that is produced. You have to decide if you need absolute + speed or runtime flexibility. + + + + + + + + Checks if this logger is enabled for the level. + + + true if this logger is enabled for events, false otherwise. + + + For more information see . + + + + + + + + Checks if this logger is enabled for the level. + + + true if this logger is enabled for events, false otherwise. + + + For more information see . + + + + + + + + Checks if this logger is enabled for the level. + + + true if this logger is enabled for events, false otherwise. + + + For more information see . + + + + + + + + Checks if this logger is enabled for the level. + + + true if this logger is enabled for events, false otherwise. + + + For more information see . + + + + + + + + Construct a new wrapper for the specified logger. + + The logger to wrap. + + + Construct a new wrapper for the specified logger. + + + + + + Virtual method called when the configuration of the repository changes + + the repository holding the levels + + + Virtual method called when the configuration of the repository changes + + + + + + Logs a message object with the DEBUG level. + + The message object to log. + + + This method first checks if this logger is DEBUG + enabled by comparing the level of this logger with the + DEBUG level. If this logger is + DEBUG enabled, then it converts the message object + (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of the + additivity flag. + + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + + + + Logs a message object with the DEBUG level + + The message object to log. + The exception to log, including its stack trace. + + + Logs a message object with the DEBUG level including + the stack trace of the passed + as a parameter. + + + See the form for more detailed information. + + + + + + + Logs a formatted message string with the DEBUG level. + + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the DEBUG level. + + A String containing zero or more format items + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the DEBUG level. + + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the DEBUG level. + + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the DEBUG level. + + An that supplies culture-specific formatting information + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a message object with the INFO level. + + The message object to log. + + + This method first checks if this logger is INFO + enabled by comparing the level of this logger with the + INFO level. If this logger is + INFO enabled, then it converts the message object + (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger + and also higher in the hierarchy depending on the value of + the additivity flag. + + + WARNING Note that passing an + to this method will print the name of the + but no stack trace. To print a stack trace use the + form instead. + + + + + + Logs a message object with the INFO level. + + The message object to log. + The exception to log, including its stack trace. + + + Logs a message object with the INFO level including + the stack trace of the + passed as a parameter. + + + See the form for more detailed information. + + + + + + + Logs a formatted message string with the INFO level. + + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the INFO level. + + A String containing zero or more format items + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the INFO level. + + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the INFO level. + + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the INFO level. + + An that supplies culture-specific formatting information + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a message object with the WARN level. + + the message object to log + + + This method first checks if this logger is WARN + enabled by comparing the level of this logger with the + WARN level. If this logger is + WARN enabled, then it converts the message object + (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger and + also higher in the hierarchy depending on the value of the + additivity flag. + + + WARNING Note that passing an to this + method will print the name of the but no + stack trace. To print a stack trace use the + form instead. + + + + + + Logs a message object with the WARN level + + The message object to log. + The exception to log, including its stack trace. + + + Logs a message object with the WARN level including + the stack trace of the + passed as a parameter. + + + See the form for more detailed information. + + + + + + + Logs a formatted message string with the WARN level. + + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the WARN level. + + A String containing zero or more format items + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the WARN level. + + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the WARN level. + + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the WARN level. + + An that supplies culture-specific formatting information + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a message object with the ERROR level. + + The message object to log. + + + This method first checks if this logger is ERROR + enabled by comparing the level of this logger with the + ERROR level. If this logger is + ERROR enabled, then it converts the message object + (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger and + also higher in the hierarchy depending on the value of the + additivity flag. + + + WARNING Note that passing an to this + method will print the name of the but no + stack trace. To print a stack trace use the + form instead. + + + + + + Logs a message object with the ERROR level + + The message object to log. + The exception to log, including its stack trace. + + + Logs a message object with the ERROR level including + the stack trace of the + passed as a parameter. + + + See the form for more detailed information. + + + + + + + Logs a formatted message string with the ERROR level. + + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the ERROR level. + + A String containing zero or more format items + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the ERROR level. + + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the ERROR level. + + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the ERROR level. + + An that supplies culture-specific formatting information + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a message object with the FATAL level. + + The message object to log. + + + This method first checks if this logger is FATAL + enabled by comparing the level of this logger with the + FATAL level. If this logger is + FATAL enabled, then it converts the message object + (passed as parameter) to a string by invoking the appropriate + . It then + proceeds to call all the registered appenders in this logger and + also higher in the hierarchy depending on the value of the + additivity flag. + + + WARNING Note that passing an to this + method will print the name of the but no + stack trace. To print a stack trace use the + form instead. + + + + + + Logs a message object with the FATAL level + + The message object to log. + The exception to log, including its stack trace. + + + Logs a message object with the FATAL level including + the stack trace of the + passed as a parameter. + + + See the form for more detailed information. + + + + + + + Logs a formatted message string with the FATAL level. + + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the FATAL level. + + A String containing zero or more format items + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the FATAL level. + + A String containing zero or more format items + An Object to format + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the FATAL level. + + A String containing zero or more format items + An Object to format + An Object to format + An Object to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + The string is formatted using the + format provider. To specify a localized provider use the + method. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Logs a formatted message string with the FATAL level. + + An that supplies culture-specific formatting information + A String containing zero or more format items + An Object array containing zero or more objects to format + + + The message is formatted using the method. See + String.Format for details of the syntax of the format string and the behavior + of the formatting. + + + This method does not take an object to include in the + log event. To pass an use one of the + methods instead. + + + + + + Event handler for the event + + the repository + Empty + + + + The fully qualified name of this declaring type not the type of any subclass. + + + + + Checks if this logger is enabled for the DEBUG + level. + + + true if this logger is enabled for DEBUG events, + false otherwise. + + + + This function is intended to lessen the computational cost of + disabled log debug statements. + + + For some log Logger object, when you write: + + + log.Debug("This is entry number: " + i ); + + + You incur the cost constructing the message, concatenation in + this case, regardless of whether the message is logged or not. + + + If you are worried about speed, then you should write: + + + if (log.IsDebugEnabled()) + { + log.Debug("This is entry number: " + i ); + } + + + This way you will not incur the cost of parameter + construction if debugging is disabled for log. On + the other hand, if the log is debug enabled, you + will incur the cost of evaluating whether the logger is debug + enabled twice. Once in IsDebugEnabled and once in + the Debug. This is an insignificant overhead + since evaluating a logger takes about 1% of the time it + takes to actually log. + + + + + + Checks if this logger is enabled for the INFO level. + + + true if this logger is enabled for INFO events, + false otherwise. + + + + See for more information and examples + of using this method. + + + + + + + Checks if this logger is enabled for the WARN level. + + + true if this logger is enabled for WARN events, + false otherwise. + + + + See for more information and examples + of using this method. + + + + + + + Checks if this logger is enabled for the ERROR level. + + + true if this logger is enabled for ERROR events, + false otherwise. + + + + See for more information and examples of using this method. + + + + + + + Checks if this logger is enabled for the FATAL level. + + + true if this logger is enabled for FATAL events, + false otherwise. + + + + See for more information and examples of using this method. + + + + + + + A SecurityContext used by log4net when interacting with protected resources + + + + A SecurityContext used by log4net when interacting with protected resources + for example with operating system services. This can be used to impersonate + a principal that has been granted privileges on the system resources. + + + Nicko Cadell + + + + Impersonate this SecurityContext + + State supplied by the caller + An instance that will + revoke the impersonation of this SecurityContext, or null + + + Impersonate this security context. Further calls on the current + thread should now be made in the security context provided + by this object. When the result + method is called the security + context of the thread should be reverted to the state it was in + before was called. + + + + + + The providers default instances. + + + + A configured component that interacts with potentially protected system + resources uses a to provide the elevated + privileges required. If the object has + been not been explicitly provided to the component then the component + will request one from this . + + + By default the is + an instance of which returns only + objects. This is a reasonable default + where the privileges required are not know by the system. + + + This default behavior can be overridden by subclassing the + and overriding the method to return + the desired objects. The default provider + can be replaced by programmatically setting the value of the + property. + + + An alternative is to use the log4net.Config.SecurityContextProviderAttribute + This attribute can be applied to an assembly in the same way as the + log4net.Config.XmlConfiguratorAttribute". The attribute takes + the type to use as the as an argument. + + + Nicko Cadell + + + + The default provider + + + + + Protected default constructor to allow subclassing + + + + Protected default constructor to allow subclassing + + + + + + Create a SecurityContext for a consumer + + The consumer requesting the SecurityContext + An impersonation context + + + The default implementation is to return a . + + + Subclasses should override this method to provide their own + behavior. + + + + + + Gets or sets the default SecurityContextProvider + + + The default SecurityContextProvider + + + + The default provider is used by configured components that + require a and have not had one + given to them. + + + By default this is an instance of + that returns objects. + + + The default provider can be set programmatically by setting + the value of this property to a sub class of + that has the desired behavior. + + + + + + Delegate used to handle creation of new wrappers. + + The logger to wrap in a wrapper. + + + Delegate used to handle creation of new wrappers. This delegate + is called from the + method to construct the wrapper for the specified logger. + + + The delegate to use is supplied to the + constructor. + + + + + + Maps between logger objects and wrapper objects. + + + + This class maintains a mapping between objects and + objects. Use the method to + lookup the for the specified . + + + New wrapper instances are created by the + method. The default behavior is for this method to delegate construction + of the wrapper to the delegate supplied + to the constructor. This allows specialization of the behavior without + requiring subclassing of this type. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the + + The handler to use to create the wrapper objects. + + + Initializes a new instance of the class with + the specified handler to create the wrapper objects. + + + + + + Gets the wrapper object for the specified logger. + + The wrapper object for the specified logger + + + If the logger is null then the corresponding wrapper is null. + + + Looks up the wrapper it it has previously been requested and + returns it. If the wrapper has never been requested before then + the virtual method is + called. + + + + + + Creates the wrapper object for the specified logger. + + The logger to wrap in a wrapper. + The wrapper object for the logger. + + + This implementation uses the + passed to the constructor to create the wrapper. This method + can be overridden in a subclass. + + + + + + Called when a monitored repository shutdown event is received. + + The that is shutting down + + + This method is called when a that this + is holding loggers for has signaled its shutdown + event . The default + behavior of this method is to release the references to the loggers + and their wrappers generated for this repository. + + + + + + Event handler for repository shutdown event. + + The sender of the event. + The event args. + + + + Map of logger repositories to hashtables of ILogger to ILoggerWrapper mappings + + + + + The handler to use to create the extension wrapper objects. + + + + + Internal reference to the delegate used to register for repository shutdown events. + + + + + Gets the map of logger repositories. + + + Map of logger repositories. + + + + Gets the hashtable that is keyed on . The + values are hashtables keyed on with the + value being the corresponding . + + + + + + Formats a as "HH:mm:ss,fff". + + + + Formats a in the format "HH:mm:ss,fff" for example, "15:49:37,459". + + + Nicko Cadell + Gert Driesen + + + + Render a as a string. + + + + Interface to abstract the rendering of a + instance into a string. + + + The method is used to render the + date to a text writer. + + + Nicko Cadell + Gert Driesen + + + + Formats the specified date as a string. + + The date to format. + The writer to write to. + + + Format the as a string and write it + to the provided. + + + + + + String constant used to specify AbsoluteTimeDateFormat in layouts. Current value is ABSOLUTE. + + + + + String constant used to specify DateTimeDateFormat in layouts. Current value is DATE. + + + + + String constant used to specify ISO8601DateFormat in layouts. Current value is ISO8601. + + + + + Renders the date into a string. Format is "HH:mm:ss". + + The date to render into a string. + The string builder to write to. + + + Subclasses should override this method to render the date + into a string using a precision up to the second. This method + will be called at most once per second and the result will be + reused if it is needed again during the same second. + + + + + + Renders the date into a string. Format is "HH:mm:ss,fff". + + The date to render into a string. + The writer to write to. + + + Uses the method to generate the + time string up to the seconds and then appends the current + milliseconds. The results from are + cached and is called at most once + per second. + + + Sub classes should override + rather than . + + + + + + Last stored time with precision up to the second. + + + + + Last stored time with precision up to the second, formatted + as a string. + + + + + Last stored time with precision up to the second, formatted + as a string. + + + + + Formats a as "dd MMM yyyy HH:mm:ss,fff" + + + + Formats a in the format + "dd MMM yyyy HH:mm:ss,fff" for example, + "06 Nov 1994 15:49:37,459". + + + Nicko Cadell + Gert Driesen + Angelika Schnagl + + + + Default constructor. + + + + Initializes a new instance of the class. + + + + + + Formats the date without the milliseconds part + + The date to format. + The string builder to write to. + + + Formats a DateTime in the format "dd MMM yyyy HH:mm:ss" + for example, "06 Nov 1994 15:49:37". + + + The base class will append the ",fff" milliseconds section. + This method will only be called at most once per second. + + + + + + The format info for the invariant culture. + + + + + Formats the as "yyyy-MM-dd HH:mm:ss,fff". + + + + Formats the specified as a string: "yyyy-MM-dd HH:mm:ss,fff". + + + Nicko Cadell + Gert Driesen + + + + Default constructor + + + + Initializes a new instance of the class. + + + + + + Formats the date without the milliseconds part + + The date to format. + The string builder to write to. + + + Formats the date specified as a string: "yyyy-MM-dd HH:mm:ss". + + + The base class will append the ",fff" milliseconds section. + This method will only be called at most once per second. + + + + + + Formats the using the method. + + + + Formats the using the method. + + + Nicko Cadell + Gert Driesen + + + + Constructor + + The format string. + + + Initializes a new instance of the class + with the specified format string. + + + The format string must be compatible with the options + that can be supplied to . + + + + + + Formats the date using . + + The date to convert to a string. + The writer to write to. + + + Uses the date format string supplied to the constructor to call + the method to format the date. + + + + + + The format string used to format the . + + + + The format string must be compatible with the options + that can be supplied to . + + + + + + This filter drops all . + + + + You can add this filter to the end of a filter chain to + switch from the default "accept all unless instructed otherwise" + filtering behavior to a "deny all unless instructed otherwise" + behavior. + + + Nicko Cadell + Gert Driesen + + + + Subclass this type to implement customized logging event filtering + + + + Users should extend this class to implement customized logging + event filtering. Note that and + , the parent class of all standard + appenders, have built-in filtering rules. It is suggested that you + first use and understand the built-in rules before rushing to write + your own custom filters. + + + This abstract class assumes and also imposes that filters be + organized in a linear chain. The + method of each filter is called sequentially, in the order of their + addition to the chain. + + + The method must return one + of the integer constants , + or . + + + If the value is returned, then the log event is dropped + immediately without consulting with the remaining filters. + + + If the value is returned, then the next filter + in the chain is consulted. If there are no more filters in the + chain, then the log event is logged. Thus, in the presence of no + filters, the default behavior is to log all logging events. + + + If the value is returned, then the log + event is logged without consulting the remaining filters. + + + The philosophy of log4net filters is largely inspired from the + Linux ipchains. + + + Nicko Cadell + Gert Driesen + + + + Implement this interface to provide customized logging event filtering + + + + Users should implement this interface to implement customized logging + event filtering. Note that and + , the parent class of all standard + appenders, have built-in filtering rules. It is suggested that you + first use and understand the built-in rules before rushing to write + your own custom filters. + + + This abstract class assumes and also imposes that filters be + organized in a linear chain. The + method of each filter is called sequentially, in the order of their + addition to the chain. + + + The method must return one + of the integer constants , + or . + + + If the value is returned, then the log event is dropped + immediately without consulting with the remaining filters. + + + If the value is returned, then the next filter + in the chain is consulted. If there are no more filters in the + chain, then the log event is logged. Thus, in the presence of no + filters, the default behavior is to log all logging events. + + + If the value is returned, then the log + event is logged without consulting the remaining filters. + + + The philosophy of log4net filters is largely inspired from the + Linux ipchains. + + + Nicko Cadell + Gert Driesen + + + + Decide if the logging event should be logged through an appender. + + The LoggingEvent to decide upon + The decision of the filter + + + If the decision is , then the event will be + dropped. If the decision is , then the next + filter, if any, will be invoked. If the decision is then + the event will be logged without consulting with other filters in + the chain. + + + + + + Property to get and set the next filter + + + The next filter in the chain + + + + Filters are typically composed into chains. This property allows the next filter in + the chain to be accessed. + + + + + + Points to the next filter in the filter chain. + + + + See for more information. + + + + + + Initialize the filter with the options set + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + Typically filter's options become active immediately on set, + however this method must still be called. + + + + + + Decide if the should be logged through an appender. + + The to decide upon + The decision of the filter + + + If the decision is , then the event will be + dropped. If the decision is , then the next + filter, if any, will be invoked. If the decision is then + the event will be logged without consulting with other filters in + the chain. + + + This method is marked abstract and must be implemented + in a subclass. + + + + + + Property to get and set the next filter + + + The next filter in the chain + + + + Filters are typically composed into chains. This property allows the next filter in + the chain to be accessed. + + + + + + Default constructor + + + + + Always returns the integer constant + + the LoggingEvent to filter + Always returns + + + Ignores the event being logged and just returns + . This can be used to change the default filter + chain behavior from to . This filter + should only be used as the last filter in the chain + as any further filters will be ignored! + + + + + + The return result from + + + + The return result from + + + + + + The log event must be dropped immediately without + consulting with the remaining filters, if any, in the chain. + + + + + This filter is neutral with respect to the log event. + The remaining filters, if any, should be consulted for a final decision. + + + + + The log event must be logged immediately without + consulting with the remaining filters, if any, in the chain. + + + + + This is a very simple filter based on matching. + + + + The filter admits two options and + . If there is an exact match between the value + of the option and the of the + , then the method returns in + case the option value is set + to true, if it is false then + is returned. If the does not match then + the result will be . + + + Nicko Cadell + Gert Driesen + + + + flag to indicate if the filter should on a match + + + + + the to match against + + + + + Default constructor + + + + + Tests if the of the logging event matches that of the filter + + the event to filter + see remarks + + + If the of the event matches the level of the + filter then the result of the function depends on the + value of . If it is true then + the function will return , it it is false then it + will return . If the does not match then + the result will be . + + + + + + when matching + + + + The property is a flag that determines + the behavior when a matching is found. If the + flag is set to true then the filter will the + logging event, otherwise it will the event. + + + The default is true i.e. to the event. + + + + + + The that the filter will match + + + + The level that this filter will attempt to match against the + level. If a match is found then + the result depends on the value of . + + + + + + This is a simple filter based on matching. + + + + The filter admits three options and + that determine the range of priorities that are matched, and + . If there is a match between the range + of priorities and the of the , then the + method returns in case the + option value is set to true, if it is false + then is returned. If there is no match, is returned. + + + Nicko Cadell + Gert Driesen + + + + Flag to indicate the behavior when matching a + + + + + the minimum value to match + + + + + the maximum value to match + + + + + Default constructor + + + + + Check if the event should be logged. + + the logging event to check + see remarks + + + If the of the logging event is outside the range + matched by this filter then + is returned. If the is matched then the value of + is checked. If it is true then + is returned, otherwise + is returned. + + + + + + when matching and + + + + The property is a flag that determines + the behavior when a matching is found. If the + flag is set to true then the filter will the + logging event, otherwise it will the event. + + + The default is true i.e. to the event. + + + + + + Set the minimum matched + + + + The minimum level that this filter will attempt to match against the + level. If a match is found then + the result depends on the value of . + + + + + + Sets the maximum matched + + + + The maximum level that this filter will attempt to match against the + level. If a match is found then + the result depends on the value of . + + + + + + Simple filter to match a string in the event's logger name. + + + + The works very similar to the . It admits two + options and . If the + of the starts + with the value of the option, then the + method returns in + case the option value is set to true, + if it is false then is returned. + + + Daniel Cazzulino + + + + Flag to indicate the behavior when we have a match + + + + + The logger name string to substring match against the event + + + + + Default constructor + + + + + Check if this filter should allow the event to be logged + + the event being logged + see remarks + + + The rendered message is matched against the . + If the equals the beginning of + the incoming () + then a match will have occurred. If no match occurs + this function will return + allowing other filters to check the event. If a match occurs then + the value of is checked. If it is + true then is returned otherwise + is returned. + + + + + + when matching + + + + The property is a flag that determines + the behavior when a matching is found. If the + flag is set to true then the filter will the + logging event, otherwise it will the event. + + + The default is true i.e. to the event. + + + + + + The that the filter will match + + + + This filter will attempt to match this value against logger name in + the following way. The match will be done against the beginning of the + logger name (using ). The match is + case sensitive. If a match is found then + the result depends on the value of . + + + + + + Simple filter to match a keyed string in the + + + + Simple filter to match a keyed string in the + + + As the MDC has been replaced with layered properties the + should be used instead. + + + Nicko Cadell + Gert Driesen + + + + Simple filter to match a string an event property + + + + Simple filter to match a string in the value for a + specific event property + + + Nicko Cadell + + + + Simple filter to match a string in the rendered message + + + + Simple filter to match a string in the rendered message + + + Nicko Cadell + Gert Driesen + + + + Flag to indicate the behavior when we have a match + + + + + The string to substring match against the message + + + + + A string regex to match + + + + + A regex object to match (generated from m_stringRegexToMatch) + + + + + Default constructor + + + + + Initialize and precompile the Regex if required + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Check if this filter should allow the event to be logged + + the event being logged + see remarks + + + The rendered message is matched against the . + If the occurs as a substring within + the message then a match will have occurred. If no match occurs + this function will return + allowing other filters to check the event. If a match occurs then + the value of is checked. If it is + true then is returned otherwise + is returned. + + + + + + when matching or + + + + The property is a flag that determines + the behavior when a matching is found. If the + flag is set to true then the filter will the + logging event, otherwise it will the event. + + + The default is true i.e. to the event. + + + + + + Sets the static string to match + + + + The string that will be substring matched against + the rendered message. If the message contains this + string then the filter will match. If a match is found then + the result depends on the value of . + + + One of or + must be specified. + + + + + + Sets the regular expression to match + + + + The regular expression pattern that will be matched against + the rendered message. If the message matches this + pattern then the filter will match. If a match is found then + the result depends on the value of . + + + One of or + must be specified. + + + + + + The key to use to lookup the string from the event properties + + + + + Default constructor + + + + + Check if this filter should allow the event to be logged + + the event being logged + see remarks + + + The event property for the is matched against + the . + If the occurs as a substring within + the property value then a match will have occurred. If no match occurs + this function will return + allowing other filters to check the event. If a match occurs then + the value of is checked. If it is + true then is returned otherwise + is returned. + + + + + + The key to lookup in the event properties and then match against. + + + + The key name to use to lookup in the properties map of the + . The match will be performed against + the value of this property if it exists. + + + + + + Simple filter to match a string in the + + + + Simple filter to match a string in the + + + As the MDC has been replaced with named stacks stored in the + properties collections the should + be used instead. + + + Nicko Cadell + Gert Driesen + + + + Default constructor + + + + Sets the to "NDC". + + + + + + Write the event appdomain name to the output + + + + Writes the to the output writer. + + + Daniel Cazzulino + Nicko Cadell + + + + Abstract class that provides the formatting functionality that + derived classes need. + + + Conversion specifiers in a conversion patterns are parsed to + individual PatternConverters. Each of which is responsible for + converting a logging event in a converter specific manner. + + Nicko Cadell + + + + Abstract class that provides the formatting functionality that + derived classes need. + + + + Conversion specifiers in a conversion patterns are parsed to + individual PatternConverters. Each of which is responsible for + converting a logging event in a converter specific manner. + + + Nicko Cadell + Gert Driesen + + + + Initial buffer size + + + + + Maximum buffer size before it is recycled + + + + + Protected constructor + + + + Initializes a new instance of the class. + + + + + + Evaluate this pattern converter and write the output to a writer. + + that will receive the formatted result. + The state object on which the pattern converter should be executed. + + + Derived pattern converters must override this method in order to + convert conversion specifiers in the appropriate way. + + + + + + Set the next pattern converter in the chains + + the pattern converter that should follow this converter in the chain + the next converter + + + The PatternConverter can merge with its neighbor during this method (or a sub class). + Therefore the return value may or may not be the value of the argument passed in. + + + + + + Write the pattern converter to the writer with appropriate formatting + + that will receive the formatted result. + The state object on which the pattern converter should be executed. + + + This method calls to allow the subclass to perform + appropriate conversion of the pattern converter. If formatting options have + been specified via the then this method will + apply those formattings before writing the output. + + + + + + Fast space padding method. + + to which the spaces will be appended. + The number of spaces to be padded. + + + Fast space padding method. + + + + + + The option string to the converter + + + + + Write an dictionary to a + + the writer to write to + a to use for object conversion + the value to write to the writer + + + Writes the to a writer in the form: + + + {key1=value1, key2=value2, key3=value3} + + + If the specified + is not null then it is used to render the key and value to text, otherwise + the object's ToString method is called. + + + + + + Write an object to a + + the writer to write to + a to use for object conversion + the value to write to the writer + + + Writes the Object to a writer. If the specified + is not null then it is used to render the object to text, otherwise + the object's ToString method is called. + + + + + + Get the next pattern converter in the chain + + + the next pattern converter in the chain + + + + Get the next pattern converter in the chain + + + + + + Gets or sets the formatting info for this converter + + + The formatting info for this converter + + + + Gets or sets the formatting info for this converter + + + + + + Gets or sets the option value for this converter + + + The option for this converter + + + + Gets or sets the option value for this converter + + + + + + Initializes a new instance of the class. + + + + + Derived pattern converters must override this method in order to + convert conversion specifiers in the correct way. + + that will receive the formatted result. + The on which the pattern converter should be executed. + + + + Derived pattern converters must override this method in order to + convert conversion specifiers in the correct way. + + that will receive the formatted result. + The state object on which the pattern converter should be executed. + + + + Flag indicating if this converter handles exceptions + + + false if this converter handles exceptions + + + + + Flag indicating if this converter handles the logging event exception + + false if this converter handles the logging event exception + + + If this converter handles the exception object contained within + , then this property should be set to + false. Otherwise, if the layout ignores the exception + object, then the property should be set to true. + + + Set this value to override a this default setting. The default + value is true, this converter does not handle the exception. + + + + + + Write the event appdomain name to the output + + that will receive the formatted result. + the event being logged + + + Writes the to the output . + + + + + + Date pattern converter, uses a to format + the date of a . + + + + Render the to the writer as a string. + + + The value of the determines + the formatting of the date. The following values are allowed: + + + Option value + Output + + + ISO8601 + + Uses the formatter. + Formats using the "yyyy-MM-dd HH:mm:ss,fff" pattern. + + + + DATE + + Uses the formatter. + Formats using the "dd MMM yyyy HH:mm:ss,fff" for example, "06 Nov 1994 15:49:37,459". + + + + ABSOLUTE + + Uses the formatter. + Formats using the "HH:mm:ss,yyyy" for example, "15:49:37,459". + + + + other + + Any other pattern string uses the formatter. + This formatter passes the pattern string to the + method. + For details on valid patterns see + DateTimeFormatInfo Class. + + + + + + The is in the local time zone and is rendered in that zone. + To output the time in Universal time see . + + + Nicko Cadell + + + + The used to render the date to a string + + + + The used to render the date to a string + + + + + + Initialize the converter pattern based on the property. + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Convert the pattern into the rendered message + + that will receive the formatted result. + the event being logged + + + Pass the to the + for it to render it to the writer. + + + The passed is in the local time zone. + + + + + + Write the exception text to the output + + + + If an exception object is stored in the logging event + it will be rendered into the pattern output with a + trailing newline. + + + If there is no exception then nothing will be output + and no trailing newline will be appended. + It is typical to put a newline before the exception + and to have the exception as the last data in the pattern. + + + Nicko Cadell + + + + Default constructor + + + + + Write the exception text to the output + + that will receive the formatted result. + the event being logged + + + If an exception object is stored in the logging event + it will be rendered into the pattern output with a + trailing newline. + + + If there is no exception then nothing will be output + and no trailing newline will be appended. + It is typical to put a newline before the exception + and to have the exception as the last data in the pattern. + + + + + + Writes the caller location file name to the output + + + + Writes the value of the for + the event to the output writer. + + + Nicko Cadell + + + + Write the caller location file name to the output + + that will receive the formatted result. + the event being logged + + + Writes the value of the for + the to the output . + + + + + + Write the caller location info to the output + + + + Writes the to the output writer. + + + Nicko Cadell + + + + Write the caller location info to the output + + that will receive the formatted result. + the event being logged + + + Writes the to the output writer. + + + + + + Writes the event identity to the output + + + + Writes the value of the to + the output writer. + + + Daniel Cazzulino + Nicko Cadell + + + + Writes the event identity to the output + + that will receive the formatted result. + the event being logged + + + Writes the value of the + to + the output . + + + + + + Write the event level to the output + + + + Writes the display name of the event + to the writer. + + + Nicko Cadell + + + + Write the event level to the output + + that will receive the formatted result. + the event being logged + + + Writes the of the + to the . + + + + + + Write the caller location line number to the output + + + + Writes the value of the for + the event to the output writer. + + + Nicko Cadell + + + + Write the caller location line number to the output + + that will receive the formatted result. + the event being logged + + + Writes the value of the for + the to the output . + + + + + + Converter for logger name + + + + Outputs the of the event. + + + Nicko Cadell + + + + Converter to output and truncate '.' separated strings + + + + This abstract class supports truncating a '.' separated string + to show a specified number of elements from the right hand side. + This is used to truncate class names that are fully qualified. + + + Subclasses should override the method to + return the fully qualified string. + + + Nicko Cadell + + + + Initialize the converter + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Get the fully qualified string data + + the event being logged + the fully qualified name + + + Overridden by subclasses to get the fully qualified name before the + precision is applied to it. + + + Return the fully qualified '.' (dot/period) separated string. + + + + + + Convert the pattern to the rendered message + + that will receive the formatted result. + the event being logged + + Render the to the precision + specified by the property. + + + + + Gets the fully qualified name of the logger + + the event being logged + The fully qualified logger name + + + Returns the of the . + + + + + + Writes the event message to the output + + + + Uses the method + to write out the event message. + + + Nicko Cadell + + + + Writes the event message to the output + + that will receive the formatted result. + the event being logged + + + Uses the method + to write out the event message. + + + + + + Write the method name to the output + + + + Writes the caller location to + the output. + + + Nicko Cadell + + + + Write the method name to the output + + that will receive the formatted result. + the event being logged + + + Writes the caller location to + the output. + + + + + + Converter to include event NDC + + + + Outputs the value of the event property named NDC. + + + The should be used instead. + + + Nicko Cadell + + + + Write the event NDC to the output + + that will receive the formatted result. + the event being logged + + + As the thread context stacks are now stored in named event properties + this converter simply looks up the value of the NDC property. + + + The should be used instead. + + + + + + Property pattern converter + + + + Writes out the value of a named property. The property name + should be set in the + property. + + + If the is set to null + then all the properties are written as key value pairs. + + + Nicko Cadell + + + + Write the property value to the output + + that will receive the formatted result. + the event being logged + + + Writes out the value of a named property. The property name + should be set in the + property. + + + If the is set to null + then all the properties are written as key value pairs. + + + + + + Converter to output the relative time of the event + + + + Converter to output the time of the event relative to the start of the program. + + + Nicko Cadell + + + + Write the relative time to the output + + that will receive the formatted result. + the event being logged + + + Writes out the relative time of the event in milliseconds. + That is the number of milliseconds between the event + and the . + + + + + + Helper method to get the time difference between two DateTime objects + + start time (in the current local time zone) + end time (in the current local time zone) + the time difference in milliseconds + + + + Converter to include event thread name + + + + Writes the to the output. + + + Nicko Cadell + + + + Write the ThreadName to the output + + that will receive the formatted result. + the event being logged + + + Writes the to the . + + + + + + Pattern converter for the class name + + + + Outputs the of the event. + + + Nicko Cadell + + + + Gets the fully qualified name of the class + + the event being logged + The fully qualified type name for the caller location + + + Returns the of the . + + + + + + Converter to include event user name + + Douglas de la Torre + Nicko Cadell + + + + Convert the pattern to the rendered message + + that will receive the formatted result. + the event being logged + + + + Write the TimeStamp to the output + + + + Date pattern converter, uses a to format + the date of a . + + + Uses a to format the + in Universal time. + + + See the for details on the date pattern syntax. + + + + Nicko Cadell + + + + Write the TimeStamp to the output + + that will receive the formatted result. + the event being logged + + + Pass the to the + for it to render it to the writer. + + + The passed is in the local time zone, this is converted + to Universal time before it is rendered. + + + + + + + A Layout that renders only the Exception text from the logging event + + + + A Layout that renders only the Exception text from the logging event. + + + This Layout should only be used with appenders that utilize multiple + layouts (e.g. ). + + + Nicko Cadell + Gert Driesen + + + + Extend this abstract class to create your own log layout format. + + + + This is the base implementation of the + interface. Most layout objects should extend this class. + + + + + + Subclasses must implement the + method. + + + Subclasses should set the in their default + constructor. + + + + Nicko Cadell + Gert Driesen + + + + Interface implemented by layout objects + + + + An object is used to format a + as text. The method is called by an + appender to transform the into a string. + + + The layout can also supply and + text that is appender before any events and after all the events respectively. + + + Nicko Cadell + Gert Driesen + + + + Implement this method to create your own layout format. + + The TextWriter to write the formatted event to + The event to format + + + This method is called by an appender to format + the as text and output to a writer. + + + If the caller does not have a and prefers the + event to be formatted as a then the following + code can be used to format the event into a . + + + StringWriter writer = new StringWriter(); + Layout.Format(writer, loggingEvent); + string formattedEvent = writer.ToString(); + + + + + + The content type output by this layout. + + The content type + + + The content type output by this layout. + + + This is a MIME type e.g. "text/plain". + + + + + + The header for the layout format. + + the layout header + + + The Header text will be appended before any logging events + are formatted and appended. + + + + + + The footer for the layout format. + + the layout footer + + + The Footer text will be appended after all the logging events + have been formatted and appended. + + + + + + Flag indicating if this layout handle exceptions + + false if this layout handles exceptions + + + If this layout handles the exception object contained within + , then the layout should return + false. Otherwise, if the layout ignores the exception + object, then the layout should return true. + + + + + + The header text + + + + See for more information. + + + + + + The footer text + + + + See for more information. + + + + + + Flag indicating if this layout handles exceptions + + + + false if this layout handles exceptions + + + + + + Empty default constructor + + + + Empty default constructor + + + + + + Activate component options + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + This method must be implemented by the subclass. + + + + + + Implement this method to create your own layout format. + + The TextWriter to write the formatted event to + The event to format + + + This method is called by an appender to format + the as text. + + + + + + The content type output by this layout. + + The content type is "text/plain" + + + The content type output by this layout. + + + This base class uses the value "text/plain". + To change this value a subclass must override this + property. + + + + + + The header for the layout format. + + the layout header + + + The Header text will be appended before any logging events + are formatted and appended. + + + + + + The footer for the layout format. + + the layout footer + + + The Footer text will be appended after all the logging events + have been formatted and appended. + + + + + + Flag indicating if this layout handles exceptions + + false if this layout handles exceptions + + + If this layout handles the exception object contained within + , then the layout should return + false. Otherwise, if the layout ignores the exception + object, then the layout should return true. + + + Set this value to override a this default setting. The default + value is true, this layout does not handle the exception. + + + + + + Default constructor + + + + Constructs a ExceptionLayout + + + + + + Activate component options + + + + Part of the component activation + framework. + + + This method does nothing as options become effective immediately. + + + + + + Gets the exception text from the logging event + + The TextWriter to write the formatted event to + the event being logged + + + Write the exception string to the . + The exception string is retrieved from . + + + + + + Interface for raw layout objects + + + + Interface used to format a + to an object. + + + This interface should not be confused with the + interface. This interface is used in + only certain specialized situations where a raw object is + required rather than a formatted string. The + is not generally useful than this interface. + + + Nicko Cadell + Gert Driesen + + + + Implement this method to create your own layout format. + + The event to format + returns the formatted event + + + Implement this method to create your own layout format. + + + + + + Adapts any to a + + + + Where an is required this adapter + allows a to be specified. + + + Nicko Cadell + Gert Driesen + + + + The layout to adapt + + + + + Construct a new adapter + + the layout to adapt + + + Create the adapter for the specified . + + + + + + Format the logging event as an object. + + The event to format + returns the formatted event + + + Format the logging event as an object. + + + Uses the object supplied to + the constructor to perform the formatting. + + + + + + A flexible layout configurable with pattern string. + + + + The goal of this class is to a + as a string. The results + depend on the conversion pattern. + + + The conversion pattern is closely related to the conversion + pattern of the printf function in C. A conversion pattern is + composed of literal text and format control expressions called + conversion specifiers. + + + You are free to insert any literal text within the conversion + pattern. + + + Each conversion specifier starts with a percent sign (%) and is + followed by optional format modifiers and a conversion + pattern name. The conversion pattern name specifies the type of + data, e.g. logger, level, date, thread name. The format + modifiers control such things as field width, padding, left and + right justification. The following is a simple example. + + + Let the conversion pattern be "%-5level [%thread]: %message%newline" and assume + that the log4net environment was set to use a PatternLayout. Then the + statements + + + ILog log = LogManager.GetLogger(typeof(TestApp)); + log.Debug("Message 1"); + log.Warn("Message 2"); + + would yield the output + + DEBUG [main]: Message 1 + WARN [main]: Message 2 + + + Note that there is no explicit separator between text and + conversion specifiers. The pattern parser knows when it has reached + the end of a conversion specifier when it reads a conversion + character. In the example above the conversion specifier + %-5level means the level of the logging event should be left + justified to a width of five characters. + + + The recognized conversion pattern names are: + + + + Conversion Pattern Name + Effect + + + a + Equivalent to appdomain + + + appdomain + + Used to output the friendly name of the AppDomain where the + logging event was generated. + + + + c + Equivalent to logger + + + C + Equivalent to type + + + class + Equivalent to type + + + d + Equivalent to date + + + date + + + Used to output the date of the logging event in the local time zone. + To output the date in universal time use the %utcdate pattern. + The date conversion + specifier may be followed by a date format specifier enclosed + between braces. For example, %date{HH:mm:ss,fff} or + %date{dd MMM yyyy HH:mm:ss,fff}. If no date format specifier is + given then ISO8601 format is + assumed (). + + + The date format specifier admits the same syntax as the + time pattern string of the . + + + For better results it is recommended to use the log4net date + formatters. These can be specified using one of the strings + "ABSOLUTE", "DATE" and "ISO8601" for specifying + , + and respectively + . For example, + %date{ISO8601} or %date{ABSOLUTE}. + + + These dedicated date formatters perform significantly + better than . + + + + + exception + + + Used to output the exception passed in with the log message. + + + If an exception object is stored in the logging event + it will be rendered into the pattern output with a + trailing newline. + If there is no exception then nothing will be output + and no trailing newline will be appended. + It is typical to put a newline before the exception + and to have the exception as the last data in the pattern. + + + + + F + Equivalent to file + + + file + + + Used to output the file name where the logging request was + issued. + + + WARNING Generating caller location information is + extremely slow. Its use should be avoided unless execution speed + is not an issue. + + + See the note below on the availability of caller location information. + + + + + identity + + + Used to output the user name for the currently active user + (Principal.Identity.Name). + + + WARNING Generating caller information is + extremely slow. Its use should be avoided unless execution speed + is not an issue. + + + + + l + Equivalent to location + + + L + Equivalent to line + + + location + + + Used to output location information of the caller which generated + the logging event. + + + The location information depends on the CLI implementation but + usually consists of the fully qualified name of the calling + method followed by the callers source the file name and line + number between parentheses. + + + The location information can be very useful. However, its + generation is extremely slow. Its use should be avoided + unless execution speed is not an issue. + + + See the note below on the availability of caller location information. + + + + + level + + + Used to output the level of the logging event. + + + + + line + + + Used to output the line number from where the logging request + was issued. + + + WARNING Generating caller location information is + extremely slow. Its use should be avoided unless execution speed + is not an issue. + + + See the note below on the availability of caller location information. + + + + + logger + + + Used to output the logger of the logging event. The + logger conversion specifier can be optionally followed by + precision specifier, that is a decimal constant in + brackets. + + + If a precision specifier is given, then only the corresponding + number of right most components of the logger name will be + printed. By default the logger name is printed in full. + + + For example, for the logger name "a.b.c" the pattern + %logger{2} will output "b.c". + + + + + m + Equivalent to message + + + M + Equivalent to method + + + message + + + Used to output the application supplied message associated with + the logging event. + + + + + mdc + + + The MDC (old name for the ThreadContext.Properties) is now part of the + combined event properties. This pattern is supported for compatibility + but is equivalent to property. + + + + + method + + + Used to output the method name where the logging request was + issued. + + + WARNING Generating caller location information is + extremely slow. Its use should be avoided unless execution speed + is not an issue. + + + See the note below on the availability of caller location information. + + + + + n + Equivalent to newline + + + newline + + + Outputs the platform dependent line separator character or + characters. + + + This conversion pattern offers the same performance as using + non-portable line separator strings such as "\n", or "\r\n". + Thus, it is the preferred way of specifying a line separator. + + + + + ndc + + + Used to output the NDC (nested diagnostic context) associated + with the thread that generated the logging event. + + + + + p + Equivalent to level + + + P + Equivalent to property + + + properties + Equivalent to property + + + property + + + Used to output the an event specific property. The key to + lookup must be specified within braces and directly following the + pattern specifier, e.g. %property{user} would include the value + from the property that is keyed by the string 'user'. Each property value + that is to be included in the log must be specified separately. + Properties are added to events by loggers or appenders. By default + the log4net:HostName property is set to the name of machine on + which the event was originally logged. + + + If no key is specified, e.g. %property then all the keys and their + values are printed in a comma separated list. + + + The properties of an event are combined from a number of different + contexts. These are listed below in the order in which they are searched. + + + + the event properties + + The event has that can be set. These + properties are specific to this event only. + + + + the thread properties + + The that are set on the current + thread. These properties are shared by all events logged on this thread. + + + + the global properties + + The that are set globally. These + properties are shared by all the threads in the AppDomain. + + + + + + + + r + Equivalent to timestamp + + + t + Equivalent to thread + + + timestamp + + + Used to output the number of milliseconds elapsed since the start + of the application until the creation of the logging event. + + + + + thread + + + Used to output the name of the thread that generated the + logging event. Uses the thread number if no name is available. + + + + + type + + + Used to output the fully qualified type name of the caller + issuing the logging request. This conversion specifier + can be optionally followed by precision specifier, that + is a decimal constant in brackets. + + + If a precision specifier is given, then only the corresponding + number of right most components of the class name will be + printed. By default the class name is output in fully qualified form. + + + For example, for the class name "log4net.Layout.PatternLayout", the + pattern %type{1} will output "PatternLayout". + + + WARNING Generating the caller class information is + slow. Thus, its use should be avoided unless execution speed is + not an issue. + + + See the note below on the availability of caller location information. + + + + + u + Equivalent to identity + + + username + + + Used to output the WindowsIdentity for the currently + active user. + + + WARNING Generating caller WindowsIdentity information is + extremely slow. Its use should be avoided unless execution speed + is not an issue. + + + + + utcdate + + + Used to output the date of the logging event in universal time. + The date conversion + specifier may be followed by a date format specifier enclosed + between braces. For example, %utcdate{HH:mm:ss,fff} or + %utcdate{dd MMM yyyy HH:mm:ss,fff}. If no date format specifier is + given then ISO8601 format is + assumed (). + + + The date format specifier admits the same syntax as the + time pattern string of the . + + + For better results it is recommended to use the log4net date + formatters. These can be specified using one of the strings + "ABSOLUTE", "DATE" and "ISO8601" for specifying + , + and respectively + . For example, + %utcdate{ISO8601} or %utcdate{ABSOLUTE}. + + + These dedicated date formatters perform significantly + better than . + + + + + w + Equivalent to username + + + x + Equivalent to ndc + + + X + Equivalent to mdc + + + % + + + The sequence %% outputs a single percent sign. + + + + + + The single letter patterns are deprecated in favor of the + longer more descriptive pattern names. + + + By default the relevant information is output as is. However, + with the aid of format modifiers it is possible to change the + minimum field width, the maximum field width and justification. + + + The optional format modifier is placed between the percent sign + and the conversion pattern name. + + + The first optional format modifier is the left justification + flag which is just the minus (-) character. Then comes the + optional minimum field width modifier. This is a decimal + constant that represents the minimum number of characters to + output. If the data item requires fewer characters, it is padded on + either the left or the right until the minimum width is + reached. The default is to pad on the left (right justify) but you + can specify right padding with the left justification flag. The + padding character is space. If the data item is larger than the + minimum field width, the field is expanded to accommodate the + data. The value is never truncated. + + + This behavior can be changed using the maximum field + width modifier which is designated by a period followed by a + decimal constant. If the data item is longer than the maximum + field, then the extra characters are removed from the + beginning of the data item and not from the end. For + example, it the maximum field width is eight and the data item is + ten characters long, then the first two characters of the data item + are dropped. This behavior deviates from the printf function in C + where truncation is done from the end. + + + Below are various format modifier examples for the logger + conversion specifier. + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Format modifierleft justifyminimum widthmaximum widthcomment
%20loggerfalse20none + + Left pad with spaces if the logger name is less than 20 + characters long. + +
%-20loggertrue20none + + Right pad with spaces if the logger + name is less than 20 characters long. + +
%.30loggerNAnone30 + + Truncate from the beginning if the logger + name is longer than 30 characters. + +
%20.30loggerfalse2030 + + Left pad with spaces if the logger name is shorter than 20 + characters. However, if logger name is longer than 30 characters, + then truncate from the beginning. + +
%-20.30loggertrue2030 + + Right pad with spaces if the logger name is shorter than 20 + characters. However, if logger name is longer than 30 characters, + then truncate from the beginning. + +
+
+ + Note about caller location information.
+ The following patterns %type %file %line %method %location %class %C %F %L %l %M + all generate caller location information. + Location information uses the System.Diagnostics.StackTrace class to generate + a call stack. The caller's information is then extracted from this stack. +
+ + + The System.Diagnostics.StackTrace class is not supported on the + .NET Compact Framework 1.0 therefore caller location information is not + available on that framework. + + + + + The System.Diagnostics.StackTrace class has this to say about Release builds: + + + "StackTrace information will be most informative with Debug build configurations. + By default, Debug builds include debug symbols, while Release builds do not. The + debug symbols contain most of the file, method name, line number, and column + information used in constructing StackFrame and StackTrace objects. StackTrace + might not report as many method calls as expected, due to code transformations + that occur during optimization." + + + This means that in a Release build the caller information may be incomplete or may + not exist at all! Therefore caller location information cannot be relied upon in a Release build. + + + + Additional pattern converters may be registered with a specific + instance using the method. + +
+ + This is a more detailed pattern. + %timestamp [%thread] %level %logger %ndc - %message%newline + + + A similar pattern except that the relative time is + right padded if less than 6 digits, thread name is right padded if + less than 15 characters and truncated if longer and the logger + name is left padded if shorter than 30 characters and truncated if + longer. + %-6timestamp [%15.15thread] %-5level %30.30logger %ndc - %message%newline + + Nicko Cadell + Gert Driesen + Douglas de la Torre + Daniel Cazzulino +
+ + + Default pattern string for log output. + + + + Default pattern string for log output. + Currently set to the string "%message%newline" + which just prints the application supplied message. + + + + + + A detailed conversion pattern + + + + A conversion pattern which includes Time, Thread, Logger, and Nested Context. + Current value is %timestamp [%thread] %level %logger %ndc - %message%newline. + + + + + + Internal map of converter identifiers to converter types. + + + + This static map is overridden by the m_converterRegistry instance map + + + + + + the pattern + + + + + the head of the pattern converter chain + + + + + patterns defined on this PatternLayout only + + + + + Initialize the global registry + + + + Defines the builtin global rules. + + + + + + Constructs a PatternLayout using the DefaultConversionPattern + + + + The default pattern just produces the application supplied message. + + + Note to Inheritors: This constructor calls the virtual method + . If you override this method be + aware that it will be called before your is called constructor. + + + As per the contract the + method must be called after the properties on this object have been + configured. + + + + + + Constructs a PatternLayout using the supplied conversion pattern + + the pattern to use + + + Note to Inheritors: This constructor calls the virtual method + . If you override this method be + aware that it will be called before your is called constructor. + + + When using this constructor the method + need not be called. This may not be the case when using a subclass. + + + + + + Create the pattern parser instance + + the pattern to parse + The that will format the event + + + Creates the used to parse the conversion string. Sets the + global and instance rules on the . + + + + + + Initialize layout options + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Produces a formatted string as specified by the conversion pattern. + + the event being logged + The TextWriter to write the formatted event to + + + Parse the using the patter format + specified in the property. + + + + + + Add a converter to this PatternLayout + + the converter info + + + This version of the method is used by the configurator. + Programmatic users should use the alternative method. + + + + + + Add a converter to this PatternLayout + + the name of the conversion pattern for this converter + the type of the converter + + + Add a named pattern converter to this instance. This + converter will be used in the formatting of the event. + This method must be called before . + + + The specified must extend the + type. + + + + + + The pattern formatting string + + + + The ConversionPattern option. This is the string which + controls formatting and consists of a mix of literal content and + conversion specifiers. + + + + + + Wrapper class used to map converter names to converter types + + + + Pattern converter info class used during configuration to + pass to the + method. + + + + + + default constructor + + + + + Gets or sets the name of the conversion pattern + + + + The name of the pattern in the format string + + + + + + Gets or sets the type of the converter + + + + The value specified must extend the + type. + + + + + + Type converter for the interface + + + + Used to convert objects to the interface. + Supports converting from the interface to + the interface using the . + + + Nicko Cadell + Gert Driesen + + + + Interface supported by type converters + + + + This interface supports conversion from arbitrary types + to a single target type. See . + + + Nicko Cadell + Gert Driesen + + + + Can the source type be converted to the type supported by this object + + the type to convert + true if the conversion is possible + + + Test if the can be converted to the + type supported by this converter. + + + + + + Convert the source object to the type supported by this object + + the object to convert + the converted object + + + Converts the to the type supported + by this converter. + + + + + + Can the sourceType be converted to an + + the source to be to be converted + true if the source type can be converted to + + + Test if the can be converted to a + . Only is supported + as the . + + + + + + Convert the value to a object + + the value to convert + the object + + + Convert the object to a + object. If the object + is a then the + is used to adapt between the two interfaces, otherwise an + exception is thrown. + + + + + + Extract the value of a property from the + + + + Extract the value of a property from the + + + Nicko Cadell + + + + Constructs a RawPropertyLayout + + + + + Lookup the property for + + The event to format + returns property value + + + Looks up and returns the object value of the property + named . If there is no property defined + with than name then null will be returned. + + + + + + The name of the value to lookup in the LoggingEvent Properties collection. + + + Value to lookup in the LoggingEvent Properties collection + + + + String name of the property to lookup in the . + + + + + + Extract the date from the + + + + Extract the date from the + + + Nicko Cadell + Gert Driesen + + + + Constructs a RawTimeStampLayout + + + + + Gets the as a . + + The event to format + returns the time stamp + + + Gets the as a . + + + The time stamp is in local time. To format the time stamp + in universal time use . + + + + + + Extract the date from the + + + + Extract the date from the + + + Nicko Cadell + Gert Driesen + + + + Constructs a RawUtcTimeStampLayout + + + + + Gets the as a . + + The event to format + returns the time stamp + + + Gets the as a . + + + The time stamp is in universal time. To format the time stamp + in local time use . + + + + + + A very simple layout + + + + SimpleLayout consists of the level of the log statement, + followed by " - " and then the log message itself. For example, + + DEBUG - Hello world + + + + Nicko Cadell + Gert Driesen + + + + Constructs a SimpleLayout + + + + + Initialize layout options + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Produces a simple formatted output. + + the event being logged + The TextWriter to write the formatted event to + + + Formats the event as the level of the even, + followed by " - " and then the log message itself. The + output is terminated by a newline. + + + + + + Layout that formats the log events as XML elements. + + + + The output of the consists of a series of + log4net:event elements. It does not output a complete well-formed XML + file. The output is designed to be included as an external entity + in a separate file to form a correct XML file. + + + For example, if abc is the name of the file where + the output goes, then a well-formed XML file would + be: + + + <?xml version="1.0" ?> + + <!DOCTYPE log4net:events SYSTEM "log4net-events.dtd" [<!ENTITY data SYSTEM "abc">]> + + <log4net:events version="1.2" xmlns:log4net="http://logging.apache.org/log4net/schemas/log4net-events-1.2> + &data; + </log4net:events> + + + This approach enforces the independence of the + and the appender where it is embedded. + + + The version attribute helps components to correctly + interpret output generated by . The value of + this attribute should be "1.2" for release 1.2 and later. + + + Alternatively the Header and Footer properties can be + configured to output the correct XML header, open tag and close tag. + When setting the Header and Footer properties it is essential + that the underlying data store not be appendable otherwise the data + will become invalid XML. + + + Nicko Cadell + Gert Driesen + + + + Layout that formats the log events as XML elements. + + + + This is an abstract class that must be subclassed by an implementation + to conform to a specific schema. + + + Deriving classes must implement the method. + + + Nicko Cadell + Gert Driesen + + + + Protected constructor to support subclasses + + + + Initializes a new instance of the class + with no location info. + + + + + + Protected constructor to support subclasses + + + + The parameter determines whether + location information will be output by the layout. If + is set to true, then the + file name and line number of the statement at the origin of the log + statement will be output. + + + If you are embedding this layout within an SMTPAppender + then make sure to set the LocationInfo option of that + appender as well. + + + + + + Initialize layout options + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Produces a formatted string. + + The event being logged. + The TextWriter to write the formatted event to + + + Format the and write it to the . + + + This method creates an that writes to the + . The is passed + to the method. Subclasses should override the + method rather than this method. + + + + + + Does the actual writing of the XML. + + The writer to use to output the event to. + The event to write. + + + Subclasses should override this method to format + the as XML. + + + + + + Flag to indicate if location information should be included in + the XML events. + + + + + Writer adapter that ignores Close + + + + + The string to replace invalid chars with + + + + + Gets a value indicating whether to include location information in + the XML events. + + + true if location information should be included in the XML + events; otherwise, false. + + + + If is set to true, then the file + name and line number of the statement at the origin of the log + statement will be output. + + + If you are embedding this layout within an SMTPAppender + then make sure to set the LocationInfo option of that + appender as well. + + + + + + The string to replace characters that can not be expressed in XML with. + + + Not all characters may be expressed in XML. This property contains the + string to replace those that can not with. This defaults to a ?. Set it + to the empty string to simply remove offending characters. For more + details on the allowed character ranges see http://www.w3.org/TR/REC-xml/#charsets + Character replacement will occur in the log message, the property names + and the property values. + + + + + + + Gets the content type output by this layout. + + + As this is the XML layout, the value is always "text/xml". + + + + As this is the XML layout, the value is always "text/xml". + + + + + + Constructs an XmlLayout + + + + + Constructs an XmlLayout. + + + + The LocationInfo option takes a boolean value. By + default, it is set to false which means there will be no location + information output by this layout. If the the option is set to + true, then the file name and line number of the statement + at the origin of the log statement will be output. + + + If you are embedding this layout within an SmtpAppender + then make sure to set the LocationInfo option of that + appender as well. + + + + + + Initialize layout options + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + Builds a cache of the element names + + + + + + Does the actual writing of the XML. + + The writer to use to output the event to. + The event to write. + + + Override the base class method + to write the to the . + + + + + + The prefix to use for all generated element names + + + + + The prefix to use for all element names + + + + The default prefix is log4net. Set this property + to change the prefix. If the prefix is set to an empty string + then no prefix will be written. + + + + + + Set whether or not to base64 encode the message. + + + + By default the log message will be written as text to the xml + output. This can cause problems when the message contains binary + data. By setting this to true the contents of the message will be + base64 encoded. If this is set then invalid character replacement + (see ) will not be performed + on the log message. + + + + + + Set whether or not to base64 encode the property values. + + + + By default the properties will be written as text to the xml + output. This can cause problems when one or more properties contain + binary data. By setting this to true the values of the properties + will be base64 encoded. If this is set then invalid character replacement + (see ) will not be performed + on the property values. + + + + + + Layout that formats the log events as XML elements compatible with the log4j schema + + + + Formats the log events according to the http://logging.apache.org/log4j schema. + + + Nicko Cadell + + + + The 1st of January 1970 in UTC + + + + + Constructs an XMLLayoutSchemaLog4j + + + + + Constructs an XMLLayoutSchemaLog4j. + + + + The LocationInfo option takes a boolean value. By + default, it is set to false which means there will be no location + information output by this layout. If the the option is set to + true, then the file name and line number of the statement + at the origin of the log statement will be output. + + + If you are embedding this layout within an SMTPAppender + then make sure to set the LocationInfo option of that + appender as well. + + + + + + Actually do the writing of the xml + + the writer to use + the event to write + + + Generate XML that is compatible with the log4j schema. + + + + + + The version of the log4j schema to use. + + + + Only version 1.2 of the log4j schema is supported. + + + + + + The default object Renderer. + + + + The default renderer supports rendering objects and collections to strings. + + + See the method for details of the output. + + + Nicko Cadell + Gert Driesen + + + + Implement this interface in order to render objects as strings + + + + Certain types require special case conversion to + string form. This conversion is done by an object renderer. + Object renderers implement the + interface. + + + Nicko Cadell + Gert Driesen + + + + Render the object to a string + + The map used to lookup renderers + The object to render + The writer to render to + + + Render the object to a + string. + + + The parameter is + provided to lookup and render other objects. This is + very useful where contains + nested objects of unknown type. The + method can be used to render these objects. + + + + + + Default constructor + + + + Default constructor + + + + + + Render the object to a string + + The map used to lookup renderers + The object to render + The writer to render to + + + Render the object to a string. + + + The parameter is + provided to lookup and render other objects. This is + very useful where contains + nested objects of unknown type. The + method can be used to render these objects. + + + The default renderer supports rendering objects to strings as follows: + + + + Value + Rendered String + + + null + + "(null)" + + + + + + + For a one dimensional array this is the + array type name, an open brace, followed by a comma + separated list of the elements (using the appropriate + renderer), followed by a close brace. + + + For example: int[] {1, 2, 3}. + + + If the array is not one dimensional the + Array.ToString() is returned. + + + + + , & + + + Rendered as an open brace, followed by a comma + separated list of the elements (using the appropriate + renderer), followed by a close brace. + + + For example: {a, b, c}. + + + All collection classes that implement its subclasses, + or generic equivalents all implement the interface. + + + + + + + + Rendered as the key, an equals sign ('='), and the value (using the appropriate + renderer). + + + For example: key=value. + + + + + other + + Object.ToString() + + + + + + + + Render the array argument into a string + + The map used to lookup renderers + the array to render + The writer to render to + + + For a one dimensional array this is the + array type name, an open brace, followed by a comma + separated list of the elements (using the appropriate + renderer), followed by a close brace. For example: + int[] {1, 2, 3}. + + + If the array is not one dimensional the + Array.ToString() is returned. + + + + + + Render the enumerator argument into a string + + The map used to lookup renderers + the enumerator to render + The writer to render to + + + Rendered as an open brace, followed by a comma + separated list of the elements (using the appropriate + renderer), followed by a close brace. For example: + {a, b, c}. + + + + + + Render the DictionaryEntry argument into a string + + The map used to lookup renderers + the DictionaryEntry to render + The writer to render to + + + Render the key, an equals sign ('='), and the value (using the appropriate + renderer). For example: key=value. + + + + + + Map class objects to an . + + + + Maintains a mapping between types that require special + rendering and the that + is used to render them. + + + The method is used to render an + object using the appropriate renderers defined in this map. + + + Nicko Cadell + Gert Driesen + + + + Default Constructor + + + + Default constructor. + + + + + + Render using the appropriate renderer. + + the object to render to a string + the object rendered as a string + + + This is a convenience method used to render an object to a string. + The alternative method + should be used when streaming output to a . + + + + + + Render using the appropriate renderer. + + the object to render to a string + The writer to render to + + + Find the appropriate renderer for the type of the + parameter. This is accomplished by calling the + method. Once a renderer is found, it is + applied on the object and the result is returned + as a . + + + + + + Gets the renderer for the specified object type + + the object to lookup the renderer for + the renderer for + + + Gets the renderer for the specified object type. + + + Syntactic sugar method that calls + with the type of the object parameter. + + + + + + Gets the renderer for the specified type + + the type to lookup the renderer for + the renderer for the specified type + + + Returns the renderer for the specified type. + If no specific renderer has been defined the + will be returned. + + + + + + Internal function to recursively search interfaces + + the type to lookup the renderer for + the renderer for the specified type + + + + Clear the map of renderers + + + + Clear the custom renderers defined by using + . The + cannot be removed. + + + + + + Register an for . + + the type that will be rendered by + the renderer for + + + Register an object renderer for a specific source type. + This renderer will be returned from a call to + specifying the same as an argument. + + + + + + Get the default renderer instance + + the default renderer + + + Get the default renderer + + + + + + Interface implemented by logger repository plugins. + + + + Plugins define additional behavior that can be associated + with a . + The held by the + property is used to store the plugins for a repository. + + + The log4net.Config.PluginAttribute can be used to + attach plugins to repositories created using configuration + attributes. + + + Nicko Cadell + Gert Driesen + + + + Attaches the plugin to the specified . + + The that this plugin should be attached to. + + + A plugin may only be attached to a single repository. + + + This method is called when the plugin is attached to the repository. + + + + + + Is called when the plugin is to shutdown. + + + + This method is called to notify the plugin that + it should stop operating and should detach from + the repository. + + + + + + Gets the name of the plugin. + + + The name of the plugin. + + + + Plugins are stored in the + keyed by name. Each plugin instance attached to a + repository must be a unique name. + + + + + + A strongly-typed collection of objects. + + Nicko Cadell + + + + Creates a read-only wrapper for a PluginCollection instance. + + list to create a readonly wrapper arround + + A PluginCollection wrapper that is read-only. + + + + + Initializes a new instance of the PluginCollection class + that is empty and has the default initial capacity. + + + + + Initializes a new instance of the PluginCollection class + that has the specified initial capacity. + + + The number of elements that the new PluginCollection is initially capable of storing. + + + + + Initializes a new instance of the PluginCollection class + that contains elements copied from the specified PluginCollection. + + The PluginCollection whose elements are copied to the new collection. + + + + Initializes a new instance of the PluginCollection class + that contains elements copied from the specified array. + + The array whose elements are copied to the new list. + + + + Initializes a new instance of the PluginCollection class + that contains elements copied from the specified collection. + + The collection whose elements are copied to the new list. + + + + Allow subclasses to avoid our default constructors + + + + + + + Copies the entire PluginCollection to a one-dimensional + array. + + The one-dimensional array to copy to. + + + + Copies the entire PluginCollection to a one-dimensional + array, starting at the specified index of the target array. + + The one-dimensional array to copy to. + The zero-based index in at which copying begins. + + + + Adds a to the end of the PluginCollection. + + The to be added to the end of the PluginCollection. + The index at which the value has been added. + + + + Removes all elements from the PluginCollection. + + + + + Creates a shallow copy of the . + + A new with a shallow copy of the collection data. + + + + Determines whether a given is in the PluginCollection. + + The to check for. + true if is found in the PluginCollection; otherwise, false. + + + + Returns the zero-based index of the first occurrence of a + in the PluginCollection. + + The to locate in the PluginCollection. + + The zero-based index of the first occurrence of + in the entire PluginCollection, if found; otherwise, -1. + + + + + Inserts an element into the PluginCollection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + is less than zero + -or- + is equal to or greater than . + + + + + Removes the first occurrence of a specific from the PluginCollection. + + The to remove from the PluginCollection. + + The specified was not found in the PluginCollection. + + + + + Removes the element at the specified index of the PluginCollection. + + The zero-based index of the element to remove. + + is less than zero. + -or- + is equal to or greater than . + + + + + Returns an enumerator that can iterate through the PluginCollection. + + An for the entire PluginCollection. + + + + Adds the elements of another PluginCollection to the current PluginCollection. + + The PluginCollection whose elements should be added to the end of the current PluginCollection. + The new of the PluginCollection. + + + + Adds the elements of a array to the current PluginCollection. + + The array whose elements should be added to the end of the PluginCollection. + The new of the PluginCollection. + + + + Adds the elements of a collection to the current PluginCollection. + + The collection whose elements should be added to the end of the PluginCollection. + The new of the PluginCollection. + + + + Sets the capacity to the actual number of elements. + + + + + is less than zero. + -or- + is equal to or greater than . + + + + + is less than zero. + -or- + is equal to or greater than . + + + + + Gets the number of elements actually contained in the PluginCollection. + + + + + Gets a value indicating whether access to the collection is synchronized (thread-safe). + + true if access to the ICollection is synchronized (thread-safe); otherwise, false. + + + + Gets an object that can be used to synchronize access to the collection. + + + An object that can be used to synchronize access to the collection. + + + + + Gets or sets the at the specified index. + + + The at the specified index. + + The zero-based index of the element to get or set. + + is less than zero. + -or- + is equal to or greater than . + + + + + Gets a value indicating whether the collection has a fixed size. + + true if the collection has a fixed size; otherwise, false. The default is false. + + + + Gets a value indicating whether the IList is read-only. + + true if the collection is read-only; otherwise, false. The default is false. + + + + Gets or sets the number of elements the PluginCollection can contain. + + + The number of elements the PluginCollection can contain. + + + + + Supports type-safe iteration over a . + + + + + + Advances the enumerator to the next element in the collection. + + + true if the enumerator was successfully advanced to the next element; + false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, before the first element in the collection. + + + + + Gets the current element in the collection. + + + + + Type visible only to our subclasses + Used to access protected constructor + + + + + + A value + + + + + Supports simple iteration over a . + + + + + + Initializes a new instance of the Enumerator class. + + + + + + Advances the enumerator to the next element in the collection. + + + true if the enumerator was successfully advanced to the next element; + false if the enumerator has passed the end of the collection. + + + The collection was modified after the enumerator was created. + + + + + Sets the enumerator to its initial position, before the first element in the collection. + + + + + Gets the current element in the collection. + + + The current element in the collection. + + + + + + + + Map of repository plugins. + + + + This class is a name keyed map of the plugins that are + attached to a repository. + + + Nicko Cadell + Gert Driesen + + + + Constructor + + The repository that the plugins should be attached to. + + + Initialize a new instance of the class with a + repository that the plugins should be attached to. + + + + + + Adds a to the map. + + The to add to the map. + + + The will be attached to the repository when added. + + + If there already exists a plugin with the same name + attached to the repository then the old plugin will + be and replaced with + the new plugin. + + + + + + Removes a from the map. + + The to remove from the map. + + + Remove a specific plugin from this map. + + + + + + Gets a by name. + + The name of the to lookup. + + The from the map with the name specified, or + null if no plugin is found. + + + + Lookup a plugin by name. If the plugin is not found null + will be returned. + + + + + + Gets all possible plugins as a list of objects. + + All possible plugins as a list of objects. + + + Get a collection of all the plugins defined in this map. + + + + + + Base implementation of + + + + Default abstract implementation of the + interface. This base class can be used by implementors + of the interface. + + + Nicko Cadell + Gert Driesen + + + + Constructor + + the name of the plugin + + Initializes a new Plugin with the specified name. + + + + + Attaches this plugin to a . + + The that this plugin should be attached to. + + + A plugin may only be attached to a single repository. + + + This method is called when the plugin is attached to the repository. + + + + + + Is called when the plugin is to shutdown. + + + + This method is called to notify the plugin that + it should stop operating and should detach from + the repository. + + + + + + The name of this plugin. + + + + + The repository this plugin is attached to. + + + + + Gets or sets the name of the plugin. + + + The name of the plugin. + + + + Plugins are stored in the + keyed by name. Each plugin instance attached to a + repository must be a unique name. + + + The name of the plugin must not change one the + plugin has been attached to a repository. + + + + + + The repository for this plugin + + + The that this plugin is attached to. + + + + Gets or sets the that this plugin is + attached to. + + + + + + Plugin that listens for events from the + + + + This plugin publishes an instance of + on a specified . This listens for logging events delivered from + a remote . + + + When an event is received it is relogged within the attached repository + as if it had been raised locally. + + + Nicko Cadell + Gert Driesen + + + + Default constructor + + + + Initializes a new instance of the class. + + + The property must be set. + + + + + + Construct with sink Uri. + + The name to publish the sink under in the remoting infrastructure. + See for more details. + + + Initializes a new instance of the class + with specified name. + + + + + + Attaches this plugin to a . + + The that this plugin should be attached to. + + + A plugin may only be attached to a single repository. + + + This method is called when the plugin is attached to the repository. + + + + + + Is called when the plugin is to shutdown. + + + + When the plugin is shutdown the remote logging + sink is disconnected. + + + + + + Gets or sets the URI of this sink. + + + The URI of this sink. + + + + This is the name under which the object is marshaled. + + + + + + + Delivers objects to a remote sink. + + + + Internal class used to listen for logging events + and deliver them to the local repository. + + + + + + Constructor + + The repository to log to. + + + Initializes a new instance of the for the + specified . + + + + + + Logs the events to the repository. + + The events to log. + + + The events passed are logged to the + + + + + + Obtains a lifetime service object to control the lifetime + policy for this instance. + + null to indicate that this instance should live forever. + + + Obtains a lifetime service object to control the lifetime + policy for this instance. This object should live forever + therefore this implementation returns null. + + + + + + The underlying that events should + be logged to. + + + + + Default implementation of + + + + This default implementation of the + interface is used to create the default subclass + of the object. + + + Nicko Cadell + Gert Driesen + + + + Interface abstracts creation of instances + + + + This interface is used by the to + create new objects. + + + The method is called + to create a named . + + + Implement this interface to create new subclasses of . + + + Nicko Cadell + Gert Driesen + + + + Create a new instance + + The name of the . + The instance for the specified name. + + + Create a new instance with the + specified name. + + + Called by the to create + new named instances. + + + If the is null then the root logger + must be returned. + + + + + + Default constructor + + + + Initializes a new instance of the class. + + + + + + Create a new instance + + The name of the . + The instance for the specified name. + + + Create a new instance with the + specified name. + + + Called by the to create + new named instances. + + + If the is null then the root logger + must be returned. + + + + + + Default internal subclass of + + + + This subclass has no additional behavior over the + class but does allow instances + to be created. + + + + + + Implementation of used by + + + + Internal class used to provide implementation of + interface. Applications should use to get + logger instances. + + + This is one of the central classes in the log4net implementation. One of the + distinctive features of log4net are hierarchical loggers and their + evaluation. The organizes the + instances into a rooted tree hierarchy. + + + The class is abstract. Only concrete subclasses of + can be created. The + is used to create instances of this type for the . + + + Nicko Cadell + Gert Driesen + Aspi Havewala + Douglas de la Torre + + + + This constructor created a new instance and + sets its name. + + The name of the . + + + This constructor is protected and designed to be used by + a subclass that is not abstract. + + + Loggers are constructed by + objects. See for the default + logger creator. + + + + + + Add to the list of appenders of this + Logger instance. + + An appender to add to this logger + + + Add to the list of appenders of this + Logger instance. + + + If is already in the list of + appenders, then it won't be added again. + + + + + + Look for the appender named as name + + The name of the appender to lookup + The appender with the name specified, or null. + + + Returns the named appender, or null if the appender is not found. + + + + + + Remove all previously added appenders from this Logger instance. + + + + Remove all previously added appenders from this Logger instance. + + + This is useful when re-reading configuration information. + + + + + + Remove the appender passed as parameter form the list of appenders. + + The appender to remove + The appender removed from the list + + + Remove the appender passed as parameter form the list of appenders. + The appender removed is not closed. + If you are discarding the appender you must call + on the appender removed. + + + + + + Remove the appender passed as parameter form the list of appenders. + + The name of the appender to remove + The appender removed from the list + + + Remove the named appender passed as parameter form the list of appenders. + The appender removed is not closed. + If you are discarding the appender you must call + on the appender removed. + + + + + + This generic form is intended to be used by wrappers. + + The declaring type of the method that is + the stack boundary into the logging system for this call. + The level of the message to be logged. + The message object to log. + The exception to log, including its stack trace. + + + Generate a logging event for the specified using + the and . + + + This method must not throw any exception to the caller. + + + + + + This is the most generic printing method that is intended to be used + by wrappers. + + The event being logged. + + + Logs the specified logging event through this logger. + + + This method must not throw any exception to the caller. + + + + + + Checks if this logger is enabled for a given passed as parameter. + + The level to check. + + true if this logger is enabled for level, otherwise false. + + + + Test if this logger is going to log events of the specified . + + + This method must not throw any exception to the caller. + + + + + + Deliver the to the attached appenders. + + The event to log. + + + Call the appenders in the hierarchy starting at + this. If no appenders could be found, emit a + warning. + + + This method calls all the appenders inherited from the + hierarchy circumventing any evaluation of whether to log or not + to log the particular log request. + + + + + + Closes all attached appenders implementing the interface. + + + + Used to ensure that the appenders are correctly shutdown. + + + + + + This is the most generic printing method. This generic form is intended to be used by wrappers + + The level of the message to be logged. + The message object to log. + The exception to log, including its stack trace. + + + Generate a logging event for the specified using + the . + + + + + + Creates a new logging event and logs the event without further checks. + + The declaring type of the method that is + the stack boundary into the logging system for this call. + The level of the message to be logged. + The message object to log. + The exception to log, including its stack trace. + + + Generates a logging event and delivers it to the attached + appenders. + + + + + + Creates a new logging event and logs the event without further checks. + + The event being logged. + + + Delivers the logging event to the attached appenders. + + + + + + The fully qualified type of the Logger class. + + + + + The name of this logger. + + + + + The assigned level of this logger. + + + + The level variable need not be + assigned a value in which case it is inherited + form the hierarchy. + + + + + + The parent of this logger. + + + + The parent of this logger. + All loggers have at least one ancestor which is the root logger. + + + + + + Loggers need to know what Hierarchy they are in. + + + + Loggers need to know what Hierarchy they are in. + The hierarchy that this logger is a member of is stored + here. + + + + + + Helper implementation of the interface + + + + + Flag indicating if child loggers inherit their parents appenders + + + + Additivity is set to true by default, that is children inherit + the appenders of their ancestors by default. If this variable is + set to false then the appenders found in the + ancestors of this logger are not used. However, the children + of this logger will inherit its appenders, unless the children + have their additivity flag set to false too. See + the user manual for more details. + + + + + + Lock to protect AppenderAttachedImpl variable m_appenderAttachedImpl + + + + + Gets or sets the parent logger in the hierarchy. + + + The parent logger in the hierarchy. + + + + Part of the Composite pattern that makes the hierarchy. + The hierarchy is parent linked rather than child linked. + + + + + + Gets or sets a value indicating if child loggers inherit their parent's appenders. + + + true if child loggers inherit their parent's appenders. + + + + Additivity is set to true by default, that is children inherit + the appenders of their ancestors by default. If this variable is + set to false then the appenders found in the + ancestors of this logger are not used. However, the children + of this logger will inherit its appenders, unless the children + have their additivity flag set to false too. See + the user manual for more details. + + + + + + Gets the effective level for this logger. + + The nearest level in the logger hierarchy. + + + Starting from this logger, searches the logger hierarchy for a + non-null level and returns it. Otherwise, returns the level of the + root logger. + + The Logger class is designed so that this method executes as + quickly as possible. + + + + + Gets or sets the where this + Logger instance is attached to. + + The hierarchy that this logger belongs to. + + + This logger must be attached to a single . + + + + + + Gets or sets the assigned , if any, for this Logger. + + + The of this logger. + + + + The assigned can be null. + + + + + + Get the appenders contained in this logger as an + . + + A collection of the appenders in this logger + + + Get the appenders contained in this logger as an + . If no appenders + can be found, then a is returned. + + + + + + Gets the logger name. + + + The name of the logger. + + + + The name of this logger + + + + + + Gets the where this + Logger instance is attached to. + + + The that this logger belongs to. + + + + Gets the where this + Logger instance is attached to. + + + + + + Construct a new Logger + + the name of the logger + + + Initializes a new instance of the class + with the specified name. + + + + + + Delegate used to handle logger creation event notifications. + + The in which the has been created. + The event args that hold the instance that has been created. + + + Delegate used to handle logger creation event notifications. + + + + + + Provides data for the event. + + + + A event is raised every time a + is created. + + + + + + The created + + + + + Constructor + + The that has been created. + + + Initializes a new instance of the event argument + class,with the specified . + + + + + + Gets the that has been created. + + + The that has been created. + + + + The that has been created. + + + + + + Hierarchical organization of loggers + + + + The casual user should not have to deal with this class + directly. + + + This class is specialized in retrieving loggers by name and + also maintaining the logger hierarchy. Implements the + interface. + + + The structure of the logger hierarchy is maintained by the + method. The hierarchy is such that children + link to their parent but parents do not have any references to their + children. Moreover, loggers can be instantiated in any order, in + particular descendant before ancestor. + + + In case a descendant is created before a particular ancestor, + then it creates a provision node for the ancestor and adds itself + to the provision node. Other descendants of the same ancestor add + themselves to the previously created provision node. + + + Nicko Cadell + Gert Driesen + + + + Base implementation of + + + + Default abstract implementation of the interface. + + + Skeleton implementation of the interface. + All types can extend this type. + + + Nicko Cadell + Gert Driesen + + + + Interface implemented by logger repositories. + + + + This interface is implemented by logger repositories. e.g. + . + + + This interface is used by the + to obtain interfaces. + + + Nicko Cadell + Gert Driesen + + + + Check if the named logger exists in the repository. If so return + its reference, otherwise returns null. + + The name of the logger to lookup + The Logger object with the name specified + + + If the names logger exists it is returned, otherwise + null is returned. + + + + + + Returns all the currently defined loggers as an Array. + + All the defined loggers + + + Returns all the currently defined loggers as an Array. + + + + + + Returns a named logger instance + + The name of the logger to retrieve + The logger object with the name specified + + + Returns a named logger instance. + + + If a logger of that name already exists, then it will be + returned. Otherwise, a new logger will be instantiated and + then linked with its existing ancestors as well as children. + + + + + Shutdown the repository + + + Shutting down a repository will safely close and remove + all appenders in all loggers including the root logger. + + + Some appenders need to be closed before the + application exists. Otherwise, pending logging events might be + lost. + + + The method is careful to close nested + appenders before closing regular appenders. This is allows + configurations where a regular appender is attached to a logger + and again to a nested appender. + + + + + + Reset the repositories configuration to a default state + + + + Reset all values contained in this instance to their + default state. + + + Existing loggers are not removed. They are just reset. + + + This method should be used sparingly and with care as it will + block all logging until it is completed. + + + + + + Log the through this repository. + + the event to log + + + This method should not normally be used to log. + The interface should be used + for routine logging. This interface can be obtained + using the method. + + + The logEvent is delivered to the appropriate logger and + that logger is then responsible for logging the event. + + + + + + Returns all the Appenders that are configured as an Array. + + All the Appenders + + + Returns all the Appenders that are configured as an Array. + + + + + + The name of the repository + + + The name of the repository + + + + The name of the repository. + + + + + + RendererMap accesses the object renderer map for this repository. + + + RendererMap accesses the object renderer map for this repository. + + + + RendererMap accesses the object renderer map for this repository. + + + The RendererMap holds a mapping between types and + objects. + + + + + + The plugin map for this repository. + + + The plugin map for this repository. + + + + The plugin map holds the instances + that have been attached to this repository. + + + + + + Get the level map for the Repository. + + + + Get the level map for the Repository. + + + The level map defines the mappings between + level names and objects in + this repository. + + + + + + The threshold for all events in this repository + + + The threshold for all events in this repository + + + + The threshold for all events in this repository. + + + + + + Flag indicates if this repository has been configured. + + + Flag indicates if this repository has been configured. + + + + Flag indicates if this repository has been configured. + + + + + + Event to notify that the repository has been shutdown. + + + Event to notify that the repository has been shutdown. + + + + Event raised when the repository has been shutdown. + + + + + + Event to notify that the repository has had its configuration reset. + + + Event to notify that the repository has had its configuration reset. + + + + Event raised when the repository's configuration has been + reset to default. + + + + + + Event to notify that the repository has had its configuration changed. + + + Event to notify that the repository has had its configuration changed. + + + + Event raised when the repository's configuration has been changed. + + + + + + Repository specific properties + + + Repository specific properties + + + + These properties can be specified on a repository specific basis. + + + + + + Default Constructor + + + + Initializes the repository with default (empty) properties. + + + + + + Construct the repository using specific properties + + the properties to set for this repository + + + Initializes the repository with specified properties. + + + + + + Test if logger exists + + The name of the logger to lookup + The Logger object with the name specified + + + Check if the named logger exists in the repository. If so return + its reference, otherwise returns null. + + + + + + Returns all the currently defined loggers in the repository + + All the defined loggers + + + Returns all the currently defined loggers in the repository as an Array. + + + + + + Return a new logger instance + + The name of the logger to retrieve + The logger object with the name specified + + + Return a new logger instance. + + + If a logger of that name already exists, then it will be + returned. Otherwise, a new logger will be instantiated and + then linked with its existing ancestors as well as children. + + + + + + Shutdown the repository + + + + Shutdown the repository. Can be overridden in a subclass. + This base class implementation notifies the + listeners and all attached plugins of the shutdown event. + + + + + + Reset the repositories configuration to a default state + + + + Reset all values contained in this instance to their + default state. + + + Existing loggers are not removed. They are just reset. + + + This method should be used sparingly and with care as it will + block all logging until it is completed. + + + + + + Log the logEvent through this repository. + + the event to log + + + This method should not normally be used to log. + The interface should be used + for routine logging. This interface can be obtained + using the method. + + + The logEvent is delivered to the appropriate logger and + that logger is then responsible for logging the event. + + + + + + Returns all the Appenders that are configured as an Array. + + All the Appenders + + + Returns all the Appenders that are configured as an Array. + + + + + + Adds an object renderer for a specific class. + + The type that will be rendered by the renderer supplied. + The object renderer used to render the object. + + + Adds an object renderer for a specific class. + + + + + + Notify the registered listeners that the repository is shutting down + + Empty EventArgs + + + Notify any listeners that this repository is shutting down. + + + + + + Notify the registered listeners that the repository has had its configuration reset + + Empty EventArgs + + + Notify any listeners that this repository's configuration has been reset. + + + + + + Notify the registered listeners that the repository has had its configuration changed + + Empty EventArgs + + + Notify any listeners that this repository's configuration has changed. + + + + + + Raise a configuration changed event on this repository + + EventArgs.Empty + + + Applications that programmatically change the configuration of the repository should + raise this event notification to notify listeners. + + + + + + The name of the repository + + + The string name of the repository + + + + The name of this repository. The name is + used to store and lookup the repositories + stored by the . + + + + + + The threshold for all events in this repository + + + The threshold for all events in this repository + + + + The threshold for all events in this repository + + + + + + RendererMap accesses the object renderer map for this repository. + + + RendererMap accesses the object renderer map for this repository. + + + + RendererMap accesses the object renderer map for this repository. + + + The RendererMap holds a mapping between types and + objects. + + + + + + The plugin map for this repository. + + + The plugin map for this repository. + + + + The plugin map holds the instances + that have been attached to this repository. + + + + + + Get the level map for the Repository. + + + + Get the level map for the Repository. + + + The level map defines the mappings between + level names and objects in + this repository. + + + + + + Flag indicates if this repository has been configured. + + + Flag indicates if this repository has been configured. + + + + Flag indicates if this repository has been configured. + + + + + + Event to notify that the repository has been shutdown. + + + Event to notify that the repository has been shutdown. + + + + Event raised when the repository has been shutdown. + + + + + + Event to notify that the repository has had its configuration reset. + + + Event to notify that the repository has had its configuration reset. + + + + Event raised when the repository's configuration has been + reset to default. + + + + + + Event to notify that the repository has had its configuration changed. + + + Event to notify that the repository has had its configuration changed. + + + + Event raised when the repository's configuration has been changed. + + + + + + Repository specific properties + + + Repository specific properties + + + These properties can be specified on a repository specific basis + + + + + Basic Configurator interface for repositories + + + + Interface used by basic configurator to configure a + with a default . + + + A should implement this interface to support + configuration by the . + + + Nicko Cadell + Gert Driesen + + + + Initialize the repository using the specified appender + + the appender to use to log all logging events + + + Configure the repository to route all logging events to the + specified appender. + + + + + + Configure repository using XML + + + + Interface used by Xml configurator to configure a . + + + A should implement this interface to support + configuration by the . + + + Nicko Cadell + Gert Driesen + + + + Initialize the repository using the specified config + + the element containing the root of the config + + + The schema for the XML configuration data is defined by + the implementation. + + + + + + Default constructor + + + + Initializes a new instance of the class. + + + + + + Construct with properties + + The properties to pass to this repository. + + + Initializes a new instance of the class. + + + + + + Construct with a logger factory + + The factory to use to create new logger instances. + + + Initializes a new instance of the class with + the specified . + + + + + + Construct with properties and a logger factory + + The properties to pass to this repository. + The factory to use to create new logger instances. + + + Initializes a new instance of the class with + the specified . + + + + + + Test if a logger exists + + The name of the logger to lookup + The Logger object with the name specified + + + Check if the named logger exists in the hierarchy. If so return + its reference, otherwise returns null. + + + + + + Returns all the currently defined loggers in the hierarchy as an Array + + All the defined loggers + + + Returns all the currently defined loggers in the hierarchy as an Array. + The root logger is not included in the returned + enumeration. + + + + + + Return a new logger instance named as the first parameter using + the default factory. + + + + Return a new logger instance named as the first parameter using + the default factory. + + + If a logger of that name already exists, then it will be + returned. Otherwise, a new logger will be instantiated and + then linked with its existing ancestors as well as children. + + + The name of the logger to retrieve + The logger object with the name specified + + + + Shutting down a hierarchy will safely close and remove + all appenders in all loggers including the root logger. + + + + Shutting down a hierarchy will safely close and remove + all appenders in all loggers including the root logger. + + + Some appenders need to be closed before the + application exists. Otherwise, pending logging events might be + lost. + + + The Shutdown method is careful to close nested + appenders before closing regular appenders. This is allows + configurations where a regular appender is attached to a logger + and again to a nested appender. + + + + + + Reset all values contained in this hierarchy instance to their default. + + + + Reset all values contained in this hierarchy instance to their + default. This removes all appenders from all loggers, sets + the level of all non-root loggers to null, + sets their additivity flag to true and sets the level + of the root logger to . Moreover, + message disabling is set its default "off" value. + + + Existing loggers are not removed. They are just reset. + + + This method should be used sparingly and with care as it will + block all logging until it is completed. + + + + + + Log the logEvent through this hierarchy. + + the event to log + + + This method should not normally be used to log. + The interface should be used + for routine logging. This interface can be obtained + using the method. + + + The logEvent is delivered to the appropriate logger and + that logger is then responsible for logging the event. + + + + + + Returns all the Appenders that are currently configured + + An array containing all the currently configured appenders + + + Returns all the instances that are currently configured. + All the loggers are searched for appenders. The appenders may also be containers + for appenders and these are also searched for additional loggers. + + + The list returned is unordered but does not contain duplicates. + + + + + + Collect the appenders from an . + The appender may also be a container. + + + + + + + Collect the appenders from an container + + + + + + + Initialize the log4net system using the specified appender + + the appender to use to log all logging events + + + + Initialize the log4net system using the specified appender + + the appender to use to log all logging events + + + This method provides the same functionality as the + method implemented + on this object, but it is protected and therefore can be called by subclasses. + + + + + + Initialize the log4net system using the specified config + + the element containing the root of the config + + + + Initialize the log4net system using the specified config + + the element containing the root of the config + + + This method provides the same functionality as the + method implemented + on this object, but it is protected and therefore can be called by subclasses. + + + + + + Test if this hierarchy is disabled for the specified . + + The level to check against. + + true if the repository is disabled for the level argument, false otherwise. + + + + If this hierarchy has not been configured then this method will + always return true. + + + This method will return true if this repository is + disabled for level object passed as parameter and + false otherwise. + + + See also the property. + + + + + + Clear all logger definitions from the internal hashtable + + + + This call will clear all logger definitions from the internal + hashtable. Invoking this method will irrevocably mess up the + logger hierarchy. + + + You should really know what you are doing before + invoking this method. + + + + + + Return a new logger instance named as the first parameter using + . + + The name of the logger to retrieve + The factory that will make the new logger instance + The logger object with the name specified + + + If a logger of that name already exists, then it will be + returned. Otherwise, a new logger will be instantiated by the + parameter and linked with its existing + ancestors as well as children. + + + + + + Sends a logger creation event to all registered listeners + + The newly created logger + + Raises the logger creation event. + + + + + Updates all the parents of the specified logger + + The logger to update the parents for + + + This method loops through all the potential parents of + . There 3 possible cases: + + + + No entry for the potential parent of exists + + We create a ProvisionNode for this potential + parent and insert in that provision node. + + + + The entry is of type Logger for the potential parent. + + The entry is 's nearest existing parent. We + update 's parent field with this entry. We also break from + he loop because updating our parent's parent is our parent's + responsibility. + + + + The entry is of type ProvisionNode for this potential parent. + + We add to the list of children for this + potential parent. + + + + + + + + Replace a with a in the hierarchy. + + + + + + We update the links for all the children that placed themselves + in the provision node 'pn'. The second argument 'log' is a + reference for the newly created Logger, parent of all the + children in 'pn'. + + + We loop on all the children 'c' in 'pn'. + + + If the child 'c' has been already linked to a child of + 'log' then there is no need to update 'c'. + + + Otherwise, we set log's parent field to c's parent and set + c's parent field to log. + + + + + + Define or redefine a Level using the values in the argument + + the level values + + + Define or redefine a Level using the values in the argument + + + Supports setting levels via the configuration file. + + + + + + Set a Property using the values in the argument + + the property value + + + Set a Property using the values in the argument. + + + Supports setting property values via the configuration file. + + + + + + Event used to notify that a logger has been created. + + + + Event raised when a logger is created. + + + + + + Has no appender warning been emitted + + + + Flag to indicate if we have already issued a warning + about not having an appender warning. + + + + + + Get the root of this hierarchy + + + + Get the root of this hierarchy. + + + + + + Gets or sets the default instance. + + The default + + + The logger factory is used to create logger instances. + + + + + + A class to hold the value, name and display name for a level + + + + A class to hold the value, name and display name for a level + + + + + + Override Object.ToString to return sensible debug info + + string info about this object + + + + Value of the level + + + + If the value is not set (defaults to -1) the value will be looked + up for the current level with the same name. + + + + + + Name of the level + + + The name of the level + + + + The name of the level. + + + + + + Display name for the level + + + The display name of the level + + + + The display name of the level. + + + + + + A class to hold the key and data for a property set in the config file + + + + A class to hold the key and data for a property set in the config file + + + + + + Override Object.ToString to return sensible debug info + + string info about this object + + + + Property Key + + + Property Key + + + + Property Key. + + + + + + Property Value + + + Property Value + + + + Property Value. + + + + + + Used internally to accelerate hash table searches. + + + + Internal class used to improve performance of + string keyed hashtables. + + + The hashcode of the string is cached for reuse. + The string is stored as an interned value. + When comparing two objects for equality + the reference equality of the interned strings is compared. + + + Nicko Cadell + Gert Driesen + + + + Construct key with string name + + + + Initializes a new instance of the class + with the specified name. + + + Stores the hashcode of the string and interns + the string key to optimize comparisons. + + + The Compact Framework 1.0 the + method does not work. On the Compact Framework + the string keys are not interned nor are they + compared by reference. + + + The name of the logger. + + + + Returns a hash code for the current instance. + + A hash code for the current instance. + + + Returns the cached hashcode. + + + + + + Determines whether two instances + are equal. + + The to compare with the current . + + true if the specified is equal to the current ; otherwise, false. + + + + Compares the references of the interned strings. + + + + + + Provision nodes are used where no logger instance has been specified + + + + instances are used in the + when there is no specified + for that node. + + + A provision node holds a list of child loggers on behalf of + a logger that does not exist. + + + Nicko Cadell + Gert Driesen + + + + Create a new provision node with child node + + A child logger to add to this node. + + + Initializes a new instance of the class + with the specified child logger. + + + + + + The sits at the root of the logger hierarchy tree. + + + + The is a regular except + that it provides several guarantees. + + + First, it cannot be assigned a null + level. Second, since the root logger cannot have a parent, the + property always returns the value of the + level field without walking the hierarchy. + + + Nicko Cadell + Gert Driesen + + + + Construct a + + The level to assign to the root logger. + + + Initializes a new instance of the class with + the specified logging level. + + + The root logger names itself as "root". However, the root + logger cannot be retrieved by name. + + + + + + Gets the assigned level value without walking the logger hierarchy. + + The assigned level value without walking the logger hierarchy. + + + Because the root logger cannot have a parent and its level + must not be null this property just returns the + value of . + + + + + + Gets or sets the assigned for the root logger. + + + The of the root logger. + + + + Setting the level of the root logger to a null reference + may have catastrophic results. We prevent this here. + + + + + + Initializes the log4net environment using an XML DOM. + + + + Configures a using an XML DOM. + + + Nicko Cadell + Gert Driesen + + + + Construct the configurator for a hierarchy + + The hierarchy to build. + + + Initializes a new instance of the class + with the specified . + + + + + + Configure the hierarchy by parsing a DOM tree of XML elements. + + The root element to parse. + + + Configure the hierarchy by parsing a DOM tree of XML elements. + + + + + + Parse appenders by IDREF. + + The appender ref element. + The instance of the appender that the ref refers to. + + + Parse an XML element that represents an appender and return + the appender. + + + + + + Parses an appender element. + + The appender element. + The appender instance or null when parsing failed. + + + Parse an XML element that represents an appender and return + the appender instance. + + + + + + Parses a logger element. + + The logger element. + + + Parse an XML element that represents a logger. + + + + + + Parses the root logger element. + + The root element. + + + Parse an XML element that represents the root logger. + + + + + + Parses the children of a logger element. + + The category element. + The logger instance. + Flag to indicate if the logger is the root logger. + + + Parse the child elements of a <logger> element. + + + + + + Parses an object renderer. + + The renderer element. + + + Parse an XML element that represents a renderer. + + + + + + Parses a level element. + + The level element. + The logger object to set the level on. + Flag to indicate if the logger is the root logger. + + + Parse an XML element that represents a level. + + + + + + Sets a parameter on an object. + + The parameter element. + The object to set the parameter on. + + The parameter name must correspond to a writable property + on the object. The value of the parameter is a string, + therefore this function will attempt to set a string + property first. If unable to set a string property it + will inspect the property and its argument type. It will + attempt to call a static method called Parse on the + type of the property. This method will take a single + string argument and return a value that can be used to + set the property. + + + + + Test if an element has no attributes or child elements + + the element to inspect + true if the element has any attributes or child elements, false otherwise + + + + Test if a is constructible with Activator.CreateInstance. + + the type to inspect + true if the type is creatable using a default constructor, false otherwise + + + + Look for a method on the that matches the supplied + + the type that has the method + the name of the method + the method info found + + + The method must be a public instance method on the . + The method must be named or "Add" followed by . + The method must take a single parameter. + + + + + + Converts a string value to a target type. + + The type of object to convert the string to. + The string value to use as the value of the object. + + + An object of type with value or + null when the conversion could not be performed. + + + + + + Creates an object as specified in XML. + + The XML element that contains the definition of the object. + The object type to use if not explicitly specified. + The type that the returned object must be or must inherit from. + The object or null + + + Parse an XML element and create an object instance based on the configuration + data. + + + The type of the instance may be specified in the XML. If not + specified then the is used + as the type. However the type is specified it must support the + type. + + + + + + key: appenderName, value: appender. + + + + + The Hierarchy being configured. + + + + + Delegate used to handle logger repository shutdown event notifications + + The that is shutting down. + Empty event args + + + Delegate used to handle logger repository shutdown event notifications. + + + + + + Delegate used to handle logger repository configuration reset event notifications + + The that has had its configuration reset. + Empty event args + + + Delegate used to handle logger repository configuration reset event notifications. + + + + + + Delegate used to handle event notifications for logger repository configuration changes. + + The that has had its configuration changed. + Empty event arguments. + + + Delegate used to handle event notifications for logger repository configuration changes. + + + + + + Write the name of the current AppDomain to the output + + + + Write the name of the current AppDomain to the output writer + + + Nicko Cadell + + + + Write the name of the current AppDomain to the output + + the writer to write to + null, state is not set + + + Writes name of the current AppDomain to the output . + + + + + + Write the current date to the output + + + + Date pattern converter, uses a to format + the current date and time to the writer as a string. + + + The value of the determines + the formatting of the date. The following values are allowed: + + + Option value + Output + + + ISO8601 + + Uses the formatter. + Formats using the "yyyy-MM-dd HH:mm:ss,fff" pattern. + + + + DATE + + Uses the formatter. + Formats using the "dd MMM yyyy HH:mm:ss,fff" for example, "06 Nov 1994 15:49:37,459". + + + + ABSOLUTE + + Uses the formatter. + Formats using the "HH:mm:ss,fff" for example, "15:49:37,459". + + + + other + + Any other pattern string uses the formatter. + This formatter passes the pattern string to the + method. + For details on valid patterns see + DateTimeFormatInfo Class. + + + + + + The date and time is in the local time zone and is rendered in that zone. + To output the time in Universal time see . + + + Nicko Cadell + + + + The used to render the date to a string + + + + The used to render the date to a string + + + + + + Initialize the converter options + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Write the current date to the output + + that will receive the formatted result. + null, state is not set + + + Pass the current date and time to the + for it to render it to the writer. + + + The date and time passed is in the local time zone. + + + + + + Write an environment variable to the output + + + + Write an environment variable to the output writer. + The value of the determines + the name of the variable to output. + + + Nicko Cadell + + + + Write an environment variable to the output + + the writer to write to + null, state is not set + + + Writes the environment variable to the output . + The name of the environment variable to output must be set + using the + property. + + + + + + Write the current thread identity to the output + + + + Write the current thread identity to the output writer + + + Nicko Cadell + + + + Write the current thread identity to the output + + the writer to write to + null, state is not set + + + Writes the current thread identity to the output . + + + + + + Pattern converter for literal string instances in the pattern + + + + Writes the literal string value specified in the + property to + the output. + + + Nicko Cadell + + + + Set the next converter in the chain + + The next pattern converter in the chain + The next pattern converter + + + Special case the building of the pattern converter chain + for instances. Two adjacent + literals in the pattern can be represented by a single combined + pattern converter. This implementation detects when a + is added to the chain + after this converter and combines its value with this converter's + literal value. + + + + + + Write the literal to the output + + the writer to write to + null, not set + + + Override the formatting behavior to ignore the FormattingInfo + because we have a literal instead. + + + Writes the value of + to the output . + + + + + + Convert this pattern into the rendered message + + that will receive the formatted result. + null, not set + + + This method is not used. + + + + + + Writes a newline to the output + + + + Writes the system dependent line terminator to the output. + This behavior can be overridden by setting the : + + + + Option Value + Output + + + DOS + DOS or Windows line terminator "\r\n" + + + UNIX + UNIX line terminator "\n" + + + + Nicko Cadell + + + + Initialize the converter + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Write the current process ID to the output + + + + Write the current process ID to the output writer + + + Nicko Cadell + + + + Write the current process ID to the output + + the writer to write to + null, state is not set + + + Write the current process ID to the output . + + + + + + Property pattern converter + + + + This pattern converter reads the thread and global properties. + The thread properties take priority over global properties. + See for details of the + thread properties. See for + details of the global properties. + + + If the is specified then that will be used to + lookup a single property. If no is specified + then all properties will be dumped as a list of key value pairs. + + + Nicko Cadell + + + + Write the property value to the output + + that will receive the formatted result. + null, state is not set + + + Writes out the value of a named property. The property name + should be set in the + property. + + + If the is set to null + then all the properties are written as key value pairs. + + + + + + A Pattern converter that generates a string of random characters + + + + The converter generates a string of random characters. By default + the string is length 4. This can be changed by setting the + to the string value of the length required. + + + The random characters in the string are limited to uppercase letters + and numbers only. + + + The random number generator used by this class is not cryptographically secure. + + + Nicko Cadell + + + + Shared random number generator + + + + + Length of random string to generate. Default length 4. + + + + + Initialize the converter options + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Write a randoim string to the output + + the writer to write to + null, state is not set + + + Write a randoim string to the output . + + + + + + Write the current threads username to the output + + + + Write the current threads username to the output writer + + + Nicko Cadell + + + + Write the current threads username to the output + + the writer to write to + null, state is not set + + + Write the current threads username to the output . + + + + + + Write the UTC date time to the output + + + + Date pattern converter, uses a to format + the current date and time in Universal time. + + + See the for details on the date pattern syntax. + + + + Nicko Cadell + + + + Write the current date and time to the output + + that will receive the formatted result. + null, state is not set + + + Pass the current date and time to the + for it to render it to the writer. + + + The date is in Universal time when it is rendered. + + + + + + + Type converter for Boolean. + + + + Supports conversion from string to bool type. + + + + + + Nicko Cadell + Gert Driesen + + + + Can the source type be converted to the type supported by this object + + the type to convert + true if the conversion is possible + + + Returns true if the is + the type. + + + + + + Convert the source object to the type supported by this object + + the object to convert + the converted object + + + Uses the method to convert the + argument to a . + + + + The object cannot be converted to the + target type. To check for this condition use the + method. + + + + + Exception base type for conversion errors. + + + + This type extends . It + does not add any new functionality but does differentiate the + type of exception being thrown. + + + Nicko Cadell + Gert Driesen + + + + Constructor + + + + Initializes a new instance of the class. + + + + + + Constructor + + A message to include with the exception. + + + Initializes a new instance of the class + with the specified message. + + + + + + Constructor + + A message to include with the exception. + A nested exception to include. + + + Initializes a new instance of the class + with the specified message and inner exception. + + + + + + Serialization constructor + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + + + Initializes a new instance of the class + with serialized data. + + + + + + Creates a new instance of the class. + + The conversion destination type. + The value to convert. + An instance of the . + + + Creates a new instance of the class. + + + + + + Creates a new instance of the class. + + The conversion destination type. + The value to convert. + A nested exception to include. + An instance of the . + + + Creates a new instance of the class. + + + + + + Register of type converters for specific types. + + + + Maintains a registry of type converters used to convert between + types. + + + Use the and + methods to register new converters. + The and methods + lookup appropriate converters to use. + + + + + Nicko Cadell + Gert Driesen + + + + Private constructor + + + Initializes a new instance of the class. + + + + + Static constructor. + + + + This constructor defines the intrinsic type converters. + + + + + + Adds a converter for a specific type. + + The type being converted to. + The type converter to use to convert to the destination type. + + + Adds a converter instance for a specific type. + + + + + + Adds a converter for a specific type. + + The type being converted to. + The type of the type converter to use to convert to the destination type. + + + Adds a converter for a specific type. + + + + + + Gets the type converter to use to convert values to the destination type. + + The type being converted from. + The type being converted to. + + The type converter instance to use for type conversions or null + if no type converter is found. + + + + Gets the type converter to use to convert values to the destination type. + + + + + + Gets the type converter to use to convert values to the destination type. + + The type being converted to. + + The type converter instance to use for type conversions or null + if no type converter is found. + + + + Gets the type converter to use to convert values to the destination type. + + + + + + Lookups the type converter to use as specified by the attributes on the + destination type. + + The type being converted to. + + The type converter instance to use for type conversions or null + if no type converter is found. + + + + + Creates the instance of the type converter. + + The type of the type converter. + + The type converter instance to use for type conversions or null + if no type converter is found. + + + + The type specified for the type converter must implement + the or interfaces + and must have a public default (no argument) constructor. + + + + + + Mapping from to type converter. + + + + + Supports conversion from string to type. + + + + Supports conversion from string to type. + + + + + + Nicko Cadell + Gert Driesen + + + + Can the source type be converted to the type supported by this object + + the type to convert + true if the conversion is possible + + + Returns true if the is + the type. + + + + + + Overrides the ConvertFrom method of IConvertFrom. + + the object to convert to an encoding + the encoding + + + Uses the method to + convert the argument to an . + + + + The object cannot be converted to the + target type. To check for this condition use the + method. + + + + + Interface supported by type converters + + + + This interface supports conversion from a single type to arbitrary types. + See . + + + Nicko Cadell + + + + Returns whether this converter can convert the object to the specified type + + A Type that represents the type you want to convert to + true if the conversion is possible + + + Test if the type supported by this converter can be converted to the + . + + + + + + Converts the given value object to the specified type, using the arguments + + the object to convert + The Type to convert the value parameter to + the converted object + + + Converts the (which must be of the type supported + by this converter) to the specified.. + + + + + + Supports conversion from string to type. + + + + Supports conversion from string to type. + + + + + Nicko Cadell + + + + Can the source type be converted to the type supported by this object + + the type to convert + true if the conversion is possible + + + Returns true if the is + the type. + + + + + + Overrides the ConvertFrom method of IConvertFrom. + + the object to convert to an IPAddress + the IPAddress + + + Uses the method to convert the + argument to an . + If that fails then the string is resolved as a DNS hostname. + + + + The object cannot be converted to the + target type. To check for this condition use the + method. + + + + + Valid characters in an IPv4 or IPv6 address string. (Does not support subnets) + + + + + Supports conversion from string to type. + + + + Supports conversion from string to type. + + + The string is used as the + of the . + + + + + + Nicko Cadell + + + + Can the source type be converted to the type supported by this object + + the type to convert + true if the conversion is possible + + + Returns true if the is + the type. + + + + + + Overrides the ConvertFrom method of IConvertFrom. + + the object to convert to a PatternLayout + the PatternLayout + + + Creates and returns a new using + the as the + . + + + + The object cannot be converted to the + target type. To check for this condition use the + method. + + + + + Convert between string and + + + + Supports conversion from string to type, + and from a type to a string. + + + The string is used as the + of the . + + + + + + Nicko Cadell + + + + Can the target type be converted to the type supported by this object + + A that represents the type you want to convert to + true if the conversion is possible + + + Returns true if the is + assignable from a type. + + + + + + Converts the given value object to the specified type, using the arguments + + the object to convert + The Type to convert the value parameter to + the converted object + + + Uses the method to convert the + argument to a . + + + + The object cannot be converted to the + . To check for this condition use the + method. + + + + + Can the source type be converted to the type supported by this object + + the type to convert + true if the conversion is possible + + + Returns true if the is + the type. + + + + + + Overrides the ConvertFrom method of IConvertFrom. + + the object to convert to a PatternString + the PatternString + + + Creates and returns a new using + the as the + . + + + + The object cannot be converted to the + target type. To check for this condition use the + method. + + + + + Supports conversion from string to type. + + + + Supports conversion from string to type. + + + + + + Nicko Cadell + + + + Can the source type be converted to the type supported by this object + + the type to convert + true if the conversion is possible + + + Returns true if the is + the type. + + + + + + Overrides the ConvertFrom method of IConvertFrom. + + the object to convert to a Type + the Type + + + Uses the method to convert the + argument to a . + Additional effort is made to locate partially specified types + by searching the loaded assemblies. + + + + The object cannot be converted to the + target type. To check for this condition use the + method. + + + + + Attribute used to associate a type converter + + + + Class and Interface level attribute that specifies a type converter + to use with the associated type. + + + To associate a type converter with a target type apply a + TypeConverterAttribute to the target type. Specify the + type of the type converter on the attribute. + + + Nicko Cadell + Gert Driesen + + + + The string type name of the type converter + + + + + Default constructor + + + + Default constructor + + + + + + Create a new type converter attribute for the specified type name + + The string type name of the type converter + + + The type specified must implement the + or the interfaces. + + + + + + Create a new type converter attribute for the specified type + + The type of the type converter + + + The type specified must implement the + or the interfaces. + + + + + + The string type name of the type converter + + + The string type name of the type converter + + + + The type specified must implement the + or the interfaces. + + + + + + A straightforward implementation of the interface. + + + + This is the default implementation of the + interface. Implementors of the interface + should aggregate an instance of this type. + + + Nicko Cadell + Gert Driesen + + + + Constructor + + + + Initializes a new instance of the class. + + + + + + Append on on all attached appenders. + + The event being logged. + The number of appenders called. + + + Calls the method on all + attached appenders. + + + + + + Append on on all attached appenders. + + The array of events being logged. + The number of appenders called. + + + Calls the method on all + attached appenders. + + + + + + Calls the DoAppende method on the with + the objects supplied. + + The appender + The events + + + If the supports the + interface then the will be passed + through using that interface. Otherwise the + objects in the array will be passed one at a time. + + + + + + Attaches an appender. + + The appender to add. + + + If the appender is already in the list it won't be added again. + + + + + + Gets an attached appender with the specified name. + + The name of the appender to get. + + The appender with the name specified, or null if no appender with the + specified name is found. + + + + Lookup an attached appender by name. + + + + + + Removes all attached appenders. + + + + Removes and closes all attached appenders + + + + + + Removes the specified appender from the list of attached appenders. + + The appender to remove. + The appender removed from the list + + + The appender removed is not closed. + If you are discarding the appender you must call + on the appender removed. + + + + + + Removes the appender with the specified name from the list of appenders. + + The name of the appender to remove. + The appender removed from the list + + + The appender removed is not closed. + If you are discarding the appender you must call + on the appender removed. + + + + + + List of appenders + + + + + Array of appenders, used to cache the m_appenderList + + + + + Gets all attached appenders. + + + A collection of attached appenders, or null if there + are no attached appenders. + + + + The read only collection of all currently attached appenders. + + + + + + This class aggregates several PropertiesDictionary collections together. + + + + Provides a dictionary style lookup over an ordered list of + collections. + + + Nicko Cadell + + + + Constructor + + + + Initializes a new instance of the class. + + + + + + Add a Properties Dictionary to this composite collection + + the properties to add + + + Properties dictionaries added first take precedence over dictionaries added + later. + + + + + + Flatten this composite collection into a single properties dictionary + + the flattened dictionary + + + Reduces the collection of ordered dictionaries to a single dictionary + containing the resultant values for the keys. + + + + + + Gets the value of a property + + + The value for the property with the specified key + + + + Looks up the value for the specified. + The collections are searched + in the order in which they were added to this collection. The value + returned is the value held by the first collection that contains + the specified key. + + + If none of the collections contain the specified key then + null is returned. + + + + + + Base class for Context Properties implementations + + + + This class defines a basic property get set accessor + + + Nicko Cadell + + + + Gets or sets the value of a property + + + The value for the property with the specified key + + + + Gets or sets the value of a property + + + + + + Subclass of that maintains a count of + the number of bytes written. + + + + This writer counts the number of bytes written. + + + Nicko Cadell + Gert Driesen + + + + that does not leak exceptions + + + + does not throw exceptions when things go wrong. + Instead, it delegates error handling to its . + + + Nicko Cadell + Gert Driesen + + + + Adapter that extends and forwards all + messages to an instance of . + + + + Adapter that extends and forwards all + messages to an instance of . + + + Nicko Cadell + + + + The writer to forward messages to + + + + + Create an instance of that forwards all + messages to a . + + The to forward to + + + Create an instance of that forwards all + messages to a . + + + + + + Closes the writer and releases any system resources associated with the writer + + + + + + + + + Dispose this writer + + flag indicating if we are being disposed + + + Dispose this writer + + + + + + Flushes any buffered output + + + + Clears all buffers for the writer and causes any buffered data to be written + to the underlying device + + + + + + Writes a character to the wrapped TextWriter + + the value to write to the TextWriter + + + Writes a character to the wrapped TextWriter + + + + + + Writes a character buffer to the wrapped TextWriter + + the data buffer + the start index + the number of characters to write + + + Writes a character buffer to the wrapped TextWriter + + + + + + Writes a string to the wrapped TextWriter + + the value to write to the TextWriter + + + Writes a string to the wrapped TextWriter + + + + + + Gets or sets the underlying . + + + The underlying . + + + + Gets or sets the underlying . + + + + + + The Encoding in which the output is written + + + The + + + + The Encoding in which the output is written + + + + + + Gets an object that controls formatting + + + The format provider + + + + Gets an object that controls formatting + + + + + + Gets or sets the line terminator string used by the TextWriter + + + The line terminator to use + + + + Gets or sets the line terminator string used by the TextWriter + + + + + + Constructor + + the writer to actually write to + the error handler to report error to + + + Create a new QuietTextWriter using a writer and error handler + + + + + + Writes a character to the underlying writer + + the char to write + + + Writes a character to the underlying writer + + + + + + Writes a buffer to the underlying writer + + the buffer to write + the start index to write from + the number of characters to write + + + Writes a buffer to the underlying writer + + + + + + Writes a string to the output. + + The string data to write to the output. + + + Writes a string to the output. + + + + + + Closes the underlying output writer. + + + + Closes the underlying output writer. + + + + + + The error handler instance to pass all errors to + + + + + Flag to indicate if this writer is closed + + + + + Gets or sets the error handler that all errors are passed to. + + + The error handler that all errors are passed to. + + + + Gets or sets the error handler that all errors are passed to. + + + + + + Gets a value indicating whether this writer is closed. + + + true if this writer is closed, otherwise false. + + + + Gets a value indicating whether this writer is closed. + + + + + + Constructor + + The to actually write to. + The to report errors to. + + + Creates a new instance of the class + with the specified and . + + + + + + Writes a character to the underlying writer and counts the number of bytes written. + + the char to write + + + Overrides implementation of . Counts + the number of bytes written. + + + + + + Writes a buffer to the underlying writer and counts the number of bytes written. + + the buffer to write + the start index to write from + the number of characters to write + + + Overrides implementation of . Counts + the number of bytes written. + + + + + + Writes a string to the output and counts the number of bytes written. + + The string data to write to the output. + + + Overrides implementation of . Counts + the number of bytes written. + + + + + + Total number of bytes written. + + + + + Gets or sets the total number of bytes written. + + + The total number of bytes written. + + + + Gets or sets the total number of bytes written. + + + + + + A fixed size rolling buffer of logging events. + + + + An array backed fixed size leaky bucket. + + + Nicko Cadell + Gert Driesen + + + + Constructor + + The maximum number of logging events in the buffer. + + + Initializes a new instance of the class with + the specified maximum number of buffered logging events. + + + The argument is not a positive integer. + + + + Appends a to the buffer. + + The event to append to the buffer. + The event discarded from the buffer, if the buffer is full, otherwise null. + + + Append an event to the buffer. If the buffer still contains free space then + null is returned. If the buffer is full then an event will be dropped + to make space for the new event, the event dropped is returned. + + + + + + Get and remove the oldest event in the buffer. + + The oldest logging event in the buffer + + + Gets the oldest (first) logging event in the buffer and removes it + from the buffer. + + + + + + Pops all the logging events from the buffer into an array. + + An array of all the logging events in the buffer. + + + Get all the events in the buffer and clear the buffer. + + + + + + Clear the buffer + + + + Clear the buffer of all events. The events in the buffer are lost. + + + + + + Gets the th oldest event currently in the buffer. + + The th oldest event currently in the buffer. + + + If is outside the range 0 to the number of events + currently in the buffer, then null is returned. + + + + + + Gets the maximum size of the buffer. + + The maximum size of the buffer. + + + Gets the maximum size of the buffer + + + + + + Gets the number of logging events in the buffer. + + The number of logging events in the buffer. + + + This number is guaranteed to be in the range 0 to + (inclusive). + + + + + + An always empty . + + + + A singleton implementation of the + interface that always represents an empty collection. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Uses a private access modifier to enforce the singleton pattern. + + + + + + Copies the elements of the to an + , starting at a particular Array index. + + The one-dimensional + that is the destination of the elements copied from + . The Array must have zero-based + indexing. + The zero-based index in array at which + copying begins. + + + As the collection is empty no values are copied into the array. + + + + + + Returns an enumerator that can iterate through a collection. + + + An that can be used to + iterate through the collection. + + + + As the collection is empty a is returned. + + + + + + The singleton instance of the empty collection. + + + + + Gets the singleton instance of the empty collection. + + The singleton instance of the empty collection. + + + Gets the singleton instance of the empty collection. + + + + + + Gets a value indicating if access to the is synchronized (thread-safe). + + + true if access to the is synchronized (thread-safe); otherwise, false. + + + + For the this property is always true. + + + + + + Gets the number of elements contained in the . + + + The number of elements contained in the . + + + + As the collection is empty the is always 0. + + + + + + Gets an object that can be used to synchronize access to the . + + + An object that can be used to synchronize access to the . + + + + As the collection is empty and thread safe and synchronized this instance is also + the object. + + + + + + An always empty . + + + + A singleton implementation of the + interface that always represents an empty collection. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Uses a private access modifier to enforce the singleton pattern. + + + + + + Copies the elements of the to an + , starting at a particular Array index. + + The one-dimensional + that is the destination of the elements copied from + . The Array must have zero-based + indexing. + The zero-based index in array at which + copying begins. + + + As the collection is empty no values are copied into the array. + + + + + + Returns an enumerator that can iterate through a collection. + + + An that can be used to + iterate through the collection. + + + + As the collection is empty a is returned. + + + + + + Adds an element with the provided key and value to the + . + + The to use as the key of the element to add. + The to use as the value of the element to add. + + + As the collection is empty no new values can be added. A + is thrown if this method is called. + + + This dictionary is always empty and cannot be modified. + + + + Removes all elements from the . + + + + As the collection is empty no values can be removed. A + is thrown if this method is called. + + + This dictionary is always empty and cannot be modified. + + + + Determines whether the contains an element + with the specified key. + + The key to locate in the . + false + + + As the collection is empty the method always returns false. + + + + + + Returns an enumerator that can iterate through a collection. + + + An that can be used to + iterate through the collection. + + + + As the collection is empty a is returned. + + + + + + Removes the element with the specified key from the . + + The key of the element to remove. + + + As the collection is empty no values can be removed. A + is thrown if this method is called. + + + This dictionary is always empty and cannot be modified. + + + + The singleton instance of the empty dictionary. + + + + + Gets the singleton instance of the . + + The singleton instance of the . + + + Gets the singleton instance of the . + + + + + + Gets a value indicating if access to the is synchronized (thread-safe). + + + true if access to the is synchronized (thread-safe); otherwise, false. + + + + For the this property is always true. + + + + + + Gets the number of elements contained in the + + + The number of elements contained in the . + + + + As the collection is empty the is always 0. + + + + + + Gets an object that can be used to synchronize access to the . + + + An object that can be used to synchronize access to the . + + + + As the collection is empty and thread safe and synchronized this instance is also + the object. + + + + + + Gets a value indicating whether the has a fixed size. + + true + + + As the collection is empty always returns true. + + + + + + Gets a value indicating whether the is read-only. + + true + + + As the collection is empty always returns true. + + + + + + Gets an containing the keys of the . + + An containing the keys of the . + + + As the collection is empty a is returned. + + + + + + Gets an containing the values of the . + + An containing the values of the . + + + As the collection is empty a is returned. + + + + + + Gets or sets the element with the specified key. + + The key of the element to get or set. + null + + + As the collection is empty no values can be looked up or stored. + If the index getter is called then null is returned. + A is thrown if the setter is called. + + + This dictionary is always empty and cannot be modified. + + + + Contain the information obtained when parsing formatting modifiers + in conversion modifiers. + + + + Holds the formatting information extracted from the format string by + the . This is used by the + objects when rendering the output. + + + Nicko Cadell + Gert Driesen + + + + Defaut Constructor + + + + Initializes a new instance of the class. + + + + + + Constructor + + + + Initializes a new instance of the class + with the specified parameters. + + + + + + Gets or sets the minimum value. + + + The minimum value. + + + + Gets or sets the minimum value. + + + + + + Gets or sets the maximum value. + + + The maximum value. + + + + Gets or sets the maximum value. + + + + + + Gets or sets a flag indicating whether left align is enabled + or not. + + + A flag indicating whether left align is enabled or not. + + + + Gets or sets a flag indicating whether left align is enabled or not. + + + + + + Implementation of Properties collection for the + + + + This class implements a properties collection that is thread safe and supports both + storing properties and capturing a read only copy of the current propertied. + + + This class is optimized to the scenario where the properties are read frequently + and are modified infrequently. + + + Nicko Cadell + + + + The read only copy of the properties. + + + + This variable is declared volatile to prevent the compiler and JIT from + reordering reads and writes of this thread performed on different threads. + + + + + + Lock object used to synchronize updates within this instance + + + + + Constructor + + + + Initializes a new instance of the class. + + + + + + Remove a property from the global context + + the key for the entry to remove + + + Removing an entry from the global context properties is relatively expensive compared + with reading a value. + + + + + + Clear the global context properties + + + + + Get a readonly immutable copy of the properties + + the current global context properties + + + This implementation is fast because the GlobalContextProperties class + stores a readonly copy of the properties. + + + + + + Gets or sets the value of a property + + + The value for the property with the specified key + + + + Reading the value for a key is faster than setting the value. + When the value is written a new read only copy of + the properties is created. + + + + + + Manages a mapping from levels to + + + + Manages an ordered mapping from instances + to subclasses. + + + Nicko Cadell + + + + Default constructor + + + + Initialise a new instance of . + + + + + + Add a to this mapping + + the entry to add + + + If a has previously been added + for the same then that entry will be + overwritten. + + + + + + Lookup the mapping for the specified level + + the level to lookup + the for the level or null if no mapping found + + + Lookup the value for the specified level. Finds the nearest + mapping value for the level that is equal to or less than the + specified. + + + If no mapping could be found then null is returned. + + + + + + Initialize options + + + + Caches the sorted list of in an array + + + + + + Implementation of Properties collection for the + + + + Class implements a collection of properties that is specific to each thread. + The class is not synchronized as each thread has its own . + + + Nicko Cadell + + + + Constructor + + + + Initializes a new instance of the class. + + + + + + Remove a property + + the key for the entry to remove + + + Remove the value for the specified from the context. + + + + + + Clear all the context properties + + + + Clear all the context properties + + + + + + Get the PropertiesDictionary stored in the LocalDataStoreSlot for this thread. + + create the dictionary if it does not exist, otherwise return null if is does not exist + the properties for this thread + + + The collection returned is only to be used on the calling thread. If the + caller needs to share the collection between different threads then the + caller must clone the collection before doings so. + + + + + + Gets or sets the value of a property + + + The value for the property with the specified key + + + + Get or set the property value for the specified. + + + + + + Outputs log statements from within the log4net assembly. + + + + Log4net components cannot make log4net logging calls. However, it is + sometimes useful for the user to learn about what log4net is + doing. + + + All log4net internal debug calls go to the standard output stream + whereas internal error messages are sent to the standard error output + stream. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Uses a private access modifier to prevent instantiation of this class. + + + + + + Static constructor that initializes logging by reading + settings from the application configuration file. + + + + The log4net.Internal.Debug application setting + controls internal debugging. This setting should be set + to true to enable debugging. + + + The log4net.Internal.Quiet application setting + suppresses all internal logging including error messages. + This setting should be set to true to enable message + suppression. + + + + + + Writes log4net internal debug messages to the + standard output stream. + + The message to log. + + + All internal debug messages are prepended with + the string "log4net: ". + + + + + + Writes log4net internal debug messages to the + standard output stream. + + The message to log. + An exception to log. + + + All internal debug messages are prepended with + the string "log4net: ". + + + + + + Writes log4net internal warning messages to the + standard error stream. + + The message to log. + + + All internal warning messages are prepended with + the string "log4net:WARN ". + + + + + + Writes log4net internal warning messages to the + standard error stream. + + The message to log. + An exception to log. + + + All internal warning messages are prepended with + the string "log4net:WARN ". + + + + + + Writes log4net internal error messages to the + standard error stream. + + The message to log. + + + All internal error messages are prepended with + the string "log4net:ERROR ". + + + + + + Writes log4net internal error messages to the + standard error stream. + + The message to log. + An exception to log. + + + All internal debug messages are prepended with + the string "log4net:ERROR ". + + + + + + Writes output to the standard output stream. + + The message to log. + + + Writes to both Console.Out and System.Diagnostics.Trace. + Note that the System.Diagnostics.Trace is not supported + on the Compact Framework. + + + If the AppDomain is not configured with a config file then + the call to System.Diagnostics.Trace may fail. This is only + an issue if you are programmatically creating your own AppDomains. + + + + + + Writes output to the standard error stream. + + The message to log. + + + Writes to both Console.Error and System.Diagnostics.Trace. + Note that the System.Diagnostics.Trace is not supported + on the Compact Framework. + + + If the AppDomain is not configured with a config file then + the call to System.Diagnostics.Trace may fail. This is only + an issue if you are programmatically creating your own AppDomains. + + + + + + Default debug level + + + + + In quietMode not even errors generate any output. + + + + + Gets or sets a value indicating whether log4net internal logging + is enabled or disabled. + + + true if log4net internal logging is enabled, otherwise + false. + + + + When set to true, internal debug level logging will be + displayed. + + + This value can be set by setting the application setting + log4net.Internal.Debug in the application configuration + file. + + + The default value is false, i.e. debugging is + disabled. + + + + + The following example enables internal debugging using the + application configuration file : + + + + + + + + + + + + + Gets or sets a value indicating whether log4net should generate no output + from internal logging, not even for errors. + + + true if log4net should generate no output at all from internal + logging, otherwise false. + + + + When set to true will cause internal logging at all levels to be + suppressed. This means that no warning or error reports will be logged. + This option overrides the setting and + disables all debug also. + + This value can be set by setting the application setting + log4net.Internal.Quiet in the application configuration file. + + + The default value is false, i.e. internal logging is not + disabled. + + + + The following example disables internal logging using the + application configuration file : + + + + + + + + + + + + Test if LogLog.Debug is enabled for output. + + + true if Debug is enabled + + + + Test if LogLog.Debug is enabled for output. + + + + + + Test if LogLog.Warn is enabled for output. + + + true if Warn is enabled + + + + Test if LogLog.Warn is enabled for output. + + + + + + Test if LogLog.Error is enabled for output. + + + true if Error is enabled + + + + Test if LogLog.Error is enabled for output. + + + + + + Represents a native error code and message. + + + + Represents a Win32 platform native error. + + + Nicko Cadell + Gert Driesen + + + + Create an instance of the class with the specified + error number and message. + + The number of the native error. + The message of the native error. + + + Create an instance of the class with the specified + error number and message. + + + + + + Create a new instance of the class for the last Windows error. + + + An instance of the class for the last windows error. + + + + The message for the error number is lookup up using the + native Win32 FormatMessage function. + + + + + + Create a new instance of the class. + + the error number for the native error + + An instance of the class for the specified + error number. + + + + The message for the specified error number is lookup up using the + native Win32 FormatMessage function. + + + + + + Retrieves the message corresponding with a Win32 message identifier. + + Message identifier for the requested message. + + The message corresponding with the specified message identifier. + + + + The message will be searched for in system message-table resource(s) + using the native FormatMessage function. + + + + + + Return error information string + + error information string + + + Return error information string + + + + + + Formats a message string. + + Formatting options, and how to interpret the parameter. + Location of the message definition. + Message identifier for the requested message. + Language identifier for the requested message. + If includes FORMAT_MESSAGE_ALLOCATE_BUFFER, the function allocates a buffer using the LocalAlloc function, and places the pointer to the buffer at the address specified in . + If the FORMAT_MESSAGE_ALLOCATE_BUFFER flag is not set, this parameter specifies the maximum number of TCHARs that can be stored in the output buffer. If FORMAT_MESSAGE_ALLOCATE_BUFFER is set, this parameter specifies the minimum number of TCHARs to allocate for an output buffer. + Pointer to an array of values that are used as insert values in the formatted message. + + + The function requires a message definition as input. The message definition can come from a + buffer passed into the function. It can come from a message table resource in an + already-loaded module. Or the caller can ask the function to search the system's message + table resource(s) for the message definition. The function finds the message definition + in a message table resource based on a message identifier and a language identifier. + The function copies the formatted message text to an output buffer, processing any embedded + insert sequences if requested. + + + To prevent the usage of unsafe code, this stub does not support inserting values in the formatted message. + + + + + If the function succeeds, the return value is the number of TCHARs stored in the output + buffer, excluding the terminating null character. + + + If the function fails, the return value is zero. To get extended error information, + call . + + + + + + Gets the number of the native error. + + + The number of the native error. + + + + Gets the number of the native error. + + + + + + Gets the message of the native error. + + + The message of the native error. + + + + + Gets the message of the native error. + + + + + An always empty . + + + + A singleton implementation of the over a collection + that is empty and not modifiable. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Uses a private access modifier to enforce the singleton pattern. + + + + + + Test if the enumerator can advance, if so advance. + + false as the cannot advance. + + + As the enumerator is over an empty collection its + value cannot be moved over a valid position, therefore + will always return false. + + + + + + Resets the enumerator back to the start. + + + + As the enumerator is over an empty collection does nothing. + + + + + + The singleton instance of the . + + + + + Gets the singleton instance of the . + + The singleton instance of the . + + + Gets the singleton instance of the . + + + + + + Gets the current object from the enumerator. + + + Throws an because the + never has a current value. + + + + As the enumerator is over an empty collection its + value cannot be moved over a valid position, therefore + will throw an . + + + The collection is empty and + cannot be positioned over a valid location. + + + + Gets the current key from the enumerator. + + + Throws an exception because the + never has a current value. + + + + As the enumerator is over an empty collection its + value cannot be moved over a valid position, therefore + will throw an . + + + The collection is empty and + cannot be positioned over a valid location. + + + + Gets the current value from the enumerator. + + The current value from the enumerator. + + Throws an because the + never has a current value. + + + + As the enumerator is over an empty collection its + value cannot be moved over a valid position, therefore + will throw an . + + + The collection is empty and + cannot be positioned over a valid location. + + + + Gets the current entry from the enumerator. + + + Throws an because the + never has a current entry. + + + + As the enumerator is over an empty collection its + value cannot be moved over a valid position, therefore + will throw an . + + + The collection is empty and + cannot be positioned over a valid location. + + + + An always empty . + + + + A singleton implementation of the over a collection + that is empty and not modifiable. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Uses a private access modifier to enforce the singleton pattern. + + + + + + Test if the enumerator can advance, if so advance + + false as the cannot advance. + + + As the enumerator is over an empty collection its + value cannot be moved over a valid position, therefore + will always return false. + + + + + + Resets the enumerator back to the start. + + + + As the enumerator is over an empty collection does nothing. + + + + + + The singleton instance of the . + + + + + Get the singleton instance of the . + + The singleton instance of the . + + + Gets the singleton instance of the . + + + + + + Gets the current object from the enumerator. + + + Throws an because the + never has a current value. + + + + As the enumerator is over an empty collection its + value cannot be moved over a valid position, therefore + will throw an . + + + The collection is empty and + cannot be positioned over a valid location. + + + + A SecurityContext used when a SecurityContext is not required + + + + The is a no-op implementation of the + base class. It is used where a + is required but one has not been provided. + + + Nicko Cadell + + + + Singleton instance of + + + + Singleton instance of + + + + + + Private constructor + + + + Private constructor for singleton pattern. + + + + + + Impersonate this SecurityContext + + State supplied by the caller + null + + + No impersonation is done and null is always returned. + + + + + + Implements log4net's default error handling policy which consists + of emitting a message for the first error in an appender and + ignoring all subsequent errors. + + + + The error message is printed on the standard error output stream. + + + This policy aims at protecting an otherwise working application + from being flooded with error messages when logging fails. + + + Nicko Cadell + Gert Driesen + + + + Default Constructor + + + + Initializes a new instance of the class. + + + + + + Constructor + + The prefix to use for each message. + + + Initializes a new instance of the class + with the specified prefix. + + + + + + Log an Error + + The error message. + The exception. + The internal error code. + + + Prints the message and the stack trace of the exception on the standard + error output stream. + + + + + + Log an Error + + The error message. + The exception. + + + Prints the message and the stack trace of the exception on the standard + error output stream. + + + + + + Log an error + + The error message. + + + Print a the error message passed as parameter on the standard + error output stream. + + + + + + Flag to indicate if it is the first error + + + + + String to prefix each message with + + + + + Is error logging enabled + + + + Is error logging enabled. Logging is only enabled for the + first error delivered to the . + + + + + + A convenience class to convert property values to specific types. + + + + Utility functions for converting types and parsing values. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Uses a private access modifier to prevent instantiation of this class. + + + + + + Converts a string to a value. + + String to convert. + The default value. + The value of . + + + If is "true", then true is returned. + If is "false", then false is returned. + Otherwise, is returned. + + + + + + Parses a file size into a number. + + String to parse. + The default value. + The value of . + + + Parses a file size of the form: number[KB|MB|GB] into a + long value. It is scaled with the appropriate multiplier. + + + is returned when + cannot be converted to a value. + + + + + + Converts a string to an object. + + The target type to convert to. + The string to convert to an object. + + The object converted from a string or null when the + conversion failed. + + + + Converts a string to an object. Uses the converter registry to try + to convert the string value into the specified target type. + + + + + + Checks if there is an appropriate type conversion from the source type to the target type. + + The type to convert from. + The type to convert to. + true if there is a conversion from the source type to the target type. + + Checks if there is an appropriate type conversion from the source type to the target type. + + + + + + + Converts an object to the target type. + + The object to convert to the target type. + The type to convert to. + The converted object. + + + Converts an object to the target type. + + + + + + Instantiates an object given a class name. + + The fully qualified class name of the object to instantiate. + The class to which the new object should belong. + The object to return in case of non-fulfillment. + + An instance of the or + if the object could not be instantiated. + + + + Checks that the is a subclass of + . If that test fails or the object could + not be instantiated, then is returned. + + + + + + Performs variable substitution in string from the + values of keys found in . + + The string on which variable substitution is performed. + The dictionary to use to lookup variables. + The result of the substitutions. + + + The variable substitution delimiters are ${ and }. + + + For example, if props contains key=value, then the call + + + + string s = OptionConverter.SubstituteVariables("Value of key is ${key}."); + + + + will set the variable s to "Value of key is value.". + + + If no value could be found for the specified key, then substitution + defaults to an empty string. + + + For example, if system properties contains no value for the key + "nonExistentKey", then the call + + + + string s = OptionConverter.SubstituteVariables("Value of nonExistentKey is [${nonExistentKey}]"); + + + + will set s to "Value of nonExistentKey is []". + + + An Exception is thrown if contains a start + delimiter "${" which is not balanced by a stop delimiter "}". + + + + + + Converts the string representation of the name or numeric value of one or + more enumerated constants to an equivalent enumerated object. + + The type to convert to. + The enum string value. + If true, ignore case; otherwise, regard case. + An object of type whose value is represented by . + + + + Most of the work of the class + is delegated to the PatternParser class. + + + + The PatternParser processes a pattern string and + returns a chain of objects. + + + Nicko Cadell + Gert Driesen + + + + Constructor + + The pattern to parse. + + + Initializes a new instance of the class + with the specified pattern string. + + + + + + Parses the pattern into a chain of pattern converters. + + The head of a chain of pattern converters. + + + Parses the pattern into a chain of pattern converters. + + + + + + Build the unified cache of converters from the static and instance maps + + the list of all the converter names + + + Build the unified cache of converters from the static and instance maps + + + + + + Internal method to parse the specified pattern to find specified matches + + the pattern to parse + the converter names to match in the pattern + + + The matches param must be sorted such that longer strings come before shorter ones. + + + + + + Process a parsed literal + + the literal text + + + + Process a parsed converter pattern + + the name of the converter + the optional option for the converter + the formatting info for the converter + + + + Resets the internal state of the parser and adds the specified pattern converter + to the chain. + + The pattern converter to add. + + + + The first pattern converter in the chain + + + + + the last pattern converter in the chain + + + + + The pattern + + + + + Internal map of converter identifiers to converter types + + + + This map overrides the static s_globalRulesRegistry map. + + + + + + Get the converter registry used by this parser + + + The converter registry used by this parser + + + + Get the converter registry used by this parser + + + + + + Sort strings by length + + + + that orders strings by string length. + The longest strings are placed first + + + + + + This class implements a patterned string. + + + + This string has embedded patterns that are resolved and expanded + when the string is formatted. + + + This class functions similarly to the + in that it accepts a pattern and renders it to a string. Unlike the + however the PatternString + does not render the properties of a specific but + of the process in general. + + + The recognized conversion pattern names are: + + + + Conversion Pattern Name + Effect + + + appdomain + + + Used to output the friendly name of the current AppDomain. + + + + + date + + + Used to output the date of the logging event in the local time zone. + To output the date in universal time use the %utcdate pattern. + The date conversion + specifier may be followed by a date format specifier enclosed + between braces. For example, %date{HH:mm:ss,fff} or + %date{dd MMM yyyy HH:mm:ss,fff}. If no date format specifier is + given then ISO8601 format is + assumed (). + + + The date format specifier admits the same syntax as the + time pattern string of the . + + + For better results it is recommended to use the log4net date + formatters. These can be specified using one of the strings + "ABSOLUTE", "DATE" and "ISO8601" for specifying + , + and respectively + . For example, + %date{ISO8601} or %date{ABSOLUTE}. + + + These dedicated date formatters perform significantly + better than . + + + + + env + + + Used to output the a specific environment variable. The key to + lookup must be specified within braces and directly following the + pattern specifier, e.g. %env{COMPUTERNAME} would include the value + of the COMPUTERNAME environment variable. + + + The env pattern is not supported on the .NET Compact Framework. + + + + + identity + + + Used to output the user name for the currently active user + (Principal.Identity.Name). + + + + + newline + + + Outputs the platform dependent line separator character or + characters. + + + This conversion pattern name offers the same performance as using + non-portable line separator strings such as "\n", or "\r\n". + Thus, it is the preferred way of specifying a line separator. + + + + + processid + + + Used to output the system process ID for the current process. + + + + + property + + + Used to output a specific context property. The key to + lookup must be specified within braces and directly following the + pattern specifier, e.g. %property{user} would include the value + from the property that is keyed by the string 'user'. Each property value + that is to be included in the log must be specified separately. + Properties are stored in logging contexts. By default + the log4net:HostName property is set to the name of machine on + which the event was originally logged. + + + If no key is specified, e.g. %property then all the keys and their + values are printed in a comma separated list. + + + The properties of an event are combined from a number of different + contexts. These are listed below in the order in which they are searched. + + + + the thread properties + + The that are set on the current + thread. These properties are shared by all events logged on this thread. + + + + the global properties + + The that are set globally. These + properties are shared by all the threads in the AppDomain. + + + + + + + random + + + Used to output a random string of characters. The string is made up of + uppercase letters and numbers. By default the string is 4 characters long. + The length of the string can be specified within braces directly following the + pattern specifier, e.g. %random{8} would output an 8 character string. + + + + + username + + + Used to output the WindowsIdentity for the currently + active user. + + + + + utcdate + + + Used to output the date of the logging event in universal time. + The date conversion + specifier may be followed by a date format specifier enclosed + between braces. For example, %utcdate{HH:mm:ss,fff} or + %utcdate{dd MMM yyyy HH:mm:ss,fff}. If no date format specifier is + given then ISO8601 format is + assumed (). + + + The date format specifier admits the same syntax as the + time pattern string of the . + + + For better results it is recommended to use the log4net date + formatters. These can be specified using one of the strings + "ABSOLUTE", "DATE" and "ISO8601" for specifying + , + and respectively + . For example, + %utcdate{ISO8601} or %utcdate{ABSOLUTE}. + + + These dedicated date formatters perform significantly + better than . + + + + + % + + + The sequence %% outputs a single percent sign. + + + + + + Additional pattern converters may be registered with a specific + instance using or + . + + + See the for details on the + format modifiers supported by the patterns. + + + Nicko Cadell + + + + Internal map of converter identifiers to converter types. + + + + + the pattern + + + + + the head of the pattern converter chain + + + + + patterns defined on this PatternString only + + + + + Initialize the global registry + + + + + Default constructor + + + + Initialize a new instance of + + + + + + Constructs a PatternString + + The pattern to use with this PatternString + + + Initialize a new instance of with the pattern specified. + + + + + + Initialize object options + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + + + + Create the used to parse the pattern + + the pattern to parse + The + + + Returns PatternParser used to parse the conversion string. Subclasses + may override this to return a subclass of PatternParser which recognize + custom conversion pattern name. + + + + + + Produces a formatted string as specified by the conversion pattern. + + The TextWriter to write the formatted event to + + + Format the pattern to the . + + + + + + Format the pattern as a string + + the pattern formatted as a string + + + Format the pattern to a string. + + + + + + Add a converter to this PatternString + + the converter info + + + This version of the method is used by the configurator. + Programmatic users should use the alternative method. + + + + + + Add a converter to this PatternString + + the name of the conversion pattern for this converter + the type of the converter + + + Add a converter to this PatternString + + + + + + Gets or sets the pattern formatting string + + + The pattern formatting string + + + + The ConversionPattern option. This is the string which + controls formatting and consists of a mix of literal content and + conversion specifiers. + + + + + + Wrapper class used to map converter names to converter types + + + + Wrapper class used to map converter names to converter types + + + + + + default constructor + + + + + Gets or sets the name of the conversion pattern + + + The name of the conversion pattern + + + + Gets or sets the name of the conversion pattern + + + + + + Gets or sets the type of the converter + + + The type of the converter + + + + Gets or sets the type of the converter + + + + + + String keyed object map. + + + + While this collection is serializable only member + objects that are serializable will + be serialized along with this collection. + + + Nicko Cadell + Gert Driesen + + + + String keyed object map that is read only. + + + + This collection is readonly and cannot be modified. + + + While this collection is serializable only member + objects that are serializable will + be serialized along with this collection. + + + Nicko Cadell + Gert Driesen + + + + The Hashtable used to store the properties data + + + + + Constructor + + + + Initializes a new instance of the class. + + + + + + Copy Constructor + + properties to copy + + + Initializes a new instance of the class. + + + + + + Deserialization constructor + + The that holds the serialized object data. + The that contains contextual information about the source or destination. + + + Initializes a new instance of the class + with serialized data. + + + + + + Gets the key names. + + An array of all the keys. + + + Gets the key names. + + + + + + Test if the dictionary contains a specified key + + the key to look for + true if the dictionary contains the specified key + + + Test if the dictionary contains a specified key + + + + + + Serializes this object into the provided. + + The to populate with data. + The destination for this serialization. + + + Serializes this object into the provided. + + + + + + See + + + + + See + + + + + + See + + + + + + + Remove all properties from the properties collection + + + + + See + + + + + + + See + + + + + + + See + + + + + Gets or sets the value of the property with the specified key. + + + The value of the property with the specified key. + + The key of the property to get or set. + + + The property value will only be serialized if it is serializable. + If it cannot be serialized it will be silently ignored if + a serialization operation is performed. + + + + + + The hashtable used to store the properties + + + The internal collection used to store the properties + + + + The hashtable used to store the properties + + + + + + See + + + + + See + + + + + See + + + + + See + + + + + See + + + + + See + + + + + The number of properties in this collection + + + + + See + + + + + Constructor + + + + Initializes a new instance of the class. + + + + + + Constructor + + properties to copy + + + Initializes a new instance of the class. + + + + + + Initializes a new instance of the class + with serialized data. + + The that holds the serialized object data. + The that contains contextual information about the source or destination. + + + Because this class is sealed the serialization constructor is private. + + + + + + Remove the entry with the specified key from this dictionary + + the key for the entry to remove + + + Remove the entry with the specified key from this dictionary + + + + + + See + + an enumerator + + + Returns a over the contest of this collection. + + + + + + See + + the key to remove + + + Remove the entry with the specified key from this dictionary + + + + + + See + + the key to lookup in the collection + true if the collection contains the specified key + + + Test if this collection contains a specified key. + + + + + + Remove all properties from the properties collection + + + + Remove all properties from the properties collection + + + + + + See + + the key + the value to store for the key + + + Store a value for the specified . + + + Thrown if the is not a string + + + + See + + + + + + + See + + + + + Gets or sets the value of the property with the specified key. + + + The value of the property with the specified key. + + The key of the property to get or set. + + + The property value will only be serialized if it is serializable. + If it cannot be serialized it will be silently ignored if + a serialization operation is performed. + + + + + + See + + + false + + + + This collection is modifiable. This property always + returns false. + + + + + + See + + + The value for the key specified. + + + + Get or set a value for the specified . + + + Thrown if the is not a string + + + + See + + + + + See + + + + + See + + + + + See + + + + + See + + + + + A that ignores the message + + + + This writer is used in special cases where it is necessary + to protect a writer from being closed by a client. + + + Nicko Cadell + + + + Constructor + + the writer to actually write to + + + Create a new ProtectCloseTextWriter using a writer + + + + + + Attach this instance to a different underlying + + the writer to attach to + + + Attach this instance to a different underlying + + + + + + Does not close the underlying output writer. + + + + Does not close the underlying output writer. + This method does nothing. + + + + + + Defines a lock that supports single writers and multiple readers + + + + ReaderWriterLock is used to synchronize access to a resource. + At any given time, it allows either concurrent read access for + multiple threads, or write access for a single thread. In a + situation where a resource is changed infrequently, a + ReaderWriterLock provides better throughput than a simple + one-at-a-time lock, such as . + + + If a platform does not support a System.Threading.ReaderWriterLock + implementation then all readers and writers are serialized. Therefore + the caller must not rely on multiple simultaneous readers. + + + Nicko Cadell + + + + Constructor + + + + Initializes a new instance of the class. + + + + + + Acquires a reader lock + + + + blocks if a different thread has the writer + lock, or if at least one thread is waiting for the writer lock. + + + + + + Decrements the lock count + + + + decrements the lock count. When the count + reaches zero, the lock is released. + + + + + + Acquires the writer lock + + + + This method blocks if another thread has a reader lock or writer lock. + + + + + + Decrements the lock count on the writer lock + + + + ReleaseWriterLock decrements the writer lock count. + When the count reaches zero, the writer lock is released. + + + + + + A that can be and reused + + + + A that can be and reused. + This uses a single buffer for string operations. + + + Nicko Cadell + + + + Create an instance of + + the format provider to use + + + Create an instance of + + + + + + Override Dispose to prevent closing of writer + + flag + + + Override Dispose to prevent closing of writer + + + + + + Reset this string writer so that it can be reused. + + the maximum buffer capacity before it is trimmed + the default size to make the buffer + + + Reset this string writer so that it can be reused. + The internal buffers are cleared and reset. + + + + + + Utility class for system specific information. + + + + Utility class of static methods for system specific information. + + + Nicko Cadell + Gert Driesen + Alexey Solofnenko + + + + Private constructor to prevent instances. + + + + Only static methods are exposed from this type. + + + + + + Initialize default values for private static fields. + + + + Only static methods are exposed from this type. + + + + + + Gets the assembly location path for the specified assembly. + + The assembly to get the location for. + The location of the assembly. + + + This method does not guarantee to return the correct path + to the assembly. If only tries to give an indication as to + where the assembly was loaded from. + + + + + + Gets the fully qualified name of the , including + the name of the assembly from which the was + loaded. + + The to get the fully qualified name for. + The fully qualified name for the . + + + This is equivalent to the Type.AssemblyQualifiedName property, + but this method works on the .NET Compact Framework 1.0 as well as + the full .NET runtime. + + + + + + Gets the short name of the . + + The to get the name for. + The short name of the . + + + The short name of the assembly is the + without the version, culture, or public key. i.e. it is just the + assembly's file name without the extension. + + + Use this rather than Assembly.GetName().Name because that + is not available on the Compact Framework. + + + Because of a FileIOPermission security demand we cannot do + the obvious Assembly.GetName().Name. We are allowed to get + the of the assembly so we + start from there and strip out just the assembly name. + + + + + + Gets the file name portion of the , including the extension. + + The to get the file name for. + The file name of the assembly. + + + Gets the file name portion of the , including the extension. + + + + + + Loads the type specified in the type string. + + A sibling type to use to load the type. + The name of the type to load. + Flag set to true to throw an exception if the type cannot be loaded. + true to ignore the case of the type name; otherwise, false + The type loaded or null if it could not be loaded. + + + If the type name is fully qualified, i.e. if contains an assembly name in + the type name, the type will be loaded from the system using + . + + + If the type name is not fully qualified, it will be loaded from the assembly + containing the specified relative type. If the type is not found in the assembly + then all the loaded assemblies will be searched for the type. + + + + + + Loads the type specified in the type string. + + The name of the type to load. + Flag set to true to throw an exception if the type cannot be loaded. + true to ignore the case of the type name; otherwise, false + The type loaded or null if it could not be loaded. + + + If the type name is fully qualified, i.e. if contains an assembly name in + the type name, the type will be loaded from the system using + . + + + If the type name is not fully qualified it will be loaded from the + assembly that is directly calling this method. If the type is not found + in the assembly then all the loaded assemblies will be searched for the type. + + + + + + Loads the type specified in the type string. + + An assembly to load the type from. + The name of the type to load. + Flag set to true to throw an exception if the type cannot be loaded. + true to ignore the case of the type name; otherwise, false + The type loaded or null if it could not be loaded. + + + If the type name is fully qualified, i.e. if contains an assembly name in + the type name, the type will be loaded from the system using + . + + + If the type name is not fully qualified it will be loaded from the specified + assembly. If the type is not found in the assembly then all the loaded assemblies + will be searched for the type. + + + + + + Generate a new guid + + A new Guid + + + Generate a new guid + + + + + + Create an + + The name of the parameter that caused the exception + The value of the argument that causes this exception + The message that describes the error + the ArgumentOutOfRangeException object + + + Create a new instance of the class + with a specified error message, the parameter name, and the value + of the argument. + + + The Compact Framework does not support the 3 parameter constructor for the + type. This method provides an + implementation that works for all platforms. + + + + + + Parse a string into an value + + the string to parse + out param where the parsed value is placed + true if the string was able to be parsed into an integer + + + Attempts to parse the string into an integer. If the string cannot + be parsed then this method returns false. The method does not throw an exception. + + + + + + Parse a string into an value + + the string to parse + out param where the parsed value is placed + true if the string was able to be parsed into an integer + + + Attempts to parse the string into an integer. If the string cannot + be parsed then this method returns false. The method does not throw an exception. + + + + + + Lookup an application setting + + the application settings key to lookup + the value for the key, or null + + + Configuration APIs are not supported under the Compact Framework + + + + + + Convert a path into a fully qualified local file path. + + The path to convert. + The fully qualified path. + + + Converts the path specified to a fully + qualified path. If the path is relative it is + taken as relative from the application base + directory. + + + The path specified must be a local file path, a URI is not supported. + + + + + + Creates a new case-insensitive instance of the class with the default initial capacity. + + A new case-insensitive instance of the class with the default initial capacity + + + The new Hashtable instance uses the default load factor, the CaseInsensitiveHashCodeProvider, and the CaseInsensitiveComparer. + + + + + + Gets an empty array of types. + + + + The Type.EmptyTypes field is not available on + the .NET Compact Framework 1.0. + + + + + + Cache the host name for the current machine + + + + + Cache the application friendly name + + + + + Text to output when a null is encountered. + + + + + Text to output when an unsupported feature is requested. + + + + + Start time for the current process. + + + + + Gets the system dependent line terminator. + + + The system dependent line terminator. + + + + Gets the system dependent line terminator. + + + + + + Gets the base directory for this . + + The base directory path for the current . + + + Gets the base directory for this . + + + The value returned may be either a local file path or a URI. + + + + + + Gets the path to the configuration file for the current . + + The path to the configuration file for the current . + + + The .NET Compact Framework 1.0 does not have a concept of a configuration + file. For this runtime, we use the entry assembly location as the root for + the configuration file name. + + + The value returned may be either a local file path or a URI. + + + + + + Gets the path to the file that first executed in the current . + + The path to the entry assembly. + + + Gets the path to the file that first executed in the current . + + + + + + Gets the ID of the current thread. + + The ID of the current thread. + + + On the .NET framework, the AppDomain.GetCurrentThreadId method + is used to obtain the thread ID for the current thread. This is the + operating system ID for the thread. + + + On the .NET Compact Framework 1.0 it is not possible to get the + operating system thread ID for the current thread. The native method + GetCurrentThreadId is implemented inline in a header file + and cannot be called. + + + On the .NET Framework 2.0 the Thread.ManagedThreadId is used as this + gives a stable id unrelated to the operating system thread ID which may + change if the runtime is using fibers. + + + + + + Get the host name or machine name for the current machine + + + The hostname or machine name + + + + Get the host name or machine name for the current machine + + + The host name () or + the machine name (Environment.MachineName) for + the current machine, or if neither of these are available + then NOT AVAILABLE is returned. + + + + + + Get this application's friendly name + + + The friendly name of this application as a string + + + + If available the name of the application is retrieved from + the AppDomain using AppDomain.CurrentDomain.FriendlyName. + + + Otherwise the file name of the entry assembly is used. + + + + + + Get the start time for the current process. + + + + This is the time at which the log4net library was loaded into the + AppDomain. Due to reports of a hang in the call to System.Diagnostics.Process.StartTime + this is not the start time for the current process. + + + The log4net library should be loaded by an application early during its + startup, therefore this start time should be a good approximation for + the actual start time. + + + Note that AppDomains may be loaded and unloaded within the + same process without the process terminating, however this start time + will be set per AppDomain. + + + + + + Text to output when a null is encountered. + + + + Use this value to indicate a null has been encountered while + outputting a string representation of an item. + + + The default value is (null). This value can be overridden by specifying + a value for the log4net.NullText appSetting in the application's + .config file. + + + + + + Text to output when an unsupported feature is requested. + + + + Use this value when an unsupported feature is requested. + + + The default value is NOT AVAILABLE. This value can be overridden by specifying + a value for the log4net.NotAvailableText appSetting in the application's + .config file. + + + + + + Utility class that represents a format string. + + + + Utility class that represents a format string. + + + Nicko Cadell + + + + Initialise the + + An that supplies culture-specific formatting information. + A containing zero or more format items. + An array containing zero or more objects to format. + + + + Format the string and arguments + + the formatted string + + + + Replaces the format item in a specified with the text equivalent + of the value of a corresponding instance in a specified array. + A specified parameter supplies culture-specific formatting information. + + An that supplies culture-specific formatting information. + A containing zero or more format items. + An array containing zero or more objects to format. + + A copy of format in which the format items have been replaced by the + equivalent of the corresponding instances of in args. + + + + This method does not throw exceptions. If an exception thrown while formatting the result the + exception and arguments are returned in the result string. + + + + + + Process an error during StringFormat + + + + + Dump the contents of an array into a string builder + + + + + Dump an object to a string + + + + + Implementation of Properties collection for the + + + + Class implements a collection of properties that is specific to each thread. + The class is not synchronized as each thread has its own . + + + Nicko Cadell + + + + The thread local data slot to use to store a PropertiesDictionary. + + + + + Internal constructor + + + + Initializes a new instance of the class. + + + + + + Remove a property + + the key for the entry to remove + + + Remove a property + + + + + + Clear all properties + + + + Clear all properties + + + + + + Get the PropertiesDictionary for this thread. + + create the dictionary if it does not exist, otherwise return null if is does not exist + the properties for this thread + + + The collection returned is only to be used on the calling thread. If the + caller needs to share the collection between different threads then the + caller must clone the collection before doing so. + + + + + + Gets or sets the value of a property + + + The value for the property with the specified key + + + + Gets or sets the value of a property + + + + + + Implementation of Stack for the + + + + Implementation of Stack for the + + + Nicko Cadell + + + + The stack store. + + + + + Internal constructor + + + + Initializes a new instance of the class. + + + + + + Clears all the contextual information held in this stack. + + + + Clears all the contextual information held in this stack. + Only call this if you think that this tread is being reused after + a previous call execution which may not have completed correctly. + You do not need to use this method if you always guarantee to call + the method of the + returned from even in exceptional circumstances, + for example by using the using(log4net.ThreadContext.Stacks["NDC"].Push("Stack_Message")) + syntax. + + + + + + Removes the top context from this stack. + + The message in the context that was removed from the top of this stack. + + + Remove the top context from this stack, and return + it to the caller. If this stack is empty then an + empty string (not ) is returned. + + + + + + Pushes a new context message into this stack. + + The new context message. + + An that can be used to clean up the context stack. + + + + Pushes a new context onto this stack. An + is returned that can be used to clean up this stack. This + can be easily combined with the using keyword to scope the + context. + + + Simple example of using the Push method with the using keyword. + + using(log4net.ThreadContext.Stacks["NDC"].Push("Stack_Message")) + { + log.Warn("This should have an ThreadContext Stack message"); + } + + + + + + Gets the current context information for this stack. + + The current context information. + + + + Gets the current context information for this stack. + + Gets the current context information + + + Gets the current context information for this stack. + + + + + + Get a portable version of this object + + the portable instance of this object + + + Get a cross thread portable version of this object + + + + + + The number of messages in the stack + + + The current number of messages in the stack + + + + The current number of messages in the stack. That is + the number of times has been called + minus the number of times has been called. + + + + + + Gets and sets the internal stack used by this + + The internal storage stack + + + This property is provided only to support backward compatability + of the . Tytpically the internal stack should not + be modified. + + + + + + Inner class used to represent a single context frame in the stack. + + + + Inner class used to represent a single context frame in the stack. + + + + + + Constructor + + The message for this context. + The parent context in the chain. + + + Initializes a new instance of the class + with the specified message and parent context. + + + + + + Get the message. + + The message. + + + Get the message. + + + + + + Gets the full text of the context down to the root level. + + + The full text of the context down to the root level. + + + + Gets the full text of the context down to the root level. + + + + + + Struct returned from the method. + + + + This struct implements the and is designed to be used + with the pattern to remove the stack frame at the end of the scope. + + + + + + The ThreadContextStack internal stack + + + + + The depth to trim the stack to when this instance is disposed + + + + + Constructor + + The internal stack used by the ThreadContextStack. + The depth to return the stack to when this object is disposed. + + + Initializes a new instance of the class with + the specified stack and return depth. + + + + + + Returns the stack to the correct depth. + + + + Returns the stack to the correct depth. + + + + + + Implementation of Stacks collection for the + + + + Implementation of Stacks collection for the + + + Nicko Cadell + + + + Internal constructor + + + + Initializes a new instance of the class. + + + + + + Gets the named thread context stack + + + The named stack + + + + Gets the named thread context stack + + + + + + Utility class for transforming strings. + + + + Utility class for transforming strings. + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + + Uses a private access modifier to prevent instantiation of this class. + + + + + + Write a string to an + + the writer to write to + the string to write + The string to replace non XML compliant chars with + + + The test is escaped either using XML escape entities + or using CDATA sections. + + + + + + Replace invalid XML characters in text string + + the XML text input string + the string to use in place of invalid characters + A string that does not contain invalid XML characters. + + + Certain Unicode code points are not allowed in the XML InfoSet, for + details see: http://www.w3.org/TR/REC-xml/#charsets. + + + This method replaces any illegal characters in the input string + with the mask string specified. + + + + + + Count the number of times that the substring occurs in the text + + the text to search + the substring to find + the number of times the substring occurs in the text + + + The substring is assumed to be non repeating within itself. + + + + + + Impersonate a Windows Account + + + + This impersonates a Windows account. + + + How the impersonation is done depends on the value of . + This allows the context to either impersonate a set of user credentials specified + using username, domain name and password or to revert to the process credentials. + + + + + + Default constructor + + + + Default constructor + + + + + + Initialize the SecurityContext based on the options set. + + + + This is part of the delayed object + activation scheme. The method must + be called on this object after the configuration properties have + been set. Until is called this + object is in an undefined state and must not be used. + + + If any of the configuration properties are modified then + must be called again. + + + The security context will try to Logon the specified user account and + capture a primary token for impersonation. + + + The required , + or properties were not specified. + + + + Impersonate the Windows account specified by the and properties. + + caller provided state + + An instance that will revoke the impersonation of this SecurityContext + + + + Depending on the property either + impersonate a user using credentials supplied or revert + to the process credentials. + + + + + + Create a given the userName, domainName and password. + + the user name + the domain name + the password + the for the account specified + + + Uses the Windows API call LogonUser to get a principal token for the account. This + token is used to initialize the WindowsIdentity. + + + + + + Gets or sets the impersonation mode for this security context + + + The impersonation mode for this security context + + + + Impersonate either a user with user credentials or + revert this thread to the credentials of the process. + The value is one of the + enum. + + + The default value is + + + When the mode is set to + the user's credentials are established using the + , and + values. + + + When the mode is set to + no other properties need to be set. If the calling thread is + impersonating then it will be reverted back to the process credentials. + + + + + + Gets or sets the Windows username for this security context + + + The Windows username for this security context + + + + This property must be set if + is set to (the default setting). + + + + + + Gets or sets the Windows domain name for this security context + + + The Windows domain name for this security context + + + + The default value for is the local machine name + taken from the property. + + + This property must be set if + is set to (the default setting). + + + + + + Sets the password for the Windows account specified by the and properties. + + + The password for the Windows account specified by the and properties. + + + + This property must be set if + is set to (the default setting). + + + + + + The impersonation modes for the + + + + See the property for + details. + + + + + + Impersonate a user using the credentials supplied + + + + + Revert this the thread to the credentials of the process + + + + + Adds to + + + + Helper class to expose the + through the interface. + + + + + + Constructor + + the impersonation context being wrapped + + + Constructor + + + + + + Revert the impersonation + + + + Revert the impersonation + + + + + + The log4net Global Context. + + + + The GlobalContext provides a location for global debugging + information to be stored. + + + The global context has a properties map and these properties can + be included in the output of log messages. The + supports selecting and outputing these properties. + + + By default the log4net:HostName property is set to the name of + the current machine. + + + + + GlobalContext.Properties["hostname"] = Environment.MachineName; + + + + Nicko Cadell + + + + Private Constructor. + + + Uses a private access modifier to prevent instantiation of this class. + + + + + The global context properties instance + + + + + The global properties map. + + + The global properties map. + + + + The global properties map. + + + + + + The log4net Logical Thread Context. + + + + The LogicalThreadContext provides a location for specific debugging + information to be stored. + The LogicalThreadContext properties override any or + properties with the same name. + + + The Logical Thread Context has a properties map and a stack. + The properties and stack can + be included in the output of log messages. The + supports selecting and outputting these properties. + + + The Logical Thread Context provides a diagnostic context for the current call context. + This is an instrument for distinguishing interleaved log + output from different sources. Log output is typically interleaved + when a server handles multiple clients near-simultaneously. + + + The Logical Thread Context is managed on a per basis. + + + Example of using the thread context properties to store a username. + + LogicalThreadContext.Properties["user"] = userName; + log.Info("This log message has a LogicalThreadContext Property called 'user'"); + + + Example of how to push a message into the context stack + + using(LogicalThreadContext.Stacks["LDC"].Push("my context message")) + { + log.Info("This log message has a LogicalThreadContext Stack message that includes 'my context message'"); + + } // at the end of the using block the message is automatically popped + + + + Nicko Cadell + + + + Private Constructor. + + + + Uses a private access modifier to prevent instantiation of this class. + + + + + + The thread context properties instance + + + + + The thread context stacks instance + + + + + The thread properties map + + + The thread properties map + + + + The LogicalThreadContext properties override any + or properties with the same name. + + + + + + The thread stacks + + + stack map + + + + The logical thread stacks. + + + + + + This class is used by client applications to request logger instances. + + + + This class has static methods that are used by a client to request + a logger instance. The method is + used to retrieve a logger. + + + See the interface for more details. + + + Simple example of logging messages + + ILog log = LogManager.GetLogger("application-log"); + + log.Info("Application Start"); + log.Debug("This is a debug message"); + + if (log.IsDebugEnabled) + { + log.Debug("This is another debug message"); + } + + + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + Uses a private access modifier to prevent instantiation of this class. + + + + Returns the named logger if it exists. + + Returns the named logger if it exists. + + + + If the named logger exists (in the default repository) then it + returns a reference to the logger, otherwise it returns null. + + + The fully qualified logger name to look for. + The logger found, or null if no logger could be found. + + + + Returns the named logger if it exists. + + + + If the named logger exists (in the specified repository) then it + returns a reference to the logger, otherwise it returns + null. + + + The repository to lookup in. + The fully qualified logger name to look for. + + The logger found, or null if the logger doesn't exist in the specified + repository. + + + + + Returns the named logger if it exists. + + + + If the named logger exists (in the repository for the specified assembly) then it + returns a reference to the logger, otherwise it returns + null. + + + The assembly to use to lookup the repository. + The fully qualified logger name to look for. + + The logger, or null if the logger doesn't exist in the specified + assembly's repository. + + + + Get the currently defined loggers. + + Returns all the currently defined loggers in the default repository. + + + The root logger is not included in the returned array. + + All the defined loggers. + + + + Returns all the currently defined loggers in the specified repository. + + The repository to lookup in. + + The root logger is not included in the returned array. + + All the defined loggers. + + + + Returns all the currently defined loggers in the specified assembly's repository. + + The assembly to use to lookup the repository. + + The root logger is not included in the returned array. + + All the defined loggers. + + + Get or create a logger. + + Retrieves or creates a named logger. + + + + Retrieves a logger named as the + parameter. If the named logger already exists, then the + existing instance will be returned. Otherwise, a new instance is + created. + + By default, loggers do not have a set level but inherit + it from the hierarchy. This is one of the central features of + log4net. + + + The name of the logger to retrieve. + The logger with the name specified. + + + + Retrieves or creates a named logger. + + + + Retrieve a logger named as the + parameter. If the named logger already exists, then the + existing instance will be returned. Otherwise, a new instance is + created. + + + By default, loggers do not have a set level but inherit + it from the hierarchy. This is one of the central features of + log4net. + + + The repository to lookup in. + The name of the logger to retrieve. + The logger with the name specified. + + + + Retrieves or creates a named logger. + + + + Retrieve a logger named as the + parameter. If the named logger already exists, then the + existing instance will be returned. Otherwise, a new instance is + created. + + + By default, loggers do not have a set level but inherit + it from the hierarchy. This is one of the central features of + log4net. + + + The assembly to use to lookup the repository. + The name of the logger to retrieve. + The logger with the name specified. + + + + Shorthand for . + + + Get the logger for the fully qualified name of the type specified. + + The full name of will be used as the name of the logger to retrieve. + The logger with the name specified. + + + + Shorthand for . + + + Gets the logger for the fully qualified name of the type specified. + + The repository to lookup in. + The full name of will be used as the name of the logger to retrieve. + The logger with the name specified. + + + + Shorthand for . + + + Gets the logger for the fully qualified name of the type specified. + + The assembly to use to lookup the repository. + The full name of will be used as the name of the logger to retrieve. + The logger with the name specified. + + + + Shuts down the log4net system. + + + + Calling this method will safely close and remove all + appenders in all the loggers including root contained in all the + default repositories. + + + Some appenders need to be closed before the application exists. + Otherwise, pending logging events might be lost. + + The shutdown method is careful to close nested + appenders before closing regular appenders. This is allows + configurations where a regular appender is attached to a logger + and again to a nested appender. + + + + + Shutdown a logger repository. + + Shuts down the default repository. + + + + Calling this method will safely close and remove all + appenders in all the loggers including root contained in the + default repository. + + Some appenders need to be closed before the application exists. + Otherwise, pending logging events might be lost. + + The shutdown method is careful to close nested + appenders before closing regular appenders. This is allows + configurations where a regular appender is attached to a logger + and again to a nested appender. + + + + + + Shuts down the repository for the repository specified. + + + + Calling this method will safely close and remove all + appenders in all the loggers including root contained in the + specified. + + + Some appenders need to be closed before the application exists. + Otherwise, pending logging events might be lost. + + The shutdown method is careful to close nested + appenders before closing regular appenders. This is allows + configurations where a regular appender is attached to a logger + and again to a nested appender. + + + The repository to shutdown. + + + + Shuts down the repository specified. + + + + Calling this method will safely close and remove all + appenders in all the loggers including root contained in the + repository. The repository is looked up using + the specified. + + + Some appenders need to be closed before the application exists. + Otherwise, pending logging events might be lost. + + + The shutdown method is careful to close nested + appenders before closing regular appenders. This is allows + configurations where a regular appender is attached to a logger + and again to a nested appender. + + + The assembly to use to lookup the repository. + + + Reset the configuration of a repository + + Resets all values contained in this repository instance to their defaults. + + + + Resets all values contained in the repository instance to their + defaults. This removes all appenders from all loggers, sets + the level of all non-root loggers to null, + sets their additivity flag to true and sets the level + of the root logger to . Moreover, + message disabling is set to its default "off" value. + + + + + + Resets all values contained in this repository instance to their defaults. + + + + Reset all values contained in the repository instance to their + defaults. This removes all appenders from all loggers, sets + the level of all non-root loggers to null, + sets their additivity flag to true and sets the level + of the root logger to . Moreover, + message disabling is set to its default "off" value. + + + The repository to reset. + + + + Resets all values contained in this repository instance to their defaults. + + + + Reset all values contained in the repository instance to their + defaults. This removes all appenders from all loggers, sets + the level of all non-root loggers to null, + sets their additivity flag to true and sets the level + of the root logger to . Moreover, + message disabling is set to its default "off" value. + + + The assembly to use to lookup the repository to reset. + + + Get the logger repository. + + Returns the default instance. + + + + Gets the for the repository specified + by the callers assembly (). + + + The instance for the default repository. + + + + Returns the default instance. + + The default instance. + + + Gets the for the repository specified + by the argument. + + + The repository to lookup in. + + + + Returns the default instance. + + The default instance. + + + Gets the for the repository specified + by the argument. + + + The assembly to use to lookup the repository. + + + Get a logger repository. + + Returns the default instance. + + + + Gets the for the repository specified + by the callers assembly (). + + + The instance for the default repository. + + + + Returns the default instance. + + The default instance. + + + Gets the for the repository specified + by the argument. + + + The repository to lookup in. + + + + Returns the default instance. + + The default instance. + + + Gets the for the repository specified + by the argument. + + + The assembly to use to lookup the repository. + + + Create a domain + + Creates a repository with the specified repository type. + + + + CreateDomain is obsolete. Use CreateRepository instead of CreateDomain. + + + The created will be associated with the repository + specified such that a call to will return + the same repository instance. + + + A that implements + and has a no arg constructor. An instance of this type will be created to act + as the for the repository specified. + The created for the repository. + + + Create a logger repository. + + Creates a repository with the specified repository type. + + A that implements + and has a no arg constructor. An instance of this type will be created to act + as the for the repository specified. + The created for the repository. + + + The created will be associated with the repository + specified such that a call to will return + the same repository instance. + + + + + + Creates a repository with the specified name. + + + + CreateDomain is obsolete. Use CreateRepository instead of CreateDomain. + + + Creates the default type of which is a + object. + + + The name must be unique. Repositories cannot be redefined. + An will be thrown if the repository already exists. + + + The name of the repository, this must be unique amongst repositories. + The created for the repository. + The specified repository already exists. + + + + Creates a repository with the specified name. + + + + Creates the default type of which is a + object. + + + The name must be unique. Repositories cannot be redefined. + An will be thrown if the repository already exists. + + + The name of the repository, this must be unique amongst repositories. + The created for the repository. + The specified repository already exists. + + + + Creates a repository with the specified name and repository type. + + + + CreateDomain is obsolete. Use CreateRepository instead of CreateDomain. + + + The name must be unique. Repositories cannot be redefined. + An will be thrown if the repository already exists. + + + The name of the repository, this must be unique to the repository. + A that implements + and has a no arg constructor. An instance of this type will be created to act + as the for the repository specified. + The created for the repository. + The specified repository already exists. + + + + Creates a repository with the specified name and repository type. + + + + The name must be unique. Repositories cannot be redefined. + An will be thrown if the repository already exists. + + + The name of the repository, this must be unique to the repository. + A that implements + and has a no arg constructor. An instance of this type will be created to act + as the for the repository specified. + The created for the repository. + The specified repository already exists. + + + + Creates a repository for the specified assembly and repository type. + + + + CreateDomain is obsolete. Use CreateRepository instead of CreateDomain. + + + The created will be associated with the repository + specified such that a call to with the + same assembly specified will return the same repository instance. + + + The assembly to use to get the name of the repository. + A that implements + and has a no arg constructor. An instance of this type will be created to act + as the for the repository specified. + The created for the repository. + + + + Creates a repository for the specified assembly and repository type. + + + + The created will be associated with the repository + specified such that a call to with the + same assembly specified will return the same repository instance. + + + The assembly to use to get the name of the repository. + A that implements + and has a no arg constructor. An instance of this type will be created to act + as the for the repository specified. + The created for the repository. + + + + Gets the list of currently defined repositories. + + + + Get an array of all the objects that have been created. + + + An array of all the known objects. + + + + Looks up the wrapper object for the logger specified. + + The logger to get the wrapper for. + The wrapper for the logger specified. + + + + Looks up the wrapper objects for the loggers specified. + + The loggers to get the wrappers for. + The wrapper objects for the loggers specified. + + + + Create the objects used by + this manager. + + The logger to wrap. + The wrapper for the logger specified. + + + + The wrapper map to use to hold the objects. + + + + + Implementation of Mapped Diagnostic Contexts. + + + + + The MDC is deprecated and has been replaced by the . + The current MDC implementation forwards to the ThreadContext.Properties. + + + + The MDC class is similar to the class except that it is + based on a map instead of a stack. It provides mapped + diagnostic contexts. A Mapped Diagnostic Context, or + MDC in short, is an instrument for distinguishing interleaved log + output from different sources. Log output is typically interleaved + when a server handles multiple clients near-simultaneously. + + + The MDC is managed on a per thread basis. + + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + Uses a private access modifier to prevent instantiation of this class. + + + + + Gets the context value identified by the parameter. + + The key to lookup in the MDC. + The string value held for the key, or a null reference if no corresponding value is found. + + + + The MDC is deprecated and has been replaced by the . + The current MDC implementation forwards to the ThreadContext.Properties. + + + + If the parameter does not look up to a + previously defined context then null will be returned. + + + + + + Add an entry to the MDC + + The key to store the value under. + The value to store. + + + + The MDC is deprecated and has been replaced by the . + The current MDC implementation forwards to the ThreadContext.Properties. + + + + Puts a context value (the parameter) as identified + with the parameter into the current thread's + context map. + + + If a value is already defined for the + specified then the value will be replaced. If the + is specified as null then the key value mapping will be removed. + + + + + + Removes the key value mapping for the key specified. + + The key to remove. + + + + The MDC is deprecated and has been replaced by the . + The current MDC implementation forwards to the ThreadContext.Properties. + + + + Remove the specified entry from this thread's MDC + + + + + + Clear all entries in the MDC + + + + + The MDC is deprecated and has been replaced by the . + The current MDC implementation forwards to the ThreadContext.Properties. + + + + Remove all the entries from this thread's MDC + + + + + + Implementation of Nested Diagnostic Contexts. + + + + + The NDC is deprecated and has been replaced by the . + The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. + + + + A Nested Diagnostic Context, or NDC in short, is an instrument + to distinguish interleaved log output from different sources. Log + output is typically interleaved when a server handles multiple + clients near-simultaneously. + + + Interleaved log output can still be meaningful if each log entry + from different contexts had a distinctive stamp. This is where NDCs + come into play. + + + Note that NDCs are managed on a per thread basis. The NDC class + is made up of static methods that operate on the context of the + calling thread. + + + How to push a message into the context + + using(NDC.Push("my context message")) + { + ... all log calls will have 'my context message' included ... + + } // at the end of the using block the message is automatically removed + + + + Nicko Cadell + Gert Driesen + + + + Initializes a new instance of the class. + + + Uses a private access modifier to prevent instantiation of this class. + + + + + Clears all the contextual information held on the current thread. + + + + + The NDC is deprecated and has been replaced by the . + The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. + + + + Clears the stack of NDC data held on the current thread. + + + + + + Creates a clone of the stack of context information. + + A clone of the context info for this thread. + + + + The NDC is deprecated and has been replaced by the . + The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. + + + + The results of this method can be passed to the + method to allow child threads to inherit the context of their + parent thread. + + + + + + Inherits the contextual information from another thread. + + The context stack to inherit. + + + + The NDC is deprecated and has been replaced by the . + The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. + + + + This thread will use the context information from the stack + supplied. This can be used to initialize child threads with + the same contextual information as their parent threads. These + contexts will NOT be shared. Any further contexts that + are pushed onto the stack will not be visible to the other. + Call to obtain a stack to pass to + this method. + + + + + + Removes the top context from the stack. + + + The message in the context that was removed from the top + of the stack. + + + + + The NDC is deprecated and has been replaced by the . + The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. + + + + Remove the top context from the stack, and return + it to the caller. If the stack is empty then an + empty string (not null) is returned. + + + + + + Pushes a new context message. + + The new context message. + + An that can be used to clean up + the context stack. + + + + + The NDC is deprecated and has been replaced by the . + The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. + + + + Pushes a new context onto the context stack. An + is returned that can be used to clean up the context stack. This + can be easily combined with the using keyword to scope the + context. + + + Simple example of using the Push method with the using keyword. + + using(log4net.NDC.Push("NDC_Message")) + { + log.Warn("This should have an NDC message"); + } + + + + + + Removes the context information for this thread. It is + not required to call this method. + + + + + The NDC is deprecated and has been replaced by the . + The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. + + + + This method is not implemented. + + + + + + Forces the stack depth to be at most . + + The maximum depth of the stack + + + + The NDC is deprecated and has been replaced by the . + The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. + + + + Forces the stack depth to be at most . + This may truncate the head of the stack. This only affects the + stack in the current thread. Also it does not prevent it from + growing, it only sets the maximum depth at the time of the + call. This can be used to return to a known context depth. + + + + + + Gets the current context depth. + + The current context depth. + + + + The NDC is deprecated and has been replaced by the . + The current NDC implementation forwards to the ThreadContext.Stacks["NDC"]. + + + + The number of context values pushed onto the context stack. + + + Used to record the current depth of the context. This can then + be restored using the method. + + + + + + + The log4net Thread Context. + + + + The ThreadContext provides a location for thread specific debugging + information to be stored. + The ThreadContext properties override any + properties with the same name. + + + The thread context has a properties map and a stack. + The properties and stack can + be included in the output of log messages. The + supports selecting and outputting these properties. + + + The Thread Context provides a diagnostic context for the current thread. + This is an instrument for distinguishing interleaved log + output from different sources. Log output is typically interleaved + when a server handles multiple clients near-simultaneously. + + + The Thread Context is managed on a per thread basis. + + + Example of using the thread context properties to store a username. + + ThreadContext.Properties["user"] = userName; + log.Info("This log message has a ThreadContext Property called 'user'"); + + + Example of how to push a message into the context stack + + using(ThreadContext.Stacks["NDC"].Push("my context message")) + { + log.Info("This log message has a ThreadContext Stack message that includes 'my context message'"); + + } // at the end of the using block the message is automatically popped + + + + Nicko Cadell + + + + Private Constructor. + + + + Uses a private access modifier to prevent instantiation of this class. + + + + + + The thread context properties instance + + + + + The thread context stacks instance + + + + + The thread properties map + + + The thread properties map + + + + The ThreadContext properties override any + properties with the same name. + + + + + + The thread stacks + + + stack map + + + + The thread local stacks. + + + + + diff --git a/lib/nhibernate-configuration.xsd b/lib/nhibernate-configuration.xsd index 6635a73b369..89c36c6bf8c 100644 --- a/lib/nhibernate-configuration.xsd +++ b/lib/nhibernate-configuration.xsd @@ -1,215 +1,215 @@ - - - - -- This schema was automatically generated by Syntext Dtd2Schema and changed for NH use -- - -- conversion tool (from file: hibernate-configuration-3.0.dtd) -- - -- Copyright (C) 2002, 2003 Syntext Inc. See http://www.syntext.com for updates. -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - There are 3 possible combinations of mapping attributes - 1 - resource & assembly: NHibernate will read the mapping resource from the specified assembly - 2 - file only: NHibernate will read the mapping from the file. - 3 - assembly only: NHibernate will find all the resources ending in hbm.xml from the assembly. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + -- This schema was automatically generated by Syntext Dtd2Schema and changed for NH use -- + -- conversion tool (from file: hibernate-configuration-3.0.dtd) -- + -- Copyright (C) 2002, 2003 Syntext Inc. See http://www.syntext.com for updates. -- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + There are 3 possible combinations of mapping attributes + 1 - resource & assembly: NHibernate will read the mapping resource from the specified assembly + 2 - file only: NHibernate will read the mapping from the file. + 3 - assembly only: NHibernate will find all the resources ending in hbm.xml from the assembly. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lib/nhibernate-mapping.xsd b/lib/nhibernate-mapping.xsd index 5c81a4b8ae1..db25ca17463 100644 --- a/lib/nhibernate-mapping.xsd +++ b/lib/nhibernate-mapping.xsd @@ -1,1695 +1,1695 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A composite key may be modelled by a .NET class with a property for each key column. The class must be Serializable and override equals() and hashCode() - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Namespace used to find not-Fully Qualified Type Names - - - - - Assembly used to find not-Fully Qualified Type Names - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - undefined|any|none|null|0|-1|... - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The concrete collection should use a generic version or an object-based version. - - - - - - - - - - - - - - Types of polymorphism - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A composite key may be modelled by a .NET class with a property for each key column. The class must be Serializable and override equals() and hashCode() + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Namespace used to find not-Fully Qualified Type Names + + + + + Assembly used to find not-Fully Qualified Type Names + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + undefined|any|none|null|0|-1|... + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The concrete collection should use a generic version or an object-based version. + + + + + + + + + + + + + + Types of polymorphism + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lib/nunit.license.txt b/lib/nunit.license.txt index fef69103dcc..4beb762c937 100644 --- a/lib/nunit.license.txt +++ b/lib/nunit.license.txt @@ -1,15 +1,15 @@ -Copyright 2002-2007 Charlie Poole -Copyright 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov -Copyright 2000-2002 Philip A. Craig - -This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment (see the following) in the product documentation is required. - -Portions Copyright 2002-2007 Charlie Poole or Copyright 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov or Copyright 2000-2002 Philip A. Craig - -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. - -3. This notice may not be removed or altered from any source distribution. +Copyright 2002-2007 Charlie Poole +Copyright 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov +Copyright 2000-2002 Philip A. Craig + +This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment (see the following) in the product documentation is required. + +Portions Copyright 2002-2007 Charlie Poole or Copyright 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov or Copyright 2000-2002 Philip A. Craig + +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source distribution. diff --git a/lib/rhino.mocks/Rhino.Mocks.license.txt b/lib/rhino.mocks/Rhino.Mocks.license.txt index 33edd591612..1c8a46e4702 100644 --- a/lib/rhino.mocks/Rhino.Mocks.license.txt +++ b/lib/rhino.mocks/Rhino.Mocks.license.txt @@ -1,25 +1,25 @@ -Copyright (c) 2005 - 2008 Ayende Rahien (ayende@ayende.com) -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of Ayende Rahien nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +Copyright (c) 2005 - 2008 Ayende Rahien (ayende@ayende.com) +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of Ayende Rahien nor the names of its + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/lib/rhino.mocks/Rhino.Mocks.xml b/lib/rhino.mocks/Rhino.Mocks.xml index 5d9370d48f6..f9b8912b023 100644 --- a/lib/rhino.mocks/Rhino.Mocks.xml +++ b/lib/rhino.mocks/Rhino.Mocks.xml @@ -1,5413 +1,5413 @@ - - - - Rhino.Mocks - - - - - Defines constraints and return values for arguments of a mock. - Only use Arg inside a method call on a mock that is recording. - Example: - ExpectCall( - mock.foo( - Arg<int>.Is.GreaterThan(2), - Arg<string>.Is.Anything - )); - Use Arg.Text for string specific constraints - Use Arg<ListClass>.List for list specific constraints - - - - - - Register the predicate as a constraint for the current call. - - The predicate. - default(T) - - Allow you to use code to create constraints - - demo.AssertWasCalled(x => x.Bar(Arg{string}.Matches(a => a.StartsWith("b") && a.Contains("ba")))); - - - - - - Define a complex constraint for this argument by passing several constraints - combined with operators. (Use Is in simple cases.) - Example: Arg<string>.Matches(Is.Equal("Hello") || Text.EndsWith("u")); - - Constraints using Is, Text and List - Dummy to satisfy the compiler - - - - Define a Ref argument. - - Constraints for this argument - value returned by the mock - - - - - Define a out parameter. Use it together with the keyword out and use the - Dummy field available by the return value. - Example: mock.foo( out Arg<string>.Out("hello").Dummy ); - - - - - - - Define a simple constraint for this argument. (Use Matches in simple cases.) - Example: - Arg<int>.Is.Anthing - Arg<string>.Is.Equal("hello") - - - - - Define Constraints on list arguments. - - - - - Use the Arg class (without generic) to define Text constraints - - - - - Evaluate an equal constraint for . - - The object the parameter should equal to - - - - Define constraints on text arguments. - - - - - Used to manage the static state of the Arg<T> class"/> - - - - - Resets the static state - - - - - Returns return values for the out and ref parameters - Note: the array returned has the size of the number of out and ref - argument definitions - - - - - - Returns the constraints for all arguments. - Out arguments have an Is.Anything constraint and are also in the list. - - - - - - What should BackToRecord clear - - - - - Retain all expectations and behaviors and return to mock - - - - - All expectations - - - - - Event subscribers for this instance - - - - - Methods that should be forwarded to the base class implementation - - - - - Properties that should behave like properties - - - - - Remove all the behavior of the object - - - - - Interface for constraints - - - - - Determines if the object pass the constraints - - - - - And operator for constraints - - - - - Not operator for constraints - - - - - Or operator for constraints - - - - - Allow overriding of || or && - - - - - - - Allow overriding of || or && - - - - - - - Gets the message for this constraint - - - - - - Constrain that the public field has a specified value - - - - - Constrain that the public field matches another constraint. - - - - - Creates a new instance. - - Name of the public field. - Constraint to place on the public field value. - - - - Creates a new instance, specifying a disambiguating - for the public field. - - The type that declares the public field, used to disambiguate between public fields. - Name of the public field. - Constraint to place on the public field value. - - - - Determines if the object passes the constraint. - - - - - Gets the message for this constraint - - - - - - Creates a new instance. - - Name of the public field. - Expected value. - - - - Creates a new instance, specifying a disambiguating - for the public field. - - The type that declares the public field, used to disambiguate between public fields. - Name of the public field. - Expected value. - - - - Constrain that the property has a specified value - - - - - Constrain that the property matches another constraint. - - - - - Creates a new instance. - - Name of the property. - Constraint to place on the property value. - - - - Creates a new instance, specifying a disambiguating - for the property. - - The type that declares the property, used to disambiguate between properties. - Name of the property. - Constraint to place on the property value. - - - - Determines if the object passes the constraint. - - - - - Gets the message for this constraint - - - - - - Creates a new instance. - - Name of the property. - Expected value. - - - - Creates a new instance, specifying a disambiguating - for the property. - - The type that declares the property, used to disambiguate between properties. - Name of the property. - Expected value. - - - - Constrain that the parameter must be of the specified type - - - - - Creates a new instance. - - Type. - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Constraint that determines whether an object is the same object as another. - - - - - Creates a new instance. - - Obj. - - - - Determines if the object passes the constraints. - - - - - Gets the message for this constraint. - - - - - Evaluate a parameter using constraints - - - - - Create new instance - - - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - A constraint based on lambda expression, we are using Expression{T} - because we want to be able to get good error reporting on that. - - - - - Initializes a new instance of the class. - - The expr. - - - - Determines if the object pass the constraints - - - - - - - Gets the message for this constraint - - - - - - Constrain that the list contains the same items as the parameter list - - - - - Creates a new instance. - - In list. - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Constrain that the parameter is one of the items in the list - - - - - Creates a new instance. - - In list. - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Constrain that the object is inside the parameter list - - - - - Creates a new instance. - - In list. - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Applies another AbstractConstraint to the collection count. - - - - - Creates a new instance. - - The constraint that should be applied to the collection count. - - - - Determines if the parameter conforms to this constraint. - - - - - Gets the message for this constraint. - - - - - Applies another AbstractConstraint to a specific list element. - - - - - Creates a new instance. - - The zero-based index of the list element. - The constraint that should be applied to the list element. - - - - Determines if the parameter conforms to this constraint. - - - - - Gets the message for this constraint - - - - - - Applies another AbstractConstraint to a specific generic keyed list element. - - - - - Creates a new instance. - - The key of the list element. - The constraint that should be applied to the list element. - - - - Determines if the parameter conforms to this constraint. - - - - - Gets the message for this constraint - - - - - - Constrains that all elements are in the parameter list - - - - - Initializes a new instance of the class. - - The these. - - - - Determines if the object pass the constraints - - - - - - - Gets the message for this constraint - - - - - - Combines two constraints, constraint pass if either is fine. - - - - - Creates a new instance. - - C1. - C2. - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Negate a constraint - - - - - Creates a new instance. - - C1. - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Combines two constraints - - - - - - Creates a new instance. - - C1. - C2. - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Constrain the argument to validate according to regex pattern - - - - - Creates a new instance. - - Pattern. - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Constraint that evaluate whatever an argument contains the specified string. - - - - - Creates a new instance. - - Inner string. - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Constraint that evaluate whatever an argument ends with the specified string - - - - - Creates a new instance. - - End. - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Constraint that evaluate whatever an argument start with the specified string - - - - - Creates a new instance. - - Start. - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Constraint that evaluate whatever an object equals another - - - - - Creates a new instance. - - Obj. - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Constraint that always returns true - - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Constraint that evaluate whatever a comparable is greater than another - - - - - Creates a new instance. - - - - - Determines if the object pass the constraints - - - - - Gets the message for this constraint - - - - - - Initializes a new constraint object. - - The expected object, The actual object is passed in as a parameter to the method - - - - Evaluate this constraint. - - The actual object that was passed in the method call to the mock. - True when the constraint is met, else false. - - - - Checks if the properties of the object - are the same as the properies of the object. - - The expected object - The actual object - True when both objects have the same values, else False. - - - - - - - - - This is the real heart of the beast. - - - - Used by CheckReferenceType to check all properties of the reference type. - - The expected object - The actual object - True when both objects have the same values, else False. - - - - Used by CheckReferenceType to check all fields of the reference type. - - The expected object - The actual object - True when both objects have the same values, else False. - - - - Checks the items of both collections - - The expected collection - - True if both collections contain the same items in the same order. - - - - Builds a propertyname from the Stack _properties like 'Order.Product.Price' - to be used in the error message. - - A nested property name. - - - - Rhino.Mocks uses this property to generate an error message. - - - A message telling the tester why the constraint failed. - - - - - Provides access to the constraintes defined in the class to be used in context - with the syntax. - - The type of the argument - - - - Evaluate a greater than constraint for . - - The object the parameter should be greater than - - - - Evaluate a less than constraint for . - - The object the parameter should be less than - - - - Evaluate a less than or equal constraint for . - - The object the parameter should be less than or equal to - - - - Evaluate a greater than or equal constraint for . - - The object the parameter should be greater than or equal to - - - - Evaluate an equal constraint for . - - The object the parameter should equal to - - - - Evaluate a not equal constraint for . - - The object the parameter should not equal to - - - - Evaluate a same as constraint. - - The object the parameter should the same as. - - - - Evaluate a not same as constraint. - - The object the parameter should not be the same as. - - - - Throws NotSupportedException. Don't use Equals to define constraints. Use Equal instead. - - - - - - - Serves as a hash function for a particular type. - - - A hash code for the current . - - - - - A constraints that accept anything - - - - - - A constraint that accept only nulls - - - - - - A constraint that accept only non null values - - - - - - A constraint that accept only value of the specified type. - The check is performed on the type that has been defined - as the argument type. - - - - - Provides access to the constraints defined in the class to be used in context - with the syntax. - - - - - Determines whether the specified object is in the parameter. - The parameter must be IEnumerable. - - Obj. - - - - - Determines whatever the parameter is in the collection. - - - - - Determines that the parameter collection is identical to the specified collection - - - - - Determines that the parameter collection has the specified number of elements. - - The constraint that should be applied to the collection count. - - - - Determines that an element of the parameter collections conforms to another AbstractConstraint. - - The zero-based index of the list element. - The constraint which should be applied to the list element. - - - - Determines that all elements of the specified collection are in the the parameter collection - - The collection to compare against - The constraint which should be applied to the list parameter. - - - - Throws NotSupportedException. Don't use Equals to define constraints. Use Equal instead. - - - - - - - Serves as a hash function for a particular type. - - - A hash code for the current . - - - - - Provides a dummy field to pass as out or ref argument. - - - - - - Dummy field to satisfy the compiler. Used for out and ref arguments. - - - - - Central location for constraints for object's public fields - - - - - Constrains the parameter to have a public field with the specified value - - Name of the public field. - Expected value. - - - - - Constrains the parameter to have a public field with the specified value. - - The type that declares the public field, used to disambiguate between public fields. - Name of the public field. - Expected value. - - - - - Constrains the parameter to have a public field satisfying a specified constraint. - - Name of the public field. - Constraint for the public field. - - - - Constrains the parameter to have a public field satisfying a specified constraint. - - The type that declares the public field, used to disambiguate between public fields. - Name of the public field. - Constraint for the public field. - - - - Determines whether the parameter has the specified public field and that it is null. - - Name of the public field. - - - - - Determines whether the parameter has the specified public field and that it is null. - - The type that declares the public field, used to disambiguate between public fields. - Name of the public field. - - - - - Determines whether the parameter has the specified public field and that it is not null. - - Name of the public field. - - - - - Determines whether the parameter has the specified public field and that it is not null. - - The type that declares the public field, used to disambiguate between public fields. - Name of the public field. - - - - - Central location for constraints - - - - - Evaluate a greater than constraint for . - - The object the parameter should be greater than - - - - Evaluate a less than constraint for . - - The object the parameter should be less than - - - - Evaluate a less than or equal constraint for . - - The object the parameter should be less than or equal to - - - - Evaluate a greater than or equal constraint for . - - The object the parameter should be greater than or equal to - - - - Evaluate an equal constraint for . - - The object the parameter should equal to - - - - Evaluate a not equal constraint for . - - The object the parameter should not equal to - - - - Evaluate a same as constraint. - - The object the parameter should the same as. - - - - Evaluate a not same as constraint. - - The object the parameter should not be the same as. - - - - A constraints that accept anything - - - - - - A constraint that accept only nulls - - - - - - A constraint that accept only non null values - - - - - - A constraint that accept only value of the specified type - - - - - A constraint that accept only value of the specified type - - - - - Evaluate a parameter using a predicate - - The predicate to use - - - - Central location for constraints about lists and collections - - - - - Determines whether the specified obj is in the parameter. - The parameter must be IEnumerable. - - Obj. - - - - - Determines whatever the parameter is in the collection. - - - - - Determines that the parameter collection is identical to the specified collection - - - - - Determines that the parameter collection has the specified number of elements. - - The constraint that should be applied to the collection count. - - - - Determines that an element of the parameter collections conforms to another AbstractConstraint. - - The zero-based index of the list element. - The constraint which should be applied to the list element. - - - - Determines that an element of the parameter collections conforms to another AbstractConstraint. - - The key of the element. - The constraint which should be applied to the element. - - - - Determines that all elements of the specified collection are in the the parameter collection - - The collection to compare against - The constraint which should be applied to the list parameter. - - - - Central location for constraints for object's properties - - - - - Constrains the parameter to have property with the specified value - - Name of the property. - Expected value. - - - - - Constrains the parameter to have property with the specified value. - - The type that declares the property, used to disambiguate between properties. - Name of the property. - Expected value. - - - - - Constrains the parameter to have a property satisfying a specified constraint. - - Name of the property. - Constraint for the property. - - - - Constrains the parameter to have a property satisfying a specified constraint. - - The type that declares the property, used to disambiguate between properties. - Name of the property. - Constraint for the property. - - - - Determines whether the parameter has the specified property and that it is null. - - Name of the property. - - - - - Determines whether the parameter has the specified property and that it is null. - - The type that declares the property, used to disambiguate between properties. - Name of the property. - - - - - Determines whether the parameter has the specified property and that it is not null. - - Name of the property. - - - - - Determines whether the parameter has the specified property and that it is not null. - - The type that declares the property, used to disambiguate between properties. - Name of the property. - - - - - constraints the parameter to have the exact same property values as the expected object. - - An object, of the same type as the parameter, whose properties are set with the expected values. - An instance of the constraint that will do the actual check. - - The parameter's public property values and public field values will be matched against the expected object's - public property values and public field values. The first mismatch will be reported and no further matching is done. - The matching is recursive for any property or field that has properties or fields of it's own. - Collections are supported through IEnumerable, which means the constraint will check if the actual and expected - collection contain the same values in the same order, where the values contained by the collection can have properties - and fields of their own that will be checked as well because of the recursive nature of this constraint. - - - - - Central location for all text related constraints - - - - - Constrain the argument to starts with the specified string - - - - - Constrain the argument to end with the specified string - - - - - Constrain the argument to contain the specified string - - - - - Constrain the argument to validate according to regex pattern - - - - - Provides access to the constraintes defined in the class to be used in context - with the syntax. - - - - - Constrain the argument to starts with the specified string - - - - - - Constrain the argument to end with the specified string - - - - - Constrain the argument to contain the specified string - - - - - Constrain the argument to validate according to regex pattern - - - - - Throws NotSupportedException. Don't use Equals to define constraints. Use Equal instead. - - - - - - - Serves as a hash function for a particular type. - - - A hash code for the current . - - - - - This class defines a lot of method signatures, which we will use - to allow compatability on net-2.0 - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - dummy - - - - - Allows expectations to be set on methods that should never be called. - For methods with void return value, you need to use LastCall or - DoNotExpect.Call() with a delegate. - - - - - Sets LastCall.Repeat.Never() on /any/ proxy on /any/ repository on the current thread. - This method if not safe for multi threading scenarios. - - - - - Accepts a delegate that will execute inside the method which - LastCall.Repeat.Never() will be applied to. - It is expected to be used with anonymous delegates / lambda expressions and only one - method should be called. - - - IService mockSrv = mocks.CreateMock(typeof(IService)) as IService; - DoNotExpect.Call(delegate{ mockSrv.Stop(); }); - ... - - - - - An expectaton violation was detected. - - - - - Creates a new instance. - - Message. - - - - Serialization constructor - - - - - Signals that an object was call on a mock repository which doesn't - belong to this mock repository or not a mock - - - - - Creates a new instance. - - Message. - - - - Serialization constructor - - - - - Allows to set expectation on methods that has return values. - For methods with void return value, you need to use LastCall - - - - - The method options for the last call on /any/ proxy on /any/ repository on the current thread. - This method if not safe for multi threading scenarios, use . - - - - - Accepts a delegate that will execute inside the method, and then return the resulting - instance. - It is expected to be used with anonymous delegates / lambda expressions and only one - method should be called. - - - IService mockSrv = mocks.CreateMock(typeof(IService)) as IService; - Expect.Call(delegate{ mockSrv.Start(); }).Throw(new NetworkException()); - ... - - - - - Get the method options for the last method call on the mockInstance. - - - - - A delegate that can be used to get better syntax on Expect.Call(delegate { foo.DoSomething(); }); - - - - - Abstract class that holds common information for - expectations. - - - - - Interface to validate that a method call is correct. - - - - - Validate the arguments for the method. - This method can be called numerous times, so be careful about side effects - - The arguments with which the method was called - - - - Add an actual method call to this expectation - - - - - Returns the return value or throw the exception and setup any output / ref parameters - that has been set. - - - - - Builds the verification failure message. - - - - - - Gets the error message. - - - - - - Range of expected calls - - - - - Number of call actually made for this method - - - - - If this expectation is still waiting for calls. - - - - - The return value for a method matching this expectation - - - - - Gets or sets the exception to throw on a method matching this expectation. - - - - - Gets a value indicating whether this instance's action is staisfied. - A staisfied instance means that there are no more requirements from - this method. A method with non void return value must register either - a return value or an exception to throw. - - - - - Gets the method this expectation is for. - - - - - Gets or sets what special condtions there are for this method - repeating. - - - - - Gets a value indicating whether this expectation was satisfied - - - - - Specify whatever this expectation has a return value set - You can't check ReturnValue for this because a valid return value include null. - - - - - An action to execute when the method is matched. - - - - - Set the out / ref parameters for the method call. - The indexing is zero based and ignores any non out/ref parameter. - It is possible not to pass all the parameters. This method can be called only once. - - - - - Documentation Message - - - - - Gets the invocation for this expectation - - The invocation. - - - - Occurs when the exceptation is match on a method call - - - - - Allow to set the return value in the future, if it was already set. - - - - - Number of actuall calls made that passed this expectation - - - - - Range of expected calls that should pass this expectation. - - - - - The return value for a method matching this expectation - - - - - The exception to throw on a method matching this expectation. - - - - - The method this expectation is for. - - - - - The return value for this method was set - - - - - Whether this method will repeat - unlimited number of times. - - - - - A delegate that will be run when the - expectation is matched. - - - - - The arguments that matched this expectation. - - - - - Documentation message - - - - - The method originalInvocation - - - - - Get the hash code - - - - - Add an actual actualMethodCall call to this expectation - - - - - Builds the verification failure message. - - - - - - Returns the return value or throw the exception and setup output / ref parameters - - - - - Validate the arguments for the method on the child methods - - The arguments with which the method was called - - - - Creates a new instance. - - The originalInvocation for this method, required because it contains the generic type infromation - Number of method calls for this expectations - - - - Creates a new instance. - - Expectation. - - - - Validate the arguments for the method on the child methods - - The arguments with which the method was called - - - - Determines if this object equal to obj - - - - - The error message for these arguments - - - - - Asserts that the delegate has the same parameters as the expectation's method call - - - - - Setter for the outpur / ref parameters for this expecataion. - Can only be set once. - - - - - Specify whether this expectation has a return value set - You can't check ReturnValue for this because a valid return value include null. - - - - - Gets the method this expectation is for. - - - - - Gets the originalInvocation for this expectation - - The originalInvocation. - - - - Gets or sets what special condtions there are for this method - - - - - Range of expected calls - - - - - Number of call actually made for this method - - - - - If this expectation is still waiting for calls. - - - - - Gets a value indicating whether this expectation was satisfied - - - - - The return value for a method matching this expectation - - - - - An action to execute when the method is matched. - - - - - Gets or sets the exception to throw on a method matching this expectation. - - - - - Gets a value indicating whether this instance's action is staisfied. - A staisfied instance means that there are no more requirements from - this method. A method with non void return value must register either - a return value or an exception to throw or an action to execute. - - - - - Documentation message - - - - - Occurs when the exceptation is match on a method call - - - - - Allow to set the return value in the future, if it was already set. - - - - - Gets the error message. - - - - - - Expectation that matches any arguments for the method. - - - - - Creates a new instance. - - Invocation for this expectation - Number of method calls for this expectations - - - - Creates a new instance. - - Expectation. - - - - Validate the arguments for the method. - - The arguments with which the method was called - - - - Determines if the object equal to expectation - - - - - Get the hash code - - - - - Gets the error message. - - - - - - Summary description for ArgsEqualExpectation. - - - - - Creates a new instance. - - Expected args. - The invocation for this expectation - Number of method calls for this expectations - - - - Validate the arguments for the method. - - The arguments with which the method was called - - - - Determines if the object equal to expectation - - - - - Get the hash code - - - - - Gets the error message. - - - - - - Get the expected args. - - - - - Call a specified callback to verify the expectation - - - - - Creates a new instance. - - Expectation. - Callback. - - - - Creates a new instance. - - Invocation for this expectation - Callback. - Number of method calls for this expectations - - - - Validate the arguments for the method on the child methods - - The arguments with which the method was called - - - - Determines if the object equal to expectation - - - - - Get the hash code - - - - - Gets the error message. - - - - - - Expect the method's arguments to match the contraints - - - - - Creates a new instance. - - Invocation for this expectation - Constraints. - Number of method calls for this expectations - - - - Creates a new instance. - - Expectation. - Constraints. - - - - Validate the arguments for the method. - - The arguments with which the method was called - - - - Determines if the object equal to expectation - - - - - Get the hash code - - - - - Gets the error message. - - - - - - Doesn't log anything, just makes happy noises - - - - - Log expectations - allows to see what is going on inside Rhino Mocks - - - - - Logs the expectation as is was recorded - - The invocation. - The expectation. - - - - Logs the expectation as it was recorded - - The invocation. - The expectation. - - - - Logs the unexpected method call. - - The invocation. - The message. - - - - Logs the expectation as is was recorded - - The invocation. - The expectation. - - - - Logs the expectation as it was recorded - - The invocation. - The expectation. - - - - Logs the unexpected method call. - - The invocation. - The message. - - - - Operation on a remoting proxy - - - It is not possible to directly communicate to a real proxy via transparent proxy. - Transparent proxy impersonates a user type and only methods of that user type are callable. - The only methods that are guaranteed to exist on any transparent proxy are methods defined - in Object: namely ToString(), GetHashCode(), and Equals()). - - These three methods are the only way to tell the real proxy to do something. - Equals() is the most suitable of all, since it accepts an arbitrary object parameter. - The RemotingProxy code is built so that if it is compared to an IRemotingProxyOperation, - transparentProxy.Equals(operation) will call operation.Process(realProxy). - This way we can retrieve a real proxy from transparent proxy and perform - arbitrary operation on it. - - - - - Generates remoting proxies and provides utility functions - - - - - Create the proxy using remoting - - - - - Check whether an object is a transparent proxy with a RemotingProxy behind it - - Object to check - true if the object is a transparent proxy with a RemotingProxy instance behind it, false otherwise - We use Equals() method to communicate with the real proxy behind the object. - See IRemotingProxyOperation for more details - - - - Retrieve a mocked object from a transparent proxy - - Transparent proxy with a RemotingProxy instance behind it - Mocked object associated with the proxy - We use Equals() method to communicate with the real proxy behind the object. - See IRemotingProxyOperation for more details - - - - Implementation of IInvocation based on remoting proxy - - Some methods are marked NotSupported since they either don't make sense - for remoting proxies, or they are never called by Rhino Mocks - - - - Rudimetry implementation that simply logs methods calls as text. - - - - - Initializes a new instance of the class. - - The writer. - - - - Logs the expectation as it was recorded - - The invocation. - The expectation. - - - - Logs the expectation as it was recorded - - The invocation. - The expectation. - - - - Logs the unexpected method call. - - The invocation. - The message. - - - - Behave like a stub, all properties and events acts normally, methods calls - return default values by default (but can use expectations to set them up), etc. - - - - - Records all the expectations for a mock - - - - - Different actions on this mock - - - - - Add a method call for this state' mock. - - The invocation for this method - The method that was called - The arguments this method was called with - - - - Verify that this mock expectations have passed. - - - - - Verify that we can move to replay state and move - to the reply state. - - - - - Gets a mock state that match the original mock state of the object. - - - - - Get the options for the last method call - - - - - Set the exception to throw when Verify is called. - This is used to report exception that may have happened but where caught in the code. - This way, they are reported anyway when Verify() is called. - - - - - This method is called to indicate that a property behavior call. - This is done so we generate good error message in the common case of people using - Stubbed properties with Return(). - - - - - Gets the matching verify state for this state - - - - - Get the options for the last method call - - - - - Get the options for the last method call - - - - - Set the exception to throw when Verify is called. - This is used to report exception that may have happened but where caught in the code. - This way, they are reported anyway when Verify() is called. - - - - - This method is called to indicate that a property behavior call. - This is done so we generate good error message in the common case of people using - Stubbed properties with Return(). - - - - - Creates a new instance. - - Repository. - The proxy that generates the method calls - - - - Add a method call for this state' mock. - - The invocation for this method - The method that was called - The arguments this method was called with - - - - Verify that we can move to replay state and move - to the reply state. - - - - - Verify that we can move to replay state and move - to the reply state. - - - - - Verify that this mock expectations have passed. - - - - - Gets a mock state that match the original mock state of the object. - - - - - Asserts the previous method is closed (had an expectation set on it so we can replay it correctly) - - - - - Get the default call count range expectation - - - - - - Gets the last expectation. - - - - - Gets the total method calls count. - - - - - Get the options for the last method call - - - - - Gets the matching verify state for this state - - - - - Initializes a new instance of the class. - - The proxy that generates the method calls - Repository. - - - - We don't care much about expectations here, so we will remove the expectation if - it is not closed. - - - - - Verify that we can move to replay state and move - to the reply state. - - - - - - Get the default call count range expectation - - - - - - Validate expectations on recorded methods, but in general completely ignoring them. - Similar to except that it would return a - when BackToRecord is called. - - - - - Validate all expectations on a mock - - - - - The repository for this state - - - - - The proxy object for this state - - - - - Get the options for the last method call - - - - - Creates a new instance. - - The previous state for this method - - - - Add a method call for this state' mock. - - The invocation for this method - The method that was called - The arguments this method was called with - - - - Add a method call for this state' mock. - This allows derived method to cleanly get a the setupresult behavior while adding - their own. - - The invocation for this method - The method that was called - The arguments this method was called with - - - - Set the exception to throw when Verify is called. - This is used to report exception that may have happened but where caught in the code. - This way, they are reported anyway when Verify() is called. - - - - - not relevant - - - - - Verify that this mock expectations have passed. - - - - - Verify that we can move to replay state and move - to the reply state. - - - - - Gets a mock state that match the original mock state of the object. - - - - - Get the options for the last method call - - - - - Gets the matching verify state for this state - - - - - Initializes a new instance of the class. - - The previous state for this method - - - - Add a method call for this state' mock. - - The invocation for this method - The method that was called - The arguments this method was called with - - - - Gets a mock state that matches the original mock state of the object. - - - - - Write rhino mocks log info to the trace - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - if set to true [log recorded]. - if set to true [log replayed]. - if set to true [log unexpected]. - - - - Logs the expectation as is was recorded - - The invocation. - The expectation. - - - - Logs the expectation as it was recorded - - The invocation. - The expectation. - - - - Logs the unexpected method call. - - The invocation. - The message. - - - - Writes log information as stack traces about rhino mocks activity - - - - - Allows to redirect output to a different location. - - - - - Logs the expectation as is was recorded - - The invocation. - The expectation. - - - - Logs the expectation as it was recorded - - The invocation. - The expectation. - - - - Logs the unexpected method call. - - The invocation. - The message. - - - - Marker interface used to indicate that this is a partial mock. - - - - - Options for CallOriginalMethod - - - - - No expectation is created, the method will be called directly - - - - - Normal expectation is created, but when the method is later called, it will also call the original method - - - - - This is a data structure that is used by - to pass - the current method to the relevant delegate - - - - - Initializes a new instance of the class. - - The invocation. - - - - Gets the args for this method invocation - - - - - Get the method that was caused this invocation - - - - - Gets or sets the return value for this method invocation - - The return value. - - - - Adds optional new usage: - using(mockRepository.Record()) { - Expect.Call(mock.Method()).Return(retVal); - } - using(mockRepository.Playback()) { - // Execute code - } - N.B. mockRepository.ReplayAll() and mockRepository.VerifyAll() - calls are taken care of by Record/Playback - - - Creates proxied instances of types. - - - - Generates a stub without needing a - Arguments for 's constructor - The of stub to create. - The stub - - - - Generates a stub without needing a - The of stub. - Arguments for the 's constructor. - The stub - - - - Generate a mock object without needing a - type of mock object to create. - Arguments for 's constructor - the mock object - - - - Generate a multi-mock object without needing a - The typeof object to generate a mock for. - A second interface to generate a multi-mock for. - Arguments for 's constructor - the multi-mock object - - - - Generate a multi-mock object without without needing a - The typeof object to generate a mock for. - An interface to generate a multi-mock for. - A second interface to generate a multi-mock for. - Arguments for 's constructor - the multi-mock object - - - - Creates a multi-mock without without needing a - The type of mock to create, this can be a class - Any extra interfaces to add to the multi-mock, these can only be interfaces. - Arguments for 's constructor - the multi-mock object - - - - Creates a strict mock without without needing a - Any arguments required for the 's constructor - The type of mock object to create. - The mock object with strict replay semantics - - - - Creates a strict multi-mock without needing a - Any arguments required for the 's constructor - The type of mock object to create, this can be a class. - An interface to generate a multi-mock for, this must be an interface! - The multi-mock object with strict replay semantics - - - - Creates a strict multi-mock without needing a - Any arguments required for the 's constructor - The type of mock object to create, this can be a class. - An interface to generate a multi-mock for, this must be an interface! - A second interface to generate a multi-mock for, this must be an interface! - The multi-mock object with strict replay semantics - - - - Creates a strict multi-mock without needing a - The type of mock object to create, this can be a class - Any extra interfaces to generate a multi-mock for, these must be interaces! - Any arguments for the 's constructor - The strict multi-mock object - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Generate a mock object with dynamic replay semantics and remoting without needing the mock repository - - - - - Generate a mock object with strict replay semantics and remoting without needing the mock repository - - - - Helper method to create a mock object without a repository instance and put the object back into replay mode. - The type of mock object to create - A delegate that uses a mock repository instance to create the underlying mock - The mock object in the replay mode. - - - - - - - - - - - - - - This is a map of types to ProxyGenerators. - - - - - This is used to record the last repository that has a method called on it. - - - - - this is used to get to the last proxy on this repository. - - - - - For mock delegates, maps the proxy instance from intercepted invocations - back to the delegate that was originally returned to client code, if any. - - - - - All the proxies in the mock repositories - - - - - This is here because we can't put it in any of the recorders, since repeatable methods - have no orderring, and if we try to handle them using the usual manner, we would get into - wierd situations where repeatable method that was defined in an orderring block doesn't - exists until we enter this block. - - - - - Creates a new instance. - - - - - Move the repository to ordered mode - - - - - Move the repository to un-ordered mode - - - - - Creates a mock for the specified type. - - Type. - Arguments for the class' constructor, if mocking a concrete class - - - - Creates a strict mock for the specified type. - - Type. - Arguments for the class' constructor, if mocking a concrete class - - - - Creates a remoting mock for the specified type. - - Type. - Arguments for the class' constructor, if mocking a concrete class - - - - Creates a strict remoting mock for the specified type. - - Type. - Arguments for the class' constructor, if mocking a concrete class - - - - Creates a remoting mock for the specified type. - - - Arguments for the class' constructor, if mocking a concrete class - - - - - Creates a strict remoting mock for the specified type. - - - Arguments for the class' constructor, if mocking a concrete class - - - - - Creates a mock from several types, with strict semantics. - Only may be a class. - - - - - Creates a strict mock from several types, with strict semantics. - Only may be a class. - - - - - Creates a mock from several types, with strict semantics. - Only may be a class. - - The main type to mock. - Extra interface types to mock. - Arguments for the class' constructor, if mocking a concrete class. - - - - Creates a strict mock from several types, with strict semantics. - Only may be a class. - - The main type to mock. - Extra interface types to mock. - Arguments for the class' constructor, if mocking a concrete class. - - - - Creates a mock from several types, with dynamic semantics. - Only may be a class. - - The main type to mock. - Extra interface types to mock. - - - - Creates a mock from several types, with dynamic semantics. - Only may be a class. - - The main type to mock. - Extra interface types to mock. - Arguments for the class' constructor, if mocking a concrete class. - - - Creates a dynamic mock for the specified type. - Type. - Arguments for the class' constructor, if mocking a concrete class - - - Creates a dynamic mock for the specified type. - Type. - Arguments for the class' constructor, if mocking a concrete class - - - Creates a dynamic mock for the specified type. - - Arguments for the class' constructor, if mocking a concrete class - - - - Creates a mock object that defaults to calling the class methods if no expectation is set on the method. - Type. - Arguments for the class' constructor. - - - Creates a mock object that defaults to calling the class methods. - Type. - Extra interface types to mock. - - - Creates a mock object that defaults to calling the class methods. - Type. - Extra interface types to mock. - Arguments for the class' constructor. - - - Creates a mock object using remoting proxies - Type to mock - must be MarshalByRefObject - Mock object - Proxy mock can mock non-virtual methods, but not static methods - Creates the mock state for this proxy - - - - Cause the mock state to change to replay, any further call is compared to the - ones that were called in the record state. - - This method *cannot* be called from inside an ordering. - the object to move to replay state - - - - Cause the mock state to change to replay, any further call is compared to the - ones that were called in the record state. - - the object to move to replay state - - - - Move the mocked object back to record state.You can (and it's recommended) to run {Verify()} before you use this method. - Will delete all current expectations! - - - - Move the mocked object back to record state. - Optionally, can delete all current expectations, but allows more granularity about how - it would behave with regard to the object state. - - - - - Verify that all the expectations for this object were fulfilled. - - the object to verify the expectations for - - - - Get the method options for the last call on - mockedInstance. - - The mock object - Method options for the last call - - - - Maps an invocation proxy back to the mock object instance that was originally - returned to client code which might have been a delegate to this proxy. - - The mock object proxy from the intercepted invocation - The mock object - - - This is provided to allow advance extention functionality, where Rhino Mocks standard functionality is not enough. - The type to mock - Delegate that create the first state of the mocked object (usualy the record state). - Additional types to be implemented, this can be only interfaces - optional arguments for the constructor - - - - - Method: GetMockedObject - Get an IProxy from a mocked object instance, or throws if the - object is not a mock object. - - - - - Method: GetMockedObjectOrNull - Get an IProxy from a mocked object instance, or null if the - object is not a mock object. - - - - Pops the recorder. - - - Pushes the recorder. - New recorder. - - - - All the mock objects in this repository will be moved - to record state. - - - - - All the mock objects in this repository will be moved - to record state. - - - - - Replay all the mocks from this repository - - - - - Verify all the mocks from this repository - - - - - Gets the proxy generator for a specific type. Having a single ProxyGenerator - with multiple types linearly degrades the performance so this implementation - keeps one ProxyGenerator per type. - - - - Set the exception to be thrown when verified is called. - - - - Creates a mock for the spesified type with strict mocking semantics. - Strict semantics means that any call that wasn't explicitly recorded is considered an error and would cause an exception to be thrown. - - Arguments for the class' constructor, if mocking a concrete class - - - - Creates a mock for the spesified type with strict mocking semantics. - Strict semantics means that any call that wasn't explicitly recorded is considered an error and would cause an exception to be thrown. - - Arguments for the class' constructor, if mocking a concrete class - - - - Creates a dynamic mock for the specified type. - - Arguments for the class' constructor, if mocking a concrete class - - - - Creates a mock object from several types. - - - - - Creates a strict mock object from several types. - - - - - Create a mock object from several types with dynamic semantics. - - - - - Create a mock object from several types with partial semantics. - - - - - Create a mock object from several types with strict semantics. - - Extra interface types to mock. - Arguments for the class' constructor, if mocking a concrete class - - - - Create a strict mock object from several types with strict semantics. - - Extra interface types to mock. - Arguments for the class' constructor, if mocking a concrete class - - - - Create a mock object from several types with dynamic semantics. - - Extra interface types to mock. - Arguments for the class' constructor, if mocking a concrete class - - - - Create a mock object from several types with partial semantics. - - Extra interface types to mock. - Arguments for the class' constructor, if mocking a concrete class - - - - Create a mock object with from a class that defaults to calling the class methods - - Arguments for the class' constructor, if mocking a concrete class - - - - Create a stub object, one that has properties and events ready for use, and - can have methods called on it. It requires an explicit step in order to create - an expectation for a stub. - - The arguments for constructor. - - - - Create a stub object, one that has properties and events ready for use, and - can have methods called on it. It requires an explicit step in order to create - an expectation for a stub. - - The type. - The arguments for constructor. - The stub - - - - Returns true if the passed mock is currently in replay mode. - - The mock to test. - True if the mock is in replay mode, false otherwise. - - - - Determines whether the specified proxy is a stub. - - The proxy. - - - - Register a call on a prperty behavior - - - - - - Gets the recorder. - - - - - - Gets the replayer for this repository. - - - - - - Gets the last proxy which had a method call. - - - - - Delegate: CreateMockState - This is used internally to cleanly handle the creation of different - RecordMockStates. - - - - - A set of extension methods that adds Arrange Act Assert mode to Rhino Mocks - - - - - Create an expectation on this mock for this action to occur - - - The mock. - The action. - - - - - Reset all expectations on this mock object - - - The mock. - - - - Reset the selected expectation on this mock object - - - The mock. - The options to reset the expectations on this mock. - - - - Cause the mock state to change to replay, any further call is compared to the - ones that were called in the record state. - - the mocked object to move to replay state - - - - Gets the mock repository for this specificied mock object - - - The mock. - - - - - Create an expectation on this mock for this action to occur - - - - The mock. - The action. - - - - - Tell the mock object to perform a certain action when a matching - method is called. - Does not create an expectation for this method. - - - The mock. - The action. - - - - - Tell the mock object to perform a certain action when a matching - method is called. - Does not create an expectation for this method. - - - - The mock. - The action. - - - - - Gets the arguments for calls made on this mock object and the method that was called - in the action. - - - The mock. - The action. - - - Here we will get all the arguments for all the calls made to DoSomething(int) - - var argsForCalls = foo54.GetArgumentsForCallsMadeOn(x => x.DoSomething(0)) - - - - - - Gets the arguments for calls made on this mock object and the method that was called - in the action and matches the given constraints - - - The mock. - The action. - The setup constraints. - - - Here we will get all the arguments for all the calls made to DoSomething(int) - - var argsForCalls = foo54.GetArgumentsForCallsMadeOn(x => x.DoSomething(0)) - - - - - - Asserts that a particular method was called on this mock object - - - The mock. - The action. - - - - Asserts that a particular method was called on this mock object that match - a particular constraint set. - - - The mock. - The action. - The setup constraints. - - - - Asserts that a particular method was called on this mock object that match - a particular constraint set. - - - The mock. - The action. - - - - Asserts that a particular method was called on this mock object that match - a particular constraint set. - - - The mock. - The action. - The setup constraints. - - - - Asserts that a particular method was NOT called on this mock object - - - The mock. - The action. - - - - Asserts that a particular method was NOT called on this mock object that match - a particular constraint set. - - - The mock. - The action. - The setup constraints. - - - - Asserts that a particular method was NOT called on this mock object - - - The mock. - The action. - - - - Asserts that a particular method was NOT called on this mock object - - - The mock. - The action. - The setup constraints. - - - - Finds the approprite implementation type of this item. - This is the class or an interface outside of the rhino mocks. - - The mocked obj. - - - - - Verifies all expectations on this mock object - - The mock object. - - - - Gets the event raiser for the event that was called in the action passed - - The type of the event source. - The mock object. - The event subscription. - - - - - Raise the specified event using the passed arguments. - The even is extracted from the passed labmda - - The type of the event source. - The mock object. - The event subscription. - The sender. - The instance containing the event data. - - - - Raise the specified event using the passed arguments. - The even is extracted from the passed labmda - - The type of the event source. - The mock object. - The event subscription. - The args. - - - TODO: Make this better! It currently breaks down when mocking classes or - ABC's that call other virtual methods which are getting intercepted too. I wish - we could just walk Expression{Action{Action{T}} to assert only a single - method is being made. - - The workaround is to not call foo.AssertWasCalled .. rather foo.VerifyAllExpectations() - The type of mock object - The mock repository - The actual mock object to assert expectations on. - - - - Fake type that disallow creating it. - Should have been System.Type, but we can't use it. - - - - - Utility class for dealing with messing generics scenarios. - - - - - There are issues with trying to get this to work correctly with open generic types, since this is an edge case, - I am letting the runtime handle it. - - - - - Gets the real type, including de-constructing and constructing the type of generic - methods parameters. - - The type. - The invocation. - - - - - Because we need to support complex types here (simple generics were handled above) we - need to be aware of the following scenarios: - List[T] and List[Foo[T]] - - - - - ExpectationsList - - - - - Dictionary - - - - - Dictionary class - - - - - Create a new instance of ProxyStateDictionary - - - - - Allows to call a method and immediately get it's options. - - - - - Interface to allow calling a method and immediately get it's options. - - - - - Get the method options for the call - - The method call should go here, the return value is ignored - - - - Creates a new instance. - - - - - Get the method options for the call - - The method call should go here, the return value is ignored - - - - Allows to call a method and immediately get it's options. - Set the expected number for the call to Any() - - - - - Creates a new instance. - - Proxy. - Mocked instance. - - - - Get the method options for the call - - The method call should go here, the return value is ignored - - - - This class is reponsible for taking a delegate and creating a wrapper - interface around it, so it can be mocked. - - - - - The scope for all the delegate interfaces create by this mock repository. - - - - - Gets a type with an "Invoke" method suitable for use as a target of the - specified delegate type. - - - - - - - Raise events for all subscribers for an event - - - - - Raise events for all subscribers for an event - - - - - Raise the event - - - - - The most common form for the event handler signature - - - - - Create an event raiser for the specified event on this instance. - - - - - Creates a new instance of EventRaiser - - - - - Raise the event - - - - - The most common signature for events - Here to allow intellisense to make better guesses about how - it should suggest parameters. - - - - - Allows to define what would happen when a method - is called. - - - - - Allows to define what would happen when a method - is called. - - - - - Set the return value for the method. - - The object the method will return - IRepeat that defines how many times the method will return this value - - - - Allow to override this return value in the future - - IRepeat that defines how many times the method will return this value - - - - Throws the specified exception when the method is called. - - Exception to throw - - - - Ignores the arguments for this method. Any argument will be matched - againt this method. - - - - - Add constraints for the method's arguments. - - - - - Set a callback method for the last call - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched - and allow to optionally modify the invocation as needed - - - - - Call the original method on the class, bypassing the mocking layers. - - - - - - Call the original method on the class, optionally bypassing the mocking layers. - - - - - - Use the property as a simple property, getting/setting the values without - causing mock expectations. - - - - - Expect last (property) call as property setting, ignore the argument given - - - - - - Expect last (property) call as property setting with a given argument. - - - - - - - Get an event raiser for the last subscribed event. - - - - - Set the parameter values for out and ref parameters. - This is done using zero based indexing, and _ignoring_ any non out/ref parameter. - - - - - Documentation message for the expectation - - Message - - - - Better syntax to define repeats. - - - - - Allows to specify the number of time for method calls - - - - - Repeat the method twice. - - - - - Repeat the method once. - - - - - Repeat the method at least once, then repeat as many time as it would like. - - - - - Repeat the method any number of times. - This has special affects in that this method would now ignore orderring. - - - - - Set the range to repeat an action. - - Min. - Max. - - - - Set the amount of times to repeat an action. - - - - - This method must not appear in the replay state. - This has special affects in that this method would now ignore orderring. - - - - - Creates a new instance. - - the repository for this expectation - the recorder for this proxy - the proxy for this expectation - Expectation. - - - - Add constraints for the method's arguments. - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Set the return value for the method. - - The object the method will return - IRepeat that defines how many times the method will return this value - - - - Set the return value for the method, but allow to override this return value in the future - - IRepeat that defines how many times the method will return this value - - - - Throws the specified exception when the method is called. - - Exception to throw - - - - Ignores the arguments for this method. Any argument will be matched - againt this method. - - - - - Call the original method on the class, bypassing the mocking layers. - - - - - - Call the original method on the class, optionally bypassing the mocking layers - - - - - - Use the property as a simple property, getting/setting the values without - causing mock expectations. - - - - - Expect last (property) call as property setting, ignore the argument given - - - - - - Expect last (property) call as property setting with a given argument. - - - - - - - Gets the event raiser for the last event - - - - - Set the parameter values for out and ref parameters. - This is done using zero based indexing, and _ignoring_ any non out/ref parameter. - - - - - Repeat the method twice. - - - - - Repeat the method once. - - - - - Repeat the method at least once, then repeat as many time as it would like. - - - - - This method must not appear in the replay state. - - - - - Documentation message for the expectation - - Message - - - - Repeat the method any number of times. - - - - - Set the range to repeat an action. - - Min. - Max. - - - - Set the amount of times to repeat an action. - - - - - Better syntax to define repeats. - - - - - This class will provide hash code for hashtables without needing - to call the GetHashCode() on the object, which may very well be mocked. - This class has no state so it is a singelton to avoid creating a lot of objects - that does the exact same thing. See flyweight patterns. - - - - - Get the hash code for a proxy object without calling GetHashCode() - on the object. - - - - - Compares two instances of mocked objects - - - - - Compare two mocked objects - - - - - The next hash code value for a mock object. - This is safe for multi threading. - - - - - The sole instance of - - - - - This is a dummy type that is used merely to give DynamicProxy the proxy instance that - it needs to create IProxy's types. - - - - - Interface to find the repository of a mocked object - - - - - Return true if it should call the original method on the object - instead of pass it to the message chain. - - The method to call - - - - Register a method to be called on the object directly - - - - - Register a property on the object that will behave as a simple property - - - - - Check if the method was registered as a property method. - - - - - Do get/set on the property, according to need. - - - - - Do add/remove on the event - - - - - Get the subscribers of a spesific event - - - - - Gets the declaring type of the method, taking into acccount the possible generic - parameters that it was created with. - - - - - Clears the state of the object, remove original calls, property behavior, subscribed events, etc. - - - - - Get all the method calls arguments that were made against this object with the specificed - method. - - - Only method calls in replay mode are counted - - - - - Records the method call - - - - - Mocks that are tied to this mock lifestyle - - - - - The unique hash code of this mock, which is not related - to the value of the GetHashCode() call on the object. - - - - - Gets the repository. - - - - - Gets the implemented types by this mocked object - - The implemented. - - - - Gets or sets the constructor arguments. - - The constructor arguments. - - - - The mocked instance that this is representing - - - - - Create a new instance of - - - - - Return true if it should call the original method on the object - instead of pass it to the message chain. - - The method to call - - - - Register a method to be called on the object directly - - - - - Register a property on the object that will behave as a simple property - Return true if there is already a value for the property - - - - - Check if the method was registered as a property method. - - - - - Do get/set on the property, according to need. - - - - - Do add/remove on the event - - - - - Get the subscribers of a spesific event - - - - - Gets the declaring type of the method, taking into acccount the possible generic - parameters that it was created with. - - - - - Get all the method calls arguments that were made against this object with the specificed - method. - - - - - Only method calls in replay mode are counted - - - - - Records the method call - - - - - - - Clears the state of the object, remove original calls, property behavior, subscribed events, etc. - - - - - Mocks that are tied to this mock lifestyle - - - - - The unique hash code of this proxy, which is not related - to the value of the GetHashCode() call on the object. - - - - - Gets the repository. - - - - - Gets or sets the constructor arguments. - - The constructor arguments. - - - - The mocked instance that this is representing - - - - - Gets the implemented types by this mocked object - - The implemented. - - - - Range for expected method calls - - - - - Creates a new instance. - - Min. - Max. - - - - Return the string representation of this range. - - - - - Gets or sets the min. - - - - - - Gets or sets the max. - - - - - - Records all the expectations for a mock and - return a ReplayDynamicMockState when Replay() - is called. - - - - - Creates a new instance. - - Repository. - The proxy that generates the method calls - - - - Verify that we can move to replay state and move - to the reply state. - - - - - Get the default call count range expectation - - - - - - Gets a mock state that match the original mock state of the object. - - - - - Records all the expectations for a mock and - return a ReplayPartialMockState when Replay() - is called. - - - - - Creates a new instance. - - Repository. - The proxy that generates the method calls - - - - Verify that we can move to replay state and move - to the reply state. - - - - - Gets a mock state that matches the original mock state of the object. - - - - - Options for special repeat option - - - - - This method can be called only as many times as the IMethodOptions.Expect allows. - - - - - This method should never be called - - - - - This method can be call any number of times - - - - - This method will call the original method - - - - - This method will call the original method, bypassing the mocking layer - - - - - This method will simulate simple property behavior - - - - - Validate all expectations on a mock and ignores calls to - any method that was not setup properly. - - - - - Creates a new instance. - - The previous state for this method - - - - Add a method call for this state' mock. - - The invocation for this method - The method that was called - The arguments this method was called with - - - - Gets a mock state that match the original mock state of the object. - - - - - Validate all expectations on a mock and ignores calls to - any method that was not setup properly. - - - - - Creates a new instance. - - The previous state for this method - - - - Add a method call for this state' mock. - - The invocation for this method - The method that was called - The arguments this method was called with - - - - Gets a mock state that match the original mock state of the object. - - - - - Summary description for RhinoInterceptor. - - - - - Creates a new instance. - - - - - Intercept a method call and direct it to the repository. - - - - - Validate arguments for methods - - - - - Validate that the passed argument is not null. - - The object to validate - The name of the argument - - If the obj is null, an ArgumentNullException with the passed name - is thrown. - - - - - Validate that the arguments are equal. - - Expected args. - Actual Args. - - - - Validate that the two arguments are equals, including validation for - when the arguments are collections, in which case it will validate their values. - - - - - This method is safe for use even if any of the objects is a mocked object - that override equals. - - - - - Throw an object already verified when accessed - - - - - Create a new instance of VerifiedMockState - - The previous mock state, used to get the initial record state - - - - Add a method call for this state' mock. - - The invocation for this method - The method that was called - The arguments this method was called with - - - - Verify that this mock expectations have passed. - - - - - Verify that we can move to replay state and move - to the reply state. - - - - - Gets a mock state that match the original mock state of the object. - - - - - Get the options for the last method call - - - - - Set the exception to throw when Verify is called. - This is used to report exception that may have happened but where caught in the code. - This way, they are reported anyway when Verify() is called. - - - - - not relevant - - - - - Gets the matching verify state for this state - - - - - Get the options for the last method call - - - - - Records the actions on all the mocks created by a repository. - - - - - Records the specified call with the specified args on the mocked object. - - - - - Get the expectation for this method on this object with this arguments - - - - - This check the methods that were setup using the SetupResult.For() - or LastCall.Repeat.Any() and that bypass the whole expectation model. - - - - - Gets the all expectations for a mocked object and method combination, - regardless of the expected arguments / callbacks / contraints. - - Mocked object. - Method. - List of all relevant expectation - - - - Gets the all expectations for proxy. - - Mocked object. - List of all relevant expectation - - - - Removes all the repeatable expectations for proxy. - - Mocked object. - - - - Replaces the old expectation with the new expectation for the specified proxy/method pair. - This replace ALL expectations that equal to old expectations. - - Proxy. - Method. - Old expectation. - New expectation. - - - - Adds the recorder and turn it into the active recorder. - - Recorder. - - - - Moves to previous recorder. - - - - - Gets the recorded expectation or null. - - - - - Gets the next expected calls string. - - - - - Moves to parent recorder. - - - - - Set the expectation so it can repeat any number of times. - - - - - Removes the expectation from the recorder - - - - - Clear the replayer to call (and all its chain of replayers) - This also removes it from the list of expectations, so it will never be considered again - - - - - Get the expectation for this method on this object with this arguments - - - - - Gets a value indicating whether this instance has expectations that weren't satisfied yet. - - - true if this instance has expectations; otherwise, false. - - - - - Allows to set various options for the last method call on - a specified object. - If the method has a return value, it's recommended to use Expect - - - - - Allows to get an interface to work on the last call. - - The mocked object - Interface that allows to set options for the last method call on this object - - - - Set the return value for the method. - - The object the method will return - IRepeat that defines how many times the method will return this value - - - - Set the return value for the method. This overload is needed for LastCall.Return(null) - - The object the method will return - IRepeat that defines how many times the method will return this value - - - - Throws the specified exception when the method is called. - - Exception to throw - - - - Ignores the arguments for this method. Any argument will be matched - againt this method. - - - - - Add constraints for the method's arguments. - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Set a callback method for the last call - - - - - Call the original method on the class, bypassing the mocking layers, for the last call. - - - - - Call the original method on the class, optionally bypassing the mocking layers, for the last call. - - - - - Set a delegate to be called when the expectation is matched. - The delegate return value will be returned from the expectation. - - - - - Gets an interface that will raise the last event when called. - - - - - Set the parameter values for out and ref parameters. - This is done using zero based indexing, and _ignoring_ any non out/ref parameter. - - - - - Documentation message for the expectation - - Message - - - - Use the property as a simple property, getting/setting the values without - causing mock expectations. - - - - - Better syntax to define repeats. - - - - - Base class for method recorders, handle delegating to inner recorder if needed. - - - - - List of the expected actions on for this recorder - The legal values are: - * Expectations - * Method Recorders - - - - - The current recorder. - - - - - The current replayer; - - - - - The parent recorder of this one, may be null. - - - - - This contains a list of all the replayers that should be ignored - for a spesific method call. A replayer gets into this list by calling - ClearReplayerToCall() on its parent. This list is Clear()ed on each new invocation. - - - - - All the repeatable methods calls. - - - - - Counts the recursion depth of the current expectation search stack - - - - - Creates a new instance. - - - - - Creates a new instance. - - Parent recorder. - Repeatable methods - - - - Records the specified call with the specified args on the mocked object. - - - - - Get the expectation for this method on this object with this arguments - - - - - Gets the all expectations for a mocked object and method combination, - regardless of the expected arguments / callbacks / contraints. - - Mocked object. - Method. - List of all relevant expectation - - - - Gets the all expectations for proxy. - - Mocked object. - List of all relevant expectation - - - - Replaces the old expectation with the new expectation for the specified proxy/method pair. - This replace ALL expectations that equal to old expectations. - - Proxy. - Method. - Old expectation. - New expectation. - - - - Remove the all repeatable expectations for proxy. - - Mocked object. - - - - Set the expectation so it can repeat any number of times. - - - - - Removes the expectation from the recorder - - - - - Adds the recorder and turn it into the active recorder. - - Recorder. - - - - Moves to previous recorder. - - - - - Moves to parent recorder. - - - - - Gets the recorded expectation or null. - - - - - Clear the replayer to call (and all its chain of replayers). - This also removes it from the list of expectations, so it will never be considered again - - - - - Get the expectation for this method on this object with this arguments - - - - - Gets the next expected calls string. - - - - - Handles the real getting of the recorded expectation or null. - - - - - Handle the real execution of this method for the derived class - - - - - Handle the real execution of this method for the derived class - - - - - Handle the real execution of this method for the derived class - - - - - Handle the real execution of this method for the derived class - - - - - Handle the real execution of this method for the derived class - - - - - Handle the real execution of this method for the derived class - - - - - Should this replayer be considered valid for this call? - - - - - This check the methods that were setup using the SetupResult.For() - or LastCall.Repeat.Any() and that bypass the whole expectation model. - - - - - Gets a value indicating whether this instance has expectations that weren't satisfied yet. - - - true if this instance has expectations; otherwise, false. - - - - - Handle the real execution of this method for the derived class - - - - - Ordered collection of methods, methods must arrive in specified order - in order to pass. - - - - - Unordered collection of method records, any expectation that exist - will be matched. - - - - - The parent recorder we have redirected to. - Useful for certain edge cases in orderring. - See: FieldProblem_Entropy for the details. - - - - - Creates a new instance. - - Parent recorder. - Repeatable methods - - - - Creates a new instance. - - - - - Records the specified call with the specified args on the mocked object. - - Mocked object. - Method. - Expectation. - - - - Get the expectation for this method on this object with this arguments - - Invocation for this method - Mocked object. - Method. - Args. - True is the call was recorded, false otherwise - - - - Gets the all expectations for a mocked object and method combination, - regardless of the expected arguments / callbacks / contraints. - - Mocked object. - Method. - List of all relevant expectation - - - - Gets the all expectations for proxy. - - Mocked object. - List of all relevant expectation - - - - Replaces the old expectation with the new expectation for the specified proxy/method pair. - This replace ALL expectations that equal to old expectations. - - Proxy. - Method. - Old expectation. - New expectation. - - - - Handle the real execution of this method for the derived class - - - - - Handles the real getting of the recorded expectation or null. - - - - - Handle the real execution of this method for the derived class - - - - - Gets the next expected calls string. - - - - - Create an exception for an unexpected method call. - - - - - Gets a value indicating whether this instance has expectations that weren't satisfied yet. - - - true if this instance has expectations; otherwise, false. - - - - - Creates a new instance. - - Parent recorder. - Repetable methods - - - - Creates a new instance. - - - - - Handles the real getting of the recorded expectation or null. - - - - - Get the expectation for this method on this object with this arguments - - - - - Gets the next expected calls string. - - - - - Hold an expectation for a method call on an object - - - - - Creates a new instance. - - Proxy. - Method. - Expectation. - - - - Determines if the object equal to this instance - - Obj. - - - - - Gets the hash code. - - - - - - Gets the proxy. - - - - - - Gets the method. - - - - - - Gets the expectation. - - - - - - Holds a pair of mocked object and a method - and allows to compare them against each other. - This allows us to have a distinction between mockOne.MyMethod() and - mockTwo.MyMethod()... - - - - - Creates a new instance. - - Proxy. - Method. - - - - Determines whatever obj equals to this instance. - ProxyMethodPairs are equal when they point to the same /instance/ of - an object, and to the same method. - - Obj. - - - - - Gets the hash code. - - - - - - Gets the proxy. - - - - - - Gets the method. - - - - - - Change the recorder from ordered to unordered and vice versa - - - - - Creates a new instance. - - - - - Disposes this instance. - - - - - Accessor for the current mocker - - - - - The current mocker - - - - - Used for [assembly: InternalsVisibleTo(RhinoMocks.StrongName)] - Used for [assembly: InternalsVisibleTo(RhinoMocks.NormalName)] - - - - - Strong name for the Dynamic Proxy assemblies. Used for InternalsVisibleTo specification. - - - - - Normal name for dynamic proxy assemblies. Used for InternalsVisibleTo specification. - - - - - Logs all method calls for methods - - - - - Setup method calls to repeat any number of times. - - - - - Get the method options and set the last method call to repeat - any number of times. - This also means that the method would transcend ordering - - - - - Get the method options for the last method call on the mockInstance and set it - to repeat any number of times. - This also means that the method would transcend ordering - - - - - Utility class for working with method calls. - - - - - Return the string representation of a method call and its arguments. - - The method - The method arguments - Invocation of the method, used to get the generics arguments - Delegate to format the parameter - The string representation of this method call - - - - Return the string representation of a method call and its arguments. - - The invocation of the method, used to get the generic parameters - The method - The method arguments - The string representation of this method call - - - - Delegate to format the argument for the string representation of - the method call. - - - - - Utility to get the default value for a type - - - - - The default value for a type. - Null for reference types and void - 0 for value types. - First element for enums - Note that we need to get the value even for opened generic types, such as those from - generic methods. - - Type. - The invocation. - the default value - - - - Allows easier access to MockRepository, works closely with Mocker.Current to - allow access to a context where the mock repository is automatially verified at - the end of the code block. - - - - - Initialize a code block where Mocker.Current is initialized. - At the end of the code block, all the expectation will be verified. - This overload will create a new MockRepository. - - The code that will be executed under the mock context - - - - Initialize a code block where Mocker.Current is initialized. - At the end of the code block, all the expectation will be verified. - This overload will create a new MockRepository. - - The mock repository to use, at the end of the code block, VerifyAll() will be called on the repository. - The code that will be executed under the mock context - - - - Create a FluentMocker - - The mock repository to use. - - - - A method with no arguments and no return value that will be called under the mock context. - - - - - FluentMocker implements some kind of fluent interface attempt - for saying "With the Mocks [mocks], Expecting (in same order) [things] verify [that]." - - - - - Interface to verify previously defined expectations - - - - - Verifies if a piece of code - - - - - Defines unordered expectations - - A delegate describing the expectations - an IMockVerifier - - - - Defines ordered expectations - - A delegate describing the expectations - an IMockVerifier - - - - Verifies previously defined expectations - - - - - This delegate is compatible with the System.Func{T,R} signature - We have to define our own to get compatability with 2.0 - - - - - This attribute is here so we can get better Pex integration - Using this means that Pex will not try to inspect the work of - the actual proxies being generated by Rhino Mocks - - - - + + + + Rhino.Mocks + + + + + Defines constraints and return values for arguments of a mock. + Only use Arg inside a method call on a mock that is recording. + Example: + ExpectCall( + mock.foo( + Arg<int>.Is.GreaterThan(2), + Arg<string>.Is.Anything + )); + Use Arg.Text for string specific constraints + Use Arg<ListClass>.List for list specific constraints + + + + + + Register the predicate as a constraint for the current call. + + The predicate. + default(T) + + Allow you to use code to create constraints + + demo.AssertWasCalled(x => x.Bar(Arg{string}.Matches(a => a.StartsWith("b") && a.Contains("ba")))); + + + + + + Define a complex constraint for this argument by passing several constraints + combined with operators. (Use Is in simple cases.) + Example: Arg<string>.Matches(Is.Equal("Hello") || Text.EndsWith("u")); + + Constraints using Is, Text and List + Dummy to satisfy the compiler + + + + Define a Ref argument. + + Constraints for this argument + value returned by the mock + + + + + Define a out parameter. Use it together with the keyword out and use the + Dummy field available by the return value. + Example: mock.foo( out Arg<string>.Out("hello").Dummy ); + + + + + + + Define a simple constraint for this argument. (Use Matches in simple cases.) + Example: + Arg<int>.Is.Anthing + Arg<string>.Is.Equal("hello") + + + + + Define Constraints on list arguments. + + + + + Use the Arg class (without generic) to define Text constraints + + + + + Evaluate an equal constraint for . + + The object the parameter should equal to + + + + Define constraints on text arguments. + + + + + Used to manage the static state of the Arg<T> class"/> + + + + + Resets the static state + + + + + Returns return values for the out and ref parameters + Note: the array returned has the size of the number of out and ref + argument definitions + + + + + + Returns the constraints for all arguments. + Out arguments have an Is.Anything constraint and are also in the list. + + + + + + What should BackToRecord clear + + + + + Retain all expectations and behaviors and return to mock + + + + + All expectations + + + + + Event subscribers for this instance + + + + + Methods that should be forwarded to the base class implementation + + + + + Properties that should behave like properties + + + + + Remove all the behavior of the object + + + + + Interface for constraints + + + + + Determines if the object pass the constraints + + + + + And operator for constraints + + + + + Not operator for constraints + + + + + Or operator for constraints + + + + + Allow overriding of || or && + + + + + + + Allow overriding of || or && + + + + + + + Gets the message for this constraint + + + + + + Constrain that the public field has a specified value + + + + + Constrain that the public field matches another constraint. + + + + + Creates a new instance. + + Name of the public field. + Constraint to place on the public field value. + + + + Creates a new instance, specifying a disambiguating + for the public field. + + The type that declares the public field, used to disambiguate between public fields. + Name of the public field. + Constraint to place on the public field value. + + + + Determines if the object passes the constraint. + + + + + Gets the message for this constraint + + + + + + Creates a new instance. + + Name of the public field. + Expected value. + + + + Creates a new instance, specifying a disambiguating + for the public field. + + The type that declares the public field, used to disambiguate between public fields. + Name of the public field. + Expected value. + + + + Constrain that the property has a specified value + + + + + Constrain that the property matches another constraint. + + + + + Creates a new instance. + + Name of the property. + Constraint to place on the property value. + + + + Creates a new instance, specifying a disambiguating + for the property. + + The type that declares the property, used to disambiguate between properties. + Name of the property. + Constraint to place on the property value. + + + + Determines if the object passes the constraint. + + + + + Gets the message for this constraint + + + + + + Creates a new instance. + + Name of the property. + Expected value. + + + + Creates a new instance, specifying a disambiguating + for the property. + + The type that declares the property, used to disambiguate between properties. + Name of the property. + Expected value. + + + + Constrain that the parameter must be of the specified type + + + + + Creates a new instance. + + Type. + + + + Determines if the object pass the constraints + + + + + Gets the message for this constraint + + + + + + Constraint that determines whether an object is the same object as another. + + + + + Creates a new instance. + + Obj. + + + + Determines if the object passes the constraints. + + + + + Gets the message for this constraint. + + + + + Evaluate a parameter using constraints + + + + + Create new instance + + + + + + Determines if the object pass the constraints + + + + + Gets the message for this constraint + + + + + + A constraint based on lambda expression, we are using Expression{T} + because we want to be able to get good error reporting on that. + + + + + Initializes a new instance of the class. + + The expr. + + + + Determines if the object pass the constraints + + + + + + + Gets the message for this constraint + + + + + + Constrain that the list contains the same items as the parameter list + + + + + Creates a new instance. + + In list. + + + + Determines if the object pass the constraints + + + + + Gets the message for this constraint + + + + + + Constrain that the parameter is one of the items in the list + + + + + Creates a new instance. + + In list. + + + + Determines if the object pass the constraints + + + + + Gets the message for this constraint + + + + + + Constrain that the object is inside the parameter list + + + + + Creates a new instance. + + In list. + + + + Determines if the object pass the constraints + + + + + Gets the message for this constraint + + + + + + Applies another AbstractConstraint to the collection count. + + + + + Creates a new instance. + + The constraint that should be applied to the collection count. + + + + Determines if the parameter conforms to this constraint. + + + + + Gets the message for this constraint. + + + + + Applies another AbstractConstraint to a specific list element. + + + + + Creates a new instance. + + The zero-based index of the list element. + The constraint that should be applied to the list element. + + + + Determines if the parameter conforms to this constraint. + + + + + Gets the message for this constraint + + + + + + Applies another AbstractConstraint to a specific generic keyed list element. + + + + + Creates a new instance. + + The key of the list element. + The constraint that should be applied to the list element. + + + + Determines if the parameter conforms to this constraint. + + + + + Gets the message for this constraint + + + + + + Constrains that all elements are in the parameter list + + + + + Initializes a new instance of the class. + + The these. + + + + Determines if the object pass the constraints + + + + + + + Gets the message for this constraint + + + + + + Combines two constraints, constraint pass if either is fine. + + + + + Creates a new instance. + + C1. + C2. + + + + Determines if the object pass the constraints + + + + + Gets the message for this constraint + + + + + + Negate a constraint + + + + + Creates a new instance. + + C1. + + + + Determines if the object pass the constraints + + + + + Gets the message for this constraint + + + + + + Combines two constraints + + + + + + Creates a new instance. + + C1. + C2. + + + + Determines if the object pass the constraints + + + + + Gets the message for this constraint + + + + + + Constrain the argument to validate according to regex pattern + + + + + Creates a new instance. + + Pattern. + + + + Determines if the object pass the constraints + + + + + Gets the message for this constraint + + + + + + Constraint that evaluate whatever an argument contains the specified string. + + + + + Creates a new instance. + + Inner string. + + + + Determines if the object pass the constraints + + + + + Gets the message for this constraint + + + + + + Constraint that evaluate whatever an argument ends with the specified string + + + + + Creates a new instance. + + End. + + + + Determines if the object pass the constraints + + + + + Gets the message for this constraint + + + + + + Constraint that evaluate whatever an argument start with the specified string + + + + + Creates a new instance. + + Start. + + + + Determines if the object pass the constraints + + + + + Gets the message for this constraint + + + + + + Constraint that evaluate whatever an object equals another + + + + + Creates a new instance. + + Obj. + + + + Determines if the object pass the constraints + + + + + Gets the message for this constraint + + + + + + Constraint that always returns true + + + + + Determines if the object pass the constraints + + + + + Gets the message for this constraint + + + + + + Constraint that evaluate whatever a comparable is greater than another + + + + + Creates a new instance. + + + + + Determines if the object pass the constraints + + + + + Gets the message for this constraint + + + + + + Initializes a new constraint object. + + The expected object, The actual object is passed in as a parameter to the method + + + + Evaluate this constraint. + + The actual object that was passed in the method call to the mock. + True when the constraint is met, else false. + + + + Checks if the properties of the object + are the same as the properies of the object. + + The expected object + The actual object + True when both objects have the same values, else False. + + + + + + + + + This is the real heart of the beast. + + + + Used by CheckReferenceType to check all properties of the reference type. + + The expected object + The actual object + True when both objects have the same values, else False. + + + + Used by CheckReferenceType to check all fields of the reference type. + + The expected object + The actual object + True when both objects have the same values, else False. + + + + Checks the items of both collections + + The expected collection + + True if both collections contain the same items in the same order. + + + + Builds a propertyname from the Stack _properties like 'Order.Product.Price' + to be used in the error message. + + A nested property name. + + + + Rhino.Mocks uses this property to generate an error message. + + + A message telling the tester why the constraint failed. + + + + + Provides access to the constraintes defined in the class to be used in context + with the syntax. + + The type of the argument + + + + Evaluate a greater than constraint for . + + The object the parameter should be greater than + + + + Evaluate a less than constraint for . + + The object the parameter should be less than + + + + Evaluate a less than or equal constraint for . + + The object the parameter should be less than or equal to + + + + Evaluate a greater than or equal constraint for . + + The object the parameter should be greater than or equal to + + + + Evaluate an equal constraint for . + + The object the parameter should equal to + + + + Evaluate a not equal constraint for . + + The object the parameter should not equal to + + + + Evaluate a same as constraint. + + The object the parameter should the same as. + + + + Evaluate a not same as constraint. + + The object the parameter should not be the same as. + + + + Throws NotSupportedException. Don't use Equals to define constraints. Use Equal instead. + + + + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + A constraints that accept anything + + + + + + A constraint that accept only nulls + + + + + + A constraint that accept only non null values + + + + + + A constraint that accept only value of the specified type. + The check is performed on the type that has been defined + as the argument type. + + + + + Provides access to the constraints defined in the class to be used in context + with the syntax. + + + + + Determines whether the specified object is in the parameter. + The parameter must be IEnumerable. + + Obj. + + + + + Determines whatever the parameter is in the collection. + + + + + Determines that the parameter collection is identical to the specified collection + + + + + Determines that the parameter collection has the specified number of elements. + + The constraint that should be applied to the collection count. + + + + Determines that an element of the parameter collections conforms to another AbstractConstraint. + + The zero-based index of the list element. + The constraint which should be applied to the list element. + + + + Determines that all elements of the specified collection are in the the parameter collection + + The collection to compare against + The constraint which should be applied to the list parameter. + + + + Throws NotSupportedException. Don't use Equals to define constraints. Use Equal instead. + + + + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + Provides a dummy field to pass as out or ref argument. + + + + + + Dummy field to satisfy the compiler. Used for out and ref arguments. + + + + + Central location for constraints for object's public fields + + + + + Constrains the parameter to have a public field with the specified value + + Name of the public field. + Expected value. + + + + + Constrains the parameter to have a public field with the specified value. + + The type that declares the public field, used to disambiguate between public fields. + Name of the public field. + Expected value. + + + + + Constrains the parameter to have a public field satisfying a specified constraint. + + Name of the public field. + Constraint for the public field. + + + + Constrains the parameter to have a public field satisfying a specified constraint. + + The type that declares the public field, used to disambiguate between public fields. + Name of the public field. + Constraint for the public field. + + + + Determines whether the parameter has the specified public field and that it is null. + + Name of the public field. + + + + + Determines whether the parameter has the specified public field and that it is null. + + The type that declares the public field, used to disambiguate between public fields. + Name of the public field. + + + + + Determines whether the parameter has the specified public field and that it is not null. + + Name of the public field. + + + + + Determines whether the parameter has the specified public field and that it is not null. + + The type that declares the public field, used to disambiguate between public fields. + Name of the public field. + + + + + Central location for constraints + + + + + Evaluate a greater than constraint for . + + The object the parameter should be greater than + + + + Evaluate a less than constraint for . + + The object the parameter should be less than + + + + Evaluate a less than or equal constraint for . + + The object the parameter should be less than or equal to + + + + Evaluate a greater than or equal constraint for . + + The object the parameter should be greater than or equal to + + + + Evaluate an equal constraint for . + + The object the parameter should equal to + + + + Evaluate a not equal constraint for . + + The object the parameter should not equal to + + + + Evaluate a same as constraint. + + The object the parameter should the same as. + + + + Evaluate a not same as constraint. + + The object the parameter should not be the same as. + + + + A constraints that accept anything + + + + + + A constraint that accept only nulls + + + + + + A constraint that accept only non null values + + + + + + A constraint that accept only value of the specified type + + + + + A constraint that accept only value of the specified type + + + + + Evaluate a parameter using a predicate + + The predicate to use + + + + Central location for constraints about lists and collections + + + + + Determines whether the specified obj is in the parameter. + The parameter must be IEnumerable. + + Obj. + + + + + Determines whatever the parameter is in the collection. + + + + + Determines that the parameter collection is identical to the specified collection + + + + + Determines that the parameter collection has the specified number of elements. + + The constraint that should be applied to the collection count. + + + + Determines that an element of the parameter collections conforms to another AbstractConstraint. + + The zero-based index of the list element. + The constraint which should be applied to the list element. + + + + Determines that an element of the parameter collections conforms to another AbstractConstraint. + + The key of the element. + The constraint which should be applied to the element. + + + + Determines that all elements of the specified collection are in the the parameter collection + + The collection to compare against + The constraint which should be applied to the list parameter. + + + + Central location for constraints for object's properties + + + + + Constrains the parameter to have property with the specified value + + Name of the property. + Expected value. + + + + + Constrains the parameter to have property with the specified value. + + The type that declares the property, used to disambiguate between properties. + Name of the property. + Expected value. + + + + + Constrains the parameter to have a property satisfying a specified constraint. + + Name of the property. + Constraint for the property. + + + + Constrains the parameter to have a property satisfying a specified constraint. + + The type that declares the property, used to disambiguate between properties. + Name of the property. + Constraint for the property. + + + + Determines whether the parameter has the specified property and that it is null. + + Name of the property. + + + + + Determines whether the parameter has the specified property and that it is null. + + The type that declares the property, used to disambiguate between properties. + Name of the property. + + + + + Determines whether the parameter has the specified property and that it is not null. + + Name of the property. + + + + + Determines whether the parameter has the specified property and that it is not null. + + The type that declares the property, used to disambiguate between properties. + Name of the property. + + + + + constraints the parameter to have the exact same property values as the expected object. + + An object, of the same type as the parameter, whose properties are set with the expected values. + An instance of the constraint that will do the actual check. + + The parameter's public property values and public field values will be matched against the expected object's + public property values and public field values. The first mismatch will be reported and no further matching is done. + The matching is recursive for any property or field that has properties or fields of it's own. + Collections are supported through IEnumerable, which means the constraint will check if the actual and expected + collection contain the same values in the same order, where the values contained by the collection can have properties + and fields of their own that will be checked as well because of the recursive nature of this constraint. + + + + + Central location for all text related constraints + + + + + Constrain the argument to starts with the specified string + + + + + Constrain the argument to end with the specified string + + + + + Constrain the argument to contain the specified string + + + + + Constrain the argument to validate according to regex pattern + + + + + Provides access to the constraintes defined in the class to be used in context + with the syntax. + + + + + Constrain the argument to starts with the specified string + + + + + + Constrain the argument to end with the specified string + + + + + Constrain the argument to contain the specified string + + + + + Constrain the argument to validate according to regex pattern + + + + + Throws NotSupportedException. Don't use Equals to define constraints. Use Equal instead. + + + + + + + Serves as a hash function for a particular type. + + + A hash code for the current . + + + + + This class defines a lot of method signatures, which we will use + to allow compatability on net-2.0 + + + + + dummy + + + + + dummy + + + + + dummy + + + + + dummy + + + + + dummy + + + + + dummy + + + + + dummy + + + + + dummy + + + + + dummy + + + + + dummy + + + + + dummy + + + + + dummy + + + dummy + + + + + dummy + + + + + dummy + + + + + dummy + + + + + dummy + + + + + dummy + + + + + dummy + + + + + dummy + + + + + dummy + + + + + dummy + + + + + Allows expectations to be set on methods that should never be called. + For methods with void return value, you need to use LastCall or + DoNotExpect.Call() with a delegate. + + + + + Sets LastCall.Repeat.Never() on /any/ proxy on /any/ repository on the current thread. + This method if not safe for multi threading scenarios. + + + + + Accepts a delegate that will execute inside the method which + LastCall.Repeat.Never() will be applied to. + It is expected to be used with anonymous delegates / lambda expressions and only one + method should be called. + + + IService mockSrv = mocks.CreateMock(typeof(IService)) as IService; + DoNotExpect.Call(delegate{ mockSrv.Stop(); }); + ... + + + + + An expectaton violation was detected. + + + + + Creates a new instance. + + Message. + + + + Serialization constructor + + + + + Signals that an object was call on a mock repository which doesn't + belong to this mock repository or not a mock + + + + + Creates a new instance. + + Message. + + + + Serialization constructor + + + + + Allows to set expectation on methods that has return values. + For methods with void return value, you need to use LastCall + + + + + The method options for the last call on /any/ proxy on /any/ repository on the current thread. + This method if not safe for multi threading scenarios, use . + + + + + Accepts a delegate that will execute inside the method, and then return the resulting + instance. + It is expected to be used with anonymous delegates / lambda expressions and only one + method should be called. + + + IService mockSrv = mocks.CreateMock(typeof(IService)) as IService; + Expect.Call(delegate{ mockSrv.Start(); }).Throw(new NetworkException()); + ... + + + + + Get the method options for the last method call on the mockInstance. + + + + + A delegate that can be used to get better syntax on Expect.Call(delegate { foo.DoSomething(); }); + + + + + Abstract class that holds common information for + expectations. + + + + + Interface to validate that a method call is correct. + + + + + Validate the arguments for the method. + This method can be called numerous times, so be careful about side effects + + The arguments with which the method was called + + + + Add an actual method call to this expectation + + + + + Returns the return value or throw the exception and setup any output / ref parameters + that has been set. + + + + + Builds the verification failure message. + + + + + + Gets the error message. + + + + + + Range of expected calls + + + + + Number of call actually made for this method + + + + + If this expectation is still waiting for calls. + + + + + The return value for a method matching this expectation + + + + + Gets or sets the exception to throw on a method matching this expectation. + + + + + Gets a value indicating whether this instance's action is staisfied. + A staisfied instance means that there are no more requirements from + this method. A method with non void return value must register either + a return value or an exception to throw. + + + + + Gets the method this expectation is for. + + + + + Gets or sets what special condtions there are for this method + repeating. + + + + + Gets a value indicating whether this expectation was satisfied + + + + + Specify whatever this expectation has a return value set + You can't check ReturnValue for this because a valid return value include null. + + + + + An action to execute when the method is matched. + + + + + Set the out / ref parameters for the method call. + The indexing is zero based and ignores any non out/ref parameter. + It is possible not to pass all the parameters. This method can be called only once. + + + + + Documentation Message + + + + + Gets the invocation for this expectation + + The invocation. + + + + Occurs when the exceptation is match on a method call + + + + + Allow to set the return value in the future, if it was already set. + + + + + Number of actuall calls made that passed this expectation + + + + + Range of expected calls that should pass this expectation. + + + + + The return value for a method matching this expectation + + + + + The exception to throw on a method matching this expectation. + + + + + The method this expectation is for. + + + + + The return value for this method was set + + + + + Whether this method will repeat + unlimited number of times. + + + + + A delegate that will be run when the + expectation is matched. + + + + + The arguments that matched this expectation. + + + + + Documentation message + + + + + The method originalInvocation + + + + + Get the hash code + + + + + Add an actual actualMethodCall call to this expectation + + + + + Builds the verification failure message. + + + + + + Returns the return value or throw the exception and setup output / ref parameters + + + + + Validate the arguments for the method on the child methods + + The arguments with which the method was called + + + + Creates a new instance. + + The originalInvocation for this method, required because it contains the generic type infromation + Number of method calls for this expectations + + + + Creates a new instance. + + Expectation. + + + + Validate the arguments for the method on the child methods + + The arguments with which the method was called + + + + Determines if this object equal to obj + + + + + The error message for these arguments + + + + + Asserts that the delegate has the same parameters as the expectation's method call + + + + + Setter for the outpur / ref parameters for this expecataion. + Can only be set once. + + + + + Specify whether this expectation has a return value set + You can't check ReturnValue for this because a valid return value include null. + + + + + Gets the method this expectation is for. + + + + + Gets the originalInvocation for this expectation + + The originalInvocation. + + + + Gets or sets what special condtions there are for this method + + + + + Range of expected calls + + + + + Number of call actually made for this method + + + + + If this expectation is still waiting for calls. + + + + + Gets a value indicating whether this expectation was satisfied + + + + + The return value for a method matching this expectation + + + + + An action to execute when the method is matched. + + + + + Gets or sets the exception to throw on a method matching this expectation. + + + + + Gets a value indicating whether this instance's action is staisfied. + A staisfied instance means that there are no more requirements from + this method. A method with non void return value must register either + a return value or an exception to throw or an action to execute. + + + + + Documentation message + + + + + Occurs when the exceptation is match on a method call + + + + + Allow to set the return value in the future, if it was already set. + + + + + Gets the error message. + + + + + + Expectation that matches any arguments for the method. + + + + + Creates a new instance. + + Invocation for this expectation + Number of method calls for this expectations + + + + Creates a new instance. + + Expectation. + + + + Validate the arguments for the method. + + The arguments with which the method was called + + + + Determines if the object equal to expectation + + + + + Get the hash code + + + + + Gets the error message. + + + + + + Summary description for ArgsEqualExpectation. + + + + + Creates a new instance. + + Expected args. + The invocation for this expectation + Number of method calls for this expectations + + + + Validate the arguments for the method. + + The arguments with which the method was called + + + + Determines if the object equal to expectation + + + + + Get the hash code + + + + + Gets the error message. + + + + + + Get the expected args. + + + + + Call a specified callback to verify the expectation + + + + + Creates a new instance. + + Expectation. + Callback. + + + + Creates a new instance. + + Invocation for this expectation + Callback. + Number of method calls for this expectations + + + + Validate the arguments for the method on the child methods + + The arguments with which the method was called + + + + Determines if the object equal to expectation + + + + + Get the hash code + + + + + Gets the error message. + + + + + + Expect the method's arguments to match the contraints + + + + + Creates a new instance. + + Invocation for this expectation + Constraints. + Number of method calls for this expectations + + + + Creates a new instance. + + Expectation. + Constraints. + + + + Validate the arguments for the method. + + The arguments with which the method was called + + + + Determines if the object equal to expectation + + + + + Get the hash code + + + + + Gets the error message. + + + + + + Doesn't log anything, just makes happy noises + + + + + Log expectations - allows to see what is going on inside Rhino Mocks + + + + + Logs the expectation as is was recorded + + The invocation. + The expectation. + + + + Logs the expectation as it was recorded + + The invocation. + The expectation. + + + + Logs the unexpected method call. + + The invocation. + The message. + + + + Logs the expectation as is was recorded + + The invocation. + The expectation. + + + + Logs the expectation as it was recorded + + The invocation. + The expectation. + + + + Logs the unexpected method call. + + The invocation. + The message. + + + + Operation on a remoting proxy + + + It is not possible to directly communicate to a real proxy via transparent proxy. + Transparent proxy impersonates a user type and only methods of that user type are callable. + The only methods that are guaranteed to exist on any transparent proxy are methods defined + in Object: namely ToString(), GetHashCode(), and Equals()). + + These three methods are the only way to tell the real proxy to do something. + Equals() is the most suitable of all, since it accepts an arbitrary object parameter. + The RemotingProxy code is built so that if it is compared to an IRemotingProxyOperation, + transparentProxy.Equals(operation) will call operation.Process(realProxy). + This way we can retrieve a real proxy from transparent proxy and perform + arbitrary operation on it. + + + + + Generates remoting proxies and provides utility functions + + + + + Create the proxy using remoting + + + + + Check whether an object is a transparent proxy with a RemotingProxy behind it + + Object to check + true if the object is a transparent proxy with a RemotingProxy instance behind it, false otherwise + We use Equals() method to communicate with the real proxy behind the object. + See IRemotingProxyOperation for more details + + + + Retrieve a mocked object from a transparent proxy + + Transparent proxy with a RemotingProxy instance behind it + Mocked object associated with the proxy + We use Equals() method to communicate with the real proxy behind the object. + See IRemotingProxyOperation for more details + + + + Implementation of IInvocation based on remoting proxy + + Some methods are marked NotSupported since they either don't make sense + for remoting proxies, or they are never called by Rhino Mocks + + + + Rudimetry implementation that simply logs methods calls as text. + + + + + Initializes a new instance of the class. + + The writer. + + + + Logs the expectation as it was recorded + + The invocation. + The expectation. + + + + Logs the expectation as it was recorded + + The invocation. + The expectation. + + + + Logs the unexpected method call. + + The invocation. + The message. + + + + Behave like a stub, all properties and events acts normally, methods calls + return default values by default (but can use expectations to set them up), etc. + + + + + Records all the expectations for a mock + + + + + Different actions on this mock + + + + + Add a method call for this state' mock. + + The invocation for this method + The method that was called + The arguments this method was called with + + + + Verify that this mock expectations have passed. + + + + + Verify that we can move to replay state and move + to the reply state. + + + + + Gets a mock state that match the original mock state of the object. + + + + + Get the options for the last method call + + + + + Set the exception to throw when Verify is called. + This is used to report exception that may have happened but where caught in the code. + This way, they are reported anyway when Verify() is called. + + + + + This method is called to indicate that a property behavior call. + This is done so we generate good error message in the common case of people using + Stubbed properties with Return(). + + + + + Gets the matching verify state for this state + + + + + Get the options for the last method call + + + + + Get the options for the last method call + + + + + Set the exception to throw when Verify is called. + This is used to report exception that may have happened but where caught in the code. + This way, they are reported anyway when Verify() is called. + + + + + This method is called to indicate that a property behavior call. + This is done so we generate good error message in the common case of people using + Stubbed properties with Return(). + + + + + Creates a new instance. + + Repository. + The proxy that generates the method calls + + + + Add a method call for this state' mock. + + The invocation for this method + The method that was called + The arguments this method was called with + + + + Verify that we can move to replay state and move + to the reply state. + + + + + Verify that we can move to replay state and move + to the reply state. + + + + + Verify that this mock expectations have passed. + + + + + Gets a mock state that match the original mock state of the object. + + + + + Asserts the previous method is closed (had an expectation set on it so we can replay it correctly) + + + + + Get the default call count range expectation + + + + + + Gets the last expectation. + + + + + Gets the total method calls count. + + + + + Get the options for the last method call + + + + + Gets the matching verify state for this state + + + + + Initializes a new instance of the class. + + The proxy that generates the method calls + Repository. + + + + We don't care much about expectations here, so we will remove the expectation if + it is not closed. + + + + + Verify that we can move to replay state and move + to the reply state. + + + + + + Get the default call count range expectation + + + + + + Validate expectations on recorded methods, but in general completely ignoring them. + Similar to except that it would return a + when BackToRecord is called. + + + + + Validate all expectations on a mock + + + + + The repository for this state + + + + + The proxy object for this state + + + + + Get the options for the last method call + + + + + Creates a new instance. + + The previous state for this method + + + + Add a method call for this state' mock. + + The invocation for this method + The method that was called + The arguments this method was called with + + + + Add a method call for this state' mock. + This allows derived method to cleanly get a the setupresult behavior while adding + their own. + + The invocation for this method + The method that was called + The arguments this method was called with + + + + Set the exception to throw when Verify is called. + This is used to report exception that may have happened but where caught in the code. + This way, they are reported anyway when Verify() is called. + + + + + not relevant + + + + + Verify that this mock expectations have passed. + + + + + Verify that we can move to replay state and move + to the reply state. + + + + + Gets a mock state that match the original mock state of the object. + + + + + Get the options for the last method call + + + + + Gets the matching verify state for this state + + + + + Initializes a new instance of the class. + + The previous state for this method + + + + Add a method call for this state' mock. + + The invocation for this method + The method that was called + The arguments this method was called with + + + + Gets a mock state that matches the original mock state of the object. + + + + + Write rhino mocks log info to the trace + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + if set to true [log recorded]. + if set to true [log replayed]. + if set to true [log unexpected]. + + + + Logs the expectation as is was recorded + + The invocation. + The expectation. + + + + Logs the expectation as it was recorded + + The invocation. + The expectation. + + + + Logs the unexpected method call. + + The invocation. + The message. + + + + Writes log information as stack traces about rhino mocks activity + + + + + Allows to redirect output to a different location. + + + + + Logs the expectation as is was recorded + + The invocation. + The expectation. + + + + Logs the expectation as it was recorded + + The invocation. + The expectation. + + + + Logs the unexpected method call. + + The invocation. + The message. + + + + Marker interface used to indicate that this is a partial mock. + + + + + Options for CallOriginalMethod + + + + + No expectation is created, the method will be called directly + + + + + Normal expectation is created, but when the method is later called, it will also call the original method + + + + + This is a data structure that is used by + to pass + the current method to the relevant delegate + + + + + Initializes a new instance of the class. + + The invocation. + + + + Gets the args for this method invocation + + + + + Get the method that was caused this invocation + + + + + Gets or sets the return value for this method invocation + + The return value. + + + + Adds optional new usage: + using(mockRepository.Record()) { + Expect.Call(mock.Method()).Return(retVal); + } + using(mockRepository.Playback()) { + // Execute code + } + N.B. mockRepository.ReplayAll() and mockRepository.VerifyAll() + calls are taken care of by Record/Playback + + + Creates proxied instances of types. + + + + Generates a stub without needing a + Arguments for 's constructor + The of stub to create. + The stub + + + + Generates a stub without needing a + The of stub. + Arguments for the 's constructor. + The stub + + + + Generate a mock object without needing a + type of mock object to create. + Arguments for 's constructor + the mock object + + + + Generate a multi-mock object without needing a + The typeof object to generate a mock for. + A second interface to generate a multi-mock for. + Arguments for 's constructor + the multi-mock object + + + + Generate a multi-mock object without without needing a + The typeof object to generate a mock for. + An interface to generate a multi-mock for. + A second interface to generate a multi-mock for. + Arguments for 's constructor + the multi-mock object + + + + Creates a multi-mock without without needing a + The type of mock to create, this can be a class + Any extra interfaces to add to the multi-mock, these can only be interfaces. + Arguments for 's constructor + the multi-mock object + + + + Creates a strict mock without without needing a + Any arguments required for the 's constructor + The type of mock object to create. + The mock object with strict replay semantics + + + + Creates a strict multi-mock without needing a + Any arguments required for the 's constructor + The type of mock object to create, this can be a class. + An interface to generate a multi-mock for, this must be an interface! + The multi-mock object with strict replay semantics + + + + Creates a strict multi-mock without needing a + Any arguments required for the 's constructor + The type of mock object to create, this can be a class. + An interface to generate a multi-mock for, this must be an interface! + A second interface to generate a multi-mock for, this must be an interface! + The multi-mock object with strict replay semantics + + + + Creates a strict multi-mock without needing a + The type of mock object to create, this can be a class + Any extra interfaces to generate a multi-mock for, these must be interaces! + Any arguments for the 's constructor + The strict multi-mock object + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Generate a mock object with dynamic replay semantics and remoting without needing the mock repository + + + + + Generate a mock object with strict replay semantics and remoting without needing the mock repository + + + + Helper method to create a mock object without a repository instance and put the object back into replay mode. + The type of mock object to create + A delegate that uses a mock repository instance to create the underlying mock + The mock object in the replay mode. + + + + + + + + + + + + + + This is a map of types to ProxyGenerators. + + + + + This is used to record the last repository that has a method called on it. + + + + + this is used to get to the last proxy on this repository. + + + + + For mock delegates, maps the proxy instance from intercepted invocations + back to the delegate that was originally returned to client code, if any. + + + + + All the proxies in the mock repositories + + + + + This is here because we can't put it in any of the recorders, since repeatable methods + have no orderring, and if we try to handle them using the usual manner, we would get into + wierd situations where repeatable method that was defined in an orderring block doesn't + exists until we enter this block. + + + + + Creates a new instance. + + + + + Move the repository to ordered mode + + + + + Move the repository to un-ordered mode + + + + + Creates a mock for the specified type. + + Type. + Arguments for the class' constructor, if mocking a concrete class + + + + Creates a strict mock for the specified type. + + Type. + Arguments for the class' constructor, if mocking a concrete class + + + + Creates a remoting mock for the specified type. + + Type. + Arguments for the class' constructor, if mocking a concrete class + + + + Creates a strict remoting mock for the specified type. + + Type. + Arguments for the class' constructor, if mocking a concrete class + + + + Creates a remoting mock for the specified type. + + + Arguments for the class' constructor, if mocking a concrete class + + + + + Creates a strict remoting mock for the specified type. + + + Arguments for the class' constructor, if mocking a concrete class + + + + + Creates a mock from several types, with strict semantics. + Only may be a class. + + + + + Creates a strict mock from several types, with strict semantics. + Only may be a class. + + + + + Creates a mock from several types, with strict semantics. + Only may be a class. + + The main type to mock. + Extra interface types to mock. + Arguments for the class' constructor, if mocking a concrete class. + + + + Creates a strict mock from several types, with strict semantics. + Only may be a class. + + The main type to mock. + Extra interface types to mock. + Arguments for the class' constructor, if mocking a concrete class. + + + + Creates a mock from several types, with dynamic semantics. + Only may be a class. + + The main type to mock. + Extra interface types to mock. + + + + Creates a mock from several types, with dynamic semantics. + Only may be a class. + + The main type to mock. + Extra interface types to mock. + Arguments for the class' constructor, if mocking a concrete class. + + + Creates a dynamic mock for the specified type. + Type. + Arguments for the class' constructor, if mocking a concrete class + + + Creates a dynamic mock for the specified type. + Type. + Arguments for the class' constructor, if mocking a concrete class + + + Creates a dynamic mock for the specified type. + + Arguments for the class' constructor, if mocking a concrete class + + + + Creates a mock object that defaults to calling the class methods if no expectation is set on the method. + Type. + Arguments for the class' constructor. + + + Creates a mock object that defaults to calling the class methods. + Type. + Extra interface types to mock. + + + Creates a mock object that defaults to calling the class methods. + Type. + Extra interface types to mock. + Arguments for the class' constructor. + + + Creates a mock object using remoting proxies + Type to mock - must be MarshalByRefObject + Mock object + Proxy mock can mock non-virtual methods, but not static methods + Creates the mock state for this proxy + + + + Cause the mock state to change to replay, any further call is compared to the + ones that were called in the record state. + + This method *cannot* be called from inside an ordering. + the object to move to replay state + + + + Cause the mock state to change to replay, any further call is compared to the + ones that were called in the record state. + + the object to move to replay state + + + + Move the mocked object back to record state.You can (and it's recommended) to run {Verify()} before you use this method. + Will delete all current expectations! + + + + Move the mocked object back to record state. + Optionally, can delete all current expectations, but allows more granularity about how + it would behave with regard to the object state. + + + + + Verify that all the expectations for this object were fulfilled. + + the object to verify the expectations for + + + + Get the method options for the last call on + mockedInstance. + + The mock object + Method options for the last call + + + + Maps an invocation proxy back to the mock object instance that was originally + returned to client code which might have been a delegate to this proxy. + + The mock object proxy from the intercepted invocation + The mock object + + + This is provided to allow advance extention functionality, where Rhino Mocks standard functionality is not enough. + The type to mock + Delegate that create the first state of the mocked object (usualy the record state). + Additional types to be implemented, this can be only interfaces + optional arguments for the constructor + + + + + Method: GetMockedObject + Get an IProxy from a mocked object instance, or throws if the + object is not a mock object. + + + + + Method: GetMockedObjectOrNull + Get an IProxy from a mocked object instance, or null if the + object is not a mock object. + + + + Pops the recorder. + + + Pushes the recorder. + New recorder. + + + + All the mock objects in this repository will be moved + to record state. + + + + + All the mock objects in this repository will be moved + to record state. + + + + + Replay all the mocks from this repository + + + + + Verify all the mocks from this repository + + + + + Gets the proxy generator for a specific type. Having a single ProxyGenerator + with multiple types linearly degrades the performance so this implementation + keeps one ProxyGenerator per type. + + + + Set the exception to be thrown when verified is called. + + + + Creates a mock for the spesified type with strict mocking semantics. + Strict semantics means that any call that wasn't explicitly recorded is considered an error and would cause an exception to be thrown. + + Arguments for the class' constructor, if mocking a concrete class + + + + Creates a mock for the spesified type with strict mocking semantics. + Strict semantics means that any call that wasn't explicitly recorded is considered an error and would cause an exception to be thrown. + + Arguments for the class' constructor, if mocking a concrete class + + + + Creates a dynamic mock for the specified type. + + Arguments for the class' constructor, if mocking a concrete class + + + + Creates a mock object from several types. + + + + + Creates a strict mock object from several types. + + + + + Create a mock object from several types with dynamic semantics. + + + + + Create a mock object from several types with partial semantics. + + + + + Create a mock object from several types with strict semantics. + + Extra interface types to mock. + Arguments for the class' constructor, if mocking a concrete class + + + + Create a strict mock object from several types with strict semantics. + + Extra interface types to mock. + Arguments for the class' constructor, if mocking a concrete class + + + + Create a mock object from several types with dynamic semantics. + + Extra interface types to mock. + Arguments for the class' constructor, if mocking a concrete class + + + + Create a mock object from several types with partial semantics. + + Extra interface types to mock. + Arguments for the class' constructor, if mocking a concrete class + + + + Create a mock object with from a class that defaults to calling the class methods + + Arguments for the class' constructor, if mocking a concrete class + + + + Create a stub object, one that has properties and events ready for use, and + can have methods called on it. It requires an explicit step in order to create + an expectation for a stub. + + The arguments for constructor. + + + + Create a stub object, one that has properties and events ready for use, and + can have methods called on it. It requires an explicit step in order to create + an expectation for a stub. + + The type. + The arguments for constructor. + The stub + + + + Returns true if the passed mock is currently in replay mode. + + The mock to test. + True if the mock is in replay mode, false otherwise. + + + + Determines whether the specified proxy is a stub. + + The proxy. + + + + Register a call on a prperty behavior + + + + + + Gets the recorder. + + + + + + Gets the replayer for this repository. + + + + + + Gets the last proxy which had a method call. + + + + + Delegate: CreateMockState + This is used internally to cleanly handle the creation of different + RecordMockStates. + + + + + A set of extension methods that adds Arrange Act Assert mode to Rhino Mocks + + + + + Create an expectation on this mock for this action to occur + + + The mock. + The action. + + + + + Reset all expectations on this mock object + + + The mock. + + + + Reset the selected expectation on this mock object + + + The mock. + The options to reset the expectations on this mock. + + + + Cause the mock state to change to replay, any further call is compared to the + ones that were called in the record state. + + the mocked object to move to replay state + + + + Gets the mock repository for this specificied mock object + + + The mock. + + + + + Create an expectation on this mock for this action to occur + + + + The mock. + The action. + + + + + Tell the mock object to perform a certain action when a matching + method is called. + Does not create an expectation for this method. + + + The mock. + The action. + + + + + Tell the mock object to perform a certain action when a matching + method is called. + Does not create an expectation for this method. + + + + The mock. + The action. + + + + + Gets the arguments for calls made on this mock object and the method that was called + in the action. + + + The mock. + The action. + + + Here we will get all the arguments for all the calls made to DoSomething(int) + + var argsForCalls = foo54.GetArgumentsForCallsMadeOn(x => x.DoSomething(0)) + + + + + + Gets the arguments for calls made on this mock object and the method that was called + in the action and matches the given constraints + + + The mock. + The action. + The setup constraints. + + + Here we will get all the arguments for all the calls made to DoSomething(int) + + var argsForCalls = foo54.GetArgumentsForCallsMadeOn(x => x.DoSomething(0)) + + + + + + Asserts that a particular method was called on this mock object + + + The mock. + The action. + + + + Asserts that a particular method was called on this mock object that match + a particular constraint set. + + + The mock. + The action. + The setup constraints. + + + + Asserts that a particular method was called on this mock object that match + a particular constraint set. + + + The mock. + The action. + + + + Asserts that a particular method was called on this mock object that match + a particular constraint set. + + + The mock. + The action. + The setup constraints. + + + + Asserts that a particular method was NOT called on this mock object + + + The mock. + The action. + + + + Asserts that a particular method was NOT called on this mock object that match + a particular constraint set. + + + The mock. + The action. + The setup constraints. + + + + Asserts that a particular method was NOT called on this mock object + + + The mock. + The action. + + + + Asserts that a particular method was NOT called on this mock object + + + The mock. + The action. + The setup constraints. + + + + Finds the approprite implementation type of this item. + This is the class or an interface outside of the rhino mocks. + + The mocked obj. + + + + + Verifies all expectations on this mock object + + The mock object. + + + + Gets the event raiser for the event that was called in the action passed + + The type of the event source. + The mock object. + The event subscription. + + + + + Raise the specified event using the passed arguments. + The even is extracted from the passed labmda + + The type of the event source. + The mock object. + The event subscription. + The sender. + The instance containing the event data. + + + + Raise the specified event using the passed arguments. + The even is extracted from the passed labmda + + The type of the event source. + The mock object. + The event subscription. + The args. + + + TODO: Make this better! It currently breaks down when mocking classes or + ABC's that call other virtual methods which are getting intercepted too. I wish + we could just walk Expression{Action{Action{T}} to assert only a single + method is being made. + + The workaround is to not call foo.AssertWasCalled .. rather foo.VerifyAllExpectations() + The type of mock object + The mock repository + The actual mock object to assert expectations on. + + + + Fake type that disallow creating it. + Should have been System.Type, but we can't use it. + + + + + Utility class for dealing with messing generics scenarios. + + + + + There are issues with trying to get this to work correctly with open generic types, since this is an edge case, + I am letting the runtime handle it. + + + + + Gets the real type, including de-constructing and constructing the type of generic + methods parameters. + + The type. + The invocation. + + + + + Because we need to support complex types here (simple generics were handled above) we + need to be aware of the following scenarios: + List[T] and List[Foo[T]] + + + + + ExpectationsList + + + + + Dictionary + + + + + Dictionary class + + + + + Create a new instance of ProxyStateDictionary + + + + + Allows to call a method and immediately get it's options. + + + + + Interface to allow calling a method and immediately get it's options. + + + + + Get the method options for the call + + The method call should go here, the return value is ignored + + + + Creates a new instance. + + + + + Get the method options for the call + + The method call should go here, the return value is ignored + + + + Allows to call a method and immediately get it's options. + Set the expected number for the call to Any() + + + + + Creates a new instance. + + Proxy. + Mocked instance. + + + + Get the method options for the call + + The method call should go here, the return value is ignored + + + + This class is reponsible for taking a delegate and creating a wrapper + interface around it, so it can be mocked. + + + + + The scope for all the delegate interfaces create by this mock repository. + + + + + Gets a type with an "Invoke" method suitable for use as a target of the + specified delegate type. + + + + + + + Raise events for all subscribers for an event + + + + + Raise events for all subscribers for an event + + + + + Raise the event + + + + + The most common form for the event handler signature + + + + + Create an event raiser for the specified event on this instance. + + + + + Creates a new instance of EventRaiser + + + + + Raise the event + + + + + The most common signature for events + Here to allow intellisense to make better guesses about how + it should suggest parameters. + + + + + Allows to define what would happen when a method + is called. + + + + + Allows to define what would happen when a method + is called. + + + + + Set the return value for the method. + + The object the method will return + IRepeat that defines how many times the method will return this value + + + + Allow to override this return value in the future + + IRepeat that defines how many times the method will return this value + + + + Throws the specified exception when the method is called. + + Exception to throw + + + + Ignores the arguments for this method. Any argument will be matched + againt this method. + + + + + Add constraints for the method's arguments. + + + + + Set a callback method for the last call + + + + + Set a delegate to be called when the expectation is matched. + The delegate return value will be returned from the expectation. + + + + + Set a delegate to be called when the expectation is matched. + The delegate return value will be returned from the expectation. + + + + + Set a delegate to be called when the expectation is matched. + The delegate return value will be returned from the expectation. + + + + + Set a delegate to be called when the expectation is matched. + The delegate return value will be returned from the expectation. + + + + + Set a delegate to be called when the expectation is matched. + The delegate return value will be returned from the expectation. + + + + + Set a delegate to be called when the expectation is matched. + The delegate return value will be returned from the expectation. + + + + + Set a delegate to be called when the expectation is matched. + The delegate return value will be returned from the expectation. + + + + + Set a delegate to be called when the expectation is matched. + The delegate return value will be returned from the expectation. + + + + + Set a delegate to be called when the expectation is matched. + The delegate return value will be returned from the expectation. + + + + + Set a delegate to be called when the expectation is matched. + The delegate return value will be returned from the expectation. + + + + + Set a delegate to be called when the expectation is matched. + The delegate return value will be returned from the expectation. + + + + + Set a delegate to be called when the expectation is matched. + The delegate return value will be returned from the expectation. + + + + + Set a delegate to be called when the expectation is matched + and allow to optionally modify the invocation as needed + + + + + Call the original method on the class, bypassing the mocking layers. + + + + + + Call the original method on the class, optionally bypassing the mocking layers. + + + + + + Use the property as a simple property, getting/setting the values without + causing mock expectations. + + + + + Expect last (property) call as property setting, ignore the argument given + + + + + + Expect last (property) call as property setting with a given argument. + + + + + + + Get an event raiser for the last subscribed event. + + + + + Set the parameter values for out and ref parameters. + This is done using zero based indexing, and _ignoring_ any non out/ref parameter. + + + + + Documentation message for the expectation + + Message + + + + Better syntax to define repeats. + + + + + Allows to specify the number of time for method calls + + + + + Repeat the method twice. + + + + + Repeat the method once. + + + + + Repeat the method at least once, then repeat as many time as it would like. + + + + + Repeat the method any number of times. + This has special affects in that this method would now ignore orderring. + + + + + Set the range to repeat an action. + + Min. + Max. + + + + Set the amount of times to repeat an action. + + + + + This method must not appear in the replay state. + This has special affects in that this method would now ignore orderring. + + + + + Creates a new instance. + + the repository for this expectation + the recorder for this proxy + the proxy for this expectation + Expectation. + + + + Add constraints for the method's arguments. + + + + + Set a callback method for the last call + + + + + Set a callback method for the last call + + + + + Set a callback method for the last call + + + + + Set a callback method for the last call + + + + + Set a callback method for the last call + + + + + Set a callback method for the last call + + + + + Set a callback method for the last call + + + + + Set a callback method for the last call + + + + + Set a callback method for the last call + + + + + Set a callback method for the last call + + + + + Set a callback method for the last call + + + + + Set a callback method for the last call + + + + + Set a delegate to be called when the expectation is matched. + The delegate return value will be returned from the expectation. + + + + + Set a delegate to be called when the expectation is matched. + The delegate return value will be returned from the expectation. + + + + + Set the return value for the method. + + The object the method will return + IRepeat that defines how many times the method will return this value + + + + Set the return value for the method, but allow to override this return value in the future + + IRepeat that defines how many times the method will return this value + + + + Throws the specified exception when the method is called. + + Exception to throw + + + + Ignores the arguments for this method. Any argument will be matched + againt this method. + + + + + Call the original method on the class, bypassing the mocking layers. + + + + + + Call the original method on the class, optionally bypassing the mocking layers + + + + + + Use the property as a simple property, getting/setting the values without + causing mock expectations. + + + + + Expect last (property) call as property setting, ignore the argument given + + + + + + Expect last (property) call as property setting with a given argument. + + + + + + + Gets the event raiser for the last event + + + + + Set the parameter values for out and ref parameters. + This is done using zero based indexing, and _ignoring_ any non out/ref parameter. + + + + + Repeat the method twice. + + + + + Repeat the method once. + + + + + Repeat the method at least once, then repeat as many time as it would like. + + + + + This method must not appear in the replay state. + + + + + Documentation message for the expectation + + Message + + + + Repeat the method any number of times. + + + + + Set the range to repeat an action. + + Min. + Max. + + + + Set the amount of times to repeat an action. + + + + + Better syntax to define repeats. + + + + + This class will provide hash code for hashtables without needing + to call the GetHashCode() on the object, which may very well be mocked. + This class has no state so it is a singelton to avoid creating a lot of objects + that does the exact same thing. See flyweight patterns. + + + + + Get the hash code for a proxy object without calling GetHashCode() + on the object. + + + + + Compares two instances of mocked objects + + + + + Compare two mocked objects + + + + + The next hash code value for a mock object. + This is safe for multi threading. + + + + + The sole instance of + + + + + This is a dummy type that is used merely to give DynamicProxy the proxy instance that + it needs to create IProxy's types. + + + + + Interface to find the repository of a mocked object + + + + + Return true if it should call the original method on the object + instead of pass it to the message chain. + + The method to call + + + + Register a method to be called on the object directly + + + + + Register a property on the object that will behave as a simple property + + + + + Check if the method was registered as a property method. + + + + + Do get/set on the property, according to need. + + + + + Do add/remove on the event + + + + + Get the subscribers of a spesific event + + + + + Gets the declaring type of the method, taking into acccount the possible generic + parameters that it was created with. + + + + + Clears the state of the object, remove original calls, property behavior, subscribed events, etc. + + + + + Get all the method calls arguments that were made against this object with the specificed + method. + + + Only method calls in replay mode are counted + + + + + Records the method call + + + + + Mocks that are tied to this mock lifestyle + + + + + The unique hash code of this mock, which is not related + to the value of the GetHashCode() call on the object. + + + + + Gets the repository. + + + + + Gets the implemented types by this mocked object + + The implemented. + + + + Gets or sets the constructor arguments. + + The constructor arguments. + + + + The mocked instance that this is representing + + + + + Create a new instance of + + + + + Return true if it should call the original method on the object + instead of pass it to the message chain. + + The method to call + + + + Register a method to be called on the object directly + + + + + Register a property on the object that will behave as a simple property + Return true if there is already a value for the property + + + + + Check if the method was registered as a property method. + + + + + Do get/set on the property, according to need. + + + + + Do add/remove on the event + + + + + Get the subscribers of a spesific event + + + + + Gets the declaring type of the method, taking into acccount the possible generic + parameters that it was created with. + + + + + Get all the method calls arguments that were made against this object with the specificed + method. + + + + + Only method calls in replay mode are counted + + + + + Records the method call + + + + + + + Clears the state of the object, remove original calls, property behavior, subscribed events, etc. + + + + + Mocks that are tied to this mock lifestyle + + + + + The unique hash code of this proxy, which is not related + to the value of the GetHashCode() call on the object. + + + + + Gets the repository. + + + + + Gets or sets the constructor arguments. + + The constructor arguments. + + + + The mocked instance that this is representing + + + + + Gets the implemented types by this mocked object + + The implemented. + + + + Range for expected method calls + + + + + Creates a new instance. + + Min. + Max. + + + + Return the string representation of this range. + + + + + Gets or sets the min. + + + + + + Gets or sets the max. + + + + + + Records all the expectations for a mock and + return a ReplayDynamicMockState when Replay() + is called. + + + + + Creates a new instance. + + Repository. + The proxy that generates the method calls + + + + Verify that we can move to replay state and move + to the reply state. + + + + + Get the default call count range expectation + + + + + + Gets a mock state that match the original mock state of the object. + + + + + Records all the expectations for a mock and + return a ReplayPartialMockState when Replay() + is called. + + + + + Creates a new instance. + + Repository. + The proxy that generates the method calls + + + + Verify that we can move to replay state and move + to the reply state. + + + + + Gets a mock state that matches the original mock state of the object. + + + + + Options for special repeat option + + + + + This method can be called only as many times as the IMethodOptions.Expect allows. + + + + + This method should never be called + + + + + This method can be call any number of times + + + + + This method will call the original method + + + + + This method will call the original method, bypassing the mocking layer + + + + + This method will simulate simple property behavior + + + + + Validate all expectations on a mock and ignores calls to + any method that was not setup properly. + + + + + Creates a new instance. + + The previous state for this method + + + + Add a method call for this state' mock. + + The invocation for this method + The method that was called + The arguments this method was called with + + + + Gets a mock state that match the original mock state of the object. + + + + + Validate all expectations on a mock and ignores calls to + any method that was not setup properly. + + + + + Creates a new instance. + + The previous state for this method + + + + Add a method call for this state' mock. + + The invocation for this method + The method that was called + The arguments this method was called with + + + + Gets a mock state that match the original mock state of the object. + + + + + Summary description for RhinoInterceptor. + + + + + Creates a new instance. + + + + + Intercept a method call and direct it to the repository. + + + + + Validate arguments for methods + + + + + Validate that the passed argument is not null. + + The object to validate + The name of the argument + + If the obj is null, an ArgumentNullException with the passed name + is thrown. + + + + + Validate that the arguments are equal. + + Expected args. + Actual Args. + + + + Validate that the two arguments are equals, including validation for + when the arguments are collections, in which case it will validate their values. + + + + + This method is safe for use even if any of the objects is a mocked object + that override equals. + + + + + Throw an object already verified when accessed + + + + + Create a new instance of VerifiedMockState + + The previous mock state, used to get the initial record state + + + + Add a method call for this state' mock. + + The invocation for this method + The method that was called + The arguments this method was called with + + + + Verify that this mock expectations have passed. + + + + + Verify that we can move to replay state and move + to the reply state. + + + + + Gets a mock state that match the original mock state of the object. + + + + + Get the options for the last method call + + + + + Set the exception to throw when Verify is called. + This is used to report exception that may have happened but where caught in the code. + This way, they are reported anyway when Verify() is called. + + + + + not relevant + + + + + Gets the matching verify state for this state + + + + + Get the options for the last method call + + + + + Records the actions on all the mocks created by a repository. + + + + + Records the specified call with the specified args on the mocked object. + + + + + Get the expectation for this method on this object with this arguments + + + + + This check the methods that were setup using the SetupResult.For() + or LastCall.Repeat.Any() and that bypass the whole expectation model. + + + + + Gets the all expectations for a mocked object and method combination, + regardless of the expected arguments / callbacks / contraints. + + Mocked object. + Method. + List of all relevant expectation + + + + Gets the all expectations for proxy. + + Mocked object. + List of all relevant expectation + + + + Removes all the repeatable expectations for proxy. + + Mocked object. + + + + Replaces the old expectation with the new expectation for the specified proxy/method pair. + This replace ALL expectations that equal to old expectations. + + Proxy. + Method. + Old expectation. + New expectation. + + + + Adds the recorder and turn it into the active recorder. + + Recorder. + + + + Moves to previous recorder. + + + + + Gets the recorded expectation or null. + + + + + Gets the next expected calls string. + + + + + Moves to parent recorder. + + + + + Set the expectation so it can repeat any number of times. + + + + + Removes the expectation from the recorder + + + + + Clear the replayer to call (and all its chain of replayers) + This also removes it from the list of expectations, so it will never be considered again + + + + + Get the expectation for this method on this object with this arguments + + + + + Gets a value indicating whether this instance has expectations that weren't satisfied yet. + + + true if this instance has expectations; otherwise, false. + + + + + Allows to set various options for the last method call on + a specified object. + If the method has a return value, it's recommended to use Expect + + + + + Allows to get an interface to work on the last call. + + The mocked object + Interface that allows to set options for the last method call on this object + + + + Set the return value for the method. + + The object the method will return + IRepeat that defines how many times the method will return this value + + + + Set the return value for the method. This overload is needed for LastCall.Return(null) + + The object the method will return + IRepeat that defines how many times the method will return this value + + + + Throws the specified exception when the method is called. + + Exception to throw + + + + Ignores the arguments for this method. Any argument will be matched + againt this method. + + + + + Add constraints for the method's arguments. + + + + + Set a callback method for the last call + + + + + Set a callback method for the last call + + + + + Set a callback method for the last call + + + + + Set a callback method for the last call + + + + + Set a callback method for the last call + + + + + Set a callback method for the last call + + + + + Set a callback method for the last call + + + + + Set a callback method for the last call + + + + + Set a callback method for the last call + + + + + Set a callback method for the last call + + + + + Set a callback method for the last call + + + + + Set a callback method for the last call + + + + + Call the original method on the class, bypassing the mocking layers, for the last call. + + + + + Call the original method on the class, optionally bypassing the mocking layers, for the last call. + + + + + Set a delegate to be called when the expectation is matched. + The delegate return value will be returned from the expectation. + + + + + Gets an interface that will raise the last event when called. + + + + + Set the parameter values for out and ref parameters. + This is done using zero based indexing, and _ignoring_ any non out/ref parameter. + + + + + Documentation message for the expectation + + Message + + + + Use the property as a simple property, getting/setting the values without + causing mock expectations. + + + + + Better syntax to define repeats. + + + + + Base class for method recorders, handle delegating to inner recorder if needed. + + + + + List of the expected actions on for this recorder + The legal values are: + * Expectations + * Method Recorders + + + + + The current recorder. + + + + + The current replayer; + + + + + The parent recorder of this one, may be null. + + + + + This contains a list of all the replayers that should be ignored + for a spesific method call. A replayer gets into this list by calling + ClearReplayerToCall() on its parent. This list is Clear()ed on each new invocation. + + + + + All the repeatable methods calls. + + + + + Counts the recursion depth of the current expectation search stack + + + + + Creates a new instance. + + + + + Creates a new instance. + + Parent recorder. + Repeatable methods + + + + Records the specified call with the specified args on the mocked object. + + + + + Get the expectation for this method on this object with this arguments + + + + + Gets the all expectations for a mocked object and method combination, + regardless of the expected arguments / callbacks / contraints. + + Mocked object. + Method. + List of all relevant expectation + + + + Gets the all expectations for proxy. + + Mocked object. + List of all relevant expectation + + + + Replaces the old expectation with the new expectation for the specified proxy/method pair. + This replace ALL expectations that equal to old expectations. + + Proxy. + Method. + Old expectation. + New expectation. + + + + Remove the all repeatable expectations for proxy. + + Mocked object. + + + + Set the expectation so it can repeat any number of times. + + + + + Removes the expectation from the recorder + + + + + Adds the recorder and turn it into the active recorder. + + Recorder. + + + + Moves to previous recorder. + + + + + Moves to parent recorder. + + + + + Gets the recorded expectation or null. + + + + + Clear the replayer to call (and all its chain of replayers). + This also removes it from the list of expectations, so it will never be considered again + + + + + Get the expectation for this method on this object with this arguments + + + + + Gets the next expected calls string. + + + + + Handles the real getting of the recorded expectation or null. + + + + + Handle the real execution of this method for the derived class + + + + + Handle the real execution of this method for the derived class + + + + + Handle the real execution of this method for the derived class + + + + + Handle the real execution of this method for the derived class + + + + + Handle the real execution of this method for the derived class + + + + + Handle the real execution of this method for the derived class + + + + + Should this replayer be considered valid for this call? + + + + + This check the methods that were setup using the SetupResult.For() + or LastCall.Repeat.Any() and that bypass the whole expectation model. + + + + + Gets a value indicating whether this instance has expectations that weren't satisfied yet. + + + true if this instance has expectations; otherwise, false. + + + + + Handle the real execution of this method for the derived class + + + + + Ordered collection of methods, methods must arrive in specified order + in order to pass. + + + + + Unordered collection of method records, any expectation that exist + will be matched. + + + + + The parent recorder we have redirected to. + Useful for certain edge cases in orderring. + See: FieldProblem_Entropy for the details. + + + + + Creates a new instance. + + Parent recorder. + Repeatable methods + + + + Creates a new instance. + + + + + Records the specified call with the specified args on the mocked object. + + Mocked object. + Method. + Expectation. + + + + Get the expectation for this method on this object with this arguments + + Invocation for this method + Mocked object. + Method. + Args. + True is the call was recorded, false otherwise + + + + Gets the all expectations for a mocked object and method combination, + regardless of the expected arguments / callbacks / contraints. + + Mocked object. + Method. + List of all relevant expectation + + + + Gets the all expectations for proxy. + + Mocked object. + List of all relevant expectation + + + + Replaces the old expectation with the new expectation for the specified proxy/method pair. + This replace ALL expectations that equal to old expectations. + + Proxy. + Method. + Old expectation. + New expectation. + + + + Handle the real execution of this method for the derived class + + + + + Handles the real getting of the recorded expectation or null. + + + + + Handle the real execution of this method for the derived class + + + + + Gets the next expected calls string. + + + + + Create an exception for an unexpected method call. + + + + + Gets a value indicating whether this instance has expectations that weren't satisfied yet. + + + true if this instance has expectations; otherwise, false. + + + + + Creates a new instance. + + Parent recorder. + Repetable methods + + + + Creates a new instance. + + + + + Handles the real getting of the recorded expectation or null. + + + + + Get the expectation for this method on this object with this arguments + + + + + Gets the next expected calls string. + + + + + Hold an expectation for a method call on an object + + + + + Creates a new instance. + + Proxy. + Method. + Expectation. + + + + Determines if the object equal to this instance + + Obj. + + + + + Gets the hash code. + + + + + + Gets the proxy. + + + + + + Gets the method. + + + + + + Gets the expectation. + + + + + + Holds a pair of mocked object and a method + and allows to compare them against each other. + This allows us to have a distinction between mockOne.MyMethod() and + mockTwo.MyMethod()... + + + + + Creates a new instance. + + Proxy. + Method. + + + + Determines whatever obj equals to this instance. + ProxyMethodPairs are equal when they point to the same /instance/ of + an object, and to the same method. + + Obj. + + + + + Gets the hash code. + + + + + + Gets the proxy. + + + + + + Gets the method. + + + + + + Change the recorder from ordered to unordered and vice versa + + + + + Creates a new instance. + + + + + Disposes this instance. + + + + + Accessor for the current mocker + + + + + The current mocker + + + + + Used for [assembly: InternalsVisibleTo(RhinoMocks.StrongName)] + Used for [assembly: InternalsVisibleTo(RhinoMocks.NormalName)] + + + + + Strong name for the Dynamic Proxy assemblies. Used for InternalsVisibleTo specification. + + + + + Normal name for dynamic proxy assemblies. Used for InternalsVisibleTo specification. + + + + + Logs all method calls for methods + + + + + Setup method calls to repeat any number of times. + + + + + Get the method options and set the last method call to repeat + any number of times. + This also means that the method would transcend ordering + + + + + Get the method options for the last method call on the mockInstance and set it + to repeat any number of times. + This also means that the method would transcend ordering + + + + + Utility class for working with method calls. + + + + + Return the string representation of a method call and its arguments. + + The method + The method arguments + Invocation of the method, used to get the generics arguments + Delegate to format the parameter + The string representation of this method call + + + + Return the string representation of a method call and its arguments. + + The invocation of the method, used to get the generic parameters + The method + The method arguments + The string representation of this method call + + + + Delegate to format the argument for the string representation of + the method call. + + + + + Utility to get the default value for a type + + + + + The default value for a type. + Null for reference types and void + 0 for value types. + First element for enums + Note that we need to get the value even for opened generic types, such as those from + generic methods. + + Type. + The invocation. + the default value + + + + Allows easier access to MockRepository, works closely with Mocker.Current to + allow access to a context where the mock repository is automatially verified at + the end of the code block. + + + + + Initialize a code block where Mocker.Current is initialized. + At the end of the code block, all the expectation will be verified. + This overload will create a new MockRepository. + + The code that will be executed under the mock context + + + + Initialize a code block where Mocker.Current is initialized. + At the end of the code block, all the expectation will be verified. + This overload will create a new MockRepository. + + The mock repository to use, at the end of the code block, VerifyAll() will be called on the repository. + The code that will be executed under the mock context + + + + Create a FluentMocker + + The mock repository to use. + + + + A method with no arguments and no return value that will be called under the mock context. + + + + + FluentMocker implements some kind of fluent interface attempt + for saying "With the Mocks [mocks], Expecting (in same order) [things] verify [that]." + + + + + Interface to verify previously defined expectations + + + + + Verifies if a piece of code + + + + + Defines unordered expectations + + A delegate describing the expectations + an IMockVerifier + + + + Defines ordered expectations + + A delegate describing the expectations + an IMockVerifier + + + + Verifies previously defined expectations + + + + + This delegate is compatible with the System.Func{T,R} signature + We have to define our own to get compatability with 2.0 + + + + + This attribute is here so we can get better Pex integration + Using this means that Pex will not try to inspect the work of + the actual proxies being generated by Rhino Mocks + + + + diff --git a/lib/structuremap/StructureMap.xml b/lib/structuremap/StructureMap.xml index da0e9c0f1b0..26f65b88a57 100644 --- a/lib/structuremap/StructureMap.xml +++ b/lib/structuremap/StructureMap.xml @@ -1,3874 +1,3874 @@ - - - - StructureMap - - - - - The "BuildUp" method takes in an already constructed object - and uses Setter Injection to push in configured dependencies - of that object - - - - - - Get the object of type T that is valid for this build session. - - - - - - - Get the object of type T that is valid for this build session by name. - - - - - - - Register a default object for the given PluginType that will - be used throughout the rest of the current object request - - - - - - - Same as GetInstance, but can gracefully return null if - the Type does not already exist - - - - - - - Same as GetInstance(name), but can gracefully return null if - the Type and name does not already exist - - - - - - - - Gets all objects in the current object graph that can be cast - to T that have already been created - - - - - - - Creates/Resolves every configured instance of PlutinType T - - - - - - - Gets a reference to the BuildStack for this build session - - - - - The concrete type of the immediate parent object in the object graph - - - - - Gets the root "frame" of the object request - - - - - The requested instance name of the object graph - - - - - Expression Builder that has grammars for defining policies at the - PluginType level. This expression is used for registering - open generic types - - - - - Convenience method that sets the default concrete type of the PluginType. The "concreteType" - can only accept types that do not have any primitive constructor arguments. - StructureMap has to know how to construct all of the constructor argument types. - - - - - - - Use this configured Instance as is - - - - - - Shorter way to call TheDefaultIsConcreteType - - - - - - - Shortcut to add a value by type - - - - - - - Shortcut method to add an additional Instance to this Plugin Type - as just a Concrete Type. This will only work if the Concrete Type - has no primitive constructor or mandatory Setter arguments. - - - - - - - Shortcut method to add an additional Instance to this Plugin Type - as just a Concrete Type. This will only work if the Concrete Type - has no primitive constructor or mandatory Setter arguments. - - - - - - - Configure this type as the supplied value - - - - - - Sets the object creation of the instances of the PluginType. For example: PerRequest, - Singleton, ThreadLocal, HttpContext, or Hybrid - - - - - - - Register an Action to run against any object of this PluginType immediately after - it is created, but before the new object is passed back to the caller - - - - - - - Register a Func to run against any object of this PluginType immediately after it is created, - but before the new object is passed back to the caller. Unlike OnCreation(), - EnrichWith() gives the the ability to return a different object. Use this method for runtime AOP - scenarios or to return a decorator. - - - - - - - Register a Func to run against any object of this PluginType immediately after it is created, - but before the new object is passed back to the caller. Unlike OnCreation(), - EnrichWith() gives the the ability to return a different object. Use this method for runtime AOP - scenarios or to return a decorator. - - - - - - - Registers an IBuildInterceptor for this Plugin Type that executes before - any object of this PluginType is created. IBuildInterceptor's can be - used to create a custom scope - - - - - - - Convenience method to mark a PluginFamily as a Singleton - - - - - - Convenience method to mark a PluginFamily as a Hybrid lifecycle - - - - - - Convenience method to mark a PluginFamily as HttpContext scoped - - - - - - - - - - - - - Shortcut method to add an additional Instance to this Plugin Type - as just a Concrete Type. You can also chain other declarations after - this method to add constructor and setter arguments - - - - - - - Shortcut method to add an additional Instance to this Plugin Type - as just a Concrete Type by a specified name. You can also chain other declarations after - this method to add constructor and setter arguments - - - - - - - - Specify the value of this explicit argument - - - - - - - Pass in additional arguments by type T - - - - - - - - Pass in additional arguments by type - - - - - - - - Pass in additional arguments by name - - - - - - - Gets the default instance of type T using the explicitly configured arguments from the "args" - - - - - - - Gets a named instance of type T using the explicitly configured arguments from teh "args" - - - - - - - - Gets the default instance of the pluginType using the explicitly configured arguments from the "args" - - - - - - Gets all configured instances of type T using explicitly configured arguments - - - - - - - Returns the System.Reflection.ConstructorInfo for the PluggedType. Uses either - the "greediest" constructor with the most arguments or the constructor function - marked with the [DefaultConstructor] - - - - - - The InstanceKey of the default instance of the PluginFamily - - - - - The CLR Type that defines the "Plugin" interface for the PluginFamily - - - - - Add an Assembly to the scanning operation - - - - - - Add an Assembly by name to the scanning operation - - - - - - Add the currently executing Assembly to the scanning operation - - - - - Add the Assembly that contains type T to the scanning operation - - - - - - Add the Assembly that contains type to the scanning operation - - - - - - Sweep the designated path and add any Assembly's found in this folder to the - scanning operation - - - - - - Sweep the designated path and add any Assembly's found in this folder to the - scanning operation. The assemblyFilter can be used to filter or limit the - Assembly's that are picked up. - - - - - - - Sweep the application base directory of current app domain and add any Assembly's - found to the scanning operation. - - - - - Sweep the application base directory of current app domain and add any Assembly's - found to the scanning operation. The assemblyFilter can be used to filter or limit the - Assembly's that are picked up. - - - - - Adds an ITypeScanner object to the scanning operation - - - - - - Creates and adds a new ITypeScanner of type T to this scanning operation - - - - - - Directs the scanning operation to automatically detect and include any Registry - classes found in the Assembly's being scanned - - - - - Add all concrete types of the Plugin Type as Instances of Plugin Type - - - - - - Add all concrete types of the Plugin Type as Instances of Plugin Type - - - - - - Makes this scanning operation ignore all [PluginFamily] and [Pluggable] attributes - - - - - Exclude types that match the Predicate from being scanned - - - - - - Exclude all types in this nameSpace or its children from the scanning operation - - - - - - Exclude all types in this nameSpace or its children from the scanning operation - - - - - - Only include types matching the Predicate in the scanning operation. You can - use multiple Include() calls in a single scanning operation - - - - - - Only include types from this nameSpace or its children in the scanning operation. You can - use multiple Include() calls in a single scanning operation - - - - - - Only include types from this nameSpace or its children in the scanning operation. You can - use multiple Include() calls in a single scanning operation - - - - - - Exclude this specific type from the scanning operation - - - - - - Adds a registration convention to be applied to all the types in this - logical "scan" operation - - - - - - Adds a registration convention to be applied to all the types in this - logical "scan" operation - - - - - Adds the DefaultConventionScanner to the scanning operations. I.e., a concrete - class named "Something" that implements "ISomething" will be automatically - added to PluginType "ISomething" - - - - - Scans for PluginType's and Concrete Types that close the given open generic type - - - - - - - - - Automatically registers all concrete types without primitive arguments - against its first interface, if any - - - - - Directs the scanning to automatically register any type that is the single - implementation of an interface against that interface. - The filters apply - - - - - Adds the DefaultConventionScanner to the scanning operations. I.e., a concrete - class named "Something" that implements "ISomething" will be automatically - added to PluginType "ISomething" - - - - - Scans for PluginType's and Concrete Types that close the given open generic type - - - - - - - - - Automatically registers all concrete types without primitive arguments - against its first interface, if any - - - - - Directs the scanning to automatically register any type that is the single - implementation of an interface against that interface. - The filters apply - - - - - A TypeInterceptor that is only applied if the MatchesType() - method is true for a given Type - - - - - An InstanceInterceptor can be registered on a per-Instance basis - to act on, or even replace, the object that is created before - it is passed back to the caller. This is primarily a hook - for runtime AOP scenarios. - - - - - Does this TypeInterceptor apply to the given type? - - - - - - - Specify how objects matching the Type predicate - will be intercepted - - - - - - Specify how objects matching the Type predicate - will be intercepted - - - - - - An Instance class that builds objects by calling a constructor function on a concrete type - and filling setter properties. ConfiguredInstance should only be used for open generic types. - Favor SmartInstance{T} for all other usages. - - - - - Register an Action to perform on the object created by this Instance - before it is returned to the caller - - - - - - - - Register an Action to perform on the object created by this Instance - before it is returned to the caller - - - - - - - - Register a Func to potentially enrich or substitute for the object - created by this Instance before it is returned to the caller - - - - - - - Register a Func to potentially enrich or substitute for the object - created by this Instance before it is returned to the caller - - - - - - - Inline definition of a dependency array like IService[] or IHandler[] - - - - - - - - Inline definition of a dependency array like IService[] or IHandler[] - - - - - - - Inline definition of a dependency array like IService[] or IHandler[] - - - - - - - Start the definition of a child instance for type CONSTRUCTORARGUMENTTYPE - - - - - - - Start the definition of a child instance for type CONSTRUCTORARGUMENTTYPE - - - - - - - Inline definition of a constructor or a setter property dependency - - - - - - - Starts the definition of a child instance specifying the argument name - in the case of a constructor function that consumes more than one argument - of type T - - - - - - - - Inline definition of a constructor dependency - - - - - - - - Inline definition of a setter dependency - - - - - - - - Start the definition of a primitive argument to a constructor argument - - - - - - - Configure a primitive constructor argument - - - - - - - Configures an array of Instance's for the array dependency - - - - - - - Part of the Fluent Interface, represents a nonprimitive argument to a - constructure function - - - - - Use a previously configured and named instance for the child - - - - - - - Start the definition of a child instance by defining the concrete type - - - - - - - Start the definition of a child instance by defining the concrete type - - - - - - - Registers a configured instance to use as the argument to the parent's - constructor - - - - - - - Directs StructureMap to fill this dependency with the Default Instance of the - constructor or property type - - - - - - Base class for many of the Instance subclasses to support - method chaining in the Registry DSL for common options - - - - - - Set the name of this Instance - - - - - - - Register an Action to perform on the object created by this Instance - before it is returned to the caller - - - - - - - - Register a Func to potentially enrich or substitute for the object - created by this Instance before it is returned to the caller - - - - - - - - Register a Func to potentially enrich or substitute for the object - created by this Instance before it is returned to the caller - - - - - - - - Register an InstanceInterceptor with this Instance - - - - - - - Used to override the constructor of a class to be used by StructureMap to create - a Pluggable object - - - - - Examines a System.Type object and determines the ConstructorInfo to use in creating - instances of the Type - - - - - - - Used to implicitly mark a class as a Plugin candidate for StructureMap - - - - - Determines whether a Type object is marked as Pluggable - - - - - - - The ConcreteKey alias of the Type - - - - - Declares a class, abstract class, or interface to be the target of a PluginFamily in the container - - - - - Determines if a Type object is marked as a PluginFamily - - - - - - - If set, determines the shared "scope" of the instance -- PerRequest, Singleton, ThreadLocal, - HttpContext, etc. - - - - - InstanceKey of the default instance. Used to implicitly define the default without - declaring the instance in StructureMap.config - - - - - Declares the target to be built by StructureMap as a Singleton. One object instance will - be created for each named instance - - - - - Marks a Property in a Pluggable class as filled by setter injection - - - - - Marks a method with no parameters as a method that validates an instance. StructureMap - uses this method to validate the configuration file. If the method does not throw an - exception, the object is assumed to be valid. - - - - - Returns an array of any MethodInfo's on a Type that are marked as ValidationMethod - - CLR Type to search for validation methods - - - - - Constants for the names of Xml nodes and attributes in the StructureMap.config - file - - - - - The name of the default configuration file. The value is always StructurMap.config - - - - - Returns the absolute path to the StructureMap.config file - - - - - - Expression Builder that has grammars for defining policies at the - PluginType level - - - - - Add multiple Instance's to this PluginType - - - - - - - Conditional binding of instances - - - - - - - Access to all of the uncommon Instance types - - - - - - - Access to all of the uncommon Instance types - - - - - - - Convenience method that sets the default concrete type of the PluginType. Type T - can only accept types that do not have any primitive constructor arguments. - StructureMap has to know how to construct all of the constructor argument types. - - - - - - - - Shorthand to say TheDefault.Is.ConstructedBy(func) - - - - - - - Shorthand to say TheDefault.Is.ConstructedBy(func) - - - - - - - Shorthand to say TheDefault.IsThis(@object) - - - - - - - Sets the object creation of the instances of the PluginType. For example: PerRequest, - Singleton, ThreadLocal, HttpContext, or Hybrid - - - - - - - Convenience method to mark a PluginFamily as a Singleton - - - - - - Convenience method to mark a PluginFamily as a Hybrid lifecycle - - - - - - Convenience method to mark a PluginFamily as HttpContext scoped - - - - - - Register an Action to run against any object of this PluginType immediately after - it is created, but before the new object is passed back to the caller - - - - - - - Register an Action to run against any object of this PluginType immediately after - it is created, but before the new object is passed back to the caller - - - - - - - Adds an Interceptor to only this PluginType - - - - - - - Register an Action to run against any object of this PluginType immediately after - it is created, but before the new object is passed back to the caller - - - - - - - Register an Action to run against any object of this PluginType immediately after - it is created, but before the new object is passed back to the caller - - - - - - - Register a Func to run against any object of this PluginType immediately after it is created, - but before the new object is passed back to the caller. Unlike OnCreation(), - EnrichWith() gives the the ability to return a different object. Use this method for runtime AOP - scenarios or to return a decorator. - - - - - - - Register a Func to run against any object of this PluginType immediately after it is created, - but before the new object is passed back to the caller. Unlike OnCreation(), - EnrichWith() gives the the ability to return a different object. Use this method for runtime AOP - scenarios or to return a decorator. - - - - - - - Register a Func to run against any object of this PluginType immediately after it is created, - but before the new object is passed back to the caller. Unlike OnCreation(), - EnrichWith() gives the the ability to return a different object. Use this method for runtime AOP - scenarios or to return a decorator. - - - - - - - Register a Func to run against any object of this PluginType immediately after it is created, - but before the new object is passed back to the caller. Unlike OnCreation(), - EnrichWith() gives the the ability to return a different object. Use this method for runtime AOP - scenarios or to return a decorator. - - - - - - - Shortcut method to add an additional Instance to this Plugin Type - as just a Concrete Type. This will only work if the Concrete Type - has no primitive constructor or mandatory Setter arguments. - - - - - - - Registers an ILifecycle for this Plugin Type that executes before - any object of this PluginType is created. ILifecycle's can be - used to create a custom scope - - - - - - - Largely deprecated and unnecessary with the ability to add Xml configuration files - - - - - - - Forces StructureMap to always use a unique instance to - stop the "BuildSession" caching - - - - - - Adds the object to to the PLUGINTYPE - - - - - - - Add an Instance to this type created by a Lambda - - - - - - - Define the Default Instance for this PluginType - - - - - Expression class to help define a runtime Profile - - - - - Starts the definition of the default instance for the containing Profile. This is - still valid, but Type() is recommended - - - - - - - Designate or define the Instance for a type within - this Profile - - - - - - - Use statement to define the Profile defaults for a Generic type - - - - - - - Expression Builder inside of a Profile creation for - open generic types - - - - - Use this concreteType for the Instance of this Profile for the PluginType - - - - - - - Use this concreteType for the Instance of this Profile for the PluginType - - - - - - - Use this Instance for the Profile Instance of this Plugin Type - - - - - - - Use the named Instance as the Profile Instance for this PluginType - - - - - - - Use the named Instance as the Profile Instance for this PluginType - - - - - - - For this type and profile, build the object with this Lambda - - - - - - - Expression Builder within defining a Profile - - - - - - Use a named, preconfigured instance as the default instance for this profile - - - - - - - Use a named, preconfigured instance as the default instance for this profile - - - - - - - Define the default instance of the PluginType for the containing Profile - - - - - - - For this Profile, use an Instance with this Func - - - - - - - For this Profile, use an Instance with this Func - - - - - - - For this Profile, use this object - - - - - - - Access to the uncommon types of Instance - - - - - - For this Profile, use the Concrete Type - - - - - - - For this profile, use this concrete type - - - - - - - A Registry class provides methods and grammars for configuring a Container or ObjectFactory. - Using a Registry subclass is the recommended way of configuring a StructureMap Container. - - - public class MyRegistry : Registry - { - public MyRegistry() - { - ForRequestedType(typeof(IService)).TheDefaultIsConcreteType(typeof(Service)); - } - } - - - - - Adds the concreteType as an Instance of the pluginType - - - - - - - Adds the concreteType as an Instance of the pluginType with a name - - - - - - - - Add the pluggedType as an instance to any configured pluginType where pluggedType - could be assigned to the pluginType - - - - - - Imports the configuration from another registry into this registry. - - - - - - Imports the configuration from another registry into this registry. - - - - - - Expression Builder used to define policies for a PluginType including - Scoping, the Default Instance, and interception. BuildInstancesOf() - and ForRequestedType() are synonyms - - - - - - - Expression Builder used to define policies for a PluginType including - Scoping, the Default Instance, and interception. This method is specifically - meant for registering open generic types - - - - - - This method is a shortcut for specifying the default constructor and - setter arguments for a ConcreteType. ForConcreteType is shorthand for: - ForRequestedType[T]().Use[T].************** - when the PluginType and ConcreteType are the same Type - - - - - - - Expression Builder used to define policies for a PluginType including - Scoping, the Default Instance, and interception. BuildInstancesOf() - and ForRequestedType() are synonyms - - - - - - - Convenience method. Equivalent of ForRequestedType[PluginType]().AsSingletons() - - - - - - - Uses the configuration expressions of this Registry to create a PluginGraph - object that could be used to initialize a Container. This method is - mostly for internal usage, but might be helpful for diagnostics - - - - - - Adds an additional, non-Default Instance to the PluginType T. - - - - - - - Adds an additional, non-Default Instance to the designated pluginType - This method is mostly meant for open generic types - - - - - - - Expression Builder to define the defaults for a named Profile. Each call - to CreateProfile is additive. - - - - - - - An alternative way to use CreateProfile that uses ProfileExpression - as a Nested Closure. This usage will result in cleaner code for - multiple declarations - - - - - - - Registers a new TypeInterceptor object with the Container - - - - - - Allows you to define a TypeInterceptor inline with Lambdas or anonymous delegates - - - - - IfTypeMatches( ... ).InterceptWith( o => new ObjectWrapper(o) ); - - - - - Designates a policy for scanning assemblies to auto - register types - - - - - - Directs StructureMap to always inject dependencies into any and all public Setter properties - of the type PLUGINTYPE. - - - - - - - Creates automatic "policies" for which public setters are considered mandatory - properties by StructureMap that will be "setter injected" as part of the - construction process. - - - - - - Use to programmatically select the constructor function of a concrete - class. Applies globally to all Containers in a single AppDomain. - - - - - - - All requests For the "TO" types will be filled by fetching the "FROM" - type and casting it to "TO" - GetInstance(typeof(TO)) basically becomes (TO)GetInstance(typeof(FROM)) - - - - - - - Syntactic Sugar for saying ForRequestedType().TheDefault.IsThis( @object ) - - - - - - - Syntactic Sugar for saying ForRequestedType().TheDefault.IsThis( instance ) - - - - - - - - Shorthand for ForRequestedType(pluginType) - - - - - - - - Advanced Usage Only! Skips the Registry and goes right to the inner - Semantic Model of StructureMap. Use with care - - - - - - Adds the concreteType as an Instance of the pluginType. Mostly useful - for conventions - - - - - - - Adds the concreteType as an Instance of the pluginType with a name. Mostly - useful for conventions - - - - - - - - Add the pluggedType as an instance to any configured pluginType where pluggedType. - Mostly useful for conventions - - - - - - Imports the configuration from another registry into this registry. - - - - - - Imports the configuration from another registry into this registry. - - - - - - Expression Builder used to define policies for a PluginType including - Scoping, the Default Instance, and interception. BuildInstancesOf() - and ForRequestedType() are synonyms - - - - - - - Expression Builder used to define policies for a PluginType including - Scoping, the Default Instance, and interception. This method is specifically - meant for registering open generic types - - - - - - This method is a shortcut for specifying the default constructor and - setter arguments for a ConcreteType. ForConcreteType is shorthand for: - For[T]().Use[T].************** - when the PluginType and ConcreteType are the same Type - - - - - - - Expression Builder used to define policies for a PluginType including - Scoping, the Default Instance, and interception. BuildInstancesOf() - and ForRequestedType() are synonyms - - - - - - - Convenience method. Equivalent of ForRequestedType[PluginType]().Singletons() - - - - - - - Uses the configuration expressions of this Registry to create a PluginGraph - object that could be used to initialize a Container. This method is - mostly for internal usage, but might be helpful for diagnostics - - - - - - Adds an additional, non-Default Instance to the PluginType T. - - - - - - - Adds an additional, non-Default Instance to the designated pluginType - This method is mostly meant for open generic types - - - - - - - Expression Builder to define the defaults for a named Profile. Each call - to CreateProfile is additive. - - - - - - - An alternative way to use CreateProfile that uses ProfileExpression - as a Nested Closure. This usage will result in cleaner code for - multiple declarations - - - - - - - Registers a new TypeInterceptor object with the Container - - - - - - Allows you to define a TypeInterceptor inline with Lambdas or anonymous delegates - - - - - IfTypeMatches( ... ).InterceptWith( o => new ObjectWrapper(o) ); - - - - - Designates a policy for scanning assemblies to auto - register types - - - - - - Directs StructureMap to always inject dependencies into any and all public Setter properties - of the type PLUGINTYPE. - - - - - - - Creates automatic "policies" for which public setters are considered mandatory - properties by StructureMap that will be "setter injected" as part of the - construction process. - - - - - - Use to programmatically select the constructor function of a concrete - class. Applies globally to all Containers in a single AppDomain. - - - - - - - All requests For the "TO" types will be filled by fetching the "FROM" - type and casting it to "TO" - GetInstance(typeof(TO)) basically becomes (TO)GetInstance(typeof(FROM)) - - - - - - - Syntactic Sugar for saying ForRequestedType().TheDefault.IsThis( @object ) - - - - - - - Syntactic Sugar for saying ForRequestedType().TheDefault.IsThis( instance ) - - - - - - - Expression Builder used to define policies for a PluginType including - Scoping, the Default Instance, and interception. BuildInstancesOf() - and ForRequestedType() are synonyms - - - - - - - Expression Builder used to define policies for a PluginType including - Scoping, the Default Instance, and interception. This method is specifically - meant for registering open generic types - - - - - - - Advanced Usage Only! Skips the Registry and goes right to the inner - Semantic Model of StructureMap. Use with care - - - - - - Define the constructor and setter arguments for the default T - - - - - - Thrown by IProperty classes when an invalid value is applied to - a property of an InstanceGraph - - - - - Main exception for StructureMap. Use the ErrorCode to aid in troubleshooting - StructureMap problems - - - - - Represents a concrete class that can be built by StructureMap as an instance of the parent - PluginFamily’s PluginType. The properties of a Plugin are the CLR Type of the concrete class, - and the human-friendly concrete key that StructureMap will use to identify the Type. - - - - - The ConcreteKey that identifies the Plugin within a PluginFamily - - - - - The concrete CLR Type represented by the Plugin - - - - - Property's that will be filled by setter injection - - - - - Conceptually speaking, a PluginFamily object represents a point of abstraction or variability in - the system. A PluginFamily defines a CLR Type that StructureMap can build, and all of the possible - Plugin’s implementing the CLR Type. - - - - - The CLR Type that defines the "Plugin" interface for the PluginFamily - - - - - The InstanceKey of the default instance of the PluginFamily - - - - - Custom collection class for PluginFamily's - - - - - Adds the concreteType as an Instance of the pluginType - - - - - - - Adds the concreteType as an Instance of the pluginType with a name - - - - - - - - Add the pluggedType as an instance to any configured pluginType where pluggedType - could be assigned to the pluginType - - - - - - Models the runtime configuration of a StructureMap Container - - - - - Closes the PluginGraph for adding or removing members. Runs all the AssemblyScanner's - and attempts to attach concrete types to the proper plugin types. Calculates the Profile defaults. - - - - - Adds the concreteType as an Instance of the pluginType - - - - - - - Adds the concreteType as an Instance of the pluginType with a name - - - - - - - - Add the pluggedType as an instance to any configured pluginType where pluggedType - could be assigned to the pluginType - - - - - - Adds an AssemblyScanner to the PluginGraph. Used for Testing. - - - - - - Add configuration to a PluginGraph with the Registry DSL - - - - - - Designates whether a PluginGraph has been "Sealed." - - - - - Represents a PropertyInfo of a Plugin.PluggedType that is filled by Setter Injection - - - - - Custom collection class for SetterProperty objects - - - - - Designates a CLR type that is loaded by name. - - - - - Interface for a "Factory" pattern class that creates object instances of the PluginType - - - - - The main "container" object that implements the Service Locator pattern - - - - - Creates or finds the named instance of the pluginType - - - - - - - - Creates or finds the default instance of the pluginType - - - - - - - Creates a new instance of the requested type using the supplied Instance. Mostly used internally - - - - - - - - Creates or finds the named instance of T - - - - - - - - Creates or finds the default instance of type T - - - - - - - Creates a new instance of the requested type T using the supplied Instance. Mostly used internally - - - - - - - Creates or resolves all registered instances of type T - - - - - - - Creates or resolves all registered instances of the pluginType - - - - - - - Creates or finds the named instance of the pluginType. Returns null if the named instance is not known to the container. - - - - - - - - Creates or finds the default instance of the pluginType. Returns null if the pluginType is not known to the container. - - - - - - - Creates or finds the default instance of type T. Returns the default value of T if it is not known to the container. - - - - - - - Creates or finds the named instance of type T. Returns the default value of T if the named instance is not known to the container. - - - - - - - Used to add additional configuration to a Container *after* the initialization. - - - - - - Injects the given object into a Container as the default for the designated - PLUGINTYPE. Mostly used for temporarily setting up return values of the Container - to introduce mocks or stubs during automated testing scenarios - - - - - - - Injects the given object into a Container as the default for the designated - pluginType. Mostly used for temporarily setting up return values of the Container - to introduce mocks or stubs during automated testing scenarios - - - - - - - Sets the default instance for all PluginType's to the designated Profile. - - - - - - Returns a report detailing the complete configuration of all PluginTypes and Instances - - - - - - Use with caution! Does a full environment test of the configuration of this container. Will try to create every configured - instance and afterward calls any methods marked with the [ValidationMethod] attribute - - - - - Gets all configured instances of type T using explicitly configured arguments from the "args" - - - - - - - - Gets the default instance of type T using the explicitly configured arguments from the "args" - - - - - - - - Starts a request for an instance or instances with explicitly configured arguments. Specifies that any dependency - of type T should be "arg" - - - - - - - - Starts a request for an instance or instances with explicitly configured arguments. Specifies that any dependency or primitive argument - with the designated name should be the next value. - - - - - - - Gets the default instance of the pluginType using the explicitly configured arguments from the "args" - - - - - - - - Removes all configured instances of type T from the Container. Use with caution! - - - - - - The "BuildUp" method takes in an already constructed object - and uses Setter Injection to push in configured dependencies - of that object - - - - - - Convenience method to request an object using an Open Generic - Type and its parameter Types - - - - - IFlattener flattener1 = container.ForGenericType(typeof (IFlattener<>)) - .WithParameters(typeof (Address)).GetInstanceAs<IFlattener>(); - - - - - Gets the named instance of the pluginType using the explicitly configured arguments from the "args" - - - - - - - - - Starts a request for an instance or instances with explicitly configured arguments. Specifies that any dependency - of type T should be "arg" - - - - - - - - - Starts a "Nested" Container for atomic, isolated access - - - - - - Starts a new "Nested" Container for atomic, isolated service location. Opens - - - - - - - Provides queryable access to the configured PluginType's and Instances of this Container - - - - - Default implementation of IInstanceFactory - - - - - Constructor to use when troubleshooting possible configuration issues. - - - - - - Constructor to create an Container - - PluginGraph containing the instance and type definitions - for the Container - - - - Creates or finds the named instance of T - - - - - - - - Creates a new instance of the requested type T using the supplied Instance. Mostly used internally - - - - - - - Gets the default instance of the pluginType using the explicitly configured arguments from the "args" - - - - - - - Gets the default instance of the pluginType using the explicitly configured arguments from the "args" - - - - - - - - Gets all configured instances of type T using explicitly configured arguments from the "args" - - - - - - - - Creates or finds the default instance of type T - - - - - - - Creates or resolves all registered instances of type T - - - - - - - Sets the default instance for all PluginType's to the designated Profile. - - - - - - Creates or finds the named instance of the pluginType - - - - - - - - Creates or finds the named instance of the pluginType. Returns null if the named instance is not known to the container. - - - - - - - - Creates or finds the default instance of the pluginType. Returns null if the pluginType is not known to the container. - - - - - - - Creates or finds the default instance of type T. Returns the default value of T if it is not known to the container. - - - - - - - The "BuildUp" method takes in an already constructed object - and uses Setter Injection to push in configured dependencies - of that object - - - - - - Creates or finds the named instance of type T. Returns the default value of T if the named instance is not known to the container. - - - - - - - Creates or finds the default instance of the pluginType - - - - - - - Creates a new instance of the requested type using the supplied Instance. Mostly used internally - - - - - - - - Creates or resolves all registered instances of the pluginType - - - - - - - Used to add additional configuration to a Container *after* the initialization. - - - - - - Returns a report detailing the complete configuration of all PluginTypes and Instances - - - - - - Starts a request for an instance or instances with explicitly configured arguments. Specifies that any dependency - of type T should be "arg" - - - - - - - - Starts a request for an instance or instances with explicitly configured arguments. Specifies that any dependency - of type T should be "arg" - - - - - - - - Starts a request for an instance or instances with explicitly configured arguments. Specifies that any dependency or primitive argument - with the designated name should be the next value. - - - - - - - Use with caution! Does a full environment test of the configuration of this container. Will try to create every configured - instance and afterward calls any methods marked with the [ValidationMethod] attribute - - - - - Removes all configured instances of type T from the Container. Use with caution! - - - - - - Convenience method to request an object using an Open Generic - Type and its parameter Types - - - - - IFlattener flattener1 = container.ForGenericType(typeof (IFlattener<>)) - .WithParameters(typeof (Address)).GetInstanceAs<IFlattener>(); - - - - - - Starts a "Nested" Container for atomic, isolated access - - - - - - Starts a new "Nested" Container for atomic, isolated service location. Opens - - - - - - - Injects the given object into a Container as the default for the designated - PLUGINTYPE. Mostly used for temporarily setting up return values of the Container - to introduce mocks or stubs during automated testing scenarios - - - - - - - Injects the given object into a Container as the default for the designated - pluginType. Mostly used for temporarily setting up return values of the Container - to introduce mocks or stubs during automated testing scenarios - - - - - - - Sets the default instance for the PluginType - - - - - - - Provides queryable access to the configured PluginType's and Instances of this Container - - - - - GoF Memento representing an Object Instance - - - - - Retrieves the named property value as a string - - - - - - - Template method for implementation specific retrieval of the named property - - - - - - - Returns the named child InstanceMemento - - - - - - - Template method for implementation specific retrieval of the named property - - - - - - - This method is made public for testing. It is not necessary for normal usage. - - - - - - Used to create a templated InstanceMemento - - - - - - - The named type of the object instance represented by the InstanceMemento. Translates to a concrete - type - - - - - The named key of the object instance represented by the InstanceMemento - - - - - Gets the referred template name - - - - - - Template pattern property specifying whether the InstanceMemento is simply a reference - to another named instance. Useful for child objects. - - - - - Template pattern property specifying the instance key that the InstanceMemento refers to - - - - - Is the InstanceMemento a reference to the default instance of the plugin type? - - - - - A TypeInterceptor that always applies to all Instances of a given Plugin Type - - - - - Abstract class that is the supertype of all storage and retrieval mechanisms of - InstanceMemento instances - - - - - Retrieves the named InstanceMemento - - The instanceKey of the requested InstanceMemento - - - - - Retrieves an array of all InstanceMemento's stored by this MementoSource - - - - - - Template pattern method. Determines if the MementoSource contains a definition for the - requested instanceKey. - - - - - - - Template pattern method. Retrieves an InstanceMemento for the instanceKey - - - - - - - The type of MementoSource - - - - - String description of the MementoSource. Used in the StructureMap-Client UI. - - - - - An in-memory implementation of InstanceMemento. - - - - - Creates an instance of MemoryInstanceMemento that represents a reference to another - instance. - - The referenced instance key to another instance - - - - - Creates a MemoryInstanceMemento that represents a reference to the default instance - of a plugin type. - - - - - - Constructs a MemoryInstanceMemento without properties - - The concrete key of the plugin type - The identifying instance key - - - - Constructs a MemoryInstanceMemento with properties - - The concrete key of the plugin type - The identifying instance key - NameValueCollection of instance properties - - - - Sets the value of the named property - - - - - - - Deletes a named property from the DefaultInstanceMemento - - - - - - Links a child InstanceMemento as a named property - - - - - - - Links an array of InstanceMemento's to a named array property - - - - - - - See InstanceMemento - - - - - See InstanceMemento - - - - - See InstanceMemento - - - - - See InstanceMemento - - - - - See InstanceMemento - - - - - The main static Facade for the StructureMap container - - - - - Restarts ObjectFactory and blows away all Singleton's and cached instances. Use with caution. - - - - - Remove and dispose all objects scoped by HttpContext. Call this method at the *end* of an Http request to clean up resources - - - - - Injects the given object into a Container as the default for the designated - pluginType. Mostly used for temporarily setting up return values of the Container - to introduce mocks or stubs during automated testing scenarios - - - - - - - Injects the given object into a Container as the default for the designated - PLUGINTYPE. Mostly used for temporarily setting up return values of the Container - to introduce mocks or stubs during automated testing scenarios - - - - - - - Returns a report detailing the complete configuration of all PluginTypes and Instances - - - - - - Use with caution! Does a full environment test of the configuration of this container. Will try to create every configured - instance and afterward calls any methods marked with the [ValidationMethod] attribute - - - - - Creates or finds the default instance of the pluginType - - - - - - - Creates or finds the default instance of type T - - - - - - - Creates a new instance of the requested type using the supplied Instance. Mostly used internally - - - - - - - - Creates a new instance of the requested type T using the supplied Instance. Mostly used internally - - - - - - - Creates or finds the named instance of the pluginType - - - - - - - - Creates or finds the named instance of T - - - - - - - - Creates or resolves all registered instances of the pluginType - - - - - - - Creates or resolves all registered instances of type T - - - - - - - Starts a request for an instance or instances with explicitly configured arguments. Specifies that any dependency - of type T should be "arg" - - - - - - - - Starts a request for an instance or instances with explicitly configured arguments. Specifies that any dependency or primitive argument - with the designated name should be the next value. - - - - - - - Starts a request for an instance or instances with explicitly configured arguments. Specifies that any dependency - of type T should be "arg" - - - - - - - - Removes all configured instances of type T from the Container. Use with caution! - - - - - - Creates or finds the named instance of the pluginType. Returns null if the named instance is not known to the container. - - - - - - - - Creates or finds the default instance of the pluginType. Returns null if the pluginType is not known to the container. - - - - - - - Creates or finds the default instance of type T. Returns the default value of T if it is not known to the container. - - - - - - - Creates or finds the named instance of type T. Returns the default value of T if the named instance is not known to the container. - - - - - - - - The "BuildUp" method takes in an already constructed object - and uses Setter Injection to push in configured dependencies - of that object - - - - - - Convenience method to request an object using an Open Generic - Type and its parameter Types - - - - - IFlattener flattener1 = container.ForGenericType(typeof (IFlattener<>)) - .WithParameters(typeof (Address)).GetInstanceAs<IFlattener>(); - - - - - - Used to add additional configuration to a Container *after* the initialization. - - - - - - Provides queryable access to the configured PluginType's and Instances of the inner Container - - - - - Sets the default instance for all PluginType's to the designated Profile. - - - - - Reads configuration XML documents and builds the structures necessary to initialize - the Container/IInstanceFactory/InstanceBuilder/ObjectInstanceActivator objects - - - - - Reads the configuration information and returns the PluginGraph definition of - plugin families and plugin's - - - - - - Generic implementation of an XmlMementoSource - - - - - Base class for all MementoSource classes that store InstanceMemento's as - node-normalized Xml - - - - - Implementation of MementoSource that stores and retrieves an XmlInstanceMemento per file in a named directory. - DirectoryXmlMementoSource is meant to simplify complicated object graph configurations by isolating each instance to a separate - editable file. - - - - - Stores an Xml InstanceMemento per file in a directory - - A ";" delimited list of directories to look for mementos. DirectoryXmlMementoSource - will use the FIRST directory it finds - The file extension of the InstanceMemento files without a dot. Typically "xml" - NodeNormalized or AttributeNormalized - - - - Implementation of MementoSource that stores and retrieves an XmlInstanceMemento per Embedded Resource file - in a named namespace. EmbeddedFolderXmlMementoSource is meant to simplify complicated object graph configurations - by isolating each instance to a separate - editable file. - - NodeNormalized or AttributeNormalized - The name of the Assembly with the embedded resources - The root namespace of all of the mementos. - The file extension of the memento files - "xml" - - - - An in-memory MementoSource - - - - - Retrieves Xml InstanceMemento's from an xml file stored as an embedded resource in an assembly. - - Designates the nodes that are memento nodes - NodeNormalized or AttributeNormalized - The name of the Assembly the file is embedded into - The path to the embedded resource within the file - - - - Default Constructor - - MementoSource that contains the Memento Templates - MementoSource that contains instances consisting of Template valuee - - - - Stores Attribute-normalized InstanceMemento's in an external file - - - - - Implementation of XmlMementoSource that reads InstanceMemento's from an external file. - Useful to break the StructureMap.config file into smaller pieces. - - - - - Default constructor - - Path to the xml file that contains the instance configuration - XPath expression to the parent node that contains the InstanceMemento nodes. - If empty, it defaults to the top node - The name of the nodes that are InstanceMemento nodes. Useful to store - different types of instances in the same file - - - - An implementation of InstanceMemento that stores properties as Xml attributes - Limited functionality - - - - - Implementation of InstanceMemento that stores information in a node-normalized - Xml format. - - - - - specify what type you'd like the service returned as - - - - - - - Specify the open generic type that should have a single generic parameter - - - - - - - Used as the argument in the Container.Configure() method to describe - configuration directives and specify the sources of configuration for - a Container - - - - - Creates and adds a Registry object of type T. - - The Registry Type - - - - Imports all the configuration from a Registry object - - - - - - Imports configuration from an Xml file. The fileName - must point to an Xml file with valid StructureMap - configuration - - - - - - Imports configuration directly from an XmlNode. This - method was intended for scenarios like Xml being embedded - into an assembly. The node must be a 'StructureMap' node - - - - - - If true, directs StructureMap to look for configuration in the App.config. - The default value is false. - - - - - Expression Builder to define an Instance - - - - - - Register a previously built Instance. This provides a "catch all" - method to attach custom Instance objects. Synonym for Instance() - - - - - - Inject this object directly. Synonym to Object() - - - - - - - Gives you full access to all the different ways to specify an "Instance" - - - - - An Expression Builder to define Instances of a PluginType. - This is mostly used for configuring open generic types - - - - - Shortcut to register a Concrete Type as an instance. This method supports - method chaining to allow you to add constructor and setter arguments for - the concrete type - - - - - - - Shortcut to simply use the Instance with the given name - - - - - - - An Expression Builder that is used throughout the Registry DSL to - add and define Instances - - - - - - Register a previously built Instance. This provides a "catch all" - method to attach custom Instance objects. Synonym for IsThis() - - - - - - Inject this object directly. Synonym to IsThis() - - - - - - - Build the Instance with the constructor function and setter arguments. Starts - the definition of a SmartInstance - - - - - - - Build the Instance with the constructor function and setter arguments. Starts - the definition of a SmartInstance - - - - - - - Build the Instance with the constructor function and setter arguments. Use this - method for open generic types, and favor the generic version of OfConcreteType - for all other types - - - - - - - Build the Instance with the constructor function and setter arguments. Use this - method for open generic types, and favor the generic version of OfConcreteType - for all other types - - - - - - - Create an Instance that builds an object by calling a Lambda or - an anonymous delegate with no arguments - - - - - - - Create an Instance that builds an object by calling a Lambda or - an anonymous delegate with the IContext representing - the current object graph. - - - - - - - Use the Instance of this PluginType with the specified name. This is - generally only used while configuring child dependencies within a deep - object graph - - - - - - - Use the default Instance of this PluginType. This is - generally only used while configuring child dependencies within a deep - object graph - - - - - - Creates an Instance that stores this object of type T, - and returns a cloned copy of the template. - - - - - - - Caches template as a serialized byte stream. Uses deserialization - to create copies when the Instance is built. - - - - - - - Creates an Instance that will load an ASCX user control from the url - - - - - - - Creates an Instance according to conditional rules - - - - - - - Used as an expression builder to specify setter injection policies - - - - - Directs StructureMap to treat all public setters of type T as - mandatory properties - - - - - - Directs StructureMap to tread all public setters with - a PropertyType that matches the predicate as a - mandatory setter - - - - - - Directs StructureMap to treat all public setters that match the - rule as mandatory properties - - - - - - Directs StructureMap to treat all public setters with a property - type in the specified namespace as mandatory properties - - - - - - Directs StructureMap to treat all public setters with a property - type in the specified namespace as mandatory properties - - - - - - Directs StructureMap to treat all public setters where to property name - matches the specified rule as a mandatory property - - - - - - Base class for creating an object instance from an InstanceMemento. SubClasses are - emitted for each concrete Plugin with constructor parameters. - - - - - Allows built-in registration conventions to be configurable through the assembly scanning DSL - - - Intended for StructureMap internal use only. - Custom registration convention instances can be directly configured - before being passed to IAssemblyScanner.With(IRegistrationConvention). - - - - - Simply query to see if there are any implementations registered - - - - - - Ejects any instances of this instance from the current container - and permanently removes the instance from the container configuration - - - - - - Eject all instances of this PluginType from the current container, - but leaves the lifecycle behavior - - - - - The "instance" that will be used when Container.GetInstance(PluginType) is called. - See InstanceRef for more information - - - - - The build "policy" for this PluginType. Used by the WhatDoIHave() diagnostics methods - - - - - All of the InstanceRef's registered - for this PluginType - - - - - Simply query to see if there are any implementations registered - - - - - - The "instance" that will be used when Container.GetInstance(PluginType) is called. - See InstanceRef for more information - - - - - The build "policy" for this PluginType. Used by the WhatDoIHave() diagnostics methods - - - - - All of the InstanceRef's registered - for this PluginType - - - - - Simply query to see if there are any implementations registered - - - - - - The "instance" that will be used when Container.GetInstance(PluginType) is called. - See InstanceRef for more information - - - - - The build "policy" for this PluginType. Used by the WhatDoIHave() diagnostics methods - - - - - All of the InstanceRef's registered - for this PluginType - - - - - Models the state of a Container or ObjectFactory. Can be used to query for the - existence of types registered with StructureMap - - - - - Can StructureMap fulfill a request to ObjectFactory.GetInstance(pluginType) from the - current configuration. This does not include concrete classes that could be auto-configured - upon demand - - - - - - - Can StructureMap fulfill a request to ObjectFactory.GetInstance<T>() from the - current configuration. This does not include concrete classes that could be auto-configured - upon demand - - - - - - - Queryable access to all of the InstanceRef for a given PluginType - - - - - - - Queryable access to all of the InstanceRef for a given PluginType - - - - - - Does the current container have existing configuration for the "pluginType" - - - - - - - Does the current container have existing configuration for the type T - - - - - - Find the concrete type for the default Instance of T. - In other words, when I call Container.GetInstance(Type), - what do I get? May be indeterminate - - - - - - - Find the concrete type for the default Instance of pluginType. - In other words, when I call Container.GetInstance(Type), - what do I get? May be indeterminate - - - - - - Retrieves the configuration for the given type - - - - - - - Retrieves the configuration for the given type - - - - - - - Eject all objects, configuration, and Plugin Types matching this filter - - - - - - Eject all objects and configuration for any Plugin Type that matches this filter - - - - - - Eject all objects and Instance configuration for this PluginType - - - - - - Get each and every configured instance that could possibly - be cast to T - - - - - - - Access to all the Plugin Type registrations - - - - - Makes sure that every request for this object returns a unique object - - - - - Simply query to see if there are any implementations registered - - - - - - The "instance" that will be used when Container.GetInstance(PluginType) is called. - See InstanceRef for more information - - - - - The build "policy" for this PluginType. Used by the WhatDoIHave() diagnostics methods - - - - - All of the InstanceRef's registered - for this PluginType - - - - - The actual concrete type of this Instance. Not every type of IInstance - can determine the ConcreteType - - - - - Ejects and removes all objects and the configuration for the named instance from the - container - - - - - - - Ejects and removes all objects and configuration for the instances that match the filter - - - - - - - Determines if the pluggedType can be upcast to the pluginType - - - - - - - - Determines if the PluggedType is a valid Plugin into the - PluginType - - - - - - - - Imports configuration from an Xml file. The fileName - must point to an Xml file with valid StructureMap - configuration - - - - - - Imports configuration directly from an XmlNode. This - method was intended for scenarios like Xml being embedded - into an assembly. The node must be a 'StructureMap' node - - - - - - Creates and adds a Registry object of type T. - - The Registry Type - - - - Imports all the configuration from a Registry object - - - - - - If true, makes the existence of the StructureMap.config mandatory. - The default is false. - - - - - If true, the StructureMap.config file will be ignored even if it exists. - The default is false. - - - - - If true, directs StructureMap to look for configuration in the App.config. - The default value is false. - - - - - Designate the Default Profile. This will be applied as soon as the - Container is initialized. - - - - - Retrieves the configuration for the given type - - - - - - - Retrieves the configuration for the given type - - - - - - - Eject all objects, configuration, and Plugin Types matching this filter - - - - - - Eject all objects and configuration for any Plugin Type that matches this filter - - - - - - Eject all objects and Instance configuration for this PluginType - - - - - - Get each and every configured instance that could possibly - be cast to T - - - - - - - The requested PluginType of the Instance being create - - - - - The Name of the Instance being created - - - - - The actual ConcreteType being created. This will not always - be available - - - - - Models the current place in an object graph during the construction of - an instance. Provides contextual information that can be used - to alter the desired construction of child objects - - - - - The requested PluginType of the Instance being create - - - - - The Name of the Instance being created - - - - - The actual ConcreteType being created. This will not always - be available - - - - - Provides metadata about the object graph being constructed. More or less a stack trace of the GetInstance() pipeline - that can be used for "contextual" object construction - - - - - The top level of the object graph. Describes the original requested instance - - - - - The current BuildFrame - - - - - The immediate parent BuildFrame - - - - - Defines the value of a primitive argument to a constructur argument - - - - - Sets the value of the constructor argument - - - - - - - Sets the value of the constructor argument to the key/value in the - AppSettings - - The key in appSettings for the value to use. - - - - - Sets the value of the constructor argument to the key/value in the - AppSettings when it exists. Otherwise uses the provided default value. - - The key in appSettings for the value to use. - The value to use if an entry for does not exist in the appSettings section. - - - - - Instance that builds objects with by calling constructor functions and using setter properties - - The concrete type constructed by SmartInstance - - - - Sets the name of this Instance - - - - - - - Sets the name of this Instance - - - - - - - Register an Action to perform on the object created by this Instance - before it is returned to the caller - - - - - - - Register an Action to perform on the object created by this Instance - before it is returned to the caller - - - - - - - Register a Func to potentially enrich or substitute for the object - created by this Instance before it is returned to the caller - - - - - - - Register a Func to potentially enrich or substitute for the object - created by this Instance before it is returned to the caller - - - - - - - Register a Func to potentially enrich or substitute for the object - created by this Instance before it is returned to the caller - - - - - - - Register a Func to potentially enrich or substitute for the object - created by this Instance before it is returned to the caller - - - - - - - Register an InstanceInterceptor with this Instance - - - - - - - Define a primitive constructor argument - - - - - - - Set simple setter properties - - - - - - - Define a primitive setter property by specifying the property name with - an expression - - - - - - - Define a primitive setter property by specifying the property name - - - - - - - Inline definition of a constructor dependency. Select the constructor argument by type. Do not - use this method if there is more than one constructor arguments of the same type - - - - - - - Inline definition of a constructor dependency. Select the constructor argument by type. Do not - use this method if there is more than one constructor arguments of the same type - - - - - - - Inline definition of a constructor dependency. Select the constructor argument by type and constructor name. - Use this method if there is more than one constructor arguments of the same type - - - - - - - - Inline definition of a constructor dependency. Select the constructor argument by type and constructor name. - Use this method if there is more than one constructor arguments of the same type - - - - - - - - Inline definition of a setter dependency. The property name is specified with an Expression - - - - - - - - Inline definition of a setter dependency. The property name is specified with an Expression - - - - - - - - Inline definition of a setter dependency. Only use this method if there - is only a single property of the SETTERTYPE - - - - - - - Inline definition of a setter dependency. Only use this method if there - is only a single property of the SETTERTYPE - - - - - - - Inline definition of a dependency on an Array of the CHILD type. I.e. CHILD[]. - This method can be used for either constructor arguments or setter properties - - - - - - - Inline definition of a dependency on an Array of the CHILD type and the specified setter property or constructor argument name. I.e. CHILD[]. - This method can be used for either constructor arguments or setter properties - - - - - - - - Inline definition of a dependency on an Array of the CHILD type. I.e. CHILD[]. - This method can be used for either constructor arguments or setter properties - - - - - - - Inline definition of a dependency on an Array of the CHILD type and the specified setter property or constructor argument name. I.e. CHILD[]. - This method can be used for either constructor arguments or setter properties - - - - - - - - Expression Builder to help define multiple Instances for an Array dependency - - - - - - Nested Closure that allows you to add an unlimited number of child Instances - - - - - - - Specify an array of Instance objects directly for an Array dependency - - - - - - - Expression Builder that helps to define child dependencies inline - - - - - - Sets the value of the constructor argument to the key/value in the - AppSettings - - The key in appSettings for the value to use. - - - - - Sets the value of the constructor argument to the key/value in the - AppSettings when it exists. Otherwise uses the provided default value. - - The key in appSettings for the value to use. - The value to use if an entry for does not exist in the appSettings section. - - - - - Nested Closure to define a child dependency inline - - - - - - - Shortcut to set an inline dependency to an Instance - - - - - - - Shortcut to set an inline dependency to a designated object - - - - - - - Shortcut to set an inline dependency to a designated object - - - - - - - Set an Inline dependency to the Default Instance of the Property type - Used mostly to force an optional Setter property to be filled by - StructureMap - - - - - - Shortcut method to define a child dependency inline - - - - - - - Shortcut method to define a child dependency inline and configure - the child dependency - - - - - - - Provides virtual methods that can be used by subclasses to parse an expression tree. - - - This class actually already exists in the System.Core assembly...as an internal class. - I can only speculate as to why it is internal, but it is obviously much too dangerous - for anyone outside of Microsoft to be using... - - - - + + + + StructureMap + + + + + The "BuildUp" method takes in an already constructed object + and uses Setter Injection to push in configured dependencies + of that object + + + + + + Get the object of type T that is valid for this build session. + + + + + + + Get the object of type T that is valid for this build session by name. + + + + + + + Register a default object for the given PluginType that will + be used throughout the rest of the current object request + + + + + + + Same as GetInstance, but can gracefully return null if + the Type does not already exist + + + + + + + Same as GetInstance(name), but can gracefully return null if + the Type and name does not already exist + + + + + + + + Gets all objects in the current object graph that can be cast + to T that have already been created + + + + + + + Creates/Resolves every configured instance of PlutinType T + + + + + + + Gets a reference to the BuildStack for this build session + + + + + The concrete type of the immediate parent object in the object graph + + + + + Gets the root "frame" of the object request + + + + + The requested instance name of the object graph + + + + + Expression Builder that has grammars for defining policies at the + PluginType level. This expression is used for registering + open generic types + + + + + Convenience method that sets the default concrete type of the PluginType. The "concreteType" + can only accept types that do not have any primitive constructor arguments. + StructureMap has to know how to construct all of the constructor argument types. + + + + + + + Use this configured Instance as is + + + + + + Shorter way to call TheDefaultIsConcreteType + + + + + + + Shortcut to add a value by type + + + + + + + Shortcut method to add an additional Instance to this Plugin Type + as just a Concrete Type. This will only work if the Concrete Type + has no primitive constructor or mandatory Setter arguments. + + + + + + + Shortcut method to add an additional Instance to this Plugin Type + as just a Concrete Type. This will only work if the Concrete Type + has no primitive constructor or mandatory Setter arguments. + + + + + + + Configure this type as the supplied value + + + + + + Sets the object creation of the instances of the PluginType. For example: PerRequest, + Singleton, ThreadLocal, HttpContext, or Hybrid + + + + + + + Register an Action to run against any object of this PluginType immediately after + it is created, but before the new object is passed back to the caller + + + + + + + Register a Func to run against any object of this PluginType immediately after it is created, + but before the new object is passed back to the caller. Unlike OnCreation(), + EnrichWith() gives the the ability to return a different object. Use this method for runtime AOP + scenarios or to return a decorator. + + + + + + + Register a Func to run against any object of this PluginType immediately after it is created, + but before the new object is passed back to the caller. Unlike OnCreation(), + EnrichWith() gives the the ability to return a different object. Use this method for runtime AOP + scenarios or to return a decorator. + + + + + + + Registers an IBuildInterceptor for this Plugin Type that executes before + any object of this PluginType is created. IBuildInterceptor's can be + used to create a custom scope + + + + + + + Convenience method to mark a PluginFamily as a Singleton + + + + + + Convenience method to mark a PluginFamily as a Hybrid lifecycle + + + + + + Convenience method to mark a PluginFamily as HttpContext scoped + + + + + + + + + + + + + Shortcut method to add an additional Instance to this Plugin Type + as just a Concrete Type. You can also chain other declarations after + this method to add constructor and setter arguments + + + + + + + Shortcut method to add an additional Instance to this Plugin Type + as just a Concrete Type by a specified name. You can also chain other declarations after + this method to add constructor and setter arguments + + + + + + + + Specify the value of this explicit argument + + + + + + + Pass in additional arguments by type T + + + + + + + + Pass in additional arguments by type + + + + + + + + Pass in additional arguments by name + + + + + + + Gets the default instance of type T using the explicitly configured arguments from the "args" + + + + + + + Gets a named instance of type T using the explicitly configured arguments from teh "args" + + + + + + + + Gets the default instance of the pluginType using the explicitly configured arguments from the "args" + + + + + + Gets all configured instances of type T using explicitly configured arguments + + + + + + + Returns the System.Reflection.ConstructorInfo for the PluggedType. Uses either + the "greediest" constructor with the most arguments or the constructor function + marked with the [DefaultConstructor] + + + + + + The InstanceKey of the default instance of the PluginFamily + + + + + The CLR Type that defines the "Plugin" interface for the PluginFamily + + + + + Add an Assembly to the scanning operation + + + + + + Add an Assembly by name to the scanning operation + + + + + + Add the currently executing Assembly to the scanning operation + + + + + Add the Assembly that contains type T to the scanning operation + + + + + + Add the Assembly that contains type to the scanning operation + + + + + + Sweep the designated path and add any Assembly's found in this folder to the + scanning operation + + + + + + Sweep the designated path and add any Assembly's found in this folder to the + scanning operation. The assemblyFilter can be used to filter or limit the + Assembly's that are picked up. + + + + + + + Sweep the application base directory of current app domain and add any Assembly's + found to the scanning operation. + + + + + Sweep the application base directory of current app domain and add any Assembly's + found to the scanning operation. The assemblyFilter can be used to filter or limit the + Assembly's that are picked up. + + + + + Adds an ITypeScanner object to the scanning operation + + + + + + Creates and adds a new ITypeScanner of type T to this scanning operation + + + + + + Directs the scanning operation to automatically detect and include any Registry + classes found in the Assembly's being scanned + + + + + Add all concrete types of the Plugin Type as Instances of Plugin Type + + + + + + Add all concrete types of the Plugin Type as Instances of Plugin Type + + + + + + Makes this scanning operation ignore all [PluginFamily] and [Pluggable] attributes + + + + + Exclude types that match the Predicate from being scanned + + + + + + Exclude all types in this nameSpace or its children from the scanning operation + + + + + + Exclude all types in this nameSpace or its children from the scanning operation + + + + + + Only include types matching the Predicate in the scanning operation. You can + use multiple Include() calls in a single scanning operation + + + + + + Only include types from this nameSpace or its children in the scanning operation. You can + use multiple Include() calls in a single scanning operation + + + + + + Only include types from this nameSpace or its children in the scanning operation. You can + use multiple Include() calls in a single scanning operation + + + + + + Exclude this specific type from the scanning operation + + + + + + Adds a registration convention to be applied to all the types in this + logical "scan" operation + + + + + + Adds a registration convention to be applied to all the types in this + logical "scan" operation + + + + + Adds the DefaultConventionScanner to the scanning operations. I.e., a concrete + class named "Something" that implements "ISomething" will be automatically + added to PluginType "ISomething" + + + + + Scans for PluginType's and Concrete Types that close the given open generic type + + + + + + + + + Automatically registers all concrete types without primitive arguments + against its first interface, if any + + + + + Directs the scanning to automatically register any type that is the single + implementation of an interface against that interface. + The filters apply + + + + + Adds the DefaultConventionScanner to the scanning operations. I.e., a concrete + class named "Something" that implements "ISomething" will be automatically + added to PluginType "ISomething" + + + + + Scans for PluginType's and Concrete Types that close the given open generic type + + + + + + + + + Automatically registers all concrete types without primitive arguments + against its first interface, if any + + + + + Directs the scanning to automatically register any type that is the single + implementation of an interface against that interface. + The filters apply + + + + + A TypeInterceptor that is only applied if the MatchesType() + method is true for a given Type + + + + + An InstanceInterceptor can be registered on a per-Instance basis + to act on, or even replace, the object that is created before + it is passed back to the caller. This is primarily a hook + for runtime AOP scenarios. + + + + + Does this TypeInterceptor apply to the given type? + + + + + + + Specify how objects matching the Type predicate + will be intercepted + + + + + + Specify how objects matching the Type predicate + will be intercepted + + + + + + An Instance class that builds objects by calling a constructor function on a concrete type + and filling setter properties. ConfiguredInstance should only be used for open generic types. + Favor SmartInstance{T} for all other usages. + + + + + Register an Action to perform on the object created by this Instance + before it is returned to the caller + + + + + + + + Register an Action to perform on the object created by this Instance + before it is returned to the caller + + + + + + + + Register a Func to potentially enrich or substitute for the object + created by this Instance before it is returned to the caller + + + + + + + Register a Func to potentially enrich or substitute for the object + created by this Instance before it is returned to the caller + + + + + + + Inline definition of a dependency array like IService[] or IHandler[] + + + + + + + + Inline definition of a dependency array like IService[] or IHandler[] + + + + + + + Inline definition of a dependency array like IService[] or IHandler[] + + + + + + + Start the definition of a child instance for type CONSTRUCTORARGUMENTTYPE + + + + + + + Start the definition of a child instance for type CONSTRUCTORARGUMENTTYPE + + + + + + + Inline definition of a constructor or a setter property dependency + + + + + + + Starts the definition of a child instance specifying the argument name + in the case of a constructor function that consumes more than one argument + of type T + + + + + + + + Inline definition of a constructor dependency + + + + + + + + Inline definition of a setter dependency + + + + + + + + Start the definition of a primitive argument to a constructor argument + + + + + + + Configure a primitive constructor argument + + + + + + + Configures an array of Instance's for the array dependency + + + + + + + Part of the Fluent Interface, represents a nonprimitive argument to a + constructure function + + + + + Use a previously configured and named instance for the child + + + + + + + Start the definition of a child instance by defining the concrete type + + + + + + + Start the definition of a child instance by defining the concrete type + + + + + + + Registers a configured instance to use as the argument to the parent's + constructor + + + + + + + Directs StructureMap to fill this dependency with the Default Instance of the + constructor or property type + + + + + + Base class for many of the Instance subclasses to support + method chaining in the Registry DSL for common options + + + + + + Set the name of this Instance + + + + + + + Register an Action to perform on the object created by this Instance + before it is returned to the caller + + + + + + + + Register a Func to potentially enrich or substitute for the object + created by this Instance before it is returned to the caller + + + + + + + + Register a Func to potentially enrich or substitute for the object + created by this Instance before it is returned to the caller + + + + + + + + Register an InstanceInterceptor with this Instance + + + + + + + Used to override the constructor of a class to be used by StructureMap to create + a Pluggable object + + + + + Examines a System.Type object and determines the ConstructorInfo to use in creating + instances of the Type + + + + + + + Used to implicitly mark a class as a Plugin candidate for StructureMap + + + + + Determines whether a Type object is marked as Pluggable + + + + + + + The ConcreteKey alias of the Type + + + + + Declares a class, abstract class, or interface to be the target of a PluginFamily in the container + + + + + Determines if a Type object is marked as a PluginFamily + + + + + + + If set, determines the shared "scope" of the instance -- PerRequest, Singleton, ThreadLocal, + HttpContext, etc. + + + + + InstanceKey of the default instance. Used to implicitly define the default without + declaring the instance in StructureMap.config + + + + + Declares the target to be built by StructureMap as a Singleton. One object instance will + be created for each named instance + + + + + Marks a Property in a Pluggable class as filled by setter injection + + + + + Marks a method with no parameters as a method that validates an instance. StructureMap + uses this method to validate the configuration file. If the method does not throw an + exception, the object is assumed to be valid. + + + + + Returns an array of any MethodInfo's on a Type that are marked as ValidationMethod + + CLR Type to search for validation methods + + + + + Constants for the names of Xml nodes and attributes in the StructureMap.config + file + + + + + The name of the default configuration file. The value is always StructurMap.config + + + + + Returns the absolute path to the StructureMap.config file + + + + + + Expression Builder that has grammars for defining policies at the + PluginType level + + + + + Add multiple Instance's to this PluginType + + + + + + + Conditional binding of instances + + + + + + + Access to all of the uncommon Instance types + + + + + + + Access to all of the uncommon Instance types + + + + + + + Convenience method that sets the default concrete type of the PluginType. Type T + can only accept types that do not have any primitive constructor arguments. + StructureMap has to know how to construct all of the constructor argument types. + + + + + + + + Shorthand to say TheDefault.Is.ConstructedBy(func) + + + + + + + Shorthand to say TheDefault.Is.ConstructedBy(func) + + + + + + + Shorthand to say TheDefault.IsThis(@object) + + + + + + + Sets the object creation of the instances of the PluginType. For example: PerRequest, + Singleton, ThreadLocal, HttpContext, or Hybrid + + + + + + + Convenience method to mark a PluginFamily as a Singleton + + + + + + Convenience method to mark a PluginFamily as a Hybrid lifecycle + + + + + + Convenience method to mark a PluginFamily as HttpContext scoped + + + + + + Register an Action to run against any object of this PluginType immediately after + it is created, but before the new object is passed back to the caller + + + + + + + Register an Action to run against any object of this PluginType immediately after + it is created, but before the new object is passed back to the caller + + + + + + + Adds an Interceptor to only this PluginType + + + + + + + Register an Action to run against any object of this PluginType immediately after + it is created, but before the new object is passed back to the caller + + + + + + + Register an Action to run against any object of this PluginType immediately after + it is created, but before the new object is passed back to the caller + + + + + + + Register a Func to run against any object of this PluginType immediately after it is created, + but before the new object is passed back to the caller. Unlike OnCreation(), + EnrichWith() gives the the ability to return a different object. Use this method for runtime AOP + scenarios or to return a decorator. + + + + + + + Register a Func to run against any object of this PluginType immediately after it is created, + but before the new object is passed back to the caller. Unlike OnCreation(), + EnrichWith() gives the the ability to return a different object. Use this method for runtime AOP + scenarios or to return a decorator. + + + + + + + Register a Func to run against any object of this PluginType immediately after it is created, + but before the new object is passed back to the caller. Unlike OnCreation(), + EnrichWith() gives the the ability to return a different object. Use this method for runtime AOP + scenarios or to return a decorator. + + + + + + + Register a Func to run against any object of this PluginType immediately after it is created, + but before the new object is passed back to the caller. Unlike OnCreation(), + EnrichWith() gives the the ability to return a different object. Use this method for runtime AOP + scenarios or to return a decorator. + + + + + + + Shortcut method to add an additional Instance to this Plugin Type + as just a Concrete Type. This will only work if the Concrete Type + has no primitive constructor or mandatory Setter arguments. + + + + + + + Registers an ILifecycle for this Plugin Type that executes before + any object of this PluginType is created. ILifecycle's can be + used to create a custom scope + + + + + + + Largely deprecated and unnecessary with the ability to add Xml configuration files + + + + + + + Forces StructureMap to always use a unique instance to + stop the "BuildSession" caching + + + + + + Adds the object to to the PLUGINTYPE + + + + + + + Add an Instance to this type created by a Lambda + + + + + + + Define the Default Instance for this PluginType + + + + + Expression class to help define a runtime Profile + + + + + Starts the definition of the default instance for the containing Profile. This is + still valid, but Type() is recommended + + + + + + + Designate or define the Instance for a type within + this Profile + + + + + + + Use statement to define the Profile defaults for a Generic type + + + + + + + Expression Builder inside of a Profile creation for + open generic types + + + + + Use this concreteType for the Instance of this Profile for the PluginType + + + + + + + Use this concreteType for the Instance of this Profile for the PluginType + + + + + + + Use this Instance for the Profile Instance of this Plugin Type + + + + + + + Use the named Instance as the Profile Instance for this PluginType + + + + + + + Use the named Instance as the Profile Instance for this PluginType + + + + + + + For this type and profile, build the object with this Lambda + + + + + + + Expression Builder within defining a Profile + + + + + + Use a named, preconfigured instance as the default instance for this profile + + + + + + + Use a named, preconfigured instance as the default instance for this profile + + + + + + + Define the default instance of the PluginType for the containing Profile + + + + + + + For this Profile, use an Instance with this Func + + + + + + + For this Profile, use an Instance with this Func + + + + + + + For this Profile, use this object + + + + + + + Access to the uncommon types of Instance + + + + + + For this Profile, use the Concrete Type + + + + + + + For this profile, use this concrete type + + + + + + + A Registry class provides methods and grammars for configuring a Container or ObjectFactory. + Using a Registry subclass is the recommended way of configuring a StructureMap Container. + + + public class MyRegistry : Registry + { + public MyRegistry() + { + ForRequestedType(typeof(IService)).TheDefaultIsConcreteType(typeof(Service)); + } + } + + + + + Adds the concreteType as an Instance of the pluginType + + + + + + + Adds the concreteType as an Instance of the pluginType with a name + + + + + + + + Add the pluggedType as an instance to any configured pluginType where pluggedType + could be assigned to the pluginType + + + + + + Imports the configuration from another registry into this registry. + + + + + + Imports the configuration from another registry into this registry. + + + + + + Expression Builder used to define policies for a PluginType including + Scoping, the Default Instance, and interception. BuildInstancesOf() + and ForRequestedType() are synonyms + + + + + + + Expression Builder used to define policies for a PluginType including + Scoping, the Default Instance, and interception. This method is specifically + meant for registering open generic types + + + + + + This method is a shortcut for specifying the default constructor and + setter arguments for a ConcreteType. ForConcreteType is shorthand for: + ForRequestedType[T]().Use[T].************** + when the PluginType and ConcreteType are the same Type + + + + + + + Expression Builder used to define policies for a PluginType including + Scoping, the Default Instance, and interception. BuildInstancesOf() + and ForRequestedType() are synonyms + + + + + + + Convenience method. Equivalent of ForRequestedType[PluginType]().AsSingletons() + + + + + + + Uses the configuration expressions of this Registry to create a PluginGraph + object that could be used to initialize a Container. This method is + mostly for internal usage, but might be helpful for diagnostics + + + + + + Adds an additional, non-Default Instance to the PluginType T. + + + + + + + Adds an additional, non-Default Instance to the designated pluginType + This method is mostly meant for open generic types + + + + + + + Expression Builder to define the defaults for a named Profile. Each call + to CreateProfile is additive. + + + + + + + An alternative way to use CreateProfile that uses ProfileExpression + as a Nested Closure. This usage will result in cleaner code for + multiple declarations + + + + + + + Registers a new TypeInterceptor object with the Container + + + + + + Allows you to define a TypeInterceptor inline with Lambdas or anonymous delegates + + + + + IfTypeMatches( ... ).InterceptWith( o => new ObjectWrapper(o) ); + + + + + Designates a policy for scanning assemblies to auto + register types + + + + + + Directs StructureMap to always inject dependencies into any and all public Setter properties + of the type PLUGINTYPE. + + + + + + + Creates automatic "policies" for which public setters are considered mandatory + properties by StructureMap that will be "setter injected" as part of the + construction process. + + + + + + Use to programmatically select the constructor function of a concrete + class. Applies globally to all Containers in a single AppDomain. + + + + + + + All requests For the "TO" types will be filled by fetching the "FROM" + type and casting it to "TO" + GetInstance(typeof(TO)) basically becomes (TO)GetInstance(typeof(FROM)) + + + + + + + Syntactic Sugar for saying ForRequestedType().TheDefault.IsThis( @object ) + + + + + + + Syntactic Sugar for saying ForRequestedType().TheDefault.IsThis( instance ) + + + + + + + + Shorthand for ForRequestedType(pluginType) + + + + + + + + Advanced Usage Only! Skips the Registry and goes right to the inner + Semantic Model of StructureMap. Use with care + + + + + + Adds the concreteType as an Instance of the pluginType. Mostly useful + for conventions + + + + + + + Adds the concreteType as an Instance of the pluginType with a name. Mostly + useful for conventions + + + + + + + + Add the pluggedType as an instance to any configured pluginType where pluggedType. + Mostly useful for conventions + + + + + + Imports the configuration from another registry into this registry. + + + + + + Imports the configuration from another registry into this registry. + + + + + + Expression Builder used to define policies for a PluginType including + Scoping, the Default Instance, and interception. BuildInstancesOf() + and ForRequestedType() are synonyms + + + + + + + Expression Builder used to define policies for a PluginType including + Scoping, the Default Instance, and interception. This method is specifically + meant for registering open generic types + + + + + + This method is a shortcut for specifying the default constructor and + setter arguments for a ConcreteType. ForConcreteType is shorthand for: + For[T]().Use[T].************** + when the PluginType and ConcreteType are the same Type + + + + + + + Expression Builder used to define policies for a PluginType including + Scoping, the Default Instance, and interception. BuildInstancesOf() + and ForRequestedType() are synonyms + + + + + + + Convenience method. Equivalent of ForRequestedType[PluginType]().Singletons() + + + + + + + Uses the configuration expressions of this Registry to create a PluginGraph + object that could be used to initialize a Container. This method is + mostly for internal usage, but might be helpful for diagnostics + + + + + + Adds an additional, non-Default Instance to the PluginType T. + + + + + + + Adds an additional, non-Default Instance to the designated pluginType + This method is mostly meant for open generic types + + + + + + + Expression Builder to define the defaults for a named Profile. Each call + to CreateProfile is additive. + + + + + + + An alternative way to use CreateProfile that uses ProfileExpression + as a Nested Closure. This usage will result in cleaner code for + multiple declarations + + + + + + + Registers a new TypeInterceptor object with the Container + + + + + + Allows you to define a TypeInterceptor inline with Lambdas or anonymous delegates + + + + + IfTypeMatches( ... ).InterceptWith( o => new ObjectWrapper(o) ); + + + + + Designates a policy for scanning assemblies to auto + register types + + + + + + Directs StructureMap to always inject dependencies into any and all public Setter properties + of the type PLUGINTYPE. + + + + + + + Creates automatic "policies" for which public setters are considered mandatory + properties by StructureMap that will be "setter injected" as part of the + construction process. + + + + + + Use to programmatically select the constructor function of a concrete + class. Applies globally to all Containers in a single AppDomain. + + + + + + + All requests For the "TO" types will be filled by fetching the "FROM" + type and casting it to "TO" + GetInstance(typeof(TO)) basically becomes (TO)GetInstance(typeof(FROM)) + + + + + + + Syntactic Sugar for saying ForRequestedType().TheDefault.IsThis( @object ) + + + + + + + Syntactic Sugar for saying ForRequestedType().TheDefault.IsThis( instance ) + + + + + + + Expression Builder used to define policies for a PluginType including + Scoping, the Default Instance, and interception. BuildInstancesOf() + and ForRequestedType() are synonyms + + + + + + + Expression Builder used to define policies for a PluginType including + Scoping, the Default Instance, and interception. This method is specifically + meant for registering open generic types + + + + + + + Advanced Usage Only! Skips the Registry and goes right to the inner + Semantic Model of StructureMap. Use with care + + + + + + Define the constructor and setter arguments for the default T + + + + + + Thrown by IProperty classes when an invalid value is applied to + a property of an InstanceGraph + + + + + Main exception for StructureMap. Use the ErrorCode to aid in troubleshooting + StructureMap problems + + + + + Represents a concrete class that can be built by StructureMap as an instance of the parent + PluginFamily’s PluginType. The properties of a Plugin are the CLR Type of the concrete class, + and the human-friendly concrete key that StructureMap will use to identify the Type. + + + + + The ConcreteKey that identifies the Plugin within a PluginFamily + + + + + The concrete CLR Type represented by the Plugin + + + + + Property's that will be filled by setter injection + + + + + Conceptually speaking, a PluginFamily object represents a point of abstraction or variability in + the system. A PluginFamily defines a CLR Type that StructureMap can build, and all of the possible + Plugin’s implementing the CLR Type. + + + + + The CLR Type that defines the "Plugin" interface for the PluginFamily + + + + + The InstanceKey of the default instance of the PluginFamily + + + + + Custom collection class for PluginFamily's + + + + + Adds the concreteType as an Instance of the pluginType + + + + + + + Adds the concreteType as an Instance of the pluginType with a name + + + + + + + + Add the pluggedType as an instance to any configured pluginType where pluggedType + could be assigned to the pluginType + + + + + + Models the runtime configuration of a StructureMap Container + + + + + Closes the PluginGraph for adding or removing members. Runs all the AssemblyScanner's + and attempts to attach concrete types to the proper plugin types. Calculates the Profile defaults. + + + + + Adds the concreteType as an Instance of the pluginType + + + + + + + Adds the concreteType as an Instance of the pluginType with a name + + + + + + + + Add the pluggedType as an instance to any configured pluginType where pluggedType + could be assigned to the pluginType + + + + + + Adds an AssemblyScanner to the PluginGraph. Used for Testing. + + + + + + Add configuration to a PluginGraph with the Registry DSL + + + + + + Designates whether a PluginGraph has been "Sealed." + + + + + Represents a PropertyInfo of a Plugin.PluggedType that is filled by Setter Injection + + + + + Custom collection class for SetterProperty objects + + + + + Designates a CLR type that is loaded by name. + + + + + Interface for a "Factory" pattern class that creates object instances of the PluginType + + + + + The main "container" object that implements the Service Locator pattern + + + + + Creates or finds the named instance of the pluginType + + + + + + + + Creates or finds the default instance of the pluginType + + + + + + + Creates a new instance of the requested type using the supplied Instance. Mostly used internally + + + + + + + + Creates or finds the named instance of T + + + + + + + + Creates or finds the default instance of type T + + + + + + + Creates a new instance of the requested type T using the supplied Instance. Mostly used internally + + + + + + + Creates or resolves all registered instances of type T + + + + + + + Creates or resolves all registered instances of the pluginType + + + + + + + Creates or finds the named instance of the pluginType. Returns null if the named instance is not known to the container. + + + + + + + + Creates or finds the default instance of the pluginType. Returns null if the pluginType is not known to the container. + + + + + + + Creates or finds the default instance of type T. Returns the default value of T if it is not known to the container. + + + + + + + Creates or finds the named instance of type T. Returns the default value of T if the named instance is not known to the container. + + + + + + + Used to add additional configuration to a Container *after* the initialization. + + + + + + Injects the given object into a Container as the default for the designated + PLUGINTYPE. Mostly used for temporarily setting up return values of the Container + to introduce mocks or stubs during automated testing scenarios + + + + + + + Injects the given object into a Container as the default for the designated + pluginType. Mostly used for temporarily setting up return values of the Container + to introduce mocks or stubs during automated testing scenarios + + + + + + + Sets the default instance for all PluginType's to the designated Profile. + + + + + + Returns a report detailing the complete configuration of all PluginTypes and Instances + + + + + + Use with caution! Does a full environment test of the configuration of this container. Will try to create every configured + instance and afterward calls any methods marked with the [ValidationMethod] attribute + + + + + Gets all configured instances of type T using explicitly configured arguments from the "args" + + + + + + + + Gets the default instance of type T using the explicitly configured arguments from the "args" + + + + + + + + Starts a request for an instance or instances with explicitly configured arguments. Specifies that any dependency + of type T should be "arg" + + + + + + + + Starts a request for an instance or instances with explicitly configured arguments. Specifies that any dependency or primitive argument + with the designated name should be the next value. + + + + + + + Gets the default instance of the pluginType using the explicitly configured arguments from the "args" + + + + + + + + Removes all configured instances of type T from the Container. Use with caution! + + + + + + The "BuildUp" method takes in an already constructed object + and uses Setter Injection to push in configured dependencies + of that object + + + + + + Convenience method to request an object using an Open Generic + Type and its parameter Types + + + + + IFlattener flattener1 = container.ForGenericType(typeof (IFlattener<>)) + .WithParameters(typeof (Address)).GetInstanceAs<IFlattener>(); + + + + + Gets the named instance of the pluginType using the explicitly configured arguments from the "args" + + + + + + + + + Starts a request for an instance or instances with explicitly configured arguments. Specifies that any dependency + of type T should be "arg" + + + + + + + + + Starts a "Nested" Container for atomic, isolated access + + + + + + Starts a new "Nested" Container for atomic, isolated service location. Opens + + + + + + + Provides queryable access to the configured PluginType's and Instances of this Container + + + + + Default implementation of IInstanceFactory + + + + + Constructor to use when troubleshooting possible configuration issues. + + + + + + Constructor to create an Container + + PluginGraph containing the instance and type definitions + for the Container + + + + Creates or finds the named instance of T + + + + + + + + Creates a new instance of the requested type T using the supplied Instance. Mostly used internally + + + + + + + Gets the default instance of the pluginType using the explicitly configured arguments from the "args" + + + + + + + Gets the default instance of the pluginType using the explicitly configured arguments from the "args" + + + + + + + + Gets all configured instances of type T using explicitly configured arguments from the "args" + + + + + + + + Creates or finds the default instance of type T + + + + + + + Creates or resolves all registered instances of type T + + + + + + + Sets the default instance for all PluginType's to the designated Profile. + + + + + + Creates or finds the named instance of the pluginType + + + + + + + + Creates or finds the named instance of the pluginType. Returns null if the named instance is not known to the container. + + + + + + + + Creates or finds the default instance of the pluginType. Returns null if the pluginType is not known to the container. + + + + + + + Creates or finds the default instance of type T. Returns the default value of T if it is not known to the container. + + + + + + + The "BuildUp" method takes in an already constructed object + and uses Setter Injection to push in configured dependencies + of that object + + + + + + Creates or finds the named instance of type T. Returns the default value of T if the named instance is not known to the container. + + + + + + + Creates or finds the default instance of the pluginType + + + + + + + Creates a new instance of the requested type using the supplied Instance. Mostly used internally + + + + + + + + Creates or resolves all registered instances of the pluginType + + + + + + + Used to add additional configuration to a Container *after* the initialization. + + + + + + Returns a report detailing the complete configuration of all PluginTypes and Instances + + + + + + Starts a request for an instance or instances with explicitly configured arguments. Specifies that any dependency + of type T should be "arg" + + + + + + + + Starts a request for an instance or instances with explicitly configured arguments. Specifies that any dependency + of type T should be "arg" + + + + + + + + Starts a request for an instance or instances with explicitly configured arguments. Specifies that any dependency or primitive argument + with the designated name should be the next value. + + + + + + + Use with caution! Does a full environment test of the configuration of this container. Will try to create every configured + instance and afterward calls any methods marked with the [ValidationMethod] attribute + + + + + Removes all configured instances of type T from the Container. Use with caution! + + + + + + Convenience method to request an object using an Open Generic + Type and its parameter Types + + + + + IFlattener flattener1 = container.ForGenericType(typeof (IFlattener<>)) + .WithParameters(typeof (Address)).GetInstanceAs<IFlattener>(); + + + + + + Starts a "Nested" Container for atomic, isolated access + + + + + + Starts a new "Nested" Container for atomic, isolated service location. Opens + + + + + + + Injects the given object into a Container as the default for the designated + PLUGINTYPE. Mostly used for temporarily setting up return values of the Container + to introduce mocks or stubs during automated testing scenarios + + + + + + + Injects the given object into a Container as the default for the designated + pluginType. Mostly used for temporarily setting up return values of the Container + to introduce mocks or stubs during automated testing scenarios + + + + + + + Sets the default instance for the PluginType + + + + + + + Provides queryable access to the configured PluginType's and Instances of this Container + + + + + GoF Memento representing an Object Instance + + + + + Retrieves the named property value as a string + + + + + + + Template method for implementation specific retrieval of the named property + + + + + + + Returns the named child InstanceMemento + + + + + + + Template method for implementation specific retrieval of the named property + + + + + + + This method is made public for testing. It is not necessary for normal usage. + + + + + + Used to create a templated InstanceMemento + + + + + + + The named type of the object instance represented by the InstanceMemento. Translates to a concrete + type + + + + + The named key of the object instance represented by the InstanceMemento + + + + + Gets the referred template name + + + + + + Template pattern property specifying whether the InstanceMemento is simply a reference + to another named instance. Useful for child objects. + + + + + Template pattern property specifying the instance key that the InstanceMemento refers to + + + + + Is the InstanceMemento a reference to the default instance of the plugin type? + + + + + A TypeInterceptor that always applies to all Instances of a given Plugin Type + + + + + Abstract class that is the supertype of all storage and retrieval mechanisms of + InstanceMemento instances + + + + + Retrieves the named InstanceMemento + + The instanceKey of the requested InstanceMemento + + + + + Retrieves an array of all InstanceMemento's stored by this MementoSource + + + + + + Template pattern method. Determines if the MementoSource contains a definition for the + requested instanceKey. + + + + + + + Template pattern method. Retrieves an InstanceMemento for the instanceKey + + + + + + + The type of MementoSource + + + + + String description of the MementoSource. Used in the StructureMap-Client UI. + + + + + An in-memory implementation of InstanceMemento. + + + + + Creates an instance of MemoryInstanceMemento that represents a reference to another + instance. + + The referenced instance key to another instance + + + + + Creates a MemoryInstanceMemento that represents a reference to the default instance + of a plugin type. + + + + + + Constructs a MemoryInstanceMemento without properties + + The concrete key of the plugin type + The identifying instance key + + + + Constructs a MemoryInstanceMemento with properties + + The concrete key of the plugin type + The identifying instance key + NameValueCollection of instance properties + + + + Sets the value of the named property + + + + + + + Deletes a named property from the DefaultInstanceMemento + + + + + + Links a child InstanceMemento as a named property + + + + + + + Links an array of InstanceMemento's to a named array property + + + + + + + See InstanceMemento + + + + + See InstanceMemento + + + + + See InstanceMemento + + + + + See InstanceMemento + + + + + See InstanceMemento + + + + + The main static Facade for the StructureMap container + + + + + Restarts ObjectFactory and blows away all Singleton's and cached instances. Use with caution. + + + + + Remove and dispose all objects scoped by HttpContext. Call this method at the *end* of an Http request to clean up resources + + + + + Injects the given object into a Container as the default for the designated + pluginType. Mostly used for temporarily setting up return values of the Container + to introduce mocks or stubs during automated testing scenarios + + + + + + + Injects the given object into a Container as the default for the designated + PLUGINTYPE. Mostly used for temporarily setting up return values of the Container + to introduce mocks or stubs during automated testing scenarios + + + + + + + Returns a report detailing the complete configuration of all PluginTypes and Instances + + + + + + Use with caution! Does a full environment test of the configuration of this container. Will try to create every configured + instance and afterward calls any methods marked with the [ValidationMethod] attribute + + + + + Creates or finds the default instance of the pluginType + + + + + + + Creates or finds the default instance of type T + + + + + + + Creates a new instance of the requested type using the supplied Instance. Mostly used internally + + + + + + + + Creates a new instance of the requested type T using the supplied Instance. Mostly used internally + + + + + + + Creates or finds the named instance of the pluginType + + + + + + + + Creates or finds the named instance of T + + + + + + + + Creates or resolves all registered instances of the pluginType + + + + + + + Creates or resolves all registered instances of type T + + + + + + + Starts a request for an instance or instances with explicitly configured arguments. Specifies that any dependency + of type T should be "arg" + + + + + + + + Starts a request for an instance or instances with explicitly configured arguments. Specifies that any dependency or primitive argument + with the designated name should be the next value. + + + + + + + Starts a request for an instance or instances with explicitly configured arguments. Specifies that any dependency + of type T should be "arg" + + + + + + + + Removes all configured instances of type T from the Container. Use with caution! + + + + + + Creates or finds the named instance of the pluginType. Returns null if the named instance is not known to the container. + + + + + + + + Creates or finds the default instance of the pluginType. Returns null if the pluginType is not known to the container. + + + + + + + Creates or finds the default instance of type T. Returns the default value of T if it is not known to the container. + + + + + + + Creates or finds the named instance of type T. Returns the default value of T if the named instance is not known to the container. + + + + + + + + The "BuildUp" method takes in an already constructed object + and uses Setter Injection to push in configured dependencies + of that object + + + + + + Convenience method to request an object using an Open Generic + Type and its parameter Types + + + + + IFlattener flattener1 = container.ForGenericType(typeof (IFlattener<>)) + .WithParameters(typeof (Address)).GetInstanceAs<IFlattener>(); + + + + + + Used to add additional configuration to a Container *after* the initialization. + + + + + + Provides queryable access to the configured PluginType's and Instances of the inner Container + + + + + Sets the default instance for all PluginType's to the designated Profile. + + + + + Reads configuration XML documents and builds the structures necessary to initialize + the Container/IInstanceFactory/InstanceBuilder/ObjectInstanceActivator objects + + + + + Reads the configuration information and returns the PluginGraph definition of + plugin families and plugin's + + + + + + Generic implementation of an XmlMementoSource + + + + + Base class for all MementoSource classes that store InstanceMemento's as + node-normalized Xml + + + + + Implementation of MementoSource that stores and retrieves an XmlInstanceMemento per file in a named directory. + DirectoryXmlMementoSource is meant to simplify complicated object graph configurations by isolating each instance to a separate + editable file. + + + + + Stores an Xml InstanceMemento per file in a directory + + A ";" delimited list of directories to look for mementos. DirectoryXmlMementoSource + will use the FIRST directory it finds + The file extension of the InstanceMemento files without a dot. Typically "xml" + NodeNormalized or AttributeNormalized + + + + Implementation of MementoSource that stores and retrieves an XmlInstanceMemento per Embedded Resource file + in a named namespace. EmbeddedFolderXmlMementoSource is meant to simplify complicated object graph configurations + by isolating each instance to a separate + editable file. + + NodeNormalized or AttributeNormalized + The name of the Assembly with the embedded resources + The root namespace of all of the mementos. + The file extension of the memento files - "xml" + + + + An in-memory MementoSource + + + + + Retrieves Xml InstanceMemento's from an xml file stored as an embedded resource in an assembly. + + Designates the nodes that are memento nodes + NodeNormalized or AttributeNormalized + The name of the Assembly the file is embedded into + The path to the embedded resource within the file + + + + Default Constructor + + MementoSource that contains the Memento Templates + MementoSource that contains instances consisting of Template valuee + + + + Stores Attribute-normalized InstanceMemento's in an external file + + + + + Implementation of XmlMementoSource that reads InstanceMemento's from an external file. + Useful to break the StructureMap.config file into smaller pieces. + + + + + Default constructor + + Path to the xml file that contains the instance configuration + XPath expression to the parent node that contains the InstanceMemento nodes. + If empty, it defaults to the top node + The name of the nodes that are InstanceMemento nodes. Useful to store + different types of instances in the same file + + + + An implementation of InstanceMemento that stores properties as Xml attributes + Limited functionality + + + + + Implementation of InstanceMemento that stores information in a node-normalized + Xml format. + + + + + specify what type you'd like the service returned as + + + + + + + Specify the open generic type that should have a single generic parameter + + + + + + + Used as the argument in the Container.Configure() method to describe + configuration directives and specify the sources of configuration for + a Container + + + + + Creates and adds a Registry object of type T. + + The Registry Type + + + + Imports all the configuration from a Registry object + + + + + + Imports configuration from an Xml file. The fileName + must point to an Xml file with valid StructureMap + configuration + + + + + + Imports configuration directly from an XmlNode. This + method was intended for scenarios like Xml being embedded + into an assembly. The node must be a 'StructureMap' node + + + + + + If true, directs StructureMap to look for configuration in the App.config. + The default value is false. + + + + + Expression Builder to define an Instance + + + + + + Register a previously built Instance. This provides a "catch all" + method to attach custom Instance objects. Synonym for Instance() + + + + + + Inject this object directly. Synonym to Object() + + + + + + + Gives you full access to all the different ways to specify an "Instance" + + + + + An Expression Builder to define Instances of a PluginType. + This is mostly used for configuring open generic types + + + + + Shortcut to register a Concrete Type as an instance. This method supports + method chaining to allow you to add constructor and setter arguments for + the concrete type + + + + + + + Shortcut to simply use the Instance with the given name + + + + + + + An Expression Builder that is used throughout the Registry DSL to + add and define Instances + + + + + + Register a previously built Instance. This provides a "catch all" + method to attach custom Instance objects. Synonym for IsThis() + + + + + + Inject this object directly. Synonym to IsThis() + + + + + + + Build the Instance with the constructor function and setter arguments. Starts + the definition of a SmartInstance + + + + + + + Build the Instance with the constructor function and setter arguments. Starts + the definition of a SmartInstance + + + + + + + Build the Instance with the constructor function and setter arguments. Use this + method for open generic types, and favor the generic version of OfConcreteType + for all other types + + + + + + + Build the Instance with the constructor function and setter arguments. Use this + method for open generic types, and favor the generic version of OfConcreteType + for all other types + + + + + + + Create an Instance that builds an object by calling a Lambda or + an anonymous delegate with no arguments + + + + + + + Create an Instance that builds an object by calling a Lambda or + an anonymous delegate with the IContext representing + the current object graph. + + + + + + + Use the Instance of this PluginType with the specified name. This is + generally only used while configuring child dependencies within a deep + object graph + + + + + + + Use the default Instance of this PluginType. This is + generally only used while configuring child dependencies within a deep + object graph + + + + + + Creates an Instance that stores this object of type T, + and returns a cloned copy of the template. + + + + + + + Caches template as a serialized byte stream. Uses deserialization + to create copies when the Instance is built. + + + + + + + Creates an Instance that will load an ASCX user control from the url + + + + + + + Creates an Instance according to conditional rules + + + + + + + Used as an expression builder to specify setter injection policies + + + + + Directs StructureMap to treat all public setters of type T as + mandatory properties + + + + + + Directs StructureMap to tread all public setters with + a PropertyType that matches the predicate as a + mandatory setter + + + + + + Directs StructureMap to treat all public setters that match the + rule as mandatory properties + + + + + + Directs StructureMap to treat all public setters with a property + type in the specified namespace as mandatory properties + + + + + + Directs StructureMap to treat all public setters with a property + type in the specified namespace as mandatory properties + + + + + + Directs StructureMap to treat all public setters where to property name + matches the specified rule as a mandatory property + + + + + + Base class for creating an object instance from an InstanceMemento. SubClasses are + emitted for each concrete Plugin with constructor parameters. + + + + + Allows built-in registration conventions to be configurable through the assembly scanning DSL + + + Intended for StructureMap internal use only. + Custom registration convention instances can be directly configured + before being passed to IAssemblyScanner.With(IRegistrationConvention). + + + + + Simply query to see if there are any implementations registered + + + + + + Ejects any instances of this instance from the current container + and permanently removes the instance from the container configuration + + + + + + Eject all instances of this PluginType from the current container, + but leaves the lifecycle behavior + + + + + The "instance" that will be used when Container.GetInstance(PluginType) is called. + See InstanceRef for more information + + + + + The build "policy" for this PluginType. Used by the WhatDoIHave() diagnostics methods + + + + + All of the InstanceRef's registered + for this PluginType + + + + + Simply query to see if there are any implementations registered + + + + + + The "instance" that will be used when Container.GetInstance(PluginType) is called. + See InstanceRef for more information + + + + + The build "policy" for this PluginType. Used by the WhatDoIHave() diagnostics methods + + + + + All of the InstanceRef's registered + for this PluginType + + + + + Simply query to see if there are any implementations registered + + + + + + The "instance" that will be used when Container.GetInstance(PluginType) is called. + See InstanceRef for more information + + + + + The build "policy" for this PluginType. Used by the WhatDoIHave() diagnostics methods + + + + + All of the InstanceRef's registered + for this PluginType + + + + + Models the state of a Container or ObjectFactory. Can be used to query for the + existence of types registered with StructureMap + + + + + Can StructureMap fulfill a request to ObjectFactory.GetInstance(pluginType) from the + current configuration. This does not include concrete classes that could be auto-configured + upon demand + + + + + + + Can StructureMap fulfill a request to ObjectFactory.GetInstance<T>() from the + current configuration. This does not include concrete classes that could be auto-configured + upon demand + + + + + + + Queryable access to all of the InstanceRef for a given PluginType + + + + + + + Queryable access to all of the InstanceRef for a given PluginType + + + + + + Does the current container have existing configuration for the "pluginType" + + + + + + + Does the current container have existing configuration for the type T + + + + + + Find the concrete type for the default Instance of T. + In other words, when I call Container.GetInstance(Type), + what do I get? May be indeterminate + + + + + + + Find the concrete type for the default Instance of pluginType. + In other words, when I call Container.GetInstance(Type), + what do I get? May be indeterminate + + + + + + Retrieves the configuration for the given type + + + + + + + Retrieves the configuration for the given type + + + + + + + Eject all objects, configuration, and Plugin Types matching this filter + + + + + + Eject all objects and configuration for any Plugin Type that matches this filter + + + + + + Eject all objects and Instance configuration for this PluginType + + + + + + Get each and every configured instance that could possibly + be cast to T + + + + + + + Access to all the Plugin Type registrations + + + + + Makes sure that every request for this object returns a unique object + + + + + Simply query to see if there are any implementations registered + + + + + + The "instance" that will be used when Container.GetInstance(PluginType) is called. + See InstanceRef for more information + + + + + The build "policy" for this PluginType. Used by the WhatDoIHave() diagnostics methods + + + + + All of the InstanceRef's registered + for this PluginType + + + + + The actual concrete type of this Instance. Not every type of IInstance + can determine the ConcreteType + + + + + Ejects and removes all objects and the configuration for the named instance from the + container + + + + + + + Ejects and removes all objects and configuration for the instances that match the filter + + + + + + + Determines if the pluggedType can be upcast to the pluginType + + + + + + + + Determines if the PluggedType is a valid Plugin into the + PluginType + + + + + + + + Imports configuration from an Xml file. The fileName + must point to an Xml file with valid StructureMap + configuration + + + + + + Imports configuration directly from an XmlNode. This + method was intended for scenarios like Xml being embedded + into an assembly. The node must be a 'StructureMap' node + + + + + + Creates and adds a Registry object of type T. + + The Registry Type + + + + Imports all the configuration from a Registry object + + + + + + If true, makes the existence of the StructureMap.config mandatory. + The default is false. + + + + + If true, the StructureMap.config file will be ignored even if it exists. + The default is false. + + + + + If true, directs StructureMap to look for configuration in the App.config. + The default value is false. + + + + + Designate the Default Profile. This will be applied as soon as the + Container is initialized. + + + + + Retrieves the configuration for the given type + + + + + + + Retrieves the configuration for the given type + + + + + + + Eject all objects, configuration, and Plugin Types matching this filter + + + + + + Eject all objects and configuration for any Plugin Type that matches this filter + + + + + + Eject all objects and Instance configuration for this PluginType + + + + + + Get each and every configured instance that could possibly + be cast to T + + + + + + + The requested PluginType of the Instance being create + + + + + The Name of the Instance being created + + + + + The actual ConcreteType being created. This will not always + be available + + + + + Models the current place in an object graph during the construction of + an instance. Provides contextual information that can be used + to alter the desired construction of child objects + + + + + The requested PluginType of the Instance being create + + + + + The Name of the Instance being created + + + + + The actual ConcreteType being created. This will not always + be available + + + + + Provides metadata about the object graph being constructed. More or less a stack trace of the GetInstance() pipeline + that can be used for "contextual" object construction + + + + + The top level of the object graph. Describes the original requested instance + + + + + The current BuildFrame + + + + + The immediate parent BuildFrame + + + + + Defines the value of a primitive argument to a constructur argument + + + + + Sets the value of the constructor argument + + + + + + + Sets the value of the constructor argument to the key/value in the + AppSettings + + The key in appSettings for the value to use. + + + + + Sets the value of the constructor argument to the key/value in the + AppSettings when it exists. Otherwise uses the provided default value. + + The key in appSettings for the value to use. + The value to use if an entry for does not exist in the appSettings section. + + + + + Instance that builds objects with by calling constructor functions and using setter properties + + The concrete type constructed by SmartInstance + + + + Sets the name of this Instance + + + + + + + Sets the name of this Instance + + + + + + + Register an Action to perform on the object created by this Instance + before it is returned to the caller + + + + + + + Register an Action to perform on the object created by this Instance + before it is returned to the caller + + + + + + + Register a Func to potentially enrich or substitute for the object + created by this Instance before it is returned to the caller + + + + + + + Register a Func to potentially enrich or substitute for the object + created by this Instance before it is returned to the caller + + + + + + + Register a Func to potentially enrich or substitute for the object + created by this Instance before it is returned to the caller + + + + + + + Register a Func to potentially enrich or substitute for the object + created by this Instance before it is returned to the caller + + + + + + + Register an InstanceInterceptor with this Instance + + + + + + + Define a primitive constructor argument + + + + + + + Set simple setter properties + + + + + + + Define a primitive setter property by specifying the property name with + an expression + + + + + + + Define a primitive setter property by specifying the property name + + + + + + + Inline definition of a constructor dependency. Select the constructor argument by type. Do not + use this method if there is more than one constructor arguments of the same type + + + + + + + Inline definition of a constructor dependency. Select the constructor argument by type. Do not + use this method if there is more than one constructor arguments of the same type + + + + + + + Inline definition of a constructor dependency. Select the constructor argument by type and constructor name. + Use this method if there is more than one constructor arguments of the same type + + + + + + + + Inline definition of a constructor dependency. Select the constructor argument by type and constructor name. + Use this method if there is more than one constructor arguments of the same type + + + + + + + + Inline definition of a setter dependency. The property name is specified with an Expression + + + + + + + + Inline definition of a setter dependency. The property name is specified with an Expression + + + + + + + + Inline definition of a setter dependency. Only use this method if there + is only a single property of the SETTERTYPE + + + + + + + Inline definition of a setter dependency. Only use this method if there + is only a single property of the SETTERTYPE + + + + + + + Inline definition of a dependency on an Array of the CHILD type. I.e. CHILD[]. + This method can be used for either constructor arguments or setter properties + + + + + + + Inline definition of a dependency on an Array of the CHILD type and the specified setter property or constructor argument name. I.e. CHILD[]. + This method can be used for either constructor arguments or setter properties + + + + + + + + Inline definition of a dependency on an Array of the CHILD type. I.e. CHILD[]. + This method can be used for either constructor arguments or setter properties + + + + + + + Inline definition of a dependency on an Array of the CHILD type and the specified setter property or constructor argument name. I.e. CHILD[]. + This method can be used for either constructor arguments or setter properties + + + + + + + + Expression Builder to help define multiple Instances for an Array dependency + + + + + + Nested Closure that allows you to add an unlimited number of child Instances + + + + + + + Specify an array of Instance objects directly for an Array dependency + + + + + + + Expression Builder that helps to define child dependencies inline + + + + + + Sets the value of the constructor argument to the key/value in the + AppSettings + + The key in appSettings for the value to use. + + + + + Sets the value of the constructor argument to the key/value in the + AppSettings when it exists. Otherwise uses the provided default value. + + The key in appSettings for the value to use. + The value to use if an entry for does not exist in the appSettings section. + + + + + Nested Closure to define a child dependency inline + + + + + + + Shortcut to set an inline dependency to an Instance + + + + + + + Shortcut to set an inline dependency to a designated object + + + + + + + Shortcut to set an inline dependency to a designated object + + + + + + + Set an Inline dependency to the Default Instance of the Property type + Used mostly to force an optional Setter property to be filled by + StructureMap + + + + + + Shortcut method to define a child dependency inline + + + + + + + Shortcut method to define a child dependency inline and configure + the child dependency + + + + + + + Provides virtual methods that can be used by subclasses to parse an expression tree. + + + This class actually already exists in the System.Core assembly...as an internal class. + I can only speculate as to why it is internal, but it is obviously much too dangerous + for anyone outside of Microsoft to be using... + + + + diff --git a/nant.build b/nant.build index f816fdda1d0..c4eeadd5d9b 100644 --- a/nant.build +++ b/nant.build @@ -1,615 +1,615 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This will detect whether the current Operating System is running as a 32-bit or 64-bit Operating System regardless of whether this is a 32-bit or 64-bit process. - - - - - - - - - - - - - Detects whether we are currently in a WoW64 process or not. - - - - - - - - - Detects whether we are currently in a 32-bit or 64-bit process (not necessarily what the OS is running). Note that as of the time of this writing, this will ALWAYS return false because NAnt is compiled to run in 32-bit mode only. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This will detect whether the current Operating System is running as a 32-bit or 64-bit Operating System regardless of whether this is a 32-bit or 64-bit process. + + + + + + + + + + + + + Detects whether we are currently in a WoW64 process or not. + + + + + + + + + Detects whether we are currently in a 32-bit or 64-bit process (not necessarily what the OS is running). Note that as of the time of this writing, this will ALWAYS return false because NAnt is compiled to run in 32-bit mode only. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + " + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/readme.txt b/readme.txt index 63068053169..de958ffa1a4 100644 --- a/readme.txt +++ b/readme.txt @@ -1,199 +1,199 @@ -NServiceBus is a non-trivial framework that takes time to understand. - -The best way to get up and running is from the Samples. Run them, change them a bit, look at what references what. If you want to do your own thing, copy one of the samples (like FullDuplex), and change from there. - - -============ -= Building = -============ - -In order to build the source, run the build.bat file. - -You'll find the built assemblies in /build/output. - -The satellite processes (distributor, timeout manager, and tools) will be in the adjacent directories. - -If you see CS1668 warning when building under 2008, go to the 'C:\Program Files\Microsoft SDKs\Windows\v6.0A' directory and create the 'lib' subdirectory. - -If you see the build failing, check that you haven't put nServiceBus in a deep subdirectory since long path names (greater than 248 characters) aren't supported by MSBuild. - -If you want to build NServiceBus without any merged external dependencies please use the UnsupporterCoreOnlyBuild.bat - -=========== -= Running = -=========== - -To run NServiceBus Msmq and MSDTC need to be installed and configured on your machine. To do this please -run RunMeFirst.bat. - -Running an nServiceBus process is simple. Any external dependencies that are needed like MSMQ, MSDTC, databases will be set up automatically at startup if they aren't found. - - -========= -= Sagas = -========= - -The 'Manufacturing' sample shows the use of sagas. - - - -============ -= Licenses = -============ - -NHibernate is licensed under the LGPL v2.1 license as described here: - -http://www.hibernate.org/license.html - -NHibernate binaries are merged into NServiceBus allowed under the LGPL license terms found here: - -http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt - -****************************** - - -LinFu is licensed under the LGPL v3 license as described here: - -http://code.google.com/p/linfu/ - -LinFu binaries are merged into NServiceBus allowed under the LGPL license terms found here: - -http://www.gnu.org/licenses/lgpl-3.0.txt - -****************************** - - -Iesi.Collections binaries are merged into NServiceBus allowed under the license terms found here: - -Copyright 2002-2004 by Aidant Systems, Inc., and by Jason Smith. - -Copied from http://www.codeproject.com/csharp/sets.asp#xx703510xx that was posted by JasonSmith 12:13 2 Jan '04 - -Feel free to use this code any way you want to. As a favor to me, you can leave the copyright in there. You never know when someone might recognize your name! - -If you do use the code in a commercial product, I would appreciate hearing about it. This message serves as legal notice that I won't be suing you for royalties! The code is in the public domain. - -On the other hand, I don't provide support. The code is actually simple enough that it shouldn't need it. - -****************************** - - -Fluent NHibernate is licensed under the BSD license as described here: - -http://github.com/jagregory/fluent-nhibernate/raw/master/LICENSE.txt - -Fluent NHibernate binaries are merged into NServiceBus allowed under the terms of the license. - -****************************** - - -Autofac is licensed under the MIT license as described here: - -http://code.google.com/p/autofac/ - -Autofac binaries are linked into the NServiceBus distribution allowed under the license terms found here: - -http://www.opensource.org/licenses/mit-license.php - -****************************** - -Spring.NET is licensed under the Apache license version 2.0 as described here: - -http://www.springframework.net/license.html - -Spring.NET binaries are merged into NServiceBus allowed under the license terms found here: - -http://www.apache.org/licenses/LICENSE-2.0.txt - -****************************** - - -Antlr is licensed under the BSD license as described here: - -http://antlr.org/license.html - -Antlr binaries are merged into NServiceBus allowed under the license terms described above. - -****************************** - - -Common.Logging is licensed under the Apache License, Version 2.0 as described here: - -http://netcommon.sourceforge.net/license.html - -Common.Logging binaries are merged into NServiceBus allowed under the LGPL license terms found here: - -http://www.apache.org/licenses/LICENSE-2.0.txt - -****************************** - - -StructureMap is licensed under the Apache License, Version 2.0 as described here: - -http://structuremap.github.com/structuremap/index.html - -StructureMap baries are linked into the NServiceBus distribution allowed under the license terms found here: - -http://www.apache.org/licenses/LICENSE-2.0.txt - -****************************** - - -Castle is licensed under the Apache License, Version 2.0 as described here: - -http://www.castleproject.org/ - -Castle binaries are linked into the NServiceBus distribution allowed under the license terms found here: - -http://www.apache.org/licenses/LICENSE-2.0.txt - -****************************** - - -Unity is licensed under the MSPL license as described here: - -http://unity.codeplex.com/license - -Unity binaries are linked into the NServiceBus distribution allowed under the license terms described above. - -****************************** - - -Log4Net is licensed under the Apache License, Version 2.0 as described here: - -http://logging.apache.org/log4net/license.html - -Log4Net binaries are linked into the NServiceBus distribution allowed under the license terms described above. - -****************************** - - -TopShelf is licensed under the Apache License, Version 2.0 as described here: - -http://code.google.com/p/topshelf/ - -TopShelf binaries are merged into NServiceBus as allowed under the license terms described here: - -http://www.apache.org/licenses/LICENSE-2.0.txt - -****************************** - - -SQLite is in the public domain as described here: - -http://www.sqlite.org/copyright.html - -SQLite binaries are linked into the NServiceBus distribution allowed under the license terms described above. - -****************************** - - -Rhino Mocks is licensed under the BSD License as described here: - -http://www.ayende.com/projects/rhino-mocks.aspx - -Rhino Mocks binaries are merged into NServiceBus allowed under the license terms described here: - -http://www.opensource.org/licenses/bsd-license.php - - +NServiceBus is a non-trivial framework that takes time to understand. + +The best way to get up and running is from the Samples. Run them, change them a bit, look at what references what. If you want to do your own thing, copy one of the samples (like FullDuplex), and change from there. + + +============ += Building = +============ + +In order to build the source, run the build.bat file. + +You'll find the built assemblies in /build/output. + +The satellite processes (distributor, timeout manager, and tools) will be in the adjacent directories. + +If you see CS1668 warning when building under 2008, go to the 'C:\Program Files\Microsoft SDKs\Windows\v6.0A' directory and create the 'lib' subdirectory. + +If you see the build failing, check that you haven't put nServiceBus in a deep subdirectory since long path names (greater than 248 characters) aren't supported by MSBuild. + +If you want to build NServiceBus without any merged external dependencies please use the UnsupporterCoreOnlyBuild.bat + +=========== += Running = +=========== + +To run NServiceBus Msmq and MSDTC need to be installed and configured on your machine. To do this please +run RunMeFirst.bat. + +Running an nServiceBus process is simple. Any external dependencies that are needed like MSMQ, MSDTC, databases will be set up automatically at startup if they aren't found. + + +========= += Sagas = +========= + +The 'Manufacturing' sample shows the use of sagas. + + + +============ += Licenses = +============ + +NHibernate is licensed under the LGPL v2.1 license as described here: + +http://www.hibernate.org/license.html + +NHibernate binaries are merged into NServiceBus allowed under the LGPL license terms found here: + +http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt + +****************************** + + +LinFu is licensed under the LGPL v3 license as described here: + +http://code.google.com/p/linfu/ + +LinFu binaries are merged into NServiceBus allowed under the LGPL license terms found here: + +http://www.gnu.org/licenses/lgpl-3.0.txt + +****************************** + + +Iesi.Collections binaries are merged into NServiceBus allowed under the license terms found here: + +Copyright 2002-2004 by Aidant Systems, Inc., and by Jason Smith. + +Copied from http://www.codeproject.com/csharp/sets.asp#xx703510xx that was posted by JasonSmith 12:13 2 Jan '04 + +Feel free to use this code any way you want to. As a favor to me, you can leave the copyright in there. You never know when someone might recognize your name! + +If you do use the code in a commercial product, I would appreciate hearing about it. This message serves as legal notice that I won't be suing you for royalties! The code is in the public domain. + +On the other hand, I don't provide support. The code is actually simple enough that it shouldn't need it. + +****************************** + + +Fluent NHibernate is licensed under the BSD license as described here: + +http://github.com/jagregory/fluent-nhibernate/raw/master/LICENSE.txt + +Fluent NHibernate binaries are merged into NServiceBus allowed under the terms of the license. + +****************************** + + +Autofac is licensed under the MIT license as described here: + +http://code.google.com/p/autofac/ + +Autofac binaries are linked into the NServiceBus distribution allowed under the license terms found here: + +http://www.opensource.org/licenses/mit-license.php + +****************************** + +Spring.NET is licensed under the Apache license version 2.0 as described here: + +http://www.springframework.net/license.html + +Spring.NET binaries are merged into NServiceBus allowed under the license terms found here: + +http://www.apache.org/licenses/LICENSE-2.0.txt + +****************************** + + +Antlr is licensed under the BSD license as described here: + +http://antlr.org/license.html + +Antlr binaries are merged into NServiceBus allowed under the license terms described above. + +****************************** + + +Common.Logging is licensed under the Apache License, Version 2.0 as described here: + +http://netcommon.sourceforge.net/license.html + +Common.Logging binaries are merged into NServiceBus allowed under the LGPL license terms found here: + +http://www.apache.org/licenses/LICENSE-2.0.txt + +****************************** + + +StructureMap is licensed under the Apache License, Version 2.0 as described here: + +http://structuremap.github.com/structuremap/index.html + +StructureMap baries are linked into the NServiceBus distribution allowed under the license terms found here: + +http://www.apache.org/licenses/LICENSE-2.0.txt + +****************************** + + +Castle is licensed under the Apache License, Version 2.0 as described here: + +http://www.castleproject.org/ + +Castle binaries are linked into the NServiceBus distribution allowed under the license terms found here: + +http://www.apache.org/licenses/LICENSE-2.0.txt + +****************************** + + +Unity is licensed under the MSPL license as described here: + +http://unity.codeplex.com/license + +Unity binaries are linked into the NServiceBus distribution allowed under the license terms described above. + +****************************** + + +Log4Net is licensed under the Apache License, Version 2.0 as described here: + +http://logging.apache.org/log4net/license.html + +Log4Net binaries are linked into the NServiceBus distribution allowed under the license terms described above. + +****************************** + + +TopShelf is licensed under the Apache License, Version 2.0 as described here: + +http://code.google.com/p/topshelf/ + +TopShelf binaries are merged into NServiceBus as allowed under the license terms described here: + +http://www.apache.org/licenses/LICENSE-2.0.txt + +****************************** + + +SQLite is in the public domain as described here: + +http://www.sqlite.org/copyright.html + +SQLite binaries are linked into the NServiceBus distribution allowed under the license terms described above. + +****************************** + + +Rhino Mocks is licensed under the BSD License as described here: + +http://www.ayende.com/projects/rhino-mocks.aspx + +Rhino Mocks binaries are merged into NServiceBus allowed under the license terms described here: + +http://www.opensource.org/licenses/bsd-license.php + + diff --git a/src/ObjectBuilder/ComponentCallModelEnum.cs b/src/ObjectBuilder/ComponentCallModelEnum.cs index 9c7525d16fb..4039e59bef1 100644 --- a/src/ObjectBuilder/ComponentCallModelEnum.cs +++ b/src/ObjectBuilder/ComponentCallModelEnum.cs @@ -1,21 +1,21 @@ -namespace NServiceBus.ObjectBuilder -{ - /// - /// Represent the various call models for a component. - /// - public enum ComponentCallModelEnum - { - /// - /// Accept the default call model of the underlying technology. - /// - None, - /// - /// Only one instance of the component will ever be called. - /// - Singleton, - /// - /// Each call on the component will be performed on a new instance. - /// - Singlecall - } -} +namespace NServiceBus.ObjectBuilder +{ + /// + /// Represent the various call models for a component. + /// + public enum ComponentCallModelEnum + { + /// + /// Accept the default call model of the underlying technology. + /// + None, + /// + /// Only one instance of the component will ever be called. + /// + Singleton, + /// + /// Each call on the component will be performed on a new instance. + /// + Singlecall + } +} diff --git a/src/ObjectBuilder/IBuilder.cs b/src/ObjectBuilder/IBuilder.cs index 4837f32a228..a42417d0939 100644 --- a/src/ObjectBuilder/IBuilder.cs +++ b/src/ObjectBuilder/IBuilder.cs @@ -1,63 +1,63 @@ -using System; -using System.Collections.Generic; - -namespace NServiceBus.ObjectBuilder -{ - /// - /// Used to instantiate types, so that all configured dependencies - /// and property values are set. - /// An abstraction on top of dependency injection frameworks. - /// - public interface IBuilder : IDisposable - { - /// - /// Creates an instance of the given type, injecting it with all defined dependencies. - /// - /// - /// - object Build(Type typeToBuild); - - /// - /// Creates an instance of a child builder which is used to facilitate deterministic - /// disposal of all resources created by the child builder. - /// - /// - IBuilder CreateChildBuilder(); - - /// - /// Creates an instance of the given type, injecting it with all defined dependencies. - /// - /// - /// - T Build(); - - /// - /// For each type that is compatible with T, an instance is created with all dependencies injected, and yeilded to the caller. - /// - /// - /// - IEnumerable BuildAll(); - - /// - /// For each type that is compatible with the given type, an instance is created with all dependencies injected. - /// - /// - /// - IEnumerable BuildAll(Type typeToBuild); - - /// - /// Builds an instance of the defined type injecting it with all defined dependencies - /// and invokes the given action on the instance. - /// - /// - /// - void BuildAndDispatch(Type typeToBuild, Action action); - - /// - /// Tell the container that the application code will not be using the given instance - /// anymore so it can be disposed and any resources it uses can be released. - /// - /// - void ReleaseInstance(object instance); - } -} +using System; +using System.Collections.Generic; + +namespace NServiceBus.ObjectBuilder +{ + /// + /// Used to instantiate types, so that all configured dependencies + /// and property values are set. + /// An abstraction on top of dependency injection frameworks. + /// + public interface IBuilder : IDisposable + { + /// + /// Creates an instance of the given type, injecting it with all defined dependencies. + /// + /// + /// + object Build(Type typeToBuild); + + /// + /// Creates an instance of a child builder which is used to facilitate deterministic + /// disposal of all resources created by the child builder. + /// + /// + IBuilder CreateChildBuilder(); + + /// + /// Creates an instance of the given type, injecting it with all defined dependencies. + /// + /// + /// + T Build(); + + /// + /// For each type that is compatible with T, an instance is created with all dependencies injected, and yeilded to the caller. + /// + /// + /// + IEnumerable BuildAll(); + + /// + /// For each type that is compatible with the given type, an instance is created with all dependencies injected. + /// + /// + /// + IEnumerable BuildAll(Type typeToBuild); + + /// + /// Builds an instance of the defined type injecting it with all defined dependencies + /// and invokes the given action on the instance. + /// + /// + /// + void BuildAndDispatch(Type typeToBuild, Action action); + + /// + /// Tell the container that the application code will not be using the given instance + /// anymore so it can be disposed and any resources it uses can be released. + /// + /// + void ReleaseInstance(object instance); + } +} diff --git a/src/ObjectBuilder/IComponentConfig.cs b/src/ObjectBuilder/IComponentConfig.cs index f9acd8c0ec8..0a8e3c4c250 100644 --- a/src/ObjectBuilder/IComponentConfig.cs +++ b/src/ObjectBuilder/IComponentConfig.cs @@ -1,35 +1,35 @@ -using System.Linq.Expressions; -using System; -namespace NServiceBus.ObjectBuilder -{ - /// - /// Used to configure the values to be set for the various - /// properties on a component. - /// - public interface IComponentConfig - { - /// - /// Configures the value of the named property of the component. - /// - /// - /// - /// - IComponentConfig ConfigureProperty(string name, object value); - } - - /// - /// Strongly typed version of IComponentConfig - /// - /// - public interface IComponentConfig - { - /// - /// Configures the value of the property like so: - /// ConfigureProperty(o => o.Property, value); - /// - /// - /// - /// - IComponentConfig ConfigureProperty(Expression> property, object value); - } -} +using System.Linq.Expressions; +using System; +namespace NServiceBus.ObjectBuilder +{ + /// + /// Used to configure the values to be set for the various + /// properties on a component. + /// + public interface IComponentConfig + { + /// + /// Configures the value of the named property of the component. + /// + /// + /// + /// + IComponentConfig ConfigureProperty(string name, object value); + } + + /// + /// Strongly typed version of IComponentConfig + /// + /// + public interface IComponentConfig + { + /// + /// Configures the value of the property like so: + /// ConfigureProperty(o => o.Property, value); + /// + /// + /// + /// + IComponentConfig ConfigureProperty(Expression> property, object value); + } +} diff --git a/src/ObjectBuilder/IConfigureComponents.cs b/src/ObjectBuilder/IConfigureComponents.cs index 8105ff4325e..1e9cbda5f0b 100644 --- a/src/ObjectBuilder/IConfigureComponents.cs +++ b/src/ObjectBuilder/IConfigureComponents.cs @@ -1,72 +1,72 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Linq.Expressions; - -namespace NServiceBus.ObjectBuilder -{ - /// - /// Used to configure components in the container. - /// Should primarily be used at startup/initialization time. - /// - public interface IConfigureComponents - { - /// - /// Configures the given type. Can be used to configure all kinds of properties. - /// - /// - /// Defines whether the type should have singleton or single call sematnics. - /// - IComponentConfig ConfigureComponent(Type concreteComponent, ComponentCallModelEnum callModel); - - /// - /// Configures the given type, allowing to fluently configure properties. - /// - /// - /// - /// - IComponentConfig ConfigureComponent(ComponentCallModelEnum callModel); - - /// - /// Configures the given property of the given type to be injected with the given value. - /// - /// - /// - /// - /// - IConfigureComponents ConfigureProperty(Expression> property, object value); - - /// - /// Registers the given instance as the singleton that will be returned - /// for the given type. - /// - /// - /// - /// - IConfigureComponents RegisterSingleton(Type lookupType, object instance); - - /// - /// Registers the given instance as the singleton that will be returned - /// for the given type. - /// - /// - /// - /// - IConfigureComponents RegisterSingleton(object instance); - - /// - /// Indicates if a component of the given type has been configured. - /// - /// - /// - bool HasComponent(); - - /// - /// Indicates if a component of the given type has been configured. - /// - /// - /// - bool HasComponent(Type componentType); - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Linq.Expressions; + +namespace NServiceBus.ObjectBuilder +{ + /// + /// Used to configure components in the container. + /// Should primarily be used at startup/initialization time. + /// + public interface IConfigureComponents + { + /// + /// Configures the given type. Can be used to configure all kinds of properties. + /// + /// + /// Defines whether the type should have singleton or single call sematnics. + /// + IComponentConfig ConfigureComponent(Type concreteComponent, ComponentCallModelEnum callModel); + + /// + /// Configures the given type, allowing to fluently configure properties. + /// + /// + /// + /// + IComponentConfig ConfigureComponent(ComponentCallModelEnum callModel); + + /// + /// Configures the given property of the given type to be injected with the given value. + /// + /// + /// + /// + /// + IConfigureComponents ConfigureProperty(Expression> property, object value); + + /// + /// Registers the given instance as the singleton that will be returned + /// for the given type. + /// + /// + /// + /// + IConfigureComponents RegisterSingleton(Type lookupType, object instance); + + /// + /// Registers the given instance as the singleton that will be returned + /// for the given type. + /// + /// + /// + /// + IConfigureComponents RegisterSingleton(object instance); + + /// + /// Indicates if a component of the given type has been configured. + /// + /// + /// + bool HasComponent(); + + /// + /// Indicates if a component of the given type has been configured. + /// + /// + /// + bool HasComponent(Type componentType); + } +} diff --git a/src/ObjectBuilder/ObjectBuilder.csproj b/src/ObjectBuilder/ObjectBuilder.csproj index ddcb13ef623..487e12cf129 100644 --- a/src/ObjectBuilder/ObjectBuilder.csproj +++ b/src/ObjectBuilder/ObjectBuilder.csproj @@ -1,98 +1,98 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {C831B94E-6D08-404C-BA80-B8E8442EA9DE} - Library - Properties - NServiceBus.ObjectBuilder - NServiceBus.ObjectBuilder - true - ..\..\NServiceBus.snk - v4.0 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.ObjectBuilder.xml - true - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.ObjectBuilder.xml - AllRules.ruleset - - - - - 3.5 - - - - - CommonAssemblyInfo.cs - - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - copy /Y "$(OutDir)*.*" "$(ProjectDir)..\..\build\ - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {C831B94E-6D08-404C-BA80-B8E8442EA9DE} + Library + Properties + NServiceBus.ObjectBuilder + NServiceBus.ObjectBuilder + true + ..\..\NServiceBus.snk + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.ObjectBuilder.xml + true + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.ObjectBuilder.xml + AllRules.ruleset + + + + + 3.5 + + + + + CommonAssemblyInfo.cs + + + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + copy /Y "$(OutDir)*.*" "$(ProjectDir)..\..\build\ + \ No newline at end of file diff --git a/src/ObjectBuilder/ObjectBuilder.sln b/src/ObjectBuilder/ObjectBuilder.sln index 85fb5c81800..6301fe547a4 100644 --- a/src/ObjectBuilder/ObjectBuilder.sln +++ b/src/ObjectBuilder/ObjectBuilder.sln @@ -1,20 +1,20 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectBuilder", "ObjectBuilder.csproj", "{C831B94E-6D08-404C-BA80-B8E8442EA9DE}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C831B94E-6D08-404C-BA80-B8E8442EA9DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C831B94E-6D08-404C-BA80-B8E8442EA9DE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C831B94E-6D08-404C-BA80-B8E8442EA9DE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C831B94E-6D08-404C-BA80-B8E8442EA9DE}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectBuilder", "ObjectBuilder.csproj", "{C831B94E-6D08-404C-BA80-B8E8442EA9DE}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C831B94E-6D08-404C-BA80-B8E8442EA9DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C831B94E-6D08-404C-BA80-B8E8442EA9DE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C831B94E-6D08-404C-BA80-B8E8442EA9DE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C831B94E-6D08-404C-BA80-B8E8442EA9DE}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/ObjectBuilder/Properties/AssemblyInfo.cs b/src/ObjectBuilder/Properties/AssemblyInfo.cs index be09098f9bb..fdf1added3b 100644 --- a/src/ObjectBuilder/Properties/AssemblyInfo.cs +++ b/src/ObjectBuilder/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Object Builder Interfaces")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Object Builder Interfaces")] [assembly: AssemblyDescription("Interfaces for abstracting object creation in nServiceBus")] \ No newline at end of file diff --git a/src/config/NServiceBus.Config.UnitTests/App.config b/src/config/NServiceBus.Config.UnitTests/App.config index 9f5d621fd19..3e51b9e16a4 100644 --- a/src/config/NServiceBus.Config.UnitTests/App.config +++ b/src/config/NServiceBus.Config.UnitTests/App.config @@ -1,62 +1,62 @@ - - - -
-
-
-
- - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + +
+
+
+
+ + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/config/NServiceBus.Config.UnitTests/NServiceBus.Config.UnitTests.csproj b/src/config/NServiceBus.Config.UnitTests/NServiceBus.Config.UnitTests.csproj index 826980ebff7..c14fa916677 100644 --- a/src/config/NServiceBus.Config.UnitTests/NServiceBus.Config.UnitTests.csproj +++ b/src/config/NServiceBus.Config.UnitTests/NServiceBus.Config.UnitTests.csproj @@ -1,79 +1,79 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {3F2577A6-D767-4A02-92A6-725B0FA7A9C5} - Library - Properties - NServiceBus.Config.UnitTests - NServiceBus.Config.UnitTests - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\lib\Common.Logging.dll - - - False - ..\..\..\lib\Common.Logging.Log4Net.dll - - - False - ..\..\..\tools\NUnit\nunit.framework.dll - - - False - ..\..\..\lib\Rhino.Mocks\Rhino.Mocks.dll - - - - - 3.5 - - - - - - - - - - - {444FAA3D-D5E1-498E-9AE1-201DB619CAF0} - NServiceBus.Config - - - - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {3F2577A6-D767-4A02-92A6-725B0FA7A9C5} + Library + Properties + NServiceBus.Config.UnitTests + NServiceBus.Config.UnitTests + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\lib\Common.Logging.dll + + + False + ..\..\..\lib\Common.Logging.Log4Net.dll + + + False + ..\..\..\tools\NUnit\nunit.framework.dll + + + False + ..\..\..\lib\Rhino.Mocks\Rhino.Mocks.dll + + + + + 3.5 + + + + + + + + + + + {444FAA3D-D5E1-498E-9AE1-201DB619CAF0} + NServiceBus.Config + + + + + + + \ No newline at end of file diff --git a/src/config/NServiceBus.Config.UnitTests/Properties/AssemblyInfo.cs b/src/config/NServiceBus.Config.UnitTests/Properties/AssemblyInfo.cs index a6ca56c6769..ac6b6a696f0 100644 --- a/src/config/NServiceBus.Config.UnitTests/Properties/AssemblyInfo.cs +++ b/src/config/NServiceBus.Config.UnitTests/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("NServiceBus.Config.UnitTests")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("CheckFree")] -[assembly: AssemblyProduct("NServiceBus.Config.UnitTests")] -[assembly: AssemblyCopyright("Copyright © CheckFree 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("90b76d85-3adf-4280-9c09-f33fe4dce87c")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("NServiceBus.Config.UnitTests")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("CheckFree")] +[assembly: AssemblyProduct("NServiceBus.Config.UnitTests")] +[assembly: AssemblyCopyright("Copyright © CheckFree 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("90b76d85-3adf-4280-9c09-f33fe4dce87c")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/config/NServiceBus.Config.UnitTests/TestConfigurationSection.cs b/src/config/NServiceBus.Config.UnitTests/TestConfigurationSection.cs index 3bb69b0822e..ce7d79f1af7 100644 --- a/src/config/NServiceBus.Config.UnitTests/TestConfigurationSection.cs +++ b/src/config/NServiceBus.Config.UnitTests/TestConfigurationSection.cs @@ -1,24 +1,24 @@ -using System.Configuration; - -namespace NServiceBus.Config.UnitTests -{ - public class TestConfigurationSection : ConfigurationSection - { - [ConfigurationProperty("TestSetting", IsRequired = true)] - public string TestSetting - { - get - { - var result = this["TestSetting"] as string; - if (result != null && result.Length == 0) - result = null; - - return result; - } - set - { - this["TestSetting"] = value; - } - } - } +using System.Configuration; + +namespace NServiceBus.Config.UnitTests +{ + public class TestConfigurationSection : ConfigurationSection + { + [ConfigurationProperty("TestSetting", IsRequired = true)] + public string TestSetting + { + get + { + var result = this["TestSetting"] as string; + if (result != null && result.Length == 0) + result = null; + + return result; + } + set + { + this["TestSetting"] = value; + } + } + } } \ No newline at end of file diff --git a/src/config/NServiceBus.Config.UnitTests/When_no_custom_configuration_source_is_specified.cs b/src/config/NServiceBus.Config.UnitTests/When_no_custom_configuration_source_is_specified.cs index 07486fc9a72..235464c9fcf 100644 --- a/src/config/NServiceBus.Config.UnitTests/When_no_custom_configuration_source_is_specified.cs +++ b/src/config/NServiceBus.Config.UnitTests/When_no_custom_configuration_source_is_specified.cs @@ -1,34 +1,34 @@ -using System; -using NUnit.Framework; - -namespace NServiceBus.Config.UnitTests -{ - [TestFixture] - public class When_no_custom_configuration_source_is_specified - { - - [SetUp] - public void SetUp() - { - Configure.With(new Type[]{}); - } - - [Test] - public void The_default_configuration_source_should_be_default() - { - var configSection = Configure.GetConfigSection(); - - Assert.AreEqual(configSection.TestSetting,"test"); - } - - [Test] - public void Getting_sections_that_not_inherits_from_configsection_should_fail() - { - Assert.Throws(() => Configure.GetConfigSection()); - } - } - - public class IllegalSection - { - } +using System; +using NUnit.Framework; + +namespace NServiceBus.Config.UnitTests +{ + [TestFixture] + public class When_no_custom_configuration_source_is_specified + { + + [SetUp] + public void SetUp() + { + Configure.With(new Type[]{}); + } + + [Test] + public void The_default_configuration_source_should_be_default() + { + var configSection = Configure.GetConfigSection(); + + Assert.AreEqual(configSection.TestSetting,"test"); + } + + [Test] + public void Getting_sections_that_not_inherits_from_configsection_should_fail() + { + Assert.Throws(() => Configure.GetConfigSection()); + } + } + + public class IllegalSection + { + } } \ No newline at end of file diff --git a/src/config/NServiceBus.Config.UnitTests/When_users_override_the_configuration_source.cs b/src/config/NServiceBus.Config.UnitTests/When_users_override_the_configuration_source.cs index 82a5dffbc9a..8ed6421c59d 100644 --- a/src/config/NServiceBus.Config.UnitTests/When_users_override_the_configuration_source.cs +++ b/src/config/NServiceBus.Config.UnitTests/When_users_override_the_configuration_source.cs @@ -1,39 +1,39 @@ -using System; -using NServiceBus.Config.ConfigurationSource; -using NUnit.Framework; - -namespace NServiceBus.Config.UnitTests -{ - [TestFixture] - public class When_users_override_the_configuration_source - { - private IConfigurationSource userConfigurationSource; - - [SetUp] - public void SetUp() - { - userConfigurationSource = new UserConfigurationSource(); - Configure.With(new Type[]{}) - .CustomConfigurationSource(userConfigurationSource); - } - - [Test] - public void NService_bus_should_resolve_configuration_from_that_source() - { - var section = Configure.GetConfigSection(); - - Assert.AreEqual(section.TestSetting,"TestValue"); - } - - } - - public class UserConfigurationSource : IConfigurationSource - { - T IConfigurationSource.GetConfiguration() - { - var section = new TestConfigurationSection {TestSetting = "TestValue"}; - - return section as T; - } - } +using System; +using NServiceBus.Config.ConfigurationSource; +using NUnit.Framework; + +namespace NServiceBus.Config.UnitTests +{ + [TestFixture] + public class When_users_override_the_configuration_source + { + private IConfigurationSource userConfigurationSource; + + [SetUp] + public void SetUp() + { + userConfigurationSource = new UserConfigurationSource(); + Configure.With(new Type[]{}) + .CustomConfigurationSource(userConfigurationSource); + } + + [Test] + public void NService_bus_should_resolve_configuration_from_that_source() + { + var section = Configure.GetConfigSection(); + + Assert.AreEqual(section.TestSetting,"TestValue"); + } + + } + + public class UserConfigurationSource : IConfigurationSource + { + T IConfigurationSource.GetConfiguration() + { + var section = new TestConfigurationSection {TestSetting = "TestValue"}; + + return section as T; + } + } } \ No newline at end of file diff --git a/src/config/NServiceBus.Config.sln b/src/config/NServiceBus.Config.sln index 92c016d07a8..57a14768efc 100644 --- a/src/config/NServiceBus.Config.sln +++ b/src/config/NServiceBus.Config.sln @@ -1,26 +1,26 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Config", "NServiceBus.Config\NServiceBus.Config.csproj", "{444FAA3D-D5E1-498E-9AE1-201DB619CAF0}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Config.UnitTests", "NServiceBus.Config.UnitTests\NServiceBus.Config.UnitTests.csproj", "{3F2577A6-D767-4A02-92A6-725B0FA7A9C5}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {444FAA3D-D5E1-498E-9AE1-201DB619CAF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {444FAA3D-D5E1-498E-9AE1-201DB619CAF0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {444FAA3D-D5E1-498E-9AE1-201DB619CAF0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {444FAA3D-D5E1-498E-9AE1-201DB619CAF0}.Release|Any CPU.Build.0 = Release|Any CPU - {3F2577A6-D767-4A02-92A6-725B0FA7A9C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3F2577A6-D767-4A02-92A6-725B0FA7A9C5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3F2577A6-D767-4A02-92A6-725B0FA7A9C5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3F2577A6-D767-4A02-92A6-725B0FA7A9C5}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Config", "NServiceBus.Config\NServiceBus.Config.csproj", "{444FAA3D-D5E1-498E-9AE1-201DB619CAF0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Config.UnitTests", "NServiceBus.Config.UnitTests\NServiceBus.Config.UnitTests.csproj", "{3F2577A6-D767-4A02-92A6-725B0FA7A9C5}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {444FAA3D-D5E1-498E-9AE1-201DB619CAF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {444FAA3D-D5E1-498E-9AE1-201DB619CAF0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {444FAA3D-D5E1-498E-9AE1-201DB619CAF0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {444FAA3D-D5E1-498E-9AE1-201DB619CAF0}.Release|Any CPU.Build.0 = Release|Any CPU + {3F2577A6-D767-4A02-92A6-725B0FA7A9C5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3F2577A6-D767-4A02-92A6-725B0FA7A9C5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3F2577A6-D767-4A02-92A6-725B0FA7A9C5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3F2577A6-D767-4A02-92A6-725B0FA7A9C5}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/config/NServiceBus.Config/AllAssemblies.cs b/src/config/NServiceBus.Config/AllAssemblies.cs index 4bf5ef6a6b9..b94e91f4fcc 100644 --- a/src/config/NServiceBus.Config/AllAssemblies.cs +++ b/src/config/NServiceBus.Config/AllAssemblies.cs @@ -1,68 +1,68 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Reflection; -using System.Web; - -namespace NServiceBus -{ - /// - /// Class for specifying which assemblies not to load. - /// - public class AllAssemblies : IEnumerable - { - /// - /// Indicate that the given assembly is not to be used. - /// Use the 'And' method to indicate other assemblies to be skipped. - /// - /// - /// - public static AllAssemblies Except(string assembly) - { - return new AllAssemblies { assembliesToSkip = new List(new[] { assembly })}; - } - - /// - /// Indicate that the given assembly should not be used. - /// You can call this method multiple times. - /// - /// - /// - public AllAssemblies And(string assembly) - { - if (!assembliesToSkip.Contains(assembly)) - assembliesToSkip.Add(assembly); - - return this; - } - - /// - /// Returns an enumerator for looping over the assemblies to be loaded. - /// - /// - public IEnumerator GetEnumerator() - { - return Configure.GetAssembliesInDirectory(directory, assembliesToSkip.ToArray()).GetEnumerator(); - } - - /// - /// Return a non-generic enumerator. - /// - /// - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - - private AllAssemblies() - { - if (HttpContext.Current != null) - directory = AppDomain.CurrentDomain.DynamicDirectory; - else - directory = AppDomain.CurrentDomain.BaseDirectory; - } - - private List assembliesToSkip; - private readonly string directory; - } -} +using System; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using System.Web; + +namespace NServiceBus +{ + /// + /// Class for specifying which assemblies not to load. + /// + public class AllAssemblies : IEnumerable + { + /// + /// Indicate that the given assembly is not to be used. + /// Use the 'And' method to indicate other assemblies to be skipped. + /// + /// + /// + public static AllAssemblies Except(string assembly) + { + return new AllAssemblies { assembliesToSkip = new List(new[] { assembly })}; + } + + /// + /// Indicate that the given assembly should not be used. + /// You can call this method multiple times. + /// + /// + /// + public AllAssemblies And(string assembly) + { + if (!assembliesToSkip.Contains(assembly)) + assembliesToSkip.Add(assembly); + + return this; + } + + /// + /// Returns an enumerator for looping over the assemblies to be loaded. + /// + /// + public IEnumerator GetEnumerator() + { + return Configure.GetAssembliesInDirectory(directory, assembliesToSkip.ToArray()).GetEnumerator(); + } + + /// + /// Return a non-generic enumerator. + /// + /// + IEnumerator IEnumerable.GetEnumerator() + { + return GetEnumerator(); + } + + private AllAssemblies() + { + if (HttpContext.Current != null) + directory = AppDomain.CurrentDomain.DynamicDirectory; + else + directory = AppDomain.CurrentDomain.BaseDirectory; + } + + private List assembliesToSkip; + private readonly string directory; + } +} diff --git a/src/config/NServiceBus.Config/ConfigurationSource/DefaultConfigurationSource.cs b/src/config/NServiceBus.Config/ConfigurationSource/DefaultConfigurationSource.cs index a26424971c0..6efaec79bf2 100644 --- a/src/config/NServiceBus.Config/ConfigurationSource/DefaultConfigurationSource.cs +++ b/src/config/NServiceBus.Config/ConfigurationSource/DefaultConfigurationSource.cs @@ -1,19 +1,19 @@ -using System; -using System.Configuration; - -namespace NServiceBus.Config.ConfigurationSource -{ - /// - /// A configuration source implementation on top of ConfigurationManager. - /// - public class DefaultConfigurationSource : IConfigurationSource - { - T IConfigurationSource.GetConfiguration() - { - if (!typeof(ConfigurationSection).IsAssignableFrom(typeof(T))) - throw new ArgumentException("DefaultConfigurationSource only supports .Net ConfigurationSections"); - - return ConfigurationManager.GetSection(typeof(T).Name) as T; - } - } +using System; +using System.Configuration; + +namespace NServiceBus.Config.ConfigurationSource +{ + /// + /// A configuration source implementation on top of ConfigurationManager. + /// + public class DefaultConfigurationSource : IConfigurationSource + { + T IConfigurationSource.GetConfiguration() + { + if (!typeof(ConfigurationSection).IsAssignableFrom(typeof(T))) + throw new ArgumentException("DefaultConfigurationSource only supports .Net ConfigurationSections"); + + return ConfigurationManager.GetSection(typeof(T).Name) as T; + } + } } \ No newline at end of file diff --git a/src/config/NServiceBus.Config/ConfigurationSource/IConfigurationSource.cs b/src/config/NServiceBus.Config/ConfigurationSource/IConfigurationSource.cs index 48221fbf245..0251fe7ac34 100644 --- a/src/config/NServiceBus.Config/ConfigurationSource/IConfigurationSource.cs +++ b/src/config/NServiceBus.Config/ConfigurationSource/IConfigurationSource.cs @@ -1,15 +1,15 @@ -namespace NServiceBus.Config.ConfigurationSource -{ - /// - /// Abstraction of a source of configuration data. - /// - public interface IConfigurationSource - { - /// - /// Returns configuration data based on the given type. - /// - /// - /// - T GetConfiguration() where T : class,new(); - } +namespace NServiceBus.Config.ConfigurationSource +{ + /// + /// Abstraction of a source of configuration data. + /// + public interface IConfigurationSource + { + /// + /// Returns configuration data based on the given type. + /// + /// + /// + T GetConfiguration() where T : class,new(); + } } \ No newline at end of file diff --git a/src/config/NServiceBus.Config/Configure.cs b/src/config/NServiceBus.Config/Configure.cs index 2550d247b3e..f46a8c8e5b8 100644 --- a/src/config/NServiceBus.Config/Configure.cs +++ b/src/config/NServiceBus.Config/Configure.cs @@ -1,254 +1,254 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using NServiceBus.Config; -using NServiceBus.Config.ConfigurationSource; -using NServiceBus.ObjectBuilder; -using System.IO; -using System.Reflection; - -namespace NServiceBus -{ - /// - /// Central configuration entry point for NServiceBus. - /// - public class Configure - { - /// - /// Provides static access to the configuration object. - /// - public static Configure Instance - { - get { return instance; } - } - - /// - /// Event raised when configuration is complete - /// - public static event EventHandler ConfigurationComplete; - - /// - /// Gets/sets the builder. - /// Setting the builder should only be done by NServiceBus framework code. - /// - public IBuilder Builder { get; set; } - - /// - /// Provides access to the configuration source. - /// - protected IConfigurationSource ConfigSource { get; set; } - - /// - /// Gets the current configuration source - /// - public static IConfigurationSource ConfigurationSource - { - get { return instance.ConfigSource; } - } - - /// - /// Sets the current configuration source - /// - /// - /// - public Configure CustomConfigurationSource(IConfigurationSource configurationSource) - { - ConfigSource = configurationSource; - return this; - } - - /// - /// Gets/sets the object used to configure components. - /// This object should eventually reference the same container as the Builder. - /// - public IConfigureComponents Configurer { get; set; } - - /// - /// Protected constructor to enable creation only via the With method. - /// - protected Configure() - { - } - - /// - /// Creates a new configuration object scanning assemblies - /// in the regular runtime directory. - /// - /// - public static Configure With() - { - if (HttpContext.Current != null) - throw new InvalidOperationException("NServiceBus has detected that you're running in the context of a web application. The method 'NServiceBus.Configure.With()' is not recommended for web scenarios. Use 'NServiceBus.Configure.WithWeb()' instead, or consider explicitly passing in the assemblies you want to be scanned to one of the overloads to the 'With' method."); - - return With(AppDomain.CurrentDomain.BaseDirectory); - } - - /// - /// Configures NServiceBus to scan for assemblies - /// in the relevant web directory instead of regular - /// runtime directory. - /// - /// - public static Configure WithWeb() - { - return With(AppDomain.CurrentDomain.DynamicDirectory); - } - - /// - /// Configures NServiceBus to scan for assemblies - /// in the given directory rather than the regular - /// runtime directory. - /// - /// - /// - public static Configure With(string probeDirectory) - { - return With(GetAssembliesInDirectory(probeDirectory)); - } - - /// - /// Configures NServiceBus to use the types found in the given assemblies. - /// - /// - /// - public static Configure With(IEnumerable assemblies) - { - return With(assemblies.ToArray()); - } - - /// - /// Configures nServiceBus to scan the given assemblies only. - /// - /// - /// - public static Configure With(params Assembly[] assemblies) - { - var types = new List(); - Array.ForEach( - assemblies, - a => - { - try - { - foreach (Type t in a.GetTypes()) types.Add(t); - } - catch (ReflectionTypeLoadException) - { - return;//intentionally swallow exception - } - }); - - return With(types); - } - - /// - /// Configures nServiceBus to scan the given types. - /// - /// - /// - public static Configure With(IEnumerable typesToScan) - { - if (instance == null) - instance = new Configure(); - - instance.ConfigSource = new DefaultConfigurationSource(); - - TypesToScan = typesToScan; - - return instance; - } - - /// - /// Run a custom action at configuration time - useful for performing additional configuration not exposed by the fluent interface. - /// - /// - /// - public Configure RunCustomAction(Action action) - { - action(); - - return this; - } - - /// - /// Provides an instance to a startable bus. - /// - /// - public IStartableBus CreateBus() - { - - TypesToScan.Where(t => typeof(INeedInitialization).IsAssignableFrom(t) && !(t.IsAbstract || t.IsInterface)) - .ToList().ForEach(t => - { - var ini = (INeedInitialization) Activator.CreateInstance(t); - ini.Init(); - }); - - if (ConfigurationComplete != null) - ConfigurationComplete(null, null); - - return Builder.Build(); - } - - /// - /// Returns types in assemblies found in the current directory. - /// - public static IEnumerable TypesToScan { get; private set; } - - /// - /// Returns the requested config section using the current configuration source - /// - /// - /// - public static T GetConfigSection() where T : class,new() - { - return ConfigurationSource.GetConfiguration(); - } - - /// - /// Load and return all assemblies in the given directory except the given ones to exclude - /// - /// - /// - /// - public static IEnumerable GetAssembliesInDirectory(string path, params string[] assembliesToSkip) - { - foreach (var a in GetAssembliesInDirectoryWithExtension(path, "*.exe", assembliesToSkip)) - yield return a; - foreach (var a in GetAssembliesInDirectoryWithExtension(path, "*.dll", assembliesToSkip)) - yield return a; - } - - private static IEnumerable GetAssembliesInDirectoryWithExtension(string path, string extension, params string[] assembliesToSkip) - { - var result = new List(); - foreach (FileInfo file in new DirectoryInfo(path).GetFiles(extension, SearchOption.AllDirectories)) - { - try - { - if (assembliesToSkip.Contains(file.Name, StringComparer.InvariantCultureIgnoreCase)) - continue; - - result.Add(Assembly.LoadFrom(file.FullName)); - } - catch (BadImageFormatException bif) - { - if (bif.FileName.ToLower().Contains("system.data.sqlite.dll")) - throw new BadImageFormatException( - "You've installed the wrong version of System.Data.SQLite.dll on this machine. If this machine is x86, this dll should be roughly 800KB. If this machine is x64, this dll should be roughly 1MB. You can find the x86 file under /binaries and the x64 version under /binaries/x64. *If you're running the samples, a quick fix would be to copy the file from /binaries/x64 over the file in /binaries - you should 'clean' your solution and rebuild after.", - bif.FileName, bif); - - throw new InvalidOperationException( - "Could not load " + file.FullName + - ". Consider using 'Configure.With(AllAssemblies.Except(\"" + file.Name + "\"))' to tell NServiceBus not to load this file.", - bif); - } - } - - return result; - } - - private static Configure instance; - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using NServiceBus.Config; +using NServiceBus.Config.ConfigurationSource; +using NServiceBus.ObjectBuilder; +using System.IO; +using System.Reflection; + +namespace NServiceBus +{ + /// + /// Central configuration entry point for NServiceBus. + /// + public class Configure + { + /// + /// Provides static access to the configuration object. + /// + public static Configure Instance + { + get { return instance; } + } + + /// + /// Event raised when configuration is complete + /// + public static event EventHandler ConfigurationComplete; + + /// + /// Gets/sets the builder. + /// Setting the builder should only be done by NServiceBus framework code. + /// + public IBuilder Builder { get; set; } + + /// + /// Provides access to the configuration source. + /// + protected IConfigurationSource ConfigSource { get; set; } + + /// + /// Gets the current configuration source + /// + public static IConfigurationSource ConfigurationSource + { + get { return instance.ConfigSource; } + } + + /// + /// Sets the current configuration source + /// + /// + /// + public Configure CustomConfigurationSource(IConfigurationSource configurationSource) + { + ConfigSource = configurationSource; + return this; + } + + /// + /// Gets/sets the object used to configure components. + /// This object should eventually reference the same container as the Builder. + /// + public IConfigureComponents Configurer { get; set; } + + /// + /// Protected constructor to enable creation only via the With method. + /// + protected Configure() + { + } + + /// + /// Creates a new configuration object scanning assemblies + /// in the regular runtime directory. + /// + /// + public static Configure With() + { + if (HttpContext.Current != null) + throw new InvalidOperationException("NServiceBus has detected that you're running in the context of a web application. The method 'NServiceBus.Configure.With()' is not recommended for web scenarios. Use 'NServiceBus.Configure.WithWeb()' instead, or consider explicitly passing in the assemblies you want to be scanned to one of the overloads to the 'With' method."); + + return With(AppDomain.CurrentDomain.BaseDirectory); + } + + /// + /// Configures NServiceBus to scan for assemblies + /// in the relevant web directory instead of regular + /// runtime directory. + /// + /// + public static Configure WithWeb() + { + return With(AppDomain.CurrentDomain.DynamicDirectory); + } + + /// + /// Configures NServiceBus to scan for assemblies + /// in the given directory rather than the regular + /// runtime directory. + /// + /// + /// + public static Configure With(string probeDirectory) + { + return With(GetAssembliesInDirectory(probeDirectory)); + } + + /// + /// Configures NServiceBus to use the types found in the given assemblies. + /// + /// + /// + public static Configure With(IEnumerable assemblies) + { + return With(assemblies.ToArray()); + } + + /// + /// Configures nServiceBus to scan the given assemblies only. + /// + /// + /// + public static Configure With(params Assembly[] assemblies) + { + var types = new List(); + Array.ForEach( + assemblies, + a => + { + try + { + foreach (Type t in a.GetTypes()) types.Add(t); + } + catch (ReflectionTypeLoadException) + { + return;//intentionally swallow exception + } + }); + + return With(types); + } + + /// + /// Configures nServiceBus to scan the given types. + /// + /// + /// + public static Configure With(IEnumerable typesToScan) + { + if (instance == null) + instance = new Configure(); + + instance.ConfigSource = new DefaultConfigurationSource(); + + TypesToScan = typesToScan; + + return instance; + } + + /// + /// Run a custom action at configuration time - useful for performing additional configuration not exposed by the fluent interface. + /// + /// + /// + public Configure RunCustomAction(Action action) + { + action(); + + return this; + } + + /// + /// Provides an instance to a startable bus. + /// + /// + public IStartableBus CreateBus() + { + + TypesToScan.Where(t => typeof(INeedInitialization).IsAssignableFrom(t) && !(t.IsAbstract || t.IsInterface)) + .ToList().ForEach(t => + { + var ini = (INeedInitialization) Activator.CreateInstance(t); + ini.Init(); + }); + + if (ConfigurationComplete != null) + ConfigurationComplete(null, null); + + return Builder.Build(); + } + + /// + /// Returns types in assemblies found in the current directory. + /// + public static IEnumerable TypesToScan { get; private set; } + + /// + /// Returns the requested config section using the current configuration source + /// + /// + /// + public static T GetConfigSection() where T : class,new() + { + return ConfigurationSource.GetConfiguration(); + } + + /// + /// Load and return all assemblies in the given directory except the given ones to exclude + /// + /// + /// + /// + public static IEnumerable GetAssembliesInDirectory(string path, params string[] assembliesToSkip) + { + foreach (var a in GetAssembliesInDirectoryWithExtension(path, "*.exe", assembliesToSkip)) + yield return a; + foreach (var a in GetAssembliesInDirectoryWithExtension(path, "*.dll", assembliesToSkip)) + yield return a; + } + + private static IEnumerable GetAssembliesInDirectoryWithExtension(string path, string extension, params string[] assembliesToSkip) + { + var result = new List(); + foreach (FileInfo file in new DirectoryInfo(path).GetFiles(extension, SearchOption.AllDirectories)) + { + try + { + if (assembliesToSkip.Contains(file.Name, StringComparer.InvariantCultureIgnoreCase)) + continue; + + result.Add(Assembly.LoadFrom(file.FullName)); + } + catch (BadImageFormatException bif) + { + if (bif.FileName.ToLower().Contains("system.data.sqlite.dll")) + throw new BadImageFormatException( + "You've installed the wrong version of System.Data.SQLite.dll on this machine. If this machine is x86, this dll should be roughly 800KB. If this machine is x64, this dll should be roughly 1MB. You can find the x86 file under /binaries and the x64 version under /binaries/x64. *If you're running the samples, a quick fix would be to copy the file from /binaries/x64 over the file in /binaries - you should 'clean' your solution and rebuild after.", + bif.FileName, bif); + + throw new InvalidOperationException( + "Could not load " + file.FullName + + ". Consider using 'Configure.With(AllAssemblies.Except(\"" + file.Name + "\"))' to tell NServiceBus not to load this file.", + bif); + } + } + + return result; + } + + private static Configure instance; + } +} diff --git a/src/config/NServiceBus.Config/INeedInitialization.cs b/src/config/NServiceBus.Config/INeedInitialization.cs index 5042d8cd118..83eaa89edf8 100644 --- a/src/config/NServiceBus.Config/INeedInitialization.cs +++ b/src/config/NServiceBus.Config/INeedInitialization.cs @@ -1,14 +1,14 @@ -namespace NServiceBus.Config -{ - /// - /// Implementers will be called after NServiceBus.Configure.With completes and a container - /// has been set. - /// - public interface INeedInitialization - { - /// - /// Implementers will include custom initialization code here. - /// - void Init(); - } -} +namespace NServiceBus.Config +{ + /// + /// Implementers will be called after NServiceBus.Configure.With completes and a container + /// has been set. + /// + public interface INeedInitialization + { + /// + /// Implementers will include custom initialization code here. + /// + void Init(); + } +} diff --git a/src/config/NServiceBus.Config/NServiceBus.Config.csproj b/src/config/NServiceBus.Config/NServiceBus.Config.csproj index 5909e5125d6..12258685de8 100644 --- a/src/config/NServiceBus.Config/NServiceBus.Config.csproj +++ b/src/config/NServiceBus.Config/NServiceBus.Config.csproj @@ -1,119 +1,119 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {444FAA3D-D5E1-498E-9AE1-201DB619CAF0} - Library - Properties - NServiceBus.Config - NServiceBus.Config - v4.0 - 512 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.Config.XML - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.Config.XML - AllRules.ruleset - - - - False - ..\..\..\lib\Common.Logging.dll - False - - - False - ..\..\..\build\output\NServiceBus.dll - False - - - False - ..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll - False - - - - - 3.5 - - - - 3.0 - - - - - - - CommonAssemblyInfo.cs - - - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\build\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {444FAA3D-D5E1-498E-9AE1-201DB619CAF0} + Library + Properties + NServiceBus.Config + NServiceBus.Config + v4.0 + 512 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.Config.XML + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.Config.XML + AllRules.ruleset + + + + False + ..\..\..\lib\Common.Logging.dll + False + + + False + ..\..\..\build\output\NServiceBus.dll + False + + + False + ..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll + False + + + + + 3.5 + + + + 3.0 + + + + + + + CommonAssemblyInfo.cs + + + + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\build\" + \ No newline at end of file diff --git a/src/config/NServiceBus.Config/Properties/AssemblyInfo.cs b/src/config/NServiceBus.Config/Properties/AssemblyInfo.cs index c7d6df99d4f..09eb4a7ca26 100644 --- a/src/config/NServiceBus.Config/Properties/AssemblyInfo.cs +++ b/src/config/NServiceBus.Config/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Configuration Entry Point")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Configuration Entry Point")] [assembly: AssemblyDescription("Base namespace used for configuring nServiceBus.")] \ No newline at end of file diff --git a/src/core/NServiceBus.Saga/HasCompleted.cs b/src/core/NServiceBus.Saga/HasCompleted.cs index 605e0a41737..bcce10e544b 100644 --- a/src/core/NServiceBus.Saga/HasCompleted.cs +++ b/src/core/NServiceBus.Saga/HasCompleted.cs @@ -1,14 +1,14 @@ - -namespace NServiceBus.Saga -{ - /// - /// Interface used to query a saga to see if it has completed. - /// - public interface HasCompleted - { - /// - /// Indicates if the saga has completed. - /// - bool Completed { get; } - } -} + +namespace NServiceBus.Saga +{ + /// + /// Interface used to query a saga to see if it has completed. + /// + public interface HasCompleted + { + /// + /// Indicates if the saga has completed. + /// + bool Completed { get; } + } +} diff --git a/src/core/NServiceBus.Saga/IConfigurable.cs b/src/core/NServiceBus.Saga/IConfigurable.cs index 081b5c4f187..0c784558483 100644 --- a/src/core/NServiceBus.Saga/IConfigurable.cs +++ b/src/core/NServiceBus.Saga/IConfigurable.cs @@ -1,14 +1,14 @@ -namespace NServiceBus.Saga -{ - /// - /// Implementers of ISaga should implement this interface as well if they want - /// initialization time configuration. - /// - public interface IConfigurable - { - /// - /// Called by the infrastructure to give a chance for initialization time configuration of the saga. - /// - void Configure(); - } -} +namespace NServiceBus.Saga +{ + /// + /// Implementers of ISaga should implement this interface as well if they want + /// initialization time configuration. + /// + public interface IConfigurable + { + /// + /// Called by the infrastructure to give a chance for initialization time configuration of the saga. + /// + void Configure(); + } +} diff --git a/src/core/NServiceBus.Saga/IConfigureHowToFindSagaWithMessage.cs b/src/core/NServiceBus.Saga/IConfigureHowToFindSagaWithMessage.cs index 2b97294d1f9..fc5c27bd706 100644 --- a/src/core/NServiceBus.Saga/IConfigureHowToFindSagaWithMessage.cs +++ b/src/core/NServiceBus.Saga/IConfigureHowToFindSagaWithMessage.cs @@ -1,24 +1,24 @@ -using System; -using System.Linq.Expressions; - -namespace NServiceBus.Saga -{ - /// - /// Implementation provided by the infrastructure - don't implement this - /// or register implementations of it in the container unless you intend - /// to substantially change the way sagas work in nServiceBus. - /// - public interface IConfigureHowToFindSagaWithMessage - { - /// - /// Specify that when the infrastructure is handling a message - /// of the given type, which message property should be matched to - /// which saga entity property in the persistent saga store. - /// - /// - /// - /// - /// - void ConfigureMapping(Expression> sagaEntityProperty, Expression> messageProperty) where TSagaEntity : ISagaEntity where TMessage : IMessage; - } +using System; +using System.Linq.Expressions; + +namespace NServiceBus.Saga +{ + /// + /// Implementation provided by the infrastructure - don't implement this + /// or register implementations of it in the container unless you intend + /// to substantially change the way sagas work in nServiceBus. + /// + public interface IConfigureHowToFindSagaWithMessage + { + /// + /// Specify that when the infrastructure is handling a message + /// of the given type, which message property should be matched to + /// which saga entity property in the persistent saga store. + /// + /// + /// + /// + /// + void ConfigureMapping(Expression> sagaEntityProperty, Expression> messageProperty) where TSagaEntity : ISagaEntity where TMessage : IMessage; + } } \ No newline at end of file diff --git a/src/core/NServiceBus.Saga/IFindSagas.cs b/src/core/NServiceBus.Saga/IFindSagas.cs index fd90296467d..baad0051847 100644 --- a/src/core/NServiceBus.Saga/IFindSagas.cs +++ b/src/core/NServiceBus.Saga/IFindSagas.cs @@ -1,30 +1,30 @@ - -namespace NServiceBus.Saga -{ - /// - /// Marker interface for - /// - public interface IFinder { } - - /// - /// Interface indicating that implementers can find sagas of the given type. - /// - /// - public class IFindSagas where T : ISagaEntity - { - /// - /// Narrower interface indicating that implementers can find sagas - /// of type T using messages of type M. - /// - /// - public interface Using : IFinder where M : IMessage - { - /// - /// Finds a saga entity of the type T using a message of type M. - /// - /// - /// - T FindBy(M message); - } - } -} + +namespace NServiceBus.Saga +{ + /// + /// Marker interface for + /// + public interface IFinder { } + + /// + /// Interface indicating that implementers can find sagas of the given type. + /// + /// + public class IFindSagas where T : ISagaEntity + { + /// + /// Narrower interface indicating that implementers can find sagas + /// of type T using messages of type M. + /// + /// + public interface Using : IFinder where M : IMessage + { + /// + /// Finds a saga entity of the type T using a message of type M. + /// + /// + /// + T FindBy(M message); + } + } +} diff --git a/src/core/NServiceBus.Saga/IHandleReplyingToNullOriginator.cs b/src/core/NServiceBus.Saga/IHandleReplyingToNullOriginator.cs index 6305c243532..f3a1b71b2be 100644 --- a/src/core/NServiceBus.Saga/IHandleReplyingToNullOriginator.cs +++ b/src/core/NServiceBus.Saga/IHandleReplyingToNullOriginator.cs @@ -1,13 +1,13 @@ -namespace NServiceBus.Saga -{ - /// - /// Double-dispatch class. - /// - public interface IHandleReplyingToNullOriginator - { - /// - /// Called when the user has tries to reply to a message with out a originator - /// - void TriedToReplyToNullOriginator(); - } +namespace NServiceBus.Saga +{ + /// + /// Double-dispatch class. + /// + public interface IHandleReplyingToNullOriginator + { + /// + /// Called when the user has tries to reply to a message with out a originator + /// + void TriedToReplyToNullOriginator(); + } } \ No newline at end of file diff --git a/src/core/NServiceBus.Saga/IHandleSagaNotFound.cs b/src/core/NServiceBus.Saga/IHandleSagaNotFound.cs index d3a453818f6..d04a9fe6caa 100644 --- a/src/core/NServiceBus.Saga/IHandleSagaNotFound.cs +++ b/src/core/NServiceBus.Saga/IHandleSagaNotFound.cs @@ -1,16 +1,16 @@ -namespace NServiceBus.Saga -{ - /// - /// Implementors will be invoked when a message arrives that should have been processed - /// by a saga, but no existing saga was found. This does not include the scenario when - /// a saga will be created for the given message type. - /// - public interface IHandleSagaNotFound - { - /// - /// Implementors will implement this method, likely using an injected IBus - /// to send responses to the client who sent the message. - /// - void Handle(IMessage message); - } -} +namespace NServiceBus.Saga +{ + /// + /// Implementors will be invoked when a message arrives that should have been processed + /// by a saga, but no existing saga was found. This does not include the scenario when + /// a saga will be created for the given message type. + /// + public interface IHandleSagaNotFound + { + /// + /// Implementors will implement this method, likely using an injected IBus + /// to send responses to the client who sent the message. + /// + void Handle(IMessage message); + } +} diff --git a/src/core/NServiceBus.Saga/ISaga.cs b/src/core/NServiceBus.Saga/ISaga.cs index fdf452cc9d9..1cf5b70ac73 100644 --- a/src/core/NServiceBus.Saga/ISaga.cs +++ b/src/core/NServiceBus.Saga/ISaga.cs @@ -1,32 +1,32 @@ - -namespace NServiceBus.Saga -{ - /// - /// Implement this interface if you want to write a saga with minimal infrastructure support. - /// It is recommended you inherit the abstract class to get the most functionality. - /// - public interface ISaga : ITimeoutable, HasCompleted - { - /// - /// The saga's data. - /// - ISagaEntity Entity { get; set; } - - /// - /// Used for retrieving the endpoint which caused the saga to be initiated. - /// - IBus Bus { get; set; } - } - - /// - /// A more strongly typed version of ISaga meant to be implemented by application developers - /// - /// - public interface ISaga : ISaga where T : ISagaEntity - { - /// - /// The saga's data. - /// - T Data { get; set; } - } -} + +namespace NServiceBus.Saga +{ + /// + /// Implement this interface if you want to write a saga with minimal infrastructure support. + /// It is recommended you inherit the abstract class to get the most functionality. + /// + public interface ISaga : ITimeoutable, HasCompleted + { + /// + /// The saga's data. + /// + ISagaEntity Entity { get; set; } + + /// + /// Used for retrieving the endpoint which caused the saga to be initiated. + /// + IBus Bus { get; set; } + } + + /// + /// A more strongly typed version of ISaga meant to be implemented by application developers + /// + /// + public interface ISaga : ISaga where T : ISagaEntity + { + /// + /// The saga's data. + /// + T Data { get; set; } + } +} diff --git a/src/core/NServiceBus.Saga/ISagaEntity.cs b/src/core/NServiceBus.Saga/ISagaEntity.cs index 3e9ecf3a055..eb7353d7dd2 100644 --- a/src/core/NServiceBus.Saga/ISagaEntity.cs +++ b/src/core/NServiceBus.Saga/ISagaEntity.cs @@ -1,38 +1,38 @@ -using System; - -namespace NServiceBus.Saga -{ - /// - /// Defines the basic data used by long-running processes. - /// - public interface ISagaEntity - { - /// - /// Gets/sets the Id of the process. Do NOT generate this value in your code. - /// The value of the Id will be generated automatically to provide the - /// best performance for saving in a database. - /// - /// - /// The reason Guid is used for process Id is that messages containing this Id need - /// to be sent by the process even before it is persisted. - /// - Guid Id { get; set; } - - /// - /// Contains the return address of the endpoint that caused the process to run. - /// - string Originator { get; set; } - - /// - /// Contains the Id of the message which caused the saga to start. - /// This is needed so that when we reply to the Originator, any - /// registered callbacks will be fired correctly. - /// - string OriginalMessageId { get; set; } - } - - /// - /// The saga data that will be persisted. - /// - public interface IContainSagaData : ISagaEntity {} -} +using System; + +namespace NServiceBus.Saga +{ + /// + /// Defines the basic data used by long-running processes. + /// + public interface ISagaEntity + { + /// + /// Gets/sets the Id of the process. Do NOT generate this value in your code. + /// The value of the Id will be generated automatically to provide the + /// best performance for saving in a database. + /// + /// + /// The reason Guid is used for process Id is that messages containing this Id need + /// to be sent by the process even before it is persisted. + /// + Guid Id { get; set; } + + /// + /// Contains the return address of the endpoint that caused the process to run. + /// + string Originator { get; set; } + + /// + /// Contains the Id of the message which caused the saga to start. + /// This is needed so that when we reply to the Originator, any + /// registered callbacks will be fired correctly. + /// + string OriginalMessageId { get; set; } + } + + /// + /// The saga data that will be persisted. + /// + public interface IContainSagaData : ISagaEntity {} +} diff --git a/src/core/NServiceBus.Saga/ISagaMessage.cs b/src/core/NServiceBus.Saga/ISagaMessage.cs index a8f8b2a8108..9e55b9702cc 100644 --- a/src/core/NServiceBus.Saga/ISagaMessage.cs +++ b/src/core/NServiceBus.Saga/ISagaMessage.cs @@ -1,16 +1,16 @@ -using System; - -namespace NServiceBus.Saga -{ - /// - /// An interface used to mark messages as requiring the attention of the - /// saga infrastructure. - /// - public interface ISagaMessage : IMessage - { - /// - /// Gets/sets the Id of the saga the message is related to. - /// - Guid SagaId { get; set; } - } -} +using System; + +namespace NServiceBus.Saga +{ + /// + /// An interface used to mark messages as requiring the attention of the + /// saga infrastructure. + /// + public interface ISagaMessage : IMessage + { + /// + /// Gets/sets the Id of the saga the message is related to. + /// + Guid SagaId { get; set; } + } +} diff --git a/src/core/NServiceBus.Saga/ISagaPersister.cs b/src/core/NServiceBus.Saga/ISagaPersister.cs index 951b919aac2..f8121194e6f 100644 --- a/src/core/NServiceBus.Saga/ISagaPersister.cs +++ b/src/core/NServiceBus.Saga/ISagaPersister.cs @@ -1,51 +1,51 @@ -using System; - -namespace NServiceBus.Saga -{ - /// - /// Defines the basic functionality of a persister for storing - /// and retrieving a saga. - /// - public interface ISagaPersister - { - /// - /// Saves the saga entity to the persistence store. - /// - /// The saga entity to save. - void Save(ISagaEntity saga); - - /// - /// Updates an existing saga entity in the persistence store. - /// - /// The saga entity to updated. - void Update(ISagaEntity saga); - - /// - /// Gets a saga entity from the persistence store by its Id. - /// - /// The Id of the saga entity to get. - /// - T Get(Guid sagaId) where T : ISagaEntity; - - /// - /// Looks up a saga entity by a given property. - /// - /// - /// - /// - /// - T Get(string property, object value) where T : ISagaEntity; - - /// - /// Sets a saga as completed and removes it from the active saga list - /// in the persistence store. - /// - /// The saga to complete. - void Complete(ISagaEntity saga); - } - - /// - /// Interface responsible for persisting sagas. - /// - public interface IPersistSagas : ISagaPersister {} -} +using System; + +namespace NServiceBus.Saga +{ + /// + /// Defines the basic functionality of a persister for storing + /// and retrieving a saga. + /// + public interface ISagaPersister + { + /// + /// Saves the saga entity to the persistence store. + /// + /// The saga entity to save. + void Save(ISagaEntity saga); + + /// + /// Updates an existing saga entity in the persistence store. + /// + /// The saga entity to updated. + void Update(ISagaEntity saga); + + /// + /// Gets a saga entity from the persistence store by its Id. + /// + /// The Id of the saga entity to get. + /// + T Get(Guid sagaId) where T : ISagaEntity; + + /// + /// Looks up a saga entity by a given property. + /// + /// + /// + /// + /// + T Get(string property, object value) where T : ISagaEntity; + + /// + /// Sets a saga as completed and removes it from the active saga list + /// in the persistence store. + /// + /// The saga to complete. + void Complete(ISagaEntity saga); + } + + /// + /// Interface responsible for persisting sagas. + /// + public interface IPersistSagas : ISagaPersister {} +} diff --git a/src/core/NServiceBus.Saga/ISagaStartedBy.cs b/src/core/NServiceBus.Saga/ISagaStartedBy.cs index 04859766562..82006546406 100644 --- a/src/core/NServiceBus.Saga/ISagaStartedBy.cs +++ b/src/core/NServiceBus.Saga/ISagaStartedBy.cs @@ -1,21 +1,21 @@ - -namespace NServiceBus.Saga -{ - /// - /// Use this interface to signify that when a message of the given type is - /// received, if a saga cannot be found by an - /// the saga will be created. - /// - /// - public interface ISagaStartedBy : IMessageHandler where T : IMessage - { - } - - /// - /// Use this interface to signify that when a message of the given type is - /// received, if a saga cannot be found by an - /// the saga will be created. - /// - /// - public interface IAmStartedByMessages : ISagaStartedBy where T : IMessage {} -} + +namespace NServiceBus.Saga +{ + /// + /// Use this interface to signify that when a message of the given type is + /// received, if a saga cannot be found by an + /// the saga will be created. + /// + /// + public interface ISagaStartedBy : IMessageHandler where T : IMessage + { + } + + /// + /// Use this interface to signify that when a message of the given type is + /// received, if a saga cannot be found by an + /// the saga will be created. + /// + /// + public interface IAmStartedByMessages : ISagaStartedBy where T : IMessage {} +} diff --git a/src/core/NServiceBus.Saga/ITimeoutable.cs b/src/core/NServiceBus.Saga/ITimeoutable.cs index 84f77523177..99ff2084889 100644 --- a/src/core/NServiceBus.Saga/ITimeoutable.cs +++ b/src/core/NServiceBus.Saga/ITimeoutable.cs @@ -1,15 +1,15 @@ -namespace NServiceBus.Saga -{ - /// - /// Interface used by the saga infrastructure for notifying sagas about a timeout. - /// - public interface ITimeoutable - { - /// - /// Indicates to the saga that a timeout has occurred, - /// passing in the state object previously received from the saga. - /// - /// - void Timeout(object state); - } -} +namespace NServiceBus.Saga +{ + /// + /// Interface used by the saga infrastructure for notifying sagas about a timeout. + /// + public interface ITimeoutable + { + /// + /// Indicates to the saga that a timeout has occurred, + /// passing in the state object previously received from the saga. + /// + /// + void Timeout(object state); + } +} diff --git a/src/core/NServiceBus.Saga/NServiceBus.Saga.csproj b/src/core/NServiceBus.Saga/NServiceBus.Saga.csproj index 3ee75fee1cc..b5c254ef354 100644 --- a/src/core/NServiceBus.Saga/NServiceBus.Saga.csproj +++ b/src/core/NServiceBus.Saga/NServiceBus.Saga.csproj @@ -1,124 +1,124 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {C1DE5465-4694-475A-8D06-E17733C41D69} - Library - Properties - NServiceBus.Saga - NServiceBus.Saga - - - - - - v4.0 - true - ..\..\..\NServiceBus.snk - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.Saga.XML - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.Saga.XML - AllRules.ruleset - - - - - 3.5 - - - - - - - CommonAssemblyInfo.cs - - - - - - - - - Code - - - - - - - - - - - - - {73867D40-8CBB-48E9-BFFA-12BBDD48A341} - NServiceBus - False - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\build\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {C1DE5465-4694-475A-8D06-E17733C41D69} + Library + Properties + NServiceBus.Saga + NServiceBus.Saga + + + + + + v4.0 + true + ..\..\..\NServiceBus.snk + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.Saga.XML + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.Saga.XML + AllRules.ruleset + + + + + 3.5 + + + + + + + CommonAssemblyInfo.cs + + + + + + + + + Code + + + + + + + + + + + + + {73867D40-8CBB-48E9-BFFA-12BBDD48A341} + NServiceBus + False + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\build\" + \ No newline at end of file diff --git a/src/core/NServiceBus.Saga/Properties/AssemblyInfo.cs b/src/core/NServiceBus.Saga/Properties/AssemblyInfo.cs index 32d70807463..2b38ec3ded5 100644 --- a/src/core/NServiceBus.Saga/Properties/AssemblyInfo.cs +++ b/src/core/NServiceBus.Saga/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Saga Core Interfaces")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Saga Core Interfaces")] [assembly: AssemblyDescription("Core interfaces for saga capabilities of nServiceBus")] \ No newline at end of file diff --git a/src/core/NServiceBus.Saga/Saga.cs b/src/core/NServiceBus.Saga/Saga.cs index da5fe027676..bba259604b0 100644 --- a/src/core/NServiceBus.Saga/Saga.cs +++ b/src/core/NServiceBus.Saga/Saga.cs @@ -1,156 +1,156 @@ -using System; -using System.Linq.Expressions; - -namespace NServiceBus.Saga -{ - /// - /// This class is used to define sagas containing data and handling a message. - /// To handle more message types, implement - /// for the relevant types. - /// To signify that the receipt of a message should start this saga, - /// implement for the relevant message type. - /// - /// A type that implements . - public abstract class Saga : IConfigurable, ISaga where T : ISagaEntity - { - /// - /// The saga's strongly typed data. - /// - public T Data { get; set; } - - /// - /// A more generic projection on . - /// - public ISagaEntity Entity - { - get { return Data; } - set { Data = (T)value; } - } - - private bool configuring; - void IConfigurable.Configure() - { - configuring = true; - ConfigureHowToFindSaga(); - configuring = false; - } - - /// - /// Override this method in order to configure how this saga's data should be found. - /// Call ConfigureMapping<TMessage> for each property of each message you want - /// to use for lookup. - /// - public virtual void ConfigureHowToFindSaga() - { - } - - /// - /// When the infrastructure is handling a message of the given type - /// this specifies which message property should be matched to - /// which saga entity property in the persistent saga store. - /// - /// - /// - /// - protected virtual void ConfigureMapping(Expression> sagaEntityProperty, Expression> messageProperty) where TMessage : IMessage - { - if (!configuring) - throw new InvalidOperationException("Cannot configure mappings outside of 'ConfigureHowToFindSaga'."); - - SagaMessageFindingConfiguration.ConfigureMapping(sagaEntityProperty, messageProperty); - } - - - /// - /// Called by saga to notify the infrastructure when attempting to reply to message where the originator is null - /// - public IHandleReplyingToNullOriginator HandleReplyingToNullOriginator { get; set; } - - - /// - /// Bus object used for retrieving the sender endpoint which caused this saga to start. - /// Necessary for . - /// - public IBus Bus { get; set; } - - /// - /// Object used to configure mapping between saga properties and message properties - /// for the purposes of finding sagas when a message arrives. - /// - /// Do NOT use at runtime (handling messages) - it will be null. - /// - public IConfigureHowToFindSagaWithMessage SagaMessageFindingConfiguration { get; set; } - - /// - /// Indicates that the saga is complete. - /// In order to set this value, use the method. - /// - public bool Completed { get; private set; } - - /// - /// Request for a timeout to occur at the given time. - /// Causes a callback to the method with the given state. - /// - /// - /// - protected virtual void RequestTimeout(DateTime at, object withState) - { - RequestTimeout(at - DateTime.Now, withState); - } - - /// - /// Request for a timeout to occur at the given time. - /// Causes a callback to the method with the given state. - /// - /// - /// - protected virtual void RequestTimeout(TimeSpan within, object withState) - { - if (within <= TimeSpan.Zero) - Timeout(withState); - else - Bus.Send(new TimeoutMessage(within, Data, withState)); - } - - /// - /// Sends the given messages using the bus to the endpoint that caused this saga to start. - /// - /// - protected virtual void ReplyToOriginator(params IMessage[] messages) - { - if (string.IsNullOrEmpty(Data.Originator)) - HandleReplyingToNullOriginator.TriedToReplyToNullOriginator(); - else - Bus.Send(Data.Originator, Data.OriginalMessageId, messages); - } - - /// - /// Instantiates a message of the given type, setting its properties using the given action, - /// and sends it using the bus to the endpoint that caused this saga to start. - /// - /// - /// - protected virtual void ReplyToOriginator(Action messageConstructor) where TMessage : IMessage - { - var message = Bus.CreateInstance(messageConstructor); - ReplyToOriginator(message); - } - - /// - /// Marks the saga as complete. - /// This may result in the sagas state being deleted by the persister. - /// - protected virtual void MarkAsComplete() - { - Completed = true; - } - - /// - /// Notifies that the timeout it previously requested occurred. - /// - /// The object passed as the "withState" parameter to RequestTimeout. - public virtual void Timeout(object state) - { - } - } -} +using System; +using System.Linq.Expressions; + +namespace NServiceBus.Saga +{ + /// + /// This class is used to define sagas containing data and handling a message. + /// To handle more message types, implement + /// for the relevant types. + /// To signify that the receipt of a message should start this saga, + /// implement for the relevant message type. + /// + /// A type that implements . + public abstract class Saga : IConfigurable, ISaga where T : ISagaEntity + { + /// + /// The saga's strongly typed data. + /// + public T Data { get; set; } + + /// + /// A more generic projection on . + /// + public ISagaEntity Entity + { + get { return Data; } + set { Data = (T)value; } + } + + private bool configuring; + void IConfigurable.Configure() + { + configuring = true; + ConfigureHowToFindSaga(); + configuring = false; + } + + /// + /// Override this method in order to configure how this saga's data should be found. + /// Call ConfigureMapping<TMessage> for each property of each message you want + /// to use for lookup. + /// + public virtual void ConfigureHowToFindSaga() + { + } + + /// + /// When the infrastructure is handling a message of the given type + /// this specifies which message property should be matched to + /// which saga entity property in the persistent saga store. + /// + /// + /// + /// + protected virtual void ConfigureMapping(Expression> sagaEntityProperty, Expression> messageProperty) where TMessage : IMessage + { + if (!configuring) + throw new InvalidOperationException("Cannot configure mappings outside of 'ConfigureHowToFindSaga'."); + + SagaMessageFindingConfiguration.ConfigureMapping(sagaEntityProperty, messageProperty); + } + + + /// + /// Called by saga to notify the infrastructure when attempting to reply to message where the originator is null + /// + public IHandleReplyingToNullOriginator HandleReplyingToNullOriginator { get; set; } + + + /// + /// Bus object used for retrieving the sender endpoint which caused this saga to start. + /// Necessary for . + /// + public IBus Bus { get; set; } + + /// + /// Object used to configure mapping between saga properties and message properties + /// for the purposes of finding sagas when a message arrives. + /// + /// Do NOT use at runtime (handling messages) - it will be null. + /// + public IConfigureHowToFindSagaWithMessage SagaMessageFindingConfiguration { get; set; } + + /// + /// Indicates that the saga is complete. + /// In order to set this value, use the method. + /// + public bool Completed { get; private set; } + + /// + /// Request for a timeout to occur at the given time. + /// Causes a callback to the method with the given state. + /// + /// + /// + protected virtual void RequestTimeout(DateTime at, object withState) + { + RequestTimeout(at - DateTime.Now, withState); + } + + /// + /// Request for a timeout to occur at the given time. + /// Causes a callback to the method with the given state. + /// + /// + /// + protected virtual void RequestTimeout(TimeSpan within, object withState) + { + if (within <= TimeSpan.Zero) + Timeout(withState); + else + Bus.Send(new TimeoutMessage(within, Data, withState)); + } + + /// + /// Sends the given messages using the bus to the endpoint that caused this saga to start. + /// + /// + protected virtual void ReplyToOriginator(params IMessage[] messages) + { + if (string.IsNullOrEmpty(Data.Originator)) + HandleReplyingToNullOriginator.TriedToReplyToNullOriginator(); + else + Bus.Send(Data.Originator, Data.OriginalMessageId, messages); + } + + /// + /// Instantiates a message of the given type, setting its properties using the given action, + /// and sends it using the bus to the endpoint that caused this saga to start. + /// + /// + /// + protected virtual void ReplyToOriginator(Action messageConstructor) where TMessage : IMessage + { + var message = Bus.CreateInstance(messageConstructor); + ReplyToOriginator(message); + } + + /// + /// Marks the saga as complete. + /// This may result in the sagas state being deleted by the persister. + /// + protected virtual void MarkAsComplete() + { + Completed = true; + } + + /// + /// Notifies that the timeout it previously requested occurred. + /// + /// The object passed as the "withState" parameter to RequestTimeout. + public virtual void Timeout(object state) + { + } + } +} diff --git a/src/core/NServiceBus.Saga/TimeoutMessage.cs b/src/core/NServiceBus.Saga/TimeoutMessage.cs index 4a195f9f59f..a753682e585 100644 --- a/src/core/NServiceBus.Saga/TimeoutMessage.cs +++ b/src/core/NServiceBus.Saga/TimeoutMessage.cs @@ -1,92 +1,92 @@ -using System; - -namespace NServiceBus.Saga -{ - /// - /// A message to signal a saga that a reminder was set. - /// - [Serializable] - [Recoverable] - public class TimeoutMessage : ISagaMessage - { - /// - /// Default constructor for serialization purposes. - /// - public TimeoutMessage() { } - - /// - /// Indicate a timeout at the expiration time for the given saga maintaining the given state. - /// - /// - /// - /// - public TimeoutMessage(DateTime expiration, ISagaEntity saga, object state) - { - expires = DateTime.SpecifyKind(expiration, DateTimeKind.Utc); - SagaId = saga.Id; - State = state; - } - - /// - /// Indicate a timeout within the given time for the given saga maintaing the given state. - /// - /// - /// - /// - public TimeoutMessage(TimeSpan expireIn, ISagaEntity saga, object state) : - this(DateTime.Now + expireIn, saga, state) - { - - } - - /// - /// Signal to the timeout manager that all other - /// objects can be cleared for the given . - /// - /// - /// - public TimeoutMessage(ISagaEntity saga, bool clear) - { - SagaId = saga.Id; - ClearTimeout = clear; - } - - private DateTime expires; - - /// - /// Gets/sets the date and time at which the timeout message is due to expire. - /// Values are stored as . - /// - public DateTime Expires - { - get { return expires; } - set { expires = DateTime.SpecifyKind(value, DateTimeKind.Utc); } - } - - /// - /// Gets/sets the Id of the workflow the TimeoutMessage is connected to. - /// - public Guid SagaId { get; set; } - - /// - /// Should be used for data to differentiate between various - /// timeout occurrences. - /// - public object State { get; set; } - - /// - /// When true, signals to the timeout manager that all other objects - /// can be cleared for the given . - /// - public bool ClearTimeout { get; set; } - - /// - /// Gets whether or not the TimeoutMessage has expired. - /// - /// true if the message has expired, otherwise false. - public bool HasNotExpired() - { - return DateTime.Now < expires; - } - } -} +using System; + +namespace NServiceBus.Saga +{ + /// + /// A message to signal a saga that a reminder was set. + /// + [Serializable] + [Recoverable] + public class TimeoutMessage : ISagaMessage + { + /// + /// Default constructor for serialization purposes. + /// + public TimeoutMessage() { } + + /// + /// Indicate a timeout at the expiration time for the given saga maintaining the given state. + /// + /// + /// + /// + public TimeoutMessage(DateTime expiration, ISagaEntity saga, object state) + { + expires = DateTime.SpecifyKind(expiration, DateTimeKind.Utc); + SagaId = saga.Id; + State = state; + } + + /// + /// Indicate a timeout within the given time for the given saga maintaing the given state. + /// + /// + /// + /// + public TimeoutMessage(TimeSpan expireIn, ISagaEntity saga, object state) : + this(DateTime.Now + expireIn, saga, state) + { + + } + + /// + /// Signal to the timeout manager that all other + /// objects can be cleared for the given . + /// + /// + /// + public TimeoutMessage(ISagaEntity saga, bool clear) + { + SagaId = saga.Id; + ClearTimeout = clear; + } + + private DateTime expires; + + /// + /// Gets/sets the date and time at which the timeout message is due to expire. + /// Values are stored as . + /// + public DateTime Expires + { + get { return expires; } + set { expires = DateTime.SpecifyKind(value, DateTimeKind.Utc); } + } + + /// + /// Gets/sets the Id of the workflow the TimeoutMessage is connected to. + /// + public Guid SagaId { get; set; } + + /// + /// Should be used for data to differentiate between various + /// timeout occurrences. + /// + public object State { get; set; } + + /// + /// When true, signals to the timeout manager that all other objects + /// can be cleared for the given . + /// + public bool ClearTimeout { get; set; } + + /// + /// Gets whether or not the TimeoutMessage has expired. + /// + /// true if the message has expired, otherwise false. + public bool HasNotExpired() + { + return DateTime.Now < expires; + } + } +} diff --git a/src/core/NServiceBus.Serialization/IMessageSerializer.cs b/src/core/NServiceBus.Serialization/IMessageSerializer.cs index f2c6a1db401..0a163f99eef 100644 --- a/src/core/NServiceBus.Serialization/IMessageSerializer.cs +++ b/src/core/NServiceBus.Serialization/IMessageSerializer.cs @@ -1,25 +1,25 @@ -using System; -using System.IO; - -namespace NServiceBus.Serialization -{ - /// - /// Interface used for serializing and deserializing messages. - /// - public interface IMessageSerializer - { - /// - /// Serializes the given set of messages into the given stream. - /// - /// - /// - void Serialize(IMessage[] messages, Stream stream); - - /// - /// Deserializes from the given stream a set of messages. - /// - /// - /// - IMessage[] Deserialize(Stream stream); - } -} +using System; +using System.IO; + +namespace NServiceBus.Serialization +{ + /// + /// Interface used for serializing and deserializing messages. + /// + public interface IMessageSerializer + { + /// + /// Serializes the given set of messages into the given stream. + /// + /// + /// + void Serialize(IMessage[] messages, Stream stream); + + /// + /// Deserializes from the given stream a set of messages. + /// + /// + /// + IMessage[] Deserialize(Stream stream); + } +} diff --git a/src/core/NServiceBus.Serialization/NServiceBus.Serialization.csproj b/src/core/NServiceBus.Serialization/NServiceBus.Serialization.csproj index 7c9db6551d6..6ebaeb22943 100644 --- a/src/core/NServiceBus.Serialization/NServiceBus.Serialization.csproj +++ b/src/core/NServiceBus.Serialization/NServiceBus.Serialization.csproj @@ -1,106 +1,106 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {F7563AAC-BA9E-4762-888D-27DB9399AF54} - Library - Properties - NServiceBus.Serialization - NServiceBus.Serialization - - - - - - v4.0 - true - ..\..\..\NServiceBus.snk - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.Serialization.XML - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.Serialization.XML - AllRules.ruleset - - - - - 3.5 - - - - - CommonAssemblyInfo.cs - - - - - - - {73867D40-8CBB-48E9-BFFA-12BBDD48A341} - NServiceBus - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\build\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {F7563AAC-BA9E-4762-888D-27DB9399AF54} + Library + Properties + NServiceBus.Serialization + NServiceBus.Serialization + + + + + + v4.0 + true + ..\..\..\NServiceBus.snk + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.Serialization.XML + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.Serialization.XML + AllRules.ruleset + + + + + 3.5 + + + + + CommonAssemblyInfo.cs + + + + + + + {73867D40-8CBB-48E9-BFFA-12BBDD48A341} + NServiceBus + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\build\" + \ No newline at end of file diff --git a/src/core/NServiceBus.Serialization/Properties/AssemblyInfo.cs b/src/core/NServiceBus.Serialization/Properties/AssemblyInfo.cs index cfd1252c87b..3a9ee75d784 100644 --- a/src/core/NServiceBus.Serialization/Properties/AssemblyInfo.cs +++ b/src/core/NServiceBus.Serialization/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Serialization Core Interfaces")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Serialization Core Interfaces")] [assembly: AssemblyDescription("Core interfaces for serialization capabilities of nServiceBus")] \ No newline at end of file diff --git a/src/core/NServiceBus.sln b/src/core/NServiceBus.sln index 21cc351e6be..9c7bc5e4f8b 100644 --- a/src/core/NServiceBus.sln +++ b/src/core/NServiceBus.sln @@ -1,32 +1,32 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus", "NServiceBus\NServiceBus.csproj", "{73867D40-8CBB-48E9-BFFA-12BBDD48A341}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Saga", "NServiceBus.Saga\NServiceBus.Saga.csproj", "{C1DE5465-4694-475A-8D06-E17733C41D69}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Serialization", "NServiceBus.Serialization\NServiceBus.Serialization.csproj", "{F7563AAC-BA9E-4762-888D-27DB9399AF54}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {73867D40-8CBB-48E9-BFFA-12BBDD48A341}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {73867D40-8CBB-48E9-BFFA-12BBDD48A341}.Debug|Any CPU.Build.0 = Debug|Any CPU - {73867D40-8CBB-48E9-BFFA-12BBDD48A341}.Release|Any CPU.ActiveCfg = Release|Any CPU - {73867D40-8CBB-48E9-BFFA-12BBDD48A341}.Release|Any CPU.Build.0 = Release|Any CPU - {C1DE5465-4694-475A-8D06-E17733C41D69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C1DE5465-4694-475A-8D06-E17733C41D69}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C1DE5465-4694-475A-8D06-E17733C41D69}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C1DE5465-4694-475A-8D06-E17733C41D69}.Release|Any CPU.Build.0 = Release|Any CPU - {F7563AAC-BA9E-4762-888D-27DB9399AF54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F7563AAC-BA9E-4762-888D-27DB9399AF54}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F7563AAC-BA9E-4762-888D-27DB9399AF54}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F7563AAC-BA9E-4762-888D-27DB9399AF54}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus", "NServiceBus\NServiceBus.csproj", "{73867D40-8CBB-48E9-BFFA-12BBDD48A341}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Saga", "NServiceBus.Saga\NServiceBus.Saga.csproj", "{C1DE5465-4694-475A-8D06-E17733C41D69}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Serialization", "NServiceBus.Serialization\NServiceBus.Serialization.csproj", "{F7563AAC-BA9E-4762-888D-27DB9399AF54}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {73867D40-8CBB-48E9-BFFA-12BBDD48A341}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {73867D40-8CBB-48E9-BFFA-12BBDD48A341}.Debug|Any CPU.Build.0 = Debug|Any CPU + {73867D40-8CBB-48E9-BFFA-12BBDD48A341}.Release|Any CPU.ActiveCfg = Release|Any CPU + {73867D40-8CBB-48E9-BFFA-12BBDD48A341}.Release|Any CPU.Build.0 = Release|Any CPU + {C1DE5465-4694-475A-8D06-E17733C41D69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C1DE5465-4694-475A-8D06-E17733C41D69}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C1DE5465-4694-475A-8D06-E17733C41D69}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C1DE5465-4694-475A-8D06-E17733C41D69}.Release|Any CPU.Build.0 = Release|Any CPU + {F7563AAC-BA9E-4762-888D-27DB9399AF54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F7563AAC-BA9E-4762-888D-27DB9399AF54}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F7563AAC-BA9E-4762-888D-27DB9399AF54}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F7563AAC-BA9E-4762-888D-27DB9399AF54}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/core/NServiceBus/CompletionResult.cs b/src/core/NServiceBus/CompletionResult.cs index 5050a805db3..b611bcdb68b 100644 --- a/src/core/NServiceBus/CompletionResult.cs +++ b/src/core/NServiceBus/CompletionResult.cs @@ -1,26 +1,26 @@ -using System; - -namespace NServiceBus -{ - /// - /// The object found in .AsyncState returned by the - /// passed to the Send method of the bus. - /// - public class CompletionResult - { - /// - /// If was called, this contains the value passed to it. - /// - public int ErrorCode { get; set; } - - /// - /// If was called, this contains the messages passed to it. - /// - public IMessage[] Messages { get; set; } - - /// - /// An object that can contain state information for the method. - /// - public object State { get; set; } - } -} +using System; + +namespace NServiceBus +{ + /// + /// The object found in .AsyncState returned by the + /// passed to the Send method of the bus. + /// + public class CompletionResult + { + /// + /// If was called, this contains the value passed to it. + /// + public int ErrorCode { get; set; } + + /// + /// If was called, this contains the messages passed to it. + /// + public IMessage[] Messages { get; set; } + + /// + /// An object that can contain state information for the method. + /// + public object State { get; set; } + } +} diff --git a/src/core/NServiceBus/ExtensionMethods.cs b/src/core/NServiceBus/ExtensionMethods.cs index 126e2dd878e..1156356cba2 100644 --- a/src/core/NServiceBus/ExtensionMethods.cs +++ b/src/core/NServiceBus/ExtensionMethods.cs @@ -1,150 +1,150 @@ -using System; -using System.Collections.Generic; - -namespace NServiceBus -{ - /// - /// Class containing extension methods for base class libraries for using interface-based messages. - /// - public static class ExtensionMethods - { - /// - /// Instantiates an instance of T and adds it to the list. - /// - /// The type to instantiate. - /// The list to which to add the new element - /// An action for setting properties of the created instance. - public static void Add(this IList list, Action constructor) where T : IMessage - { - if (MessageCreator == null) - throw new InvalidOperationException("MessageCreator has not been set."); - - list.Add(MessageCreator.CreateInstance(constructor)); - } - - /// - /// Get the header with the given key. Cannot be used to change its value. - /// - /// - /// - /// - public static string GetHeader(this IMessage msg, string key) - { - return GetHeaderAction(msg, key); - } - - /// - /// If the source of this message was an Http endpoint, returns its address - /// otherwise returns null. - /// - /// - /// - public static string GetHttpFromHeader(this IMessage msg) - { - return msg.GetHeader(Headers.HttpFrom); - } - - /// - /// If the target destination of this message is an Http endpoint, - /// return the address of that target, otherwise null. - /// - /// - /// - public static string GetHttpToHeader(this IMessage msg) - { - return msg.GetHeader(Headers.HttpTo); - } - - /// - /// Sets the value of the header for the given key. - /// - /// - /// - /// - public static void SetHeader(this IMessage msg, string key, string value) - { - SetHeaderAction(msg, key, value); - } - - /// - /// Sets the Http address from which this message was received. - /// This method is reserved for the NServiceBus Gateway. - /// - /// - /// - public static void SetHttpFromHeader(this IMessage msg, string value) - { - msg.SetHeader(Headers.HttpFrom, value); - } - - /// - /// Sets the Http address to which this message should be sent. - /// Requires the use of the NServiceBus Gateway. - /// - /// - /// - public static void SetHttpToHeader(this IMessage msg, string value) - { - msg.SetHeader(Headers.HttpTo, value); - } - - /// - /// Gets the value of the header with the given key and sets it for this message. - /// - /// - /// - public static void CopyHeaderFromRequest(this IMessage msg, string key) - { - if (msg == CurrentMessageBeingHandled) - throw new InvalidOperationException("This method is not supported on the request message."); - - msg.SetHeader(key, CurrentMessageBeingHandled.GetHeader(key)); - } - - /// - /// The object used by the extention methods to instantiate types. - /// - public static IMessageCreator MessageCreator { get; set; } - - /// - /// The object used by the extension methods for accessing headers. - /// - public static IBus Bus { get; set; } - - /// - /// The object used to see whether headers requested are for the handled message. - /// - public static IMessage CurrentMessageBeingHandled { get; set; } - - /// - /// The action used to set the header in the method. - /// - public static Action SetHeaderAction { get; set;} - - /// - /// The action used to get the header value in the method. - /// - public static Func GetHeaderAction { get; set; } - - /// - /// The action used to get all the headers for a message. - /// - public static Func> GetStaticOutgoingHeadersAction { get; set; } - } - - /// - /// Static class containing headers used by NServiceBus. - /// - public static class Headers - { - /// - /// Header for retrieving from which Http endpoint the message arrived. - /// - public const string HttpFrom = "NServiceBus.From"; - - /// - /// Header for specifying to which Http endpoint the message should be delivered. - /// - public const string HttpTo = "NServiceBus.To"; - } -} +using System; +using System.Collections.Generic; + +namespace NServiceBus +{ + /// + /// Class containing extension methods for base class libraries for using interface-based messages. + /// + public static class ExtensionMethods + { + /// + /// Instantiates an instance of T and adds it to the list. + /// + /// The type to instantiate. + /// The list to which to add the new element + /// An action for setting properties of the created instance. + public static void Add(this IList list, Action constructor) where T : IMessage + { + if (MessageCreator == null) + throw new InvalidOperationException("MessageCreator has not been set."); + + list.Add(MessageCreator.CreateInstance(constructor)); + } + + /// + /// Get the header with the given key. Cannot be used to change its value. + /// + /// + /// + /// + public static string GetHeader(this IMessage msg, string key) + { + return GetHeaderAction(msg, key); + } + + /// + /// If the source of this message was an Http endpoint, returns its address + /// otherwise returns null. + /// + /// + /// + public static string GetHttpFromHeader(this IMessage msg) + { + return msg.GetHeader(Headers.HttpFrom); + } + + /// + /// If the target destination of this message is an Http endpoint, + /// return the address of that target, otherwise null. + /// + /// + /// + public static string GetHttpToHeader(this IMessage msg) + { + return msg.GetHeader(Headers.HttpTo); + } + + /// + /// Sets the value of the header for the given key. + /// + /// + /// + /// + public static void SetHeader(this IMessage msg, string key, string value) + { + SetHeaderAction(msg, key, value); + } + + /// + /// Sets the Http address from which this message was received. + /// This method is reserved for the NServiceBus Gateway. + /// + /// + /// + public static void SetHttpFromHeader(this IMessage msg, string value) + { + msg.SetHeader(Headers.HttpFrom, value); + } + + /// + /// Sets the Http address to which this message should be sent. + /// Requires the use of the NServiceBus Gateway. + /// + /// + /// + public static void SetHttpToHeader(this IMessage msg, string value) + { + msg.SetHeader(Headers.HttpTo, value); + } + + /// + /// Gets the value of the header with the given key and sets it for this message. + /// + /// + /// + public static void CopyHeaderFromRequest(this IMessage msg, string key) + { + if (msg == CurrentMessageBeingHandled) + throw new InvalidOperationException("This method is not supported on the request message."); + + msg.SetHeader(key, CurrentMessageBeingHandled.GetHeader(key)); + } + + /// + /// The object used by the extention methods to instantiate types. + /// + public static IMessageCreator MessageCreator { get; set; } + + /// + /// The object used by the extension methods for accessing headers. + /// + public static IBus Bus { get; set; } + + /// + /// The object used to see whether headers requested are for the handled message. + /// + public static IMessage CurrentMessageBeingHandled { get; set; } + + /// + /// The action used to set the header in the method. + /// + public static Action SetHeaderAction { get; set;} + + /// + /// The action used to get the header value in the method. + /// + public static Func GetHeaderAction { get; set; } + + /// + /// The action used to get all the headers for a message. + /// + public static Func> GetStaticOutgoingHeadersAction { get; set; } + } + + /// + /// Static class containing headers used by NServiceBus. + /// + public static class Headers + { + /// + /// Header for retrieving from which Http endpoint the message arrived. + /// + public const string HttpFrom = "NServiceBus.From"; + + /// + /// Header for specifying to which Http endpoint the message should be delivered. + /// + public const string HttpTo = "NServiceBus.To"; + } +} diff --git a/src/core/NServiceBus/IAuthorizeSubscriptions.cs b/src/core/NServiceBus/IAuthorizeSubscriptions.cs index 0250c119162..27e9d538f5a 100644 --- a/src/core/NServiceBus/IAuthorizeSubscriptions.cs +++ b/src/core/NServiceBus/IAuthorizeSubscriptions.cs @@ -1,34 +1,34 @@ -using System.Collections.Generic; -using System.Security.Principal; - -namespace NServiceBus -{ - /// - /// Implementer will be called by the infrastructure in order to authorize - /// subscribe and unsubscribe requests from other endpoints. - /// - /// Infrastructure automatically registers one implementing type in the container as a singleton. - /// - public interface IAuthorizeSubscriptions - { - /// - /// Return true if the client endpoint is to be allowed to subscribe to the given message type. - /// Implementors can access the impersonated user via - /// - /// - /// - /// - /// - bool AuthorizeSubscribe(string messageType, string clientEndpoint, IDictionary headers); - - /// - /// Return true if the client endpoint is to be allowed to unsubscribe to the given message type. - /// - /// - /// - /// - /// - bool AuthorizeUnsubscribe(string messageType, string clientEndpoint, IDictionary headers); - - } -} +using System.Collections.Generic; +using System.Security.Principal; + +namespace NServiceBus +{ + /// + /// Implementer will be called by the infrastructure in order to authorize + /// subscribe and unsubscribe requests from other endpoints. + /// + /// Infrastructure automatically registers one implementing type in the container as a singleton. + /// + public interface IAuthorizeSubscriptions + { + /// + /// Return true if the client endpoint is to be allowed to subscribe to the given message type. + /// Implementors can access the impersonated user via + /// + /// + /// + /// + /// + bool AuthorizeSubscribe(string messageType, string clientEndpoint, IDictionary headers); + + /// + /// Return true if the client endpoint is to be allowed to unsubscribe to the given message type. + /// + /// + /// + /// + /// + bool AuthorizeUnsubscribe(string messageType, string clientEndpoint, IDictionary headers); + + } +} diff --git a/src/core/NServiceBus/IBus.cs b/src/core/NServiceBus/IBus.cs index c0d84921354..10aa07896c2 100644 --- a/src/core/NServiceBus/IBus.cs +++ b/src/core/NServiceBus/IBus.cs @@ -1,196 +1,196 @@ -using System; -using System.Collections.Generic; - -namespace NServiceBus -{ - /// - /// Defines a bus to be used with NServiceBus. - /// - public interface IBus : IMessageCreator - { - /// - /// Publishes the list of messages to subscribers. - /// If publishing multiple messages, they should all be of the same type - /// since subscribers are identified by the first message in the list. - /// - /// A list of messages. The first message's type - /// is used for looking up subscribers. - void Publish(params T[] messages) where T : IMessage; - - /// - /// Instantiates a message of type T and publishes it. - /// - /// The type of message, usually an interface - /// An action which initializes properties of the message - void Publish(Action messageConstructor) where T : IMessage; - - /// - /// Subcribes to recieve published messages of the specified type. - /// This method is only necessary if you turned off auto-subscribe. - /// - /// The type of message to subscribe to. - void Subscribe(Type messageType); - - /// - /// Subscribes to recieve published messages of type T. - /// This method is only necessary if you turned off auto-subscribe. - /// - /// The type of message to subscribe to. - void Subscribe() where T : IMessage; - - /// - /// Subscribes to receive published messages of the specified type. - /// When messages arrive, the condition is evaluated to see if they - /// should be handled. - /// - /// The type of message to subscribe to. - /// The condition with which to evaluate messages. - void Subscribe(Type messageType, Predicate condition); - - /// - /// Subscribes to receive published messages of the specified type. - /// When messages arrive, the condition is evaluated to see if they - /// should be handled. - /// - /// The type of message to subscribe to. - /// The condition with which to evaluate messages. - void Subscribe(Predicate condition) where T : IMessage; - - /// - /// Unsubscribes from receiving published messages of the specified type. - /// - /// - void Unsubscribe(Type messageType); - - /// - /// Unsubscribes from receiving published messages of the specified type. - /// - /// The type of message to unsubscribe from. - void Unsubscribe() where T : IMessage; - - /// - /// Sends the list of messages back to the current bus. - /// - /// The messages to send. - void SendLocal(params IMessage[] messages); - - /// - /// Instantiates a message of type T and sends it back to the current bus. - /// - /// The type of message, usually an interface. - /// An action which initializes properties of the message - void SendLocal(Action messageConstructor) where T : IMessage; - - /// - /// Sends the list of provided messages. - /// - /// The list of messages to send. - /// - /// All the messages will be sent to the destination configured for the - /// first message in the list. - /// - ICallback Send(params IMessage[] messages); - - /// - /// Instantiates a message of type T and sends it. - /// - /// The type of message, usually an interface - /// An action which initializes properties of the message - /// - /// The message will be sent to the destination configured for T - /// - ICallback Send(Action messageConstructor) where T : IMessage; - - /// - /// Sends the list of provided messages. - /// - /// - /// The address of the destination to which the messages will be sent. - /// - /// The list of messages to send. - ICallback Send(string destination, params IMessage[] messages); - - /// - /// Instantiates a message of type T and sends it to the given destination. - /// - /// The type of message, usually an interface - /// The destination to which the message will be sent. - /// An action which initializes properties of the message - /// - ICallback Send(string destination, Action messageConstructor) where T : IMessage; - - /// - /// Sends the messages to the destination as well as identifying this - /// as a response to a message containing the Id found in correlationId. - /// - /// - /// - /// - void Send(string destination, string correlationId, params IMessage[] messages); - - /// - /// Instantiates a message of the type T using the given messageConstructor, - /// and sends it to the destination identifying it as a response to a message - /// containing the Id found in correlationId. - /// - /// - /// - /// - /// - void Send(string destination, string correlationId, Action messageConstructor) where T : IMessage; - - /// - /// Sends all messages to the endpoint which sent the message currently being handled on this thread. - /// - /// The messages to send. - void Reply(params IMessage[] messages); - - /// - /// Instantiates a message of type T and performs a regular . - /// - /// The type of message, usually an interface - /// An action which initializes properties of the message - void Reply(Action messageConstructor) where T : IMessage; - - /// - /// Returns a completion message with the specified error code to the sender - /// of the message being handled. The type T can only be an enum or an integer. - /// - /// - /// - void Return(T errorEnum); - - /// - /// Moves the message being handled to the back of the list of available - /// messages so it can be handled later. - /// - void HandleCurrentMessageLater(); - - /// - /// Forwards the current message being handled to the destination maintaining - /// all of its transport-level properties and headers. - /// - /// - void ForwardCurrentMessageTo(string destination); - - /// - /// Tells the bus to stop dispatching the current message to additional - /// handlers. - /// - void DoNotContinueDispatchingCurrentMessageToHandlers(); - - /// - /// Gets the list of key/value pairs that will be in the header of - /// messages being sent by the same thread. - /// - /// This value will be cleared when a thread receives a message. - /// - IDictionary OutgoingHeaders { get; } - - /// - /// Gets the message context containing the Id, return address, and headers - /// of the message currently being handled on this thread. - /// - IMessageContext CurrentMessageContext { get; } - } -} +using System; +using System.Collections.Generic; + +namespace NServiceBus +{ + /// + /// Defines a bus to be used with NServiceBus. + /// + public interface IBus : IMessageCreator + { + /// + /// Publishes the list of messages to subscribers. + /// If publishing multiple messages, they should all be of the same type + /// since subscribers are identified by the first message in the list. + /// + /// A list of messages. The first message's type + /// is used for looking up subscribers. + void Publish(params T[] messages) where T : IMessage; + + /// + /// Instantiates a message of type T and publishes it. + /// + /// The type of message, usually an interface + /// An action which initializes properties of the message + void Publish(Action messageConstructor) where T : IMessage; + + /// + /// Subcribes to recieve published messages of the specified type. + /// This method is only necessary if you turned off auto-subscribe. + /// + /// The type of message to subscribe to. + void Subscribe(Type messageType); + + /// + /// Subscribes to recieve published messages of type T. + /// This method is only necessary if you turned off auto-subscribe. + /// + /// The type of message to subscribe to. + void Subscribe() where T : IMessage; + + /// + /// Subscribes to receive published messages of the specified type. + /// When messages arrive, the condition is evaluated to see if they + /// should be handled. + /// + /// The type of message to subscribe to. + /// The condition with which to evaluate messages. + void Subscribe(Type messageType, Predicate condition); + + /// + /// Subscribes to receive published messages of the specified type. + /// When messages arrive, the condition is evaluated to see if they + /// should be handled. + /// + /// The type of message to subscribe to. + /// The condition with which to evaluate messages. + void Subscribe(Predicate condition) where T : IMessage; + + /// + /// Unsubscribes from receiving published messages of the specified type. + /// + /// + void Unsubscribe(Type messageType); + + /// + /// Unsubscribes from receiving published messages of the specified type. + /// + /// The type of message to unsubscribe from. + void Unsubscribe() where T : IMessage; + + /// + /// Sends the list of messages back to the current bus. + /// + /// The messages to send. + void SendLocal(params IMessage[] messages); + + /// + /// Instantiates a message of type T and sends it back to the current bus. + /// + /// The type of message, usually an interface. + /// An action which initializes properties of the message + void SendLocal(Action messageConstructor) where T : IMessage; + + /// + /// Sends the list of provided messages. + /// + /// The list of messages to send. + /// + /// All the messages will be sent to the destination configured for the + /// first message in the list. + /// + ICallback Send(params IMessage[] messages); + + /// + /// Instantiates a message of type T and sends it. + /// + /// The type of message, usually an interface + /// An action which initializes properties of the message + /// + /// The message will be sent to the destination configured for T + /// + ICallback Send(Action messageConstructor) where T : IMessage; + + /// + /// Sends the list of provided messages. + /// + /// + /// The address of the destination to which the messages will be sent. + /// + /// The list of messages to send. + ICallback Send(string destination, params IMessage[] messages); + + /// + /// Instantiates a message of type T and sends it to the given destination. + /// + /// The type of message, usually an interface + /// The destination to which the message will be sent. + /// An action which initializes properties of the message + /// + ICallback Send(string destination, Action messageConstructor) where T : IMessage; + + /// + /// Sends the messages to the destination as well as identifying this + /// as a response to a message containing the Id found in correlationId. + /// + /// + /// + /// + void Send(string destination, string correlationId, params IMessage[] messages); + + /// + /// Instantiates a message of the type T using the given messageConstructor, + /// and sends it to the destination identifying it as a response to a message + /// containing the Id found in correlationId. + /// + /// + /// + /// + /// + void Send(string destination, string correlationId, Action messageConstructor) where T : IMessage; + + /// + /// Sends all messages to the endpoint which sent the message currently being handled on this thread. + /// + /// The messages to send. + void Reply(params IMessage[] messages); + + /// + /// Instantiates a message of type T and performs a regular . + /// + /// The type of message, usually an interface + /// An action which initializes properties of the message + void Reply(Action messageConstructor) where T : IMessage; + + /// + /// Returns a completion message with the specified error code to the sender + /// of the message being handled. The type T can only be an enum or an integer. + /// + /// + /// + void Return(T errorEnum); + + /// + /// Moves the message being handled to the back of the list of available + /// messages so it can be handled later. + /// + void HandleCurrentMessageLater(); + + /// + /// Forwards the current message being handled to the destination maintaining + /// all of its transport-level properties and headers. + /// + /// + void ForwardCurrentMessageTo(string destination); + + /// + /// Tells the bus to stop dispatching the current message to additional + /// handlers. + /// + void DoNotContinueDispatchingCurrentMessageToHandlers(); + + /// + /// Gets the list of key/value pairs that will be in the header of + /// messages being sent by the same thread. + /// + /// This value will be cleared when a thread receives a message. + /// + IDictionary OutgoingHeaders { get; } + + /// + /// Gets the message context containing the Id, return address, and headers + /// of the message currently being handled on this thread. + /// + IMessageContext CurrentMessageContext { get; } + } +} diff --git a/src/core/NServiceBus/ICallback.cs b/src/core/NServiceBus/ICallback.cs index 1a88dc67c91..a51b76f59a6 100644 --- a/src/core/NServiceBus/ICallback.cs +++ b/src/core/NServiceBus/ICallback.cs @@ -1,38 +1,38 @@ -using System; - -namespace NServiceBus -{ - /// - /// Objects of this interface are returned from calling IBus.Send. - /// The interface allows the caller to register for a callback when a response - /// is received to their original call to IBus.Send. - /// - public interface ICallback - { - /// - /// Registers a callback to be invoked when a response arrives to the message sent. - /// - /// The callback to invoke. - /// State that will be passed to the callback method. - /// An IAsyncResult useful for integration with ASP.NET async tasks. - IAsyncResult Register(AsyncCallback callback, object state); - - /// - /// Registers a callback to be invoked when a response arrives to the message sent. - /// The return code is cast to the given enumerated type - T. - /// - /// An enumeration type or an integer. - /// - void Register(Action callback); - - /// - /// Registers a callback to be invoked when a response arrives to the message sent. - /// The return code is cast to the given enumerated type - T. - /// Pass either a System.Web.UI.Page or a System.Web.Mvc.AsyncController as the synchronizer. - /// - /// - /// - /// - void Register(Action callback, object synchronizer); - } -} +using System; + +namespace NServiceBus +{ + /// + /// Objects of this interface are returned from calling IBus.Send. + /// The interface allows the caller to register for a callback when a response + /// is received to their original call to IBus.Send. + /// + public interface ICallback + { + /// + /// Registers a callback to be invoked when a response arrives to the message sent. + /// + /// The callback to invoke. + /// State that will be passed to the callback method. + /// An IAsyncResult useful for integration with ASP.NET async tasks. + IAsyncResult Register(AsyncCallback callback, object state); + + /// + /// Registers a callback to be invoked when a response arrives to the message sent. + /// The return code is cast to the given enumerated type - T. + /// + /// An enumeration type or an integer. + /// + void Register(Action callback); + + /// + /// Registers a callback to be invoked when a response arrives to the message sent. + /// The return code is cast to the given enumerated type - T. + /// Pass either a System.Web.UI.Page or a System.Web.Mvc.AsyncController as the synchronizer. + /// + /// + /// + /// + void Register(Action callback, object synchronizer); + } +} diff --git a/src/core/NServiceBus/IMessage.cs b/src/core/NServiceBus/IMessage.cs index 9e7834a8d89..e233aa0eacf 100644 --- a/src/core/NServiceBus/IMessage.cs +++ b/src/core/NServiceBus/IMessage.cs @@ -1,71 +1,71 @@ -using System; - -namespace NServiceBus -{ - /// - /// Marker interface to indicate that a class is a message suitable - /// for transmission and handling by an NServiceBus. - /// - public interface IMessage - { - } - - /// - /// Attribute to indicate that a message is recoverable - this is now the default. - /// - /// - /// This attribute should be applied to classes that implement - /// to indicate that they should be treated as a recoverable message. A recoverable - /// message is stored locally at every step along the route so that in the event of - /// a failure of a machine along the route a copy of the message will be recovered and - /// delivery will continue when the machine is brought back online. - [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface)] - public class RecoverableAttribute : Attribute - { - } - - /// - /// Attribute to indicate that the message should not be written to disk. - /// This will make the message vulnerable to server crashes or restarts. - /// - [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface)] - public class ExpressAttribute : Attribute - { - } - - /// - /// Attribute to indicate that a message has a period of time - /// in which to be received. - /// - [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface)] - public class TimeToBeReceivedAttribute : Attribute - { - /// - /// Sets the time to be received to be unlimited. - /// - public TimeToBeReceivedAttribute() { } - - /// - /// Sets the time to be received. - /// - /// A timespan that can be interpreted by . - public TimeToBeReceivedAttribute(string timeSpan) - { - timeToBeReceived = TimeSpan.Parse(timeSpan); - } - - private readonly TimeSpan timeToBeReceived = TimeSpan.MaxValue; - - /// - /// Gets the maximum time in which a message must be received. - /// - /// - /// If the interval specified by the TimeToBeReceived property expires before the message - /// is received by the destination of the message the message will automatically be cancelled. - /// - public TimeSpan TimeToBeReceived - { - get { return timeToBeReceived; } - } - } -} +using System; + +namespace NServiceBus +{ + /// + /// Marker interface to indicate that a class is a message suitable + /// for transmission and handling by an NServiceBus. + /// + public interface IMessage + { + } + + /// + /// Attribute to indicate that a message is recoverable - this is now the default. + /// + /// + /// This attribute should be applied to classes that implement + /// to indicate that they should be treated as a recoverable message. A recoverable + /// message is stored locally at every step along the route so that in the event of + /// a failure of a machine along the route a copy of the message will be recovered and + /// delivery will continue when the machine is brought back online. + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface)] + public class RecoverableAttribute : Attribute + { + } + + /// + /// Attribute to indicate that the message should not be written to disk. + /// This will make the message vulnerable to server crashes or restarts. + /// + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface)] + public class ExpressAttribute : Attribute + { + } + + /// + /// Attribute to indicate that a message has a period of time + /// in which to be received. + /// + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface)] + public class TimeToBeReceivedAttribute : Attribute + { + /// + /// Sets the time to be received to be unlimited. + /// + public TimeToBeReceivedAttribute() { } + + /// + /// Sets the time to be received. + /// + /// A timespan that can be interpreted by . + public TimeToBeReceivedAttribute(string timeSpan) + { + timeToBeReceived = TimeSpan.Parse(timeSpan); + } + + private readonly TimeSpan timeToBeReceived = TimeSpan.MaxValue; + + /// + /// Gets the maximum time in which a message must be received. + /// + /// + /// If the interval specified by the TimeToBeReceived property expires before the message + /// is received by the destination of the message the message will automatically be cancelled. + /// + public TimeSpan TimeToBeReceived + { + get { return timeToBeReceived; } + } + } +} diff --git a/src/core/NServiceBus/IMessageContext.cs b/src/core/NServiceBus/IMessageContext.cs index 2db515b3448..b0e118b30d2 100644 --- a/src/core/NServiceBus/IMessageContext.cs +++ b/src/core/NServiceBus/IMessageContext.cs @@ -1,31 +1,31 @@ -using System; -using System.Collections.Generic; - -namespace NServiceBus -{ - /// - /// Contains out-of-band information on the logical message. - /// - public interface IMessageContext - { - /// - /// Returns the Id of the message. - /// - string Id { get; } - - /// - /// Returns the address of the endpoint that sent this message. - /// - string ReturnAddress { get; } - - /// - /// Returns the time at which the message was sent. - /// - DateTime TimeSent { get; } - - /// - /// Gets the list of key/value pairs found in the header of the message. - /// - IDictionary Headers { get; } - } -} +using System; +using System.Collections.Generic; + +namespace NServiceBus +{ + /// + /// Contains out-of-band information on the logical message. + /// + public interface IMessageContext + { + /// + /// Returns the Id of the message. + /// + string Id { get; } + + /// + /// Returns the address of the endpoint that sent this message. + /// + string ReturnAddress { get; } + + /// + /// Returns the time at which the message was sent. + /// + DateTime TimeSent { get; } + + /// + /// Gets the list of key/value pairs found in the header of the message. + /// + IDictionary Headers { get; } + } +} diff --git a/src/core/NServiceBus/IMessageCreator.cs b/src/core/NServiceBus/IMessageCreator.cs index b3e3fd20f84..8dc5f33df4c 100644 --- a/src/core/NServiceBus/IMessageCreator.cs +++ b/src/core/NServiceBus/IMessageCreator.cs @@ -1,32 +1,32 @@ -using System; - -namespace NServiceBus -{ - /// - /// The abstraction for creating interface-based messages. - /// - public interface IMessageCreator - { - /// - /// Creates an instance of the message type T. - /// - /// The type of message interface to instantiate. - /// A message object that implements the interface T. - T CreateInstance() where T : IMessage; - - /// - /// Creates an instance of the message type T and fills it with data. - /// - /// The type of message interface to instantiate. - /// An action to set various properties of the instantiated object. - /// A message object that implements the interface T. - T CreateInstance(Action action) where T : IMessage; - - /// - /// Creates an instance of the given message type. - /// - /// The type of message to instantiate. - /// A message object that implements the given interface. - object CreateInstance(Type messageType); - } -} +using System; + +namespace NServiceBus +{ + /// + /// The abstraction for creating interface-based messages. + /// + public interface IMessageCreator + { + /// + /// Creates an instance of the message type T. + /// + /// The type of message interface to instantiate. + /// A message object that implements the interface T. + T CreateInstance() where T : IMessage; + + /// + /// Creates an instance of the message type T and fills it with data. + /// + /// The type of message interface to instantiate. + /// An action to set various properties of the instantiated object. + /// A message object that implements the interface T. + T CreateInstance(Action action) where T : IMessage; + + /// + /// Creates an instance of the given message type. + /// + /// The type of message to instantiate. + /// A message object that implements the given interface. + object CreateInstance(Type messageType); + } +} diff --git a/src/core/NServiceBus/IMessageHandler.cs b/src/core/NServiceBus/IMessageHandler.cs index a740db0b197..2b3cb5337a4 100644 --- a/src/core/NServiceBus/IMessageHandler.cs +++ b/src/core/NServiceBus/IMessageHandler.cs @@ -1,24 +1,24 @@ -namespace NServiceBus -{ - /// - /// Defines a message handler. - /// - /// The type of message to be handled. - public interface IMessageHandler where T : IMessage - { - /// - /// Handles a message. - /// - /// The message to handle. - /// - /// This method will be called when a message arrives on the bus and should contain - /// the custom logic to execute when the message is received. - void Handle(T message); - } - - /// - /// Implement this class to be called when messages of the given type arrive at your endpoint. - /// - /// - public interface IHandleMessages : IMessageHandler where T : IMessage {} -} +namespace NServiceBus +{ + /// + /// Defines a message handler. + /// + /// The type of message to be handled. + public interface IMessageHandler where T : IMessage + { + /// + /// Handles a message. + /// + /// The message to handle. + /// + /// This method will be called when a message arrives on the bus and should contain + /// the custom logic to execute when the message is received. + void Handle(T message); + } + + /// + /// Implement this class to be called when messages of the given type arrive at your endpoint. + /// + /// + public interface IHandleMessages : IMessageHandler where T : IMessage {} +} diff --git a/src/core/NServiceBus/IMessageModule.cs b/src/core/NServiceBus/IMessageModule.cs index 898c09cdd5c..63ef9ccce48 100644 --- a/src/core/NServiceBus/IMessageModule.cs +++ b/src/core/NServiceBus/IMessageModule.cs @@ -1,24 +1,24 @@ -namespace NServiceBus -{ - /// - /// Implementers will be called before and after all message handlers. - /// - public interface IMessageModule - { - /// - /// This method is called before any message handlers are called. - /// - void HandleBeginMessage(); - - /// - /// This method is called after all message handlers have been called. - /// - void HandleEndMessage(); - - /// - /// This method is called if there was an error in processing the message, - /// and may be called after . - /// - void HandleError(); - } -} +namespace NServiceBus +{ + /// + /// Implementers will be called before and after all message handlers. + /// + public interface IMessageModule + { + /// + /// This method is called before any message handlers are called. + /// + void HandleBeginMessage(); + + /// + /// This method is called after all message handlers have been called. + /// + void HandleEndMessage(); + + /// + /// This method is called if there was an error in processing the message, + /// and may be called after . + /// + void HandleError(); + } +} diff --git a/src/core/NServiceBus/ISpecifyMessageHandlerOrdering.cs b/src/core/NServiceBus/ISpecifyMessageHandlerOrdering.cs index 3ed2f0ab203..ce074bfbcb8 100644 --- a/src/core/NServiceBus/ISpecifyMessageHandlerOrdering.cs +++ b/src/core/NServiceBus/ISpecifyMessageHandlerOrdering.cs @@ -1,107 +1,107 @@ -using System; -using System.Collections.Generic; - -namespace NServiceBus -{ - /// - /// Specify the order in which message handlers will be invoked. - /// - public interface ISpecifyMessageHandlerOrdering - { - /// - /// In this method, use the order object to specify the order - /// in which message handlers will be activated. - /// - /// - void SpecifyOrder(Order order); - } - - /// - /// Used to specify the order in which message handlers will be activated. - /// - public class Order - { - /// - /// Gets the types whose order has been specified. - /// - public IEnumerable Types { get; private set; } - - - /// - /// Specifies that the given type will be activated before all others. - /// - /// - public void SpecifyFirst() - { - Types = new[] {typeof (T)}; - } - - /// - /// Obselete - use SpecifyFirst instead. - /// - /// - [Obsolete] - public void Specify() - { - SpecifyFirst(); - } - - /// - /// Specifies an ordering of multiple types using the syntax: - /// First{H1}.Then{H2}().AndThen{H3}()... etc - /// - /// - /// - public void Specify(First ordering) - { - Types = ordering.Types; - } - } - - /// - /// Used to indicate the order in which handler types are to run. - /// - /// Not thread safe. - /// - /// The type which will run first. - public class First - { - /// - /// Specifies the type which will run next. - /// - /// - /// - public static First Then() - { - var instance = new First(); - - instance.AndThen(); - instance.AndThen(); - - return instance; - } - - /// - /// Returns the ordered list of types specified. - /// - public IEnumerable Types - { - get { return types; } - } - - /// - /// Specifies the type which will run next - /// - /// - /// - public First AndThen() - { - if (!types.Contains(typeof(K))) - types.Add(typeof(K)); - - return this; - } - - private readonly IList types = new List(); - } -} +using System; +using System.Collections.Generic; + +namespace NServiceBus +{ + /// + /// Specify the order in which message handlers will be invoked. + /// + public interface ISpecifyMessageHandlerOrdering + { + /// + /// In this method, use the order object to specify the order + /// in which message handlers will be activated. + /// + /// + void SpecifyOrder(Order order); + } + + /// + /// Used to specify the order in which message handlers will be activated. + /// + public class Order + { + /// + /// Gets the types whose order has been specified. + /// + public IEnumerable Types { get; private set; } + + + /// + /// Specifies that the given type will be activated before all others. + /// + /// + public void SpecifyFirst() + { + Types = new[] {typeof (T)}; + } + + /// + /// Obselete - use SpecifyFirst instead. + /// + /// + [Obsolete] + public void Specify() + { + SpecifyFirst(); + } + + /// + /// Specifies an ordering of multiple types using the syntax: + /// First{H1}.Then{H2}().AndThen{H3}()... etc + /// + /// + /// + public void Specify(First ordering) + { + Types = ordering.Types; + } + } + + /// + /// Used to indicate the order in which handler types are to run. + /// + /// Not thread safe. + /// + /// The type which will run first. + public class First + { + /// + /// Specifies the type which will run next. + /// + /// + /// + public static First Then() + { + var instance = new First(); + + instance.AndThen(); + instance.AndThen(); + + return instance; + } + + /// + /// Returns the ordered list of types specified. + /// + public IEnumerable Types + { + get { return types; } + } + + /// + /// Specifies the type which will run next + /// + /// + /// + public First AndThen() + { + if (!types.Contains(typeof(K))) + types.Add(typeof(K)); + + return this; + } + + private readonly IList types = new List(); + } +} diff --git a/src/core/NServiceBus/IStartableBus.cs b/src/core/NServiceBus/IStartableBus.cs index ae18d835b49..885767ea90c 100644 --- a/src/core/NServiceBus/IStartableBus.cs +++ b/src/core/NServiceBus/IStartableBus.cs @@ -1,28 +1,28 @@ -using System; - -namespace NServiceBus -{ - /// - /// The interface used for starting and stopping an IBus. - /// - public interface IStartableBus : IDisposable - { - /// - /// Performs the given startup action, starts the bus, and returns a reference to it. - /// - /// Action to be performed before the bus is started. - /// A reference to the bus. - IBus Start(Action startupAction); - - /// - /// Starts the bus and returns a reference to it. - /// - /// - IBus Start(); - - /// - /// Event raised when the bus is started. - /// - event EventHandler Started; - } -} +using System; + +namespace NServiceBus +{ + /// + /// The interface used for starting and stopping an IBus. + /// + public interface IStartableBus : IDisposable + { + /// + /// Performs the given startup action, starts the bus, and returns a reference to it. + /// + /// Action to be performed before the bus is started. + /// A reference to the bus. + IBus Start(Action startupAction); + + /// + /// Starts the bus and returns a reference to it. + /// + /// + IBus Start(); + + /// + /// Event raised when the bus is started. + /// + event EventHandler Started; + } +} diff --git a/src/core/NServiceBus/NServiceBus.csproj b/src/core/NServiceBus/NServiceBus.csproj index a9f032e4f2f..e489fd1e600 100644 --- a/src/core/NServiceBus/NServiceBus.csproj +++ b/src/core/NServiceBus/NServiceBus.csproj @@ -1,114 +1,114 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {73867D40-8CBB-48E9-BFFA-12BBDD48A341} - Library - Properties - NServiceBus - NServiceBus - - - - - - v4.0 - true - ..\..\..\NServiceBus.snk - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.XML - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.XML - AllRules.ruleset - - - - - 3.5 - - - - - - - CommonAssemblyInfo.cs - - - - - - - - - - - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\build\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {73867D40-8CBB-48E9-BFFA-12BBDD48A341} + Library + Properties + NServiceBus + NServiceBus + + + + + + v4.0 + true + ..\..\..\NServiceBus.snk + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.XML + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.XML + AllRules.ruleset + + + + + 3.5 + + + + + + + CommonAssemblyInfo.cs + + + + + + + + + + + + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\build\" + \ No newline at end of file diff --git a/src/core/NServiceBus/Properties/AssemblyInfo.cs b/src/core/NServiceBus/Properties/AssemblyInfo.cs index 91ce31ccdbc..93915b2d210 100644 --- a/src/core/NServiceBus/Properties/AssemblyInfo.cs +++ b/src/core/NServiceBus/Properties/AssemblyInfo.cs @@ -1,25 +1,25 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -using System.Security.Permissions; -[assembly: ReflectionPermission(SecurityAction.RequestMinimum, Unrestricted = true)] -[assembly: AssemblyTitle("NServiceBus Core")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +using System.Security.Permissions; +[assembly: ReflectionPermission(SecurityAction.RequestMinimum, Unrestricted = true)] +[assembly: AssemblyTitle("NServiceBus Core")] [assembly: AssemblyDescription("Enterprise application framework for publish/subscribe and long-running business processes.")] \ No newline at end of file diff --git a/src/core/NServiceBus/WireEncryptedString.cs b/src/core/NServiceBus/WireEncryptedString.cs index e18af6a3d0e..93c7d605e27 100644 --- a/src/core/NServiceBus/WireEncryptedString.cs +++ b/src/core/NServiceBus/WireEncryptedString.cs @@ -1,84 +1,84 @@ -using System; -using System.Runtime.Serialization; - -namespace NServiceBus -{ - /// - /// A string whose value will be encrypted when sent over the wire. - /// - [Serializable] - public class WireEncryptedString:ISerializable - { - /// - /// Default contstructor - /// - public WireEncryptedString() - {} - - /// - /// Deseralizing contructor - /// - /// - /// - public WireEncryptedString(SerializationInfo info, StreamingContext context) - { - EncryptedValue = info.GetValue("EncryptedValue", typeof (EncryptedValue)) as EncryptedValue; - } - /// - /// The unencrypted string. - /// - public string Value { get; set; } - - /// - /// The encrypted value of this string - /// - public EncryptedValue EncryptedValue { get; set; } - - /// - /// Gets the string value from the WireEncryptedString. - /// - /// - /// - public static implicit operator string(WireEncryptedString s) - { - return s == null ? null : s.Value; - } - - /// - /// Creates a new WireEncryptedString from the given string. - /// - /// - /// - public static implicit operator WireEncryptedString(string s) - { - return new WireEncryptedString { Value = s }; - } - - /// - /// Method for making default XML serialization work properly for this type. - /// - /// - /// - public void GetObjectData(SerializationInfo info, StreamingContext context) - { - info.AddValue("EncryptedValue", EncryptedValue); - } - } - - /// - /// Class used to represent an encrypted value with an initialization vector. - /// - [Serializable] - public class EncryptedValue - { - /// - /// The encrypted value represented as a Base64 string. - /// - public string EncryptedBase64Value { get; set; } - - /// - /// The initialization vector represented as a Base64 string. - /// - public string Base64Iv { get; set; } - } -} +using System; +using System.Runtime.Serialization; + +namespace NServiceBus +{ + /// + /// A string whose value will be encrypted when sent over the wire. + /// + [Serializable] + public class WireEncryptedString:ISerializable + { + /// + /// Default contstructor + /// + public WireEncryptedString() + {} + + /// + /// Deseralizing contructor + /// + /// + /// + public WireEncryptedString(SerializationInfo info, StreamingContext context) + { + EncryptedValue = info.GetValue("EncryptedValue", typeof (EncryptedValue)) as EncryptedValue; + } + /// + /// The unencrypted string. + /// + public string Value { get; set; } + + /// + /// The encrypted value of this string + /// + public EncryptedValue EncryptedValue { get; set; } + + /// + /// Gets the string value from the WireEncryptedString. + /// + /// + /// + public static implicit operator string(WireEncryptedString s) + { + return s == null ? null : s.Value; + } + + /// + /// Creates a new WireEncryptedString from the given string. + /// + /// + /// + public static implicit operator WireEncryptedString(string s) + { + return new WireEncryptedString { Value = s }; + } + + /// + /// Method for making default XML serialization work properly for this type. + /// + /// + /// + public void GetObjectData(SerializationInfo info, StreamingContext context) + { + info.AddValue("EncryptedValue", EncryptedValue); + } + } + + /// + /// Class used to represent an encrypted value with an initialization vector. + /// + [Serializable] + public class EncryptedValue + { + /// + /// The encrypted value represented as a Base64 string. + /// + public string EncryptedBase64Value { get; set; } + + /// + /// The initialization vector represented as a Base64 string. + /// + public string Base64Iv { get; set; } + } +} diff --git a/src/distributor/MsmqWorkerAvailabilityManager/MsmqWorkerAvailabilityManager.cs b/src/distributor/MsmqWorkerAvailabilityManager/MsmqWorkerAvailabilityManager.cs index df8a587babd..7cd2a2b33ec 100644 --- a/src/distributor/MsmqWorkerAvailabilityManager/MsmqWorkerAvailabilityManager.cs +++ b/src/distributor/MsmqWorkerAvailabilityManager/MsmqWorkerAvailabilityManager.cs @@ -1,122 +1,122 @@ -using System; -using NServiceBus.Unicast.Distributor; -using System.Messaging; -using NServiceBus.Utils; - -namespace MsmqWorkerAvailabilityManager -{ - /// - /// An implementation of for MSMQ to be used - /// with the class. - /// - public class MsmqWorkerAvailabilityManager : IWorkerAvailabilityManager - { - private MessageQueue storageQueue; - - /// - /// Sets the path to the queue that will be used for storing - /// worker availability. - /// - /// The queue provided must be transactional. - public string StorageQueue - { - get { return s; } - set - { - s = value; - - MsmqUtilities.CreateQueueIfNecessary(value); - - var path = MsmqUtilities.GetFullPath(value); - - var q = new MessageQueue(path); - - if (!q.Transactional) - throw new Exception("Queue must be transactional."); - - storageQueue = q; - } - } - private string s; - - /// - /// Removes all entries from the worker availability queue - /// with the specified address. - /// - /// - /// The address of the worker to remove from the availability list. - /// - public void ClearAvailabilityForWorker(string address) - { - lock (locker) - { - var existing = storageQueue.GetAllMessages(); - - foreach (var m in existing) - if (MsmqUtilities.GetIndependentAddressForQueue(m.ResponseQueue) == address) - storageQueue.ReceiveById(m.Id, MessageQueueTransactionType.Automatic); - } - } - - /// - /// Pops the next available worker from the available worker queue - /// and returns its address. - /// - /// The address of the next available worker. - public string PopAvailableWorker() - { - lock (locker) - { - try - { - var m = storageQueue.Receive(TimeSpan.Zero, MessageQueueTransactionType.Automatic); - - if (m == null) - return null; - - return MsmqUtilities.GetIndependentAddressForQueue(m.ResponseQueue); - } - catch (Exception) - { - return null; - } - } - } - - /// - /// Initializes the object. - /// - public void Start() - { - var path = MsmqUtilities.GetFullPath(StorageQueue); - - MsmqUtilities.CreateQueueIfNecessary(StorageQueue); - - var q = new MessageQueue(path); - - if (!q.Transactional) - throw new Exception("Queue must be transactional."); - } - - /// - /// Signal that a worker is available to receive a dispatched message. - /// - /// - /// The address of the worker that will accept the dispatched message. - /// - public void WorkerAvailable(string address) - { - lock (locker) - { - var msg = new Message - { - ResponseQueue = new MessageQueue(MsmqUtilities.GetFullPath(address)) - }; - - storageQueue.Send(msg, MessageQueueTransactionType.Automatic); - } - } - - private readonly object locker = new object(); - } -} +using System; +using NServiceBus.Unicast.Distributor; +using System.Messaging; +using NServiceBus.Utils; + +namespace MsmqWorkerAvailabilityManager +{ + /// + /// An implementation of for MSMQ to be used + /// with the class. + /// + public class MsmqWorkerAvailabilityManager : IWorkerAvailabilityManager + { + private MessageQueue storageQueue; + + /// + /// Sets the path to the queue that will be used for storing + /// worker availability. + /// + /// The queue provided must be transactional. + public string StorageQueue + { + get { return s; } + set + { + s = value; + + MsmqUtilities.CreateQueueIfNecessary(value); + + var path = MsmqUtilities.GetFullPath(value); + + var q = new MessageQueue(path); + + if (!q.Transactional) + throw new Exception("Queue must be transactional."); + + storageQueue = q; + } + } + private string s; + + /// + /// Removes all entries from the worker availability queue + /// with the specified address. + /// + /// + /// The address of the worker to remove from the availability list. + /// + public void ClearAvailabilityForWorker(string address) + { + lock (locker) + { + var existing = storageQueue.GetAllMessages(); + + foreach (var m in existing) + if (MsmqUtilities.GetIndependentAddressForQueue(m.ResponseQueue) == address) + storageQueue.ReceiveById(m.Id, MessageQueueTransactionType.Automatic); + } + } + + /// + /// Pops the next available worker from the available worker queue + /// and returns its address. + /// + /// The address of the next available worker. + public string PopAvailableWorker() + { + lock (locker) + { + try + { + var m = storageQueue.Receive(TimeSpan.Zero, MessageQueueTransactionType.Automatic); + + if (m == null) + return null; + + return MsmqUtilities.GetIndependentAddressForQueue(m.ResponseQueue); + } + catch (Exception) + { + return null; + } + } + } + + /// + /// Initializes the object. + /// + public void Start() + { + var path = MsmqUtilities.GetFullPath(StorageQueue); + + MsmqUtilities.CreateQueueIfNecessary(StorageQueue); + + var q = new MessageQueue(path); + + if (!q.Transactional) + throw new Exception("Queue must be transactional."); + } + + /// + /// Signal that a worker is available to receive a dispatched message. + /// + /// + /// The address of the worker that will accept the dispatched message. + /// + public void WorkerAvailable(string address) + { + lock (locker) + { + var msg = new Message + { + ResponseQueue = new MessageQueue(MsmqUtilities.GetFullPath(address)) + }; + + storageQueue.Send(msg, MessageQueueTransactionType.Automatic); + } + } + + private readonly object locker = new object(); + } +} diff --git a/src/distributor/MsmqWorkerAvailabilityManager/MsmqWorkerAvailabilityManager.csproj b/src/distributor/MsmqWorkerAvailabilityManager/MsmqWorkerAvailabilityManager.csproj index 7e793a4b0d1..ff89ac6cd93 100644 --- a/src/distributor/MsmqWorkerAvailabilityManager/MsmqWorkerAvailabilityManager.csproj +++ b/src/distributor/MsmqWorkerAvailabilityManager/MsmqWorkerAvailabilityManager.csproj @@ -1,113 +1,113 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {A60CA2C3-0B28-4D03-9F0B-19FE56D27689} - Library - Properties - MsmqWorkerAvailabilityManager - MsmqWorkerAvailabilityManager - - - - - - v4.0 - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\MsmqWorkerAvailabilityManager.XML - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\MsmqWorkerAvailabilityManager.XML - AllRules.ruleset - - - - False - ..\..\..\build\output\NServiceBus.dll - - - False - ..\..\..\build\output\NServiceBus.Core.dll - - - - 3.5 - - - - - - CommonAssemblyInfo.cs - - - - - - - {D142D372-C9FA-4505-A6EB-E919746F0FF1} - NServiceBus.Unicast.Distributor - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\build" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {A60CA2C3-0B28-4D03-9F0B-19FE56D27689} + Library + Properties + MsmqWorkerAvailabilityManager + MsmqWorkerAvailabilityManager + + + + + + v4.0 + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\MsmqWorkerAvailabilityManager.XML + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\MsmqWorkerAvailabilityManager.XML + AllRules.ruleset + + + + False + ..\..\..\build\output\NServiceBus.dll + + + False + ..\..\..\build\output\NServiceBus.Core.dll + + + + 3.5 + + + + + + CommonAssemblyInfo.cs + + + + + + + {D142D372-C9FA-4505-A6EB-E919746F0FF1} + NServiceBus.Unicast.Distributor + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\build" + \ No newline at end of file diff --git a/src/distributor/MsmqWorkerAvailabilityManager/MsmqWorkerAvailabilityManager.sln b/src/distributor/MsmqWorkerAvailabilityManager/MsmqWorkerAvailabilityManager.sln index 02578d8450f..8158cd1702a 100644 --- a/src/distributor/MsmqWorkerAvailabilityManager/MsmqWorkerAvailabilityManager.sln +++ b/src/distributor/MsmqWorkerAvailabilityManager/MsmqWorkerAvailabilityManager.sln @@ -1,20 +1,20 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MsmqWorkerAvailabilityManager", "MsmqWorkerAvailabilityManager.csproj", "{A60CA2C3-0B28-4D03-9F0B-19FE56D27689}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A60CA2C3-0B28-4D03-9F0B-19FE56D27689}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A60CA2C3-0B28-4D03-9F0B-19FE56D27689}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A60CA2C3-0B28-4D03-9F0B-19FE56D27689}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A60CA2C3-0B28-4D03-9F0B-19FE56D27689}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MsmqWorkerAvailabilityManager", "MsmqWorkerAvailabilityManager.csproj", "{A60CA2C3-0B28-4D03-9F0B-19FE56D27689}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A60CA2C3-0B28-4D03-9F0B-19FE56D27689}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A60CA2C3-0B28-4D03-9F0B-19FE56D27689}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A60CA2C3-0B28-4D03-9F0B-19FE56D27689}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A60CA2C3-0B28-4D03-9F0B-19FE56D27689}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/distributor/MsmqWorkerAvailabilityManager/Properties/AssemblyInfo.cs b/src/distributor/MsmqWorkerAvailabilityManager/Properties/AssemblyInfo.cs index f8027b86f79..5841a3b84bb 100644 --- a/src/distributor/MsmqWorkerAvailabilityManager/Properties/AssemblyInfo.cs +++ b/src/distributor/MsmqWorkerAvailabilityManager/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus MSMQ Storage for Worker Availability")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus MSMQ Storage for Worker Availability")] [assembly: AssemblyDescription("Functionality for storing worker availability data of distributors using MSMQ in nServiceBus")] \ No newline at end of file diff --git a/src/distributor/NServiceBus.Distributor.sln b/src/distributor/NServiceBus.Distributor.sln index 5bdd4849da0..d70178583af 100644 --- a/src/distributor/NServiceBus.Distributor.sln +++ b/src/distributor/NServiceBus.Distributor.sln @@ -1,36 +1,36 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Distributor", "NServiceBus.Distributor\NServiceBus.Distributor.csproj", "{B14659D0-9371-420B-A82A-1E06AFF04624}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Distributor", "NServiceBus.Unicast.Distributor\NServiceBus.Unicast.Distributor.csproj", "{D142D372-C9FA-4505-A6EB-E919746F0FF1}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MsmqWorkerAvailabilityManager", "MsmqWorkerAvailabilityManager\MsmqWorkerAvailabilityManager.csproj", "{A60CA2C3-0B28-4D03-9F0B-19FE56D27689}" -EndProject -Global - GlobalSection(SubversionScc) = preSolution - Svn-Managed = True - Manager = AnkhSVN - Subversion Support for Visual Studio - EndGlobalSection - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B14659D0-9371-420B-A82A-1E06AFF04624}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B14659D0-9371-420B-A82A-1E06AFF04624}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B14659D0-9371-420B-A82A-1E06AFF04624}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B14659D0-9371-420B-A82A-1E06AFF04624}.Release|Any CPU.Build.0 = Release|Any CPU - {D142D372-C9FA-4505-A6EB-E919746F0FF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D142D372-C9FA-4505-A6EB-E919746F0FF1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D142D372-C9FA-4505-A6EB-E919746F0FF1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D142D372-C9FA-4505-A6EB-E919746F0FF1}.Release|Any CPU.Build.0 = Release|Any CPU - {A60CA2C3-0B28-4D03-9F0B-19FE56D27689}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A60CA2C3-0B28-4D03-9F0B-19FE56D27689}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A60CA2C3-0B28-4D03-9F0B-19FE56D27689}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A60CA2C3-0B28-4D03-9F0B-19FE56D27689}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Distributor", "NServiceBus.Distributor\NServiceBus.Distributor.csproj", "{B14659D0-9371-420B-A82A-1E06AFF04624}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Distributor", "NServiceBus.Unicast.Distributor\NServiceBus.Unicast.Distributor.csproj", "{D142D372-C9FA-4505-A6EB-E919746F0FF1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MsmqWorkerAvailabilityManager", "MsmqWorkerAvailabilityManager\MsmqWorkerAvailabilityManager.csproj", "{A60CA2C3-0B28-4D03-9F0B-19FE56D27689}" +EndProject +Global + GlobalSection(SubversionScc) = preSolution + Svn-Managed = True + Manager = AnkhSVN - Subversion Support for Visual Studio + EndGlobalSection + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B14659D0-9371-420B-A82A-1E06AFF04624}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B14659D0-9371-420B-A82A-1E06AFF04624}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B14659D0-9371-420B-A82A-1E06AFF04624}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B14659D0-9371-420B-A82A-1E06AFF04624}.Release|Any CPU.Build.0 = Release|Any CPU + {D142D372-C9FA-4505-A6EB-E919746F0FF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D142D372-C9FA-4505-A6EB-E919746F0FF1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D142D372-C9FA-4505-A6EB-E919746F0FF1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D142D372-C9FA-4505-A6EB-E919746F0FF1}.Release|Any CPU.Build.0 = Release|Any CPU + {A60CA2C3-0B28-4D03-9F0B-19FE56D27689}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A60CA2C3-0B28-4D03-9F0B-19FE56D27689}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A60CA2C3-0B28-4D03-9F0B-19FE56D27689}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A60CA2C3-0B28-4D03-9F0B-19FE56D27689}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/distributor/NServiceBus.Distributor/App.config b/src/distributor/NServiceBus.Distributor/App.config index 3491e5f0879..3c2a794a104 100644 --- a/src/distributor/NServiceBus.Distributor/App.config +++ b/src/distributor/NServiceBus.Distributor/App.config @@ -1,17 +1,17 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + diff --git a/src/distributor/NServiceBus.Distributor/EndpointRunner.cs b/src/distributor/NServiceBus.Distributor/EndpointRunner.cs index e33f5cc5e58..f951673ac01 100644 --- a/src/distributor/NServiceBus.Distributor/EndpointRunner.cs +++ b/src/distributor/NServiceBus.Distributor/EndpointRunner.cs @@ -1,17 +1,17 @@ -namespace NServiceBus.Distributor -{ - class EndpointRunner : IWantToRunAtStartup - { - public Unicast.Distributor.Distributor Distributor { get; set; } - - public void Run() - { - Distributor.Start(); - } - - public void Stop() - { - Distributor.Stop(); - } - } -} +namespace NServiceBus.Distributor +{ + class EndpointRunner : IWantToRunAtStartup + { + public Unicast.Distributor.Distributor Distributor { get; set; } + + public void Run() + { + Distributor.Start(); + } + + public void Stop() + { + Distributor.Stop(); + } + } +} diff --git a/src/distributor/NServiceBus.Distributor/NServiceBus.Distributor.csproj b/src/distributor/NServiceBus.Distributor/NServiceBus.Distributor.csproj index c81b4c36f6b..e7a42eab09b 100644 --- a/src/distributor/NServiceBus.Distributor/NServiceBus.Distributor.csproj +++ b/src/distributor/NServiceBus.Distributor/NServiceBus.Distributor.csproj @@ -1,92 +1,92 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {B14659D0-9371-420B-A82A-1E06AFF04624} - Library - Properties - NServiceBus.Distributor - NServiceBus.Distributor - v4.0 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\lib\log4net.dll - - - False - ..\..\..\build\output\NServiceBus.dll - - - False - ..\..\..\build\output\NServiceBus.Core.dll - - - False - ..\..\..\build\output\host\NServiceBus.Host.exe - - - - - 3.5 - - - - - CommonAssemblyInfo.cs - - - - - - - - Designer - - - - - {A60CA2C3-0B28-4D03-9F0B-19FE56D27689} - MsmqWorkerAvailabilityManager - - - {D142D372-C9FA-4505-A6EB-E919746F0FF1} - NServiceBus.Unicast.Distributor - - - - - - Program - $(ProjectDir)$(OutputPath)NServiceBus.Host.exe - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {B14659D0-9371-420B-A82A-1E06AFF04624} + Library + Properties + NServiceBus.Distributor + NServiceBus.Distributor + v4.0 + 512 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\lib\log4net.dll + + + False + ..\..\..\build\output\NServiceBus.dll + + + False + ..\..\..\build\output\NServiceBus.Core.dll + + + False + ..\..\..\build\output\host\NServiceBus.Host.exe + + + + + 3.5 + + + + + CommonAssemblyInfo.cs + + + + + + + + Designer + + + + + {A60CA2C3-0B28-4D03-9F0B-19FE56D27689} + MsmqWorkerAvailabilityManager + + + {D142D372-C9FA-4505-A6EB-E919746F0FF1} + NServiceBus.Unicast.Distributor + + + + + + Program + $(ProjectDir)$(OutputPath)NServiceBus.Host.exe + \ No newline at end of file diff --git a/src/distributor/NServiceBus.Distributor/Properties/AssemblyInfo.cs b/src/distributor/NServiceBus.Distributor/Properties/AssemblyInfo.cs index 8ace9e1e37d..86899a231ae 100644 --- a/src/distributor/NServiceBus.Distributor/Properties/AssemblyInfo.cs +++ b/src/distributor/NServiceBus.Distributor/Properties/AssemblyInfo.cs @@ -1,2 +1,2 @@ -using System.Reflection; +using System.Reflection; [assembly: AssemblyTitle("NServiceBus.Distributor")] \ No newline at end of file diff --git a/src/distributor/NServiceBus.Distributor/Service.cs b/src/distributor/NServiceBus.Distributor/Service.cs index 262e1e51392..2a1057b8466 100644 --- a/src/distributor/NServiceBus.Distributor/Service.cs +++ b/src/distributor/NServiceBus.Distributor/Service.cs @@ -1,95 +1,95 @@ -using System.Configuration; -using NServiceBus.Config; -using NServiceBus.Config.ConfigurationSource; -using NServiceBus.Grid.MessageHandlers; -using NServiceBus.ObjectBuilder; -using NServiceBus.Unicast; -using NServiceBus.Unicast.Distributor; -using NServiceBus.Unicast.Queuing; -using NServiceBus.Unicast.Queuing.Msmq; -using NServiceBus.Unicast.Transport.Transactional; - -namespace NServiceBus.Distributor -{ - public class Service : IConfigureThisEndpoint, IWantCustomInitialization - { - public void Init() - { - var numberOfThreads = int.Parse(ConfigurationManager.AppSettings["NumberOfWorkerThreads"]); - var errorQueue = ConfigurationManager.AppSettings["ErrorQueue"]; - - var nameSpace = ConfigurationManager.AppSettings["NameSpace"]; - var serialization = ConfigurationManager.AppSettings["Serialization"]; - - var configure = Configure.With() - .DefaultBuilder() - .CustomConfigurationSource(new Custom { ErrorQueue = errorQueue }) - .MsmqTransport() - .IsTransactional(true) - .UnicastBus() - .ImpersonateSender(true); - - switch (serialization) - { - case "xml": - configure.XmlSerializer(nameSpace); - break; - case "binary": - configure.BinarySerializer(); - break; - default: - throw new ConfigurationErrorsException("Serialization can only be either 'xml', or 'binary'."); - } - - - ConfigureDistributor(numberOfThreads); - - Configure.Instance.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton) - .ConfigureProperty(t => t.NumberOfWorkerThreads, numberOfThreads); - - Configure.Instance.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton) - .ConfigureProperty(t => t.Address, ConfigurationManager.AppSettings["ControlInputQueue"]); - - - Configure.Instance.Configurer.ConfigureComponent( - ComponentCallModelEnum.Singleton) - .ConfigureProperty(x => x.StorageQueue, ConfigurationManager.AppSettings["StorageQueue"]); - - configure.LoadMessageHandlers(First - .Then()); - } - - void ConfigureDistributor(int numberOfThreads) - { - var dataTransport = new TransactionalTransport - { - NumberOfWorkerThreads = numberOfThreads, - IsTransactional = true, - MessageReceiver = new MsmqMessageReceiver() - }; - - var distributor = new Unicast.Distributor.Distributor - { - MessageBusTransport = dataTransport, - MessageSender = new MsmqMessageSender(), - DataTransportInputQueue = ConfigurationManager.AppSettings["DataInputQueue"] - }; - - Configure.Instance.Configurer.RegisterSingleton(distributor); - } - } - - public class Custom : IConfigurationSource - { - public string ErrorQueue { get; set; } - public string InputQueue { get; set; } - - public T GetConfiguration() where T : class, new() - { - if (typeof(T) == typeof(MsmqTransportConfig)) - return new MsmqTransportConfig { ErrorQueue = ErrorQueue, InputQueue = InputQueue } as T; - - return null; - } - } -} +using System.Configuration; +using NServiceBus.Config; +using NServiceBus.Config.ConfigurationSource; +using NServiceBus.Grid.MessageHandlers; +using NServiceBus.ObjectBuilder; +using NServiceBus.Unicast; +using NServiceBus.Unicast.Distributor; +using NServiceBus.Unicast.Queuing; +using NServiceBus.Unicast.Queuing.Msmq; +using NServiceBus.Unicast.Transport.Transactional; + +namespace NServiceBus.Distributor +{ + public class Service : IConfigureThisEndpoint, IWantCustomInitialization + { + public void Init() + { + var numberOfThreads = int.Parse(ConfigurationManager.AppSettings["NumberOfWorkerThreads"]); + var errorQueue = ConfigurationManager.AppSettings["ErrorQueue"]; + + var nameSpace = ConfigurationManager.AppSettings["NameSpace"]; + var serialization = ConfigurationManager.AppSettings["Serialization"]; + + var configure = Configure.With() + .DefaultBuilder() + .CustomConfigurationSource(new Custom { ErrorQueue = errorQueue }) + .MsmqTransport() + .IsTransactional(true) + .UnicastBus() + .ImpersonateSender(true); + + switch (serialization) + { + case "xml": + configure.XmlSerializer(nameSpace); + break; + case "binary": + configure.BinarySerializer(); + break; + default: + throw new ConfigurationErrorsException("Serialization can only be either 'xml', or 'binary'."); + } + + + ConfigureDistributor(numberOfThreads); + + Configure.Instance.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton) + .ConfigureProperty(t => t.NumberOfWorkerThreads, numberOfThreads); + + Configure.Instance.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton) + .ConfigureProperty(t => t.Address, ConfigurationManager.AppSettings["ControlInputQueue"]); + + + Configure.Instance.Configurer.ConfigureComponent( + ComponentCallModelEnum.Singleton) + .ConfigureProperty(x => x.StorageQueue, ConfigurationManager.AppSettings["StorageQueue"]); + + configure.LoadMessageHandlers(First + .Then()); + } + + void ConfigureDistributor(int numberOfThreads) + { + var dataTransport = new TransactionalTransport + { + NumberOfWorkerThreads = numberOfThreads, + IsTransactional = true, + MessageReceiver = new MsmqMessageReceiver() + }; + + var distributor = new Unicast.Distributor.Distributor + { + MessageBusTransport = dataTransport, + MessageSender = new MsmqMessageSender(), + DataTransportInputQueue = ConfigurationManager.AppSettings["DataInputQueue"] + }; + + Configure.Instance.Configurer.RegisterSingleton(distributor); + } + } + + public class Custom : IConfigurationSource + { + public string ErrorQueue { get; set; } + public string InputQueue { get; set; } + + public T GetConfiguration() where T : class, new() + { + if (typeof(T) == typeof(MsmqTransportConfig)) + return new MsmqTransportConfig { ErrorQueue = ErrorQueue, InputQueue = InputQueue } as T; + + return null; + } + } +} diff --git a/src/distributor/NServiceBus.Unicast.Distributor/Distributor.cs b/src/distributor/NServiceBus.Unicast.Distributor/Distributor.cs index 0cab920a085..75762adae30 100644 --- a/src/distributor/NServiceBus.Unicast.Distributor/Distributor.cs +++ b/src/distributor/NServiceBus.Unicast.Distributor/Distributor.cs @@ -1,121 +1,121 @@ -using System.Threading; -using log4net; -using NServiceBus.Grid.MessageHandlers; -using NServiceBus.Unicast.Transport; -using NServiceBus.Unicast.Queuing; - -namespace NServiceBus.Unicast.Distributor -{ - /// - /// Provides functionality for distributing messages from a bus - /// to multiple workers when using a unicast transport. - /// - public class Distributor - { - private int millisToWaitIfCannotDispatchToWorker = 50; - - /// - /// Sets the bus that will be used - /// for transporting control information. - /// - public IStartableBus ControlBus { get; set; } - - /// - /// Sets the address of the datainput queue for this distributor - /// - public string DataTransportInputQueue { get; set; } - - - /// - /// Sets the transport that will be used - /// to access the bus containing messages to distribute. - /// - public ITransport MessageBusTransport { get; set; } - - /// - /// Object used to send messages. - /// - public ISendMessages MessageSender { get; set; } - - /// - /// Sets the implementation that will be - /// used to determine whether or not a worker is available. - /// - public IWorkerAvailabilityManager WorkerManager { get; set; } - - - /// - /// Milliseconds to sleep if no workers are available. - /// Prevents needless CPU churn. - /// - public int MillisToWaitIfCannotDispatchToWorker - { - get { return millisToWaitIfCannotDispatchToWorker; } - set { millisToWaitIfCannotDispatchToWorker = value; } - } - - /// - /// Starts the Distributor. - /// - public void Start() - { - GridInterceptingMessageHandler.DisabledChanged += - delegate - { - disabled = - GridInterceptingMessageHandler.Disabled; - }; - - MessageBusTransport.TransportMessageReceived += messageBusTransport_TransportMessageReceived; - MessageBusTransport.Start(DataTransportInputQueue); - - WorkerManager.Start(); - } - - /// - /// Stops the Distributor. - /// - public void Stop() - { - MessageBusTransport.TransportMessageReceived -= messageBusTransport_TransportMessageReceived; - } - - /// - /// Handles reciept of a message on the bus to distribute for. - /// - /// - /// - /// - /// This method checks whether a worker is available to handle the message and - /// forwards it if one is found. - /// - private void messageBusTransport_TransportMessageReceived(object sender, TransportMessageReceivedEventArgs e) - { - if (disabled) - Rollback(); - - string destination = WorkerManager.PopAvailableWorker(); - - if (destination == null) - Rollback(); - else - { - logger.Debug("Sending message to: " + destination); - MessageSender.Send(e.Message, destination); - } - } - - /// - /// Rolls back the message that arrived on the MessageBusTransport. - /// - private void Rollback() - { - Thread.Sleep(millisToWaitIfCannotDispatchToWorker); - - MessageBusTransport.AbortHandlingCurrentMessage(); - } - - private static readonly ILog logger = LogManager.GetLogger(typeof (Distributor)); - private volatile bool disabled; - } +using System.Threading; +using log4net; +using NServiceBus.Grid.MessageHandlers; +using NServiceBus.Unicast.Transport; +using NServiceBus.Unicast.Queuing; + +namespace NServiceBus.Unicast.Distributor +{ + /// + /// Provides functionality for distributing messages from a bus + /// to multiple workers when using a unicast transport. + /// + public class Distributor + { + private int millisToWaitIfCannotDispatchToWorker = 50; + + /// + /// Sets the bus that will be used + /// for transporting control information. + /// + public IStartableBus ControlBus { get; set; } + + /// + /// Sets the address of the datainput queue for this distributor + /// + public string DataTransportInputQueue { get; set; } + + + /// + /// Sets the transport that will be used + /// to access the bus containing messages to distribute. + /// + public ITransport MessageBusTransport { get; set; } + + /// + /// Object used to send messages. + /// + public ISendMessages MessageSender { get; set; } + + /// + /// Sets the implementation that will be + /// used to determine whether or not a worker is available. + /// + public IWorkerAvailabilityManager WorkerManager { get; set; } + + + /// + /// Milliseconds to sleep if no workers are available. + /// Prevents needless CPU churn. + /// + public int MillisToWaitIfCannotDispatchToWorker + { + get { return millisToWaitIfCannotDispatchToWorker; } + set { millisToWaitIfCannotDispatchToWorker = value; } + } + + /// + /// Starts the Distributor. + /// + public void Start() + { + GridInterceptingMessageHandler.DisabledChanged += + delegate + { + disabled = + GridInterceptingMessageHandler.Disabled; + }; + + MessageBusTransport.TransportMessageReceived += messageBusTransport_TransportMessageReceived; + MessageBusTransport.Start(DataTransportInputQueue); + + WorkerManager.Start(); + } + + /// + /// Stops the Distributor. + /// + public void Stop() + { + MessageBusTransport.TransportMessageReceived -= messageBusTransport_TransportMessageReceived; + } + + /// + /// Handles reciept of a message on the bus to distribute for. + /// + /// + /// + /// + /// This method checks whether a worker is available to handle the message and + /// forwards it if one is found. + /// + private void messageBusTransport_TransportMessageReceived(object sender, TransportMessageReceivedEventArgs e) + { + if (disabled) + Rollback(); + + string destination = WorkerManager.PopAvailableWorker(); + + if (destination == null) + Rollback(); + else + { + logger.Debug("Sending message to: " + destination); + MessageSender.Send(e.Message, destination); + } + } + + /// + /// Rolls back the message that arrived on the MessageBusTransport. + /// + private void Rollback() + { + Thread.Sleep(millisToWaitIfCannotDispatchToWorker); + + MessageBusTransport.AbortHandlingCurrentMessage(); + } + + private static readonly ILog logger = LogManager.GetLogger(typeof (Distributor)); + private volatile bool disabled; + } } \ No newline at end of file diff --git a/src/distributor/NServiceBus.Unicast.Distributor/IWorkerAvailabilityManager.cs b/src/distributor/NServiceBus.Unicast.Distributor/IWorkerAvailabilityManager.cs index 9a88af8c6a0..f7bce02c7b2 100644 --- a/src/distributor/NServiceBus.Unicast.Distributor/IWorkerAvailabilityManager.cs +++ b/src/distributor/NServiceBus.Unicast.Distributor/IWorkerAvailabilityManager.cs @@ -1,38 +1,38 @@ -namespace NServiceBus.Unicast.Distributor -{ - /// - /// Defines a manager class that determines the availability - /// of a worker for the . - /// - public interface IWorkerAvailabilityManager - { - /// - /// Start the worker availability manager - /// - void Start(); - - /// - /// Signal that a worker is available to receive a dispatched message. - /// - /// - /// The address of the worker that will accept the dispatched message. - /// - void WorkerAvailable(string address); - - /// - /// Pops the next available worker from the available worker list - /// and returns its address. - /// - /// The address of the next available worker. - string PopAvailableWorker(); - - /// - /// Removes all entries from the worker availability list - /// with the specified address. - /// - /// - /// The address of the worker to remove from the availability list. - /// - void ClearAvailabilityForWorker(string address); - } -} +namespace NServiceBus.Unicast.Distributor +{ + /// + /// Defines a manager class that determines the availability + /// of a worker for the . + /// + public interface IWorkerAvailabilityManager + { + /// + /// Start the worker availability manager + /// + void Start(); + + /// + /// Signal that a worker is available to receive a dispatched message. + /// + /// + /// The address of the worker that will accept the dispatched message. + /// + void WorkerAvailable(string address); + + /// + /// Pops the next available worker from the available worker list + /// and returns its address. + /// + /// The address of the next available worker. + string PopAvailableWorker(); + + /// + /// Removes all entries from the worker availability list + /// with the specified address. + /// + /// + /// The address of the worker to remove from the availability list. + /// + void ClearAvailabilityForWorker(string address); + } +} diff --git a/src/distributor/NServiceBus.Unicast.Distributor/NServiceBus.Unicast.Distributor.csproj b/src/distributor/NServiceBus.Unicast.Distributor/NServiceBus.Unicast.Distributor.csproj index 97cda9aba2e..b4fbfae3bd6 100644 --- a/src/distributor/NServiceBus.Unicast.Distributor/NServiceBus.Unicast.Distributor.csproj +++ b/src/distributor/NServiceBus.Unicast.Distributor/NServiceBus.Unicast.Distributor.csproj @@ -1,113 +1,113 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {D142D372-C9FA-4505-A6EB-E919746F0FF1} - Library - Properties - NServiceBus.Unicast.Distributor - NServiceBus.Unicast.Distributor - - - - - - v4.0 - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.Unicast.Distributor.XML - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.Unicast.Distributor.XML - AllRules.ruleset - - - - False - ..\..\..\lib\log4net.dll - False - - - False - ..\..\..\build\output\NServiceBus.dll - - - False - ..\..\..\build\output\NServiceBus.Core.dll - - - - 3.5 - - - - - CommonAssemblyInfo.cs - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\build" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {D142D372-C9FA-4505-A6EB-E919746F0FF1} + Library + Properties + NServiceBus.Unicast.Distributor + NServiceBus.Unicast.Distributor + + + + + + v4.0 + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.Unicast.Distributor.XML + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.Unicast.Distributor.XML + AllRules.ruleset + + + + False + ..\..\..\lib\log4net.dll + False + + + False + ..\..\..\build\output\NServiceBus.dll + + + False + ..\..\..\build\output\NServiceBus.Core.dll + + + + 3.5 + + + + + CommonAssemblyInfo.cs + + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\build" + \ No newline at end of file diff --git a/src/distributor/NServiceBus.Unicast.Distributor/Properties/AssemblyInfo.cs b/src/distributor/NServiceBus.Unicast.Distributor/Properties/AssemblyInfo.cs index 7a603c8e536..5109cb2a6c0 100644 --- a/src/distributor/NServiceBus.Unicast.Distributor/Properties/AssemblyInfo.cs +++ b/src/distributor/NServiceBus.Unicast.Distributor/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Unicast Load Balancing Functionality")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Unicast Load Balancing Functionality")] [assembly: AssemblyDescription("Functionality for distributing messages between many unicast bus endpoints in nServiceBus")] \ No newline at end of file diff --git a/src/distributor/NServiceBus.Unicast.Distributor/ReadyMessageHandler.cs b/src/distributor/NServiceBus.Unicast.Distributor/ReadyMessageHandler.cs index 8b63d46c506..ff8438066c3 100644 --- a/src/distributor/NServiceBus.Unicast.Distributor/ReadyMessageHandler.cs +++ b/src/distributor/NServiceBus.Unicast.Distributor/ReadyMessageHandler.cs @@ -1,38 +1,38 @@ -using log4net; -using NServiceBus.Grid.Messages; - -namespace NServiceBus.Unicast.Distributor -{ - /// - /// Handles and updates the worker availability manager. - /// - public class ReadyMessageHandler : IMessageHandler - { - /// - /// Handles the message. - /// - /// - public void Handle(ReadyMessage message) - { - logger.Debug("Server available: " + Bus.CurrentMessageContext.ReturnAddress); - - if (message.ClearPreviousFromThisAddress) //indicates worker started up - WorkerManager.ClearAvailabilityForWorker(Bus.CurrentMessageContext.ReturnAddress); - - WorkerManager.WorkerAvailable(Bus.CurrentMessageContext.ReturnAddress); - } - - /// - /// Used to get the address of the endpoint that sent the message - /// - public virtual IBus Bus { get; set; } - - /// - /// Updated based on the message state. - /// - public virtual IWorkerAvailabilityManager WorkerManager { get; set; } - - - private readonly static ILog logger = LogManager.GetLogger(typeof(ReadyMessageHandler)); - } -} +using log4net; +using NServiceBus.Grid.Messages; + +namespace NServiceBus.Unicast.Distributor +{ + /// + /// Handles and updates the worker availability manager. + /// + public class ReadyMessageHandler : IMessageHandler + { + /// + /// Handles the message. + /// + /// + public void Handle(ReadyMessage message) + { + logger.Debug("Server available: " + Bus.CurrentMessageContext.ReturnAddress); + + if (message.ClearPreviousFromThisAddress) //indicates worker started up + WorkerManager.ClearAvailabilityForWorker(Bus.CurrentMessageContext.ReturnAddress); + + WorkerManager.WorkerAvailable(Bus.CurrentMessageContext.ReturnAddress); + } + + /// + /// Used to get the address of the endpoint that sent the message + /// + public virtual IBus Bus { get; set; } + + /// + /// Updated based on the message state. + /// + public virtual IWorkerAvailabilityManager WorkerManager { get; set; } + + + private readonly static ILog logger = LogManager.GetLogger(typeof(ReadyMessageHandler)); + } +} diff --git a/src/encryption/NServiceBus.Encryption/Bootstrapper.cs b/src/encryption/NServiceBus.Encryption/Bootstrapper.cs index 84070baa752..edb81d15036 100644 --- a/src/encryption/NServiceBus.Encryption/Bootstrapper.cs +++ b/src/encryption/NServiceBus.Encryption/Bootstrapper.cs @@ -1,13 +1,13 @@ -using NServiceBus.Config; -using NServiceBus.ObjectBuilder; - -namespace NServiceBus.Encryption -{ - class Bootstrapper : INeedInitialization - { - public void Init() - { - NServiceBus.Configure.Instance.Configurer.ConfigureComponent(ComponentCallModelEnum.Singlecall); - } - } -} +using NServiceBus.Config; +using NServiceBus.ObjectBuilder; + +namespace NServiceBus.Encryption +{ + class Bootstrapper : INeedInitialization + { + public void Init() + { + NServiceBus.Configure.Instance.Configurer.ConfigureComponent(ComponentCallModelEnum.Singlecall); + } + } +} diff --git a/src/encryption/NServiceBus.Encryption/EncryptionMessageMutator.cs b/src/encryption/NServiceBus.Encryption/EncryptionMessageMutator.cs index 28b397416b5..ba5c2dae103 100644 --- a/src/encryption/NServiceBus.Encryption/EncryptionMessageMutator.cs +++ b/src/encryption/NServiceBus.Encryption/EncryptionMessageMutator.cs @@ -1,57 +1,57 @@ -using System; -using System.Linq; -using Common.Logging; -using NServiceBus.MessageMutator; - -namespace NServiceBus.Encryption -{ - /// - /// Invokes the encryption service to encrypt/decrypt messages - /// - public class EncryptionMessageMutator:IMessageMutator - { - public IEncryptionService EncryptionService { get; set; } - - public IMessage MutateOutgoing(IMessage message) - { - var encryptedProperties = message.GetType().GetProperties() - .Where(t => typeof(WireEncryptedString).IsAssignableFrom(t.PropertyType)); - - foreach (var encryptedProperty in encryptedProperties) - { - if (EncryptionService == null) - throw new InvalidOperationException(String.Format("Cannot encrypt field {0} because no encryption service was configured.", encryptedProperty.Name)); - - var encryptedString = (WireEncryptedString)encryptedProperty.GetValue(message, null); - - encryptedString.EncryptedValue = EncryptionService.Encrypt(encryptedString.Value); - encryptedString.Value = null; - - Log.Debug(encryptedProperty.Name + " encrypted successfully"); - - } - return message; - } - - public IMessage MutateIncoming(IMessage message) - { - var encryptedProperties = message.GetType().GetProperties() - .Where(t => typeof(WireEncryptedString).IsAssignableFrom(t.PropertyType)); - - foreach (var encryptedProperty in encryptedProperties) - { - if (EncryptionService == null) - throw new InvalidOperationException(String.Format("Cannot decrypt field {0} because no encryption service was configured.", encryptedProperty.Name)); - - var encryptedString = (WireEncryptedString)encryptedProperty.GetValue(message, null); - - encryptedString.Value = EncryptionService.Decrypt(encryptedString.EncryptedValue); - - Log.Debug(encryptedProperty.Name + " decrypted successfully"); - } - return message; - } - - private readonly static ILog Log = LogManager.GetLogger(typeof(EncryptionMessageMutator)); - } +using System; +using System.Linq; +using Common.Logging; +using NServiceBus.MessageMutator; + +namespace NServiceBus.Encryption +{ + /// + /// Invokes the encryption service to encrypt/decrypt messages + /// + public class EncryptionMessageMutator:IMessageMutator + { + public IEncryptionService EncryptionService { get; set; } + + public IMessage MutateOutgoing(IMessage message) + { + var encryptedProperties = message.GetType().GetProperties() + .Where(t => typeof(WireEncryptedString).IsAssignableFrom(t.PropertyType)); + + foreach (var encryptedProperty in encryptedProperties) + { + if (EncryptionService == null) + throw new InvalidOperationException(String.Format("Cannot encrypt field {0} because no encryption service was configured.", encryptedProperty.Name)); + + var encryptedString = (WireEncryptedString)encryptedProperty.GetValue(message, null); + + encryptedString.EncryptedValue = EncryptionService.Encrypt(encryptedString.Value); + encryptedString.Value = null; + + Log.Debug(encryptedProperty.Name + " encrypted successfully"); + + } + return message; + } + + public IMessage MutateIncoming(IMessage message) + { + var encryptedProperties = message.GetType().GetProperties() + .Where(t => typeof(WireEncryptedString).IsAssignableFrom(t.PropertyType)); + + foreach (var encryptedProperty in encryptedProperties) + { + if (EncryptionService == null) + throw new InvalidOperationException(String.Format("Cannot decrypt field {0} because no encryption service was configured.", encryptedProperty.Name)); + + var encryptedString = (WireEncryptedString)encryptedProperty.GetValue(message, null); + + encryptedString.Value = EncryptionService.Decrypt(encryptedString.EncryptedValue); + + Log.Debug(encryptedProperty.Name + " decrypted successfully"); + } + return message; + } + + private readonly static ILog Log = LogManager.GetLogger(typeof(EncryptionMessageMutator)); + } } \ No newline at end of file diff --git a/src/encryption/NServiceBus.Encryption/IEncryptionService.cs b/src/encryption/NServiceBus.Encryption/IEncryptionService.cs index 5a8580ff1ee..4c0917622d9 100644 --- a/src/encryption/NServiceBus.Encryption/IEncryptionService.cs +++ b/src/encryption/NServiceBus.Encryption/IEncryptionService.cs @@ -1,22 +1,22 @@ -namespace NServiceBus.Encryption -{ - /// - /// Abstraction for encryption capabilities. - /// - public interface IEncryptionService - { - /// - /// Encrypts the given value returning an EncryptedValue. - /// - /// - /// - EncryptedValue Encrypt(string value); - - /// - /// Decrypts the given EncryptedValue object returning the source string. - /// - /// - /// - string Decrypt(EncryptedValue encryptedValue); - } -} +namespace NServiceBus.Encryption +{ + /// + /// Abstraction for encryption capabilities. + /// + public interface IEncryptionService + { + /// + /// Encrypts the given value returning an EncryptedValue. + /// + /// + /// + EncryptedValue Encrypt(string value); + + /// + /// Decrypts the given EncryptedValue object returning the source string. + /// + /// + /// + string Decrypt(EncryptedValue encryptedValue); + } +} diff --git a/src/encryption/NServiceBus.Encryption/NServiceBus.Encryption.csproj b/src/encryption/NServiceBus.Encryption/NServiceBus.Encryption.csproj index 816266c69c9..b2de143b93e 100644 --- a/src/encryption/NServiceBus.Encryption/NServiceBus.Encryption.csproj +++ b/src/encryption/NServiceBus.Encryption/NServiceBus.Encryption.csproj @@ -1,79 +1,79 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {5F4AD8CE-D651-4891-BBAD-116F341163C1} - Library - Properties - NServiceBus.Encryption - NServiceBus.Encryption - v4.0 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\..\..\lib\Common.Logging.dll - - - False - ..\..\..\build\output\NServiceBus.dll - - - ..\..\..\build\nservicebus.core\NServiceBus.Config.dll - False - - - ..\..\..\build\nservicebus.core\NServiceBus.MessageMutator.dll - - - ..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll - False - - - - 3.5 - - - - - - CommonAssemblyInfo.cs - - - - - - - - - - xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\build\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {5F4AD8CE-D651-4891-BBAD-116F341163C1} + Library + Properties + NServiceBus.Encryption + NServiceBus.Encryption + v4.0 + 512 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\..\lib\Common.Logging.dll + + + False + ..\..\..\build\output\NServiceBus.dll + + + ..\..\..\build\nservicebus.core\NServiceBus.Config.dll + False + + + ..\..\..\build\nservicebus.core\NServiceBus.MessageMutator.dll + + + ..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll + False + + + + 3.5 + + + + + + CommonAssemblyInfo.cs + + + + + + + + + + xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\build\" + \ No newline at end of file diff --git a/src/encryption/NServiceBus.Encryption/Properties/AssemblyInfo.cs b/src/encryption/NServiceBus.Encryption/Properties/AssemblyInfo.cs index 9b4e5b41228..245ab20f309 100644 --- a/src/encryption/NServiceBus.Encryption/Properties/AssemblyInfo.cs +++ b/src/encryption/NServiceBus.Encryption/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus encryption interfaces.")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus encryption interfaces.")] [assembly: AssemblyDescription("Abstraction for encryption capabilities in NServiceBus.")] \ No newline at end of file diff --git a/src/encryption/encryption.sln b/src/encryption/encryption.sln index f0781406927..cd03689d21d 100644 --- a/src/encryption/encryption.sln +++ b/src/encryption/encryption.sln @@ -1,20 +1,20 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Encryption", "NServiceBus.Encryption\NServiceBus.Encryption.csproj", "{5F4AD8CE-D651-4891-BBAD-116F341163C1}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {5F4AD8CE-D651-4891-BBAD-116F341163C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5F4AD8CE-D651-4891-BBAD-116F341163C1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5F4AD8CE-D651-4891-BBAD-116F341163C1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5F4AD8CE-D651-4891-BBAD-116F341163C1}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Encryption", "NServiceBus.Encryption\NServiceBus.Encryption.csproj", "{5F4AD8CE-D651-4891-BBAD-116F341163C1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5F4AD8CE-D651-4891-BBAD-116F341163C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5F4AD8CE-D651-4891-BBAD-116F341163C1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5F4AD8CE-D651-4891-BBAD-116F341163C1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5F4AD8CE-D651-4891-BBAD-116F341163C1}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/faults/NServiceBus.Faults.sln b/src/faults/NServiceBus.Faults.sln index 2053465903e..155ff044ce0 100644 --- a/src/faults/NServiceBus.Faults.sln +++ b/src/faults/NServiceBus.Faults.sln @@ -1,20 +1,20 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Faults", "NServiceBus.Faults\NServiceBus.Faults.csproj", "{EF79596C-0636-4CE0-945C-966F95F3909F}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {EF79596C-0636-4CE0-945C-966F95F3909F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EF79596C-0636-4CE0-945C-966F95F3909F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EF79596C-0636-4CE0-945C-966F95F3909F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EF79596C-0636-4CE0-945C-966F95F3909F}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Faults", "NServiceBus.Faults\NServiceBus.Faults.csproj", "{EF79596C-0636-4CE0-945C-966F95F3909F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {EF79596C-0636-4CE0-945C-966F95F3909F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EF79596C-0636-4CE0-945C-966F95F3909F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EF79596C-0636-4CE0-945C-966F95F3909F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EF79596C-0636-4CE0-945C-966F95F3909F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/faults/NServiceBus.Faults/IManageMessageFailures.cs b/src/faults/NServiceBus.Faults/IManageMessageFailures.cs index 428d531f316..e9e770bfff8 100644 --- a/src/faults/NServiceBus.Faults/IManageMessageFailures.cs +++ b/src/faults/NServiceBus.Faults/IManageMessageFailures.cs @@ -1,11 +1,11 @@ -using System; -using NServiceBus.Unicast.Transport; - -namespace NServiceBus.Faults -{ - public interface IManageMessageFailures - { - void SerializationFailedForMessage(TransportMessage message, Exception e); - void ProcessingAlwaysFailsForMessage(TransportMessage message, Exception e); - } -} +using System; +using NServiceBus.Unicast.Transport; + +namespace NServiceBus.Faults +{ + public interface IManageMessageFailures + { + void SerializationFailedForMessage(TransportMessage message, Exception e); + void ProcessingAlwaysFailsForMessage(TransportMessage message, Exception e); + } +} diff --git a/src/faults/NServiceBus.Faults/NServiceBus.Faults.csproj b/src/faults/NServiceBus.Faults/NServiceBus.Faults.csproj index f9f1dab77e2..6ae9b104dc7 100644 --- a/src/faults/NServiceBus.Faults/NServiceBus.Faults.csproj +++ b/src/faults/NServiceBus.Faults/NServiceBus.Faults.csproj @@ -1,60 +1,60 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {EF79596C-0636-4CE0-945C-966F95F3909F} - Library - Properties - NServiceBus.Faults - NServiceBus.Faults - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.Faults.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll - False - - - - 3.5 - - - - - CommonAssemblyInfo.cs - - - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {EF79596C-0636-4CE0-945C-966F95F3909F} + Library + Properties + NServiceBus.Faults + NServiceBus.Faults + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.Faults.XML + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll + False + + + + 3.5 + + + + + CommonAssemblyInfo.cs + + + + + + \ No newline at end of file diff --git a/src/faults/NServiceBus.Faults/Properties/AssemblyInfo.cs b/src/faults/NServiceBus.Faults/Properties/AssemblyInfo.cs index 50632e515c0..fc6bbc27a9d 100644 --- a/src/faults/NServiceBus.Faults/Properties/AssemblyInfo.cs +++ b/src/faults/NServiceBus.Faults/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus fault interfaces.")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus fault interfaces.")] [assembly: AssemblyDescription("Abstraction for fault management capabilities in NServiceBus.")] \ No newline at end of file diff --git a/src/gateway/NServiceBus.Gateway/App.config b/src/gateway/NServiceBus.Gateway/App.config index 120814ff662..4c1561ed744 100644 --- a/src/gateway/NServiceBus.Gateway/App.config +++ b/src/gateway/NServiceBus.Gateway/App.config @@ -1,22 +1,22 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/gateway/NServiceBus.Gateway/EndpointConfig.cs b/src/gateway/NServiceBus.Gateway/EndpointConfig.cs index 9894aad7ae0..fdb5bef1bdc 100644 --- a/src/gateway/NServiceBus.Gateway/EndpointConfig.cs +++ b/src/gateway/NServiceBus.Gateway/EndpointConfig.cs @@ -1,84 +1,84 @@ -using System.Configuration; -using System.Net; -using System.Threading; -using NServiceBus.Unicast.Queuing; -using NServiceBus.Unicast.Queuing.Msmq; -using NServiceBus.Unicast.Transport; -using NServiceBus.Unicast.Transport.Transactional; - -namespace NServiceBus.Gateway -{ - public class EndpointConfig : IConfigureThisEndpoint, IWantCustomInitialization, IWantToRunAtStartup - { - public void Init() - { - NServiceBus.Configure.With().DefaultBuilder(); - - string errorQueue = ConfigurationManager.AppSettings["ErrorQueue"]; - string audit = ConfigurationManager.AppSettings["ForwardReceivedMessageTo"]; - string listenUrl = ConfigurationManager.AppSettings["ListenUrl"]; - string n = ConfigurationManager.AppSettings["NumberOfWorkerThreads"]; - string req = ConfigurationManager.AppSettings["RequireMD5FromClient"]; - string remoteUrl = ConfigurationManager.AppSettings["RemoteUrl"]; - - inputQueue = ConfigurationManager.AppSettings["InputQueue"]; - outputQueue = ConfigurationManager.AppSettings["OutputQueue"]; - - int numberOfWorkerThreads = 10; - int.TryParse(n, out numberOfWorkerThreads); - - bool.TryParse(req, out requireMD5FromClient); - - ThreadPool.SetMaxThreads(numberOfWorkerThreads, numberOfWorkerThreads); - - - messageSender = new MsmqMessageSender(); - - transport = new TransactionalTransport - { - MessageReceiver = new MsmqMessageReceiver(), - IsTransactional = true, - NumberOfWorkerThreads = numberOfWorkerThreads - }; - - transport.TransportMessageReceived += (s, e) => - { - new MsmqHandler(listenUrl).Handle(e.Message, remoteUrl); - - if (!string.IsNullOrEmpty(audit)) - messageSender.Send(e.Message, audit); - }; - - listener = new HttpListener(); - listener.Prefixes.Add(listenUrl); - } - - public void Run() - { - transport.Start(inputQueue); - listener.Start(); - - while (!stopRequested) - { - HttpListenerContext context = listener.GetContext(); - ThreadPool.QueueUserWorkItem( - o => new HttpRequestHandler(requireMD5FromClient, inputQueue).Handle(o as HttpListenerContext, messageSender, outputQueue), - context); - } - } - - public void Stop() - { - stopRequested = true; - } - - private static HttpListener listener; - private static ITransport transport; - private static ISendMessages messageSender; - private static bool requireMD5FromClient = true; - private static string outputQueue; - private static string inputQueue; - - private volatile bool stopRequested; - } -} +using System.Configuration; +using System.Net; +using System.Threading; +using NServiceBus.Unicast.Queuing; +using NServiceBus.Unicast.Queuing.Msmq; +using NServiceBus.Unicast.Transport; +using NServiceBus.Unicast.Transport.Transactional; + +namespace NServiceBus.Gateway +{ + public class EndpointConfig : IConfigureThisEndpoint, IWantCustomInitialization, IWantToRunAtStartup + { + public void Init() + { + NServiceBus.Configure.With().DefaultBuilder(); + + string errorQueue = ConfigurationManager.AppSettings["ErrorQueue"]; + string audit = ConfigurationManager.AppSettings["ForwardReceivedMessageTo"]; + string listenUrl = ConfigurationManager.AppSettings["ListenUrl"]; + string n = ConfigurationManager.AppSettings["NumberOfWorkerThreads"]; + string req = ConfigurationManager.AppSettings["RequireMD5FromClient"]; + string remoteUrl = ConfigurationManager.AppSettings["RemoteUrl"]; + + inputQueue = ConfigurationManager.AppSettings["InputQueue"]; + outputQueue = ConfigurationManager.AppSettings["OutputQueue"]; + + int numberOfWorkerThreads = 10; + int.TryParse(n, out numberOfWorkerThreads); + + bool.TryParse(req, out requireMD5FromClient); + + ThreadPool.SetMaxThreads(numberOfWorkerThreads, numberOfWorkerThreads); + + + messageSender = new MsmqMessageSender(); + + transport = new TransactionalTransport + { + MessageReceiver = new MsmqMessageReceiver(), + IsTransactional = true, + NumberOfWorkerThreads = numberOfWorkerThreads + }; + + transport.TransportMessageReceived += (s, e) => + { + new MsmqHandler(listenUrl).Handle(e.Message, remoteUrl); + + if (!string.IsNullOrEmpty(audit)) + messageSender.Send(e.Message, audit); + }; + + listener = new HttpListener(); + listener.Prefixes.Add(listenUrl); + } + + public void Run() + { + transport.Start(inputQueue); + listener.Start(); + + while (!stopRequested) + { + HttpListenerContext context = listener.GetContext(); + ThreadPool.QueueUserWorkItem( + o => new HttpRequestHandler(requireMD5FromClient, inputQueue).Handle(o as HttpListenerContext, messageSender, outputQueue), + context); + } + } + + public void Stop() + { + stopRequested = true; + } + + private static HttpListener listener; + private static ITransport transport; + private static ISendMessages messageSender; + private static bool requireMD5FromClient = true; + private static string outputQueue; + private static string inputQueue; + + private volatile bool stopRequested; + } +} diff --git a/src/gateway/NServiceBus.Gateway/Extensions.cs b/src/gateway/NServiceBus.Gateway/Extensions.cs index 52954653a98..c0228960f9b 100644 --- a/src/gateway/NServiceBus.Gateway/Extensions.cs +++ b/src/gateway/NServiceBus.Gateway/Extensions.cs @@ -1,19 +1,19 @@ -using System; -using System.Web; -using System.Net; - -namespace NServiceBus.Gateway -{ - public static class Extensions - { - public static IContext AsIContext(this HttpContext context) - { - return new WebHttpContext(context); - } - - public static IContext AsIContext(this HttpListenerContext context) - { - return new NetHttpContext(context); - } - } -} +using System; +using System.Web; +using System.Net; + +namespace NServiceBus.Gateway +{ + public static class Extensions + { + public static IContext AsIContext(this HttpContext context) + { + return new WebHttpContext(context); + } + + public static IContext AsIContext(this HttpListenerContext context) + { + return new NetHttpContext(context); + } + } +} diff --git a/src/gateway/NServiceBus.Gateway/Hasher.cs b/src/gateway/NServiceBus.Gateway/Hasher.cs index 55ff3f35c76..8439f95fe39 100644 --- a/src/gateway/NServiceBus.Gateway/Hasher.cs +++ b/src/gateway/NServiceBus.Gateway/Hasher.cs @@ -1,24 +1,24 @@ -using System; -using System.Text; -using System.Security.Cryptography; - -namespace NServiceBus.Gateway -{ - public class Hasher - { - public const string HeaderKey = "NServiceBus.Header.Gateway.Hash"; - - public static string Hash(byte[] buffer) - { - MD5 hasher = MD5.Create(); - byte[] data = hasher.ComputeHash(buffer); - - StringBuilder sBuilder = new StringBuilder(); - - for (int i = 0; i < data.Length; i++) - sBuilder.Append(data[i].ToString("x2")); - - return sBuilder.ToString(); - } - } -} +using System; +using System.Text; +using System.Security.Cryptography; + +namespace NServiceBus.Gateway +{ + public class Hasher + { + public const string HeaderKey = "NServiceBus.Header.Gateway.Hash"; + + public static string Hash(byte[] buffer) + { + MD5 hasher = MD5.Create(); + byte[] data = hasher.ComputeHash(buffer); + + StringBuilder sBuilder = new StringBuilder(); + + for (int i = 0; i < data.Length; i++) + sBuilder.Append(data[i].ToString("x2")); + + return sBuilder.ToString(); + } + } +} diff --git a/src/gateway/NServiceBus.Gateway/HeaderMapper.cs b/src/gateway/NServiceBus.Gateway/HeaderMapper.cs index 6d3f7a64d25..18d230bc6de 100644 --- a/src/gateway/NServiceBus.Gateway/HeaderMapper.cs +++ b/src/gateway/NServiceBus.Gateway/HeaderMapper.cs @@ -1,66 +1,66 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using NServiceBus.Unicast.Transport; -using System.Collections.Specialized; - -namespace NServiceBus.Gateway -{ - public class HeaderMapper - { - public static void Map(NameValueCollection from, TransportMessage to) - { - to.Id = from[NServiceBus + Id]; - to.IdForCorrelation = from[NServiceBus + IdForCorrelation]; - to.CorrelationId = from[NServiceBus + CorrelationId]; - - bool recoverable; - bool.TryParse(from[NServiceBus + Recoverable], out recoverable); - to.Recoverable = recoverable; - - TimeSpan timeToBeReceived; - TimeSpan.TryParse(from[NServiceBus + TimeToBeReceived], out timeToBeReceived); - to.TimeToBeReceived = timeToBeReceived; - - to.Headers = new Dictionary(); - foreach (string header in from.Keys) - if (header.Contains(NServiceBus + Header)) - to.Headers.Add(header.Replace(NServiceBus + Header, ""), from[header] ); - } - - public static void Map(TransportMessage from, NameValueCollection to) - { - to[NServiceBus + Id] = from.Id; - to[NServiceBus + IdForCorrelation] = from.IdForCorrelation; - to[NServiceBus + CorrelationId] = from.CorrelationId; - to[NServiceBus + Recoverable] = from.Recoverable.ToString(); - to[NServiceBus + TimeToBeReceived] = from.TimeToBeReceived.ToString(); - - to[NServiceBus + ReturnAddress] = from.ReturnAddress; - to[NServiceBus + Header + ReturnAddress] = from.ReturnAddress; - - if (from.Headers.ContainsKey(ReturnAddress)) - to[NServiceBus + Header + RouteTo] = from.Headers[ReturnAddress]; - - from.Headers.ToList().ForEach(info => to[NServiceBus + Header + info.Key] = info.Value); - } - - private const string NServiceBus = "NServiceBus."; - private const string Id = "Id"; - private const string IdForCorrelation = "IdForCorrelation"; - private const string CorrelationId = "CorrelationId"; - private const string Recoverable = "Recoverable"; - private const string ReturnAddress = "ReturnAddress"; - private const string TimeToBeReceived = "TimeToBeReceived"; - private const string WindowsIdentityName = "WindowsIdentityName"; - private const string Header = "Header."; - - public const string RouteTo = "RouteTo"; - } - - public static class Headers - { - public const string ContentMd5Key = "Content-MD5"; - public const string FromKey = "From"; - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using NServiceBus.Unicast.Transport; +using System.Collections.Specialized; + +namespace NServiceBus.Gateway +{ + public class HeaderMapper + { + public static void Map(NameValueCollection from, TransportMessage to) + { + to.Id = from[NServiceBus + Id]; + to.IdForCorrelation = from[NServiceBus + IdForCorrelation]; + to.CorrelationId = from[NServiceBus + CorrelationId]; + + bool recoverable; + bool.TryParse(from[NServiceBus + Recoverable], out recoverable); + to.Recoverable = recoverable; + + TimeSpan timeToBeReceived; + TimeSpan.TryParse(from[NServiceBus + TimeToBeReceived], out timeToBeReceived); + to.TimeToBeReceived = timeToBeReceived; + + to.Headers = new Dictionary(); + foreach (string header in from.Keys) + if (header.Contains(NServiceBus + Header)) + to.Headers.Add(header.Replace(NServiceBus + Header, ""), from[header] ); + } + + public static void Map(TransportMessage from, NameValueCollection to) + { + to[NServiceBus + Id] = from.Id; + to[NServiceBus + IdForCorrelation] = from.IdForCorrelation; + to[NServiceBus + CorrelationId] = from.CorrelationId; + to[NServiceBus + Recoverable] = from.Recoverable.ToString(); + to[NServiceBus + TimeToBeReceived] = from.TimeToBeReceived.ToString(); + + to[NServiceBus + ReturnAddress] = from.ReturnAddress; + to[NServiceBus + Header + ReturnAddress] = from.ReturnAddress; + + if (from.Headers.ContainsKey(ReturnAddress)) + to[NServiceBus + Header + RouteTo] = from.Headers[ReturnAddress]; + + from.Headers.ToList().ForEach(info => to[NServiceBus + Header + info.Key] = info.Value); + } + + private const string NServiceBus = "NServiceBus."; + private const string Id = "Id"; + private const string IdForCorrelation = "IdForCorrelation"; + private const string CorrelationId = "CorrelationId"; + private const string Recoverable = "Recoverable"; + private const string ReturnAddress = "ReturnAddress"; + private const string TimeToBeReceived = "TimeToBeReceived"; + private const string WindowsIdentityName = "WindowsIdentityName"; + private const string Header = "Header."; + + public const string RouteTo = "RouteTo"; + } + + public static class Headers + { + public const string ContentMd5Key = "Content-MD5"; + public const string FromKey = "From"; + } +} diff --git a/src/gateway/NServiceBus.Gateway/HttpRequestHandler.cs b/src/gateway/NServiceBus.Gateway/HttpRequestHandler.cs index 90849a5faea..eb1faa553ff 100644 --- a/src/gateway/NServiceBus.Gateway/HttpRequestHandler.cs +++ b/src/gateway/NServiceBus.Gateway/HttpRequestHandler.cs @@ -1,135 +1,135 @@ -using System; -using System.Collections.Generic; -using System.Net; -using System.Text; -using log4net; -using NServiceBus.Unicast.Queuing; -using NServiceBus.Unicast.Transport; - -namespace NServiceBus.Gateway -{ - public class HttpRequestHandler - { - private const int maximumBytesToRead = 100000; - private readonly bool requireMD5FromClient = true; - private readonly string inputQueue; - - public HttpRequestHandler(bool requireMD5, string inputQueue) - { - requireMD5FromClient = requireMD5; - this.inputQueue = inputQueue; - } - - public void Handle(HttpListenerContext ctx, ISendMessages sender, string queue) - { - try - { - if (ctx.Request.ContentLength64 > 4 * 1024 * 1024) - { - Logger.Warn("Received an Http request larger than 4MB, returning an error to the client " + - ctx.Request.RemoteEndPoint); - ctx.Response.StatusCode = 413; // Request Entity Too Large - ctx.Response.StatusDescription = "Cannot accept messages larger than 4MB."; - - ctx.Response.Close(Encoding.ASCII.GetBytes("" + ctx.Response.StatusDescription + ""), false); - return; - } - - string hash = ctx.Request.Headers[Headers.ContentMd5Key]; - if (hash == null && requireMD5FromClient) - { - Logger.Warn("Received an Http request that didn't contain the " + Headers.ContentMd5Key + - " header from " + ctx.Request.RemoteEndPoint + - ". Rejecting the request. If you wish to allow these kinds of requests, please set the configuration field 'RequireMD5FromClient' to 'false'."); - ctx.Response.StatusCode = 400; //Bad Request - ctx.Response.StatusDescription = "Required header '" + Headers.ContentMd5Key + - "' missing. Cannot accept request."; - - ctx.Response.Close(Encoding.ASCII.GetBytes("" + ctx.Response.StatusDescription + ""), false); - - return; - } - - var length = (int)ctx.Request.ContentLength64; - var buffer = new byte[length]; - - int numBytesToRead = length; - int numBytesRead = 0; - while (numBytesToRead > 0) - { - int n = ctx.Request.InputStream.Read( - buffer, - numBytesRead, - numBytesToRead < maximumBytesToRead ? numBytesToRead : maximumBytesToRead); - - if (n == 0) - break; - - numBytesRead += n; - numBytesToRead -= n; - } - - string myHash = Hasher.Hash(buffer); - TransportMessage msg; - - if (myHash == hash) - { - msg = new TransportMessage - { - Body = buffer, - ReturnAddress = inputQueue - }; - - //check to see if this is a gateway from another site - if (ctx.Request.Headers["NServiceBus.Gateway"] != null) - HeaderMapper.Map(ctx.Request.Headers, msg); - else - { - msg.MessageIntent = MessageIntentEnum.Send; - msg.Recoverable = true; - msg.Headers = new Dictionary(); - } - - if (ctx.Request.Headers[Headers.FromKey] != null) - msg.Headers.Add(NServiceBus.Headers.HttpFrom, ctx.Request.Headers[Headers.FromKey]); - - if (msg.Headers.ContainsKey(HeaderMapper.RouteTo)) - sender.Send(msg, msg.Headers[HeaderMapper.RouteTo]); - else - sender.Send(msg, queue); - } - - if (hash != null) - { - Logger.Debug("Sending HTTP response."); - - ctx.Response.AddHeader(Headers.ContentMd5Key, myHash); - ctx.Response.StatusCode = 200; - ctx.Response.StatusDescription = "OK"; - - ctx.Response.Close(Encoding.ASCII.GetBytes("" + ctx.Response.StatusDescription + ""), false); - } - } - catch (Exception ex) - { - Logger.Error("Unexpected error", ex); - try - { - ctx.Response.StatusCode = 502; - ctx.Response.StatusDescription = "Unexpected server error"; - ctx.Response.Close( - Encoding.ASCII.GetBytes("" + ctx.Response.StatusDescription + ""), - false); - } - catch (Exception) - { - Logger.Info("Could not notify client about exception."); - } - } - - Logger.Info("Http request processing complete."); - } - - private static readonly ILog Logger = LogManager.GetLogger("NServiceBus.Gateway"); - } -} +using System; +using System.Collections.Generic; +using System.Net; +using System.Text; +using log4net; +using NServiceBus.Unicast.Queuing; +using NServiceBus.Unicast.Transport; + +namespace NServiceBus.Gateway +{ + public class HttpRequestHandler + { + private const int maximumBytesToRead = 100000; + private readonly bool requireMD5FromClient = true; + private readonly string inputQueue; + + public HttpRequestHandler(bool requireMD5, string inputQueue) + { + requireMD5FromClient = requireMD5; + this.inputQueue = inputQueue; + } + + public void Handle(HttpListenerContext ctx, ISendMessages sender, string queue) + { + try + { + if (ctx.Request.ContentLength64 > 4 * 1024 * 1024) + { + Logger.Warn("Received an Http request larger than 4MB, returning an error to the client " + + ctx.Request.RemoteEndPoint); + ctx.Response.StatusCode = 413; // Request Entity Too Large + ctx.Response.StatusDescription = "Cannot accept messages larger than 4MB."; + + ctx.Response.Close(Encoding.ASCII.GetBytes("" + ctx.Response.StatusDescription + ""), false); + return; + } + + string hash = ctx.Request.Headers[Headers.ContentMd5Key]; + if (hash == null && requireMD5FromClient) + { + Logger.Warn("Received an Http request that didn't contain the " + Headers.ContentMd5Key + + " header from " + ctx.Request.RemoteEndPoint + + ". Rejecting the request. If you wish to allow these kinds of requests, please set the configuration field 'RequireMD5FromClient' to 'false'."); + ctx.Response.StatusCode = 400; //Bad Request + ctx.Response.StatusDescription = "Required header '" + Headers.ContentMd5Key + + "' missing. Cannot accept request."; + + ctx.Response.Close(Encoding.ASCII.GetBytes("" + ctx.Response.StatusDescription + ""), false); + + return; + } + + var length = (int)ctx.Request.ContentLength64; + var buffer = new byte[length]; + + int numBytesToRead = length; + int numBytesRead = 0; + while (numBytesToRead > 0) + { + int n = ctx.Request.InputStream.Read( + buffer, + numBytesRead, + numBytesToRead < maximumBytesToRead ? numBytesToRead : maximumBytesToRead); + + if (n == 0) + break; + + numBytesRead += n; + numBytesToRead -= n; + } + + string myHash = Hasher.Hash(buffer); + TransportMessage msg; + + if (myHash == hash) + { + msg = new TransportMessage + { + Body = buffer, + ReturnAddress = inputQueue + }; + + //check to see if this is a gateway from another site + if (ctx.Request.Headers["NServiceBus.Gateway"] != null) + HeaderMapper.Map(ctx.Request.Headers, msg); + else + { + msg.MessageIntent = MessageIntentEnum.Send; + msg.Recoverable = true; + msg.Headers = new Dictionary(); + } + + if (ctx.Request.Headers[Headers.FromKey] != null) + msg.Headers.Add(NServiceBus.Headers.HttpFrom, ctx.Request.Headers[Headers.FromKey]); + + if (msg.Headers.ContainsKey(HeaderMapper.RouteTo)) + sender.Send(msg, msg.Headers[HeaderMapper.RouteTo]); + else + sender.Send(msg, queue); + } + + if (hash != null) + { + Logger.Debug("Sending HTTP response."); + + ctx.Response.AddHeader(Headers.ContentMd5Key, myHash); + ctx.Response.StatusCode = 200; + ctx.Response.StatusDescription = "OK"; + + ctx.Response.Close(Encoding.ASCII.GetBytes("" + ctx.Response.StatusDescription + ""), false); + } + } + catch (Exception ex) + { + Logger.Error("Unexpected error", ex); + try + { + ctx.Response.StatusCode = 502; + ctx.Response.StatusDescription = "Unexpected server error"; + ctx.Response.Close( + Encoding.ASCII.GetBytes("" + ctx.Response.StatusDescription + ""), + false); + } + catch (Exception) + { + Logger.Info("Could not notify client about exception."); + } + } + + Logger.Info("Http request processing complete."); + } + + private static readonly ILog Logger = LogManager.GetLogger("NServiceBus.Gateway"); + } +} diff --git a/src/gateway/NServiceBus.Gateway/IContext.cs b/src/gateway/NServiceBus.Gateway/IContext.cs index 84d2e55127e..acf593d8c7e 100644 --- a/src/gateway/NServiceBus.Gateway/IContext.cs +++ b/src/gateway/NServiceBus.Gateway/IContext.cs @@ -1,16 +1,16 @@ -using System; -using System.IO; -using System.Collections.Specialized; - -namespace NServiceBus.Gateway -{ - public interface IContext - { - int RequestContentLength { get; } - Stream RequestInputStream { get; } - Stream ResponseOutputStream { get; } - NameValueCollection RequestHeaders { get; } - - void EndResponse(); - } -} +using System; +using System.IO; +using System.Collections.Specialized; + +namespace NServiceBus.Gateway +{ + public interface IContext + { + int RequestContentLength { get; } + Stream RequestInputStream { get; } + Stream ResponseOutputStream { get; } + NameValueCollection RequestHeaders { get; } + + void EndResponse(); + } +} diff --git a/src/gateway/NServiceBus.Gateway/MsmqHandler.cs b/src/gateway/NServiceBus.Gateway/MsmqHandler.cs index 64f05e77315..0734052290c 100644 --- a/src/gateway/NServiceBus.Gateway/MsmqHandler.cs +++ b/src/gateway/NServiceBus.Gateway/MsmqHandler.cs @@ -1,67 +1,67 @@ -using System; -using log4net; -using System.Net; -using NServiceBus.Unicast.Transport; - -namespace NServiceBus.Gateway -{ - public class MsmqHandler - { - private readonly string from; - public MsmqHandler(string listenUrl) - { - from = listenUrl; - } - public void Handle(TransportMessage msg, string remoteUrl) - { - var address = remoteUrl; - - if (msg.Headers.ContainsKey(NServiceBus.Headers.HttpTo)) - address = msg.Headers[NServiceBus.Headers.HttpTo]; - - var request = WebRequest.Create(address); - request.Method = "POST"; - - var buffer = msg.Body; - - request.ContentType = "application/x-www-form-urlencoded"; - - HeaderMapper.Map(msg, request.Headers); - - string hash = Hasher.Hash(buffer); - request.Headers[Headers.ContentMd5Key] = hash; - request.Headers["NServiceBus.Gateway"] = "true"; - request.Headers[Headers.FromKey] = from; - - request.ContentLength = buffer.Length; - - var stream = request.GetRequestStream(); - stream.Write(buffer, 0, buffer.Length); - - Logger.Debug("Sending message to: " + address); - - var response = request.GetResponse(); - - Logger.Debug("Got HTTP Response, going to check MD5."); - - var md5 = response.Headers[Headers.ContentMd5Key]; - response.Close(); - - if (md5 == null) - { - Logger.Error("Integration Error: Response did not contain necessary header " + Headers.ContentMd5Key + ". Can't be sure that data arrived intact at target " + address); - return; - } - - if (md5 == hash) - Logger.Debug("Message transferred successfully."); - else - { - Logger.Info(Headers.ContentMd5Key + " header received from client not the same as that sent. Message not transferred successfully. Trying again..."); - throw new Exception("Retrying"); - } - } - - private static readonly ILog Logger = LogManager.GetLogger("NServiceBus.Gateway"); - } -} +using System; +using log4net; +using System.Net; +using NServiceBus.Unicast.Transport; + +namespace NServiceBus.Gateway +{ + public class MsmqHandler + { + private readonly string from; + public MsmqHandler(string listenUrl) + { + from = listenUrl; + } + public void Handle(TransportMessage msg, string remoteUrl) + { + var address = remoteUrl; + + if (msg.Headers.ContainsKey(NServiceBus.Headers.HttpTo)) + address = msg.Headers[NServiceBus.Headers.HttpTo]; + + var request = WebRequest.Create(address); + request.Method = "POST"; + + var buffer = msg.Body; + + request.ContentType = "application/x-www-form-urlencoded"; + + HeaderMapper.Map(msg, request.Headers); + + string hash = Hasher.Hash(buffer); + request.Headers[Headers.ContentMd5Key] = hash; + request.Headers["NServiceBus.Gateway"] = "true"; + request.Headers[Headers.FromKey] = from; + + request.ContentLength = buffer.Length; + + var stream = request.GetRequestStream(); + stream.Write(buffer, 0, buffer.Length); + + Logger.Debug("Sending message to: " + address); + + var response = request.GetResponse(); + + Logger.Debug("Got HTTP Response, going to check MD5."); + + var md5 = response.Headers[Headers.ContentMd5Key]; + response.Close(); + + if (md5 == null) + { + Logger.Error("Integration Error: Response did not contain necessary header " + Headers.ContentMd5Key + ". Can't be sure that data arrived intact at target " + address); + return; + } + + if (md5 == hash) + Logger.Debug("Message transferred successfully."); + else + { + Logger.Info(Headers.ContentMd5Key + " header received from client not the same as that sent. Message not transferred successfully. Trying again..."); + throw new Exception("Retrying"); + } + } + + private static readonly ILog Logger = LogManager.GetLogger("NServiceBus.Gateway"); + } +} diff --git a/src/gateway/NServiceBus.Gateway/NServiceBus.Gateway.csproj b/src/gateway/NServiceBus.Gateway/NServiceBus.Gateway.csproj index 8fdbb727d20..f86c3eb361b 100644 --- a/src/gateway/NServiceBus.Gateway/NServiceBus.Gateway.csproj +++ b/src/gateway/NServiceBus.Gateway/NServiceBus.Gateway.csproj @@ -1,92 +1,92 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {1BBA08E8-EC86-4BA3-B6B7-88C6D241AE18} - Library - Properties - NServiceBus.Gateway - NServiceBus.Gateway - v4.0 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\lib\log4net.dll - - - False - ..\..\..\build\output\NServiceBus.dll - - - False - ..\..\..\build\output\NServiceBus.Core.dll - - - False - ..\..\..\build\hosting\NServiceBus.Hosting.dll - - - False - ..\..\..\build\hosting\NServiceBus.Hosting.Windows.exe - - - - - 3.5 - - - - 3.5 - - - - - - - - CommonAssemblyInfo.cs - - - - - - - - - - - Designer - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {1BBA08E8-EC86-4BA3-B6B7-88C6D241AE18} + Library + Properties + NServiceBus.Gateway + NServiceBus.Gateway + v4.0 + 512 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\lib\log4net.dll + + + False + ..\..\..\build\output\NServiceBus.dll + + + False + ..\..\..\build\output\NServiceBus.Core.dll + + + False + ..\..\..\build\hosting\NServiceBus.Hosting.dll + + + False + ..\..\..\build\hosting\NServiceBus.Hosting.Windows.exe + + + + + 3.5 + + + + 3.5 + + + + + + + + CommonAssemblyInfo.cs + + + + + + + + + + + Designer + + + + \ No newline at end of file diff --git a/src/gateway/NServiceBus.Gateway/NetHttpContext.cs b/src/gateway/NServiceBus.Gateway/NetHttpContext.cs index 1dcb9c7d92e..5b00cc2704a 100644 --- a/src/gateway/NServiceBus.Gateway/NetHttpContext.cs +++ b/src/gateway/NServiceBus.Gateway/NetHttpContext.cs @@ -1,44 +1,44 @@ -using System; -using System.Net; -using System.Collections.Specialized; -using System.IO; - -namespace NServiceBus.Gateway -{ - public class NetHttpContext : IContext - { - private HttpListenerContext context; - public NetHttpContext(HttpListenerContext ctx) - { - context = ctx; - } - - #region IContext Members - - public int RequestContentLength - { - get { return (int)context.Request.ContentLength64; } - } - public Stream RequestInputStream - { - get { return context.Request.InputStream; } - } - - public Stream ResponseOutputStream - { - get { return context.Response.OutputStream; } - } - - public NameValueCollection RequestHeaders - { - get { return context.Request.Headers; } - } - - public void EndResponse() - { - context.Response.OutputStream.Close(); - } - - #endregion - } -} +using System; +using System.Net; +using System.Collections.Specialized; +using System.IO; + +namespace NServiceBus.Gateway +{ + public class NetHttpContext : IContext + { + private HttpListenerContext context; + public NetHttpContext(HttpListenerContext ctx) + { + context = ctx; + } + + #region IContext Members + + public int RequestContentLength + { + get { return (int)context.Request.ContentLength64; } + } + public Stream RequestInputStream + { + get { return context.Request.InputStream; } + } + + public Stream ResponseOutputStream + { + get { return context.Response.OutputStream; } + } + + public NameValueCollection RequestHeaders + { + get { return context.Request.Headers; } + } + + public void EndResponse() + { + context.Response.OutputStream.Close(); + } + + #endregion + } +} diff --git a/src/gateway/NServiceBus.Gateway/Properties/AssemblyInfo.cs b/src/gateway/NServiceBus.Gateway/Properties/AssemblyInfo.cs index dc4e6923791..8917aef3c50 100644 --- a/src/gateway/NServiceBus.Gateway/Properties/AssemblyInfo.cs +++ b/src/gateway/NServiceBus.Gateway/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus gateway logic")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus gateway logic")] [assembly: AssemblyDescription("Hosting independent logic for handling gateway functionality.")] \ No newline at end of file diff --git a/src/gateway/NServiceBus.Gateway/WebHttpContext.cs b/src/gateway/NServiceBus.Gateway/WebHttpContext.cs index 0ac62328cbc..48f8f223aee 100644 --- a/src/gateway/NServiceBus.Gateway/WebHttpContext.cs +++ b/src/gateway/NServiceBus.Gateway/WebHttpContext.cs @@ -1,46 +1,46 @@ -using System; -using System.Web; -using System.Collections.Specialized; -using System.IO; -using System.Net; - -namespace NServiceBus.Gateway -{ - public class WebHttpContext : IContext - { - private HttpContext context; - public WebHttpContext (HttpContext ctx) - { - context = ctx; - } - - #region IContext Members - - public int RequestContentLength - { - get { return context.Request.ContentLength; } - } - - public Stream RequestInputStream - { - get { return context.Request.InputStream; } - } - - public Stream ResponseOutputStream - { - get { return context.Response.OutputStream; } - } - - public NameValueCollection RequestHeaders - { - get { return context.Request.Headers; } - } - - public void EndResponse() - { - context.Response.End(); - } - - #endregion - } -} +using System; +using System.Web; +using System.Collections.Specialized; +using System.IO; +using System.Net; + +namespace NServiceBus.Gateway +{ + public class WebHttpContext : IContext + { + private HttpContext context; + public WebHttpContext (HttpContext ctx) + { + context = ctx; + } + + #region IContext Members + + public int RequestContentLength + { + get { return context.Request.ContentLength; } + } + + public Stream RequestInputStream + { + get { return context.Request.InputStream; } + } + + public Stream ResponseOutputStream + { + get { return context.Response.OutputStream; } + } + + public NameValueCollection RequestHeaders + { + get { return context.Request.Headers; } + } + + public void EndResponse() + { + context.Response.End(); + } + + #endregion + } +} diff --git a/src/gateway/gateway.sln b/src/gateway/gateway.sln index 02771715614..2cd8973b123 100644 --- a/src/gateway/gateway.sln +++ b/src/gateway/gateway.sln @@ -1,20 +1,20 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Gateway", "NServiceBus.Gateway\NServiceBus.Gateway.csproj", "{1BBA08E8-EC86-4BA3-B6B7-88C6D241AE18}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {1BBA08E8-EC86-4BA3-B6B7-88C6D241AE18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1BBA08E8-EC86-4BA3-B6B7-88C6D241AE18}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1BBA08E8-EC86-4BA3-B6B7-88C6D241AE18}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1BBA08E8-EC86-4BA3-B6B7-88C6D241AE18}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Gateway", "NServiceBus.Gateway\NServiceBus.Gateway.csproj", "{1BBA08E8-EC86-4BA3-B6B7-88C6D241AE18}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1BBA08E8-EC86-4BA3-B6B7-88C6D241AE18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1BBA08E8-EC86-4BA3-B6B7-88C6D241AE18}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1BBA08E8-EC86-4BA3-B6B7-88C6D241AE18}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1BBA08E8-EC86-4BA3-B6B7-88C6D241AE18}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/grid/NServiceBus.Grid.MessageHandlers/Bootstrapper.cs b/src/grid/NServiceBus.Grid.MessageHandlers/Bootstrapper.cs index 986c5c66063..7ae400eb75d 100644 --- a/src/grid/NServiceBus.Grid.MessageHandlers/Bootstrapper.cs +++ b/src/grid/NServiceBus.Grid.MessageHandlers/Bootstrapper.cs @@ -1,40 +1,40 @@ -using NServiceBus.Config; -using NServiceBus.Grid.Messages; -using NServiceBus.MessageMutator; -using NServiceBus.ObjectBuilder; -using NServiceBus.Unicast.Transport; - -namespace NServiceBus.Grid.MessageHandlers -{ - /// - /// Bootstraps the behavior needed for a client to communicate with a distributor - /// - public class Bootstrapper : INeedInitialization, IMapOutgoingTransportMessages - { - void INeedInitialization.Init() - { - var readyConfig = Configure.Instance.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); - - var cfg = Configure.GetConfigSection(); - if (cfg != null) - { - readyConfig.ConfigureProperty(r => r.DistributorControlAddress, cfg.DistributorControlAddress); - DistributorDataAddress = cfg.DistributorDataAddress; - } - - Configure.ConfigurationComplete += - (o, e) => Configure.Instance.Builder.Build().SendReadyMessage(true); - } - - void IMapOutgoingTransportMessages.MapOutgoing(IMessage[] messages, TransportMessage transportMessage) - { - if (messages[0] is ReadyMessage) - return; - - //when not talking to the distributor, pretend that our address is that of the distributor - transportMessage.ReturnAddress = DistributorDataAddress; - } - - private string DistributorDataAddress { get; set; } - } -} +using NServiceBus.Config; +using NServiceBus.Grid.Messages; +using NServiceBus.MessageMutator; +using NServiceBus.ObjectBuilder; +using NServiceBus.Unicast.Transport; + +namespace NServiceBus.Grid.MessageHandlers +{ + /// + /// Bootstraps the behavior needed for a client to communicate with a distributor + /// + public class Bootstrapper : INeedInitialization, IMapOutgoingTransportMessages + { + void INeedInitialization.Init() + { + var readyConfig = Configure.Instance.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); + + var cfg = Configure.GetConfigSection(); + if (cfg != null) + { + readyConfig.ConfigureProperty(r => r.DistributorControlAddress, cfg.DistributorControlAddress); + DistributorDataAddress = cfg.DistributorDataAddress; + } + + Configure.ConfigurationComplete += + (o, e) => Configure.Instance.Builder.Build().SendReadyMessage(true); + } + + void IMapOutgoingTransportMessages.MapOutgoing(IMessage[] messages, TransportMessage transportMessage) + { + if (messages[0] is ReadyMessage) + return; + + //when not talking to the distributor, pretend that our address is that of the distributor + transportMessage.ReturnAddress = DistributorDataAddress; + } + + private string DistributorDataAddress { get; set; } + } +} diff --git a/src/grid/NServiceBus.Grid.MessageHandlers/ChangeNumberOfWorkerThreadsMessageHandler.cs b/src/grid/NServiceBus.Grid.MessageHandlers/ChangeNumberOfWorkerThreadsMessageHandler.cs index e07a42a8cd8..a54d8ef48c2 100644 --- a/src/grid/NServiceBus.Grid.MessageHandlers/ChangeNumberOfWorkerThreadsMessageHandler.cs +++ b/src/grid/NServiceBus.Grid.MessageHandlers/ChangeNumberOfWorkerThreadsMessageHandler.cs @@ -1,63 +1,63 @@ -using Common.Logging; -using NServiceBus; -using NServiceBus.Grid.Messages; -using NServiceBus.Unicast; -using NServiceBus.Unicast.Transport; - - -namespace NServiceBus.Grid.MessageHandlers -{ - /// - /// Handles . - /// - public class ChangeNumberOfWorkerThreadsMessageHandler : - IMessageHandler - { - /// - /// If the target number of worker threads in the message is zero, - /// brings them down to one, and marks the endpoint as Disabled. - /// Otherwise, tells the transport to change the number of worker threads. - /// - /// - public void Handle(ChangeNumberOfWorkerThreadsMessage message) - { - int target = message.NumberOfWorkerThreads; - if (target <= 0) - target = 1; - else - { - GridInterceptingMessageHandler.Disabled = false; - this.ReadyManager.ContinueSendingReadyMessages(); - } - - this.Transport.ChangeNumberOfWorkerThreads(target); - - if (message.NumberOfWorkerThreads == 0) - { - this.ReadyManager.StopSendingReadyMessages(); - GridInterceptingMessageHandler.Disabled = true; - - logger.Info("Disabling this endpoint."); - } - else - logger.Info(string.Format("{0} worker threads now running.", target)); - } - - /// - /// Used to stop sending ready messages to the distributor if one is configured. - /// - public IManageReadyMessages ReadyManager { get; set; } - - /// - /// This is kept separate from the bus because the distributor - /// will be using this class on its control bus to change the - /// number of worker threads on its data bus. - /// - /// For regular cases, the transport should be the same as is - /// configured for the bus. - /// - public ITransport Transport { get; set; } - - private static readonly ILog logger = LogManager.GetLogger("NServicebus.Grid"); - } -} +using Common.Logging; +using NServiceBus; +using NServiceBus.Grid.Messages; +using NServiceBus.Unicast; +using NServiceBus.Unicast.Transport; + + +namespace NServiceBus.Grid.MessageHandlers +{ + /// + /// Handles . + /// + public class ChangeNumberOfWorkerThreadsMessageHandler : + IMessageHandler + { + /// + /// If the target number of worker threads in the message is zero, + /// brings them down to one, and marks the endpoint as Disabled. + /// Otherwise, tells the transport to change the number of worker threads. + /// + /// + public void Handle(ChangeNumberOfWorkerThreadsMessage message) + { + int target = message.NumberOfWorkerThreads; + if (target <= 0) + target = 1; + else + { + GridInterceptingMessageHandler.Disabled = false; + this.ReadyManager.ContinueSendingReadyMessages(); + } + + this.Transport.ChangeNumberOfWorkerThreads(target); + + if (message.NumberOfWorkerThreads == 0) + { + this.ReadyManager.StopSendingReadyMessages(); + GridInterceptingMessageHandler.Disabled = true; + + logger.Info("Disabling this endpoint."); + } + else + logger.Info(string.Format("{0} worker threads now running.", target)); + } + + /// + /// Used to stop sending ready messages to the distributor if one is configured. + /// + public IManageReadyMessages ReadyManager { get; set; } + + /// + /// This is kept separate from the bus because the distributor + /// will be using this class on its control bus to change the + /// number of worker threads on its data bus. + /// + /// For regular cases, the transport should be the same as is + /// configured for the bus. + /// + public ITransport Transport { get; set; } + + private static readonly ILog logger = LogManager.GetLogger("NServicebus.Grid"); + } +} diff --git a/src/grid/NServiceBus.Grid.MessageHandlers/GetNumberOfWorkerThreadsMessageHandler.cs b/src/grid/NServiceBus.Grid.MessageHandlers/GetNumberOfWorkerThreadsMessageHandler.cs index 3160d4e5374..00421e8a1da 100644 --- a/src/grid/NServiceBus.Grid.MessageHandlers/GetNumberOfWorkerThreadsMessageHandler.cs +++ b/src/grid/NServiceBus.Grid.MessageHandlers/GetNumberOfWorkerThreadsMessageHandler.cs @@ -1,39 +1,39 @@ -using NServiceBus.Grid.Messages; -using NServiceBus.Unicast.Transport; -using Common.Logging; - -namespace NServiceBus.Grid.MessageHandlers -{ - /// - /// Handles the GetNumberOfWorkerThreadsMessage. - /// - public class GetNumberOfWorkerThreadsMessageHandler : IMessageHandler - { - /// - /// The bus used for returning a response. - /// - public IBus Bus { get; set; } - - /// - /// Reference to the local transport for getting the number of worker threads. - /// - public ITransport Transport { get; set; } - - /// - /// Handles GetNumberOfWorkerThreadsMessage replying with GotNumberOfWorkerThreadsMessage. - /// - /// - public void Handle(GetNumberOfWorkerThreadsMessage message) - { - int result = this.Transport.NumberOfWorkerThreads; - if (result == 1 && GridInterceptingMessageHandler.Disabled) - result = 0; - - this.Bus.Reply(new GotNumberOfWorkerThreadsMessage { NumberOfWorkerThreads = result } ); - - logger.Info(string.Format("{0} worker threads.", result)); - } - - private static readonly ILog logger = LogManager.GetLogger("NServicebus.Grid"); - } -} +using NServiceBus.Grid.Messages; +using NServiceBus.Unicast.Transport; +using Common.Logging; + +namespace NServiceBus.Grid.MessageHandlers +{ + /// + /// Handles the GetNumberOfWorkerThreadsMessage. + /// + public class GetNumberOfWorkerThreadsMessageHandler : IMessageHandler + { + /// + /// The bus used for returning a response. + /// + public IBus Bus { get; set; } + + /// + /// Reference to the local transport for getting the number of worker threads. + /// + public ITransport Transport { get; set; } + + /// + /// Handles GetNumberOfWorkerThreadsMessage replying with GotNumberOfWorkerThreadsMessage. + /// + /// + public void Handle(GetNumberOfWorkerThreadsMessage message) + { + int result = this.Transport.NumberOfWorkerThreads; + if (result == 1 && GridInterceptingMessageHandler.Disabled) + result = 0; + + this.Bus.Reply(new GotNumberOfWorkerThreadsMessage { NumberOfWorkerThreads = result } ); + + logger.Info(string.Format("{0} worker threads.", result)); + } + + private static readonly ILog logger = LogManager.GetLogger("NServicebus.Grid"); + } +} diff --git a/src/grid/NServiceBus.Grid.MessageHandlers/GridInterceptingMessageHandler.cs b/src/grid/NServiceBus.Grid.MessageHandlers/GridInterceptingMessageHandler.cs index e091385935b..3c0fb2fed4d 100644 --- a/src/grid/NServiceBus.Grid.MessageHandlers/GridInterceptingMessageHandler.cs +++ b/src/grid/NServiceBus.Grid.MessageHandlers/GridInterceptingMessageHandler.cs @@ -1,87 +1,87 @@ - - -using System; -using Common.Logging; -using NServiceBus.Grid.Messages; -using NServiceBus.Unicast; -using NServiceBus.Unicast.Transport; - -namespace NServiceBus.Grid.MessageHandlers -{ - /// - /// Intercepts all messages, not allowing any through if the endpoint - /// has had its number of worker threads reduced to zero. - /// - public class GridInterceptingMessageHandler : IMessageHandler - { - /// - /// The bus instructed to stop messages from being processed further. - /// - public IBus Bus { get; set; } - - /// - /// Used to prevent ready messages from being sent to the distributor - /// when grid messages are processed. - /// - public IManageReadyMessages ReadyManager { get; set; } - - /// - /// Used to abort handling messages when the endpoint has been disabled. - /// - public ITransport Transport { get; set; } - - private static volatile bool disabled; - - /// - /// Gets/sets that the number of worker threads has been reduced to zero. - /// - public static bool Disabled - { - get - { - return disabled; - } - set - { - if (disabled != value) - { - disabled = value; - - if (DisabledChanged != null) - DisabledChanged(null, null); - } - } - } - - /// - /// Notifies when the Disabled state has changed. - /// - public static event EventHandler DisabledChanged; - - /// - /// If Disabled, does not allow the message to be processed (unless it is a grid message). - /// Prevents grid messages from causing the bus to send ready messages to the distributor (if such is configured). - /// - /// - public void Handle(IMessage message) - { - if (message is GetNumberOfWorkerThreadsMessage || - message is ChangeNumberOfWorkerThreadsMessage || - message is GotNumberOfWorkerThreadsMessage) - { - this.ReadyManager.SkipSendingReadyMessageOnce(); - return; - } - - if (disabled) - { - this.Bus.DoNotContinueDispatchingCurrentMessageToHandlers(); - this.Transport.AbortHandlingCurrentMessage(); - - logger.Info("Endpoint is currently disabled. Send a 'ChangeNumberOfWorkerThreadsMessage' to change this."); - } - } - - private static readonly ILog logger = LogManager.GetLogger("NServicebus.Grid"); - } -} + + +using System; +using Common.Logging; +using NServiceBus.Grid.Messages; +using NServiceBus.Unicast; +using NServiceBus.Unicast.Transport; + +namespace NServiceBus.Grid.MessageHandlers +{ + /// + /// Intercepts all messages, not allowing any through if the endpoint + /// has had its number of worker threads reduced to zero. + /// + public class GridInterceptingMessageHandler : IMessageHandler + { + /// + /// The bus instructed to stop messages from being processed further. + /// + public IBus Bus { get; set; } + + /// + /// Used to prevent ready messages from being sent to the distributor + /// when grid messages are processed. + /// + public IManageReadyMessages ReadyManager { get; set; } + + /// + /// Used to abort handling messages when the endpoint has been disabled. + /// + public ITransport Transport { get; set; } + + private static volatile bool disabled; + + /// + /// Gets/sets that the number of worker threads has been reduced to zero. + /// + public static bool Disabled + { + get + { + return disabled; + } + set + { + if (disabled != value) + { + disabled = value; + + if (DisabledChanged != null) + DisabledChanged(null, null); + } + } + } + + /// + /// Notifies when the Disabled state has changed. + /// + public static event EventHandler DisabledChanged; + + /// + /// If Disabled, does not allow the message to be processed (unless it is a grid message). + /// Prevents grid messages from causing the bus to send ready messages to the distributor (if such is configured). + /// + /// + public void Handle(IMessage message) + { + if (message is GetNumberOfWorkerThreadsMessage || + message is ChangeNumberOfWorkerThreadsMessage || + message is GotNumberOfWorkerThreadsMessage) + { + this.ReadyManager.SkipSendingReadyMessageOnce(); + return; + } + + if (disabled) + { + this.Bus.DoNotContinueDispatchingCurrentMessageToHandlers(); + this.Transport.AbortHandlingCurrentMessage(); + + logger.Info("Endpoint is currently disabled. Send a 'ChangeNumberOfWorkerThreadsMessage' to change this."); + } + } + + private static readonly ILog logger = LogManager.GetLogger("NServicebus.Grid"); + } +} diff --git a/src/grid/NServiceBus.Grid.MessageHandlers/IManageReadyMessages.cs b/src/grid/NServiceBus.Grid.MessageHandlers/IManageReadyMessages.cs index 29266a13c3e..e0431a7f681 100644 --- a/src/grid/NServiceBus.Grid.MessageHandlers/IManageReadyMessages.cs +++ b/src/grid/NServiceBus.Grid.MessageHandlers/IManageReadyMessages.cs @@ -1,29 +1,29 @@ -using NServiceBus.Grid.Messages; - -namespace NServiceBus.Grid.MessageHandlers -{ - /// - /// Manages ready messages - /// - public interface IManageReadyMessages - { - /// - /// Instructs the bus to stop sending s - /// when it has a distributor configured. - /// - void StopSendingReadyMessages(); - - /// - /// Instructs the bus to continue sending s - /// when it has a distributor configured. - /// - void ContinueSendingReadyMessages(); - - /// - /// Instructs the bus to not send a - /// at the end of processing the current message on the specific thread - /// on which it was called. - /// - void SkipSendingReadyMessageOnce(); - } -} +using NServiceBus.Grid.Messages; + +namespace NServiceBus.Grid.MessageHandlers +{ + /// + /// Manages ready messages + /// + public interface IManageReadyMessages + { + /// + /// Instructs the bus to stop sending s + /// when it has a distributor configured. + /// + void StopSendingReadyMessages(); + + /// + /// Instructs the bus to continue sending s + /// when it has a distributor configured. + /// + void ContinueSendingReadyMessages(); + + /// + /// Instructs the bus to not send a + /// at the end of processing the current message on the specific thread + /// on which it was called. + /// + void SkipSendingReadyMessageOnce(); + } +} diff --git a/src/grid/NServiceBus.Grid.MessageHandlers/NServiceBus.Grid.MessageHandlers.csproj b/src/grid/NServiceBus.Grid.MessageHandlers/NServiceBus.Grid.MessageHandlers.csproj index a76df90d6dc..65b45d470e6 100644 --- a/src/grid/NServiceBus.Grid.MessageHandlers/NServiceBus.Grid.MessageHandlers.csproj +++ b/src/grid/NServiceBus.Grid.MessageHandlers/NServiceBus.Grid.MessageHandlers.csproj @@ -1,148 +1,148 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {02D21488-C00A-4DD2-97BE-C0EA1CDB7206} - Library - Properties - NServiceBus.Grid.MessageHandlers - NServiceBus.Grid.MessageHandlers - - - - - - v4.0 - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.Grid.MessageHandlers.XML - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.Grid.MessageHandlers.XML - AllRules.ruleset - - - - False - ..\..\..\lib\Common.Logging.dll - - - False - ..\..\..\build\output\NServiceBus.dll - False - - - ..\..\..\build\nservicebus.core\NServiceBus.Config.dll - False - - - ..\..\..\build\nservicebus.core\NServiceBus.MessageMutator.dll - False - - - ..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll - False - - - False - ..\..\..\build\nservicebus.core\NServiceBus.Unicast.dll - - - ..\..\..\build\nservicebus.core\NServiceBus.Unicast.Config.dll - False - - - False - ..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll - - - - - 3.5 - - - - - CommonAssemblyInfo.cs - - - - - - - - - - - - {1C22F3DF-F020-491D-A680-5AE98D390140} - NServiceBus.Grid.Messages - - - - - False - Microsoft .NET Framework 4 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - false - - - False - Windows Installer 3.1 - true - - - - - - copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\build\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {02D21488-C00A-4DD2-97BE-C0EA1CDB7206} + Library + Properties + NServiceBus.Grid.MessageHandlers + NServiceBus.Grid.MessageHandlers + + + + + + v4.0 + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.Grid.MessageHandlers.XML + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.Grid.MessageHandlers.XML + AllRules.ruleset + + + + False + ..\..\..\lib\Common.Logging.dll + + + False + ..\..\..\build\output\NServiceBus.dll + False + + + ..\..\..\build\nservicebus.core\NServiceBus.Config.dll + False + + + ..\..\..\build\nservicebus.core\NServiceBus.MessageMutator.dll + False + + + ..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll + False + + + False + ..\..\..\build\nservicebus.core\NServiceBus.Unicast.dll + + + ..\..\..\build\nservicebus.core\NServiceBus.Unicast.Config.dll + False + + + False + ..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll + + + + + 3.5 + + + + + CommonAssemblyInfo.cs + + + + + + + + + + + + {1C22F3DF-F020-491D-A680-5AE98D390140} + NServiceBus.Grid.Messages + + + + + False + Microsoft .NET Framework 4 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 3.1 + true + + + + + + copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\build\" + \ No newline at end of file diff --git a/src/grid/NServiceBus.Grid.MessageHandlers/Properties/AssemblyInfo.cs b/src/grid/NServiceBus.Grid.MessageHandlers/Properties/AssemblyInfo.cs index 62623a79505..a21889df625 100644 --- a/src/grid/NServiceBus.Grid.MessageHandlers/Properties/AssemblyInfo.cs +++ b/src/grid/NServiceBus.Grid.MessageHandlers/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Grid Message Handlers")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Grid Message Handlers")] [assembly: AssemblyDescription("Message handlers for grid messages in nServiceBus")] \ No newline at end of file diff --git a/src/grid/NServiceBus.Grid.MessageHandlers/ReadyManager.cs b/src/grid/NServiceBus.Grid.MessageHandlers/ReadyManager.cs index 1e0ea885070..9a4f45725a0 100644 --- a/src/grid/NServiceBus.Grid.MessageHandlers/ReadyManager.cs +++ b/src/grid/NServiceBus.Grid.MessageHandlers/ReadyManager.cs @@ -1,106 +1,106 @@ -using System; -using NServiceBus.Grid.Messages; -using NServiceBus.Unicast.Transport; - -namespace NServiceBus.Grid.MessageHandlers -{ - /// - /// Manages ready messages - /// - public class ReadyManager : IManageReadyMessages - { - /// - /// Injected transport - /// - public ITransport Transport - { - get { return transport; } - set - { - transport = value; - transport.FinishedMessageProcessing += transport_FinishedMessageProcessing; - } - } - - private ITransport transport; - - /// - /// Injected Bus - /// - public IBus Bus { get; set; } - - /// - /// Address of the distributor's control queue - /// - public virtual string DistributorControlAddress { get; set; } - - /// - /// Sends a ready message to the distributor - /// - /// - public void SendReadyMessage(bool startup) - { - if (DistributorControlAddress == null) - return; - - if (!canSendReadyMessages) - return; - - IMessage[] messages; - if (startup) - { - messages = new IMessage[Transport.NumberOfWorkerThreads]; - for (var i = 0; i < Transport.NumberOfWorkerThreads; i++) - { - var rm = new ReadyMessage - { - ClearPreviousFromThisAddress = (i == 0) - }; - - messages[i] = rm; - } - } - else - { - messages = new IMessage[1]; - messages[0] = new ReadyMessage(); - } - - Bus.Send(DistributorControlAddress, messages); - } - - void transport_FinishedMessageProcessing(object sender, EventArgs e) - { - if (!_skipSendingReadyMessageOnce) - SendReadyMessage(false); - - _skipSendingReadyMessageOnce = false; - } - - void IManageReadyMessages.StopSendingReadyMessages() - { - canSendReadyMessages = false; - } - - void IManageReadyMessages.ContinueSendingReadyMessages() - { - canSendReadyMessages = true; - } - - void IManageReadyMessages.SkipSendingReadyMessageOnce() - { - _skipSendingReadyMessageOnce = true; - } - - /// - /// Accessed by multiple threads. - /// - private volatile bool canSendReadyMessages = true; - - /// - /// ThreadStatic - /// - [ThreadStatic] - private static bool _skipSendingReadyMessageOnce; - } -} +using System; +using NServiceBus.Grid.Messages; +using NServiceBus.Unicast.Transport; + +namespace NServiceBus.Grid.MessageHandlers +{ + /// + /// Manages ready messages + /// + public class ReadyManager : IManageReadyMessages + { + /// + /// Injected transport + /// + public ITransport Transport + { + get { return transport; } + set + { + transport = value; + transport.FinishedMessageProcessing += transport_FinishedMessageProcessing; + } + } + + private ITransport transport; + + /// + /// Injected Bus + /// + public IBus Bus { get; set; } + + /// + /// Address of the distributor's control queue + /// + public virtual string DistributorControlAddress { get; set; } + + /// + /// Sends a ready message to the distributor + /// + /// + public void SendReadyMessage(bool startup) + { + if (DistributorControlAddress == null) + return; + + if (!canSendReadyMessages) + return; + + IMessage[] messages; + if (startup) + { + messages = new IMessage[Transport.NumberOfWorkerThreads]; + for (var i = 0; i < Transport.NumberOfWorkerThreads; i++) + { + var rm = new ReadyMessage + { + ClearPreviousFromThisAddress = (i == 0) + }; + + messages[i] = rm; + } + } + else + { + messages = new IMessage[1]; + messages[0] = new ReadyMessage(); + } + + Bus.Send(DistributorControlAddress, messages); + } + + void transport_FinishedMessageProcessing(object sender, EventArgs e) + { + if (!_skipSendingReadyMessageOnce) + SendReadyMessage(false); + + _skipSendingReadyMessageOnce = false; + } + + void IManageReadyMessages.StopSendingReadyMessages() + { + canSendReadyMessages = false; + } + + void IManageReadyMessages.ContinueSendingReadyMessages() + { + canSendReadyMessages = true; + } + + void IManageReadyMessages.SkipSendingReadyMessageOnce() + { + _skipSendingReadyMessageOnce = true; + } + + /// + /// Accessed by multiple threads. + /// + private volatile bool canSendReadyMessages = true; + + /// + /// ThreadStatic + /// + [ThreadStatic] + private static bool _skipSendingReadyMessageOnce; + } +} diff --git a/src/grid/NServiceBus.Grid.Messages/ChangeNumberOfWorkerThreadsMessage.cs b/src/grid/NServiceBus.Grid.Messages/ChangeNumberOfWorkerThreadsMessage.cs index fc7939472c9..2050ca67872 100644 --- a/src/grid/NServiceBus.Grid.Messages/ChangeNumberOfWorkerThreadsMessage.cs +++ b/src/grid/NServiceBus.Grid.Messages/ChangeNumberOfWorkerThreadsMessage.cs @@ -1,17 +1,17 @@ -using System; - -namespace NServiceBus.Grid.Messages -{ - /// - /// Message sent to request that the bus change the number of - /// worker threads handling messages. - /// - [Serializable] - public class ChangeNumberOfWorkerThreadsMessage : IMessage - { - /// - /// Target number of worker threads. - /// - public int NumberOfWorkerThreads { get; set; } - } -} +using System; + +namespace NServiceBus.Grid.Messages +{ + /// + /// Message sent to request that the bus change the number of + /// worker threads handling messages. + /// + [Serializable] + public class ChangeNumberOfWorkerThreadsMessage : IMessage + { + /// + /// Target number of worker threads. + /// + public int NumberOfWorkerThreads { get; set; } + } +} diff --git a/src/grid/NServiceBus.Grid.Messages/GetNumberOfWorkerThreadsMessage.cs b/src/grid/NServiceBus.Grid.Messages/GetNumberOfWorkerThreadsMessage.cs index a2fdb751bc3..e559ed01873 100644 --- a/src/grid/NServiceBus.Grid.Messages/GetNumberOfWorkerThreadsMessage.cs +++ b/src/grid/NServiceBus.Grid.Messages/GetNumberOfWorkerThreadsMessage.cs @@ -1,13 +1,13 @@ -using System; - -namespace NServiceBus.Grid.Messages -{ - /// - /// Request message sent to a bus to get - /// the number of worker threads. Response is a . - /// - [Serializable] - public class GetNumberOfWorkerThreadsMessage : IMessage - { - } -} +using System; + +namespace NServiceBus.Grid.Messages +{ + /// + /// Request message sent to a bus to get + /// the number of worker threads. Response is a . + /// + [Serializable] + public class GetNumberOfWorkerThreadsMessage : IMessage + { + } +} diff --git a/src/grid/NServiceBus.Grid.Messages/GotNumberOfWorkerThreadsMessage.cs b/src/grid/NServiceBus.Grid.Messages/GotNumberOfWorkerThreadsMessage.cs index 612d0c69d49..04771dfaaeb 100644 --- a/src/grid/NServiceBus.Grid.Messages/GotNumberOfWorkerThreadsMessage.cs +++ b/src/grid/NServiceBus.Grid.Messages/GotNumberOfWorkerThreadsMessage.cs @@ -1,17 +1,17 @@ -using System; - -namespace NServiceBus.Grid.Messages -{ - /// - /// Response message returned by the bus - /// as a result of a . - /// - [Serializable] - public class GotNumberOfWorkerThreadsMessage : IMessage - { - /// - /// The number of worker threads running on the sending endpoint. - /// - public int NumberOfWorkerThreads { get; set; } - } -} +using System; + +namespace NServiceBus.Grid.Messages +{ + /// + /// Response message returned by the bus + /// as a result of a . + /// + [Serializable] + public class GotNumberOfWorkerThreadsMessage : IMessage + { + /// + /// The number of worker threads running on the sending endpoint. + /// + public int NumberOfWorkerThreads { get; set; } + } +} diff --git a/src/grid/NServiceBus.Grid.Messages/NServiceBus.Grid.Messages.csproj b/src/grid/NServiceBus.Grid.Messages/NServiceBus.Grid.Messages.csproj index 007e22bde83..8f16e5b8fcd 100644 --- a/src/grid/NServiceBus.Grid.Messages/NServiceBus.Grid.Messages.csproj +++ b/src/grid/NServiceBus.Grid.Messages/NServiceBus.Grid.Messages.csproj @@ -1,111 +1,111 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {1C22F3DF-F020-491D-A680-5AE98D390140} - Library - Properties - NServiceBus.Grid.Messages - NServiceBus.Grid.Messages - - - - - - v4.0 - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.Grid.Messages.XML - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.Grid.Messages.XML - AllRules.ruleset - - - - False - ..\..\..\build\output\NServiceBus.dll - False - - - - 3.5 - - - - - CommonAssemblyInfo.cs - - - - - - - - - - False - Microsoft .NET Framework 4 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - false - - - False - Windows Installer 3.1 - true - - - - - - copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\build\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {1C22F3DF-F020-491D-A680-5AE98D390140} + Library + Properties + NServiceBus.Grid.Messages + NServiceBus.Grid.Messages + + + + + + v4.0 + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.Grid.Messages.XML + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.Grid.Messages.XML + AllRules.ruleset + + + + False + ..\..\..\build\output\NServiceBus.dll + False + + + + 3.5 + + + + + CommonAssemblyInfo.cs + + + + + + + + + + False + Microsoft .NET Framework 4 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 3.1 + true + + + + + + copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\build\" + \ No newline at end of file diff --git a/src/grid/NServiceBus.Grid.Messages/Properties/AssemblyInfo.cs b/src/grid/NServiceBus.Grid.Messages/Properties/AssemblyInfo.cs index 71d05f1f88b..611b7053338 100644 --- a/src/grid/NServiceBus.Grid.Messages/Properties/AssemblyInfo.cs +++ b/src/grid/NServiceBus.Grid.Messages/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Messages for Grid Functionality")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Messages for Grid Functionality")] [assembly: AssemblyDescription("Messages sent and received by bus processes in nServiceBus to manage worker threads")] \ No newline at end of file diff --git a/src/grid/NServiceBus.Grid.Messages/ReadyMessage.cs b/src/grid/NServiceBus.Grid.Messages/ReadyMessage.cs index cf54ba9ab7a..6c160d22f35 100644 --- a/src/grid/NServiceBus.Grid.Messages/ReadyMessage.cs +++ b/src/grid/NServiceBus.Grid.Messages/ReadyMessage.cs @@ -1,17 +1,17 @@ -using System; - -namespace NServiceBus.Grid.Messages -{ - /// - /// Message sent to a distributor indicating that a node is ready to process another message. - /// - [Serializable] - public class ReadyMessage : IMessage - { - /// - /// Exposes whether or not previous ready messages from the same - /// sender should be cleared. - /// - public bool ClearPreviousFromThisAddress { get; set; } - } -} +using System; + +namespace NServiceBus.Grid.Messages +{ + /// + /// Message sent to a distributor indicating that a node is ready to process another message. + /// + [Serializable] + public class ReadyMessage : IMessage + { + /// + /// Exposes whether or not previous ready messages from the same + /// sender should be cleared. + /// + public bool ClearPreviousFromThisAddress { get; set; } + } +} diff --git a/src/grid/NServiceBus.Grid.sln b/src/grid/NServiceBus.Grid.sln index fec913214b1..9b9186ff6f1 100644 --- a/src/grid/NServiceBus.Grid.sln +++ b/src/grid/NServiceBus.Grid.sln @@ -1,26 +1,26 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Grid.Messages", "NServiceBus.Grid.Messages\NServiceBus.Grid.Messages.csproj", "{1C22F3DF-F020-491D-A680-5AE98D390140}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Grid.MessageHandlers", "NServiceBus.Grid.MessageHandlers\NServiceBus.Grid.MessageHandlers.csproj", "{02D21488-C00A-4DD2-97BE-C0EA1CDB7206}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {1C22F3DF-F020-491D-A680-5AE98D390140}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1C22F3DF-F020-491D-A680-5AE98D390140}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1C22F3DF-F020-491D-A680-5AE98D390140}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1C22F3DF-F020-491D-A680-5AE98D390140}.Release|Any CPU.Build.0 = Release|Any CPU - {02D21488-C00A-4DD2-97BE-C0EA1CDB7206}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {02D21488-C00A-4DD2-97BE-C0EA1CDB7206}.Debug|Any CPU.Build.0 = Debug|Any CPU - {02D21488-C00A-4DD2-97BE-C0EA1CDB7206}.Release|Any CPU.ActiveCfg = Release|Any CPU - {02D21488-C00A-4DD2-97BE-C0EA1CDB7206}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Grid.Messages", "NServiceBus.Grid.Messages\NServiceBus.Grid.Messages.csproj", "{1C22F3DF-F020-491D-A680-5AE98D390140}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Grid.MessageHandlers", "NServiceBus.Grid.MessageHandlers\NServiceBus.Grid.MessageHandlers.csproj", "{02D21488-C00A-4DD2-97BE-C0EA1CDB7206}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1C22F3DF-F020-491D-A680-5AE98D390140}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1C22F3DF-F020-491D-A680-5AE98D390140}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1C22F3DF-F020-491D-A680-5AE98D390140}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1C22F3DF-F020-491D-A680-5AE98D390140}.Release|Any CPU.Build.0 = Release|Any CPU + {02D21488-C00A-4DD2-97BE-C0EA1CDB7206}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {02D21488-C00A-4DD2-97BE-C0EA1CDB7206}.Debug|Any CPU.Build.0 = Debug|Any CPU + {02D21488-C00A-4DD2-97BE-C0EA1CDB7206}.Release|Any CPU.ActiveCfg = Release|Any CPU + {02D21488-C00A-4DD2-97BE-C0EA1CDB7206}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/headers/NServiceBus.MessageHeaders/Bootstrapper.cs b/src/headers/NServiceBus.MessageHeaders/Bootstrapper.cs index 164859a7a8e..2f18632d930 100644 --- a/src/headers/NServiceBus.MessageHeaders/Bootstrapper.cs +++ b/src/headers/NServiceBus.MessageHeaders/Bootstrapper.cs @@ -1,23 +1,23 @@ -using NServiceBus.Config; -using NServiceBus.ObjectBuilder; - -namespace NServiceBus.MessageHeaders -{ - class Bootstrapper : INeedInitialization - { - void INeedInitialization.Init() - { - Configure.Instance.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); - - Configure.ConfigurationComplete += - (s, args) => - { - var mgr = Configure.Instance.Builder.Build(); - - ExtensionMethods.GetHeaderAction = (msg, key) => mgr.GetHeader(msg, key); - ExtensionMethods.SetHeaderAction = (msg, key, val) => mgr.SetHeader(msg, key, val); - ExtensionMethods.GetStaticOutgoingHeadersAction = () => mgr.GetStaticOutgoingHeaders(); - }; - } - } -} +using NServiceBus.Config; +using NServiceBus.ObjectBuilder; + +namespace NServiceBus.MessageHeaders +{ + class Bootstrapper : INeedInitialization + { + void INeedInitialization.Init() + { + Configure.Instance.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); + + Configure.ConfigurationComplete += + (s, args) => + { + var mgr = Configure.Instance.Builder.Build(); + + ExtensionMethods.GetHeaderAction = (msg, key) => mgr.GetHeader(msg, key); + ExtensionMethods.SetHeaderAction = (msg, key, val) => mgr.SetHeader(msg, key, val); + ExtensionMethods.GetStaticOutgoingHeadersAction = () => mgr.GetStaticOutgoingHeaders(); + }; + } + } +} diff --git a/src/headers/NServiceBus.MessageHeaders/MessageHeaderManager.cs b/src/headers/NServiceBus.MessageHeaders/MessageHeaderManager.cs index 7a7bd9764ce..b41b289a88d 100644 --- a/src/headers/NServiceBus.MessageHeaders/MessageHeaderManager.cs +++ b/src/headers/NServiceBus.MessageHeaders/MessageHeaderManager.cs @@ -1,85 +1,85 @@ -using System; -using System.Collections.Generic; -using NServiceBus.MessageMutator; -using NServiceBus.Unicast; -using NServiceBus.Unicast.Transport; - -namespace NServiceBus.MessageHeaders -{ - public class MessageHeaderManager : IMapOutgoingTransportMessages - { - void IMapOutgoingTransportMessages.MapOutgoing(IMessage[] messages, TransportMessage transportMessage) - { - foreach(var key in staticOutgoingHeaders.Keys) - transportMessage.Headers.Add(key, staticOutgoingHeaders[key]); - - if (messageHeaders != null) - if (messageHeaders.ContainsKey(messages[0])) - foreach(var key in messageHeaders[messages[0]].Keys) - transportMessage.Headers.Add(key, messageHeaders[messages[0]][key]); - } - - public string GetHeader(IMessage message, string key) - { - if (message == ExtensionMethods.CurrentMessageBeingHandled) - if (bus.CurrentMessageContext.Headers.ContainsKey(key)) - return bus.CurrentMessageContext.Headers[key]; - else - return null; - - if (messageHeaders == null) - return null; - - if (!messageHeaders.ContainsKey(message)) - return null; - - if (messageHeaders[message].ContainsKey(key)) - return messageHeaders[message][key]; - - return null; - } - - public void SetHeader(IMessage message, string key, string value) - { - if (message == ExtensionMethods.CurrentMessageBeingHandled) - throw new InvalidOperationException("Cannot change headers on the message being processed."); - - if (messageHeaders == null) - messageHeaders = new Dictionary>(); - - if (!messageHeaders.ContainsKey(message)) - messageHeaders.Add(message, new Dictionary()); - - if (!messageHeaders[message].ContainsKey(key)) - messageHeaders[message].Add(key, value); - else - messageHeaders[message][key] = value; - } - - public IDictionary GetStaticOutgoingHeaders() - { - return staticOutgoingHeaders; - } - - public IUnicastBus Bus - { - get { return bus; } - set - { - bus = value; - bus.MessagesSent += - (s2, a2) => - { - if (a2.Messages != null) - foreach (var msg in a2.Messages) - messageHeaders.Remove(msg); - }; - } - } - private IUnicastBus bus; - - private static IDictionary staticOutgoingHeaders = new Dictionary(); - - [ThreadStatic] private static IDictionary> messageHeaders; - } -} +using System; +using System.Collections.Generic; +using NServiceBus.MessageMutator; +using NServiceBus.Unicast; +using NServiceBus.Unicast.Transport; + +namespace NServiceBus.MessageHeaders +{ + public class MessageHeaderManager : IMapOutgoingTransportMessages + { + void IMapOutgoingTransportMessages.MapOutgoing(IMessage[] messages, TransportMessage transportMessage) + { + foreach(var key in staticOutgoingHeaders.Keys) + transportMessage.Headers.Add(key, staticOutgoingHeaders[key]); + + if (messageHeaders != null) + if (messageHeaders.ContainsKey(messages[0])) + foreach(var key in messageHeaders[messages[0]].Keys) + transportMessage.Headers.Add(key, messageHeaders[messages[0]][key]); + } + + public string GetHeader(IMessage message, string key) + { + if (message == ExtensionMethods.CurrentMessageBeingHandled) + if (bus.CurrentMessageContext.Headers.ContainsKey(key)) + return bus.CurrentMessageContext.Headers[key]; + else + return null; + + if (messageHeaders == null) + return null; + + if (!messageHeaders.ContainsKey(message)) + return null; + + if (messageHeaders[message].ContainsKey(key)) + return messageHeaders[message][key]; + + return null; + } + + public void SetHeader(IMessage message, string key, string value) + { + if (message == ExtensionMethods.CurrentMessageBeingHandled) + throw new InvalidOperationException("Cannot change headers on the message being processed."); + + if (messageHeaders == null) + messageHeaders = new Dictionary>(); + + if (!messageHeaders.ContainsKey(message)) + messageHeaders.Add(message, new Dictionary()); + + if (!messageHeaders[message].ContainsKey(key)) + messageHeaders[message].Add(key, value); + else + messageHeaders[message][key] = value; + } + + public IDictionary GetStaticOutgoingHeaders() + { + return staticOutgoingHeaders; + } + + public IUnicastBus Bus + { + get { return bus; } + set + { + bus = value; + bus.MessagesSent += + (s2, a2) => + { + if (a2.Messages != null) + foreach (var msg in a2.Messages) + messageHeaders.Remove(msg); + }; + } + } + private IUnicastBus bus; + + private static IDictionary staticOutgoingHeaders = new Dictionary(); + + [ThreadStatic] private static IDictionary> messageHeaders; + } +} diff --git a/src/headers/NServiceBus.MessageHeaders/NServiceBus.MessageHeaders.csproj b/src/headers/NServiceBus.MessageHeaders/NServiceBus.MessageHeaders.csproj index a6ec4215138..90e452c5bcb 100644 --- a/src/headers/NServiceBus.MessageHeaders/NServiceBus.MessageHeaders.csproj +++ b/src/headers/NServiceBus.MessageHeaders/NServiceBus.MessageHeaders.csproj @@ -1,88 +1,88 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {9EE6366B-E0A4-45B5-AE08-E8CEF58862E4} - Library - Properties - NServiceBus.MessageHeaders - NServiceBus.MessageHeaders - v4.0 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.MessageHeaders.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\..\..\build\output\NServiceBus.dll - False - - - ..\..\..\build\nservicebus.core\NServiceBus.Config.dll - False - - - ..\..\..\build\nservicebus.core\NServiceBus.MessageMutator.dll - False - - - ..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll - False - - - ..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.Common.Config.dll - False - - - ..\..\..\build\nservicebus.core\NServiceBus.Unicast.dll - False - - - ..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll - False - - - - - - - - - - - - CommonAssemblyInfo.cs - - - - - - - + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {9EE6366B-E0A4-45B5-AE08-E8CEF58862E4} + Library + Properties + NServiceBus.MessageHeaders + NServiceBus.MessageHeaders + v4.0 + 512 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.MessageHeaders.XML + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\..\build\output\NServiceBus.dll + False + + + ..\..\..\build\nservicebus.core\NServiceBus.Config.dll + False + + + ..\..\..\build\nservicebus.core\NServiceBus.MessageMutator.dll + False + + + ..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll + False + + + ..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.Common.Config.dll + False + + + ..\..\..\build\nservicebus.core\NServiceBus.Unicast.dll + False + + + ..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll + False + + + + + + + + + + + + CommonAssemblyInfo.cs + + + + + + + \ No newline at end of file diff --git a/src/headers/NServiceBus.MessageHeaders/Properties/AssemblyInfo.cs b/src/headers/NServiceBus.MessageHeaders/Properties/AssemblyInfo.cs index cce6a438322..13ad97cebca 100644 --- a/src/headers/NServiceBus.MessageHeaders/Properties/AssemblyInfo.cs +++ b/src/headers/NServiceBus.MessageHeaders/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Message Header Functionality")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Message Header Functionality")] [assembly: AssemblyDescription("Message header functionality for NServiceBus")] \ No newline at end of file diff --git a/src/headers/headers.sln b/src/headers/headers.sln index f6bb213f748..ab5876f74b8 100644 --- a/src/headers/headers.sln +++ b/src/headers/headers.sln @@ -1,20 +1,20 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.MessageHeaders", "NServiceBus.MessageHeaders\NServiceBus.MessageHeaders.csproj", "{9EE6366B-E0A4-45B5-AE08-E8CEF58862E4}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {9EE6366B-E0A4-45B5-AE08-E8CEF58862E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9EE6366B-E0A4-45B5-AE08-E8CEF58862E4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9EE6366B-E0A4-45B5-AE08-E8CEF58862E4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9EE6366B-E0A4-45B5-AE08-E8CEF58862E4}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.MessageHeaders", "NServiceBus.MessageHeaders\NServiceBus.MessageHeaders.csproj", "{9EE6366B-E0A4-45B5-AE08-E8CEF58862E4}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9EE6366B-E0A4-45B5-AE08-E8CEF58862E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9EE6366B-E0A4-45B5-AE08-E8CEF58862E4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9EE6366B-E0A4-45B5-AE08-E8CEF58862E4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9EE6366B-E0A4-45B5-AE08-E8CEF58862E4}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/hosting/NServiceBus.Hosting.Azure/Entrypoint.cs b/src/hosting/NServiceBus.Hosting.Azure/Entrypoint.cs index 454b0269c20..4c5b170981c 100644 --- a/src/hosting/NServiceBus.Hosting.Azure/Entrypoint.cs +++ b/src/hosting/NServiceBus.Hosting.Azure/Entrypoint.cs @@ -1,125 +1,125 @@ -using Microsoft.WindowsAzure; -using Microsoft.WindowsAzure.Diagnostics; -using Microsoft.WindowsAzure.ServiceRuntime; -using NServiceBus.Hosting.Helpers; -using NServiceBus.Integration.Azure; -using System.Threading; -using System; -using System.Linq; -using System.Collections.Generic; -using System.Configuration; -using System.Diagnostics; - -namespace NServiceBus.Hosting.Azure -{ - /// - /// A host implementation for the Azure cloud platform - /// - public class RoleEntryPoint : Microsoft.WindowsAzure.ServiceRuntime.RoleEntryPoint - { - private const string ProfileSetting = "NServiceBus.Profile"; - private GenericHost genericHost; - private readonly ManualResetEvent waitForStop = new ManualResetEvent(false); - - public RoleEntryPoint() - { - AppDomain.CurrentDomain.UnhandledException += CurrentDomainUnhandledException; - AppDomain.CurrentDomain.AssemblyResolve += CurrentDomainAssemblyResolve; - } - - public override bool OnStart() - { - var azureSettings = new AzureConfigurationSettings(); - var requestedProfiles = azureSettings.GetSetting(ProfileSetting); - - var endpointConfigurationType = GetEndpointConfigurationType(azureSettings); - - AssertThatEndpointConfigurationTypeHasDefaultConstructor(endpointConfigurationType); - - var specifier = (IConfigureThisEndpoint)Activator.CreateInstance(endpointConfigurationType); - - genericHost = new GenericHost(specifier, requestedProfiles.Split(' '), null); - - return true; - } - - private static void CurrentDomainUnhandledException(object sender, UnhandledExceptionEventArgs e) - { - Trace.WriteLine("Unhandled exception occured: " + e.ExceptionObject.ToString()); - } - - static System.Reflection.Assembly CurrentDomainAssemblyResolve(object sender, ResolveEventArgs args) - { - Trace.WriteLine("Couldn't load assembly: " + args.Name); - return null; - } - - public override void Run() - { - genericHost.Start(); - waitForStop.WaitOne(); - } - - public override void OnStop() - { - genericHost.Stop(); - waitForStop.Set(); - } - - private static void AssertThatEndpointConfigurationTypeHasDefaultConstructor(Type type) - { - var constructor = type.GetConstructor(Type.EmptyTypes); - - if (constructor == null) - throw new InvalidOperationException("Endpoint configuration type needs to have a default constructor: " + type.FullName); - } - - private static Type GetEndpointConfigurationType(AzureConfigurationSettings settings) - { - string endpoint = settings.GetSetting("EndpointConfigurationType"); - if (!String.IsNullOrEmpty(endpoint)) - { - var endpointType = Type.GetType(endpoint, false); - if (endpointType == null) - throw new ConfigurationErrorsException(string.Format("The 'EndpointConfigurationType' entry in the role config has specified to use the type '{0}' but that type could not be loaded.", endpoint)); - - return endpointType; - } - - IEnumerable endpoints = ScanAssembliesForEndpoints(); - - ValidateEndpoints(endpoints); - - return endpoints.First(); - } - - private static IEnumerable ScanAssembliesForEndpoints() - { - return AssemblyScanner.GetScannableAssemblies().SelectMany(assembly => assembly.GetTypes().Where(t => typeof(IConfigureThisEndpoint).IsAssignableFrom(t) && t != typeof(IConfigureThisEndpoint))); - } - - private static void ValidateEndpoints(IEnumerable endpointConfigurationTypes) - { - if (endpointConfigurationTypes.Count() == 0) - { - throw new InvalidOperationException("No endpoint configuration found in scanned assemlies. " + - "This usually happens when NServiceBus fails to load your assembly containing IConfigureThisEndpoint." + - " Try specifying the type explicitly in the roles config using the appsetting key: EndpointConfigurationType, " + - "Scanned path: " + AppDomain.CurrentDomain.BaseDirectory); - } - - if (endpointConfigurationTypes.Count() > 1) - { - throw new InvalidOperationException("Host doesn't support hosting of multiple endpoints. " + - "Endpoint classes found: " + - string.Join(", ", - endpointConfigurationTypes.Select( - e => e.AssemblyQualifiedName).ToArray()) + - " You may have some old assemblies in your runtime directory." + - " Try right-clicking your VS project, and selecting 'Clean'." - ); - - } - } - } +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.Diagnostics; +using Microsoft.WindowsAzure.ServiceRuntime; +using NServiceBus.Hosting.Helpers; +using NServiceBus.Integration.Azure; +using System.Threading; +using System; +using System.Linq; +using System.Collections.Generic; +using System.Configuration; +using System.Diagnostics; + +namespace NServiceBus.Hosting.Azure +{ + /// + /// A host implementation for the Azure cloud platform + /// + public class RoleEntryPoint : Microsoft.WindowsAzure.ServiceRuntime.RoleEntryPoint + { + private const string ProfileSetting = "NServiceBus.Profile"; + private GenericHost genericHost; + private readonly ManualResetEvent waitForStop = new ManualResetEvent(false); + + public RoleEntryPoint() + { + AppDomain.CurrentDomain.UnhandledException += CurrentDomainUnhandledException; + AppDomain.CurrentDomain.AssemblyResolve += CurrentDomainAssemblyResolve; + } + + public override bool OnStart() + { + var azureSettings = new AzureConfigurationSettings(); + var requestedProfiles = azureSettings.GetSetting(ProfileSetting); + + var endpointConfigurationType = GetEndpointConfigurationType(azureSettings); + + AssertThatEndpointConfigurationTypeHasDefaultConstructor(endpointConfigurationType); + + var specifier = (IConfigureThisEndpoint)Activator.CreateInstance(endpointConfigurationType); + + genericHost = new GenericHost(specifier, requestedProfiles.Split(' '), null); + + return true; + } + + private static void CurrentDomainUnhandledException(object sender, UnhandledExceptionEventArgs e) + { + Trace.WriteLine("Unhandled exception occured: " + e.ExceptionObject.ToString()); + } + + static System.Reflection.Assembly CurrentDomainAssemblyResolve(object sender, ResolveEventArgs args) + { + Trace.WriteLine("Couldn't load assembly: " + args.Name); + return null; + } + + public override void Run() + { + genericHost.Start(); + waitForStop.WaitOne(); + } + + public override void OnStop() + { + genericHost.Stop(); + waitForStop.Set(); + } + + private static void AssertThatEndpointConfigurationTypeHasDefaultConstructor(Type type) + { + var constructor = type.GetConstructor(Type.EmptyTypes); + + if (constructor == null) + throw new InvalidOperationException("Endpoint configuration type needs to have a default constructor: " + type.FullName); + } + + private static Type GetEndpointConfigurationType(AzureConfigurationSettings settings) + { + string endpoint = settings.GetSetting("EndpointConfigurationType"); + if (!String.IsNullOrEmpty(endpoint)) + { + var endpointType = Type.GetType(endpoint, false); + if (endpointType == null) + throw new ConfigurationErrorsException(string.Format("The 'EndpointConfigurationType' entry in the role config has specified to use the type '{0}' but that type could not be loaded.", endpoint)); + + return endpointType; + } + + IEnumerable endpoints = ScanAssembliesForEndpoints(); + + ValidateEndpoints(endpoints); + + return endpoints.First(); + } + + private static IEnumerable ScanAssembliesForEndpoints() + { + return AssemblyScanner.GetScannableAssemblies().SelectMany(assembly => assembly.GetTypes().Where(t => typeof(IConfigureThisEndpoint).IsAssignableFrom(t) && t != typeof(IConfigureThisEndpoint))); + } + + private static void ValidateEndpoints(IEnumerable endpointConfigurationTypes) + { + if (endpointConfigurationTypes.Count() == 0) + { + throw new InvalidOperationException("No endpoint configuration found in scanned assemlies. " + + "This usually happens when NServiceBus fails to load your assembly containing IConfigureThisEndpoint." + + " Try specifying the type explicitly in the roles config using the appsetting key: EndpointConfigurationType, " + + "Scanned path: " + AppDomain.CurrentDomain.BaseDirectory); + } + + if (endpointConfigurationTypes.Count() > 1) + { + throw new InvalidOperationException("Host doesn't support hosting of multiple endpoints. " + + "Endpoint classes found: " + + string.Join(", ", + endpointConfigurationTypes.Select( + e => e.AssemblyQualifiedName).ToArray()) + + " You may have some old assemblies in your runtime directory." + + " Try right-clicking your VS project, and selecting 'Clean'." + ); + + } + } + } } \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting.Azure/LoggingHandlers/ProductionLoggingHandler.cs b/src/hosting/NServiceBus.Hosting.Azure/LoggingHandlers/ProductionLoggingHandler.cs index 5f96e6053b3..f8033110a05 100644 --- a/src/hosting/NServiceBus.Hosting.Azure/LoggingHandlers/ProductionLoggingHandler.cs +++ b/src/hosting/NServiceBus.Hosting.Azure/LoggingHandlers/ProductionLoggingHandler.cs @@ -1,24 +1,24 @@ -using NServiceBus.Integration.Azure; -using log4net.Layout; -using log4net.Core; -using Microsoft.WindowsAzure.ServiceRuntime; -using System.Reflection; -using System; - -namespace NServiceBus.Hosting.Azure.LoggingHandlers -{ - /// - /// Handles logging configuration for the production profile - /// - public class ProductionLoggingHandler : IConfigureLoggingForProfile - { - void IConfigureLogging.Configure(IConfigureThisEndpoint specifier) - { - SetLoggingLibrary.Log4Net(null, - a => - { - a.ScheduledTransferPeriod = 10; - }); - } - } +using NServiceBus.Integration.Azure; +using log4net.Layout; +using log4net.Core; +using Microsoft.WindowsAzure.ServiceRuntime; +using System.Reflection; +using System; + +namespace NServiceBus.Hosting.Azure.LoggingHandlers +{ + /// + /// Handles logging configuration for the production profile + /// + public class ProductionLoggingHandler : IConfigureLoggingForProfile + { + void IConfigureLogging.Configure(IConfigureThisEndpoint specifier) + { + SetLoggingLibrary.Log4Net(null, + a => + { + a.ScheduledTransferPeriod = 10; + }); + } + } } \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting.Azure/NServiceBus.Hosting.Azure.csproj b/src/hosting/NServiceBus.Hosting.Azure/NServiceBus.Hosting.Azure.csproj index 8531e35b627..03d3721396d 100644 --- a/src/hosting/NServiceBus.Hosting.Azure/NServiceBus.Hosting.Azure.csproj +++ b/src/hosting/NServiceBus.Hosting.Azure/NServiceBus.Hosting.Azure.csproj @@ -1,86 +1,86 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {6591ED91-F9A1-4CC3-813E-A33E07439D49} - Library - Properties - NServiceBus.Hosting.Azure - NServiceBus.Hosting.Azure - v4.0 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\lib\log4net.dll - - - False - ..\..\..\lib\Azure\Microsoft.WindowsAzure.Diagnostics.dll - - - False - ..\..\..\lib\Azure\Microsoft.WindowsAzure.ServiceRuntime.dll - - - False - ..\..\..\lib\Azure\Microsoft.WindowsAzure.StorageClient.dll - - - False - ..\..\..\build\output\NServiceBus.Core.dll - - - - - 3.5 - - - - - - - - - - - - - - - {B5F333D1-D6B1-49FB-82F6-74641E5D11E3} - NServiceBus.Hosting - - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {6591ED91-F9A1-4CC3-813E-A33E07439D49} + Library + Properties + NServiceBus.Hosting.Azure + NServiceBus.Hosting.Azure + v4.0 + 512 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\lib\log4net.dll + + + False + ..\..\..\lib\Azure\Microsoft.WindowsAzure.Diagnostics.dll + + + False + ..\..\..\lib\Azure\Microsoft.WindowsAzure.ServiceRuntime.dll + + + False + ..\..\..\lib\Azure\Microsoft.WindowsAzure.StorageClient.dll + + + False + ..\..\..\build\output\NServiceBus.Core.dll + + + + + 3.5 + + + + + + + + + + + + + + + {B5F333D1-D6B1-49FB-82F6-74641E5D11E3} + NServiceBus.Hosting + + + + + \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting.Azure/Profiles/Handler/ProductionProfileHandler.cs b/src/hosting/NServiceBus.Hosting.Azure/Profiles/Handler/ProductionProfileHandler.cs index 6604a8da77b..7262bf18fbc 100644 --- a/src/hosting/NServiceBus.Hosting.Azure/Profiles/Handler/ProductionProfileHandler.cs +++ b/src/hosting/NServiceBus.Hosting.Azure/Profiles/Handler/ProductionProfileHandler.cs @@ -1,22 +1,22 @@ -using NServiceBus.Hosting.Profiles; - -namespace NServiceBus.Hosting.Azure.Profiles.Handlers -{ - internal class ProductionProfileHandler : IHandleProfile, IWantTheEndpointConfig - { - void IHandleProfile.ProfileActivated() - { - Configure.Instance - .AzureSagaPersister().NHibernateUnitOfWork(); - - //Configure.Instance.MessageForwardingInCaseOfFault(); - - if (Config is AsA_Publisher) - { - Configure.Instance.AzureSubcriptionStorage(); - } - } - - public IConfigureThisEndpoint Config { get; set; } - } +using NServiceBus.Hosting.Profiles; + +namespace NServiceBus.Hosting.Azure.Profiles.Handlers +{ + internal class ProductionProfileHandler : IHandleProfile, IWantTheEndpointConfig + { + void IHandleProfile.ProfileActivated() + { + Configure.Instance + .AzureSagaPersister().NHibernateUnitOfWork(); + + //Configure.Instance.MessageForwardingInCaseOfFault(); + + if (Config is AsA_Publisher) + { + Configure.Instance.AzureSubcriptionStorage(); + } + } + + public IConfigureThisEndpoint Config { get; set; } + } } \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting.Azure/Profiles/Production.cs b/src/hosting/NServiceBus.Hosting.Azure/Profiles/Production.cs index afc8b6a4423..bcaa468ab13 100644 --- a/src/hosting/NServiceBus.Hosting.Azure/Profiles/Production.cs +++ b/src/hosting/NServiceBus.Hosting.Azure/Profiles/Production.cs @@ -1,9 +1,9 @@ -namespace NServiceBus -{ - /// - /// Indicates that the infrastructure should configure itself for production. - /// - public class Production : IProfile - { - } -} +namespace NServiceBus +{ + /// + /// Indicates that the infrastructure should configure itself for production. + /// + public class Production : IProfile + { + } +} diff --git a/src/hosting/NServiceBus.Hosting.Azure/Properties/AssemblyInfo.cs b/src/hosting/NServiceBus.Hosting.Azure/Properties/AssemblyInfo.cs index 85bd1768204..569736b7469 100644 --- a/src/hosting/NServiceBus.Hosting.Azure/Properties/AssemblyInfo.cs +++ b/src/hosting/NServiceBus.Hosting.Azure/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("NServiceBus.Hosting.Azure")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("NServiceBus.Hosting.Azure")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2010")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("a0d91ccc-887f-457e-9374-801e8dee2d06")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("NServiceBus.Hosting.Azure")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("NServiceBus.Hosting.Azure")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2010")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("a0d91ccc-887f-457e-9374-801e8dee2d06")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/hosting/NServiceBus.Hosting.Azure/Roles/AsA_Publisher.cs b/src/hosting/NServiceBus.Hosting.Azure/Roles/AsA_Publisher.cs index 5a8337390e1..13d7aea9aac 100644 --- a/src/hosting/NServiceBus.Hosting.Azure/Roles/AsA_Publisher.cs +++ b/src/hosting/NServiceBus.Hosting.Azure/Roles/AsA_Publisher.cs @@ -1,8 +1,8 @@ -namespace NServiceBus -{ - /// - /// Indicates this endpoint is a publisher. - /// This is compatible with but not . - /// - public interface AsA_Publisher : AsA_Server {} -} +namespace NServiceBus +{ + /// + /// Indicates this endpoint is a publisher. + /// This is compatible with but not . + /// + public interface AsA_Publisher : AsA_Server {} +} diff --git a/src/hosting/NServiceBus.Hosting.Azure/Roles/AsA_Server.cs b/src/hosting/NServiceBus.Hosting.Azure/Roles/AsA_Server.cs index 4d552e8c708..ad5da638ef2 100644 --- a/src/hosting/NServiceBus.Hosting.Azure/Roles/AsA_Server.cs +++ b/src/hosting/NServiceBus.Hosting.Azure/Roles/AsA_Server.cs @@ -1,10 +1,10 @@ -using NServiceBus.Hosting.Roles; - -namespace NServiceBus -{ - /// - /// Indicates this endpoint is a server. - /// As such will be set up as a transactional endpoint using impersonation, not purging messages on startup. - /// - public interface AsA_Server:IRole {} +using NServiceBus.Hosting.Roles; + +namespace NServiceBus +{ + /// + /// Indicates this endpoint is a server. + /// As such will be set up as a transactional endpoint using impersonation, not purging messages on startup. + /// + public interface AsA_Server:IRole {} } \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting.Azure/Roles/Handlers/ServerRoleHandler.cs b/src/hosting/NServiceBus.Hosting.Azure/Roles/Handlers/ServerRoleHandler.cs index ace3a1430de..9bacbb60aa0 100644 --- a/src/hosting/NServiceBus.Hosting.Azure/Roles/Handlers/ServerRoleHandler.cs +++ b/src/hosting/NServiceBus.Hosting.Azure/Roles/Handlers/ServerRoleHandler.cs @@ -1,29 +1,29 @@ -using NServiceBus.Config; -using NServiceBus.Hosting.Roles; -using NServiceBus.Unicast.Config; - -namespace NServiceBus.Hosting.Azure.Roles.Handlers -{ - /// - /// Handles configuration related to the server role - /// - public class ServerRoleHandler : IConfigureRole - { - /// - /// Configures the UnicastBus with typical settings for a server on azure - /// - /// - /// - public ConfigUnicastBus ConfigureRole(IConfigureThisEndpoint specifier) - { - return Configure.Instance - .DefaultBuilder() - .AzureConfigurationSource() - .AzureMessageQueue().IsTransactional(true) - .Sagas() - // .PurgeOnStartup(false) // todo - .UnicastBus() - .ImpersonateSender(true); - } - } +using NServiceBus.Config; +using NServiceBus.Hosting.Roles; +using NServiceBus.Unicast.Config; + +namespace NServiceBus.Hosting.Azure.Roles.Handlers +{ + /// + /// Handles configuration related to the server role + /// + public class ServerRoleHandler : IConfigureRole + { + /// + /// Configures the UnicastBus with typical settings for a server on azure + /// + /// + /// + public ConfigUnicastBus ConfigureRole(IConfigureThisEndpoint specifier) + { + return Configure.Instance + .DefaultBuilder() + .AzureConfigurationSource() + .AzureMessageQueue().IsTransactional(true) + .Sagas() + // .PurgeOnStartup(false) // todo + .UnicastBus() + .ImpersonateSender(true); + } + } } \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting.Tests/NServiceBus.Hosting.Tests.csproj b/src/hosting/NServiceBus.Hosting.Tests/NServiceBus.Hosting.Tests.csproj index b2ad20134ce..ac8a649f381 100644 --- a/src/hosting/NServiceBus.Hosting.Tests/NServiceBus.Hosting.Tests.csproj +++ b/src/hosting/NServiceBus.Hosting.Tests/NServiceBus.Hosting.Tests.csproj @@ -1,74 +1,74 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {93B2CD66-7860-47A3-A039-B7D778E9A8F4} - Library - Properties - NServiceBus.Hosting.Tests - NServiceBus.Hosting.Tests - v4.0 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\lib\log4net.dll - - - False - ..\..\..\build\output\NServiceBus.dll - - - False - ..\..\..\build\output\NServiceBus.Core.dll - - - False - ..\..\..\tools\NUnit\nunit.framework.dll - - - - 3.5 - - - - - - - - - {B5F333D1-D6B1-49FB-82F6-74641E5D11E3} - NServiceBus.Hosting - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {93B2CD66-7860-47A3-A039-B7D778E9A8F4} + Library + Properties + NServiceBus.Hosting.Tests + NServiceBus.Hosting.Tests + v4.0 + 512 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\lib\log4net.dll + + + False + ..\..\..\build\output\NServiceBus.dll + + + False + ..\..\..\build\output\NServiceBus.Core.dll + + + False + ..\..\..\tools\NUnit\nunit.framework.dll + + + + 3.5 + + + + + + + + + {B5F333D1-D6B1-49FB-82F6-74641E5D11E3} + NServiceBus.Hosting + + + + \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting.Tests/Properties/AssemblyInfo.cs b/src/hosting/NServiceBus.Hosting.Tests/Properties/AssemblyInfo.cs index bfd2e2e2ec0..13ddb00228f 100644 --- a/src/hosting/NServiceBus.Hosting.Tests/Properties/AssemblyInfo.cs +++ b/src/hosting/NServiceBus.Hosting.Tests/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("NServiceBus.Hosting.Tests")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("NServiceBus.Hosting.Tests")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("8ea39fa2-309c-4205-a9cb-c44b917ecd77")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("NServiceBus.Hosting.Tests")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("NServiceBus.Hosting.Tests")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("8ea39fa2-309c-4205-a9cb-c44b917ecd77")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/hosting/NServiceBus.Hosting.Tests/RoleManagerTests.cs b/src/hosting/NServiceBus.Hosting.Tests/RoleManagerTests.cs index f45044200b3..d174e244833 100644 --- a/src/hosting/NServiceBus.Hosting.Tests/RoleManagerTests.cs +++ b/src/hosting/NServiceBus.Hosting.Tests/RoleManagerTests.cs @@ -1,60 +1,60 @@ -using NServiceBus.Hosting.Roles; -using NServiceBus.Unicast.Config; -using NUnit.Framework; - -namespace NServiceBus.Hosting.Tests -{ - [TestFixture] - public class RoleManagerTests - { - private RoleManager roleManager; - - [SetUp] - public void SetUp() - { - roleManager = new RoleManager(new[] { typeof(RoleManagerTests).Assembly }); - } - - [Test] - public void Should_configure_requested_role() - { - roleManager.ConfigureBusForEndpoint(new ConfigurationWithTestRole()); - - Assert.True(TestRoleConfigurer.ConfigureCalled); - } - - [Test] - public void Should_configure_inherited_roles() - { - roleManager.ConfigureBusForEndpoint(new ConfigurationWithInheritedRole()); - - Assert.True(TestRoleConfigurer.ConfigureCalled); - } - } - - internal class ConfigurationWithTestRole:IConfigureThisEndpoint,TestRole - { - - } - - internal class ConfigurationWithInheritedRole : IConfigureThisEndpoint, InheritedRole - { - - } - - public interface TestRole:IRole{} - - public interface InheritedRole : TestRole { } - - public class TestRoleConfigurer:IConfigureRole - { - public static bool ConfigureCalled = false; - - public ConfigUnicastBus ConfigureRole(IConfigureThisEndpoint specifier) - { - ConfigureCalled = true; - - return null; - } - } +using NServiceBus.Hosting.Roles; +using NServiceBus.Unicast.Config; +using NUnit.Framework; + +namespace NServiceBus.Hosting.Tests +{ + [TestFixture] + public class RoleManagerTests + { + private RoleManager roleManager; + + [SetUp] + public void SetUp() + { + roleManager = new RoleManager(new[] { typeof(RoleManagerTests).Assembly }); + } + + [Test] + public void Should_configure_requested_role() + { + roleManager.ConfigureBusForEndpoint(new ConfigurationWithTestRole()); + + Assert.True(TestRoleConfigurer.ConfigureCalled); + } + + [Test] + public void Should_configure_inherited_roles() + { + roleManager.ConfigureBusForEndpoint(new ConfigurationWithInheritedRole()); + + Assert.True(TestRoleConfigurer.ConfigureCalled); + } + } + + internal class ConfigurationWithTestRole:IConfigureThisEndpoint,TestRole + { + + } + + internal class ConfigurationWithInheritedRole : IConfigureThisEndpoint, InheritedRole + { + + } + + public interface TestRole:IRole{} + + public interface InheritedRole : TestRole { } + + public class TestRoleConfigurer:IConfigureRole + { + public static bool ConfigureCalled = false; + + public ConfigUnicastBus ConfigureRole(IConfigureThisEndpoint specifier) + { + ConfigureCalled = true; + + return null; + } + } } \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting.Windows/Arguments/HostArguments.cs b/src/hosting/NServiceBus.Hosting.Windows/Arguments/HostArguments.cs index b01117f23bb..a4ff3ea3a36 100644 --- a/src/hosting/NServiceBus.Hosting.Windows/Arguments/HostArguments.cs +++ b/src/hosting/NServiceBus.Hosting.Windows/Arguments/HostArguments.cs @@ -1,44 +1,44 @@ -using System.Linq; -using Topshelf.Internal; -using Topshelf.Internal.ArgumentParsing; - -namespace NServiceBus.Hosting.Windows.Arguments -{ - internal class HostArguments - { - public HostArguments(Parser.Args arguments) - { - Help = GetArgument(arguments, "help") ?? GetArgument(arguments, "?"); - ServiceName = GetArgument(arguments, "serviceName"); - DisplayName = GetArgument(arguments, "displayName"); - Description = GetArgument(arguments, "description"); - EndpointConfigurationType = GetArgument(arguments, "endpointConfigurationType"); - DependsOn = GetArgument(arguments, "dependsOn"); - StartManually = GetArgument(arguments, "startManually"); - Username = GetArgument(arguments, "username"); - Password = GetArgument(arguments, "password"); - } - - public IArgument Help { get; set; } - public IArgument ServiceName { get; set; } - public IArgument DisplayName { get; set; } - public IArgument Description { get; set; } - public IArgument EndpointConfigurationType { get; set; } - public IArgument DependsOn { get; set; } - public IArgument StartManually { get; set; } - public IArgument Username { get; set; } - public IArgument Password { get; set; } - - private static IArgument GetArgument(Parser.Args arguments, string key) - { - IArgument argument = arguments.CustomArguments.Where(x => x.Key != null).SingleOrDefault(x => x.Key.ToUpper() == key.ToUpper()); - - if (argument != null) - { - arguments.CustomArguments = arguments.CustomArguments.Except(new[] {argument}); - } - - return argument; - } - } +using System.Linq; +using Topshelf.Internal; +using Topshelf.Internal.ArgumentParsing; + +namespace NServiceBus.Hosting.Windows.Arguments +{ + internal class HostArguments + { + public HostArguments(Parser.Args arguments) + { + Help = GetArgument(arguments, "help") ?? GetArgument(arguments, "?"); + ServiceName = GetArgument(arguments, "serviceName"); + DisplayName = GetArgument(arguments, "displayName"); + Description = GetArgument(arguments, "description"); + EndpointConfigurationType = GetArgument(arguments, "endpointConfigurationType"); + DependsOn = GetArgument(arguments, "dependsOn"); + StartManually = GetArgument(arguments, "startManually"); + Username = GetArgument(arguments, "username"); + Password = GetArgument(arguments, "password"); + } + + public IArgument Help { get; set; } + public IArgument ServiceName { get; set; } + public IArgument DisplayName { get; set; } + public IArgument Description { get; set; } + public IArgument EndpointConfigurationType { get; set; } + public IArgument DependsOn { get; set; } + public IArgument StartManually { get; set; } + public IArgument Username { get; set; } + public IArgument Password { get; set; } + + private static IArgument GetArgument(Parser.Args arguments, string key) + { + IArgument argument = arguments.CustomArguments.Where(x => x.Key != null).SingleOrDefault(x => x.Key.ToUpper() == key.ToUpper()); + + if (argument != null) + { + arguments.CustomArguments = arguments.CustomArguments.Except(new[] {argument}); + } + + return argument; + } + } } \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting.Windows/Content/Help.txt b/src/hosting/NServiceBus.Hosting.Windows/Content/Help.txt index faee537e793..0d05a1ef759 100644 --- a/src/hosting/NServiceBus.Hosting.Windows/Content/Help.txt +++ b/src/hosting/NServiceBus.Hosting.Windows/Content/Help.txt @@ -1,54 +1,54 @@ -NServiceBus Message Endpoint Host Service - -USAGE: - NServiceBus.Host.exe [/install [/serviceName] - [/displayName] - [/description] - [/endpointConfigurationType] - [/instance] - [/startManually] - [/username] - [/password]] | - [/uninstall[/serviceName] - [/instance]] - -OPTIONS: - -/install Install the message endpoint as a Windows service -/serviceName Specify the service name for the installed service -/displayName Friendly name for the installed service -/description Description for the service -/endpointConfigurationType Specify the type implementing IConfigureThisEndpoint that should be used -/instance Specify the unique name of the service instance you wish to install - ex: "NServiceBus.Host.exe /install /instance:Instance5" -/startManually Specifies that the service should start manually -/username Username for the account the service should run under -/password Password for the service account - -If no service name is specified NServiceBus will use the full name of the -endpoint configuration type (that which implements NServiceBus.IConfigureThisEndpoint) -along with the version number of the assembly it is contained within, for example: - - MyPublisher.Endpoint_v1.0.0.0 - -The default for the display name is the same value as the service name, and the description -defaults to a generic NServiceBus host description. - -You can also specify the endpoint configuration type in the file NServiceBus.Host.exe.config. -This file is optional. - -If you don't specify the endpoint configuration type either in the command-line or in the -NServiceBus.Host.exe.config file, all the DLLs in the runtime directory will be scanned -for a type that implements NServiceBus.IConfigureThisEndpoint. - -If you set the service name and/or instance name during installation you will need to specify -them when uninstalling them as well, ex: - - NServiceBus.Host.exe /uninstall /serviceName:"MyPublisher" /instance:Instance89 - -EXAMPLES: - NServiceBus.Host.exe /install /serviceName:"MyPublisher" /displayName:"My Publisher Service" - /description:"Service for publishing event messages" - /endpointConfigurationType:"YourEndpointConfigType.YourNameSpace, YourAssembly" - /username:"corp\serviceuser" - /password:"p@ssw0rd!" NServiceBus.Production +NServiceBus Message Endpoint Host Service + +USAGE: + NServiceBus.Host.exe [/install [/serviceName] + [/displayName] + [/description] + [/endpointConfigurationType] + [/instance] + [/startManually] + [/username] + [/password]] | + [/uninstall[/serviceName] + [/instance]] + +OPTIONS: + +/install Install the message endpoint as a Windows service +/serviceName Specify the service name for the installed service +/displayName Friendly name for the installed service +/description Description for the service +/endpointConfigurationType Specify the type implementing IConfigureThisEndpoint that should be used +/instance Specify the unique name of the service instance you wish to install + ex: "NServiceBus.Host.exe /install /instance:Instance5" +/startManually Specifies that the service should start manually +/username Username for the account the service should run under +/password Password for the service account + +If no service name is specified NServiceBus will use the full name of the +endpoint configuration type (that which implements NServiceBus.IConfigureThisEndpoint) +along with the version number of the assembly it is contained within, for example: + + MyPublisher.Endpoint_v1.0.0.0 + +The default for the display name is the same value as the service name, and the description +defaults to a generic NServiceBus host description. + +You can also specify the endpoint configuration type in the file NServiceBus.Host.exe.config. +This file is optional. + +If you don't specify the endpoint configuration type either in the command-line or in the +NServiceBus.Host.exe.config file, all the DLLs in the runtime directory will be scanned +for a type that implements NServiceBus.IConfigureThisEndpoint. + +If you set the service name and/or instance name during installation you will need to specify +them when uninstalling them as well, ex: + + NServiceBus.Host.exe /uninstall /serviceName:"MyPublisher" /instance:Instance89 + +EXAMPLES: + NServiceBus.Host.exe /install /serviceName:"MyPublisher" /displayName:"My Publisher Service" + /description:"Service for publishing event messages" + /endpointConfigurationType:"YourEndpointConfigType.YourNameSpace, YourAssembly" + /username:"corp\serviceuser" + /password:"p@ssw0rd!" NServiceBus.Production diff --git a/src/hosting/NServiceBus.Hosting.Windows/HostServiceLocator.cs b/src/hosting/NServiceBus.Hosting.Windows/HostServiceLocator.cs index 8417a06817e..cac95c612c1 100644 --- a/src/hosting/NServiceBus.Hosting.Windows/HostServiceLocator.cs +++ b/src/hosting/NServiceBus.Hosting.Windows/HostServiceLocator.cs @@ -1,39 +1,39 @@ -using System; -using System.Collections.Generic; -using Microsoft.Practices.ServiceLocation; - -namespace NServiceBus.Hosting.Windows -{ - /// - /// Plugs into the generic service locator to return an instance of . - /// - public class HostServiceLocator : ServiceLocatorImplBase - { - /// - /// Command line arguments. - /// - public static string[] Args; - - /// - /// Returns an instance of - /// - /// - /// - /// - protected override object DoGetInstance(Type serviceType, string key) - { - var endpoint = Type.GetType(key,true); - return new WindowsHost(endpoint, Args); - } - - /// - /// Not implemented. - /// - /// - /// - protected override IEnumerable DoGetAllInstances(Type serviceType) - { - throw new NotImplementedException(); - } - } +using System; +using System.Collections.Generic; +using Microsoft.Practices.ServiceLocation; + +namespace NServiceBus.Hosting.Windows +{ + /// + /// Plugs into the generic service locator to return an instance of . + /// + public class HostServiceLocator : ServiceLocatorImplBase + { + /// + /// Command line arguments. + /// + public static string[] Args; + + /// + /// Returns an instance of + /// + /// + /// + /// + protected override object DoGetInstance(Type serviceType, string key) + { + var endpoint = Type.GetType(key,true); + return new WindowsHost(endpoint, Args); + } + + /// + /// Not implemented. + /// + /// + /// + protected override IEnumerable DoGetAllInstances(Type serviceType) + { + throw new NotImplementedException(); + } + } } \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting.Windows/LoggingHandlers/IntegrationLoggingHandler.cs b/src/hosting/NServiceBus.Hosting.Windows/LoggingHandlers/IntegrationLoggingHandler.cs index 03e27f05922..9e498226017 100644 --- a/src/hosting/NServiceBus.Hosting.Windows/LoggingHandlers/IntegrationLoggingHandler.cs +++ b/src/hosting/NServiceBus.Hosting.Windows/LoggingHandlers/IntegrationLoggingHandler.cs @@ -1,16 +1,16 @@ -using log4net.Appender; -using log4net.Core; - -namespace NServiceBus.Hosting.Windows.LoggingHandlers -{ - /// - /// Handles logging configuration for the integration profile. - /// - public class IntegrationLoggingHandler : IConfigureLoggingForProfile - { - void IConfigureLogging.Configure(IConfigureThisEndpoint specifier) - { - NServiceBus.SetLoggingLibrary.Log4Net(null, ca => ca.Threshold = Level.Info); - } - } +using log4net.Appender; +using log4net.Core; + +namespace NServiceBus.Hosting.Windows.LoggingHandlers +{ + /// + /// Handles logging configuration for the integration profile. + /// + public class IntegrationLoggingHandler : IConfigureLoggingForProfile + { + void IConfigureLogging.Configure(IConfigureThisEndpoint specifier) + { + NServiceBus.SetLoggingLibrary.Log4Net(null, ca => ca.Threshold = Level.Info); + } + } } \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting.Windows/LoggingHandlers/LiteLoggingHandler.cs b/src/hosting/NServiceBus.Hosting.Windows/LoggingHandlers/LiteLoggingHandler.cs index 0d23fa750c7..9ef92dc833c 100644 --- a/src/hosting/NServiceBus.Hosting.Windows/LoggingHandlers/LiteLoggingHandler.cs +++ b/src/hosting/NServiceBus.Hosting.Windows/LoggingHandlers/LiteLoggingHandler.cs @@ -1,16 +1,16 @@ -using log4net.Appender; -using log4net.Core; - -namespace NServiceBus.Hosting.Windows.LoggingHandlers -{ - /// - /// Handles logging configuration for the lite profile. - /// - public class LiteLoggingHandler : IConfigureLoggingForProfile - { - void IConfigureLogging.Configure(IConfigureThisEndpoint specifier) - { - NServiceBus.SetLoggingLibrary.Log4Net(null, ca => ca.Threshold = Level.Debug); - } - } +using log4net.Appender; +using log4net.Core; + +namespace NServiceBus.Hosting.Windows.LoggingHandlers +{ + /// + /// Handles logging configuration for the lite profile. + /// + public class LiteLoggingHandler : IConfigureLoggingForProfile + { + void IConfigureLogging.Configure(IConfigureThisEndpoint specifier) + { + NServiceBus.SetLoggingLibrary.Log4Net(null, ca => ca.Threshold = Level.Debug); + } + } } \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting.Windows/LoggingHandlers/ProductionLoggingHandler.cs b/src/hosting/NServiceBus.Hosting.Windows/LoggingHandlers/ProductionLoggingHandler.cs index 74a74e746c3..1d14da55a2b 100644 --- a/src/hosting/NServiceBus.Hosting.Windows/LoggingHandlers/ProductionLoggingHandler.cs +++ b/src/hosting/NServiceBus.Hosting.Windows/LoggingHandlers/ProductionLoggingHandler.cs @@ -1,27 +1,27 @@ -using log4net.Appender; - -namespace NServiceBus.Hosting.Windows.LoggingHandlers -{ - /// - /// Handles logging configuration for the production profile - /// - public class ProductionLoggingHandler : IConfigureLoggingForProfile - { - void IConfigureLogging.Configure(IConfigureThisEndpoint specifier) - { - NServiceBus.SetLoggingLibrary.Log4Net(null, - a => - { - a.CountDirection = 1; - a.DatePattern = "yyyy-MM-dd"; - a.RollingStyle = RollingFileAppender.RollingMode.Composite; - a.MaxFileSize = 1024 * 1024; - a.MaxSizeRollBackups = 10; - a.LockingModel = new FileAppender.MinimalLock(); - a.StaticLogFileName = true; - a.File = "logfile"; - a.AppendToFile = true; - }); - } - } +using log4net.Appender; + +namespace NServiceBus.Hosting.Windows.LoggingHandlers +{ + /// + /// Handles logging configuration for the production profile + /// + public class ProductionLoggingHandler : IConfigureLoggingForProfile + { + void IConfigureLogging.Configure(IConfigureThisEndpoint specifier) + { + NServiceBus.SetLoggingLibrary.Log4Net(null, + a => + { + a.CountDirection = 1; + a.DatePattern = "yyyy-MM-dd"; + a.RollingStyle = RollingFileAppender.RollingMode.Composite; + a.MaxFileSize = 1024 * 1024; + a.MaxSizeRollBackups = 10; + a.LockingModel = new FileAppender.MinimalLock(); + a.StaticLogFileName = true; + a.File = "logfile"; + a.AppendToFile = true; + }); + } + } } \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting.Windows/NServiceBus.Host.sln b/src/hosting/NServiceBus.Hosting.Windows/NServiceBus.Host.sln index e82a88acd04..641b36ddbba 100644 --- a/src/hosting/NServiceBus.Hosting.Windows/NServiceBus.Host.sln +++ b/src/hosting/NServiceBus.Hosting.Windows/NServiceBus.Host.sln @@ -1,24 +1,24 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Host", "NServiceBus.Host.csproj", "{85E813C0-4A94-4946-8B1F-DE1E39AA7D11}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {85E813C0-4A94-4946-8B1F-DE1E39AA7D11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {85E813C0-4A94-4946-8B1F-DE1E39AA7D11}.Debug|Any CPU.Build.0 = Debug|Any CPU - {85E813C0-4A94-4946-8B1F-DE1E39AA7D11}.Release|Any CPU.ActiveCfg = Release|Any CPU - {85E813C0-4A94-4946-8B1F-DE1E39AA7D11}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(SubversionScc) = preSolution - Svn-Managed = True - Manager = AnkhSVN - Subversion Support for Visual Studio - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Host", "NServiceBus.Host.csproj", "{85E813C0-4A94-4946-8B1F-DE1E39AA7D11}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {85E813C0-4A94-4946-8B1F-DE1E39AA7D11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85E813C0-4A94-4946-8B1F-DE1E39AA7D11}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85E813C0-4A94-4946-8B1F-DE1E39AA7D11}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85E813C0-4A94-4946-8B1F-DE1E39AA7D11}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(SubversionScc) = preSolution + Svn-Managed = True + Manager = AnkhSVN - Subversion Support for Visual Studio + EndGlobalSection +EndGlobal diff --git a/src/hosting/NServiceBus.Hosting.Windows/NServiceBus.Hosting.Windows.csproj b/src/hosting/NServiceBus.Hosting.Windows/NServiceBus.Hosting.Windows.csproj index 58055867ab0..ed2ffd0d16c 100644 --- a/src/hosting/NServiceBus.Hosting.Windows/NServiceBus.Hosting.Windows.csproj +++ b/src/hosting/NServiceBus.Hosting.Windows/NServiceBus.Hosting.Windows.csproj @@ -1,125 +1,125 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {85E813C0-4A94-4946-8B1F-DE1E39AA7D11} - Exe - Properties - NServiceBus.Hosting.Windows - NServiceBus.Hosting.Windows - v4.0 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.Hosting.Windows.xml - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.Hosting.Windows.xml - - - - False - ..\..\..\lib\log4net.dll - - - False - ..\..\..\lib\Topshelf\Magnum.dll - - - False - ..\..\..\lib\ServiceLocation\Microsoft.Practices.ServiceLocation.dll - - - False - ..\..\..\build\output\NServiceBus.dll - - - False - ..\..\..\build\output\NServiceBus.Core.dll - - - - - 3.5 - - - - 3.0 - - - - - False - ..\..\..\lib\Topshelf\Topshelf.dll - - - - - CommonAssemblyInfo.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {B5F333D1-D6B1-49FB-82F6-74641E5D11E3} - NServiceBus.Hosting - - - - - - xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\build\host\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {85E813C0-4A94-4946-8B1F-DE1E39AA7D11} + Exe + Properties + NServiceBus.Hosting.Windows + NServiceBus.Hosting.Windows + v4.0 + 512 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.Hosting.Windows.xml + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.Hosting.Windows.xml + + + + False + ..\..\..\lib\log4net.dll + + + False + ..\..\..\lib\Topshelf\Magnum.dll + + + False + ..\..\..\lib\ServiceLocation\Microsoft.Practices.ServiceLocation.dll + + + False + ..\..\..\build\output\NServiceBus.dll + + + False + ..\..\..\build\output\NServiceBus.Core.dll + + + + + 3.5 + + + + 3.0 + + + + + False + ..\..\..\lib\Topshelf\Topshelf.dll + + + + + CommonAssemblyInfo.cs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {B5F333D1-D6B1-49FB-82F6-74641E5D11E3} + NServiceBus.Hosting + + + + + + xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\build\host\" + \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting.Windows/Profiles/Handlers/InstallDtcProfileHandler.cs b/src/hosting/NServiceBus.Hosting.Windows/Profiles/Handlers/InstallDtcProfileHandler.cs index c879de00bc3..53b3bc3168c 100644 --- a/src/hosting/NServiceBus.Hosting.Windows/Profiles/Handlers/InstallDtcProfileHandler.cs +++ b/src/hosting/NServiceBus.Hosting.Windows/Profiles/Handlers/InstallDtcProfileHandler.cs @@ -1,15 +1,15 @@ -using NServiceBus.Hosting.Profiles; - -namespace NServiceBus.Hosting.Windows.Profiles.Handlers -{ - /// - /// Installs the distributed transaction coordinator. - /// - public class InstallDtcProfileHandler : IHandleProfile - { - void IHandleProfile.ProfileActivated() - { - Utils.DtcUtil.StartDtcIfNecessary(); - } - } +using NServiceBus.Hosting.Profiles; + +namespace NServiceBus.Hosting.Windows.Profiles.Handlers +{ + /// + /// Installs the distributed transaction coordinator. + /// + public class InstallDtcProfileHandler : IHandleProfile + { + void IHandleProfile.ProfileActivated() + { + Utils.DtcUtil.StartDtcIfNecessary(); + } + } } \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting.Windows/Profiles/Handlers/InstallMsmqProfileHandler.cs b/src/hosting/NServiceBus.Hosting.Windows/Profiles/Handlers/InstallMsmqProfileHandler.cs index d858becc00f..2cad9edc211 100644 --- a/src/hosting/NServiceBus.Hosting.Windows/Profiles/Handlers/InstallMsmqProfileHandler.cs +++ b/src/hosting/NServiceBus.Hosting.Windows/Profiles/Handlers/InstallMsmqProfileHandler.cs @@ -1,15 +1,15 @@ -using NServiceBus.Hosting.Profiles; - -namespace NServiceBus.Hosting.Windows.Profiles.Handlers -{ - /// - /// Installs and starts MSMQ if necessary. - /// - public class InstallMsmqProfileHandler : IHandleProfile - { - void IHandleProfile.ProfileActivated() - { - Utils.MsmqInstallation.StartMsmqIfNecessary(); - } - } +using NServiceBus.Hosting.Profiles; + +namespace NServiceBus.Hosting.Windows.Profiles.Handlers +{ + /// + /// Installs and starts MSMQ if necessary. + /// + public class InstallMsmqProfileHandler : IHandleProfile + { + void IHandleProfile.ProfileActivated() + { + Utils.MsmqInstallation.StartMsmqIfNecessary(); + } + } } \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting.Windows/Profiles/Handlers/InstallPerformanceCountersProfileHandler.cs b/src/hosting/NServiceBus.Hosting.Windows/Profiles/Handlers/InstallPerformanceCountersProfileHandler.cs index 0d4d12df094..d81ff9bc4d4 100644 --- a/src/hosting/NServiceBus.Hosting.Windows/Profiles/Handlers/InstallPerformanceCountersProfileHandler.cs +++ b/src/hosting/NServiceBus.Hosting.Windows/Profiles/Handlers/InstallPerformanceCountersProfileHandler.cs @@ -1,16 +1,16 @@ -using NServiceBus.Hosting.Profiles; -using NServiceBus.Utils; - -namespace NServiceBus.Hosting.Windows.Profiles.Handlers -{ - /// - /// Installs performance counters. - /// - public class InstallPerformanceCountersProfileHandler : IHandleProfile - { - void IHandleProfile.ProfileActivated() - { - PerformanceCounterInstallation.InstallCounters(); - } - } +using NServiceBus.Hosting.Profiles; +using NServiceBus.Utils; + +namespace NServiceBus.Hosting.Windows.Profiles.Handlers +{ + /// + /// Installs performance counters. + /// + public class InstallPerformanceCountersProfileHandler : IHandleProfile + { + void IHandleProfile.ProfileActivated() + { + PerformanceCounterInstallation.InstallCounters(); + } + } } \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting.Windows/Profiles/Handlers/IntegrationProfileHandler.cs b/src/hosting/NServiceBus.Hosting.Windows/Profiles/Handlers/IntegrationProfileHandler.cs index 190aaafb2e4..f6adbbf16a1 100644 --- a/src/hosting/NServiceBus.Hosting.Windows/Profiles/Handlers/IntegrationProfileHandler.cs +++ b/src/hosting/NServiceBus.Hosting.Windows/Profiles/Handlers/IntegrationProfileHandler.cs @@ -1,41 +1,41 @@ -using System; -using NServiceBus.Config; -using NServiceBus.Hosting.Profiles; -using NServiceBus.ObjectBuilder; -using NServiceBus.Unicast.Subscriptions.Msmq; -using log4net; - -namespace NServiceBus.Hosting.Windows.Profiles.Handlers -{ - internal class IntegrationProfileHandler : IHandleProfile, IWantTheEndpointConfig - { - void IHandleProfile.ProfileActivated() - { - Configure.Instance - .NHibernateSagaPersisterWithSQLiteAndAutomaticSchemaGeneration(); - - Configure.Instance.MessageForwardingInCaseOfFault(); - - AppDomain.CurrentDomain.UnhandledException += (o, e) => - { - if (e.ExceptionObject.GetType() == - typeof(AccessViolationException)) - Logger.Fatal( - "NServiceBus has detected an error in the operation of SQLite. SQLite is the database used to store sagas from NServiceBus when running under the 'Integration' profile. This error usually occurs only under load. If you wish to use sagas under load, it is recommended to run NServiceBus under the 'Production' profile. This can be done by passing the value 'NServiceBus.Production' on the command line to the NServiceBus.Host.exe process. For more information see http://www.NServiceBus.com/Profiles.aspx ."); - }; - - if (Config is AsA_Publisher) - { - if (Configure.GetConfigSection() == null) - Configure.Instance.Configurer.ConfigureComponent( - ComponentCallModelEnum.Singleton) - .ConfigureProperty(s => s.Queue, Program.EndpointId + "_subscriptions"); - else - Configure.Instance.MsmqSubscriptionStorage(); - } - } - - public IConfigureThisEndpoint Config { get; set; } - private static readonly ILog Logger = LogManager.GetLogger("System.Data.SQLite"); - } +using System; +using NServiceBus.Config; +using NServiceBus.Hosting.Profiles; +using NServiceBus.ObjectBuilder; +using NServiceBus.Unicast.Subscriptions.Msmq; +using log4net; + +namespace NServiceBus.Hosting.Windows.Profiles.Handlers +{ + internal class IntegrationProfileHandler : IHandleProfile, IWantTheEndpointConfig + { + void IHandleProfile.ProfileActivated() + { + Configure.Instance + .NHibernateSagaPersisterWithSQLiteAndAutomaticSchemaGeneration(); + + Configure.Instance.MessageForwardingInCaseOfFault(); + + AppDomain.CurrentDomain.UnhandledException += (o, e) => + { + if (e.ExceptionObject.GetType() == + typeof(AccessViolationException)) + Logger.Fatal( + "NServiceBus has detected an error in the operation of SQLite. SQLite is the database used to store sagas from NServiceBus when running under the 'Integration' profile. This error usually occurs only under load. If you wish to use sagas under load, it is recommended to run NServiceBus under the 'Production' profile. This can be done by passing the value 'NServiceBus.Production' on the command line to the NServiceBus.Host.exe process. For more information see http://www.NServiceBus.com/Profiles.aspx ."); + }; + + if (Config is AsA_Publisher) + { + if (Configure.GetConfigSection() == null) + Configure.Instance.Configurer.ConfigureComponent( + ComponentCallModelEnum.Singleton) + .ConfigureProperty(s => s.Queue, Program.EndpointId + "_subscriptions"); + else + Configure.Instance.MsmqSubscriptionStorage(); + } + } + + public IConfigureThisEndpoint Config { get; set; } + private static readonly ILog Logger = LogManager.GetLogger("System.Data.SQLite"); + } } \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting.Windows/Profiles/Handlers/LiteProfileHandler.cs b/src/hosting/NServiceBus.Hosting.Windows/Profiles/Handlers/LiteProfileHandler.cs index 810f1e9a7a1..f15077fd1a3 100644 --- a/src/hosting/NServiceBus.Hosting.Windows/Profiles/Handlers/LiteProfileHandler.cs +++ b/src/hosting/NServiceBus.Hosting.Windows/Profiles/Handlers/LiteProfileHandler.cs @@ -1,19 +1,19 @@ -using NServiceBus.Hosting.Profiles; - -namespace NServiceBus.Hosting.Windows.Profiles.Handlers -{ - internal class LiteProfileHandler : IHandleProfile, IWantTheEndpointConfig - { - void IHandleProfile.ProfileActivated() - { - Configure.Instance.InMemorySagaPersister(); - - Configure.Instance.InMemoryFaultManagement(); - - if (Config is AsA_Publisher) - Configure.Instance.InMemorySubscriptionStorage(); - } - - public IConfigureThisEndpoint Config { get; set; } - } +using NServiceBus.Hosting.Profiles; + +namespace NServiceBus.Hosting.Windows.Profiles.Handlers +{ + internal class LiteProfileHandler : IHandleProfile, IWantTheEndpointConfig + { + void IHandleProfile.ProfileActivated() + { + Configure.Instance.InMemorySagaPersister(); + + Configure.Instance.InMemoryFaultManagement(); + + if (Config is AsA_Publisher) + Configure.Instance.InMemorySubscriptionStorage(); + } + + public IConfigureThisEndpoint Config { get; set; } + } } \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting.Windows/Profiles/Handlers/PerformanceCountersProfileHandler.cs b/src/hosting/NServiceBus.Hosting.Windows/Profiles/Handlers/PerformanceCountersProfileHandler.cs index 9c930500f3c..441aee68ab0 100644 --- a/src/hosting/NServiceBus.Hosting.Windows/Profiles/Handlers/PerformanceCountersProfileHandler.cs +++ b/src/hosting/NServiceBus.Hosting.Windows/Profiles/Handlers/PerformanceCountersProfileHandler.cs @@ -1,63 +1,63 @@ -using System; -using System.Diagnostics; -using System.Threading; -using NServiceBus.Hosting.Profiles; -using NServiceBus.Unicast.Transport; - -namespace NServiceBus.Hosting.Windows.Profiles.Handlers -{ - /// - /// Handles the PerformanceCounters profile. - /// - public class PerformanceCountersProfileHandler : IHandleProfile, IDisposable - { - void IHandleProfile.ProfileActivated() - { - var categoryName = "NServiceBus"; - var counterName = "Critical Time"; - - try - { - counter = new PerformanceCounter(categoryName, counterName, Program.EndpointId, false); - } - catch (Exception e) - { - throw new InvalidOperationException("NServiceBus performance counters not set up correctly. Running this process with the flag NServiceBus.InstallPerformanceCounters once should rectify this problem.", e); - } - - Configure.ConfigurationComplete += - (o, e) => - { - var transport = Configure.Instance.Builder.Build(); - transport.TransportMessageReceived += HandleTransportMessageReceived; - }; - - timer = new Timer(ClearPerfCounter, null, 0, 2000); - } - - private void ClearPerfCounter(object state) - { - var delta = DateTime.Now - timeOfLastCounter; - - if (delta > maxDelta) - counter.RawValue = 0; - } - - private void HandleTransportMessageReceived(object sender, TransportMessageReceivedEventArgs e) - { - counter.RawValue = Convert.ToInt32((DateTime.Now - e.Message.TimeSent).TotalSeconds); - - timeOfLastCounter = DateTime.Now; - } - - public void Dispose() - { - timer.Dispose(); - } - - PerformanceCounter counter; - Timer timer; - private DateTime timeOfLastCounter; - private readonly TimeSpan maxDelta = TimeSpan.FromSeconds(2); - } +using System; +using System.Diagnostics; +using System.Threading; +using NServiceBus.Hosting.Profiles; +using NServiceBus.Unicast.Transport; + +namespace NServiceBus.Hosting.Windows.Profiles.Handlers +{ + /// + /// Handles the PerformanceCounters profile. + /// + public class PerformanceCountersProfileHandler : IHandleProfile, IDisposable + { + void IHandleProfile.ProfileActivated() + { + var categoryName = "NServiceBus"; + var counterName = "Critical Time"; + + try + { + counter = new PerformanceCounter(categoryName, counterName, Program.EndpointId, false); + } + catch (Exception e) + { + throw new InvalidOperationException("NServiceBus performance counters not set up correctly. Running this process with the flag NServiceBus.InstallPerformanceCounters once should rectify this problem.", e); + } + + Configure.ConfigurationComplete += + (o, e) => + { + var transport = Configure.Instance.Builder.Build(); + transport.TransportMessageReceived += HandleTransportMessageReceived; + }; + + timer = new Timer(ClearPerfCounter, null, 0, 2000); + } + + private void ClearPerfCounter(object state) + { + var delta = DateTime.Now - timeOfLastCounter; + + if (delta > maxDelta) + counter.RawValue = 0; + } + + private void HandleTransportMessageReceived(object sender, TransportMessageReceivedEventArgs e) + { + counter.RawValue = Convert.ToInt32((DateTime.Now - e.Message.TimeSent).TotalSeconds); + + timeOfLastCounter = DateTime.Now; + } + + public void Dispose() + { + timer.Dispose(); + } + + PerformanceCounter counter; + Timer timer; + private DateTime timeOfLastCounter; + private readonly TimeSpan maxDelta = TimeSpan.FromSeconds(2); + } } \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting.Windows/Profiles/Handlers/ProductionProfileHandler.cs b/src/hosting/NServiceBus.Hosting.Windows/Profiles/Handlers/ProductionProfileHandler.cs index ebf240364eb..ae44b24bd66 100644 --- a/src/hosting/NServiceBus.Hosting.Windows/Profiles/Handlers/ProductionProfileHandler.cs +++ b/src/hosting/NServiceBus.Hosting.Windows/Profiles/Handlers/ProductionProfileHandler.cs @@ -1,20 +1,20 @@ -using NServiceBus.Hosting.Profiles; - -namespace NServiceBus.Hosting.Windows.Profiles.Handlers -{ - internal class ProductionProfileHandler : IHandleProfile, IWantTheEndpointConfig - { - void IHandleProfile.ProfileActivated() - { - Configure.Instance - .NHibernateSagaPersister(); - - Configure.Instance.MessageForwardingInCaseOfFault(); - - if (Config is AsA_Publisher) - Configure.Instance.DBSubcriptionStorage(); - } - - public IConfigureThisEndpoint Config { get; set; } - } +using NServiceBus.Hosting.Profiles; + +namespace NServiceBus.Hosting.Windows.Profiles.Handlers +{ + internal class ProductionProfileHandler : IHandleProfile, IWantTheEndpointConfig + { + void IHandleProfile.ProfileActivated() + { + Configure.Instance + .NHibernateSagaPersister(); + + Configure.Instance.MessageForwardingInCaseOfFault(); + + if (Config is AsA_Publisher) + Configure.Instance.DBSubcriptionStorage(); + } + + public IConfigureThisEndpoint Config { get; set; } + } } \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting.Windows/Profiles/InstallDtc.cs b/src/hosting/NServiceBus.Hosting.Windows/Profiles/InstallDtc.cs index 9501009e521..a140bef26ae 100644 --- a/src/hosting/NServiceBus.Hosting.Windows/Profiles/InstallDtc.cs +++ b/src/hosting/NServiceBus.Hosting.Windows/Profiles/InstallDtc.cs @@ -1,11 +1,11 @@ -namespace NServiceBus -{ - /// - /// Profile indicating that you want the host to automatically check if the Distributed Transaction Coordinator - /// windows service has its security settings configured correctly, and if they aren't, set the correct settings, - /// check that the service is running, and if it isn't, run the MSDTC service. - /// - public class InstallDtc : IProfile - { - } -} +namespace NServiceBus +{ + /// + /// Profile indicating that you want the host to automatically check if the Distributed Transaction Coordinator + /// windows service has its security settings configured correctly, and if they aren't, set the correct settings, + /// check that the service is running, and if it isn't, run the MSDTC service. + /// + public class InstallDtc : IProfile + { + } +} diff --git a/src/hosting/NServiceBus.Hosting.Windows/Profiles/InstallMsmq.cs b/src/hosting/NServiceBus.Hosting.Windows/Profiles/InstallMsmq.cs index 2b538988d78..2766f2424ff 100644 --- a/src/hosting/NServiceBus.Hosting.Windows/Profiles/InstallMsmq.cs +++ b/src/hosting/NServiceBus.Hosting.Windows/Profiles/InstallMsmq.cs @@ -1,12 +1,12 @@ -namespace NServiceBus -{ - /// - /// Profile indicating that you want the host to automatically check if MSMQ is installed, - /// install MSMQ if it isn't, check that the right components of MSMQ are active, - /// change the active MSMQ components as needed, check that the MSMQ service is running, - /// and run the MSMQ service if it isn't. - /// - public class InstallMsmq : IProfile - { - } -} +namespace NServiceBus +{ + /// + /// Profile indicating that you want the host to automatically check if MSMQ is installed, + /// install MSMQ if it isn't, check that the right components of MSMQ are active, + /// change the active MSMQ components as needed, check that the MSMQ service is running, + /// and run the MSMQ service if it isn't. + /// + public class InstallMsmq : IProfile + { + } +} diff --git a/src/hosting/NServiceBus.Hosting.Windows/Profiles/InstallPerformanceCounters.cs b/src/hosting/NServiceBus.Hosting.Windows/Profiles/InstallPerformanceCounters.cs index 5dd59564be3..19a82ece5cd 100644 --- a/src/hosting/NServiceBus.Hosting.Windows/Profiles/InstallPerformanceCounters.cs +++ b/src/hosting/NServiceBus.Hosting.Windows/Profiles/InstallPerformanceCounters.cs @@ -1,9 +1,9 @@ -namespace NServiceBus -{ - /// - /// Profile indicating that you want the host to install the performance counters. - /// - public class InstallPerformanceCounters : IProfile - { - } -} +namespace NServiceBus +{ + /// + /// Profile indicating that you want the host to install the performance counters. + /// + public class InstallPerformanceCounters : IProfile + { + } +} diff --git a/src/hosting/NServiceBus.Hosting.Windows/Profiles/Integration.cs b/src/hosting/NServiceBus.Hosting.Windows/Profiles/Integration.cs index 7e266ccc00f..bebe2f77542 100644 --- a/src/hosting/NServiceBus.Hosting.Windows/Profiles/Integration.cs +++ b/src/hosting/NServiceBus.Hosting.Windows/Profiles/Integration.cs @@ -1,9 +1,9 @@ -namespace NServiceBus -{ - /// - /// Indicates that infrastructure suitable for integration environments be used. - /// - public class Integration : IProfile - { - } -} +namespace NServiceBus +{ + /// + /// Indicates that infrastructure suitable for integration environments be used. + /// + public class Integration : IProfile + { + } +} diff --git a/src/hosting/NServiceBus.Hosting.Windows/Profiles/Lite.cs b/src/hosting/NServiceBus.Hosting.Windows/Profiles/Lite.cs index e8698a0419c..5b2cb76c620 100644 --- a/src/hosting/NServiceBus.Hosting.Windows/Profiles/Lite.cs +++ b/src/hosting/NServiceBus.Hosting.Windows/Profiles/Lite.cs @@ -1,9 +1,9 @@ -namespace NServiceBus -{ - /// - /// Indicates that the lightest weight infrastructure should be used. - /// - public class Lite : IProfile - { - } -} +namespace NServiceBus +{ + /// + /// Indicates that the lightest weight infrastructure should be used. + /// + public class Lite : IProfile + { + } +} diff --git a/src/hosting/NServiceBus.Hosting.Windows/Profiles/PerformanceCounters.cs b/src/hosting/NServiceBus.Hosting.Windows/Profiles/PerformanceCounters.cs index 148f3cafd11..df10098dc55 100644 --- a/src/hosting/NServiceBus.Hosting.Windows/Profiles/PerformanceCounters.cs +++ b/src/hosting/NServiceBus.Hosting.Windows/Profiles/PerformanceCounters.cs @@ -1,9 +1,9 @@ -namespace NServiceBus -{ - /// - /// Indicates that performance counters should be published. - /// - public class PerformanceCounters : IProfile - { - } -} +namespace NServiceBus +{ + /// + /// Indicates that performance counters should be published. + /// + public class PerformanceCounters : IProfile + { + } +} diff --git a/src/hosting/NServiceBus.Hosting.Windows/Profiles/Production.cs b/src/hosting/NServiceBus.Hosting.Windows/Profiles/Production.cs index afc8b6a4423..bcaa468ab13 100644 --- a/src/hosting/NServiceBus.Hosting.Windows/Profiles/Production.cs +++ b/src/hosting/NServiceBus.Hosting.Windows/Profiles/Production.cs @@ -1,9 +1,9 @@ -namespace NServiceBus -{ - /// - /// Indicates that the infrastructure should configure itself for production. - /// - public class Production : IProfile - { - } -} +namespace NServiceBus +{ + /// + /// Indicates that the infrastructure should configure itself for production. + /// + public class Production : IProfile + { + } +} diff --git a/src/hosting/NServiceBus.Hosting.Windows/Program.cs b/src/hosting/NServiceBus.Hosting.Windows/Program.cs index f412020633b..3729d427e29 100644 --- a/src/hosting/NServiceBus.Hosting.Windows/Program.cs +++ b/src/hosting/NServiceBus.Hosting.Windows/Program.cs @@ -1,228 +1,228 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Reflection; -using NServiceBus.Hosting.Helpers; -using NServiceBus.Hosting.Windows.Arguments; -using Topshelf; -using Topshelf.Configuration; -using System.Configuration; -using Topshelf.Internal; - -namespace NServiceBus.Hosting.Windows -{ - /// - /// Entry point to the process. - /// - public class Program - { - private static void Main(string[] args) - { - Parser.Args commandLineArguments = Parser.ParseArgs(args); - var arguments = new HostArguments(commandLineArguments); - - if (arguments.Help != null) - { - DisplayHelpContent(); - - return; - } - - Type endpointConfigurationType = GetEndpointConfigurationType(arguments); - - AssertThatEndpointConfigurationTypeHasDefaultConstructor(endpointConfigurationType); - - string endpointConfigurationFile = GetEndpointConfigurationFile(endpointConfigurationType); - - if (!File.Exists(endpointConfigurationFile)) - { - throw new InvalidOperationException("No configuration file found at: " + endpointConfigurationFile); - } - - var endpointConfiguration = Activator.CreateInstance(endpointConfigurationType); - - EndpointId = GetEndpointId(endpointConfiguration); - - AppDomain.CurrentDomain.SetupInformation.AppDomainInitializerArguments = args; - - IRunConfiguration cfg = RunnerConfigurator.New(x => - { - x.ConfigureServiceInIsolation(endpointConfigurationType.AssemblyQualifiedName, c => - { - c.ConfigurationFile(endpointConfigurationFile); - c.CommandLineArguments(args, () => SetHostServiceLocatorArgs); - c.WhenStarted(service => service.Start()); - c.WhenStopped(service => service.Stop()); - c.CreateServiceLocator(() => new HostServiceLocator()); - }); - - if (arguments.Username != null && arguments.Password != null) - { - x.RunAs(arguments.Username.Value, arguments.Password.Value); - } - else - { - x.RunAsLocalSystem(); - } - - if (arguments.StartManually != null) - { - x.DoNotStartAutomatically(); - } - - x.SetDisplayName(arguments.DisplayName != null ? arguments.DisplayName.Value : EndpointId); - x.SetServiceName(arguments.ServiceName != null ? arguments.ServiceName.Value : EndpointId); - x.SetDescription(arguments.Description != null ? arguments.Description.Value : "NServiceBus Message Endpoint Host Service"); - x.DependencyOnMsmq(); - - var serviceCommandLine = commandLineArguments.CustomArguments.AsCommandLine(); - - if (arguments.ServiceName != null) - { - serviceCommandLine += " /serviceName:\"" + arguments.ServiceName.Value + "\""; - } - - x.SetServiceCommandLine(serviceCommandLine); - - if (arguments.DependsOn != null) - { - var dependencies = arguments.DependsOn.Value.Split(','); - - foreach (var dependency in dependencies) - { - if (dependency.ToUpper() == KnownServiceNames.Msmq) - { - continue; - } - - x.DependsOn(dependency); - } - } - }); - - Runner.Host(cfg, args); - } - - private static void DisplayHelpContent() - { - try - { - var stream = Assembly.GetCallingAssembly().GetManifestResourceStream("NServiceBus.Hosting.Windows.Content.Help.txt"); - - if (stream != null) - { - var helpText = new StreamReader(stream).ReadToEnd(); - - Console.WriteLine(helpText); - } - } - catch (Exception e) - { - Console.WriteLine(e); - } - } - - /// - /// Gives an identifier for this endpoint - /// - public static string EndpointId { get; set; } - - private static void SetHostServiceLocatorArgs(string[] args) - { - HostServiceLocator.Args = args; - } - - private static void AssertThatEndpointConfigurationTypeHasDefaultConstructor(Type type) - { - var constructor = type.GetConstructor(Type.EmptyTypes); - - if (constructor == null) - throw new InvalidOperationException("Endpoint configuration type needs to have a default constructor: " + type.FullName); - } - - private static string GetEndpointConfigurationFile(Type endpointConfigurationType) - { - return Path.Combine( - AppDomain.CurrentDomain.BaseDirectory, - endpointConfigurationType.Assembly.ManifestModule.Name + ".config"); - } - - /// - /// Gives a string which serves to identify the endpoint. - /// - /// - /// - public static string GetEndpointId(object endpointConfiguration) - { - string endpointName = endpointConfiguration.GetType().FullName; - return string.Format("{0}_v{1}", endpointName, endpointConfiguration.GetType().Assembly.GetName().Version); - } - - private static Type GetEndpointConfigurationType(HostArguments arguments) - { - if (arguments.EndpointConfigurationType != null) - { - string t = arguments.EndpointConfigurationType.Value; - if (t != null) - { - Type endpointType = Type.GetType(t, false); - if (endpointType == null) - throw new ConfigurationErrorsException(string.Format("Command line argument 'endpointConfigurationType' has specified to use the type '{0}' but that type could not be loaded.", t)); - - return endpointType; - } - } - - string endpoint = ConfigurationManager.AppSettings["EndpointConfigurationType"]; - if (endpoint != null) - { - var endpointType = Type.GetType(endpoint, false); - if (endpointType == null) - throw new ConfigurationErrorsException(string.Format("The 'EndpointConfigurationType' entry in the NServiceBus.Host.exe.config has specified to use the type '{0}' but that type could not be loaded.", endpoint)); - - return endpointType; - } - - IEnumerable endpoints = ScanAssembliesForEndpoints(); - - ValidateEndpoints(endpoints); - - return endpoints.First(); - } - - private static IEnumerable ScanAssembliesForEndpoints() - { - foreach (var assembly in AssemblyScanner.GetScannableAssemblies()) - foreach (Type type in assembly.GetTypes().Where(t => typeof(IConfigureThisEndpoint).IsAssignableFrom(t) && t != typeof(IConfigureThisEndpoint))) - { - yield return type; - } - } - - private static void ValidateEndpoints(IEnumerable endpointConfigurationTypes) - { - if (endpointConfigurationTypes.Count() == 0) - { - throw new InvalidOperationException("No endpoint configuration found in scanned assemlies. " + - "This usually happens when NServiceBus fails to load your assembly contaning IConfigureThisEndpoint." + - " Try specifying the type explicitly in the NServiceBus.Host.exe.config using the appsetting key: EndpointConfigurationType, " + - "Scanned path: " + AppDomain.CurrentDomain.BaseDirectory); - } - - if (endpointConfigurationTypes.Count() > 1) - { - throw new InvalidOperationException("Host doesn't support hosting of multiple endpoints. " + - "Endpoint classes found: " + - string.Join(", ", - endpointConfigurationTypes.Select( - e => e.AssemblyQualifiedName).ToArray()) + - " You may have some old assemblies in your runtime directory." + - " Try right-clicking your VS project, and selecting 'Clean'." - ); - - } - } - - } +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using NServiceBus.Hosting.Helpers; +using NServiceBus.Hosting.Windows.Arguments; +using Topshelf; +using Topshelf.Configuration; +using System.Configuration; +using Topshelf.Internal; + +namespace NServiceBus.Hosting.Windows +{ + /// + /// Entry point to the process. + /// + public class Program + { + private static void Main(string[] args) + { + Parser.Args commandLineArguments = Parser.ParseArgs(args); + var arguments = new HostArguments(commandLineArguments); + + if (arguments.Help != null) + { + DisplayHelpContent(); + + return; + } + + Type endpointConfigurationType = GetEndpointConfigurationType(arguments); + + AssertThatEndpointConfigurationTypeHasDefaultConstructor(endpointConfigurationType); + + string endpointConfigurationFile = GetEndpointConfigurationFile(endpointConfigurationType); + + if (!File.Exists(endpointConfigurationFile)) + { + throw new InvalidOperationException("No configuration file found at: " + endpointConfigurationFile); + } + + var endpointConfiguration = Activator.CreateInstance(endpointConfigurationType); + + EndpointId = GetEndpointId(endpointConfiguration); + + AppDomain.CurrentDomain.SetupInformation.AppDomainInitializerArguments = args; + + IRunConfiguration cfg = RunnerConfigurator.New(x => + { + x.ConfigureServiceInIsolation(endpointConfigurationType.AssemblyQualifiedName, c => + { + c.ConfigurationFile(endpointConfigurationFile); + c.CommandLineArguments(args, () => SetHostServiceLocatorArgs); + c.WhenStarted(service => service.Start()); + c.WhenStopped(service => service.Stop()); + c.CreateServiceLocator(() => new HostServiceLocator()); + }); + + if (arguments.Username != null && arguments.Password != null) + { + x.RunAs(arguments.Username.Value, arguments.Password.Value); + } + else + { + x.RunAsLocalSystem(); + } + + if (arguments.StartManually != null) + { + x.DoNotStartAutomatically(); + } + + x.SetDisplayName(arguments.DisplayName != null ? arguments.DisplayName.Value : EndpointId); + x.SetServiceName(arguments.ServiceName != null ? arguments.ServiceName.Value : EndpointId); + x.SetDescription(arguments.Description != null ? arguments.Description.Value : "NServiceBus Message Endpoint Host Service"); + x.DependencyOnMsmq(); + + var serviceCommandLine = commandLineArguments.CustomArguments.AsCommandLine(); + + if (arguments.ServiceName != null) + { + serviceCommandLine += " /serviceName:\"" + arguments.ServiceName.Value + "\""; + } + + x.SetServiceCommandLine(serviceCommandLine); + + if (arguments.DependsOn != null) + { + var dependencies = arguments.DependsOn.Value.Split(','); + + foreach (var dependency in dependencies) + { + if (dependency.ToUpper() == KnownServiceNames.Msmq) + { + continue; + } + + x.DependsOn(dependency); + } + } + }); + + Runner.Host(cfg, args); + } + + private static void DisplayHelpContent() + { + try + { + var stream = Assembly.GetCallingAssembly().GetManifestResourceStream("NServiceBus.Hosting.Windows.Content.Help.txt"); + + if (stream != null) + { + var helpText = new StreamReader(stream).ReadToEnd(); + + Console.WriteLine(helpText); + } + } + catch (Exception e) + { + Console.WriteLine(e); + } + } + + /// + /// Gives an identifier for this endpoint + /// + public static string EndpointId { get; set; } + + private static void SetHostServiceLocatorArgs(string[] args) + { + HostServiceLocator.Args = args; + } + + private static void AssertThatEndpointConfigurationTypeHasDefaultConstructor(Type type) + { + var constructor = type.GetConstructor(Type.EmptyTypes); + + if (constructor == null) + throw new InvalidOperationException("Endpoint configuration type needs to have a default constructor: " + type.FullName); + } + + private static string GetEndpointConfigurationFile(Type endpointConfigurationType) + { + return Path.Combine( + AppDomain.CurrentDomain.BaseDirectory, + endpointConfigurationType.Assembly.ManifestModule.Name + ".config"); + } + + /// + /// Gives a string which serves to identify the endpoint. + /// + /// + /// + public static string GetEndpointId(object endpointConfiguration) + { + string endpointName = endpointConfiguration.GetType().FullName; + return string.Format("{0}_v{1}", endpointName, endpointConfiguration.GetType().Assembly.GetName().Version); + } + + private static Type GetEndpointConfigurationType(HostArguments arguments) + { + if (arguments.EndpointConfigurationType != null) + { + string t = arguments.EndpointConfigurationType.Value; + if (t != null) + { + Type endpointType = Type.GetType(t, false); + if (endpointType == null) + throw new ConfigurationErrorsException(string.Format("Command line argument 'endpointConfigurationType' has specified to use the type '{0}' but that type could not be loaded.", t)); + + return endpointType; + } + } + + string endpoint = ConfigurationManager.AppSettings["EndpointConfigurationType"]; + if (endpoint != null) + { + var endpointType = Type.GetType(endpoint, false); + if (endpointType == null) + throw new ConfigurationErrorsException(string.Format("The 'EndpointConfigurationType' entry in the NServiceBus.Host.exe.config has specified to use the type '{0}' but that type could not be loaded.", endpoint)); + + return endpointType; + } + + IEnumerable endpoints = ScanAssembliesForEndpoints(); + + ValidateEndpoints(endpoints); + + return endpoints.First(); + } + + private static IEnumerable ScanAssembliesForEndpoints() + { + foreach (var assembly in AssemblyScanner.GetScannableAssemblies()) + foreach (Type type in assembly.GetTypes().Where(t => typeof(IConfigureThisEndpoint).IsAssignableFrom(t) && t != typeof(IConfigureThisEndpoint))) + { + yield return type; + } + } + + private static void ValidateEndpoints(IEnumerable endpointConfigurationTypes) + { + if (endpointConfigurationTypes.Count() == 0) + { + throw new InvalidOperationException("No endpoint configuration found in scanned assemlies. " + + "This usually happens when NServiceBus fails to load your assembly contaning IConfigureThisEndpoint." + + " Try specifying the type explicitly in the NServiceBus.Host.exe.config using the appsetting key: EndpointConfigurationType, " + + "Scanned path: " + AppDomain.CurrentDomain.BaseDirectory); + } + + if (endpointConfigurationTypes.Count() > 1) + { + throw new InvalidOperationException("Host doesn't support hosting of multiple endpoints. " + + "Endpoint classes found: " + + string.Join(", ", + endpointConfigurationTypes.Select( + e => e.AssemblyQualifiedName).ToArray()) + + " You may have some old assemblies in your runtime directory." + + " Try right-clicking your VS project, and selecting 'Clean'." + ); + + } + } + + } } \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting.Windows/Properties/AssemblyInfo.cs b/src/hosting/NServiceBus.Hosting.Windows/Properties/AssemblyInfo.cs index fd77ee3446b..b4e23611082 100644 --- a/src/hosting/NServiceBus.Hosting.Windows/Properties/AssemblyInfo.cs +++ b/src/hosting/NServiceBus.Hosting.Windows/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("Generic Host Process for NServiceBus")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("Generic Host Process for NServiceBus")] [assembly: AssemblyDescription("Functionality for generically hosting nServiceBus processes.")] \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting.Windows/Roles/AsA_Client.cs b/src/hosting/NServiceBus.Hosting.Windows/Roles/AsA_Client.cs index 024d960dcbe..08f6841621c 100644 --- a/src/hosting/NServiceBus.Hosting.Windows/Roles/AsA_Client.cs +++ b/src/hosting/NServiceBus.Hosting.Windows/Roles/AsA_Client.cs @@ -1,10 +1,10 @@ -using NServiceBus.Hosting.Roles; - -namespace NServiceBus -{ - /// - /// Indicates this endpoint is a client. - /// As such will be set up as a non-transactional endpoint with no impersonation and purging messages on startup. - /// - public interface AsA_Client:IRole {} +using NServiceBus.Hosting.Roles; + +namespace NServiceBus +{ + /// + /// Indicates this endpoint is a client. + /// As such will be set up as a non-transactional endpoint with no impersonation and purging messages on startup. + /// + public interface AsA_Client:IRole {} } \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting.Windows/Roles/AsA_Publisher.cs b/src/hosting/NServiceBus.Hosting.Windows/Roles/AsA_Publisher.cs index 5a8337390e1..13d7aea9aac 100644 --- a/src/hosting/NServiceBus.Hosting.Windows/Roles/AsA_Publisher.cs +++ b/src/hosting/NServiceBus.Hosting.Windows/Roles/AsA_Publisher.cs @@ -1,8 +1,8 @@ -namespace NServiceBus -{ - /// - /// Indicates this endpoint is a publisher. - /// This is compatible with but not . - /// - public interface AsA_Publisher : AsA_Server {} -} +namespace NServiceBus +{ + /// + /// Indicates this endpoint is a publisher. + /// This is compatible with but not . + /// + public interface AsA_Publisher : AsA_Server {} +} diff --git a/src/hosting/NServiceBus.Hosting.Windows/Roles/AsA_Server.cs b/src/hosting/NServiceBus.Hosting.Windows/Roles/AsA_Server.cs index 4d552e8c708..ad5da638ef2 100644 --- a/src/hosting/NServiceBus.Hosting.Windows/Roles/AsA_Server.cs +++ b/src/hosting/NServiceBus.Hosting.Windows/Roles/AsA_Server.cs @@ -1,10 +1,10 @@ -using NServiceBus.Hosting.Roles; - -namespace NServiceBus -{ - /// - /// Indicates this endpoint is a server. - /// As such will be set up as a transactional endpoint using impersonation, not purging messages on startup. - /// - public interface AsA_Server:IRole {} +using NServiceBus.Hosting.Roles; + +namespace NServiceBus +{ + /// + /// Indicates this endpoint is a server. + /// As such will be set up as a transactional endpoint using impersonation, not purging messages on startup. + /// + public interface AsA_Server:IRole {} } \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting.Windows/Roles/Handlers/ClientRoleHandler.cs b/src/hosting/NServiceBus.Hosting.Windows/Roles/Handlers/ClientRoleHandler.cs index e5f7af80b8a..106d860aaac 100644 --- a/src/hosting/NServiceBus.Hosting.Windows/Roles/Handlers/ClientRoleHandler.cs +++ b/src/hosting/NServiceBus.Hosting.Windows/Roles/Handlers/ClientRoleHandler.cs @@ -1,27 +1,27 @@ -using NServiceBus.Hosting.Roles; -using NServiceBus.Unicast.Config; - -namespace NServiceBus.Hosting.Windows.Roles.Handlers -{ - /// - /// Handles configuration related to the client role - /// - public class ClientRoleHandler : IConfigureRole - { - /// - /// Configures the UnicastBus with typical settings for a client - /// - /// - /// - public ConfigUnicastBus ConfigureRole(IConfigureThisEndpoint specifier) - { - return Configure.Instance - .MsmqTransport() - .IsTransactional(false) - .PurgeOnStartup(true) - .UnicastBus() - .ImpersonateSender(false); - - } - } +using NServiceBus.Hosting.Roles; +using NServiceBus.Unicast.Config; + +namespace NServiceBus.Hosting.Windows.Roles.Handlers +{ + /// + /// Handles configuration related to the client role + /// + public class ClientRoleHandler : IConfigureRole + { + /// + /// Configures the UnicastBus with typical settings for a client + /// + /// + /// + public ConfigUnicastBus ConfigureRole(IConfigureThisEndpoint specifier) + { + return Configure.Instance + .MsmqTransport() + .IsTransactional(false) + .PurgeOnStartup(true) + .UnicastBus() + .ImpersonateSender(false); + + } + } } \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting.Windows/Roles/Handlers/ServerRoleHandler.cs b/src/hosting/NServiceBus.Hosting.Windows/Roles/Handlers/ServerRoleHandler.cs index 93dd28d8459..3105cbc295b 100644 --- a/src/hosting/NServiceBus.Hosting.Windows/Roles/Handlers/ServerRoleHandler.cs +++ b/src/hosting/NServiceBus.Hosting.Windows/Roles/Handlers/ServerRoleHandler.cs @@ -1,31 +1,31 @@ -using NServiceBus.Hosting.Roles; -using NServiceBus.Unicast.Config; -using NServiceBus.UnitOfWork; - -namespace NServiceBus.Hosting.Windows.Roles.Handlers -{ - /// - /// Handles configuration related to the server role - /// - public class ServerRoleHandler : IConfigureRole - { - /// - /// Configures the UnicastBus with typical settings for a server - /// - /// - /// - public ConfigUnicastBus ConfigureRole(IConfigureThisEndpoint specifier) - { - if (!Configure.Instance.Configurer.HasComponent()) - Configure.Instance.NHibernateUnitOfWork(); - - return Configure.Instance - .Sagas() - .MsmqTransport() - .IsTransactional(true) - .PurgeOnStartup(false) - .UnicastBus() - .ImpersonateSender(true); - } - } +using NServiceBus.Hosting.Roles; +using NServiceBus.Unicast.Config; +using NServiceBus.UnitOfWork; + +namespace NServiceBus.Hosting.Windows.Roles.Handlers +{ + /// + /// Handles configuration related to the server role + /// + public class ServerRoleHandler : IConfigureRole + { + /// + /// Configures the UnicastBus with typical settings for a server + /// + /// + /// + public ConfigUnicastBus ConfigureRole(IConfigureThisEndpoint specifier) + { + if (!Configure.Instance.Configurer.HasComponent()) + Configure.Instance.NHibernateUnitOfWork(); + + return Configure.Instance + .Sagas() + .MsmqTransport() + .IsTransactional(true) + .PurgeOnStartup(false) + .UnicastBus() + .ImpersonateSender(true); + } + } } \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting.Windows/WindowsHost.cs b/src/hosting/NServiceBus.Hosting.Windows/WindowsHost.cs index 61f7d474b97..ce3fa72f83f 100644 --- a/src/hosting/NServiceBus.Hosting.Windows/WindowsHost.cs +++ b/src/hosting/NServiceBus.Hosting.Windows/WindowsHost.cs @@ -1,45 +1,45 @@ -using System; - -namespace NServiceBus.Hosting.Windows -{ - /// - /// A windows implementation of the NServiceBus hosting solution - /// - public class WindowsHost : MarshalByRefObject - { - private readonly GenericHost genericHost; - - /// - /// Accepts the type which will specify the users custom configuration. - /// This type should implement . - /// - /// - /// - public WindowsHost(Type endpointType, string[] args) - { - var specifier = (IConfigureThisEndpoint)Activator.CreateInstance(endpointType); - - Program.EndpointId = Program.GetEndpointId(specifier); - - genericHost = new GenericHost(specifier, args, new[] { typeof(Lite) }); - } - - /// - /// Does startup work. - /// - public void Start() - { - genericHost.Start(); - } - - /// - /// Does shutdown work. - /// - public void Stop() - { - genericHost.Stop(); - } - - - } +using System; + +namespace NServiceBus.Hosting.Windows +{ + /// + /// A windows implementation of the NServiceBus hosting solution + /// + public class WindowsHost : MarshalByRefObject + { + private readonly GenericHost genericHost; + + /// + /// Accepts the type which will specify the users custom configuration. + /// This type should implement . + /// + /// + /// + public WindowsHost(Type endpointType, string[] args) + { + var specifier = (IConfigureThisEndpoint)Activator.CreateInstance(endpointType); + + Program.EndpointId = Program.GetEndpointId(specifier); + + genericHost = new GenericHost(specifier, args, new[] { typeof(Lite) }); + } + + /// + /// Does startup work. + /// + public void Start() + { + genericHost.Start(); + } + + /// + /// Does shutdown work. + /// + public void Stop() + { + genericHost.Stop(); + } + + + } } \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting.sln b/src/hosting/NServiceBus.Hosting.sln index 0bf323d19b3..2bd2df4a611 100644 --- a/src/hosting/NServiceBus.Hosting.sln +++ b/src/hosting/NServiceBus.Hosting.sln @@ -1,38 +1,38 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Hosting", "NServiceBus.Hosting\NServiceBus.Hosting.csproj", "{B5F333D1-D6B1-49FB-82F6-74641E5D11E3}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Hosting.Tests", "NServiceBus.Hosting.Tests\NServiceBus.Hosting.Tests.csproj", "{93B2CD66-7860-47A3-A039-B7D778E9A8F4}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Hosting.Azure", "NServiceBus.Hosting.Azure\NServiceBus.Hosting.Azure.csproj", "{6591ED91-F9A1-4CC3-813E-A33E07439D49}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Hosting.Windows", "NServiceBus.Hosting.Windows\NServiceBus.Hosting.Windows.csproj", "{85E813C0-4A94-4946-8B1F-DE1E39AA7D11}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B5F333D1-D6B1-49FB-82F6-74641E5D11E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B5F333D1-D6B1-49FB-82F6-74641E5D11E3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B5F333D1-D6B1-49FB-82F6-74641E5D11E3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B5F333D1-D6B1-49FB-82F6-74641E5D11E3}.Release|Any CPU.Build.0 = Release|Any CPU - {93B2CD66-7860-47A3-A039-B7D778E9A8F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {93B2CD66-7860-47A3-A039-B7D778E9A8F4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {93B2CD66-7860-47A3-A039-B7D778E9A8F4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {93B2CD66-7860-47A3-A039-B7D778E9A8F4}.Release|Any CPU.Build.0 = Release|Any CPU - {6591ED91-F9A1-4CC3-813E-A33E07439D49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6591ED91-F9A1-4CC3-813E-A33E07439D49}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6591ED91-F9A1-4CC3-813E-A33E07439D49}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6591ED91-F9A1-4CC3-813E-A33E07439D49}.Release|Any CPU.Build.0 = Release|Any CPU - {85E813C0-4A94-4946-8B1F-DE1E39AA7D11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {85E813C0-4A94-4946-8B1F-DE1E39AA7D11}.Debug|Any CPU.Build.0 = Debug|Any CPU - {85E813C0-4A94-4946-8B1F-DE1E39AA7D11}.Release|Any CPU.ActiveCfg = Release|Any CPU - {85E813C0-4A94-4946-8B1F-DE1E39AA7D11}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Hosting", "NServiceBus.Hosting\NServiceBus.Hosting.csproj", "{B5F333D1-D6B1-49FB-82F6-74641E5D11E3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Hosting.Tests", "NServiceBus.Hosting.Tests\NServiceBus.Hosting.Tests.csproj", "{93B2CD66-7860-47A3-A039-B7D778E9A8F4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Hosting.Azure", "NServiceBus.Hosting.Azure\NServiceBus.Hosting.Azure.csproj", "{6591ED91-F9A1-4CC3-813E-A33E07439D49}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Hosting.Windows", "NServiceBus.Hosting.Windows\NServiceBus.Hosting.Windows.csproj", "{85E813C0-4A94-4946-8B1F-DE1E39AA7D11}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B5F333D1-D6B1-49FB-82F6-74641E5D11E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B5F333D1-D6B1-49FB-82F6-74641E5D11E3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B5F333D1-D6B1-49FB-82F6-74641E5D11E3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B5F333D1-D6B1-49FB-82F6-74641E5D11E3}.Release|Any CPU.Build.0 = Release|Any CPU + {93B2CD66-7860-47A3-A039-B7D778E9A8F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {93B2CD66-7860-47A3-A039-B7D778E9A8F4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {93B2CD66-7860-47A3-A039-B7D778E9A8F4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {93B2CD66-7860-47A3-A039-B7D778E9A8F4}.Release|Any CPU.Build.0 = Release|Any CPU + {6591ED91-F9A1-4CC3-813E-A33E07439D49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6591ED91-F9A1-4CC3-813E-A33E07439D49}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6591ED91-F9A1-4CC3-813E-A33E07439D49}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6591ED91-F9A1-4CC3-813E-A33E07439D49}.Release|Any CPU.Build.0 = Release|Any CPU + {85E813C0-4A94-4946-8B1F-DE1E39AA7D11}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85E813C0-4A94-4946-8B1F-DE1E39AA7D11}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85E813C0-4A94-4946-8B1F-DE1E39AA7D11}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85E813C0-4A94-4946-8B1F-DE1E39AA7D11}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/hosting/NServiceBus.Hosting/Configuration/ConfigurationManager.cs b/src/hosting/NServiceBus.Hosting/Configuration/ConfigurationManager.cs index 8bde0bdaa50..04ac4bf9a41 100644 --- a/src/hosting/NServiceBus.Hosting/Configuration/ConfigurationManager.cs +++ b/src/hosting/NServiceBus.Hosting/Configuration/ConfigurationManager.cs @@ -1,119 +1,119 @@ -using System; -using System.Collections.Generic; -using System.Reflection; -using log4net; -using NServiceBus.ObjectBuilder; - -namespace NServiceBus.Hosting.Configuration -{ - /// - /// Configures the host upon startup - /// - public class ConfigManager - { - /// - /// Contructs the manager with the given user configuration and the list of assemblies that should be scanned - /// - /// - /// - public ConfigManager(IEnumerable assembliesToScan, IConfigureThisEndpoint specifier) - { - this.specifier = specifier; - - foreach(var a in assembliesToScan) - foreach(var t in a.GetTypes()) - { - if (typeof(IWantCustomInitialization).IsAssignableFrom(t) && !t.IsInterface && !t.IsAbstract && !typeof(IConfigureThisEndpoint).IsAssignableFrom(t)) - toInitialize.Add(t); - if (typeof(IWantToRunAtStartup).IsAssignableFrom(t) && !t.IsInterface && !t.IsAbstract) - toRunAtStartup.Add(t); - } - } - - /// - /// Configures the user classes that need custom config and those that are marked to run at startup - /// - public void ConfigureCustomInitAndStartup() - { - foreach (var t in toRunAtStartup) - Configure.Instance.Configurer.ConfigureComponent(t, ComponentCallModelEnum.Singlecall); - - foreach (var t in toInitialize) - { - var o = (IWantCustomInitialization) Activator.CreateInstance(t); - if (o is IWantTheEndpointConfig) - (o as IWantTheEndpointConfig).Config = specifier; - - o.Init(); - } - } - - /// - /// Executes the user classes that are marked as "run at startup" - /// - public void Startup() - { - thingsToRunAtStartup = Configure.Instance.Builder.BuildAll(); - - if (thingsToRunAtStartup == null) - return; - - foreach (var thing in thingsToRunAtStartup) - { - var toRun = thing; - Action onstart = () => - { - var logger = LogManager.GetLogger(toRun.GetType()); - try - { - logger.Debug("Calling " + toRun.GetType().Name); - toRun.Run(); - } - catch (Exception ex) - { - logger.Error("Problem occurred when starting the endpoint.", ex); - - //don't rethrow so that thread doesn't die before log message is shown. - } - - }; - - onstart.BeginInvoke(null, null); - } - } - - /// - /// Shutsdown the user classes started earlier - /// - public void Shutdown() - { - if (thingsToRunAtStartup == null) - return; - - foreach (var thing in thingsToRunAtStartup) - { - if (thing != null) - { - var logger = LogManager.GetLogger(thing.GetType()); - logger.Debug("Stopping " + thing.GetType().Name); - try - { - thing.Stop(); - } - catch (Exception ex) - { - logger.Error(thing.GetType().Name + " could not be stopped.", ex); - - // no need to rethrow, closing the process anyway - } - } - } - } - - private readonly IList toInitialize = new List(); - private readonly IList toRunAtStartup = new List(); - private readonly IConfigureThisEndpoint specifier; - - private IEnumerable thingsToRunAtStartup; - } +using System; +using System.Collections.Generic; +using System.Reflection; +using log4net; +using NServiceBus.ObjectBuilder; + +namespace NServiceBus.Hosting.Configuration +{ + /// + /// Configures the host upon startup + /// + public class ConfigManager + { + /// + /// Contructs the manager with the given user configuration and the list of assemblies that should be scanned + /// + /// + /// + public ConfigManager(IEnumerable assembliesToScan, IConfigureThisEndpoint specifier) + { + this.specifier = specifier; + + foreach(var a in assembliesToScan) + foreach(var t in a.GetTypes()) + { + if (typeof(IWantCustomInitialization).IsAssignableFrom(t) && !t.IsInterface && !t.IsAbstract && !typeof(IConfigureThisEndpoint).IsAssignableFrom(t)) + toInitialize.Add(t); + if (typeof(IWantToRunAtStartup).IsAssignableFrom(t) && !t.IsInterface && !t.IsAbstract) + toRunAtStartup.Add(t); + } + } + + /// + /// Configures the user classes that need custom config and those that are marked to run at startup + /// + public void ConfigureCustomInitAndStartup() + { + foreach (var t in toRunAtStartup) + Configure.Instance.Configurer.ConfigureComponent(t, ComponentCallModelEnum.Singlecall); + + foreach (var t in toInitialize) + { + var o = (IWantCustomInitialization) Activator.CreateInstance(t); + if (o is IWantTheEndpointConfig) + (o as IWantTheEndpointConfig).Config = specifier; + + o.Init(); + } + } + + /// + /// Executes the user classes that are marked as "run at startup" + /// + public void Startup() + { + thingsToRunAtStartup = Configure.Instance.Builder.BuildAll(); + + if (thingsToRunAtStartup == null) + return; + + foreach (var thing in thingsToRunAtStartup) + { + var toRun = thing; + Action onstart = () => + { + var logger = LogManager.GetLogger(toRun.GetType()); + try + { + logger.Debug("Calling " + toRun.GetType().Name); + toRun.Run(); + } + catch (Exception ex) + { + logger.Error("Problem occurred when starting the endpoint.", ex); + + //don't rethrow so that thread doesn't die before log message is shown. + } + + }; + + onstart.BeginInvoke(null, null); + } + } + + /// + /// Shutsdown the user classes started earlier + /// + public void Shutdown() + { + if (thingsToRunAtStartup == null) + return; + + foreach (var thing in thingsToRunAtStartup) + { + if (thing != null) + { + var logger = LogManager.GetLogger(thing.GetType()); + logger.Debug("Stopping " + thing.GetType().Name); + try + { + thing.Stop(); + } + catch (Exception ex) + { + logger.Error(thing.GetType().Name + " could not be stopped.", ex); + + // no need to rethrow, closing the process anyway + } + } + } + } + + private readonly IList toInitialize = new List(); + private readonly IList toRunAtStartup = new List(); + private readonly IConfigureThisEndpoint specifier; + + private IEnumerable thingsToRunAtStartup; + } } \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting/Configuration/IConfigureLogging.cs b/src/hosting/NServiceBus.Hosting/Configuration/IConfigureLogging.cs index c8594ffc730..37591814b32 100644 --- a/src/hosting/NServiceBus.Hosting/Configuration/IConfigureLogging.cs +++ b/src/hosting/NServiceBus.Hosting/Configuration/IConfigureLogging.cs @@ -1,26 +1,26 @@ -namespace NServiceBus -{ - /// - /// Called in order to configure logging. - /// - /// If you want logging configured regardless of profiles, do not use this interface, - /// instead implement on the class which implements . - /// - /// Implementors should work against the generic version of this interface. - /// - public interface IConfigureLogging - { - /// - /// Performs all logging configuration. - /// - void Configure(IConfigureThisEndpoint specifier); - } - - /// - /// Called in order to configure logging for the given profile type. - /// If an implementation isn't found for a given profile, then the search continues - /// recursively up that profile's inheritance hierarchy. - /// - /// - public interface IConfigureLoggingForProfile : IConfigureLogging where T : IProfile {} -} +namespace NServiceBus +{ + /// + /// Called in order to configure logging. + /// + /// If you want logging configured regardless of profiles, do not use this interface, + /// instead implement on the class which implements . + /// + /// Implementors should work against the generic version of this interface. + /// + public interface IConfigureLogging + { + /// + /// Performs all logging configuration. + /// + void Configure(IConfigureThisEndpoint specifier); + } + + /// + /// Called in order to configure logging for the given profile type. + /// If an implementation isn't found for a given profile, then the search continues + /// recursively up that profile's inheritance hierarchy. + /// + /// + public interface IConfigureLoggingForProfile : IConfigureLogging where T : IProfile {} +} diff --git a/src/hosting/NServiceBus.Hosting/Configuration/IConfigureThisEndpoint.cs b/src/hosting/NServiceBus.Hosting/Configuration/IConfigureThisEndpoint.cs index 9e259f74497..255df6285bd 100644 --- a/src/hosting/NServiceBus.Hosting/Configuration/IConfigureThisEndpoint.cs +++ b/src/hosting/NServiceBus.Hosting/Configuration/IConfigureThisEndpoint.cs @@ -1,9 +1,9 @@ -namespace NServiceBus -{ - /// - /// Indicate that the implementing class will specify configuration. - /// - public interface IConfigureThisEndpoint - { - } -} +namespace NServiceBus +{ + /// + /// Indicate that the implementing class will specify configuration. + /// + public interface IConfigureThisEndpoint + { + } +} diff --git a/src/hosting/NServiceBus.Hosting/Configuration/IWant.cs b/src/hosting/NServiceBus.Hosting/Configuration/IWant.cs index ed89a5ce605..fe4d78efc9f 100644 --- a/src/hosting/NServiceBus.Hosting/Configuration/IWant.cs +++ b/src/hosting/NServiceBus.Hosting/Configuration/IWant.cs @@ -1,60 +1,60 @@ -using NServiceBus.Hosting.Profiles; - -namespace NServiceBus -{ - /// - /// If you want to specify your own container or serializer, - /// implement this interface on the class which implements . - /// - /// Implementors will be invoked before the endpoint starts up. - /// Dependency injection is not provided for these types. - /// - public interface IWantCustomInitialization - { - /// - /// Perform initialization logic. - /// - void Init(); - } - - /// - /// If you want to specify your own logging, - /// implement this interface on the class which implements . - /// - public interface IWantCustomLogging - { - /// - /// Initialize logging. - /// - void Init(); - } - - /// - /// Implementers will be invoked when the endpoint starts up. - /// Dependency injection is provided for these types. - /// - public interface IWantToRunAtStartup - { - /// - /// Method called at startup. - /// - void Run(); - - /// - /// Method called on shutdown. - /// - void Stop(); - } - - /// - /// Implementors will be provided with a reference to IConfigureThisEndpoint. - /// Implementors must inherit either or . - /// - public interface IWantTheEndpointConfig - { - /// - /// This property will be set by the infrastructure. - /// - IConfigureThisEndpoint Config { get; set; } - } -} +using NServiceBus.Hosting.Profiles; + +namespace NServiceBus +{ + /// + /// If you want to specify your own container or serializer, + /// implement this interface on the class which implements . + /// + /// Implementors will be invoked before the endpoint starts up. + /// Dependency injection is not provided for these types. + /// + public interface IWantCustomInitialization + { + /// + /// Perform initialization logic. + /// + void Init(); + } + + /// + /// If you want to specify your own logging, + /// implement this interface on the class which implements . + /// + public interface IWantCustomLogging + { + /// + /// Initialize logging. + /// + void Init(); + } + + /// + /// Implementers will be invoked when the endpoint starts up. + /// Dependency injection is provided for these types. + /// + public interface IWantToRunAtStartup + { + /// + /// Method called at startup. + /// + void Run(); + + /// + /// Method called on shutdown. + /// + void Stop(); + } + + /// + /// Implementors will be provided with a reference to IConfigureThisEndpoint. + /// Implementors must inherit either or . + /// + public interface IWantTheEndpointConfig + { + /// + /// This property will be set by the infrastructure. + /// + IConfigureThisEndpoint Config { get; set; } + } +} diff --git a/src/hosting/NServiceBus.Hosting/GenericHost.cs b/src/hosting/NServiceBus.Hosting/GenericHost.cs index 565b82455df..1fe8105036f 100644 --- a/src/hosting/NServiceBus.Hosting/GenericHost.cs +++ b/src/hosting/NServiceBus.Hosting/GenericHost.cs @@ -1,133 +1,133 @@ -using System; -using System.Collections.Generic; -using log4net; -using NServiceBus.Hosting.Configuration; -using NServiceBus.Hosting.Helpers; -using NServiceBus.Hosting.Profiles; -using NServiceBus.Hosting.Roles; -using NServiceBus.Hosting.Wcf; -using NServiceBus.Serialization; - -namespace NServiceBus.Hosting -{ - /// - /// A generic host that can be used to provide hosting services in different environments - /// - public class GenericHost - { - /// - /// Does startup work. - /// - public void Start() - { - try - { - if (specifier is IWantCustomLogging) - (specifier as IWantCustomLogging).Init(); - else - { - var loggingConfigurer = profileManager.GetLoggingConfigurer(); - loggingConfigurer.Configure(specifier); - } - - if (specifier is IWantCustomInitialization) - { - try - { - if (specifier is IWantCustomLogging) - { - bool called = false; - //make sure we don't call the Init method again, unless there's an explicit impl - var initMap = specifier.GetType().GetInterfaceMap(typeof (IWantCustomInitialization)); - foreach (var m in initMap.TargetMethods) - if (!m.IsPublic && m.Name == "NServiceBus.IWantCustomInitialization.Init") - { - (specifier as IWantCustomInitialization).Init(); - called = true; - } - - if (!called) - { - //call the regular Init method if IWantCustomLogging was an explicitly implemented method - var logMap = specifier.GetType().GetInterfaceMap(typeof (IWantCustomLogging)); - foreach (var tm in logMap.TargetMethods) - if (!tm.IsPublic && tm.Name == "NServiceBus.IWantCustomLogging.Init") - (specifier as IWantCustomInitialization).Init(); - } - } - else - (specifier as IWantCustomInitialization).Init(); - } - catch(NullReferenceException ex) - { - throw new NullReferenceException("NServiceBus has detected a null reference in your initalization code." + - " This could be due to trying to use NServiceBus.Configure before it was ready." + - " One possible solution is to inherit from IWantCustomInitialization in a different class" + - " than the one that inherits from IConfigureThisEndpoint, and put your code there.", ex); - } - } - - if (Configure.Instance == null) - Configure.With(); - - if (Configure.Instance.Configurer == null || Configure.Instance.Builder == null) - Configure.Instance.DefaultBuilder(); - - roleManager.ConfigureBusForEndpoint(specifier); - - configManager.ConfigureCustomInitAndStartup(); - - profileManager.ActivateProfileHandlers(); - - var bus = Configure.Instance.CreateBus(); - if (bus != null) - bus.Start(); - - configManager.Startup(); - wcfManager.Startup(); - } - catch (Exception ex) - { - //we log the error here in order to avoid issues with non serializable exceptions - //going across the appdomain back to topshelf - LogManager.GetLogger(typeof(GenericHost)).Fatal(ex); - - throw new Exception("Exception when starting endpoint, error has been logged. Reason: " + ex.Message, ex); - } - } - - /// - /// Does shutdown work. - /// - public void Stop() - { - configManager.Shutdown(); - wcfManager.Shutdown(); - } - - /// - /// Accepts the type which will specify the users custom configuration. - /// This type should implement . - /// - /// - /// - /// - public GenericHost(IConfigureThisEndpoint specifier, string[] args,IEnumerable defaultProfiles) - { - this.specifier = specifier; - - var assembliesToScan = AssemblyScanner.GetScannableAssemblies(); - - profileManager = new ProfileManager(assembliesToScan, specifier, args,defaultProfiles); - configManager = new ConfigManager(assembliesToScan, specifier); - wcfManager = new WcfManager(assembliesToScan); - roleManager = new RoleManager(assembliesToScan); - } - - private readonly IConfigureThisEndpoint specifier; - private readonly ProfileManager profileManager; - private readonly ConfigManager configManager; - private readonly WcfManager wcfManager; - private readonly RoleManager roleManager; - } +using System; +using System.Collections.Generic; +using log4net; +using NServiceBus.Hosting.Configuration; +using NServiceBus.Hosting.Helpers; +using NServiceBus.Hosting.Profiles; +using NServiceBus.Hosting.Roles; +using NServiceBus.Hosting.Wcf; +using NServiceBus.Serialization; + +namespace NServiceBus.Hosting +{ + /// + /// A generic host that can be used to provide hosting services in different environments + /// + public class GenericHost + { + /// + /// Does startup work. + /// + public void Start() + { + try + { + if (specifier is IWantCustomLogging) + (specifier as IWantCustomLogging).Init(); + else + { + var loggingConfigurer = profileManager.GetLoggingConfigurer(); + loggingConfigurer.Configure(specifier); + } + + if (specifier is IWantCustomInitialization) + { + try + { + if (specifier is IWantCustomLogging) + { + bool called = false; + //make sure we don't call the Init method again, unless there's an explicit impl + var initMap = specifier.GetType().GetInterfaceMap(typeof (IWantCustomInitialization)); + foreach (var m in initMap.TargetMethods) + if (!m.IsPublic && m.Name == "NServiceBus.IWantCustomInitialization.Init") + { + (specifier as IWantCustomInitialization).Init(); + called = true; + } + + if (!called) + { + //call the regular Init method if IWantCustomLogging was an explicitly implemented method + var logMap = specifier.GetType().GetInterfaceMap(typeof (IWantCustomLogging)); + foreach (var tm in logMap.TargetMethods) + if (!tm.IsPublic && tm.Name == "NServiceBus.IWantCustomLogging.Init") + (specifier as IWantCustomInitialization).Init(); + } + } + else + (specifier as IWantCustomInitialization).Init(); + } + catch(NullReferenceException ex) + { + throw new NullReferenceException("NServiceBus has detected a null reference in your initalization code." + + " This could be due to trying to use NServiceBus.Configure before it was ready." + + " One possible solution is to inherit from IWantCustomInitialization in a different class" + + " than the one that inherits from IConfigureThisEndpoint, and put your code there.", ex); + } + } + + if (Configure.Instance == null) + Configure.With(); + + if (Configure.Instance.Configurer == null || Configure.Instance.Builder == null) + Configure.Instance.DefaultBuilder(); + + roleManager.ConfigureBusForEndpoint(specifier); + + configManager.ConfigureCustomInitAndStartup(); + + profileManager.ActivateProfileHandlers(); + + var bus = Configure.Instance.CreateBus(); + if (bus != null) + bus.Start(); + + configManager.Startup(); + wcfManager.Startup(); + } + catch (Exception ex) + { + //we log the error here in order to avoid issues with non serializable exceptions + //going across the appdomain back to topshelf + LogManager.GetLogger(typeof(GenericHost)).Fatal(ex); + + throw new Exception("Exception when starting endpoint, error has been logged. Reason: " + ex.Message, ex); + } + } + + /// + /// Does shutdown work. + /// + public void Stop() + { + configManager.Shutdown(); + wcfManager.Shutdown(); + } + + /// + /// Accepts the type which will specify the users custom configuration. + /// This type should implement . + /// + /// + /// + /// + public GenericHost(IConfigureThisEndpoint specifier, string[] args,IEnumerable defaultProfiles) + { + this.specifier = specifier; + + var assembliesToScan = AssemblyScanner.GetScannableAssemblies(); + + profileManager = new ProfileManager(assembliesToScan, specifier, args,defaultProfiles); + configManager = new ConfigManager(assembliesToScan, specifier); + wcfManager = new WcfManager(assembliesToScan); + roleManager = new RoleManager(assembliesToScan); + } + + private readonly IConfigureThisEndpoint specifier; + private readonly ProfileManager profileManager; + private readonly ConfigManager configManager; + private readonly WcfManager wcfManager; + private readonly RoleManager roleManager; + } } \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting/Helpers/AssemblyScanner.cs b/src/hosting/NServiceBus.Hosting/Helpers/AssemblyScanner.cs index 724bc14a94a..fcc5a78329f 100644 --- a/src/hosting/NServiceBus.Hosting/Helpers/AssemblyScanner.cs +++ b/src/hosting/NServiceBus.Hosting/Helpers/AssemblyScanner.cs @@ -1,78 +1,78 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Reflection; -using NServiceBus.Utils.Reflection; - -namespace NServiceBus.Hosting.Helpers -{ - /// - /// Helpers for assembly scanning operations - /// - public class AssemblyScanner - { - /// - /// Gets a list with assemblies that can be scanned - /// - /// - [DebuggerNonUserCode] //so that exceptions don't jump at the developer debugging their app - public static IEnumerable GetScannableAssemblies() - { - var assemblyFiles = new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory).GetFiles("*.dll", SearchOption.AllDirectories) - .Union(new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory).GetFiles("*.exe", SearchOption.AllDirectories)); - - - foreach (var assemblyFile in assemblyFiles) - { - Assembly assembly; - - try - { - assembly = Assembly.LoadFrom(assemblyFile.FullName); - - //will throw if assembly cant be loaded - assembly.GetTypes(); - } - - catch (Exception) - { - continue; - } - - yield return assembly; - } - } - } - - internal static class AssemblyListExtensions - { - public static IEnumerable AllTypes(this IEnumerable assemblies) - { - foreach (var assembly in assemblies) - foreach (var type in assembly.GetTypes()) - { - yield return type; - } - } - - - public static IEnumerable AllTypesAssignableTo(this IEnumerable assemblies) - { - return assemblies.AllTypesAssignableTo(typeof(T)); - } - - public static IEnumerable AllTypesAssignableTo(this IEnumerable assemblies, Type type) - { - return assemblies.AllTypes().Where(type.IsAssignableFrom); - } - - public static IEnumerable AllTypesClosing(this IEnumerable assemblies, Type openGenericType, Type genericArg) - { - return assemblies.AllTypes().Where(type => type.GetGenericallyContainedType(openGenericType, genericArg) != null); - } - - - } +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Reflection; +using NServiceBus.Utils.Reflection; + +namespace NServiceBus.Hosting.Helpers +{ + /// + /// Helpers for assembly scanning operations + /// + public class AssemblyScanner + { + /// + /// Gets a list with assemblies that can be scanned + /// + /// + [DebuggerNonUserCode] //so that exceptions don't jump at the developer debugging their app + public static IEnumerable GetScannableAssemblies() + { + var assemblyFiles = new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory).GetFiles("*.dll", SearchOption.AllDirectories) + .Union(new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory).GetFiles("*.exe", SearchOption.AllDirectories)); + + + foreach (var assemblyFile in assemblyFiles) + { + Assembly assembly; + + try + { + assembly = Assembly.LoadFrom(assemblyFile.FullName); + + //will throw if assembly cant be loaded + assembly.GetTypes(); + } + + catch (Exception) + { + continue; + } + + yield return assembly; + } + } + } + + internal static class AssemblyListExtensions + { + public static IEnumerable AllTypes(this IEnumerable assemblies) + { + foreach (var assembly in assemblies) + foreach (var type in assembly.GetTypes()) + { + yield return type; + } + } + + + public static IEnumerable AllTypesAssignableTo(this IEnumerable assemblies) + { + return assemblies.AllTypesAssignableTo(typeof(T)); + } + + public static IEnumerable AllTypesAssignableTo(this IEnumerable assemblies, Type type) + { + return assemblies.AllTypes().Where(type.IsAssignableFrom); + } + + public static IEnumerable AllTypesClosing(this IEnumerable assemblies, Type openGenericType, Type genericArg) + { + return assemblies.AllTypes().Where(type => type.GetGenericallyContainedType(openGenericType, genericArg) != null); + } + + + } } \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting/NServiceBus.Hosting.csproj b/src/hosting/NServiceBus.Hosting/NServiceBus.Hosting.csproj index c11bf5ae26f..08a3ad36e28 100644 --- a/src/hosting/NServiceBus.Hosting/NServiceBus.Hosting.csproj +++ b/src/hosting/NServiceBus.Hosting/NServiceBus.Hosting.csproj @@ -1,84 +1,84 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {B5F333D1-D6B1-49FB-82F6-74641E5D11E3} - Library - Properties - NServiceBus.Hosting - NServiceBus.Hosting - v4.0 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.Hosting.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.Hosting.XML - - - - False - ..\..\..\lib\log4net.dll - False - - - False - ..\..\..\build\output\NServiceBus.dll - - - False - ..\..\..\build\output\NServiceBus.Core.dll - - - - - 3.5 - - - 3.0 - - - - - - - - - - - - - - - - - - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {B5F333D1-D6B1-49FB-82F6-74641E5D11E3} + Library + Properties + NServiceBus.Hosting + NServiceBus.Hosting + v4.0 + 512 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.Hosting.XML + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.Hosting.XML + + + + False + ..\..\..\lib\log4net.dll + False + + + False + ..\..\..\build\output\NServiceBus.dll + + + False + ..\..\..\build\output\NServiceBus.Core.dll + + + + + 3.5 + + + 3.0 + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting/Profiles/IHandleProfile.cs b/src/hosting/NServiceBus.Hosting/Profiles/IHandleProfile.cs index 85b9acbcd27..bdc1825d300 100644 --- a/src/hosting/NServiceBus.Hosting/Profiles/IHandleProfile.cs +++ b/src/hosting/NServiceBus.Hosting/Profiles/IHandleProfile.cs @@ -1,20 +1,20 @@ -namespace NServiceBus.Hosting.Profiles -{ - /// - /// Generic abstraction for code which will be called when the given profile is active. - /// - /// - public interface IHandleProfile : IHandleProfile where T : IProfile {} - - /// - /// Abstraction for code which will be called when the given profile is active. - /// Implementors should implement IHandleProfile{T} rather than IHandleProfile. - /// - public interface IHandleProfile - { - /// - /// Called when a given profile is activated. - /// - void ProfileActivated(); - } +namespace NServiceBus.Hosting.Profiles +{ + /// + /// Generic abstraction for code which will be called when the given profile is active. + /// + /// + public interface IHandleProfile : IHandleProfile where T : IProfile {} + + /// + /// Abstraction for code which will be called when the given profile is active. + /// Implementors should implement IHandleProfile{T} rather than IHandleProfile. + /// + public interface IHandleProfile + { + /// + /// Called when a given profile is activated. + /// + void ProfileActivated(); + } } \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting/Profiles/IProfile.cs b/src/hosting/NServiceBus.Hosting/Profiles/IProfile.cs index 493a5b6b694..a24f40d1166 100644 --- a/src/hosting/NServiceBus.Hosting/Profiles/IProfile.cs +++ b/src/hosting/NServiceBus.Hosting/Profiles/IProfile.cs @@ -1,10 +1,10 @@ -namespace NServiceBus -{ - /// - /// Marker interface to indicate a run-time profile. - /// Implementors must be concrete class - interfaces are not supported. - /// - public interface IProfile - { - } -} +namespace NServiceBus +{ + /// + /// Marker interface to indicate a run-time profile. + /// Implementors must be concrete class - interfaces are not supported. + /// + public interface IProfile + { + } +} diff --git a/src/hosting/NServiceBus.Hosting/Profiles/ProfileManager.cs b/src/hosting/NServiceBus.Hosting/Profiles/ProfileManager.cs index 3df9204cc05..0fe726bc164 100644 --- a/src/hosting/NServiceBus.Hosting/Profiles/ProfileManager.cs +++ b/src/hosting/NServiceBus.Hosting/Profiles/ProfileManager.cs @@ -1,124 +1,124 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Linq; -using System.Reflection; -using NServiceBus.Utils.Reflection; - -namespace NServiceBus.Hosting.Profiles -{ - /// - /// Scans and loads profile handlers from the given assemblies - /// - public class ProfileManager - { - private readonly IEnumerable assembliesToScan; - private readonly IEnumerable activeProfiles; - private readonly IConfigureThisEndpoint specifier; - - /// - /// Initializes the manager with the assemblies to scan and the endpoint configuration to use - /// - /// - /// - /// - /// - public ProfileManager(IEnumerable assembliesToScan, IConfigureThisEndpoint specifier, string[] profileArgs,IEnumerable defaultProfiles) - { - this.assembliesToScan = assembliesToScan; - this.specifier = specifier; - - activeProfiles = new List(GetProfilesFrom(assembliesToScan).Where(t => profileArgs.Any(pa => t.FullName.ToLower() == pa.ToLower()))); - - if (activeProfiles.Count() == 0) - activeProfiles = defaultProfiles; - } - - /// - /// Returns an object to configure logging based on the specification and profiles passed in. - /// - /// - public IConfigureLogging GetLoggingConfigurer() - { - return GetImplementor(typeof (IConfigureLoggingForProfile<>)); - } - - private T GetImplementor(Type openGenericType) where T : class - { - var options = new List(); - foreach (var a in assembliesToScan) - foreach (var t in a.GetTypes()) - if (typeof(T).IsAssignableFrom(t) && !t.IsInterface) - options.Add(t); - - return FindConfigurer(options, list => - activeProfiles.Select(ap => FindConfigurerForProfile(openGenericType, ap, list)).Where(t => t != null) - ); - } - - private T FindConfigurer(IEnumerable options, Func, IEnumerable> filter) where T : class - { - var myOptions = new List(filter(options)); - - if (myOptions.Count == 0) - throw new ConfigurationErrorsException("Could not find a class which implements " + typeof(T).Name + ". If you've specified your own profile, try implementing " + typeof(T).Name + "ForProfile for your profile."); - if (myOptions.Count > 1) - throw new ConfigurationErrorsException("Can not have more than one class configured which implements " + typeof(T).Name + ". Implementors found: " + string.Join(" ", options.Select(t => t.Name).ToArray())); - - return Activator.CreateInstance(myOptions[0]) as T; - } - - private Type FindConfigurerForProfile(Type openGenericType, Type profile, IEnumerable options) - { - if (profile == typeof(object)) return null; - - foreach(var o in options) - { - var p = o.GetGenericallyContainedType(openGenericType, typeof(IProfile)); - if (p == profile) - return o; - } - - //couldn't find exact match - try again recursively going up the type hierarchy - return FindConfigurerForProfile(openGenericType, profile.BaseType, options); - } - - /// - /// Activates the profilehandlers that handle the previously identified active profiles. - /// - /// - public void ActivateProfileHandlers() - { - var handlers = new List(); - - foreach (var assembly in assembliesToScan) - foreach (var type in assembly.GetTypes()) - { - if (null != type.GetGenericallyContainedType(typeof (IHandleProfile<>), typeof (IProfile))) - handlers.Add(type); - } - - var activeHandlers = handlers.Where(t => activeProfiles.Any(p => typeof(IHandleProfile<>).MakeGenericType(p).IsAssignableFrom(t))); - - var profileHandlers = new List(); - foreach (var h in activeHandlers) - profileHandlers.Add(Activator.CreateInstance(h) as IHandleProfile); - - profileHandlers.Where(ph => ph is IWantTheEndpointConfig).ToList().ForEach( - ph => (ph as IWantTheEndpointConfig).Config = specifier); - - profileHandlers.ForEach(hp => hp.ProfileActivated()); - } - - - private static IEnumerable GetProfilesFrom(IEnumerable assembliesToScan) - { - IEnumerable profiles = new List(); - - foreach (var assembly in assembliesToScan) - profiles = profiles.Union(assembly.GetTypes().Where(t => typeof(IProfile).IsAssignableFrom(t) && !t.IsInterface)); - - return profiles; - } - } +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Linq; +using System.Reflection; +using NServiceBus.Utils.Reflection; + +namespace NServiceBus.Hosting.Profiles +{ + /// + /// Scans and loads profile handlers from the given assemblies + /// + public class ProfileManager + { + private readonly IEnumerable assembliesToScan; + private readonly IEnumerable activeProfiles; + private readonly IConfigureThisEndpoint specifier; + + /// + /// Initializes the manager with the assemblies to scan and the endpoint configuration to use + /// + /// + /// + /// + /// + public ProfileManager(IEnumerable assembliesToScan, IConfigureThisEndpoint specifier, string[] profileArgs,IEnumerable defaultProfiles) + { + this.assembliesToScan = assembliesToScan; + this.specifier = specifier; + + activeProfiles = new List(GetProfilesFrom(assembliesToScan).Where(t => profileArgs.Any(pa => t.FullName.ToLower() == pa.ToLower()))); + + if (activeProfiles.Count() == 0) + activeProfiles = defaultProfiles; + } + + /// + /// Returns an object to configure logging based on the specification and profiles passed in. + /// + /// + public IConfigureLogging GetLoggingConfigurer() + { + return GetImplementor(typeof (IConfigureLoggingForProfile<>)); + } + + private T GetImplementor(Type openGenericType) where T : class + { + var options = new List(); + foreach (var a in assembliesToScan) + foreach (var t in a.GetTypes()) + if (typeof(T).IsAssignableFrom(t) && !t.IsInterface) + options.Add(t); + + return FindConfigurer(options, list => + activeProfiles.Select(ap => FindConfigurerForProfile(openGenericType, ap, list)).Where(t => t != null) + ); + } + + private T FindConfigurer(IEnumerable options, Func, IEnumerable> filter) where T : class + { + var myOptions = new List(filter(options)); + + if (myOptions.Count == 0) + throw new ConfigurationErrorsException("Could not find a class which implements " + typeof(T).Name + ". If you've specified your own profile, try implementing " + typeof(T).Name + "ForProfile for your profile."); + if (myOptions.Count > 1) + throw new ConfigurationErrorsException("Can not have more than one class configured which implements " + typeof(T).Name + ". Implementors found: " + string.Join(" ", options.Select(t => t.Name).ToArray())); + + return Activator.CreateInstance(myOptions[0]) as T; + } + + private Type FindConfigurerForProfile(Type openGenericType, Type profile, IEnumerable options) + { + if (profile == typeof(object)) return null; + + foreach(var o in options) + { + var p = o.GetGenericallyContainedType(openGenericType, typeof(IProfile)); + if (p == profile) + return o; + } + + //couldn't find exact match - try again recursively going up the type hierarchy + return FindConfigurerForProfile(openGenericType, profile.BaseType, options); + } + + /// + /// Activates the profilehandlers that handle the previously identified active profiles. + /// + /// + public void ActivateProfileHandlers() + { + var handlers = new List(); + + foreach (var assembly in assembliesToScan) + foreach (var type in assembly.GetTypes()) + { + if (null != type.GetGenericallyContainedType(typeof (IHandleProfile<>), typeof (IProfile))) + handlers.Add(type); + } + + var activeHandlers = handlers.Where(t => activeProfiles.Any(p => typeof(IHandleProfile<>).MakeGenericType(p).IsAssignableFrom(t))); + + var profileHandlers = new List(); + foreach (var h in activeHandlers) + profileHandlers.Add(Activator.CreateInstance(h) as IHandleProfile); + + profileHandlers.Where(ph => ph is IWantTheEndpointConfig).ToList().ForEach( + ph => (ph as IWantTheEndpointConfig).Config = specifier); + + profileHandlers.ForEach(hp => hp.ProfileActivated()); + } + + + private static IEnumerable GetProfilesFrom(IEnumerable assembliesToScan) + { + IEnumerable profiles = new List(); + + foreach (var assembly in assembliesToScan) + profiles = profiles.Union(assembly.GetTypes().Where(t => typeof(IProfile).IsAssignableFrom(t) && !t.IsInterface)); + + return profiles; + } + } } \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting/Properties/AssemblyInfo.cs b/src/hosting/NServiceBus.Hosting/Properties/AssemblyInfo.cs index 50a64689a7b..833087a1cc1 100644 --- a/src/hosting/NServiceBus.Hosting/Properties/AssemblyInfo.cs +++ b/src/hosting/NServiceBus.Hosting/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("NServiceBus.Hosting")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("NServiceBus.Hosting")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("438e2e37-3244-4347-875c-384dc3a67628")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("NServiceBus.Hosting")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("NServiceBus.Hosting")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("438e2e37-3244-4347-875c-384dc3a67628")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/hosting/NServiceBus.Hosting/Roles/IConfigureRole.cs b/src/hosting/NServiceBus.Hosting/Roles/IConfigureRole.cs index fbdf0e16841..db012693647 100644 --- a/src/hosting/NServiceBus.Hosting/Roles/IConfigureRole.cs +++ b/src/hosting/NServiceBus.Hosting/Roles/IConfigureRole.cs @@ -1,25 +1,25 @@ -using NServiceBus.Unicast.Config; - -namespace NServiceBus.Hosting.Roles -{ - - /// - /// Interface that enables configuration based on specified role - /// - public interface IConfigureRole - { - /// - /// Applies the role configuration - /// - /// - /// - ConfigUnicastBus ConfigureRole(IConfigureThisEndpoint specifier); - } - /// - /// Generic helper interface for IConfigureRole - /// - /// - public interface IConfigureRole : IConfigureRole where T : IRole - { - } +using NServiceBus.Unicast.Config; + +namespace NServiceBus.Hosting.Roles +{ + + /// + /// Interface that enables configuration based on specified role + /// + public interface IConfigureRole + { + /// + /// Applies the role configuration + /// + /// + /// + ConfigUnicastBus ConfigureRole(IConfigureThisEndpoint specifier); + } + /// + /// Generic helper interface for IConfigureRole + /// + /// + public interface IConfigureRole : IConfigureRole where T : IRole + { + } } \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting/Roles/IRole.cs b/src/hosting/NServiceBus.Hosting/Roles/IRole.cs index 3c89a1700ea..021b183cb4a 100644 --- a/src/hosting/NServiceBus.Hosting/Roles/IRole.cs +++ b/src/hosting/NServiceBus.Hosting/Roles/IRole.cs @@ -1,9 +1,9 @@ -namespace NServiceBus.Hosting.Roles -{ - /// - /// Marker interface for roles - /// - public interface IRole - { - } +namespace NServiceBus.Hosting.Roles +{ + /// + /// Marker interface for roles + /// + public interface IRole + { + } } \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting/Roles/RoleManager.cs b/src/hosting/NServiceBus.Hosting/Roles/RoleManager.cs index ee22f208432..163c9a93510 100644 --- a/src/hosting/NServiceBus.Hosting/Roles/RoleManager.cs +++ b/src/hosting/NServiceBus.Hosting/Roles/RoleManager.cs @@ -1,63 +1,63 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Linq; -using System.Reflection; -using log4net; -using NServiceBus.Hosting.Helpers; -using NServiceBus.Unicast.Config; -using NServiceBus.Utils.Reflection; - -namespace NServiceBus.Hosting.Roles -{ - /// - /// Handles the different roles that are registered - /// - public class RoleManager - { - private readonly IDictionary availableRoles; - private static readonly ILog Logger = LogManager.GetLogger(typeof (RoleManager)); - - /// - /// Creates the manager with the list of assemblies to scan for roles - /// - /// - public RoleManager(IEnumerable assembliesToScan) - { - availableRoles = assembliesToScan.AllTypes() - .Select(t => new {Role = t.GetGenericallyContainedType(typeof (IConfigureRole<>), typeof (IRole)),Configurer=t}) - .Where(x=>x.Role != null) - .ToDictionary(key => key.Role, value => value.Configurer); - } - - /// - /// Checks if the specifier contains a given role and uses it to configure the UnicastBus appropriately. - /// - /// - public void ConfigureBusForEndpoint(IConfigureThisEndpoint specifier) - { - ConfigUnicastBus config = null; - - foreach (var role in availableRoles) - { - var roleType = role.Key; - if (!roleType.IsAssignableFrom(specifier.GetType())) continue; - - if (config != null) - throw new InvalidOperationException("Endpoints can only have one role"); - - //apply role - var roleConfigurer = Activator.CreateInstance(role.Value) as IConfigureRole; - - config = roleConfigurer.ConfigureRole(specifier); - - Logger.Info("Role " + roleType + " configured"); - } - - if (config != null) - config.LoadMessageHandlers(); - } - } - - +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Linq; +using System.Reflection; +using log4net; +using NServiceBus.Hosting.Helpers; +using NServiceBus.Unicast.Config; +using NServiceBus.Utils.Reflection; + +namespace NServiceBus.Hosting.Roles +{ + /// + /// Handles the different roles that are registered + /// + public class RoleManager + { + private readonly IDictionary availableRoles; + private static readonly ILog Logger = LogManager.GetLogger(typeof (RoleManager)); + + /// + /// Creates the manager with the list of assemblies to scan for roles + /// + /// + public RoleManager(IEnumerable assembliesToScan) + { + availableRoles = assembliesToScan.AllTypes() + .Select(t => new {Role = t.GetGenericallyContainedType(typeof (IConfigureRole<>), typeof (IRole)),Configurer=t}) + .Where(x=>x.Role != null) + .ToDictionary(key => key.Role, value => value.Configurer); + } + + /// + /// Checks if the specifier contains a given role and uses it to configure the UnicastBus appropriately. + /// + /// + public void ConfigureBusForEndpoint(IConfigureThisEndpoint specifier) + { + ConfigUnicastBus config = null; + + foreach (var role in availableRoles) + { + var roleType = role.Key; + if (!roleType.IsAssignableFrom(specifier.GetType())) continue; + + if (config != null) + throw new InvalidOperationException("Endpoints can only have one role"); + + //apply role + var roleConfigurer = Activator.CreateInstance(role.Value) as IConfigureRole; + + config = roleConfigurer.ConfigureRole(specifier); + + Logger.Info("Role " + roleType + " configured"); + } + + if (config != null) + config.LoadMessageHandlers(); + } + } + + } \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting/Wcf/WcfManager.cs b/src/hosting/NServiceBus.Hosting/Wcf/WcfManager.cs index 3a9fcf9a9c4..e6e4aec3f5b 100644 --- a/src/hosting/NServiceBus.Hosting/Wcf/WcfManager.cs +++ b/src/hosting/NServiceBus.Hosting/Wcf/WcfManager.cs @@ -1,91 +1,91 @@ -using System; -using System.Collections.Generic; -using System.Reflection; -using System.ServiceModel; -using System.ServiceModel.Channels; -using log4net; - -namespace NServiceBus.Hosting.Wcf -{ - /// - /// Enable users to expose messages as WCF services - /// - public class WcfManager - { - private readonly List serviceTypes = new List(); - private readonly List hosts = new List(); - - /// - /// Initlalized the manager with the list of assemblies to be scanned - /// - /// - public WcfManager(IEnumerable assembliesToScan) - { - foreach (var a in assembliesToScan) - foreach (var t in a.GetTypes()) - if (IsWcfService(t) && !t.IsAbstract) - serviceTypes.Add(t); - } - - /// - /// Starts a servicehost for each found service. Defaults to BasicHttpBinding if - /// no user specified binding is found - /// - public void Startup() - { - foreach (var serviceType in serviceTypes) - { - var host = new WcfServiceHost(serviceType); - - Binding binding = new BasicHttpBinding(); - - if (Configure.Instance.Configurer.HasComponent()) - binding = Configure.Instance.Builder.Build(); - - host.AddDefaultEndpoint( GetContractType(serviceType), - binding - ,""); - - hosts.Add(host); - - logger.Debug("Going to host the WCF service: " + serviceType.AssemblyQualifiedName); - host.Open(); - } - } - - /// - /// Shutsdown the service hosts - /// - public void Shutdown() - { - hosts.ForEach(h => h.Close()); - } - - private static Type GetContractType(Type t) - { - var args = t.BaseType.GetGenericArguments(); - - return typeof(IWcfService<,>).MakeGenericType(args); - } - - private static bool IsWcfService(Type t) - { - var args = t.GetGenericArguments(); - if (args.Length == 2) - if (typeof(IMessage).IsAssignableFrom(args[0])) - { - var wcfType = typeof(WcfService<,>).MakeGenericType(args); - if (wcfType.IsAssignableFrom(t)) - return true; - } - - if (t.BaseType != null) - return IsWcfService(t.BaseType) && !t.IsAbstract; - - return false; - } - - - private readonly ILog logger = LogManager.GetLogger(typeof(WcfManager)); - } +using System; +using System.Collections.Generic; +using System.Reflection; +using System.ServiceModel; +using System.ServiceModel.Channels; +using log4net; + +namespace NServiceBus.Hosting.Wcf +{ + /// + /// Enable users to expose messages as WCF services + /// + public class WcfManager + { + private readonly List serviceTypes = new List(); + private readonly List hosts = new List(); + + /// + /// Initlalized the manager with the list of assemblies to be scanned + /// + /// + public WcfManager(IEnumerable assembliesToScan) + { + foreach (var a in assembliesToScan) + foreach (var t in a.GetTypes()) + if (IsWcfService(t) && !t.IsAbstract) + serviceTypes.Add(t); + } + + /// + /// Starts a servicehost for each found service. Defaults to BasicHttpBinding if + /// no user specified binding is found + /// + public void Startup() + { + foreach (var serviceType in serviceTypes) + { + var host = new WcfServiceHost(serviceType); + + Binding binding = new BasicHttpBinding(); + + if (Configure.Instance.Configurer.HasComponent()) + binding = Configure.Instance.Builder.Build(); + + host.AddDefaultEndpoint( GetContractType(serviceType), + binding + ,""); + + hosts.Add(host); + + logger.Debug("Going to host the WCF service: " + serviceType.AssemblyQualifiedName); + host.Open(); + } + } + + /// + /// Shutsdown the service hosts + /// + public void Shutdown() + { + hosts.ForEach(h => h.Close()); + } + + private static Type GetContractType(Type t) + { + var args = t.BaseType.GetGenericArguments(); + + return typeof(IWcfService<,>).MakeGenericType(args); + } + + private static bool IsWcfService(Type t) + { + var args = t.GetGenericArguments(); + if (args.Length == 2) + if (typeof(IMessage).IsAssignableFrom(args[0])) + { + var wcfType = typeof(WcfService<,>).MakeGenericType(args); + if (wcfType.IsAssignableFrom(t)) + return true; + } + + if (t.BaseType != null) + return IsWcfService(t.BaseType) && !t.IsAbstract; + + return false; + } + + + private readonly ILog logger = LogManager.GetLogger(typeof(WcfManager)); + } } \ No newline at end of file diff --git a/src/hosting/NServiceBus.Hosting/Wcf/WcfServiceHost.cs b/src/hosting/NServiceBus.Hosting/Wcf/WcfServiceHost.cs index b3829a4a1e4..2f20da4cf26 100644 --- a/src/hosting/NServiceBus.Hosting/Wcf/WcfServiceHost.cs +++ b/src/hosting/NServiceBus.Hosting/Wcf/WcfServiceHost.cs @@ -1,63 +1,63 @@ -using System; -using System.Configuration; -using System.ServiceModel; -using System.ServiceModel.Channels; -using System.ServiceModel.Configuration; -using log4net; - -namespace NServiceBus.Hosting.Wcf -{ - /// - /// A specialized service host that adds a default endpoint if non is specified in config - /// - public class WcfServiceHost : ServiceHost - { - /// - /// Constructs the host with the given service type - /// - /// - public WcfServiceHost(Type t) - : base(t) - { - - } - - - /// - /// Adds the given endpoint unless its already configured in app.config - /// - /// - /// - /// - public void AddDefaultEndpoint(Type contractType,Binding binding,string address) - { - var serviceModel = ServiceModelSectionGroup.GetSectionGroup(ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None)); - - if(serviceModel == null) - throw new InvalidOperationException("No service model section found in config"); - - bool endpointAlreadyConfigured = false; - - foreach (ServiceElement se in serviceModel.Services.Services) - { - if (se.Name == Description.ConfigurationName) - { - foreach (ServiceEndpointElement endpoint in se.Endpoints) - { - if (endpoint.Contract == contractType.FullName && endpoint.Address.OriginalString == address) - endpointAlreadyConfigured = true; - } - - } - } - if (!endpointAlreadyConfigured) - { - logger.Debug("Endpoint for contract: " + contractType.Name + " is not found in configuration, going to add it programatically"); - AddServiceEndpoint(contractType, binding, address); - } - - } - - private readonly ILog logger = LogManager.GetLogger(typeof(WcfServiceHost)); - } +using System; +using System.Configuration; +using System.ServiceModel; +using System.ServiceModel.Channels; +using System.ServiceModel.Configuration; +using log4net; + +namespace NServiceBus.Hosting.Wcf +{ + /// + /// A specialized service host that adds a default endpoint if non is specified in config + /// + public class WcfServiceHost : ServiceHost + { + /// + /// Constructs the host with the given service type + /// + /// + public WcfServiceHost(Type t) + : base(t) + { + + } + + + /// + /// Adds the given endpoint unless its already configured in app.config + /// + /// + /// + /// + public void AddDefaultEndpoint(Type contractType,Binding binding,string address) + { + var serviceModel = ServiceModelSectionGroup.GetSectionGroup(ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None)); + + if(serviceModel == null) + throw new InvalidOperationException("No service model section found in config"); + + bool endpointAlreadyConfigured = false; + + foreach (ServiceElement se in serviceModel.Services.Services) + { + if (se.Name == Description.ConfigurationName) + { + foreach (ServiceEndpointElement endpoint in se.Endpoints) + { + if (endpoint.Contract == contractType.FullName && endpoint.Address.OriginalString == address) + endpointAlreadyConfigured = true; + } + + } + } + if (!endpointAlreadyConfigured) + { + logger.Debug("Endpoint for contract: " + contractType.Name + " is not found in configuration, going to add it programatically"); + AddServiceEndpoint(contractType, binding, address); + } + + } + + private readonly ILog logger = LogManager.GetLogger(typeof(WcfServiceHost)); + } } \ No newline at end of file diff --git a/src/impersonation/NServiceBus.Impersonation/ImpersonationManager.cs b/src/impersonation/NServiceBus.Impersonation/ImpersonationManager.cs index c37ac7349fc..5dec3e6bb30 100644 --- a/src/impersonation/NServiceBus.Impersonation/ImpersonationManager.cs +++ b/src/impersonation/NServiceBus.Impersonation/ImpersonationManager.cs @@ -1,66 +1,66 @@ -using System; -using System.Security.Principal; -using System.Threading; -using NServiceBus.Config; -using NServiceBus.Impersonation; -using NServiceBus.MessageMutator; -using NServiceBus.ObjectBuilder; -using NServiceBus.Unicast.Config; -using NServiceBus.Unicast.Transport; - -namespace NServiceBus.Impersonation -{ - /// - /// Manages all aspects of impersonation - /// - public class ImpersonationManager : INeedInitialization, IMapOutgoingTransportMessages - { - void INeedInitialization.Init() - { - Configure.ConfigurationComplete += - (o, a) => - { - Configure.Instance.Builder.Build().TransportMessageReceived += - Transport_TransportMessageReceived; - }; - } - - void Transport_TransportMessageReceived(object sender, TransportMessageReceivedEventArgs e) - { - if (e.Message.Headers.ContainsKey(WINDOWSIDENTITYNAME)) - Thread.CurrentPrincipal = ConfigureImpersonation.Impersonate ? new GenericPrincipal(new GenericIdentity(e.Message.Headers[WINDOWSIDENTITYNAME]), new string[0]) : null; - } - - void IMapOutgoingTransportMessages.MapOutgoing(IMessage[] messages, TransportMessage transportMessage) - { - transportMessage.Headers.Add(WINDOWSIDENTITYNAME, Thread.CurrentPrincipal.Identity.Name); - } - - private const string WINDOWSIDENTITYNAME = "WinIdName"; - } -} - -namespace NServiceBus -{ - /// - /// Contains extension methods for the purpose of configuring impersonation. - /// - public static class ConfigureImpersonation - { - /// - /// Instructs the bus to run the processing of messages being handled - /// under the permissions of the sender of the message. - /// - /// - /// - /// - public static ConfigUnicastBus ImpersonateSender(this ConfigUnicastBus config, bool value) - { - Impersonate = true; - - return config; - } - - public static bool Impersonate { get; private set; } - } -} +using System; +using System.Security.Principal; +using System.Threading; +using NServiceBus.Config; +using NServiceBus.Impersonation; +using NServiceBus.MessageMutator; +using NServiceBus.ObjectBuilder; +using NServiceBus.Unicast.Config; +using NServiceBus.Unicast.Transport; + +namespace NServiceBus.Impersonation +{ + /// + /// Manages all aspects of impersonation + /// + public class ImpersonationManager : INeedInitialization, IMapOutgoingTransportMessages + { + void INeedInitialization.Init() + { + Configure.ConfigurationComplete += + (o, a) => + { + Configure.Instance.Builder.Build().TransportMessageReceived += + Transport_TransportMessageReceived; + }; + } + + void Transport_TransportMessageReceived(object sender, TransportMessageReceivedEventArgs e) + { + if (e.Message.Headers.ContainsKey(WINDOWSIDENTITYNAME)) + Thread.CurrentPrincipal = ConfigureImpersonation.Impersonate ? new GenericPrincipal(new GenericIdentity(e.Message.Headers[WINDOWSIDENTITYNAME]), new string[0]) : null; + } + + void IMapOutgoingTransportMessages.MapOutgoing(IMessage[] messages, TransportMessage transportMessage) + { + transportMessage.Headers.Add(WINDOWSIDENTITYNAME, Thread.CurrentPrincipal.Identity.Name); + } + + private const string WINDOWSIDENTITYNAME = "WinIdName"; + } +} + +namespace NServiceBus +{ + /// + /// Contains extension methods for the purpose of configuring impersonation. + /// + public static class ConfigureImpersonation + { + /// + /// Instructs the bus to run the processing of messages being handled + /// under the permissions of the sender of the message. + /// + /// + /// + /// + public static ConfigUnicastBus ImpersonateSender(this ConfigUnicastBus config, bool value) + { + Impersonate = true; + + return config; + } + + public static bool Impersonate { get; private set; } + } +} diff --git a/src/impersonation/NServiceBus.Impersonation/NServiceBus.Impersonation.csproj b/src/impersonation/NServiceBus.Impersonation/NServiceBus.Impersonation.csproj index 3eb04a006e7..bd89f5d4b42 100644 --- a/src/impersonation/NServiceBus.Impersonation/NServiceBus.Impersonation.csproj +++ b/src/impersonation/NServiceBus.Impersonation/NServiceBus.Impersonation.csproj @@ -1,81 +1,81 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {BFD784DB-1880-4115-A73F-083ED8617419} - Library - Properties - NServiceBus.Impersonation - NServiceBus.Impersonation - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\..\..\build\output\NServiceBus.dll - False - - - ..\..\..\build\nservicebus.core\NServiceBus.Config.dll - False - - - ..\..\..\build\nservicebus.core\NServiceBus.MessageMutator.dll - False - - - ..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll - False - - - ..\..\..\build\nservicebus.core\NServiceBus.Unicast.Config.dll - False - - - ..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll - False - - - - - - - - - - - - CommonAssemblyInfo.cs - - - - - - + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {BFD784DB-1880-4115-A73F-083ED8617419} + Library + Properties + NServiceBus.Impersonation + NServiceBus.Impersonation + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\..\build\output\NServiceBus.dll + False + + + ..\..\..\build\nservicebus.core\NServiceBus.Config.dll + False + + + ..\..\..\build\nservicebus.core\NServiceBus.MessageMutator.dll + False + + + ..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll + False + + + ..\..\..\build\nservicebus.core\NServiceBus.Unicast.Config.dll + False + + + ..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll + False + + + + + + + + + + + + CommonAssemblyInfo.cs + + + + + + \ No newline at end of file diff --git a/src/impersonation/NServiceBus.Impersonation/Properties/AssemblyInfo.cs b/src/impersonation/NServiceBus.Impersonation/Properties/AssemblyInfo.cs index 7e133c95344..8d038a1a3ab 100644 --- a/src/impersonation/NServiceBus.Impersonation/Properties/AssemblyInfo.cs +++ b/src/impersonation/NServiceBus.Impersonation/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Impersonation Functionality")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Impersonation Functionality")] [assembly: AssemblyDescription("Impersonation functionality for NServiceBus")] \ No newline at end of file diff --git a/src/impersonation/impersonation.sln b/src/impersonation/impersonation.sln index c37e348eabb..62f7c841b8d 100644 --- a/src/impersonation/impersonation.sln +++ b/src/impersonation/impersonation.sln @@ -1,20 +1,20 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Impersonation", "NServiceBus.Impersonation\NServiceBus.Impersonation.csproj", "{BFD784DB-1880-4115-A73F-083ED8617419}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {BFD784DB-1880-4115-A73F-083ED8617419}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BFD784DB-1880-4115-A73F-083ED8617419}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BFD784DB-1880-4115-A73F-083ED8617419}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BFD784DB-1880-4115-A73F-083ED8617419}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Impersonation", "NServiceBus.Impersonation\NServiceBus.Impersonation.csproj", "{BFD784DB-1880-4115-A73F-083ED8617419}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {BFD784DB-1880-4115-A73F-083ED8617419}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BFD784DB-1880-4115-A73F-083ED8617419}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BFD784DB-1880-4115-A73F-083ED8617419}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BFD784DB-1880-4115-A73F-083ED8617419}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/impl/ObjectBuilder.Common/NServiceBus.ObjectBuilder.DefaultBuilder/Config/ConfigureDefaultBuilder.cs b/src/impl/ObjectBuilder.Common/NServiceBus.ObjectBuilder.DefaultBuilder/Config/ConfigureDefaultBuilder.cs index 405ec2ccbc1..a8240cc3ccf 100644 --- a/src/impl/ObjectBuilder.Common/NServiceBus.ObjectBuilder.DefaultBuilder/Config/ConfigureDefaultBuilder.cs +++ b/src/impl/ObjectBuilder.Common/NServiceBus.ObjectBuilder.DefaultBuilder/Config/ConfigureDefaultBuilder.cs @@ -1,26 +1,26 @@ -using NServiceBus.ObjectBuilder.Autofac; -using NServiceBus.ObjectBuilder.Common.Config; - -namespace NServiceBus -{ - /// - /// Configuration extension for the default builder - /// - public static class ConfigureDefaultBuilder - { - - /// - /// Uses the default container merged into NServiceBus.Core.dll. - /// In this version, the container is the Spring Framework. - /// - /// - /// - public static Configure DefaultBuilder(this Configure config) - { - ConfigureCommon.With(config, new AutofacObjectBuilder()); - - return config; - } - - } -} +using NServiceBus.ObjectBuilder.Autofac; +using NServiceBus.ObjectBuilder.Common.Config; + +namespace NServiceBus +{ + /// + /// Configuration extension for the default builder + /// + public static class ConfigureDefaultBuilder + { + + /// + /// Uses the default container merged into NServiceBus.Core.dll. + /// In this version, the container is the Spring Framework. + /// + /// + /// + public static Configure DefaultBuilder(this Configure config) + { + ConfigureCommon.With(config, new AutofacObjectBuilder()); + + return config; + } + + } +} diff --git a/src/impl/ObjectBuilder.Common/NServiceBus.ObjectBuilder.DefaultBuilder/NServiceBus.ObjectBuilder.DefaultBuilder.csproj b/src/impl/ObjectBuilder.Common/NServiceBus.ObjectBuilder.DefaultBuilder/NServiceBus.ObjectBuilder.DefaultBuilder.csproj index ab7a2153868..56c31ed041e 100644 --- a/src/impl/ObjectBuilder.Common/NServiceBus.ObjectBuilder.DefaultBuilder/NServiceBus.ObjectBuilder.DefaultBuilder.csproj +++ b/src/impl/ObjectBuilder.Common/NServiceBus.ObjectBuilder.DefaultBuilder/NServiceBus.ObjectBuilder.DefaultBuilder.csproj @@ -1,88 +1,88 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {A37DAEEC-1FB1-4637-B0E7-3A986A29B0DE} - Library - Properties - NServiceBus.ObjectBuilder.DefaultBuilder - NServiceBus.ObjectBuilder.DefaultBuilder - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\..\lib\Autofac.dll - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll - - - - 3.5 - - - - - CommonAssemblyInfo.cs - - - AutofacObjectBuilder.cs - - - Internal\ContainerExtensions.cs - - - Internal\ObjectExtensions.cs - - - Internal\TypeExtensions.cs - - - - - - - {34C89D80-4F8D-48A6-AAB5-2D6DC5A1B953} - ObjectBuilder.Common.Config - - - {771CDD6A-6880-4802-8EB1-F7A35386D9B4} - ObjectBuilder.Common - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {A37DAEEC-1FB1-4637-B0E7-3A986A29B0DE} + Library + Properties + NServiceBus.ObjectBuilder.DefaultBuilder + NServiceBus.ObjectBuilder.DefaultBuilder + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\..\lib\Autofac.dll + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll + + + + 3.5 + + + + + CommonAssemblyInfo.cs + + + AutofacObjectBuilder.cs + + + Internal\ContainerExtensions.cs + + + Internal\ObjectExtensions.cs + + + Internal\TypeExtensions.cs + + + + + + + {34C89D80-4F8D-48A6-AAB5-2D6DC5A1B953} + ObjectBuilder.Common.Config + + + {771CDD6A-6880-4802-8EB1-F7A35386D9B4} + ObjectBuilder.Common + + + + \ No newline at end of file diff --git a/src/impl/ObjectBuilder.Common/NServiceBus.ObjectBuilder.DefaultBuilder/Properties/AssemblyInfo.cs b/src/impl/ObjectBuilder.Common/NServiceBus.ObjectBuilder.DefaultBuilder/Properties/AssemblyInfo.cs index 07b424009e1..9c6b70b294f 100644 --- a/src/impl/ObjectBuilder.Common/NServiceBus.ObjectBuilder.DefaultBuilder/Properties/AssemblyInfo.cs +++ b/src/impl/ObjectBuilder.Common/NServiceBus.ObjectBuilder.DefaultBuilder/Properties/AssemblyInfo.cs @@ -1,2 +1,2 @@ -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus.ObjectBuilder.DefaultBuilder")] +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus.ObjectBuilder.DefaultBuilder")] diff --git a/src/impl/ObjectBuilder.Common/ObjectBuilder.Common.Config/ConfigureCommon.cs b/src/impl/ObjectBuilder.Common/ObjectBuilder.Common.Config/ConfigureCommon.cs index 76fece3dd01..df4ee7bac25 100644 --- a/src/impl/ObjectBuilder.Common/ObjectBuilder.Common.Config/ConfigureCommon.cs +++ b/src/impl/ObjectBuilder.Common/ObjectBuilder.Common.Config/ConfigureCommon.cs @@ -1,28 +1,28 @@ -namespace NServiceBus.ObjectBuilder.Common.Config -{ - /// - /// Utility configuration class for implementers of IContainer. - /// - public static class ConfigureCommon - { - /// - /// Sets the Builder property of the given Configure object to an instance of CommonObjectBuilder. - /// Then, the given builder object is inserted in the relevant place of the builder chain. - /// Finally, the given actions are performed on the instance of CommonObjectBuilder. - /// - /// - /// - public static void With(Configure config, IContainer container) - { - var b = new CommonObjectBuilder { Container = container, Synchronized = SyncConfig.Synchronize }; - - config.Builder = b; - config.Configurer = b; - - var cfg = config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton) - .ConfigureProperty(c => c.Container, container); - - SyncConfig.MarkConfigured(); - } - } -} +namespace NServiceBus.ObjectBuilder.Common.Config +{ + /// + /// Utility configuration class for implementers of IContainer. + /// + public static class ConfigureCommon + { + /// + /// Sets the Builder property of the given Configure object to an instance of CommonObjectBuilder. + /// Then, the given builder object is inserted in the relevant place of the builder chain. + /// Finally, the given actions are performed on the instance of CommonObjectBuilder. + /// + /// + /// + public static void With(Configure config, IContainer container) + { + var b = new CommonObjectBuilder { Container = container, Synchronized = SyncConfig.Synchronize }; + + config.Builder = b; + config.Configurer = b; + + var cfg = config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton) + .ConfigureProperty(c => c.Container, container); + + SyncConfig.MarkConfigured(); + } + } +} diff --git a/src/impl/ObjectBuilder.Common/ObjectBuilder.Common.Config/ConfigureContainer.cs b/src/impl/ObjectBuilder.Common/ObjectBuilder.Common.Config/ConfigureContainer.cs index 09eab1c8dda..83a0adc05a3 100644 --- a/src/impl/ObjectBuilder.Common/ObjectBuilder.Common.Config/ConfigureContainer.cs +++ b/src/impl/ObjectBuilder.Common/ObjectBuilder.Common.Config/ConfigureContainer.cs @@ -1,35 +1,35 @@ -namespace NServiceBus.ObjectBuilder.Common.Config -{ - /// - /// Extension methods to specify a custom container type and/or instance - /// - public static class ConfigureContainer - { - /// - /// Provide a custom IContainer type for use by NServiceBus - /// - ///Configuration instance - ///IContainer type - /// - public static Configure UsingContainer(this Configure configure) where T : class, IContainer, new() - { - UsingContainer(configure, new T()); - - return configure; - } - - /// - /// Provide a custom IContainer instance for use by NServiceBus - /// - ///Configuration instance - ///IContainer instance - ///IContainer type - /// - public static Configure UsingContainer(this Configure configure, T container) where T : IContainer - { - ConfigureCommon.With(configure, container); - - return configure; - } - } +namespace NServiceBus.ObjectBuilder.Common.Config +{ + /// + /// Extension methods to specify a custom container type and/or instance + /// + public static class ConfigureContainer + { + /// + /// Provide a custom IContainer type for use by NServiceBus + /// + ///Configuration instance + ///IContainer type + /// + public static Configure UsingContainer(this Configure configure) where T : class, IContainer, new() + { + UsingContainer(configure, new T()); + + return configure; + } + + /// + /// Provide a custom IContainer instance for use by NServiceBus + /// + ///Configuration instance + ///IContainer instance + ///IContainer type + /// + public static Configure UsingContainer(this Configure configure, T container) where T : IContainer + { + ConfigureCommon.With(configure, container); + + return configure; + } + } } \ No newline at end of file diff --git a/src/impl/ObjectBuilder.Common/ObjectBuilder.Common.Config/ObjectBuilder.Common.Config.csproj b/src/impl/ObjectBuilder.Common/ObjectBuilder.Common.Config/ObjectBuilder.Common.Config.csproj index e0f30b6efb8..40c4c73d169 100644 --- a/src/impl/ObjectBuilder.Common/ObjectBuilder.Common.Config/ObjectBuilder.Common.Config.csproj +++ b/src/impl/ObjectBuilder.Common/ObjectBuilder.Common.Config/ObjectBuilder.Common.Config.csproj @@ -1,117 +1,117 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {34C89D80-4F8D-48A6-AAB5-2D6DC5A1B953} - Library - Properties - NServiceBus.ObjectBuilder.Common.Config - NServiceBus.ObjectBuilder.Common.Config - v4.0 - 512 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.ObjectBuilder.Common.Config.XML - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.ObjectBuilder.Common.Config.XML - AllRules.ruleset - - - - False - ..\..\..\..\build\output\NServiceBus.dll - False - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll - False - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll - False - - - - 3.5 - - - - - CommonAssemblyInfo.cs - - - - - - - - - {771CDD6A-6880-4802-8EB1-F7A35386D9B4} - ObjectBuilder.Common - False - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {34C89D80-4F8D-48A6-AAB5-2D6DC5A1B953} + Library + Properties + NServiceBus.ObjectBuilder.Common.Config + NServiceBus.ObjectBuilder.Common.Config + v4.0 + 512 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.ObjectBuilder.Common.Config.XML + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.ObjectBuilder.Common.Config.XML + AllRules.ruleset + + + + False + ..\..\..\..\build\output\NServiceBus.dll + False + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll + False + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll + False + + + + 3.5 + + + + + CommonAssemblyInfo.cs + + + + + + + + + {771CDD6A-6880-4802-8EB1-F7A35386D9B4} + ObjectBuilder.Common + False + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\" + \ No newline at end of file diff --git a/src/impl/ObjectBuilder.Common/ObjectBuilder.Common.Config/Properties/AssemblyInfo.cs b/src/impl/ObjectBuilder.Common/ObjectBuilder.Common.Config/Properties/AssemblyInfo.cs index d6921a6e42e..92025e0d670 100644 --- a/src/impl/ObjectBuilder.Common/ObjectBuilder.Common.Config/Properties/AssemblyInfo.cs +++ b/src/impl/ObjectBuilder.Common/ObjectBuilder.Common.Config/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Object Builder Configuration")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Object Builder Configuration")] [assembly: AssemblyDescription("Configuration for common object building capabilities of nServiceBus.")] \ No newline at end of file diff --git a/src/impl/ObjectBuilder.Common/ObjectBuilder.Common.Config/SyncConfig.cs b/src/impl/ObjectBuilder.Common/ObjectBuilder.Common.Config/SyncConfig.cs index 9ec5e545ba8..da97ba7e859 100644 --- a/src/impl/ObjectBuilder.Common/ObjectBuilder.Common.Config/SyncConfig.cs +++ b/src/impl/ObjectBuilder.Common/ObjectBuilder.Common.Config/SyncConfig.cs @@ -1,39 +1,39 @@ -using System; - -namespace NServiceBus -{ - /// - /// Class for holding extension methods to NServiceBus.Configure - /// - public static class SyncConfig - { - /// - /// Indicates whether the synchronization has been requested. - /// - public static bool Synchronize { get { return synchronize; } } - - /// - /// Notify that configuration of ConfigureCommon occurred. - /// - public static void MarkConfigured() { configured = true; } - - /// - /// Use this for multi-threaded rich clients. Specifies that message processing - /// will occur within a synchronization domain (make sure that you only have one). - /// - /// - /// - public static Configure Synchronization(this Configure config) - { - if (configured) - throw new InvalidOperationException("Synchronization() can only be called before any object builders."); - - synchronize = true; - - return config; - } - - private static bool synchronize; - private static bool configured; - } -} +using System; + +namespace NServiceBus +{ + /// + /// Class for holding extension methods to NServiceBus.Configure + /// + public static class SyncConfig + { + /// + /// Indicates whether the synchronization has been requested. + /// + public static bool Synchronize { get { return synchronize; } } + + /// + /// Notify that configuration of ConfigureCommon occurred. + /// + public static void MarkConfigured() { configured = true; } + + /// + /// Use this for multi-threaded rich clients. Specifies that message processing + /// will occur within a synchronization domain (make sure that you only have one). + /// + /// + /// + public static Configure Synchronization(this Configure config) + { + if (configured) + throw new InvalidOperationException("Synchronization() can only be called before any object builders."); + + synchronize = true; + + return config; + } + + private static bool synchronize; + private static bool configured; + } +} diff --git a/src/impl/ObjectBuilder.Common/ObjectBuilder.Common.sln b/src/impl/ObjectBuilder.Common/ObjectBuilder.Common.sln index e40dde61b40..42670e80fb2 100644 --- a/src/impl/ObjectBuilder.Common/ObjectBuilder.Common.sln +++ b/src/impl/ObjectBuilder.Common/ObjectBuilder.Common.sln @@ -1,32 +1,32 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectBuilder.Common", "ObjectBuilder.Common\ObjectBuilder.Common.csproj", "{771CDD6A-6880-4802-8EB1-F7A35386D9B4}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectBuilder.Common.Config", "ObjectBuilder.Common.Config\ObjectBuilder.Common.Config.csproj", "{34C89D80-4F8D-48A6-AAB5-2D6DC5A1B953}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.ObjectBuilder.DefaultBuilder", "NServiceBus.ObjectBuilder.DefaultBuilder\NServiceBus.ObjectBuilder.DefaultBuilder.csproj", "{A37DAEEC-1FB1-4637-B0E7-3A986A29B0DE}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {771CDD6A-6880-4802-8EB1-F7A35386D9B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {771CDD6A-6880-4802-8EB1-F7A35386D9B4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {771CDD6A-6880-4802-8EB1-F7A35386D9B4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {771CDD6A-6880-4802-8EB1-F7A35386D9B4}.Release|Any CPU.Build.0 = Release|Any CPU - {34C89D80-4F8D-48A6-AAB5-2D6DC5A1B953}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {34C89D80-4F8D-48A6-AAB5-2D6DC5A1B953}.Debug|Any CPU.Build.0 = Debug|Any CPU - {34C89D80-4F8D-48A6-AAB5-2D6DC5A1B953}.Release|Any CPU.ActiveCfg = Release|Any CPU - {34C89D80-4F8D-48A6-AAB5-2D6DC5A1B953}.Release|Any CPU.Build.0 = Release|Any CPU - {A37DAEEC-1FB1-4637-B0E7-3A986A29B0DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A37DAEEC-1FB1-4637-B0E7-3A986A29B0DE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A37DAEEC-1FB1-4637-B0E7-3A986A29B0DE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A37DAEEC-1FB1-4637-B0E7-3A986A29B0DE}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectBuilder.Common", "ObjectBuilder.Common\ObjectBuilder.Common.csproj", "{771CDD6A-6880-4802-8EB1-F7A35386D9B4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectBuilder.Common.Config", "ObjectBuilder.Common.Config\ObjectBuilder.Common.Config.csproj", "{34C89D80-4F8D-48A6-AAB5-2D6DC5A1B953}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.ObjectBuilder.DefaultBuilder", "NServiceBus.ObjectBuilder.DefaultBuilder\NServiceBus.ObjectBuilder.DefaultBuilder.csproj", "{A37DAEEC-1FB1-4637-B0E7-3A986A29B0DE}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {771CDD6A-6880-4802-8EB1-F7A35386D9B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {771CDD6A-6880-4802-8EB1-F7A35386D9B4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {771CDD6A-6880-4802-8EB1-F7A35386D9B4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {771CDD6A-6880-4802-8EB1-F7A35386D9B4}.Release|Any CPU.Build.0 = Release|Any CPU + {34C89D80-4F8D-48A6-AAB5-2D6DC5A1B953}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {34C89D80-4F8D-48A6-AAB5-2D6DC5A1B953}.Debug|Any CPU.Build.0 = Debug|Any CPU + {34C89D80-4F8D-48A6-AAB5-2D6DC5A1B953}.Release|Any CPU.ActiveCfg = Release|Any CPU + {34C89D80-4F8D-48A6-AAB5-2D6DC5A1B953}.Release|Any CPU.Build.0 = Release|Any CPU + {A37DAEEC-1FB1-4637-B0E7-3A986A29B0DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A37DAEEC-1FB1-4637-B0E7-3A986A29B0DE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A37DAEEC-1FB1-4637-B0E7-3A986A29B0DE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A37DAEEC-1FB1-4637-B0E7-3A986A29B0DE}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/impl/ObjectBuilder.Common/ObjectBuilder.Common/CommonObjectBuilder.cs b/src/impl/ObjectBuilder.Common/ObjectBuilder.Common/CommonObjectBuilder.cs index 235551512a0..18c7c746b2d 100644 --- a/src/impl/ObjectBuilder.Common/ObjectBuilder.Common/CommonObjectBuilder.cs +++ b/src/impl/ObjectBuilder.Common/ObjectBuilder.Common/CommonObjectBuilder.cs @@ -1,158 +1,158 @@ -using System; -using System.Collections.Generic; -using System.Linq.Expressions; -using NServiceBus.Utils.Reflection; - -namespace NServiceBus.ObjectBuilder.Common -{ - /// - /// Implementation of IBuilder, serving as a facade that container specific implementations - /// of IContainer should run behind. - /// - public class CommonObjectBuilder : IBuilder, IConfigureComponents - { - /// - /// The container that will be used to create objects and configure components. - /// - public IContainer Container - { - get { return container; } - set - { - container = value; - if (sync != null) - sync.Container = value; - } - } - - private bool synchronized; - - /// - /// Used for multi-threaded rich clients to build and dispatch - /// in a synchronization domain. - /// - public bool Synchronized - { - get { return synchronized; } - set - { - synchronized = value; - - if (synchronized) - { - if (sync == null) - sync = new SynchronizedInvoker(); - - sync.Container = Container; - } - } - } - - #region IConfigureComponents Members - - IComponentConfig IConfigureComponents.ConfigureComponent(Type concreteComponent, ComponentCallModelEnum callModel) - { - Container.Configure(concreteComponent, callModel); - - return new ComponentConfig(concreteComponent, Container); - } - - IComponentConfig IConfigureComponents.ConfigureComponent(ComponentCallModelEnum callModel) - { - Container.Configure(typeof(T), callModel); - - return new ComponentConfig(Container); - } - - IConfigureComponents IConfigureComponents.ConfigureProperty(Expression> property, object value) - { - var prop = Reflect.GetProperty(property); - Container.ConfigureProperty(typeof(T), prop.Name, value); - - return this; - } - - IConfigureComponents IConfigureComponents.RegisterSingleton(Type lookupType, object instance) - { - Container.RegisterSingleton(lookupType, instance); - return this; - } - - IConfigureComponents IConfigureComponents.RegisterSingleton(object instance) - { - Container.RegisterSingleton(typeof(T), instance); - return this; - } - - bool IConfigureComponents.HasComponent() - { - return Container.HasComponent(typeof(T)); - } - - bool IConfigureComponents.HasComponent(Type componentType) - { - return Container.HasComponent(componentType); - } - - #endregion - - #region IBuilder Members - - IBuilder IBuilder.CreateChildBuilder() - { - return new CommonObjectBuilder - { - Container = Container.BuildChildContainer() - }; - } - - void IDisposable.Dispose() - { - Container.Dispose(); - } - - T IBuilder.Build() - { - return (T)Container.Build(typeof(T)); - } - - object IBuilder.Build(Type typeToBuild) - { - return Container.Build(typeToBuild); - } - - IEnumerable IBuilder.BuildAll(Type typeToBuild) - { - return Container.BuildAll(typeToBuild); - } - - IEnumerable IBuilder.BuildAll() - { - foreach (T element in Container.BuildAll(typeof(T))) - yield return element; - } - - void IBuilder.BuildAndDispatch(Type typeToBuild, Action action) - { - if (sync != null) - sync.BuildAndDispatch(typeToBuild, action); - else - { - var o = Container.Build(typeToBuild); - action(o); - - Container.ReleaseInstance(o); - } - } - - void IBuilder.ReleaseInstance(object instance) - { - Container.ReleaseInstance(instance); - } - - #endregion - - private static SynchronizedInvoker sync; - private IContainer container; - } -} +using System; +using System.Collections.Generic; +using System.Linq.Expressions; +using NServiceBus.Utils.Reflection; + +namespace NServiceBus.ObjectBuilder.Common +{ + /// + /// Implementation of IBuilder, serving as a facade that container specific implementations + /// of IContainer should run behind. + /// + public class CommonObjectBuilder : IBuilder, IConfigureComponents + { + /// + /// The container that will be used to create objects and configure components. + /// + public IContainer Container + { + get { return container; } + set + { + container = value; + if (sync != null) + sync.Container = value; + } + } + + private bool synchronized; + + /// + /// Used for multi-threaded rich clients to build and dispatch + /// in a synchronization domain. + /// + public bool Synchronized + { + get { return synchronized; } + set + { + synchronized = value; + + if (synchronized) + { + if (sync == null) + sync = new SynchronizedInvoker(); + + sync.Container = Container; + } + } + } + + #region IConfigureComponents Members + + IComponentConfig IConfigureComponents.ConfigureComponent(Type concreteComponent, ComponentCallModelEnum callModel) + { + Container.Configure(concreteComponent, callModel); + + return new ComponentConfig(concreteComponent, Container); + } + + IComponentConfig IConfigureComponents.ConfigureComponent(ComponentCallModelEnum callModel) + { + Container.Configure(typeof(T), callModel); + + return new ComponentConfig(Container); + } + + IConfigureComponents IConfigureComponents.ConfigureProperty(Expression> property, object value) + { + var prop = Reflect.GetProperty(property); + Container.ConfigureProperty(typeof(T), prop.Name, value); + + return this; + } + + IConfigureComponents IConfigureComponents.RegisterSingleton(Type lookupType, object instance) + { + Container.RegisterSingleton(lookupType, instance); + return this; + } + + IConfigureComponents IConfigureComponents.RegisterSingleton(object instance) + { + Container.RegisterSingleton(typeof(T), instance); + return this; + } + + bool IConfigureComponents.HasComponent() + { + return Container.HasComponent(typeof(T)); + } + + bool IConfigureComponents.HasComponent(Type componentType) + { + return Container.HasComponent(componentType); + } + + #endregion + + #region IBuilder Members + + IBuilder IBuilder.CreateChildBuilder() + { + return new CommonObjectBuilder + { + Container = Container.BuildChildContainer() + }; + } + + void IDisposable.Dispose() + { + Container.Dispose(); + } + + T IBuilder.Build() + { + return (T)Container.Build(typeof(T)); + } + + object IBuilder.Build(Type typeToBuild) + { + return Container.Build(typeToBuild); + } + + IEnumerable IBuilder.BuildAll(Type typeToBuild) + { + return Container.BuildAll(typeToBuild); + } + + IEnumerable IBuilder.BuildAll() + { + foreach (T element in Container.BuildAll(typeof(T))) + yield return element; + } + + void IBuilder.BuildAndDispatch(Type typeToBuild, Action action) + { + if (sync != null) + sync.BuildAndDispatch(typeToBuild, action); + else + { + var o = Container.Build(typeToBuild); + action(o); + + Container.ReleaseInstance(o); + } + } + + void IBuilder.ReleaseInstance(object instance) + { + Container.ReleaseInstance(instance); + } + + #endregion + + private static SynchronizedInvoker sync; + private IContainer container; + } +} diff --git a/src/impl/ObjectBuilder.Common/ObjectBuilder.Common/ComponentConfig.cs b/src/impl/ObjectBuilder.Common/ObjectBuilder.Common/ComponentConfig.cs index 0a13a586187..342e9290892 100644 --- a/src/impl/ObjectBuilder.Common/ObjectBuilder.Common/ComponentConfig.cs +++ b/src/impl/ObjectBuilder.Common/ObjectBuilder.Common/ComponentConfig.cs @@ -1,42 +1,42 @@ -using System; -using System.Linq.Expressions; -using NServiceBus.Utils.Reflection; - -namespace NServiceBus.ObjectBuilder.Common -{ - class ComponentConfig : IComponentConfig - { - private Type component; - private IContainer container; - - public ComponentConfig(Type component, IContainer container) - { - this.component = component; - this.container = container; - } - - IComponentConfig IComponentConfig.ConfigureProperty(string name, object value) - { - this.container.ConfigureProperty(this.component, name, value); - - return this; - } - } - - class ComponentConfig : ComponentConfig, IComponentConfig - { - public ComponentConfig(IContainer container) : base(typeof(T), container) - { - } - - IComponentConfig IComponentConfig.ConfigureProperty(Expression> property, object value) - { - var prop = Reflect.GetProperty(property); - - ((IComponentConfig)this).ConfigureProperty(prop.Name, value); - - return this; - } - } - -} +using System; +using System.Linq.Expressions; +using NServiceBus.Utils.Reflection; + +namespace NServiceBus.ObjectBuilder.Common +{ + class ComponentConfig : IComponentConfig + { + private Type component; + private IContainer container; + + public ComponentConfig(Type component, IContainer container) + { + this.component = component; + this.container = container; + } + + IComponentConfig IComponentConfig.ConfigureProperty(string name, object value) + { + this.container.ConfigureProperty(this.component, name, value); + + return this; + } + } + + class ComponentConfig : ComponentConfig, IComponentConfig + { + public ComponentConfig(IContainer container) : base(typeof(T), container) + { + } + + IComponentConfig IComponentConfig.ConfigureProperty(Expression> property, object value) + { + var prop = Reflect.GetProperty(property); + + ((IComponentConfig)this).ConfigureProperty(prop.Name, value); + + return this; + } + } + +} diff --git a/src/impl/ObjectBuilder.Common/ObjectBuilder.Common/IContainer.cs b/src/impl/ObjectBuilder.Common/ObjectBuilder.Common/IContainer.cs index 316322ac096..8c4b6f4ab18 100644 --- a/src/impl/ObjectBuilder.Common/ObjectBuilder.Common/IContainer.cs +++ b/src/impl/ObjectBuilder.Common/ObjectBuilder.Common/IContainer.cs @@ -1,71 +1,71 @@ -using System; -using System.Collections.Generic; - -namespace NServiceBus.ObjectBuilder.Common -{ - /// - /// Abstraction of a container. - /// - public interface IContainer : IDisposable - { - /// - /// Returns an instantiation of the given type. - /// - /// - /// - object Build(Type typeToBuild); - - /// - /// Returns a child instance of the container to facilitate deterministic disposal - /// of all resources built by the child container. - /// - /// - IContainer BuildChildContainer(); - - /// - /// Returns a list of objects instantiated because their type is compatible - /// with the given type. - /// - /// - /// - IEnumerable BuildAll(Type typeToBuild); - - /// - /// Indicates to the container that the instance that was previously built by the container - /// can now be disposed and all of its resources released. - /// - /// - void ReleaseInstance(object instance); - - /// - /// Configures the call model of the given component type. - /// - /// - /// - void Configure(Type component, ComponentCallModelEnum callModel); - - /// - /// Sets the value to be configured for the given property of the - /// given component type. - /// - /// - /// - /// - void ConfigureProperty(Type component, string property, object value); - - /// - /// Registers the given instance as the singleton that will be returned - /// for the given type. - /// - /// - /// - void RegisterSingleton(Type lookupType, object instance); - - /// - /// Indicates if a component of the given type has been configured. - /// - /// - /// - bool HasComponent(Type componentType); - } -} +using System; +using System.Collections.Generic; + +namespace NServiceBus.ObjectBuilder.Common +{ + /// + /// Abstraction of a container. + /// + public interface IContainer : IDisposable + { + /// + /// Returns an instantiation of the given type. + /// + /// + /// + object Build(Type typeToBuild); + + /// + /// Returns a child instance of the container to facilitate deterministic disposal + /// of all resources built by the child container. + /// + /// + IContainer BuildChildContainer(); + + /// + /// Returns a list of objects instantiated because their type is compatible + /// with the given type. + /// + /// + /// + IEnumerable BuildAll(Type typeToBuild); + + /// + /// Indicates to the container that the instance that was previously built by the container + /// can now be disposed and all of its resources released. + /// + /// + void ReleaseInstance(object instance); + + /// + /// Configures the call model of the given component type. + /// + /// + /// + void Configure(Type component, ComponentCallModelEnum callModel); + + /// + /// Sets the value to be configured for the given property of the + /// given component type. + /// + /// + /// + /// + void ConfigureProperty(Type component, string property, object value); + + /// + /// Registers the given instance as the singleton that will be returned + /// for the given type. + /// + /// + /// + void RegisterSingleton(Type lookupType, object instance); + + /// + /// Indicates if a component of the given type has been configured. + /// + /// + /// + bool HasComponent(Type componentType); + } +} diff --git a/src/impl/ObjectBuilder.Common/ObjectBuilder.Common/ObjectBuilder.Common.csproj b/src/impl/ObjectBuilder.Common/ObjectBuilder.Common/ObjectBuilder.Common.csproj index fa15d986e9c..2240c2d7474 100644 --- a/src/impl/ObjectBuilder.Common/ObjectBuilder.Common/ObjectBuilder.Common.csproj +++ b/src/impl/ObjectBuilder.Common/ObjectBuilder.Common/ObjectBuilder.Common.csproj @@ -1,105 +1,105 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {771CDD6A-6880-4802-8EB1-F7A35386D9B4} - Library - Properties - NServiceBus.ObjectBuilder.Common - NServiceBus.ObjectBuilder.Common - v4.0 - 512 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.ObjectBuilder.Common.XML - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.ObjectBuilder.Common.XML - AllRules.ruleset - - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll - False - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.Utils.Reflection.dll - - - - 3.5 - - - - - CommonAssemblyInfo.cs - - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {771CDD6A-6880-4802-8EB1-F7A35386D9B4} + Library + Properties + NServiceBus.ObjectBuilder.Common + NServiceBus.ObjectBuilder.Common + v4.0 + 512 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.ObjectBuilder.Common.XML + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.ObjectBuilder.Common.XML + AllRules.ruleset + + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll + False + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.Utils.Reflection.dll + + + + 3.5 + + + + + CommonAssemblyInfo.cs + + + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\" + \ No newline at end of file diff --git a/src/impl/ObjectBuilder.Common/ObjectBuilder.Common/Properties/AssemblyInfo.cs b/src/impl/ObjectBuilder.Common/ObjectBuilder.Common/Properties/AssemblyInfo.cs index 90472d95969..0145e083c67 100644 --- a/src/impl/ObjectBuilder.Common/ObjectBuilder.Common/Properties/AssemblyInfo.cs +++ b/src/impl/ObjectBuilder.Common/ObjectBuilder.Common/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Object Builder")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Object Builder")] [assembly: AssemblyDescription("Serves as the entry point for service locator extension.")] \ No newline at end of file diff --git a/src/impl/ObjectBuilder.Common/ObjectBuilder.Common/SynchronizedInvoker.cs b/src/impl/ObjectBuilder.Common/ObjectBuilder.Common/SynchronizedInvoker.cs index 4e979c02c7f..47cc07218ef 100644 --- a/src/impl/ObjectBuilder.Common/ObjectBuilder.Common/SynchronizedInvoker.cs +++ b/src/impl/ObjectBuilder.Common/ObjectBuilder.Common/SynchronizedInvoker.cs @@ -1,34 +1,34 @@ -using System; -using System.Runtime.Remoting.Contexts; - -namespace NServiceBus.ObjectBuilder.Common -{ - /// - /// Invokes methods and actions within a synchronization domain. - /// - [Synchronization(SynchronizationAttribute.REQUIRED)] - public class SynchronizedInvoker - { - /// - /// The container used to instantiate components. - /// - public IContainer Container { get; set; } - - /// - /// Uses the container to create the given type and then calls the given - /// action on the object created. - /// - /// - /// - public void BuildAndDispatch(Type typeToBuild, Action action) - { - if (Container == null) - throw new InvalidOperationException("Cannot perform this action without a Container configured."); - - var o = Container.Build(typeToBuild); - action(o); - - Container.ReleaseInstance(o); - } - } -} +using System; +using System.Runtime.Remoting.Contexts; + +namespace NServiceBus.ObjectBuilder.Common +{ + /// + /// Invokes methods and actions within a synchronization domain. + /// + [Synchronization(SynchronizationAttribute.REQUIRED)] + public class SynchronizedInvoker + { + /// + /// The container used to instantiate components. + /// + public IContainer Container { get; set; } + + /// + /// Uses the container to create the given type and then calls the given + /// action on the object created. + /// + /// + /// + public void BuildAndDispatch(Type typeToBuild, Action action) + { + if (Container == null) + throw new InvalidOperationException("Cannot perform this action without a Container configured."); + + var o = Container.Build(typeToBuild); + action(o); + + Container.ReleaseInstance(o); + } + } +} diff --git a/src/impl/ObjectBuilder/ObjectBuilder.Autofac/AutofacObjectBuilder.cs b/src/impl/ObjectBuilder/ObjectBuilder.Autofac/AutofacObjectBuilder.cs index c73987e0160..91e953974b7 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.Autofac/AutofacObjectBuilder.cs +++ b/src/impl/ObjectBuilder/ObjectBuilder.Autofac/AutofacObjectBuilder.cs @@ -1,170 +1,170 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Autofac; -using Autofac.Builder; -using Autofac.Core; -using NServiceBus.ObjectBuilder.Autofac.Internal; - -namespace NServiceBus.ObjectBuilder.Autofac -{ - /// - /// Autofac implementation of IContainer. - /// - internal class AutofacObjectBuilder : Common.IContainer - { - /// - /// The container itself. - /// - private readonly ILifetimeScope container; - - private bool disposed; - - /// - /// Instantiates the class utilizing the given container. - /// - /// - public AutofacObjectBuilder(ILifetimeScope container) - { - this.container = container; - } - - /// - /// Instantites the class with an empty Autofac container. - /// - public AutofacObjectBuilder() : this(new ContainerBuilder().Build()) - { - } - - /// - /// Disposes the container and all resources instantiated by the container. - /// - public void Dispose() - { - Dispose(true); - } - protected virtual void Dispose(bool disposing) - { - if (!disposing || disposed) - return; - - disposed = true; - container.Dispose(); - GC.SuppressFinalize(this); - } - - /// - /// Returns a child instance of the container to facilitate deterministic disposal - /// of all resources built by the child container. - /// - /// - public Common.IContainer BuildChildContainer() - { - return new AutofacObjectBuilder(container.BeginLifetimeScope()); - } - - /// - /// Build an instance of a given type using Autofac. - /// - /// - /// - public object Build(Type typeToBuild) - { - return container.Resolve(typeToBuild); - } - - /// - /// Build all instances of a given type using Autofac. - /// - /// - /// - public IEnumerable BuildAll(Type typeToBuild) - { - return container.ResolveAll(typeToBuild); - } - - /// - /// Tells Autofac to release the given instance. - /// - /// - public void ReleaseInstance(object instance) - { - //no-op - } - - void Common.IContainer.Configure(Type component, ComponentCallModelEnum callModel) - { - IComponentRegistration registration = this.GetComponentRegistration(component); - - if (registration == null) - { - var builder = new ContainerBuilder(); - Type[] services = component.GetAllServices().ToArray(); - var registrationBuilder = builder.RegisterType(component).As(services).PropertiesAutowired(); - - SetLifetimeScope(callModel, registrationBuilder); - - builder.Update(this.container.ComponentRegistry); - } - } - - /// - /// Configure the value of a named component property. - /// - /// - /// - /// - public void ConfigureProperty(Type component, string property, object value) - { - var registration = GetComponentRegistration(component); - - if (registration == null) - { - throw new InvalidOperationException( - "Cannot configure properties for a type that hasn't been configured yet: " + component.FullName); - } - - registration.Activating += (sender, e) => e.Instance.SetPropertyValue(property, value); - } - - /// - /// Register a singleton instance of a dependency within Autofac. - /// - /// - /// - public void RegisterSingleton(Type lookupType, object instance) - { - var builder = new ContainerBuilder(); - builder.RegisterInstance(instance).As(lookupType).ExternallyOwned().PropertiesAutowired(); - builder.Update(this.container.ComponentRegistry); - } - - public bool HasComponent(Type componentType) - { - return container.IsRegistered(componentType); - } - - private static void SetLifetimeScope(ComponentCallModelEnum callModel, IRegistrationBuilder registrationBuilder) - { - switch (callModel) - { - case ComponentCallModelEnum.Singlecall: - registrationBuilder.InstancePerDependency(); - break; - case ComponentCallModelEnum.Singleton: - registrationBuilder.SingleInstance(); - break; - default: - registrationBuilder.InstancePerLifetimeScope(); - break; - } - } - - private IComponentRegistration GetComponentRegistration(Type concreteComponent) - { - return this.container.ComponentRegistry.Registrations.Where(x => x.Activator.LimitType == concreteComponent).FirstOrDefault(); - } - } -} - - +using System; +using System.Collections.Generic; +using System.Linq; +using Autofac; +using Autofac.Builder; +using Autofac.Core; +using NServiceBus.ObjectBuilder.Autofac.Internal; + +namespace NServiceBus.ObjectBuilder.Autofac +{ + /// + /// Autofac implementation of IContainer. + /// + internal class AutofacObjectBuilder : Common.IContainer + { + /// + /// The container itself. + /// + private readonly ILifetimeScope container; + + private bool disposed; + + /// + /// Instantiates the class utilizing the given container. + /// + /// + public AutofacObjectBuilder(ILifetimeScope container) + { + this.container = container; + } + + /// + /// Instantites the class with an empty Autofac container. + /// + public AutofacObjectBuilder() : this(new ContainerBuilder().Build()) + { + } + + /// + /// Disposes the container and all resources instantiated by the container. + /// + public void Dispose() + { + Dispose(true); + } + protected virtual void Dispose(bool disposing) + { + if (!disposing || disposed) + return; + + disposed = true; + container.Dispose(); + GC.SuppressFinalize(this); + } + + /// + /// Returns a child instance of the container to facilitate deterministic disposal + /// of all resources built by the child container. + /// + /// + public Common.IContainer BuildChildContainer() + { + return new AutofacObjectBuilder(container.BeginLifetimeScope()); + } + + /// + /// Build an instance of a given type using Autofac. + /// + /// + /// + public object Build(Type typeToBuild) + { + return container.Resolve(typeToBuild); + } + + /// + /// Build all instances of a given type using Autofac. + /// + /// + /// + public IEnumerable BuildAll(Type typeToBuild) + { + return container.ResolveAll(typeToBuild); + } + + /// + /// Tells Autofac to release the given instance. + /// + /// + public void ReleaseInstance(object instance) + { + //no-op + } + + void Common.IContainer.Configure(Type component, ComponentCallModelEnum callModel) + { + IComponentRegistration registration = this.GetComponentRegistration(component); + + if (registration == null) + { + var builder = new ContainerBuilder(); + Type[] services = component.GetAllServices().ToArray(); + var registrationBuilder = builder.RegisterType(component).As(services).PropertiesAutowired(); + + SetLifetimeScope(callModel, registrationBuilder); + + builder.Update(this.container.ComponentRegistry); + } + } + + /// + /// Configure the value of a named component property. + /// + /// + /// + /// + public void ConfigureProperty(Type component, string property, object value) + { + var registration = GetComponentRegistration(component); + + if (registration == null) + { + throw new InvalidOperationException( + "Cannot configure properties for a type that hasn't been configured yet: " + component.FullName); + } + + registration.Activating += (sender, e) => e.Instance.SetPropertyValue(property, value); + } + + /// + /// Register a singleton instance of a dependency within Autofac. + /// + /// + /// + public void RegisterSingleton(Type lookupType, object instance) + { + var builder = new ContainerBuilder(); + builder.RegisterInstance(instance).As(lookupType).ExternallyOwned().PropertiesAutowired(); + builder.Update(this.container.ComponentRegistry); + } + + public bool HasComponent(Type componentType) + { + return container.IsRegistered(componentType); + } + + private static void SetLifetimeScope(ComponentCallModelEnum callModel, IRegistrationBuilder registrationBuilder) + { + switch (callModel) + { + case ComponentCallModelEnum.Singlecall: + registrationBuilder.InstancePerDependency(); + break; + case ComponentCallModelEnum.Singleton: + registrationBuilder.SingleInstance(); + break; + default: + registrationBuilder.InstancePerLifetimeScope(); + break; + } + } + + private IComponentRegistration GetComponentRegistration(Type concreteComponent) + { + return this.container.ComponentRegistry.Registrations.Where(x => x.Activator.LimitType == concreteComponent).FirstOrDefault(); + } + } +} + + diff --git a/src/impl/ObjectBuilder/ObjectBuilder.Autofac/Config/ConfigureAutofacBuilder.cs b/src/impl/ObjectBuilder/ObjectBuilder.Autofac/Config/ConfigureAutofacBuilder.cs index 709d64184d3..9e6313e88fd 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.Autofac/Config/ConfigureAutofacBuilder.cs +++ b/src/impl/ObjectBuilder/ObjectBuilder.Autofac/Config/ConfigureAutofacBuilder.cs @@ -1,36 +1,36 @@ -using NServiceBus.ObjectBuilder.Autofac; -using NServiceBus.ObjectBuilder.Common.Config; -using Autofac; - -namespace NServiceBus -{ - /// - /// Contains extension methods to NServiceBus.Configure. - /// - public static class ConfigureAutofacBuilder - { - /// - /// Use the Autofac builder. - /// - /// - /// - public static Configure AutofacBuilder(this Configure config) - { - ConfigureCommon.With(config, new AutofacObjectBuilder()); - - return config; - } - - /// - /// Use the Autofac builder passing in a preconfigured container to be used by nServiceBus. - /// - /// - /// - /// - public static Configure AutofacBuilder(this Configure config, IContainer container) - { - ConfigureCommon.With(config, new AutofacObjectBuilder(container)); - return config; - } - } -} +using NServiceBus.ObjectBuilder.Autofac; +using NServiceBus.ObjectBuilder.Common.Config; +using Autofac; + +namespace NServiceBus +{ + /// + /// Contains extension methods to NServiceBus.Configure. + /// + public static class ConfigureAutofacBuilder + { + /// + /// Use the Autofac builder. + /// + /// + /// + public static Configure AutofacBuilder(this Configure config) + { + ConfigureCommon.With(config, new AutofacObjectBuilder()); + + return config; + } + + /// + /// Use the Autofac builder passing in a preconfigured container to be used by nServiceBus. + /// + /// + /// + /// + public static Configure AutofacBuilder(this Configure config, IContainer container) + { + ConfigureCommon.With(config, new AutofacObjectBuilder(container)); + return config; + } + } +} diff --git a/src/impl/ObjectBuilder/ObjectBuilder.Autofac/Internal/ContainerExtensions.cs b/src/impl/ObjectBuilder/ObjectBuilder.Autofac/Internal/ContainerExtensions.cs index c5f1f66e9c4..cf1e620ccdb 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.Autofac/Internal/ContainerExtensions.cs +++ b/src/impl/ObjectBuilder/ObjectBuilder.Autofac/Internal/ContainerExtensions.cs @@ -1,23 +1,23 @@ -using System; -using System.Collections.Generic; -using Autofac; - -namespace NServiceBus.ObjectBuilder.Autofac.Internal -{ - /// - /// Autofac IContainer extensions - /// - internal static class ContainerExtensions - { - /// - /// Resolve all components registered for the type. - /// - /// - /// - /// - public static IEnumerable ResolveAll(this IComponentContext container, Type componentType) - { - return container.Resolve(typeof(IEnumerable<>).MakeGenericType(componentType)) as IEnumerable; - } - } +using System; +using System.Collections.Generic; +using Autofac; + +namespace NServiceBus.ObjectBuilder.Autofac.Internal +{ + /// + /// Autofac IContainer extensions + /// + internal static class ContainerExtensions + { + /// + /// Resolve all components registered for the type. + /// + /// + /// + /// + public static IEnumerable ResolveAll(this IComponentContext container, Type componentType) + { + return container.Resolve(typeof(IEnumerable<>).MakeGenericType(componentType)) as IEnumerable; + } + } } \ No newline at end of file diff --git a/src/impl/ObjectBuilder/ObjectBuilder.Autofac/Internal/ContainerUpdater.cs b/src/impl/ObjectBuilder/ObjectBuilder.Autofac/Internal/ContainerUpdater.cs index dd3c9c06276..c9e216bda2f 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.Autofac/Internal/ContainerUpdater.cs +++ b/src/impl/ObjectBuilder/ObjectBuilder.Autofac/Internal/ContainerUpdater.cs @@ -1,31 +1,31 @@ -using System; -using System.Collections.Generic; -using Autofac; -using Autofac.Core; - -namespace NServiceBus.ObjectBuilder.Autofac.Internal -{ - /// - /// Adopted from Autofac wiki: - /// http://code.google.com/p/autofac/wiki/AddingToExistingContainer - /// Workaround to enable recomposition of the container - /// - public class ContainerUpdater : ContainerBuilder - { - private readonly ICollection> configurationActions = new List>(); - - /// - /// - /// - public override void RegisterCallback(Action configurationAction) - { - this.configurationActions.Add(configurationAction); - } - - public void Update(IContainer container) - { - foreach (var action in this.configurationActions) - action(container.ComponentRegistry); - } - } -} +using System; +using System.Collections.Generic; +using Autofac; +using Autofac.Core; + +namespace NServiceBus.ObjectBuilder.Autofac.Internal +{ + /// + /// Adopted from Autofac wiki: + /// http://code.google.com/p/autofac/wiki/AddingToExistingContainer + /// Workaround to enable recomposition of the container + /// + public class ContainerUpdater : ContainerBuilder + { + private readonly ICollection> configurationActions = new List>(); + + /// + /// + /// + public override void RegisterCallback(Action configurationAction) + { + this.configurationActions.Add(configurationAction); + } + + public void Update(IContainer container) + { + foreach (var action in this.configurationActions) + action(container.ComponentRegistry); + } + } +} diff --git a/src/impl/ObjectBuilder/ObjectBuilder.Autofac/Internal/ObjectExtensions.cs b/src/impl/ObjectBuilder/ObjectBuilder.Autofac/Internal/ObjectExtensions.cs index f54c94e27e2..1a01ac8de6c 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.Autofac/Internal/ObjectExtensions.cs +++ b/src/impl/ObjectBuilder/ObjectBuilder.Autofac/Internal/ObjectExtensions.cs @@ -1,22 +1,22 @@ -using System.Reflection; - -namespace NServiceBus.ObjectBuilder.Autofac.Internal -{ - /// - /// Object extension methods - /// - internal static class ObjectExtensions - { - /// - /// Set a property value on an instance using reflection - /// - /// - /// - /// - public static void SetPropertyValue(this object instance, string propertyName, object value) - { - instance.GetType().GetProperty(propertyName, BindingFlags.Public | BindingFlags.Instance).SetValue(instance, value, null); - } - - } +using System.Reflection; + +namespace NServiceBus.ObjectBuilder.Autofac.Internal +{ + /// + /// Object extension methods + /// + internal static class ObjectExtensions + { + /// + /// Set a property value on an instance using reflection + /// + /// + /// + /// + public static void SetPropertyValue(this object instance, string propertyName, object value) + { + instance.GetType().GetProperty(propertyName, BindingFlags.Public | BindingFlags.Instance).SetValue(instance, value, null); + } + + } } \ No newline at end of file diff --git a/src/impl/ObjectBuilder/ObjectBuilder.Autofac/Internal/TypeExtensions.cs b/src/impl/ObjectBuilder/ObjectBuilder.Autofac/Internal/TypeExtensions.cs index d2f5dad6792..c7bafe7acea 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.Autofac/Internal/TypeExtensions.cs +++ b/src/impl/ObjectBuilder/ObjectBuilder.Autofac/Internal/TypeExtensions.cs @@ -1,36 +1,36 @@ -using System; -using System.Collections.Generic; -using System.Linq; - -namespace NServiceBus.ObjectBuilder.Autofac.Internal -{ - /// - /// Type extensions for Autofac - /// - internal static class TypeExtensions - { - /// - /// Collect all interfaces implemented by a given type - /// - /// - /// - public static IEnumerable GetAllServices(this Type type) - { - if (type == null) - { - return new List(); - } - - var result = new List(type.GetInterfaces()) { - type - }; - - foreach (Type interfaceType in type.GetInterfaces()) - { - result.AddRange(GetAllServices(interfaceType)); - } - - return result.Distinct(); - } - } +using System; +using System.Collections.Generic; +using System.Linq; + +namespace NServiceBus.ObjectBuilder.Autofac.Internal +{ + /// + /// Type extensions for Autofac + /// + internal static class TypeExtensions + { + /// + /// Collect all interfaces implemented by a given type + /// + /// + /// + public static IEnumerable GetAllServices(this Type type) + { + if (type == null) + { + return new List(); + } + + var result = new List(type.GetInterfaces()) { + type + }; + + foreach (Type interfaceType in type.GetInterfaces()) + { + result.AddRange(GetAllServices(interfaceType)); + } + + return result.Distinct(); + } + } } \ No newline at end of file diff --git a/src/impl/ObjectBuilder/ObjectBuilder.Autofac/ObjectBuilder.Autofac.csproj b/src/impl/ObjectBuilder/ObjectBuilder.Autofac/ObjectBuilder.Autofac.csproj index 01a17e81513..f85e87966d3 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.Autofac/ObjectBuilder.Autofac.csproj +++ b/src/impl/ObjectBuilder/ObjectBuilder.Autofac/ObjectBuilder.Autofac.csproj @@ -1,117 +1,117 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {73EC4EBE-826D-4A0A-8837-51D3458FC2A8} - Library - Properties - NServiceBus.ObjectBuilder.Autofac - NServiceBus.ObjectBuilder.Autofac - v4.0 - 512 - true - ..\..\..\..\NServiceBus.snk - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.ObjectBuilder.Autofac.xml - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.ObjectBuilder.Autofac.xml - AllRules.ruleset - - - - False - ..\..\..\..\lib\Autofac.dll - - - False - ..\..\..\..\lib\log4net.dll - False - - - False - ..\..\..\..\build\output\NServiceBus.dll - - - False - ..\..\..\..\build\output\NServiceBus.Core.dll - - - - 3.5 - - - - - CommonAssemblyInfo.cs - - - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\containers\" - xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\containers\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {73EC4EBE-826D-4A0A-8837-51D3458FC2A8} + Library + Properties + NServiceBus.ObjectBuilder.Autofac + NServiceBus.ObjectBuilder.Autofac + v4.0 + 512 + true + ..\..\..\..\NServiceBus.snk + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.ObjectBuilder.Autofac.xml + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.ObjectBuilder.Autofac.xml + AllRules.ruleset + + + + False + ..\..\..\..\lib\Autofac.dll + + + False + ..\..\..\..\lib\log4net.dll + False + + + False + ..\..\..\..\build\output\NServiceBus.dll + + + False + ..\..\..\..\build\output\NServiceBus.Core.dll + + + + 3.5 + + + + + CommonAssemblyInfo.cs + + + + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\containers\" + xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\containers\" + \ No newline at end of file diff --git a/src/impl/ObjectBuilder/ObjectBuilder.Autofac/Properties/AssemblyInfo.cs b/src/impl/ObjectBuilder/ObjectBuilder.Autofac/Properties/AssemblyInfo.cs index 6f0013d6eb7..4c96626c11d 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.Autofac/Properties/AssemblyInfo.cs +++ b/src/impl/ObjectBuilder/ObjectBuilder.Autofac/Properties/AssemblyInfo.cs @@ -1,26 +1,26 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -using System.Runtime.CompilerServices; - -[assembly: AssemblyTitle("NServiceBus Container Autofac Implementation")] -[assembly: AssemblyDescription("Implementation of container functionality on top of Autofac.")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +using System.Runtime.CompilerServices; + +[assembly: AssemblyTitle("NServiceBus Container Autofac Implementation")] +[assembly: AssemblyDescription("Implementation of container functionality on top of Autofac.")] [assembly: InternalsVisibleTo("ObjectBuilder.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100DDE965E6172E019AC82C2639FFE494DD2E7DD16347C34762A05732B492E110F2E4E2E1B5EF2D85C848CCFB671EE20A47C8D1376276708DC30A90FF1121B647BA3B7259A6BC383B2034938EF0E275B58B920375AC605076178123693C6C4F1331661A62EBA28C249386855637780E3FF5F23A6D854700EAA6803EF48907513B92")] \ No newline at end of file diff --git a/src/impl/ObjectBuilder/ObjectBuilder.CastleWindsor/Config/ConfigureWindsorBuilder.cs b/src/impl/ObjectBuilder/ObjectBuilder.CastleWindsor/Config/ConfigureWindsorBuilder.cs index 6d54a565922..bbf150cce38 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.CastleWindsor/Config/ConfigureWindsorBuilder.cs +++ b/src/impl/ObjectBuilder/ObjectBuilder.CastleWindsor/Config/ConfigureWindsorBuilder.cs @@ -1,37 +1,37 @@ -using NServiceBus.ObjectBuilder.CastleWindsor; -using NServiceBus.ObjectBuilder.Common.Config; -using Castle.Windsor; - -namespace NServiceBus -{ - /// - /// Contains extension methods to NServiceBus.Configure. - /// - public static class ConfigureWindsorBuilder - { - /// - /// Use the Castle Windsor builder. - /// - /// - /// - public static Configure CastleWindsorBuilder(this Configure config) - { - ConfigureCommon.With(config, new WindsorObjectBuilder()); - - return config; - } - - /// - /// Use the Castle Windsor builder passing in a preconfigured container to be used by nServiceBus. - /// - /// - /// - /// - public static Configure CastleWindsorBuilder(this Configure config, IWindsorContainer container) - { - ConfigureCommon.With(config, new WindsorObjectBuilder(container)); - - return config; - } - } -} +using NServiceBus.ObjectBuilder.CastleWindsor; +using NServiceBus.ObjectBuilder.Common.Config; +using Castle.Windsor; + +namespace NServiceBus +{ + /// + /// Contains extension methods to NServiceBus.Configure. + /// + public static class ConfigureWindsorBuilder + { + /// + /// Use the Castle Windsor builder. + /// + /// + /// + public static Configure CastleWindsorBuilder(this Configure config) + { + ConfigureCommon.With(config, new WindsorObjectBuilder()); + + return config; + } + + /// + /// Use the Castle Windsor builder passing in a preconfigured container to be used by nServiceBus. + /// + /// + /// + /// + public static Configure CastleWindsorBuilder(this Configure config, IWindsorContainer container) + { + ConfigureCommon.With(config, new WindsorObjectBuilder(container)); + + return config; + } + } +} diff --git a/src/impl/ObjectBuilder/ObjectBuilder.CastleWindsor/ObjectBuilder.CastleWindsor.csproj b/src/impl/ObjectBuilder/ObjectBuilder.CastleWindsor/ObjectBuilder.CastleWindsor.csproj index 25d434c1de4..9e67b7a254d 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.CastleWindsor/ObjectBuilder.CastleWindsor.csproj +++ b/src/impl/ObjectBuilder/ObjectBuilder.CastleWindsor/ObjectBuilder.CastleWindsor.csproj @@ -1,124 +1,124 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {9A9A0BD5-AC37-4B90-B90F-FD1C1395FEBD} - Library - Properties - NServiceBus.ObjectBuilder.CastleWindsor - NServiceBus.ObjectBuilder.CastleWindsor - v4.0 - 512 - true - ..\..\..\..\NServiceBus.snk - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.ObjectBuilder.CastleWindsor.XML - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.ObjectBuilder.CastleWindsor.XML - AllRules.ruleset - - - - False - ..\..\..\..\lib\Castle.Core.dll - False - - - False - ..\..\..\..\lib\Castle.MicroKernel.dll - False - - - False - ..\..\..\..\lib\Castle.Windsor.dll - False - - - False - ..\..\..\..\lib\log4net.dll - False - - - False - ..\..\..\..\build\output\NServiceBus.dll - - - False - ..\..\..\..\build\output\NServiceBus.Core.dll - - - - 3.5 - - - - - CommonAssemblyInfo.cs - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\containers\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {9A9A0BD5-AC37-4B90-B90F-FD1C1395FEBD} + Library + Properties + NServiceBus.ObjectBuilder.CastleWindsor + NServiceBus.ObjectBuilder.CastleWindsor + v4.0 + 512 + true + ..\..\..\..\NServiceBus.snk + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.ObjectBuilder.CastleWindsor.XML + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.ObjectBuilder.CastleWindsor.XML + AllRules.ruleset + + + + False + ..\..\..\..\lib\Castle.Core.dll + False + + + False + ..\..\..\..\lib\Castle.MicroKernel.dll + False + + + False + ..\..\..\..\lib\Castle.Windsor.dll + False + + + False + ..\..\..\..\lib\log4net.dll + False + + + False + ..\..\..\..\build\output\NServiceBus.dll + + + False + ..\..\..\..\build\output\NServiceBus.Core.dll + + + + 3.5 + + + + + CommonAssemblyInfo.cs + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\containers\" + \ No newline at end of file diff --git a/src/impl/ObjectBuilder/ObjectBuilder.CastleWindsor/Properties/AssemblyInfo.cs b/src/impl/ObjectBuilder/ObjectBuilder.CastleWindsor/Properties/AssemblyInfo.cs index 1eac5362050..03de6c1bc77 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.CastleWindsor/Properties/AssemblyInfo.cs +++ b/src/impl/ObjectBuilder/ObjectBuilder.CastleWindsor/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Object Builder Castle Implementation")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Object Builder Castle Implementation")] [assembly: AssemblyDescription("Implementation of object building functionality on top of Castle Windsor.")] \ No newline at end of file diff --git a/src/impl/ObjectBuilder/ObjectBuilder.CastleWindsor/WindsorObjectBuilder .cs b/src/impl/ObjectBuilder/ObjectBuilder.CastleWindsor/WindsorObjectBuilder .cs index 66b0db841b7..7dcd2cd8fe3 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.CastleWindsor/WindsorObjectBuilder .cs +++ b/src/impl/ObjectBuilder/ObjectBuilder.CastleWindsor/WindsorObjectBuilder .cs @@ -1,150 +1,150 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Castle.MicroKernel.Releasers; -using NServiceBus.ObjectBuilder.Common; -using Castle.Windsor; -using Castle.MicroKernel; -using Castle.Core; -using Castle.MicroKernel.Registration; - -namespace NServiceBus.ObjectBuilder.CastleWindsor -{ - /// - /// Castle Windsor implementaton of IContainer. - /// - public class WindsorObjectBuilder : IContainer - { - /// - /// The container itself. - /// - public IWindsorContainer Container { get; set; } - - private bool disposed; - - /// - /// Instantites the class with a new WindsorContainer. - /// - public WindsorObjectBuilder() : this(new WindsorContainer()) - { - } - - /// - /// Instantiates the class saving the given container. - /// - /// - public WindsorObjectBuilder(IWindsorContainer container) - { - Container = container; - } - - /// - /// Disposes the container and all resources instantiated by the container. - /// - public void Dispose() - { - Dispose(true); - } - protected virtual void Dispose(bool disposing) - { - if (!disposing || disposed) - return; - - disposed = true; - Container.Dispose(); - GC.SuppressFinalize(this); - } - - /// - /// Returns a child instance of the container to facilitate deterministic disposal - /// of all resources built by the child container. - /// - /// - public IContainer BuildChildContainer() - { - return new WindsorObjectBuilder(Container.GetChildContainer("child")); - } - - void IContainer.Configure(Type concreteComponent, ComponentCallModelEnum callModel) - { - var handler = GetHandlerForType(concreteComponent); - if (handler == null) - { - var lifestyle = GetLifestyleTypeFrom(callModel); - - var reg = Component.For(GetAllServiceTypesFor(concreteComponent)).ImplementedBy(concreteComponent); - reg.LifeStyle.Is(lifestyle); - - Container.Kernel.Register(reg); - } - } - - void IContainer.ConfigureProperty(Type component, string property, object value) - { - var handler = GetHandlerForType(component); - if (handler == null) - throw new InvalidOperationException("Cannot configure property for a type which hadn't been configured yet. Please call 'Configure' first."); - - handler.AddCustomDependencyValue(property, value); - } - - void IContainer.RegisterSingleton(Type lookupType, object instance) - { - Container.Kernel.AddComponentInstance(Guid.NewGuid().ToString(), lookupType, instance); - } - - object IContainer.Build(Type typeToBuild) - { - return Container.Resolve(typeToBuild); - } - - IEnumerable IContainer.BuildAll(Type typeToBuild) - { - foreach (var component in Container.ResolveAll(typeToBuild)) - { - yield return component; - } - } - - void IContainer.ReleaseInstance(object instance) - { - Container.Release(instance); - } - - bool IContainer.HasComponent(Type componentType) - { - return Container.Kernel.HasComponent(componentType); - } - - private static LifestyleType GetLifestyleTypeFrom(ComponentCallModelEnum callModel) - { - switch (callModel) - { - case ComponentCallModelEnum.Singlecall: return LifestyleType.Transient; - case ComponentCallModelEnum.Singleton: return LifestyleType.Singleton; - } - - return LifestyleType.Undefined; - } - - private static IEnumerable GetAllServiceTypesFor(Type t) - { - if (t == null) - return new List(); - - var result = new List(t.GetInterfaces()) {t}; - - foreach (var interfaceType in t.GetInterfaces()) - result.AddRange(GetAllServiceTypesFor(interfaceType)); - - return result; - } - - private IHandler GetHandlerForType(Type concreteComponent) - { - return Container.Kernel.GetAssignableHandlers(typeof(object)) - .Where(h => h.ComponentModel.Implementation == concreteComponent) - .FirstOrDefault(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using Castle.MicroKernel.Releasers; +using NServiceBus.ObjectBuilder.Common; +using Castle.Windsor; +using Castle.MicroKernel; +using Castle.Core; +using Castle.MicroKernel.Registration; + +namespace NServiceBus.ObjectBuilder.CastleWindsor +{ + /// + /// Castle Windsor implementaton of IContainer. + /// + public class WindsorObjectBuilder : IContainer + { + /// + /// The container itself. + /// + public IWindsorContainer Container { get; set; } + + private bool disposed; + + /// + /// Instantites the class with a new WindsorContainer. + /// + public WindsorObjectBuilder() : this(new WindsorContainer()) + { + } + + /// + /// Instantiates the class saving the given container. + /// + /// + public WindsorObjectBuilder(IWindsorContainer container) + { + Container = container; + } + + /// + /// Disposes the container and all resources instantiated by the container. + /// + public void Dispose() + { + Dispose(true); + } + protected virtual void Dispose(bool disposing) + { + if (!disposing || disposed) + return; + + disposed = true; + Container.Dispose(); + GC.SuppressFinalize(this); + } + + /// + /// Returns a child instance of the container to facilitate deterministic disposal + /// of all resources built by the child container. + /// + /// + public IContainer BuildChildContainer() + { + return new WindsorObjectBuilder(Container.GetChildContainer("child")); + } + + void IContainer.Configure(Type concreteComponent, ComponentCallModelEnum callModel) + { + var handler = GetHandlerForType(concreteComponent); + if (handler == null) + { + var lifestyle = GetLifestyleTypeFrom(callModel); + + var reg = Component.For(GetAllServiceTypesFor(concreteComponent)).ImplementedBy(concreteComponent); + reg.LifeStyle.Is(lifestyle); + + Container.Kernel.Register(reg); + } + } + + void IContainer.ConfigureProperty(Type component, string property, object value) + { + var handler = GetHandlerForType(component); + if (handler == null) + throw new InvalidOperationException("Cannot configure property for a type which hadn't been configured yet. Please call 'Configure' first."); + + handler.AddCustomDependencyValue(property, value); + } + + void IContainer.RegisterSingleton(Type lookupType, object instance) + { + Container.Kernel.AddComponentInstance(Guid.NewGuid().ToString(), lookupType, instance); + } + + object IContainer.Build(Type typeToBuild) + { + return Container.Resolve(typeToBuild); + } + + IEnumerable IContainer.BuildAll(Type typeToBuild) + { + foreach (var component in Container.ResolveAll(typeToBuild)) + { + yield return component; + } + } + + void IContainer.ReleaseInstance(object instance) + { + Container.Release(instance); + } + + bool IContainer.HasComponent(Type componentType) + { + return Container.Kernel.HasComponent(componentType); + } + + private static LifestyleType GetLifestyleTypeFrom(ComponentCallModelEnum callModel) + { + switch (callModel) + { + case ComponentCallModelEnum.Singlecall: return LifestyleType.Transient; + case ComponentCallModelEnum.Singleton: return LifestyleType.Singleton; + } + + return LifestyleType.Undefined; + } + + private static IEnumerable GetAllServiceTypesFor(Type t) + { + if (t == null) + return new List(); + + var result = new List(t.GetInterfaces()) {t}; + + foreach (var interfaceType in t.GetInterfaces()) + result.AddRange(GetAllServiceTypesFor(interfaceType)); + + return result; + } + + private IHandler GetHandlerForType(Type concreteComponent) + { + return Container.Kernel.GetAssignableHandlers(typeof(object)) + .Where(h => h.ComponentModel.Implementation == concreteComponent) + .FirstOrDefault(); + } + } +} diff --git a/src/impl/ObjectBuilder/ObjectBuilder.Spring/ComponentConfig.cs b/src/impl/ObjectBuilder/ObjectBuilder.Spring/ComponentConfig.cs index ed4fd884902..c79d7548a48 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.Spring/ComponentConfig.cs +++ b/src/impl/ObjectBuilder/ObjectBuilder.Spring/ComponentConfig.cs @@ -1,31 +1,31 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Spring.Objects.Factory.Support; -using NServiceBus.ObjectBuilder; - -namespace NServiceBus.ObjectBuilder.Spring -{ - class ComponentConfig : IComponentConfig - { - private readonly Dictionary properties = new Dictionary(); - - public void Configure(ObjectDefinitionBuilder builder) - { - foreach (string key in this.properties.Keys) - builder.AddPropertyValue(key, properties[key]); - } - - #region IComponentConfig Members - - public IComponentConfig ConfigureProperty(string name, object value) - { - this.properties[name] = value; - - return this; - } - - #endregion - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Spring.Objects.Factory.Support; +using NServiceBus.ObjectBuilder; + +namespace NServiceBus.ObjectBuilder.Spring +{ + class ComponentConfig : IComponentConfig + { + private readonly Dictionary properties = new Dictionary(); + + public void Configure(ObjectDefinitionBuilder builder) + { + foreach (string key in this.properties.Keys) + builder.AddPropertyValue(key, properties[key]); + } + + #region IComponentConfig Members + + public IComponentConfig ConfigureProperty(string name, object value) + { + this.properties[name] = value; + + return this; + } + + #endregion + } +} diff --git a/src/impl/ObjectBuilder/ObjectBuilder.Spring/Config/ConfigureSpringBuilder.cs b/src/impl/ObjectBuilder/ObjectBuilder.Spring/Config/ConfigureSpringBuilder.cs index 50e3c3eeddd..cd4cbada3da 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.Spring/Config/ConfigureSpringBuilder.cs +++ b/src/impl/ObjectBuilder/ObjectBuilder.Spring/Config/ConfigureSpringBuilder.cs @@ -1,40 +1,40 @@ -using NServiceBus.ObjectBuilder.Spring; -using NServiceBus.ObjectBuilder.Common.Config; -using Spring.Context.Support; - -namespace NServiceBus -{ - /// - /// Contains extension methods to NServiceBus.Configure for configuring the Spring container. - /// - public static class ConfigureSpringBuilder - { - /// - /// Use the Spring Framework as the container. - /// - /// - /// - public static Configure SpringFrameworkBuilder(this Configure config) - { - ConfigureCommon.With(config, new SpringObjectBuilder()); - - return config; - } - - /// - /// Use the Spring Framework as the container with the inilialized application context - /// - /// - /// - /// - public static Configure SpringFrameworkBuilder(this Configure config,GenericApplicationContext applicationContext) - { - ConfigureCommon.With(config, new SpringObjectBuilder(applicationContext)); - - return config; - } - - - - } -} +using NServiceBus.ObjectBuilder.Spring; +using NServiceBus.ObjectBuilder.Common.Config; +using Spring.Context.Support; + +namespace NServiceBus +{ + /// + /// Contains extension methods to NServiceBus.Configure for configuring the Spring container. + /// + public static class ConfigureSpringBuilder + { + /// + /// Use the Spring Framework as the container. + /// + /// + /// + public static Configure SpringFrameworkBuilder(this Configure config) + { + ConfigureCommon.With(config, new SpringObjectBuilder()); + + return config; + } + + /// + /// Use the Spring Framework as the container with the inilialized application context + /// + /// + /// + /// + public static Configure SpringFrameworkBuilder(this Configure config,GenericApplicationContext applicationContext) + { + ConfigureCommon.With(config, new SpringObjectBuilder(applicationContext)); + + return config; + } + + + + } +} diff --git a/src/impl/ObjectBuilder/ObjectBuilder.Spring/ObjectBuilder.Spring.csproj b/src/impl/ObjectBuilder/ObjectBuilder.Spring/ObjectBuilder.Spring.csproj index 73408129126..614a02a1fcf 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.Spring/ObjectBuilder.Spring.csproj +++ b/src/impl/ObjectBuilder/ObjectBuilder.Spring/ObjectBuilder.Spring.csproj @@ -1,74 +1,74 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {734D30CF-4376-488A-A6B4-1033FED93660} - Library - Properties - NServiceBus.ObjectBuilder.Spring - NServiceBus.ObjectBuilder.Spring - v4.0 - 512 - true - ..\..\..\..\NServiceBus.snk - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.ObjectBuilder.Spring.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.ObjectBuilder.Spring.XML - - - - ..\..\..\..\lib\Common.Logging.dll - - - False - ..\..\..\..\build\output\NServiceBus.Core.dll - - - False - ..\..\..\..\lib\Spring.Core.dll - - - - 3.5 - - - - - CommonAssemblyInfo.cs - - - - - - - - - - copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {734D30CF-4376-488A-A6B4-1033FED93660} + Library + Properties + NServiceBus.ObjectBuilder.Spring + NServiceBus.ObjectBuilder.Spring + v4.0 + 512 + true + ..\..\..\..\NServiceBus.snk + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.ObjectBuilder.Spring.XML + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.ObjectBuilder.Spring.XML + + + + ..\..\..\..\lib\Common.Logging.dll + + + False + ..\..\..\..\build\output\NServiceBus.Core.dll + + + False + ..\..\..\..\lib\Spring.Core.dll + + + + 3.5 + + + + + CommonAssemblyInfo.cs + + + + + + + + + + copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\" + \ No newline at end of file diff --git a/src/impl/ObjectBuilder/ObjectBuilder.Spring/Properties/AssemblyInfo.cs b/src/impl/ObjectBuilder/ObjectBuilder.Spring/Properties/AssemblyInfo.cs index ae56f174769..966e04fe77f 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.Spring/Properties/AssemblyInfo.cs +++ b/src/impl/ObjectBuilder/ObjectBuilder.Spring/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Object Builder Spring Implementation")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Object Builder Spring Implementation")] [assembly: AssemblyDescription("Implementation of object building functionality on top of the Spring Framework.")] \ No newline at end of file diff --git a/src/impl/ObjectBuilder/ObjectBuilder.Spring/SpringObjectBuilder.cs b/src/impl/ObjectBuilder/ObjectBuilder.Spring/SpringObjectBuilder.cs index 4323c4eb732..3291909eb2c 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.Spring/SpringObjectBuilder.cs +++ b/src/impl/ObjectBuilder/ObjectBuilder.Spring/SpringObjectBuilder.cs @@ -1,152 +1,152 @@ -using System; -using System.Collections.Generic; -using Spring.Context.Support; -using Spring.Objects.Factory.Support; -using Spring.Objects.Factory.Config; -using System.Collections; -using NServiceBus.ObjectBuilder.Common; -using Spring.Context; - -namespace NServiceBus.ObjectBuilder.Spring -{ - /// - /// Implementation of IBuilderInternal using the Spring Framework container - /// - public class SpringObjectBuilder : IContainer - { - private static GenericApplicationContext context; - - /// - /// Instantiates the builder using a new GenericApplicationContext. - /// - public SpringObjectBuilder() : this(new GenericApplicationContext()) - { - } - - /// - /// Instantiates the builder using the given container. - /// - /// - public SpringObjectBuilder(GenericApplicationContext container) - { - context = container; - } - - /// - /// No resources to dispose. - /// - public void Dispose() - { - // no-op - } - - IContainer IContainer.BuildChildContainer() - { - return new SpringObjectBuilder(new GenericApplicationContext(context)); - } - - object IContainer.Build(Type typeToBuild) - { - Init(); - IDictionary dict = context.GetObjectsOfType(typeToBuild, true, false); - - var de = dict.GetEnumerator(); - - if (de.MoveNext()) - return de.Value; - - throw new ArgumentException(string.Format("{0} has not been configured. In order to avoid this exception, check the return value of the 'HasComponent' method for this type.", typeToBuild)); - } - - IEnumerable IContainer.BuildAll(Type typeToBuild) - { - Init(); - IDictionary dict = context.GetObjectsOfType(typeToBuild, true, false); - - IDictionaryEnumerator de = dict.GetEnumerator(); - while (de.MoveNext()) - yield return de.Entry.Value; - } - - void IContainer.ReleaseInstance(object instance) - { - var d = instance as IDisposable; - if (d != null) - d.Dispose(); - } - - void IContainer.Configure(Type concreteComponent, ComponentCallModelEnum callModel) - { - typeHandleLookup[concreteComponent] = callModel; - - lock (componentProperties) - if (!componentProperties.ContainsKey(concreteComponent)) - componentProperties[concreteComponent] = new ComponentConfig(); - } - - void IContainer.ConfigureProperty(Type concreteComponent, string property, object value) - { - lock (componentProperties) - { - ComponentConfig result; - componentProperties.TryGetValue(concreteComponent, out result); - - if (result == null) - throw new InvalidOperationException("Cannot configure property before the component has been configured. Please call 'Configure' first."); - - result.ConfigureProperty(property, value); - } - } - - void IContainer.RegisterSingleton(Type lookupType, object instance) - { - ((IConfigurableApplicationContext)context).ObjectFactory.RegisterSingleton(lookupType.FullName, instance); - } - - bool IContainer.HasComponent(Type componentType) - { - if (componentProperties.ContainsKey(componentType)) - return true; - - if (((IConfigurableApplicationContext) context).ObjectFactory.ContainsObjectDefinition(componentType.FullName)) - return true; - - if (((IConfigurableApplicationContext)context).ObjectFactory.ContainsSingleton(componentType.FullName)) - return true; - - foreach(var component in componentProperties.Keys) - if (componentType.IsAssignableFrom(component)) - return true; - - return false; - } - - private void Init() - { - if (initialized) - return; - - lock (componentProperties) - { - foreach (Type t in componentProperties.Keys) - { - ObjectDefinitionBuilder builder = ObjectDefinitionBuilder.RootObjectDefinition(factory, t) - .SetAutowireMode(AutoWiringMode.AutoDetect) - .SetSingleton(typeHandleLookup[t] == ComponentCallModelEnum.Singleton); - - componentProperties[t].Configure(builder); - - IObjectDefinition def = builder.ObjectDefinition; - context.RegisterObjectDefinition(t.FullName, def); - } - } - - initialized = true; - } - - private readonly Dictionary typeHandleLookup = new Dictionary(); - private readonly Dictionary componentProperties = new Dictionary(); - private bool initialized; - private DefaultObjectDefinitionFactory factory = new DefaultObjectDefinitionFactory(); - } -} +using System; +using System.Collections.Generic; +using Spring.Context.Support; +using Spring.Objects.Factory.Support; +using Spring.Objects.Factory.Config; +using System.Collections; +using NServiceBus.ObjectBuilder.Common; +using Spring.Context; + +namespace NServiceBus.ObjectBuilder.Spring +{ + /// + /// Implementation of IBuilderInternal using the Spring Framework container + /// + public class SpringObjectBuilder : IContainer + { + private static GenericApplicationContext context; + + /// + /// Instantiates the builder using a new GenericApplicationContext. + /// + public SpringObjectBuilder() : this(new GenericApplicationContext()) + { + } + + /// + /// Instantiates the builder using the given container. + /// + /// + public SpringObjectBuilder(GenericApplicationContext container) + { + context = container; + } + + /// + /// No resources to dispose. + /// + public void Dispose() + { + // no-op + } + + IContainer IContainer.BuildChildContainer() + { + return new SpringObjectBuilder(new GenericApplicationContext(context)); + } + + object IContainer.Build(Type typeToBuild) + { + Init(); + IDictionary dict = context.GetObjectsOfType(typeToBuild, true, false); + + var de = dict.GetEnumerator(); + + if (de.MoveNext()) + return de.Value; + + throw new ArgumentException(string.Format("{0} has not been configured. In order to avoid this exception, check the return value of the 'HasComponent' method for this type.", typeToBuild)); + } + + IEnumerable IContainer.BuildAll(Type typeToBuild) + { + Init(); + IDictionary dict = context.GetObjectsOfType(typeToBuild, true, false); + + IDictionaryEnumerator de = dict.GetEnumerator(); + while (de.MoveNext()) + yield return de.Entry.Value; + } + + void IContainer.ReleaseInstance(object instance) + { + var d = instance as IDisposable; + if (d != null) + d.Dispose(); + } + + void IContainer.Configure(Type concreteComponent, ComponentCallModelEnum callModel) + { + typeHandleLookup[concreteComponent] = callModel; + + lock (componentProperties) + if (!componentProperties.ContainsKey(concreteComponent)) + componentProperties[concreteComponent] = new ComponentConfig(); + } + + void IContainer.ConfigureProperty(Type concreteComponent, string property, object value) + { + lock (componentProperties) + { + ComponentConfig result; + componentProperties.TryGetValue(concreteComponent, out result); + + if (result == null) + throw new InvalidOperationException("Cannot configure property before the component has been configured. Please call 'Configure' first."); + + result.ConfigureProperty(property, value); + } + } + + void IContainer.RegisterSingleton(Type lookupType, object instance) + { + ((IConfigurableApplicationContext)context).ObjectFactory.RegisterSingleton(lookupType.FullName, instance); + } + + bool IContainer.HasComponent(Type componentType) + { + if (componentProperties.ContainsKey(componentType)) + return true; + + if (((IConfigurableApplicationContext) context).ObjectFactory.ContainsObjectDefinition(componentType.FullName)) + return true; + + if (((IConfigurableApplicationContext)context).ObjectFactory.ContainsSingleton(componentType.FullName)) + return true; + + foreach(var component in componentProperties.Keys) + if (componentType.IsAssignableFrom(component)) + return true; + + return false; + } + + private void Init() + { + if (initialized) + return; + + lock (componentProperties) + { + foreach (Type t in componentProperties.Keys) + { + ObjectDefinitionBuilder builder = ObjectDefinitionBuilder.RootObjectDefinition(factory, t) + .SetAutowireMode(AutoWiringMode.AutoDetect) + .SetSingleton(typeHandleLookup[t] == ComponentCallModelEnum.Singleton); + + componentProperties[t].Configure(builder); + + IObjectDefinition def = builder.ObjectDefinition; + context.RegisterObjectDefinition(t.FullName, def); + } + } + + initialized = true; + } + + private readonly Dictionary typeHandleLookup = new Dictionary(); + private readonly Dictionary componentProperties = new Dictionary(); + private bool initialized; + private DefaultObjectDefinitionFactory factory = new DefaultObjectDefinitionFactory(); + } +} diff --git a/src/impl/ObjectBuilder/ObjectBuilder.StructureMap/Config/ConfigureStructureMapBuilder.cs b/src/impl/ObjectBuilder/ObjectBuilder.StructureMap/Config/ConfigureStructureMapBuilder.cs index 670dd5b7d09..12ca24b1603 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.StructureMap/Config/ConfigureStructureMapBuilder.cs +++ b/src/impl/ObjectBuilder/ObjectBuilder.StructureMap/Config/ConfigureStructureMapBuilder.cs @@ -1,38 +1,38 @@ -using NServiceBus.ObjectBuilder.Common.Config; -using NServiceBus.ObjectBuilder.StructureMap; -using StructureMap; - -namespace NServiceBus -{ - /// - /// Contains extension methods to NServiceBus.Configure. - /// - public static class ConfigureStructureMapBuilder - { - /// - /// Use StructureMap as your container. - /// - /// - /// - public static Configure StructureMapBuilder(this Configure config) - { - ConfigureCommon.With(config, new StructureMapObjectBuilder()); - - return config; - } - - /// - /// Use StructureMap as your container passing in a preconfigured container to be used by nServiceBus. - /// - /// - /// - /// - public static Configure StructureMapBuilder(this Configure config, IContainer container) - { - ConfigureCommon.With(config, new StructureMapObjectBuilder(container)); - - return config; - } - } -} - +using NServiceBus.ObjectBuilder.Common.Config; +using NServiceBus.ObjectBuilder.StructureMap; +using StructureMap; + +namespace NServiceBus +{ + /// + /// Contains extension methods to NServiceBus.Configure. + /// + public static class ConfigureStructureMapBuilder + { + /// + /// Use StructureMap as your container. + /// + /// + /// + public static Configure StructureMapBuilder(this Configure config) + { + ConfigureCommon.With(config, new StructureMapObjectBuilder()); + + return config; + } + + /// + /// Use StructureMap as your container passing in a preconfigured container to be used by nServiceBus. + /// + /// + /// + /// + public static Configure StructureMapBuilder(this Configure config, IContainer container) + { + ConfigureCommon.With(config, new StructureMapObjectBuilder(container)); + + return config; + } + } +} + diff --git a/src/impl/ObjectBuilder/ObjectBuilder.StructureMap/NServiceBusThreadLocalStorageLifestyle.cs b/src/impl/ObjectBuilder/ObjectBuilder.StructureMap/NServiceBusThreadLocalStorageLifestyle.cs index f79bc12611e..1ed2fdf94c3 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.StructureMap/NServiceBusThreadLocalStorageLifestyle.cs +++ b/src/impl/ObjectBuilder/ObjectBuilder.StructureMap/NServiceBusThreadLocalStorageLifestyle.cs @@ -1,59 +1,59 @@ -using System; -using StructureMap; -using StructureMap.Pipeline; - -namespace NServiceBus.ObjectBuilder.StructureMap -{ - public class NServiceBusThreadLocalStorageLifestyle : IMessageModule,ILifecycle - { - public void EjectAll() - { - FindCache().DisposeAndClear(); - } - - public IObjectCache FindCache() - { - guaranteeHashExists(); - return cache; - } - - public void HandleBeginMessage() { } - - public void HandleEndMessage() - { - EjectAll(); - } - - public void HandleError() { } - - - public string Scope - { - get - { - return typeof (NServiceBusThreadLocalStorageLifestyle).Name; - } - } - - private void guaranteeHashExists() - { - if (cache == null) - { - lock (locker) - { - if (cache == null) - { - cache = new MainObjectCache(); - } - } - } - } - - [ThreadStatic] - private static MainObjectCache cache; - private readonly object locker = new object(); - - } - - +using System; +using StructureMap; +using StructureMap.Pipeline; + +namespace NServiceBus.ObjectBuilder.StructureMap +{ + public class NServiceBusThreadLocalStorageLifestyle : IMessageModule,ILifecycle + { + public void EjectAll() + { + FindCache().DisposeAndClear(); + } + + public IObjectCache FindCache() + { + guaranteeHashExists(); + return cache; + } + + public void HandleBeginMessage() { } + + public void HandleEndMessage() + { + EjectAll(); + } + + public void HandleError() { } + + + public string Scope + { + get + { + return typeof (NServiceBusThreadLocalStorageLifestyle).Name; + } + } + + private void guaranteeHashExists() + { + if (cache == null) + { + lock (locker) + { + if (cache == null) + { + cache = new MainObjectCache(); + } + } + } + } + + [ThreadStatic] + private static MainObjectCache cache; + private readonly object locker = new object(); + + } + + } \ No newline at end of file diff --git a/src/impl/ObjectBuilder/ObjectBuilder.StructureMap/ObjectBuilder.StructureMap.csproj b/src/impl/ObjectBuilder/ObjectBuilder.StructureMap/ObjectBuilder.StructureMap.csproj index ced7a71e935..653fada0710 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.StructureMap/ObjectBuilder.StructureMap.csproj +++ b/src/impl/ObjectBuilder/ObjectBuilder.StructureMap/ObjectBuilder.StructureMap.csproj @@ -1,113 +1,113 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {C05E5B87-EB74-4A3F-B4FC-AFDD28570850} - Library - Properties - NServiceBus.ObjectBuilder.StructureMap - NServiceBus.ObjectBuilder.StructureMap - v4.0 - 512 - true - ..\..\..\..\NServiceBus.snk - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\..\lib\log4net.dll - False - - - False - ..\..\..\..\build\output\NServiceBus.dll - - - False - ..\..\..\..\build\output\NServiceBus.Core.dll - - - False - ..\..\..\..\lib\structuremap\StructureMap.dll - - - - 3.5 - - - - - CommonAssemblyInfo.cs - - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\containers\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {C05E5B87-EB74-4A3F-B4FC-AFDD28570850} + Library + Properties + NServiceBus.ObjectBuilder.StructureMap + NServiceBus.ObjectBuilder.StructureMap + v4.0 + 512 + true + ..\..\..\..\NServiceBus.snk + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\..\lib\log4net.dll + False + + + False + ..\..\..\..\build\output\NServiceBus.dll + + + False + ..\..\..\..\build\output\NServiceBus.Core.dll + + + False + ..\..\..\..\lib\structuremap\StructureMap.dll + + + + 3.5 + + + + + CommonAssemblyInfo.cs + + + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\containers\" + \ No newline at end of file diff --git a/src/impl/ObjectBuilder/ObjectBuilder.StructureMap/Properties/AssemblyInfo.cs b/src/impl/ObjectBuilder/ObjectBuilder.StructureMap/Properties/AssemblyInfo.cs index 7e520a496ac..e39bcfa15cf 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.StructureMap/Properties/AssemblyInfo.cs +++ b/src/impl/ObjectBuilder/ObjectBuilder.StructureMap/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Container StructureMap Implementation")] -[assembly: AssemblyDescription("Implementation of container functionality on top of StructureMap.")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Container StructureMap Implementation")] +[assembly: AssemblyDescription("Implementation of container functionality on top of StructureMap.")] diff --git a/src/impl/ObjectBuilder/ObjectBuilder.StructureMap/StructureMapExtensions.cs b/src/impl/ObjectBuilder/ObjectBuilder.StructureMap/StructureMapExtensions.cs index a37ddbafd50..6e409d006bc 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.StructureMap/StructureMapExtensions.cs +++ b/src/impl/ObjectBuilder/ObjectBuilder.StructureMap/StructureMapExtensions.cs @@ -1,57 +1,57 @@ -using System; -using StructureMap; -using StructureMap.Graph; -using StructureMap.Pipeline; - -namespace NServiceBus.ObjectBuilder.StructureMap -{ - /// - /// Extensions to the structuremap api - /// - public static class StructureMapExtensions - { - /// - /// Registers the given interface and redirects to the given pluginType when the interface is requested - /// - /// - /// - /// - /// - public static void RegisterAdditionalInterfaceForPluginType(this ConfigurationExpression configuration, Type implementedInterface, Type pluginType, ILifecycle lifecycle) - { - var type = typeof(Registration<,>).MakeGenericType(implementedInterface, pluginType); - - var registration = (IRegistration)Activator.CreateInstance(type); - - registration.RegisterServiceInterface(configuration,lifecycle); - } - - /// - /// Tells structurmap to do setter injection for the given type - /// - /// - /// - public static void EnableSetterInjectionFor(this ConfigurationExpression configuration, Type pluginType) - { - PluginCache.AddFilledType(pluginType); - } - - // The inner type and interface is just a little trick to - // grease the generic wheels - interface IRegistration - { - void RegisterServiceInterface(ConfigurationExpression config, ILifecycle callModel); - } - - class Registration : IRegistration where TImplementor : TInterface - { - public void RegisterServiceInterface(ConfigurationExpression config, ILifecycle lifecycle) - { - config.For() - .LifecycleIs(lifecycle) - .Use(ctx => ctx.GetInstance()); - } - } - - } +using System; +using StructureMap; +using StructureMap.Graph; +using StructureMap.Pipeline; + +namespace NServiceBus.ObjectBuilder.StructureMap +{ + /// + /// Extensions to the structuremap api + /// + public static class StructureMapExtensions + { + /// + /// Registers the given interface and redirects to the given pluginType when the interface is requested + /// + /// + /// + /// + /// + public static void RegisterAdditionalInterfaceForPluginType(this ConfigurationExpression configuration, Type implementedInterface, Type pluginType, ILifecycle lifecycle) + { + var type = typeof(Registration<,>).MakeGenericType(implementedInterface, pluginType); + + var registration = (IRegistration)Activator.CreateInstance(type); + + registration.RegisterServiceInterface(configuration,lifecycle); + } + + /// + /// Tells structurmap to do setter injection for the given type + /// + /// + /// + public static void EnableSetterInjectionFor(this ConfigurationExpression configuration, Type pluginType) + { + PluginCache.AddFilledType(pluginType); + } + + // The inner type and interface is just a little trick to + // grease the generic wheels + interface IRegistration + { + void RegisterServiceInterface(ConfigurationExpression config, ILifecycle callModel); + } + + class Registration : IRegistration where TImplementor : TInterface + { + public void RegisterServiceInterface(ConfigurationExpression config, ILifecycle lifecycle) + { + config.For() + .LifecycleIs(lifecycle) + .Use(ctx => ctx.GetInstance()); + } + } + + } } \ No newline at end of file diff --git a/src/impl/ObjectBuilder/ObjectBuilder.StructureMap/StructureMapObjectBuilder.cs b/src/impl/ObjectBuilder/ObjectBuilder.StructureMap/StructureMapObjectBuilder.cs index 7964945f996..27863bb0a91 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.StructureMap/StructureMapObjectBuilder.cs +++ b/src/impl/ObjectBuilder/ObjectBuilder.StructureMap/StructureMapObjectBuilder.cs @@ -1,170 +1,170 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using StructureMap; -using StructureMap.Graph; -using StructureMap.Pipeline; -using StructureMap.TypeRules; -using IContainer = StructureMap.IContainer; - -namespace NServiceBus.ObjectBuilder.StructureMap -{ - /// - /// ObjectBuilder implementation for the StructureMap IoC-Container - /// - public class StructureMapObjectBuilder : Common.IContainer - { - private readonly IContainer container; - private readonly IDictionary configuredInstances = new Dictionary(); - private bool disposed; - - public StructureMapObjectBuilder() - { - container = ObjectFactory.GetInstance(); - } - - public StructureMapObjectBuilder(IContainer container) - { - this.container = container; - } - - /// - /// Disposes the container and all resources instantiated by the container. - /// - public void Dispose() - { - Dispose(true); - } - protected virtual void Dispose(bool disposing) - { - if (!disposing || disposed) - return; - - disposed = true; - container.Dispose(); - GC.SuppressFinalize(this); - } - - /// - /// Returns a child instance of the container to facilitate deterministic disposal - /// of all resources built by the child container. - /// - /// - public Common.IContainer BuildChildContainer() - { - return new StructureMapObjectBuilder(container.GetNestedContainer()); - } - - object Common.IContainer.Build(Type typeToBuild) - { - if(container.Model.PluginTypes.Any(t=>t.PluginType == typeToBuild)) - return container.GetInstance(typeToBuild); - - throw new ArgumentException(typeToBuild + " is not registered in the container"); - } - - IEnumerable Common.IContainer.BuildAll(Type typeToBuild) - { - return container.GetAllInstances(typeToBuild).Cast(); - } - - void Common.IContainer.ReleaseInstance(object instance) - { - //no-op since structuremap doesn't have a release feature - } - - void Common.IContainer.ConfigureProperty(Type component, string property, object value) - { - if (value == null) - { - return; - } - - lock (configuredInstances) - { - ConfiguredInstance configuredInstance; - configuredInstances.TryGetValue(component, out configuredInstance); - - if (configuredInstance == null) - throw new InvalidOperationException("Cannot configure property before the component has been configured. Please call 'Configure' first."); - - if (value.GetType().IsSimple()) - configuredInstance.WithProperty(property).EqualTo(value); - else - configuredInstance.Child(property).Is(value); - } - } - - void Common.IContainer.Configure(Type component, ComponentCallModelEnum callModel) - { - lock (configuredInstances) - { - if(configuredInstances.ContainsKey(component)) - return; - } - - var lifecycle = GetLifecycleFrom(callModel); - - ConfiguredInstance configuredInstance = null; - - container.Configure(x => - { - configuredInstance = x.For(component) - .LifecycleIs(lifecycle) - .Use(component); - - foreach (var implementedInterface in GetAllInterfacesImplementedBy(component)) - { - x.RegisterAdditionalInterfaceForPluginType(implementedInterface, component,lifecycle); - - x.EnableSetterInjectionFor(implementedInterface); - } - }); - - lock (configuredInstances) - configuredInstances.Add(component, configuredInstance); - } - - void Common.IContainer.RegisterSingleton(Type lookupType, object instance) - { - - container.Inject(lookupType, instance); - PluginCache.AddFilledType(lookupType); - } - - bool Common.IContainer.HasComponent(Type componentType) - { - return container.Model.PluginTypes.Any(t => t.PluginType == componentType); - } - - private static ILifecycle GetLifecycleFrom(ComponentCallModelEnum callModel) - { - switch (callModel) - { - case ComponentCallModelEnum.Singlecall: return null;//null means the default lifecycle which is transient - case ComponentCallModelEnum.Singleton: return new SingletonLifecycle(); - } - - throw new ArgumentException("Unhandled call model:" + callModel); - } - - private static IEnumerable GetAllInterfacesImplementedBy(Type t) - { - var result = new List(); - - if (t == null) - return result; - - var interfaces = t.GetInterfaces().Where(x => ( - !x.IsGenericType - )); - result.AddRange(interfaces); - - foreach (Type interfaceType in interfaces) - result.AddRange(GetAllInterfacesImplementedBy(interfaceType)); - - return result; - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using StructureMap; +using StructureMap.Graph; +using StructureMap.Pipeline; +using StructureMap.TypeRules; +using IContainer = StructureMap.IContainer; + +namespace NServiceBus.ObjectBuilder.StructureMap +{ + /// + /// ObjectBuilder implementation for the StructureMap IoC-Container + /// + public class StructureMapObjectBuilder : Common.IContainer + { + private readonly IContainer container; + private readonly IDictionary configuredInstances = new Dictionary(); + private bool disposed; + + public StructureMapObjectBuilder() + { + container = ObjectFactory.GetInstance(); + } + + public StructureMapObjectBuilder(IContainer container) + { + this.container = container; + } + + /// + /// Disposes the container and all resources instantiated by the container. + /// + public void Dispose() + { + Dispose(true); + } + protected virtual void Dispose(bool disposing) + { + if (!disposing || disposed) + return; + + disposed = true; + container.Dispose(); + GC.SuppressFinalize(this); + } + + /// + /// Returns a child instance of the container to facilitate deterministic disposal + /// of all resources built by the child container. + /// + /// + public Common.IContainer BuildChildContainer() + { + return new StructureMapObjectBuilder(container.GetNestedContainer()); + } + + object Common.IContainer.Build(Type typeToBuild) + { + if(container.Model.PluginTypes.Any(t=>t.PluginType == typeToBuild)) + return container.GetInstance(typeToBuild); + + throw new ArgumentException(typeToBuild + " is not registered in the container"); + } + + IEnumerable Common.IContainer.BuildAll(Type typeToBuild) + { + return container.GetAllInstances(typeToBuild).Cast(); + } + + void Common.IContainer.ReleaseInstance(object instance) + { + //no-op since structuremap doesn't have a release feature + } + + void Common.IContainer.ConfigureProperty(Type component, string property, object value) + { + if (value == null) + { + return; + } + + lock (configuredInstances) + { + ConfiguredInstance configuredInstance; + configuredInstances.TryGetValue(component, out configuredInstance); + + if (configuredInstance == null) + throw new InvalidOperationException("Cannot configure property before the component has been configured. Please call 'Configure' first."); + + if (value.GetType().IsSimple()) + configuredInstance.WithProperty(property).EqualTo(value); + else + configuredInstance.Child(property).Is(value); + } + } + + void Common.IContainer.Configure(Type component, ComponentCallModelEnum callModel) + { + lock (configuredInstances) + { + if(configuredInstances.ContainsKey(component)) + return; + } + + var lifecycle = GetLifecycleFrom(callModel); + + ConfiguredInstance configuredInstance = null; + + container.Configure(x => + { + configuredInstance = x.For(component) + .LifecycleIs(lifecycle) + .Use(component); + + foreach (var implementedInterface in GetAllInterfacesImplementedBy(component)) + { + x.RegisterAdditionalInterfaceForPluginType(implementedInterface, component,lifecycle); + + x.EnableSetterInjectionFor(implementedInterface); + } + }); + + lock (configuredInstances) + configuredInstances.Add(component, configuredInstance); + } + + void Common.IContainer.RegisterSingleton(Type lookupType, object instance) + { + + container.Inject(lookupType, instance); + PluginCache.AddFilledType(lookupType); + } + + bool Common.IContainer.HasComponent(Type componentType) + { + return container.Model.PluginTypes.Any(t => t.PluginType == componentType); + } + + private static ILifecycle GetLifecycleFrom(ComponentCallModelEnum callModel) + { + switch (callModel) + { + case ComponentCallModelEnum.Singlecall: return null;//null means the default lifecycle which is transient + case ComponentCallModelEnum.Singleton: return new SingletonLifecycle(); + } + + throw new ArgumentException("Unhandled call model:" + callModel); + } + + private static IEnumerable GetAllInterfacesImplementedBy(Type t) + { + var result = new List(); + + if (t == null) + return result; + + var interfaces = t.GetInterfaces().Where(x => ( + !x.IsGenericType + )); + result.AddRange(interfaces); + + foreach (Type interfaceType in interfaces) + result.AddRange(GetAllInterfacesImplementedBy(interfaceType)); + + return result; + } + + } +} diff --git a/src/impl/ObjectBuilder/ObjectBuilder.Tests/App.config b/src/impl/ObjectBuilder/ObjectBuilder.Tests/App.config index 433148b4468..bff0fc4e768 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.Tests/App.config +++ b/src/impl/ObjectBuilder/ObjectBuilder.Tests/App.config @@ -1,14 +1,14 @@ - - - - - - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/src/impl/ObjectBuilder/ObjectBuilder.Tests/BuilderFixture.cs b/src/impl/ObjectBuilder/ObjectBuilder.Tests/BuilderFixture.cs index 243b89c182b..9389d4f9d3d 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.Tests/BuilderFixture.cs +++ b/src/impl/ObjectBuilder/ObjectBuilder.Tests/BuilderFixture.cs @@ -1,67 +1,67 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using NServiceBus.ObjectBuilder.Autofac; -using NServiceBus.ObjectBuilder.CastleWindsor; -using NServiceBus.ObjectBuilder.Spring; -using NServiceBus.ObjectBuilder.StructureMap; -using NServiceBus.ObjectBuilder.Unity; -using NUnit.Framework; -using StructureMap; -using IContainer=NServiceBus.ObjectBuilder.Common.IContainer; - -namespace ObjectBuilder.Tests -{ - public class BuilderFixture - { - protected virtual Action InitializeBuilder() - { - //no-op - return (c) => { }; - } - - private IList objectBuilders; - - protected void VerifyForAllBuilders(Action assertion,params Type[] containersToIgnore) - { - bool failed = false; - - foreach (var builder in objectBuilders.Where(b=>!containersToIgnore.Contains(b.GetType()))) - { - try - { - assertion(builder); - } - catch (Exception ex) - { - Trace.WriteLine("Test failed for: " + builder.GetType().Name); - Trace.WriteLine(ex); - failed = true; - } - } - Assert.False(failed,"One or more of the builers failed"); - } - - [SetUp] - public void SetUp() - { - objectBuilders = new List - { - //add all supported builders here - new StructureMapObjectBuilder(new Container()), - new AutofacObjectBuilder(), - new WindsorObjectBuilder(), - new UnityObjectBuilder(), - new SpringObjectBuilder() - }; - - var inilialize = InitializeBuilder(); - - foreach (var builder in objectBuilders) - { - inilialize(builder); - } - } - } +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using NServiceBus.ObjectBuilder.Autofac; +using NServiceBus.ObjectBuilder.CastleWindsor; +using NServiceBus.ObjectBuilder.Spring; +using NServiceBus.ObjectBuilder.StructureMap; +using NServiceBus.ObjectBuilder.Unity; +using NUnit.Framework; +using StructureMap; +using IContainer=NServiceBus.ObjectBuilder.Common.IContainer; + +namespace ObjectBuilder.Tests +{ + public class BuilderFixture + { + protected virtual Action InitializeBuilder() + { + //no-op + return (c) => { }; + } + + private IList objectBuilders; + + protected void VerifyForAllBuilders(Action assertion,params Type[] containersToIgnore) + { + bool failed = false; + + foreach (var builder in objectBuilders.Where(b=>!containersToIgnore.Contains(b.GetType()))) + { + try + { + assertion(builder); + } + catch (Exception ex) + { + Trace.WriteLine("Test failed for: " + builder.GetType().Name); + Trace.WriteLine(ex); + failed = true; + } + } + Assert.False(failed,"One or more of the builers failed"); + } + + [SetUp] + public void SetUp() + { + objectBuilders = new List + { + //add all supported builders here + new StructureMapObjectBuilder(new Container()), + new AutofacObjectBuilder(), + new WindsorObjectBuilder(), + new UnityObjectBuilder(), + new SpringObjectBuilder() + }; + + var inilialize = InitializeBuilder(); + + foreach (var builder in objectBuilders) + { + inilialize(builder); + } + } + } } \ No newline at end of file diff --git a/src/impl/ObjectBuilder/ObjectBuilder.Tests/ObjectBuilder.Tests.csproj b/src/impl/ObjectBuilder/ObjectBuilder.Tests/ObjectBuilder.Tests.csproj index eeb7b9639b3..90c2e29960d 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.Tests/ObjectBuilder.Tests.csproj +++ b/src/impl/ObjectBuilder/ObjectBuilder.Tests/ObjectBuilder.Tests.csproj @@ -1,140 +1,140 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {0A282BF4-0957-4074-8D5E-C2FB8634A3AA} - Library - Properties - ObjectBuilder.Tests - ObjectBuilder.Tests - v4.0 - 512 - true - ..\..\..\..\NServiceBus.snk - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - DEBUG;TRACE - prompt - 4 - - - - False - ..\..\..\..\lib\Autofac.dll - - - False - ..\..\..\..\lib\Castle.Core.dll - - - False - ..\..\..\..\lib\Castle.MicroKernel.dll - - - False - ..\..\..\..\lib\Castle.Windsor.dll - - - ..\..\..\..\lib\Common.Logging.dll - - - ..\..\..\..\lib\Common.Logging.Log4Net.dll - - - False - ..\..\..\..\lib\log4net.dll - - - False - ..\..\..\..\lib\Microsoft.Practices.ObjectBuilder2.dll - - - False - ..\..\..\..\lib\Microsoft.Practices.Unity.dll - - - False - ..\..\..\..\build\output\NServiceBus.dll - - - False - ..\..\..\..\build\output\NServiceBus.Core.dll - - - False - ..\..\..\..\tools\NUnit\nunit.framework.dll - - - False - ..\..\..\..\lib\Spring.Core.dll - - - False - ..\..\..\..\lib\structuremap\StructureMap.dll - - - - 3.5 - - - - - CommonAssemblyInfo.cs - - - - - - - - - - - - {73EC4EBE-826D-4A0A-8837-51D3458FC2A8} - ObjectBuilder.Autofac - - - {9A9A0BD5-AC37-4B90-B90F-FD1C1395FEBD} - ObjectBuilder.CastleWindsor - - - {734D30CF-4376-488A-A6B4-1033FED93660} - ObjectBuilder.Spring - - - {C05E5B87-EB74-4A3F-B4FC-AFDD28570850} - ObjectBuilder.StructureMap - - - {343B2E7A-E228-4B31-ABB5-F5437B2E7A4C} - ObjectBuilder.Unity - - - - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {0A282BF4-0957-4074-8D5E-C2FB8634A3AA} + Library + Properties + ObjectBuilder.Tests + ObjectBuilder.Tests + v4.0 + 512 + true + ..\..\..\..\NServiceBus.snk + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + DEBUG;TRACE + prompt + 4 + + + + False + ..\..\..\..\lib\Autofac.dll + + + False + ..\..\..\..\lib\Castle.Core.dll + + + False + ..\..\..\..\lib\Castle.MicroKernel.dll + + + False + ..\..\..\..\lib\Castle.Windsor.dll + + + ..\..\..\..\lib\Common.Logging.dll + + + ..\..\..\..\lib\Common.Logging.Log4Net.dll + + + False + ..\..\..\..\lib\log4net.dll + + + False + ..\..\..\..\lib\Microsoft.Practices.ObjectBuilder2.dll + + + False + ..\..\..\..\lib\Microsoft.Practices.Unity.dll + + + False + ..\..\..\..\build\output\NServiceBus.dll + + + False + ..\..\..\..\build\output\NServiceBus.Core.dll + + + False + ..\..\..\..\tools\NUnit\nunit.framework.dll + + + False + ..\..\..\..\lib\Spring.Core.dll + + + False + ..\..\..\..\lib\structuremap\StructureMap.dll + + + + 3.5 + + + + + CommonAssemblyInfo.cs + + + + + + + + + + + + {73EC4EBE-826D-4A0A-8837-51D3458FC2A8} + ObjectBuilder.Autofac + + + {9A9A0BD5-AC37-4B90-B90F-FD1C1395FEBD} + ObjectBuilder.CastleWindsor + + + {734D30CF-4376-488A-A6B4-1033FED93660} + ObjectBuilder.Spring + + + {C05E5B87-EB74-4A3F-B4FC-AFDD28570850} + ObjectBuilder.StructureMap + + + {343B2E7A-E228-4B31-ABB5-F5437B2E7A4C} + ObjectBuilder.Unity + + + + + + + \ No newline at end of file diff --git a/src/impl/ObjectBuilder/ObjectBuilder.Tests/Properties/AssemblyInfo.cs b/src/impl/ObjectBuilder/ObjectBuilder.Tests/Properties/AssemblyInfo.cs index 90652568ac4..1f0f98be623 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.Tests/Properties/AssemblyInfo.cs +++ b/src/impl/ObjectBuilder/ObjectBuilder.Tests/Properties/AssemblyInfo.cs @@ -1,2 +1,2 @@ -using System.Reflection; +using System.Reflection; [assembly: AssemblyTitle("ObjectBuilder.Tests")] \ No newline at end of file diff --git a/src/impl/ObjectBuilder/ObjectBuilder.Tests/StructureMapSpecific/When_using_nested_containers.cs b/src/impl/ObjectBuilder/ObjectBuilder.Tests/StructureMapSpecific/When_using_nested_containers.cs index 7aa8e4ea549..30ee596884f 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.Tests/StructureMapSpecific/When_using_nested_containers.cs +++ b/src/impl/ObjectBuilder/ObjectBuilder.Tests/StructureMapSpecific/When_using_nested_containers.cs @@ -1,63 +1,63 @@ -using System; -using NServiceBus.ObjectBuilder; -using NServiceBus.ObjectBuilder.Common; -using NServiceBus.ObjectBuilder.StructureMap; -using NUnit.Framework; - -namespace ObjectBuilder.Tests.StructureMapSpecific -{ - [TestFixture] - public class When_using_nested_containers - { - [Test] - public void Singleton_components_should_have_their_interfaces_registered_to_avoid_beeing_disposed() - { - IContainer builder = new StructureMapObjectBuilder(); - - builder.Configure(typeof(SingletonComponent), ComponentCallModelEnum.Singleton); - - using (var nestedContainer = builder.BuildChildContainer()) - nestedContainer.Build(typeof(ISingletonComponent)); - - Assert.False(SingletonComponent.DisposeCalled); - - } - - [Test] - public void Single_call_components_should_be_disposed_when_the_child_container_is_disposed() - { - IContainer builder = new StructureMapObjectBuilder(); - - builder.Configure(typeof(SinglecallComponent), ComponentCallModelEnum.Singlecall); - - using (var nestedContainer = builder.BuildChildContainer()) - nestedContainer.Build(typeof(SinglecallComponent)); - - Assert.True(SinglecallComponent.DisposeCalled); - } - } - public class SinglecallComponent : IDisposable - { - public static bool DisposeCalled; - - public void Dispose() - { - DisposeCalled = true; - } - } - - public class SingletonComponent : ISingletonComponent, IDisposable - { - public static bool DisposeCalled; - - public void Dispose() - { - DisposeCalled = true; - } - } - - public interface ISingletonComponent - { - } - +using System; +using NServiceBus.ObjectBuilder; +using NServiceBus.ObjectBuilder.Common; +using NServiceBus.ObjectBuilder.StructureMap; +using NUnit.Framework; + +namespace ObjectBuilder.Tests.StructureMapSpecific +{ + [TestFixture] + public class When_using_nested_containers + { + [Test] + public void Singleton_components_should_have_their_interfaces_registered_to_avoid_beeing_disposed() + { + IContainer builder = new StructureMapObjectBuilder(); + + builder.Configure(typeof(SingletonComponent), ComponentCallModelEnum.Singleton); + + using (var nestedContainer = builder.BuildChildContainer()) + nestedContainer.Build(typeof(ISingletonComponent)); + + Assert.False(SingletonComponent.DisposeCalled); + + } + + [Test] + public void Single_call_components_should_be_disposed_when_the_child_container_is_disposed() + { + IContainer builder = new StructureMapObjectBuilder(); + + builder.Configure(typeof(SinglecallComponent), ComponentCallModelEnum.Singlecall); + + using (var nestedContainer = builder.BuildChildContainer()) + nestedContainer.Build(typeof(SinglecallComponent)); + + Assert.True(SinglecallComponent.DisposeCalled); + } + } + public class SinglecallComponent : IDisposable + { + public static bool DisposeCalled; + + public void Dispose() + { + DisposeCalled = true; + } + } + + public class SingletonComponent : ISingletonComponent, IDisposable + { + public static bool DisposeCalled; + + public void Dispose() + { + DisposeCalled = true; + } + } + + public interface ISingletonComponent + { + } + } \ No newline at end of file diff --git a/src/impl/ObjectBuilder/ObjectBuilder.Tests/StructureMapSpecific/When_using_the_nservicebus_specific_thread_static_lifecycle.cs b/src/impl/ObjectBuilder/ObjectBuilder.Tests/StructureMapSpecific/When_using_the_nservicebus_specific_thread_static_lifecycle.cs index ee97073cd8f..1ebeef87c8a 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.Tests/StructureMapSpecific/When_using_the_nservicebus_specific_thread_static_lifecycle.cs +++ b/src/impl/ObjectBuilder/ObjectBuilder.Tests/StructureMapSpecific/When_using_the_nservicebus_specific_thread_static_lifecycle.cs @@ -1,33 +1,33 @@ -using NServiceBus.ObjectBuilder.StructureMap; -using NUnit.Framework; -using StructureMap; - -namespace ObjectBuilder.Tests.StructureMapSpecific -{ - [TestFixture] - public class When_using_the_nservicebus_specific_thread_static_lifecycle - { - [Test] - public void The_cache_should_be_cleared_after_each_message_is_processed() - { - var lifecycle = new NServiceBusThreadLocalStorageLifestyle(); - - var container = new Container(x => x.For() - .LifecycleIs(lifecycle)); - - var objectCachedAsThreadStatic = container.GetInstance(); - - Assert.AreEqual(objectCachedAsThreadStatic,container.GetInstance()); - - lifecycle.HandleEndMessage(); - - Assert.AreNotEqual(objectCachedAsThreadStatic,container.GetInstance()); - - } - } - - public class SomeClass - { - public int SomeProperty { get; set; } - } +using NServiceBus.ObjectBuilder.StructureMap; +using NUnit.Framework; +using StructureMap; + +namespace ObjectBuilder.Tests.StructureMapSpecific +{ + [TestFixture] + public class When_using_the_nservicebus_specific_thread_static_lifecycle + { + [Test] + public void The_cache_should_be_cleared_after_each_message_is_processed() + { + var lifecycle = new NServiceBusThreadLocalStorageLifestyle(); + + var container = new Container(x => x.For() + .LifecycleIs(lifecycle)); + + var objectCachedAsThreadStatic = container.GetInstance(); + + Assert.AreEqual(objectCachedAsThreadStatic,container.GetInstance()); + + lifecycle.HandleEndMessage(); + + Assert.AreNotEqual(objectCachedAsThreadStatic,container.GetInstance()); + + } + } + + public class SomeClass + { + public int SomeProperty { get; set; } + } } \ No newline at end of file diff --git a/src/impl/ObjectBuilder/ObjectBuilder.Tests/When_building_components.cs b/src/impl/ObjectBuilder/ObjectBuilder.Tests/When_building_components.cs index 84f93b801e3..d6d7352156d 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.Tests/When_building_components.cs +++ b/src/impl/ObjectBuilder/ObjectBuilder.Tests/When_building_components.cs @@ -1,59 +1,59 @@ -using System; -using NServiceBus.ObjectBuilder; -using NServiceBus.ObjectBuilder.Common; -using NUnit.Framework; - -namespace ObjectBuilder.Tests -{ - [TestFixture] - public class When_building_components:BuilderFixture - { - [Test] - public void Singleton_components_should_yield_the_same_instance() - { - VerifyForAllBuilders((builder) => - Assert.AreEqual(builder.Build(typeof(SingletonComponent)),builder.Build(typeof(SingletonComponent)))); - } - - [Test] - public void Singlecall_components_should_yield_unique_instances() - { - VerifyForAllBuilders((builder) => - Assert.AreNotEqual(builder.Build(typeof(SinglecallComponent)),builder.Build(typeof(SinglecallComponent)))); - } - - - - [Test] - public void Reguesting_an_unregistered_component_should_throw() - { - - VerifyForAllBuilders((builder)=> - Assert.That(() => builder.Build(typeof (UnregisteredComponent)), - Throws.Exception)); - } - - - protected override Action InitializeBuilder() - { - return (config) => - { - config.Configure(typeof(SingletonComponent),ComponentCallModelEnum.Singleton); - config.Configure(typeof(SinglecallComponent), ComponentCallModelEnum.Singlecall); - }; - } - - public class SingletonComponent - { - } - public class SinglecallComponent - { - } - public class UnregisteredComponent - { - } - } - - - +using System; +using NServiceBus.ObjectBuilder; +using NServiceBus.ObjectBuilder.Common; +using NUnit.Framework; + +namespace ObjectBuilder.Tests +{ + [TestFixture] + public class When_building_components:BuilderFixture + { + [Test] + public void Singleton_components_should_yield_the_same_instance() + { + VerifyForAllBuilders((builder) => + Assert.AreEqual(builder.Build(typeof(SingletonComponent)),builder.Build(typeof(SingletonComponent)))); + } + + [Test] + public void Singlecall_components_should_yield_unique_instances() + { + VerifyForAllBuilders((builder) => + Assert.AreNotEqual(builder.Build(typeof(SinglecallComponent)),builder.Build(typeof(SinglecallComponent)))); + } + + + + [Test] + public void Reguesting_an_unregistered_component_should_throw() + { + + VerifyForAllBuilders((builder)=> + Assert.That(() => builder.Build(typeof (UnregisteredComponent)), + Throws.Exception)); + } + + + protected override Action InitializeBuilder() + { + return (config) => + { + config.Configure(typeof(SingletonComponent),ComponentCallModelEnum.Singleton); + config.Configure(typeof(SinglecallComponent), ComponentCallModelEnum.Singlecall); + }; + } + + public class SingletonComponent + { + } + public class SinglecallComponent + { + } + public class UnregisteredComponent + { + } + } + + + } \ No newline at end of file diff --git a/src/impl/ObjectBuilder/ObjectBuilder.Tests/When_querying_for_registered_components.cs b/src/impl/ObjectBuilder/ObjectBuilder.Tests/When_querying_for_registered_components.cs index 61446fc0177..5b9c514e15d 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.Tests/When_querying_for_registered_components.cs +++ b/src/impl/ObjectBuilder/ObjectBuilder.Tests/When_querying_for_registered_components.cs @@ -1,55 +1,55 @@ -using System; -using NServiceBus.ObjectBuilder; -using NServiceBus.ObjectBuilder.Common; -using NUnit.Framework; - -namespace ObjectBuilder.Tests -{ - [TestFixture] - public class When_querying_for_registered_components : BuilderFixture - { - [Test] - public void Existing_components_should_return_true() - { - VerifyForAllBuilders(builder => - Assert.True(builder.HasComponent(typeof(ExistingComponent)))); - } - [Test] - public void Non_existing_components_should_return_false() - { - VerifyForAllBuilders(builder => - Assert.False(builder.HasComponent(typeof(NonExistingComponent)))); - } - - [Test] - public void Builders_should_not_determine_existence_by_building_components() - { - VerifyForAllBuilders(builder => - Assert.True(builder.HasComponent(typeof(ExistingComponentWithUnsatisfiedDep)))); - } - - protected override Action InitializeBuilder() - { - return (c) => - { - c.Configure(typeof (ExistingComponent), ComponentCallModelEnum.Singlecall); - c.Configure(typeof (ExistingComponentWithUnsatisfiedDep), ComponentCallModelEnum.Singlecall); - }; - } - public class NonExistingComponent - { - } - - public class ExistingComponent - { - } - public class ExistingComponentWithUnsatisfiedDep - { - public ExistingComponentWithUnsatisfiedDep(NonExistingComponent dependency) - { - - } - } - } - +using System; +using NServiceBus.ObjectBuilder; +using NServiceBus.ObjectBuilder.Common; +using NUnit.Framework; + +namespace ObjectBuilder.Tests +{ + [TestFixture] + public class When_querying_for_registered_components : BuilderFixture + { + [Test] + public void Existing_components_should_return_true() + { + VerifyForAllBuilders(builder => + Assert.True(builder.HasComponent(typeof(ExistingComponent)))); + } + [Test] + public void Non_existing_components_should_return_false() + { + VerifyForAllBuilders(builder => + Assert.False(builder.HasComponent(typeof(NonExistingComponent)))); + } + + [Test] + public void Builders_should_not_determine_existence_by_building_components() + { + VerifyForAllBuilders(builder => + Assert.True(builder.HasComponent(typeof(ExistingComponentWithUnsatisfiedDep)))); + } + + protected override Action InitializeBuilder() + { + return (c) => + { + c.Configure(typeof (ExistingComponent), ComponentCallModelEnum.Singlecall); + c.Configure(typeof (ExistingComponentWithUnsatisfiedDep), ComponentCallModelEnum.Singlecall); + }; + } + public class NonExistingComponent + { + } + + public class ExistingComponent + { + } + public class ExistingComponentWithUnsatisfiedDep + { + public ExistingComponentWithUnsatisfiedDep(NonExistingComponent dependency) + { + + } + } + } + } \ No newline at end of file diff --git a/src/impl/ObjectBuilder/ObjectBuilder.Tests/When_registering_components.cs b/src/impl/ObjectBuilder/ObjectBuilder.Tests/When_registering_components.cs index 93f898b88a0..71bc24cd2cd 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.Tests/When_registering_components.cs +++ b/src/impl/ObjectBuilder/ObjectBuilder.Tests/When_registering_components.cs @@ -1,81 +1,81 @@ -using System.Linq; -using NServiceBus.ObjectBuilder; -using NUnit.Framework; - -namespace ObjectBuilder.Tests -{ - [TestFixture] - public class When_registering_components : BuilderFixture - { - [Test] - public void Multiple_registrations_of_the_same_component_should_be_allowed() - { - VerifyForAllBuilders((builder)=> - { - builder.Configure(typeof(DuplicateClass), ComponentCallModelEnum.Singlecall); - builder.Configure(typeof(DuplicateClass), ComponentCallModelEnum.Singlecall); - - Assert.AreEqual(builder.BuildAll(typeof(DuplicateClass)).Count(),1); - }); - } - - [Test] - public void Properties_set_on_duplicate_registrations_should_not_be_discarded() - { - VerifyForAllBuilders((builder) => - { - builder.Configure(typeof(DuplicateClass), ComponentCallModelEnum.Singleton); - builder.ConfigureProperty(typeof(DuplicateClass),"SomeProperty",true); - - builder.Configure(typeof(DuplicateClass), ComponentCallModelEnum.Singleton); - builder.ConfigureProperty(typeof(DuplicateClass), "AnotherProperty", true); - - var component = (DuplicateClass)builder.Build(typeof(DuplicateClass)); - - Assert.True(component.SomeProperty); - - Assert.True(component.AnotherProperty); - }); - - } - - - [Test] - public void Setter_dependencies_should_be_supported() - { - VerifyForAllBuilders((builder) => - { - builder.Configure(typeof(ClassWithSetterDependencies), ComponentCallModelEnum.Singleton); - builder.ConfigureProperty(typeof(ClassWithSetterDependencies), "EnumDependency", SomeEnum.X); - builder.ConfigureProperty(typeof(ClassWithSetterDependencies), "SimpleDependency",1); - builder.ConfigureProperty(typeof(ClassWithSetterDependencies), "StringDependency", "Test"); - - var component = (ClassWithSetterDependencies)builder.Build(typeof(ClassWithSetterDependencies)); - - Assert.AreEqual(component.EnumDependency,SomeEnum.X); - Assert.AreEqual(component.SimpleDependency,1); - Assert.AreEqual(component.StringDependency,"Test"); - }); - - } - - } - - public class DuplicateClass - { - public bool SomeProperty { get; set; } - public bool AnotherProperty { get; set; } - } - - public class ClassWithSetterDependencies - { - public SomeEnum EnumDependency { get; set; } - public int SimpleDependency { get; set; } - public string StringDependency { get; set; } - } - - public enum SomeEnum - { - X - } +using System.Linq; +using NServiceBus.ObjectBuilder; +using NUnit.Framework; + +namespace ObjectBuilder.Tests +{ + [TestFixture] + public class When_registering_components : BuilderFixture + { + [Test] + public void Multiple_registrations_of_the_same_component_should_be_allowed() + { + VerifyForAllBuilders((builder)=> + { + builder.Configure(typeof(DuplicateClass), ComponentCallModelEnum.Singlecall); + builder.Configure(typeof(DuplicateClass), ComponentCallModelEnum.Singlecall); + + Assert.AreEqual(builder.BuildAll(typeof(DuplicateClass)).Count(),1); + }); + } + + [Test] + public void Properties_set_on_duplicate_registrations_should_not_be_discarded() + { + VerifyForAllBuilders((builder) => + { + builder.Configure(typeof(DuplicateClass), ComponentCallModelEnum.Singleton); + builder.ConfigureProperty(typeof(DuplicateClass),"SomeProperty",true); + + builder.Configure(typeof(DuplicateClass), ComponentCallModelEnum.Singleton); + builder.ConfigureProperty(typeof(DuplicateClass), "AnotherProperty", true); + + var component = (DuplicateClass)builder.Build(typeof(DuplicateClass)); + + Assert.True(component.SomeProperty); + + Assert.True(component.AnotherProperty); + }); + + } + + + [Test] + public void Setter_dependencies_should_be_supported() + { + VerifyForAllBuilders((builder) => + { + builder.Configure(typeof(ClassWithSetterDependencies), ComponentCallModelEnum.Singleton); + builder.ConfigureProperty(typeof(ClassWithSetterDependencies), "EnumDependency", SomeEnum.X); + builder.ConfigureProperty(typeof(ClassWithSetterDependencies), "SimpleDependency",1); + builder.ConfigureProperty(typeof(ClassWithSetterDependencies), "StringDependency", "Test"); + + var component = (ClassWithSetterDependencies)builder.Build(typeof(ClassWithSetterDependencies)); + + Assert.AreEqual(component.EnumDependency,SomeEnum.X); + Assert.AreEqual(component.SimpleDependency,1); + Assert.AreEqual(component.StringDependency,"Test"); + }); + + } + + } + + public class DuplicateClass + { + public bool SomeProperty { get; set; } + public bool AnotherProperty { get; set; } + } + + public class ClassWithSetterDependencies + { + public SomeEnum EnumDependency { get; set; } + public int SimpleDependency { get; set; } + public string StringDependency { get; set; } + } + + public enum SomeEnum + { + X + } } \ No newline at end of file diff --git a/src/impl/ObjectBuilder/ObjectBuilder.Unity/AutowireEnabledInjectionProperty.cs b/src/impl/ObjectBuilder/ObjectBuilder.Unity/AutowireEnabledInjectionProperty.cs index 6fd09e65bbf..083a631c5e7 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.Unity/AutowireEnabledInjectionProperty.cs +++ b/src/impl/ObjectBuilder/ObjectBuilder.Unity/AutowireEnabledInjectionProperty.cs @@ -1,139 +1,139 @@ -using System; -using System.Diagnostics.CodeAnalysis; -using System.Reflection; -using Microsoft.Practices.ObjectBuilder2; -using Microsoft.Practices.Unity; -using Microsoft.Practices.Unity.ObjectBuilder; - -namespace NServiceBus.ObjectBuilder.Unity -{ - /// - /// Specialy prepared derivative of adjusted to cooperate with - /// autowire infrastructure. Does not replace property selector policy for - /// but, instead, uses - /// 's - /// . - /// TODO: This class needs cleaning up the exception throwing code to include more information - /// for users. - /// - /// - /// Based on Unity's class. - /// - public class AutowireEnabledInjectionProperty : InjectionMember - { - private readonly string propertyName; - private InjectionParameterValue parameterValue; - - /// - /// Configure the container to inject the given property name, - /// resolving the value via the container. - /// - /// Name of the property to inject. - public AutowireEnabledInjectionProperty(string propertyName) - { - this.propertyName = propertyName; - } - - /// - /// Configure the container to inject the given property name, - /// using the value supplied. This value is converted to an - /// object using the - /// rules defined by the - /// method. - /// - /// Name of property to inject. - /// Value for property. - public AutowireEnabledInjectionProperty(string propertyName, object propertyValue) - { - this.propertyName = propertyName; - parameterValue = InjectionParameterValue.ToParameter(propertyValue); - } - /// - /// Add policies to the to configure the - /// container to call this constructor with the appropriate parameter values. - /// - /// Type to register. - /// Name used to resolve the type object. - /// Policy list to add policies to. - [SuppressMessage("Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods", - Justification = "Validation is done via Guard class")] - public override void AddPolicies(Type typeToCreate, string name, IPolicyList policies) - { - Guard.ArgumentNotNull(typeToCreate, "typeToCreate"); - PropertyInfo propInfo = typeToCreate.GetProperty(propertyName); - GuardPropertyExists(propInfo, typeToCreate, propertyName); - GuardPropertyIsSettable(propInfo); - GuardPropertyIsNotIndexer(propInfo); - InitializeParameterValue(propInfo); - GuardPropertyValueIsCompatible(propInfo, parameterValue); - - SpecifiedPropertiesSelectorPolicy selector = - GetSelectorPolicy(policies, typeToCreate, name); - - selector.AddPropertyAndValue(propInfo, parameterValue); - } - - private InjectionParameterValue InitializeParameterValue(PropertyInfo propInfo) - { - if (parameterValue == null) - { - parameterValue = new ResolvedParameter(propInfo.PropertyType); - } - return parameterValue; - } - - private static SpecifiedPropertiesSelectorPolicy GetSelectorPolicy(IPolicyList policies, Type typeToInject, string name) - { - NamedTypeBuildKey key = new NamedTypeBuildKey(typeToInject, name); - IPropertySelectorPolicy selector = - policies.GetNoDefault(key, false); - - if (selector == null) - { - FullAutowirePropertySelectorPolicy defaultSelector = - policies.Get(key, false) as FullAutowirePropertySelectorPolicy; - if (defaultSelector != null) - { - selector = defaultSelector.Clone(); - policies.Set(selector, key); - } - else - { - throw new InvalidOperationException("Cannot use AutiviewEnabledInjectionProperty without FullAutowireContainerExtension. Please register FullAutowireContainerExtension extension in the container."); - } - } - return ((FullAutowirePropertySelectorPolicy)selector).SpecifiedPropertiesPolicy; - } - - private static void GuardPropertyExists(PropertyInfo propInfo, Type typeToCreate, string propertyName) - { - if (propInfo == null) - { - throw new InvalidOperationException(); - } - } - - private static void GuardPropertyIsSettable(PropertyInfo propInfo) - { - if (!propInfo.CanWrite) - { - throw new InvalidOperationException(); - } - } - - private static void GuardPropertyIsNotIndexer(PropertyInfo property) - { - if (property.GetIndexParameters().Length > 0) - { - throw new InvalidOperationException(); - } - } - private static void GuardPropertyValueIsCompatible(PropertyInfo property, InjectionParameterValue value) - { - if (!value.MatchesType(property.PropertyType)) - { - throw new InvalidOperationException(); - } - } - } -} +using System; +using System.Diagnostics.CodeAnalysis; +using System.Reflection; +using Microsoft.Practices.ObjectBuilder2; +using Microsoft.Practices.Unity; +using Microsoft.Practices.Unity.ObjectBuilder; + +namespace NServiceBus.ObjectBuilder.Unity +{ + /// + /// Specialy prepared derivative of adjusted to cooperate with + /// autowire infrastructure. Does not replace property selector policy for + /// but, instead, uses + /// 's + /// . + /// TODO: This class needs cleaning up the exception throwing code to include more information + /// for users. + /// + /// + /// Based on Unity's class. + /// + public class AutowireEnabledInjectionProperty : InjectionMember + { + private readonly string propertyName; + private InjectionParameterValue parameterValue; + + /// + /// Configure the container to inject the given property name, + /// resolving the value via the container. + /// + /// Name of the property to inject. + public AutowireEnabledInjectionProperty(string propertyName) + { + this.propertyName = propertyName; + } + + /// + /// Configure the container to inject the given property name, + /// using the value supplied. This value is converted to an + /// object using the + /// rules defined by the + /// method. + /// + /// Name of property to inject. + /// Value for property. + public AutowireEnabledInjectionProperty(string propertyName, object propertyValue) + { + this.propertyName = propertyName; + parameterValue = InjectionParameterValue.ToParameter(propertyValue); + } + /// + /// Add policies to the to configure the + /// container to call this constructor with the appropriate parameter values. + /// + /// Type to register. + /// Name used to resolve the type object. + /// Policy list to add policies to. + [SuppressMessage("Microsoft.Design", "CA1062:ValidateArgumentsOfPublicMethods", + Justification = "Validation is done via Guard class")] + public override void AddPolicies(Type typeToCreate, string name, IPolicyList policies) + { + Guard.ArgumentNotNull(typeToCreate, "typeToCreate"); + PropertyInfo propInfo = typeToCreate.GetProperty(propertyName); + GuardPropertyExists(propInfo, typeToCreate, propertyName); + GuardPropertyIsSettable(propInfo); + GuardPropertyIsNotIndexer(propInfo); + InitializeParameterValue(propInfo); + GuardPropertyValueIsCompatible(propInfo, parameterValue); + + SpecifiedPropertiesSelectorPolicy selector = + GetSelectorPolicy(policies, typeToCreate, name); + + selector.AddPropertyAndValue(propInfo, parameterValue); + } + + private InjectionParameterValue InitializeParameterValue(PropertyInfo propInfo) + { + if (parameterValue == null) + { + parameterValue = new ResolvedParameter(propInfo.PropertyType); + } + return parameterValue; + } + + private static SpecifiedPropertiesSelectorPolicy GetSelectorPolicy(IPolicyList policies, Type typeToInject, string name) + { + NamedTypeBuildKey key = new NamedTypeBuildKey(typeToInject, name); + IPropertySelectorPolicy selector = + policies.GetNoDefault(key, false); + + if (selector == null) + { + FullAutowirePropertySelectorPolicy defaultSelector = + policies.Get(key, false) as FullAutowirePropertySelectorPolicy; + if (defaultSelector != null) + { + selector = defaultSelector.Clone(); + policies.Set(selector, key); + } + else + { + throw new InvalidOperationException("Cannot use AutiviewEnabledInjectionProperty without FullAutowireContainerExtension. Please register FullAutowireContainerExtension extension in the container."); + } + } + return ((FullAutowirePropertySelectorPolicy)selector).SpecifiedPropertiesPolicy; + } + + private static void GuardPropertyExists(PropertyInfo propInfo, Type typeToCreate, string propertyName) + { + if (propInfo == null) + { + throw new InvalidOperationException(); + } + } + + private static void GuardPropertyIsSettable(PropertyInfo propInfo) + { + if (!propInfo.CanWrite) + { + throw new InvalidOperationException(); + } + } + + private static void GuardPropertyIsNotIndexer(PropertyInfo property) + { + if (property.GetIndexParameters().Length > 0) + { + throw new InvalidOperationException(); + } + } + private static void GuardPropertyValueIsCompatible(PropertyInfo property, InjectionParameterValue value) + { + if (!value.MatchesType(property.PropertyType)) + { + throw new InvalidOperationException(); + } + } + } +} diff --git a/src/impl/ObjectBuilder/ObjectBuilder.Unity/Config/ConfigureUnityBuilder.cs b/src/impl/ObjectBuilder/ObjectBuilder.Unity/Config/ConfigureUnityBuilder.cs index f40d33a3723..be7c2ee8297 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.Unity/Config/ConfigureUnityBuilder.cs +++ b/src/impl/ObjectBuilder/ObjectBuilder.Unity/Config/ConfigureUnityBuilder.cs @@ -1,35 +1,35 @@ -using Microsoft.Practices.Unity; -using NServiceBus.ObjectBuilder.Common.Config; -using NServiceBus.ObjectBuilder.Unity; - -namespace NServiceBus -{ - /// - /// Contains extension methods for configuring object builder infrastructure through Unity container. - /// - public static class ConfigureUnityBuilder - { - /// - /// Use the Unity builder. - /// - /// - /// - public static Configure UnityBuilder(this Configure config) - { - ConfigureCommon.With(config, new UnityObjectBuilder()); - return config; - } - - /// - /// Use the Unity builder passing in a preconfigured container to be used by nServiceBus. - /// - /// - /// - /// - public static Configure UnityBuilder(this Configure config, IUnityContainer container) - { - ConfigureCommon.With(config, new UnityObjectBuilder(container)); - return config; - } - } -} +using Microsoft.Practices.Unity; +using NServiceBus.ObjectBuilder.Common.Config; +using NServiceBus.ObjectBuilder.Unity; + +namespace NServiceBus +{ + /// + /// Contains extension methods for configuring object builder infrastructure through Unity container. + /// + public static class ConfigureUnityBuilder + { + /// + /// Use the Unity builder. + /// + /// + /// + public static Configure UnityBuilder(this Configure config) + { + ConfigureCommon.With(config, new UnityObjectBuilder()); + return config; + } + + /// + /// Use the Unity builder passing in a preconfigured container to be used by nServiceBus. + /// + /// + /// + /// + public static Configure UnityBuilder(this Configure config, IUnityContainer container) + { + ConfigureCommon.With(config, new UnityObjectBuilder(container)); + return config; + } + } +} diff --git a/src/impl/ObjectBuilder/ObjectBuilder.Unity/ConfigureComponentAdapter.cs b/src/impl/ObjectBuilder/ObjectBuilder.Unity/ConfigureComponentAdapter.cs index 36308676d18..bd970d95fcb 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.Unity/ConfigureComponentAdapter.cs +++ b/src/impl/ObjectBuilder/ObjectBuilder.Unity/ConfigureComponentAdapter.cs @@ -1,36 +1,36 @@ -using System; -using System.Collections.Generic; -using Microsoft.Practices.Unity; - -namespace NServiceBus.ObjectBuilder.Unity -{ - public class ConfigureComponentAdapter : IComponentConfig - { - private readonly IUnityContainer container; - private readonly Type concreteComponent; - private readonly List injectionMembers = new List(); - - public ConfigureComponentAdapter(IUnityContainer container, Type concreteComponent) - { - this.container = container; - this.concreteComponent = concreteComponent; - } - - public Type ConfiguredType - { - get { return concreteComponent; } - } - - public IComponentConfig ConfigureProperty(string name, object value) - { - if (value != null) - { - var prop = new AutowireEnabledInjectionProperty(name, value); - injectionMembers.Add(prop); - container.Configure().ConfigureInjectionFor(concreteComponent, - new InjectionMember[] { prop }); - } - return this; - } - } -} +using System; +using System.Collections.Generic; +using Microsoft.Practices.Unity; + +namespace NServiceBus.ObjectBuilder.Unity +{ + public class ConfigureComponentAdapter : IComponentConfig + { + private readonly IUnityContainer container; + private readonly Type concreteComponent; + private readonly List injectionMembers = new List(); + + public ConfigureComponentAdapter(IUnityContainer container, Type concreteComponent) + { + this.container = container; + this.concreteComponent = concreteComponent; + } + + public Type ConfiguredType + { + get { return concreteComponent; } + } + + public IComponentConfig ConfigureProperty(string name, object value) + { + if (value != null) + { + var prop = new AutowireEnabledInjectionProperty(name, value); + injectionMembers.Add(prop); + container.Configure().ConfigureInjectionFor(concreteComponent, + new InjectionMember[] { prop }); + } + return this; + } + } +} diff --git a/src/impl/ObjectBuilder/ObjectBuilder.Unity/FullAutowireContainerExtension.cs b/src/impl/ObjectBuilder/ObjectBuilder.Unity/FullAutowireContainerExtension.cs index a2b18b29cb0..96db96a4f1b 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.Unity/FullAutowireContainerExtension.cs +++ b/src/impl/ObjectBuilder/ObjectBuilder.Unity/FullAutowireContainerExtension.cs @@ -1,17 +1,17 @@ -using Microsoft.Practices.ObjectBuilder2; -using Microsoft.Practices.Unity; - -namespace NServiceBus.ObjectBuilder.Unity -{ - /// - /// Extension for Unity container which registeres full-autowire-enabled property resolution policy. - /// - public class FullAutowireContainerExtension : UnityContainerExtension - { - protected override void Initialize() - { - Context.Policies.SetDefault( - new FullAutowirePropertySelectorPolicy(Container)); - } - } -} +using Microsoft.Practices.ObjectBuilder2; +using Microsoft.Practices.Unity; + +namespace NServiceBus.ObjectBuilder.Unity +{ + /// + /// Extension for Unity container which registeres full-autowire-enabled property resolution policy. + /// + public class FullAutowireContainerExtension : UnityContainerExtension + { + protected override void Initialize() + { + Context.Policies.SetDefault( + new FullAutowirePropertySelectorPolicy(Container)); + } + } +} diff --git a/src/impl/ObjectBuilder/ObjectBuilder.Unity/FullAutowirePropertySelectorPolicy.cs b/src/impl/ObjectBuilder/ObjectBuilder.Unity/FullAutowirePropertySelectorPolicy.cs index aa464ea1cc9..e2b8d5c3bac 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.Unity/FullAutowirePropertySelectorPolicy.cs +++ b/src/impl/ObjectBuilder/ObjectBuilder.Unity/FullAutowirePropertySelectorPolicy.cs @@ -1,121 +1,121 @@ -using System; -using System.Collections.Generic; -using Microsoft.Practices.ObjectBuilder2; -using System.Reflection; -using Microsoft.Practices.Unity; -using Microsoft.Practices.Unity.ObjectBuilder; - -namespace NServiceBus.ObjectBuilder.Unity -{ - /// - /// Property selection policy which replaces Unity default property selection policy with - /// algorithm that returns all the properties which - /// were configured by hand (using InjectedMembers), by Dependency attribute and werend configured - /// (optional property dependencies). - /// - /// - /// Optional property dependencies can only be of reference types. - /// - public class FullAutowirePropertySelectorPolicy : IPropertySelectorPolicy - { - private readonly IUnityContainer container; - private readonly IEnumerable attributesToIgnore; - private readonly DefaultUnityPropertySelectorPolicy defaultProlicy = new DefaultUnityPropertySelectorPolicy(); - private readonly SpecifiedPropertiesSelectorPolicy specifiedPropertiesPolicy = new SpecifiedPropertiesSelectorPolicy(); - - /// - /// Creates new policy object for using in provided container. - /// - public FullAutowirePropertySelectorPolicy(IUnityContainer container) - { - this.container = container; - attributesToIgnore = new [] { typeof(DependencyAttribute)}; - } - - /// - /// Object that handles configured by-hand properties. - /// - internal SpecifiedPropertiesSelectorPolicy SpecifiedPropertiesPolicy - { - get { return specifiedPropertiesPolicy; } - } - - /// - /// Clones this policy object. - /// - /// - internal FullAutowirePropertySelectorPolicy Clone() - { - return new FullAutowirePropertySelectorPolicy(container); - } - - public IEnumerable SelectProperties(IBuilderContext context) - { - var t = BuildKey.GetType(context.BuildKey); - var propertyNames = new HashSet(); - foreach (SelectedProperty prop in specifiedPropertiesPolicy.SelectProperties(context)) - { - if (!propertyNames.Contains(prop.Property.Name)) - { - propertyNames.Add(prop.Property.Name); - yield return prop; - } - } - foreach (SelectedProperty prop in defaultProlicy.SelectProperties(context)) - { - if (!propertyNames.Contains(prop.Property.Name)) - { - yield return prop; - } - } - - foreach (PropertyInfo prop in t.GetProperties(BindingFlags.Public | BindingFlags.SetProperty | BindingFlags.Instance)) - { - if (prop.GetIndexParameters().Length == 0 && - prop.CanWrite && !ShoudBeIgnored(prop) && - !propertyNames.Contains(prop.Name) && - !prop.PropertyType.IsValueType && - CanBeResolved(prop)) - { - yield return CreateSelectedProperty(context, prop); - } - } - } - - private bool CanBeResolved(PropertyInfo info) - { - try - { - container.Resolve(info.PropertyType); - return true; - } - catch (ResolutionFailedException) - { - return false; - } - } - - private bool ShoudBeIgnored(PropertyInfo info) - { - foreach (Type attributeType in attributesToIgnore) - { - if (info.IsDefined(attributeType, false)) - { - return true; - } - } - return false; - } - - private static SelectedProperty CreateSelectedProperty(IBuilderContext context, PropertyInfo property) - { - string key = Guid.NewGuid().ToString(); - SelectedProperty result = new SelectedProperty(property, key); - context.PersistentPolicies.Set(new OptionalFixedTypeResolverPolicy(property.PropertyType), key); - DependencyResolverTrackerPolicy.TrackKey(context.PersistentPolicies, - context.BuildKey, - key); - return result; - } - } -} +using System; +using System.Collections.Generic; +using Microsoft.Practices.ObjectBuilder2; +using System.Reflection; +using Microsoft.Practices.Unity; +using Microsoft.Practices.Unity.ObjectBuilder; + +namespace NServiceBus.ObjectBuilder.Unity +{ + /// + /// Property selection policy which replaces Unity default property selection policy with + /// algorithm that returns all the properties which + /// were configured by hand (using InjectedMembers), by Dependency attribute and werend configured + /// (optional property dependencies). + /// + /// + /// Optional property dependencies can only be of reference types. + /// + public class FullAutowirePropertySelectorPolicy : IPropertySelectorPolicy + { + private readonly IUnityContainer container; + private readonly IEnumerable attributesToIgnore; + private readonly DefaultUnityPropertySelectorPolicy defaultProlicy = new DefaultUnityPropertySelectorPolicy(); + private readonly SpecifiedPropertiesSelectorPolicy specifiedPropertiesPolicy = new SpecifiedPropertiesSelectorPolicy(); + + /// + /// Creates new policy object for using in provided container. + /// + public FullAutowirePropertySelectorPolicy(IUnityContainer container) + { + this.container = container; + attributesToIgnore = new [] { typeof(DependencyAttribute)}; + } + + /// + /// Object that handles configured by-hand properties. + /// + internal SpecifiedPropertiesSelectorPolicy SpecifiedPropertiesPolicy + { + get { return specifiedPropertiesPolicy; } + } + + /// + /// Clones this policy object. + /// + /// + internal FullAutowirePropertySelectorPolicy Clone() + { + return new FullAutowirePropertySelectorPolicy(container); + } + + public IEnumerable SelectProperties(IBuilderContext context) + { + var t = BuildKey.GetType(context.BuildKey); + var propertyNames = new HashSet(); + foreach (SelectedProperty prop in specifiedPropertiesPolicy.SelectProperties(context)) + { + if (!propertyNames.Contains(prop.Property.Name)) + { + propertyNames.Add(prop.Property.Name); + yield return prop; + } + } + foreach (SelectedProperty prop in defaultProlicy.SelectProperties(context)) + { + if (!propertyNames.Contains(prop.Property.Name)) + { + yield return prop; + } + } + + foreach (PropertyInfo prop in t.GetProperties(BindingFlags.Public | BindingFlags.SetProperty | BindingFlags.Instance)) + { + if (prop.GetIndexParameters().Length == 0 && + prop.CanWrite && !ShoudBeIgnored(prop) && + !propertyNames.Contains(prop.Name) && + !prop.PropertyType.IsValueType && + CanBeResolved(prop)) + { + yield return CreateSelectedProperty(context, prop); + } + } + } + + private bool CanBeResolved(PropertyInfo info) + { + try + { + container.Resolve(info.PropertyType); + return true; + } + catch (ResolutionFailedException) + { + return false; + } + } + + private bool ShoudBeIgnored(PropertyInfo info) + { + foreach (Type attributeType in attributesToIgnore) + { + if (info.IsDefined(attributeType, false)) + { + return true; + } + } + return false; + } + + private static SelectedProperty CreateSelectedProperty(IBuilderContext context, PropertyInfo property) + { + string key = Guid.NewGuid().ToString(); + SelectedProperty result = new SelectedProperty(property, key); + context.PersistentPolicies.Set(new OptionalFixedTypeResolverPolicy(property.PropertyType), key); + DependencyResolverTrackerPolicy.TrackKey(context.PersistentPolicies, + context.BuildKey, + key); + return result; + } + } +} diff --git a/src/impl/ObjectBuilder/ObjectBuilder.Unity/ObjectBuilder.Unity.csproj b/src/impl/ObjectBuilder/ObjectBuilder.Unity/ObjectBuilder.Unity.csproj index b9532817756..56418267f3e 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.Unity/ObjectBuilder.Unity.csproj +++ b/src/impl/ObjectBuilder/ObjectBuilder.Unity/ObjectBuilder.Unity.csproj @@ -1,96 +1,96 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {343B2E7A-E228-4B31-ABB5-F5437B2E7A4C} - Library - Properties - NServiceBus.ObjectBuilder.Unity - NServiceBus.ObjectBuilder.Unity - v4.0 - 512 - true - ..\..\..\..\NServiceBus.snk - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\..\lib\log4net.dll - False - - - False - ..\..\..\..\lib\Microsoft.Practices.ObjectBuilder2.dll - False - - - False - ..\..\..\..\lib\Microsoft.Practices.Unity.dll - False - - - False - ..\..\..\..\build\output\NServiceBus.dll - - - False - ..\..\..\..\build\output\NServiceBus.Core.dll - - - - 3.5 - - - 3.5 - - - 3.5 - - - - - - - CommonAssemblyInfo.cs - - - - - - - - - - - - - - xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\containers\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {343B2E7A-E228-4B31-ABB5-F5437B2E7A4C} + Library + Properties + NServiceBus.ObjectBuilder.Unity + NServiceBus.ObjectBuilder.Unity + v4.0 + 512 + true + ..\..\..\..\NServiceBus.snk + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\..\lib\log4net.dll + False + + + False + ..\..\..\..\lib\Microsoft.Practices.ObjectBuilder2.dll + False + + + False + ..\..\..\..\lib\Microsoft.Practices.Unity.dll + False + + + False + ..\..\..\..\build\output\NServiceBus.dll + + + False + ..\..\..\..\build\output\NServiceBus.Core.dll + + + + 3.5 + + + 3.5 + + + 3.5 + + + + + + + CommonAssemblyInfo.cs + + + + + + + + + + + + + + xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\containers\" + \ No newline at end of file diff --git a/src/impl/ObjectBuilder/ObjectBuilder.Unity/OptionalFixedTypeResolverPolicy.cs b/src/impl/ObjectBuilder/ObjectBuilder.Unity/OptionalFixedTypeResolverPolicy.cs index ef6272137b3..dea13903057 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.Unity/OptionalFixedTypeResolverPolicy.cs +++ b/src/impl/ObjectBuilder/ObjectBuilder.Unity/OptionalFixedTypeResolverPolicy.cs @@ -1,43 +1,43 @@ -using System; -using Microsoft.Practices.ObjectBuilder2; -using Microsoft.Practices.Unity; - -namespace NServiceBus.ObjectBuilder.Unity -{ - /// - /// Resolver policy for resolving property dependencies which were not decorated using - /// attribute. - /// - public class OptionalFixedTypeResolverPolicy : IDependencyResolverPolicy - { - private readonly Type typeToBuild; - - /// - /// Create a new instance storing the given type. - /// - /// Type to resolve. - public OptionalFixedTypeResolverPolicy(Type typeToBuild) - { - this.typeToBuild = typeToBuild; - } - - #region IDependencyResolverPolicy Members - - /// - /// Get the value for a dependency. - /// - /// Current build context. - /// The value for the dependency. - public object Resolve(IBuilderContext context) - { - if (context == null) - { - throw new ArgumentNullException("context"); - } - IBuilderContext recursiveContext = context.CloneForNewBuild(new NamedTypeBuildKey(typeToBuild), null); - return recursiveContext.Strategies.ExecuteBuildUp(recursiveContext); - } - - #endregion - } -} +using System; +using Microsoft.Practices.ObjectBuilder2; +using Microsoft.Practices.Unity; + +namespace NServiceBus.ObjectBuilder.Unity +{ + /// + /// Resolver policy for resolving property dependencies which were not decorated using + /// attribute. + /// + public class OptionalFixedTypeResolverPolicy : IDependencyResolverPolicy + { + private readonly Type typeToBuild; + + /// + /// Create a new instance storing the given type. + /// + /// Type to resolve. + public OptionalFixedTypeResolverPolicy(Type typeToBuild) + { + this.typeToBuild = typeToBuild; + } + + #region IDependencyResolverPolicy Members + + /// + /// Get the value for a dependency. + /// + /// Current build context. + /// The value for the dependency. + public object Resolve(IBuilderContext context) + { + if (context == null) + { + throw new ArgumentNullException("context"); + } + IBuilderContext recursiveContext = context.CloneForNewBuild(new NamedTypeBuildKey(typeToBuild), null); + return recursiveContext.Strategies.ExecuteBuildUp(recursiveContext); + } + + #endregion + } +} diff --git a/src/impl/ObjectBuilder/ObjectBuilder.Unity/Properties/AssemblyInfo.cs b/src/impl/ObjectBuilder/ObjectBuilder.Unity/Properties/AssemblyInfo.cs index a4e75cfaff8..f4c88c6fc7c 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.Unity/Properties/AssemblyInfo.cs +++ b/src/impl/ObjectBuilder/ObjectBuilder.Unity/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Container Unity Implementation")] -[assembly: AssemblyDescription("Implementation of container functionality on top of Unity.")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Container Unity Implementation")] +[assembly: AssemblyDescription("Implementation of container functionality on top of Unity.")] diff --git a/src/impl/ObjectBuilder/ObjectBuilder.Unity/UnityObjectBuilder.cs b/src/impl/ObjectBuilder/ObjectBuilder.Unity/UnityObjectBuilder.cs index 91857bd8ddc..2eff01f917b 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.Unity/UnityObjectBuilder.cs +++ b/src/impl/ObjectBuilder/ObjectBuilder.Unity/UnityObjectBuilder.cs @@ -1,170 +1,170 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Microsoft.Practices.Unity; -using NServiceBus.ObjectBuilder.Common; - -namespace NServiceBus.ObjectBuilder.Unity -{ - public class UnityObjectBuilder : IContainer - { - /// - /// The container itself. - /// - private readonly IUnityContainer container; - - private readonly HashSet typesWithDefaultInstances = new HashSet(); - - private bool disposed; - - /// - /// Instantites the class with a new UnityContainer. - /// - public UnityObjectBuilder() - : this(new UnityContainer()) - { - } - - /// - /// Instantiates the class saving the given container. - /// - /// - public UnityObjectBuilder(IUnityContainer container) - { - this.container = container; - var autowireContainerExtension = this.container.Configure(); - if (autowireContainerExtension == null) - { - this.container.AddNewExtension(); - } - } - - /// - /// Disposes the container and all resources instantiated by the container. - /// - public void Dispose() - { - Dispose(true); - } - protected virtual void Dispose(bool disposing) - { - if (!disposing || disposed) - return; - - disposed = true; - container.Dispose(); - GC.SuppressFinalize(this); - } - - /// - /// Returns a child instance of the container to facilitate deterministic disposal - /// of all resources built by the child container. - /// - /// - public IContainer BuildChildContainer() - { - return new UnityObjectBuilder(container.CreateChildContainer()); - } - - public object Build(Type typeToBuild) - { - if (!typesWithDefaultInstances.Contains(typeToBuild)) - throw new ArgumentException(typeToBuild + " is not registered in the container"); - - return container.Resolve(typeToBuild); - } - - public IEnumerable BuildAll(Type typeToBuild) - { - if (typesWithDefaultInstances.Contains(typeToBuild)) - { - yield return container.Resolve(typeToBuild); - foreach (var component in container.ResolveAll(typeToBuild)) - { - yield return component; - } - } - } - - public void ReleaseInstance(object instance) - { - container.Teardown(instance); - } - - public void Configure(Type concreteComponent, ComponentCallModelEnum callModel) - { - ConfigureComponentAdapter config = - container.ResolveAll().Where(x => x.ConfiguredType == concreteComponent). - FirstOrDefault(); - if (config == null) - { - IEnumerable interfaces = GetAllServiceTypesFor(concreteComponent); - config = new ConfigureComponentAdapter(container, concreteComponent); - container.RegisterInstance(Guid.NewGuid().ToString(), config); - - foreach (Type t in interfaces) - { - if (typesWithDefaultInstances.Contains(t)) - { - container.RegisterType(t, concreteComponent, Guid.NewGuid().ToString(), GetLifetimeManager(callModel)); - } - else - { - container.RegisterType(t, concreteComponent, GetLifetimeManager(callModel)); - typesWithDefaultInstances.Add(t); - } - } - } - } - - public void ConfigureProperty(Type concreteComponent, string property, object value) - { - ConfigureComponentAdapter config = - container.ResolveAll().Where(x => x.ConfiguredType == concreteComponent). - First(); - config.ConfigureProperty(property, value); - } - - public void RegisterSingleton(Type lookupType, object instance) - { - container.RegisterInstance(lookupType, instance); - } - - public bool HasComponent(Type componentType) - { - return container.ResolveAll().Any(x => x.ConfiguredType == componentType); - } - - private static IEnumerable GetAllServiceTypesFor(Type t) - { - if (t == null) - { - return new List(); - } - - var result = new List(t.GetInterfaces()); - result.Add(t); - - foreach (Type interfaceType in t.GetInterfaces()) - { - result.AddRange(GetAllServiceTypesFor(interfaceType)); - } - - return result.Distinct(); - } - - private static LifetimeManager GetLifetimeManager(ComponentCallModelEnum callModel) - { - switch (callModel) - { - case ComponentCallModelEnum.Singlecall: - return new TransientLifetimeManager(); - case ComponentCallModelEnum.Singleton: - return new ContainerControlledLifetimeManager(); - default: - return new TransientLifetimeManager(); - } - - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.Practices.Unity; +using NServiceBus.ObjectBuilder.Common; + +namespace NServiceBus.ObjectBuilder.Unity +{ + public class UnityObjectBuilder : IContainer + { + /// + /// The container itself. + /// + private readonly IUnityContainer container; + + private readonly HashSet typesWithDefaultInstances = new HashSet(); + + private bool disposed; + + /// + /// Instantites the class with a new UnityContainer. + /// + public UnityObjectBuilder() + : this(new UnityContainer()) + { + } + + /// + /// Instantiates the class saving the given container. + /// + /// + public UnityObjectBuilder(IUnityContainer container) + { + this.container = container; + var autowireContainerExtension = this.container.Configure(); + if (autowireContainerExtension == null) + { + this.container.AddNewExtension(); + } + } + + /// + /// Disposes the container and all resources instantiated by the container. + /// + public void Dispose() + { + Dispose(true); + } + protected virtual void Dispose(bool disposing) + { + if (!disposing || disposed) + return; + + disposed = true; + container.Dispose(); + GC.SuppressFinalize(this); + } + + /// + /// Returns a child instance of the container to facilitate deterministic disposal + /// of all resources built by the child container. + /// + /// + public IContainer BuildChildContainer() + { + return new UnityObjectBuilder(container.CreateChildContainer()); + } + + public object Build(Type typeToBuild) + { + if (!typesWithDefaultInstances.Contains(typeToBuild)) + throw new ArgumentException(typeToBuild + " is not registered in the container"); + + return container.Resolve(typeToBuild); + } + + public IEnumerable BuildAll(Type typeToBuild) + { + if (typesWithDefaultInstances.Contains(typeToBuild)) + { + yield return container.Resolve(typeToBuild); + foreach (var component in container.ResolveAll(typeToBuild)) + { + yield return component; + } + } + } + + public void ReleaseInstance(object instance) + { + container.Teardown(instance); + } + + public void Configure(Type concreteComponent, ComponentCallModelEnum callModel) + { + ConfigureComponentAdapter config = + container.ResolveAll().Where(x => x.ConfiguredType == concreteComponent). + FirstOrDefault(); + if (config == null) + { + IEnumerable interfaces = GetAllServiceTypesFor(concreteComponent); + config = new ConfigureComponentAdapter(container, concreteComponent); + container.RegisterInstance(Guid.NewGuid().ToString(), config); + + foreach (Type t in interfaces) + { + if (typesWithDefaultInstances.Contains(t)) + { + container.RegisterType(t, concreteComponent, Guid.NewGuid().ToString(), GetLifetimeManager(callModel)); + } + else + { + container.RegisterType(t, concreteComponent, GetLifetimeManager(callModel)); + typesWithDefaultInstances.Add(t); + } + } + } + } + + public void ConfigureProperty(Type concreteComponent, string property, object value) + { + ConfigureComponentAdapter config = + container.ResolveAll().Where(x => x.ConfiguredType == concreteComponent). + First(); + config.ConfigureProperty(property, value); + } + + public void RegisterSingleton(Type lookupType, object instance) + { + container.RegisterInstance(lookupType, instance); + } + + public bool HasComponent(Type componentType) + { + return container.ResolveAll().Any(x => x.ConfiguredType == componentType); + } + + private static IEnumerable GetAllServiceTypesFor(Type t) + { + if (t == null) + { + return new List(); + } + + var result = new List(t.GetInterfaces()); + result.Add(t); + + foreach (Type interfaceType in t.GetInterfaces()) + { + result.AddRange(GetAllServiceTypesFor(interfaceType)); + } + + return result.Distinct(); + } + + private static LifetimeManager GetLifetimeManager(ComponentCallModelEnum callModel) + { + switch (callModel) + { + case ComponentCallModelEnum.Singlecall: + return new TransientLifetimeManager(); + case ComponentCallModelEnum.Singleton: + return new ContainerControlledLifetimeManager(); + default: + return new TransientLifetimeManager(); + } + + } + } +} diff --git a/src/impl/ObjectBuilder/ObjectBuilder.sln b/src/impl/ObjectBuilder/ObjectBuilder.sln index cf39ecf485f..9d338447449 100644 --- a/src/impl/ObjectBuilder/ObjectBuilder.sln +++ b/src/impl/ObjectBuilder/ObjectBuilder.sln @@ -1,54 +1,54 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectBuilder.CastleWindsor", "ObjectBuilder.CastleWindsor\ObjectBuilder.CastleWindsor.csproj", "{9A9A0BD5-AC37-4B90-B90F-FD1C1395FEBD}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectBuilder.StructureMap", "ObjectBuilder.StructureMap\ObjectBuilder.StructureMap.csproj", "{C05E5B87-EB74-4A3F-B4FC-AFDD28570850}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectBuilder.Autofac", "ObjectBuilder.Autofac\ObjectBuilder.Autofac.csproj", "{73EC4EBE-826D-4A0A-8837-51D3458FC2A8}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectBuilder.Unity", "ObjectBuilder.Unity\ObjectBuilder.Unity.csproj", "{343B2E7A-E228-4B31-ABB5-F5437B2E7A4C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectBuilder.Tests", "ObjectBuilder.Tests\ObjectBuilder.Tests.csproj", "{0A282BF4-0957-4074-8D5E-C2FB8634A3AA}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectBuilder.Spring", "ObjectBuilder.Spring\ObjectBuilder.Spring.csproj", "{734D30CF-4376-488A-A6B4-1033FED93660}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {9A9A0BD5-AC37-4B90-B90F-FD1C1395FEBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9A9A0BD5-AC37-4B90-B90F-FD1C1395FEBD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9A9A0BD5-AC37-4B90-B90F-FD1C1395FEBD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9A9A0BD5-AC37-4B90-B90F-FD1C1395FEBD}.Release|Any CPU.Build.0 = Release|Any CPU - {C05E5B87-EB74-4A3F-B4FC-AFDD28570850}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C05E5B87-EB74-4A3F-B4FC-AFDD28570850}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C05E5B87-EB74-4A3F-B4FC-AFDD28570850}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C05E5B87-EB74-4A3F-B4FC-AFDD28570850}.Release|Any CPU.Build.0 = Release|Any CPU - {73EC4EBE-826D-4A0A-8837-51D3458FC2A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {73EC4EBE-826D-4A0A-8837-51D3458FC2A8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {73EC4EBE-826D-4A0A-8837-51D3458FC2A8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {73EC4EBE-826D-4A0A-8837-51D3458FC2A8}.Release|Any CPU.Build.0 = Release|Any CPU - {343B2E7A-E228-4B31-ABB5-F5437B2E7A4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {343B2E7A-E228-4B31-ABB5-F5437B2E7A4C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {343B2E7A-E228-4B31-ABB5-F5437B2E7A4C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {343B2E7A-E228-4B31-ABB5-F5437B2E7A4C}.Release|Any CPU.Build.0 = Release|Any CPU - {0A282BF4-0957-4074-8D5E-C2FB8634A3AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0A282BF4-0957-4074-8D5E-C2FB8634A3AA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0A282BF4-0957-4074-8D5E-C2FB8634A3AA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0A282BF4-0957-4074-8D5E-C2FB8634A3AA}.Release|Any CPU.Build.0 = Release|Any CPU - {734D30CF-4376-488A-A6B4-1033FED93660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {734D30CF-4376-488A-A6B4-1033FED93660}.Debug|Any CPU.Build.0 = Debug|Any CPU - {734D30CF-4376-488A-A6B4-1033FED93660}.Release|Any CPU.ActiveCfg = Release|Any CPU - {734D30CF-4376-488A-A6B4-1033FED93660}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(SubversionScc) = preSolution - Svn-Managed = True - Manager = AnkhSVN - Subversion Support for Visual Studio - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectBuilder.CastleWindsor", "ObjectBuilder.CastleWindsor\ObjectBuilder.CastleWindsor.csproj", "{9A9A0BD5-AC37-4B90-B90F-FD1C1395FEBD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectBuilder.StructureMap", "ObjectBuilder.StructureMap\ObjectBuilder.StructureMap.csproj", "{C05E5B87-EB74-4A3F-B4FC-AFDD28570850}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectBuilder.Autofac", "ObjectBuilder.Autofac\ObjectBuilder.Autofac.csproj", "{73EC4EBE-826D-4A0A-8837-51D3458FC2A8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectBuilder.Unity", "ObjectBuilder.Unity\ObjectBuilder.Unity.csproj", "{343B2E7A-E228-4B31-ABB5-F5437B2E7A4C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectBuilder.Tests", "ObjectBuilder.Tests\ObjectBuilder.Tests.csproj", "{0A282BF4-0957-4074-8D5E-C2FB8634A3AA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ObjectBuilder.Spring", "ObjectBuilder.Spring\ObjectBuilder.Spring.csproj", "{734D30CF-4376-488A-A6B4-1033FED93660}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9A9A0BD5-AC37-4B90-B90F-FD1C1395FEBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9A9A0BD5-AC37-4B90-B90F-FD1C1395FEBD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9A9A0BD5-AC37-4B90-B90F-FD1C1395FEBD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9A9A0BD5-AC37-4B90-B90F-FD1C1395FEBD}.Release|Any CPU.Build.0 = Release|Any CPU + {C05E5B87-EB74-4A3F-B4FC-AFDD28570850}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C05E5B87-EB74-4A3F-B4FC-AFDD28570850}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C05E5B87-EB74-4A3F-B4FC-AFDD28570850}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C05E5B87-EB74-4A3F-B4FC-AFDD28570850}.Release|Any CPU.Build.0 = Release|Any CPU + {73EC4EBE-826D-4A0A-8837-51D3458FC2A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {73EC4EBE-826D-4A0A-8837-51D3458FC2A8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {73EC4EBE-826D-4A0A-8837-51D3458FC2A8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {73EC4EBE-826D-4A0A-8837-51D3458FC2A8}.Release|Any CPU.Build.0 = Release|Any CPU + {343B2E7A-E228-4B31-ABB5-F5437B2E7A4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {343B2E7A-E228-4B31-ABB5-F5437B2E7A4C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {343B2E7A-E228-4B31-ABB5-F5437B2E7A4C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {343B2E7A-E228-4B31-ABB5-F5437B2E7A4C}.Release|Any CPU.Build.0 = Release|Any CPU + {0A282BF4-0957-4074-8D5E-C2FB8634A3AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0A282BF4-0957-4074-8D5E-C2FB8634A3AA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0A282BF4-0957-4074-8D5E-C2FB8634A3AA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0A282BF4-0957-4074-8D5E-C2FB8634A3AA}.Release|Any CPU.Build.0 = Release|Any CPU + {734D30CF-4376-488A-A6B4-1033FED93660}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {734D30CF-4376-488A-A6B4-1033FED93660}.Debug|Any CPU.Build.0 = Debug|Any CPU + {734D30CF-4376-488A-A6B4-1033FED93660}.Release|Any CPU.ActiveCfg = Release|Any CPU + {734D30CF-4376-488A-A6B4-1033FED93660}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(SubversionScc) = preSolution + Svn-Managed = True + Manager = AnkhSVN - Subversion Support for Visual Studio + EndGlobalSection +EndGlobal diff --git a/src/impl/SagaPersisters/InMemory/InMemory.sln b/src/impl/SagaPersisters/InMemory/InMemory.sln index bc3fdfd04af..619bd758171 100644 --- a/src/impl/SagaPersisters/InMemory/InMemory.sln +++ b/src/impl/SagaPersisters/InMemory/InMemory.sln @@ -1,20 +1,20 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.SagaPersisters.InMemory", "NServiceBus.SagaPersisters.InMemory\NServiceBus.SagaPersisters.InMemory.csproj", "{C59E2545-D26E-4E38-B7A9-8E31A6CA82B1}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C59E2545-D26E-4E38-B7A9-8E31A6CA82B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C59E2545-D26E-4E38-B7A9-8E31A6CA82B1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C59E2545-D26E-4E38-B7A9-8E31A6CA82B1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C59E2545-D26E-4E38-B7A9-8E31A6CA82B1}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.SagaPersisters.InMemory", "NServiceBus.SagaPersisters.InMemory\NServiceBus.SagaPersisters.InMemory.csproj", "{C59E2545-D26E-4E38-B7A9-8E31A6CA82B1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C59E2545-D26E-4E38-B7A9-8E31A6CA82B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C59E2545-D26E-4E38-B7A9-8E31A6CA82B1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C59E2545-D26E-4E38-B7A9-8E31A6CA82B1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C59E2545-D26E-4E38-B7A9-8E31A6CA82B1}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/impl/SagaPersisters/InMemory/NServiceBus.SagaPersisters.InMemory/Config/ConfigureInMemorySagaPersister.cs b/src/impl/SagaPersisters/InMemory/NServiceBus.SagaPersisters.InMemory/Config/ConfigureInMemorySagaPersister.cs index cd2b2af4785..0db68723d83 100644 --- a/src/impl/SagaPersisters/InMemory/NServiceBus.SagaPersisters.InMemory/Config/ConfigureInMemorySagaPersister.cs +++ b/src/impl/SagaPersisters/InMemory/NServiceBus.SagaPersisters.InMemory/Config/ConfigureInMemorySagaPersister.cs @@ -1,23 +1,23 @@ -using NServiceBus.ObjectBuilder; -using NServiceBus.SagaPersisters.InMemory; - -namespace NServiceBus -{ - /// - /// Contains extension methods to NServiceBus.Configure for the in memory saga persister. - /// - public static class ConfigureInMemorySagaPersister - { - /// - /// Use the in memory saga persister implementation. - /// - /// - /// - public static Configure InMemorySagaPersister(this Configure config) - { - config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); - - return config; - } - } -} +using NServiceBus.ObjectBuilder; +using NServiceBus.SagaPersisters.InMemory; + +namespace NServiceBus +{ + /// + /// Contains extension methods to NServiceBus.Configure for the in memory saga persister. + /// + public static class ConfigureInMemorySagaPersister + { + /// + /// Use the in memory saga persister implementation. + /// + /// + /// + public static Configure InMemorySagaPersister(this Configure config) + { + config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); + + return config; + } + } +} diff --git a/src/impl/SagaPersisters/InMemory/NServiceBus.SagaPersisters.InMemory/InMemorySagaPersister.cs b/src/impl/SagaPersisters/InMemory/NServiceBus.SagaPersisters.InMemory/InMemorySagaPersister.cs index fc76301e22a..5286df7daf5 100644 --- a/src/impl/SagaPersisters/InMemory/NServiceBus.SagaPersisters.InMemory/InMemorySagaPersister.cs +++ b/src/impl/SagaPersisters/InMemory/NServiceBus.SagaPersisters.InMemory/InMemorySagaPersister.cs @@ -1,50 +1,50 @@ -using System; -using System.Collections.Generic; -using NServiceBus.Saga; - -namespace NServiceBus.SagaPersisters.InMemory -{ - /// - /// In memory implementation of ISagaPersister for quick development. - /// - public class InMemorySagaPersister : ISagaPersister - { - void ISagaPersister.Complete(ISagaEntity saga) - { - data.Remove(saga.Id); - } - - T ISagaPersister.Get(string property, object value) - { - foreach(var entity in data.Values) - { - var prop = entity.GetType().GetProperty(property); - if (prop != null) - if (prop.GetValue(entity, null).Equals(value)) - return (T)entity; - } - - return default(T); - } - - T ISagaPersister.Get(Guid sagaId) - { - ISagaEntity result; - data.TryGetValue(sagaId, out result); - - return (T)result; - } - - void ISagaPersister.Save(ISagaEntity saga) - { - data[saga.Id] = saga; - } - - void ISagaPersister.Update(ISagaEntity saga) - { - ((ISagaPersister)this).Save(saga); - } - - private readonly IDictionary data = new Dictionary(); - } +using System; +using System.Collections.Generic; +using NServiceBus.Saga; + +namespace NServiceBus.SagaPersisters.InMemory +{ + /// + /// In memory implementation of ISagaPersister for quick development. + /// + public class InMemorySagaPersister : ISagaPersister + { + void ISagaPersister.Complete(ISagaEntity saga) + { + data.Remove(saga.Id); + } + + T ISagaPersister.Get(string property, object value) + { + foreach(var entity in data.Values) + { + var prop = entity.GetType().GetProperty(property); + if (prop != null) + if (prop.GetValue(entity, null).Equals(value)) + return (T)entity; + } + + return default(T); + } + + T ISagaPersister.Get(Guid sagaId) + { + ISagaEntity result; + data.TryGetValue(sagaId, out result); + + return (T)result; + } + + void ISagaPersister.Save(ISagaEntity saga) + { + data[saga.Id] = saga; + } + + void ISagaPersister.Update(ISagaEntity saga) + { + ((ISagaPersister)this).Save(saga); + } + + private readonly IDictionary data = new Dictionary(); + } } \ No newline at end of file diff --git a/src/impl/SagaPersisters/InMemory/NServiceBus.SagaPersisters.InMemory/NServiceBus.SagaPersisters.InMemory.csproj b/src/impl/SagaPersisters/InMemory/NServiceBus.SagaPersisters.InMemory/NServiceBus.SagaPersisters.InMemory.csproj index 78eea7e22d9..94fdde09ec8 100644 --- a/src/impl/SagaPersisters/InMemory/NServiceBus.SagaPersisters.InMemory/NServiceBus.SagaPersisters.InMemory.csproj +++ b/src/impl/SagaPersisters/InMemory/NServiceBus.SagaPersisters.InMemory/NServiceBus.SagaPersisters.InMemory.csproj @@ -1,68 +1,68 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {C59E2545-D26E-4E38-B7A9-8E31A6CA82B1} - Library - Properties - NServiceBus.SagaPersisters.InMemory - NServiceBus.SagaPersisters.InMemory - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.SagaPersisters.InMemory.XML - - - - False - ..\..\..\..\..\build\output\NServiceBus.dll - - - False - ..\..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll - - - False - ..\..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll - - - - 3.5 - - - - - CommonAssemblyInfo.cs - - - - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {C59E2545-D26E-4E38-B7A9-8E31A6CA82B1} + Library + Properties + NServiceBus.SagaPersisters.InMemory + NServiceBus.SagaPersisters.InMemory + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.SagaPersisters.InMemory.XML + + + + False + ..\..\..\..\..\build\output\NServiceBus.dll + + + False + ..\..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll + + + False + ..\..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll + + + + 3.5 + + + + + CommonAssemblyInfo.cs + + + + + + + \ No newline at end of file diff --git a/src/impl/SagaPersisters/InMemory/NServiceBus.SagaPersisters.InMemory/Properties/AssemblyInfo.cs b/src/impl/SagaPersisters/InMemory/NServiceBus.SagaPersisters.InMemory/Properties/AssemblyInfo.cs index 3290e91345f..bf6d997653a 100644 --- a/src/impl/SagaPersisters/InMemory/NServiceBus.SagaPersisters.InMemory/Properties/AssemblyInfo.cs +++ b/src/impl/SagaPersisters/InMemory/NServiceBus.SagaPersisters.InMemory/Properties/AssemblyInfo.cs @@ -1,2 +1,2 @@ -using System.Reflection; +using System.Reflection; [assembly: AssemblyTitle("NServiceBus.SagaPersisters.InMemory")] \ No newline at end of file diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NHibernateSagaPersister.sln b/src/impl/SagaPersisters/NHibernateSagaPersister/NHibernateSagaPersister.sln index 6e69eb5f2bd..2d960b59b60 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NHibernateSagaPersister.sln +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NHibernateSagaPersister.sln @@ -1,44 +1,44 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.SagaPersisters.NHibernate", "NServiceBus.SagaPersisters.NHibernate\NServiceBus.SagaPersisters.NHibernate.csproj", "{4A904B94-8DC4-4C02-A4FD-374E78990374}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.SagaPersisters.NHibernate.Tests", "NServiceBus.SagaPersisters.NHibernate.Tests\NServiceBus.SagaPersisters.NHibernate.Tests.csproj", "{7F1A7421-0335-43D4-8C50-4ED444D19336}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.SagaPersisters.NHibernate.Config", "NServiceBus.SagaPersisters.NHibernate.Config\NServiceBus.SagaPersisters.NHibernate.Config.csproj", "{1EDB9B0E-2D06-41DC-854B-F9BF63181999}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.SagaPersisters.NHibernate.AutoPersistence", "NServiceBus.SagaPersisters.NHibernate.AutoPersistence\NServiceBus.SagaPersisters.NHibernate.AutoPersistence.csproj", "{B19F49E5-7059-4C18-91E7-D35DA4398D0C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.SagaPersisters.Azure.Config", "NServiceBus.SagaPersisters.Azure.Config\NServiceBus.SagaPersisters.Azure.Config.csproj", "{E9BCCCDC-5D5D-48AB-BF7A-5A2FE669D353}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {4A904B94-8DC4-4C02-A4FD-374E78990374}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4A904B94-8DC4-4C02-A4FD-374E78990374}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4A904B94-8DC4-4C02-A4FD-374E78990374}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4A904B94-8DC4-4C02-A4FD-374E78990374}.Release|Any CPU.Build.0 = Release|Any CPU - {7F1A7421-0335-43D4-8C50-4ED444D19336}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7F1A7421-0335-43D4-8C50-4ED444D19336}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7F1A7421-0335-43D4-8C50-4ED444D19336}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7F1A7421-0335-43D4-8C50-4ED444D19336}.Release|Any CPU.Build.0 = Release|Any CPU - {1EDB9B0E-2D06-41DC-854B-F9BF63181999}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1EDB9B0E-2D06-41DC-854B-F9BF63181999}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1EDB9B0E-2D06-41DC-854B-F9BF63181999}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1EDB9B0E-2D06-41DC-854B-F9BF63181999}.Release|Any CPU.Build.0 = Release|Any CPU - {B19F49E5-7059-4C18-91E7-D35DA4398D0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B19F49E5-7059-4C18-91E7-D35DA4398D0C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B19F49E5-7059-4C18-91E7-D35DA4398D0C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B19F49E5-7059-4C18-91E7-D35DA4398D0C}.Release|Any CPU.Build.0 = Release|Any CPU - {E9BCCCDC-5D5D-48AB-BF7A-5A2FE669D353}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E9BCCCDC-5D5D-48AB-BF7A-5A2FE669D353}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E9BCCCDC-5D5D-48AB-BF7A-5A2FE669D353}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E9BCCCDC-5D5D-48AB-BF7A-5A2FE669D353}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.SagaPersisters.NHibernate", "NServiceBus.SagaPersisters.NHibernate\NServiceBus.SagaPersisters.NHibernate.csproj", "{4A904B94-8DC4-4C02-A4FD-374E78990374}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.SagaPersisters.NHibernate.Tests", "NServiceBus.SagaPersisters.NHibernate.Tests\NServiceBus.SagaPersisters.NHibernate.Tests.csproj", "{7F1A7421-0335-43D4-8C50-4ED444D19336}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.SagaPersisters.NHibernate.Config", "NServiceBus.SagaPersisters.NHibernate.Config\NServiceBus.SagaPersisters.NHibernate.Config.csproj", "{1EDB9B0E-2D06-41DC-854B-F9BF63181999}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.SagaPersisters.NHibernate.AutoPersistence", "NServiceBus.SagaPersisters.NHibernate.AutoPersistence\NServiceBus.SagaPersisters.NHibernate.AutoPersistence.csproj", "{B19F49E5-7059-4C18-91E7-D35DA4398D0C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.SagaPersisters.Azure.Config", "NServiceBus.SagaPersisters.Azure.Config\NServiceBus.SagaPersisters.Azure.Config.csproj", "{E9BCCCDC-5D5D-48AB-BF7A-5A2FE669D353}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4A904B94-8DC4-4C02-A4FD-374E78990374}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4A904B94-8DC4-4C02-A4FD-374E78990374}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4A904B94-8DC4-4C02-A4FD-374E78990374}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4A904B94-8DC4-4C02-A4FD-374E78990374}.Release|Any CPU.Build.0 = Release|Any CPU + {7F1A7421-0335-43D4-8C50-4ED444D19336}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7F1A7421-0335-43D4-8C50-4ED444D19336}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7F1A7421-0335-43D4-8C50-4ED444D19336}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7F1A7421-0335-43D4-8C50-4ED444D19336}.Release|Any CPU.Build.0 = Release|Any CPU + {1EDB9B0E-2D06-41DC-854B-F9BF63181999}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1EDB9B0E-2D06-41DC-854B-F9BF63181999}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1EDB9B0E-2D06-41DC-854B-F9BF63181999}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1EDB9B0E-2D06-41DC-854B-F9BF63181999}.Release|Any CPU.Build.0 = Release|Any CPU + {B19F49E5-7059-4C18-91E7-D35DA4398D0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B19F49E5-7059-4C18-91E7-D35DA4398D0C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B19F49E5-7059-4C18-91E7-D35DA4398D0C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B19F49E5-7059-4C18-91E7-D35DA4398D0C}.Release|Any CPU.Build.0 = Release|Any CPU + {E9BCCCDC-5D5D-48AB-BF7A-5A2FE669D353}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E9BCCCDC-5D5D-48AB-BF7A-5A2FE669D353}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E9BCCCDC-5D5D-48AB-BF7A-5A2FE669D353}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E9BCCCDC-5D5D-48AB-BF7A-5A2FE669D353}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.Azure.Config/AzureSagaPersisterConfig.cs b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.Azure.Config/AzureSagaPersisterConfig.cs index ba83d087c34..c9fd8b25228 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.Azure.Config/AzureSagaPersisterConfig.cs +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.Azure.Config/AzureSagaPersisterConfig.cs @@ -1,45 +1,45 @@ -using System.Collections.Generic; -using System.Configuration; - -namespace NServiceBus.Config -{ - /// - /// Config section for the Azure Saga Persister - /// - public class AzureSagaPersisterConfig:ConfigurationSection - { - /// - /// Connectionstring - /// - [ConfigurationProperty("ConnectionString", IsRequired = false, DefaultValue = "UseDevelopmentStorage=true")] - public string ConnectionString - { - get - { - return this["ConnectionString"] as string; - } - set - { - this["ConnectionString"] = value; - } - } - - /// - /// Determines if the database should be auto updated - /// - [ConfigurationProperty("CreateSchema", IsRequired = false, DefaultValue = true)] - public bool CreateSchema - { - - get - { - - return (bool)this["CreateSchema"]; - } - set - { - this["CreateSchema"] = value; - } - } - } +using System.Collections.Generic; +using System.Configuration; + +namespace NServiceBus.Config +{ + /// + /// Config section for the Azure Saga Persister + /// + public class AzureSagaPersisterConfig:ConfigurationSection + { + /// + /// Connectionstring + /// + [ConfigurationProperty("ConnectionString", IsRequired = false, DefaultValue = "UseDevelopmentStorage=true")] + public string ConnectionString + { + get + { + return this["ConnectionString"] as string; + } + set + { + this["ConnectionString"] = value; + } + } + + /// + /// Determines if the database should be auto updated + /// + [ConfigurationProperty("CreateSchema", IsRequired = false, DefaultValue = true)] + public bool CreateSchema + { + + get + { + + return (bool)this["CreateSchema"]; + } + set + { + this["CreateSchema"] = value; + } + } + } } \ No newline at end of file diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.Azure.Config/ConfigureAzureSagaPersister.cs b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.Azure.Config/ConfigureAzureSagaPersister.cs index 2fddfb1a697..cbf9aaf33df 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.Azure.Config/ConfigureAzureSagaPersister.cs +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.Azure.Config/ConfigureAzureSagaPersister.cs @@ -1,80 +1,80 @@ -using System; -using System.Collections.Generic; -using FluentNHibernate.Cfg.Db; -using Microsoft.WindowsAzure.ServiceRuntime; -using NHibernate; -using NHibernate.ByteCode.LinFu; -using NHibernate.Drivers.Azure.TableStorage; -using NServiceBus.Config; -using NServiceBus.ObjectBuilder; -using NServiceBus.SagaPersisters.NHibernate; -using NServiceBus.SagaPersisters.Azure.Config.Internal; - -namespace NServiceBus -{ - /// - /// Contains extension methods to NServiceBus.Configure for the NHibernate saga persister on top of Azure table storage. - /// - public static class ConfigureAzureSagaPersister - { - /// - /// Use the NHibernate backed saga persister implementation. - /// Be aware that this implementation deletes sagas that complete so as not to have the database fill up. - /// SagaData classes are automatically mapped using Fluent NHibernate Conventions. - /// - /// - /// - public static Configure AzureSagaPersister(this Configure config) - { - string connectionstring = string.Empty; - bool updateSchema = false; - - var configSection = Configure.GetConfigSection(); - - if (configSection != null) - { - connectionstring = configSection.ConnectionString; - updateSchema = configSection.CreateSchema; - } - - return AzureSagaPersister(config, connectionstring, updateSchema); - } - - /// - /// Use the NHibernate backed saga persister implementation on top of Azure table storage. - /// SagaData classes are automatically mapped using Fluent NHibernate conventions - /// and there persistence schema is automatically generated if requested. - /// - /// - /// - /// - /// - public static Configure AzureSagaPersister(this Configure config, - string connectionString, - bool autoUpdateSchema) - { - if (!Sagas.Impl.Configure.SagasWereFound) - return config; //no sagas - don't need to do anything - - var nhibernateProperties = MsSqlConfiguration.MsSql2005 - .ConnectionString(connectionString) - .Provider(typeof(TableStorageConnectionProvider).AssemblyQualifiedName) - .Dialect(typeof(TableStorageDialect).AssemblyQualifiedName) - .Driver(typeof(TableStorageDriver).AssemblyQualifiedName) - .ProxyFactoryFactory(typeof(ProxyFactoryFactory).AssemblyQualifiedName) - .ToProperties(); - - var builder = new SessionFactoryBuilder(Configure.TypesToScan); - - var sessionFactory = builder.Build(nhibernateProperties, autoUpdateSchema); - - if (sessionFactory == null) - throw new InvalidOperationException("Could not create session factory for saga persistence."); - - config.Configurer.RegisterSingleton(sessionFactory); - config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singlecall); - - return config; - } - } -} +using System; +using System.Collections.Generic; +using FluentNHibernate.Cfg.Db; +using Microsoft.WindowsAzure.ServiceRuntime; +using NHibernate; +using NHibernate.ByteCode.LinFu; +using NHibernate.Drivers.Azure.TableStorage; +using NServiceBus.Config; +using NServiceBus.ObjectBuilder; +using NServiceBus.SagaPersisters.NHibernate; +using NServiceBus.SagaPersisters.Azure.Config.Internal; + +namespace NServiceBus +{ + /// + /// Contains extension methods to NServiceBus.Configure for the NHibernate saga persister on top of Azure table storage. + /// + public static class ConfigureAzureSagaPersister + { + /// + /// Use the NHibernate backed saga persister implementation. + /// Be aware that this implementation deletes sagas that complete so as not to have the database fill up. + /// SagaData classes are automatically mapped using Fluent NHibernate Conventions. + /// + /// + /// + public static Configure AzureSagaPersister(this Configure config) + { + string connectionstring = string.Empty; + bool updateSchema = false; + + var configSection = Configure.GetConfigSection(); + + if (configSection != null) + { + connectionstring = configSection.ConnectionString; + updateSchema = configSection.CreateSchema; + } + + return AzureSagaPersister(config, connectionstring, updateSchema); + } + + /// + /// Use the NHibernate backed saga persister implementation on top of Azure table storage. + /// SagaData classes are automatically mapped using Fluent NHibernate conventions + /// and there persistence schema is automatically generated if requested. + /// + /// + /// + /// + /// + public static Configure AzureSagaPersister(this Configure config, + string connectionString, + bool autoUpdateSchema) + { + if (!Sagas.Impl.Configure.SagasWereFound) + return config; //no sagas - don't need to do anything + + var nhibernateProperties = MsSqlConfiguration.MsSql2005 + .ConnectionString(connectionString) + .Provider(typeof(TableStorageConnectionProvider).AssemblyQualifiedName) + .Dialect(typeof(TableStorageDialect).AssemblyQualifiedName) + .Driver(typeof(TableStorageDriver).AssemblyQualifiedName) + .ProxyFactoryFactory(typeof(ProxyFactoryFactory).AssemblyQualifiedName) + .ToProperties(); + + var builder = new SessionFactoryBuilder(Configure.TypesToScan); + + var sessionFactory = builder.Build(nhibernateProperties, autoUpdateSchema); + + if (sessionFactory == null) + throw new InvalidOperationException("Could not create session factory for saga persistence."); + + config.Configurer.RegisterSingleton(sessionFactory); + config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singlecall); + + return config; + } + } +} diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.Azure.Config/Internal/SessionFactoryBuilder.cs b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.Azure.Config/Internal/SessionFactoryBuilder.cs index 0232e59d16a..4744826d13b 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.Azure.Config/Internal/SessionFactoryBuilder.cs +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.Azure.Config/Internal/SessionFactoryBuilder.cs @@ -1,108 +1,108 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Linq; -using FluentNHibernate.Cfg; -using NHibernate; -using NHibernate.ByteCode.LinFu; -using NHibernate.Context; -using NHibernate.Drivers.Azure.TableStorage.Mapping; -using NHibernate.Tool.hbm2ddl; -using NServiceBus.SagaPersisters.NHibernate.AutoPersistence; -using Configuration=NHibernate.Cfg.Configuration; - -namespace NServiceBus.SagaPersisters.Azure.Config.Internal -{ - /// - /// Builder class for the NHibernate Session Factory - /// - public class SessionFactoryBuilder - { - private readonly IEnumerable typesToScan; - - /// - /// Constructor that accepts the types to scan for saga data classes - /// - /// - public SessionFactoryBuilder(IEnumerable typesToScan) - { - this.typesToScan = typesToScan; - } - - /// - /// Builds the session factory with the given properties. Database is updated if updateSchema is set - /// - /// - /// - /// - public ISessionFactory Build(IDictionary nhibernateProperties, bool updateSchema) - { - var model = Create.SagaPersistenceModel(typesToScan); - - model.Conventions.Add(); - - var scannedAssemblies = typesToScan.Select(t => t.Assembly).Distinct(); - - var nhibernateConfiguration = new Configuration().SetProperties(nhibernateProperties); - - foreach (var assembly in scannedAssemblies) - { - nhibernateConfiguration.AddAssembly(assembly); - } - - var fluentConfiguration = Fluently.Configure(nhibernateConfiguration) - .Mappings(m => m.AutoMappings.Add(model)); - - ApplyDefaultsTo(fluentConfiguration); - - try - { - var factory = fluentConfiguration.BuildSessionFactory(); - - if (updateSchema) - { - UpdateDatabaseSchemaUsing(fluentConfiguration, factory); - } - - return factory; - } - catch (FluentConfigurationException e) - { - if (e.InnerException != null) - throw new ConfigurationErrorsException(e.InnerException.Message, e); - - throw; - } - } - - private static void UpdateDatabaseSchemaUsing(FluentConfiguration fluentConfiguration, ISessionFactory factory) - { - var configuration = fluentConfiguration.BuildConfiguration(); - - using (var session = factory.OpenSession()) - { - var export = new SchemaExport(configuration); - export.Execute(true, true, false, session.Connection, null); - session.Flush(); - } - } - - private static void ApplyDefaultsTo(FluentConfiguration fluentConfiguration) - { - fluentConfiguration.ExposeConfiguration( - c => - { - c.SetProperty("current_session_context_class",typeof(ThreadStaticSessionContext).AssemblyQualifiedName); - - //default to LinFu if not specifed by user - if (!c.Properties.Keys.Contains(PROXY_FACTORY_KEY)) - c.SetProperty(PROXY_FACTORY_KEY,typeof(ProxyFactoryFactory).AssemblyQualifiedName); - } - ); - } - - - - private const string PROXY_FACTORY_KEY = "proxyfactory.factory_class"; - } +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Linq; +using FluentNHibernate.Cfg; +using NHibernate; +using NHibernate.ByteCode.LinFu; +using NHibernate.Context; +using NHibernate.Drivers.Azure.TableStorage.Mapping; +using NHibernate.Tool.hbm2ddl; +using NServiceBus.SagaPersisters.NHibernate.AutoPersistence; +using Configuration=NHibernate.Cfg.Configuration; + +namespace NServiceBus.SagaPersisters.Azure.Config.Internal +{ + /// + /// Builder class for the NHibernate Session Factory + /// + public class SessionFactoryBuilder + { + private readonly IEnumerable typesToScan; + + /// + /// Constructor that accepts the types to scan for saga data classes + /// + /// + public SessionFactoryBuilder(IEnumerable typesToScan) + { + this.typesToScan = typesToScan; + } + + /// + /// Builds the session factory with the given properties. Database is updated if updateSchema is set + /// + /// + /// + /// + public ISessionFactory Build(IDictionary nhibernateProperties, bool updateSchema) + { + var model = Create.SagaPersistenceModel(typesToScan); + + model.Conventions.Add(); + + var scannedAssemblies = typesToScan.Select(t => t.Assembly).Distinct(); + + var nhibernateConfiguration = new Configuration().SetProperties(nhibernateProperties); + + foreach (var assembly in scannedAssemblies) + { + nhibernateConfiguration.AddAssembly(assembly); + } + + var fluentConfiguration = Fluently.Configure(nhibernateConfiguration) + .Mappings(m => m.AutoMappings.Add(model)); + + ApplyDefaultsTo(fluentConfiguration); + + try + { + var factory = fluentConfiguration.BuildSessionFactory(); + + if (updateSchema) + { + UpdateDatabaseSchemaUsing(fluentConfiguration, factory); + } + + return factory; + } + catch (FluentConfigurationException e) + { + if (e.InnerException != null) + throw new ConfigurationErrorsException(e.InnerException.Message, e); + + throw; + } + } + + private static void UpdateDatabaseSchemaUsing(FluentConfiguration fluentConfiguration, ISessionFactory factory) + { + var configuration = fluentConfiguration.BuildConfiguration(); + + using (var session = factory.OpenSession()) + { + var export = new SchemaExport(configuration); + export.Execute(true, true, false, session.Connection, null); + session.Flush(); + } + } + + private static void ApplyDefaultsTo(FluentConfiguration fluentConfiguration) + { + fluentConfiguration.ExposeConfiguration( + c => + { + c.SetProperty("current_session_context_class",typeof(ThreadStaticSessionContext).AssemblyQualifiedName); + + //default to LinFu if not specifed by user + if (!c.Properties.Keys.Contains(PROXY_FACTORY_KEY)) + c.SetProperty(PROXY_FACTORY_KEY,typeof(ProxyFactoryFactory).AssemblyQualifiedName); + } + ); + } + + + + private const string PROXY_FACTORY_KEY = "proxyfactory.factory_class"; + } } \ No newline at end of file diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.Azure.Config/NServiceBus.SagaPersisters.Azure.Config.csproj b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.Azure.Config/NServiceBus.SagaPersisters.Azure.Config.csproj index 365b7eb8bfd..edb4e15fd06 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.Azure.Config/NServiceBus.SagaPersisters.Azure.Config.csproj +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.Azure.Config/NServiceBus.SagaPersisters.Azure.Config.csproj @@ -1,98 +1,98 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {E9BCCCDC-5D5D-48AB-BF7A-5A2FE669D353} - Library - Properties - NServiceBus.SagaPersisters.Azure.Config - NServiceBus.SagaPersisters.Azure.Config - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\..\..\..\..\lib\Common.Logging.dll - - - ..\..\..\..\..\lib\FluentNHibernate\FluentNHibernate.dll - - - False - ..\..\..\..\..\lib\Azure\Microsoft.WindowsAzure.ServiceRuntime.dll - - - ..\..\..\..\..\lib\NHibernate.dll - - - ..\..\..\..\..\lib\NHibernate.ByteCode.LinFu.dll - - - ..\..\..\..\..\lib\NHibernate.Drivers.Azure.TableStorage.dll - - - ..\..\..\..\..\build\output\NServiceBus.dll - - - ..\..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll - - - ..\..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll - - - ..\..\..\..\..\build\nservicebus.core\NServiceBus.Sagas.Impl.dll - - - - - - - - - - - - - - - - - - - {B19F49E5-7059-4C18-91E7-D35DA4398D0C} - NServiceBus.SagaPersisters.NHibernate.AutoPersistence - - - {4A904B94-8DC4-4C02-A4FD-374E78990374} - NServiceBus.SagaPersisters.NHibernate - - - - + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {E9BCCCDC-5D5D-48AB-BF7A-5A2FE669D353} + Library + Properties + NServiceBus.SagaPersisters.Azure.Config + NServiceBus.SagaPersisters.Azure.Config + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\..\..\..\lib\Common.Logging.dll + + + ..\..\..\..\..\lib\FluentNHibernate\FluentNHibernate.dll + + + False + ..\..\..\..\..\lib\Azure\Microsoft.WindowsAzure.ServiceRuntime.dll + + + ..\..\..\..\..\lib\NHibernate.dll + + + ..\..\..\..\..\lib\NHibernate.ByteCode.LinFu.dll + + + ..\..\..\..\..\lib\NHibernate.Drivers.Azure.TableStorage.dll + + + ..\..\..\..\..\build\output\NServiceBus.dll + + + ..\..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll + + + ..\..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll + + + ..\..\..\..\..\build\nservicebus.core\NServiceBus.Sagas.Impl.dll + + + + + + + + + + + + + + + + + + + {B19F49E5-7059-4C18-91E7-D35DA4398D0C} + NServiceBus.SagaPersisters.NHibernate.AutoPersistence + + + {4A904B94-8DC4-4C02-A4FD-374E78990374} + NServiceBus.SagaPersisters.NHibernate + + + + \ No newline at end of file diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.Azure.Config/Properties/AssemblyInfo.cs b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.Azure.Config/Properties/AssemblyInfo.cs index 560917c2dd7..8f3010ada90 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.Azure.Config/Properties/AssemblyInfo.cs +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.Azure.Config/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("NServiceBus.SagaPersisters.Azure.Config")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Capgemini")] -[assembly: AssemblyProduct("NServiceBus.SagaPersisters.Azure.Config")] -[assembly: AssemblyCopyright("Copyright © Capgemini 2010")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("ccc7e7e4-cb13-4f2f-81a1-618cde808eab")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("NServiceBus.SagaPersisters.Azure.Config")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Capgemini")] +[assembly: AssemblyProduct("NServiceBus.SagaPersisters.Azure.Config")] +[assembly: AssemblyCopyright("Copyright © Capgemini 2010")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("ccc7e7e4-cb13-4f2f-81a1-618cde808eab")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.AutoPersistence/Attributes/TableNameAttribute.cs b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.AutoPersistence/Attributes/TableNameAttribute.cs index dacc0e62190..9b411301487 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.AutoPersistence/Attributes/TableNameAttribute.cs +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.AutoPersistence/Attributes/TableNameAttribute.cs @@ -1,14 +1,14 @@ -using System; - -namespace NServiceBus.SagaPersisters.NHibernate.AutoPersistence.Attributes -{ - public class TableNameAttribute : Attribute - { - public string TableName { get; private set; } - - public TableNameAttribute(string tableName) - { - TableName = tableName; - } - } +using System; + +namespace NServiceBus.SagaPersisters.NHibernate.AutoPersistence.Attributes +{ + public class TableNameAttribute : Attribute + { + public string TableName { get; private set; } + + public TableNameAttribute(string tableName) + { + TableName = tableName; + } + } } \ No newline at end of file diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.AutoPersistence/Attributes/UniqueAttribute.cs b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.AutoPersistence/Attributes/UniqueAttribute.cs index b143ecfe539..d4326feb9df 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.AutoPersistence/Attributes/UniqueAttribute.cs +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.AutoPersistence/Attributes/UniqueAttribute.cs @@ -1,8 +1,8 @@ -using System; - -namespace NServiceBus.SagaPersisters.NHibernate.AutoPersistence.Attributes -{ - public class UniqueAttribute : Attribute - { - } +using System; + +namespace NServiceBus.SagaPersisters.NHibernate.AutoPersistence.Attributes +{ + public class UniqueAttribute : Attribute + { + } } \ No newline at end of file diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.AutoPersistence/Conventions/CollectionsShouldCascadeConvention.cs b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.AutoPersistence/Conventions/CollectionsShouldCascadeConvention.cs index afc57bd3f5c..28b5b91cd71 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.AutoPersistence/Conventions/CollectionsShouldCascadeConvention.cs +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.AutoPersistence/Conventions/CollectionsShouldCascadeConvention.cs @@ -1,13 +1,13 @@ -using FluentNHibernate.Conventions; -using FluentNHibernate.Conventions.Instances; - -namespace NServiceBus.SagaPersisters.NHibernate.AutoPersistence.Conventions -{ - public class CollectionsShouldCascadeConvention : IHasManyConvention - { - public void Apply(IOneToManyCollectionInstance instance) - { - instance.Cascade.AllDeleteOrphan(); - } - } +using FluentNHibernate.Conventions; +using FluentNHibernate.Conventions.Instances; + +namespace NServiceBus.SagaPersisters.NHibernate.AutoPersistence.Conventions +{ + public class CollectionsShouldCascadeConvention : IHasManyConvention + { + public void Apply(IOneToManyCollectionInstance instance) + { + instance.Cascade.AllDeleteOrphan(); + } + } } \ No newline at end of file diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.AutoPersistence/Conventions/IdShouldBeAssignedConvention.cs b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.AutoPersistence/Conventions/IdShouldBeAssignedConvention.cs index 97dbc33eff5..69aaaab1a6c 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.AutoPersistence/Conventions/IdShouldBeAssignedConvention.cs +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.AutoPersistence/Conventions/IdShouldBeAssignedConvention.cs @@ -1,23 +1,23 @@ -using FluentNHibernate.Conventions; -using FluentNHibernate.Conventions.Instances; -using NServiceBus.Saga; - -namespace NServiceBus.SagaPersisters.NHibernate.AutoPersistence.Conventions -{ - public class IdShouldBeAssignedConvention : IIdConvention - - { - public void Apply(IIdentityInstance instance) - { - if (typeof(ISagaEntity).IsAssignableFrom(instance.EntityType)) - { - instance.GeneratedBy.Assigned(); - } - else - instance.GeneratedBy.GuidComb(); - } - - - - } +using FluentNHibernate.Conventions; +using FluentNHibernate.Conventions.Instances; +using NServiceBus.Saga; + +namespace NServiceBus.SagaPersisters.NHibernate.AutoPersistence.Conventions +{ + public class IdShouldBeAssignedConvention : IIdConvention + + { + public void Apply(IIdentityInstance instance) + { + if (typeof(ISagaEntity).IsAssignableFrom(instance.EntityType)) + { + instance.GeneratedBy.Assigned(); + } + else + instance.GeneratedBy.GuidComb(); + } + + + + } } \ No newline at end of file diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.AutoPersistence/Conventions/TableNameBasedOnAttributeConvention.cs b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.AutoPersistence/Conventions/TableNameBasedOnAttributeConvention.cs index 1704b8b3545..d147c080dfa 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.AutoPersistence/Conventions/TableNameBasedOnAttributeConvention.cs +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.AutoPersistence/Conventions/TableNameBasedOnAttributeConvention.cs @@ -1,38 +1,38 @@ -using System; -using System.Linq; -using FluentNHibernate.Conventions; -using FluentNHibernate.Conventions.AcceptanceCriteria; -using FluentNHibernate.Conventions.Inspections; -using FluentNHibernate.Conventions.Instances; -using NServiceBus.SagaPersisters.NHibernate.AutoPersistence.Attributes; - -namespace NServiceBus.SagaPersisters.NHibernate.AutoPersistence.Conventions -{ - public class TableNameBasedOnAttributeConvention : IClassConvention, IJoinedSubclassConvention, IConventionAcceptance - { - public void Accept(IAcceptanceCriteria criteria) - { - criteria.Expect(x => GetAttribute(x.EntityType) != null); - } - - public void Apply(IClassInstance instance) - { - instance.Table(GetAttribute(instance.EntityType).TableName); - } - - public void Apply(IJoinedSubclassInstance instance) - { - var attribute = GetAttribute(instance.EntityType); - if (attribute != null) - { - instance.Table(attribute.TableName); - } - } - - static TableNameAttribute GetAttribute(Type type) - { - var attributes = type.GetCustomAttributes(typeof(TableNameAttribute), false); - return attributes.FirstOrDefault() as TableNameAttribute; - } - } +using System; +using System.Linq; +using FluentNHibernate.Conventions; +using FluentNHibernate.Conventions.AcceptanceCriteria; +using FluentNHibernate.Conventions.Inspections; +using FluentNHibernate.Conventions.Instances; +using NServiceBus.SagaPersisters.NHibernate.AutoPersistence.Attributes; + +namespace NServiceBus.SagaPersisters.NHibernate.AutoPersistence.Conventions +{ + public class TableNameBasedOnAttributeConvention : IClassConvention, IJoinedSubclassConvention, IConventionAcceptance + { + public void Accept(IAcceptanceCriteria criteria) + { + criteria.Expect(x => GetAttribute(x.EntityType) != null); + } + + public void Apply(IClassInstance instance) + { + instance.Table(GetAttribute(instance.EntityType).TableName); + } + + public void Apply(IJoinedSubclassInstance instance) + { + var attribute = GetAttribute(instance.EntityType); + if (attribute != null) + { + instance.Table(attribute.TableName); + } + } + + static TableNameAttribute GetAttribute(Type type) + { + var attributes = type.GetCustomAttributes(typeof(TableNameAttribute), false); + return attributes.FirstOrDefault() as TableNameAttribute; + } + } } \ No newline at end of file diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.AutoPersistence/Conventions/UniqueConvention.cs b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.AutoPersistence/Conventions/UniqueConvention.cs index 1e3ff7fcf98..64a82fd690d 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.AutoPersistence/Conventions/UniqueConvention.cs +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.AutoPersistence/Conventions/UniqueConvention.cs @@ -1,16 +1,16 @@ -using FluentNHibernate.Conventions; -using FluentNHibernate.Conventions.Instances; -using NServiceBus.SagaPersisters.NHibernate.AutoPersistence.Attributes; - -namespace NServiceBus.SagaPersisters.NHibernate.AutoPersistence.Conventions -{ - public class UniqueConvention : IPropertyConvention - { - public void Apply(IPropertyInstance instance) - { - foreach (object attribute in instance.Property.MemberInfo.GetCustomAttributes(true)) - if (attribute is UniqueAttribute) - instance.Unique(); - } - } +using FluentNHibernate.Conventions; +using FluentNHibernate.Conventions.Instances; +using NServiceBus.SagaPersisters.NHibernate.AutoPersistence.Attributes; + +namespace NServiceBus.SagaPersisters.NHibernate.AutoPersistence.Conventions +{ + public class UniqueConvention : IPropertyConvention + { + public void Apply(IPropertyInstance instance) + { + foreach (object attribute in instance.Property.MemberInfo.GetCustomAttributes(true)) + if (attribute is UniqueAttribute) + instance.Unique(); + } + } } \ No newline at end of file diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.AutoPersistence/Create.cs b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.AutoPersistence/Create.cs index 80784e7b951..076db15b920 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.AutoPersistence/Create.cs +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.AutoPersistence/Create.cs @@ -1,100 +1,100 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using FluentNHibernate.Automapping; -using NServiceBus.Saga; -using NServiceBus.SagaPersisters.NHibernate.AutoPersistence.Conventions; - -namespace NServiceBus.SagaPersisters.NHibernate.AutoPersistence -{ - public static class Create - { - public static AutoPersistenceModel SagaPersistenceModel(IEnumerable typesToScan) - { - var sagaEntites = typesToScan.Where(t => typeof(ISagaEntity).IsAssignableFrom(t) && !t.IsInterface); - - - var model = new AutoPersistenceModel(); - - model.Conventions.AddFromAssemblyOf(); - - var entityTypes = GetTypesThatShouldBeAutoMapped(sagaEntites,typesToScan); - - var assembliesContainingSagas = sagaEntites.Select(t => t.Assembly).Distinct(); - - foreach (var assembly in assembliesContainingSagas) - model.AddEntityAssembly(assembly) - .Where(t => entityTypes.Contains(t)); - - var componentTypes = GetTypesThatShouldBeMappedAsComponents(sagaEntites); - - model.Setup(s => - { - s.IsComponentType = - type => componentTypes.Contains(type); - }); - return model; - } - - private static IEnumerable GetTypesThatShouldBeAutoMapped(IEnumerable sagaEntites, IEnumerable typesToScan) - { - IList entityTypes = new List(); - - foreach (var rootEntity in sagaEntites) - { - AddEntitesToBeMapped(rootEntity,entityTypes,typesToScan); - } - return entityTypes; - } - - private static void AddEntitesToBeMapped(Type rootEntity, ICollection foundEntities, IEnumerable typesToScan) - { - if(foundEntities.Contains(rootEntity)) - return; - - foundEntities.Add(rootEntity); - - var propertyTypes = rootEntity.GetProperties() - .Select(p => p.PropertyType); - - foreach (var propertyType in propertyTypes) - { - if (propertyType.GetProperty("Id") != null) - AddEntitesToBeMapped(propertyType, foundEntities,typesToScan); - - if (propertyType.IsGenericType) - { - var args = propertyType.GetGenericArguments(); - - if(args[0].GetProperty("Id") != null) - AddEntitesToBeMapped(args[0],foundEntities,typesToScan); - - } - } - var derivedTypes = typesToScan.Where(t => t.IsSubclassOf(rootEntity)); - - foreach (var derivedType in derivedTypes) - { - AddEntitesToBeMapped(derivedType, foundEntities, typesToScan); - } - } - - private static IEnumerable GetTypesThatShouldBeMappedAsComponents(IEnumerable sagaEntites) - { - IEnumerable componentTypes = new List(); - - foreach (var sagaEntity in sagaEntites) - { - var propertyTypes = sagaEntity.GetProperties() - .Select(p => p.PropertyType) - .Where(t => - !t.Namespace.StartsWith("System") && - t.GetProperty("Id") == null && - !t.IsEnum); - - componentTypes = componentTypes.Concat(propertyTypes); - } - return componentTypes; - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using FluentNHibernate.Automapping; +using NServiceBus.Saga; +using NServiceBus.SagaPersisters.NHibernate.AutoPersistence.Conventions; + +namespace NServiceBus.SagaPersisters.NHibernate.AutoPersistence +{ + public static class Create + { + public static AutoPersistenceModel SagaPersistenceModel(IEnumerable typesToScan) + { + var sagaEntites = typesToScan.Where(t => typeof(ISagaEntity).IsAssignableFrom(t) && !t.IsInterface); + + + var model = new AutoPersistenceModel(); + + model.Conventions.AddFromAssemblyOf(); + + var entityTypes = GetTypesThatShouldBeAutoMapped(sagaEntites,typesToScan); + + var assembliesContainingSagas = sagaEntites.Select(t => t.Assembly).Distinct(); + + foreach (var assembly in assembliesContainingSagas) + model.AddEntityAssembly(assembly) + .Where(t => entityTypes.Contains(t)); + + var componentTypes = GetTypesThatShouldBeMappedAsComponents(sagaEntites); + + model.Setup(s => + { + s.IsComponentType = + type => componentTypes.Contains(type); + }); + return model; + } + + private static IEnumerable GetTypesThatShouldBeAutoMapped(IEnumerable sagaEntites, IEnumerable typesToScan) + { + IList entityTypes = new List(); + + foreach (var rootEntity in sagaEntites) + { + AddEntitesToBeMapped(rootEntity,entityTypes,typesToScan); + } + return entityTypes; + } + + private static void AddEntitesToBeMapped(Type rootEntity, ICollection foundEntities, IEnumerable typesToScan) + { + if(foundEntities.Contains(rootEntity)) + return; + + foundEntities.Add(rootEntity); + + var propertyTypes = rootEntity.GetProperties() + .Select(p => p.PropertyType); + + foreach (var propertyType in propertyTypes) + { + if (propertyType.GetProperty("Id") != null) + AddEntitesToBeMapped(propertyType, foundEntities,typesToScan); + + if (propertyType.IsGenericType) + { + var args = propertyType.GetGenericArguments(); + + if(args[0].GetProperty("Id") != null) + AddEntitesToBeMapped(args[0],foundEntities,typesToScan); + + } + } + var derivedTypes = typesToScan.Where(t => t.IsSubclassOf(rootEntity)); + + foreach (var derivedType in derivedTypes) + { + AddEntitesToBeMapped(derivedType, foundEntities, typesToScan); + } + } + + private static IEnumerable GetTypesThatShouldBeMappedAsComponents(IEnumerable sagaEntites) + { + IEnumerable componentTypes = new List(); + + foreach (var sagaEntity in sagaEntites) + { + var propertyTypes = sagaEntity.GetProperties() + .Select(p => p.PropertyType) + .Where(t => + !t.Namespace.StartsWith("System") && + t.GetProperty("Id") == null && + !t.IsEnum); + + componentTypes = componentTypes.Concat(propertyTypes); + } + return componentTypes; + } + } +} diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.AutoPersistence/NServiceBus.SagaPersisters.NHibernate.AutoPersistence.csproj b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.AutoPersistence/NServiceBus.SagaPersisters.NHibernate.AutoPersistence.csproj index 9355a1abef5..7353c48a2aa 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.AutoPersistence/NServiceBus.SagaPersisters.NHibernate.AutoPersistence.csproj +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.AutoPersistence/NServiceBus.SagaPersisters.NHibernate.AutoPersistence.csproj @@ -1,75 +1,75 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {B19F49E5-7059-4C18-91E7-D35DA4398D0C} - Library - Properties - NServiceBus.SagaPersisters.NHibernate.AutoPersistence - NServiceBus.SagaPersisters.NHibernate.AutoPersistence - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\..\..\lib\FluentNHibernate\FluentNHibernate.dll - False - - - False - ..\..\..\..\..\lib\NHibernate.dll - - - False - ..\..\..\..\..\build\output\NServiceBus.dll - - - - - - - - CommonAssemblyInfo.cs - - - - - - - - - - - - - - xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\..\build\nhibernate\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {B19F49E5-7059-4C18-91E7-D35DA4398D0C} + Library + Properties + NServiceBus.SagaPersisters.NHibernate.AutoPersistence + NServiceBus.SagaPersisters.NHibernate.AutoPersistence + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\..\..\lib\FluentNHibernate\FluentNHibernate.dll + False + + + False + ..\..\..\..\..\lib\NHibernate.dll + + + False + ..\..\..\..\..\build\output\NServiceBus.dll + + + + + + + + CommonAssemblyInfo.cs + + + + + + + + + + + + + + xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\..\build\nhibernate\" + \ No newline at end of file diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.AutoPersistence/Properties/AssemblyInfo.cs b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.AutoPersistence/Properties/AssemblyInfo.cs index 49555392f65..14f1c0be799 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.AutoPersistence/Properties/AssemblyInfo.cs +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.AutoPersistence/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus NHibernate AutoPersistence for Sagas")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus NHibernate AutoPersistence for Sagas")] [assembly: AssemblyDescription("FluentNHibernate-based auto-persistence of sagas.")] \ No newline at end of file diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Config/ConfigureNHibernateSagaPersister.cs b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Config/ConfigureNHibernateSagaPersister.cs index 98d4aae5c7a..db1078ccd58 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Config/ConfigureNHibernateSagaPersister.cs +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Config/ConfigureNHibernateSagaPersister.cs @@ -1,91 +1,91 @@ -using System; -using System.Collections.Generic; -using FluentNHibernate.Cfg.Db; -using NHibernate; -using NHibernate.ByteCode.LinFu; -using NServiceBus.Config; -using NServiceBus.ObjectBuilder; -using NServiceBus.SagaPersisters.NHibernate; -using NServiceBus.SagaPersisters.NHibernate.Config.Internal; - -namespace NServiceBus -{ - /// - /// Contains extension methods to NServiceBus.Configure for the NHibernate saga persister. - /// - public static class ConfigureNHibernateSagaPersister - { - /// - /// Use the NHibernate backed saga persister implementation. - /// Be aware that this implementation deletes sagas that complete so as not to have the database fill up. - /// SagaData classes are automatically mapped using Fluent NHibernate Conventions. - /// - /// - /// - public static Configure NHibernateSagaPersister(this Configure config) - { - IDictionary nhibernateProperties = null; - bool updateSchema = false; - - var configSection = Configure.GetConfigSection(); - - if (configSection != null) - { - nhibernateProperties = configSection.NHibernateProperties.ToProperties(); - updateSchema = configSection.UpdateSchema; - } - - return NHibernateSagaPersister(config, nhibernateProperties, updateSchema); - } - - /// - /// Use the NHibernate backed saga persister implementation on top of SQLite. - /// SagaData classes are automatically mapped using Fluent NHibernate conventions - /// and there persistence schema is also automatically generated. - /// - /// - /// - public static Configure NHibernateSagaPersisterWithSQLiteAndAutomaticSchemaGeneration(this Configure config) - { - var nhibernateProperties = SQLiteConfiguration.Standard - .UsingFile(".\\NServiceBus.Sagas.sqlite") - .ProxyFactoryFactory(typeof(ProxyFactoryFactory).AssemblyQualifiedName) - .ToProperties(); - - return NHibernateSagaPersister(config, nhibernateProperties, true); - } - - - /// - /// Use the NHibernate backed saga persister implementation. - /// SagaData classes are automatically mapped using Fluent NHibernate conventions - /// and there persistence schema is automatically generated if requested. - /// - /// - /// - /// - /// - public static Configure NHibernateSagaPersister(this Configure config, - IDictionary nhibernateProperties, - bool autoUpdateSchema) - { - if (!Sagas.Impl.Configure.SagasWereFound) - return config; //no sagas - don't need to do anything - - if (nhibernateProperties == null) - throw new InvalidOperationException("No properties configured for NHibernate. Check that you have a configuration section called 'NHibernateSagaPersisterConfig'."); - - var builder = new SessionFactoryBuilder(Configure.TypesToScan); - - var sessionFactory = builder.Build(nhibernateProperties, autoUpdateSchema); - - if (sessionFactory == null) - throw new InvalidOperationException("Could not create session factory for saga persistence."); - - config.Configurer.RegisterSingleton(sessionFactory); - config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singlecall); - - return config; - } - } -} +using System; +using System.Collections.Generic; +using FluentNHibernate.Cfg.Db; +using NHibernate; +using NHibernate.ByteCode.LinFu; +using NServiceBus.Config; +using NServiceBus.ObjectBuilder; +using NServiceBus.SagaPersisters.NHibernate; +using NServiceBus.SagaPersisters.NHibernate.Config.Internal; + +namespace NServiceBus +{ + /// + /// Contains extension methods to NServiceBus.Configure for the NHibernate saga persister. + /// + public static class ConfigureNHibernateSagaPersister + { + /// + /// Use the NHibernate backed saga persister implementation. + /// Be aware that this implementation deletes sagas that complete so as not to have the database fill up. + /// SagaData classes are automatically mapped using Fluent NHibernate Conventions. + /// + /// + /// + public static Configure NHibernateSagaPersister(this Configure config) + { + IDictionary nhibernateProperties = null; + bool updateSchema = false; + + var configSection = Configure.GetConfigSection(); + + if (configSection != null) + { + nhibernateProperties = configSection.NHibernateProperties.ToProperties(); + updateSchema = configSection.UpdateSchema; + } + + return NHibernateSagaPersister(config, nhibernateProperties, updateSchema); + } + + /// + /// Use the NHibernate backed saga persister implementation on top of SQLite. + /// SagaData classes are automatically mapped using Fluent NHibernate conventions + /// and there persistence schema is also automatically generated. + /// + /// + /// + public static Configure NHibernateSagaPersisterWithSQLiteAndAutomaticSchemaGeneration(this Configure config) + { + var nhibernateProperties = SQLiteConfiguration.Standard + .UsingFile(".\\NServiceBus.Sagas.sqlite") + .ProxyFactoryFactory(typeof(ProxyFactoryFactory).AssemblyQualifiedName) + .ToProperties(); + + return NHibernateSagaPersister(config, nhibernateProperties, true); + } + + + /// + /// Use the NHibernate backed saga persister implementation. + /// SagaData classes are automatically mapped using Fluent NHibernate conventions + /// and there persistence schema is automatically generated if requested. + /// + /// + /// + /// + /// + public static Configure NHibernateSagaPersister(this Configure config, + IDictionary nhibernateProperties, + bool autoUpdateSchema) + { + if (!Sagas.Impl.Configure.SagasWereFound) + return config; //no sagas - don't need to do anything + + if (nhibernateProperties == null) + throw new InvalidOperationException("No properties configured for NHibernate. Check that you have a configuration section called 'NHibernateSagaPersisterConfig'."); + + var builder = new SessionFactoryBuilder(Configure.TypesToScan); + + var sessionFactory = builder.Build(nhibernateProperties, autoUpdateSchema); + + if (sessionFactory == null) + throw new InvalidOperationException("Could not create session factory for saga persistence."); + + config.Configurer.RegisterSingleton(sessionFactory); + config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singlecall); + + return config; + } + } +} diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Config/Internal/SessionFactoryBuilder.cs b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Config/Internal/SessionFactoryBuilder.cs index 2e86227cfa6..fc56c0df4d2 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Config/Internal/SessionFactoryBuilder.cs +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Config/Internal/SessionFactoryBuilder.cs @@ -1,98 +1,98 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Linq; -using FluentNHibernate.Cfg; -using NHibernate; -using NHibernate.ByteCode.LinFu; -using NHibernate.Context; -using NHibernate.Tool.hbm2ddl; -using NServiceBus.SagaPersisters.NHibernate.AutoPersistence; -using Configuration=NHibernate.Cfg.Configuration; - -namespace NServiceBus.SagaPersisters.NHibernate.Config.Internal -{ - /// - /// Builder class for the NHibernate Session Factory - /// - public class SessionFactoryBuilder - { - private readonly IEnumerable typesToScan; - - /// - /// Constructor that accepts the types to scan for saga data classes - /// - /// - public SessionFactoryBuilder(IEnumerable typesToScan) - { - this.typesToScan = typesToScan; - } - - /// - /// Builds the session factory with the given properties. Database is updated if updateSchema is set - /// - /// - /// - /// - public ISessionFactory Build(IDictionary nhibernateProperties, bool updateSchema) - { - var model = Create.SagaPersistenceModel(typesToScan); - var scannedAssemblies = typesToScan.Select(t => t.Assembly).Distinct(); - - var nhibernateConfiguration = new Configuration().SetProperties(nhibernateProperties); - - foreach (var assembly in scannedAssemblies) - { - nhibernateConfiguration.AddAssembly(assembly); - } - - var fluentConfiguration = Fluently.Configure(nhibernateConfiguration) - .Mappings(m => m.AutoMappings.Add(model)); - - ApplyDefaultsTo(fluentConfiguration); - - if (updateSchema) - { - UpdateDatabaseSchemaUsing(fluentConfiguration); - } - - try - { - return fluentConfiguration.BuildSessionFactory(); - } - catch (FluentConfigurationException e) - { - if (e.InnerException != null) - throw new ConfigurationErrorsException(e.InnerException.Message, e); - - throw; - } - } - - private static void UpdateDatabaseSchemaUsing(FluentConfiguration fluentConfiguration) - { - var configuration = fluentConfiguration.BuildConfiguration(); - - new SchemaUpdate(configuration) - .Execute(false, true); - } - - private static void ApplyDefaultsTo(FluentConfiguration fluentConfiguration) - { - fluentConfiguration.ExposeConfiguration( - c => - { - c.SetProperty("current_session_context_class",typeof(ThreadStaticSessionContext).AssemblyQualifiedName); - - //default to LinFu if not specifed by user - if (!c.Properties.Keys.Contains(PROXY_FACTORY_KEY)) - c.SetProperty(PROXY_FACTORY_KEY,typeof(ProxyFactoryFactory).AssemblyQualifiedName); - } - ); - } - - - - private const string PROXY_FACTORY_KEY = "proxyfactory.factory_class"; - } +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Linq; +using FluentNHibernate.Cfg; +using NHibernate; +using NHibernate.ByteCode.LinFu; +using NHibernate.Context; +using NHibernate.Tool.hbm2ddl; +using NServiceBus.SagaPersisters.NHibernate.AutoPersistence; +using Configuration=NHibernate.Cfg.Configuration; + +namespace NServiceBus.SagaPersisters.NHibernate.Config.Internal +{ + /// + /// Builder class for the NHibernate Session Factory + /// + public class SessionFactoryBuilder + { + private readonly IEnumerable typesToScan; + + /// + /// Constructor that accepts the types to scan for saga data classes + /// + /// + public SessionFactoryBuilder(IEnumerable typesToScan) + { + this.typesToScan = typesToScan; + } + + /// + /// Builds the session factory with the given properties. Database is updated if updateSchema is set + /// + /// + /// + /// + public ISessionFactory Build(IDictionary nhibernateProperties, bool updateSchema) + { + var model = Create.SagaPersistenceModel(typesToScan); + var scannedAssemblies = typesToScan.Select(t => t.Assembly).Distinct(); + + var nhibernateConfiguration = new Configuration().SetProperties(nhibernateProperties); + + foreach (var assembly in scannedAssemblies) + { + nhibernateConfiguration.AddAssembly(assembly); + } + + var fluentConfiguration = Fluently.Configure(nhibernateConfiguration) + .Mappings(m => m.AutoMappings.Add(model)); + + ApplyDefaultsTo(fluentConfiguration); + + if (updateSchema) + { + UpdateDatabaseSchemaUsing(fluentConfiguration); + } + + try + { + return fluentConfiguration.BuildSessionFactory(); + } + catch (FluentConfigurationException e) + { + if (e.InnerException != null) + throw new ConfigurationErrorsException(e.InnerException.Message, e); + + throw; + } + } + + private static void UpdateDatabaseSchemaUsing(FluentConfiguration fluentConfiguration) + { + var configuration = fluentConfiguration.BuildConfiguration(); + + new SchemaUpdate(configuration) + .Execute(false, true); + } + + private static void ApplyDefaultsTo(FluentConfiguration fluentConfiguration) + { + fluentConfiguration.ExposeConfiguration( + c => + { + c.SetProperty("current_session_context_class",typeof(ThreadStaticSessionContext).AssemblyQualifiedName); + + //default to LinFu if not specifed by user + if (!c.Properties.Keys.Contains(PROXY_FACTORY_KEY)) + c.SetProperty(PROXY_FACTORY_KEY,typeof(ProxyFactoryFactory).AssemblyQualifiedName); + } + ); + } + + + + private const string PROXY_FACTORY_KEY = "proxyfactory.factory_class"; + } } \ No newline at end of file diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Config/NHibernateSagaPersisterConfig.cs b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Config/NHibernateSagaPersisterConfig.cs index 9334e4b2444..a3c22ff414c 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Config/NHibernateSagaPersisterConfig.cs +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Config/NHibernateSagaPersisterConfig.cs @@ -1,127 +1,127 @@ -using System.Collections.Generic; -using System.Configuration; - -namespace NServiceBus.Config -{ - /// - /// Config section for the NHibernate Saga Persister - /// - public class NHibernateSagaPersisterConfig:ConfigurationSection - { - /// - /// Collection of NHibernate properties to set - /// - [ConfigurationProperty("NHibernateProperties", IsRequired = false)] - public NHibernatePropertyCollection NHibernateProperties - { - get - { - return this["NHibernateProperties"] as NHibernatePropertyCollection; - } - set - { - this["NHibernateProperties"] = value; - } - } - - /// - /// Determines if the database should be auto updated - /// - [ConfigurationProperty("UpdateSchema", IsRequired = false, DefaultValue = true)] - public bool UpdateSchema - { - - get - { - - return (bool)this["UpdateSchema"]; - } - set - { - this["UpdateSchema"] = value; - } - } - } - - /// - /// Collection of NHibernate properties - /// - public class NHibernatePropertyCollection: ConfigurationElementCollection - { - /// - /// Creates a new empty property - /// - /// - protected override ConfigurationElement CreateNewElement() - { - return new NHibernateProperty(); - } - - /// - /// Returns the key for the given element - /// - /// - /// - protected override object GetElementKey(ConfigurationElement element) - { - return ((NHibernateProperty)element).Key; - } - - /// - /// Converts the collection to a dictionary - /// - /// - public IDictionary ToProperties() - { - var retval = new Dictionary(); - - foreach(var element in this) - { - - retval.Add( - (element as NHibernateProperty).Key, - (element as NHibernateProperty).Value); - } - - return retval; - } - } - - /// - /// A NHibernate property - /// - public class NHibernateProperty : ConfigurationElement - { - /// - /// The key - /// - [ConfigurationProperty("Key", IsRequired = true, IsKey = true)] - public string Key - { - get - { - return (string)this["Key"]; - } - set - { - this["Key"] = value; - } - } - - /// - /// The value to use - /// - [ConfigurationProperty("Value", IsRequired = true, IsKey = false)] - public string Value - { - get - { - return (string)this["Value"]; - } - set - { - this["Value"] = value; - } - } - } +using System.Collections.Generic; +using System.Configuration; + +namespace NServiceBus.Config +{ + /// + /// Config section for the NHibernate Saga Persister + /// + public class NHibernateSagaPersisterConfig:ConfigurationSection + { + /// + /// Collection of NHibernate properties to set + /// + [ConfigurationProperty("NHibernateProperties", IsRequired = false)] + public NHibernatePropertyCollection NHibernateProperties + { + get + { + return this["NHibernateProperties"] as NHibernatePropertyCollection; + } + set + { + this["NHibernateProperties"] = value; + } + } + + /// + /// Determines if the database should be auto updated + /// + [ConfigurationProperty("UpdateSchema", IsRequired = false, DefaultValue = true)] + public bool UpdateSchema + { + + get + { + + return (bool)this["UpdateSchema"]; + } + set + { + this["UpdateSchema"] = value; + } + } + } + + /// + /// Collection of NHibernate properties + /// + public class NHibernatePropertyCollection: ConfigurationElementCollection + { + /// + /// Creates a new empty property + /// + /// + protected override ConfigurationElement CreateNewElement() + { + return new NHibernateProperty(); + } + + /// + /// Returns the key for the given element + /// + /// + /// + protected override object GetElementKey(ConfigurationElement element) + { + return ((NHibernateProperty)element).Key; + } + + /// + /// Converts the collection to a dictionary + /// + /// + public IDictionary ToProperties() + { + var retval = new Dictionary(); + + foreach(var element in this) + { + + retval.Add( + (element as NHibernateProperty).Key, + (element as NHibernateProperty).Value); + } + + return retval; + } + } + + /// + /// A NHibernate property + /// + public class NHibernateProperty : ConfigurationElement + { + /// + /// The key + /// + [ConfigurationProperty("Key", IsRequired = true, IsKey = true)] + public string Key + { + get + { + return (string)this["Key"]; + } + set + { + this["Key"] = value; + } + } + + /// + /// The value to use + /// + [ConfigurationProperty("Value", IsRequired = true, IsKey = false)] + public string Value + { + get + { + return (string)this["Value"]; + } + set + { + this["Value"] = value; + } + } + } } \ No newline at end of file diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Config/NServiceBus.SagaPersisters.NHibernate.Config.csproj b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Config/NServiceBus.SagaPersisters.NHibernate.Config.csproj index 81238f81205..3b39040a626 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Config/NServiceBus.SagaPersisters.NHibernate.Config.csproj +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Config/NServiceBus.SagaPersisters.NHibernate.Config.csproj @@ -1,110 +1,110 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {1EDB9B0E-2D06-41DC-854B-F9BF63181999} - Library - Properties - NServiceBus.SagaPersisters.NHibernate.Config - NServiceBus.SagaPersisters.NHibernate.Config - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.SagaPersisters.NHibernate.Config.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.SagaPersisters.NHibernate.Config.XML - - - - False - ..\..\..\..\..\lib\Common.Logging.dll - False - - - False - ..\..\..\..\..\lib\FluentNHibernate\FluentNHibernate.dll - False - - - False - ..\..\..\..\..\lib\NHibernate.dll - False - - - False - ..\..\..\..\..\lib\NHibernate.ByteCode.LinFu.dll - - - False - ..\..\..\..\..\build\output\NServiceBus.dll - - - False - ..\..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll - - - False - ..\..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll - - - False - ..\..\..\..\..\build\nservicebus.core\NServiceBus.Sagas.Impl.dll - False - - - - - - - - - - CommonAssemblyInfo.cs - - - - - - - - - {B19F49E5-7059-4C18-91E7-D35DA4398D0C} - NServiceBus.SagaPersisters.NHibernate.AutoPersistence - False - - - {4A904B94-8DC4-4C02-A4FD-374E78990374} - NServiceBus.SagaPersisters.NHibernate - False - - - - - - xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\..\build\nhibernate\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {1EDB9B0E-2D06-41DC-854B-F9BF63181999} + Library + Properties + NServiceBus.SagaPersisters.NHibernate.Config + NServiceBus.SagaPersisters.NHibernate.Config + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.SagaPersisters.NHibernate.Config.XML + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.SagaPersisters.NHibernate.Config.XML + + + + False + ..\..\..\..\..\lib\Common.Logging.dll + False + + + False + ..\..\..\..\..\lib\FluentNHibernate\FluentNHibernate.dll + False + + + False + ..\..\..\..\..\lib\NHibernate.dll + False + + + False + ..\..\..\..\..\lib\NHibernate.ByteCode.LinFu.dll + + + False + ..\..\..\..\..\build\output\NServiceBus.dll + + + False + ..\..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll + + + False + ..\..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll + + + False + ..\..\..\..\..\build\nservicebus.core\NServiceBus.Sagas.Impl.dll + False + + + + + + + + + + CommonAssemblyInfo.cs + + + + + + + + + {B19F49E5-7059-4C18-91E7-D35DA4398D0C} + NServiceBus.SagaPersisters.NHibernate.AutoPersistence + False + + + {4A904B94-8DC4-4C02-A4FD-374E78990374} + NServiceBus.SagaPersisters.NHibernate + False + + + + + + xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\..\build\nhibernate\" + \ No newline at end of file diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Config/Properties/AssemblyInfo.cs b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Config/Properties/AssemblyInfo.cs index abb935d355c..744267f7913 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Config/Properties/AssemblyInfo.cs +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Config/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus NHibernate Saga Persister Config")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus NHibernate Saga Persister Config")] [assembly: AssemblyDescription("FluentNHibernate-based configuration of NHibernate saga persistence.")] \ No newline at end of file diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/App.config b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/App.config index 8bbda2f6649..743a3c5f21c 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/App.config +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/App.config @@ -1,16 +1,16 @@ - - - -
- - - - - - - - - - - + + + +
+ + + + + + + + + + + \ No newline at end of file diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/InMemoryFixture.cs b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/InMemoryFixture.cs index eac945d23d8..0c0cc793126 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/InMemoryFixture.cs +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/InMemoryFixture.cs @@ -1,34 +1,34 @@ -using System.IO; -using FluentNHibernate.Cfg.Db; -using NHibernate; -using NHibernate.ByteCode.LinFu; -using NServiceBus.SagaPersisters.NHibernate.Config.Internal; -using NServiceBus.UnitOfWork; -using NUnit.Framework; -using NServiceBus.UnitOfWork.NHibernate; - -namespace NServiceBus.SagaPersisters.NHibernate.Tests -{ - public class InMemoryFixture - { - protected IManageUnitsOfWork UnitOfWork; - protected SagaPersister SagaPersister; - protected ISessionFactory SessionFactory; - - [SetUp] - public void SetUp() - { - var nhibernateProperties = SQLiteConfiguration.Standard - .UsingFile(Path.GetTempFileName()) - .ProxyFactoryFactory(typeof(ProxyFactoryFactory).AssemblyQualifiedName) - .ToProperties(); - - SessionFactory = new SessionFactoryBuilder(typeof(TestSaga).Assembly.GetTypes()) - .Build(nhibernateProperties, true); - - SagaPersister = new SagaPersister { SessionFactory = SessionFactory }; - - UnitOfWork = new UnitOfWorkManager { SessionFactory = SessionFactory }; - } - } +using System.IO; +using FluentNHibernate.Cfg.Db; +using NHibernate; +using NHibernate.ByteCode.LinFu; +using NServiceBus.SagaPersisters.NHibernate.Config.Internal; +using NServiceBus.UnitOfWork; +using NUnit.Framework; +using NServiceBus.UnitOfWork.NHibernate; + +namespace NServiceBus.SagaPersisters.NHibernate.Tests +{ + public class InMemoryFixture + { + protected IManageUnitsOfWork UnitOfWork; + protected SagaPersister SagaPersister; + protected ISessionFactory SessionFactory; + + [SetUp] + public void SetUp() + { + var nhibernateProperties = SQLiteConfiguration.Standard + .UsingFile(Path.GetTempFileName()) + .ProxyFactoryFactory(typeof(ProxyFactoryFactory).AssemblyQualifiedName) + .ToProperties(); + + SessionFactory = new SessionFactoryBuilder(typeof(TestSaga).Assembly.GetTypes()) + .Build(nhibernateProperties, true); + + SagaPersister = new SagaPersister { SessionFactory = SessionFactory }; + + UnitOfWork = new UnitOfWorkManager { SessionFactory = SessionFactory }; + } + } } \ No newline at end of file diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/MySaga.cs b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/MySaga.cs index f7f3013df4e..6b86b02cc2f 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/MySaga.cs +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/MySaga.cs @@ -1,19 +1,19 @@ -using System; -using NServiceBus.Saga; - -namespace NServiceBus.SagaPersisters.NHibernate.Tests -{ - public class MySaga : Saga - { - public override void Timeout(object state) - { - } - } - - public class MySagaData : ISagaEntity - { - public virtual Guid Id { get; set; } - public virtual string OriginalMessageId { get; set; } - public virtual string Originator { get; set; } - } +using System; +using NServiceBus.Saga; + +namespace NServiceBus.SagaPersisters.NHibernate.Tests +{ + public class MySaga : Saga + { + public override void Timeout(object state) + { + } + } + + public class MySagaData : ISagaEntity + { + public virtual Guid Id { get; set; } + public virtual string OriginalMessageId { get; set; } + public virtual string Originator { get; set; } + } } \ No newline at end of file diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/NServiceBus.SagaPersisters.NHibernate.Tests.csproj b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/NServiceBus.SagaPersisters.NHibernate.Tests.csproj index 11d3d5e052c..2ad914c07b4 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/NServiceBus.SagaPersisters.NHibernate.Tests.csproj +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/NServiceBus.SagaPersisters.NHibernate.Tests.csproj @@ -1,174 +1,174 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {7F1A7421-0335-43D4-8C50-4ED444D19336} - Library - Properties - NServiceBus.SagaPersisters.NHibernate.Tests - NServiceBus.SagaPersisters.NHibernate.Tests - v4.0 - 512 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AnyCPU - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AnyCPU - AllRules.ruleset - - - - False - ..\..\..\..\..\lib\FluentNHibernate\FluentNHibernate.dll - - - False - ..\..\..\..\..\lib\NHibernate.dll - - - False - ..\..\..\..\..\lib\NHibernate.ByteCode.LinFu.dll - - - False - ..\..\..\..\..\build\output\NServiceBus.dll - - - False - ..\..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll - - - False - ..\..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll - - - False - ..\..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.DefaultBuilder.dll - - - False - ..\..\..\..\..\build\nservicebus.core\NServiceBus.Sagas.Impl.dll - - - False - ..\..\..\..\..\build\nservicebus.core\NServiceBus.UnitOfWork.dll - - - False - ..\..\..\..\..\build\nservicebus.core\NServiceBus.UnitOfWork.NHibernate.dll - - - False - ..\..\..\..\..\tools\NUnit\nunit.framework.dll - - - False - ..\..\..\..\..\lib\Rhino.Mocks\Rhino.Mocks.dll - - - - - - False - ..\..\..\..\..\lib\sqlite\System.Data.SQLite.dll - - - - - - - - - CommonAssemblyInfo.cs - - - - - - - - - - - - - - - - {B19F49E5-7059-4C18-91E7-D35DA4398D0C} - NServiceBus.SagaPersisters.NHibernate.AutoPersistence - - - {1EDB9B0E-2D06-41DC-854B-F9BF63181999} - NServiceBus.SagaPersisters.NHibernate.Config - - - {4A904B94-8DC4-4C02-A4FD-374E78990374} - NServiceBus.SagaPersisters.NHibernate - - - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {7F1A7421-0335-43D4-8C50-4ED444D19336} + Library + Properties + NServiceBus.SagaPersisters.NHibernate.Tests + NServiceBus.SagaPersisters.NHibernate.Tests + v4.0 + 512 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AnyCPU + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AnyCPU + AllRules.ruleset + + + + False + ..\..\..\..\..\lib\FluentNHibernate\FluentNHibernate.dll + + + False + ..\..\..\..\..\lib\NHibernate.dll + + + False + ..\..\..\..\..\lib\NHibernate.ByteCode.LinFu.dll + + + False + ..\..\..\..\..\build\output\NServiceBus.dll + + + False + ..\..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll + + + False + ..\..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll + + + False + ..\..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.DefaultBuilder.dll + + + False + ..\..\..\..\..\build\nservicebus.core\NServiceBus.Sagas.Impl.dll + + + False + ..\..\..\..\..\build\nservicebus.core\NServiceBus.UnitOfWork.dll + + + False + ..\..\..\..\..\build\nservicebus.core\NServiceBus.UnitOfWork.NHibernate.dll + + + False + ..\..\..\..\..\tools\NUnit\nunit.framework.dll + + + False + ..\..\..\..\..\lib\Rhino.Mocks\Rhino.Mocks.dll + + + + + + False + ..\..\..\..\..\lib\sqlite\System.Data.SQLite.dll + + + + + + + + + CommonAssemblyInfo.cs + + + + + + + + + + + + + + + + {B19F49E5-7059-4C18-91E7-D35DA4398D0C} + NServiceBus.SagaPersisters.NHibernate.AutoPersistence + + + {1EDB9B0E-2D06-41DC-854B-F9BF63181999} + NServiceBus.SagaPersisters.NHibernate.Config + + + {4A904B94-8DC4-4C02-A4FD-374E78990374} + NServiceBus.SagaPersisters.NHibernate + + + + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + \ No newline at end of file diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/Properties/AssemblyInfo.cs b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/Properties/AssemblyInfo.cs index 8c48fb40b4b..d5ab5cb722c 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/Properties/AssemblyInfo.cs +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/Properties/AssemblyInfo.cs @@ -1,2 +1,2 @@ -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus.SagaPersisters.NHibernate.Tests")] +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus.SagaPersisters.NHibernate.Tests")] diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/TestSaga.cs b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/TestSaga.cs index 7b6aabe6901..c8826789eef 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/TestSaga.cs +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/TestSaga.cs @@ -1,96 +1,96 @@ -using System; -using System.Collections.Generic; -using NServiceBus.Saga; -using NServiceBus.SagaPersisters.NHibernate.AutoPersistence.Attributes; - -namespace NServiceBus.SagaPersisters.NHibernate.Tests -{ - public class TestSaga : ISagaEntity - { - public virtual Guid Id { get; set; } - - public virtual string Originator { get; set; } - - public virtual string OriginalMessageId { get; set; } - - public virtual RelatedClass RelatedClass { get; set; } - - public virtual IList OrderLines { get; set; } - - public virtual StatusEnum Status { get; set; } - - public virtual DateTime DateTimeProperty { get; set; } - - public virtual TestComponent TestComponent { get; set; } - - public virtual PolymorpicPropertyBase PolymorpicRelatedProperty { get; set; } - } - - public class PolymorpicProperty : PolymorpicPropertyBase - { - public virtual int SomeInt { get; set; } - } - - public class PolymorpicPropertyBase - { - public virtual Guid Id { get; set; } - } - - public enum StatusEnum - { - SomeStatus, AnotherStatus - } - - public class TestComponent - { - public string Property { get; set; } - public string AnotherProperty { get; set; } - } - - public class OrderLine - { - public virtual Guid Id { get; set; } - - public virtual Guid ProductId { get; set; } - - } - - - public class RelatedClass - { - public virtual Guid Id { get; set; } - - - public virtual TestSaga ParentSaga { get; set; } - } - - public class TestSagaWithHbmlXmlOverride : ISagaEntity - { - public virtual Guid Id { get; set; } - - public virtual string Originator { get; set; } - - public virtual string OriginalMessageId { get; set; } - - public virtual string SomeProperty { get; set; } - } - - [TableName("MyTestTable")] - public class TestSagaWithTableNameAttribute : ISagaEntity - { - public virtual Guid Id { get; set; } - - public virtual string Originator { get; set; } - - public virtual string OriginalMessageId { get; set; } - - public virtual string SomeProperty { get; set; } - } - - public class DerivedFromTestSagaWithTableNameAttribute : TestSagaWithTableNameAttribute - { } - - [TableName("MyDerivedTestTable")] - public class AlsoDerivedFromTestSagaWithTableNameAttribute : TestSagaWithTableNameAttribute - { } +using System; +using System.Collections.Generic; +using NServiceBus.Saga; +using NServiceBus.SagaPersisters.NHibernate.AutoPersistence.Attributes; + +namespace NServiceBus.SagaPersisters.NHibernate.Tests +{ + public class TestSaga : ISagaEntity + { + public virtual Guid Id { get; set; } + + public virtual string Originator { get; set; } + + public virtual string OriginalMessageId { get; set; } + + public virtual RelatedClass RelatedClass { get; set; } + + public virtual IList OrderLines { get; set; } + + public virtual StatusEnum Status { get; set; } + + public virtual DateTime DateTimeProperty { get; set; } + + public virtual TestComponent TestComponent { get; set; } + + public virtual PolymorpicPropertyBase PolymorpicRelatedProperty { get; set; } + } + + public class PolymorpicProperty : PolymorpicPropertyBase + { + public virtual int SomeInt { get; set; } + } + + public class PolymorpicPropertyBase + { + public virtual Guid Id { get; set; } + } + + public enum StatusEnum + { + SomeStatus, AnotherStatus + } + + public class TestComponent + { + public string Property { get; set; } + public string AnotherProperty { get; set; } + } + + public class OrderLine + { + public virtual Guid Id { get; set; } + + public virtual Guid ProductId { get; set; } + + } + + + public class RelatedClass + { + public virtual Guid Id { get; set; } + + + public virtual TestSaga ParentSaga { get; set; } + } + + public class TestSagaWithHbmlXmlOverride : ISagaEntity + { + public virtual Guid Id { get; set; } + + public virtual string Originator { get; set; } + + public virtual string OriginalMessageId { get; set; } + + public virtual string SomeProperty { get; set; } + } + + [TableName("MyTestTable")] + public class TestSagaWithTableNameAttribute : ISagaEntity + { + public virtual Guid Id { get; set; } + + public virtual string Originator { get; set; } + + public virtual string OriginalMessageId { get; set; } + + public virtual string SomeProperty { get; set; } + } + + public class DerivedFromTestSagaWithTableNameAttribute : TestSagaWithTableNameAttribute + { } + + [TableName("MyDerivedTestTable")] + public class AlsoDerivedFromTestSagaWithTableNameAttribute : TestSagaWithTableNameAttribute + { } } \ No newline at end of file diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/TestSagaWithHbmlXmlOverride.hbm.xml b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/TestSagaWithHbmlXmlOverride.hbm.xml index 0a0ec1e3499..40c547910e8 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/TestSagaWithHbmlXmlOverride.hbm.xml +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/TestSagaWithHbmlXmlOverride.hbm.xml @@ -1,9 +1,9 @@ - - - - - - - - - + + + + + + + + + diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/When_automapping_sagas.cs b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/When_automapping_sagas.cs index 4a17b6515cd..a9c9255e655 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/When_automapping_sagas.cs +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/When_automapping_sagas.cs @@ -1,128 +1,128 @@ -using System; -using System.Linq; -using FluentNHibernate.Cfg.Db; -using NHibernate.ByteCode.LinFu; -using NHibernate.Id; -using NHibernate.Impl; -using NHibernate.Persister.Entity; -using NServiceBus.SagaPersisters.NHibernate.Config.Internal; -using NUnit.Framework; - -namespace NServiceBus.SagaPersisters.NHibernate.Tests -{ - [TestFixture] - public class When_automapping_sagas - { - private IEntityPersister persisterForTestSaga; - private SessionFactoryImpl sessionFactory; - - [SetUp] - public void SetUp() - { - var assemblyContainingSagas = typeof(TestSaga).Assembly; - - var builder = new SessionFactoryBuilder(assemblyContainingSagas.GetTypes()); - - sessionFactory = builder.Build(SQLiteConfiguration.Standard - .InMemory() - .ProxyFactoryFactory(typeof(ProxyFactoryFactory).AssemblyQualifiedName) - .ToProperties(), false) as SessionFactoryImpl; - - persisterForTestSaga = sessionFactory.GetEntityPersisterFor(); - } - - [Test] - public void Id_generator_should_be_set_to_assigned() - { - Assert.AreEqual(persisterForTestSaga.IdentifierGenerator.GetType(),typeof(Assigned)); - } - - [Test] - public void Enums_should_be_mapped_as_integers() - { - persisterForTestSaga.ShouldContainMappingsFor(); - } - - [Test] - public void Related_entities_should_also_be_mapped() - { - Assert.AreEqual(sessionFactory.GetEntityPersisterFor() - .IdentifierGenerator.GetType(),typeof(GuidCombGenerator)); - } - - [Test] - public void Datetime_properties_should_be_mapped() - { - persisterForTestSaga.ShouldContainMappingsFor(); - } - - [Test] - public void Public_setters_and_getters_of_concrete_classes_should_map_as_components() - { - persisterForTestSaga.ShouldContainMappingsFor(); - } - - - - [Test] - public void Users_can_override_automappings_by_embedding_hbm_files() - { - Assert.AreEqual(sessionFactory.GetEntityPersisterFor() - .IdentifierGenerator.GetType(),typeof(IdentityGenerator)); - } - - - [Test] - public void Inherited_property_classes_should_be_mapped() - { - persisterForTestSaga.ShouldContainMappingsFor(); - - sessionFactory.ShouldContainPersisterFor(); - - } - - [Test] - public void Users_can_override_tablenames_by_using_an_attribute() - { - var persister = sessionFactory.GetEntityPersister(typeof(TestSagaWithTableNameAttribute).FullName).ClassMetadata as global::NHibernate.Persister.Entity.AbstractEntityPersister; - Assert.AreEqual(persister.TableName,"MyTestTable"); - } - - [Test] - public void Users_can_override_tablenames_by_using_an_attribute_which_does_not_derive() - { - var persister = sessionFactory.GetEntityPersister(typeof(DerivedFromTestSagaWithTableNameAttribute).FullName).ClassMetadata as global::NHibernate.Persister.Entity.AbstractEntityPersister; - Assert.AreEqual(persister.TableName,"DerivedFromTestSagaWithTableNameAttribute"); - } - - [Test] - public void Users_can_override_derived_tablenames_by_using_an_attribute() - { - var persister = sessionFactory.GetEntityPersister(typeof(AlsoDerivedFromTestSagaWithTableNameAttribute).FullName).ClassMetadata as global::NHibernate.Persister.Entity.AbstractEntityPersister; - Assert.AreEqual(persister.TableName,"MyDerivedTestTable"); - } - - } - - public static class SessionFactoryExtensions - { - public static IEntityPersister GetEntityPersisterFor(this SessionFactoryImpl sessionFactory) - { - return sessionFactory.GetEntityPersister(typeof(T).FullName); - } - public static void ShouldContainPersisterFor(this SessionFactoryImpl sessionFactory) - { - Assert.NotNull(sessionFactory.GetEntityPersisterFor()); - } - } - - public static class EntityPersisterExtensions - { - public static void ShouldContainMappingsFor(this IEntityPersister persister) - { - Assert.True(persister.EntityMetamodel.Properties - .Any(x => x.Type.ReturnedClass == typeof(T))); - - } - } +using System; +using System.Linq; +using FluentNHibernate.Cfg.Db; +using NHibernate.ByteCode.LinFu; +using NHibernate.Id; +using NHibernate.Impl; +using NHibernate.Persister.Entity; +using NServiceBus.SagaPersisters.NHibernate.Config.Internal; +using NUnit.Framework; + +namespace NServiceBus.SagaPersisters.NHibernate.Tests +{ + [TestFixture] + public class When_automapping_sagas + { + private IEntityPersister persisterForTestSaga; + private SessionFactoryImpl sessionFactory; + + [SetUp] + public void SetUp() + { + var assemblyContainingSagas = typeof(TestSaga).Assembly; + + var builder = new SessionFactoryBuilder(assemblyContainingSagas.GetTypes()); + + sessionFactory = builder.Build(SQLiteConfiguration.Standard + .InMemory() + .ProxyFactoryFactory(typeof(ProxyFactoryFactory).AssemblyQualifiedName) + .ToProperties(), false) as SessionFactoryImpl; + + persisterForTestSaga = sessionFactory.GetEntityPersisterFor(); + } + + [Test] + public void Id_generator_should_be_set_to_assigned() + { + Assert.AreEqual(persisterForTestSaga.IdentifierGenerator.GetType(),typeof(Assigned)); + } + + [Test] + public void Enums_should_be_mapped_as_integers() + { + persisterForTestSaga.ShouldContainMappingsFor(); + } + + [Test] + public void Related_entities_should_also_be_mapped() + { + Assert.AreEqual(sessionFactory.GetEntityPersisterFor() + .IdentifierGenerator.GetType(),typeof(GuidCombGenerator)); + } + + [Test] + public void Datetime_properties_should_be_mapped() + { + persisterForTestSaga.ShouldContainMappingsFor(); + } + + [Test] + public void Public_setters_and_getters_of_concrete_classes_should_map_as_components() + { + persisterForTestSaga.ShouldContainMappingsFor(); + } + + + + [Test] + public void Users_can_override_automappings_by_embedding_hbm_files() + { + Assert.AreEqual(sessionFactory.GetEntityPersisterFor() + .IdentifierGenerator.GetType(),typeof(IdentityGenerator)); + } + + + [Test] + public void Inherited_property_classes_should_be_mapped() + { + persisterForTestSaga.ShouldContainMappingsFor(); + + sessionFactory.ShouldContainPersisterFor(); + + } + + [Test] + public void Users_can_override_tablenames_by_using_an_attribute() + { + var persister = sessionFactory.GetEntityPersister(typeof(TestSagaWithTableNameAttribute).FullName).ClassMetadata as global::NHibernate.Persister.Entity.AbstractEntityPersister; + Assert.AreEqual(persister.TableName,"MyTestTable"); + } + + [Test] + public void Users_can_override_tablenames_by_using_an_attribute_which_does_not_derive() + { + var persister = sessionFactory.GetEntityPersister(typeof(DerivedFromTestSagaWithTableNameAttribute).FullName).ClassMetadata as global::NHibernate.Persister.Entity.AbstractEntityPersister; + Assert.AreEqual(persister.TableName,"DerivedFromTestSagaWithTableNameAttribute"); + } + + [Test] + public void Users_can_override_derived_tablenames_by_using_an_attribute() + { + var persister = sessionFactory.GetEntityPersister(typeof(AlsoDerivedFromTestSagaWithTableNameAttribute).FullName).ClassMetadata as global::NHibernate.Persister.Entity.AbstractEntityPersister; + Assert.AreEqual(persister.TableName,"MyDerivedTestTable"); + } + + } + + public static class SessionFactoryExtensions + { + public static IEntityPersister GetEntityPersisterFor(this SessionFactoryImpl sessionFactory) + { + return sessionFactory.GetEntityPersister(typeof(T).FullName); + } + public static void ShouldContainPersisterFor(this SessionFactoryImpl sessionFactory) + { + Assert.NotNull(sessionFactory.GetEntityPersisterFor()); + } + } + + public static class EntityPersisterExtensions + { + public static void ShouldContainMappingsFor(this IEntityPersister persister) + { + Assert.True(persister.EntityMetamodel.Properties + .Any(x => x.Type.ReturnedClass == typeof(T))); + + } + } } \ No newline at end of file diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/When_building_the_sessionfactory.cs b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/When_building_the_sessionfactory.cs index a58d8324231..9bf9a80f73a 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/When_building_the_sessionfactory.cs +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/When_building_the_sessionfactory.cs @@ -1,63 +1,63 @@ -using System.Collections.Generic; -using System.IO; -using FluentNHibernate.Cfg.Db; -using NHibernate.ByteCode.LinFu; -using NHibernate.Impl; -using NServiceBus.SagaPersisters.NHibernate.Config.Internal; -using NUnit.Framework; - -namespace NServiceBus.SagaPersisters.NHibernate.Tests -{ - [TestFixture] - public class When_building_the_sessionfactory - { - private readonly IDictionary testProperties = SQLiteConfiguration.Standard - .InMemory() - .ProxyFactoryFactory(typeof(ProxyFactoryFactory).AssemblyQualifiedName) - .ToProperties(); - - - [Test] - public void Proxy_factory_should_default_to_linfu_if_not_set_by_user() - { - var persistenceConfigWithoutProxySpecfied = SQLiteConfiguration.Standard.InMemory(); - - var nhibernateProperties = persistenceConfigWithoutProxySpecfied.ToProperties(); - nhibernateProperties.Remove("proxyfactory.factory_class"); - - - new SessionFactoryBuilder(typeof(TestSaga).Assembly.GetTypes()) - .Build(nhibernateProperties, false); - - } - - [Test] - public void References_of_the_persistent_entity_should_also_be_mapped() - { - var assemblyContainingSagas = typeof(TestSaga).Assembly; - - var builder = new SessionFactoryBuilder(assemblyContainingSagas.GetTypes()); - - var sessionFactory = builder.Build(testProperties, false) as SessionFactoryImpl; - - Assert.NotNull(sessionFactory.GetEntityPersister(typeof(RelatedClass).FullName)); - } - - [Test] - public void Database_schema_should_be_updated_if_requested() - { - var nhibernateProperties = SQLiteConfiguration.Standard - .UsingFile(Path.GetTempFileName()) - .ProxyFactoryFactory(typeof(ProxyFactoryFactory).AssemblyQualifiedName) - .ToProperties(); - - var sessionFactory = new SessionFactoryBuilder(typeof(TestSaga).Assembly.GetTypes()) - .Build(nhibernateProperties, true); - - using (var session = sessionFactory.OpenSession()) - { - session.CreateCriteria(typeof(TestSaga)).List(); - } - } - } +using System.Collections.Generic; +using System.IO; +using FluentNHibernate.Cfg.Db; +using NHibernate.ByteCode.LinFu; +using NHibernate.Impl; +using NServiceBus.SagaPersisters.NHibernate.Config.Internal; +using NUnit.Framework; + +namespace NServiceBus.SagaPersisters.NHibernate.Tests +{ + [TestFixture] + public class When_building_the_sessionfactory + { + private readonly IDictionary testProperties = SQLiteConfiguration.Standard + .InMemory() + .ProxyFactoryFactory(typeof(ProxyFactoryFactory).AssemblyQualifiedName) + .ToProperties(); + + + [Test] + public void Proxy_factory_should_default_to_linfu_if_not_set_by_user() + { + var persistenceConfigWithoutProxySpecfied = SQLiteConfiguration.Standard.InMemory(); + + var nhibernateProperties = persistenceConfigWithoutProxySpecfied.ToProperties(); + nhibernateProperties.Remove("proxyfactory.factory_class"); + + + new SessionFactoryBuilder(typeof(TestSaga).Assembly.GetTypes()) + .Build(nhibernateProperties, false); + + } + + [Test] + public void References_of_the_persistent_entity_should_also_be_mapped() + { + var assemblyContainingSagas = typeof(TestSaga).Assembly; + + var builder = new SessionFactoryBuilder(assemblyContainingSagas.GetTypes()); + + var sessionFactory = builder.Build(testProperties, false) as SessionFactoryImpl; + + Assert.NotNull(sessionFactory.GetEntityPersister(typeof(RelatedClass).FullName)); + } + + [Test] + public void Database_schema_should_be_updated_if_requested() + { + var nhibernateProperties = SQLiteConfiguration.Standard + .UsingFile(Path.GetTempFileName()) + .ProxyFactoryFactory(typeof(ProxyFactoryFactory).AssemblyQualifiedName) + .ToProperties(); + + var sessionFactory = new SessionFactoryBuilder(typeof(TestSaga).Assembly.GetTypes()) + .Build(nhibernateProperties, true); + + using (var session = sessionFactory.OpenSession()) + { + session.CreateCriteria(typeof(TestSaga)).List(); + } + } + } } \ No newline at end of file diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/When_configuring_the_saga_persister_from_appconfig.cs b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/When_configuring_the_saga_persister_from_appconfig.cs index 42729fbcd36..af6f9fc71b6 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/When_configuring_the_saga_persister_from_appconfig.cs +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/When_configuring_the_saga_persister_from_appconfig.cs @@ -1,33 +1,33 @@ -using NHibernate; -using NUnit.Framework; - -namespace NServiceBus.SagaPersisters.NHibernate.Tests -{ - [TestFixture] - public class When_configuring_the_saga_persister_from_appconfig - { - private Configure config; - - [SetUp] - public void SetUp() - { - - config = Configure.With(new[] { typeof(MySaga).Assembly}) - .DefaultBuilder() - .Sagas() - .NHibernateSagaPersister(); - } - - [Test] - public void Update_schema_can_be_specified_by_the_user() - { - var sessionFactory = config.Builder.Build(); - - using (var session = sessionFactory.OpenSession()) - { - session.CreateCriteria(typeof(MySaga)).List(); - } - } - - } +using NHibernate; +using NUnit.Framework; + +namespace NServiceBus.SagaPersisters.NHibernate.Tests +{ + [TestFixture] + public class When_configuring_the_saga_persister_from_appconfig + { + private Configure config; + + [SetUp] + public void SetUp() + { + + config = Configure.With(new[] { typeof(MySaga).Assembly}) + .DefaultBuilder() + .Sagas() + .NHibernateSagaPersister(); + } + + [Test] + public void Update_schema_can_be_specified_by_the_user() + { + var sessionFactory = config.Builder.Build(); + + using (var session = sessionFactory.OpenSession()) + { + session.CreateCriteria(typeof(MySaga)).List(); + } + } + + } } \ No newline at end of file diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/When_configuring_the_saga_persister_to_use_sqlite.cs b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/When_configuring_the_saga_persister_to_use_sqlite.cs index 152d2e2a138..0e711eed29c 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/When_configuring_the_saga_persister_to_use_sqlite.cs +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/When_configuring_the_saga_persister_to_use_sqlite.cs @@ -1,45 +1,45 @@ -using NHibernate; -using NUnit.Framework; - -namespace NServiceBus.SagaPersisters.NHibernate.Tests -{ - [TestFixture] - public class When_configuring_the_saga_persister_to_use_sqlite - { - private Configure config; - - [SetUp] - public void SetUp() - { - - config = Configure.With(new[] { typeof(MySaga).Assembly}) - .DefaultBuilder() - .Sagas() - .NHibernateSagaPersisterWithSQLiteAndAutomaticSchemaGeneration(); - } - - [Test] - public void Persister_should_be_registered_as_single_call() - { - var persister = config.Builder.Build(); - - Assert.AreNotEqual(persister,config.Builder.Build()); - } - - [Test] - public void The_sessionfactory_should_be_built_and_registered_as_singleton() - { - var sessionFactory = config.Builder.Build(); - - Assert.NotNull(sessionFactory); - Assert.AreEqual(sessionFactory,config.Builder.Build()); - - } - - - - - } - - -} +using NHibernate; +using NUnit.Framework; + +namespace NServiceBus.SagaPersisters.NHibernate.Tests +{ + [TestFixture] + public class When_configuring_the_saga_persister_to_use_sqlite + { + private Configure config; + + [SetUp] + public void SetUp() + { + + config = Configure.With(new[] { typeof(MySaga).Assembly}) + .DefaultBuilder() + .Sagas() + .NHibernateSagaPersisterWithSQLiteAndAutomaticSchemaGeneration(); + } + + [Test] + public void Persister_should_be_registered_as_single_call() + { + var persister = config.Builder.Build(); + + Assert.AreNotEqual(persister,config.Builder.Build()); + } + + [Test] + public void The_sessionfactory_should_be_built_and_registered_as_singleton() + { + var sessionFactory = config.Builder.Build(); + + Assert.NotNull(sessionFactory); + Assert.AreEqual(sessionFactory,config.Builder.Build()); + + } + + + + + } + + +} diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/When_persisting_a_saga_with_a_unique_property.cs b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/When_persisting_a_saga_with_a_unique_property.cs index 9794e0d3878..d71b6a02e52 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/When_persisting_a_saga_with_a_unique_property.cs +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/When_persisting_a_saga_with_a_unique_property.cs @@ -1,44 +1,44 @@ -using System; -using NHibernate.Exceptions; -using NServiceBus.Saga; -using NServiceBus.SagaPersisters.NHibernate.AutoPersistence; -using NServiceBus.SagaPersisters.NHibernate.AutoPersistence.Attributes; -using NUnit.Framework; - -namespace NServiceBus.SagaPersisters.NHibernate.Tests -{ - [TestFixture] - public class When_persisting_a_saga_with_a_unique_property : InMemoryFixture - { - [Test] - public void The_database_should_enforce_the_uniqness() - { - UnitOfWork.Begin(); - SagaPersister.Save(new SagaWithUniqueProperty - { - Id = Guid.NewGuid(), - UniqueString = "whatever" - }); - - SagaPersister.Save(new SagaWithUniqueProperty - { - Id = Guid.NewGuid(), - UniqueString = "whatever" - }); - - Assert.Throws(() => UnitOfWork.End()); - } - } - - public class SagaWithUniqueProperty : ISagaEntity - { - public virtual Guid Id { get; set; } - - public virtual string Originator { get; set; } - - public virtual string OriginalMessageId { get; set; } - - [Unique] - public virtual string UniqueString { get; set; } - } +using System; +using NHibernate.Exceptions; +using NServiceBus.Saga; +using NServiceBus.SagaPersisters.NHibernate.AutoPersistence; +using NServiceBus.SagaPersisters.NHibernate.AutoPersistence.Attributes; +using NUnit.Framework; + +namespace NServiceBus.SagaPersisters.NHibernate.Tests +{ + [TestFixture] + public class When_persisting_a_saga_with_a_unique_property : InMemoryFixture + { + [Test] + public void The_database_should_enforce_the_uniqness() + { + UnitOfWork.Begin(); + SagaPersister.Save(new SagaWithUniqueProperty + { + Id = Guid.NewGuid(), + UniqueString = "whatever" + }); + + SagaPersister.Save(new SagaWithUniqueProperty + { + Id = Guid.NewGuid(), + UniqueString = "whatever" + }); + + Assert.Throws(() => UnitOfWork.End()); + } + } + + public class SagaWithUniqueProperty : ISagaEntity + { + public virtual Guid Id { get; set; } + + public virtual string Originator { get; set; } + + public virtual string OriginalMessageId { get; set; } + + [Unique] + public virtual string UniqueString { get; set; } + } } \ No newline at end of file diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/When_persisting_sagas_on_non_transactional_endpoints.cs b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/When_persisting_sagas_on_non_transactional_endpoints.cs index 217a4ddc4cb..65680a810ee 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/When_persisting_sagas_on_non_transactional_endpoints.cs +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/When_persisting_sagas_on_non_transactional_endpoints.cs @@ -1,44 +1,44 @@ -using System; -using NUnit.Framework; - -namespace NServiceBus.SagaPersisters.NHibernate.Tests -{ - [TestFixture] - public class When_persisting_sagas_on_non_transactional_endpoints : InMemoryFixture - { - [Test] - public void Successful_execution_should_commit_nhibernate_transaction() - { - UnitOfWork.Begin(); - - SagaPersister.Save(new TestSaga - { - Id = Guid.NewGuid() - }); - - UnitOfWork.End(); - - using (var session = SessionFactory.OpenSession()) - { - Assert.AreEqual(session.CreateCriteria(typeof(TestSaga)).List().Count,1); - } - } - - [Test] - public void Error_should_rollback_nhibernate_transaction() - { - UnitOfWork.Begin(); - - SagaPersister.Save(new TestSaga - { - Id = Guid.NewGuid() - }); - UnitOfWork.Error(); - - using (var session = SessionFactory.OpenSession()) - { - Assert.AreEqual(session.CreateCriteria(typeof(TestSaga)).List().Count,0); - } - } - } +using System; +using NUnit.Framework; + +namespace NServiceBus.SagaPersisters.NHibernate.Tests +{ + [TestFixture] + public class When_persisting_sagas_on_non_transactional_endpoints : InMemoryFixture + { + [Test] + public void Successful_execution_should_commit_nhibernate_transaction() + { + UnitOfWork.Begin(); + + SagaPersister.Save(new TestSaga + { + Id = Guid.NewGuid() + }); + + UnitOfWork.End(); + + using (var session = SessionFactory.OpenSession()) + { + Assert.AreEqual(session.CreateCriteria(typeof(TestSaga)).List().Count,1); + } + } + + [Test] + public void Error_should_rollback_nhibernate_transaction() + { + UnitOfWork.Begin(); + + SagaPersister.Save(new TestSaga + { + Id = Guid.NewGuid() + }); + UnitOfWork.Error(); + + using (var session = SessionFactory.OpenSession()) + { + Assert.AreEqual(session.CreateCriteria(typeof(TestSaga)).List().Count,0); + } + } + } } \ No newline at end of file diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/When_persisting_sagas_on_transactional_endpoints.cs b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/When_persisting_sagas_on_transactional_endpoints.cs index 96b681f427d..e7cb00579b7 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/When_persisting_sagas_on_transactional_endpoints.cs +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate.Tests/When_persisting_sagas_on_transactional_endpoints.cs @@ -1,60 +1,60 @@ -using System; -using System.Transactions; -using NUnit.Framework; - -namespace NServiceBus.SagaPersisters.NHibernate.Tests -{ - [TestFixture] - public class When_persisting_sagas_on_transactional_endpoints:InMemoryFixture - { - [Test] - public void Ambient_transaction_should_commit_saga() - { - using (var transactionScope = new TransactionScope()) - { - UnitOfWork.Begin(); - - SagaPersister.Save(new TestSaga - { - Id = Guid.NewGuid() - }); - - UnitOfWork.End(); - transactionScope.Complete(); - } - using (var session = SessionFactory.OpenSession()) - { - Assert.AreEqual(session.CreateCriteria(typeof(TestSaga)).List().Count,1); - } - - } - - - - [Test] - public void Ambient_transaction_should_rollback_saga() - { - using (var transactionScope = new TransactionScope()) - { - UnitOfWork.Begin(); - - SagaPersister.Save(new TestSaga - { - Id = Guid.NewGuid() - }); - - } - - UnitOfWork.Error(); - - using (var session = SessionFactory.OpenSession()) - { - Assert.AreEqual(session.CreateCriteria(typeof(TestSaga)).List().Count,0); - } - - } - - } - - +using System; +using System.Transactions; +using NUnit.Framework; + +namespace NServiceBus.SagaPersisters.NHibernate.Tests +{ + [TestFixture] + public class When_persisting_sagas_on_transactional_endpoints:InMemoryFixture + { + [Test] + public void Ambient_transaction_should_commit_saga() + { + using (var transactionScope = new TransactionScope()) + { + UnitOfWork.Begin(); + + SagaPersister.Save(new TestSaga + { + Id = Guid.NewGuid() + }); + + UnitOfWork.End(); + transactionScope.Complete(); + } + using (var session = SessionFactory.OpenSession()) + { + Assert.AreEqual(session.CreateCriteria(typeof(TestSaga)).List().Count,1); + } + + } + + + + [Test] + public void Ambient_transaction_should_rollback_saga() + { + using (var transactionScope = new TransactionScope()) + { + UnitOfWork.Begin(); + + SagaPersister.Save(new TestSaga + { + Id = Guid.NewGuid() + }); + + } + + UnitOfWork.Error(); + + using (var session = SessionFactory.OpenSession()) + { + Assert.AreEqual(session.CreateCriteria(typeof(TestSaga)).List().Count,0); + } + + } + + } + + } \ No newline at end of file diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate/NServiceBus.SagaPersisters.NHibernate.csproj b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate/NServiceBus.SagaPersisters.NHibernate.csproj index a25ca15f6c7..71bf7355e03 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate/NServiceBus.SagaPersisters.NHibernate.csproj +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate/NServiceBus.SagaPersisters.NHibernate.csproj @@ -1,110 +1,110 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {4A904B94-8DC4-4C02-A4FD-374E78990374} - Library - Properties - NServiceBus.SagaPersisters.NHibernate - NServiceBus.SagaPersisters.NHibernate - - - - - - v4.0 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.SagaPersisters.NHibernate.XML - AnyCPU - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.SagaPersisters.NHibernate.XML - AnyCPU - AllRules.ruleset - - - - False - ..\..\..\..\..\lib\NHibernate.dll - False - - - False - ..\..\..\..\..\build\output\NServiceBus.dll - - - - - - - - - - - CommonAssemblyInfo.cs - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\..\build\nhibernate\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {4A904B94-8DC4-4C02-A4FD-374E78990374} + Library + Properties + NServiceBus.SagaPersisters.NHibernate + NServiceBus.SagaPersisters.NHibernate + + + + + + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.SagaPersisters.NHibernate.XML + AnyCPU + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.SagaPersisters.NHibernate.XML + AnyCPU + AllRules.ruleset + + + + False + ..\..\..\..\..\lib\NHibernate.dll + False + + + False + ..\..\..\..\..\build\output\NServiceBus.dll + + + + + + + + + + + CommonAssemblyInfo.cs + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\..\build\nhibernate\" + \ No newline at end of file diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate/Properties/AssemblyInfo.cs b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate/Properties/AssemblyInfo.cs index 05fd18c3276..c27b1d913fa 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate/Properties/AssemblyInfo.cs +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus NHibernate Saga Persister")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus NHibernate Saga Persister")] [assembly: AssemblyDescription("NHibernate-based implementation for persistence of sagas.")] \ No newline at end of file diff --git a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate/SagaPersister.cs b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate/SagaPersister.cs index cbd57a78a4c..2c0700b4c83 100644 --- a/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate/SagaPersister.cs +++ b/src/impl/SagaPersisters/NHibernateSagaPersister/NServiceBus.SagaPersisters.NHibernate/SagaPersister.cs @@ -1,66 +1,66 @@ -using System; -using NServiceBus.Saga; -using NHibernate; -using NHibernate.Criterion; - -namespace NServiceBus.SagaPersisters.NHibernate -{ - /// - /// Saga persister implementation using NHibernate. - /// - public class SagaPersister : ISagaPersister - { - /// - /// Saves the given saga entity using the current session of the - /// injected session factory. - /// - /// the saga entity that will be saved. - public void Save(ISagaEntity saga) - { - SessionFactory.GetCurrentSession().Save(saga); - } - - /// - /// Updates the given saga entity using the current session of the - /// injected session factory. - /// - /// the saga entity that will be updated. - public void Update(ISagaEntity saga) - { - SessionFactory.GetCurrentSession().Update(saga); - } - - /// - /// Gets a saga entity from the injected session factory's current session - /// using the given saga id. - /// - /// The saga id to use in the lookup. - /// The saga entity if found, otherwise null. - public T Get(Guid sagaId) where T : ISagaEntity - { - return SessionFactory.GetCurrentSession().Get(sagaId); - } - - T ISagaPersister.Get(string property, object value) - { - return SessionFactory.GetCurrentSession().CreateCriteria(typeof(T)) - .Add(Restrictions.Eq(property, value)) - .UniqueResult(); - } - - /// - /// Deletes the given saga from the injected session factory's - /// current session. - /// - /// The saga entity that will be deleted. - public void Complete(ISagaEntity saga) - { - SessionFactory.GetCurrentSession().Delete(saga); - } - - /// - /// Injected session factory. - /// - public ISessionFactory SessionFactory { get; set; } - } -} +using System; +using NServiceBus.Saga; +using NHibernate; +using NHibernate.Criterion; + +namespace NServiceBus.SagaPersisters.NHibernate +{ + /// + /// Saga persister implementation using NHibernate. + /// + public class SagaPersister : ISagaPersister + { + /// + /// Saves the given saga entity using the current session of the + /// injected session factory. + /// + /// the saga entity that will be saved. + public void Save(ISagaEntity saga) + { + SessionFactory.GetCurrentSession().Save(saga); + } + + /// + /// Updates the given saga entity using the current session of the + /// injected session factory. + /// + /// the saga entity that will be updated. + public void Update(ISagaEntity saga) + { + SessionFactory.GetCurrentSession().Update(saga); + } + + /// + /// Gets a saga entity from the injected session factory's current session + /// using the given saga id. + /// + /// The saga id to use in the lookup. + /// The saga entity if found, otherwise null. + public T Get(Guid sagaId) where T : ISagaEntity + { + return SessionFactory.GetCurrentSession().Get(sagaId); + } + + T ISagaPersister.Get(string property, object value) + { + return SessionFactory.GetCurrentSession().CreateCriteria(typeof(T)) + .Add(Restrictions.Eq(property, value)) + .UniqueResult(); + } + + /// + /// Deletes the given saga from the injected session factory's + /// current session. + /// + /// The saga entity that will be deleted. + public void Complete(ISagaEntity saga) + { + SessionFactory.GetCurrentSession().Delete(saga); + } + + /// + /// Injected session factory. + /// + public ISessionFactory SessionFactory { get; set; } + } +} diff --git a/src/impl/Sagas/NServiceBus.Sagas.Impl/Configure.cs b/src/impl/Sagas/NServiceBus.Sagas.Impl/Configure.cs index 338c570a697..b41f3b07bed 100644 --- a/src/impl/Sagas/NServiceBus.Sagas.Impl/Configure.cs +++ b/src/impl/Sagas/NServiceBus.Sagas.Impl/Configure.cs @@ -1,505 +1,505 @@ -using System; -using System.Collections.Generic; -using NServiceBus.ObjectBuilder; -using System.Reflection; -using NServiceBus.Saga; -using Common.Logging; - -namespace NServiceBus.Sagas.Impl -{ - /// - /// Object that scans types and stores meta-data to be used for type lookups at runtime by sagas. - /// - public class Configure - { - #region setup - - private IConfigureComponents configurer; - private static IBuilder _builderStatic; - - private Configure() - { - } - - /// - /// Starts the configuration process for the saga infrastructure. - /// - /// - /// - /// - public static Configure With(IConfigureComponents configurer, IBuilder builder) - { - _builderStatic = builder; - - configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); - - return new Configure { configurer = configurer }; - } - - /// - /// Scans for types relevant to the saga infrastructure. - /// These include implementers of and . - /// - /// - public void SagasIn(IEnumerable types) - { - foreach (Type t in types) - { - if (IsSagaType(t)) - { - configurer.ConfigureComponent(t, ComponentCallModelEnum.Singlecall); - ConfigureSaga(t); - SagasWereFound = true; - continue; - } - - if (IsFinderType(t)) - { - configurer.ConfigureComponent(t, ComponentCallModelEnum.Singlecall); - ConfigureFinder(t); - continue; - } - - if (IsSagaNotFoundHandler(t)) - { - configurer.ConfigureComponent(t, ComponentCallModelEnum.Singlecall); - continue; - } - } - - CreateAdditionalFindersAsNecessary(); - } - - internal static void ConfigureHowToFindSagaWithMessage(Type sagaType, PropertyInfo sagaProp, Type messageType, PropertyInfo messageProp) - { - IDictionary> messageToProperties; - SagaEntityToMessageToPropertyLookup.TryGetValue(sagaType, out messageToProperties); - - if (messageToProperties == null) - { - messageToProperties = new Dictionary>(); - SagaEntityToMessageToPropertyLookup[sagaType] = messageToProperties; - } - - messageToProperties[messageType] = new KeyValuePair(sagaProp, messageProp); - } - - private static readonly IDictionary>> SagaEntityToMessageToPropertyLookup = new Dictionary>>(); - - /// - /// Creates an for each saga type that doesn't have a finder configured. - /// - private void CreateAdditionalFindersAsNecessary() - { - foreach (Type sagaEntityType in SagaEntityToMessageToPropertyLookup.Keys) - foreach (Type messageType in SagaEntityToMessageToPropertyLookup[sagaEntityType].Keys) - { - var pair = SagaEntityToMessageToPropertyLookup[sagaEntityType][messageType]; - CreatePropertyFinder(sagaEntityType, messageType, pair.Key, pair.Value); - } - - foreach(Type sagaType in SagaTypeToSagaEntityTypeLookup.Keys) - { - Type sagaEntityType = SagaTypeToSagaEntityTypeLookup[sagaType]; - - Type finder = typeof(SagaEntityFinder<>).MakeGenericType(sagaEntityType); - configurer.ConfigureComponent(finder, ComponentCallModelEnum.Singlecall); - ConfigureFinder(finder); - - Type nullFinder = typeof (NullSagaFinder<>).MakeGenericType(sagaEntityType); - configurer.ConfigureComponent(nullFinder, ComponentCallModelEnum.Singlecall); - ConfigureFinder(nullFinder); - - //TODO: Refactor the above. - } - } - - private void CreatePropertyFinder(Type sagaEntityType, Type messageType, PropertyInfo sagaProperty, PropertyInfo messageProperty) - { - Type finderType = typeof(PropertySagaFinder<,>).MakeGenericType(sagaEntityType, messageType); - - configurer.ConfigureComponent(finderType, ComponentCallModelEnum.Singlecall) - .ConfigureProperty("SagaProperty", sagaProperty) - .ConfigureProperty("MessageProperty", messageProperty); - - ConfigureFinder(finderType); - } - - #endregion - - #region methods used at runtime - - /// - /// Returns true if a saga type was found in the types passed in to . - /// - public static bool SagasWereFound { get; private set; } - - - /// - /// Gets the saga type to instantiate and invoke if an existing saga couldn't be found by - /// the given finder using the given message. - /// - /// - /// - /// - public static Type GetSagaTypeToStartIfMessageNotFoundByFinder(IMessage message, IFinder finder) - { - Type sagaEntityType; - FinderTypeToSagaEntityTypeLookup.TryGetValue(finder.GetType(), out sagaEntityType); - - if (sagaEntityType == null) - return null; - - Type sagaType; - SagaEntityTypeToSagaTypeLookup.TryGetValue(sagaEntityType, out sagaType); - - if (sagaType == null) - return null; - - List messageTypes; - SagaTypeToMessagTypesRequiringSagaStartLookup.TryGetValue(sagaType, out messageTypes); - - if (messageTypes == null) - return null; - - if (messageTypes.Contains(message.GetType())) - return sagaType; - - foreach (Type msgTypeHandleBySaga in messageTypes) - if (msgTypeHandleBySaga.IsAssignableFrom(message.GetType())) - return sagaType; - - return null; - } - - /// - /// Finds the types of sagas that can handle the given concrete message type. - /// - /// A concrete type for a message object - /// The list of saga types. - public static List GetSagaTypesForMessageType(Type messageType) - { - var sagas = new List(); - - foreach(Type msgTypeHandled in MessageTypeToSagaTypesLookup.Keys) - if (msgTypeHandled.IsAssignableFrom(messageType)) - sagas.AddRange(MessageTypeToSagaTypesLookup[msgTypeHandled]); - - return sagas; - } - - /// - /// Returns the saga type configured for the given entity type. - /// - /// - /// - public static Type GetSagaTypeForSagaEntityType(Type sagaEntityType) - { - Type result; - SagaEntityTypeToSagaTypeLookup.TryGetValue(sagaEntityType, out result); - - return result; - } - - /// - /// Returns the entity type configured for the given saga type. - /// - /// - /// - public static Type GetSagaEntityTypeForSagaType(Type sagaType) - { - Type result; - SagaTypeToSagaEntityTypeLookup.TryGetValue(sagaType, out result); - - return result; - } - - /// - /// Indicates if a saga has been configured to handle the given message type. - /// - /// - /// - public static bool IsMessageTypeHandledBySaga(Type messageType) - { - if (MessageTypeToSagaTypesLookup.Keys.Contains(messageType)) - return true; - - foreach(Type msgHandledBySaga in MessageTypeToSagaTypesLookup.Keys) - if (msgHandledBySaga.IsAssignableFrom(messageType)) - return true; - - return false; - } - - /// - /// Gets a reference to the generic "FindBy" method of the given finder - /// for the given message type using a hashtable lookup rather than reflection. - /// - /// - /// - /// - public static MethodInfo GetFindByMethodForFinder(IFinder finder, IMessage message) - { - MethodInfo result = null; - - IDictionary methods; - FinderTypeToMessageToMethodInfoLookup.TryGetValue(finder.GetType(), out methods); - - if (methods != null) - { - methods.TryGetValue(message.GetType(), out result); - - if (result == null) - foreach (Type messageType in methods.Keys) - if (messageType.IsAssignableFrom(message.GetType())) - result = methods[messageType]; - } - - return result; - } - - /// - /// Returns a list of finder object capable of using the given message. - /// - /// - /// - public static IEnumerable GetFindersFor(IMessage m) - { - var result = new List(); - - foreach(Type finderType in FinderTypeToMessageToMethodInfoLookup.Keys) - { - IDictionary messageToMethodInfo = FinderTypeToMessageToMethodInfoLookup[finderType]; - if (messageToMethodInfo.ContainsKey(m.GetType())) - { - result.Add(_builderStatic.Build(finderType) as IFinder); - continue; - } - - foreach(Type messageType in messageToMethodInfo.Keys) - if (messageType.IsAssignableFrom(m.GetType())) - result.Add(_builderStatic.Build(finderType) as IFinder); - } - - return result; - } - - /// - /// Returns the list of saga types configured. - /// - /// - public static IEnumerable GetSagaDataTypes() - { - return SagaTypeToSagaEntityTypeLookup.Values; - } - - /// - /// Gets a reference to the generic "Handle" method on the given saga - /// for the given message type using a hashtable lookup rather than reflection. - /// - /// - /// - /// - public static MethodInfo GetHandleMethodForSagaAndMessage(object saga, IMessage message) - { - IDictionary lookup; - SagaTypeToHandleMethodLookup.TryGetValue(saga.GetType(), out lookup); - - if (lookup == null) - return null; - - foreach (Type messageType in lookup.Keys) - if (messageType.IsAssignableFrom(message.GetType())) - return lookup[messageType]; - - return null; - } - - #endregion - - #region helper methods - - private static bool IsSagaType(Type t) - { - return IsCompatible(t, typeof(ISaga)); - } - - private static bool IsFinderType(Type t) - { - return IsCompatible(t, typeof(IFinder)); - } - - private static bool IsSagaNotFoundHandler(Type t) - { - return IsCompatible(t, typeof (IHandleSagaNotFound)); - } - - private static bool IsCompatible(Type t, Type source) - { - return source.IsAssignableFrom(t) && t != source && !t.IsAbstract && !t.IsInterface && !t.IsGenericType; - } - - private static void ConfigureSaga(Type t) - { - foreach (Type messageType in GetMessageTypesHandledBySaga(t)) - MapMessageTypeToSagaType(messageType, t); - - foreach (Type messageType in GetMessageTypesThatRequireStartingTheSaga(t)) - MessageTypeRequiresStartingSaga(messageType, t); - - PropertyInfo prop = t.GetProperty("Data"); - MapSagaTypeToSagaEntityType(t, prop.PropertyType); - - if (!typeof(IConfigurable).IsAssignableFrom(t)) - return; - - var defaultConstructor = t.GetConstructor(Type.EmptyTypes); - if (defaultConstructor == null) - throw new InvalidOperationException("Sagas which implement IConfigurable, like those which inherit from Saga, must have a default constructor."); - - var saga = Activator.CreateInstance(t) as ISaga; - - var p = t.GetProperty("SagaMessageFindingConfiguration", typeof(IConfigureHowToFindSagaWithMessage)); - if (p != null) - p.SetValue(saga, SagaMessageFindingConfiguration, null); - - if (saga is IConfigurable) - (saga as IConfigurable).Configure(); - } - - - private static void ConfigureFinder(Type t) - { - foreach (Type interfaceType in t.GetInterfaces()) - { - Type[] args = interfaceType.GetGenericArguments(); - if (args.Length != 2) - continue; - - Type sagaEntityType = null; - Type messageType = null; - foreach(Type typ in args) - { - if (typeof (ISagaEntity).IsAssignableFrom(typ)) - sagaEntityType = typ; - - if (typeof (IMessage).IsAssignableFrom(typ)) - messageType = typ; - } - - if (sagaEntityType == null || messageType == null) - continue; - - Type finderType = typeof (IFindSagas<>.Using<>).MakeGenericType(sagaEntityType, messageType); - if (!finderType.IsAssignableFrom(t)) - continue; - - FinderTypeToSagaEntityTypeLookup[t] = sagaEntityType; - - MethodInfo method = t.GetMethod("FindBy", new[] { messageType }); - - IDictionary methods; - FinderTypeToMessageToMethodInfoLookup.TryGetValue(t, out methods); - - if (methods == null) - { - methods = new Dictionary(); - FinderTypeToMessageToMethodInfoLookup[t] = methods; - } - - methods[messageType] = method; - } - } - - private static IEnumerable GetMessageTypesHandledBySaga(Type sagaType) - { - return GetMessagesCorrespondingToFilterOnSaga(sagaType, typeof (IMessageHandler<>)); - } - - private static IEnumerable GetMessageTypesThatRequireStartingTheSaga(Type sagaType) - { - return GetMessagesCorrespondingToFilterOnSaga(sagaType, typeof(ISagaStartedBy<>)); - } - - private static IEnumerable GetMessagesCorrespondingToFilterOnSaga(Type sagaType, Type filter) - { - foreach (Type interfaceType in sagaType.GetInterfaces()) - { - Type[] types = interfaceType.GetGenericArguments(); - foreach (Type arg in types) - if (typeof(IMessage).IsAssignableFrom(arg)) - if (filter.MakeGenericType(arg) == interfaceType) - yield return arg; - } - } - - private static void MapMessageTypeToSagaType(Type messageType, Type sagaType) - { - List sagas; - MessageTypeToSagaTypesLookup.TryGetValue(messageType, out sagas); - - if (sagas == null) - { - sagas = new List(1); - MessageTypeToSagaTypesLookup[messageType] = sagas; - } - - if (!sagas.Contains(sagaType)) - sagas.Add(sagaType); - - IDictionary methods; - SagaTypeToHandleMethodLookup.TryGetValue(sagaType, out methods); - - if (methods == null) - { - methods = new Dictionary(); - SagaTypeToHandleMethodLookup[sagaType] = methods; - } - - Type directType = typeof(IMessageHandler<>).MakeGenericType(messageType); - if (directType.IsAssignableFrom(sagaType)) - methods[messageType] = directType.GetMethod("Handle", new[] { messageType }); - } - - private static void MapSagaTypeToSagaEntityType(Type sagaType, Type sagaEntityType) - { - SagaTypeToSagaEntityTypeLookup[sagaType] = sagaEntityType; - SagaEntityTypeToSagaTypeLookup[sagaEntityType] = sagaType; - } - - private static void MessageTypeRequiresStartingSaga(Type messageType, Type sagaType) - { - List messages; - SagaTypeToMessagTypesRequiringSagaStartLookup.TryGetValue(sagaType, out messages); - - if (messages == null) - { - messages = new List(1); - SagaTypeToMessagTypesRequiringSagaStartLookup[sagaType] = messages; - } - - if (!messages.Contains(messageType)) - messages.Add(messageType); - } - - #endregion - - #region members - - private readonly static IDictionary> MessageTypeToSagaTypesLookup = new Dictionary>(); - private readonly static IDictionary> SagaTypeToHandleMethodLookup = new Dictionary>(); - - private static readonly IDictionary SagaEntityTypeToSagaTypeLookup = new Dictionary(); - private static readonly IDictionary SagaTypeToSagaEntityTypeLookup = new Dictionary(); - - private static readonly IDictionary FinderTypeToSagaEntityTypeLookup = new Dictionary(); - private static readonly IDictionary> FinderTypeToMessageToMethodInfoLookup = new Dictionary>(); - - private static readonly IDictionary> SagaTypeToMessagTypesRequiringSagaStartLookup = new Dictionary>(); - - private static readonly IConfigureHowToFindSagaWithMessage SagaMessageFindingConfiguration = new ConfigureHowToFindSagaWithMessageDispatcher(); - - internal static readonly ILog Logger = LogManager.GetLogger("NServiceBus"); - #endregion - } -} +using System; +using System.Collections.Generic; +using NServiceBus.ObjectBuilder; +using System.Reflection; +using NServiceBus.Saga; +using Common.Logging; + +namespace NServiceBus.Sagas.Impl +{ + /// + /// Object that scans types and stores meta-data to be used for type lookups at runtime by sagas. + /// + public class Configure + { + #region setup + + private IConfigureComponents configurer; + private static IBuilder _builderStatic; + + private Configure() + { + } + + /// + /// Starts the configuration process for the saga infrastructure. + /// + /// + /// + /// + public static Configure With(IConfigureComponents configurer, IBuilder builder) + { + _builderStatic = builder; + + configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); + + return new Configure { configurer = configurer }; + } + + /// + /// Scans for types relevant to the saga infrastructure. + /// These include implementers of and . + /// + /// + public void SagasIn(IEnumerable types) + { + foreach (Type t in types) + { + if (IsSagaType(t)) + { + configurer.ConfigureComponent(t, ComponentCallModelEnum.Singlecall); + ConfigureSaga(t); + SagasWereFound = true; + continue; + } + + if (IsFinderType(t)) + { + configurer.ConfigureComponent(t, ComponentCallModelEnum.Singlecall); + ConfigureFinder(t); + continue; + } + + if (IsSagaNotFoundHandler(t)) + { + configurer.ConfigureComponent(t, ComponentCallModelEnum.Singlecall); + continue; + } + } + + CreateAdditionalFindersAsNecessary(); + } + + internal static void ConfigureHowToFindSagaWithMessage(Type sagaType, PropertyInfo sagaProp, Type messageType, PropertyInfo messageProp) + { + IDictionary> messageToProperties; + SagaEntityToMessageToPropertyLookup.TryGetValue(sagaType, out messageToProperties); + + if (messageToProperties == null) + { + messageToProperties = new Dictionary>(); + SagaEntityToMessageToPropertyLookup[sagaType] = messageToProperties; + } + + messageToProperties[messageType] = new KeyValuePair(sagaProp, messageProp); + } + + private static readonly IDictionary>> SagaEntityToMessageToPropertyLookup = new Dictionary>>(); + + /// + /// Creates an for each saga type that doesn't have a finder configured. + /// + private void CreateAdditionalFindersAsNecessary() + { + foreach (Type sagaEntityType in SagaEntityToMessageToPropertyLookup.Keys) + foreach (Type messageType in SagaEntityToMessageToPropertyLookup[sagaEntityType].Keys) + { + var pair = SagaEntityToMessageToPropertyLookup[sagaEntityType][messageType]; + CreatePropertyFinder(sagaEntityType, messageType, pair.Key, pair.Value); + } + + foreach(Type sagaType in SagaTypeToSagaEntityTypeLookup.Keys) + { + Type sagaEntityType = SagaTypeToSagaEntityTypeLookup[sagaType]; + + Type finder = typeof(SagaEntityFinder<>).MakeGenericType(sagaEntityType); + configurer.ConfigureComponent(finder, ComponentCallModelEnum.Singlecall); + ConfigureFinder(finder); + + Type nullFinder = typeof (NullSagaFinder<>).MakeGenericType(sagaEntityType); + configurer.ConfigureComponent(nullFinder, ComponentCallModelEnum.Singlecall); + ConfigureFinder(nullFinder); + + //TODO: Refactor the above. + } + } + + private void CreatePropertyFinder(Type sagaEntityType, Type messageType, PropertyInfo sagaProperty, PropertyInfo messageProperty) + { + Type finderType = typeof(PropertySagaFinder<,>).MakeGenericType(sagaEntityType, messageType); + + configurer.ConfigureComponent(finderType, ComponentCallModelEnum.Singlecall) + .ConfigureProperty("SagaProperty", sagaProperty) + .ConfigureProperty("MessageProperty", messageProperty); + + ConfigureFinder(finderType); + } + + #endregion + + #region methods used at runtime + + /// + /// Returns true if a saga type was found in the types passed in to . + /// + public static bool SagasWereFound { get; private set; } + + + /// + /// Gets the saga type to instantiate and invoke if an existing saga couldn't be found by + /// the given finder using the given message. + /// + /// + /// + /// + public static Type GetSagaTypeToStartIfMessageNotFoundByFinder(IMessage message, IFinder finder) + { + Type sagaEntityType; + FinderTypeToSagaEntityTypeLookup.TryGetValue(finder.GetType(), out sagaEntityType); + + if (sagaEntityType == null) + return null; + + Type sagaType; + SagaEntityTypeToSagaTypeLookup.TryGetValue(sagaEntityType, out sagaType); + + if (sagaType == null) + return null; + + List messageTypes; + SagaTypeToMessagTypesRequiringSagaStartLookup.TryGetValue(sagaType, out messageTypes); + + if (messageTypes == null) + return null; + + if (messageTypes.Contains(message.GetType())) + return sagaType; + + foreach (Type msgTypeHandleBySaga in messageTypes) + if (msgTypeHandleBySaga.IsAssignableFrom(message.GetType())) + return sagaType; + + return null; + } + + /// + /// Finds the types of sagas that can handle the given concrete message type. + /// + /// A concrete type for a message object + /// The list of saga types. + public static List GetSagaTypesForMessageType(Type messageType) + { + var sagas = new List(); + + foreach(Type msgTypeHandled in MessageTypeToSagaTypesLookup.Keys) + if (msgTypeHandled.IsAssignableFrom(messageType)) + sagas.AddRange(MessageTypeToSagaTypesLookup[msgTypeHandled]); + + return sagas; + } + + /// + /// Returns the saga type configured for the given entity type. + /// + /// + /// + public static Type GetSagaTypeForSagaEntityType(Type sagaEntityType) + { + Type result; + SagaEntityTypeToSagaTypeLookup.TryGetValue(sagaEntityType, out result); + + return result; + } + + /// + /// Returns the entity type configured for the given saga type. + /// + /// + /// + public static Type GetSagaEntityTypeForSagaType(Type sagaType) + { + Type result; + SagaTypeToSagaEntityTypeLookup.TryGetValue(sagaType, out result); + + return result; + } + + /// + /// Indicates if a saga has been configured to handle the given message type. + /// + /// + /// + public static bool IsMessageTypeHandledBySaga(Type messageType) + { + if (MessageTypeToSagaTypesLookup.Keys.Contains(messageType)) + return true; + + foreach(Type msgHandledBySaga in MessageTypeToSagaTypesLookup.Keys) + if (msgHandledBySaga.IsAssignableFrom(messageType)) + return true; + + return false; + } + + /// + /// Gets a reference to the generic "FindBy" method of the given finder + /// for the given message type using a hashtable lookup rather than reflection. + /// + /// + /// + /// + public static MethodInfo GetFindByMethodForFinder(IFinder finder, IMessage message) + { + MethodInfo result = null; + + IDictionary methods; + FinderTypeToMessageToMethodInfoLookup.TryGetValue(finder.GetType(), out methods); + + if (methods != null) + { + methods.TryGetValue(message.GetType(), out result); + + if (result == null) + foreach (Type messageType in methods.Keys) + if (messageType.IsAssignableFrom(message.GetType())) + result = methods[messageType]; + } + + return result; + } + + /// + /// Returns a list of finder object capable of using the given message. + /// + /// + /// + public static IEnumerable GetFindersFor(IMessage m) + { + var result = new List(); + + foreach(Type finderType in FinderTypeToMessageToMethodInfoLookup.Keys) + { + IDictionary messageToMethodInfo = FinderTypeToMessageToMethodInfoLookup[finderType]; + if (messageToMethodInfo.ContainsKey(m.GetType())) + { + result.Add(_builderStatic.Build(finderType) as IFinder); + continue; + } + + foreach(Type messageType in messageToMethodInfo.Keys) + if (messageType.IsAssignableFrom(m.GetType())) + result.Add(_builderStatic.Build(finderType) as IFinder); + } + + return result; + } + + /// + /// Returns the list of saga types configured. + /// + /// + public static IEnumerable GetSagaDataTypes() + { + return SagaTypeToSagaEntityTypeLookup.Values; + } + + /// + /// Gets a reference to the generic "Handle" method on the given saga + /// for the given message type using a hashtable lookup rather than reflection. + /// + /// + /// + /// + public static MethodInfo GetHandleMethodForSagaAndMessage(object saga, IMessage message) + { + IDictionary lookup; + SagaTypeToHandleMethodLookup.TryGetValue(saga.GetType(), out lookup); + + if (lookup == null) + return null; + + foreach (Type messageType in lookup.Keys) + if (messageType.IsAssignableFrom(message.GetType())) + return lookup[messageType]; + + return null; + } + + #endregion + + #region helper methods + + private static bool IsSagaType(Type t) + { + return IsCompatible(t, typeof(ISaga)); + } + + private static bool IsFinderType(Type t) + { + return IsCompatible(t, typeof(IFinder)); + } + + private static bool IsSagaNotFoundHandler(Type t) + { + return IsCompatible(t, typeof (IHandleSagaNotFound)); + } + + private static bool IsCompatible(Type t, Type source) + { + return source.IsAssignableFrom(t) && t != source && !t.IsAbstract && !t.IsInterface && !t.IsGenericType; + } + + private static void ConfigureSaga(Type t) + { + foreach (Type messageType in GetMessageTypesHandledBySaga(t)) + MapMessageTypeToSagaType(messageType, t); + + foreach (Type messageType in GetMessageTypesThatRequireStartingTheSaga(t)) + MessageTypeRequiresStartingSaga(messageType, t); + + PropertyInfo prop = t.GetProperty("Data"); + MapSagaTypeToSagaEntityType(t, prop.PropertyType); + + if (!typeof(IConfigurable).IsAssignableFrom(t)) + return; + + var defaultConstructor = t.GetConstructor(Type.EmptyTypes); + if (defaultConstructor == null) + throw new InvalidOperationException("Sagas which implement IConfigurable, like those which inherit from Saga, must have a default constructor."); + + var saga = Activator.CreateInstance(t) as ISaga; + + var p = t.GetProperty("SagaMessageFindingConfiguration", typeof(IConfigureHowToFindSagaWithMessage)); + if (p != null) + p.SetValue(saga, SagaMessageFindingConfiguration, null); + + if (saga is IConfigurable) + (saga as IConfigurable).Configure(); + } + + + private static void ConfigureFinder(Type t) + { + foreach (Type interfaceType in t.GetInterfaces()) + { + Type[] args = interfaceType.GetGenericArguments(); + if (args.Length != 2) + continue; + + Type sagaEntityType = null; + Type messageType = null; + foreach(Type typ in args) + { + if (typeof (ISagaEntity).IsAssignableFrom(typ)) + sagaEntityType = typ; + + if (typeof (IMessage).IsAssignableFrom(typ)) + messageType = typ; + } + + if (sagaEntityType == null || messageType == null) + continue; + + Type finderType = typeof (IFindSagas<>.Using<>).MakeGenericType(sagaEntityType, messageType); + if (!finderType.IsAssignableFrom(t)) + continue; + + FinderTypeToSagaEntityTypeLookup[t] = sagaEntityType; + + MethodInfo method = t.GetMethod("FindBy", new[] { messageType }); + + IDictionary methods; + FinderTypeToMessageToMethodInfoLookup.TryGetValue(t, out methods); + + if (methods == null) + { + methods = new Dictionary(); + FinderTypeToMessageToMethodInfoLookup[t] = methods; + } + + methods[messageType] = method; + } + } + + private static IEnumerable GetMessageTypesHandledBySaga(Type sagaType) + { + return GetMessagesCorrespondingToFilterOnSaga(sagaType, typeof (IMessageHandler<>)); + } + + private static IEnumerable GetMessageTypesThatRequireStartingTheSaga(Type sagaType) + { + return GetMessagesCorrespondingToFilterOnSaga(sagaType, typeof(ISagaStartedBy<>)); + } + + private static IEnumerable GetMessagesCorrespondingToFilterOnSaga(Type sagaType, Type filter) + { + foreach (Type interfaceType in sagaType.GetInterfaces()) + { + Type[] types = interfaceType.GetGenericArguments(); + foreach (Type arg in types) + if (typeof(IMessage).IsAssignableFrom(arg)) + if (filter.MakeGenericType(arg) == interfaceType) + yield return arg; + } + } + + private static void MapMessageTypeToSagaType(Type messageType, Type sagaType) + { + List sagas; + MessageTypeToSagaTypesLookup.TryGetValue(messageType, out sagas); + + if (sagas == null) + { + sagas = new List(1); + MessageTypeToSagaTypesLookup[messageType] = sagas; + } + + if (!sagas.Contains(sagaType)) + sagas.Add(sagaType); + + IDictionary methods; + SagaTypeToHandleMethodLookup.TryGetValue(sagaType, out methods); + + if (methods == null) + { + methods = new Dictionary(); + SagaTypeToHandleMethodLookup[sagaType] = methods; + } + + Type directType = typeof(IMessageHandler<>).MakeGenericType(messageType); + if (directType.IsAssignableFrom(sagaType)) + methods[messageType] = directType.GetMethod("Handle", new[] { messageType }); + } + + private static void MapSagaTypeToSagaEntityType(Type sagaType, Type sagaEntityType) + { + SagaTypeToSagaEntityTypeLookup[sagaType] = sagaEntityType; + SagaEntityTypeToSagaTypeLookup[sagaEntityType] = sagaType; + } + + private static void MessageTypeRequiresStartingSaga(Type messageType, Type sagaType) + { + List messages; + SagaTypeToMessagTypesRequiringSagaStartLookup.TryGetValue(sagaType, out messages); + + if (messages == null) + { + messages = new List(1); + SagaTypeToMessagTypesRequiringSagaStartLookup[sagaType] = messages; + } + + if (!messages.Contains(messageType)) + messages.Add(messageType); + } + + #endregion + + #region members + + private readonly static IDictionary> MessageTypeToSagaTypesLookup = new Dictionary>(); + private readonly static IDictionary> SagaTypeToHandleMethodLookup = new Dictionary>(); + + private static readonly IDictionary SagaEntityTypeToSagaTypeLookup = new Dictionary(); + private static readonly IDictionary SagaTypeToSagaEntityTypeLookup = new Dictionary(); + + private static readonly IDictionary FinderTypeToSagaEntityTypeLookup = new Dictionary(); + private static readonly IDictionary> FinderTypeToMessageToMethodInfoLookup = new Dictionary>(); + + private static readonly IDictionary> SagaTypeToMessagTypesRequiringSagaStartLookup = new Dictionary>(); + + private static readonly IConfigureHowToFindSagaWithMessage SagaMessageFindingConfiguration = new ConfigureHowToFindSagaWithMessageDispatcher(); + + internal static readonly ILog Logger = LogManager.GetLogger("NServiceBus"); + #endregion + } +} diff --git a/src/impl/Sagas/NServiceBus.Sagas.Impl/ConfigureHowToFindSagaWithMessageDispatcher.cs b/src/impl/Sagas/NServiceBus.Sagas.Impl/ConfigureHowToFindSagaWithMessageDispatcher.cs index b4b6a0cb105..03f699c659d 100644 --- a/src/impl/Sagas/NServiceBus.Sagas.Impl/ConfigureHowToFindSagaWithMessageDispatcher.cs +++ b/src/impl/Sagas/NServiceBus.Sagas.Impl/ConfigureHowToFindSagaWithMessageDispatcher.cs @@ -1,22 +1,22 @@ -using System; -using System.Linq.Expressions; -using NServiceBus.Saga; -using NServiceBus.Utils.Reflection; - -namespace NServiceBus.Sagas.Impl -{ - /// - /// Class used to bridge the dependency between Saga{T} in NServiceBus.dll and - /// the Configure class found in this project in NServiceBus.Core.dll. - /// - public class ConfigureHowToFindSagaWithMessageDispatcher : IConfigureHowToFindSagaWithMessage - { - void IConfigureHowToFindSagaWithMessage.ConfigureMapping(Expression> sagaEntityProperty, Expression> messageProperty) - { - var sagaProp = Reflect.GetProperty(sagaEntityProperty, true); - var messageProp = Reflect.GetProperty(messageProperty, false); - - Configure.ConfigureHowToFindSagaWithMessage(typeof(TSagaEntity), sagaProp, typeof(TMessage), messageProp); - } - } +using System; +using System.Linq.Expressions; +using NServiceBus.Saga; +using NServiceBus.Utils.Reflection; + +namespace NServiceBus.Sagas.Impl +{ + /// + /// Class used to bridge the dependency between Saga{T} in NServiceBus.dll and + /// the Configure class found in this project in NServiceBus.Core.dll. + /// + public class ConfigureHowToFindSagaWithMessageDispatcher : IConfigureHowToFindSagaWithMessage + { + void IConfigureHowToFindSagaWithMessage.ConfigureMapping(Expression> sagaEntityProperty, Expression> messageProperty) + { + var sagaProp = Reflect.GetProperty(sagaEntityProperty, true); + var messageProp = Reflect.GetProperty(messageProperty, false); + + Configure.ConfigureHowToFindSagaWithMessage(typeof(TSagaEntity), sagaProp, typeof(TMessage), messageProp); + } + } } \ No newline at end of file diff --git a/src/impl/Sagas/NServiceBus.Sagas.Impl/ConfigureSagas.cs b/src/impl/Sagas/NServiceBus.Sagas.Impl/ConfigureSagas.cs index 526fefcd1be..11ea53c0b9d 100644 --- a/src/impl/Sagas/NServiceBus.Sagas.Impl/ConfigureSagas.cs +++ b/src/impl/Sagas/NServiceBus.Sagas.Impl/ConfigureSagas.cs @@ -1,22 +1,22 @@ -namespace NServiceBus -{ - /// - /// Contains extension methods to NServiceBus.Configure. - /// - public static class ConfigureSagas - { - /// - /// Configure this endpoint to support sagas. - /// - /// - /// - public static Configure Sagas(this Configure config) - { - NServiceBus.Sagas.Impl.Configure - .With(config.Configurer, config.Builder) - .SagasIn(Configure.TypesToScan); - - return config; - } - } -} +namespace NServiceBus +{ + /// + /// Contains extension methods to NServiceBus.Configure. + /// + public static class ConfigureSagas + { + /// + /// Configure this endpoint to support sagas. + /// + /// + /// + public static Configure Sagas(this Configure config) + { + NServiceBus.Sagas.Impl.Configure + .With(config.Configurer, config.Builder) + .SagasIn(Configure.TypesToScan); + + return config; + } + } +} diff --git a/src/impl/Sagas/NServiceBus.Sagas.Impl/GuidCombGenerator.cs b/src/impl/Sagas/NServiceBus.Sagas.Impl/GuidCombGenerator.cs index 718a5210adc..9abfc4b9110 100644 --- a/src/impl/Sagas/NServiceBus.Sagas.Impl/GuidCombGenerator.cs +++ b/src/impl/Sagas/NServiceBus.Sagas.Impl/GuidCombGenerator.cs @@ -1,54 +1,54 @@ -using System; - -namespace NServiceBus.Sagas.Impl -{ - /// - /// Generates values - /// using a strategy suggested Jimmy Nilsson's - /// article - /// on informit.com. - /// - /// - ///

- /// The comb algorithm is designed to make the use of GUIDs as Primary Keys, Foreign Keys, - /// and Indexes nearly as efficient as ints. - ///

- ///

- /// This code was modifed based on Donald Mull's contributor to the - /// NHibernate source. - ///

- ///
- public static class GuidCombGenerator - { - /// - /// Generate a new using the comb algorithm. - /// - public static Guid Generate() - { - byte[] guidArray = Guid.NewGuid().ToByteArray(); - - DateTime baseDate = new DateTime(1900, 1, 1); - DateTime now = DateTime.Now; - - // Get the days and milliseconds which will be used to build the byte string - TimeSpan days = new TimeSpan(now.Ticks - baseDate.Ticks); - TimeSpan msecs = now.TimeOfDay; - - // Convert to a byte array - // Note that SQL Server is accurate to 1/300th of a millisecond so we divide by 3.333333 - byte[] daysArray = BitConverter.GetBytes(days.Days); - byte[] msecsArray = BitConverter.GetBytes((long)(msecs.TotalMilliseconds / 3.333333)); - - // Reverse the bytes to match SQL Servers ordering - Array.Reverse(daysArray); - Array.Reverse(msecsArray); - - // Copy the bytes into the guid - Array.Copy(daysArray, daysArray.Length - 2, guidArray, guidArray.Length - 6, 2); - Array.Copy(msecsArray, msecsArray.Length - 4, guidArray, guidArray.Length - 4, 4); - - return new Guid(guidArray); - } - } -} - +using System; + +namespace NServiceBus.Sagas.Impl +{ + /// + /// Generates values + /// using a strategy suggested Jimmy Nilsson's + /// article + /// on informit.com. + /// + /// + ///

+ /// The comb algorithm is designed to make the use of GUIDs as Primary Keys, Foreign Keys, + /// and Indexes nearly as efficient as ints. + ///

+ ///

+ /// This code was modifed based on Donald Mull's contributor to the + /// NHibernate source. + ///

+ ///
+ public static class GuidCombGenerator + { + /// + /// Generate a new using the comb algorithm. + /// + public static Guid Generate() + { + byte[] guidArray = Guid.NewGuid().ToByteArray(); + + DateTime baseDate = new DateTime(1900, 1, 1); + DateTime now = DateTime.Now; + + // Get the days and milliseconds which will be used to build the byte string + TimeSpan days = new TimeSpan(now.Ticks - baseDate.Ticks); + TimeSpan msecs = now.TimeOfDay; + + // Convert to a byte array + // Note that SQL Server is accurate to 1/300th of a millisecond so we divide by 3.333333 + byte[] daysArray = BitConverter.GetBytes(days.Days); + byte[] msecsArray = BitConverter.GetBytes((long)(msecs.TotalMilliseconds / 3.333333)); + + // Reverse the bytes to match SQL Servers ordering + Array.Reverse(daysArray); + Array.Reverse(msecsArray); + + // Copy the bytes into the guid + Array.Copy(daysArray, daysArray.Length - 2, guidArray, guidArray.Length - 6, 2); + Array.Copy(msecsArray, msecsArray.Length - 4, guidArray, guidArray.Length - 4, 4); + + return new Guid(guidArray); + } + } +} + diff --git a/src/impl/Sagas/NServiceBus.Sagas.Impl/NServiceBus.Sagas.Impl.csproj b/src/impl/Sagas/NServiceBus.Sagas.Impl/NServiceBus.Sagas.Impl.csproj index 5b946d7039d..e9813062b84 100644 --- a/src/impl/Sagas/NServiceBus.Sagas.Impl/NServiceBus.Sagas.Impl.csproj +++ b/src/impl/Sagas/NServiceBus.Sagas.Impl/NServiceBus.Sagas.Impl.csproj @@ -1,98 +1,98 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {48008EAF-C32A-4EB5-A27E-54062637EA0F} - Library - Properties - NServiceBus.Sagas.Impl - NServiceBus.Sagas.Impl - v4.0 - 512 - - - - - - - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.Sagas.Impl.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.Sagas.Impl.XML - - - - False - ..\..\..\..\lib\Common.Logging.dll - False - - - False - ..\..\..\..\build\output\NServiceBus.dll - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.Utils.Reflection.dll - - - - 3.5 - - - - - CommonAssemblyInfo.cs - - - - - Code - - - - - - - - - - - - - copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {48008EAF-C32A-4EB5-A27E-54062637EA0F} + Library + Properties + NServiceBus.Sagas.Impl + NServiceBus.Sagas.Impl + v4.0 + 512 + + + + + + + + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.Sagas.Impl.XML + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.Sagas.Impl.XML + + + + False + ..\..\..\..\lib\Common.Logging.dll + False + + + False + ..\..\..\..\build\output\NServiceBus.dll + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.Utils.Reflection.dll + + + + 3.5 + + + + + CommonAssemblyInfo.cs + + + + + Code + + + + + + + + + + + + + copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\" + \ No newline at end of file diff --git a/src/impl/Sagas/NServiceBus.Sagas.Impl/NullSagaFinder.cs b/src/impl/Sagas/NServiceBus.Sagas.Impl/NullSagaFinder.cs index f1e26b7dceb..234400ba938 100644 --- a/src/impl/Sagas/NServiceBus.Sagas.Impl/NullSagaFinder.cs +++ b/src/impl/Sagas/NServiceBus.Sagas.Impl/NullSagaFinder.cs @@ -1,22 +1,22 @@ -using NServiceBus.Saga; - -namespace NServiceBus.Sagas.Impl -{ - /// - /// Catch-all finder to return null - so that we can later check - /// for whether a new saga should be created. - /// - /// - public class NullSagaFinder : IFindSagas.Using where T : ISagaEntity - { - /// - /// Returns null. - /// - /// - /// - public T FindBy(IMessage message) - { - return default(T); - } - } -} +using NServiceBus.Saga; + +namespace NServiceBus.Sagas.Impl +{ + /// + /// Catch-all finder to return null - so that we can later check + /// for whether a new saga should be created. + /// + /// + public class NullSagaFinder : IFindSagas.Using where T : ISagaEntity + { + /// + /// Returns null. + /// + /// + /// + public T FindBy(IMessage message) + { + return default(T); + } + } +} diff --git a/src/impl/Sagas/NServiceBus.Sagas.Impl/Properties/AssemblyInfo.cs b/src/impl/Sagas/NServiceBus.Sagas.Impl/Properties/AssemblyInfo.cs index fd5aec2bc22..bcbd3f690b4 100644 --- a/src/impl/Sagas/NServiceBus.Sagas.Impl/Properties/AssemblyInfo.cs +++ b/src/impl/Sagas/NServiceBus.Sagas.Impl/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Saga Implementation")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Saga Implementation")] [assembly: AssemblyDescription("Saga functionality implementation.")] \ No newline at end of file diff --git a/src/impl/Sagas/NServiceBus.Sagas.Impl/PropertySagaFinder.cs b/src/impl/Sagas/NServiceBus.Sagas.Impl/PropertySagaFinder.cs index fefa6c3ff33..e23ab9fa878 100644 --- a/src/impl/Sagas/NServiceBus.Sagas.Impl/PropertySagaFinder.cs +++ b/src/impl/Sagas/NServiceBus.Sagas.Impl/PropertySagaFinder.cs @@ -1,40 +1,40 @@ -using System.Reflection; -using NServiceBus.Saga; - -namespace NServiceBus.Sagas.Impl -{ - /// - /// Finds the given type of saga by looking it up based on the given property. - /// - /// - /// - public class PropertySagaFinder : IFindSagas.Using - where TSaga : ISagaEntity - where TMessage : IMessage - { - /// - /// Injected persister - /// - public ISagaPersister SagaPersister { get; set; } - - /// - /// Property of the saga that will be used for lookup. - /// - public PropertyInfo SagaProperty { get; set; } - - /// - /// Property of the message whose value will be used for the lookup. - /// - public PropertyInfo MessageProperty { get; set; } - - /// - /// Uses the saga persister to find the saga. - /// - /// - /// - public TSaga FindBy(TMessage message) - { - return SagaPersister.Get(SagaProperty.Name, MessageProperty.GetValue(message, null)); - } - } -} +using System.Reflection; +using NServiceBus.Saga; + +namespace NServiceBus.Sagas.Impl +{ + /// + /// Finds the given type of saga by looking it up based on the given property. + /// + /// + /// + public class PropertySagaFinder : IFindSagas.Using + where TSaga : ISagaEntity + where TMessage : IMessage + { + /// + /// Injected persister + /// + public ISagaPersister SagaPersister { get; set; } + + /// + /// Property of the saga that will be used for lookup. + /// + public PropertyInfo SagaProperty { get; set; } + + /// + /// Property of the message whose value will be used for the lookup. + /// + public PropertyInfo MessageProperty { get; set; } + + /// + /// Uses the saga persister to find the saga. + /// + /// + /// + public TSaga FindBy(TMessage message) + { + return SagaPersister.Get(SagaProperty.Name, MessageProperty.GetValue(message, null)); + } + } +} diff --git a/src/impl/Sagas/NServiceBus.Sagas.Impl/ReplyingToNullOriginatorDispatcher.cs b/src/impl/Sagas/NServiceBus.Sagas.Impl/ReplyingToNullOriginatorDispatcher.cs index 6e5451cd02f..b703eac1870 100644 --- a/src/impl/Sagas/NServiceBus.Sagas.Impl/ReplyingToNullOriginatorDispatcher.cs +++ b/src/impl/Sagas/NServiceBus.Sagas.Impl/ReplyingToNullOriginatorDispatcher.cs @@ -1,21 +1,21 @@ -using System; -using NServiceBus.Saga; - -namespace NServiceBus.Sagas.Impl -{ - /// - /// Class used to bridge the dependency between Saga{T} in NServiceBus.dll and - /// which doesn't have access to Common.Logging and the level of logging - /// known in the Configure class found in this project in NServiceBus.Core.dll. - /// - public class ReplyingToNullOriginatorDispatcher : IHandleReplyingToNullOriginator - { - void IHandleReplyingToNullOriginator.TriedToReplyToNullOriginator() - { - if (Configure.Logger.IsDebugEnabled) - throw new InvalidOperationException - ( - "Originator of saga has not provided a return address - cannot reply."); - } - } +using System; +using NServiceBus.Saga; + +namespace NServiceBus.Sagas.Impl +{ + /// + /// Class used to bridge the dependency between Saga{T} in NServiceBus.dll and + /// which doesn't have access to Common.Logging and the level of logging + /// known in the Configure class found in this project in NServiceBus.Core.dll. + /// + public class ReplyingToNullOriginatorDispatcher : IHandleReplyingToNullOriginator + { + void IHandleReplyingToNullOriginator.TriedToReplyToNullOriginator() + { + if (Configure.Logger.IsDebugEnabled) + throw new InvalidOperationException + ( + "Originator of saga has not provided a return address - cannot reply."); + } + } } \ No newline at end of file diff --git a/src/impl/Sagas/NServiceBus.Sagas.Impl/SagaEntityFinder.cs b/src/impl/Sagas/NServiceBus.Sagas.Impl/SagaEntityFinder.cs index 4f499a2f948..0b6a858d685 100644 --- a/src/impl/Sagas/NServiceBus.Sagas.Impl/SagaEntityFinder.cs +++ b/src/impl/Sagas/NServiceBus.Sagas.Impl/SagaEntityFinder.cs @@ -1,29 +1,29 @@ - -using NServiceBus.Saga; - -namespace NServiceBus.Sagas.Impl -{ - /// - /// Single-call object used to find saga entities using saga ids from a saga persister. - /// - public class SagaEntityFinder : IFindSagas.Using where T : ISagaEntity - { - /// - /// Saga persister used to find sagas. - /// - public ISagaPersister Persister { get; set; } - - /// - /// Finds the saga entity type T using the saga Id in the given message. - /// - /// - /// - public T FindBy(ISagaMessage message) - { - if (Persister != null) - return Persister.Get(message.SagaId); - - return default(T); - } - } -} + +using NServiceBus.Saga; + +namespace NServiceBus.Sagas.Impl +{ + /// + /// Single-call object used to find saga entities using saga ids from a saga persister. + /// + public class SagaEntityFinder : IFindSagas.Using where T : ISagaEntity + { + /// + /// Saga persister used to find sagas. + /// + public ISagaPersister Persister { get; set; } + + /// + /// Finds the saga entity type T using the saga Id in the given message. + /// + /// + /// + public T FindBy(ISagaMessage message) + { + if (Persister != null) + return Persister.Get(message.SagaId); + + return default(T); + } + } +} diff --git a/src/impl/Sagas/NServiceBus.Sagas.Impl/SagaMessageHandler.cs b/src/impl/Sagas/NServiceBus.Sagas.Impl/SagaMessageHandler.cs index 96899dc5c35..5966dcc24ba 100644 --- a/src/impl/Sagas/NServiceBus.Sagas.Impl/SagaMessageHandler.cs +++ b/src/impl/Sagas/NServiceBus.Sagas.Impl/SagaMessageHandler.cs @@ -1,245 +1,245 @@ -using System; -using NServiceBus.ObjectBuilder; -using System.Reflection; -using Common.Logging; -using System.Collections.Generic; -using NServiceBus.Saga; - -namespace NServiceBus.Sagas.Impl -{ - /// - /// A message handler central to the saga infrastructure. - /// - public class SagaMessageHandler : IMessageHandler - { - /// - /// Used to notify timeout manager of sagas that have completed. - /// - public IBus Bus { get; set; } - - /// - /// Handles a message. - /// - /// The message to handle. - /// - /// If the message received needs to start a new saga, then a new - /// saga instance will be created and will be saved using the - /// implementation provided in the configuration. Any other message implementing - /// will cause the existing saga instance with which it is - /// associated to continue. - public void Handle(IMessage message) - { - if (!NeedToHandle(message)) - return; - - var entitiesHandled = new List(); - var sagaTypesHandled = new List(); - - foreach (IFinder finder in Configure.GetFindersFor(message)) - { - ISaga saga; - bool sagaEntityIsPersistent = true; - ISagaEntity sagaEntity = UseFinderToFindSaga(finder, message); - - if (sagaEntity == null) - { - Type sagaToCreate = Configure.GetSagaTypeToStartIfMessageNotFoundByFinder(message, finder); - if (sagaToCreate == null) - continue; - - if (sagaTypesHandled.Contains(sagaToCreate)) - continue; // don't create the same saga type twice for the same message - - sagaTypesHandled.Add(sagaToCreate); - - Type sagaEntityType = Configure.GetSagaEntityTypeForSagaType(sagaToCreate); - sagaEntity = Activator.CreateInstance(sagaEntityType) as ISagaEntity; - - if (sagaEntity != null) - { - if (message is ISagaMessage) - sagaEntity.Id = (message as ISagaMessage).SagaId; - else - sagaEntity.Id = GenerateSagaId(); - - sagaEntity.Originator = Bus.CurrentMessageContext.ReturnAddress; - sagaEntity.OriginalMessageId = Bus.CurrentMessageContext.Id; - - sagaEntityIsPersistent = false; - } - - saga = Builder.Build(sagaToCreate) as ISaga; - - } - else - { - if (entitiesHandled.Contains(sagaEntity)) - continue; // don't call the same saga twice - - saga = Builder.Build(Configure.GetSagaTypeForSagaEntityType(sagaEntity.GetType())) as ISaga; - } - - if (saga != null) - { - saga.Entity = sagaEntity; - - HaveSagaHandleMessage(saga, message, sagaEntityIsPersistent); - - sagaTypesHandled.Add(saga.GetType()); - } - - entitiesHandled.Add(sagaEntity); - } - - if (entitiesHandled.Count == 0) - { - logger.InfoFormat("Could not find a saga for the message type {0} with id {1}. Going to invoke SagaNotFoundHandlers.", message.GetType().FullName, Bus.CurrentMessageContext.Id); - foreach (var handler in NServiceBus.Configure.Instance.Builder.BuildAll()) - { - logger.DebugFormat("Invoking SagaNotFoundHandler: {0}", handler.GetType().FullName); - handler.Handle(message); - } - } - } - - /// - /// Decides whether the given message should be handled by the saga infrastructure - /// - /// The message being processed - /// - public bool NeedToHandle(IMessage message) - { - if (message is ISagaMessage && !(message is TimeoutMessage)) - return true; - - var tm = message as TimeoutMessage; - if (tm != null) - { - if (tm.HasNotExpired()) - { - Bus.HandleCurrentMessageLater(); - return false; - } - - return true; - } - - if (Configure.IsMessageTypeHandledBySaga(message.GetType())) - return true; - - return false; - } - - /// - /// Generates a new id for a saga. - /// - /// - public virtual Guid GenerateSagaId() - { - return GuidCombGenerator.Generate(); - } - - #region helper methods - - /// - /// Asks the given finder to find the saga entity using the given message. - /// - /// - /// - /// The saga entity if found, otherwise null. - private static ISagaEntity UseFinderToFindSaga(IFinder finder, IMessage message) - { - MethodInfo method = Configure.GetFindByMethodForFinder(finder, message); - - if (method != null) - return method.Invoke(finder, new object[] {message}) as ISagaEntity; - - return null; - } - - /// - /// Dispatches the message to the saga and, based on the saga's state - /// persists it or notifies of its completion to interested parties. - /// - /// - /// - /// - protected virtual void HaveSagaHandleMessage(ISaga saga, IMessage message, bool sagaIsPersistent) - { - var tm = message as TimeoutMessage; - if (tm != null) - saga.Timeout(tm.State); - else - CallHandleMethodOnSaga(saga, message); - - if (!saga.Completed) - { - if (!sagaIsPersistent) - Persister.Save(saga.Entity); - else - Persister.Update(saga.Entity); - } - else - { - if (sagaIsPersistent) - Persister.Complete(saga.Entity); - - NotifyTimeoutManagerThatSagaHasCompleted(saga); - } - - LogIfSagaIsFinished(saga); - } - - /// - /// Notifies the timeout manager of the saga's completion by sending a timeout message. - /// - /// - protected virtual void NotifyTimeoutManagerThatSagaHasCompleted(ISaga saga) - { - Bus.Send(new TimeoutMessage(saga.Entity, true)); - } - - /// - /// Logs that a saga has completed. - /// - protected virtual void LogIfSagaIsFinished(ISaga saga) - { - if (saga.Completed) - logger.Debug(string.Format("{0} {1} has completed.", saga.GetType().FullName, saga.Entity.Id)); - } - - /// - /// Invokes the handler method on the saga for the message. - /// - /// The saga on which to call the handle method. - /// The message to pass to the handle method. - protected virtual void CallHandleMethodOnSaga(object saga, IMessage message) - { - MethodInfo method = Configure.GetHandleMethodForSagaAndMessage(saga, message); - - if (method != null) - method.Invoke(saga, new object[] { message }); - } - - #endregion - - #region config info - - /// - /// Gets/sets the builder that will be used for instantiating sagas. - /// - public virtual IBuilder Builder { get; set; } - - /// - /// Gets/sets the object used to persist and retrieve sagas. - /// - public virtual ISagaPersister Persister { get; set; } - - #endregion - - /// - /// Object used to log information. - /// - protected readonly ILog logger = LogManager.GetLogger(typeof(SagaMessageHandler)); - } -} +using System; +using NServiceBus.ObjectBuilder; +using System.Reflection; +using Common.Logging; +using System.Collections.Generic; +using NServiceBus.Saga; + +namespace NServiceBus.Sagas.Impl +{ + /// + /// A message handler central to the saga infrastructure. + /// + public class SagaMessageHandler : IMessageHandler + { + /// + /// Used to notify timeout manager of sagas that have completed. + /// + public IBus Bus { get; set; } + + /// + /// Handles a message. + /// + /// The message to handle. + /// + /// If the message received needs to start a new saga, then a new + /// saga instance will be created and will be saved using the + /// implementation provided in the configuration. Any other message implementing + /// will cause the existing saga instance with which it is + /// associated to continue. + public void Handle(IMessage message) + { + if (!NeedToHandle(message)) + return; + + var entitiesHandled = new List(); + var sagaTypesHandled = new List(); + + foreach (IFinder finder in Configure.GetFindersFor(message)) + { + ISaga saga; + bool sagaEntityIsPersistent = true; + ISagaEntity sagaEntity = UseFinderToFindSaga(finder, message); + + if (sagaEntity == null) + { + Type sagaToCreate = Configure.GetSagaTypeToStartIfMessageNotFoundByFinder(message, finder); + if (sagaToCreate == null) + continue; + + if (sagaTypesHandled.Contains(sagaToCreate)) + continue; // don't create the same saga type twice for the same message + + sagaTypesHandled.Add(sagaToCreate); + + Type sagaEntityType = Configure.GetSagaEntityTypeForSagaType(sagaToCreate); + sagaEntity = Activator.CreateInstance(sagaEntityType) as ISagaEntity; + + if (sagaEntity != null) + { + if (message is ISagaMessage) + sagaEntity.Id = (message as ISagaMessage).SagaId; + else + sagaEntity.Id = GenerateSagaId(); + + sagaEntity.Originator = Bus.CurrentMessageContext.ReturnAddress; + sagaEntity.OriginalMessageId = Bus.CurrentMessageContext.Id; + + sagaEntityIsPersistent = false; + } + + saga = Builder.Build(sagaToCreate) as ISaga; + + } + else + { + if (entitiesHandled.Contains(sagaEntity)) + continue; // don't call the same saga twice + + saga = Builder.Build(Configure.GetSagaTypeForSagaEntityType(sagaEntity.GetType())) as ISaga; + } + + if (saga != null) + { + saga.Entity = sagaEntity; + + HaveSagaHandleMessage(saga, message, sagaEntityIsPersistent); + + sagaTypesHandled.Add(saga.GetType()); + } + + entitiesHandled.Add(sagaEntity); + } + + if (entitiesHandled.Count == 0) + { + logger.InfoFormat("Could not find a saga for the message type {0} with id {1}. Going to invoke SagaNotFoundHandlers.", message.GetType().FullName, Bus.CurrentMessageContext.Id); + foreach (var handler in NServiceBus.Configure.Instance.Builder.BuildAll()) + { + logger.DebugFormat("Invoking SagaNotFoundHandler: {0}", handler.GetType().FullName); + handler.Handle(message); + } + } + } + + /// + /// Decides whether the given message should be handled by the saga infrastructure + /// + /// The message being processed + /// + public bool NeedToHandle(IMessage message) + { + if (message is ISagaMessage && !(message is TimeoutMessage)) + return true; + + var tm = message as TimeoutMessage; + if (tm != null) + { + if (tm.HasNotExpired()) + { + Bus.HandleCurrentMessageLater(); + return false; + } + + return true; + } + + if (Configure.IsMessageTypeHandledBySaga(message.GetType())) + return true; + + return false; + } + + /// + /// Generates a new id for a saga. + /// + /// + public virtual Guid GenerateSagaId() + { + return GuidCombGenerator.Generate(); + } + + #region helper methods + + /// + /// Asks the given finder to find the saga entity using the given message. + /// + /// + /// + /// The saga entity if found, otherwise null. + private static ISagaEntity UseFinderToFindSaga(IFinder finder, IMessage message) + { + MethodInfo method = Configure.GetFindByMethodForFinder(finder, message); + + if (method != null) + return method.Invoke(finder, new object[] {message}) as ISagaEntity; + + return null; + } + + /// + /// Dispatches the message to the saga and, based on the saga's state + /// persists it or notifies of its completion to interested parties. + /// + /// + /// + /// + protected virtual void HaveSagaHandleMessage(ISaga saga, IMessage message, bool sagaIsPersistent) + { + var tm = message as TimeoutMessage; + if (tm != null) + saga.Timeout(tm.State); + else + CallHandleMethodOnSaga(saga, message); + + if (!saga.Completed) + { + if (!sagaIsPersistent) + Persister.Save(saga.Entity); + else + Persister.Update(saga.Entity); + } + else + { + if (sagaIsPersistent) + Persister.Complete(saga.Entity); + + NotifyTimeoutManagerThatSagaHasCompleted(saga); + } + + LogIfSagaIsFinished(saga); + } + + /// + /// Notifies the timeout manager of the saga's completion by sending a timeout message. + /// + /// + protected virtual void NotifyTimeoutManagerThatSagaHasCompleted(ISaga saga) + { + Bus.Send(new TimeoutMessage(saga.Entity, true)); + } + + /// + /// Logs that a saga has completed. + /// + protected virtual void LogIfSagaIsFinished(ISaga saga) + { + if (saga.Completed) + logger.Debug(string.Format("{0} {1} has completed.", saga.GetType().FullName, saga.Entity.Id)); + } + + /// + /// Invokes the handler method on the saga for the message. + /// + /// The saga on which to call the handle method. + /// The message to pass to the handle method. + protected virtual void CallHandleMethodOnSaga(object saga, IMessage message) + { + MethodInfo method = Configure.GetHandleMethodForSagaAndMessage(saga, message); + + if (method != null) + method.Invoke(saga, new object[] { message }); + } + + #endregion + + #region config info + + /// + /// Gets/sets the builder that will be used for instantiating sagas. + /// + public virtual IBuilder Builder { get; set; } + + /// + /// Gets/sets the object used to persist and retrieve sagas. + /// + public virtual ISagaPersister Persister { get; set; } + + #endregion + + /// + /// Object used to log information. + /// + protected readonly ILog logger = LogManager.GetLogger(typeof(SagaMessageHandler)); + } +} diff --git a/src/impl/Sagas/Sagas.sln b/src/impl/Sagas/Sagas.sln index f168e7cb232..519d7e11da5 100644 --- a/src/impl/Sagas/Sagas.sln +++ b/src/impl/Sagas/Sagas.sln @@ -1,24 +1,24 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Sagas.Impl", "NServiceBus.Sagas.Impl\NServiceBus.Sagas.Impl.csproj", "{48008EAF-C32A-4EB5-A27E-54062637EA0F}" -EndProject -Global - GlobalSection(SubversionScc) = preSolution - Svn-Managed = True - Manager = AnkhSVN - Subversion Support for Visual Studio - EndGlobalSection - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {48008EAF-C32A-4EB5-A27E-54062637EA0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {48008EAF-C32A-4EB5-A27E-54062637EA0F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {48008EAF-C32A-4EB5-A27E-54062637EA0F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {48008EAF-C32A-4EB5-A27E-54062637EA0F}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Sagas.Impl", "NServiceBus.Sagas.Impl\NServiceBus.Sagas.Impl.csproj", "{48008EAF-C32A-4EB5-A27E-54062637EA0F}" +EndProject +Global + GlobalSection(SubversionScc) = preSolution + Svn-Managed = True + Manager = AnkhSVN - Subversion Support for Visual Studio + EndGlobalSection + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {48008EAF-C32A-4EB5-A27E-54062637EA0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {48008EAF-C32A-4EB5-A27E-54062637EA0F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {48008EAF-C32A-4EB5-A27E-54062637EA0F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {48008EAF-C32A-4EB5-A27E-54062637EA0F}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/impl/Serializers/NServiceBus.Serializers.Binary.Config/ConfigureBinarySerializer.cs b/src/impl/Serializers/NServiceBus.Serializers.Binary.Config/ConfigureBinarySerializer.cs index cc600d900de..bf0ca0c1dd6 100644 --- a/src/impl/Serializers/NServiceBus.Serializers.Binary.Config/ConfigureBinarySerializer.cs +++ b/src/impl/Serializers/NServiceBus.Serializers.Binary.Config/ConfigureBinarySerializer.cs @@ -1,24 +1,24 @@ -using NServiceBus.ObjectBuilder; - -namespace NServiceBus -{ - /// - /// Contains extension methods to NServiceBus.Configure. - /// - public static class ConfigureBinarySerializer - { - /// - /// Use binary serialization. - /// Note that this does not support interface-based messages. - /// - /// - /// - public static Configure BinarySerializer(this Configure config) - { - config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); - config.Configurer.ConfigureComponent(typeof(Serializers.Binary.MessageSerializer), ComponentCallModelEnum.Singleton); - - return config; - } - } -} +using NServiceBus.ObjectBuilder; + +namespace NServiceBus +{ + /// + /// Contains extension methods to NServiceBus.Configure. + /// + public static class ConfigureBinarySerializer + { + /// + /// Use binary serialization. + /// Note that this does not support interface-based messages. + /// + /// + /// + public static Configure BinarySerializer(this Configure config) + { + config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); + config.Configurer.ConfigureComponent(typeof(Serializers.Binary.MessageSerializer), ComponentCallModelEnum.Singleton); + + return config; + } + } +} diff --git a/src/impl/Serializers/NServiceBus.Serializers.Binary.Config/NServiceBus.Serializers.Binary.Config.csproj b/src/impl/Serializers/NServiceBus.Serializers.Binary.Config/NServiceBus.Serializers.Binary.Config.csproj index 1093183def3..7b45d04aad4 100644 --- a/src/impl/Serializers/NServiceBus.Serializers.Binary.Config/NServiceBus.Serializers.Binary.Config.csproj +++ b/src/impl/Serializers/NServiceBus.Serializers.Binary.Config/NServiceBus.Serializers.Binary.Config.csproj @@ -1,128 +1,128 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {D33E56FB-CD9E-4B1D-A0F1-1B272F154DC1} - Library - Properties - NServiceBus.Serializers.Binary.Config - NServiceBus.Serializers.Binary.Config - v4.0 - 512 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.Serializers.Binary.Config.XML - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.Serializers.Binary.Config.XML - AllRules.ruleset - - - - False - ..\..\..\..\build\output\NServiceBus.dll - False - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll - False - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.MessageInterfaces.dll - False - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll - False - - - - 3.5 - - - 3.5 - - - 3.5 - - - - - - - CommonAssemblyInfo.cs - - - - - - - {4AB4015A-2DBF-44F9-9119-0E095703EC2D} - NServiceBus.Serializers.Binary - False - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {D33E56FB-CD9E-4B1D-A0F1-1B272F154DC1} + Library + Properties + NServiceBus.Serializers.Binary.Config + NServiceBus.Serializers.Binary.Config + v4.0 + 512 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.Serializers.Binary.Config.XML + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.Serializers.Binary.Config.XML + AllRules.ruleset + + + + False + ..\..\..\..\build\output\NServiceBus.dll + False + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll + False + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.MessageInterfaces.dll + False + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll + False + + + + 3.5 + + + 3.5 + + + 3.5 + + + + + + + CommonAssemblyInfo.cs + + + + + + + {4AB4015A-2DBF-44F9-9119-0E095703EC2D} + NServiceBus.Serializers.Binary + False + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\" + \ No newline at end of file diff --git a/src/impl/Serializers/NServiceBus.Serializers.Binary.Config/Properties/AssemblyInfo.cs b/src/impl/Serializers/NServiceBus.Serializers.Binary.Config/Properties/AssemblyInfo.cs index 077bd1ff9dc..e286081a836 100644 --- a/src/impl/Serializers/NServiceBus.Serializers.Binary.Config/Properties/AssemblyInfo.cs +++ b/src/impl/Serializers/NServiceBus.Serializers.Binary.Config/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Binary Serialization Configuration")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Binary Serialization Configuration")] [assembly: AssemblyDescription("Configures the binary serialization capabilities of nServiceBus")] \ No newline at end of file diff --git a/src/impl/Serializers/NServiceBus.Serializers.Binary/MessageSerializer.cs b/src/impl/Serializers/NServiceBus.Serializers.Binary/MessageSerializer.cs index 183d0108958..439fd505446 100644 --- a/src/impl/Serializers/NServiceBus.Serializers.Binary/MessageSerializer.cs +++ b/src/impl/Serializers/NServiceBus.Serializers.Binary/MessageSerializer.cs @@ -1,50 +1,50 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Runtime.Serialization.Formatters.Binary; -using NServiceBus.Serialization; - -namespace NServiceBus.Serializers.Binary -{ - /// - /// Binary implementation of the message serializer. - /// - public class MessageSerializer : IMessageSerializer - { - /// - /// Serializes the given messages to the given stream. - /// - /// - /// - public void Serialize(IMessage[] messages, Stream stream) - { - binaryFormatter.Serialize(stream, new List(messages)); - } - - /// - /// Deserializes the given stream returning an array of messages. - /// - /// - /// - public IMessage[] Deserialize(Stream stream) - { - if (stream == null) - return null; - - var body = binaryFormatter.Deserialize(stream) as List; - - if (body == null) - return null; - - var result = new IMessage[body.Count]; - - int i = 0; - foreach (IMessage m in body) - result[i++] = m; - - return result; - } - - private readonly BinaryFormatter binaryFormatter = new BinaryFormatter(); - } -} +using System; +using System.Collections.Generic; +using System.IO; +using System.Runtime.Serialization.Formatters.Binary; +using NServiceBus.Serialization; + +namespace NServiceBus.Serializers.Binary +{ + /// + /// Binary implementation of the message serializer. + /// + public class MessageSerializer : IMessageSerializer + { + /// + /// Serializes the given messages to the given stream. + /// + /// + /// + public void Serialize(IMessage[] messages, Stream stream) + { + binaryFormatter.Serialize(stream, new List(messages)); + } + + /// + /// Deserializes the given stream returning an array of messages. + /// + /// + /// + public IMessage[] Deserialize(Stream stream) + { + if (stream == null) + return null; + + var body = binaryFormatter.Deserialize(stream) as List; + + if (body == null) + return null; + + var result = new IMessage[body.Count]; + + int i = 0; + foreach (IMessage m in body) + result[i++] = m; + + return result; + } + + private readonly BinaryFormatter binaryFormatter = new BinaryFormatter(); + } +} diff --git a/src/impl/Serializers/NServiceBus.Serializers.Binary/NServiceBus.Serializers.Binary.csproj b/src/impl/Serializers/NServiceBus.Serializers.Binary/NServiceBus.Serializers.Binary.csproj index a60ad20a304..3091d9c7c8c 100644 --- a/src/impl/Serializers/NServiceBus.Serializers.Binary/NServiceBus.Serializers.Binary.csproj +++ b/src/impl/Serializers/NServiceBus.Serializers.Binary/NServiceBus.Serializers.Binary.csproj @@ -1,110 +1,110 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {4AB4015A-2DBF-44F9-9119-0E095703EC2D} - Library - Properties - NServiceBus.Serializers.Binary - NServiceBus.Serializers.Binary - - - - - - v4.0 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.Serializers.Binary.XML - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.Serializers.Binary.XML - AllRules.ruleset - - - - False - ..\..\..\..\build\output\NServiceBus.dll - False - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.MessageInterfaces.dll - False - - - - 3.5 - - - - - - - CommonAssemblyInfo.cs - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {4AB4015A-2DBF-44F9-9119-0E095703EC2D} + Library + Properties + NServiceBus.Serializers.Binary + NServiceBus.Serializers.Binary + + + + + + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.Serializers.Binary.XML + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.Serializers.Binary.XML + AllRules.ruleset + + + + False + ..\..\..\..\build\output\NServiceBus.dll + False + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.MessageInterfaces.dll + False + + + + 3.5 + + + + + + + CommonAssemblyInfo.cs + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\" + \ No newline at end of file diff --git a/src/impl/Serializers/NServiceBus.Serializers.Binary/Properties/AssemblyInfo.cs b/src/impl/Serializers/NServiceBus.Serializers.Binary/Properties/AssemblyInfo.cs index a6d54266d8b..df00d39f515 100644 --- a/src/impl/Serializers/NServiceBus.Serializers.Binary/Properties/AssemblyInfo.cs +++ b/src/impl/Serializers/NServiceBus.Serializers.Binary/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Binary Serialization Implementation")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Binary Serialization Implementation")] [assembly: AssemblyDescription("Binary implementation for serialization capabilities of nServiceBus")] \ No newline at end of file diff --git a/src/impl/Serializers/NServiceBus.Serializers.Binary/SimpleMessageMapper.cs b/src/impl/Serializers/NServiceBus.Serializers.Binary/SimpleMessageMapper.cs index eee827b337a..4b2e453878e 100644 --- a/src/impl/Serializers/NServiceBus.Serializers.Binary/SimpleMessageMapper.cs +++ b/src/impl/Serializers/NServiceBus.Serializers.Binary/SimpleMessageMapper.cs @@ -1,48 +1,48 @@ -using System; -using System.Collections.Generic; -using NServiceBus.MessageInterfaces; - -namespace NServiceBus.Serializers.Binary -{ - /// - /// Simple implementation of message mapper for binary serialization. - /// - public class SimpleMessageMapper : IMessageMapper - { - T IMessageCreator.CreateInstance() - { - return ((IMessageCreator) this).CreateInstance(null); - } - - T IMessageCreator.CreateInstance(Action action) - { - var result = (T)((IMessageCreator)this).CreateInstance(typeof(T)); - if (action != null) - action(result); - - return result; - } - - object IMessageCreator.CreateInstance(Type messageType) - { - if (messageType.IsInterface || messageType.IsAbstract) - throw new NotSupportedException("The binary serializer does not support interface types. Please use the XML serializer if you need this functionality."); - - return Activator.CreateInstance(messageType); - } - - void IMessageMapper.Initialize(IEnumerable types) - { - } - - Type IMessageMapper.GetMappedTypeFor(Type t) - { - return t; - } - - Type IMessageMapper.GetMappedTypeFor(string typeName) - { - return Type.GetType(typeName); - } - } -} +using System; +using System.Collections.Generic; +using NServiceBus.MessageInterfaces; + +namespace NServiceBus.Serializers.Binary +{ + /// + /// Simple implementation of message mapper for binary serialization. + /// + public class SimpleMessageMapper : IMessageMapper + { + T IMessageCreator.CreateInstance() + { + return ((IMessageCreator) this).CreateInstance(null); + } + + T IMessageCreator.CreateInstance(Action action) + { + var result = (T)((IMessageCreator)this).CreateInstance(typeof(T)); + if (action != null) + action(result); + + return result; + } + + object IMessageCreator.CreateInstance(Type messageType) + { + if (messageType.IsInterface || messageType.IsAbstract) + throw new NotSupportedException("The binary serializer does not support interface types. Please use the XML serializer if you need this functionality."); + + return Activator.CreateInstance(messageType); + } + + void IMessageMapper.Initialize(IEnumerable types) + { + } + + Type IMessageMapper.GetMappedTypeFor(Type t) + { + return t; + } + + Type IMessageMapper.GetMappedTypeFor(string typeName) + { + return Type.GetType(typeName); + } + } +} diff --git a/src/impl/Serializers/NServiceBus.Serializers.XML.Config/ConfigureXmlSerializer.cs b/src/impl/Serializers/NServiceBus.Serializers.XML.Config/ConfigureXmlSerializer.cs index e5b24884c59..004e8b5cd21 100644 --- a/src/impl/Serializers/NServiceBus.Serializers.XML.Config/ConfigureXmlSerializer.cs +++ b/src/impl/Serializers/NServiceBus.Serializers.XML.Config/ConfigureXmlSerializer.cs @@ -1,54 +1,54 @@ -using NServiceBus.Config; -using NServiceBus.ObjectBuilder; -using System.Linq; -using NServiceBus.Serialization; - -namespace NServiceBus -{ - /// - /// Contains extension methods to NServiceBus.Configure. - /// - public static class ConfigureXmlSerializer - { - /// - /// Use XML serialization that supports interface-based messages. - /// - /// - /// - public static Configure XmlSerializer(this Configure config) - { - var messageTypes = Configure.TypesToScan.Where(t => typeof (IMessage).IsAssignableFrom(t)).ToList(); - - config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); - config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton) - .ConfigureProperty(ms => ms.MessageTypes, messageTypes); - - return config; - } - - /// - /// Use XML serialization that supports interface-based messages. - /// Optionally set the namespace to be used in the XML. - /// - /// - /// - /// - public static Configure XmlSerializer(this Configure config, string nameSpace) - { - config.XmlSerializer(); - - config.Configurer.ConfigureProperty(x => x.Namespace, nameSpace); - - return config; - } - } - - class SetXmlSerializerAsDefault : INeedInitialization - { - void INeedInitialization.Init() - { - if (!Configure.Instance.Configurer.HasComponent()) - Configure.Instance.XmlSerializer(); - } - } -} +using NServiceBus.Config; +using NServiceBus.ObjectBuilder; +using System.Linq; +using NServiceBus.Serialization; + +namespace NServiceBus +{ + /// + /// Contains extension methods to NServiceBus.Configure. + /// + public static class ConfigureXmlSerializer + { + /// + /// Use XML serialization that supports interface-based messages. + /// + /// + /// + public static Configure XmlSerializer(this Configure config) + { + var messageTypes = Configure.TypesToScan.Where(t => typeof (IMessage).IsAssignableFrom(t)).ToList(); + + config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); + config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton) + .ConfigureProperty(ms => ms.MessageTypes, messageTypes); + + return config; + } + + /// + /// Use XML serialization that supports interface-based messages. + /// Optionally set the namespace to be used in the XML. + /// + /// + /// + /// + public static Configure XmlSerializer(this Configure config, string nameSpace) + { + config.XmlSerializer(); + + config.Configurer.ConfigureProperty(x => x.Namespace, nameSpace); + + return config; + } + } + + class SetXmlSerializerAsDefault : INeedInitialization + { + void INeedInitialization.Init() + { + if (!Configure.Instance.Configurer.HasComponent()) + Configure.Instance.XmlSerializer(); + } + } +} diff --git a/src/impl/Serializers/NServiceBus.Serializers.XML.Config/NServiceBus.Serializers.XML.Config.csproj b/src/impl/Serializers/NServiceBus.Serializers.XML.Config/NServiceBus.Serializers.XML.Config.csproj index 116ae9bc112..cba49399d14 100644 --- a/src/impl/Serializers/NServiceBus.Serializers.XML.Config/NServiceBus.Serializers.XML.Config.csproj +++ b/src/impl/Serializers/NServiceBus.Serializers.XML.Config/NServiceBus.Serializers.XML.Config.csproj @@ -1,133 +1,133 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {17629A13-3ED4-4E88-B70C-DFFCBAE96A6A} - Library - Properties - NServiceBus.Serializers.XML.Config - NServiceBus.Serializers.XML.Config - v4.0 - 512 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.Serializers.XML.Config.XML - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.Serializers.XML.Config.XML - AllRules.ruleset - - - - False - ..\..\..\..\build\output\NServiceBus.dll - False - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll - False - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.MessageInterfaces.dll - False - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.MessageInterfaces.MessageMapper.Reflection.dll - False - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll - False - - - - 3.5 - - - 3.5 - - - 3.5 - - - - - - - CommonAssemblyInfo.cs - - - - - - - {4D9A660B-C2AF-42A8-AEB4-E2F97ED1CB3C} - NServiceBus.Serializers.XML - False - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {17629A13-3ED4-4E88-B70C-DFFCBAE96A6A} + Library + Properties + NServiceBus.Serializers.XML.Config + NServiceBus.Serializers.XML.Config + v4.0 + 512 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.Serializers.XML.Config.XML + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.Serializers.XML.Config.XML + AllRules.ruleset + + + + False + ..\..\..\..\build\output\NServiceBus.dll + False + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll + False + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.MessageInterfaces.dll + False + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.MessageInterfaces.MessageMapper.Reflection.dll + False + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll + False + + + + 3.5 + + + 3.5 + + + 3.5 + + + + + + + CommonAssemblyInfo.cs + + + + + + + {4D9A660B-C2AF-42A8-AEB4-E2F97ED1CB3C} + NServiceBus.Serializers.XML + False + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\" + \ No newline at end of file diff --git a/src/impl/Serializers/NServiceBus.Serializers.XML.Config/Properties/AssemblyInfo.cs b/src/impl/Serializers/NServiceBus.Serializers.XML.Config/Properties/AssemblyInfo.cs index 7d431c1beac..676551dc121 100644 --- a/src/impl/Serializers/NServiceBus.Serializers.XML.Config/Properties/AssemblyInfo.cs +++ b/src/impl/Serializers/NServiceBus.Serializers.XML.Config/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus XML Serialization Configuration")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus XML Serialization Configuration")] [assembly: AssemblyDescription("Configures the XML serialization capabilities of nServiceBus")] \ No newline at end of file diff --git a/src/impl/Serializers/NServiceBus.Serializers.XML.Test/IM1.cs b/src/impl/Serializers/NServiceBus.Serializers.XML.Test/IM1.cs index 2aad7b665ae..4d612824e63 100644 --- a/src/impl/Serializers/NServiceBus.Serializers.XML.Test/IM1.cs +++ b/src/impl/Serializers/NServiceBus.Serializers.XML.Test/IM1.cs @@ -1,11 +1,11 @@ -namespace NServiceBus.Serializers.XML -{ - public interface IM1 : IMessage - { - float Age { get; set; } - int Int { get; set; } - string Name { get; set; } - string Address { get; set; } - Risk Risk { get; set; } - } -} +namespace NServiceBus.Serializers.XML +{ + public interface IM1 : IMessage + { + float Age { get; set; } + int Int { get; set; } + string Name { get; set; } + string Address { get; set; } + Risk Risk { get; set; } + } +} diff --git a/src/impl/Serializers/NServiceBus.Serializers.XML.Test/IM2.cs b/src/impl/Serializers/NServiceBus.Serializers.XML.Test/IM2.cs index 032ae8ade0c..32f08cd5fd1 100644 --- a/src/impl/Serializers/NServiceBus.Serializers.XML.Test/IM2.cs +++ b/src/impl/Serializers/NServiceBus.Serializers.XML.Test/IM2.cs @@ -1,31 +1,31 @@ -using System; -using System.Collections.Generic; - -namespace NServiceBus.Serializers.XML.Test -{ - public interface IM2 : IM1 - { - Guid Id { get; set; } - IM1 Parent { get; set; } - List Names { get; set; } - SomeEnum Some { get; set; } - DateTime Start { get; set; } - TimeSpan Duration { get; set; } - DateTimeOffset Offset { get; set; } - IM1[] MoreNames { get; set; } - MyDic Lookup { get; set; } - Dictionary> Foos { get; set; } - byte[] Data { get; set; } - } - - public class Foo - { - public string Name { get; set; } - public string Title { get; set; } - } - - public class MyDic : Dictionary - { - - } -} +using System; +using System.Collections.Generic; + +namespace NServiceBus.Serializers.XML.Test +{ + public interface IM2 : IM1 + { + Guid Id { get; set; } + IM1 Parent { get; set; } + List Names { get; set; } + SomeEnum Some { get; set; } + DateTime Start { get; set; } + TimeSpan Duration { get; set; } + DateTimeOffset Offset { get; set; } + IM1[] MoreNames { get; set; } + MyDic Lookup { get; set; } + Dictionary> Foos { get; set; } + byte[] Data { get; set; } + } + + public class Foo + { + public string Name { get; set; } + public string Title { get; set; } + } + + public class MyDic : Dictionary + { + + } +} diff --git a/src/impl/Serializers/NServiceBus.Serializers.XML.Test/M1.cs b/src/impl/Serializers/NServiceBus.Serializers.XML.Test/M1.cs index 993cca0c445..ea9c0845661 100644 --- a/src/impl/Serializers/NServiceBus.Serializers.XML.Test/M1.cs +++ b/src/impl/Serializers/NServiceBus.Serializers.XML.Test/M1.cs @@ -1,28 +1,28 @@ -using System; -using System.Collections.Generic; - -namespace NServiceBus.Serializers.XML.Test -{ - [Serializable] - public class M1 : IM1 - { - public float Age { get; set; } - public int Int { get; set; } - public string Name { get; set; } - public string Address { get; set; } - public Risk Risk { get; set; } - public string this[int key] - { - get { return lookup_int_string[key]; } - set { lookup_int_string[key] = value;} - } - - public string this[float key] - { - get { return lookup_float_string[key]; } - set { lookup_float_string[key] = value; } - } - private Dictionary lookup_int_string = new Dictionary(); - private Dictionary lookup_float_string = new Dictionary(); - } -} +using System; +using System.Collections.Generic; + +namespace NServiceBus.Serializers.XML.Test +{ + [Serializable] + public class M1 : IM1 + { + public float Age { get; set; } + public int Int { get; set; } + public string Name { get; set; } + public string Address { get; set; } + public Risk Risk { get; set; } + public string this[int key] + { + get { return lookup_int_string[key]; } + set { lookup_int_string[key] = value;} + } + + public string this[float key] + { + get { return lookup_float_string[key]; } + set { lookup_float_string[key] = value; } + } + private Dictionary lookup_int_string = new Dictionary(); + private Dictionary lookup_float_string = new Dictionary(); + } +} diff --git a/src/impl/Serializers/NServiceBus.Serializers.XML.Test/M2.cs b/src/impl/Serializers/NServiceBus.Serializers.XML.Test/M2.cs index e9893e31fa2..1873a43ce6f 100644 --- a/src/impl/Serializers/NServiceBus.Serializers.XML.Test/M2.cs +++ b/src/impl/Serializers/NServiceBus.Serializers.XML.Test/M2.cs @@ -1,18 +1,18 @@ -using System; -using System.Collections.Generic; - -namespace NServiceBus.Serializers.XML.Test -{ - [Serializable] - public class M2 : M1 - { - public Guid Id { get; set; } - public List Names { get; set; } - public M1 Parent { get; set; } - public SomeEnum Some { get; set; } - public DateTime Start { get; set; } - public TimeSpan Duration { get; set; } - public DateTimeOffset Offset { get; set; } - public M1[] MoreNames { get; set; } - } -} +using System; +using System.Collections.Generic; + +namespace NServiceBus.Serializers.XML.Test +{ + [Serializable] + public class M2 : M1 + { + public Guid Id { get; set; } + public List Names { get; set; } + public M1 Parent { get; set; } + public SomeEnum Some { get; set; } + public DateTime Start { get; set; } + public TimeSpan Duration { get; set; } + public DateTimeOffset Offset { get; set; } + public M1[] MoreNames { get; set; } + } +} diff --git a/src/impl/Serializers/NServiceBus.Serializers.XML.Test/NServiceBus.Serializers.XML.Test.csproj b/src/impl/Serializers/NServiceBus.Serializers.XML.Test/NServiceBus.Serializers.XML.Test.csproj index 532c06bfca1..f1c6abe8731 100644 --- a/src/impl/Serializers/NServiceBus.Serializers.XML.Test/NServiceBus.Serializers.XML.Test.csproj +++ b/src/impl/Serializers/NServiceBus.Serializers.XML.Test/NServiceBus.Serializers.XML.Test.csproj @@ -1,126 +1,126 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {45CC79AE-C0DE-486C-953B-7697C6E09E94} - Library - Properties - NServiceBus.Serializers.XML.Test - NServiceBus.Serializers.XML.Tests - - - - - - v4.0 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\..\lib\Common.Logging.dll - - - False - ..\..\..\..\build\output\NServiceBus.dll - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.MessageInterfaces.dll - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.MessageInterfaces.MessageMapper.Reflection.dll - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.Utils.Reflection.dll - - - False - ..\..\..\..\tools\NUnit\nunit.framework.dll - - - - - - - - - - - - - - - - - - - - {4D9A660B-C2AF-42A8-AEB4-E2F97ED1CB3C} - NServiceBus.Serializers.XML - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {45CC79AE-C0DE-486C-953B-7697C6E09E94} + Library + Properties + NServiceBus.Serializers.XML.Test + NServiceBus.Serializers.XML.Tests + + + + + + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\..\lib\Common.Logging.dll + + + False + ..\..\..\..\build\output\NServiceBus.dll + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.MessageInterfaces.dll + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.MessageInterfaces.MessageMapper.Reflection.dll + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.Utils.Reflection.dll + + + False + ..\..\..\..\tools\NUnit\nunit.framework.dll + + + + + + + + + + + + + + + + + + + + {4D9A660B-C2AF-42A8-AEB4-E2F97ED1CB3C} + NServiceBus.Serializers.XML + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + \ No newline at end of file diff --git a/src/impl/Serializers/NServiceBus.Serializers.XML.Test/Properties/AssemblyInfo.cs b/src/impl/Serializers/NServiceBus.Serializers.XML.Test/Properties/AssemblyInfo.cs index 53a3903e31f..f68655bf383 100644 --- a/src/impl/Serializers/NServiceBus.Serializers.XML.Test/Properties/AssemblyInfo.cs +++ b/src/impl/Serializers/NServiceBus.Serializers.XML.Test/Properties/AssemblyInfo.cs @@ -1,35 +1,35 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("NServiceBus.Serializers.InterfacesToXML.Test")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("NServiceBus.Serializers.InterfacesToXML.Test")] -[assembly: AssemblyCopyright("Copyright © 2008")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("adcc510b-fede-49e5-bf56-8a44309a9848")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("NServiceBus.Serializers.InterfacesToXML.Test")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("NServiceBus.Serializers.InterfacesToXML.Test")] +[assembly: AssemblyCopyright("Copyright © 2008")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("adcc510b-fede-49e5-bf56-8a44309a9848")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/impl/Serializers/NServiceBus.Serializers.XML.Test/Risk.cs b/src/impl/Serializers/NServiceBus.Serializers.XML.Test/Risk.cs index 3932ea11bde..a57bb50798b 100644 --- a/src/impl/Serializers/NServiceBus.Serializers.XML.Test/Risk.cs +++ b/src/impl/Serializers/NServiceBus.Serializers.XML.Test/Risk.cs @@ -1,12 +1,12 @@ -using System; - -namespace NServiceBus.Serializers.XML -{ - [Serializable] - public class Risk - { - public bool Annum { get; set; } - public double Percent { get; set; } - public decimal Accuracy { get; set; } - } -} +using System; + +namespace NServiceBus.Serializers.XML +{ + [Serializable] + public class Risk + { + public bool Annum { get; set; } + public double Percent { get; set; } + public decimal Accuracy { get; set; } + } +} diff --git a/src/impl/Serializers/NServiceBus.Serializers.XML.Test/SerializerTests.cs b/src/impl/Serializers/NServiceBus.Serializers.XML.Test/SerializerTests.cs index 5e1114d9434..26f8eeadfea 100644 --- a/src/impl/Serializers/NServiceBus.Serializers.XML.Test/SerializerTests.cs +++ b/src/impl/Serializers/NServiceBus.Serializers.XML.Test/SerializerTests.cs @@ -1,290 +1,290 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using NServiceBus.MessageInterfaces; -using NServiceBus.MessageInterfaces.MessageMapper.Reflection; -using NServiceBus.Serialization; -using System.Runtime.Serialization; -using System.Xml; -using System.Collections; -using NUnit.Framework; - -namespace NServiceBus.Serializers.XML.Test -{ - [TestFixture] - public class SerializerTests - { - private int number = 1; - private int numberOfIterations = 100; - - - [Test] - public void Generic_properties_should_be_supported() - { - IMessageMapper mapper = new MessageMapper(); - var serializer = new MessageSerializer - { - MessageMapper = mapper, - MessageTypes = new List(new[] {typeof (MessageWithGenericProperty)}) - }; - - using (var stream = new MemoryStream()) - { - var message = new MessageWithGenericProperty - { - GenericProperty = new GenericProperty("test"){WhatEver = "a property"} - }; - - serializer.Serialize(new IMessage[] { message }, stream); - - stream.Position = 0; - - Debug.WriteLine(new StreamReader(stream).ReadToEnd()); - - stream.Position = 0; - - var result = serializer.Deserialize(stream)[0] as MessageWithGenericProperty; - - Assert.NotNull(result); - - Assert.AreEqual(message.GenericProperty.WhatEver,result.GenericProperty.WhatEver); - } - - } - - [Test] - public void Comparison() - { - TestInterfaces(); - TestDataContractSerializer(); - } - - [Test] - public void TestInterfaces() - { - IMessageMapper mapper = new MessageMapper(); - var serializer = new MessageSerializer(); - serializer.MessageMapper = mapper; - - serializer.MessageTypes = new List(new[] {typeof(IM2)}); - - var o = mapper.CreateInstance(); - - o.Id = Guid.NewGuid(); - o.Age = 10; - o.Address = Guid.NewGuid().ToString(); - o.Int = 7; - o.Name = "udi"; - o.Risk = new Risk { Percent = 0.15D, Annum = true, Accuracy = 0.314M }; - o.Some = SomeEnum.B; - o.Start = DateTime.Now; - o.Duration = TimeSpan.Parse("-01:15:27.123"); - o.Offset = DateTimeOffset.Now; - o.Lookup = new MyDic(); - o.Lookup["1"] = "1"; - o.Foos = new Dictionary>(); - o.Foos["foo1"] = new List(new[] { new Foo { Name="1", Title = "1"}, new Foo { Name = "2", Title = "2"}}); - o.Data = new byte[] { 1, 2, 3, 4, 5, 4, 3, 2, 1}; - - o.Parent = mapper.CreateInstance(); - o.Parent.Name = "udi"; - o.Parent.Age = 10; - o.Parent.Address = Guid.NewGuid().ToString(); - o.Parent.Int = 7; - o.Parent.Name = "-1"; - o.Parent.Risk = new Risk { Percent = 0.15D, Annum = true, Accuracy = 0.314M }; - - o.Names = new List(); - for (int i = 0; i < number; i++) - { - var m1 = mapper.CreateInstance(); - o.Names.Add(m1); - m1.Age = 10; - m1.Address = Guid.NewGuid().ToString(); - m1.Int = 7; - m1.Name = i.ToString(); - m1.Risk = new Risk { Percent = 0.15D, Annum = true, Accuracy = 0.314M }; - } - - o.MoreNames = o.Names.ToArray(); - - IMessage[] messages = new IMessage[] { o }; - - Time(messages, serializer); - } - - [Test] - public void TestDataContractSerializer() - { - M2 o = CreateM2(); - IMessage[] messages = new IMessage[] { o }; - - DataContractSerializer dcs = new DataContractSerializer(typeof(ArrayList), new Type[] { typeof(M2), typeof(SomeEnum), typeof(M1), typeof(Risk), typeof(List) }); - - Stopwatch sw = new Stopwatch(); - sw.Start(); - - XmlWriterSettings xws = new XmlWriterSettings(); - xws.OmitXmlDeclaration = false; - - XmlReaderSettings xrs = new XmlReaderSettings(); - xrs.IgnoreProcessingInstructions = true; - xrs.ValidationType = ValidationType.None; - xrs.IgnoreWhitespace = true; - xrs.CheckCharacters = false; - xrs.ConformanceLevel = ConformanceLevel.Auto; - - for (int i = 0; i < numberOfIterations; i++) - using (MemoryStream stream = new MemoryStream()) - DataContractSerialize(xws, dcs, messages, stream); - - sw.Stop(); - Debug.WriteLine("serialization " + sw.Elapsed); - - sw.Reset(); - - File.Delete("a.xml"); - using (FileStream fs = File.Open("a.xml", FileMode.OpenOrCreate)) - DataContractSerialize(xws, dcs, messages, fs); - - MemoryStream s = new MemoryStream(); - DataContractSerialize(xws, dcs, messages, s); - byte[] buffer = s.GetBuffer(); - s.Dispose(); - - sw.Start(); - - for (int i = 0; i < numberOfIterations; i++) - using (XmlReader reader = XmlReader.Create(new MemoryStream(buffer), xrs)) - dcs.ReadObject(reader); - - sw.Stop(); - Debug.WriteLine("deserializing: " + sw.Elapsed); - } - - private void DataContractSerialize(XmlWriterSettings xws, DataContractSerializer dcs, IMessage[] messages, Stream str) - { - ArrayList o = new ArrayList(messages); - using (XmlWriter xwr = XmlWriter.Create(str, xws)) - { - dcs.WriteStartObject(xwr, o); - dcs.WriteObjectContent(xwr, o); - dcs.WriteEndObject(xwr); - } - } - - private M2 CreateM2() - { - M2 o = new M2(); - o.Id = Guid.NewGuid(); - o.Age = 10; - o.Address = Guid.NewGuid().ToString(); - o.Int = 7; - o.Name = "udi"; - o.Risk = new Risk { Percent = 0.15D, Annum = true, Accuracy = 0.314M }; - o.Some = SomeEnum.B; - o.Start = DateTime.Now; - o.Duration = TimeSpan.Parse("-01:15:27.123"); - o.Offset = DateTimeOffset.Now; - - o.Parent = new M1(); - o.Parent.Name = "udi"; - o.Parent.Age = 10; - o.Parent.Address = Guid.NewGuid().ToString(); - o.Parent.Int = 7; - o.Parent.Name = "-1"; - o.Parent.Risk = new Risk { Percent = 0.15D, Annum = true, Accuracy = 0.314M }; - - o.Names = new List(); - for (int i = 0; i < number; i++) - { - var m1 = new M1(); - o.Names.Add(m1); - m1.Age = 10; - m1.Address = Guid.NewGuid().ToString(); - m1.Int = 7; - m1.Name = i.ToString(); - m1.Risk = new Risk { Percent = 0.15D, Annum = true, Accuracy = 0.314M }; - } - - o.MoreNames = o.Names.ToArray(); - - return o; - } - - private void Time(IMessage[] messages, IMessageSerializer serializer) - { - Stopwatch watch = new Stopwatch(); - watch.Start(); - - for (int i = 0; i < numberOfIterations; i++) - using (MemoryStream stream = new MemoryStream()) - serializer.Serialize(messages, stream); - - watch.Stop(); - Debug.WriteLine("Serializing: " + watch.Elapsed); - - watch.Reset(); - - MemoryStream s = new MemoryStream(); - serializer.Serialize(messages, s); - byte[] buffer = s.GetBuffer(); - s.Dispose(); - - watch.Start(); - - IMessage[] result = null; - - for (int i = 0; i < numberOfIterations; i++) - using (var forDeserializing = new MemoryStream(buffer)) - result = serializer.Deserialize(forDeserializing); - - watch.Stop(); - Debug.WriteLine("Deserializing: " + watch.Elapsed); - } - - public void TestSchemaValidation() - { - try - { - XmlReaderSettings settings = new XmlReaderSettings(); - settings.Schemas.Add(null, "schema0.xsd"); - settings.Schemas.Add(null, "schema1.xsd"); - settings.ValidationType = ValidationType.Schema; - XmlDocument document = new XmlDocument(); - document.Load("XMLFile1.xml"); - XmlReader rdr = XmlReader.Create(new StringReader(document.InnerXml), settings); - while (rdr.Read()) { } - } - catch(Exception e) - { - string s = e.Message; - } - } - } - - public class MessageWithGenericProperty:IMessage - { - public GenericProperty GenericProperty { get; set; } - } - - public class GenericProperty - { - private T value; - - public GenericProperty(T value) - { - this.value = value; - } - - public T ReadOnlyBlob { - get - { - return value; - } - } - - public string WhatEver { get; set; } - } -} +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using NServiceBus.MessageInterfaces; +using NServiceBus.MessageInterfaces.MessageMapper.Reflection; +using NServiceBus.Serialization; +using System.Runtime.Serialization; +using System.Xml; +using System.Collections; +using NUnit.Framework; + +namespace NServiceBus.Serializers.XML.Test +{ + [TestFixture] + public class SerializerTests + { + private int number = 1; + private int numberOfIterations = 100; + + + [Test] + public void Generic_properties_should_be_supported() + { + IMessageMapper mapper = new MessageMapper(); + var serializer = new MessageSerializer + { + MessageMapper = mapper, + MessageTypes = new List(new[] {typeof (MessageWithGenericProperty)}) + }; + + using (var stream = new MemoryStream()) + { + var message = new MessageWithGenericProperty + { + GenericProperty = new GenericProperty("test"){WhatEver = "a property"} + }; + + serializer.Serialize(new IMessage[] { message }, stream); + + stream.Position = 0; + + Debug.WriteLine(new StreamReader(stream).ReadToEnd()); + + stream.Position = 0; + + var result = serializer.Deserialize(stream)[0] as MessageWithGenericProperty; + + Assert.NotNull(result); + + Assert.AreEqual(message.GenericProperty.WhatEver,result.GenericProperty.WhatEver); + } + + } + + [Test] + public void Comparison() + { + TestInterfaces(); + TestDataContractSerializer(); + } + + [Test] + public void TestInterfaces() + { + IMessageMapper mapper = new MessageMapper(); + var serializer = new MessageSerializer(); + serializer.MessageMapper = mapper; + + serializer.MessageTypes = new List(new[] {typeof(IM2)}); + + var o = mapper.CreateInstance(); + + o.Id = Guid.NewGuid(); + o.Age = 10; + o.Address = Guid.NewGuid().ToString(); + o.Int = 7; + o.Name = "udi"; + o.Risk = new Risk { Percent = 0.15D, Annum = true, Accuracy = 0.314M }; + o.Some = SomeEnum.B; + o.Start = DateTime.Now; + o.Duration = TimeSpan.Parse("-01:15:27.123"); + o.Offset = DateTimeOffset.Now; + o.Lookup = new MyDic(); + o.Lookup["1"] = "1"; + o.Foos = new Dictionary>(); + o.Foos["foo1"] = new List(new[] { new Foo { Name="1", Title = "1"}, new Foo { Name = "2", Title = "2"}}); + o.Data = new byte[] { 1, 2, 3, 4, 5, 4, 3, 2, 1}; + + o.Parent = mapper.CreateInstance(); + o.Parent.Name = "udi"; + o.Parent.Age = 10; + o.Parent.Address = Guid.NewGuid().ToString(); + o.Parent.Int = 7; + o.Parent.Name = "-1"; + o.Parent.Risk = new Risk { Percent = 0.15D, Annum = true, Accuracy = 0.314M }; + + o.Names = new List(); + for (int i = 0; i < number; i++) + { + var m1 = mapper.CreateInstance(); + o.Names.Add(m1); + m1.Age = 10; + m1.Address = Guid.NewGuid().ToString(); + m1.Int = 7; + m1.Name = i.ToString(); + m1.Risk = new Risk { Percent = 0.15D, Annum = true, Accuracy = 0.314M }; + } + + o.MoreNames = o.Names.ToArray(); + + IMessage[] messages = new IMessage[] { o }; + + Time(messages, serializer); + } + + [Test] + public void TestDataContractSerializer() + { + M2 o = CreateM2(); + IMessage[] messages = new IMessage[] { o }; + + DataContractSerializer dcs = new DataContractSerializer(typeof(ArrayList), new Type[] { typeof(M2), typeof(SomeEnum), typeof(M1), typeof(Risk), typeof(List) }); + + Stopwatch sw = new Stopwatch(); + sw.Start(); + + XmlWriterSettings xws = new XmlWriterSettings(); + xws.OmitXmlDeclaration = false; + + XmlReaderSettings xrs = new XmlReaderSettings(); + xrs.IgnoreProcessingInstructions = true; + xrs.ValidationType = ValidationType.None; + xrs.IgnoreWhitespace = true; + xrs.CheckCharacters = false; + xrs.ConformanceLevel = ConformanceLevel.Auto; + + for (int i = 0; i < numberOfIterations; i++) + using (MemoryStream stream = new MemoryStream()) + DataContractSerialize(xws, dcs, messages, stream); + + sw.Stop(); + Debug.WriteLine("serialization " + sw.Elapsed); + + sw.Reset(); + + File.Delete("a.xml"); + using (FileStream fs = File.Open("a.xml", FileMode.OpenOrCreate)) + DataContractSerialize(xws, dcs, messages, fs); + + MemoryStream s = new MemoryStream(); + DataContractSerialize(xws, dcs, messages, s); + byte[] buffer = s.GetBuffer(); + s.Dispose(); + + sw.Start(); + + for (int i = 0; i < numberOfIterations; i++) + using (XmlReader reader = XmlReader.Create(new MemoryStream(buffer), xrs)) + dcs.ReadObject(reader); + + sw.Stop(); + Debug.WriteLine("deserializing: " + sw.Elapsed); + } + + private void DataContractSerialize(XmlWriterSettings xws, DataContractSerializer dcs, IMessage[] messages, Stream str) + { + ArrayList o = new ArrayList(messages); + using (XmlWriter xwr = XmlWriter.Create(str, xws)) + { + dcs.WriteStartObject(xwr, o); + dcs.WriteObjectContent(xwr, o); + dcs.WriteEndObject(xwr); + } + } + + private M2 CreateM2() + { + M2 o = new M2(); + o.Id = Guid.NewGuid(); + o.Age = 10; + o.Address = Guid.NewGuid().ToString(); + o.Int = 7; + o.Name = "udi"; + o.Risk = new Risk { Percent = 0.15D, Annum = true, Accuracy = 0.314M }; + o.Some = SomeEnum.B; + o.Start = DateTime.Now; + o.Duration = TimeSpan.Parse("-01:15:27.123"); + o.Offset = DateTimeOffset.Now; + + o.Parent = new M1(); + o.Parent.Name = "udi"; + o.Parent.Age = 10; + o.Parent.Address = Guid.NewGuid().ToString(); + o.Parent.Int = 7; + o.Parent.Name = "-1"; + o.Parent.Risk = new Risk { Percent = 0.15D, Annum = true, Accuracy = 0.314M }; + + o.Names = new List(); + for (int i = 0; i < number; i++) + { + var m1 = new M1(); + o.Names.Add(m1); + m1.Age = 10; + m1.Address = Guid.NewGuid().ToString(); + m1.Int = 7; + m1.Name = i.ToString(); + m1.Risk = new Risk { Percent = 0.15D, Annum = true, Accuracy = 0.314M }; + } + + o.MoreNames = o.Names.ToArray(); + + return o; + } + + private void Time(IMessage[] messages, IMessageSerializer serializer) + { + Stopwatch watch = new Stopwatch(); + watch.Start(); + + for (int i = 0; i < numberOfIterations; i++) + using (MemoryStream stream = new MemoryStream()) + serializer.Serialize(messages, stream); + + watch.Stop(); + Debug.WriteLine("Serializing: " + watch.Elapsed); + + watch.Reset(); + + MemoryStream s = new MemoryStream(); + serializer.Serialize(messages, s); + byte[] buffer = s.GetBuffer(); + s.Dispose(); + + watch.Start(); + + IMessage[] result = null; + + for (int i = 0; i < numberOfIterations; i++) + using (var forDeserializing = new MemoryStream(buffer)) + result = serializer.Deserialize(forDeserializing); + + watch.Stop(); + Debug.WriteLine("Deserializing: " + watch.Elapsed); + } + + public void TestSchemaValidation() + { + try + { + XmlReaderSettings settings = new XmlReaderSettings(); + settings.Schemas.Add(null, "schema0.xsd"); + settings.Schemas.Add(null, "schema1.xsd"); + settings.ValidationType = ValidationType.Schema; + XmlDocument document = new XmlDocument(); + document.Load("XMLFile1.xml"); + XmlReader rdr = XmlReader.Create(new StringReader(document.InnerXml), settings); + while (rdr.Read()) { } + } + catch(Exception e) + { + string s = e.Message; + } + } + } + + public class MessageWithGenericProperty:IMessage + { + public GenericProperty GenericProperty { get; set; } + } + + public class GenericProperty + { + private T value; + + public GenericProperty(T value) + { + this.value = value; + } + + public T ReadOnlyBlob { + get + { + return value; + } + } + + public string WhatEver { get; set; } + } +} diff --git a/src/impl/Serializers/NServiceBus.Serializers.XML.Test/SomeEnum.cs b/src/impl/Serializers/NServiceBus.Serializers.XML.Test/SomeEnum.cs index bc9da892c5b..9cb69099f71 100644 --- a/src/impl/Serializers/NServiceBus.Serializers.XML.Test/SomeEnum.cs +++ b/src/impl/Serializers/NServiceBus.Serializers.XML.Test/SomeEnum.cs @@ -1,8 +1,8 @@ -namespace NServiceBus.Serializers.XML.Test -{ - public enum SomeEnum - { - A, - B - } -} +namespace NServiceBus.Serializers.XML.Test +{ + public enum SomeEnum + { + A, + B + } +} diff --git a/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/ComplexType.cs b/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/ComplexType.cs index 526febb6e5f..bebe7427e9c 100644 --- a/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/ComplexType.cs +++ b/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/ComplexType.cs @@ -1,122 +1,122 @@ -using System; -using System.Collections.Generic; -using System.Reflection; - -namespace NServiceBus.Serializers.XML.XsdGenerator -{ - public class ComplexType - { - private readonly IList elements = new List(); - - private ComplexType() - { - TimeToBeReceived = TimeSpan.Zero; - } - - public string Name { get; private set; } - - public string BaseName { get; private set; } - - public TimeSpan TimeToBeReceived { get; private set; } - - public IEnumerable Elements - { - get { return elements; } - } - - public static ComplexType Scan(Type type) - { - if (type.IsPrimitive || type == typeof(string) || type == typeof(object) || type == typeof(Guid) || type == typeof(DateTime) || type == typeof(TimeSpan) || type == typeof(DateTimeOffset) || type.IsEnum || type == typeof(Decimal)) - return null; - - ComplexType complex = new ComplexType(); - complex.Name = Reflect.GetTypeNameFrom(type); - - if (Repository.IsNormalizedList(type)) - { - Type enumerated = Reflect.GetEnumeratedTypeFrom(type); - - Element e = Element.Scan(enumerated, Reflect.GetTypeNameFrom(enumerated)); - - if (e != null) - { - e.UnboundMaxOccurs(); - e.MakeNillable(); - - complex.elements.Add(e); - } - - Repository.Handle(enumerated); - } - else - { - Type baseType = null; - - if (!type.IsInterface) - if (type.BaseType != typeof (object) && type.BaseType != typeof(ValueType) && type.BaseType != null) - baseType = type.BaseType; - - if (type.IsInterface) - foreach(Type i in type.GetInterfaces()) - if (i == typeof(IMessage)) - continue; - else - { - baseType = i; - break; - } - - List propsToIgnore = new List(); - - if (baseType != null) - { - complex.BaseName = baseType.Name; - propsToIgnore = new List(baseType.GetProperties()); - } - - foreach (PropertyInfo prop in type.GetProperties()) - { - if (IsInList(prop, propsToIgnore)) - continue; - - if (!IsKeyValuePair(type) && (!prop.CanRead || !prop.CanWrite)) - continue; - - Repository.Handle(prop.PropertyType); - - Element e = Element.Scan(prop.PropertyType, prop.Name); - - if (e != null) - complex.elements.Add(e); - } - } - - foreach(TimeToBeReceivedAttribute a in type.GetCustomAttributes(typeof(TimeToBeReceivedAttribute), true)) - complex.TimeToBeReceived = a.TimeToBeReceived; - - return complex; - } - - private static bool IsKeyValuePair(Type t) - { - Type[] args = t.GetGenericArguments(); - if (args == null) - return false; - if (args.Length != 2) - return false; - return (typeof(KeyValuePair<,>).MakeGenericType(args) == t); - } - - private static bool IsInList(PropertyInfo prop, ICollection propsToIgnore) - { - if (propsToIgnore.Contains(prop)) - return true; - - foreach(PropertyInfo pi in propsToIgnore) - if (pi.Name == prop.Name) - return true; - - return false; - } - } -} +using System; +using System.Collections.Generic; +using System.Reflection; + +namespace NServiceBus.Serializers.XML.XsdGenerator +{ + public class ComplexType + { + private readonly IList elements = new List(); + + private ComplexType() + { + TimeToBeReceived = TimeSpan.Zero; + } + + public string Name { get; private set; } + + public string BaseName { get; private set; } + + public TimeSpan TimeToBeReceived { get; private set; } + + public IEnumerable Elements + { + get { return elements; } + } + + public static ComplexType Scan(Type type) + { + if (type.IsPrimitive || type == typeof(string) || type == typeof(object) || type == typeof(Guid) || type == typeof(DateTime) || type == typeof(TimeSpan) || type == typeof(DateTimeOffset) || type.IsEnum || type == typeof(Decimal)) + return null; + + ComplexType complex = new ComplexType(); + complex.Name = Reflect.GetTypeNameFrom(type); + + if (Repository.IsNormalizedList(type)) + { + Type enumerated = Reflect.GetEnumeratedTypeFrom(type); + + Element e = Element.Scan(enumerated, Reflect.GetTypeNameFrom(enumerated)); + + if (e != null) + { + e.UnboundMaxOccurs(); + e.MakeNillable(); + + complex.elements.Add(e); + } + + Repository.Handle(enumerated); + } + else + { + Type baseType = null; + + if (!type.IsInterface) + if (type.BaseType != typeof (object) && type.BaseType != typeof(ValueType) && type.BaseType != null) + baseType = type.BaseType; + + if (type.IsInterface) + foreach(Type i in type.GetInterfaces()) + if (i == typeof(IMessage)) + continue; + else + { + baseType = i; + break; + } + + List propsToIgnore = new List(); + + if (baseType != null) + { + complex.BaseName = baseType.Name; + propsToIgnore = new List(baseType.GetProperties()); + } + + foreach (PropertyInfo prop in type.GetProperties()) + { + if (IsInList(prop, propsToIgnore)) + continue; + + if (!IsKeyValuePair(type) && (!prop.CanRead || !prop.CanWrite)) + continue; + + Repository.Handle(prop.PropertyType); + + Element e = Element.Scan(prop.PropertyType, prop.Name); + + if (e != null) + complex.elements.Add(e); + } + } + + foreach(TimeToBeReceivedAttribute a in type.GetCustomAttributes(typeof(TimeToBeReceivedAttribute), true)) + complex.TimeToBeReceived = a.TimeToBeReceived; + + return complex; + } + + private static bool IsKeyValuePair(Type t) + { + Type[] args = t.GetGenericArguments(); + if (args == null) + return false; + if (args.Length != 2) + return false; + return (typeof(KeyValuePair<,>).MakeGenericType(args) == t); + } + + private static bool IsInList(PropertyInfo prop, ICollection propsToIgnore) + { + if (propsToIgnore.Contains(prop)) + return true; + + foreach(PropertyInfo pi in propsToIgnore) + if (pi.Name == prop.Name) + return true; + + return false; + } + } +} diff --git a/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/ComplexTypeWriter.cs b/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/ComplexTypeWriter.cs index 4920ae8e028..cff5a6b9b2d 100644 --- a/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/ComplexTypeWriter.cs +++ b/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/ComplexTypeWriter.cs @@ -1,45 +1,45 @@ -using System.Text; - -namespace NServiceBus.Serializers.XML.XsdGenerator -{ - public class ComplexTypeWriter - { - private readonly ComplexType complex; - private readonly string beginTopFormat = "\n"; - private readonly string beginBaseFormat = "\n\n"; - private readonly string beginSequence = ""; - private readonly string endSequence = ""; - private readonly string endBaseFormat = "\n\n"; - private readonly string endTopFormat = "\n"; - - public static void Write(ComplexType complex, StringBuilder builder) - { - new ComplexTypeWriter(complex).Write(builder); - } - - private ComplexTypeWriter(ComplexType complex) - { - this.complex = complex; - } - - public void Write(StringBuilder builder) - { - builder.AppendFormat(beginTopFormat, complex.Name); - - if (complex.BaseName != null) - builder.AppendFormat(beginBaseFormat, complex.BaseName); - - builder.AppendLine(beginSequence); - - foreach (Element e in complex.Elements) - builder.AppendFormat(ElementWriter.Write(e)); - - builder.AppendLine(endSequence); - - if (complex.BaseName != null) - builder.AppendFormat(endBaseFormat); - - builder.AppendFormat(endTopFormat); - } - } -} +using System.Text; + +namespace NServiceBus.Serializers.XML.XsdGenerator +{ + public class ComplexTypeWriter + { + private readonly ComplexType complex; + private readonly string beginTopFormat = "\n"; + private readonly string beginBaseFormat = "\n\n"; + private readonly string beginSequence = ""; + private readonly string endSequence = ""; + private readonly string endBaseFormat = "\n\n"; + private readonly string endTopFormat = "\n"; + + public static void Write(ComplexType complex, StringBuilder builder) + { + new ComplexTypeWriter(complex).Write(builder); + } + + private ComplexTypeWriter(ComplexType complex) + { + this.complex = complex; + } + + public void Write(StringBuilder builder) + { + builder.AppendFormat(beginTopFormat, complex.Name); + + if (complex.BaseName != null) + builder.AppendFormat(beginBaseFormat, complex.BaseName); + + builder.AppendLine(beginSequence); + + foreach (Element e in complex.Elements) + builder.AppendFormat(ElementWriter.Write(e)); + + builder.AppendLine(endSequence); + + if (complex.BaseName != null) + builder.AppendFormat(endBaseFormat); + + builder.AppendFormat(endTopFormat); + } + } +} diff --git a/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/Element.cs b/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/Element.cs index 5c6c47ceb2d..01b542073ab 100644 --- a/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/Element.cs +++ b/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/Element.cs @@ -1,84 +1,84 @@ -using System; -using System.Collections; - -namespace NServiceBus.Serializers.XML.XsdGenerator -{ - public class Element - { - private string name; - private int minOccurs = 1; - private bool unboundedMaxOccurs; - private bool nillable; - private string type; - private string nameSpace; - - public string Name - { - get { return name; } - } - - public int MinOccurs - { - get { return minOccurs; } - } - - public bool UnboundedMaxOccurs - { - get { return unboundedMaxOccurs; } - } - - public bool Nillable - { - get { return nillable; } - } - - public string Type - { - get { return type; } - } - - public string NameSpace - { - get { return nameSpace; } - } - - public void DoesNotNeedToOccur() - { - minOccurs = 0; - } - - public void UnboundMaxOccurs() - { - unboundedMaxOccurs = true; - } - - public void MakeNillable() - { - nillable = true; - } - - private Element() - { - - } - - public static Element Scan(Type t, string name) - { - Element e = new Element(); - - if (t == typeof(Guid)) - { - Events.FoundGuid(); - e.nameSpace = "http://microsoft.com/wsdl/types/"; - } - - if (typeof(IEnumerable).IsAssignableFrom(t) || t.IsClass || t.IsInterface) - e.DoesNotNeedToOccur(); - - e.type = Reflect.GetTypeNameFrom(t); - e.name = name; - - return e; - } - } -} +using System; +using System.Collections; + +namespace NServiceBus.Serializers.XML.XsdGenerator +{ + public class Element + { + private string name; + private int minOccurs = 1; + private bool unboundedMaxOccurs; + private bool nillable; + private string type; + private string nameSpace; + + public string Name + { + get { return name; } + } + + public int MinOccurs + { + get { return minOccurs; } + } + + public bool UnboundedMaxOccurs + { + get { return unboundedMaxOccurs; } + } + + public bool Nillable + { + get { return nillable; } + } + + public string Type + { + get { return type; } + } + + public string NameSpace + { + get { return nameSpace; } + } + + public void DoesNotNeedToOccur() + { + minOccurs = 0; + } + + public void UnboundMaxOccurs() + { + unboundedMaxOccurs = true; + } + + public void MakeNillable() + { + nillable = true; + } + + private Element() + { + + } + + public static Element Scan(Type t, string name) + { + Element e = new Element(); + + if (t == typeof(Guid)) + { + Events.FoundGuid(); + e.nameSpace = "http://microsoft.com/wsdl/types/"; + } + + if (typeof(IEnumerable).IsAssignableFrom(t) || t.IsClass || t.IsInterface) + e.DoesNotNeedToOccur(); + + e.type = Reflect.GetTypeNameFrom(t); + e.name = name; + + return e; + } + } +} diff --git a/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/ElementWriter.cs b/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/ElementWriter.cs index 9a167856657..2fefc72f319 100644 --- a/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/ElementWriter.cs +++ b/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/ElementWriter.cs @@ -1,47 +1,47 @@ -using System.Text; - -namespace NServiceBus.Serializers.XML.XsdGenerator -{ - public class ElementWriter - { - private readonly Element e; - private readonly string startFormat = "\n"; - - public static string Write(Element e) - { - return new ElementWriter(e).Write(); - } - - private ElementWriter(Element e) - { - this.e = e; - } - - public string Write() - { - StringBuilder builder = new StringBuilder(); - - builder.AppendFormat(startFormat, e.MinOccurs); - - if (e.UnboundedMaxOccurs) - builder.Append("unbounded"); - else - builder.Append("1"); - - builder.AppendFormat(nameFormat, e.Name); - - if (e.Nillable) - builder.Append("nillable=\"true\" "); - - if (e.NameSpace != null) - builder.AppendFormat(namespaceFormat, e.NameSpace); - - builder.AppendFormat(typeFormat, e.Type); - - return builder.ToString(); - } - } -} +using System.Text; + +namespace NServiceBus.Serializers.XML.XsdGenerator +{ + public class ElementWriter + { + private readonly Element e; + private readonly string startFormat = "\n"; + + public static string Write(Element e) + { + return new ElementWriter(e).Write(); + } + + private ElementWriter(Element e) + { + this.e = e; + } + + public string Write() + { + StringBuilder builder = new StringBuilder(); + + builder.AppendFormat(startFormat, e.MinOccurs); + + if (e.UnboundedMaxOccurs) + builder.Append("unbounded"); + else + builder.Append("1"); + + builder.AppendFormat(nameFormat, e.Name); + + if (e.Nillable) + builder.Append("nillable=\"true\" "); + + if (e.NameSpace != null) + builder.AppendFormat(namespaceFormat, e.NameSpace); + + builder.AppendFormat(typeFormat, e.Type); + + return builder.ToString(); + } + } +} diff --git a/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/Events.cs b/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/Events.cs index 9d1c8624bdd..196838d33be 100644 --- a/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/Events.cs +++ b/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/Events.cs @@ -1,16 +1,16 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace NServiceBus.Serializers.XML.XsdGenerator -{ - public static class Events - { - public static event EventHandler GuidDetected; - public static void FoundGuid() - { - if (GuidDetected != null) - GuidDetected(null, null); - } - } -} +using System; +using System.Collections.Generic; +using System.Text; + +namespace NServiceBus.Serializers.XML.XsdGenerator +{ + public static class Events + { + public static event EventHandler GuidDetected; + public static void FoundGuid() + { + if (GuidDetected != null) + GuidDetected(null, null); + } + } +} diff --git a/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/NServiceBus.Serializers.XML.XsdGenerator.csproj b/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/NServiceBus.Serializers.XML.XsdGenerator.csproj index 5df5d5da4f9..f6abf88385f 100644 --- a/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/NServiceBus.Serializers.XML.XsdGenerator.csproj +++ b/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/NServiceBus.Serializers.XML.XsdGenerator.csproj @@ -1,120 +1,120 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {85118B5C-6CAA-44B4-87EA-419DC6F4F2FB} - Exe - Properties - NServiceBus.Serializers.XML.XsdGenerator - XsdGenerator - - - - - - v4.0 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\..\build\output\NServiceBus.dll - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.Utils.Reflection.dll - - - - 3.5 - - - - - - - CommonAssemblyInfo.cs - - - - - - - - - - - - - - - - {4D9A660B-C2AF-42A8-AEB4-E2F97ED1CB3C} - NServiceBus.Serializers.XML - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\XsdGenerator\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {85118B5C-6CAA-44B4-87EA-419DC6F4F2FB} + Exe + Properties + NServiceBus.Serializers.XML.XsdGenerator + XsdGenerator + + + + + + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\..\build\output\NServiceBus.dll + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.Utils.Reflection.dll + + + + 3.5 + + + + + + + CommonAssemblyInfo.cs + + + + + + + + + + + + + + + + {4D9A660B-C2AF-42A8-AEB4-E2F97ED1CB3C} + NServiceBus.Serializers.XML + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\XsdGenerator\" + \ No newline at end of file diff --git a/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/Program.cs b/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/Program.cs index 67a8ef46e75..28cf7ef7942 100644 --- a/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/Program.cs +++ b/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/Program.cs @@ -1,130 +1,130 @@ -using System; -using System.IO; -using System.Text; -using System.Reflection; - -namespace NServiceBus.Serializers.XML.XsdGenerator -{ - class Program - { - static void Main(string[] args) - { - AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; - - Assembly a = Assembly.LoadFile(Path.Combine(Environment.CurrentDirectory, args[0])); - - if (args.Length == 2) - baseNameSpace = args[1]; - - Events.GuidDetected += delegate - { - needToGenerateGuid = true; - }; - - foreach(Type t in a.GetTypes()) - TopLevelScan(t); - - string xsd = GenerateXsdString(); - - using(StreamWriter writer = File.CreateText(GetFileName())) - writer.Write(xsd); - - if (needToGenerateGuid) - using (StreamWriter writer = File.CreateText(GetFileName())) - writer.Write(Strings.GuidXsd); - } - - static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) - { - Console.WriteLine("Usage: first parameter [required], your assembly. second parameter [optional] the base namespace (or http://tempuri.net will be used)."); - } - - private static string GetFileName() - { - int i = 0; - while (File.Exists(string.Format("schema{0}.xsd", i))) - i++; - - return string.Format("schema{0}.xsd", i); - } - - private static string GenerateXsdString() - { - StringBuilder builder = new StringBuilder(); - - builder.AppendLine(""); - builder.AppendLine(""); - - if (needToGenerateGuid) - builder.AppendLine(""); - - foreach (ComplexType complex in Repository.ComplexTypes) - { - builder.AppendFormat("\n", complex.Name); - - if (complex.TimeToBeReceived > TimeSpan.Zero) - { - builder.AppendLine(""); - builder.AppendLine(""); - builder.AppendFormat("{0}\n", complex.TimeToBeReceived); - builder.AppendLine(""); - builder.AppendLine(""); - } - - builder.AppendLine(""); - ComplexTypeWriter.Write(complex, builder); - } - - foreach (Type simple in Repository.SimpleTypes) - { - builder.AppendFormat("\n", simple.Name); - SimpleTypeWriter.Write(simple, builder); - } - - SimpleTypeWriter.WriteChar(builder); - - builder.AppendLine(""); - - string result = builder.ToString(); - - return result; - } - - public static void TopLevelScan(Type type) - { - if (typeof(IMessage).IsAssignableFrom(type)) - { - if (nameSpace == null) - nameSpace = type.Namespace; - else - if (type.Namespace != nameSpace) - { - Console.WriteLine("WARNING: Not all types are in the same namespace. This may cause serialization to fail and is not supported."); - Console.ReadLine(); - - throw new InvalidOperationException("Not all types are in the same namespace"); - } - - Scan(type); - } - } - - public static void Scan(Type type) - { - if (type == null || type == typeof(object) || type == typeof(IMessage)) - return; - - Repository.Handle(type); - - if (!type.IsInterface) - Scan(type.BaseType); - else - foreach (Type i in type.GetInterfaces()) - Scan(i); - } - - private static bool needToGenerateGuid; - private static string nameSpace; - private static string baseNameSpace = "http://tempuri.net"; - } -} +using System; +using System.IO; +using System.Text; +using System.Reflection; + +namespace NServiceBus.Serializers.XML.XsdGenerator +{ + class Program + { + static void Main(string[] args) + { + AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; + + Assembly a = Assembly.LoadFile(Path.Combine(Environment.CurrentDirectory, args[0])); + + if (args.Length == 2) + baseNameSpace = args[1]; + + Events.GuidDetected += delegate + { + needToGenerateGuid = true; + }; + + foreach(Type t in a.GetTypes()) + TopLevelScan(t); + + string xsd = GenerateXsdString(); + + using(StreamWriter writer = File.CreateText(GetFileName())) + writer.Write(xsd); + + if (needToGenerateGuid) + using (StreamWriter writer = File.CreateText(GetFileName())) + writer.Write(Strings.GuidXsd); + } + + static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) + { + Console.WriteLine("Usage: first parameter [required], your assembly. second parameter [optional] the base namespace (or http://tempuri.net will be used)."); + } + + private static string GetFileName() + { + int i = 0; + while (File.Exists(string.Format("schema{0}.xsd", i))) + i++; + + return string.Format("schema{0}.xsd", i); + } + + private static string GenerateXsdString() + { + StringBuilder builder = new StringBuilder(); + + builder.AppendLine(""); + builder.AppendLine(""); + + if (needToGenerateGuid) + builder.AppendLine(""); + + foreach (ComplexType complex in Repository.ComplexTypes) + { + builder.AppendFormat("\n", complex.Name); + + if (complex.TimeToBeReceived > TimeSpan.Zero) + { + builder.AppendLine(""); + builder.AppendLine(""); + builder.AppendFormat("{0}\n", complex.TimeToBeReceived); + builder.AppendLine(""); + builder.AppendLine(""); + } + + builder.AppendLine(""); + ComplexTypeWriter.Write(complex, builder); + } + + foreach (Type simple in Repository.SimpleTypes) + { + builder.AppendFormat("\n", simple.Name); + SimpleTypeWriter.Write(simple, builder); + } + + SimpleTypeWriter.WriteChar(builder); + + builder.AppendLine(""); + + string result = builder.ToString(); + + return result; + } + + public static void TopLevelScan(Type type) + { + if (typeof(IMessage).IsAssignableFrom(type)) + { + if (nameSpace == null) + nameSpace = type.Namespace; + else + if (type.Namespace != nameSpace) + { + Console.WriteLine("WARNING: Not all types are in the same namespace. This may cause serialization to fail and is not supported."); + Console.ReadLine(); + + throw new InvalidOperationException("Not all types are in the same namespace"); + } + + Scan(type); + } + } + + public static void Scan(Type type) + { + if (type == null || type == typeof(object) || type == typeof(IMessage)) + return; + + Repository.Handle(type); + + if (!type.IsInterface) + Scan(type.BaseType); + else + foreach (Type i in type.GetInterfaces()) + Scan(i); + } + + private static bool needToGenerateGuid; + private static string nameSpace; + private static string baseNameSpace = "http://tempuri.net"; + } +} diff --git a/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/Properties/AssemblyInfo.cs b/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/Properties/AssemblyInfo.cs index d3f2c737466..4ef43e98e7b 100644 --- a/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/Properties/AssemblyInfo.cs +++ b/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus XSD Generator")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus XSD Generator")] [assembly: AssemblyDescription("XSD file generator for interface-based message schemas.")] \ No newline at end of file diff --git a/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/Reflect.cs b/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/Reflect.cs index ec270c646f8..1e943e1b7f7 100644 --- a/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/Reflect.cs +++ b/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/Reflect.cs @@ -1,58 +1,58 @@ -using System; -using System.Collections.Generic; -using NServiceBus.Utils.Reflection; - -namespace NServiceBus.Serializers.XML.XsdGenerator -{ - public static class Reflect - { - public static string GetTypeNameFrom(Type t) - { - if (t == typeof(int)) - return "xs:int"; - if (t == typeof(string)) - return "xs:string"; - if (t == typeof(double)) - return "xs:double"; - if (t == typeof(float)) - return "xs:float"; - if (t == typeof(bool)) - return "xs:boolean"; - if (t == typeof(Guid)) - return Strings.NamespacePrefix + ":guid"; - if (t == typeof(DateTime)) - return "xs:dateTime"; - if (t == typeof(TimeSpan)) - return "xs:duration"; - if (t == typeof(decimal)) - return "xs:decimal"; - if (t == typeof(DateTimeOffset)) - return "xs:dateTime"; - if (t == typeof(Object)) - return "xs:anyType"; - - Type arrayType = GetEnumeratedTypeFrom(t); - - if (arrayType != null) - return Strings.ArrayOf + GetTypeNameFrom(arrayType); - - return t.SerializationFriendlyName(); - } - - public static Type GetEnumeratedTypeFrom(Type t) - { - if (t.IsArray) - return t.GetElementType(); - - foreach (Type interfaceType in t.GetInterfaces()) - { - Type[] genericArgs = interfaceType.GetGenericArguments(); - if (genericArgs.Length == 1) - if (typeof(IEnumerable<>).MakeGenericType(genericArgs[0]).IsAssignableFrom(t)) - return genericArgs[0]; - } - - return null; - } - } -} +using System; +using System.Collections.Generic; +using NServiceBus.Utils.Reflection; + +namespace NServiceBus.Serializers.XML.XsdGenerator +{ + public static class Reflect + { + public static string GetTypeNameFrom(Type t) + { + if (t == typeof(int)) + return "xs:int"; + if (t == typeof(string)) + return "xs:string"; + if (t == typeof(double)) + return "xs:double"; + if (t == typeof(float)) + return "xs:float"; + if (t == typeof(bool)) + return "xs:boolean"; + if (t == typeof(Guid)) + return Strings.NamespacePrefix + ":guid"; + if (t == typeof(DateTime)) + return "xs:dateTime"; + if (t == typeof(TimeSpan)) + return "xs:duration"; + if (t == typeof(decimal)) + return "xs:decimal"; + if (t == typeof(DateTimeOffset)) + return "xs:dateTime"; + if (t == typeof(Object)) + return "xs:anyType"; + + Type arrayType = GetEnumeratedTypeFrom(t); + + if (arrayType != null) + return Strings.ArrayOf + GetTypeNameFrom(arrayType); + + return t.SerializationFriendlyName(); + } + + public static Type GetEnumeratedTypeFrom(Type t) + { + if (t.IsArray) + return t.GetElementType(); + + foreach (Type interfaceType in t.GetInterfaces()) + { + Type[] genericArgs = interfaceType.GetGenericArguments(); + if (genericArgs.Length == 1) + if (typeof(IEnumerable<>).MakeGenericType(genericArgs[0]).IsAssignableFrom(t)) + return genericArgs[0]; + } + + return null; + } + } +} diff --git a/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/Repository.cs b/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/Repository.cs index 67ab4f78929..f2ea9e5ea0c 100644 --- a/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/Repository.cs +++ b/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/Repository.cs @@ -1,87 +1,87 @@ -using System; -using System.Collections; -using System.Collections.Generic; - -namespace NServiceBus.Serializers.XML.XsdGenerator -{ - public static class Repository - { - /// - /// Returns types in the order they were handled - /// - public static IEnumerable ComplexTypes - { - get - { - List keys = new List(types.Keys); - for (int i = keys.Count - 1; i >= 0; i-- ) - yield return types[keys[i]]; - } - } - - public static IEnumerable SimpleTypes - { - get { return simpleTypesToCreate; } - } - - public static void Handle(Type type) - { - Type normalized = Normalize(type); - if (normalized != type) - { - Handle(normalized); - return; - } - - if (types.ContainsKey(type)) - return; - - if (simpleTypesToCreate.Contains(type)) - return; - - ComplexType complex = ComplexType.Scan(type); - if (complex != null) - { - types[type] = complex; - return; - } - - if (type.IsEnum) - if (!simpleTypesToCreate.Contains(type)) - simpleTypesToCreate.Add(type); - } - - public static bool IsNormalizedList(Type type) - { - foreach (Type interfaceType in type.GetInterfaces()) - { - Type[] genericArgs = interfaceType.GetGenericArguments(); - if (genericArgs == null) - continue; - - if (genericArgs.Length != 1) - continue; - - if (typeof(IEnumerable<>).MakeGenericType(genericArgs[0]) == interfaceType) - return true; - } - - return false; - } - - private static Type Normalize(Type type) - { - if (!typeof(IEnumerable).IsAssignableFrom(type)) - return type; - - Type enumerated = Reflect.GetEnumeratedTypeFrom(type); - if (enumerated == null) - return type; - - return typeof(List<>).MakeGenericType(enumerated); - } - - private static readonly IDictionary types = new Dictionary(); - private static readonly IList simpleTypesToCreate = new List(); - } -} +using System; +using System.Collections; +using System.Collections.Generic; + +namespace NServiceBus.Serializers.XML.XsdGenerator +{ + public static class Repository + { + /// + /// Returns types in the order they were handled + /// + public static IEnumerable ComplexTypes + { + get + { + List keys = new List(types.Keys); + for (int i = keys.Count - 1; i >= 0; i-- ) + yield return types[keys[i]]; + } + } + + public static IEnumerable SimpleTypes + { + get { return simpleTypesToCreate; } + } + + public static void Handle(Type type) + { + Type normalized = Normalize(type); + if (normalized != type) + { + Handle(normalized); + return; + } + + if (types.ContainsKey(type)) + return; + + if (simpleTypesToCreate.Contains(type)) + return; + + ComplexType complex = ComplexType.Scan(type); + if (complex != null) + { + types[type] = complex; + return; + } + + if (type.IsEnum) + if (!simpleTypesToCreate.Contains(type)) + simpleTypesToCreate.Add(type); + } + + public static bool IsNormalizedList(Type type) + { + foreach (Type interfaceType in type.GetInterfaces()) + { + Type[] genericArgs = interfaceType.GetGenericArguments(); + if (genericArgs == null) + continue; + + if (genericArgs.Length != 1) + continue; + + if (typeof(IEnumerable<>).MakeGenericType(genericArgs[0]) == interfaceType) + return true; + } + + return false; + } + + private static Type Normalize(Type type) + { + if (!typeof(IEnumerable).IsAssignableFrom(type)) + return type; + + Type enumerated = Reflect.GetEnumeratedTypeFrom(type); + if (enumerated == null) + return type; + + return typeof(List<>).MakeGenericType(enumerated); + } + + private static readonly IDictionary types = new Dictionary(); + private static readonly IList simpleTypesToCreate = new List(); + } +} diff --git a/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/SimpleTypeWriter.cs b/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/SimpleTypeWriter.cs index 7d394192e4a..865889f9a44 100644 --- a/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/SimpleTypeWriter.cs +++ b/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/SimpleTypeWriter.cs @@ -1,28 +1,28 @@ -using System; -using System.Text; - -namespace NServiceBus.Serializers.XML.XsdGenerator -{ - public class SimpleTypeWriter - { - public static void Write(Type t, StringBuilder builder) - { - if (!t.IsEnum) - return; - - builder.AppendFormat("\n", t.Name); - builder.AppendLine(""); - - foreach(string val in Enum.GetNames(t)) - builder.AppendFormat("\n", val); - - builder.AppendLine(""); - builder.AppendLine(""); - } - - public static void WriteChar(StringBuilder builder) - { - builder.Append("\n\n\n\n\n\n"); - } - } -} +using System; +using System.Text; + +namespace NServiceBus.Serializers.XML.XsdGenerator +{ + public class SimpleTypeWriter + { + public static void Write(Type t, StringBuilder builder) + { + if (!t.IsEnum) + return; + + builder.AppendFormat("\n", t.Name); + builder.AppendLine(""); + + foreach(string val in Enum.GetNames(t)) + builder.AppendFormat("\n", val); + + builder.AppendLine(""); + builder.AppendLine(""); + } + + public static void WriteChar(StringBuilder builder) + { + builder.Append("\n\n\n\n\n\n"); + } + } +} diff --git a/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/Strings.cs b/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/Strings.cs index 44a7257a0f4..62a75732a74 100644 --- a/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/Strings.cs +++ b/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/Strings.cs @@ -1,18 +1,18 @@ - -namespace NServiceBus.Serializers.XML.XsdGenerator -{ - public static class Strings - { - public static readonly string ArrayOf = "ArrayOf"; - public static readonly string NamespacePrefix = "q1"; - - public static readonly string GuidXsd = "\n" + - "\n" + - "\t\n" + - "\t\t\n" + - "\t\t\t\n" + - "\t\t\n" + - "\t\n" + - "\n"; - } -} + +namespace NServiceBus.Serializers.XML.XsdGenerator +{ + public static class Strings + { + public static readonly string ArrayOf = "ArrayOf"; + public static readonly string NamespacePrefix = "q1"; + + public static readonly string GuidXsd = "\n" + + "\n" + + "\t\n" + + "\t\t\n" + + "\t\t\t\n" + + "\t\t\n" + + "\t\n" + + "\n"; + } +} diff --git a/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/app.config b/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/app.config index cb2586beb1d..e3656033377 100644 --- a/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/app.config +++ b/src/impl/Serializers/NServiceBus.Serializers.XML.XsdGenerator/app.config @@ -1,3 +1,3 @@ - - - + + + diff --git a/src/impl/Serializers/NServiceBus.Serializers.XML/MessageSerializer.cs b/src/impl/Serializers/NServiceBus.Serializers.XML/MessageSerializer.cs index 673f5c1cc39..e567e7f277d 100644 --- a/src/impl/Serializers/NServiceBus.Serializers.XML/MessageSerializer.cs +++ b/src/impl/Serializers/NServiceBus.Serializers.XML/MessageSerializer.cs @@ -1,825 +1,825 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.IO; -using System.Reflection; -using System.Text; -using System.Xml; -using NServiceBus.Serialization; -using NServiceBus.MessageInterfaces; -using System.Runtime.Serialization; -using Common.Logging; -using NServiceBus.Utils.Reflection; -using System.Xml.Serialization; - -namespace NServiceBus.Serializers.XML -{ - /// - /// Implementation of the message serializer over XML supporting interface-based messages. - /// - public class MessageSerializer : IMessageSerializer - { - /// - /// The message mapper used to translate between types. - /// - public IMessageMapper MessageMapper - { - get { return mapper; } - set - { - mapper = value; - - if (messageTypes != null) - mapper.Initialize(messageTypes); - } - } - - private IMessageMapper mapper; - - private string nameSpace = "http://tempuri.net"; - - /// - /// The namespace to place in outgoing XML. - /// - public string Namespace - { - get { return nameSpace; } - set { nameSpace = value; } - } - - /// - /// Gets/sets message types to be serialized - /// - public List MessageTypes - { - get { return messageTypes; } - set - { - messageTypes = value; - if (!messageTypes.Contains(typeof(EncryptedValue))) - messageTypes.Add(typeof(EncryptedValue)); - - if (MessageMapper != null) - MessageMapper.Initialize(messageTypes.ToArray()); - - foreach (Type t in messageTypes) - InitType(t); - } - } - - private List messageTypes; - - /// - /// Scans the given type storing maps to fields and properties to save on reflection at runtime. - /// - /// - public void InitType(Type t) - { - logger.Debug("Initializing type: " + t.AssemblyQualifiedName); - - if (t.IsSimpleType()) - return; - - if (typeof(IEnumerable).IsAssignableFrom(t)) - { - if (t.IsArray) - typesToCreateForArrays[t] = typeof(List<>).MakeGenericType(t.GetElementType()); - - foreach (Type g in t.GetGenericArguments()) - InitType(g); - - //Handle dictionaries - initalize relevant KeyValuePair types. - foreach (Type interfaceType in t.GetInterfaces()) - { - Type[] arr = interfaceType.GetGenericArguments(); - if (arr.Length == 1) - if (typeof(IEnumerable<>).MakeGenericType(arr[0]).IsAssignableFrom(t)) - InitType(arr[0]); - } - - return; - } - - var isKeyValuePair = false; - - var args = t.GetGenericArguments(); - if (args.Length == 2) - { - isKeyValuePair = (typeof (KeyValuePair<,>).MakeGenericType(args) == t); - } - - if (args.Length == 1 && args[0].IsValueType) - { - if (typeof(Nullable<>).MakeGenericType(args) == t) - { - InitType(args[0]); - return; - } - } - - //already in the process of initializing this type (prevents infinite recursion). - if (typesBeingInitialized.Contains(t)) - return; - - typesBeingInitialized.Add(t); - - var props = GetAllPropertiesForType(t, isKeyValuePair); - typeToProperties[t] = props; - var fields = GetAllFieldsForType(t); - typeToFields[t] = fields; - - - foreach (var p in props) - { - logger.Debug("Handling property: " + p.Name); - - propertyInfoToLateBoundProperty[p] = DelegateFactory.Create(p); - - if (!isKeyValuePair) - propertyInfoToLateBoundPropertySet[p] = DelegateFactory.CreateSet(p); - - InitType(p.PropertyType); - } - - foreach (var f in fields) - { - logger.Debug("Handling field: " + f.Name); - - fieldInfoToLateBoundField[f] = DelegateFactory.Create(f); - - if (!isKeyValuePair) - fieldInfoToLateBoundFieldSet[f] = DelegateFactory.CreateSet(f); - - InitType(f.FieldType); - } - } - - /// - /// Gets a PropertyInfo for each property of the given type. - /// - /// - /// - /// - IEnumerable GetAllPropertiesForType(Type t, bool isKeyValuePair) - { - var result = new List(); - - foreach (var prop in t.GetProperties()) - { - if (typeof(IList) == prop.PropertyType) - throw new NotSupportedException("IList is not a supported property type for serialization, use List instead. Type: " + t.FullName + " Property: " + prop.Name); - - var args = prop.PropertyType.GetGenericArguments(); - - if (args.Length == 1) - if (typeof(IList<>).MakeGenericType(args) == prop.PropertyType) - throw new NotSupportedException("IList is not a supported property type for serialization, use List instead. Type: " + t.FullName + " Property: " + prop.Name); - - if (args.Length == 2) - if (typeof(IDictionary<,>).MakeGenericType(args) == prop.PropertyType) - throw new NotSupportedException("IDictionary is not a supported property type for serialization, use Dictionary instead. Type: " + t.FullName + " Property: " + prop.Name + ". Consider using a concrete Dictionary instead."); - - if (!prop.CanWrite && !isKeyValuePair) - continue; - if (prop.GetCustomAttributes(typeof(XmlIgnoreAttribute), false).Length > 0) - continue; - - result.Add(prop); - } - - if (t.IsInterface) - foreach (Type interfaceType in t.GetInterfaces()) - result.AddRange(GetAllPropertiesForType(interfaceType, false)); - - return result; - } - - /// - /// Gets a FieldInfo for each field in the given type. - /// - /// - /// - IEnumerable GetAllFieldsForType(Type t) - { - return t.GetFields(BindingFlags.FlattenHierarchy | BindingFlags.Instance | BindingFlags.Public); - } - - #region Deserialize - - /// - /// Deserializes the given stream to an array of messages which are returned. - /// - /// - /// - public IMessage[] Deserialize(Stream stream) - { - if (stream == null) - return null; - - prefixesToNamespaces = new Dictionary(); - messageBaseTypes = new List(); - var result = new List(); - - var doc = new XmlDocument(); - - doc.Load(XmlReader.Create(stream, new XmlReaderSettings {CheckCharacters = false})); - - if (doc.DocumentElement == null) - return result.ToArray(); - - foreach (XmlAttribute attr in doc.DocumentElement.Attributes) - { - if (attr.Name == "xmlns") - defaultNameSpace = attr.Value.Substring(attr.Value.LastIndexOf("/") + 1); - else - { - if (attr.Name.Contains("xmlns:")) - { - int colonIndex = attr.Name.LastIndexOf(":"); - string prefix = attr.Name.Substring(colonIndex + 1); - - if (prefix.Contains(BASETYPE)) - { - Type baseType = MessageMapper.GetMappedTypeFor(attr.Value); - if (baseType != null) - messageBaseTypes.Add(baseType); - } - else - prefixesToNamespaces[prefix] = attr.Value; - } - } - } - - if (doc.DocumentElement.Name.ToLower() != "messages") - { - object m = Process(doc.DocumentElement, null); - - if (m == null) - throw new SerializationException("Could not deserialize message."); - - result.Add(m as IMessage); - } - else - { - foreach (XmlNode node in doc.DocumentElement.ChildNodes) - { - object m = Process(node, null); - - result.Add(m as IMessage); - } - } - - defaultNameSpace = null; - - return result.ToArray(); - } - - private object Process(XmlNode node, object parent) - { - string name = node.Name; - string typeName = defaultNameSpace + "." + name; - - if (name.Contains(":")) - { - int colonIndex = node.Name.IndexOf(":"); - name = name.Substring(colonIndex + 1); - string prefix = node.Name.Substring(0, colonIndex); - string ns = prefixesToNamespaces[prefix]; - - typeName = ns.Substring(nameSpace.LastIndexOf("/") + 1) + "." + name; - } - - if (name.Contains("NServiceBus.")) - typeName = name; - - if (parent != null) - { - if (parent is IEnumerable) - { - if (parent.GetType().IsArray) - return GetObjectOfTypeFromNode(parent.GetType().GetElementType(), node); - - var args = parent.GetType().GetGenericArguments(); - if (args.Length == 1) - return GetObjectOfTypeFromNode(args[0], node); - } - - PropertyInfo prop = parent.GetType().GetProperty(name); - if (prop != null) - return GetObjectOfTypeFromNode(prop.PropertyType, node); - } - - Type t = MessageMapper.GetMappedTypeFor(typeName); - if (t == null) - { - logger.Debug("Could not load " + typeName + ". Trying base types..."); - foreach(Type baseType in messageBaseTypes) - try - { - logger.Debug("Trying to deserialize message to " + baseType.FullName); - return GetObjectOfTypeFromNode(baseType, node); - } -// ReSharper disable EmptyGeneralCatchClause - catch { } // intentionally swallow exception -// ReSharper restore EmptyGeneralCatchClause - - throw new TypeLoadException("Could not handle type '" + typeName + "'."); - } - - return GetObjectOfTypeFromNode(t, node); - } - - private object GetObjectOfTypeFromNode(Type t, XmlNode node) - { - if (t.IsSimpleType()) - return GetPropertyValue(t, node); - - if (typeof(IEnumerable).IsAssignableFrom(t)) - return GetPropertyValue(t, node); - - object result = MessageMapper.CreateInstance(t); - - foreach (XmlNode n in node.ChildNodes) - { - Type type = null; - if (n.Name.Contains(":")) - type = Type.GetType("System." + n.Name.Substring(0, n.Name.IndexOf(":")), false, true); - - var prop = GetProperty(t, n.Name); - if (prop != null) - { - var val = GetPropertyValue(type ?? prop.PropertyType, n); - if (val != null) - { - propertyInfoToLateBoundPropertySet[prop].Invoke(result, val); - continue; - } - } - - var field = GetField(t, n.Name); - if (field != null) - { - object val = GetPropertyValue(type ?? field.FieldType, n); - if (val != null) - { - fieldInfoToLateBoundFieldSet[field].Invoke(result, val); - continue; - } - } - } - - return result; - } - - private static PropertyInfo GetProperty(Type t, string name) - { - IEnumerable props; - typeToProperties.TryGetValue(t, out props); - - if (props == null) - return null; - - string n = GetNameAfterColon(name); - - foreach (PropertyInfo prop in props) - if (prop.Name == n) - return prop; - - return null; - } - - private static string GetNameAfterColon(string name) - { - var n = name; - if (name.Contains(":")) - n = name.Substring(name.IndexOf(":") + 1, name.Length - name.IndexOf(":") - 1); - - return n; - } - - private FieldInfo GetField(Type t, string name) - { - IEnumerable fields; - typeToFields.TryGetValue(t, out fields); - - if (fields == null) - return null; - - foreach (FieldInfo f in fields) - if (f.Name == name) - return f; - - return null; - } - - private object GetPropertyValue(Type type, XmlNode n) - { - if (n.ChildNodes.Count == 1 && n.ChildNodes[0] is XmlText) - { - var args = type.GetGenericArguments(); - if (args.Length == 1) - { - var nullableType = typeof (Nullable<>).MakeGenericType(args); - if (type == nullableType) - { - if (n.ChildNodes[0].InnerText.ToLower() == "null") - return null; - - return GetPropertyValue(args[0], n); - } - } - - if (type == typeof(string)) - return n.ChildNodes[0].InnerText; - - if (type.IsPrimitive || type == typeof(decimal)) - return Convert.ChangeType(n.ChildNodes[0].InnerText, type); - - if (type == typeof (Guid)) - return new Guid(n.ChildNodes[0].InnerText); - - if (type == typeof(DateTime)) - return XmlConvert.ToDateTime(n.ChildNodes[0].InnerText, XmlDateTimeSerializationMode.Utc); - - if (type == typeof(TimeSpan)) - return XmlConvert.ToTimeSpan(n.ChildNodes[0].InnerText); - - if (type == typeof(DateTimeOffset)) - return DateTimeOffset.Parse(n.ChildNodes[0].InnerText, null, DateTimeStyles.RoundtripKind); - - if (type.IsEnum) - return Enum.Parse(type, n.ChildNodes[0].InnerText); - - if (type == typeof(byte[])) - return Convert.FromBase64String(n.ChildNodes[0].InnerText); - } - - //Handle dictionaries - if (typeof(IDictionary).IsAssignableFrom(type)) - { - var result = Activator.CreateInstance(type) as IDictionary; - - var keyType = typeof (object); - var valueType = typeof (object); - - foreach(var interfaceType in type.GetInterfaces()) - { - var args = interfaceType.GetGenericArguments(); - if (args.Length == 2) - if (typeof(IDictionary<,>).MakeGenericType(args).IsAssignableFrom(type)) - { - keyType = args[0]; - valueType = args[1]; - break; - } - } - - foreach (XmlNode xn in n.ChildNodes) // go over KeyValuePairs - { - object key = null; - object value = null; - - foreach (XmlNode node in xn.ChildNodes) - { - if (node.Name == "Key") - key = GetObjectOfTypeFromNode(keyType, node); - if (node.Name == "Value") - value = GetObjectOfTypeFromNode(valueType, node); - } - - if (result != null && key != null) result[key] = value; - } - - return result; - } - - if (typeof(IEnumerable).IsAssignableFrom(type) && type != typeof(string)) - { - bool isArray = type.IsArray; - - Type typeToCreate = type; - if (isArray) - typeToCreate = typesToCreateForArrays[type]; - - if (typeof(IList).IsAssignableFrom(typeToCreate)) - { - var list = Activator.CreateInstance(typeToCreate) as IList; - if (list != null) - { - foreach (XmlNode xn in n.ChildNodes) - { - object m = Process(xn, list); - - list.Add(m); - } - - if (isArray) - return typeToCreate.GetMethod("ToArray").Invoke(list, null); - } - - return list; - } - } - - if (n.ChildNodes.Count == 0) - if (type == typeof(string)) - return string.Empty; - else - return null; - - - return GetObjectOfTypeFromNode(type, n); - } - - #endregion - - #region Serialize - - /// - /// Serializes the given messages to the given stream. - /// - /// - /// - public void Serialize(IMessage[] messages, Stream stream) - { - namespacesToPrefix = new Dictionary(); - namespacesToAdd = new List(); - - var namespaces = GetNamespaces(messages, MessageMapper); - for (int i = 0; i < namespaces.Count; i++) - { - string prefix = "q" + i; - if (i == 0) - prefix = ""; - - if (namespaces[i] != null) - namespacesToPrefix[namespaces[i]] = prefix; - } - - var messageBuilder = new StringBuilder(); - foreach (var m in messages) - { - var t = MessageMapper.GetMappedTypeFor(m.GetType()); - - WriteObject(t.Name, t, m, messageBuilder); - } - - var builder = new StringBuilder(); - - List baseTypes = GetBaseTypes(messages, MessageMapper); - - builder.AppendLine(""); - - builder.Append("\n"); - - builder.Append(messageBuilder.ToString()); - - builder.AppendLine(""); - - byte[] buffer = Encoding.UTF8.GetBytes(builder.ToString()); - stream.Write(buffer, 0, buffer.Length); - } - - private void Write(StringBuilder builder, Type t, object obj) - { - if (obj == null) - return; - - if (!typeToProperties.ContainsKey(t)) - throw new InvalidOperationException("Type " + t.FullName + " was not registered in the serializer. Check that it appears in the list of configured assemblies/types to scan."); - - foreach (PropertyInfo prop in typeToProperties[t]) - WriteEntry(prop.Name, prop.PropertyType, propertyInfoToLateBoundProperty[prop].Invoke(obj), builder); - - foreach(FieldInfo field in typeToFields[t]) - WriteEntry(field.Name, field.FieldType, fieldInfoToLateBoundField[field].Invoke(obj), builder); - } - - private void WriteObject(string name, Type type, object value, StringBuilder builder) - { - string element = name; - string prefix; - namespacesToPrefix.TryGetValue(type.Namespace, out prefix); - - if (string.IsNullOrEmpty(prefix) && type == typeof(object) && (value.GetType().IsSimpleType())) - { - if (!namespacesToAdd.Contains(value.GetType())) - namespacesToAdd.Add(value.GetType()); - - builder.AppendFormat("<{0}>{1}\n", - value.GetType().Name.ToLower() + ":" + name, - FormatAsString(value)); - - return; - } - - if (!string.IsNullOrEmpty(prefix)) - element = prefix + ":" + name; - - builder.AppendFormat("<{0}>\n", element); - - Write(builder, type, value); - - builder.AppendFormat("\n", element); - } - - private void WriteEntry(string name, Type type, object value, StringBuilder builder) - { - if (value == null) - { - if (typeof(IEnumerable).IsAssignableFrom(type)) - return; - - var args = type.GetGenericArguments(); - if (args.Length == 1) - { - var nullableType = typeof (Nullable<>).MakeGenericType(args); - if (type == nullableType) - { - WriteEntry(name, typeof(string), "null", builder); - return; - } - } - - return; - } - - if (type.IsValueType || type == typeof(string)) - { - builder.AppendFormat("<{0}>{1}\n", name, FormatAsString(value)); - return; - } - - if (typeof(IEnumerable).IsAssignableFrom(type)) - { - builder.AppendFormat("<{0}>\n", name); - - if (type == typeof(byte[])) - { - var str = Convert.ToBase64String((byte[])value); - builder.Append(str); - } - else - { - Type baseType = typeof(object); - - //Get generic type from list: T for List, KeyValuePair for IDictionary - foreach(Type interfaceType in type.GetInterfaces()) - { - Type[] arr = interfaceType.GetGenericArguments(); - if (arr.Length == 1) - if (typeof(IEnumerable<>).MakeGenericType(arr[0]).IsAssignableFrom(type)) - { - baseType = arr[0]; - break; - } - } - - - foreach (object obj in ((IEnumerable)value)) - if (obj.GetType().IsSimpleType()) - WriteEntry(obj.GetType().Name, obj.GetType(), obj, builder); - else - WriteObject(baseType.SerializationFriendlyName(), baseType, obj, builder); - - } - - builder.AppendFormat("\n", name); - return; - } - - WriteObject(name, type, value, builder); - } - - private static string FormatAsString(object value) - { - if (value == null) - return string.Empty; - if (value is bool) - return value.ToString().ToLower(); - if (value is string) - return System.Security.SecurityElement.Escape(value as string); - if (value is DateTime) - return ((DateTime)value).ToString("yyyy-MM-ddTHH:mm:ss.fffffff", CultureInfo.InvariantCulture); - if (value is TimeSpan) - { - TimeSpan ts = (TimeSpan) value; - return string.Format("{0}P0Y0M{1}DT{2}H{3}M{4}.{5:000}S", (ts.TotalSeconds < 0 ? "-" : ""), Math.Abs(ts.Days), Math.Abs(ts.Hours), Math.Abs(ts.Minutes), Math.Abs(ts.Seconds), Math.Abs(ts.Milliseconds)); - } - if (value is DateTimeOffset) - return ((DateTimeOffset)value).ToString("o", CultureInfo.InvariantCulture); - if (value is Guid) - return ((Guid) value).ToString(); - - return value.ToString(); - } - - private static List GetNamespaces(IMessage[] messages, IMessageMapper mapper) - { - var result = new List(); - - foreach (IMessage m in messages) - { - string ns = mapper.GetMappedTypeFor(m.GetType()).Namespace; - if (!result.Contains(ns)) - result.Add(ns); - } - - return result; - } - - private static List GetBaseTypes(IMessage[] messages, IMessageMapper mapper) - { - var result = new List(); - - foreach (IMessage m in messages) - { - Type t = mapper.GetMappedTypeFor(m.GetType()); - - Type baseType = t.BaseType; - while (baseType != typeof(object) && baseType != null) - { - if (typeof(IMessage).IsAssignableFrom(baseType)) - if (!result.Contains(baseType.FullName)) - result.Add(baseType.FullName); - - baseType = baseType.BaseType; - } - - foreach (Type i in t.GetInterfaces()) - if (i != typeof(IMessage) && typeof(IMessage).IsAssignableFrom(i)) - if (!result.Contains(i.FullName)) - result.Add(i.FullName); - } - - return result; - } - - #endregion - - #region members - - private const string XMLPREFIX = "d1p1"; - private const string XMLTYPE = XMLPREFIX + ":type"; - private const string BASETYPE = "baseType"; - - private static readonly Dictionary> typeToProperties = new Dictionary>(); - private static readonly Dictionary> typeToFields = new Dictionary>(); - private static readonly Dictionary typesToCreateForArrays = new Dictionary(); - private static readonly List typesBeingInitialized = new List(); - - private static readonly Dictionary propertyInfoToLateBoundProperty = new Dictionary(); - private static readonly Dictionary fieldInfoToLateBoundField = new Dictionary(); - private static readonly Dictionary propertyInfoToLateBoundPropertySet = new Dictionary(); - private static readonly Dictionary fieldInfoToLateBoundFieldSet = new Dictionary(); - - [ThreadStatic] - private static string defaultNameSpace; - - /// - /// Used for serialization - /// - [ThreadStatic] - private static IDictionary namespacesToPrefix; - - /// - /// Used for deserialization - /// - [ThreadStatic] - private static IDictionary prefixesToNamespaces; - - [ThreadStatic] - private static List messageBaseTypes; - - [ThreadStatic] - private static List namespacesToAdd; - - private static readonly ILog logger = LogManager.GetLogger("NServiceBus.Serializers.XML"); - - #endregion - } -} +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Reflection; +using System.Text; +using System.Xml; +using NServiceBus.Serialization; +using NServiceBus.MessageInterfaces; +using System.Runtime.Serialization; +using Common.Logging; +using NServiceBus.Utils.Reflection; +using System.Xml.Serialization; + +namespace NServiceBus.Serializers.XML +{ + /// + /// Implementation of the message serializer over XML supporting interface-based messages. + /// + public class MessageSerializer : IMessageSerializer + { + /// + /// The message mapper used to translate between types. + /// + public IMessageMapper MessageMapper + { + get { return mapper; } + set + { + mapper = value; + + if (messageTypes != null) + mapper.Initialize(messageTypes); + } + } + + private IMessageMapper mapper; + + private string nameSpace = "http://tempuri.net"; + + /// + /// The namespace to place in outgoing XML. + /// + public string Namespace + { + get { return nameSpace; } + set { nameSpace = value; } + } + + /// + /// Gets/sets message types to be serialized + /// + public List MessageTypes + { + get { return messageTypes; } + set + { + messageTypes = value; + if (!messageTypes.Contains(typeof(EncryptedValue))) + messageTypes.Add(typeof(EncryptedValue)); + + if (MessageMapper != null) + MessageMapper.Initialize(messageTypes.ToArray()); + + foreach (Type t in messageTypes) + InitType(t); + } + } + + private List messageTypes; + + /// + /// Scans the given type storing maps to fields and properties to save on reflection at runtime. + /// + /// + public void InitType(Type t) + { + logger.Debug("Initializing type: " + t.AssemblyQualifiedName); + + if (t.IsSimpleType()) + return; + + if (typeof(IEnumerable).IsAssignableFrom(t)) + { + if (t.IsArray) + typesToCreateForArrays[t] = typeof(List<>).MakeGenericType(t.GetElementType()); + + foreach (Type g in t.GetGenericArguments()) + InitType(g); + + //Handle dictionaries - initalize relevant KeyValuePair types. + foreach (Type interfaceType in t.GetInterfaces()) + { + Type[] arr = interfaceType.GetGenericArguments(); + if (arr.Length == 1) + if (typeof(IEnumerable<>).MakeGenericType(arr[0]).IsAssignableFrom(t)) + InitType(arr[0]); + } + + return; + } + + var isKeyValuePair = false; + + var args = t.GetGenericArguments(); + if (args.Length == 2) + { + isKeyValuePair = (typeof (KeyValuePair<,>).MakeGenericType(args) == t); + } + + if (args.Length == 1 && args[0].IsValueType) + { + if (typeof(Nullable<>).MakeGenericType(args) == t) + { + InitType(args[0]); + return; + } + } + + //already in the process of initializing this type (prevents infinite recursion). + if (typesBeingInitialized.Contains(t)) + return; + + typesBeingInitialized.Add(t); + + var props = GetAllPropertiesForType(t, isKeyValuePair); + typeToProperties[t] = props; + var fields = GetAllFieldsForType(t); + typeToFields[t] = fields; + + + foreach (var p in props) + { + logger.Debug("Handling property: " + p.Name); + + propertyInfoToLateBoundProperty[p] = DelegateFactory.Create(p); + + if (!isKeyValuePair) + propertyInfoToLateBoundPropertySet[p] = DelegateFactory.CreateSet(p); + + InitType(p.PropertyType); + } + + foreach (var f in fields) + { + logger.Debug("Handling field: " + f.Name); + + fieldInfoToLateBoundField[f] = DelegateFactory.Create(f); + + if (!isKeyValuePair) + fieldInfoToLateBoundFieldSet[f] = DelegateFactory.CreateSet(f); + + InitType(f.FieldType); + } + } + + /// + /// Gets a PropertyInfo for each property of the given type. + /// + /// + /// + /// + IEnumerable GetAllPropertiesForType(Type t, bool isKeyValuePair) + { + var result = new List(); + + foreach (var prop in t.GetProperties()) + { + if (typeof(IList) == prop.PropertyType) + throw new NotSupportedException("IList is not a supported property type for serialization, use List instead. Type: " + t.FullName + " Property: " + prop.Name); + + var args = prop.PropertyType.GetGenericArguments(); + + if (args.Length == 1) + if (typeof(IList<>).MakeGenericType(args) == prop.PropertyType) + throw new NotSupportedException("IList is not a supported property type for serialization, use List instead. Type: " + t.FullName + " Property: " + prop.Name); + + if (args.Length == 2) + if (typeof(IDictionary<,>).MakeGenericType(args) == prop.PropertyType) + throw new NotSupportedException("IDictionary is not a supported property type for serialization, use Dictionary instead. Type: " + t.FullName + " Property: " + prop.Name + ". Consider using a concrete Dictionary instead."); + + if (!prop.CanWrite && !isKeyValuePair) + continue; + if (prop.GetCustomAttributes(typeof(XmlIgnoreAttribute), false).Length > 0) + continue; + + result.Add(prop); + } + + if (t.IsInterface) + foreach (Type interfaceType in t.GetInterfaces()) + result.AddRange(GetAllPropertiesForType(interfaceType, false)); + + return result; + } + + /// + /// Gets a FieldInfo for each field in the given type. + /// + /// + /// + IEnumerable GetAllFieldsForType(Type t) + { + return t.GetFields(BindingFlags.FlattenHierarchy | BindingFlags.Instance | BindingFlags.Public); + } + + #region Deserialize + + /// + /// Deserializes the given stream to an array of messages which are returned. + /// + /// + /// + public IMessage[] Deserialize(Stream stream) + { + if (stream == null) + return null; + + prefixesToNamespaces = new Dictionary(); + messageBaseTypes = new List(); + var result = new List(); + + var doc = new XmlDocument(); + + doc.Load(XmlReader.Create(stream, new XmlReaderSettings {CheckCharacters = false})); + + if (doc.DocumentElement == null) + return result.ToArray(); + + foreach (XmlAttribute attr in doc.DocumentElement.Attributes) + { + if (attr.Name == "xmlns") + defaultNameSpace = attr.Value.Substring(attr.Value.LastIndexOf("/") + 1); + else + { + if (attr.Name.Contains("xmlns:")) + { + int colonIndex = attr.Name.LastIndexOf(":"); + string prefix = attr.Name.Substring(colonIndex + 1); + + if (prefix.Contains(BASETYPE)) + { + Type baseType = MessageMapper.GetMappedTypeFor(attr.Value); + if (baseType != null) + messageBaseTypes.Add(baseType); + } + else + prefixesToNamespaces[prefix] = attr.Value; + } + } + } + + if (doc.DocumentElement.Name.ToLower() != "messages") + { + object m = Process(doc.DocumentElement, null); + + if (m == null) + throw new SerializationException("Could not deserialize message."); + + result.Add(m as IMessage); + } + else + { + foreach (XmlNode node in doc.DocumentElement.ChildNodes) + { + object m = Process(node, null); + + result.Add(m as IMessage); + } + } + + defaultNameSpace = null; + + return result.ToArray(); + } + + private object Process(XmlNode node, object parent) + { + string name = node.Name; + string typeName = defaultNameSpace + "." + name; + + if (name.Contains(":")) + { + int colonIndex = node.Name.IndexOf(":"); + name = name.Substring(colonIndex + 1); + string prefix = node.Name.Substring(0, colonIndex); + string ns = prefixesToNamespaces[prefix]; + + typeName = ns.Substring(nameSpace.LastIndexOf("/") + 1) + "." + name; + } + + if (name.Contains("NServiceBus.")) + typeName = name; + + if (parent != null) + { + if (parent is IEnumerable) + { + if (parent.GetType().IsArray) + return GetObjectOfTypeFromNode(parent.GetType().GetElementType(), node); + + var args = parent.GetType().GetGenericArguments(); + if (args.Length == 1) + return GetObjectOfTypeFromNode(args[0], node); + } + + PropertyInfo prop = parent.GetType().GetProperty(name); + if (prop != null) + return GetObjectOfTypeFromNode(prop.PropertyType, node); + } + + Type t = MessageMapper.GetMappedTypeFor(typeName); + if (t == null) + { + logger.Debug("Could not load " + typeName + ". Trying base types..."); + foreach(Type baseType in messageBaseTypes) + try + { + logger.Debug("Trying to deserialize message to " + baseType.FullName); + return GetObjectOfTypeFromNode(baseType, node); + } +// ReSharper disable EmptyGeneralCatchClause + catch { } // intentionally swallow exception +// ReSharper restore EmptyGeneralCatchClause + + throw new TypeLoadException("Could not handle type '" + typeName + "'."); + } + + return GetObjectOfTypeFromNode(t, node); + } + + private object GetObjectOfTypeFromNode(Type t, XmlNode node) + { + if (t.IsSimpleType()) + return GetPropertyValue(t, node); + + if (typeof(IEnumerable).IsAssignableFrom(t)) + return GetPropertyValue(t, node); + + object result = MessageMapper.CreateInstance(t); + + foreach (XmlNode n in node.ChildNodes) + { + Type type = null; + if (n.Name.Contains(":")) + type = Type.GetType("System." + n.Name.Substring(0, n.Name.IndexOf(":")), false, true); + + var prop = GetProperty(t, n.Name); + if (prop != null) + { + var val = GetPropertyValue(type ?? prop.PropertyType, n); + if (val != null) + { + propertyInfoToLateBoundPropertySet[prop].Invoke(result, val); + continue; + } + } + + var field = GetField(t, n.Name); + if (field != null) + { + object val = GetPropertyValue(type ?? field.FieldType, n); + if (val != null) + { + fieldInfoToLateBoundFieldSet[field].Invoke(result, val); + continue; + } + } + } + + return result; + } + + private static PropertyInfo GetProperty(Type t, string name) + { + IEnumerable props; + typeToProperties.TryGetValue(t, out props); + + if (props == null) + return null; + + string n = GetNameAfterColon(name); + + foreach (PropertyInfo prop in props) + if (prop.Name == n) + return prop; + + return null; + } + + private static string GetNameAfterColon(string name) + { + var n = name; + if (name.Contains(":")) + n = name.Substring(name.IndexOf(":") + 1, name.Length - name.IndexOf(":") - 1); + + return n; + } + + private FieldInfo GetField(Type t, string name) + { + IEnumerable fields; + typeToFields.TryGetValue(t, out fields); + + if (fields == null) + return null; + + foreach (FieldInfo f in fields) + if (f.Name == name) + return f; + + return null; + } + + private object GetPropertyValue(Type type, XmlNode n) + { + if (n.ChildNodes.Count == 1 && n.ChildNodes[0] is XmlText) + { + var args = type.GetGenericArguments(); + if (args.Length == 1) + { + var nullableType = typeof (Nullable<>).MakeGenericType(args); + if (type == nullableType) + { + if (n.ChildNodes[0].InnerText.ToLower() == "null") + return null; + + return GetPropertyValue(args[0], n); + } + } + + if (type == typeof(string)) + return n.ChildNodes[0].InnerText; + + if (type.IsPrimitive || type == typeof(decimal)) + return Convert.ChangeType(n.ChildNodes[0].InnerText, type); + + if (type == typeof (Guid)) + return new Guid(n.ChildNodes[0].InnerText); + + if (type == typeof(DateTime)) + return XmlConvert.ToDateTime(n.ChildNodes[0].InnerText, XmlDateTimeSerializationMode.Utc); + + if (type == typeof(TimeSpan)) + return XmlConvert.ToTimeSpan(n.ChildNodes[0].InnerText); + + if (type == typeof(DateTimeOffset)) + return DateTimeOffset.Parse(n.ChildNodes[0].InnerText, null, DateTimeStyles.RoundtripKind); + + if (type.IsEnum) + return Enum.Parse(type, n.ChildNodes[0].InnerText); + + if (type == typeof(byte[])) + return Convert.FromBase64String(n.ChildNodes[0].InnerText); + } + + //Handle dictionaries + if (typeof(IDictionary).IsAssignableFrom(type)) + { + var result = Activator.CreateInstance(type) as IDictionary; + + var keyType = typeof (object); + var valueType = typeof (object); + + foreach(var interfaceType in type.GetInterfaces()) + { + var args = interfaceType.GetGenericArguments(); + if (args.Length == 2) + if (typeof(IDictionary<,>).MakeGenericType(args).IsAssignableFrom(type)) + { + keyType = args[0]; + valueType = args[1]; + break; + } + } + + foreach (XmlNode xn in n.ChildNodes) // go over KeyValuePairs + { + object key = null; + object value = null; + + foreach (XmlNode node in xn.ChildNodes) + { + if (node.Name == "Key") + key = GetObjectOfTypeFromNode(keyType, node); + if (node.Name == "Value") + value = GetObjectOfTypeFromNode(valueType, node); + } + + if (result != null && key != null) result[key] = value; + } + + return result; + } + + if (typeof(IEnumerable).IsAssignableFrom(type) && type != typeof(string)) + { + bool isArray = type.IsArray; + + Type typeToCreate = type; + if (isArray) + typeToCreate = typesToCreateForArrays[type]; + + if (typeof(IList).IsAssignableFrom(typeToCreate)) + { + var list = Activator.CreateInstance(typeToCreate) as IList; + if (list != null) + { + foreach (XmlNode xn in n.ChildNodes) + { + object m = Process(xn, list); + + list.Add(m); + } + + if (isArray) + return typeToCreate.GetMethod("ToArray").Invoke(list, null); + } + + return list; + } + } + + if (n.ChildNodes.Count == 0) + if (type == typeof(string)) + return string.Empty; + else + return null; + + + return GetObjectOfTypeFromNode(type, n); + } + + #endregion + + #region Serialize + + /// + /// Serializes the given messages to the given stream. + /// + /// + /// + public void Serialize(IMessage[] messages, Stream stream) + { + namespacesToPrefix = new Dictionary(); + namespacesToAdd = new List(); + + var namespaces = GetNamespaces(messages, MessageMapper); + for (int i = 0; i < namespaces.Count; i++) + { + string prefix = "q" + i; + if (i == 0) + prefix = ""; + + if (namespaces[i] != null) + namespacesToPrefix[namespaces[i]] = prefix; + } + + var messageBuilder = new StringBuilder(); + foreach (var m in messages) + { + var t = MessageMapper.GetMappedTypeFor(m.GetType()); + + WriteObject(t.Name, t, m, messageBuilder); + } + + var builder = new StringBuilder(); + + List baseTypes = GetBaseTypes(messages, MessageMapper); + + builder.AppendLine(""); + + builder.Append("\n"); + + builder.Append(messageBuilder.ToString()); + + builder.AppendLine(""); + + byte[] buffer = Encoding.UTF8.GetBytes(builder.ToString()); + stream.Write(buffer, 0, buffer.Length); + } + + private void Write(StringBuilder builder, Type t, object obj) + { + if (obj == null) + return; + + if (!typeToProperties.ContainsKey(t)) + throw new InvalidOperationException("Type " + t.FullName + " was not registered in the serializer. Check that it appears in the list of configured assemblies/types to scan."); + + foreach (PropertyInfo prop in typeToProperties[t]) + WriteEntry(prop.Name, prop.PropertyType, propertyInfoToLateBoundProperty[prop].Invoke(obj), builder); + + foreach(FieldInfo field in typeToFields[t]) + WriteEntry(field.Name, field.FieldType, fieldInfoToLateBoundField[field].Invoke(obj), builder); + } + + private void WriteObject(string name, Type type, object value, StringBuilder builder) + { + string element = name; + string prefix; + namespacesToPrefix.TryGetValue(type.Namespace, out prefix); + + if (string.IsNullOrEmpty(prefix) && type == typeof(object) && (value.GetType().IsSimpleType())) + { + if (!namespacesToAdd.Contains(value.GetType())) + namespacesToAdd.Add(value.GetType()); + + builder.AppendFormat("<{0}>{1}\n", + value.GetType().Name.ToLower() + ":" + name, + FormatAsString(value)); + + return; + } + + if (!string.IsNullOrEmpty(prefix)) + element = prefix + ":" + name; + + builder.AppendFormat("<{0}>\n", element); + + Write(builder, type, value); + + builder.AppendFormat("\n", element); + } + + private void WriteEntry(string name, Type type, object value, StringBuilder builder) + { + if (value == null) + { + if (typeof(IEnumerable).IsAssignableFrom(type)) + return; + + var args = type.GetGenericArguments(); + if (args.Length == 1) + { + var nullableType = typeof (Nullable<>).MakeGenericType(args); + if (type == nullableType) + { + WriteEntry(name, typeof(string), "null", builder); + return; + } + } + + return; + } + + if (type.IsValueType || type == typeof(string)) + { + builder.AppendFormat("<{0}>{1}\n", name, FormatAsString(value)); + return; + } + + if (typeof(IEnumerable).IsAssignableFrom(type)) + { + builder.AppendFormat("<{0}>\n", name); + + if (type == typeof(byte[])) + { + var str = Convert.ToBase64String((byte[])value); + builder.Append(str); + } + else + { + Type baseType = typeof(object); + + //Get generic type from list: T for List, KeyValuePair for IDictionary + foreach(Type interfaceType in type.GetInterfaces()) + { + Type[] arr = interfaceType.GetGenericArguments(); + if (arr.Length == 1) + if (typeof(IEnumerable<>).MakeGenericType(arr[0]).IsAssignableFrom(type)) + { + baseType = arr[0]; + break; + } + } + + + foreach (object obj in ((IEnumerable)value)) + if (obj.GetType().IsSimpleType()) + WriteEntry(obj.GetType().Name, obj.GetType(), obj, builder); + else + WriteObject(baseType.SerializationFriendlyName(), baseType, obj, builder); + + } + + builder.AppendFormat("\n", name); + return; + } + + WriteObject(name, type, value, builder); + } + + private static string FormatAsString(object value) + { + if (value == null) + return string.Empty; + if (value is bool) + return value.ToString().ToLower(); + if (value is string) + return System.Security.SecurityElement.Escape(value as string); + if (value is DateTime) + return ((DateTime)value).ToString("yyyy-MM-ddTHH:mm:ss.fffffff", CultureInfo.InvariantCulture); + if (value is TimeSpan) + { + TimeSpan ts = (TimeSpan) value; + return string.Format("{0}P0Y0M{1}DT{2}H{3}M{4}.{5:000}S", (ts.TotalSeconds < 0 ? "-" : ""), Math.Abs(ts.Days), Math.Abs(ts.Hours), Math.Abs(ts.Minutes), Math.Abs(ts.Seconds), Math.Abs(ts.Milliseconds)); + } + if (value is DateTimeOffset) + return ((DateTimeOffset)value).ToString("o", CultureInfo.InvariantCulture); + if (value is Guid) + return ((Guid) value).ToString(); + + return value.ToString(); + } + + private static List GetNamespaces(IMessage[] messages, IMessageMapper mapper) + { + var result = new List(); + + foreach (IMessage m in messages) + { + string ns = mapper.GetMappedTypeFor(m.GetType()).Namespace; + if (!result.Contains(ns)) + result.Add(ns); + } + + return result; + } + + private static List GetBaseTypes(IMessage[] messages, IMessageMapper mapper) + { + var result = new List(); + + foreach (IMessage m in messages) + { + Type t = mapper.GetMappedTypeFor(m.GetType()); + + Type baseType = t.BaseType; + while (baseType != typeof(object) && baseType != null) + { + if (typeof(IMessage).IsAssignableFrom(baseType)) + if (!result.Contains(baseType.FullName)) + result.Add(baseType.FullName); + + baseType = baseType.BaseType; + } + + foreach (Type i in t.GetInterfaces()) + if (i != typeof(IMessage) && typeof(IMessage).IsAssignableFrom(i)) + if (!result.Contains(i.FullName)) + result.Add(i.FullName); + } + + return result; + } + + #endregion + + #region members + + private const string XMLPREFIX = "d1p1"; + private const string XMLTYPE = XMLPREFIX + ":type"; + private const string BASETYPE = "baseType"; + + private static readonly Dictionary> typeToProperties = new Dictionary>(); + private static readonly Dictionary> typeToFields = new Dictionary>(); + private static readonly Dictionary typesToCreateForArrays = new Dictionary(); + private static readonly List typesBeingInitialized = new List(); + + private static readonly Dictionary propertyInfoToLateBoundProperty = new Dictionary(); + private static readonly Dictionary fieldInfoToLateBoundField = new Dictionary(); + private static readonly Dictionary propertyInfoToLateBoundPropertySet = new Dictionary(); + private static readonly Dictionary fieldInfoToLateBoundFieldSet = new Dictionary(); + + [ThreadStatic] + private static string defaultNameSpace; + + /// + /// Used for serialization + /// + [ThreadStatic] + private static IDictionary namespacesToPrefix; + + /// + /// Used for deserialization + /// + [ThreadStatic] + private static IDictionary prefixesToNamespaces; + + [ThreadStatic] + private static List messageBaseTypes; + + [ThreadStatic] + private static List namespacesToAdd; + + private static readonly ILog logger = LogManager.GetLogger("NServiceBus.Serializers.XML"); + + #endregion + } +} diff --git a/src/impl/Serializers/NServiceBus.Serializers.XML/NServiceBus.Serializers.XML.csproj b/src/impl/Serializers/NServiceBus.Serializers.XML/NServiceBus.Serializers.XML.csproj index 0aae4113217..323e172f03e 100644 --- a/src/impl/Serializers/NServiceBus.Serializers.XML/NServiceBus.Serializers.XML.csproj +++ b/src/impl/Serializers/NServiceBus.Serializers.XML/NServiceBus.Serializers.XML.csproj @@ -1,118 +1,118 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {4D9A660B-C2AF-42A8-AEB4-E2F97ED1CB3C} - Library - Properties - NServiceBus.Serializers.XML - NServiceBus.Serializers.XML - - - - - - v4.0 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.Serializers.XML.XML - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.Serializers.XML.XML - AllRules.ruleset - - - - False - ..\..\..\..\lib\Common.Logging.dll - False - - - False - ..\..\..\..\build\output\NServiceBus.dll - False - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.MessageInterfaces.dll - False - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.Utils.Reflection.dll - False - - - - 3.5 - - - - - - CommonAssemblyInfo.cs - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {4D9A660B-C2AF-42A8-AEB4-E2F97ED1CB3C} + Library + Properties + NServiceBus.Serializers.XML + NServiceBus.Serializers.XML + + + + + + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.Serializers.XML.XML + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.Serializers.XML.XML + AllRules.ruleset + + + + False + ..\..\..\..\lib\Common.Logging.dll + False + + + False + ..\..\..\..\build\output\NServiceBus.dll + False + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.MessageInterfaces.dll + False + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.Utils.Reflection.dll + False + + + + 3.5 + + + + + + CommonAssemblyInfo.cs + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\" + \ No newline at end of file diff --git a/src/impl/Serializers/NServiceBus.Serializers.XML/Properties/AssemblyInfo.cs b/src/impl/Serializers/NServiceBus.Serializers.XML/Properties/AssemblyInfo.cs index 86a7ee74c8e..b0d571f2915 100644 --- a/src/impl/Serializers/NServiceBus.Serializers.XML/Properties/AssemblyInfo.cs +++ b/src/impl/Serializers/NServiceBus.Serializers.XML/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Interfaces to XML Serialization Implementation")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Interfaces to XML Serialization Implementation")] [assembly: AssemblyDescription("XML implementation for serialization capabilities of nServiceBus for interface only messages.")] \ No newline at end of file diff --git a/src/impl/Serializers/ProfilingTest/ProfilingTest.csproj b/src/impl/Serializers/ProfilingTest/ProfilingTest.csproj index 3c00292f43c..fd3cfe384f4 100644 --- a/src/impl/Serializers/ProfilingTest/ProfilingTest.csproj +++ b/src/impl/Serializers/ProfilingTest/ProfilingTest.csproj @@ -1,97 +1,97 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {CB32FA40-2A8A-4D40-81A2-C3EF1203A81D} - Exe - Properties - ProfilingTest - ProfilingTest - - - - - - v4.0 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - - 3.5 - - - - - - - - - - - {45CC79AE-C0DE-486C-953B-7697C6E09E94} - NServiceBus.Serializers.XML.Test - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {CB32FA40-2A8A-4D40-81A2-C3EF1203A81D} + Exe + Properties + ProfilingTest + ProfilingTest + + + + + + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + + 3.5 + + + + + + + + + + + {45CC79AE-C0DE-486C-953B-7697C6E09E94} + NServiceBus.Serializers.XML.Test + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + \ No newline at end of file diff --git a/src/impl/Serializers/ProfilingTest/Program.cs b/src/impl/Serializers/ProfilingTest/Program.cs index 4184c6f2e02..d35534aed4e 100644 --- a/src/impl/Serializers/ProfilingTest/Program.cs +++ b/src/impl/Serializers/ProfilingTest/Program.cs @@ -1,18 +1,18 @@ -using System; -using System.Collections.Generic; -using System.Text; -using NServiceBus.Serializers.XML.Test; - -namespace ProfilingTest -{ - class Program - { - static void Main(string[] args) - { - SerializerTests tester = new SerializerTests(); - tester.TestInterfaces(); - - Console.ReadLine(); - } - } -} +using System; +using System.Collections.Generic; +using System.Text; +using NServiceBus.Serializers.XML.Test; + +namespace ProfilingTest +{ + class Program + { + static void Main(string[] args) + { + SerializerTests tester = new SerializerTests(); + tester.TestInterfaces(); + + Console.ReadLine(); + } + } +} diff --git a/src/impl/Serializers/ProfilingTest/Properties/AssemblyInfo.cs b/src/impl/Serializers/ProfilingTest/Properties/AssemblyInfo.cs index c9aaa34fc39..b87fc7913f8 100644 --- a/src/impl/Serializers/ProfilingTest/Properties/AssemblyInfo.cs +++ b/src/impl/Serializers/ProfilingTest/Properties/AssemblyInfo.cs @@ -1,33 +1,33 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("ProfilingTest")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("ProfilingTest")] -[assembly: AssemblyCopyright("Copyright © 2008")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("323947bb-ecf2-41fd-be92-e6e24307397b")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ProfilingTest")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ProfilingTest")] +[assembly: AssemblyCopyright("Copyright © 2008")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("323947bb-ecf2-41fd-be92-e6e24307397b")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/impl/Serializers/Serializers.sln b/src/impl/Serializers/Serializers.sln index af830ba6655..0db145f0380 100644 --- a/src/impl/Serializers/Serializers.sln +++ b/src/impl/Serializers/Serializers.sln @@ -1,50 +1,50 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Serializers.Binary", "NServiceBus.Serializers.Binary\NServiceBus.Serializers.Binary.csproj", "{4AB4015A-2DBF-44F9-9119-0E095703EC2D}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Serializers.XML", "NServiceBus.Serializers.XML\NServiceBus.Serializers.XML.csproj", "{4D9A660B-C2AF-42A8-AEB4-E2F97ED1CB3C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Serializers.XML.Test", "NServiceBus.Serializers.XML.Test\NServiceBus.Serializers.XML.Test.csproj", "{45CC79AE-C0DE-486C-953B-7697C6E09E94}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Serializers.XML.XsdGenerator", "NServiceBus.Serializers.XML.XsdGenerator\NServiceBus.Serializers.XML.XsdGenerator.csproj", "{85118B5C-6CAA-44B4-87EA-419DC6F4F2FB}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Serializers.XML.Config", "NServiceBus.Serializers.XML.Config\NServiceBus.Serializers.XML.Config.csproj", "{17629A13-3ED4-4E88-B70C-DFFCBAE96A6A}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Serializers.Binary.Config", "NServiceBus.Serializers.Binary.Config\NServiceBus.Serializers.Binary.Config.csproj", "{D33E56FB-CD9E-4B1D-A0F1-1B272F154DC1}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {4AB4015A-2DBF-44F9-9119-0E095703EC2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4AB4015A-2DBF-44F9-9119-0E095703EC2D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4AB4015A-2DBF-44F9-9119-0E095703EC2D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4AB4015A-2DBF-44F9-9119-0E095703EC2D}.Release|Any CPU.Build.0 = Release|Any CPU - {4D9A660B-C2AF-42A8-AEB4-E2F97ED1CB3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4D9A660B-C2AF-42A8-AEB4-E2F97ED1CB3C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4D9A660B-C2AF-42A8-AEB4-E2F97ED1CB3C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4D9A660B-C2AF-42A8-AEB4-E2F97ED1CB3C}.Release|Any CPU.Build.0 = Release|Any CPU - {45CC79AE-C0DE-486C-953B-7697C6E09E94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {45CC79AE-C0DE-486C-953B-7697C6E09E94}.Debug|Any CPU.Build.0 = Debug|Any CPU - {45CC79AE-C0DE-486C-953B-7697C6E09E94}.Release|Any CPU.ActiveCfg = Release|Any CPU - {45CC79AE-C0DE-486C-953B-7697C6E09E94}.Release|Any CPU.Build.0 = Release|Any CPU - {85118B5C-6CAA-44B4-87EA-419DC6F4F2FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {85118B5C-6CAA-44B4-87EA-419DC6F4F2FB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {85118B5C-6CAA-44B4-87EA-419DC6F4F2FB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {85118B5C-6CAA-44B4-87EA-419DC6F4F2FB}.Release|Any CPU.Build.0 = Release|Any CPU - {17629A13-3ED4-4E88-B70C-DFFCBAE96A6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {17629A13-3ED4-4E88-B70C-DFFCBAE96A6A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {17629A13-3ED4-4E88-B70C-DFFCBAE96A6A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {17629A13-3ED4-4E88-B70C-DFFCBAE96A6A}.Release|Any CPU.Build.0 = Release|Any CPU - {D33E56FB-CD9E-4B1D-A0F1-1B272F154DC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D33E56FB-CD9E-4B1D-A0F1-1B272F154DC1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D33E56FB-CD9E-4B1D-A0F1-1B272F154DC1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D33E56FB-CD9E-4B1D-A0F1-1B272F154DC1}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Serializers.Binary", "NServiceBus.Serializers.Binary\NServiceBus.Serializers.Binary.csproj", "{4AB4015A-2DBF-44F9-9119-0E095703EC2D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Serializers.XML", "NServiceBus.Serializers.XML\NServiceBus.Serializers.XML.csproj", "{4D9A660B-C2AF-42A8-AEB4-E2F97ED1CB3C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Serializers.XML.Test", "NServiceBus.Serializers.XML.Test\NServiceBus.Serializers.XML.Test.csproj", "{45CC79AE-C0DE-486C-953B-7697C6E09E94}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Serializers.XML.XsdGenerator", "NServiceBus.Serializers.XML.XsdGenerator\NServiceBus.Serializers.XML.XsdGenerator.csproj", "{85118B5C-6CAA-44B4-87EA-419DC6F4F2FB}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Serializers.XML.Config", "NServiceBus.Serializers.XML.Config\NServiceBus.Serializers.XML.Config.csproj", "{17629A13-3ED4-4E88-B70C-DFFCBAE96A6A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Serializers.Binary.Config", "NServiceBus.Serializers.Binary.Config\NServiceBus.Serializers.Binary.Config.csproj", "{D33E56FB-CD9E-4B1D-A0F1-1B272F154DC1}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4AB4015A-2DBF-44F9-9119-0E095703EC2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4AB4015A-2DBF-44F9-9119-0E095703EC2D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4AB4015A-2DBF-44F9-9119-0E095703EC2D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4AB4015A-2DBF-44F9-9119-0E095703EC2D}.Release|Any CPU.Build.0 = Release|Any CPU + {4D9A660B-C2AF-42A8-AEB4-E2F97ED1CB3C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4D9A660B-C2AF-42A8-AEB4-E2F97ED1CB3C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4D9A660B-C2AF-42A8-AEB4-E2F97ED1CB3C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4D9A660B-C2AF-42A8-AEB4-E2F97ED1CB3C}.Release|Any CPU.Build.0 = Release|Any CPU + {45CC79AE-C0DE-486C-953B-7697C6E09E94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {45CC79AE-C0DE-486C-953B-7697C6E09E94}.Debug|Any CPU.Build.0 = Debug|Any CPU + {45CC79AE-C0DE-486C-953B-7697C6E09E94}.Release|Any CPU.ActiveCfg = Release|Any CPU + {45CC79AE-C0DE-486C-953B-7697C6E09E94}.Release|Any CPU.Build.0 = Release|Any CPU + {85118B5C-6CAA-44B4-87EA-419DC6F4F2FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85118B5C-6CAA-44B4-87EA-419DC6F4F2FB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85118B5C-6CAA-44B4-87EA-419DC6F4F2FB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85118B5C-6CAA-44B4-87EA-419DC6F4F2FB}.Release|Any CPU.Build.0 = Release|Any CPU + {17629A13-3ED4-4E88-B70C-DFFCBAE96A6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {17629A13-3ED4-4E88-B70C-DFFCBAE96A6A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {17629A13-3ED4-4E88-B70C-DFFCBAE96A6A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {17629A13-3ED4-4E88-B70C-DFFCBAE96A6A}.Release|Any CPU.Build.0 = Release|Any CPU + {D33E56FB-CD9E-4B1D-A0F1-1B272F154DC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D33E56FB-CD9E-4B1D-A0F1-1B272F154DC1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D33E56FB-CD9E-4B1D-A0F1-1B272F154DC1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D33E56FB-CD9E-4B1D-A0F1-1B272F154DC1}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/impl/encryption/NServiceBus.Encryption.Rijndael.Config/ConfigureRijndaelEncryptionService.cs b/src/impl/encryption/NServiceBus.Encryption.Rijndael.Config/ConfigureRijndaelEncryptionService.cs index b4ca2130506..2b90668d62d 100644 --- a/src/impl/encryption/NServiceBus.Encryption.Rijndael.Config/ConfigureRijndaelEncryptionService.cs +++ b/src/impl/encryption/NServiceBus.Encryption.Rijndael.Config/ConfigureRijndaelEncryptionService.cs @@ -1,36 +1,36 @@ -using System.Text; -using Common.Logging; -using NServiceBus.Config; -using NServiceBus.Encryption.Rijndael; -using NServiceBus.ObjectBuilder; - -namespace NServiceBus -{ - /// - /// Contains extension methods to NServiceBus.Configure. - /// - public static class ConfigureRijndaelEncryptionService - { - /// - /// Use 256 bit AES encryption based on the Rijndael cipher. - /// - /// - /// - public static Configure RijndaelEncryptionService(this Configure config) - { - var section = Configure.GetConfigSection(); - - if (section == null) - Logger.Warn("Could not find configuration section for Rijndael Encryption Service."); - - var encryptConfig = config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); - - if (section != null) - encryptConfig.ConfigureProperty(s => s.Key, Encoding.ASCII.GetBytes(section.Key)); - - return config; - } - - private static readonly ILog Logger = LogManager.GetLogger(typeof(RijndaelEncryptionServiceConfig)); - } -} +using System.Text; +using Common.Logging; +using NServiceBus.Config; +using NServiceBus.Encryption.Rijndael; +using NServiceBus.ObjectBuilder; + +namespace NServiceBus +{ + /// + /// Contains extension methods to NServiceBus.Configure. + /// + public static class ConfigureRijndaelEncryptionService + { + /// + /// Use 256 bit AES encryption based on the Rijndael cipher. + /// + /// + /// + public static Configure RijndaelEncryptionService(this Configure config) + { + var section = Configure.GetConfigSection(); + + if (section == null) + Logger.Warn("Could not find configuration section for Rijndael Encryption Service."); + + var encryptConfig = config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); + + if (section != null) + encryptConfig.ConfigureProperty(s => s.Key, Encoding.ASCII.GetBytes(section.Key)); + + return config; + } + + private static readonly ILog Logger = LogManager.GetLogger(typeof(RijndaelEncryptionServiceConfig)); + } +} diff --git a/src/impl/encryption/NServiceBus.Encryption.Rijndael.Config/NServiceBus.Encryption.Rijndael.Config.csproj b/src/impl/encryption/NServiceBus.Encryption.Rijndael.Config/NServiceBus.Encryption.Rijndael.Config.csproj index a9837d56401..d7ef024cd80 100644 --- a/src/impl/encryption/NServiceBus.Encryption.Rijndael.Config/NServiceBus.Encryption.Rijndael.Config.csproj +++ b/src/impl/encryption/NServiceBus.Encryption.Rijndael.Config/NServiceBus.Encryption.Rijndael.Config.csproj @@ -1,80 +1,80 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {C1B44A57-9231-49A7-8217-739514788A98} - Library - Properties - NServiceBus.Encryption.Rijndael.Config - NServiceBus.Encryption.Rijndael.Config - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\..\lib\Common.Logging.dll - False - - - ..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll - - - ..\..\..\..\build\nservicebus.core\NServiceBus.Encryption.dll - - - ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll - - - - - 3.5 - - - - - CommonAssemblyInfo.cs - - - - - - - - {BBA5F232-FD46-4A6D-AC16-02FA80BCBD92} - NServiceBus.Encryption.Rijndael - False - - - - - - xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {C1B44A57-9231-49A7-8217-739514788A98} + Library + Properties + NServiceBus.Encryption.Rijndael.Config + NServiceBus.Encryption.Rijndael.Config + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\..\lib\Common.Logging.dll + False + + + ..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll + + + ..\..\..\..\build\nservicebus.core\NServiceBus.Encryption.dll + + + ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll + + + + + 3.5 + + + + + CommonAssemblyInfo.cs + + + + + + + + {BBA5F232-FD46-4A6D-AC16-02FA80BCBD92} + NServiceBus.Encryption.Rijndael + False + + + + + + xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\" + \ No newline at end of file diff --git a/src/impl/encryption/NServiceBus.Encryption.Rijndael.Config/Properties/AssemblyInfo.cs b/src/impl/encryption/NServiceBus.Encryption.Rijndael.Config/Properties/AssemblyInfo.cs index 85105ada1db..b8f61afb286 100644 --- a/src/impl/encryption/NServiceBus.Encryption.Rijndael.Config/Properties/AssemblyInfo.cs +++ b/src/impl/encryption/NServiceBus.Encryption.Rijndael.Config/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Rijndael Encryption Configuration")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Rijndael Encryption Configuration")] [assembly: AssemblyDescription("Configuration extension of NServiceBus Rijndael encryption implementation.")] \ No newline at end of file diff --git a/src/impl/encryption/NServiceBus.Encryption.Rijndael.Config/RijndaelEncryptionServiceConfig.cs b/src/impl/encryption/NServiceBus.Encryption.Rijndael.Config/RijndaelEncryptionServiceConfig.cs index de996190a41..9f74c530cb7 100644 --- a/src/impl/encryption/NServiceBus.Encryption.Rijndael.Config/RijndaelEncryptionServiceConfig.cs +++ b/src/impl/encryption/NServiceBus.Encryption.Rijndael.Config/RijndaelEncryptionServiceConfig.cs @@ -1,23 +1,23 @@ -using System.Configuration; - -namespace NServiceBus.Config -{ - public class RijndaelEncryptionServiceConfig : ConfigurationSection - { - /// - /// The encryption key. - /// - [ConfigurationProperty("Key", IsRequired = true)] - public string Key - { - get - { - return this["Key"] as string; - } - set - { - this["Key"] = value; - } - } - } -} +using System.Configuration; + +namespace NServiceBus.Config +{ + public class RijndaelEncryptionServiceConfig : ConfigurationSection + { + /// + /// The encryption key. + /// + [ConfigurationProperty("Key", IsRequired = true)] + public string Key + { + get + { + return this["Key"] as string; + } + set + { + this["Key"] = value; + } + } + } +} diff --git a/src/impl/encryption/NServiceBus.Encryption.Rijndael/EncryptionService.cs b/src/impl/encryption/NServiceBus.Encryption.Rijndael/EncryptionService.cs index ff3c4978e15..168bd1aa9e1 100644 --- a/src/impl/encryption/NServiceBus.Encryption.Rijndael/EncryptionService.cs +++ b/src/impl/encryption/NServiceBus.Encryption.Rijndael/EncryptionService.cs @@ -1,76 +1,76 @@ -using System; -using System.IO; -using System.Security.Cryptography; -using Common.Logging; - -namespace NServiceBus.Encryption.Rijndael -{ - /// - /// Implementation of the encryption capability using Rijndael. - /// Copied from https://rhino-tools.svn.sourceforge.net/svnroot/rhino-tools/trunk/esb/Rhino.ServiceBus/Impl/RijndaelEncryptionService.cs - /// allowable under the Apache 2.0 license. - /// - public class EncryptionService : IEncryptionService - { - /// - /// Symmetric key used for encryption. - /// - public byte[] Key { get; set; } - - string IEncryptionService.Decrypt(EncryptedValue encryptedValue) - { - if (Key == null) - { - Logger.Warn("Cannot decrypt because a Key was not configured. Please specify 'RijndaelEncryptionServiceConfig' in your application's configuration file."); - return encryptedValue.EncryptedBase64Value; - } - - var encrypted = Convert.FromBase64String(encryptedValue.EncryptedBase64Value); - using (var rijndael = new RijndaelManaged()) - { - rijndael.Key = Key; - rijndael.IV = Convert.FromBase64String(encryptedValue.Base64Iv); - rijndael.Mode = CipherMode.CBC; - - using (var decryptor = rijndael.CreateDecryptor()) - using (var memoryStream = new MemoryStream(encrypted)) - using (var cryptoStream = new CryptoStream(memoryStream, decryptor, CryptoStreamMode.Read)) - using (var reader = new StreamReader(cryptoStream)) - { - return reader.ReadToEnd(); - } - } - } - - EncryptedValue IEncryptionService.Encrypt(string value) - { - if (Key == null) - throw new InvalidOperationException("Cannot encrypt because a Key was not configured. Please specify 'RijndaelEncryptionServiceConfig' in your application's configuration file."); - - using (var rijndael = new RijndaelManaged()) - { - rijndael.Key = Key; - rijndael.Mode = CipherMode.CBC; - rijndael.GenerateIV(); - - using (var encryptor = rijndael.CreateEncryptor()) - using (var memoryStream = new MemoryStream()) - using (var cryptoStream = new CryptoStream(memoryStream, encryptor, CryptoStreamMode.Write)) - using (var writer = new StreamWriter(cryptoStream)) - { - writer.Write(value); - writer.Flush(); - cryptoStream.Flush(); - cryptoStream.FlushFinalBlock(); - return new EncryptedValue - { - EncryptedBase64Value = Convert.ToBase64String(memoryStream.ToArray()), - Base64Iv = Convert.ToBase64String(rijndael.IV) - }; - } - } - } - - private static readonly ILog Logger = LogManager.GetLogger(typeof (EncryptionService)); - } -} +using System; +using System.IO; +using System.Security.Cryptography; +using Common.Logging; + +namespace NServiceBus.Encryption.Rijndael +{ + /// + /// Implementation of the encryption capability using Rijndael. + /// Copied from https://rhino-tools.svn.sourceforge.net/svnroot/rhino-tools/trunk/esb/Rhino.ServiceBus/Impl/RijndaelEncryptionService.cs + /// allowable under the Apache 2.0 license. + /// + public class EncryptionService : IEncryptionService + { + /// + /// Symmetric key used for encryption. + /// + public byte[] Key { get; set; } + + string IEncryptionService.Decrypt(EncryptedValue encryptedValue) + { + if (Key == null) + { + Logger.Warn("Cannot decrypt because a Key was not configured. Please specify 'RijndaelEncryptionServiceConfig' in your application's configuration file."); + return encryptedValue.EncryptedBase64Value; + } + + var encrypted = Convert.FromBase64String(encryptedValue.EncryptedBase64Value); + using (var rijndael = new RijndaelManaged()) + { + rijndael.Key = Key; + rijndael.IV = Convert.FromBase64String(encryptedValue.Base64Iv); + rijndael.Mode = CipherMode.CBC; + + using (var decryptor = rijndael.CreateDecryptor()) + using (var memoryStream = new MemoryStream(encrypted)) + using (var cryptoStream = new CryptoStream(memoryStream, decryptor, CryptoStreamMode.Read)) + using (var reader = new StreamReader(cryptoStream)) + { + return reader.ReadToEnd(); + } + } + } + + EncryptedValue IEncryptionService.Encrypt(string value) + { + if (Key == null) + throw new InvalidOperationException("Cannot encrypt because a Key was not configured. Please specify 'RijndaelEncryptionServiceConfig' in your application's configuration file."); + + using (var rijndael = new RijndaelManaged()) + { + rijndael.Key = Key; + rijndael.Mode = CipherMode.CBC; + rijndael.GenerateIV(); + + using (var encryptor = rijndael.CreateEncryptor()) + using (var memoryStream = new MemoryStream()) + using (var cryptoStream = new CryptoStream(memoryStream, encryptor, CryptoStreamMode.Write)) + using (var writer = new StreamWriter(cryptoStream)) + { + writer.Write(value); + writer.Flush(); + cryptoStream.Flush(); + cryptoStream.FlushFinalBlock(); + return new EncryptedValue + { + EncryptedBase64Value = Convert.ToBase64String(memoryStream.ToArray()), + Base64Iv = Convert.ToBase64String(rijndael.IV) + }; + } + } + } + + private static readonly ILog Logger = LogManager.GetLogger(typeof (EncryptionService)); + } +} diff --git a/src/impl/encryption/NServiceBus.Encryption.Rijndael/NServiceBus.Encryption.Rijndael.csproj b/src/impl/encryption/NServiceBus.Encryption.Rijndael/NServiceBus.Encryption.Rijndael.csproj index d35894f2c83..645de52b585 100644 --- a/src/impl/encryption/NServiceBus.Encryption.Rijndael/NServiceBus.Encryption.Rijndael.csproj +++ b/src/impl/encryption/NServiceBus.Encryption.Rijndael/NServiceBus.Encryption.Rijndael.csproj @@ -1,68 +1,68 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {BBA5F232-FD46-4A6D-AC16-02FA80BCBD92} - Library - Properties - NServiceBus.Encryption.Rijndael - NServiceBus.Encryption.Rijndael - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\..\lib\Common.Logging.dll - False - - - ..\..\..\..\build\output\NServiceBus.dll - - - ..\..\..\..\build\nservicebus.core\NServiceBus.Encryption.dll - - - - 3.5 - - - - - CommonAssemblyInfo.cs - - - - - - - - xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {BBA5F232-FD46-4A6D-AC16-02FA80BCBD92} + Library + Properties + NServiceBus.Encryption.Rijndael + NServiceBus.Encryption.Rijndael + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\..\lib\Common.Logging.dll + False + + + ..\..\..\..\build\output\NServiceBus.dll + + + ..\..\..\..\build\nservicebus.core\NServiceBus.Encryption.dll + + + + 3.5 + + + + + CommonAssemblyInfo.cs + + + + + + + + xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\" + \ No newline at end of file diff --git a/src/impl/encryption/NServiceBus.Encryption.Rijndael/Properties/AssemblyInfo.cs b/src/impl/encryption/NServiceBus.Encryption.Rijndael/Properties/AssemblyInfo.cs index 7e5c0d20f3a..7a8796ff319 100644 --- a/src/impl/encryption/NServiceBus.Encryption.Rijndael/Properties/AssemblyInfo.cs +++ b/src/impl/encryption/NServiceBus.Encryption.Rijndael/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Rijndael Encryption Implementation")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Rijndael Encryption Implementation")] [assembly: AssemblyDescription("Implementation of NServiceBus encryption abstraction using Rijndael.")] \ No newline at end of file diff --git a/src/impl/encryption/encryption.sln b/src/impl/encryption/encryption.sln index 37caea9586f..f0ab64f8bd9 100644 --- a/src/impl/encryption/encryption.sln +++ b/src/impl/encryption/encryption.sln @@ -1,26 +1,26 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Encryption.Rijndael", "NServiceBus.Encryption.Rijndael\NServiceBus.Encryption.Rijndael.csproj", "{BBA5F232-FD46-4A6D-AC16-02FA80BCBD92}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Encryption.Rijndael.Config", "NServiceBus.Encryption.Rijndael.Config\NServiceBus.Encryption.Rijndael.Config.csproj", "{C1B44A57-9231-49A7-8217-739514788A98}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {BBA5F232-FD46-4A6D-AC16-02FA80BCBD92}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BBA5F232-FD46-4A6D-AC16-02FA80BCBD92}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BBA5F232-FD46-4A6D-AC16-02FA80BCBD92}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BBA5F232-FD46-4A6D-AC16-02FA80BCBD92}.Release|Any CPU.Build.0 = Release|Any CPU - {C1B44A57-9231-49A7-8217-739514788A98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C1B44A57-9231-49A7-8217-739514788A98}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C1B44A57-9231-49A7-8217-739514788A98}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C1B44A57-9231-49A7-8217-739514788A98}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Encryption.Rijndael", "NServiceBus.Encryption.Rijndael\NServiceBus.Encryption.Rijndael.csproj", "{BBA5F232-FD46-4A6D-AC16-02FA80BCBD92}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Encryption.Rijndael.Config", "NServiceBus.Encryption.Rijndael.Config\NServiceBus.Encryption.Rijndael.Config.csproj", "{C1B44A57-9231-49A7-8217-739514788A98}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {BBA5F232-FD46-4A6D-AC16-02FA80BCBD92}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BBA5F232-FD46-4A6D-AC16-02FA80BCBD92}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BBA5F232-FD46-4A6D-AC16-02FA80BCBD92}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BBA5F232-FD46-4A6D-AC16-02FA80BCBD92}.Release|Any CPU.Build.0 = Release|Any CPU + {C1B44A57-9231-49A7-8217-739514788A98}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C1B44A57-9231-49A7-8217-739514788A98}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C1B44A57-9231-49A7-8217-739514788A98}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C1B44A57-9231-49A7-8217-739514788A98}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/impl/faults/NServiceBus.Faults.Forwarder.Config/ConfigureFaultsForwarder.cs b/src/impl/faults/NServiceBus.Faults.Forwarder.Config/ConfigureFaultsForwarder.cs index e9aef2cfa88..b204e577739 100644 --- a/src/impl/faults/NServiceBus.Faults.Forwarder.Config/ConfigureFaultsForwarder.cs +++ b/src/impl/faults/NServiceBus.Faults.Forwarder.Config/ConfigureFaultsForwarder.cs @@ -1,64 +1,64 @@ -using System; -using System.Configuration; -using NServiceBus.Config; -using NServiceBus.Faults; -using NServiceBus.Faults.Forwarder; -using NServiceBus.ObjectBuilder; -using Common.Logging; -using NServiceBus.Utils; - -namespace NServiceBus -{ - /// - /// Contains extension methods to NServiceBus.Configure - /// - public static class ConfigureFaultsForwarder - { - /// - /// Forward messages that have repeatedly failed to another endpoint. - /// - /// - /// - public static Configure MessageForwardingInCaseOfFault(this Configure config) - { - string errorQueue; - - var section = Configure.GetConfigSection(); - if (section == null) - { - Logger.Warn("Could not find configuration section 'MessageForwardingInCaseOfFaultConfig'. Going to try to find the error queue defined in 'MsmqTransportConfig'."); - - var msmq = Configure.GetConfigSection(); - if (msmq == null) - throw new ConfigurationErrorsException("Could not find backup configuration section 'MsmqTransportConfig' in order to locate the error queue."); - - - errorQueue = msmq.ErrorQueue; - } - else - errorQueue = section.ErrorQueue; - - if(string.IsNullOrEmpty(errorQueue)) - throw new ConfigurationErrorsException("Faults forwarding requires a error queue to be specified. Please add a 'MessageForwardingInCaseOfFaultConfig' section to your app.config"); - - //TODO: this should probably be moved to a new IManageFaults.Start|Init method instead. Check with Udi - MsmqUtilities.CreateQueueIfNecessary(errorQueue); - - config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singlecall) - .ConfigureProperty(fm => fm.ErrorQueue, errorQueue); - - return config; - } - - private static ILog Logger = LogManager.GetLogger("MessageForwardingInCaseOfFault"); - } - - class Bootstrapper : INeedInitialization - { - public void Init() - { - if (!Configure.Instance.Configurer.HasComponent()) - Configure.Instance.MessageForwardingInCaseOfFault(); - } - } -} +using System; +using System.Configuration; +using NServiceBus.Config; +using NServiceBus.Faults; +using NServiceBus.Faults.Forwarder; +using NServiceBus.ObjectBuilder; +using Common.Logging; +using NServiceBus.Utils; + +namespace NServiceBus +{ + /// + /// Contains extension methods to NServiceBus.Configure + /// + public static class ConfigureFaultsForwarder + { + /// + /// Forward messages that have repeatedly failed to another endpoint. + /// + /// + /// + public static Configure MessageForwardingInCaseOfFault(this Configure config) + { + string errorQueue; + + var section = Configure.GetConfigSection(); + if (section == null) + { + Logger.Warn("Could not find configuration section 'MessageForwardingInCaseOfFaultConfig'. Going to try to find the error queue defined in 'MsmqTransportConfig'."); + + var msmq = Configure.GetConfigSection(); + if (msmq == null) + throw new ConfigurationErrorsException("Could not find backup configuration section 'MsmqTransportConfig' in order to locate the error queue."); + + + errorQueue = msmq.ErrorQueue; + } + else + errorQueue = section.ErrorQueue; + + if(string.IsNullOrEmpty(errorQueue)) + throw new ConfigurationErrorsException("Faults forwarding requires a error queue to be specified. Please add a 'MessageForwardingInCaseOfFaultConfig' section to your app.config"); + + //TODO: this should probably be moved to a new IManageFaults.Start|Init method instead. Check with Udi + MsmqUtilities.CreateQueueIfNecessary(errorQueue); + + config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singlecall) + .ConfigureProperty(fm => fm.ErrorQueue, errorQueue); + + return config; + } + + private static ILog Logger = LogManager.GetLogger("MessageForwardingInCaseOfFault"); + } + + class Bootstrapper : INeedInitialization + { + public void Init() + { + if (!Configure.Instance.Configurer.HasComponent()) + Configure.Instance.MessageForwardingInCaseOfFault(); + } + } +} diff --git a/src/impl/faults/NServiceBus.Faults.Forwarder.Config/MessageForwardingInCaseOfFaultConfig.cs b/src/impl/faults/NServiceBus.Faults.Forwarder.Config/MessageForwardingInCaseOfFaultConfig.cs index e5eb11dfb0a..b17b168f986 100644 --- a/src/impl/faults/NServiceBus.Faults.Forwarder.Config/MessageForwardingInCaseOfFaultConfig.cs +++ b/src/impl/faults/NServiceBus.Faults.Forwarder.Config/MessageForwardingInCaseOfFaultConfig.cs @@ -1,23 +1,23 @@ -using System.Configuration; - -namespace NServiceBus.Config -{ - public class MessageForwardingInCaseOfFaultConfig : ConfigurationSection - { - /// - /// The queue to which errors will be forwarded. - /// - [ConfigurationProperty("ErrorQueue", IsRequired = true)] - public string ErrorQueue - { - get - { - return this["ErrorQueue"] as string; - } - set - { - this["ErrorQueue"] = value; - } - } - } -} +using System.Configuration; + +namespace NServiceBus.Config +{ + public class MessageForwardingInCaseOfFaultConfig : ConfigurationSection + { + /// + /// The queue to which errors will be forwarded. + /// + [ConfigurationProperty("ErrorQueue", IsRequired = true)] + public string ErrorQueue + { + get + { + return this["ErrorQueue"] as string; + } + set + { + this["ErrorQueue"] = value; + } + } + } +} diff --git a/src/impl/faults/NServiceBus.Faults.Forwarder.Config/NServiceBus.Faults.Forwarder.Config.csproj b/src/impl/faults/NServiceBus.Faults.Forwarder.Config/NServiceBus.Faults.Forwarder.Config.csproj index 59148344a8e..77db24bbace 100644 --- a/src/impl/faults/NServiceBus.Faults.Forwarder.Config/NServiceBus.Faults.Forwarder.Config.csproj +++ b/src/impl/faults/NServiceBus.Faults.Forwarder.Config/NServiceBus.Faults.Forwarder.Config.csproj @@ -1,135 +1,135 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {7CDCE732-D913-4F7D-89CA-4BF4FA3A9405} - Library - Properties - NServiceBus.Faults.Forwarder.Config - NServiceBus.Faults.Forwarder.Config - v4.0 - 512 - - - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.Faults.Forwarder.Config.XML - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - ..\..\..\..\lib\Common.Logging.dll - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll - False - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.Faults.dll - False - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll - False - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.Msmq.Config.dll - False - - - ..\..\..\..\build\nservicebus.core\NServiceBus.Utils.dll - - - - - 3.5 - - - 3.5 - - - 3.5 - - - - - - - CommonAssemblyInfo.cs - - - - - - - - {81D0B1CB-9620-4C0E-ACDA-7ABB6359FB74} - NServiceBus.Faults.Forwarder - False - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {7CDCE732-D913-4F7D-89CA-4BF4FA3A9405} + Library + Properties + NServiceBus.Faults.Forwarder.Config + NServiceBus.Faults.Forwarder.Config + v4.0 + 512 + + + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.Faults.Forwarder.Config.XML + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + ..\..\..\..\lib\Common.Logging.dll + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll + False + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.Faults.dll + False + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll + False + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.Msmq.Config.dll + False + + + ..\..\..\..\build\nservicebus.core\NServiceBus.Utils.dll + + + + + 3.5 + + + 3.5 + + + 3.5 + + + + + + + CommonAssemblyInfo.cs + + + + + + + + {81D0B1CB-9620-4C0E-ACDA-7ABB6359FB74} + NServiceBus.Faults.Forwarder + False + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + \ No newline at end of file diff --git a/src/impl/faults/NServiceBus.Faults.Forwarder.Config/Properties/AssemblyInfo.cs b/src/impl/faults/NServiceBus.Faults.Forwarder.Config/Properties/AssemblyInfo.cs index e9617a64a1a..18e58a7d1e1 100644 --- a/src/impl/faults/NServiceBus.Faults.Forwarder.Config/Properties/AssemblyInfo.cs +++ b/src/impl/faults/NServiceBus.Faults.Forwarder.Config/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus forwarding fault management configuration.")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus forwarding fault management configuration.")] [assembly: AssemblyDescription("Configuration of forwarding implementation of fault management capabilities in NServiceBus.")] \ No newline at end of file diff --git a/src/impl/faults/NServiceBus.Faults.Forwarder/ExceptionInfo.cs b/src/impl/faults/NServiceBus.Faults.Forwarder/ExceptionInfo.cs index fa6940aac99..64a28ee9130 100644 --- a/src/impl/faults/NServiceBus.Faults.Forwarder/ExceptionInfo.cs +++ b/src/impl/faults/NServiceBus.Faults.Forwarder/ExceptionInfo.cs @@ -1,27 +1,27 @@ -using System; - -namespace NServiceBus.Faults -{ - [Serializable] - public class ExceptionInfo - { - public string HelpLink { get; set; } - public string Message { get; set; } - public string Source { get; set; } - public string StackTrace { get; set; } - } - - public static class ExceptionInfoExtensions - { - public static ExceptionInfo GetInfo(this Exception e) - { - return new ExceptionInfo - { - HelpLink = e.HelpLink, - Message = e.Message, - Source = e.Source, - StackTrace = e.StackTrace - }; - } - } -} +using System; + +namespace NServiceBus.Faults +{ + [Serializable] + public class ExceptionInfo + { + public string HelpLink { get; set; } + public string Message { get; set; } + public string Source { get; set; } + public string StackTrace { get; set; } + } + + public static class ExceptionInfoExtensions + { + public static ExceptionInfo GetInfo(this Exception e) + { + return new ExceptionInfo + { + HelpLink = e.HelpLink, + Message = e.Message, + Source = e.Source, + StackTrace = e.StackTrace + }; + } + } +} diff --git a/src/impl/faults/NServiceBus.Faults.Forwarder/ExceptionSanitizer.cs b/src/impl/faults/NServiceBus.Faults.Forwarder/ExceptionSanitizer.cs index 29d359f5def..ff44d907bcc 100644 --- a/src/impl/faults/NServiceBus.Faults.Forwarder/ExceptionSanitizer.cs +++ b/src/impl/faults/NServiceBus.Faults.Forwarder/ExceptionSanitizer.cs @@ -1,12 +1,12 @@ -using System; - -namespace NServiceBus.Faults.Forwarder -{ - public static class ExceptionSanitizer - { - public static Exception Sanitize(Exception original) - { - throw new NotImplementedException(); - } - } +using System; + +namespace NServiceBus.Faults.Forwarder +{ + public static class ExceptionSanitizer + { + public static Exception Sanitize(Exception original) + { + throw new NotImplementedException(); + } + } } \ No newline at end of file diff --git a/src/impl/faults/NServiceBus.Faults.Forwarder/FaultManager.cs b/src/impl/faults/NServiceBus.Faults.Forwarder/FaultManager.cs index e7007a9e7e1..838860976a1 100644 --- a/src/impl/faults/NServiceBus.Faults.Forwarder/FaultManager.cs +++ b/src/impl/faults/NServiceBus.Faults.Forwarder/FaultManager.cs @@ -1,50 +1,50 @@ -using System; -using NServiceBus.Unicast.Transport; - -namespace NServiceBus.Faults.Forwarder -{ - /// - /// Implementation of IManageMessageFailures by forwarding messages - /// using the bus. - /// - public class FaultManager : IManageMessageFailures - { - //Intentionally service-locate the bus to avoid circular - //resolution problem in the container - - void IManageMessageFailures.SerializationFailedForMessage(TransportMessage message, Exception e) - { - Configure.Instance.Builder.Build() - .Send(ErrorQueue, new SerializationFailedMessage - { - ExceptionInfo = e.GetInfo(), - FailedMessage = message - }); - } - - void IManageMessageFailures.ProcessingAlwaysFailsForMessage(TransportMessage message, Exception e) - { - if (SanitizeProcessingExceptions) - { - e = ExceptionSanitizer.Sanitize(e); - } - - Configure.Instance.Builder.Build() - .Send(ErrorQueue, new ProcessingFailedMessage - { - ExceptionInfo = e.GetInfo(), - FailedMessage = message - }); - } - - /// - /// Endpoint to which message failures are forwarded - /// - public string ErrorQueue { get; set; } - - /// - /// Indicates of exceptions should be sanitized before sending them on - /// - public bool SanitizeProcessingExceptions { get; set; } - } -} +using System; +using NServiceBus.Unicast.Transport; + +namespace NServiceBus.Faults.Forwarder +{ + /// + /// Implementation of IManageMessageFailures by forwarding messages + /// using the bus. + /// + public class FaultManager : IManageMessageFailures + { + //Intentionally service-locate the bus to avoid circular + //resolution problem in the container + + void IManageMessageFailures.SerializationFailedForMessage(TransportMessage message, Exception e) + { + Configure.Instance.Builder.Build() + .Send(ErrorQueue, new SerializationFailedMessage + { + ExceptionInfo = e.GetInfo(), + FailedMessage = message + }); + } + + void IManageMessageFailures.ProcessingAlwaysFailsForMessage(TransportMessage message, Exception e) + { + if (SanitizeProcessingExceptions) + { + e = ExceptionSanitizer.Sanitize(e); + } + + Configure.Instance.Builder.Build() + .Send(ErrorQueue, new ProcessingFailedMessage + { + ExceptionInfo = e.GetInfo(), + FailedMessage = message + }); + } + + /// + /// Endpoint to which message failures are forwarded + /// + public string ErrorQueue { get; set; } + + /// + /// Indicates of exceptions should be sanitized before sending them on + /// + public bool SanitizeProcessingExceptions { get; set; } + } +} diff --git a/src/impl/faults/NServiceBus.Faults.Forwarder/NServiceBus.Faults.Forwarder.csproj b/src/impl/faults/NServiceBus.Faults.Forwarder/NServiceBus.Faults.Forwarder.csproj index ce038ee5348..0909716ee99 100644 --- a/src/impl/faults/NServiceBus.Faults.Forwarder/NServiceBus.Faults.Forwarder.csproj +++ b/src/impl/faults/NServiceBus.Faults.Forwarder/NServiceBus.Faults.Forwarder.csproj @@ -1,121 +1,121 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {81D0B1CB-9620-4C0E-ACDA-7ABB6359FB74} - Library - Properties - NServiceBus.Faults.Forwarder - NServiceBus.Faults.Forwarder - v4.0 - 512 - - - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.Faults.Forwarder.XML - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\..\build\output\NServiceBus.dll - False - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll - False - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.Faults.dll - False - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll - False - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll - False - - - - 3.5 - - - - - CommonAssemblyInfo.cs - - - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {81D0B1CB-9620-4C0E-ACDA-7ABB6359FB74} + Library + Properties + NServiceBus.Faults.Forwarder + NServiceBus.Faults.Forwarder + v4.0 + 512 + + + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.Faults.Forwarder.XML + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\..\build\output\NServiceBus.dll + False + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll + False + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.Faults.dll + False + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll + False + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll + False + + + + 3.5 + + + + + CommonAssemblyInfo.cs + + + + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + \ No newline at end of file diff --git a/src/impl/faults/NServiceBus.Faults.Forwarder/ProcessingFailedMessage.cs b/src/impl/faults/NServiceBus.Faults.Forwarder/ProcessingFailedMessage.cs index 5235669ba2c..0bda73928aa 100644 --- a/src/impl/faults/NServiceBus.Faults.Forwarder/ProcessingFailedMessage.cs +++ b/src/impl/faults/NServiceBus.Faults.Forwarder/ProcessingFailedMessage.cs @@ -1,12 +1,12 @@ -using System; -using NServiceBus.Unicast.Transport; - -namespace NServiceBus.Faults.Forwarder -{ - [Serializable] - public class ProcessingFailedMessage : IMessage - { - public TransportMessage FailedMessage { get; set; } - public ExceptionInfo ExceptionInfo { get; set; } - } +using System; +using NServiceBus.Unicast.Transport; + +namespace NServiceBus.Faults.Forwarder +{ + [Serializable] + public class ProcessingFailedMessage : IMessage + { + public TransportMessage FailedMessage { get; set; } + public ExceptionInfo ExceptionInfo { get; set; } + } } \ No newline at end of file diff --git a/src/impl/faults/NServiceBus.Faults.Forwarder/Properties/AssemblyInfo.cs b/src/impl/faults/NServiceBus.Faults.Forwarder/Properties/AssemblyInfo.cs index b03a112368c..717624578e9 100644 --- a/src/impl/faults/NServiceBus.Faults.Forwarder/Properties/AssemblyInfo.cs +++ b/src/impl/faults/NServiceBus.Faults.Forwarder/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus forwarding fault management.")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus forwarding fault management.")] [assembly: AssemblyDescription("Forwarding implementation of fault management capabilities in NServiceBus.")] \ No newline at end of file diff --git a/src/impl/faults/NServiceBus.Faults.Forwarder/SerializationFailedMessage.cs b/src/impl/faults/NServiceBus.Faults.Forwarder/SerializationFailedMessage.cs index 998777a6fce..ce94c584058 100644 --- a/src/impl/faults/NServiceBus.Faults.Forwarder/SerializationFailedMessage.cs +++ b/src/impl/faults/NServiceBus.Faults.Forwarder/SerializationFailedMessage.cs @@ -1,12 +1,12 @@ -using System; -using NServiceBus.Unicast.Transport; - -namespace NServiceBus.Faults.Forwarder -{ - [Serializable] - public class SerializationFailedMessage : IMessage - { - public TransportMessage FailedMessage { get; set; } - public ExceptionInfo ExceptionInfo { get; set; } - } +using System; +using NServiceBus.Unicast.Transport; + +namespace NServiceBus.Faults.Forwarder +{ + [Serializable] + public class SerializationFailedMessage : IMessage + { + public TransportMessage FailedMessage { get; set; } + public ExceptionInfo ExceptionInfo { get; set; } + } } \ No newline at end of file diff --git a/src/impl/faults/NServiceBus.Faults.InMemory.Config/ConfigureInMemoryFaultManagement.cs b/src/impl/faults/NServiceBus.Faults.InMemory.Config/ConfigureInMemoryFaultManagement.cs index de715cf3a8f..51a6310f429 100644 --- a/src/impl/faults/NServiceBus.Faults.InMemory.Config/ConfigureInMemoryFaultManagement.cs +++ b/src/impl/faults/NServiceBus.Faults.InMemory.Config/ConfigureInMemoryFaultManagement.cs @@ -1,23 +1,23 @@ -using NServiceBus.Faults.InMemory; -using NServiceBus.ObjectBuilder; - -namespace NServiceBus -{ - /// - /// Contains extension methods to NServiceBus.Configure - /// - public static class ConfigureInMemoryFaultManagement - { - /// - /// Use in-memory fault management. - /// - /// - /// - public static Configure InMemoryFaultManagement(this Configure config) - { - config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); - - return config; - } - } -} +using NServiceBus.Faults.InMemory; +using NServiceBus.ObjectBuilder; + +namespace NServiceBus +{ + /// + /// Contains extension methods to NServiceBus.Configure + /// + public static class ConfigureInMemoryFaultManagement + { + /// + /// Use in-memory fault management. + /// + /// + /// + public static Configure InMemoryFaultManagement(this Configure config) + { + config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); + + return config; + } + } +} diff --git a/src/impl/faults/NServiceBus.Faults.InMemory.Config/NServiceBus.Faults.InMemory.Config.csproj b/src/impl/faults/NServiceBus.Faults.InMemory.Config/NServiceBus.Faults.InMemory.Config.csproj index 2404a6dc052..3070d7ba915 100644 --- a/src/impl/faults/NServiceBus.Faults.InMemory.Config/NServiceBus.Faults.InMemory.Config.csproj +++ b/src/impl/faults/NServiceBus.Faults.InMemory.Config/NServiceBus.Faults.InMemory.Config.csproj @@ -1,123 +1,123 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {7604F70B-DDF2-474A-97E7-6FB1C888D2FA} - Library - Properties - NServiceBus.Faults.InMemory.Config - NServiceBus.Faults.InMemory.Config - v4.0 - 512 - - - - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.Faults.InMemory.Config.XML - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll - False - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.Faults.dll - False - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll - False - - - - 3.5 - - - 3.5 - - - 3.5 - - - - - - - CommonAssemblyInfo.cs - - - - - - - {192A06E8-1BFE-4D03-9902-B8F529EDE6F4} - NServiceBus.Faults.InMemory - False - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {7604F70B-DDF2-474A-97E7-6FB1C888D2FA} + Library + Properties + NServiceBus.Faults.InMemory.Config + NServiceBus.Faults.InMemory.Config + v4.0 + 512 + + + + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.Faults.InMemory.Config.XML + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll + False + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.Faults.dll + False + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll + False + + + + 3.5 + + + 3.5 + + + 3.5 + + + + + + + CommonAssemblyInfo.cs + + + + + + + {192A06E8-1BFE-4D03-9902-B8F529EDE6F4} + NServiceBus.Faults.InMemory + False + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + \ No newline at end of file diff --git a/src/impl/faults/NServiceBus.Faults.InMemory.Config/Properties/AssemblyInfo.cs b/src/impl/faults/NServiceBus.Faults.InMemory.Config/Properties/AssemblyInfo.cs index 8cd48090f32..bf46aca45db 100644 --- a/src/impl/faults/NServiceBus.Faults.InMemory.Config/Properties/AssemblyInfo.cs +++ b/src/impl/faults/NServiceBus.Faults.InMemory.Config/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus in-memory fault management configuration.")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus in-memory fault management configuration.")] [assembly: AssemblyDescription("Configuration of in-memory implementation of fault management capabilities in NServiceBus.")] \ No newline at end of file diff --git a/src/impl/faults/NServiceBus.Faults.InMemory/FaultManager.cs b/src/impl/faults/NServiceBus.Faults.InMemory/FaultManager.cs index a66dade17be..7710e5ced8c 100644 --- a/src/impl/faults/NServiceBus.Faults.InMemory/FaultManager.cs +++ b/src/impl/faults/NServiceBus.Faults.InMemory/FaultManager.cs @@ -1,21 +1,21 @@ -using System; -using NServiceBus.Unicast.Transport; -using Common.Logging; - -namespace NServiceBus.Faults.InMemory -{ - public class FaultManager : IManageMessageFailures - { - public void SerializationFailedForMessage(TransportMessage message, Exception e) - { - Logger.Error("Serialization failed for message with ID " + message.IdForCorrelation + ".", e); - } - - public void ProcessingAlwaysFailsForMessage(TransportMessage message, Exception e) - { - Logger.Error("Message processing always fails for message with ID " + message.IdForCorrelation + ".", e); - } - - private ILog Logger = LogManager.GetLogger(typeof(FaultManager)); - } -} +using System; +using NServiceBus.Unicast.Transport; +using Common.Logging; + +namespace NServiceBus.Faults.InMemory +{ + public class FaultManager : IManageMessageFailures + { + public void SerializationFailedForMessage(TransportMessage message, Exception e) + { + Logger.Error("Serialization failed for message with ID " + message.IdForCorrelation + ".", e); + } + + public void ProcessingAlwaysFailsForMessage(TransportMessage message, Exception e) + { + Logger.Error("Message processing always fails for message with ID " + message.IdForCorrelation + ".", e); + } + + private ILog Logger = LogManager.GetLogger(typeof(FaultManager)); + } +} diff --git a/src/impl/faults/NServiceBus.Faults.InMemory/NServiceBus.Faults.InMemory.csproj b/src/impl/faults/NServiceBus.Faults.InMemory/NServiceBus.Faults.InMemory.csproj index 5e10f9e9f5d..64e6e7f4cc7 100644 --- a/src/impl/faults/NServiceBus.Faults.InMemory/NServiceBus.Faults.InMemory.csproj +++ b/src/impl/faults/NServiceBus.Faults.InMemory/NServiceBus.Faults.InMemory.csproj @@ -1,108 +1,108 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {192A06E8-1BFE-4D03-9902-B8F529EDE6F4} - Library - Properties - NServiceBus.Faults.InMemory - NServiceBus.Faults.InMemory - v4.0 - 512 - - - - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.Faults.InMemory.XML - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\..\lib\Common.Logging.dll - False - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.Faults.dll - False - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll - False - - - - 3.5 - - - - - CommonAssemblyInfo.cs - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {192A06E8-1BFE-4D03-9902-B8F529EDE6F4} + Library + Properties + NServiceBus.Faults.InMemory + NServiceBus.Faults.InMemory + v4.0 + 512 + + + + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.Faults.InMemory.XML + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\..\lib\Common.Logging.dll + False + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.Faults.dll + False + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll + False + + + + 3.5 + + + + + CommonAssemblyInfo.cs + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + \ No newline at end of file diff --git a/src/impl/faults/NServiceBus.Faults.InMemory/Properties/AssemblyInfo.cs b/src/impl/faults/NServiceBus.Faults.InMemory/Properties/AssemblyInfo.cs index 29c89e28c37..2575912cd8c 100644 --- a/src/impl/faults/NServiceBus.Faults.InMemory/Properties/AssemblyInfo.cs +++ b/src/impl/faults/NServiceBus.Faults.InMemory/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus in-memory fault management.")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus in-memory fault management.")] [assembly: AssemblyDescription("In-memory implementation of fault management capabilities in NServiceBus.")] \ No newline at end of file diff --git a/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/App.config b/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/App.config index edba7a11ac1..d2ee6d7a19c 100644 --- a/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/App.config +++ b/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/App.config @@ -1,25 +1,25 @@ - - - -
-
- - - - NHibernate.Dialect.SQLiteDialect - NHibernate.Connection.DriverConnectionProvider - NHibernate.Driver.SQLite20Driver - Data Source=.\DBFileNameFromAppConfig.sqlite;Version=3;New=True; - 1 - - - - - NHibernate.Dialect.SQLiteDialect - NHibernate.Connection.DriverConnectionProvider - NHibernate.Driver.SQLite20Driver - Data Source=.\DBFileNameFromAppConfig.sqlite;Version=3;New=True; - 10 - - + + + +
+
+ + + + NHibernate.Dialect.SQLiteDialect + NHibernate.Connection.DriverConnectionProvider + NHibernate.Driver.SQLite20Driver + Data Source=.\DBFileNameFromAppConfig.sqlite;Version=3;New=True; + 1 + + + + + NHibernate.Dialect.SQLiteDialect + NHibernate.Connection.DriverConnectionProvider + NHibernate.Driver.SQLite20Driver + Data Source=.\DBFileNameFromAppConfig.sqlite;Version=3;New=True; + 10 + + \ No newline at end of file diff --git a/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/FaultManagerSpecification.cs b/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/FaultManagerSpecification.cs index 1793c9691ba..0ecf66d6ac1 100644 --- a/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/FaultManagerSpecification.cs +++ b/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/FaultManagerSpecification.cs @@ -1,30 +1,30 @@ -using System.IO; -using FluentNHibernate.Cfg.Db; -using NHibernate; -using NHibernate.ByteCode.LinFu; -using NHibernate.Cfg; -using NUnit.Framework; - -namespace NServiceBus.Faults.NHibernate.Tests -{ - public abstract class FaultManagerSpecification - { - protected FaultManager FaultManager; - protected ISessionFactory SessionFactory; - - [SetUp] - public void SetUp() - { - var nhibernateProperties = SQLiteConfiguration.Standard - .UsingFile(Path.GetTempFileName()) - .ProxyFactoryFactory(typeof(ProxyFactoryFactory).AssemblyQualifiedName) - .ToProperties(); - - FaultManagerSessionFactory factory = - ConfigureNHibernateFaultManager.CreateSessionFactory(new Configuration().Configure().SetProperties(nhibernateProperties),true); - - SessionFactory = factory.Value; - FaultManager = new FaultManager(factory); - } - } -} +using System.IO; +using FluentNHibernate.Cfg.Db; +using NHibernate; +using NHibernate.ByteCode.LinFu; +using NHibernate.Cfg; +using NUnit.Framework; + +namespace NServiceBus.Faults.NHibernate.Tests +{ + public abstract class FaultManagerSpecification + { + protected FaultManager FaultManager; + protected ISessionFactory SessionFactory; + + [SetUp] + public void SetUp() + { + var nhibernateProperties = SQLiteConfiguration.Standard + .UsingFile(Path.GetTempFileName()) + .ProxyFactoryFactory(typeof(ProxyFactoryFactory).AssemblyQualifiedName) + .ToProperties(); + + FaultManagerSessionFactory factory = + ConfigureNHibernateFaultManager.CreateSessionFactory(new Configuration().Configure().SetProperties(nhibernateProperties),true); + + SessionFactory = factory.Value; + FaultManager = new FaultManager(factory); + } + } +} diff --git a/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/NServiceBus.Faults.NHibernate.Tests.csproj b/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/NServiceBus.Faults.NHibernate.Tests.csproj index 0c59cef7ca8..8089a1525ce 100644 --- a/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/NServiceBus.Faults.NHibernate.Tests.csproj +++ b/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/NServiceBus.Faults.NHibernate.Tests.csproj @@ -1,157 +1,157 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {14D55316-91EC-4BDF-B990-614BAE2BE8DC} - Library - Properties - NServiceBus.Faults.NHibernate.Tests - NServiceBus.Faults.NHibernate.Tests - v4.0 - 512 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - ..\..\..\..\lib\Common.Logging.dll - - - False - ..\..\..\..\lib\FluentNHibernate\FluentNHibernate.dll - - - False - ..\..\..\..\lib\NHibernate.dll - - - False - ..\..\..\..\lib\NHibernate.ByteCode.LinFu.dll - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.Faults.dll - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.Common.dll - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.Common.Config.dll - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.DefaultBuilder.dll - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll - - - False - ..\..\..\..\tools\NUnit\nunit.framework.dll - - - False - ..\..\..\..\lib\Rhino.Mocks\Rhino.Mocks.dll - - - - - ..\..\..\..\lib\sqlite\System.Data.SQLite.dll - - - - - - - CommonAssemblyInfo.cs - - - - - - - - - - - - - {C36B4747-C5EB-4FA3-BF1F-78B8912BD58C} - NServiceBus.Faults.NHibernate - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {14D55316-91EC-4BDF-B990-614BAE2BE8DC} + Library + Properties + NServiceBus.Faults.NHibernate.Tests + NServiceBus.Faults.NHibernate.Tests + v4.0 + 512 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + ..\..\..\..\lib\Common.Logging.dll + + + False + ..\..\..\..\lib\FluentNHibernate\FluentNHibernate.dll + + + False + ..\..\..\..\lib\NHibernate.dll + + + False + ..\..\..\..\lib\NHibernate.ByteCode.LinFu.dll + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.Faults.dll + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.Common.dll + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.Common.Config.dll + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.DefaultBuilder.dll + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll + + + False + ..\..\..\..\tools\NUnit\nunit.framework.dll + + + False + ..\..\..\..\lib\Rhino.Mocks\Rhino.Mocks.dll + + + + + ..\..\..\..\lib\sqlite\System.Data.SQLite.dll + + + + + + + CommonAssemblyInfo.cs + + + + + + + + + + + + + {C36B4747-C5EB-4FA3-BF1F-78B8912BD58C} + NServiceBus.Faults.NHibernate + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + \ No newline at end of file diff --git a/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/Properties/AssemblyInfo.cs b/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/Properties/AssemblyInfo.cs index 1b8aa4f390c..fcac58ceee1 100644 --- a/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/Properties/AssemblyInfo.cs +++ b/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus database/NHibernate fault management NUnit tests.")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus database/NHibernate fault management NUnit tests.")] [assembly: AssemblyDescription("Unit tests for database/NHibernate implementation of fault management capabilities in NServiceBus.")] \ No newline at end of file diff --git a/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/When_configuring_nhibernate_fault_manager_to_use_sqlite.cs b/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/When_configuring_nhibernate_fault_manager_to_use_sqlite.cs index 56fdf73b80a..db469a7b5b6 100644 --- a/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/When_configuring_nhibernate_fault_manager_to_use_sqlite.cs +++ b/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/When_configuring_nhibernate_fault_manager_to_use_sqlite.cs @@ -1,36 +1,36 @@ -using NUnit.Framework; - -namespace NServiceBus.Faults.NHibernate.Tests -{ - [TestFixture] - public class When_configuring_nhibernate_fault_manager_to_use_sqlite - { - private Configure config; - - [SetUp] - public void SetUp() - { - config = Configure.With(new[] { typeof(When_configuring_nhibernate_fault_manager_to_use_sqlite).Assembly }) - .DefaultBuilder() - .NHibernateFaultManager(true); - } - - [Test] - public void Fault_manager_should_be_registered_as_singleton() - { - var persister = config.Builder.Build(); - - Assert.AreEqual(persister,config.Builder.Build()); - } - - [Test] - public void The_sessionfactory_should_be_built_and_registered_as_singleton() - { - var sessionFactory = config.Builder.Build(); - - Assert.NotNull(sessionFactory); - Assert.AreEqual(sessionFactory,config.Builder.Build()); - - } - } +using NUnit.Framework; + +namespace NServiceBus.Faults.NHibernate.Tests +{ + [TestFixture] + public class When_configuring_nhibernate_fault_manager_to_use_sqlite + { + private Configure config; + + [SetUp] + public void SetUp() + { + config = Configure.With(new[] { typeof(When_configuring_nhibernate_fault_manager_to_use_sqlite).Assembly }) + .DefaultBuilder() + .NHibernateFaultManager(true); + } + + [Test] + public void Fault_manager_should_be_registered_as_singleton() + { + var persister = config.Builder.Build(); + + Assert.AreEqual(persister,config.Builder.Build()); + } + + [Test] + public void The_sessionfactory_should_be_built_and_registered_as_singleton() + { + var sessionFactory = config.Builder.Build(); + + Assert.NotNull(sessionFactory); + Assert.AreEqual(sessionFactory,config.Builder.Build()); + + } + } } \ No newline at end of file diff --git a/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/When_configuring_nhibernate_fault_manager_using_default_config_section.cs b/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/When_configuring_nhibernate_fault_manager_using_default_config_section.cs index f9738362ce4..23be8decb7d 100644 --- a/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/When_configuring_nhibernate_fault_manager_using_default_config_section.cs +++ b/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/When_configuring_nhibernate_fault_manager_using_default_config_section.cs @@ -1,46 +1,46 @@ -using NHibernate.Dialect; -using NHibernate.Engine; -using NUnit.Framework; - -namespace NServiceBus.Faults.NHibernate.Tests -{ - [TestFixture] - public class When_configuring_nhibernate_fault_manager_using_default_config_section - { - private Configure config; - - [SetUp] - public void SetUp() - { - config = Configure.With(new[] { typeof(When_configuring_nhibernate_fault_manager_using_default_config_section).Assembly }) - .DefaultBuilder() - .NHibernateFaultManager(true); - } - - [Test] - public void Fault_manager_should_be_registered_as_singleton() - { - var persister = config.Builder.Build(); - - Assert.AreEqual(persister,config.Builder.Build()); - } - - [Test] - public void The_sessionfactory_should_be_built_and_registered_as_singleton() - { - var sessionFactory = config.Builder.Build(); - - Assert.NotNull(sessionFactory); - Assert.AreEqual(sessionFactory,config.Builder.Build()); - - } - - [Test] - public void The_sessionfactory_should_be_configured_according_to_default_config_section() - { - var sessionFactory = config.Builder.Build(); - - Assert.AreEqual(((ISessionFactoryImplementor)sessionFactory.Value).Settings.Dialect.GetType(),typeof(SQLiteDialect)); - } - } +using NHibernate.Dialect; +using NHibernate.Engine; +using NUnit.Framework; + +namespace NServiceBus.Faults.NHibernate.Tests +{ + [TestFixture] + public class When_configuring_nhibernate_fault_manager_using_default_config_section + { + private Configure config; + + [SetUp] + public void SetUp() + { + config = Configure.With(new[] { typeof(When_configuring_nhibernate_fault_manager_using_default_config_section).Assembly }) + .DefaultBuilder() + .NHibernateFaultManager(true); + } + + [Test] + public void Fault_manager_should_be_registered_as_singleton() + { + var persister = config.Builder.Build(); + + Assert.AreEqual(persister,config.Builder.Build()); + } + + [Test] + public void The_sessionfactory_should_be_built_and_registered_as_singleton() + { + var sessionFactory = config.Builder.Build(); + + Assert.NotNull(sessionFactory); + Assert.AreEqual(sessionFactory,config.Builder.Build()); + + } + + [Test] + public void The_sessionfactory_should_be_configured_according_to_default_config_section() + { + var sessionFactory = config.Builder.Build(); + + Assert.AreEqual(((ISessionFactoryImplementor)sessionFactory.Value).Settings.Dialect.GetType(),typeof(SQLiteDialect)); + } + } } \ No newline at end of file diff --git a/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/When_configuring_nhibernate_fault_manager_using_named_config_section.cs b/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/When_configuring_nhibernate_fault_manager_using_named_config_section.cs index 9a3fbd2cd14..bf453c140e4 100644 --- a/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/When_configuring_nhibernate_fault_manager_using_named_config_section.cs +++ b/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/When_configuring_nhibernate_fault_manager_using_named_config_section.cs @@ -1,45 +1,45 @@ -using NHibernate.Engine; -using NUnit.Framework; - -namespace NServiceBus.Faults.NHibernate.Tests -{ - [TestFixture] - public class When_configuring_nhibernate_fault_manager_using_named_config_section - { - private Configure config; - - [SetUp] - public void SetUp() - { - config = Configure.With(new[] { typeof(When_configuring_nhibernate_fault_manager_using_named_config_section).Assembly }) - .DefaultBuilder() - .NHibernateFaultManager("hibernate-configuration-faults", false); - } - - [Test] - public void Fault_manager_should_be_registered_as_singleton() - { - var persister = config.Builder.Build(); - - Assert.AreEqual(persister,config.Builder.Build()); - } - - [Test] - public void The_sessionfactory_should_be_built_and_registered_as_singleton() - { - var sessionFactory = config.Builder.Build(); - - Assert.NotNull(sessionFactory); - Assert.AreEqual(sessionFactory,config.Builder.Build()); - - } - - [Test] - public void The_sessionfactory_should_be_configured_according_to_named_config_section() - { - var sessionFactory = config.Builder.Build(); - - Assert.AreEqual(((ISessionFactoryImplementor)sessionFactory.Value).Settings.AdoBatchSize,10); - } - } +using NHibernate.Engine; +using NUnit.Framework; + +namespace NServiceBus.Faults.NHibernate.Tests +{ + [TestFixture] + public class When_configuring_nhibernate_fault_manager_using_named_config_section + { + private Configure config; + + [SetUp] + public void SetUp() + { + config = Configure.With(new[] { typeof(When_configuring_nhibernate_fault_manager_using_named_config_section).Assembly }) + .DefaultBuilder() + .NHibernateFaultManager("hibernate-configuration-faults", false); + } + + [Test] + public void Fault_manager_should_be_registered_as_singleton() + { + var persister = config.Builder.Build(); + + Assert.AreEqual(persister,config.Builder.Build()); + } + + [Test] + public void The_sessionfactory_should_be_built_and_registered_as_singleton() + { + var sessionFactory = config.Builder.Build(); + + Assert.NotNull(sessionFactory); + Assert.AreEqual(sessionFactory,config.Builder.Build()); + + } + + [Test] + public void The_sessionfactory_should_be_configured_according_to_named_config_section() + { + var sessionFactory = config.Builder.Build(); + + Assert.AreEqual(((ISessionFactoryImplementor)sessionFactory.Value).Settings.AdoBatchSize,10); + } + } } \ No newline at end of file diff --git a/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/When_handling_fault_caused_by_a_nested_exception.cs b/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/When_handling_fault_caused_by_a_nested_exception.cs index f75f27b3b81..1bad1969d3a 100644 --- a/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/When_handling_fault_caused_by_a_nested_exception.cs +++ b/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/When_handling_fault_caused_by_a_nested_exception.cs @@ -1,48 +1,48 @@ -using System; -using NServiceBus.Unicast.Transport; -using NUnit.Framework; - -namespace NServiceBus.Faults.NHibernate.Tests -{ - [TestFixture] - public class When_handling_fault_caused_by_a_nested_exception - { - [Test] - public void Stack_trace_information_should_be_combined_from_all_the_exceptions() - { - var e = CreateNestedException(); - var info = new FailureInfo(new TransportMessage(), e, true); - - Assert.That(info.StackTraces,Is.StringStarting(e.StackTrace)); - Assert.That(info.StackTraces,Is.StringEnding(e.InnerException.StackTrace)); - } - - [Test] - public void Topmost_messages_should_belong_to_the_outermost_exception() - { - var info = new FailureInfo(new TransportMessage(), CreateNestedException(), true); - - Assert.AreEqual(info.TopmostExceptionMessage,"Outer"); - } - - private static Exception CreateNestedException() - { - try - { - try - { - throw new Exception("Inner"); - } - catch (Exception inner) - { - throw new Exception("Outer", inner); - } - } - catch (Exception outer) - { - return outer; - } - } - - } +using System; +using NServiceBus.Unicast.Transport; +using NUnit.Framework; + +namespace NServiceBus.Faults.NHibernate.Tests +{ + [TestFixture] + public class When_handling_fault_caused_by_a_nested_exception + { + [Test] + public void Stack_trace_information_should_be_combined_from_all_the_exceptions() + { + var e = CreateNestedException(); + var info = new FailureInfo(new TransportMessage(), e, true); + + Assert.That(info.StackTraces,Is.StringStarting(e.StackTrace)); + Assert.That(info.StackTraces,Is.StringEnding(e.InnerException.StackTrace)); + } + + [Test] + public void Topmost_messages_should_belong_to_the_outermost_exception() + { + var info = new FailureInfo(new TransportMessage(), CreateNestedException(), true); + + Assert.AreEqual(info.TopmostExceptionMessage,"Outer"); + } + + private static Exception CreateNestedException() + { + try + { + try + { + throw new Exception("Inner"); + } + catch (Exception inner) + { + throw new Exception("Outer", inner); + } + } + catch (Exception outer) + { + return outer; + } + } + + } } \ No newline at end of file diff --git a/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/When_handling_faults_on_non_transactional_endpoints.cs b/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/When_handling_faults_on_non_transactional_endpoints.cs index 697bf9faa2b..7274efc4187 100644 --- a/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/When_handling_faults_on_non_transactional_endpoints.cs +++ b/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/When_handling_faults_on_non_transactional_endpoints.cs @@ -1,21 +1,21 @@ -using System; -using NServiceBus.Unicast.Transport; -using NUnit.Framework; - -namespace NServiceBus.Faults.NHibernate.Tests -{ - [TestFixture] - public class When_handling_faults_on_non_transactional_endpoints : FaultManagerSpecification - { - [Test] - public void Reporting_failure_should_commit_info_immediately() - { - FaultManager.SerializationFailedForMessage(new TransportMessage{ReturnAddress = "returnAddress"}, new Exception()); - - using (var session = SessionFactory.OpenSession()) - { - Assert.AreEqual(session.CreateCriteria(typeof(FailureInfo)).List().Count,1); - } - } - } +using System; +using NServiceBus.Unicast.Transport; +using NUnit.Framework; + +namespace NServiceBus.Faults.NHibernate.Tests +{ + [TestFixture] + public class When_handling_faults_on_non_transactional_endpoints : FaultManagerSpecification + { + [Test] + public void Reporting_failure_should_commit_info_immediately() + { + FaultManager.SerializationFailedForMessage(new TransportMessage{ReturnAddress = "returnAddress"}, new Exception()); + + using (var session = SessionFactory.OpenSession()) + { + Assert.AreEqual(session.CreateCriteria(typeof(FailureInfo)).List().Count,1); + } + } + } } \ No newline at end of file diff --git a/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/When_handling_faults_on_transactional_endpoints.cs b/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/When_handling_faults_on_transactional_endpoints.cs index f4533fb0102..3ed8d9b563b 100644 --- a/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/When_handling_faults_on_transactional_endpoints.cs +++ b/src/impl/faults/NServiceBus.Faults.NHibernate.Tests/When_handling_faults_on_transactional_endpoints.cs @@ -1,41 +1,41 @@ -using System; -using System.Transactions; -using NServiceBus.Unicast.Transport; -using NUnit.Framework; - -namespace NServiceBus.Faults.NHibernate.Tests -{ - [TestFixture] - public class When_handling_faults_on_transactional_endpoints : FaultManagerSpecification - { - [Test] - public void Ambient_transaction_should_commit_saving_failure_info() - { - using (var transactionScope = new TransactionScope()) - { - FaultManager.SerializationFailedForMessage(new TransportMessage{ ReturnAddress = "returnAddress" }, new Exception()); - transactionScope.Complete(); - } - using (var session = SessionFactory.OpenSession()) - { - Assert.AreEqual(session.CreateCriteria(typeof(FailureInfo)).List().Count,1); - } - } - - [Test] - public void Ambient_transaction_should_rollback_saving_failure_info() - { - using (var transactionScope = new TransactionScope()) - { - FaultManager.SerializationFailedForMessage(new TransportMessage { ReturnAddress = "returnAddress" }, new Exception()); - } - - using (var session = SessionFactory.OpenSession()) - { - Assert.AreEqual(session.CreateCriteria(typeof(FailureInfo)).List().Count,0); - } - - } - - } +using System; +using System.Transactions; +using NServiceBus.Unicast.Transport; +using NUnit.Framework; + +namespace NServiceBus.Faults.NHibernate.Tests +{ + [TestFixture] + public class When_handling_faults_on_transactional_endpoints : FaultManagerSpecification + { + [Test] + public void Ambient_transaction_should_commit_saving_failure_info() + { + using (var transactionScope = new TransactionScope()) + { + FaultManager.SerializationFailedForMessage(new TransportMessage{ ReturnAddress = "returnAddress" }, new Exception()); + transactionScope.Complete(); + } + using (var session = SessionFactory.OpenSession()) + { + Assert.AreEqual(session.CreateCriteria(typeof(FailureInfo)).List().Count,1); + } + } + + [Test] + public void Ambient_transaction_should_rollback_saving_failure_info() + { + using (var transactionScope = new TransactionScope()) + { + FaultManager.SerializationFailedForMessage(new TransportMessage { ReturnAddress = "returnAddress" }, new Exception()); + } + + using (var session = SessionFactory.OpenSession()) + { + Assert.AreEqual(session.CreateCriteria(typeof(FailureInfo)).List().Count,0); + } + + } + + } } \ No newline at end of file diff --git a/src/impl/faults/NServiceBus.Faults.NHibernate/ConfigurationSectionHandler.cs b/src/impl/faults/NServiceBus.Faults.NHibernate/ConfigurationSectionHandler.cs index de3d2747b90..87b74ea67e6 100644 --- a/src/impl/faults/NServiceBus.Faults.NHibernate/ConfigurationSectionHandler.cs +++ b/src/impl/faults/NServiceBus.Faults.NHibernate/ConfigurationSectionHandler.cs @@ -1,31 +1,31 @@ -using System; -using System.Configuration; -using System.Linq; -using System.Collections.Generic; -using System.Xml; - -namespace NServiceBus.NHibernate.Cfg -{ - /// - /// Handles NHibernate's configuration section with different than standard (hibernate-configuration) name - /// by changing XML elements's name just before handling control to NHibernate. - /// Can be used to define multiple NHibernate sections in one web/app.config file. - /// - public class ConfigurationSectionHandler : IConfigurationSectionHandler - { - private readonly IConfigurationSectionHandler _originalHandler = new global::NHibernate.Cfg.ConfigurationSectionHandler(); - - object IConfigurationSectionHandler.Create(object parent, object configContext, XmlNode section) - { - XmlDocument document = (XmlDocument)section.ParentNode; - XmlNode fixedNode = document.CreateElement("hibernate-configuration"); - section.ParentNode.ReplaceChild(fixedNode, section); - - foreach (XmlNode node in section.ChildNodes) - { - fixedNode.AppendChild(section.RemoveChild(node)); - } - return _originalHandler.Create(parent, configContext, fixedNode); - } - } +using System; +using System.Configuration; +using System.Linq; +using System.Collections.Generic; +using System.Xml; + +namespace NServiceBus.NHibernate.Cfg +{ + /// + /// Handles NHibernate's configuration section with different than standard (hibernate-configuration) name + /// by changing XML elements's name just before handling control to NHibernate. + /// Can be used to define multiple NHibernate sections in one web/app.config file. + /// + public class ConfigurationSectionHandler : IConfigurationSectionHandler + { + private readonly IConfigurationSectionHandler _originalHandler = new global::NHibernate.Cfg.ConfigurationSectionHandler(); + + object IConfigurationSectionHandler.Create(object parent, object configContext, XmlNode section) + { + XmlDocument document = (XmlDocument)section.ParentNode; + XmlNode fixedNode = document.CreateElement("hibernate-configuration"); + section.ParentNode.ReplaceChild(fixedNode, section); + + foreach (XmlNode node in section.ChildNodes) + { + fixedNode.AppendChild(section.RemoveChild(node)); + } + return _originalHandler.Create(parent, configContext, fixedNode); + } + } } \ No newline at end of file diff --git a/src/impl/faults/NServiceBus.Faults.NHibernate/ConfigureNHibernateFaultManager.cs b/src/impl/faults/NServiceBus.Faults.NHibernate/ConfigureNHibernateFaultManager.cs index 5ef299a4850..3aa3c92cda0 100644 --- a/src/impl/faults/NServiceBus.Faults.NHibernate/ConfigureNHibernateFaultManager.cs +++ b/src/impl/faults/NServiceBus.Faults.NHibernate/ConfigureNHibernateFaultManager.cs @@ -1,132 +1,132 @@ -using System; -using System.Linq; -using System.Collections.Generic; -using FluentNHibernate.Cfg; -using FluentNHibernate.Cfg.Db; -using NServiceBus.Faults.NHibernate; -using NServiceBus.ObjectBuilder; -using NHibernate.Cfg; -using NHibernate.ByteCode.LinFu; -using NHibernate; -using NHibernate.Tool.hbm2ddl; -using Environment=NHibernate.Cfg.Environment; - -namespace NServiceBus -{ - /// - /// Configures fault handling using database/NHibernate fault manager. - /// - public static class ConfigureNHibernateFaultManager - { - /// - /// Configures NServiceBus to persists fault information in database using default NHibernate configuration. - /// - /// - /// - public static Configure NHibernateFaultManager(this Configure config) - { - return NHibernateFaultManager(config, false); - } - - /// - /// Configures NServiceBus to persists fault information in database using default NHibernate configuration. - /// - /// - /// Should fault information tables be re-created at start time? - /// - public static Configure NHibernateFaultManager(this Configure config, bool autoUpdateSchema) - { - config.Configurer.RegisterSingleton( - CreateSessionFactory(new Configuration().Configure(), autoUpdateSchema)); - - config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); - return config; - } - - /// - /// Configures NServiceBus to persists fault information in database using named NHibernate configuration section. - /// Provided section should be of type . - /// - /// - /// Name of NHibernate configuration section to use. - /// - public static Configure NHibernateFaultManager(this Configure config, string hibernateSectionName) - { - return NHibernateFaultManager(config, hibernateSectionName, false); - } - - /// - /// Configures NServiceBus to persists fault information in database using named NHibernate configuration section. - /// Provided section should be of type . - /// - /// - /// Name of NHibernate configuration section to use. - /// Should fault information tables be re-created at start time? - /// - public static Configure NHibernateFaultManager(this Configure config, string hibernateSectionName, bool autoUpdateSchema) - { - if (hibernateSectionName == null) - { - throw new ArgumentNullException("hibernateSectionName"); - } - config.Configurer.RegisterSingleton( - CreateSessionFactory(new MultiConfiguration().ConfigureFromNamedSection(hibernateSectionName), autoUpdateSchema)); - config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); - return config; - } - - /// - /// Configures NServiceBus to persists fault information in SQLite database. Persistence schema will be automatically generated. - /// - /// - /// - public static Configure NHibernateFaultManagerWithSQLiteAndAutomaticSchemaGeneration(this Configure config) - { - Configuration configuration = new Configuration().SetProperties( - SQLiteConfiguration.Standard - .UsingFile(".\\NServiceBus.Sagas.sqlite") - .ProxyFactoryFactory(typeof (ProxyFactoryFactory).AssemblyQualifiedName).ToProperties()); - - config.Configurer.RegisterSingleton( - CreateSessionFactory(configuration, true)); - config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); - return config; - } - - - internal static FaultManagerSessionFactory CreateSessionFactory(Configuration cfg, bool autoUpdateSchema) - { - cfg.AddAssembly(typeof(FailureInfo).Assembly); - - FluentConfiguration fluentConfiguration = - Fluently.Configure(cfg).Mappings(m => m.FluentMappings.Add()); - - fluentConfiguration.ExposeConfiguration( - c => - { - //default to LinFu if not specifed by user - if (!c.Properties.Keys.Contains(Environment.ProxyFactoryFactoryClass)) - { - c.SetProperty(Environment.ProxyFactoryFactoryClass, - typeof(ProxyFactoryFactory).AssemblyQualifiedName); - } - }); - - if (autoUpdateSchema) - { - UpdateDatabaseSchemaUsing(fluentConfiguration); - } - - ISessionFactory factory = fluentConfiguration.BuildSessionFactory(); - return new FaultManagerSessionFactory(factory); - } - - private static void UpdateDatabaseSchemaUsing(FluentConfiguration fluentConfiguration) - { - var configuration = fluentConfiguration.BuildConfiguration(); - - new SchemaUpdate(configuration) - .Execute(false, true); - } - } +using System; +using System.Linq; +using System.Collections.Generic; +using FluentNHibernate.Cfg; +using FluentNHibernate.Cfg.Db; +using NServiceBus.Faults.NHibernate; +using NServiceBus.ObjectBuilder; +using NHibernate.Cfg; +using NHibernate.ByteCode.LinFu; +using NHibernate; +using NHibernate.Tool.hbm2ddl; +using Environment=NHibernate.Cfg.Environment; + +namespace NServiceBus +{ + /// + /// Configures fault handling using database/NHibernate fault manager. + /// + public static class ConfigureNHibernateFaultManager + { + /// + /// Configures NServiceBus to persists fault information in database using default NHibernate configuration. + /// + /// + /// + public static Configure NHibernateFaultManager(this Configure config) + { + return NHibernateFaultManager(config, false); + } + + /// + /// Configures NServiceBus to persists fault information in database using default NHibernate configuration. + /// + /// + /// Should fault information tables be re-created at start time? + /// + public static Configure NHibernateFaultManager(this Configure config, bool autoUpdateSchema) + { + config.Configurer.RegisterSingleton( + CreateSessionFactory(new Configuration().Configure(), autoUpdateSchema)); + + config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); + return config; + } + + /// + /// Configures NServiceBus to persists fault information in database using named NHibernate configuration section. + /// Provided section should be of type . + /// + /// + /// Name of NHibernate configuration section to use. + /// + public static Configure NHibernateFaultManager(this Configure config, string hibernateSectionName) + { + return NHibernateFaultManager(config, hibernateSectionName, false); + } + + /// + /// Configures NServiceBus to persists fault information in database using named NHibernate configuration section. + /// Provided section should be of type . + /// + /// + /// Name of NHibernate configuration section to use. + /// Should fault information tables be re-created at start time? + /// + public static Configure NHibernateFaultManager(this Configure config, string hibernateSectionName, bool autoUpdateSchema) + { + if (hibernateSectionName == null) + { + throw new ArgumentNullException("hibernateSectionName"); + } + config.Configurer.RegisterSingleton( + CreateSessionFactory(new MultiConfiguration().ConfigureFromNamedSection(hibernateSectionName), autoUpdateSchema)); + config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); + return config; + } + + /// + /// Configures NServiceBus to persists fault information in SQLite database. Persistence schema will be automatically generated. + /// + /// + /// + public static Configure NHibernateFaultManagerWithSQLiteAndAutomaticSchemaGeneration(this Configure config) + { + Configuration configuration = new Configuration().SetProperties( + SQLiteConfiguration.Standard + .UsingFile(".\\NServiceBus.Sagas.sqlite") + .ProxyFactoryFactory(typeof (ProxyFactoryFactory).AssemblyQualifiedName).ToProperties()); + + config.Configurer.RegisterSingleton( + CreateSessionFactory(configuration, true)); + config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); + return config; + } + + + internal static FaultManagerSessionFactory CreateSessionFactory(Configuration cfg, bool autoUpdateSchema) + { + cfg.AddAssembly(typeof(FailureInfo).Assembly); + + FluentConfiguration fluentConfiguration = + Fluently.Configure(cfg).Mappings(m => m.FluentMappings.Add()); + + fluentConfiguration.ExposeConfiguration( + c => + { + //default to LinFu if not specifed by user + if (!c.Properties.Keys.Contains(Environment.ProxyFactoryFactoryClass)) + { + c.SetProperty(Environment.ProxyFactoryFactoryClass, + typeof(ProxyFactoryFactory).AssemblyQualifiedName); + } + }); + + if (autoUpdateSchema) + { + UpdateDatabaseSchemaUsing(fluentConfiguration); + } + + ISessionFactory factory = fluentConfiguration.BuildSessionFactory(); + return new FaultManagerSessionFactory(factory); + } + + private static void UpdateDatabaseSchemaUsing(FluentConfiguration fluentConfiguration) + { + var configuration = fluentConfiguration.BuildConfiguration(); + + new SchemaUpdate(configuration) + .Execute(false, true); + } + } } \ No newline at end of file diff --git a/src/impl/faults/NServiceBus.Faults.NHibernate/FailureInfo.cs b/src/impl/faults/NServiceBus.Faults.NHibernate/FailureInfo.cs index a266636eefa..423fab8431b 100644 --- a/src/impl/faults/NServiceBus.Faults.NHibernate/FailureInfo.cs +++ b/src/impl/faults/NServiceBus.Faults.NHibernate/FailureInfo.cs @@ -1,62 +1,62 @@ -using System; -using System.Linq; -using System.Collections.Generic; -using System.Text; -using FluentNHibernate.Mapping; -using NServiceBus.Unicast.Transport; - -namespace NServiceBus.Faults.NHibernate -{ - public class FailureInfo - { - public Guid Id { get; set; } - public bool IsSerializationFailure { get; set; } - public string ReturnAddress { get; set; } - public TransportMessage Message { get; set; } - public Exception Exception { get; set; } - public string TopmostExceptionMessage { get; set; } - public string StackTraces { get; set; } - - public FailureInfo(TransportMessage message, Exception exception, bool serializationFailure) - { - Message = message; - Exception = exception; - ReturnAddress = message.ReturnAddress; - TopmostExceptionMessage = exception.Message; - IsSerializationFailure = serializationFailure; - StackTraces = CombineStackTraces(exception); - } - - private static string CombineStackTraces(Exception exception) - { - StringBuilder traces = new StringBuilder(); - traces.Append(exception.StackTrace); - exception = exception.InnerException; - while (exception != null) - { - traces.AppendFormat("-- INNER EXCEPTION --{0}",Environment.NewLine); - traces.Append(exception.StackTrace); - exception = exception.InnerException; - } - return traces.ToString(); - } - - protected FailureInfo() - {} - } - - public class FailureInfoMap : ClassMap - { - public FailureInfoMap() - { - Not.LazyLoad(); - Id(x => x.Id).GeneratedBy.GuidComb(); - Map(x => x.IsSerializationFailure).Not.Nullable(); - Map(x => x.ReturnAddress).Length(1000).Not.Nullable(); - Map(x => x.Message).CustomType("Serializable").Length(8001).Not.Nullable(); - Map(x => x.Exception).CustomType("Serializable").Length(8001).Not.Nullable(); - Map(x => x.TopmostExceptionMessage).Length(8001); - Map(x => x.StackTraces).Length(8001).Not.Nullable(); - } - } +using System; +using System.Linq; +using System.Collections.Generic; +using System.Text; +using FluentNHibernate.Mapping; +using NServiceBus.Unicast.Transport; + +namespace NServiceBus.Faults.NHibernate +{ + public class FailureInfo + { + public Guid Id { get; set; } + public bool IsSerializationFailure { get; set; } + public string ReturnAddress { get; set; } + public TransportMessage Message { get; set; } + public Exception Exception { get; set; } + public string TopmostExceptionMessage { get; set; } + public string StackTraces { get; set; } + + public FailureInfo(TransportMessage message, Exception exception, bool serializationFailure) + { + Message = message; + Exception = exception; + ReturnAddress = message.ReturnAddress; + TopmostExceptionMessage = exception.Message; + IsSerializationFailure = serializationFailure; + StackTraces = CombineStackTraces(exception); + } + + private static string CombineStackTraces(Exception exception) + { + StringBuilder traces = new StringBuilder(); + traces.Append(exception.StackTrace); + exception = exception.InnerException; + while (exception != null) + { + traces.AppendFormat("-- INNER EXCEPTION --{0}",Environment.NewLine); + traces.Append(exception.StackTrace); + exception = exception.InnerException; + } + return traces.ToString(); + } + + protected FailureInfo() + {} + } + + public class FailureInfoMap : ClassMap + { + public FailureInfoMap() + { + Not.LazyLoad(); + Id(x => x.Id).GeneratedBy.GuidComb(); + Map(x => x.IsSerializationFailure).Not.Nullable(); + Map(x => x.ReturnAddress).Length(1000).Not.Nullable(); + Map(x => x.Message).CustomType("Serializable").Length(8001).Not.Nullable(); + Map(x => x.Exception).CustomType("Serializable").Length(8001).Not.Nullable(); + Map(x => x.TopmostExceptionMessage).Length(8001); + Map(x => x.StackTraces).Length(8001).Not.Nullable(); + } + } } \ No newline at end of file diff --git a/src/impl/faults/NServiceBus.Faults.NHibernate/FaultManager.cs b/src/impl/faults/NServiceBus.Faults.NHibernate/FaultManager.cs index affb64853b4..0a29f5f0696 100644 --- a/src/impl/faults/NServiceBus.Faults.NHibernate/FaultManager.cs +++ b/src/impl/faults/NServiceBus.Faults.NHibernate/FaultManager.cs @@ -1,51 +1,51 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Common.Logging; -using NHibernate; -using NServiceBus.Unicast.Transport; - -namespace NServiceBus.Faults.NHibernate -{ - /// - /// Implementation of fault manager which persists failure information in the database using NHibernate. - /// - public class FaultManager : IManageMessageFailures - { - private readonly ISessionFactory _sessionFactory; - - public FaultManager(FaultManagerSessionFactory sessionFactory) - { - _sessionFactory = sessionFactory.Value; - } - - public void SerializationFailedForMessage(TransportMessage message, Exception e) - { - if (_logger.IsDebugEnabled) - { - _logger.Debug(string.Format("Serialization failed for message {0} -- persisting to failure store.", message.Id)); - } - Save(new FailureInfo(message, e, true)); - } - - public void ProcessingAlwaysFailsForMessage(TransportMessage message, Exception e) - { - if (_logger.IsDebugEnabled) - { - _logger.Debug(string.Format("All processing attempts failed for message {0} -- pesisting to failure store.", message.Id)); - } - Save(new FailureInfo(message, e, false)); - } - - private void Save(FailureInfo info) - { - using (IStatelessSession statelessSession = _sessionFactory.OpenStatelessSession()) - { - statelessSession.Insert(info); - } - } - - private readonly ILog _logger = LogManager.GetLogger(typeof (FaultManager)); - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Common.Logging; +using NHibernate; +using NServiceBus.Unicast.Transport; + +namespace NServiceBus.Faults.NHibernate +{ + /// + /// Implementation of fault manager which persists failure information in the database using NHibernate. + /// + public class FaultManager : IManageMessageFailures + { + private readonly ISessionFactory _sessionFactory; + + public FaultManager(FaultManagerSessionFactory sessionFactory) + { + _sessionFactory = sessionFactory.Value; + } + + public void SerializationFailedForMessage(TransportMessage message, Exception e) + { + if (_logger.IsDebugEnabled) + { + _logger.Debug(string.Format("Serialization failed for message {0} -- persisting to failure store.", message.Id)); + } + Save(new FailureInfo(message, e, true)); + } + + public void ProcessingAlwaysFailsForMessage(TransportMessage message, Exception e) + { + if (_logger.IsDebugEnabled) + { + _logger.Debug(string.Format("All processing attempts failed for message {0} -- pesisting to failure store.", message.Id)); + } + Save(new FailureInfo(message, e, false)); + } + + private void Save(FailureInfo info) + { + using (IStatelessSession statelessSession = _sessionFactory.OpenStatelessSession()) + { + statelessSession.Insert(info); + } + } + + private readonly ILog _logger = LogManager.GetLogger(typeof (FaultManager)); + } +} diff --git a/src/impl/faults/NServiceBus.Faults.NHibernate/FaultManagerSessionFactory.cs b/src/impl/faults/NServiceBus.Faults.NHibernate/FaultManagerSessionFactory.cs index e04dadc17c1..636b8cce657 100644 --- a/src/impl/faults/NServiceBus.Faults.NHibernate/FaultManagerSessionFactory.cs +++ b/src/impl/faults/NServiceBus.Faults.NHibernate/FaultManagerSessionFactory.cs @@ -1,25 +1,25 @@ -using System; -using System.Linq; -using System.Collections.Generic; -using NHibernate; - -namespace NServiceBus.Faults.NHibernate -{ - /// - /// Wrapper for ISessionFactory used in fault handling. - /// - public class FaultManagerSessionFactory - { - private readonly ISessionFactory _value; - - public FaultManagerSessionFactory(ISessionFactory value) - { - _value = value; - } - - public ISessionFactory Value - { - get { return _value; } - } - } +using System; +using System.Linq; +using System.Collections.Generic; +using NHibernate; + +namespace NServiceBus.Faults.NHibernate +{ + /// + /// Wrapper for ISessionFactory used in fault handling. + /// + public class FaultManagerSessionFactory + { + private readonly ISessionFactory _value; + + public FaultManagerSessionFactory(ISessionFactory value) + { + _value = value; + } + + public ISessionFactory Value + { + get { return _value; } + } + } } \ No newline at end of file diff --git a/src/impl/faults/NServiceBus.Faults.NHibernate/MultiConfiguration.cs b/src/impl/faults/NServiceBus.Faults.NHibernate/MultiConfiguration.cs index 6903ff0d20a..e58d5e8b9b0 100644 --- a/src/impl/faults/NServiceBus.Faults.NHibernate/MultiConfiguration.cs +++ b/src/impl/faults/NServiceBus.Faults.NHibernate/MultiConfiguration.cs @@ -1,24 +1,24 @@ -using System; -using System.Configuration; -using System.Linq; -using System.Collections.Generic; -using NHibernate.Cfg; -using NHibernate.Cfg.ConfigurationSchema; -using Configuration=NHibernate.Cfg.Configuration; - -namespace NServiceBus.Faults.NHibernate -{ - public class MultiConfiguration : Configuration - { - public Configuration ConfigureFromNamedSection(string sectionName) - { - var hc = ConfigurationManager.GetSection(sectionName) as IHibernateConfiguration; - if (hc == null || hc.SessionFactory == null) - { - throw new ConfigurationErrorsException( - string.Format("Configuration section {0} either doesn't exist or is not NHibernate's config section.", sectionName)); - } - return DoConfigure(hc); - } - } +using System; +using System.Configuration; +using System.Linq; +using System.Collections.Generic; +using NHibernate.Cfg; +using NHibernate.Cfg.ConfigurationSchema; +using Configuration=NHibernate.Cfg.Configuration; + +namespace NServiceBus.Faults.NHibernate +{ + public class MultiConfiguration : Configuration + { + public Configuration ConfigureFromNamedSection(string sectionName) + { + var hc = ConfigurationManager.GetSection(sectionName) as IHibernateConfiguration; + if (hc == null || hc.SessionFactory == null) + { + throw new ConfigurationErrorsException( + string.Format("Configuration section {0} either doesn't exist or is not NHibernate's config section.", sectionName)); + } + return DoConfigure(hc); + } + } } \ No newline at end of file diff --git a/src/impl/faults/NServiceBus.Faults.NHibernate/NServiceBus.Faults.NHibernate.csproj b/src/impl/faults/NServiceBus.Faults.NHibernate/NServiceBus.Faults.NHibernate.csproj index d8e9650d1f4..c72d6214be7 100644 --- a/src/impl/faults/NServiceBus.Faults.NHibernate/NServiceBus.Faults.NHibernate.csproj +++ b/src/impl/faults/NServiceBus.Faults.NHibernate/NServiceBus.Faults.NHibernate.csproj @@ -1,140 +1,140 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {C36B4747-C5EB-4FA3-BF1F-78B8912BD58C} - Library - Properties - NServiceBus.Faults.NHibernate - NServiceBus.Faults.NHibernate - v4.0 - 512 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\..\lib\Common.Logging.dll - False - - - False - ..\..\..\..\lib\FluentNHibernate\FluentNHibernate.dll - False - - - False - ..\..\..\..\lib\NHibernate.dll - False - - - False - ..\..\..\..\lib\NHibernate.ByteCode.LinFu.dll - False - - - False - ..\..\..\..\build\output\NServiceBus.dll - False - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll - False - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.Faults.dll - False - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll - False - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll - False - - - - - 3.5 - - - - - - CommonAssemblyInfo.cs - - - - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {C36B4747-C5EB-4FA3-BF1F-78B8912BD58C} + Library + Properties + NServiceBus.Faults.NHibernate + NServiceBus.Faults.NHibernate + v4.0 + 512 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\..\lib\Common.Logging.dll + False + + + False + ..\..\..\..\lib\FluentNHibernate\FluentNHibernate.dll + False + + + False + ..\..\..\..\lib\NHibernate.dll + False + + + False + ..\..\..\..\lib\NHibernate.ByteCode.LinFu.dll + False + + + False + ..\..\..\..\build\output\NServiceBus.dll + False + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll + False + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.Faults.dll + False + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll + False + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll + False + + + + + 3.5 + + + + + + CommonAssemblyInfo.cs + + + + + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + \ No newline at end of file diff --git a/src/impl/faults/NServiceBus.Faults.NHibernate/Properties/AssemblyInfo.cs b/src/impl/faults/NServiceBus.Faults.NHibernate/Properties/AssemblyInfo.cs index 13df304f541..4b1f8cd551b 100644 --- a/src/impl/faults/NServiceBus.Faults.NHibernate/Properties/AssemblyInfo.cs +++ b/src/impl/faults/NServiceBus.Faults.NHibernate/Properties/AssemblyInfo.cs @@ -1,26 +1,26 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -using System.Runtime.CompilerServices; - -[assembly: AssemblyTitle("NServiceBus database/NHibernate fault management.")] -[assembly: AssemblyDescription("Database/NHibernate implementation of fault management capabilities in NServiceBus.")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +using System.Runtime.CompilerServices; + +[assembly: AssemblyTitle("NServiceBus database/NHibernate fault management.")] +[assembly: AssemblyDescription("Database/NHibernate implementation of fault management capabilities in NServiceBus.")] [assembly: InternalsVisibleTo("NServiceBus.Faults.NHibernate.Tests")] \ No newline at end of file diff --git a/src/impl/faults/NServiceBus.Faults.sln b/src/impl/faults/NServiceBus.Faults.sln index 01d6e7d156e..0f7bdecc152 100644 --- a/src/impl/faults/NServiceBus.Faults.sln +++ b/src/impl/faults/NServiceBus.Faults.sln @@ -1,50 +1,50 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Faults.InMemory", "NServiceBus.Faults.InMemory\NServiceBus.Faults.InMemory.csproj", "{192A06E8-1BFE-4D03-9902-B8F529EDE6F4}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Faults.Forwarder", "NServiceBus.Faults.Forwarder\NServiceBus.Faults.Forwarder.csproj", "{81D0B1CB-9620-4C0E-ACDA-7ABB6359FB74}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Faults.Forwarder.Config", "NServiceBus.Faults.Forwarder.Config\NServiceBus.Faults.Forwarder.Config.csproj", "{7CDCE732-D913-4F7D-89CA-4BF4FA3A9405}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Faults.InMemory.Config", "NServiceBus.Faults.InMemory.Config\NServiceBus.Faults.InMemory.Config.csproj", "{7604F70B-DDF2-474A-97E7-6FB1C888D2FA}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Faults.NHibernate", "NServiceBus.Faults.NHibernate\NServiceBus.Faults.NHibernate.csproj", "{C36B4747-C5EB-4FA3-BF1F-78B8912BD58C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Faults.NHibernate.Tests", "NServiceBus.Faults.NHibernate.Tests\NServiceBus.Faults.NHibernate.Tests.csproj", "{14D55316-91EC-4BDF-B990-614BAE2BE8DC}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {192A06E8-1BFE-4D03-9902-B8F529EDE6F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {192A06E8-1BFE-4D03-9902-B8F529EDE6F4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {192A06E8-1BFE-4D03-9902-B8F529EDE6F4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {192A06E8-1BFE-4D03-9902-B8F529EDE6F4}.Release|Any CPU.Build.0 = Release|Any CPU - {81D0B1CB-9620-4C0E-ACDA-7ABB6359FB74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {81D0B1CB-9620-4C0E-ACDA-7ABB6359FB74}.Debug|Any CPU.Build.0 = Debug|Any CPU - {81D0B1CB-9620-4C0E-ACDA-7ABB6359FB74}.Release|Any CPU.ActiveCfg = Release|Any CPU - {81D0B1CB-9620-4C0E-ACDA-7ABB6359FB74}.Release|Any CPU.Build.0 = Release|Any CPU - {7CDCE732-D913-4F7D-89CA-4BF4FA3A9405}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7CDCE732-D913-4F7D-89CA-4BF4FA3A9405}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7CDCE732-D913-4F7D-89CA-4BF4FA3A9405}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7CDCE732-D913-4F7D-89CA-4BF4FA3A9405}.Release|Any CPU.Build.0 = Release|Any CPU - {7604F70B-DDF2-474A-97E7-6FB1C888D2FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7604F70B-DDF2-474A-97E7-6FB1C888D2FA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7604F70B-DDF2-474A-97E7-6FB1C888D2FA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7604F70B-DDF2-474A-97E7-6FB1C888D2FA}.Release|Any CPU.Build.0 = Release|Any CPU - {C36B4747-C5EB-4FA3-BF1F-78B8912BD58C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C36B4747-C5EB-4FA3-BF1F-78B8912BD58C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C36B4747-C5EB-4FA3-BF1F-78B8912BD58C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C36B4747-C5EB-4FA3-BF1F-78B8912BD58C}.Release|Any CPU.Build.0 = Release|Any CPU - {14D55316-91EC-4BDF-B990-614BAE2BE8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {14D55316-91EC-4BDF-B990-614BAE2BE8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU - {14D55316-91EC-4BDF-B990-614BAE2BE8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU - {14D55316-91EC-4BDF-B990-614BAE2BE8DC}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Faults.InMemory", "NServiceBus.Faults.InMemory\NServiceBus.Faults.InMemory.csproj", "{192A06E8-1BFE-4D03-9902-B8F529EDE6F4}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Faults.Forwarder", "NServiceBus.Faults.Forwarder\NServiceBus.Faults.Forwarder.csproj", "{81D0B1CB-9620-4C0E-ACDA-7ABB6359FB74}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Faults.Forwarder.Config", "NServiceBus.Faults.Forwarder.Config\NServiceBus.Faults.Forwarder.Config.csproj", "{7CDCE732-D913-4F7D-89CA-4BF4FA3A9405}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Faults.InMemory.Config", "NServiceBus.Faults.InMemory.Config\NServiceBus.Faults.InMemory.Config.csproj", "{7604F70B-DDF2-474A-97E7-6FB1C888D2FA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Faults.NHibernate", "NServiceBus.Faults.NHibernate\NServiceBus.Faults.NHibernate.csproj", "{C36B4747-C5EB-4FA3-BF1F-78B8912BD58C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Faults.NHibernate.Tests", "NServiceBus.Faults.NHibernate.Tests\NServiceBus.Faults.NHibernate.Tests.csproj", "{14D55316-91EC-4BDF-B990-614BAE2BE8DC}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {192A06E8-1BFE-4D03-9902-B8F529EDE6F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {192A06E8-1BFE-4D03-9902-B8F529EDE6F4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {192A06E8-1BFE-4D03-9902-B8F529EDE6F4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {192A06E8-1BFE-4D03-9902-B8F529EDE6F4}.Release|Any CPU.Build.0 = Release|Any CPU + {81D0B1CB-9620-4C0E-ACDA-7ABB6359FB74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {81D0B1CB-9620-4C0E-ACDA-7ABB6359FB74}.Debug|Any CPU.Build.0 = Debug|Any CPU + {81D0B1CB-9620-4C0E-ACDA-7ABB6359FB74}.Release|Any CPU.ActiveCfg = Release|Any CPU + {81D0B1CB-9620-4C0E-ACDA-7ABB6359FB74}.Release|Any CPU.Build.0 = Release|Any CPU + {7CDCE732-D913-4F7D-89CA-4BF4FA3A9405}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7CDCE732-D913-4F7D-89CA-4BF4FA3A9405}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7CDCE732-D913-4F7D-89CA-4BF4FA3A9405}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7CDCE732-D913-4F7D-89CA-4BF4FA3A9405}.Release|Any CPU.Build.0 = Release|Any CPU + {7604F70B-DDF2-474A-97E7-6FB1C888D2FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7604F70B-DDF2-474A-97E7-6FB1C888D2FA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7604F70B-DDF2-474A-97E7-6FB1C888D2FA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7604F70B-DDF2-474A-97E7-6FB1C888D2FA}.Release|Any CPU.Build.0 = Release|Any CPU + {C36B4747-C5EB-4FA3-BF1F-78B8912BD58C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C36B4747-C5EB-4FA3-BF1F-78B8912BD58C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C36B4747-C5EB-4FA3-BF1F-78B8912BD58C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C36B4747-C5EB-4FA3-BF1F-78B8912BD58C}.Release|Any CPU.Build.0 = Release|Any CPU + {14D55316-91EC-4BDF-B990-614BAE2BE8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {14D55316-91EC-4BDF-B990-614BAE2BE8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {14D55316-91EC-4BDF-B990-614BAE2BE8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {14D55316-91EC-4BDF-B990-614BAE2BE8DC}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/impl/messageInterfaces/NServiceBus.MessageInterfaces.MessageMapper.Reflection/MessageMapper.cs b/src/impl/messageInterfaces/NServiceBus.MessageInterfaces.MessageMapper.Reflection/MessageMapper.cs index 23a792ccf97..28a5c0d22e3 100644 --- a/src/impl/messageInterfaces/NServiceBus.MessageInterfaces.MessageMapper.Reflection/MessageMapper.cs +++ b/src/impl/messageInterfaces/NServiceBus.MessageInterfaces.MessageMapper.Reflection/MessageMapper.cs @@ -1,308 +1,308 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Reflection; -using System.Reflection.Emit; -using System.Runtime.Serialization; -using System.Linq; -using Common.Logging; -using NServiceBus.Utils.Reflection; - -namespace NServiceBus.MessageInterfaces.MessageMapper.Reflection -{ - /// - /// Uses reflection to map between interfaces and their generated concrete implementations. - /// - public class MessageMapper : IMessageMapper - { - /// - /// Scans the given types generating concrete classes for interfaces. - /// - /// - public void Initialize(IEnumerable types) - { - if (types == null || types.Count() == 0) - return; - - string name = types.First().Namespace + SUFFIX; - - AssemblyBuilder assemblyBuilder = AppDomain.CurrentDomain.DefineDynamicAssembly( - new AssemblyName(name), - AssemblyBuilderAccess.Run - ); - - ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule(name); - - foreach (Type t in types) - InitType(t, moduleBuilder); - } - - /// - /// Generates a concrete implementation of the given type if it is an interface. - /// - /// - /// - public void InitType(Type t, ModuleBuilder moduleBuilder) - { - if (t == null) - return; - - if (t.IsSimpleType()) - return; - - if (typeof(IEnumerable).IsAssignableFrom(t)) - { - InitType(t.GetElementType(), moduleBuilder); - - foreach (var interfaceType in t.GetInterfaces()) - { - foreach (var g in interfaceType.GetGenericArguments()) - InitType(g, moduleBuilder); - - continue; - } - - return; - } - - var typeName = GetTypeName(t); - - //already handled this type, prevent infinite recursion - if (nameToType.ContainsKey(typeName)) - return; - - if (t.IsInterface) - { - GenerateImplementationFor(t, moduleBuilder); - } - else - typeToConstructor[t] = t.GetConstructor(Type.EmptyTypes); - - nameToType[typeName] = t; - - foreach (FieldInfo field in t.GetFields(BindingFlags.Public | BindingFlags.Instance | BindingFlags.FlattenHierarchy)) - InitType(field.FieldType, moduleBuilder); - - foreach (PropertyInfo prop in t.GetProperties()) - InitType(prop.PropertyType, moduleBuilder); - } - - void GenerateImplementationFor(Type interfaceType, ModuleBuilder moduleBuilder) - { - if (interfaceType.GetMethods().Any(mi => !(mi.IsSpecialName && (mi.Name.StartsWith("set_") || mi.Name.StartsWith("get_"))))) - { - Logger.Warn(string.Format("Interface {0} contains methods and can there for not be mapped. Be aware that non mapped interface can't be used to send messages.",interfaceType.Name)); - return; - } - var mapped = CreateTypeFrom(interfaceType, moduleBuilder); - interfaceToConcreteTypeMapping[interfaceType] = mapped; - concreteToInterfaceTypeMapping[mapped] = interfaceType; - typeToConstructor[mapped] = mapped.GetConstructor(Type.EmptyTypes); - } - - private static string GetTypeName(Type t) - { - var args = t.GetGenericArguments(); - if (args.Length == 2) - if (typeof(KeyValuePair<,>).MakeGenericType(args) == t) - return t.SerializationFriendlyName(); - - return t.FullName; - } - - /// - /// Generates a new full name for a type to be generated for the given type. - /// - /// - /// - public string GetNewTypeName(Type t) - { - return t.Namespace + SUFFIX + "." + t.Name; - } - - /// - /// Generates the concrete implementation of the given type. - /// Only properties on the given type are generated in the concrete implementation. - /// - /// - /// - /// - public Type CreateTypeFrom(Type t, ModuleBuilder moduleBuilder) - { - TypeBuilder typeBuilder = moduleBuilder.DefineType( - GetNewTypeName(t), - TypeAttributes.Serializable | TypeAttributes.Class | TypeAttributes.Public | TypeAttributes.Sealed, - typeof(object) - ); - - typeBuilder.DefineDefaultConstructor(MethodAttributes.Public); - - foreach (PropertyInfo prop in GetAllProperties(t)) - { - Type propertyType = prop.PropertyType; - - FieldBuilder fieldBuilder = typeBuilder.DefineField( - "field_" + prop.Name, - propertyType, - FieldAttributes.Private); - - PropertyBuilder propBuilder = typeBuilder.DefineProperty( - prop.Name, - prop.Attributes | PropertyAttributes.HasDefault, - propertyType, - null); - - MethodBuilder getMethodBuilder = typeBuilder.DefineMethod( - "get_" + prop.Name, - MethodAttributes.Public | MethodAttributes.SpecialName | MethodAttributes.HideBySig | MethodAttributes.Final | MethodAttributes.Virtual | MethodAttributes.VtableLayoutMask, - propertyType, - Type.EmptyTypes); - - ILGenerator getIL = getMethodBuilder.GetILGenerator(); - // For an instance property, argument zero is the instance. Load the - // instance, then load the private field and return, leaving the - // field value on the stack. - getIL.Emit(OpCodes.Ldarg_0); - getIL.Emit(OpCodes.Ldfld, fieldBuilder); - getIL.Emit(OpCodes.Ret); - - // Define the "set" accessor method for Number, which has no return - // type and takes one argument of type int (Int32). - MethodBuilder setMethodBuilder = typeBuilder.DefineMethod( - "set_" + prop.Name, - getMethodBuilder.Attributes, - null, - new Type[] { propertyType }); - - ILGenerator setIL = setMethodBuilder.GetILGenerator(); - // Load the instance and then the numeric argument, then store the - // argument in the field. - setIL.Emit(OpCodes.Ldarg_0); - setIL.Emit(OpCodes.Ldarg_1); - setIL.Emit(OpCodes.Stfld, fieldBuilder); - setIL.Emit(OpCodes.Ret); - - // Last, map the "get" and "set" accessor methods to the - // PropertyBuilder. The property is now complete. - propBuilder.SetGetMethod(getMethodBuilder); - propBuilder.SetSetMethod(setMethodBuilder); - } - - typeBuilder.AddInterfaceImplementation(t); - - return typeBuilder.CreateType(); - } - - /// - /// Returns all properties on the given type, going up the inheritance - /// hierarchy. - /// - /// - /// - private IEnumerable GetAllProperties(Type t) - { - var result = new List(t.GetProperties()); - foreach (var interfaceType in t.GetInterfaces()) - foreach (var prop in GetAllProperties(interfaceType)) - if (!result.Contains(prop)) - result.Add(prop); - - return result; - } - - /// - /// If the given type is concrete, returns the interface it was generated to support. - /// If the given type is an interface, returns the concrete class generated to implement it. - /// - /// - /// - public Type GetMappedTypeFor(Type t) - { - if (t.IsClass) - { - Type result; - concreteToInterfaceTypeMapping.TryGetValue(t, out result); - if (result != null) - return result; - - return t; - } - - Type toReturn = null; - interfaceToConcreteTypeMapping.TryGetValue(t, out toReturn); - - return toReturn; - } - - /// - /// Returns the type mapped to the given name. - /// - /// - /// - public Type GetMappedTypeFor(string typeName) - { - if (nameToType.ContainsKey(typeName)) - return nameToType[typeName]; - - return Type.GetType(typeName); - } - - /// - /// Calls the generic CreateInstance and performs the given - /// action on the result. - /// - /// - /// - /// - public T CreateInstance(Action action) where T : IMessage - { - T result = CreateInstance(); - action(result); - - return result; - } - - /// - /// Calls the non-generic CreateInstance and returns its result - /// cast to T. - /// - /// - /// - public T CreateInstance() where T : IMessage - { - return (T)CreateInstance(typeof(T)); - } - - /// - /// If the given type is an interface, finds its generated concrete - /// implementation, instantiates it, and returns the result. - /// - /// - /// - public object CreateInstance(Type t) - { - Type mapped = t; - if (t.IsInterface || t.IsAbstract) - { - mapped = GetMappedTypeFor(t); - if (mapped == null) - throw new ArgumentException("Could not find a concrete type mapped to " + t.FullName); - } - - ConstructorInfo constructor = null; - typeToConstructor.TryGetValue(mapped, out constructor); - if (constructor != null) - return constructor.Invoke(null); - - return FormatterServices.GetUninitializedObject(mapped); - } - - private static readonly string SUFFIX = ".__Impl"; - private static readonly Dictionary interfaceToConcreteTypeMapping = new Dictionary(); - private static readonly Dictionary concreteToInterfaceTypeMapping = new Dictionary(); - private static readonly Dictionary nameToType = new Dictionary(); - private static readonly Dictionary typeToConstructor = new Dictionary(); - private static ILog Logger = LogManager.GetLogger("MessageMapper"); - - } -} +using System; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using System.Reflection.Emit; +using System.Runtime.Serialization; +using System.Linq; +using Common.Logging; +using NServiceBus.Utils.Reflection; + +namespace NServiceBus.MessageInterfaces.MessageMapper.Reflection +{ + /// + /// Uses reflection to map between interfaces and their generated concrete implementations. + /// + public class MessageMapper : IMessageMapper + { + /// + /// Scans the given types generating concrete classes for interfaces. + /// + /// + public void Initialize(IEnumerable types) + { + if (types == null || types.Count() == 0) + return; + + string name = types.First().Namespace + SUFFIX; + + AssemblyBuilder assemblyBuilder = AppDomain.CurrentDomain.DefineDynamicAssembly( + new AssemblyName(name), + AssemblyBuilderAccess.Run + ); + + ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule(name); + + foreach (Type t in types) + InitType(t, moduleBuilder); + } + + /// + /// Generates a concrete implementation of the given type if it is an interface. + /// + /// + /// + public void InitType(Type t, ModuleBuilder moduleBuilder) + { + if (t == null) + return; + + if (t.IsSimpleType()) + return; + + if (typeof(IEnumerable).IsAssignableFrom(t)) + { + InitType(t.GetElementType(), moduleBuilder); + + foreach (var interfaceType in t.GetInterfaces()) + { + foreach (var g in interfaceType.GetGenericArguments()) + InitType(g, moduleBuilder); + + continue; + } + + return; + } + + var typeName = GetTypeName(t); + + //already handled this type, prevent infinite recursion + if (nameToType.ContainsKey(typeName)) + return; + + if (t.IsInterface) + { + GenerateImplementationFor(t, moduleBuilder); + } + else + typeToConstructor[t] = t.GetConstructor(Type.EmptyTypes); + + nameToType[typeName] = t; + + foreach (FieldInfo field in t.GetFields(BindingFlags.Public | BindingFlags.Instance | BindingFlags.FlattenHierarchy)) + InitType(field.FieldType, moduleBuilder); + + foreach (PropertyInfo prop in t.GetProperties()) + InitType(prop.PropertyType, moduleBuilder); + } + + void GenerateImplementationFor(Type interfaceType, ModuleBuilder moduleBuilder) + { + if (interfaceType.GetMethods().Any(mi => !(mi.IsSpecialName && (mi.Name.StartsWith("set_") || mi.Name.StartsWith("get_"))))) + { + Logger.Warn(string.Format("Interface {0} contains methods and can there for not be mapped. Be aware that non mapped interface can't be used to send messages.",interfaceType.Name)); + return; + } + var mapped = CreateTypeFrom(interfaceType, moduleBuilder); + interfaceToConcreteTypeMapping[interfaceType] = mapped; + concreteToInterfaceTypeMapping[mapped] = interfaceType; + typeToConstructor[mapped] = mapped.GetConstructor(Type.EmptyTypes); + } + + private static string GetTypeName(Type t) + { + var args = t.GetGenericArguments(); + if (args.Length == 2) + if (typeof(KeyValuePair<,>).MakeGenericType(args) == t) + return t.SerializationFriendlyName(); + + return t.FullName; + } + + /// + /// Generates a new full name for a type to be generated for the given type. + /// + /// + /// + public string GetNewTypeName(Type t) + { + return t.Namespace + SUFFIX + "." + t.Name; + } + + /// + /// Generates the concrete implementation of the given type. + /// Only properties on the given type are generated in the concrete implementation. + /// + /// + /// + /// + public Type CreateTypeFrom(Type t, ModuleBuilder moduleBuilder) + { + TypeBuilder typeBuilder = moduleBuilder.DefineType( + GetNewTypeName(t), + TypeAttributes.Serializable | TypeAttributes.Class | TypeAttributes.Public | TypeAttributes.Sealed, + typeof(object) + ); + + typeBuilder.DefineDefaultConstructor(MethodAttributes.Public); + + foreach (PropertyInfo prop in GetAllProperties(t)) + { + Type propertyType = prop.PropertyType; + + FieldBuilder fieldBuilder = typeBuilder.DefineField( + "field_" + prop.Name, + propertyType, + FieldAttributes.Private); + + PropertyBuilder propBuilder = typeBuilder.DefineProperty( + prop.Name, + prop.Attributes | PropertyAttributes.HasDefault, + propertyType, + null); + + MethodBuilder getMethodBuilder = typeBuilder.DefineMethod( + "get_" + prop.Name, + MethodAttributes.Public | MethodAttributes.SpecialName | MethodAttributes.HideBySig | MethodAttributes.Final | MethodAttributes.Virtual | MethodAttributes.VtableLayoutMask, + propertyType, + Type.EmptyTypes); + + ILGenerator getIL = getMethodBuilder.GetILGenerator(); + // For an instance property, argument zero is the instance. Load the + // instance, then load the private field and return, leaving the + // field value on the stack. + getIL.Emit(OpCodes.Ldarg_0); + getIL.Emit(OpCodes.Ldfld, fieldBuilder); + getIL.Emit(OpCodes.Ret); + + // Define the "set" accessor method for Number, which has no return + // type and takes one argument of type int (Int32). + MethodBuilder setMethodBuilder = typeBuilder.DefineMethod( + "set_" + prop.Name, + getMethodBuilder.Attributes, + null, + new Type[] { propertyType }); + + ILGenerator setIL = setMethodBuilder.GetILGenerator(); + // Load the instance and then the numeric argument, then store the + // argument in the field. + setIL.Emit(OpCodes.Ldarg_0); + setIL.Emit(OpCodes.Ldarg_1); + setIL.Emit(OpCodes.Stfld, fieldBuilder); + setIL.Emit(OpCodes.Ret); + + // Last, map the "get" and "set" accessor methods to the + // PropertyBuilder. The property is now complete. + propBuilder.SetGetMethod(getMethodBuilder); + propBuilder.SetSetMethod(setMethodBuilder); + } + + typeBuilder.AddInterfaceImplementation(t); + + return typeBuilder.CreateType(); + } + + /// + /// Returns all properties on the given type, going up the inheritance + /// hierarchy. + /// + /// + /// + private IEnumerable GetAllProperties(Type t) + { + var result = new List(t.GetProperties()); + foreach (var interfaceType in t.GetInterfaces()) + foreach (var prop in GetAllProperties(interfaceType)) + if (!result.Contains(prop)) + result.Add(prop); + + return result; + } + + /// + /// If the given type is concrete, returns the interface it was generated to support. + /// If the given type is an interface, returns the concrete class generated to implement it. + /// + /// + /// + public Type GetMappedTypeFor(Type t) + { + if (t.IsClass) + { + Type result; + concreteToInterfaceTypeMapping.TryGetValue(t, out result); + if (result != null) + return result; + + return t; + } + + Type toReturn = null; + interfaceToConcreteTypeMapping.TryGetValue(t, out toReturn); + + return toReturn; + } + + /// + /// Returns the type mapped to the given name. + /// + /// + /// + public Type GetMappedTypeFor(string typeName) + { + if (nameToType.ContainsKey(typeName)) + return nameToType[typeName]; + + return Type.GetType(typeName); + } + + /// + /// Calls the generic CreateInstance and performs the given + /// action on the result. + /// + /// + /// + /// + public T CreateInstance(Action action) where T : IMessage + { + T result = CreateInstance(); + action(result); + + return result; + } + + /// + /// Calls the non-generic CreateInstance and returns its result + /// cast to T. + /// + /// + /// + public T CreateInstance() where T : IMessage + { + return (T)CreateInstance(typeof(T)); + } + + /// + /// If the given type is an interface, finds its generated concrete + /// implementation, instantiates it, and returns the result. + /// + /// + /// + public object CreateInstance(Type t) + { + Type mapped = t; + if (t.IsInterface || t.IsAbstract) + { + mapped = GetMappedTypeFor(t); + if (mapped == null) + throw new ArgumentException("Could not find a concrete type mapped to " + t.FullName); + } + + ConstructorInfo constructor = null; + typeToConstructor.TryGetValue(mapped, out constructor); + if (constructor != null) + return constructor.Invoke(null); + + return FormatterServices.GetUninitializedObject(mapped); + } + + private static readonly string SUFFIX = ".__Impl"; + private static readonly Dictionary interfaceToConcreteTypeMapping = new Dictionary(); + private static readonly Dictionary concreteToInterfaceTypeMapping = new Dictionary(); + private static readonly Dictionary nameToType = new Dictionary(); + private static readonly Dictionary typeToConstructor = new Dictionary(); + private static ILog Logger = LogManager.GetLogger("MessageMapper"); + + } +} diff --git a/src/impl/messageInterfaces/NServiceBus.MessageInterfaces.MessageMapper.Reflection/NServiceBus.MessageInterfaces.MessageMapper.Reflection.csproj b/src/impl/messageInterfaces/NServiceBus.MessageInterfaces.MessageMapper.Reflection/NServiceBus.MessageInterfaces.MessageMapper.Reflection.csproj index 2b22fc568ca..1ee4abac56b 100644 --- a/src/impl/messageInterfaces/NServiceBus.MessageInterfaces.MessageMapper.Reflection/NServiceBus.MessageInterfaces.MessageMapper.Reflection.csproj +++ b/src/impl/messageInterfaces/NServiceBus.MessageInterfaces.MessageMapper.Reflection/NServiceBus.MessageInterfaces.MessageMapper.Reflection.csproj @@ -1,116 +1,116 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {4DF0FE9E-3608-426F-B6CB-AC55FE04D997} - Library - Properties - NServiceBus.MessageInterfaces.MessageMapper.Reflection - NServiceBus.MessageInterfaces.MessageMapper.Reflection - - - - - v4.0 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.MessageInterfaces.MessageMapper.Reflection.XML - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.MessageInterfaces.MessageMapper.Reflection.XML - AllRules.ruleset - - - - ..\..\..\..\lib\Common.Logging.dll - - - False - ..\..\..\..\build\output\NServiceBus.dll - False - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.MessageInterfaces.dll - False - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.Utils.Reflection.dll - False - - - - 3.5 - - - - - - - CommonAssemblyInfo.cs - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {4DF0FE9E-3608-426F-B6CB-AC55FE04D997} + Library + Properties + NServiceBus.MessageInterfaces.MessageMapper.Reflection + NServiceBus.MessageInterfaces.MessageMapper.Reflection + + + + + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.MessageInterfaces.MessageMapper.Reflection.XML + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.MessageInterfaces.MessageMapper.Reflection.XML + AllRules.ruleset + + + + ..\..\..\..\lib\Common.Logging.dll + + + False + ..\..\..\..\build\output\NServiceBus.dll + False + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.MessageInterfaces.dll + False + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.Utils.Reflection.dll + False + + + + 3.5 + + + + + + + CommonAssemblyInfo.cs + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\" + \ No newline at end of file diff --git a/src/impl/messageInterfaces/NServiceBus.MessageInterfaces.MessageMapper.Reflection/Properties/AssemblyInfo.cs b/src/impl/messageInterfaces/NServiceBus.MessageInterfaces.MessageMapper.Reflection/Properties/AssemblyInfo.cs index fbbd286342d..d32070de9cb 100644 --- a/src/impl/messageInterfaces/NServiceBus.MessageInterfaces.MessageMapper.Reflection/Properties/AssemblyInfo.cs +++ b/src/impl/messageInterfaces/NServiceBus.MessageInterfaces.MessageMapper.Reflection/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Message Interfaces Reflection Implementation")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Message Interfaces Reflection Implementation")] [assembly: AssemblyDescription("Implementation of NServiceBus Message Interfaces primarily using reflection.")] \ No newline at end of file diff --git a/src/impl/messageInterfaces/NServiceBus.MessageInterfaces.Tests/NServiceBus.MessageInterfaces.Tests.csproj b/src/impl/messageInterfaces/NServiceBus.MessageInterfaces.Tests/NServiceBus.MessageInterfaces.Tests.csproj index d88b112629a..32c500c97ce 100644 --- a/src/impl/messageInterfaces/NServiceBus.MessageInterfaces.Tests/NServiceBus.MessageInterfaces.Tests.csproj +++ b/src/impl/messageInterfaces/NServiceBus.MessageInterfaces.Tests/NServiceBus.MessageInterfaces.Tests.csproj @@ -1,71 +1,71 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {9FF48F58-4555-4DB9-86EA-561F7E375B88} - Library - Properties - NServiceBus.MessageInterfaces.Tests - NServiceBus.MessageInterfaces.Tests - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\..\..\..\build\output\NServiceBus.dll - - - ..\..\..\..\build\nservicebus.core\NServiceBus.MessageInterfaces.dll - - - ..\..\..\..\build\nservicebus.core\NServiceBus.Utils.Reflection.dll - - - ..\..\..\..\tools\NUnit\nunit.framework.dll - - - - - - - - CommonAssemblyInfo.cs - - - - - - - {4DF0FE9E-3608-426F-B6CB-AC55FE04D997} - NServiceBus.MessageInterfaces.MessageMapper.Reflection - - - - + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {9FF48F58-4555-4DB9-86EA-561F7E375B88} + Library + Properties + NServiceBus.MessageInterfaces.Tests + NServiceBus.MessageInterfaces.Tests + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\..\..\build\output\NServiceBus.dll + + + ..\..\..\..\build\nservicebus.core\NServiceBus.MessageInterfaces.dll + + + ..\..\..\..\build\nservicebus.core\NServiceBus.Utils.Reflection.dll + + + ..\..\..\..\tools\NUnit\nunit.framework.dll + + + + + + + + CommonAssemblyInfo.cs + + + + + + + {4DF0FE9E-3608-426F-B6CB-AC55FE04D997} + NServiceBus.MessageInterfaces.MessageMapper.Reflection + + + + \ No newline at end of file diff --git a/src/impl/messageInterfaces/NServiceBus.MessageInterfaces.Tests/Properties/AssemblyInfo.cs b/src/impl/messageInterfaces/NServiceBus.MessageInterfaces.Tests/Properties/AssemblyInfo.cs index cc2ac89df00..3d67e208a6e 100644 --- a/src/impl/messageInterfaces/NServiceBus.MessageInterfaces.Tests/Properties/AssemblyInfo.cs +++ b/src/impl/messageInterfaces/NServiceBus.MessageInterfaces.Tests/Properties/AssemblyInfo.cs @@ -1,2 +1,2 @@ -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus.MessageInterfaces.Tests")] +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus.MessageInterfaces.Tests")] diff --git a/src/impl/messageInterfaces/NServiceBus.MessageInterfaces.Tests/When_mapping_interfaces.cs b/src/impl/messageInterfaces/NServiceBus.MessageInterfaces.Tests/When_mapping_interfaces.cs index ec3c2afdce2..db7386035b9 100644 --- a/src/impl/messageInterfaces/NServiceBus.MessageInterfaces.Tests/When_mapping_interfaces.cs +++ b/src/impl/messageInterfaces/NServiceBus.MessageInterfaces.Tests/When_mapping_interfaces.cs @@ -1,42 +1,42 @@ -using NUnit.Framework; - -namespace NServiceBus.MessageInterfaces.Tests -{ - [TestFixture] - public class When_mapping_interfaces - { - IMessageMapper mapper; - - [SetUp] - public void SetUp() - { - mapper = new MessageMapper.Reflection.MessageMapper(); - } - - [Test] - public void Interfaces_with_only_properties_should_be_mapped() - { - mapper.Initialize(new[] { typeof(InterfaceWithProperties) }); - - Assert.NotNull(mapper.GetMappedTypeFor(typeof(InterfaceWithProperties))); - } - [Test] - public void Interfaces_with_methods_should_be_ignored() - { - mapper.Initialize(new[] {typeof(InterfaceWithMethods)}); - - Assert.Null(mapper.GetMappedTypeFor(typeof(InterfaceWithMethods))); - } - } - - public interface InterfaceWithProperties - { - string SomeProperty { get; set; } - } - - public interface InterfaceWithMethods - { - string SomeProperty { get; set; } - void MethodOnInterface(); - } +using NUnit.Framework; + +namespace NServiceBus.MessageInterfaces.Tests +{ + [TestFixture] + public class When_mapping_interfaces + { + IMessageMapper mapper; + + [SetUp] + public void SetUp() + { + mapper = new MessageMapper.Reflection.MessageMapper(); + } + + [Test] + public void Interfaces_with_only_properties_should_be_mapped() + { + mapper.Initialize(new[] { typeof(InterfaceWithProperties) }); + + Assert.NotNull(mapper.GetMappedTypeFor(typeof(InterfaceWithProperties))); + } + [Test] + public void Interfaces_with_methods_should_be_ignored() + { + mapper.Initialize(new[] {typeof(InterfaceWithMethods)}); + + Assert.Null(mapper.GetMappedTypeFor(typeof(InterfaceWithMethods))); + } + } + + public interface InterfaceWithProperties + { + string SomeProperty { get; set; } + } + + public interface InterfaceWithMethods + { + string SomeProperty { get; set; } + void MethodOnInterface(); + } } \ No newline at end of file diff --git a/src/impl/messageInterfaces/messageInterfaces.sln b/src/impl/messageInterfaces/messageInterfaces.sln index 962b5b39f52..edf4b371676 100644 --- a/src/impl/messageInterfaces/messageInterfaces.sln +++ b/src/impl/messageInterfaces/messageInterfaces.sln @@ -1,26 +1,26 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.MessageInterfaces.MessageMapper.Reflection", "NServiceBus.MessageInterfaces.MessageMapper.Reflection\NServiceBus.MessageInterfaces.MessageMapper.Reflection.csproj", "{4DF0FE9E-3608-426F-B6CB-AC55FE04D997}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.MessageInterfaces.Tests", "NServiceBus.MessageInterfaces.Tests\NServiceBus.MessageInterfaces.Tests.csproj", "{9FF48F58-4555-4DB9-86EA-561F7E375B88}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {4DF0FE9E-3608-426F-B6CB-AC55FE04D997}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4DF0FE9E-3608-426F-B6CB-AC55FE04D997}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4DF0FE9E-3608-426F-B6CB-AC55FE04D997}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4DF0FE9E-3608-426F-B6CB-AC55FE04D997}.Release|Any CPU.Build.0 = Release|Any CPU - {9FF48F58-4555-4DB9-86EA-561F7E375B88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9FF48F58-4555-4DB9-86EA-561F7E375B88}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9FF48F58-4555-4DB9-86EA-561F7E375B88}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9FF48F58-4555-4DB9-86EA-561F7E375B88}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.MessageInterfaces.MessageMapper.Reflection", "NServiceBus.MessageInterfaces.MessageMapper.Reflection\NServiceBus.MessageInterfaces.MessageMapper.Reflection.csproj", "{4DF0FE9E-3608-426F-B6CB-AC55FE04D997}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.MessageInterfaces.Tests", "NServiceBus.MessageInterfaces.Tests\NServiceBus.MessageInterfaces.Tests.csproj", "{9FF48F58-4555-4DB9-86EA-561F7E375B88}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4DF0FE9E-3608-426F-B6CB-AC55FE04D997}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4DF0FE9E-3608-426F-B6CB-AC55FE04D997}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4DF0FE9E-3608-426F-B6CB-AC55FE04D997}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4DF0FE9E-3608-426F-B6CB-AC55FE04D997}.Release|Any CPU.Build.0 = Release|Any CPU + {9FF48F58-4555-4DB9-86EA-561F7E375B88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9FF48F58-4555-4DB9-86EA-561F7E375B88}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9FF48F58-4555-4DB9-86EA-561F7E375B88}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9FF48F58-4555-4DB9-86EA-561F7E375B88}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/impl/unicast/NServiceBus.Unicast.Msmq/NServiceBus.Unicast.Transport.Msmq.Config/ConfigureMsmqTransport.cs b/src/impl/unicast/NServiceBus.Unicast.Msmq/NServiceBus.Unicast.Transport.Msmq.Config/ConfigureMsmqTransport.cs index 32bbf97831a..4ee9707e2f6 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Msmq/NServiceBus.Unicast.Transport.Msmq.Config/ConfigureMsmqTransport.cs +++ b/src/impl/unicast/NServiceBus.Unicast.Msmq/NServiceBus.Unicast.Transport.Msmq.Config/ConfigureMsmqTransport.cs @@ -1,22 +1,22 @@ -using NServiceBus.Config; - -namespace NServiceBus -{ - /// - /// Contains extension methods to NServiceBus.Configure. - /// - public static class ConfigureMsmqTransport - { - /// - /// If queues configured do not exist, will cause them not to be created on startup. - /// - /// - /// - public static Configure DoNotCreateQueues(this Configure config) - { - MsmqTransportConfig.DoNotCreateQueues = true; - - return config; - } - } -} +using NServiceBus.Config; + +namespace NServiceBus +{ + /// + /// Contains extension methods to NServiceBus.Configure. + /// + public static class ConfigureMsmqTransport + { + /// + /// If queues configured do not exist, will cause them not to be created on startup. + /// + /// + /// + public static Configure DoNotCreateQueues(this Configure config) + { + MsmqTransportConfig.DoNotCreateQueues = true; + + return config; + } + } +} diff --git a/src/impl/unicast/NServiceBus.Unicast.Msmq/NServiceBus.Unicast.Transport.Msmq.Config/MsmqTransportConfig.cs b/src/impl/unicast/NServiceBus.Unicast.Msmq/NServiceBus.Unicast.Transport.Msmq.Config/MsmqTransportConfig.cs index ceee5415ddd..a7f59754f24 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Msmq/NServiceBus.Unicast.Transport.Msmq.Config/MsmqTransportConfig.cs +++ b/src/impl/unicast/NServiceBus.Unicast.Msmq/NServiceBus.Unicast.Transport.Msmq.Config/MsmqTransportConfig.cs @@ -1,82 +1,82 @@ -using System.Configuration; - -namespace NServiceBus.Config -{ - /// - /// Contains the properties representing the MsmqTransport configuration section. - /// - public class MsmqTransportConfig : ConfigurationSection - { - /// - /// The queue to receive messages from in the format - /// "queue@machine". - /// - [ConfigurationProperty("InputQueue", IsRequired = false)] - public string InputQueue - { - get - { - return this["InputQueue"] as string; - } - set - { - this["InputQueue"] = value; - } - } - - /// - /// The queue to which to forward messages that could not be processed - /// in the format "queue@machine". - /// - [ConfigurationProperty("ErrorQueue", IsRequired = false)] - public string ErrorQueue - { - get - { - return this["ErrorQueue"] as string; - } - set - { - this["ErrorQueue"] = value; - } - } - - /// - /// The number of worker threads that can process messages in parallel. - /// - [ConfigurationProperty("NumberOfWorkerThreads", IsRequired = true)] - public int NumberOfWorkerThreads - { - get - { - return (int)this["NumberOfWorkerThreads"]; - } - set - { - this["NumberOfWorkerThreads"] = value; - } - } - - /// - /// The maximum number of times to retry processing a message - /// when it fails before moving it to the error queue. - /// - [ConfigurationProperty("MaxRetries", IsRequired = true)] - public int MaxRetries - { - get - { - return (int)this["MaxRetries"]; - } - set - { - this["MaxRetries"] = value; - } - } - - /// - /// Indicates that queues should not be created. - /// - public static bool DoNotCreateQueues { get; set; } - } -} +using System.Configuration; + +namespace NServiceBus.Config +{ + /// + /// Contains the properties representing the MsmqTransport configuration section. + /// + public class MsmqTransportConfig : ConfigurationSection + { + /// + /// The queue to receive messages from in the format + /// "queue@machine". + /// + [ConfigurationProperty("InputQueue", IsRequired = false)] + public string InputQueue + { + get + { + return this["InputQueue"] as string; + } + set + { + this["InputQueue"] = value; + } + } + + /// + /// The queue to which to forward messages that could not be processed + /// in the format "queue@machine". + /// + [ConfigurationProperty("ErrorQueue", IsRequired = false)] + public string ErrorQueue + { + get + { + return this["ErrorQueue"] as string; + } + set + { + this["ErrorQueue"] = value; + } + } + + /// + /// The number of worker threads that can process messages in parallel. + /// + [ConfigurationProperty("NumberOfWorkerThreads", IsRequired = true)] + public int NumberOfWorkerThreads + { + get + { + return (int)this["NumberOfWorkerThreads"]; + } + set + { + this["NumberOfWorkerThreads"] = value; + } + } + + /// + /// The maximum number of times to retry processing a message + /// when it fails before moving it to the error queue. + /// + [ConfigurationProperty("MaxRetries", IsRequired = true)] + public int MaxRetries + { + get + { + return (int)this["MaxRetries"]; + } + set + { + this["MaxRetries"] = value; + } + } + + /// + /// Indicates that queues should not be created. + /// + public static bool DoNotCreateQueues { get; set; } + } +} diff --git a/src/impl/unicast/NServiceBus.Unicast.Msmq/NServiceBus.Unicast.Transport.Msmq.Config/NServiceBus.Unicast.Transport.Msmq.Config.csproj b/src/impl/unicast/NServiceBus.Unicast.Msmq/NServiceBus.Unicast.Transport.Msmq.Config/NServiceBus.Unicast.Transport.Msmq.Config.csproj index ebafdb94ae2..07d475f2edd 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Msmq/NServiceBus.Unicast.Transport.Msmq.Config/NServiceBus.Unicast.Transport.Msmq.Config.csproj +++ b/src/impl/unicast/NServiceBus.Unicast.Msmq/NServiceBus.Unicast.Transport.Msmq.Config/NServiceBus.Unicast.Transport.Msmq.Config.csproj @@ -1,103 +1,103 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {2D3D9033-200C-423E-BF8A-8FB40D8D1572} - Library - Properties - NServiceBus.Unicast.Transport.Msmq.Config - NServiceBus.Unicast.Transport.Msmq.Config - v4.0 - 512 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.Unicast.Transport.Msmq.Config.XML - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.Unicast.Transport.Msmq.Config.XML - AllRules.ruleset - - - - False - ..\..\..\..\..\build\output\NServiceBus.dll - - - False - ..\..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll - - - - - 3.5 - - - - - CommonAssemblyInfo.cs - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\..\build\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {2D3D9033-200C-423E-BF8A-8FB40D8D1572} + Library + Properties + NServiceBus.Unicast.Transport.Msmq.Config + NServiceBus.Unicast.Transport.Msmq.Config + v4.0 + 512 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.Unicast.Transport.Msmq.Config.XML + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.Unicast.Transport.Msmq.Config.XML + AllRules.ruleset + + + + False + ..\..\..\..\..\build\output\NServiceBus.dll + + + False + ..\..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll + + + + + 3.5 + + + + + CommonAssemblyInfo.cs + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\..\build\" + \ No newline at end of file diff --git a/src/impl/unicast/NServiceBus.Unicast.Msmq/NServiceBus.Unicast.Transport.Msmq.Config/Properties/AssemblyInfo.cs b/src/impl/unicast/NServiceBus.Unicast.Msmq/NServiceBus.Unicast.Transport.Msmq.Config/Properties/AssemblyInfo.cs index dc7b2d23854..e28e6989b4e 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Msmq/NServiceBus.Unicast.Transport.Msmq.Config/Properties/AssemblyInfo.cs +++ b/src/impl/unicast/NServiceBus.Unicast.Msmq/NServiceBus.Unicast.Transport.Msmq.Config/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Msmq Unicast Transport Config")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Msmq Unicast Transport Config")] [assembly: AssemblyDescription("NServiceBus Msmq Unicast Transport Config")] \ No newline at end of file diff --git a/src/impl/unicast/NServiceBus.Unicast.Msmq/NServiceBus.Unicast.Transport.Msmq.sln b/src/impl/unicast/NServiceBus.Unicast.Msmq/NServiceBus.Unicast.Transport.Msmq.sln index 4052fcd97c8..c87de5305d4 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Msmq/NServiceBus.Unicast.Transport.Msmq.sln +++ b/src/impl/unicast/NServiceBus.Unicast.Msmq/NServiceBus.Unicast.Transport.Msmq.sln @@ -1,20 +1,20 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Transport.Msmq.Config", "NServiceBus.Unicast.Transport.Msmq.Config\NServiceBus.Unicast.Transport.Msmq.Config.csproj", "{2D3D9033-200C-423E-BF8A-8FB40D8D1572}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2D3D9033-200C-423E-BF8A-8FB40D8D1572}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2D3D9033-200C-423E-BF8A-8FB40D8D1572}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2D3D9033-200C-423E-BF8A-8FB40D8D1572}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2D3D9033-200C-423E-BF8A-8FB40D8D1572}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Transport.Msmq.Config", "NServiceBus.Unicast.Transport.Msmq.Config\NServiceBus.Unicast.Transport.Msmq.Config.csproj", "{2D3D9033-200C-423E-BF8A-8FB40D8D1572}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2D3D9033-200C-423E-BF8A-8FB40D8D1572}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2D3D9033-200C-423E-BF8A-8FB40D8D1572}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2D3D9033-200C-423E-BF8A-8FB40D8D1572}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2D3D9033-200C-423E-BF8A-8FB40D8D1572}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Azure.TableStorage/Config/AzureSubscriptionStorageConfig.cs b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Azure.TableStorage/Config/AzureSubscriptionStorageConfig.cs index 1b39a2d5e5b..de3d0a3161c 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Azure.TableStorage/Config/AzureSubscriptionStorageConfig.cs +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Azure.TableStorage/Config/AzureSubscriptionStorageConfig.cs @@ -1,34 +1,34 @@ -using System.Configuration; - -namespace NServiceBus.Config -{ - public class AzureSubscriptionStorageConfig : ConfigurationSection - { - [ConfigurationProperty("ConnectionString", IsRequired = false, DefaultValue = "UseDevelopmentStorage=true")] - public string ConnectionString - { - get - { - return this["ConnectionString"] as string; - } - set - { - this["ConnectionString"] = value; - } - } - - [ConfigurationProperty("CreateSchema", IsRequired = false,DefaultValue = true)] - public bool CreateSchema - { - get - { - - return (bool)this["CreateSchema"]; - } - set - { - this["CreateSchema"] = value; - } - } - } +using System.Configuration; + +namespace NServiceBus.Config +{ + public class AzureSubscriptionStorageConfig : ConfigurationSection + { + [ConfigurationProperty("ConnectionString", IsRequired = false, DefaultValue = "UseDevelopmentStorage=true")] + public string ConnectionString + { + get + { + return this["ConnectionString"] as string; + } + set + { + this["ConnectionString"] = value; + } + } + + [ConfigurationProperty("CreateSchema", IsRequired = false,DefaultValue = true)] + public bool CreateSchema + { + get + { + + return (bool)this["CreateSchema"]; + } + set + { + this["CreateSchema"] = value; + } + } + } } \ No newline at end of file diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Azure.TableStorage/Config/ConfigureNHibernateAzureSubscriptionStorage.cs b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Azure.TableStorage/Config/ConfigureNHibernateAzureSubscriptionStorage.cs index 4ff1d006a6a..e63917c3f07 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Azure.TableStorage/Config/ConfigureNHibernateAzureSubscriptionStorage.cs +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Azure.TableStorage/Config/ConfigureNHibernateAzureSubscriptionStorage.cs @@ -1,81 +1,81 @@ -using System; -using FluentNHibernate; -using FluentNHibernate.Cfg; -using FluentNHibernate.Cfg.Db; -using NHibernate.ByteCode.LinFu; -using NHibernate.Tool.hbm2ddl; -using NServiceBus.ObjectBuilder; -using NServiceBus.Unicast.Subscriptions.Azure.TableStorage; -using NServiceBus.Unicast.Subscriptions.Azure.TableStorage.Config; -using NHibernate.Drivers.Azure.TableStorage; -using NServiceBus.Config; - -namespace NServiceBus -{ - /// - /// Configuration extensions for the NHibernate subscription storage - /// - public static class ConfigureNHibernateAzureSubscriptionStorage - { - /// - /// Configures NHibernate Azure Subscription Storage , Settings etc are read from custom config section - /// - /// - /// - public static Configure AzureSubcriptionStorage(this Configure config) - { - - var configSection = Configure.GetConfigSection(); - - if (configSection == null) - { - throw new InvalidOperationException("No configuration section for NHibernate Azure Subscription Storage found. Please add a NHibernateAzureSubscriptionStorageConfig section to you configuration file"); - } - - return AzureSubcriptionStorage(config, configSection.ConnectionString, configSection.CreateSchema); - } - - /// - /// Configures the storage with the user supplied persistence configuration - /// Azure tables are created if requested by the user - /// - /// - /// - /// - /// - public static Configure AzureSubcriptionStorage(this Configure config, - string connectionString, - bool createSchema) - { - - var database = MsSqlConfiguration.MsSql2005 - .ConnectionString(connectionString) - .Provider(typeof(TableStorageConnectionProvider).AssemblyQualifiedName) - .Dialect(typeof(TableStorageDialect).AssemblyQualifiedName) - .Driver(typeof(TableStorageDriver).AssemblyQualifiedName) - .ProxyFactoryFactory(typeof(ProxyFactoryFactory).AssemblyQualifiedName); - - var fluentConfiguration = Fluently.Configure() - .Database(database) - .Mappings(m => m.FluentMappings.Add(typeof (SubscriptionMap))); - var configuration = fluentConfiguration.BuildConfiguration(); - - var sessionSource = new SessionSource(fluentConfiguration); - - if (createSchema) - { - using (var session = sessionSource.CreateSession()) - { - new SchemaExport(configuration).Execute(true, true, false, session.Connection, null); - session.Flush(); - } - } - - config.Configurer.RegisterSingleton(sessionSource); - config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singlecall); - - return config; - - } - } +using System; +using FluentNHibernate; +using FluentNHibernate.Cfg; +using FluentNHibernate.Cfg.Db; +using NHibernate.ByteCode.LinFu; +using NHibernate.Tool.hbm2ddl; +using NServiceBus.ObjectBuilder; +using NServiceBus.Unicast.Subscriptions.Azure.TableStorage; +using NServiceBus.Unicast.Subscriptions.Azure.TableStorage.Config; +using NHibernate.Drivers.Azure.TableStorage; +using NServiceBus.Config; + +namespace NServiceBus +{ + /// + /// Configuration extensions for the NHibernate subscription storage + /// + public static class ConfigureNHibernateAzureSubscriptionStorage + { + /// + /// Configures NHibernate Azure Subscription Storage , Settings etc are read from custom config section + /// + /// + /// + public static Configure AzureSubcriptionStorage(this Configure config) + { + + var configSection = Configure.GetConfigSection(); + + if (configSection == null) + { + throw new InvalidOperationException("No configuration section for NHibernate Azure Subscription Storage found. Please add a NHibernateAzureSubscriptionStorageConfig section to you configuration file"); + } + + return AzureSubcriptionStorage(config, configSection.ConnectionString, configSection.CreateSchema); + } + + /// + /// Configures the storage with the user supplied persistence configuration + /// Azure tables are created if requested by the user + /// + /// + /// + /// + /// + public static Configure AzureSubcriptionStorage(this Configure config, + string connectionString, + bool createSchema) + { + + var database = MsSqlConfiguration.MsSql2005 + .ConnectionString(connectionString) + .Provider(typeof(TableStorageConnectionProvider).AssemblyQualifiedName) + .Dialect(typeof(TableStorageDialect).AssemblyQualifiedName) + .Driver(typeof(TableStorageDriver).AssemblyQualifiedName) + .ProxyFactoryFactory(typeof(ProxyFactoryFactory).AssemblyQualifiedName); + + var fluentConfiguration = Fluently.Configure() + .Database(database) + .Mappings(m => m.FluentMappings.Add(typeof (SubscriptionMap))); + var configuration = fluentConfiguration.BuildConfiguration(); + + var sessionSource = new SessionSource(fluentConfiguration); + + if (createSchema) + { + using (var session = sessionSource.CreateSession()) + { + new SchemaExport(configuration).Execute(true, true, false, session.Connection, null); + session.Flush(); + } + } + + config.Configurer.RegisterSingleton(sessionSource); + config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singlecall); + + return config; + + } + } } \ No newline at end of file diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Azure.TableStorage/Config/SubscriptionMap.cs b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Azure.TableStorage/Config/SubscriptionMap.cs index 0f33b4dceeb..55bc535cbad 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Azure.TableStorage/Config/SubscriptionMap.cs +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Azure.TableStorage/Config/SubscriptionMap.cs @@ -1,14 +1,14 @@ -using FluentNHibernate.Mapping; - -namespace NServiceBus.Unicast.Subscriptions.Azure.TableStorage.Config -{ - public sealed class SubscriptionMap : ClassMap - { - public SubscriptionMap() - { - CompositeId() - .KeyProperty(x => x.SubscriberEndpoint, "RowKey") - .KeyProperty(x => x.MessageType, "PartitionKey"); - } - } +using FluentNHibernate.Mapping; + +namespace NServiceBus.Unicast.Subscriptions.Azure.TableStorage.Config +{ + public sealed class SubscriptionMap : ClassMap + { + public SubscriptionMap() + { + CompositeId() + .KeyProperty(x => x.SubscriberEndpoint, "RowKey") + .KeyProperty(x => x.MessageType, "PartitionKey"); + } + } } \ No newline at end of file diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Azure.TableStorage/NServiceBus.Unicast.Subscriptions.Azure.TableStorage.csproj b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Azure.TableStorage/NServiceBus.Unicast.Subscriptions.Azure.TableStorage.csproj index 13786709196..95601682629 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Azure.TableStorage/NServiceBus.Unicast.Subscriptions.Azure.TableStorage.csproj +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Azure.TableStorage/NServiceBus.Unicast.Subscriptions.Azure.TableStorage.csproj @@ -1,138 +1,138 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {FB2ACC79-1E04-47CA-8F4B-31327E10B5E3} - library - Properties - NServiceBus.Unicast.Subscriptions.Azure.TableStorage - NServiceBus.Unicast.Subscriptions.Azure.TableStorage - v4.0 - 512 - - - 3.5 - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\..\lib\FluentNHibernate\FluentNHibernate.dll - - - False - ..\..\..\..\lib\LinFu.DynamicProxy.dll - - - ..\..\..\..\lib\log4net.dll - - - True - - - False - ..\..\..\..\lib\NHibernate.dll - - - False - ..\..\..\..\lib\NHibernate.ByteCode.LinFu.dll - - - ..\..\..\..\lib\NHibernate.Drivers.Azure.TableStorage.dll - - - False - ..\..\..\..\build\output\NServiceBus.dll - - - ..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll - - - ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll - - - ..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Subscriptions.dll - - - - - 3.5 - - - - - - - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\nhibernate\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {FB2ACC79-1E04-47CA-8F4B-31327E10B5E3} + library + Properties + NServiceBus.Unicast.Subscriptions.Azure.TableStorage + NServiceBus.Unicast.Subscriptions.Azure.TableStorage + v4.0 + 512 + + + 3.5 + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\..\lib\FluentNHibernate\FluentNHibernate.dll + + + False + ..\..\..\..\lib\LinFu.DynamicProxy.dll + + + ..\..\..\..\lib\log4net.dll + + + True + + + False + ..\..\..\..\lib\NHibernate.dll + + + False + ..\..\..\..\lib\NHibernate.ByteCode.LinFu.dll + + + ..\..\..\..\lib\NHibernate.Drivers.Azure.TableStorage.dll + + + False + ..\..\..\..\build\output\NServiceBus.dll + + + ..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll + + + ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll + + + ..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Subscriptions.dll + + + + + 3.5 + + + + + + + + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\nhibernate\" + \ No newline at end of file diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Azure.TableStorage/NServiceBus.Unicast.Subscriptions.Azure.TableStorage.csproj.user b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Azure.TableStorage/NServiceBus.Unicast.Subscriptions.Azure.TableStorage.csproj.user index e98b7a34181..6f235313148 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Azure.TableStorage/NServiceBus.Unicast.Subscriptions.Azure.TableStorage.csproj.user +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Azure.TableStorage/NServiceBus.Unicast.Subscriptions.Azure.TableStorage.csproj.user @@ -1,13 +1,13 @@ - - - - - - - - - - en-US - false - + + + + + + + + + + en-US + false + \ No newline at end of file diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Azure.TableStorage/NServiceBus.Unicast.Subscriptions.Azure.TableStorage.sln b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Azure.TableStorage/NServiceBus.Unicast.Subscriptions.Azure.TableStorage.sln index 8a3c899e878..2b79cc9dac4 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Azure.TableStorage/NServiceBus.Unicast.Subscriptions.Azure.TableStorage.sln +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Azure.TableStorage/NServiceBus.Unicast.Subscriptions.Azure.TableStorage.sln @@ -1,20 +1,20 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Subscriptions.Azure.TableStorage", "NServiceBus.Unicast.Subscriptions.Azure.TableStorage.csproj", "{FB2ACC79-1E04-47CA-8F4B-31327E10B5E3}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {FB2ACC79-1E04-47CA-8F4B-31327E10B5E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FB2ACC79-1E04-47CA-8F4B-31327E10B5E3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FB2ACC79-1E04-47CA-8F4B-31327E10B5E3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FB2ACC79-1E04-47CA-8F4B-31327E10B5E3}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Subscriptions.Azure.TableStorage", "NServiceBus.Unicast.Subscriptions.Azure.TableStorage.csproj", "{FB2ACC79-1E04-47CA-8F4B-31327E10B5E3}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {FB2ACC79-1E04-47CA-8F4B-31327E10B5E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FB2ACC79-1E04-47CA-8F4B-31327E10B5E3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FB2ACC79-1E04-47CA-8F4B-31327E10B5E3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FB2ACC79-1E04-47CA-8F4B-31327E10B5E3}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Azure.TableStorage/Properties/AssemblyInfo.cs b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Azure.TableStorage/Properties/AssemblyInfo.cs index 40858c5a20c..4f2091b604a 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Azure.TableStorage/Properties/AssemblyInfo.cs +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Azure.TableStorage/Properties/AssemblyInfo.cs @@ -1,2 +1,2 @@ -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus.Unicast.Subscriptions.NHibernate")] +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus.Unicast.Subscriptions.NHibernate")] diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Azure.TableStorage/Subscription.cs b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Azure.TableStorage/Subscription.cs index f0b3b2c6732..98d87aa1374 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Azure.TableStorage/Subscription.cs +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Azure.TableStorage/Subscription.cs @@ -1,34 +1,34 @@ -namespace NServiceBus.Unicast.Subscriptions.Azure.TableStorage -{ - /// - /// Enity containing subscription data - /// - public class Subscription - { - public virtual string SubscriberEndpoint { get; set; } - public virtual string MessageType { get; set; } - - public override bool Equals(object obj) - { - if (ReferenceEquals(null, obj)) return false; - if (ReferenceEquals(this, obj)) return true; - if (obj.GetType() != typeof (Subscription)) return false; - return Equals((Subscription) obj); - } - - public virtual bool Equals(Subscription other) - { - if (ReferenceEquals(null, other)) return false; - if (ReferenceEquals(this, other)) return true; - return Equals(other.SubscriberEndpoint, SubscriberEndpoint) && Equals(other.MessageType, MessageType); - } - - public override int GetHashCode() - { - unchecked - { - return ((SubscriberEndpoint != null ? SubscriberEndpoint.GetHashCode() : 0)*397) ^ (MessageType != null ? MessageType.GetHashCode() : 0); - } - } - } +namespace NServiceBus.Unicast.Subscriptions.Azure.TableStorage +{ + /// + /// Enity containing subscription data + /// + public class Subscription + { + public virtual string SubscriberEndpoint { get; set; } + public virtual string MessageType { get; set; } + + public override bool Equals(object obj) + { + if (ReferenceEquals(null, obj)) return false; + if (ReferenceEquals(this, obj)) return true; + if (obj.GetType() != typeof (Subscription)) return false; + return Equals((Subscription) obj); + } + + public virtual bool Equals(Subscription other) + { + if (ReferenceEquals(null, other)) return false; + if (ReferenceEquals(this, other)) return true; + return Equals(other.SubscriberEndpoint, SubscriberEndpoint) && Equals(other.MessageType, MessageType); + } + + public override int GetHashCode() + { + unchecked + { + return ((SubscriberEndpoint != null ? SubscriberEndpoint.GetHashCode() : 0)*397) ^ (MessageType != null ? MessageType.GetHashCode() : 0); + } + } + } } \ No newline at end of file diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Azure.TableStorage/SubscriptionStorage.cs b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Azure.TableStorage/SubscriptionStorage.cs index 0270643b98f..ddcefd76e26 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Azure.TableStorage/SubscriptionStorage.cs +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Azure.TableStorage/SubscriptionStorage.cs @@ -1,95 +1,95 @@ -using System.Collections.Generic; -using System.Linq; -using System.Transactions; -using FluentNHibernate; -using NHibernate.Criterion; - -namespace NServiceBus.Unicast.Subscriptions.Azure.TableStorage -{ - /// - /// Subscription storage using NHibernate for persistence - /// - public class SubscriptionStorage : ISubscriptionStorage - { - private readonly ISessionSource sessionSource; - - public SubscriptionStorage(ISessionSource sessionSource) - { - this.sessionSource = sessionSource; - } - - /// - /// Adds the given subscription to the DB. - /// Method checks for existing subcriptions to prevent duplicates - /// - /// - /// - public void Subscribe(string client, IEnumerable messageTypes) - { - using (var session = sessionSource.CreateSession()) - using(var transaction = new TransactionScope()) - { - foreach (var messageType in messageTypes) - { - var subscription = new Subscription - { - SubscriberEndpoint = client, - MessageType = messageType - }; - - if (session.Get(subscription) == null) - session.Save(subscription); - - } - - - transaction.Complete(); - session.Flush(); - } - } - - /// - /// Removes the specified subscriptions from DB - /// - /// - /// - public void Unsubscribe(string client, IEnumerable messageTypes) - { - - using (var session = sessionSource.CreateSession()) - using (var transaction = new TransactionScope()) - { - foreach (var messageType in messageTypes) - session.Delete(string.Format("from Subscription where SubscriberEndpoint = '{0}' AND MessageType = '{1}'", client, messageType)); - - transaction.Complete(); - session.Flush(); - } - } - - /// - /// Lists all subscribers for the specified message types - /// - /// - /// - public IEnumerable GetSubscribersForMessage(IEnumerable messageTypes) - { - var subscribers = new List(); - - using (var session = sessionSource.CreateSession()) - { - subscribers.AddRange(from messageType in messageTypes - from subscription in session.CreateCriteria(typeof (Subscription)) - .Add(Restrictions.Eq("MessageType", messageType)) - .List() - select subscription.SubscriberEndpoint); - } - return subscribers; - } - - public void Init() - { - //No-op - } - } -} +using System.Collections.Generic; +using System.Linq; +using System.Transactions; +using FluentNHibernate; +using NHibernate.Criterion; + +namespace NServiceBus.Unicast.Subscriptions.Azure.TableStorage +{ + /// + /// Subscription storage using NHibernate for persistence + /// + public class SubscriptionStorage : ISubscriptionStorage + { + private readonly ISessionSource sessionSource; + + public SubscriptionStorage(ISessionSource sessionSource) + { + this.sessionSource = sessionSource; + } + + /// + /// Adds the given subscription to the DB. + /// Method checks for existing subcriptions to prevent duplicates + /// + /// + /// + public void Subscribe(string client, IEnumerable messageTypes) + { + using (var session = sessionSource.CreateSession()) + using(var transaction = new TransactionScope()) + { + foreach (var messageType in messageTypes) + { + var subscription = new Subscription + { + SubscriberEndpoint = client, + MessageType = messageType + }; + + if (session.Get(subscription) == null) + session.Save(subscription); + + } + + + transaction.Complete(); + session.Flush(); + } + } + + /// + /// Removes the specified subscriptions from DB + /// + /// + /// + public void Unsubscribe(string client, IEnumerable messageTypes) + { + + using (var session = sessionSource.CreateSession()) + using (var transaction = new TransactionScope()) + { + foreach (var messageType in messageTypes) + session.Delete(string.Format("from Subscription where SubscriberEndpoint = '{0}' AND MessageType = '{1}'", client, messageType)); + + transaction.Complete(); + session.Flush(); + } + } + + /// + /// Lists all subscribers for the specified message types + /// + /// + /// + public IEnumerable GetSubscribersForMessage(IEnumerable messageTypes) + { + var subscribers = new List(); + + using (var session = sessionSource.CreateSession()) + { + subscribers.AddRange(from messageType in messageTypes + from subscription in session.CreateCriteria(typeof (Subscription)) + .Add(Restrictions.Eq("MessageType", messageType)) + .List() + select subscription.SubscriberEndpoint); + } + return subscribers; + } + + public void Init() + { + //No-op + } + } +} diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.InMemory/Config/ConfigureMsmqSubscriptionStorage.cs b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.InMemory/Config/ConfigureMsmqSubscriptionStorage.cs index 35494c81681..f989bbce366 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.InMemory/Config/ConfigureMsmqSubscriptionStorage.cs +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.InMemory/Config/ConfigureMsmqSubscriptionStorage.cs @@ -1,23 +1,23 @@ -using NServiceBus.ObjectBuilder; -using NServiceBus.Unicast.Subscriptions.InMemory; - -namespace NServiceBus -{ - /// - /// Contains extension methods to NServiceBus.Configure. - /// - public static class ConfigureInMemorySubscriptionStorage - { - /// - /// Stores subscription data in memory. - /// This storage are for development scenarios only - /// - /// - /// - public static Configure InMemorySubscriptionStorage(this Configure config) - { - config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); - return config; - } - } -} +using NServiceBus.ObjectBuilder; +using NServiceBus.Unicast.Subscriptions.InMemory; + +namespace NServiceBus +{ + /// + /// Contains extension methods to NServiceBus.Configure. + /// + public static class ConfigureInMemorySubscriptionStorage + { + /// + /// Stores subscription data in memory. + /// This storage are for development scenarios only + /// + /// + /// + public static Configure InMemorySubscriptionStorage(this Configure config) + { + config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); + return config; + } + } +} diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.InMemory/InMemorySubscriptionStorage.cs b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.InMemory/InMemorySubscriptionStorage.cs index 88eec57854f..a6f3bb6e331 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.InMemory/InMemorySubscriptionStorage.cs +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.InMemory/InMemorySubscriptionStorage.cs @@ -1,65 +1,65 @@ -using System.Collections.Generic; -using System.Linq; - -namespace NServiceBus.Unicast.Subscriptions.InMemory -{ - /// - /// Inmemory implementation of the subscription storage - /// - public class InMemorySubscriptionStorage : ISubscriptionStorage - { - /// - /// Adds the given subscription to the inmemory list - /// - /// - /// - void ISubscriptionStorage.Subscribe(string client, IEnumerable messageTypes) - { - messageTypes.ToList().ForEach(m => - { - if (!storage.ContainsKey(m)) - storage[m] = new List(); - - if (!storage[m].Contains(client)) - storage[m].Add(client); - }); - } - - /// - /// Removes the subscription - /// - /// - /// - void ISubscriptionStorage.Unsubscribe(string client, IEnumerable messageTypes) - { - messageTypes.ToList().ForEach(m => - { - if (storage.ContainsKey(m)) - storage[m].Remove(client); - }); - } - - /// - /// Lists all subscribers for the given message types - /// - /// - /// - IEnumerable ISubscriptionStorage.GetSubscribersForMessage(IEnumerable messageTypes) - { - var result = new List(); - messageTypes.ToList().ForEach(m => - { - if (storage.ContainsKey(m)) - result.AddRange(storage[m]); - }); - - return result; - } - - public void Init() - { - } - - private readonly Dictionary> storage = new Dictionary>(); - } +using System.Collections.Generic; +using System.Linq; + +namespace NServiceBus.Unicast.Subscriptions.InMemory +{ + /// + /// Inmemory implementation of the subscription storage + /// + public class InMemorySubscriptionStorage : ISubscriptionStorage + { + /// + /// Adds the given subscription to the inmemory list + /// + /// + /// + void ISubscriptionStorage.Subscribe(string client, IEnumerable messageTypes) + { + messageTypes.ToList().ForEach(m => + { + if (!storage.ContainsKey(m)) + storage[m] = new List(); + + if (!storage[m].Contains(client)) + storage[m].Add(client); + }); + } + + /// + /// Removes the subscription + /// + /// + /// + void ISubscriptionStorage.Unsubscribe(string client, IEnumerable messageTypes) + { + messageTypes.ToList().ForEach(m => + { + if (storage.ContainsKey(m)) + storage[m].Remove(client); + }); + } + + /// + /// Lists all subscribers for the given message types + /// + /// + /// + IEnumerable ISubscriptionStorage.GetSubscribersForMessage(IEnumerable messageTypes) + { + var result = new List(); + messageTypes.ToList().ForEach(m => + { + if (storage.ContainsKey(m)) + result.AddRange(storage[m]); + }); + + return result; + } + + public void Init() + { + } + + private readonly Dictionary> storage = new Dictionary>(); + } } \ No newline at end of file diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.InMemory/NServiceBus.Unicast.Subscriptions.InMemory.csproj b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.InMemory/NServiceBus.Unicast.Subscriptions.InMemory.csproj index e8dbba17278..c1e2bdcd785 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.InMemory/NServiceBus.Unicast.Subscriptions.InMemory.csproj +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.InMemory/NServiceBus.Unicast.Subscriptions.InMemory.csproj @@ -1,68 +1,68 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {34BFC9A1-7A28-48C9-B909-397B05204BD9} - Library - Properties - NServiceBus.Unicast.Subscriptions.InMemory - NServiceBus.Unicast.Subscriptions.InMemory - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.Unicast.Subscriptions.InMemory.XML - - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Subscriptions.dll - - - - 3.5 - - - - - CommonAssemblyInfo.cs - - - - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {34BFC9A1-7A28-48C9-B909-397B05204BD9} + Library + Properties + NServiceBus.Unicast.Subscriptions.InMemory + NServiceBus.Unicast.Subscriptions.InMemory + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.Unicast.Subscriptions.InMemory.XML + + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Subscriptions.dll + + + + 3.5 + + + + + CommonAssemblyInfo.cs + + + + + + + \ No newline at end of file diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.InMemory/NServiceBus.Unicast.Subscriptions.InMemory.sln b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.InMemory/NServiceBus.Unicast.Subscriptions.InMemory.sln index 475737c825b..be42e7ddf88 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.InMemory/NServiceBus.Unicast.Subscriptions.InMemory.sln +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.InMemory/NServiceBus.Unicast.Subscriptions.InMemory.sln @@ -1,20 +1,20 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Subscriptions.InMemory", "NServiceBus.Unicast.Subscriptions.InMemory.csproj", "{34BFC9A1-7A28-48C9-B909-397B05204BD9}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {34BFC9A1-7A28-48C9-B909-397B05204BD9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {34BFC9A1-7A28-48C9-B909-397B05204BD9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {34BFC9A1-7A28-48C9-B909-397B05204BD9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {34BFC9A1-7A28-48C9-B909-397B05204BD9}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Subscriptions.InMemory", "NServiceBus.Unicast.Subscriptions.InMemory.csproj", "{34BFC9A1-7A28-48C9-B909-397B05204BD9}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {34BFC9A1-7A28-48C9-B909-397B05204BD9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {34BFC9A1-7A28-48C9-B909-397B05204BD9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {34BFC9A1-7A28-48C9-B909-397B05204BD9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {34BFC9A1-7A28-48C9-B909-397B05204BD9}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.InMemory/Properties/AssemblyInfo.cs b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.InMemory/Properties/AssemblyInfo.cs index f211355cd0c..73e41139679 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.InMemory/Properties/AssemblyInfo.cs +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.InMemory/Properties/AssemblyInfo.cs @@ -1,2 +1,2 @@ -using System.Reflection; +using System.Reflection; [assembly: AssemblyTitle("NServiceBus.Unicast.Subscriptions.InMemory")] \ No newline at end of file diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/Entry.cs b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/Entry.cs index c9c203f350b..91dd2d35d8a 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/Entry.cs +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/Entry.cs @@ -1,21 +1,21 @@ -using System; - -namespace NServiceBus.Unicast.Subscriptions.Msmq -{ - /// - /// Describes an entry in the list of subscriptions. - /// - [Serializable] - public class Entry - { - /// - /// Gets the message type for the subscription entry. - /// - public string MessageType { get; set; } - - /// - /// Gets the subscription request message. - /// - public string Subscriber { get; set; } - } -} +using System; + +namespace NServiceBus.Unicast.Subscriptions.Msmq +{ + /// + /// Describes an entry in the list of subscriptions. + /// + [Serializable] + public class Entry + { + /// + /// Gets the message type for the subscription entry. + /// + public string MessageType { get; set; } + + /// + /// Gets the subscription request message. + /// + public string Subscriber { get; set; } + } +} diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/MsmqSubscriptionStorage.cs b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/MsmqSubscriptionStorage.cs index 50885283349..c4530ba42fb 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/MsmqSubscriptionStorage.cs +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/MsmqSubscriptionStorage.cs @@ -1,263 +1,263 @@ -#region License - -/* - * Copyright 2007-2008 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System; -using System.Collections.Generic; -using System.Messaging; -using Common.Logging; -using System.Transactions; -using NServiceBus.Utils; - -namespace NServiceBus.Unicast.Subscriptions.Msmq -{ - /// - /// Provides functionality for managing message subscriptions - /// using MSMQ. - /// - public class MsmqSubscriptionStorage : ISubscriptionStorage - { - void ISubscriptionStorage.Init() - { - foreach (var m in q.GetAllMessages()) - { - var subscriber = m.Label; - var messageType = m.Body as string; - - entries.Add(new Entry { MessageType = messageType, Subscriber = subscriber}); - AddToLookup(subscriber, messageType, m.Id); - } - } - - IEnumerable ISubscriptionStorage.GetSubscribersForMessage(IEnumerable messageTypes) - { - var result = new List(); - - lock (locker) - foreach (var e in entries) - foreach(var m in messageTypes) - if (e.MessageType == m) - if (!result.Contains(e.Subscriber)) - result.Add(e.Subscriber); - - return result; - } - - /// - /// Checks if configuration is wrong - endpoint isn't transactional and - /// object isn't configured to handle own transactions. - /// - /// - private bool ConfigurationIsWrong() - { - return (Transaction.Current == null && !DontUseExternalTransaction); - } - - void ISubscriptionStorage.Subscribe(string client, IEnumerable messageTypes) - { - lock (locker) - { - foreach (var m in messageTypes) - { - bool found = false; - foreach (var e in entries) - if (e.MessageType == m && e.Subscriber == client) - { - found = true; - break; - } - - if (!found) - { - Add(client, m); - - entries.Add(new Entry {MessageType = m, Subscriber = client}); - - log.Debug("Subscriber " + client + " added for message " + m + "."); - } - } - } - } - - void ISubscriptionStorage.Unsubscribe(string client, IEnumerable messageTypes) - { - lock (locker) - { - foreach (var e in entries.ToArray()) - foreach (var m in messageTypes) - if (e.MessageType == m && e.Subscriber == client) - { - Remove(client, m); - - entries.Remove(e); - - log.Debug("Subscriber " + client + " removed for message " + m + "."); - } - } - } - - /// - /// Adds a message to the subscription store. - /// - public void Add(string subscriber, string typeName) - { - var toSend = new Message {Formatter = q.Formatter, Recoverable = true, Label = subscriber, Body = typeName}; - - q.Send(toSend, GetTransactionType()); - - AddToLookup(subscriber, typeName, toSend.Id); - } - - /// - /// Removes a message from the subscription store. - /// - public void Remove(string subscriber, string typeName) - { - var messageId = RemoveFromLookup(subscriber, typeName); - - if (messageId == null) - return; - - q.ReceiveById(messageId, GetTransactionType()); - } - - /// - /// Returns the transaction type (automatic or single) that should be used - /// based on the configuration of enlisting into external transactions. - /// - /// - private MessageQueueTransactionType GetTransactionType() - { - if (ConfigurationIsWrong()) - throw new InvalidOperationException("This endpoint is not configured to be transactional. Processing subscriptions on a non-transactional endpoint is not supported by default. If you still wish to do so, please set the 'DontUseExternalTransaction' property of MsmqSubscriptionStorage to 'true'.\n\nThe recommended solution to this problem is to include '.IsTransaction(true)' after '.MsmqTransport()' in your fluent initialization code, or if you're using NServiceBus.Host.exe to have the class which implements IConfigureThisEndpoint to also inherit AsA_Server or AsA_Publisher."); - - var t = MessageQueueTransactionType.Automatic; - if (DontUseExternalTransaction) - t = MessageQueueTransactionType.Single; - return t; - } - - #region config info - - /// - /// Gets/sets whether or not to use a trasaction started outside the - /// subscription store. - /// - public virtual bool DontUseExternalTransaction { get; set; } - - /// - /// Sets the address of the queue where subscription messages will be stored. - /// For a local queue, just use its name - msmq specific info isn't needed. - /// For a remote queue (supported MSMQ 4.0), use the format "queue@machine". - /// - public string Queue - { - get { return queue; } - set - { - queue = value; - MsmqUtilities.CreateQueueIfNecessary(value); - - string path = MsmqUtilities.GetFullPath(value); - - q = new MessageQueue(path); - - bool transactional; - try - { - transactional = q.Transactional; - } - catch(Exception ex) - { - throw new ArgumentException(string.Format("There is a problem with the subscription storage queue {0}. See enclosed exception for details.", value), ex); - } - - if (!transactional) - throw new ArgumentException("Queue must be transactional (" + value + ")."); - - var mpf = new MessagePropertyFilter(); - mpf.SetAll(); - - q.Formatter = new XmlMessageFormatter(new[] { typeof(string) }); - - q.MessageReadPropertyFilter = mpf; - } - } - private string queue; - - #endregion - - #region helper methods - - /// - /// Adds a message to the lookup to find message from - /// subscriber, to message type, to message id - /// - private void AddToLookup(string subscriber, string typeName, string messageId) - { - lock (lookup) - { - if (!lookup.ContainsKey(subscriber)) - lookup.Add(subscriber, new Dictionary()); - - if (!lookup[subscriber].ContainsKey(typeName)) - lookup[subscriber].Add(typeName, messageId); - } - } - - private string RemoveFromLookup(string subscriber, string typeName) - { - string messageId = null; - lock (lookup) - { - Dictionary endpoints; - if (lookup.TryGetValue(subscriber, out endpoints)) - { - if (endpoints.TryGetValue(typeName, out messageId)) - { - endpoints.Remove(typeName); - if (endpoints.Count == 0) - { - lookup.Remove(subscriber); - } - } - } - } - return messageId; - } - - #endregion - - #region members - - private MessageQueue q; - - /// - /// lookup from subscriber, to message type, to message id - /// - private readonly Dictionary> lookup = new Dictionary>(); - - private readonly List entries = new List(); - private readonly object locker = new object(); - - private readonly ILog log = LogManager.GetLogger(typeof(ISubscriptionStorage)); - - #endregion - } -} +#region License + +/* + * Copyright 2007-2008 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System; +using System.Collections.Generic; +using System.Messaging; +using Common.Logging; +using System.Transactions; +using NServiceBus.Utils; + +namespace NServiceBus.Unicast.Subscriptions.Msmq +{ + /// + /// Provides functionality for managing message subscriptions + /// using MSMQ. + /// + public class MsmqSubscriptionStorage : ISubscriptionStorage + { + void ISubscriptionStorage.Init() + { + foreach (var m in q.GetAllMessages()) + { + var subscriber = m.Label; + var messageType = m.Body as string; + + entries.Add(new Entry { MessageType = messageType, Subscriber = subscriber}); + AddToLookup(subscriber, messageType, m.Id); + } + } + + IEnumerable ISubscriptionStorage.GetSubscribersForMessage(IEnumerable messageTypes) + { + var result = new List(); + + lock (locker) + foreach (var e in entries) + foreach(var m in messageTypes) + if (e.MessageType == m) + if (!result.Contains(e.Subscriber)) + result.Add(e.Subscriber); + + return result; + } + + /// + /// Checks if configuration is wrong - endpoint isn't transactional and + /// object isn't configured to handle own transactions. + /// + /// + private bool ConfigurationIsWrong() + { + return (Transaction.Current == null && !DontUseExternalTransaction); + } + + void ISubscriptionStorage.Subscribe(string client, IEnumerable messageTypes) + { + lock (locker) + { + foreach (var m in messageTypes) + { + bool found = false; + foreach (var e in entries) + if (e.MessageType == m && e.Subscriber == client) + { + found = true; + break; + } + + if (!found) + { + Add(client, m); + + entries.Add(new Entry {MessageType = m, Subscriber = client}); + + log.Debug("Subscriber " + client + " added for message " + m + "."); + } + } + } + } + + void ISubscriptionStorage.Unsubscribe(string client, IEnumerable messageTypes) + { + lock (locker) + { + foreach (var e in entries.ToArray()) + foreach (var m in messageTypes) + if (e.MessageType == m && e.Subscriber == client) + { + Remove(client, m); + + entries.Remove(e); + + log.Debug("Subscriber " + client + " removed for message " + m + "."); + } + } + } + + /// + /// Adds a message to the subscription store. + /// + public void Add(string subscriber, string typeName) + { + var toSend = new Message {Formatter = q.Formatter, Recoverable = true, Label = subscriber, Body = typeName}; + + q.Send(toSend, GetTransactionType()); + + AddToLookup(subscriber, typeName, toSend.Id); + } + + /// + /// Removes a message from the subscription store. + /// + public void Remove(string subscriber, string typeName) + { + var messageId = RemoveFromLookup(subscriber, typeName); + + if (messageId == null) + return; + + q.ReceiveById(messageId, GetTransactionType()); + } + + /// + /// Returns the transaction type (automatic or single) that should be used + /// based on the configuration of enlisting into external transactions. + /// + /// + private MessageQueueTransactionType GetTransactionType() + { + if (ConfigurationIsWrong()) + throw new InvalidOperationException("This endpoint is not configured to be transactional. Processing subscriptions on a non-transactional endpoint is not supported by default. If you still wish to do so, please set the 'DontUseExternalTransaction' property of MsmqSubscriptionStorage to 'true'.\n\nThe recommended solution to this problem is to include '.IsTransaction(true)' after '.MsmqTransport()' in your fluent initialization code, or if you're using NServiceBus.Host.exe to have the class which implements IConfigureThisEndpoint to also inherit AsA_Server or AsA_Publisher."); + + var t = MessageQueueTransactionType.Automatic; + if (DontUseExternalTransaction) + t = MessageQueueTransactionType.Single; + return t; + } + + #region config info + + /// + /// Gets/sets whether or not to use a trasaction started outside the + /// subscription store. + /// + public virtual bool DontUseExternalTransaction { get; set; } + + /// + /// Sets the address of the queue where subscription messages will be stored. + /// For a local queue, just use its name - msmq specific info isn't needed. + /// For a remote queue (supported MSMQ 4.0), use the format "queue@machine". + /// + public string Queue + { + get { return queue; } + set + { + queue = value; + MsmqUtilities.CreateQueueIfNecessary(value); + + string path = MsmqUtilities.GetFullPath(value); + + q = new MessageQueue(path); + + bool transactional; + try + { + transactional = q.Transactional; + } + catch(Exception ex) + { + throw new ArgumentException(string.Format("There is a problem with the subscription storage queue {0}. See enclosed exception for details.", value), ex); + } + + if (!transactional) + throw new ArgumentException("Queue must be transactional (" + value + ")."); + + var mpf = new MessagePropertyFilter(); + mpf.SetAll(); + + q.Formatter = new XmlMessageFormatter(new[] { typeof(string) }); + + q.MessageReadPropertyFilter = mpf; + } + } + private string queue; + + #endregion + + #region helper methods + + /// + /// Adds a message to the lookup to find message from + /// subscriber, to message type, to message id + /// + private void AddToLookup(string subscriber, string typeName, string messageId) + { + lock (lookup) + { + if (!lookup.ContainsKey(subscriber)) + lookup.Add(subscriber, new Dictionary()); + + if (!lookup[subscriber].ContainsKey(typeName)) + lookup[subscriber].Add(typeName, messageId); + } + } + + private string RemoveFromLookup(string subscriber, string typeName) + { + string messageId = null; + lock (lookup) + { + Dictionary endpoints; + if (lookup.TryGetValue(subscriber, out endpoints)) + { + if (endpoints.TryGetValue(typeName, out messageId)) + { + endpoints.Remove(typeName); + if (endpoints.Count == 0) + { + lookup.Remove(subscriber); + } + } + } + } + return messageId; + } + + #endregion + + #region members + + private MessageQueue q; + + /// + /// lookup from subscriber, to message type, to message id + /// + private readonly Dictionary> lookup = new Dictionary>(); + + private readonly List entries = new List(); + private readonly object locker = new object(); + + private readonly ILog log = LogManager.GetLogger(typeof(ISubscriptionStorage)); + + #endregion + } +} diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/NServiceBus.Unicast.Subscriptions.Msmq.Config/ConfigMsmqSubscriptionStorage.cs b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/NServiceBus.Unicast.Subscriptions.Msmq.Config/ConfigMsmqSubscriptionStorage.cs index ed68e5bc6b9..6abc4dc7396 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/NServiceBus.Unicast.Subscriptions.Msmq.Config/ConfigMsmqSubscriptionStorage.cs +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/NServiceBus.Unicast.Subscriptions.Msmq.Config/ConfigMsmqSubscriptionStorage.cs @@ -1,37 +1,37 @@ -using NServiceBus.ObjectBuilder; -using NServiceBus.Config; -using Common.Logging; - -namespace NServiceBus.Unicast.Subscriptions.Msmq.Config -{ - /// - /// Extends the base Configure class with MsmqSubscriptionStorage specific methods. - /// Reads administrator set values from the MsmqSubscriptionStorageConfig section - /// of the app.config. - /// - public class ConfigMsmqSubscriptionStorage : Configure - { - /// - /// Wraps the given configuration object but stores the same - /// builder and configurer properties. - /// - /// - public void Configure(Configure config) - { - Builder = config.Builder; - Configurer = config.Configurer; - - var cfg = GetConfigSection(); - - if (cfg == null) - Logger.Warn("Could not find configuration section for Msmq Subscription Storage."); - - string q = (cfg != null ? cfg.Queue : "NServiceBus_Subscriptions"); - - var storageConfig = Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); - storageConfig.ConfigureProperty(s => s.Queue, q); - } - - private static readonly ILog Logger = LogManager.GetLogger(typeof (MsmqSubscriptionStorage)); - } -} +using NServiceBus.ObjectBuilder; +using NServiceBus.Config; +using Common.Logging; + +namespace NServiceBus.Unicast.Subscriptions.Msmq.Config +{ + /// + /// Extends the base Configure class with MsmqSubscriptionStorage specific methods. + /// Reads administrator set values from the MsmqSubscriptionStorageConfig section + /// of the app.config. + /// + public class ConfigMsmqSubscriptionStorage : Configure + { + /// + /// Wraps the given configuration object but stores the same + /// builder and configurer properties. + /// + /// + public void Configure(Configure config) + { + Builder = config.Builder; + Configurer = config.Configurer; + + var cfg = GetConfigSection(); + + if (cfg == null) + Logger.Warn("Could not find configuration section for Msmq Subscription Storage."); + + string q = (cfg != null ? cfg.Queue : "NServiceBus_Subscriptions"); + + var storageConfig = Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); + storageConfig.ConfigureProperty(s => s.Queue, q); + } + + private static readonly ILog Logger = LogManager.GetLogger(typeof (MsmqSubscriptionStorage)); + } +} diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/NServiceBus.Unicast.Subscriptions.Msmq.Config/ConfigureMsmqSubscriptionStorage.cs b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/NServiceBus.Unicast.Subscriptions.Msmq.Config/ConfigureMsmqSubscriptionStorage.cs index 39fb8bc4352..f39538242b9 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/NServiceBus.Unicast.Subscriptions.Msmq.Config/ConfigureMsmqSubscriptionStorage.cs +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/NServiceBus.Unicast.Subscriptions.Msmq.Config/ConfigureMsmqSubscriptionStorage.cs @@ -1,30 +1,30 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using NServiceBus.Unicast.Subscriptions.Msmq.Config; - -namespace NServiceBus -{ - /// - /// Contains extension methods to NServiceBus.Configure. - /// - public static class ConfigureMsmqSubscriptionStorage - { - /// - /// Stores subscription data using MSMQ. - /// If multiple machines need to share the same list of subscribers, - /// you should not choose this option - prefer the DbSubscriptionStorage - /// in that case. - /// - /// - /// - public static ConfigMsmqSubscriptionStorage MsmqSubscriptionStorage(this Configure config) - { - ConfigMsmqSubscriptionStorage cfg = new ConfigMsmqSubscriptionStorage(); - cfg.Configure(config); - - return cfg; - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using NServiceBus.Unicast.Subscriptions.Msmq.Config; + +namespace NServiceBus +{ + /// + /// Contains extension methods to NServiceBus.Configure. + /// + public static class ConfigureMsmqSubscriptionStorage + { + /// + /// Stores subscription data using MSMQ. + /// If multiple machines need to share the same list of subscribers, + /// you should not choose this option - prefer the DbSubscriptionStorage + /// in that case. + /// + /// + /// + public static ConfigMsmqSubscriptionStorage MsmqSubscriptionStorage(this Configure config) + { + ConfigMsmqSubscriptionStorage cfg = new ConfigMsmqSubscriptionStorage(); + cfg.Configure(config); + + return cfg; + } + } +} diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/NServiceBus.Unicast.Subscriptions.Msmq.Config/MsmqSubscriptionStorageConfig.cs b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/NServiceBus.Unicast.Subscriptions.Msmq.Config/MsmqSubscriptionStorageConfig.cs index 727354cf5df..265f03d5cf7 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/NServiceBus.Unicast.Subscriptions.Msmq.Config/MsmqSubscriptionStorageConfig.cs +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/NServiceBus.Unicast.Subscriptions.Msmq.Config/MsmqSubscriptionStorageConfig.cs @@ -1,27 +1,27 @@ -using System.Configuration; - -namespace NServiceBus.Config -{ - /// - /// Contains the properties representing the MsmqSubscriptionStorage configuration section. - /// - public class MsmqSubscriptionStorageConfig : ConfigurationSection - { - /// - /// The queue where subscription data will be stored. - /// Use the "queue@machine" convention. - /// - [ConfigurationProperty("Queue", IsRequired = true)] - public string Queue - { - get - { - return this["Queue"] as string; - } - set - { - this["Queue"] = value; - } - } - } -} +using System.Configuration; + +namespace NServiceBus.Config +{ + /// + /// Contains the properties representing the MsmqSubscriptionStorage configuration section. + /// + public class MsmqSubscriptionStorageConfig : ConfigurationSection + { + /// + /// The queue where subscription data will be stored. + /// Use the "queue@machine" convention. + /// + [ConfigurationProperty("Queue", IsRequired = true)] + public string Queue + { + get + { + return this["Queue"] as string; + } + set + { + this["Queue"] = value; + } + } + } +} diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/NServiceBus.Unicast.Subscriptions.Msmq.Config/NServiceBus.Unicast.Subscriptions.Msmq.Config.csproj b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/NServiceBus.Unicast.Subscriptions.Msmq.Config/NServiceBus.Unicast.Subscriptions.Msmq.Config.csproj index 827f1a2c77f..65c58854b0a 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/NServiceBus.Unicast.Subscriptions.Msmq.Config/NServiceBus.Unicast.Subscriptions.Msmq.Config.csproj +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/NServiceBus.Unicast.Subscriptions.Msmq.Config/NServiceBus.Unicast.Subscriptions.Msmq.Config.csproj @@ -1,129 +1,129 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {585AB2C3-17B3-49B4-BA59-B5861317D7B3} - Library - Properties - NServiceBus.Unicast.Subscriptions.Msmq.Config - NServiceBus.Unicast.Subscriptions.Msmq.Config - v4.0 - 512 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.Unicast.Subscriptions.Msmq.Config.XML - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.Unicast.Subscriptions.Msmq.Config.XML - AllRules.ruleset - - - - False - ..\..\..\..\..\lib\Common.Logging.dll - - - False - ..\..\..\..\..\build\output\NServiceBus.dll - False - - - False - ..\..\..\..\..\build\NServiceBus.Config.dll - False - - - False - ..\..\..\..\..\build\NServiceBus.ObjectBuilder.dll - False - - - False - ..\..\..\..\..\build\NServiceBus.Unicast.Subscriptions.dll - False - - - - - 3.5 - - - - - - - CommonAssemblyInfo.cs - - - - - - - - - {6657A1B8-3773-46A4-88F2-A421E074D35F} - NServiceBus.Unicast.Subscriptions.Msmq - False - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\..\build\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {585AB2C3-17B3-49B4-BA59-B5861317D7B3} + Library + Properties + NServiceBus.Unicast.Subscriptions.Msmq.Config + NServiceBus.Unicast.Subscriptions.Msmq.Config + v4.0 + 512 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.Unicast.Subscriptions.Msmq.Config.XML + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.Unicast.Subscriptions.Msmq.Config.XML + AllRules.ruleset + + + + False + ..\..\..\..\..\lib\Common.Logging.dll + + + False + ..\..\..\..\..\build\output\NServiceBus.dll + False + + + False + ..\..\..\..\..\build\NServiceBus.Config.dll + False + + + False + ..\..\..\..\..\build\NServiceBus.ObjectBuilder.dll + False + + + False + ..\..\..\..\..\build\NServiceBus.Unicast.Subscriptions.dll + False + + + + + 3.5 + + + + + + + CommonAssemblyInfo.cs + + + + + + + + + {6657A1B8-3773-46A4-88F2-A421E074D35F} + NServiceBus.Unicast.Subscriptions.Msmq + False + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\..\build\" + \ No newline at end of file diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/NServiceBus.Unicast.Subscriptions.Msmq.Config/Properties/AssemblyInfo.cs b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/NServiceBus.Unicast.Subscriptions.Msmq.Config/Properties/AssemblyInfo.cs index 6ead3b2316c..dc316fc8086 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/NServiceBus.Unicast.Subscriptions.Msmq.Config/Properties/AssemblyInfo.cs +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/NServiceBus.Unicast.Subscriptions.Msmq.Config/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Msmq Subscription Storage Config")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Msmq Subscription Storage Config")] [assembly: AssemblyDescription("NServiceBus Msmq Subscription Storage Config")] \ No newline at end of file diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/NServiceBus.Unicast.Subscriptions.Msmq.csproj b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/NServiceBus.Unicast.Subscriptions.Msmq.csproj index 0fdb27a66eb..e41f4e70d49 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/NServiceBus.Unicast.Subscriptions.Msmq.csproj +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/NServiceBus.Unicast.Subscriptions.Msmq.csproj @@ -1,132 +1,132 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {6657A1B8-3773-46A4-88F2-A421E074D35F} - Library - Properties - NServiceBus.Unicast.Subscriptions.Msmq - NServiceBus.Unicast.Subscriptions.Msmq - - - - - - v4.0 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.Unicast.Subscriptions.Msmq.XML - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.Unicast.Subscriptions.Msmq.XML - AllRules.ruleset - - - - False - ..\..\..\..\lib\Common.Logging.dll - False - - - False - ..\..\..\..\build\output\NServiceBus.dll - False - - - False - ..\..\..\..\build\NServiceBus.ObjectBuilder.dll - False - - - False - ..\..\..\..\build\NServiceBus.Unicast.Subscriptions.dll - False - - - False - ..\..\..\..\build\NServiceBus.Unicast.Transport.dll - False - - - False - ..\..\..\..\build\NServiceBus.Utils.dll - - - - - 3.5 - - - - - - - - - CommonAssemblyInfo.cs - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {6657A1B8-3773-46A4-88F2-A421E074D35F} + Library + Properties + NServiceBus.Unicast.Subscriptions.Msmq + NServiceBus.Unicast.Subscriptions.Msmq + + + + + + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.Unicast.Subscriptions.Msmq.XML + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.Unicast.Subscriptions.Msmq.XML + AllRules.ruleset + + + + False + ..\..\..\..\lib\Common.Logging.dll + False + + + False + ..\..\..\..\build\output\NServiceBus.dll + False + + + False + ..\..\..\..\build\NServiceBus.ObjectBuilder.dll + False + + + False + ..\..\..\..\build\NServiceBus.Unicast.Subscriptions.dll + False + + + False + ..\..\..\..\build\NServiceBus.Unicast.Transport.dll + False + + + False + ..\..\..\..\build\NServiceBus.Utils.dll + + + + + 3.5 + + + + + + + + + CommonAssemblyInfo.cs + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\" + \ No newline at end of file diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/NServiceBus.Unicast.Subscriptions.Msmq.sln b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/NServiceBus.Unicast.Subscriptions.Msmq.sln index 401c6003a9b..ba55439f040 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/NServiceBus.Unicast.Subscriptions.Msmq.sln +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/NServiceBus.Unicast.Subscriptions.Msmq.sln @@ -1,26 +1,26 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Subscriptions.Msmq", "NServiceBus.Unicast.Subscriptions.Msmq.csproj", "{6657A1B8-3773-46A4-88F2-A421E074D35F}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Subscriptions.Msmq.Config", "NServiceBus.Unicast.Subscriptions.Msmq.Config\NServiceBus.Unicast.Subscriptions.Msmq.Config.csproj", "{585AB2C3-17B3-49B4-BA59-B5861317D7B3}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {6657A1B8-3773-46A4-88F2-A421E074D35F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6657A1B8-3773-46A4-88F2-A421E074D35F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6657A1B8-3773-46A4-88F2-A421E074D35F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6657A1B8-3773-46A4-88F2-A421E074D35F}.Release|Any CPU.Build.0 = Release|Any CPU - {585AB2C3-17B3-49B4-BA59-B5861317D7B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {585AB2C3-17B3-49B4-BA59-B5861317D7B3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {585AB2C3-17B3-49B4-BA59-B5861317D7B3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {585AB2C3-17B3-49B4-BA59-B5861317D7B3}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Subscriptions.Msmq", "NServiceBus.Unicast.Subscriptions.Msmq.csproj", "{6657A1B8-3773-46A4-88F2-A421E074D35F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Subscriptions.Msmq.Config", "NServiceBus.Unicast.Subscriptions.Msmq.Config\NServiceBus.Unicast.Subscriptions.Msmq.Config.csproj", "{585AB2C3-17B3-49B4-BA59-B5861317D7B3}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6657A1B8-3773-46A4-88F2-A421E074D35F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6657A1B8-3773-46A4-88F2-A421E074D35F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6657A1B8-3773-46A4-88F2-A421E074D35F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6657A1B8-3773-46A4-88F2-A421E074D35F}.Release|Any CPU.Build.0 = Release|Any CPU + {585AB2C3-17B3-49B4-BA59-B5861317D7B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {585AB2C3-17B3-49B4-BA59-B5861317D7B3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {585AB2C3-17B3-49B4-BA59-B5861317D7B3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {585AB2C3-17B3-49B4-BA59-B5861317D7B3}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/Properties/AssemblyInfo.cs b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/Properties/AssemblyInfo.cs index 50a8e11d0dd..a0e52beaf27 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/Properties/AssemblyInfo.cs +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.Msmq/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Concrete Unicast Subscription Storage Implementation")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Concrete Unicast Subscription Storage Implementation")] [assembly: AssemblyDescription("Implementation of the unicast subscription storage abstraction using MSMQ")] \ No newline at end of file diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate.Tests/App.config b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate.Tests/App.config index 7934b173d88..a760e18179d 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate.Tests/App.config +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate.Tests/App.config @@ -1,19 +1,19 @@ - - - -
-
- - - - - - - - - - - - - + + + +
+
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate.Tests/Config/When_configuring_the_subscription_storage.cs b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate.Tests/Config/When_configuring_the_subscription_storage.cs index 83ecf30e7ea..f1ed3e5c7b8 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate.Tests/Config/When_configuring_the_subscription_storage.cs +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate.Tests/Config/When_configuring_the_subscription_storage.cs @@ -1,84 +1,84 @@ -using System; -using NServiceBus.Config.ConfigurationSource; -using NUnit.Framework; -using Rhino.Mocks; - -namespace NServiceBus.Unicast.Subscriptions.NHibernate.Tests.Config -{ - [TestFixture] - public class When_configuring_the_subscription_storage - { - private Configure config; - - [SetUp] - public void SetUp() - { - config = Configure.With(new Type[] { }) - .DefaultBuilder() - .DBSubcriptionStorage(); - - } - - [Test] - public void The_session_provider_should_be_registered_as_singleton() - { - - var sessionSource = config.Builder.Build(); - - Assert.That(sessionSource, Is.EqualTo(config.Builder.Build())); - - // sessionSource.ShouldBeTheSameAs(config.Builder.Build()); - - } - - - [Test] - public void The_storage_should_be_registered_as_singlecall() - { - - var subscriptionStorage = config.Builder.Build(); - - Assert.That(subscriptionStorage, Is.Not.EqualTo(config.Builder.Build())); - - //subscriptionStorage.ShouldNotBeTheSameAs(config.Builder.Build()); - - } - - [Test] - public void Database_schema_should_be_updated_as_default() - { - var sessionSource = config.Builder.Build(); - - using (var session = sessionSource.OpenSession()) - { - session.CreateCriteria(typeof(Subscription)).List(); - } - - } - - - [Test] - public void Persister_can_be_configured_to_use_sqlite_if_no_config_section_is_found() - { - var configSource = MockRepository.GenerateStub(); - - var configWithoutConfigSection = Configure.With(new Type[]{}) - .DefaultBuilder() - .CustomConfigurationSource(configSource) - .DBSubcriptionStorageWithSQLiteAndAutomaticSchemaGeneration(); - - configWithoutConfigSection.Builder.Build(); - - } - - [Test] - public void NHibernate_proxy_factory_should_default_to_linfu() - { - //will fail if no proxy is set - config.Builder.Build(); - } - - - - } +using System; +using NServiceBus.Config.ConfigurationSource; +using NUnit.Framework; +using Rhino.Mocks; + +namespace NServiceBus.Unicast.Subscriptions.NHibernate.Tests.Config +{ + [TestFixture] + public class When_configuring_the_subscription_storage + { + private Configure config; + + [SetUp] + public void SetUp() + { + config = Configure.With(new Type[] { }) + .DefaultBuilder() + .DBSubcriptionStorage(); + + } + + [Test] + public void The_session_provider_should_be_registered_as_singleton() + { + + var sessionSource = config.Builder.Build(); + + Assert.That(sessionSource, Is.EqualTo(config.Builder.Build())); + + // sessionSource.ShouldBeTheSameAs(config.Builder.Build()); + + } + + + [Test] + public void The_storage_should_be_registered_as_singlecall() + { + + var subscriptionStorage = config.Builder.Build(); + + Assert.That(subscriptionStorage, Is.Not.EqualTo(config.Builder.Build())); + + //subscriptionStorage.ShouldNotBeTheSameAs(config.Builder.Build()); + + } + + [Test] + public void Database_schema_should_be_updated_as_default() + { + var sessionSource = config.Builder.Build(); + + using (var session = sessionSource.OpenSession()) + { + session.CreateCriteria(typeof(Subscription)).List(); + } + + } + + + [Test] + public void Persister_can_be_configured_to_use_sqlite_if_no_config_section_is_found() + { + var configSource = MockRepository.GenerateStub(); + + var configWithoutConfigSection = Configure.With(new Type[]{}) + .DefaultBuilder() + .CustomConfigurationSource(configSource) + .DBSubcriptionStorageWithSQLiteAndAutomaticSchemaGeneration(); + + configWithoutConfigSection.Builder.Build(); + + } + + [Test] + public void NHibernate_proxy_factory_should_default_to_linfu() + { + //will fail if no proxy is set + config.Builder.Build(); + } + + + + } } \ No newline at end of file diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate.Tests/InMemoryDBFixture.cs b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate.Tests/InMemoryDBFixture.cs index fb77d1996e0..e7263cb71a6 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate.Tests/InMemoryDBFixture.cs +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate.Tests/InMemoryDBFixture.cs @@ -1,34 +1,34 @@ -using System.IO; -using FluentNHibernate; -using FluentNHibernate.Cfg; -using FluentNHibernate.Cfg.Db; -using NHibernate; -using NHibernate.ByteCode.LinFu; -using NHibernate.Tool.hbm2ddl; -using NUnit.Framework; - -namespace NServiceBus.Unicast.Subscriptions.NHibernate.Tests -{ - public class InMemoryDBFixture - { - protected ISubscriptionStorage storage; - protected ISubscriptionStorageSessionProvider subscriptionStorageSessionProvider; - - [SetUp] - public void SetupContext() - { - var cfg = SQLiteConfiguration.Standard - .UsingFile(Path.GetTempFileName()) - .ProxyFactoryFactory(typeof(ProxyFactoryFactory).AssemblyQualifiedName); - - var fc = Fluently.Configure() - .Database(cfg) - .Mappings(m => m.FluentMappings.AddFromAssemblyOf()) - .ExposeConfiguration(config => new SchemaExport(config).Create(true, true)); - - subscriptionStorageSessionProvider = new SubscriptionStorageSessionProvider(fc.BuildSessionFactory()); - - storage = new SubscriptionStorage(subscriptionStorageSessionProvider); - } - } +using System.IO; +using FluentNHibernate; +using FluentNHibernate.Cfg; +using FluentNHibernate.Cfg.Db; +using NHibernate; +using NHibernate.ByteCode.LinFu; +using NHibernate.Tool.hbm2ddl; +using NUnit.Framework; + +namespace NServiceBus.Unicast.Subscriptions.NHibernate.Tests +{ + public class InMemoryDBFixture + { + protected ISubscriptionStorage storage; + protected ISubscriptionStorageSessionProvider subscriptionStorageSessionProvider; + + [SetUp] + public void SetupContext() + { + var cfg = SQLiteConfiguration.Standard + .UsingFile(Path.GetTempFileName()) + .ProxyFactoryFactory(typeof(ProxyFactoryFactory).AssemblyQualifiedName); + + var fc = Fluently.Configure() + .Database(cfg) + .Mappings(m => m.FluentMappings.AddFromAssemblyOf()) + .ExposeConfiguration(config => new SchemaExport(config).Create(true, true)); + + subscriptionStorageSessionProvider = new SubscriptionStorageSessionProvider(fc.BuildSessionFactory()); + + storage = new SubscriptionStorage(subscriptionStorageSessionProvider); + } + } } \ No newline at end of file diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate.Tests/NServiceBus.Unicast.Subscriptions.NHibernate.Tests.csproj b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate.Tests/NServiceBus.Unicast.Subscriptions.NHibernate.Tests.csproj index bf8b5f2b0e0..eea4765e352 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate.Tests/NServiceBus.Unicast.Subscriptions.NHibernate.Tests.csproj +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate.Tests/NServiceBus.Unicast.Subscriptions.NHibernate.Tests.csproj @@ -1,154 +1,154 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {06AE9368-B357-4682-8B79-1FB186BF38B5} - Library - Properties - NServiceBus.Unicast.Subscriptions.NHibernate.Tests - NServiceBus.Unicast.Subscriptions.NHibernate.Tests - v4.0 - 512 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AnyCPU - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AnyCPU - AllRules.ruleset - - - - False - ..\..\..\..\lib\FluentNHibernate\FluentNHibernate.dll - - - False - ..\..\..\..\lib\NHibernate.dll - - - False - ..\..\..\..\lib\NHibernate.ByteCode.LinFu.dll - - - False - ..\..\..\..\build\output\NServiceBus.dll - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.DefaultBuilder.dll - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Subscriptions.dll - - - False - ..\..\..\..\tools\NUnit\nunit.framework.dll - - - False - ..\..\..\..\lib\Rhino.Mocks\Rhino.Mocks.dll - - - False - ..\..\..\..\lib\Spring.Core.dll - - - - - - False - ..\..\..\..\lib\sqlite\System.Data.SQLite.dll - - - - - - - - - CommonAssemblyInfo.cs - - - - - - - - - - - {FB2ACC79-1E04-47CA-8F4B-31327E10B5E3} - NServiceBus.Unicast.Subscriptions.NHibernate - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {06AE9368-B357-4682-8B79-1FB186BF38B5} + Library + Properties + NServiceBus.Unicast.Subscriptions.NHibernate.Tests + NServiceBus.Unicast.Subscriptions.NHibernate.Tests + v4.0 + 512 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AnyCPU + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AnyCPU + AllRules.ruleset + + + + False + ..\..\..\..\lib\FluentNHibernate\FluentNHibernate.dll + + + False + ..\..\..\..\lib\NHibernate.dll + + + False + ..\..\..\..\lib\NHibernate.ByteCode.LinFu.dll + + + False + ..\..\..\..\build\output\NServiceBus.dll + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.DefaultBuilder.dll + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Subscriptions.dll + + + False + ..\..\..\..\tools\NUnit\nunit.framework.dll + + + False + ..\..\..\..\lib\Rhino.Mocks\Rhino.Mocks.dll + + + False + ..\..\..\..\lib\Spring.Core.dll + + + + + + False + ..\..\..\..\lib\sqlite\System.Data.SQLite.dll + + + + + + + + + CommonAssemblyInfo.cs + + + + + + + + + + + {FB2ACC79-1E04-47CA-8F4B-31327E10B5E3} + NServiceBus.Unicast.Subscriptions.NHibernate + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + \ No newline at end of file diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate.Tests/Properties/AssemblyInfo.cs b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate.Tests/Properties/AssemblyInfo.cs index f8a5f7d91d9..9dbfb3e6e83 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate.Tests/Properties/AssemblyInfo.cs +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate.Tests/Properties/AssemblyInfo.cs @@ -1,2 +1,2 @@ -using System.Reflection; +using System.Reflection; [assembly: AssemblyTitle("NServiceBus.Unicast.Subscriptions.NHibernate.Tests")] \ No newline at end of file diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate.Tests/When_listing_subscribers_for_message_types.cs b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate.Tests/When_listing_subscribers_for_message_types.cs index 902e6214674..14762b734a4 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate.Tests/When_listing_subscribers_for_message_types.cs +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate.Tests/When_listing_subscribers_for_message_types.cs @@ -1,26 +1,26 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using NUnit.Framework; - -namespace NServiceBus.Unicast.Subscriptions.NHibernate.Tests -{ - [TestFixture] - public class When_listing_subscribers_for_message_types : InMemoryDBFixture - { - [Test] - public void The_names_of_all_subscibers_should_be_returned() - { - string clientEndpoint = "TestEndpoint"; - - storage.Subscribe(clientEndpoint, new List { "MessageType1" }); - storage.Subscribe(clientEndpoint, new List { "MessageType2" }); - storage.Subscribe("some other endpoint", new List { "MessageType1" }); - - var subscriptionsForMessageType = storage.GetSubscribersForMessage(new List { "MessageType1" }); - - Assert.AreEqual(subscriptionsForMessageType.Count(), 2); - Assert.AreEqual(subscriptionsForMessageType.First(), clientEndpoint); - } - } +using System; +using System.Collections.Generic; +using System.Linq; +using NUnit.Framework; + +namespace NServiceBus.Unicast.Subscriptions.NHibernate.Tests +{ + [TestFixture] + public class When_listing_subscribers_for_message_types : InMemoryDBFixture + { + [Test] + public void The_names_of_all_subscibers_should_be_returned() + { + string clientEndpoint = "TestEndpoint"; + + storage.Subscribe(clientEndpoint, new List { "MessageType1" }); + storage.Subscribe(clientEndpoint, new List { "MessageType2" }); + storage.Subscribe("some other endpoint", new List { "MessageType1" }); + + var subscriptionsForMessageType = storage.GetSubscribersForMessage(new List { "MessageType1" }); + + Assert.AreEqual(subscriptionsForMessageType.Count(), 2); + Assert.AreEqual(subscriptionsForMessageType.First(), clientEndpoint); + } + } } \ No newline at end of file diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate.Tests/When_receiving_a_subscription_message.cs b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate.Tests/When_receiving_a_subscription_message.cs index bf574ee7a9c..aee044ba4f3 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate.Tests/When_receiving_a_subscription_message.cs +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate.Tests/When_receiving_a_subscription_message.cs @@ -1,47 +1,47 @@ -using System; -using System.Collections.Generic; -using System.Transactions; -using NUnit.Framework; - -namespace NServiceBus.Unicast.Subscriptions.NHibernate.Tests -{ - [TestFixture] - public class When_receiving_a_subscription_message : InMemoryDBFixture - { - [Test] - public void A_subscription_entry_should_be_added_to_the_database() - { - string clientEndpoint = "TestEndpoint"; - - var messageTypes = new List { "MessageType1", "MessageType2" }; - - using (var transaction = new TransactionScope()) - { - storage.Subscribe(clientEndpoint, messageTypes); - transaction.Complete(); - } - - using (var session = subscriptionStorageSessionProvider.OpenSession()) - { - var subscriptions = session.CreateCriteria(typeof(Subscription)).List(); - - Assert.AreEqual(subscriptions.Count, 2); - } - } - - [Test] - public void Duplicate_subcription_shouldnt_create_additional_db_rows() - { - - storage.Subscribe("testendpoint", new List { "SomeMessageType" }); - storage.Subscribe("testendpoint", new List { "SomeMessageType" }); - - - using (var session = subscriptionStorageSessionProvider.OpenSession()) - { - var subscriptions = session.CreateCriteria(typeof(Subscription)).List(); - Assert.AreEqual(subscriptions.Count, 1); - } - } - } -} +using System; +using System.Collections.Generic; +using System.Transactions; +using NUnit.Framework; + +namespace NServiceBus.Unicast.Subscriptions.NHibernate.Tests +{ + [TestFixture] + public class When_receiving_a_subscription_message : InMemoryDBFixture + { + [Test] + public void A_subscription_entry_should_be_added_to_the_database() + { + string clientEndpoint = "TestEndpoint"; + + var messageTypes = new List { "MessageType1", "MessageType2" }; + + using (var transaction = new TransactionScope()) + { + storage.Subscribe(clientEndpoint, messageTypes); + transaction.Complete(); + } + + using (var session = subscriptionStorageSessionProvider.OpenSession()) + { + var subscriptions = session.CreateCriteria(typeof(Subscription)).List(); + + Assert.AreEqual(subscriptions.Count, 2); + } + } + + [Test] + public void Duplicate_subcription_shouldnt_create_additional_db_rows() + { + + storage.Subscribe("testendpoint", new List { "SomeMessageType" }); + storage.Subscribe("testendpoint", new List { "SomeMessageType" }); + + + using (var session = subscriptionStorageSessionProvider.OpenSession()) + { + var subscriptions = session.CreateCriteria(typeof(Subscription)).List(); + Assert.AreEqual(subscriptions.Count, 1); + } + } + } +} diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate.Tests/When_receiving_a_unsubscription_message.cs b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate.Tests/When_receiving_a_unsubscription_message.cs index 574827e509e..b847b27bd5b 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate.Tests/When_receiving_a_unsubscription_message.cs +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate.Tests/When_receiving_a_unsubscription_message.cs @@ -1,38 +1,38 @@ -using System.Collections.Generic; -using System.Transactions; -using NUnit.Framework; - -namespace NServiceBus.Unicast.Subscriptions.NHibernate.Tests -{ - [TestFixture] - public class When_receiving_a_unsubscription_message : InMemoryDBFixture - { - [Test] - public void All_subscription_entries_for_specfied_message_types_should_be_removed() - { - string clientEndpoint = "TestEndpoint"; - - var messageTypes = new List { "MessageType1", "MessageType2" }; - - using (var transaction = new TransactionScope()) - { - storage.Subscribe(clientEndpoint, messageTypes); - transaction.Complete(); - } - - - using (var transaction = new TransactionScope()) - { - storage.Unsubscribe(clientEndpoint, messageTypes); - transaction.Complete(); - } - - - using (var session = subscriptionStorageSessionProvider.OpenSession()) - { - var subscriptions = session.CreateCriteria(typeof(Subscription)).List(); - Assert.AreEqual(subscriptions.Count, 0); - } - } - } +using System.Collections.Generic; +using System.Transactions; +using NUnit.Framework; + +namespace NServiceBus.Unicast.Subscriptions.NHibernate.Tests +{ + [TestFixture] + public class When_receiving_a_unsubscription_message : InMemoryDBFixture + { + [Test] + public void All_subscription_entries_for_specfied_message_types_should_be_removed() + { + string clientEndpoint = "TestEndpoint"; + + var messageTypes = new List { "MessageType1", "MessageType2" }; + + using (var transaction = new TransactionScope()) + { + storage.Subscribe(clientEndpoint, messageTypes); + transaction.Complete(); + } + + + using (var transaction = new TransactionScope()) + { + storage.Unsubscribe(clientEndpoint, messageTypes); + transaction.Complete(); + } + + + using (var session = subscriptionStorageSessionProvider.OpenSession()) + { + var subscriptions = session.CreateCriteria(typeof(Subscription)).List(); + Assert.AreEqual(subscriptions.Count, 0); + } + } + } } \ No newline at end of file diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/Config/ConfigureNHibernateSubscriptionStorage.cs b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/Config/ConfigureNHibernateSubscriptionStorage.cs index 42e63ccfca7..991d4ec98ec 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/Config/ConfigureNHibernateSubscriptionStorage.cs +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/Config/ConfigureNHibernateSubscriptionStorage.cs @@ -1,102 +1,102 @@ -using System; -using System.Collections.Generic; -using FluentNHibernate; -using FluentNHibernate.Cfg; -using FluentNHibernate.Cfg.Db; -using NHibernate.ByteCode.LinFu; -using NHibernate.Tool.hbm2ddl; -using NServiceBus.Config; -using NServiceBus.ObjectBuilder; -using NServiceBus.Unicast.Subscriptions.NHibernate; -using NServiceBus.Unicast.Subscriptions.NHibernate.Config; -using Configuration = NHibernate.Cfg.Configuration; - -namespace NServiceBus -{ - /// - /// Configuration extensions for the NHibernate subscription storage - /// - public static class ConfigureNHibernateSubscriptionStorage - { - /// - /// Configures the storage with Sqlite as DB and auto generates schema on startup - /// - /// - /// - public static Configure DBSubcriptionStorageWithSQLiteAndAutomaticSchemaGeneration(this Configure config) - { - var nhibernateProperties = SQLiteConfiguration - .Standard - .ProxyFactoryFactory(typeof(ProxyFactoryFactory).AssemblyQualifiedName) - .UsingFile(".\\NServiceBus.Subscriptions.sqlite") - .ToProperties(); - - return DBSubcriptionStorage(config, nhibernateProperties, true); - } - - /// - /// Configures DB Subscription Storage , DB Settings etc are read from custom config section (DBSubscriptionStoreage) - /// - /// - /// - public static Configure DBSubcriptionStorage(this Configure config) - { - - var configSection = Configure.GetConfigSection(); - - if (configSection == null) - { - throw new InvalidOperationException("No configuration section for DB Subscription Storage found. Pleas add a DBSubscriptionStorageConfig section to you configuration file"); - } - - - if (configSection.NHibernateProperties.Count == 0) - { - throw new InvalidOperationException("No NHibernate properties found. Please specify NHibernateProperties in your DBSubscriptionStorageConfig section"); - } - - return DBSubcriptionStorage(config, - configSection.NHibernateProperties.ToProperties(), - configSection.UpdateSchema); - } - - /// - /// Configures the storage with the user supplied persistence configuration - /// DB schema is updated if requested by the user - /// - /// - /// - /// - /// - public static Configure DBSubcriptionStorage(this Configure config, - IDictionary nhibernateProperties, - bool autoUpdateSchema) - { - - var fluentConfiguration = Fluently.Configure(new Configuration().SetProperties(nhibernateProperties)) - .Mappings(m => m.FluentMappings.Add(typeof(SubscriptionMap))); - - var cfg = fluentConfiguration.BuildConfiguration(); - - if (autoUpdateSchema) - new SchemaUpdate(cfg).Execute(false, true); - - //default to LinFu if not specifed by user - if (!cfg.Properties.Keys.Contains(PROXY_FACTORY_KEY)) - fluentConfiguration.ExposeConfiguration( - x => - x.SetProperty(PROXY_FACTORY_KEY, typeof(ProxyFactoryFactory).AssemblyQualifiedName)); - - var sessionSource = new SubscriptionStorageSessionProvider(fluentConfiguration.BuildSessionFactory()); - - - config.Configurer.RegisterSingleton(sessionSource); - config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singlecall); - - return config; - - } - - private const string PROXY_FACTORY_KEY = "proxyfactory.factory_class"; - } +using System; +using System.Collections.Generic; +using FluentNHibernate; +using FluentNHibernate.Cfg; +using FluentNHibernate.Cfg.Db; +using NHibernate.ByteCode.LinFu; +using NHibernate.Tool.hbm2ddl; +using NServiceBus.Config; +using NServiceBus.ObjectBuilder; +using NServiceBus.Unicast.Subscriptions.NHibernate; +using NServiceBus.Unicast.Subscriptions.NHibernate.Config; +using Configuration = NHibernate.Cfg.Configuration; + +namespace NServiceBus +{ + /// + /// Configuration extensions for the NHibernate subscription storage + /// + public static class ConfigureNHibernateSubscriptionStorage + { + /// + /// Configures the storage with Sqlite as DB and auto generates schema on startup + /// + /// + /// + public static Configure DBSubcriptionStorageWithSQLiteAndAutomaticSchemaGeneration(this Configure config) + { + var nhibernateProperties = SQLiteConfiguration + .Standard + .ProxyFactoryFactory(typeof(ProxyFactoryFactory).AssemblyQualifiedName) + .UsingFile(".\\NServiceBus.Subscriptions.sqlite") + .ToProperties(); + + return DBSubcriptionStorage(config, nhibernateProperties, true); + } + + /// + /// Configures DB Subscription Storage , DB Settings etc are read from custom config section (DBSubscriptionStoreage) + /// + /// + /// + public static Configure DBSubcriptionStorage(this Configure config) + { + + var configSection = Configure.GetConfigSection(); + + if (configSection == null) + { + throw new InvalidOperationException("No configuration section for DB Subscription Storage found. Pleas add a DBSubscriptionStorageConfig section to you configuration file"); + } + + + if (configSection.NHibernateProperties.Count == 0) + { + throw new InvalidOperationException("No NHibernate properties found. Please specify NHibernateProperties in your DBSubscriptionStorageConfig section"); + } + + return DBSubcriptionStorage(config, + configSection.NHibernateProperties.ToProperties(), + configSection.UpdateSchema); + } + + /// + /// Configures the storage with the user supplied persistence configuration + /// DB schema is updated if requested by the user + /// + /// + /// + /// + /// + public static Configure DBSubcriptionStorage(this Configure config, + IDictionary nhibernateProperties, + bool autoUpdateSchema) + { + + var fluentConfiguration = Fluently.Configure(new Configuration().SetProperties(nhibernateProperties)) + .Mappings(m => m.FluentMappings.Add(typeof(SubscriptionMap))); + + var cfg = fluentConfiguration.BuildConfiguration(); + + if (autoUpdateSchema) + new SchemaUpdate(cfg).Execute(false, true); + + //default to LinFu if not specifed by user + if (!cfg.Properties.Keys.Contains(PROXY_FACTORY_KEY)) + fluentConfiguration.ExposeConfiguration( + x => + x.SetProperty(PROXY_FACTORY_KEY, typeof(ProxyFactoryFactory).AssemblyQualifiedName)); + + var sessionSource = new SubscriptionStorageSessionProvider(fluentConfiguration.BuildSessionFactory()); + + + config.Configurer.RegisterSingleton(sessionSource); + config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singlecall); + + return config; + + } + + private const string PROXY_FACTORY_KEY = "proxyfactory.factory_class"; + } } \ No newline at end of file diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/Config/DBSubscriptionStorageConfig.cs b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/Config/DBSubscriptionStorageConfig.cs index 984890a9b3a..6808cb18bdd 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/Config/DBSubscriptionStorageConfig.cs +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/Config/DBSubscriptionStorageConfig.cs @@ -1,36 +1,36 @@ -using System.Configuration; -using NServiceBus.Unicast.Subscriptions.NHibernate.Config; - -namespace NServiceBus.Config -{ - public class DBSubscriptionStorageConfig:ConfigurationSection - { - [ConfigurationProperty("NHibernateProperties", IsRequired = false)] - public NHibernatePropertyCollection NHibernateProperties - { - get - { - return this["NHibernateProperties"] as NHibernatePropertyCollection; - } - set - { - this["NHibernateProperties"] = value; - } - } - - [ConfigurationProperty("UpdateSchema", IsRequired = false,DefaultValue = true)] - public bool UpdateSchema - { - - get - { - - return (bool)this["UpdateSchema"]; - } - set - { - this["UpdateSchema"] = value; - } - } - } +using System.Configuration; +using NServiceBus.Unicast.Subscriptions.NHibernate.Config; + +namespace NServiceBus.Config +{ + public class DBSubscriptionStorageConfig:ConfigurationSection + { + [ConfigurationProperty("NHibernateProperties", IsRequired = false)] + public NHibernatePropertyCollection NHibernateProperties + { + get + { + return this["NHibernateProperties"] as NHibernatePropertyCollection; + } + set + { + this["NHibernateProperties"] = value; + } + } + + [ConfigurationProperty("UpdateSchema", IsRequired = false,DefaultValue = true)] + public bool UpdateSchema + { + + get + { + + return (bool)this["UpdateSchema"]; + } + set + { + this["UpdateSchema"] = value; + } + } + } } \ No newline at end of file diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/Config/NHibernateProperty.cs b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/Config/NHibernateProperty.cs index f61d586f804..84867968945 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/Config/NHibernateProperty.cs +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/Config/NHibernateProperty.cs @@ -1,33 +1,33 @@ -using System.Configuration; - -namespace NServiceBus.Unicast.Subscriptions.NHibernate.Config -{ - public class NHibernateProperty : ConfigurationElement - { - [ConfigurationProperty("Key", IsRequired = true, IsKey = true)] - public string Key - { - get - { - return (string)this["Key"]; - } - set - { - this["Key"] = value; - } - } - - [ConfigurationProperty("Value", IsRequired = true, IsKey = false)] - public string Value - { - get - { - return (string)this["Value"]; - } - set - { - this["Value"] = value; - } - } - } +using System.Configuration; + +namespace NServiceBus.Unicast.Subscriptions.NHibernate.Config +{ + public class NHibernateProperty : ConfigurationElement + { + [ConfigurationProperty("Key", IsRequired = true, IsKey = true)] + public string Key + { + get + { + return (string)this["Key"]; + } + set + { + this["Key"] = value; + } + } + + [ConfigurationProperty("Value", IsRequired = true, IsKey = false)] + public string Value + { + get + { + return (string)this["Value"]; + } + set + { + this["Value"] = value; + } + } + } } \ No newline at end of file diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/Config/NHibernatePropertyCollection.cs b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/Config/NHibernatePropertyCollection.cs index 942360d579d..e954bc74a0b 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/Config/NHibernatePropertyCollection.cs +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/Config/NHibernatePropertyCollection.cs @@ -1,34 +1,34 @@ -using System.Collections.Generic; -using System.Configuration; - -namespace NServiceBus.Unicast.Subscriptions.NHibernate.Config -{ - public class NHibernatePropertyCollection : ConfigurationElementCollection - { - protected override ConfigurationElement CreateNewElement() - { - return new NHibernateProperty(); - } - - protected override object GetElementKey(ConfigurationElement element) - { - return ((NHibernateProperty)element).Key; - } - - - public IDictionary ToProperties() - { - var retval = new Dictionary(); - - foreach (var element in this) - { - - retval.Add( - (element as NHibernateProperty).Key, - (element as NHibernateProperty).Value); - } - - return retval; - } - } +using System.Collections.Generic; +using System.Configuration; + +namespace NServiceBus.Unicast.Subscriptions.NHibernate.Config +{ + public class NHibernatePropertyCollection : ConfigurationElementCollection + { + protected override ConfigurationElement CreateNewElement() + { + return new NHibernateProperty(); + } + + protected override object GetElementKey(ConfigurationElement element) + { + return ((NHibernateProperty)element).Key; + } + + + public IDictionary ToProperties() + { + var retval = new Dictionary(); + + foreach (var element in this) + { + + retval.Add( + (element as NHibernateProperty).Key, + (element as NHibernateProperty).Value); + } + + return retval; + } + } } \ No newline at end of file diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/Config/SubscriptionMap.cs b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/Config/SubscriptionMap.cs index 08a24273164..f55bad0702a 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/Config/SubscriptionMap.cs +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/Config/SubscriptionMap.cs @@ -1,15 +1,15 @@ -using FluentNHibernate.Mapping; - -namespace NServiceBus.Unicast.Subscriptions.NHibernate.Config -{ - public class SubscriptionMap : ClassMap - { - public SubscriptionMap() - { - CompositeId() - .KeyProperty(x => x.SubscriberEndpoint) - .KeyProperty(x => x.MessageType); - - } - } +using FluentNHibernate.Mapping; + +namespace NServiceBus.Unicast.Subscriptions.NHibernate.Config +{ + public class SubscriptionMap : ClassMap + { + public SubscriptionMap() + { + CompositeId() + .KeyProperty(x => x.SubscriberEndpoint) + .KeyProperty(x => x.MessageType); + + } + } } \ No newline at end of file diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/ISubscriptionStorageSessionProvider.cs b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/ISubscriptionStorageSessionProvider.cs index 1c4807a6a3f..896062e7645 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/ISubscriptionStorageSessionProvider.cs +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/ISubscriptionStorageSessionProvider.cs @@ -1,9 +1,9 @@ -using NHibernate; - -namespace NServiceBus.Unicast.Subscriptions.NHibernate -{ - public interface ISubscriptionStorageSessionProvider - { - ISession OpenSession(); - } +using NHibernate; + +namespace NServiceBus.Unicast.Subscriptions.NHibernate +{ + public interface ISubscriptionStorageSessionProvider + { + ISession OpenSession(); + } } \ No newline at end of file diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/NServiceBus.Unicast.Subscriptions.NHibernate.csproj b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/NServiceBus.Unicast.Subscriptions.NHibernate.csproj index ef86629d3da..1d44456b535 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/NServiceBus.Unicast.Subscriptions.NHibernate.csproj +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/NServiceBus.Unicast.Subscriptions.NHibernate.csproj @@ -1,130 +1,130 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {FB2ACC79-1E04-47CA-8F4B-31327E10B5E3} - Library - Properties - NServiceBus.Unicast.Subscriptions.NHibernate - NServiceBus.Unicast.Subscriptions.NHibernate - v4.0 - 512 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\..\lib\FluentNHibernate\FluentNHibernate.dll - - - False - ..\..\..\..\lib\NHibernate.dll - - - False - ..\..\..\..\lib\NHibernate.ByteCode.LinFu.dll - - - False - ..\..\..\..\build\output\NServiceBus.dll - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Subscriptions.dll - - - - - 3.5 - - - - - - - CommonAssemblyInfo.cs - - - - - - - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\nhibernate\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {FB2ACC79-1E04-47CA-8F4B-31327E10B5E3} + Library + Properties + NServiceBus.Unicast.Subscriptions.NHibernate + NServiceBus.Unicast.Subscriptions.NHibernate + v4.0 + 512 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\..\lib\FluentNHibernate\FluentNHibernate.dll + + + False + ..\..\..\..\lib\NHibernate.dll + + + False + ..\..\..\..\lib\NHibernate.ByteCode.LinFu.dll + + + False + ..\..\..\..\build\output\NServiceBus.dll + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Subscriptions.dll + + + + + 3.5 + + + + + + + CommonAssemblyInfo.cs + + + + + + + + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\build\nhibernate\" + \ No newline at end of file diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/NServiceBus.Unicast.Subscriptions.NHibernate.sln b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/NServiceBus.Unicast.Subscriptions.NHibernate.sln index f37907e7735..a67ff78ce62 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/NServiceBus.Unicast.Subscriptions.NHibernate.sln +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/NServiceBus.Unicast.Subscriptions.NHibernate.sln @@ -1,26 +1,26 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Subscriptions.NHibernate", "NServiceBus.Unicast.Subscriptions.NHibernate.csproj", "{FB2ACC79-1E04-47CA-8F4B-31327E10B5E3}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Subscriptions.NHibernate.Tests", "..\NServiceBus.Unicast.Subscriptions.NHibernate.Tests\NServiceBus.Unicast.Subscriptions.NHibernate.Tests.csproj", "{06AE9368-B357-4682-8B79-1FB186BF38B5}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {FB2ACC79-1E04-47CA-8F4B-31327E10B5E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {FB2ACC79-1E04-47CA-8F4B-31327E10B5E3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {FB2ACC79-1E04-47CA-8F4B-31327E10B5E3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {FB2ACC79-1E04-47CA-8F4B-31327E10B5E3}.Release|Any CPU.Build.0 = Release|Any CPU - {06AE9368-B357-4682-8B79-1FB186BF38B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {06AE9368-B357-4682-8B79-1FB186BF38B5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {06AE9368-B357-4682-8B79-1FB186BF38B5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {06AE9368-B357-4682-8B79-1FB186BF38B5}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Subscriptions.NHibernate", "NServiceBus.Unicast.Subscriptions.NHibernate.csproj", "{FB2ACC79-1E04-47CA-8F4B-31327E10B5E3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Subscriptions.NHibernate.Tests", "..\NServiceBus.Unicast.Subscriptions.NHibernate.Tests\NServiceBus.Unicast.Subscriptions.NHibernate.Tests.csproj", "{06AE9368-B357-4682-8B79-1FB186BF38B5}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {FB2ACC79-1E04-47CA-8F4B-31327E10B5E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FB2ACC79-1E04-47CA-8F4B-31327E10B5E3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FB2ACC79-1E04-47CA-8F4B-31327E10B5E3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FB2ACC79-1E04-47CA-8F4B-31327E10B5E3}.Release|Any CPU.Build.0 = Release|Any CPU + {06AE9368-B357-4682-8B79-1FB186BF38B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {06AE9368-B357-4682-8B79-1FB186BF38B5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {06AE9368-B357-4682-8B79-1FB186BF38B5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {06AE9368-B357-4682-8B79-1FB186BF38B5}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/Properties/AssemblyInfo.cs b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/Properties/AssemblyInfo.cs index 40858c5a20c..4f2091b604a 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/Properties/AssemblyInfo.cs +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/Properties/AssemblyInfo.cs @@ -1,2 +1,2 @@ -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus.Unicast.Subscriptions.NHibernate")] +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus.Unicast.Subscriptions.NHibernate")] diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/Subscription.cs b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/Subscription.cs index 2f0aa438c0c..7617d878f2a 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/Subscription.cs +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/Subscription.cs @@ -1,34 +1,34 @@ -namespace NServiceBus.Unicast.Subscriptions.NHibernate -{ - /// - /// Enity containing subscription data - /// - public class Subscription - { - public virtual string SubscriberEndpoint { get; set; } - public virtual string MessageType { get; set; } - - public override bool Equals(object obj) - { - if (ReferenceEquals(null, obj)) return false; - if (ReferenceEquals(this, obj)) return true; - if (obj.GetType() != typeof (Subscription)) return false; - return Equals((Subscription) obj); - } - - public virtual bool Equals(Subscription other) - { - if (ReferenceEquals(null, other)) return false; - if (ReferenceEquals(this, other)) return true; - return Equals(other.SubscriberEndpoint, SubscriberEndpoint) && Equals(other.MessageType, MessageType); - } - - public override int GetHashCode() - { - unchecked - { - return ((SubscriberEndpoint != null ? SubscriberEndpoint.GetHashCode() : 0)*397) ^ (MessageType != null ? MessageType.GetHashCode() : 0); - } - } - } +namespace NServiceBus.Unicast.Subscriptions.NHibernate +{ + /// + /// Enity containing subscription data + /// + public class Subscription + { + public virtual string SubscriberEndpoint { get; set; } + public virtual string MessageType { get; set; } + + public override bool Equals(object obj) + { + if (ReferenceEquals(null, obj)) return false; + if (ReferenceEquals(this, obj)) return true; + if (obj.GetType() != typeof (Subscription)) return false; + return Equals((Subscription) obj); + } + + public virtual bool Equals(Subscription other) + { + if (ReferenceEquals(null, other)) return false; + if (ReferenceEquals(this, other)) return true; + return Equals(other.SubscriberEndpoint, SubscriberEndpoint) && Equals(other.MessageType, MessageType); + } + + public override int GetHashCode() + { + unchecked + { + return ((SubscriberEndpoint != null ? SubscriberEndpoint.GetHashCode() : 0)*397) ^ (MessageType != null ? MessageType.GetHashCode() : 0); + } + } + } } \ No newline at end of file diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/SubscriptionStorage.cs b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/SubscriptionStorage.cs index 1c3131cf7f0..cf22bf5db7e 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/SubscriptionStorage.cs +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/SubscriptionStorage.cs @@ -1,100 +1,100 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Transactions; -using NHibernate.Criterion; -using NHibernate.Transform; - -namespace NServiceBus.Unicast.Subscriptions.NHibernate -{ - /// - /// Subscription storage using NHibernate for persistence - /// - public class SubscriptionStorage : ISubscriptionStorage - { - private readonly ISubscriptionStorageSessionProvider subscriptionStorageSessionProvider; - - public SubscriptionStorage(ISubscriptionStorageSessionProvider subscriptionStorageSessionProvider) - { - this.subscriptionStorageSessionProvider = subscriptionStorageSessionProvider; - } - - - - /// - /// Adds the given subscription to the DB. - /// Method checks for existing subcriptions to prevent duplicates - /// - /// - /// - void ISubscriptionStorage.Subscribe(string client, IEnumerable messageTypes) - { - using (var session = subscriptionStorageSessionProvider.OpenSession()) - using(var transaction = new TransactionScope()) - { - foreach (var messageType in messageTypes) - { - var subscription = new Subscription - { - SubscriberEndpoint = client, - MessageType = messageType - }; - - if (session.Get(subscription) == null) - session.Save(subscription); - - } - - - transaction.Complete(); - } - } - - /// - /// Removes the specified subscriptions from DB - /// - /// - /// - void ISubscriptionStorage.Unsubscribe(string client, IEnumerable messageTypes) - { - - using (var session = subscriptionStorageSessionProvider.OpenSession()) - using (var transaction = new TransactionScope()) - { - foreach (var messageType in messageTypes) - session.Delete(string.Format("from Subscription where SubscriberEndpoint = '{0}' AND MessageType = '{1}'", client, messageType)); - - transaction.Complete(); - } - } - - /// - /// Lists all subscribers for the specified message types - /// - /// - /// - IEnumerable ISubscriptionStorage.GetSubscribersForMessage(IEnumerable messageTypes) - { - IEnumerable result; - - using (var session = subscriptionStorageSessionProvider.OpenSession()) - using (var transaction = new TransactionScope(TransactionScopeOption.RequiresNew,new TransactionOptions{IsolationLevel = IsolationLevel.ReadCommitted})) - { - result = session.CreateCriteria(typeof(Subscription)) - .Add(Restrictions.In("MessageType", messageTypes.ToArray())) - .SetProjection(Projections.Property("SubscriberEndpoint")) - .SetResultTransformer(new DistinctRootEntityResultTransformer()) - .List(); - - transaction.Complete(); - } - - return result; - } - - public void Init() - { - //No-op - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Transactions; +using NHibernate.Criterion; +using NHibernate.Transform; + +namespace NServiceBus.Unicast.Subscriptions.NHibernate +{ + /// + /// Subscription storage using NHibernate for persistence + /// + public class SubscriptionStorage : ISubscriptionStorage + { + private readonly ISubscriptionStorageSessionProvider subscriptionStorageSessionProvider; + + public SubscriptionStorage(ISubscriptionStorageSessionProvider subscriptionStorageSessionProvider) + { + this.subscriptionStorageSessionProvider = subscriptionStorageSessionProvider; + } + + + + /// + /// Adds the given subscription to the DB. + /// Method checks for existing subcriptions to prevent duplicates + /// + /// + /// + void ISubscriptionStorage.Subscribe(string client, IEnumerable messageTypes) + { + using (var session = subscriptionStorageSessionProvider.OpenSession()) + using(var transaction = new TransactionScope()) + { + foreach (var messageType in messageTypes) + { + var subscription = new Subscription + { + SubscriberEndpoint = client, + MessageType = messageType + }; + + if (session.Get(subscription) == null) + session.Save(subscription); + + } + + + transaction.Complete(); + } + } + + /// + /// Removes the specified subscriptions from DB + /// + /// + /// + void ISubscriptionStorage.Unsubscribe(string client, IEnumerable messageTypes) + { + + using (var session = subscriptionStorageSessionProvider.OpenSession()) + using (var transaction = new TransactionScope()) + { + foreach (var messageType in messageTypes) + session.Delete(string.Format("from Subscription where SubscriberEndpoint = '{0}' AND MessageType = '{1}'", client, messageType)); + + transaction.Complete(); + } + } + + /// + /// Lists all subscribers for the specified message types + /// + /// + /// + IEnumerable ISubscriptionStorage.GetSubscribersForMessage(IEnumerable messageTypes) + { + IEnumerable result; + + using (var session = subscriptionStorageSessionProvider.OpenSession()) + using (var transaction = new TransactionScope(TransactionScopeOption.RequiresNew,new TransactionOptions{IsolationLevel = IsolationLevel.ReadCommitted})) + { + result = session.CreateCriteria(typeof(Subscription)) + .Add(Restrictions.In("MessageType", messageTypes.ToArray())) + .SetProjection(Projections.Property("SubscriberEndpoint")) + .SetResultTransformer(new DistinctRootEntityResultTransformer()) + .List(); + + transaction.Complete(); + } + + return result; + } + + public void Init() + { + //No-op + } + } +} diff --git a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/SubscriptionStorageSessionProvider.cs b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/SubscriptionStorageSessionProvider.cs index 3858d3cdb36..bc6cfd614d5 100644 --- a/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/SubscriptionStorageSessionProvider.cs +++ b/src/impl/unicast/NServiceBus.Unicast.Subscriptions.NHibernate/SubscriptionStorageSessionProvider.cs @@ -1,19 +1,19 @@ -using NHibernate; - -namespace NServiceBus.Unicast.Subscriptions.NHibernate -{ - public class SubscriptionStorageSessionProvider:ISubscriptionStorageSessionProvider - { - readonly ISessionFactory sessionFactory; - - public SubscriptionStorageSessionProvider(ISessionFactory sessionFactory) - { - this.sessionFactory = sessionFactory; - } - - public ISession OpenSession() - { - return sessionFactory.OpenSession(); - } - } +using NHibernate; + +namespace NServiceBus.Unicast.Subscriptions.NHibernate +{ + public class SubscriptionStorageSessionProvider:ISubscriptionStorageSessionProvider + { + readonly ISessionFactory sessionFactory; + + public SubscriptionStorageSessionProvider(ISessionFactory sessionFactory) + { + this.sessionFactory = sessionFactory; + } + + public ISession OpenSession() + { + return sessionFactory.OpenSession(); + } + } } \ No newline at end of file diff --git a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Config/AzureQueueConfig.cs b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Config/AzureQueueConfig.cs index 48203a8def4..c2432a2198e 100644 --- a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Config/AzureQueueConfig.cs +++ b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Config/AzureQueueConfig.cs @@ -1,72 +1,72 @@ -using System.Configuration; - -namespace NServiceBus.Config -{ - public class AzureQueueConfig : ConfigurationSection - { - [ConfigurationProperty("ConnectionString", IsRequired = false, DefaultValue = "UseDevelopmentStorage=true")] - public string ConnectionString - { - get - { - return (string)this["ConnectionString"]; - } - set - { - this["ConnectionString"] = value; - } - } - - [ConfigurationProperty("PeekInterval", IsRequired = false, DefaultValue = 1000)] - public int PeekInterval - { - get - { - return (int)this["PeekInterval"]; - } - set - { - this["PeekInterval"] = value; - } - } - - [ConfigurationProperty("MaximumWaitTimeWhenIdle", IsRequired = false, DefaultValue = 60000)] - public int MaximumWaitTimeWhenIdle - { - get - { - return (int)this["MaximumWaitTimeWhenIdle"]; - } - set - { - this["MaximumWaitTimeWhenIdle"] = value; - } - } - - [ConfigurationProperty("PurgeOnStartup", IsRequired = false, DefaultValue = false)] - public bool PurgeOnStartup - { - get - { - return (bool)this["PurgeOnStartup"]; - } - set - { - this["PurgeOnStartup"] = value; - } - } - - [ConfigurationProperty("MessageInvisibleTime", IsRequired = false, DefaultValue = 30000)] - public int MessageInvisibleTime - { - get - { - return (int)this["MessageInvisibleTime"]; - } - set - { - this["MessageInvisibleTime"] = value; - } - } - } +using System.Configuration; + +namespace NServiceBus.Config +{ + public class AzureQueueConfig : ConfigurationSection + { + [ConfigurationProperty("ConnectionString", IsRequired = false, DefaultValue = "UseDevelopmentStorage=true")] + public string ConnectionString + { + get + { + return (string)this["ConnectionString"]; + } + set + { + this["ConnectionString"] = value; + } + } + + [ConfigurationProperty("PeekInterval", IsRequired = false, DefaultValue = 1000)] + public int PeekInterval + { + get + { + return (int)this["PeekInterval"]; + } + set + { + this["PeekInterval"] = value; + } + } + + [ConfigurationProperty("MaximumWaitTimeWhenIdle", IsRequired = false, DefaultValue = 60000)] + public int MaximumWaitTimeWhenIdle + { + get + { + return (int)this["MaximumWaitTimeWhenIdle"]; + } + set + { + this["MaximumWaitTimeWhenIdle"] = value; + } + } + + [ConfigurationProperty("PurgeOnStartup", IsRequired = false, DefaultValue = false)] + public bool PurgeOnStartup + { + get + { + return (bool)this["PurgeOnStartup"]; + } + set + { + this["PurgeOnStartup"] = value; + } + } + + [ConfigurationProperty("MessageInvisibleTime", IsRequired = false, DefaultValue = 30000)] + public int MessageInvisibleTime + { + get + { + return (int)this["MessageInvisibleTime"]; + } + set + { + this["MessageInvisibleTime"] = value; + } + } + } } \ No newline at end of file diff --git a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Config/ConfigureAzureMessageQueue.cs b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Config/ConfigureAzureMessageQueue.cs index b82ed922ff0..e62188212ca 100644 --- a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Config/ConfigureAzureMessageQueue.cs +++ b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Config/ConfigureAzureMessageQueue.cs @@ -1,97 +1,97 @@ -using Microsoft.WindowsAzure; -using Microsoft.WindowsAzure.StorageClient; -using NServiceBus.Config; -using NServiceBus.ObjectBuilder; -using NServiceBus.Unicast.Queuing.Azure; - -namespace NServiceBus -{ - public static class ConfigureAzureMessageQueue - { - public static Configure AzureMessageQueue(this Configure config) - { - CloudQueueClient queueClient; - - var configSection = Configure.GetConfigSection(); - - if (configSection != null) - { - queueClient = CloudStorageAccount.Parse(configSection.ConnectionString) - .CreateCloudQueueClient(); - } - else - { - queueClient = CloudStorageAccount.DevelopmentStorageAccount.CreateCloudQueueClient(); - } - - config.Configurer.RegisterSingleton(queueClient); - - config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); - - if (configSection != null) - { - Configure.Instance.Configurer.ConfigureProperty(t => t.PurgeOnStartup, configSection.PurgeOnStartup); - Configure.Instance.Configurer.ConfigureProperty(t => t.MaximumWaitTimeWhenIdle, configSection.MaximumWaitTimeWhenIdle); - Configure.Instance.Configurer.ConfigureProperty(t => t.MessageInvisibleTime, configSection.MessageInvisibleTime); - Configure.Instance.Configurer.ConfigureProperty(t => t.PeekInterval, configSection.PeekInterval); - } - - return config; - } - - /// - /// Requests that the incoming queue be purged of all messages when the bus is started. - /// All messages in this queue will be deleted if this is true. - /// Setting this to true may make sense for certain smart-client applications, - /// but rarely for server applications. - /// - /// - /// - /// - public static Configure PurgeQueueOnStartup(this Configure config, bool value) - { - Configure.Instance.Configurer.ConfigureProperty(t => t.PurgeOnStartup, value); - - return config; - } - - /// - /// Sets the amount of time, in milliseconds, to add to the time to wait before checking for a new message - /// - /// - /// - /// - public static Configure PeekInterval(this Configure config, int value) - { - Configure.Instance.Configurer.ConfigureProperty(t => t.PeekInterval, value); - - return config; - } - - /// - /// Sets the maximum amount of time, in milliseconds, that the queue will wait before checking for a new message - /// - /// - /// - /// - public static Configure MaximumWaitTimeWhenIdle(this Configure config, int value) - { - Configure.Instance.Configurer.ConfigureProperty(t => t.MaximumWaitTimeWhenIdle, value); - - return config; - } - - /// - /// Controls how long messages should be invisible to other callers when receiving messages from the queue - /// - /// - /// - /// - public static Configure MessageInvisibleTime(this Configure config, int value) - { - Configure.Instance.Configurer.ConfigureProperty(t => t.MessageInvisibleTime, value); - - return config; - } - } +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.StorageClient; +using NServiceBus.Config; +using NServiceBus.ObjectBuilder; +using NServiceBus.Unicast.Queuing.Azure; + +namespace NServiceBus +{ + public static class ConfigureAzureMessageQueue + { + public static Configure AzureMessageQueue(this Configure config) + { + CloudQueueClient queueClient; + + var configSection = Configure.GetConfigSection(); + + if (configSection != null) + { + queueClient = CloudStorageAccount.Parse(configSection.ConnectionString) + .CreateCloudQueueClient(); + } + else + { + queueClient = CloudStorageAccount.DevelopmentStorageAccount.CreateCloudQueueClient(); + } + + config.Configurer.RegisterSingleton(queueClient); + + config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); + + if (configSection != null) + { + Configure.Instance.Configurer.ConfigureProperty(t => t.PurgeOnStartup, configSection.PurgeOnStartup); + Configure.Instance.Configurer.ConfigureProperty(t => t.MaximumWaitTimeWhenIdle, configSection.MaximumWaitTimeWhenIdle); + Configure.Instance.Configurer.ConfigureProperty(t => t.MessageInvisibleTime, configSection.MessageInvisibleTime); + Configure.Instance.Configurer.ConfigureProperty(t => t.PeekInterval, configSection.PeekInterval); + } + + return config; + } + + /// + /// Requests that the incoming queue be purged of all messages when the bus is started. + /// All messages in this queue will be deleted if this is true. + /// Setting this to true may make sense for certain smart-client applications, + /// but rarely for server applications. + /// + /// + /// + /// + public static Configure PurgeQueueOnStartup(this Configure config, bool value) + { + Configure.Instance.Configurer.ConfigureProperty(t => t.PurgeOnStartup, value); + + return config; + } + + /// + /// Sets the amount of time, in milliseconds, to add to the time to wait before checking for a new message + /// + /// + /// + /// + public static Configure PeekInterval(this Configure config, int value) + { + Configure.Instance.Configurer.ConfigureProperty(t => t.PeekInterval, value); + + return config; + } + + /// + /// Sets the maximum amount of time, in milliseconds, that the queue will wait before checking for a new message + /// + /// + /// + /// + public static Configure MaximumWaitTimeWhenIdle(this Configure config, int value) + { + Configure.Instance.Configurer.ConfigureProperty(t => t.MaximumWaitTimeWhenIdle, value); + + return config; + } + + /// + /// Controls how long messages should be invisible to other callers when receiving messages from the queue + /// + /// + /// + /// + public static Configure MessageInvisibleTime(this Configure config, int value) + { + Configure.Instance.Configurer.ConfigureProperty(t => t.MessageInvisibleTime, value); + + return config; + } + } } \ No newline at end of file diff --git a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Config/NServiceBus.Unicast.Queuing.Azure.Config.csproj b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Config/NServiceBus.Unicast.Queuing.Azure.Config.csproj index e9dfc1ca4aa..644f205be03 100644 --- a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Config/NServiceBus.Unicast.Queuing.Azure.Config.csproj +++ b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Config/NServiceBus.Unicast.Queuing.Azure.Config.csproj @@ -1,87 +1,87 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {87C365D3-7D4A-4686-A042-5E7B83869CBF} - Library - Properties - NServiceBus.Unicast.Queuing.Azure.Config - NServiceBus.Unicast.Queuing.Azure.Config - v4.0 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\..\..\lib\Azure\Microsoft.WindowsAzure.ServiceRuntime.dll - - - False - ..\..\..\..\..\lib\Azure\Microsoft.WindowsAzure.StorageClient.dll - - - False - ..\..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll - - - ..\..\..\..\..\build\nservicebus.core\NServiceBus.MessageHeaders.dll - - - False - ..\..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll - - - False - ..\..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Queuing.dll - - - - - 3.5 - - - - - - CommonAssemblyInfo.cs - - - - - - - - {D12E0534-9C6F-4E39-AC68-4212FF13E7F1} - NServiceBus.Unicast.Queuing.Azure - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {87C365D3-7D4A-4686-A042-5E7B83869CBF} + Library + Properties + NServiceBus.Unicast.Queuing.Azure.Config + NServiceBus.Unicast.Queuing.Azure.Config + v4.0 + 512 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\..\..\lib\Azure\Microsoft.WindowsAzure.ServiceRuntime.dll + + + False + ..\..\..\..\..\lib\Azure\Microsoft.WindowsAzure.StorageClient.dll + + + False + ..\..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll + + + ..\..\..\..\..\build\nservicebus.core\NServiceBus.MessageHeaders.dll + + + False + ..\..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll + + + False + ..\..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Queuing.dll + + + + + 3.5 + + + + + + CommonAssemblyInfo.cs + + + + + + + + {D12E0534-9C6F-4E39-AC68-4212FF13E7F1} + NServiceBus.Unicast.Queuing.Azure + + + + \ No newline at end of file diff --git a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Config/Properties/AssemblyInfo.cs b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Config/Properties/AssemblyInfo.cs index 06fa7843e28..62e366c5045 100644 --- a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Config/Properties/AssemblyInfo.cs +++ b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Config/Properties/AssemblyInfo.cs @@ -1,2 +1,2 @@ -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus.Unicast.Queuing.Azure.Config")] +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus.Unicast.Queuing.Azure.Config")] diff --git a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Tests/App.config b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Tests/App.config index 06b46cb31e5..d297ba480c5 100644 --- a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Tests/App.config +++ b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Tests/App.config @@ -1,8 +1,8 @@ - - - -
- - - - + + + +
+ + + + diff --git a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Tests/AzureQueueFixture.cs b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Tests/AzureQueueFixture.cs index 0d3b82a30be..6701826c437 100644 --- a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Tests/AzureQueueFixture.cs +++ b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Tests/AzureQueueFixture.cs @@ -1,55 +1,55 @@ -using Microsoft.WindowsAzure; -using Microsoft.WindowsAzure.StorageClient; -using NServiceBus.Unicast.Transport; -using NUnit.Framework; - -namespace NServiceBus.Unicast.Queuing.Azure.Tests -{ - public abstract class AzureQueueFixture - { - protected AzureMessageQueue queue; - protected CloudQueueClient client; - protected CloudQueue nativeQueue; - - - protected virtual string QueueName - { - get - { - return "testqueue"; - } - } - - protected virtual bool PurgeOnStartup { get{ return false;} } - - [SetUp] - public void Setup() - { - client = CloudStorageAccount.DevelopmentStorageAccount.CreateCloudQueueClient(); - - nativeQueue = client.GetQueueReference(QueueName); - - nativeQueue.CreateIfNotExist(); - nativeQueue.Clear(); - - - queue = new AzureMessageQueue(client) - { - PurgeOnStartup = PurgeOnStartup - }; - - queue.Init(QueueName,true); - } - - protected void AddTestMessage() - { - AddTestMessage(new TransportMessage()); - } - - protected void AddTestMessage(TransportMessage messageToAdd) - { - queue.Send(messageToAdd, QueueName); - } - - } +using Microsoft.WindowsAzure; +using Microsoft.WindowsAzure.StorageClient; +using NServiceBus.Unicast.Transport; +using NUnit.Framework; + +namespace NServiceBus.Unicast.Queuing.Azure.Tests +{ + public abstract class AzureQueueFixture + { + protected AzureMessageQueue queue; + protected CloudQueueClient client; + protected CloudQueue nativeQueue; + + + protected virtual string QueueName + { + get + { + return "testqueue"; + } + } + + protected virtual bool PurgeOnStartup { get{ return false;} } + + [SetUp] + public void Setup() + { + client = CloudStorageAccount.DevelopmentStorageAccount.CreateCloudQueueClient(); + + nativeQueue = client.GetQueueReference(QueueName); + + nativeQueue.CreateIfNotExist(); + nativeQueue.Clear(); + + + queue = new AzureMessageQueue(client) + { + PurgeOnStartup = PurgeOnStartup + }; + + queue.Init(QueueName,true); + } + + protected void AddTestMessage() + { + AddTestMessage(new TransportMessage()); + } + + protected void AddTestMessage(TransportMessage messageToAdd) + { + queue.Send(messageToAdd, QueueName); + } + + } } \ No newline at end of file diff --git a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Tests/NServiceBus.Unicast.Queuing.Azure.Tests.csproj b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Tests/NServiceBus.Unicast.Queuing.Azure.Tests.csproj index ae08d15c2fd..110303a6d0c 100644 --- a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Tests/NServiceBus.Unicast.Queuing.Azure.Tests.csproj +++ b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Tests/NServiceBus.Unicast.Queuing.Azure.Tests.csproj @@ -1,116 +1,116 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {D917D6B0-53F0-4D21-BCBD-35BFE19FB4FD} - Library - Properties - NServiceBus.Unicast.Queuing.Azure.Tests - NServiceBus.Unicast.Queuing.Azure.Tests - v4.0 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\..\..\lib\Azure\Microsoft.WindowsAzure.Diagnostics.dll - - - False - ..\..\..\..\..\lib\Azure\Microsoft.WindowsAzure.ServiceRuntime.dll - - - False - ..\..\..\..\..\lib\Azure\Microsoft.WindowsAzure.StorageClient.dll - - - False - ..\..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll - - - False - ..\..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll - - - False - ..\..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.DefaultBuilder.dll - - - False - ..\..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Queuing.dll - - - False - ..\..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll - - - False - ..\..\..\..\..\tools\NUnit\nunit.framework.dll - - - False - ..\..\..\..\..\lib\Rhino.Mocks\Rhino.Mocks.dll - - - - - 3.5 - - - - - - - CommonAssemblyInfo.cs - - - - - - - - - - - - {87C365D3-7D4A-4686-A042-5E7B83869CBF} - NServiceBus.Unicast.Queuing.Azure.Config - - - {D12E0534-9C6F-4E39-AC68-4212FF13E7F1} - NServiceBus.Unicast.Queuing.Azure - - - - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {D917D6B0-53F0-4D21-BCBD-35BFE19FB4FD} + Library + Properties + NServiceBus.Unicast.Queuing.Azure.Tests + NServiceBus.Unicast.Queuing.Azure.Tests + v4.0 + 512 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\..\..\lib\Azure\Microsoft.WindowsAzure.Diagnostics.dll + + + False + ..\..\..\..\..\lib\Azure\Microsoft.WindowsAzure.ServiceRuntime.dll + + + False + ..\..\..\..\..\lib\Azure\Microsoft.WindowsAzure.StorageClient.dll + + + False + ..\..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll + + + False + ..\..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll + + + False + ..\..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.DefaultBuilder.dll + + + False + ..\..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Queuing.dll + + + False + ..\..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll + + + False + ..\..\..\..\..\tools\NUnit\nunit.framework.dll + + + False + ..\..\..\..\..\lib\Rhino.Mocks\Rhino.Mocks.dll + + + + + 3.5 + + + + + + + CommonAssemblyInfo.cs + + + + + + + + + + + + {87C365D3-7D4A-4686-A042-5E7B83869CBF} + NServiceBus.Unicast.Queuing.Azure.Config + + + {D12E0534-9C6F-4E39-AC68-4212FF13E7F1} + NServiceBus.Unicast.Queuing.Azure + + + + + + + \ No newline at end of file diff --git a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Tests/Properties/AssemblyInfo.cs b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Tests/Properties/AssemblyInfo.cs index 4ecad6e61a5..573754685f6 100644 --- a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Tests/Properties/AssemblyInfo.cs +++ b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Tests/Properties/AssemblyInfo.cs @@ -1,2 +1,2 @@ -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus.Unicast.Queuing.Azure.Tests")] +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus.Unicast.Queuing.Azure.Tests")] diff --git a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Tests/When_configuring_the_azure_queue.cs b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Tests/When_configuring_the_azure_queue.cs index 23ef5a4e3a6..ca098f0654e 100644 --- a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Tests/When_configuring_the_azure_queue.cs +++ b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Tests/When_configuring_the_azure_queue.cs @@ -1,53 +1,53 @@ -using Microsoft.WindowsAzure.StorageClient; -using NServiceBus.Config.ConfigurationSource; -using NUnit.Framework; - -namespace NServiceBus.Unicast.Queuing.Azure.Tests -{ - [TestFixture] - public class When_configuring_the_azure_queue - { - [Test] - public void The_storage_should_default_to_dev_settings_if_no_config_section_is_found() - { - Configure.With() - .DefaultBuilder() - .CustomConfigurationSource(new NullSource()) - .AzureMessageQueue(); - - Assert.AreEqual(Configure.Instance.Builder.Build().Credentials.AccountName,"devstoreaccount1"); - - } - - - [Test] - public void Storage_setting_should_be_read_from_configuration_source() - { - Configure.With() - .DefaultBuilder() - .AzureMessageQueue(); - - var storage = Configure.Instance.Builder.Build(); - - Assert.AreEqual(storage.Credentials.AccountName,"myaccount"); - } - - [Test] - public void The_azurequeue_should_be_singleton() - { - Configure.With() - .DefaultBuilder() - .AzureMessageQueue(); - - Assert.AreEqual(Configure.Instance.Builder.Build(),Configure.Instance.Builder.Build()); - } - } - - public class NullSource : IConfigurationSource - { - T IConfigurationSource.GetConfiguration() - { - return null; - } - } +using Microsoft.WindowsAzure.StorageClient; +using NServiceBus.Config.ConfigurationSource; +using NUnit.Framework; + +namespace NServiceBus.Unicast.Queuing.Azure.Tests +{ + [TestFixture] + public class When_configuring_the_azure_queue + { + [Test] + public void The_storage_should_default_to_dev_settings_if_no_config_section_is_found() + { + Configure.With() + .DefaultBuilder() + .CustomConfigurationSource(new NullSource()) + .AzureMessageQueue(); + + Assert.AreEqual(Configure.Instance.Builder.Build().Credentials.AccountName,"devstoreaccount1"); + + } + + + [Test] + public void Storage_setting_should_be_read_from_configuration_source() + { + Configure.With() + .DefaultBuilder() + .AzureMessageQueue(); + + var storage = Configure.Instance.Builder.Build(); + + Assert.AreEqual(storage.Credentials.AccountName,"myaccount"); + } + + [Test] + public void The_azurequeue_should_be_singleton() + { + Configure.With() + .DefaultBuilder() + .AzureMessageQueue(); + + Assert.AreEqual(Configure.Instance.Builder.Build(),Configure.Instance.Builder.Build()); + } + } + + public class NullSource : IConfigurationSource + { + T IConfigurationSource.GetConfiguration() + { + return null; + } + } } \ No newline at end of file diff --git a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Tests/When_creating_a_queue.cs b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Tests/When_creating_a_queue.cs index 216f6270bef..8aad16f8379 100644 --- a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Tests/When_creating_a_queue.cs +++ b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Tests/When_creating_a_queue.cs @@ -1,16 +1,16 @@ -using NUnit.Framework; - -namespace NServiceBus.Unicast.Queuing.Azure.Tests -{ - [TestFixture] - public class When_creating_a_queue:AzureQueueFixture - { - [Test] - public void A_native_azure_queue_should_be_created() - { - queue.CreateQueue(QueueName); - - Assert.True(nativeQueue.Exists()); - } - } +using NUnit.Framework; + +namespace NServiceBus.Unicast.Queuing.Azure.Tests +{ + [TestFixture] + public class When_creating_a_queue:AzureQueueFixture + { + [Test] + public void A_native_azure_queue_should_be_created() + { + queue.CreateQueue(QueueName); + + Assert.True(nativeQueue.Exists()); + } + } } \ No newline at end of file diff --git a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Tests/When_initializing_the_queue.cs b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Tests/When_initializing_the_queue.cs index eaa939810ce..0170538752c 100644 --- a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Tests/When_initializing_the_queue.cs +++ b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Tests/When_initializing_the_queue.cs @@ -1,23 +1,23 @@ -using NUnit.Framework; - -namespace NServiceBus.Unicast.Queuing.Azure.Tests -{ - [TestFixture] - public class When_initializing_the_queue:AzureQueueFixture - { - - [Test] - public void A_purge_can_be_requested() - { - AddTestMessage(); - AddTestMessage(); - AddTestMessage(); - - queue.PurgeOnStartup = true; - - queue.Init(QueueName,false); - - Assert.Null(queue.Receive()); - } - } +using NUnit.Framework; + +namespace NServiceBus.Unicast.Queuing.Azure.Tests +{ + [TestFixture] + public class When_initializing_the_queue:AzureQueueFixture + { + + [Test] + public void A_purge_can_be_requested() + { + AddTestMessage(); + AddTestMessage(); + AddTestMessage(); + + queue.PurgeOnStartup = true; + + queue.Init(QueueName,false); + + Assert.Null(queue.Receive()); + } + } } \ No newline at end of file diff --git a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Tests/When_receiving_messages.cs b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Tests/When_receiving_messages.cs index f6489b65fb3..65aea820d3a 100644 --- a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Tests/When_receiving_messages.cs +++ b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Tests/When_receiving_messages.cs @@ -1,152 +1,152 @@ -using System; -using System.IO; -using System.Runtime.Serialization; -using System.Runtime.Serialization.Formatters.Binary; -using System.Threading; -using System.Transactions; -using Microsoft.WindowsAzure.StorageClient; -using NServiceBus.Unicast.Transport; -using NUnit.Framework; - -namespace NServiceBus.Unicast.Queuing.Azure.Tests -{ - [TestFixture] - public class When_receiving_messages : AzureQueueFixture - { - [Test] - public void Has_messages_should_indicate_if_messages_exists_int_the_queue() - { - Assert.False(queue.HasMessage()); - - - AddTestMessage(); - - Assert.True(queue.HasMessage()); - - } - - [Test] - public void Should_throw_if_non_nservicebus_messages_are_received() - { - nativeQueue.AddMessage(new CloudQueueMessage("whatever")); - - Assert.Throws(() => queue.Receive()); - } - - [Test] - public void Should_default_to_non_transactionable_if_no_ambient_transaction_exists() - { - AddTestMessage(); - queue.MessageInvisibleTime = 1; - - Assert.NotNull(queue.Receive()); - Thread.Sleep(1000); - Assert.Null(queue.Receive()); - } - - [Test] - public void Messages_should_not_reapper_in_the_queue_if_transaction_is_committed() - { - AddTestMessage(); - - queue.MessageInvisibleTime = 1; - using (var scope = new TransactionScope()) - { - Assert.NotNull(queue.Receive()); - - scope.Complete(); - } - - Thread.Sleep(1000); - - Assert.Null(queue.Receive()); - } - - [Test] - public void The_received_message_should_reappear_in_the_queue_if_transaction_is_not_comitted() - { - AddTestMessage(); - - queue.MessageInvisibleTime = 2; - using (new TransactionScope()) - { - Assert.NotNull(queue.Receive()); - - //rollback - } - Thread.Sleep(1000); - - Assert.NotNull(queue.Receive()); - } - - [Test] - public void Received_messages_should_be_removed_from_the_queue() - { - AddTestMessage(); - - queue.MessageInvisibleTime = 1; - - queue.Receive(); - - Thread.Sleep(1000); - - Assert.Null(queue.Receive()); - } - - [Test] - public void Send_messages_without_body_should_be_ok() - { - AddTestMessage(); - - var message = queue.Receive(); - - Assert.Null(message.Body); - } - - [Test] - public void All_properties_should_be_preserved() - { - var formatter = new BinaryFormatter(); - - using (var stream = new MemoryStream()) - { - var testMessage = new TestMessage {TestProperty = "Test"}; - formatter.Serialize(stream,testMessage); - - var original = new TransportMessage - { - Body = stream.ToArray(), - MessageIntent = MessageIntentEnum.Send, - CorrelationId = "123", - //Id = "11111", - Recoverable = true, - ReturnAddress= "response", - TimeSent = DateTime.Now, - TimeToBeReceived = TimeSpan.FromHours(1) - }; - AddTestMessage(original); - - var result = queue.Receive(); - - var resultMessage = formatter.Deserialize(new MemoryStream(result.Body)) as TestMessage; - Assert.AreEqual(resultMessage.TestProperty,"Test"); - - - Assert.AreEqual( result.MessageIntent,original.MessageIntent); - Assert.AreEqual(result.CorrelationId,original.CorrelationId); - Assert.NotNull(result.Id); - Assert.AreEqual(result.Recoverable,original.Recoverable); - Assert.AreEqual(result.ReturnAddress,original.ReturnAddress); - Assert.AreEqual(result.TimeSent,original.TimeSent); - Assert.AreEqual(result.TimeToBeReceived,original.TimeToBeReceived); - - } - } - } - - [Serializable] - public class TestMessage - { - public string TestProperty { get; set; } - } +using System; +using System.IO; +using System.Runtime.Serialization; +using System.Runtime.Serialization.Formatters.Binary; +using System.Threading; +using System.Transactions; +using Microsoft.WindowsAzure.StorageClient; +using NServiceBus.Unicast.Transport; +using NUnit.Framework; + +namespace NServiceBus.Unicast.Queuing.Azure.Tests +{ + [TestFixture] + public class When_receiving_messages : AzureQueueFixture + { + [Test] + public void Has_messages_should_indicate_if_messages_exists_int_the_queue() + { + Assert.False(queue.HasMessage()); + + + AddTestMessage(); + + Assert.True(queue.HasMessage()); + + } + + [Test] + public void Should_throw_if_non_nservicebus_messages_are_received() + { + nativeQueue.AddMessage(new CloudQueueMessage("whatever")); + + Assert.Throws(() => queue.Receive()); + } + + [Test] + public void Should_default_to_non_transactionable_if_no_ambient_transaction_exists() + { + AddTestMessage(); + queue.MessageInvisibleTime = 1; + + Assert.NotNull(queue.Receive()); + Thread.Sleep(1000); + Assert.Null(queue.Receive()); + } + + [Test] + public void Messages_should_not_reapper_in_the_queue_if_transaction_is_committed() + { + AddTestMessage(); + + queue.MessageInvisibleTime = 1; + using (var scope = new TransactionScope()) + { + Assert.NotNull(queue.Receive()); + + scope.Complete(); + } + + Thread.Sleep(1000); + + Assert.Null(queue.Receive()); + } + + [Test] + public void The_received_message_should_reappear_in_the_queue_if_transaction_is_not_comitted() + { + AddTestMessage(); + + queue.MessageInvisibleTime = 2; + using (new TransactionScope()) + { + Assert.NotNull(queue.Receive()); + + //rollback + } + Thread.Sleep(1000); + + Assert.NotNull(queue.Receive()); + } + + [Test] + public void Received_messages_should_be_removed_from_the_queue() + { + AddTestMessage(); + + queue.MessageInvisibleTime = 1; + + queue.Receive(); + + Thread.Sleep(1000); + + Assert.Null(queue.Receive()); + } + + [Test] + public void Send_messages_without_body_should_be_ok() + { + AddTestMessage(); + + var message = queue.Receive(); + + Assert.Null(message.Body); + } + + [Test] + public void All_properties_should_be_preserved() + { + var formatter = new BinaryFormatter(); + + using (var stream = new MemoryStream()) + { + var testMessage = new TestMessage {TestProperty = "Test"}; + formatter.Serialize(stream,testMessage); + + var original = new TransportMessage + { + Body = stream.ToArray(), + MessageIntent = MessageIntentEnum.Send, + CorrelationId = "123", + //Id = "11111", + Recoverable = true, + ReturnAddress= "response", + TimeSent = DateTime.Now, + TimeToBeReceived = TimeSpan.FromHours(1) + }; + AddTestMessage(original); + + var result = queue.Receive(); + + var resultMessage = formatter.Deserialize(new MemoryStream(result.Body)) as TestMessage; + Assert.AreEqual(resultMessage.TestProperty,"Test"); + + + Assert.AreEqual( result.MessageIntent,original.MessageIntent); + Assert.AreEqual(result.CorrelationId,original.CorrelationId); + Assert.NotNull(result.Id); + Assert.AreEqual(result.Recoverable,original.Recoverable); + Assert.AreEqual(result.ReturnAddress,original.ReturnAddress); + Assert.AreEqual(result.TimeSent,original.TimeSent); + Assert.AreEqual(result.TimeToBeReceived,original.TimeToBeReceived); + + } + } + } + + [Serializable] + public class TestMessage + { + public string TestProperty { get; set; } + } } \ No newline at end of file diff --git a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Tests/When_sending_messages.cs b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Tests/When_sending_messages.cs index e7ae6f5599e..4be3a96c244 100644 --- a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Tests/When_sending_messages.cs +++ b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure.Tests/When_sending_messages.cs @@ -1,60 +1,60 @@ -using System.Transactions; -using Microsoft.WindowsAzure.StorageClient; -using NServiceBus.Unicast.Transport; -using NUnit.Framework; - -namespace NServiceBus.Unicast.Queuing.Azure.Tests -{ - [TestFixture] - public class When_sending_messages : AzureQueueFixture - { - const string destinationQueueName = "destination"; - - [Test] - public void Should_not_appear_at_destination_if_transaction_rollbacks() - { - var destinationQueue = GetDestinationQueue(); - using (new TransactionScope()) - { - queue.Send(new TransportMessage(), destinationQueueName); - } - Assert.Null(destinationQueue.GetMessage()); - } - - private CloudQueue GetDestinationQueue() - { - var destinationQueue = client.GetQueueReference(destinationQueueName); - - destinationQueue.CreateIfNotExist(); - destinationQueue.Clear(); - - return destinationQueue; - } - - [Test] - public void The_message_should_appear_in_the_destination_queue() - { - var destinationQueue = GetDestinationQueue(); - - queue.Send(new TransportMessage(), destinationQueueName); - - Assert.NotNull(destinationQueue.GetMessage()); - } - - [Test] - public void The_message_id_should_be_updated_with_the_native_id() - { - GetDestinationQueue(); - var message = new TransportMessage(); - - queue.Send(message, destinationQueueName); - - Assert.NotNull(message.Id); - } - [Test] - public void A_QueueNotFoundException_should_be_thrown_if_the_desitnation_queue_does_not_exists() - { - Assert.Throws(() => queue.Send(new TransportMessage(), "whatever")); - } - } +using System.Transactions; +using Microsoft.WindowsAzure.StorageClient; +using NServiceBus.Unicast.Transport; +using NUnit.Framework; + +namespace NServiceBus.Unicast.Queuing.Azure.Tests +{ + [TestFixture] + public class When_sending_messages : AzureQueueFixture + { + const string destinationQueueName = "destination"; + + [Test] + public void Should_not_appear_at_destination_if_transaction_rollbacks() + { + var destinationQueue = GetDestinationQueue(); + using (new TransactionScope()) + { + queue.Send(new TransportMessage(), destinationQueueName); + } + Assert.Null(destinationQueue.GetMessage()); + } + + private CloudQueue GetDestinationQueue() + { + var destinationQueue = client.GetQueueReference(destinationQueueName); + + destinationQueue.CreateIfNotExist(); + destinationQueue.Clear(); + + return destinationQueue; + } + + [Test] + public void The_message_should_appear_in_the_destination_queue() + { + var destinationQueue = GetDestinationQueue(); + + queue.Send(new TransportMessage(), destinationQueueName); + + Assert.NotNull(destinationQueue.GetMessage()); + } + + [Test] + public void The_message_id_should_be_updated_with_the_native_id() + { + GetDestinationQueue(); + var message = new TransportMessage(); + + queue.Send(message, destinationQueueName); + + Assert.NotNull(message.Id); + } + [Test] + public void A_QueueNotFoundException_should_be_thrown_if_the_desitnation_queue_does_not_exists() + { + Assert.Throws(() => queue.Send(new TransportMessage(), "whatever")); + } + } } \ No newline at end of file diff --git a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure/AzureMessageQueue.cs b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure/AzureMessageQueue.cs index 11b007be3f7..295c1f19cd5 100644 --- a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure/AzureMessageQueue.cs +++ b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure/AzureMessageQueue.cs @@ -1,154 +1,154 @@ -using System; -using System.IO; -using System.Runtime.Serialization; -using System.Runtime.Serialization.Formatters.Binary; -using System.Threading; -using System.Transactions; -using Microsoft.WindowsAzure.StorageClient; -using NServiceBus.Unicast.Transport; - -namespace NServiceBus.Unicast.Queuing.Azure -{ - public class AzureMessageQueue : IReceiveMessages,ISendMessages - { - private CloudQueue queue; - private readonly CloudQueueClient client; - private int timeToDelayNextPeek; - - /// - /// Sets the amount of time, in milliseconds, to add to the time to wait before checking for a new message - /// - public int PeekInterval{ get; set; } - - /// - /// Sets the maximum amount of time, in milliseconds, that the queue will wait before checking for a new message - /// - public int MaximumWaitTimeWhenIdle { get; set; } - - /// - /// Sets whether or not the transport should purge the input - /// queue when it is started. - /// - public bool PurgeOnStartup { get; set; } - - /// - /// Controls how long messages should be invisible to other callers when receiving messages from the queue - /// - public int MessageInvisibleTime { get; set; } - - public AzureMessageQueue(CloudQueueClient client) - { - this.client = client; - MessageInvisibleTime = 30000; - PeekInterval = 1000; - MaximumWaitTimeWhenIdle = 60000; - } - - public void Init(string address, bool transactional) - { - useTransactions = transactional; - queue = client.GetQueueReference(address); - queue.CreateIfNotExist(); - - if (PurgeOnStartup) - queue.Clear(); - } - - public void Send(TransportMessage message, string destination) - { - var sendQueue = client.GetQueueReference(destination); - - if (!sendQueue.Exists()) - throw new QueueNotFoundException(); - - message.Id = Guid.NewGuid().ToString(); - - var rawMessage = SerializeMessage(message); - - if (Transaction.Current == null) - sendQueue.AddMessage(rawMessage); - else - Transaction.Current.EnlistVolatile(new SendResourceManager(sendQueue, rawMessage), EnlistmentOptions.None); - } - - public bool HasMessage() - { - var hasMessage = queue.PeekMessage() != null; - - DelayNextPeekWhenThereIsNoMessage(hasMessage); - - return hasMessage; - } - - private void DelayNextPeekWhenThereIsNoMessage(bool hasMessage) - { - if (hasMessage) - { - timeToDelayNextPeek = 0; - } - else - { - if (timeToDelayNextPeek < MaximumWaitTimeWhenIdle) timeToDelayNextPeek += PeekInterval; - - Thread.Sleep(timeToDelayNextPeek); - } - } - - public TransportMessage Receive() - { - var rawMessage = GetMessage(); - - if (rawMessage == null) - return null; - - return DeserializeMessage(rawMessage); - } - - private CloudQueueMessage GetMessage() - { - var receivedMessage = queue.GetMessage(TimeSpan.FromMilliseconds(MessageInvisibleTime)); - - if (receivedMessage != null) - { - if (!useTransactions || Transaction.Current == null) - queue.DeleteMessage(receivedMessage); - else - Transaction.Current.EnlistVolatile(new ReceiveResourceManager(queue, receivedMessage),EnlistmentOptions.None); - } - - return receivedMessage; - } - - private static CloudQueueMessage SerializeMessage(TransportMessage originalMessage) - { - using (var stream = new MemoryStream()) - { - var formatter = new BinaryFormatter(); - formatter.Serialize(stream, originalMessage); - return new CloudQueueMessage(stream.ToArray()); - } - } - - private static TransportMessage DeserializeMessage(CloudQueueMessage rawMessage) - { - var formatter = new BinaryFormatter(); - - using (var stream = new MemoryStream(rawMessage.AsBytes)) - { - var message = formatter.Deserialize(stream) as TransportMessage; - - if (message == null) - throw new SerializationException("Failed to deserialize message with id: " + rawMessage.Id); - - return message; - } - } - - public void CreateQueue(string queueName) - { - client.GetQueueReference(queueName).CreateIfNotExist(); - } - - private bool useTransactions; - } +using System; +using System.IO; +using System.Runtime.Serialization; +using System.Runtime.Serialization.Formatters.Binary; +using System.Threading; +using System.Transactions; +using Microsoft.WindowsAzure.StorageClient; +using NServiceBus.Unicast.Transport; + +namespace NServiceBus.Unicast.Queuing.Azure +{ + public class AzureMessageQueue : IReceiveMessages,ISendMessages + { + private CloudQueue queue; + private readonly CloudQueueClient client; + private int timeToDelayNextPeek; + + /// + /// Sets the amount of time, in milliseconds, to add to the time to wait before checking for a new message + /// + public int PeekInterval{ get; set; } + + /// + /// Sets the maximum amount of time, in milliseconds, that the queue will wait before checking for a new message + /// + public int MaximumWaitTimeWhenIdle { get; set; } + + /// + /// Sets whether or not the transport should purge the input + /// queue when it is started. + /// + public bool PurgeOnStartup { get; set; } + + /// + /// Controls how long messages should be invisible to other callers when receiving messages from the queue + /// + public int MessageInvisibleTime { get; set; } + + public AzureMessageQueue(CloudQueueClient client) + { + this.client = client; + MessageInvisibleTime = 30000; + PeekInterval = 1000; + MaximumWaitTimeWhenIdle = 60000; + } + + public void Init(string address, bool transactional) + { + useTransactions = transactional; + queue = client.GetQueueReference(address); + queue.CreateIfNotExist(); + + if (PurgeOnStartup) + queue.Clear(); + } + + public void Send(TransportMessage message, string destination) + { + var sendQueue = client.GetQueueReference(destination); + + if (!sendQueue.Exists()) + throw new QueueNotFoundException(); + + message.Id = Guid.NewGuid().ToString(); + + var rawMessage = SerializeMessage(message); + + if (Transaction.Current == null) + sendQueue.AddMessage(rawMessage); + else + Transaction.Current.EnlistVolatile(new SendResourceManager(sendQueue, rawMessage), EnlistmentOptions.None); + } + + public bool HasMessage() + { + var hasMessage = queue.PeekMessage() != null; + + DelayNextPeekWhenThereIsNoMessage(hasMessage); + + return hasMessage; + } + + private void DelayNextPeekWhenThereIsNoMessage(bool hasMessage) + { + if (hasMessage) + { + timeToDelayNextPeek = 0; + } + else + { + if (timeToDelayNextPeek < MaximumWaitTimeWhenIdle) timeToDelayNextPeek += PeekInterval; + + Thread.Sleep(timeToDelayNextPeek); + } + } + + public TransportMessage Receive() + { + var rawMessage = GetMessage(); + + if (rawMessage == null) + return null; + + return DeserializeMessage(rawMessage); + } + + private CloudQueueMessage GetMessage() + { + var receivedMessage = queue.GetMessage(TimeSpan.FromMilliseconds(MessageInvisibleTime)); + + if (receivedMessage != null) + { + if (!useTransactions || Transaction.Current == null) + queue.DeleteMessage(receivedMessage); + else + Transaction.Current.EnlistVolatile(new ReceiveResourceManager(queue, receivedMessage),EnlistmentOptions.None); + } + + return receivedMessage; + } + + private static CloudQueueMessage SerializeMessage(TransportMessage originalMessage) + { + using (var stream = new MemoryStream()) + { + var formatter = new BinaryFormatter(); + formatter.Serialize(stream, originalMessage); + return new CloudQueueMessage(stream.ToArray()); + } + } + + private static TransportMessage DeserializeMessage(CloudQueueMessage rawMessage) + { + var formatter = new BinaryFormatter(); + + using (var stream = new MemoryStream(rawMessage.AsBytes)) + { + var message = formatter.Deserialize(stream) as TransportMessage; + + if (message == null) + throw new SerializationException("Failed to deserialize message with id: " + rawMessage.Id); + + return message; + } + } + + public void CreateQueue(string queueName) + { + client.GetQueueReference(queueName).CreateIfNotExist(); + } + + private bool useTransactions; + } } \ No newline at end of file diff --git a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure/NServiceBus.Unicast.Queuing.Azure.csproj b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure/NServiceBus.Unicast.Queuing.Azure.csproj index 8a6ac5d67a8..c9a97406dd1 100644 --- a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure/NServiceBus.Unicast.Queuing.Azure.csproj +++ b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure/NServiceBus.Unicast.Queuing.Azure.csproj @@ -1,85 +1,85 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {D12E0534-9C6F-4E39-AC68-4212FF13E7F1} - Library - Properties - NServiceBus.Unicast.Queuing.Azure - NServiceBus.Unicast.Queuing.Azure - v4.0 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\..\..\lib\Azure\Microsoft.WindowsAzure.ServiceRuntime.dll - - - False - ..\..\..\..\..\lib\Azure\Microsoft.WindowsAzure.StorageClient.dll - - - False - ..\..\..\..\..\build\output\NServiceBus.dll - - - False - ..\..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Queuing.dll - - - False - ..\..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll - False - - - - - 3.5 - - - - - 3.5 - - - - - - CommonAssemblyInfo.cs - - - - - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {D12E0534-9C6F-4E39-AC68-4212FF13E7F1} + Library + Properties + NServiceBus.Unicast.Queuing.Azure + NServiceBus.Unicast.Queuing.Azure + v4.0 + 512 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\..\..\lib\Azure\Microsoft.WindowsAzure.ServiceRuntime.dll + + + False + ..\..\..\..\..\lib\Azure\Microsoft.WindowsAzure.StorageClient.dll + + + False + ..\..\..\..\..\build\output\NServiceBus.dll + + + False + ..\..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Queuing.dll + + + False + ..\..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll + False + + + + + 3.5 + + + + + 3.5 + + + + + + CommonAssemblyInfo.cs + + + + + + + + \ No newline at end of file diff --git a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure/Properties/AssemblyInfo.cs b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure/Properties/AssemblyInfo.cs index 3cbd7dda3bd..013f38c0d7b 100644 --- a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure/Properties/AssemblyInfo.cs +++ b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure/Properties/AssemblyInfo.cs @@ -1,2 +1,2 @@ -using System.Reflection; +using System.Reflection; [assembly: AssemblyTitle("NServiceBus.Unicast.Queuing.Azure")] \ No newline at end of file diff --git a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure/ReceiveResourceManager.cs b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure/ReceiveResourceManager.cs index 80690018bf5..9ffcde841d9 100644 --- a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure/ReceiveResourceManager.cs +++ b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure/ReceiveResourceManager.cs @@ -1,42 +1,42 @@ -using System.Transactions; -using Microsoft.WindowsAzure.StorageClient; - -namespace NServiceBus.Unicast.Queuing.Azure -{ - public class ReceiveResourceManager : IEnlistmentNotification - { - private readonly CloudQueue queue; - private readonly CloudQueueMessage receivedMessage; - - public ReceiveResourceManager(CloudQueue queue, CloudQueueMessage receivedMessage) - { - this.queue = queue; - this.receivedMessage = receivedMessage; - } - - public void Prepare(PreparingEnlistment preparingEnlistment) - { - preparingEnlistment.Prepared(); - } - - public void Commit(Enlistment enlistment) - { - - queue.DeleteMessage(receivedMessage); - - enlistment.Done(); - } - - public void Rollback(Enlistment enlistment) - { - enlistment.Done(); - } - - public void InDoubt(Enlistment enlistment) - { - enlistment.Done(); - } - - - } +using System.Transactions; +using Microsoft.WindowsAzure.StorageClient; + +namespace NServiceBus.Unicast.Queuing.Azure +{ + public class ReceiveResourceManager : IEnlistmentNotification + { + private readonly CloudQueue queue; + private readonly CloudQueueMessage receivedMessage; + + public ReceiveResourceManager(CloudQueue queue, CloudQueueMessage receivedMessage) + { + this.queue = queue; + this.receivedMessage = receivedMessage; + } + + public void Prepare(PreparingEnlistment preparingEnlistment) + { + preparingEnlistment.Prepared(); + } + + public void Commit(Enlistment enlistment) + { + + queue.DeleteMessage(receivedMessage); + + enlistment.Done(); + } + + public void Rollback(Enlistment enlistment) + { + enlistment.Done(); + } + + public void InDoubt(Enlistment enlistment) + { + enlistment.Done(); + } + + + } } \ No newline at end of file diff --git a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure/SendResourceManager.cs b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure/SendResourceManager.cs index 47e484b7bb3..c017c2d624a 100644 --- a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure/SendResourceManager.cs +++ b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Azure/SendResourceManager.cs @@ -1,38 +1,38 @@ -using System.Transactions; -using Microsoft.WindowsAzure.StorageClient; - -namespace NServiceBus.Unicast.Queuing.Azure -{ - public class SendResourceManager : IEnlistmentNotification - { - private readonly CloudQueue queue; - private readonly CloudQueueMessage message; - - public SendResourceManager(CloudQueue queue, CloudQueueMessage message) - { - this.queue = queue; - this.message = message; - } - - public void Prepare(PreparingEnlistment preparingEnlistment) - { - preparingEnlistment.Prepared(); - } - - public void Commit(Enlistment enlistment) - { - queue.AddMessage(message); - enlistment.Done(); - } - - public void Rollback(Enlistment enlistment) - { - enlistment.Done(); - } - - public void InDoubt(Enlistment enlistment) - { - enlistment.Done(); - } - } +using System.Transactions; +using Microsoft.WindowsAzure.StorageClient; + +namespace NServiceBus.Unicast.Queuing.Azure +{ + public class SendResourceManager : IEnlistmentNotification + { + private readonly CloudQueue queue; + private readonly CloudQueueMessage message; + + public SendResourceManager(CloudQueue queue, CloudQueueMessage message) + { + this.queue = queue; + this.message = message; + } + + public void Prepare(PreparingEnlistment preparingEnlistment) + { + preparingEnlistment.Prepared(); + } + + public void Commit(Enlistment enlistment) + { + queue.AddMessage(message); + enlistment.Done(); + } + + public void Rollback(Enlistment enlistment) + { + enlistment.Done(); + } + + public void InDoubt(Enlistment enlistment) + { + enlistment.Done(); + } + } } \ No newline at end of file diff --git a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Ftp.Config/ConfigureFtpQueue.cs b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Ftp.Config/ConfigureFtpQueue.cs index 5501b4e085e..165704ba7df 100644 --- a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Ftp.Config/ConfigureFtpQueue.cs +++ b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Ftp.Config/ConfigureFtpQueue.cs @@ -1,31 +1,31 @@ -using System; -using NServiceBus.Config; -using NServiceBus.ObjectBuilder; -using NServiceBus.Unicast.Queuing.Ftp; - - -namespace NServiceBus -{ - public static class ConfigureFtpQueue - { - public static Configure FtpTransport(this Configure config) - { - var ftpQueue = config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); - var cfg = Configure.GetConfigSection(); - - if (cfg != null) - { - ftpQueue.ConfigureProperty(t => t.SendDirectory, cfg.SendDirectory); - ftpQueue.ConfigureProperty(t => t.ReceiveDirectory, cfg.ReceiveDirectory); - - if (!String.IsNullOrEmpty(cfg.UserName)) - { - ftpQueue.ConfigureProperty(t => t.UserName, cfg.UserName); - ftpQueue.ConfigureProperty(t => t.Password, cfg.Password); - } - } - - return config; - } - } -} +using System; +using NServiceBus.Config; +using NServiceBus.ObjectBuilder; +using NServiceBus.Unicast.Queuing.Ftp; + + +namespace NServiceBus +{ + public static class ConfigureFtpQueue + { + public static Configure FtpTransport(this Configure config) + { + var ftpQueue = config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); + var cfg = Configure.GetConfigSection(); + + if (cfg != null) + { + ftpQueue.ConfigureProperty(t => t.SendDirectory, cfg.SendDirectory); + ftpQueue.ConfigureProperty(t => t.ReceiveDirectory, cfg.ReceiveDirectory); + + if (!String.IsNullOrEmpty(cfg.UserName)) + { + ftpQueue.ConfigureProperty(t => t.UserName, cfg.UserName); + ftpQueue.ConfigureProperty(t => t.Password, cfg.Password); + } + } + + return config; + } + } +} diff --git a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Ftp.Config/FtpQueueConfig.cs b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Ftp.Config/FtpQueueConfig.cs index 0abfce6f817..dc7e879263e 100644 --- a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Ftp.Config/FtpQueueConfig.cs +++ b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Ftp.Config/FtpQueueConfig.cs @@ -1,49 +1,49 @@ -using System; -using System.Configuration; - -namespace NServiceBus.Config -{ - public class FtpQueueConfig : ConfigurationSection - { - /// - /// The temp directory where files will be place before sending - /// - [ConfigurationProperty("SendDirectory", IsRequired = true)] - public String SendDirectory - { - get{ return this["SendDirectory"].ToString(); } - set{ this["SendDirectory"] = value; } - } - - /// - /// The temp directory where files will be watched for when they - /// come through FTP - /// - [ConfigurationProperty("ReceiveDirectory", IsRequired = true)] - public String ReceiveDirectory - { - get{ return this["ReceiveDirectory"].ToString(); } - set{ this["ReceiveDirectory"] = value; } - } - - /// - /// The user name to use when making FTP connections - /// - [ConfigurationProperty("UserName", IsRequired = true)] - public String UserName - { - get{ return this["UserName"].ToString(); } - set{ this["UserName"] = value; } - } - /// - /// The password to use when making FTP connections - /// - [ConfigurationProperty("Password", IsRequired = true)] - public String Password - { - get { return this["Password"].ToString(); } - set { this["Password"] = value; } - } - } -} - +using System; +using System.Configuration; + +namespace NServiceBus.Config +{ + public class FtpQueueConfig : ConfigurationSection + { + /// + /// The temp directory where files will be place before sending + /// + [ConfigurationProperty("SendDirectory", IsRequired = true)] + public String SendDirectory + { + get{ return this["SendDirectory"].ToString(); } + set{ this["SendDirectory"] = value; } + } + + /// + /// The temp directory where files will be watched for when they + /// come through FTP + /// + [ConfigurationProperty("ReceiveDirectory", IsRequired = true)] + public String ReceiveDirectory + { + get{ return this["ReceiveDirectory"].ToString(); } + set{ this["ReceiveDirectory"] = value; } + } + + /// + /// The user name to use when making FTP connections + /// + [ConfigurationProperty("UserName", IsRequired = true)] + public String UserName + { + get{ return this["UserName"].ToString(); } + set{ this["UserName"] = value; } + } + /// + /// The password to use when making FTP connections + /// + [ConfigurationProperty("Password", IsRequired = true)] + public String Password + { + get { return this["Password"].ToString(); } + set { this["Password"] = value; } + } + } +} + diff --git a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Ftp.Config/NServiceBus.Unicast.Queuing.Ftp.Config.csproj b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Ftp.Config/NServiceBus.Unicast.Queuing.Ftp.Config.csproj index 23e8ca25b4c..43756278ecd 100644 --- a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Ftp.Config/NServiceBus.Unicast.Queuing.Ftp.Config.csproj +++ b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Ftp.Config/NServiceBus.Unicast.Queuing.Ftp.Config.csproj @@ -1,75 +1,75 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {847FD31B-84C7-4FE6-B9AA-1E56C1CA5B71} - Library - Properties - NServiceBus.Unicast.Queuing.Ftp.Config - NServiceBus.Unicast.Queuing.Ftp.Config - v4.0 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\..\..\build\output\NServiceBus.dll - - - ..\..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll - - - ..\..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll - - - ..\..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Queuing.dll - - - - - - - - - - - - - - - - - {5DA607F7-46C6-4A0B-8F02-F879D39EF1C7} - NServiceBus.Unicast.Queuing.Ftp - - - - + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {847FD31B-84C7-4FE6-B9AA-1E56C1CA5B71} + Library + Properties + NServiceBus.Unicast.Queuing.Ftp.Config + NServiceBus.Unicast.Queuing.Ftp.Config + v4.0 + 512 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\..\..\build\output\NServiceBus.dll + + + ..\..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll + + + ..\..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll + + + ..\..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Queuing.dll + + + + + + + + + + + + + + + + + {5DA607F7-46C6-4A0B-8F02-F879D39EF1C7} + NServiceBus.Unicast.Queuing.Ftp + + + + \ No newline at end of file diff --git a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Ftp.Config/Properties/AssemblyInfo.cs b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Ftp.Config/Properties/AssemblyInfo.cs index 1455a61725c..d0dabf7d2c9 100644 --- a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Ftp.Config/Properties/AssemblyInfo.cs +++ b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Ftp.Config/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("NServiceBus.Unicast.Queuing.Ftp.Config")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("NServiceBus.Unicast.Queuing.Ftp.Config")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2010")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("7b9b80d2-803e-418e-b2a2-c5f382f23e4c")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("NServiceBus.Unicast.Queuing.Ftp.Config")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("NServiceBus.Unicast.Queuing.Ftp.Config")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2010")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("7b9b80d2-803e-418e-b2a2-c5f382f23e4c")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Ftp/FtpMessageQueue.cs b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Ftp/FtpMessageQueue.cs index 27d1daf575d..a5f401b0a5f 100644 --- a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Ftp/FtpMessageQueue.cs +++ b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Ftp/FtpMessageQueue.cs @@ -1,189 +1,189 @@ -using System; -using System.IO; -using System.Net; -using System.Runtime.Serialization; -using System.Runtime.Serialization.Formatters.Binary; -using NServiceBus.Unicast.Transport; -using Common.Logging; - -namespace NServiceBus.Unicast.Queuing.Ftp -{ - public class FtpMessageQueue : ISendMessages,IReceiveMessages - { - #region Config Parameters - - public String ReceiveDirectory { get; set; } - - public String SendDirectory { get; set; } - - public String UserName { get; set; } - - public String Password { get; set; } - - #endregion - - #region IMessageQueue Members - - public bool HasMessage() - { - return (_locQueue.Count > 0); - } - - public void Init(string inputqueue, bool transactional) - { - this.SetupReceiveService(); - } - - public TransportMessage Receive() - { - lock (_locker) - { - return ((_locQueue.Count > 0) ? _locQueue.Dequeue() : null); - } - } - - public void Send(TransportMessage message, string destination) - { - Stream bitStream = null; - IFormatter binFormatter = new BinaryFormatter(); - - try - { - if (String.IsNullOrEmpty(message.Id)) - message.Id = Guid.NewGuid().ToString(); - - if (message.Headers == null) - message.Headers = new System.Collections.Generic.Dictionary(); - - if (message.Headers.ContainsKey(IDFORCORRELATION)) - message.Headers.Add(IDFORCORRELATION, message.IdForCorrelation); - - var fName = message.Id + ".msg"; - bitStream = new MemoryStream(1024); - binFormatter.Serialize(bitStream, message); - - bitStream.Position = 0; - var bits = new byte[bitStream.Length]; - bitStream.Read(bits, 0, (int)bitStream.Length); - - bitStream.Close(); - bitStream = null; - - this.TransmitFile(fName, destination, bits); - } - catch (Exception ex) - { - Logger.Debug("Exception In FtpQueue Send: " + ex.ToString()); - } - finally - { - if (bitStream != null) - bitStream.Close(); - } - } - - #endregion - - #region Receive Handlers - - private void OnFileCreated(Object sender, FileSystemEventArgs e) - { - Stream bitStream = null; - IFormatter binFormatter = new BinaryFormatter(); - - try - { - while (true) - { - //may not have access to the file that we want - //should put a number of retries here... - try - { - bitStream = new FileStream(e.FullPath, FileMode.Open, FileAccess.Read, FileShare.Read); - - if (bitStream != null) - break; - } - catch { } - - System.Threading.Thread.Sleep(100); - } - - var msg = binFormatter.Deserialize(bitStream) as TransportMessage; - - lock (_locker) - { - _locQueue.Enqueue(msg); - } - - //close the file so we can complete the receive - bitStream.Close(); - bitStream = null; - - File.Delete(e.FullPath); - } - catch (Exception ex) - { - Logger.Debug("Exception in FtpQueue OnFileCreated: " + ex.ToString()); - } - finally - { - if (bitStream != null) - bitStream.Close(); - } - - } - - #endregion - - #region Helpers - - private void SetupReceiveService() - { - this._receiver = new FileSystemWatcher(this.ReceiveDirectory, "*.msg"); - this._receiver.Created += new FileSystemEventHandler(this.OnFileCreated); - this._receiver.EnableRaisingEvents = true; - - } - - private void TransmitFile(String fName, String destination, byte[] bits) - { - FtpWebRequest req = WebRequest.Create("ftp://" + destination + "/" + fName) as FtpWebRequest; - req.Method = WebRequestMethods.Ftp.UploadFile; - req.UseBinary = true; - - if (!String.IsNullOrEmpty(this.UserName)) - req.Credentials = new NetworkCredential(this.UserName, this.Password); - - using (Stream outBitStream = req.GetRequestStream()) - { - outBitStream.Write(bits, 0, bits.Length); - } - - using(FtpWebResponse resp = req.GetResponse() as FtpWebResponse) - { - - if ((resp.StatusCode != FtpStatusCode.CommandOK) && (resp.StatusCode != FtpStatusCode.ClosingData)) - throw new Exception("BadStatus " + resp.StatusCode.ToString() + "\n\n" + resp.StatusDescription); - } - - } - - #endregion - - #region Members - - private FileSystemWatcher _receiver; - - private static System.Collections.Generic.Queue _locQueue = new System.Collections.Generic.Queue(10); - - private static Object _locker = new Object(); - - private const string IDFORCORRELATION = "CorrId"; - - private static readonly ILog Logger = LogManager.GetLogger(typeof(FtpMessageQueue)); - - #endregion - - } -} +using System; +using System.IO; +using System.Net; +using System.Runtime.Serialization; +using System.Runtime.Serialization.Formatters.Binary; +using NServiceBus.Unicast.Transport; +using Common.Logging; + +namespace NServiceBus.Unicast.Queuing.Ftp +{ + public class FtpMessageQueue : ISendMessages,IReceiveMessages + { + #region Config Parameters + + public String ReceiveDirectory { get; set; } + + public String SendDirectory { get; set; } + + public String UserName { get; set; } + + public String Password { get; set; } + + #endregion + + #region IMessageQueue Members + + public bool HasMessage() + { + return (_locQueue.Count > 0); + } + + public void Init(string inputqueue, bool transactional) + { + this.SetupReceiveService(); + } + + public TransportMessage Receive() + { + lock (_locker) + { + return ((_locQueue.Count > 0) ? _locQueue.Dequeue() : null); + } + } + + public void Send(TransportMessage message, string destination) + { + Stream bitStream = null; + IFormatter binFormatter = new BinaryFormatter(); + + try + { + if (String.IsNullOrEmpty(message.Id)) + message.Id = Guid.NewGuid().ToString(); + + if (message.Headers == null) + message.Headers = new System.Collections.Generic.Dictionary(); + + if (message.Headers.ContainsKey(IDFORCORRELATION)) + message.Headers.Add(IDFORCORRELATION, message.IdForCorrelation); + + var fName = message.Id + ".msg"; + bitStream = new MemoryStream(1024); + binFormatter.Serialize(bitStream, message); + + bitStream.Position = 0; + var bits = new byte[bitStream.Length]; + bitStream.Read(bits, 0, (int)bitStream.Length); + + bitStream.Close(); + bitStream = null; + + this.TransmitFile(fName, destination, bits); + } + catch (Exception ex) + { + Logger.Debug("Exception In FtpQueue Send: " + ex.ToString()); + } + finally + { + if (bitStream != null) + bitStream.Close(); + } + } + + #endregion + + #region Receive Handlers + + private void OnFileCreated(Object sender, FileSystemEventArgs e) + { + Stream bitStream = null; + IFormatter binFormatter = new BinaryFormatter(); + + try + { + while (true) + { + //may not have access to the file that we want + //should put a number of retries here... + try + { + bitStream = new FileStream(e.FullPath, FileMode.Open, FileAccess.Read, FileShare.Read); + + if (bitStream != null) + break; + } + catch { } + + System.Threading.Thread.Sleep(100); + } + + var msg = binFormatter.Deserialize(bitStream) as TransportMessage; + + lock (_locker) + { + _locQueue.Enqueue(msg); + } + + //close the file so we can complete the receive + bitStream.Close(); + bitStream = null; + + File.Delete(e.FullPath); + } + catch (Exception ex) + { + Logger.Debug("Exception in FtpQueue OnFileCreated: " + ex.ToString()); + } + finally + { + if (bitStream != null) + bitStream.Close(); + } + + } + + #endregion + + #region Helpers + + private void SetupReceiveService() + { + this._receiver = new FileSystemWatcher(this.ReceiveDirectory, "*.msg"); + this._receiver.Created += new FileSystemEventHandler(this.OnFileCreated); + this._receiver.EnableRaisingEvents = true; + + } + + private void TransmitFile(String fName, String destination, byte[] bits) + { + FtpWebRequest req = WebRequest.Create("ftp://" + destination + "/" + fName) as FtpWebRequest; + req.Method = WebRequestMethods.Ftp.UploadFile; + req.UseBinary = true; + + if (!String.IsNullOrEmpty(this.UserName)) + req.Credentials = new NetworkCredential(this.UserName, this.Password); + + using (Stream outBitStream = req.GetRequestStream()) + { + outBitStream.Write(bits, 0, bits.Length); + } + + using(FtpWebResponse resp = req.GetResponse() as FtpWebResponse) + { + + if ((resp.StatusCode != FtpStatusCode.CommandOK) && (resp.StatusCode != FtpStatusCode.ClosingData)) + throw new Exception("BadStatus " + resp.StatusCode.ToString() + "\n\n" + resp.StatusDescription); + } + + } + + #endregion + + #region Members + + private FileSystemWatcher _receiver; + + private static System.Collections.Generic.Queue _locQueue = new System.Collections.Generic.Queue(10); + + private static Object _locker = new Object(); + + private const string IDFORCORRELATION = "CorrId"; + + private static readonly ILog Logger = LogManager.GetLogger(typeof(FtpMessageQueue)); + + #endregion + + } +} diff --git a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Ftp/NServiceBus.Unicast.Queuing.Ftp.csproj b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Ftp/NServiceBus.Unicast.Queuing.Ftp.csproj index a5566804077..908d26adcad 100644 --- a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Ftp/NServiceBus.Unicast.Queuing.Ftp.csproj +++ b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Ftp/NServiceBus.Unicast.Queuing.Ftp.csproj @@ -1,68 +1,68 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {5DA607F7-46C6-4A0B-8F02-F879D39EF1C7} - Library - Properties - NServiceBus.Unicast.Queuing.Ftp - NServiceBus.Unicast.Queuing.Ftp - v4.0 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\..\..\..\..\lib\Common.Logging.dll - - - False - ..\..\..\..\..\build\output\NServiceBus.dll - - - ..\..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Queuing.dll - - - ..\..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll - - - ..\..\..\..\..\build\nservicebus.core\NServiceBus.Utils.dll - - - - - - - - - - - - + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {5DA607F7-46C6-4A0B-8F02-F879D39EF1C7} + Library + Properties + NServiceBus.Unicast.Queuing.Ftp + NServiceBus.Unicast.Queuing.Ftp + v4.0 + 512 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\..\..\..\lib\Common.Logging.dll + + + False + ..\..\..\..\..\build\output\NServiceBus.dll + + + ..\..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Queuing.dll + + + ..\..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll + + + ..\..\..\..\..\build\nservicebus.core\NServiceBus.Utils.dll + + + + + + + + + + + + \ No newline at end of file diff --git a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Ftp/Properties/AssemblyInfo.cs b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Ftp/Properties/AssemblyInfo.cs index 77361319198..57402841d1a 100644 --- a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Ftp/Properties/AssemblyInfo.cs +++ b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Ftp/Properties/AssemblyInfo.cs @@ -1,36 +1,36 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("NServiceBus.Unicast.Queuing.Ftp")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("NServiceBus.Unicast.Queuing.Ftp")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2010")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("f8b21eb0-2d16-4f82-bd59-c7b4e2bbbd99")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("NServiceBus.Unicast.Queuing.Ftp")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("NServiceBus.Unicast.Queuing.Ftp")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2010")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("f8b21eb0-2d16-4f82-bd59-c7b4e2bbbd99")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq.Config/ConfigureMsmqMessageQueue.cs b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq.Config/ConfigureMsmqMessageQueue.cs index 63a87b8d505..e0f39afdfdd 100644 --- a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq.Config/ConfigureMsmqMessageQueue.cs +++ b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq.Config/ConfigureMsmqMessageQueue.cs @@ -1,47 +1,47 @@ -using NServiceBus.Config; -using NServiceBus.ObjectBuilder; -using NServiceBus.Unicast.Queuing.Msmq; - -namespace NServiceBus -{ - public static class ConfigureMsmqMessageQueue - { - /// - /// Use MSMQ for your queuing infrastructure. - /// - /// - /// - public static Configure MsmqTransport(this Configure config) - { - config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); - config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); - - - var cfg = Configure.GetConfigSection(); - - if (cfg != null) - { - config.Configurer.ConfigureProperty(t => t.UseDeadLetterQueue, cfg.UseJournalQueue); - config.Configurer.ConfigureProperty(t => t.UseJournalQueue, cfg.UseJournalQueue); - } - - return config; - } - - /// - /// Requests that the incoming queue be purged of all messages when the bus is started. - /// All messages in this queue will be deleted if this is true. - /// Setting this to true may make sense for certain smart-client applications, - /// but rarely for server applications. - /// - /// - /// - /// - public static Configure PurgeOnStartup(this Configure config, bool value) - { - config.Configurer.ConfigureProperty(t => t.PurgeOnStartup, value); - - return config; - } - } -} +using NServiceBus.Config; +using NServiceBus.ObjectBuilder; +using NServiceBus.Unicast.Queuing.Msmq; + +namespace NServiceBus +{ + public static class ConfigureMsmqMessageQueue + { + /// + /// Use MSMQ for your queuing infrastructure. + /// + /// + /// + public static Configure MsmqTransport(this Configure config) + { + config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); + config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); + + + var cfg = Configure.GetConfigSection(); + + if (cfg != null) + { + config.Configurer.ConfigureProperty(t => t.UseDeadLetterQueue, cfg.UseJournalQueue); + config.Configurer.ConfigureProperty(t => t.UseJournalQueue, cfg.UseJournalQueue); + } + + return config; + } + + /// + /// Requests that the incoming queue be purged of all messages when the bus is started. + /// All messages in this queue will be deleted if this is true. + /// Setting this to true may make sense for certain smart-client applications, + /// but rarely for server applications. + /// + /// + /// + /// + public static Configure PurgeOnStartup(this Configure config, bool value) + { + config.Configurer.ConfigureProperty(t => t.PurgeOnStartup, value); + + return config; + } + } +} diff --git a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq.Config/MsmqMessageQueueConfig.cs b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq.Config/MsmqMessageQueueConfig.cs index c732a2151e8..d710f43fc58 100644 --- a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq.Config/MsmqMessageQueueConfig.cs +++ b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq.Config/MsmqMessageQueueConfig.cs @@ -1,44 +1,44 @@ -using System.Configuration; - -namespace NServiceBus.Config -{ - /// - /// Contains the properties representing the MsmqMessageQueue configuration section. - /// - public class MsmqMessageQueueConfig : ConfigurationSection - { - - /// - /// If true, then message-delivery failure should result in a copy of the message being sent to a dead-letter queue - /// - [ConfigurationProperty("UseDeadLetterQueue", IsRequired = false)] - public bool UseDeadLetterQueue - { - get - { - return (bool)this["UseDeadLetterQueue"]; - } - set - { - this["UseDeadLetterQueue"] = value; - } - } - - /// - /// If true, require that a copy of a message be kept in the originating computer's machine journal after the message has been successfully transmitted (from the originating computer to the next server) - /// - [ConfigurationProperty("UseJournalQueue", IsRequired = false)] - public bool UseJournalQueue - { - get - { - return (bool)this["UseJournalQueue"]; - } - set - { - this["UseJournalQueue"] = value; - } - } - - } -} +using System.Configuration; + +namespace NServiceBus.Config +{ + /// + /// Contains the properties representing the MsmqMessageQueue configuration section. + /// + public class MsmqMessageQueueConfig : ConfigurationSection + { + + /// + /// If true, then message-delivery failure should result in a copy of the message being sent to a dead-letter queue + /// + [ConfigurationProperty("UseDeadLetterQueue", IsRequired = false)] + public bool UseDeadLetterQueue + { + get + { + return (bool)this["UseDeadLetterQueue"]; + } + set + { + this["UseDeadLetterQueue"] = value; + } + } + + /// + /// If true, require that a copy of a message be kept in the originating computer's machine journal after the message has been successfully transmitted (from the originating computer to the next server) + /// + [ConfigurationProperty("UseJournalQueue", IsRequired = false)] + public bool UseJournalQueue + { + get + { + return (bool)this["UseJournalQueue"]; + } + set + { + this["UseJournalQueue"] = value; + } + } + + } +} diff --git a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq.Config/NServiceBus.Unicast.Queuing.Msmq.Config.csproj b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq.Config/NServiceBus.Unicast.Queuing.Msmq.Config.csproj index 0b1d8249989..d82b629d9df 100644 --- a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq.Config/NServiceBus.Unicast.Queuing.Msmq.Config.csproj +++ b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq.Config/NServiceBus.Unicast.Queuing.Msmq.Config.csproj @@ -1,83 +1,83 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {2702CE9B-839F-40DD-8738-5C1B95170F0B} - Library - Properties - NServiceBus.Unicast.Queuing.Msmq.Config - NServiceBus.Unicast.Queuing.Msmq.Config - v4.0 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\..\..\build\output\NServiceBus.dll - False - - - False - ..\..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll - - - False - ..\..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll - False - - - False - ..\..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Queuing.dll - False - - - - - 3.5 - - - - - CommonAssemblyInfo.cs - - - - - - - - {4D4FA577-EFBD-4DFF-BFFC-2DA1A71F36ED} - NServiceBus.Unicast.Queuing.Msmq - False - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {2702CE9B-839F-40DD-8738-5C1B95170F0B} + Library + Properties + NServiceBus.Unicast.Queuing.Msmq.Config + NServiceBus.Unicast.Queuing.Msmq.Config + v4.0 + 512 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\..\..\build\output\NServiceBus.dll + False + + + False + ..\..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll + + + False + ..\..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll + False + + + False + ..\..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Queuing.dll + False + + + + + 3.5 + + + + + CommonAssemblyInfo.cs + + + + + + + + {4D4FA577-EFBD-4DFF-BFFC-2DA1A71F36ED} + NServiceBus.Unicast.Queuing.Msmq + False + + + + \ No newline at end of file diff --git a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq.Config/Properties/AssemblyInfo.cs b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq.Config/Properties/AssemblyInfo.cs index dc4bba0f9e4..7adc3bbf814 100644 --- a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq.Config/Properties/AssemblyInfo.cs +++ b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq.Config/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Unicast MSMQ Queuing Configuration")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Unicast MSMQ Queuing Configuration")] [assembly: AssemblyDescription("Configuration facility for NServiceBus Message Queue implementaiton on MSMQ")] \ No newline at end of file diff --git a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq/HeaderInfo.cs b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq/HeaderInfo.cs index ab59f2db78d..32dcccd4f2b 100644 --- a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq/HeaderInfo.cs +++ b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq/HeaderInfo.cs @@ -1,21 +1,21 @@ -using System; - -namespace NServiceBus.Unicast.Queuing.Msmq -{ - /// - /// Represents the structure of header information passed in a TransportMessage. - /// - [Serializable] - public class HeaderInfo - { - /// - /// The key used to lookup the value in the header collection. - /// - public string Key { get; set; } - - /// - /// The value stored under the key in the header collection. - /// - public string Value { get; set; } - } -} +using System; + +namespace NServiceBus.Unicast.Queuing.Msmq +{ + /// + /// Represents the structure of header information passed in a TransportMessage. + /// + [Serializable] + public class HeaderInfo + { + /// + /// The key used to lookup the value in the header collection. + /// + public string Key { get; set; } + + /// + /// The value stored under the key in the header collection. + /// + public string Value { get; set; } + } +} diff --git a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq/HeaderKeys.cs b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq/HeaderKeys.cs index de09586ea7c..9d194249125 100644 --- a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq/HeaderKeys.cs +++ b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq/HeaderKeys.cs @@ -1,7 +1,7 @@ -namespace NServiceBus.Unicast.Queuing.Msmq -{ - public class HeaderKeys - { - public const string IDFORCORRELATION = "CorrId"; - } +namespace NServiceBus.Unicast.Queuing.Msmq +{ + public class HeaderKeys + { + public const string IDFORCORRELATION = "CorrId"; + } } \ No newline at end of file diff --git a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq/MsmqMessageReceiver.cs b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq/MsmqMessageReceiver.cs index 6ab003e9f1a..e2bd68e6b44 100644 --- a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq/MsmqMessageReceiver.cs +++ b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq/MsmqMessageReceiver.cs @@ -1,186 +1,186 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Messaging; -using System.Security.Principal; -using System.Threading; -using System.Xml.Serialization; -using NServiceBus.Unicast.Transport; -using NServiceBus.Utils; -using Common.Logging; - -namespace NServiceBus.Unicast.Queuing.Msmq -{ - public class MsmqMessageReceiver : IReceiveMessages - { - public void Init(string address, bool transactional) - { - useTransactions = transactional; - - if (string.IsNullOrEmpty(address)) - throw new ArgumentException("Input queue must be specified"); - - var machine = MsmqUtilities.GetMachineNameFromLogicalName(address); - - if (machine.ToLower() != Environment.MachineName.ToLower()) - throw new InvalidOperationException("Input queue must be on the same machine as this process."); - - MsmqUtilities.CreateQueueIfNecessary(address); - - myQueue = new MessageQueue(MsmqUtilities.GetFullPath(address)); - - if (useTransactions && !QueueIsTransactional()) - throw new ArgumentException("Queue must be transactional (" + address + ")."); - - var mpf = new MessagePropertyFilter(); - mpf.SetAll(); - - myQueue.MessageReadPropertyFilter = mpf; - - if (PurgeOnStartup) - myQueue.Purge(); - } - - - [DebuggerNonUserCode] - public bool HasMessage() - { - try - { - var m = myQueue.Peek(TimeSpan.FromSeconds(secondsToWait)); - return m != null; - } - catch (MessageQueueException mqe) - { - if (mqe.MessageQueueErrorCode == MessageQueueErrorCode.IOTimeout) - return false; - - if (mqe.MessageQueueErrorCode == MessageQueueErrorCode.AccessDenied) - { - Logger.Fatal(string.Format("Do not have permission to access queue [{0}]. Make sure that the current user [{1}] has permission to Send, Receive, and Peek from this queue. NServiceBus will now exit.", myQueue.QueueName, WindowsIdentity.GetCurrent() != null ? WindowsIdentity.GetCurrent().Name : "unknown user")); - Thread.Sleep(10000); //long enough for someone to notice - Process.GetCurrentProcess().Kill(); - } - - throw; - } - catch(ObjectDisposedException) - { - Logger.Fatal("Queue has been disposed. Cannot continue operation. Please restart this process."); - Thread.Sleep(10000); //long enough for someone to notice - Process.GetCurrentProcess().Kill(); - - throw; - } - } - - public TransportMessage Receive() - { - try - { - var m = myQueue.Receive(TimeSpan.FromSeconds(secondsToWait), GetTransactionTypeForReceive()); - if (m == null) - return null; - - var result = new TransportMessage - { - Id = m.Id, - CorrelationId = - (m.CorrelationId == "00000000-0000-0000-0000-000000000000\\0" - ? null - : m.CorrelationId), - Recoverable = m.Recoverable, - TimeToBeReceived = m.TimeToBeReceived, - TimeSent = m.SentTime, - ReturnAddress = MsmqUtilities.GetIndependentAddressForQueue(m.ResponseQueue), - MessageIntent = Enum.IsDefined(typeof(MessageIntentEnum), m.AppSpecific) ? (MessageIntentEnum)m.AppSpecific : MessageIntentEnum.Send - }; - - m.BodyStream.Position = 0; - result.Body = new byte[m.BodyStream.Length]; - m.BodyStream.Read(result.Body, 0, result.Body.Length); - - result.Headers = new Dictionary(); - if (m.Extension.Length > 0) - { - var stream = new MemoryStream(m.Extension); - var o = headerSerializer.Deserialize(stream); - - foreach(var pair in o as List) - if (pair.Key != null) - result.Headers.Add(pair.Key, pair.Value); - } - - result.IdForCorrelation = GetIdForCorrelation(result.Headers); - if (result.IdForCorrelation == null) - result.IdForCorrelation = result.Id; - - return result; - } - catch (MessageQueueException mqe) - { - if (mqe.MessageQueueErrorCode == MessageQueueErrorCode.IOTimeout) - return null; - - if (mqe.MessageQueueErrorCode == MessageQueueErrorCode.AccessDenied) - { - Logger.Fatal(string.Format("Do not have permission to access queue [{0}]. Make sure that the current user [{1}] has permission to Send, Receive, and Peek from this queue. NServiceBus will now exit.", myQueue.QueueName, WindowsIdentity.GetCurrent() != null ? WindowsIdentity.GetCurrent().Name : "unknown user")); - Thread.Sleep(10000); //long enough for someone to notice - Process.GetCurrentProcess().Kill(); - } - - throw; - } - } - - bool QueueIsTransactional() - { - try - { - return myQueue.Transactional; - } - catch (Exception ex) - { - throw new InvalidOperationException(string.Format("There is a problem with the input queue given: {0}. See the enclosed exception for details.", myQueue.QueueName), ex); - } - } - - - private static string GetIdForCorrelation(IDictionary headers) - { - if (headers.ContainsKey(HeaderKeys.IDFORCORRELATION)) - return headers[HeaderKeys.IDFORCORRELATION]; - - return null; - } - - private MessageQueueTransactionType GetTransactionTypeForReceive() - { - return useTransactions ? MessageQueueTransactionType.Automatic : MessageQueueTransactionType.None; - } - - - /// - /// Sets whether or not the transport should purge the input - /// queue when it is started. - /// - public bool PurgeOnStartup { get; set; } - - - private int secondsToWait = 1; - public int SecondsToWaitForMessage - { - get { return secondsToWait; } - set { secondsToWait = value; } - } - - private MessageQueue myQueue; - - private readonly XmlSerializer headerSerializer = new XmlSerializer(typeof(List)); - - private bool useTransactions; - - private static readonly ILog Logger = LogManager.GetLogger(typeof(MsmqMessageReceiver)); - } +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Messaging; +using System.Security.Principal; +using System.Threading; +using System.Xml.Serialization; +using NServiceBus.Unicast.Transport; +using NServiceBus.Utils; +using Common.Logging; + +namespace NServiceBus.Unicast.Queuing.Msmq +{ + public class MsmqMessageReceiver : IReceiveMessages + { + public void Init(string address, bool transactional) + { + useTransactions = transactional; + + if (string.IsNullOrEmpty(address)) + throw new ArgumentException("Input queue must be specified"); + + var machine = MsmqUtilities.GetMachineNameFromLogicalName(address); + + if (machine.ToLower() != Environment.MachineName.ToLower()) + throw new InvalidOperationException("Input queue must be on the same machine as this process."); + + MsmqUtilities.CreateQueueIfNecessary(address); + + myQueue = new MessageQueue(MsmqUtilities.GetFullPath(address)); + + if (useTransactions && !QueueIsTransactional()) + throw new ArgumentException("Queue must be transactional (" + address + ")."); + + var mpf = new MessagePropertyFilter(); + mpf.SetAll(); + + myQueue.MessageReadPropertyFilter = mpf; + + if (PurgeOnStartup) + myQueue.Purge(); + } + + + [DebuggerNonUserCode] + public bool HasMessage() + { + try + { + var m = myQueue.Peek(TimeSpan.FromSeconds(secondsToWait)); + return m != null; + } + catch (MessageQueueException mqe) + { + if (mqe.MessageQueueErrorCode == MessageQueueErrorCode.IOTimeout) + return false; + + if (mqe.MessageQueueErrorCode == MessageQueueErrorCode.AccessDenied) + { + Logger.Fatal(string.Format("Do not have permission to access queue [{0}]. Make sure that the current user [{1}] has permission to Send, Receive, and Peek from this queue. NServiceBus will now exit.", myQueue.QueueName, WindowsIdentity.GetCurrent() != null ? WindowsIdentity.GetCurrent().Name : "unknown user")); + Thread.Sleep(10000); //long enough for someone to notice + Process.GetCurrentProcess().Kill(); + } + + throw; + } + catch(ObjectDisposedException) + { + Logger.Fatal("Queue has been disposed. Cannot continue operation. Please restart this process."); + Thread.Sleep(10000); //long enough for someone to notice + Process.GetCurrentProcess().Kill(); + + throw; + } + } + + public TransportMessage Receive() + { + try + { + var m = myQueue.Receive(TimeSpan.FromSeconds(secondsToWait), GetTransactionTypeForReceive()); + if (m == null) + return null; + + var result = new TransportMessage + { + Id = m.Id, + CorrelationId = + (m.CorrelationId == "00000000-0000-0000-0000-000000000000\\0" + ? null + : m.CorrelationId), + Recoverable = m.Recoverable, + TimeToBeReceived = m.TimeToBeReceived, + TimeSent = m.SentTime, + ReturnAddress = MsmqUtilities.GetIndependentAddressForQueue(m.ResponseQueue), + MessageIntent = Enum.IsDefined(typeof(MessageIntentEnum), m.AppSpecific) ? (MessageIntentEnum)m.AppSpecific : MessageIntentEnum.Send + }; + + m.BodyStream.Position = 0; + result.Body = new byte[m.BodyStream.Length]; + m.BodyStream.Read(result.Body, 0, result.Body.Length); + + result.Headers = new Dictionary(); + if (m.Extension.Length > 0) + { + var stream = new MemoryStream(m.Extension); + var o = headerSerializer.Deserialize(stream); + + foreach(var pair in o as List) + if (pair.Key != null) + result.Headers.Add(pair.Key, pair.Value); + } + + result.IdForCorrelation = GetIdForCorrelation(result.Headers); + if (result.IdForCorrelation == null) + result.IdForCorrelation = result.Id; + + return result; + } + catch (MessageQueueException mqe) + { + if (mqe.MessageQueueErrorCode == MessageQueueErrorCode.IOTimeout) + return null; + + if (mqe.MessageQueueErrorCode == MessageQueueErrorCode.AccessDenied) + { + Logger.Fatal(string.Format("Do not have permission to access queue [{0}]. Make sure that the current user [{1}] has permission to Send, Receive, and Peek from this queue. NServiceBus will now exit.", myQueue.QueueName, WindowsIdentity.GetCurrent() != null ? WindowsIdentity.GetCurrent().Name : "unknown user")); + Thread.Sleep(10000); //long enough for someone to notice + Process.GetCurrentProcess().Kill(); + } + + throw; + } + } + + bool QueueIsTransactional() + { + try + { + return myQueue.Transactional; + } + catch (Exception ex) + { + throw new InvalidOperationException(string.Format("There is a problem with the input queue given: {0}. See the enclosed exception for details.", myQueue.QueueName), ex); + } + } + + + private static string GetIdForCorrelation(IDictionary headers) + { + if (headers.ContainsKey(HeaderKeys.IDFORCORRELATION)) + return headers[HeaderKeys.IDFORCORRELATION]; + + return null; + } + + private MessageQueueTransactionType GetTransactionTypeForReceive() + { + return useTransactions ? MessageQueueTransactionType.Automatic : MessageQueueTransactionType.None; + } + + + /// + /// Sets whether or not the transport should purge the input + /// queue when it is started. + /// + public bool PurgeOnStartup { get; set; } + + + private int secondsToWait = 1; + public int SecondsToWaitForMessage + { + get { return secondsToWait; } + set { secondsToWait = value; } + } + + private MessageQueue myQueue; + + private readonly XmlSerializer headerSerializer = new XmlSerializer(typeof(List)); + + private bool useTransactions; + + private static readonly ILog Logger = LogManager.GetLogger(typeof(MsmqMessageReceiver)); + } } \ No newline at end of file diff --git a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq/MsmqMessageSender.cs b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq/MsmqMessageSender.cs index a30005ead72..1b795f80414 100644 --- a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq/MsmqMessageSender.cs +++ b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq/MsmqMessageSender.cs @@ -1,89 +1,89 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Messaging; -using System.Transactions; -using System.Xml.Serialization; -using NServiceBus.Unicast.Transport; -using NServiceBus.Utils; - -namespace NServiceBus.Unicast.Queuing.Msmq -{ - public class MsmqMessageSender : ISendMessages - { - public void Send(TransportMessage message, string destination) - { - var address = MsmqUtilities.GetFullPath(destination); - - using (var q = new MessageQueue(address, QueueAccessMode.Send)) - { - var toSend = new Message(); - - if (message.Body != null) - toSend.BodyStream = new MemoryStream(message.Body); - - if (message.CorrelationId != null) - toSend.CorrelationId = message.CorrelationId; - - toSend.Recoverable = message.Recoverable; - toSend.UseDeadLetterQueue = UseDeadLetterQueue; - toSend.UseJournalQueue = UseJournalQueue; - - if (!string.IsNullOrEmpty(message.ReturnAddress)) - toSend.ResponseQueue = new MessageQueue(MsmqUtilities.GetFullPath(message.ReturnAddress)); - - if (message.TimeToBeReceived < MessageQueue.InfiniteTimeout) - toSend.TimeToBeReceived = message.TimeToBeReceived; - - if (message.Headers == null) - message.Headers = new Dictionary(); - - if (!message.Headers.ContainsKey(HeaderKeys.IDFORCORRELATION)) - message.Headers.Add(HeaderKeys.IDFORCORRELATION, message.IdForCorrelation); - - using (var stream = new MemoryStream()) - { - headerSerializer.Serialize(stream, message.Headers.Select(pair => new HeaderInfo { Key = pair.Key, Value = pair.Value }).ToList()); - toSend.Extension = stream.GetBuffer(); - } - - toSend.AppSpecific = (int)message.MessageIntent; - - try - { - q.Send(toSend, GetTransactionTypeForSend()); - } - catch (MessageQueueException ex) - { - if (ex.MessageQueueErrorCode == MessageQueueErrorCode.QueueNotFound) - throw new QueueNotFoundException { Queue = destination }; - - throw; - } - - message.Id = toSend.Id; - } - - - } - - /// - /// Determines if journaling should be activated - /// - public bool UseJournalQueue { get; set; } - - /// - /// Determines if the dead letter queue should be used - /// - public bool UseDeadLetterQueue { get; set; } - - private static MessageQueueTransactionType GetTransactionTypeForSend() - { - return Transaction.Current != null ? MessageQueueTransactionType.Automatic : MessageQueueTransactionType.Single; - } - - private readonly XmlSerializer headerSerializer = new XmlSerializer(typeof(List)); - - } +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Messaging; +using System.Transactions; +using System.Xml.Serialization; +using NServiceBus.Unicast.Transport; +using NServiceBus.Utils; + +namespace NServiceBus.Unicast.Queuing.Msmq +{ + public class MsmqMessageSender : ISendMessages + { + public void Send(TransportMessage message, string destination) + { + var address = MsmqUtilities.GetFullPath(destination); + + using (var q = new MessageQueue(address, QueueAccessMode.Send)) + { + var toSend = new Message(); + + if (message.Body != null) + toSend.BodyStream = new MemoryStream(message.Body); + + if (message.CorrelationId != null) + toSend.CorrelationId = message.CorrelationId; + + toSend.Recoverable = message.Recoverable; + toSend.UseDeadLetterQueue = UseDeadLetterQueue; + toSend.UseJournalQueue = UseJournalQueue; + + if (!string.IsNullOrEmpty(message.ReturnAddress)) + toSend.ResponseQueue = new MessageQueue(MsmqUtilities.GetFullPath(message.ReturnAddress)); + + if (message.TimeToBeReceived < MessageQueue.InfiniteTimeout) + toSend.TimeToBeReceived = message.TimeToBeReceived; + + if (message.Headers == null) + message.Headers = new Dictionary(); + + if (!message.Headers.ContainsKey(HeaderKeys.IDFORCORRELATION)) + message.Headers.Add(HeaderKeys.IDFORCORRELATION, message.IdForCorrelation); + + using (var stream = new MemoryStream()) + { + headerSerializer.Serialize(stream, message.Headers.Select(pair => new HeaderInfo { Key = pair.Key, Value = pair.Value }).ToList()); + toSend.Extension = stream.GetBuffer(); + } + + toSend.AppSpecific = (int)message.MessageIntent; + + try + { + q.Send(toSend, GetTransactionTypeForSend()); + } + catch (MessageQueueException ex) + { + if (ex.MessageQueueErrorCode == MessageQueueErrorCode.QueueNotFound) + throw new QueueNotFoundException { Queue = destination }; + + throw; + } + + message.Id = toSend.Id; + } + + + } + + /// + /// Determines if journaling should be activated + /// + public bool UseJournalQueue { get; set; } + + /// + /// Determines if the dead letter queue should be used + /// + public bool UseDeadLetterQueue { get; set; } + + private static MessageQueueTransactionType GetTransactionTypeForSend() + { + return Transaction.Current != null ? MessageQueueTransactionType.Automatic : MessageQueueTransactionType.Single; + } + + private readonly XmlSerializer headerSerializer = new XmlSerializer(typeof(List)); + + } } \ No newline at end of file diff --git a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq/NServiceBus.Unicast.Queuing.Msmq.csproj b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq/NServiceBus.Unicast.Queuing.Msmq.csproj index aa06d0fb47b..13b8eb0ac35 100644 --- a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq/NServiceBus.Unicast.Queuing.Msmq.csproj +++ b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq/NServiceBus.Unicast.Queuing.Msmq.csproj @@ -1,85 +1,85 @@ - - - - Debug - AnyCPU - 9.0.21022 - 2.0 - {4D4FA577-EFBD-4DFF-BFFC-2DA1A71F36ED} - Library - Properties - NServiceBus.Unicast.Queuing.Msmq - NServiceBus.Unicast.Queuing.Msmq - v4.0 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\..\..\lib\Common.Logging.dll - - - False - ..\..\..\..\..\build\output\NServiceBus.dll - False - - - False - ..\..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Queuing.dll - False - - - False - ..\..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll - False - - - False - ..\..\..\..\..\build\nservicebus.core\NServiceBus.Utils.dll - False - - - - 3.5 - - - - - - - - CommonAssemblyInfo.cs - - - - - - - - - + + + + Debug + AnyCPU + 9.0.21022 + 2.0 + {4D4FA577-EFBD-4DFF-BFFC-2DA1A71F36ED} + Library + Properties + NServiceBus.Unicast.Queuing.Msmq + NServiceBus.Unicast.Queuing.Msmq + v4.0 + 512 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\..\..\lib\Common.Logging.dll + + + False + ..\..\..\..\..\build\output\NServiceBus.dll + False + + + False + ..\..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Queuing.dll + False + + + False + ..\..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll + False + + + False + ..\..\..\..\..\build\nservicebus.core\NServiceBus.Utils.dll + False + + + + 3.5 + + + + + + + + CommonAssemblyInfo.cs + + + + + + + + + \ No newline at end of file diff --git a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq/Properties/AssemblyInfo.cs b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq/Properties/AssemblyInfo.cs index 91a731d4cd7..4b552b24413 100644 --- a/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq/Properties/AssemblyInfo.cs +++ b/src/impl/unicast/queuing/NServiceBus.Unicast.Queuing.Msmq/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Concrete Unicast Message Queue MSMQ Implementation")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Concrete Unicast Message Queue MSMQ Implementation")] [assembly: AssemblyDescription("Implementation of the Unicast Queuing abstraction using MSMQ")] \ No newline at end of file diff --git a/src/impl/unicast/queuing/queuing.sln b/src/impl/unicast/queuing/queuing.sln index 51d0d3b6741..bdab3a256c5 100644 --- a/src/impl/unicast/queuing/queuing.sln +++ b/src/impl/unicast/queuing/queuing.sln @@ -1,74 +1,74 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Queuing.Msmq", "NServiceBus.Unicast.Queuing.Msmq\NServiceBus.Unicast.Queuing.Msmq.csproj", "{4D4FA577-EFBD-4DFF-BFFC-2DA1A71F36ED}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Queuing.Msmq.Config", "NServiceBus.Unicast.Queuing.Msmq.Config\NServiceBus.Unicast.Queuing.Msmq.Config.csproj", "{2702CE9B-839F-40DD-8738-5C1B95170F0B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Queuing.Azure", "NServiceBus.Unicast.Queuing.Azure\NServiceBus.Unicast.Queuing.Azure.csproj", "{D12E0534-9C6F-4E39-AC68-4212FF13E7F1}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Queuing.Azure.Tests", "NServiceBus.Unicast.Queuing.Azure.Tests\NServiceBus.Unicast.Queuing.Azure.Tests.csproj", "{D917D6B0-53F0-4D21-BCBD-35BFE19FB4FD}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Queuing.Azure.Config", "NServiceBus.Unicast.Queuing.Azure.Config\NServiceBus.Unicast.Queuing.Azure.Config.csproj", "{87C365D3-7D4A-4686-A042-5E7B83869CBF}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Azure", "Azure", "{906EA88E-2F1C-4945-809F-9F2027735C6C}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Ftp", "Ftp", "{50027F16-64EF-4039-82CD-1CB8C1D9DB16}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Msmq", "Msmq", "{E437E792-2B83-428F-92B9-03F3BACC20B9}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Queuing.Ftp", "NServiceBus.Unicast.Queuing.Ftp\NServiceBus.Unicast.Queuing.Ftp.csproj", "{5DA607F7-46C6-4A0B-8F02-F879D39EF1C7}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Queuing.Ftp.Config", "NServiceBus.Unicast.Queuing.Ftp.Config\NServiceBus.Unicast.Queuing.Ftp.Config.csproj", "{847FD31B-84C7-4FE6-B9AA-1E56C1CA5B71}" - ProjectSection(ProjectDependencies) = postProject - {5DA607F7-46C6-4A0B-8F02-F879D39EF1C7} = {5DA607F7-46C6-4A0B-8F02-F879D39EF1C7} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {4D4FA577-EFBD-4DFF-BFFC-2DA1A71F36ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4D4FA577-EFBD-4DFF-BFFC-2DA1A71F36ED}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4D4FA577-EFBD-4DFF-BFFC-2DA1A71F36ED}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4D4FA577-EFBD-4DFF-BFFC-2DA1A71F36ED}.Release|Any CPU.Build.0 = Release|Any CPU - {2702CE9B-839F-40DD-8738-5C1B95170F0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2702CE9B-839F-40DD-8738-5C1B95170F0B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2702CE9B-839F-40DD-8738-5C1B95170F0B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2702CE9B-839F-40DD-8738-5C1B95170F0B}.Release|Any CPU.Build.0 = Release|Any CPU - {D12E0534-9C6F-4E39-AC68-4212FF13E7F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D12E0534-9C6F-4E39-AC68-4212FF13E7F1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D12E0534-9C6F-4E39-AC68-4212FF13E7F1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D12E0534-9C6F-4E39-AC68-4212FF13E7F1}.Release|Any CPU.Build.0 = Release|Any CPU - {D917D6B0-53F0-4D21-BCBD-35BFE19FB4FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D917D6B0-53F0-4D21-BCBD-35BFE19FB4FD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D917D6B0-53F0-4D21-BCBD-35BFE19FB4FD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D917D6B0-53F0-4D21-BCBD-35BFE19FB4FD}.Release|Any CPU.Build.0 = Release|Any CPU - {87C365D3-7D4A-4686-A042-5E7B83869CBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {87C365D3-7D4A-4686-A042-5E7B83869CBF}.Debug|Any CPU.Build.0 = Debug|Any CPU - {87C365D3-7D4A-4686-A042-5E7B83869CBF}.Release|Any CPU.ActiveCfg = Release|Any CPU - {87C365D3-7D4A-4686-A042-5E7B83869CBF}.Release|Any CPU.Build.0 = Release|Any CPU - {5DA607F7-46C6-4A0B-8F02-F879D39EF1C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5DA607F7-46C6-4A0B-8F02-F879D39EF1C7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5DA607F7-46C6-4A0B-8F02-F879D39EF1C7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5DA607F7-46C6-4A0B-8F02-F879D39EF1C7}.Release|Any CPU.Build.0 = Release|Any CPU - {847FD31B-84C7-4FE6-B9AA-1E56C1CA5B71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {847FD31B-84C7-4FE6-B9AA-1E56C1CA5B71}.Debug|Any CPU.Build.0 = Debug|Any CPU - {847FD31B-84C7-4FE6-B9AA-1E56C1CA5B71}.Release|Any CPU.ActiveCfg = Release|Any CPU - {847FD31B-84C7-4FE6-B9AA-1E56C1CA5B71}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {2702CE9B-839F-40DD-8738-5C1B95170F0B} = {E437E792-2B83-428F-92B9-03F3BACC20B9} - {4D4FA577-EFBD-4DFF-BFFC-2DA1A71F36ED} = {E437E792-2B83-428F-92B9-03F3BACC20B9} - {D917D6B0-53F0-4D21-BCBD-35BFE19FB4FD} = {906EA88E-2F1C-4945-809F-9F2027735C6C} - {87C365D3-7D4A-4686-A042-5E7B83869CBF} = {906EA88E-2F1C-4945-809F-9F2027735C6C} - {D12E0534-9C6F-4E39-AC68-4212FF13E7F1} = {906EA88E-2F1C-4945-809F-9F2027735C6C} - {5DA607F7-46C6-4A0B-8F02-F879D39EF1C7} = {50027F16-64EF-4039-82CD-1CB8C1D9DB16} - {847FD31B-84C7-4FE6-B9AA-1E56C1CA5B71} = {50027F16-64EF-4039-82CD-1CB8C1D9DB16} - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Queuing.Msmq", "NServiceBus.Unicast.Queuing.Msmq\NServiceBus.Unicast.Queuing.Msmq.csproj", "{4D4FA577-EFBD-4DFF-BFFC-2DA1A71F36ED}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Queuing.Msmq.Config", "NServiceBus.Unicast.Queuing.Msmq.Config\NServiceBus.Unicast.Queuing.Msmq.Config.csproj", "{2702CE9B-839F-40DD-8738-5C1B95170F0B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Queuing.Azure", "NServiceBus.Unicast.Queuing.Azure\NServiceBus.Unicast.Queuing.Azure.csproj", "{D12E0534-9C6F-4E39-AC68-4212FF13E7F1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Queuing.Azure.Tests", "NServiceBus.Unicast.Queuing.Azure.Tests\NServiceBus.Unicast.Queuing.Azure.Tests.csproj", "{D917D6B0-53F0-4D21-BCBD-35BFE19FB4FD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Queuing.Azure.Config", "NServiceBus.Unicast.Queuing.Azure.Config\NServiceBus.Unicast.Queuing.Azure.Config.csproj", "{87C365D3-7D4A-4686-A042-5E7B83869CBF}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Azure", "Azure", "{906EA88E-2F1C-4945-809F-9F2027735C6C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Ftp", "Ftp", "{50027F16-64EF-4039-82CD-1CB8C1D9DB16}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Msmq", "Msmq", "{E437E792-2B83-428F-92B9-03F3BACC20B9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Queuing.Ftp", "NServiceBus.Unicast.Queuing.Ftp\NServiceBus.Unicast.Queuing.Ftp.csproj", "{5DA607F7-46C6-4A0B-8F02-F879D39EF1C7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Queuing.Ftp.Config", "NServiceBus.Unicast.Queuing.Ftp.Config\NServiceBus.Unicast.Queuing.Ftp.Config.csproj", "{847FD31B-84C7-4FE6-B9AA-1E56C1CA5B71}" + ProjectSection(ProjectDependencies) = postProject + {5DA607F7-46C6-4A0B-8F02-F879D39EF1C7} = {5DA607F7-46C6-4A0B-8F02-F879D39EF1C7} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4D4FA577-EFBD-4DFF-BFFC-2DA1A71F36ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4D4FA577-EFBD-4DFF-BFFC-2DA1A71F36ED}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4D4FA577-EFBD-4DFF-BFFC-2DA1A71F36ED}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4D4FA577-EFBD-4DFF-BFFC-2DA1A71F36ED}.Release|Any CPU.Build.0 = Release|Any CPU + {2702CE9B-839F-40DD-8738-5C1B95170F0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2702CE9B-839F-40DD-8738-5C1B95170F0B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2702CE9B-839F-40DD-8738-5C1B95170F0B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2702CE9B-839F-40DD-8738-5C1B95170F0B}.Release|Any CPU.Build.0 = Release|Any CPU + {D12E0534-9C6F-4E39-AC68-4212FF13E7F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D12E0534-9C6F-4E39-AC68-4212FF13E7F1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D12E0534-9C6F-4E39-AC68-4212FF13E7F1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D12E0534-9C6F-4E39-AC68-4212FF13E7F1}.Release|Any CPU.Build.0 = Release|Any CPU + {D917D6B0-53F0-4D21-BCBD-35BFE19FB4FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D917D6B0-53F0-4D21-BCBD-35BFE19FB4FD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D917D6B0-53F0-4D21-BCBD-35BFE19FB4FD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D917D6B0-53F0-4D21-BCBD-35BFE19FB4FD}.Release|Any CPU.Build.0 = Release|Any CPU + {87C365D3-7D4A-4686-A042-5E7B83869CBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {87C365D3-7D4A-4686-A042-5E7B83869CBF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {87C365D3-7D4A-4686-A042-5E7B83869CBF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {87C365D3-7D4A-4686-A042-5E7B83869CBF}.Release|Any CPU.Build.0 = Release|Any CPU + {5DA607F7-46C6-4A0B-8F02-F879D39EF1C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5DA607F7-46C6-4A0B-8F02-F879D39EF1C7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5DA607F7-46C6-4A0B-8F02-F879D39EF1C7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5DA607F7-46C6-4A0B-8F02-F879D39EF1C7}.Release|Any CPU.Build.0 = Release|Any CPU + {847FD31B-84C7-4FE6-B9AA-1E56C1CA5B71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {847FD31B-84C7-4FE6-B9AA-1E56C1CA5B71}.Debug|Any CPU.Build.0 = Debug|Any CPU + {847FD31B-84C7-4FE6-B9AA-1E56C1CA5B71}.Release|Any CPU.ActiveCfg = Release|Any CPU + {847FD31B-84C7-4FE6-B9AA-1E56C1CA5B71}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {2702CE9B-839F-40DD-8738-5C1B95170F0B} = {E437E792-2B83-428F-92B9-03F3BACC20B9} + {4D4FA577-EFBD-4DFF-BFFC-2DA1A71F36ED} = {E437E792-2B83-428F-92B9-03F3BACC20B9} + {D917D6B0-53F0-4D21-BCBD-35BFE19FB4FD} = {906EA88E-2F1C-4945-809F-9F2027735C6C} + {87C365D3-7D4A-4686-A042-5E7B83869CBF} = {906EA88E-2F1C-4945-809F-9F2027735C6C} + {D12E0534-9C6F-4E39-AC68-4212FF13E7F1} = {906EA88E-2F1C-4945-809F-9F2027735C6C} + {5DA607F7-46C6-4A0B-8F02-F879D39EF1C7} = {50027F16-64EF-4039-82CD-1CB8C1D9DB16} + {847FD31B-84C7-4FE6-B9AA-1E56C1CA5B71} = {50027F16-64EF-4039-82CD-1CB8C1D9DB16} + EndGlobalSection +EndGlobal diff --git a/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional.Config/Bootstrapper.cs b/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional.Config/Bootstrapper.cs index 074fb136164..9e14c8e699d 100644 --- a/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional.Config/Bootstrapper.cs +++ b/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional.Config/Bootstrapper.cs @@ -1,32 +1,32 @@ -using System; -using System.Transactions; -using NServiceBus.Config; -using NServiceBus.ObjectBuilder; - -namespace NServiceBus.Unicast.Transport.Transactional.Config -{ - public class Bootstrapper : INeedInitialization - { - public void Init() - { - var transportConfig = Configure.Instance.Configurer.ConfigureComponent( - ComponentCallModelEnum.Singleton); - - transportConfig.ConfigureProperty(t => t.IsTransactional, IsTransactional); - transportConfig.ConfigureProperty(t => t.IsolationLevel, IsolationLevel); - transportConfig.ConfigureProperty(t => t.TransactionTimeout, TransactionTimeout); - - var cfg = Configure.GetConfigSection(); - - if (cfg != null) - { - transportConfig.ConfigureProperty(t => t.NumberOfWorkerThreads, cfg.NumberOfWorkerThreads); - transportConfig.ConfigureProperty(t => t.MaxRetries, cfg.MaxRetries); - } - } - - public static bool IsTransactional { get; set; } - public static IsolationLevel IsolationLevel { get; set; } - public static TimeSpan TransactionTimeout { get; set; } - } -} +using System; +using System.Transactions; +using NServiceBus.Config; +using NServiceBus.ObjectBuilder; + +namespace NServiceBus.Unicast.Transport.Transactional.Config +{ + public class Bootstrapper : INeedInitialization + { + public void Init() + { + var transportConfig = Configure.Instance.Configurer.ConfigureComponent( + ComponentCallModelEnum.Singleton); + + transportConfig.ConfigureProperty(t => t.IsTransactional, IsTransactional); + transportConfig.ConfigureProperty(t => t.IsolationLevel, IsolationLevel); + transportConfig.ConfigureProperty(t => t.TransactionTimeout, TransactionTimeout); + + var cfg = Configure.GetConfigSection(); + + if (cfg != null) + { + transportConfig.ConfigureProperty(t => t.NumberOfWorkerThreads, cfg.NumberOfWorkerThreads); + transportConfig.ConfigureProperty(t => t.MaxRetries, cfg.MaxRetries); + } + } + + public static bool IsTransactional { get; set; } + public static IsolationLevel IsolationLevel { get; set; } + public static TimeSpan TransactionTimeout { get; set; } + } +} diff --git a/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional.Config/NServiceBus.Unicast.Transport.Transactional.Config.csproj b/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional.Config/NServiceBus.Unicast.Transport.Transactional.Config.csproj index 45bc3328304..7feffbc9a6b 100644 --- a/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional.Config/NServiceBus.Unicast.Transport.Transactional.Config.csproj +++ b/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional.Config/NServiceBus.Unicast.Transport.Transactional.Config.csproj @@ -1,79 +1,79 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {A0941A26-E057-4437-B031-4B2EFED18F47} - Library - Properties - NServiceBus.Unicast.Transport.Transactional.Config - NServiceBus.Unicast.Transport.Transactional.Config - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll - False - - - ..\..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll - False - - - ..\..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll - False - - - ..\..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.Msmq.Config.dll - False - - - - - - - - - - CommonAssemblyInfo.cs - - - - - - - - {2A228EF8-9C46-43F8-AF56-18569B443CF9} - NServiceBus.Unicast.Transport.Transactional - False - - - - + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {A0941A26-E057-4437-B031-4B2EFED18F47} + Library + Properties + NServiceBus.Unicast.Transport.Transactional.Config + NServiceBus.Unicast.Transport.Transactional.Config + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll + False + + + ..\..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll + False + + + ..\..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll + False + + + ..\..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.Msmq.Config.dll + False + + + + + + + + + + CommonAssemblyInfo.cs + + + + + + + + {2A228EF8-9C46-43F8-AF56-18569B443CF9} + NServiceBus.Unicast.Transport.Transactional + False + + + + \ No newline at end of file diff --git a/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional.Config/Properties/AssemblyInfo.cs b/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional.Config/Properties/AssemblyInfo.cs index ad6b0e46798..43f62682936 100644 --- a/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional.Config/Properties/AssemblyInfo.cs +++ b/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional.Config/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Transactional Transport Configuration")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Transactional Transport Configuration")] [assembly: AssemblyDescription("Configuration of the Unicast Transport abstraction using the Distributed Transaction Coordinator")] \ No newline at end of file diff --git a/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional.Config/TransactionalConfigManager.cs b/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional.Config/TransactionalConfigManager.cs index 251f6ac0f20..342bbf445a9 100644 --- a/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional.Config/TransactionalConfigManager.cs +++ b/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional.Config/TransactionalConfigManager.cs @@ -1,99 +1,99 @@ -using System; -using System.Configuration; -using System.Transactions; -using System.Transactions.Configuration; -using NServiceBus.Unicast.Transport.Transactional.Config; - -namespace NServiceBus -{ - /// - /// Contains extension methods to NServiceBus.Configure - /// - public static class TransactionalConfigManager - { - /// - /// Sets the transactionality of the endpoint. - /// If true, the endpoint will not lose messages when exceptions occur. - /// If false, the endpoint may lose messages when exceptions occur. - /// - /// - /// - /// - public static Configure IsTransactional(this Configure config, bool value) - { - Bootstrapper.IsTransactional = value; - return config; - } - - /// - /// Sets the transactionality of the endpoint such that - /// the endpoint will not lose messages when exceptions occur. - /// - /// Is equivalent to IsTransactional(true); - /// - /// - /// - public static Configure Transactions(this Configure config) - { - Bootstrapper.IsTransactional = true; - return config; - } - - /// - /// Sets the isolation level that database transactions on this endpoint will run at. - /// This value is only relevant when IsTransactional has been set to true. - /// - /// Higher levels like RepeatableRead and Serializable promise a higher level - /// of consistency, but at the cost of lower parallelism and throughput. - /// - /// If you wish to run sagas on this endpoint, RepeatableRead is the suggested value. - /// - /// - /// - /// - public static Configure IsolationLevel(this Configure config, IsolationLevel isolationLevel) - { - Bootstrapper.IsolationLevel = isolationLevel; - return config; - } - - /// - /// Sets the time span where a transaction will timeout. - /// - /// Most endpoints should leave it at the default. - /// - /// - /// - /// - public static Configure TransactionTimeout(this Configure config, TimeSpan transactionTimeout) - { - var maxTimeout = GetMaxTimeout(); - - if(transactionTimeout > maxTimeout) - throw new ConfigurationErrorsException("Timeout requested is longer than the maximum value for this machine. Please override using the maxTimeout setting of the system.transactions section in machine.config"); - - Bootstrapper.TransactionTimeout = transactionTimeout; - - return config; - } - - static TimeSpan GetMaxTimeout() - { - //default is 10 always 10 minutes - var maxTimeout = TimeSpan.FromMinutes(10); - - var systemTransactionsGroup = ConfigurationManager.OpenMachineConfiguration() - .GetSectionGroup("system.transactions"); - - if (systemTransactionsGroup != null) - { - var machineSettings = systemTransactionsGroup.Sections.Get("machineSettings") as MachineSettingsSection; - - if (machineSettings != null) - maxTimeout = machineSettings.MaxTimeout; - } - - return maxTimeout; - } - } -} +using System; +using System.Configuration; +using System.Transactions; +using System.Transactions.Configuration; +using NServiceBus.Unicast.Transport.Transactional.Config; + +namespace NServiceBus +{ + /// + /// Contains extension methods to NServiceBus.Configure + /// + public static class TransactionalConfigManager + { + /// + /// Sets the transactionality of the endpoint. + /// If true, the endpoint will not lose messages when exceptions occur. + /// If false, the endpoint may lose messages when exceptions occur. + /// + /// + /// + /// + public static Configure IsTransactional(this Configure config, bool value) + { + Bootstrapper.IsTransactional = value; + return config; + } + + /// + /// Sets the transactionality of the endpoint such that + /// the endpoint will not lose messages when exceptions occur. + /// + /// Is equivalent to IsTransactional(true); + /// + /// + /// + public static Configure Transactions(this Configure config) + { + Bootstrapper.IsTransactional = true; + return config; + } + + /// + /// Sets the isolation level that database transactions on this endpoint will run at. + /// This value is only relevant when IsTransactional has been set to true. + /// + /// Higher levels like RepeatableRead and Serializable promise a higher level + /// of consistency, but at the cost of lower parallelism and throughput. + /// + /// If you wish to run sagas on this endpoint, RepeatableRead is the suggested value. + /// + /// + /// + /// + public static Configure IsolationLevel(this Configure config, IsolationLevel isolationLevel) + { + Bootstrapper.IsolationLevel = isolationLevel; + return config; + } + + /// + /// Sets the time span where a transaction will timeout. + /// + /// Most endpoints should leave it at the default. + /// + /// + /// + /// + public static Configure TransactionTimeout(this Configure config, TimeSpan transactionTimeout) + { + var maxTimeout = GetMaxTimeout(); + + if(transactionTimeout > maxTimeout) + throw new ConfigurationErrorsException("Timeout requested is longer than the maximum value for this machine. Please override using the maxTimeout setting of the system.transactions section in machine.config"); + + Bootstrapper.TransactionTimeout = transactionTimeout; + + return config; + } + + static TimeSpan GetMaxTimeout() + { + //default is 10 always 10 minutes + var maxTimeout = TimeSpan.FromMinutes(10); + + var systemTransactionsGroup = ConfigurationManager.OpenMachineConfiguration() + .GetSectionGroup("system.transactions"); + + if (systemTransactionsGroup != null) + { + var machineSettings = systemTransactionsGroup.Sections.Get("machineSettings") as MachineSettingsSection; + + if (machineSettings != null) + maxTimeout = machineSettings.MaxTimeout; + } + + return maxTimeout; + } + } +} diff --git a/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional.Tests/NServiceBus.Unicast.Transport.Transactional.Tests.csproj b/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional.Tests/NServiceBus.Unicast.Transport.Transactional.Tests.csproj index bbf78a2f00d..1e8b92ded33 100644 --- a/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional.Tests/NServiceBus.Unicast.Transport.Transactional.Tests.csproj +++ b/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional.Tests/NServiceBus.Unicast.Transport.Transactional.Tests.csproj @@ -1,77 +1,77 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {F29C8292-E03B-496C-B2E5-9910938B1090} - Library - Properties - NServiceBus.Unicast.Transport.Transactional.Tests - NServiceBus.Unicast.Transport.Transactional.Tests - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\..\..\..\..\build\nservicebus.core\NServiceBus.Faults.dll - - - ..\..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Queuing.dll - - - ..\..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll - - - ..\..\..\..\..\build\nservicebus.core\NServiceBus.Utils.dll - - - ..\..\..\..\..\tools\NUnit\nunit.framework.dll - - - ..\..\..\..\..\lib\Rhino.Mocks\Rhino.Mocks.dll - - - - - - - - CommonAssemblyInfo.cs - - - - - - - {2A228EF8-9C46-43F8-AF56-18569B443CF9} - NServiceBus.Unicast.Transport.Transactional - - - - + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {F29C8292-E03B-496C-B2E5-9910938B1090} + Library + Properties + NServiceBus.Unicast.Transport.Transactional.Tests + NServiceBus.Unicast.Transport.Transactional.Tests + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\..\..\..\build\nservicebus.core\NServiceBus.Faults.dll + + + ..\..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Queuing.dll + + + ..\..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll + + + ..\..\..\..\..\build\nservicebus.core\NServiceBus.Utils.dll + + + ..\..\..\..\..\tools\NUnit\nunit.framework.dll + + + ..\..\..\..\..\lib\Rhino.Mocks\Rhino.Mocks.dll + + + + + + + + CommonAssemblyInfo.cs + + + + + + + {2A228EF8-9C46-43F8-AF56-18569B443CF9} + NServiceBus.Unicast.Transport.Transactional + + + + \ No newline at end of file diff --git a/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional.Tests/Properties/AssemblyInfo.cs b/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional.Tests/Properties/AssemblyInfo.cs index 93f223afbce..bd9fc9f4dee 100644 --- a/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional.Tests/Properties/AssemblyInfo.cs +++ b/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional.Tests/Properties/AssemblyInfo.cs @@ -1,2 +1,2 @@ -using System.Reflection; +using System.Reflection; [assembly: AssemblyTitle("NServiceBus.Unicast.Transport.Transactional.Tests")] \ No newline at end of file diff --git a/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional.Tests/When_a_message_fails_processing.cs b/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional.Tests/When_a_message_fails_processing.cs index 73f60e623b1..6371a3579b0 100644 --- a/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional.Tests/When_a_message_fails_processing.cs +++ b/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional.Tests/When_a_message_fails_processing.cs @@ -1,53 +1,53 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading; -using NServiceBus.Faults; -using NServiceBus.Unicast.Queuing; -using NUnit.Framework; -using Rhino.Mocks; - -namespace NServiceBus.Unicast.Transport.Transactional.Tests -{ - [TestFixture] - public class When_a_message_processing_fails - { - [Test] - public void The_original_exception_should_be_passed_to_the_fault_manager() - { - //var failureManager = MockRepository.GenerateStub(); - //var messageSender = MockRepository.GenerateStub(); - - //messageSender.Stub(x => x.HasMessage()).Return(true).Repeat.Twice(); - - //messageSender.Stub(x => x.Receive(true)).Return(new TransportMessage - // { - // Id = "123" - // }).Repeat.Twice(); - - //var transport = new TransactionalTransport - // { - // MessageReceiver = messageSender, - // FailureManager = failureManager, - // IsTransactional = true, - // NumberOfWorkerThreads = 1, - // MaxRetries = 1 - // }; - - //transport.TransportMessageReceived += TransportMessageReceived; - - //((ITransport)transport).Start(""); - - //Thread.Sleep(500); - - //failureManager.AssertWasCalled(x => x.ProcessingAlwaysFailsForMessage(Arg.Is.Anything, Arg.Is.TypeOf)); - } - - static void TransportMessageReceived(object sender, TransportMessageReceivedEventArgs e) - { - throw new TransportMessageHandlingFailedException(new ApplicationException( "A user exception")); - } - - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using NServiceBus.Faults; +using NServiceBus.Unicast.Queuing; +using NUnit.Framework; +using Rhino.Mocks; + +namespace NServiceBus.Unicast.Transport.Transactional.Tests +{ + [TestFixture] + public class When_a_message_processing_fails + { + [Test] + public void The_original_exception_should_be_passed_to_the_fault_manager() + { + //var failureManager = MockRepository.GenerateStub(); + //var messageSender = MockRepository.GenerateStub(); + + //messageSender.Stub(x => x.HasMessage()).Return(true).Repeat.Twice(); + + //messageSender.Stub(x => x.Receive(true)).Return(new TransportMessage + // { + // Id = "123" + // }).Repeat.Twice(); + + //var transport = new TransactionalTransport + // { + // MessageReceiver = messageSender, + // FailureManager = failureManager, + // IsTransactional = true, + // NumberOfWorkerThreads = 1, + // MaxRetries = 1 + // }; + + //transport.TransportMessageReceived += TransportMessageReceived; + + //((ITransport)transport).Start(""); + + //Thread.Sleep(500); + + //failureManager.AssertWasCalled(x => x.ProcessingAlwaysFailsForMessage(Arg.Is.Anything, Arg.Is.TypeOf)); + } + + static void TransportMessageReceived(object sender, TransportMessageReceivedEventArgs e) + { + throw new TransportMessageHandlingFailedException(new ApplicationException( "A user exception")); + } + + } +} diff --git a/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional/AbortHandlingCurrentMessageException.cs b/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional/AbortHandlingCurrentMessageException.cs index 66ad44f6bb7..02f5ec7443b 100644 --- a/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional/AbortHandlingCurrentMessageException.cs +++ b/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional/AbortHandlingCurrentMessageException.cs @@ -1,14 +1,14 @@ -using System; - -namespace NServiceBus.Unicast.Transport -{ - /// - /// An exception thrown when applicative code requests abort the - /// handling of the current message. - /// The reason this is modeled as an exception is to cause - /// existing transaction scopes to rollback. - /// - public class AbortHandlingCurrentMessageException : Exception - { - } -} +using System; + +namespace NServiceBus.Unicast.Transport +{ + /// + /// An exception thrown when applicative code requests abort the + /// handling of the current message. + /// The reason this is modeled as an exception is to cause + /// existing transaction scopes to rollback. + /// + public class AbortHandlingCurrentMessageException : Exception + { + } +} diff --git a/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional/NServiceBus.Unicast.Transport.Transactional.csproj b/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional/NServiceBus.Unicast.Transport.Transactional.csproj index 601eb264135..619d582ae33 100644 --- a/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional/NServiceBus.Unicast.Transport.Transactional.csproj +++ b/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional/NServiceBus.Unicast.Transport.Transactional.csproj @@ -1,78 +1,78 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {2A228EF8-9C46-43F8-AF56-18569B443CF9} - Library - Properties - NServiceBus.Unicast.Transport.Transactional - NServiceBus.Unicast.Transport.Transactional - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\..\..\..\..\lib\Common.Logging.dll - - - ..\..\..\..\..\binaries\NServiceBus.dll - False - - - ..\..\..\..\..\build\nservicebus.core\NServiceBus.Faults.dll - False - - - ..\..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Queuing.dll - False - - - ..\..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll - False - - - ..\..\..\..\..\build\nservicebus.core\NServiceBus.Utils.dll - False - - - - - - - - - CommonAssemblyInfo.cs - - - - - - - + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {2A228EF8-9C46-43F8-AF56-18569B443CF9} + Library + Properties + NServiceBus.Unicast.Transport.Transactional + NServiceBus.Unicast.Transport.Transactional + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\..\..\..\lib\Common.Logging.dll + + + ..\..\..\..\..\binaries\NServiceBus.dll + False + + + ..\..\..\..\..\build\nservicebus.core\NServiceBus.Faults.dll + False + + + ..\..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Queuing.dll + False + + + ..\..\..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll + False + + + ..\..\..\..\..\build\nservicebus.core\NServiceBus.Utils.dll + False + + + + + + + + + CommonAssemblyInfo.cs + + + + + + + \ No newline at end of file diff --git a/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional/Properties/AssemblyInfo.cs b/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional/Properties/AssemblyInfo.cs index 07ce3265efc..43171abc525 100644 --- a/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional/Properties/AssemblyInfo.cs +++ b/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Transactional Transport Implementation")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Transactional Transport Implementation")] [assembly: AssemblyDescription("Implementation of the Unicast Transport abstraction using the Distributed Transaction Coordinator")] \ No newline at end of file diff --git a/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional/TransactionalTransport.cs b/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional/TransactionalTransport.cs index ffa7f5d436e..b97d614d8db 100644 --- a/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional/TransactionalTransport.cs +++ b/src/impl/unicast/transport/NServiceBus.Unicast.Transport.Transactional/TransactionalTransport.cs @@ -1,472 +1,472 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Threading; -using System.Transactions; -using Common.Logging; -using NServiceBus.Faults; -using NServiceBus.Unicast.Queuing; -using NServiceBus.Utils; - -namespace NServiceBus.Unicast.Transport.Transactional -{ - public class TransactionalTransport : ITransport - { - #region config info - - /// - /// Sets whether or not the transport is transactional. - /// - public bool IsTransactional { get; set; } - - private int maxRetries = 5; - - /// - /// Sets the maximum number of times a message will be retried - /// when an exception is thrown as a result of handling the message. - /// This value is only relevant when is true. - /// - /// - /// Default value is 5. - /// - public int MaxRetries - { - get { return maxRetries; } - set { maxRetries = value; } - } - - /// - /// Property for getting/setting the period of time when the transaction times out. - /// Only relevant when is set to true. - /// - public TimeSpan TransactionTimeout { get; set; } - - /// - /// Property for getting/setting the isolation level of the transaction scope. - /// Only relevant when is set to true. - /// - public IsolationLevel IsolationLevel { get; set; } - - /// - /// Sets the object which will be used for receiving messages. - /// - public IReceiveMessages MessageReceiver { get; set; } - - /// - /// Manages failed message processing. - /// - public IManageMessageFailures FailureManager { get; set; } - - #endregion - - #region ITransport Members - - /// - /// Event which indicates that message processing has started. - /// - public event EventHandler StartedMessageProcessing; - - /// - /// Event which indicates that message processing has completed. - /// - public event EventHandler FinishedMessageProcessing; - - /// - /// Event which indicates that message processing failed for some reason. - /// - public event EventHandler FailedMessageProcessing; - - /// - /// Gets/sets the number of concurrent threads that should be - /// created for processing the queue. - /// - /// Get returns the actual number of running worker threads, which may - /// be different than the originally configured value. - /// - /// When used as a setter, this value will be used by the - /// method only and will have no effect if called afterwards. - /// - /// To change the number of worker threads at runtime, call . - /// - public virtual int NumberOfWorkerThreads - { - get - { - lock (workerThreads) - return workerThreads.Count; - } - set - { - numberOfWorkerThreads = value; - } - } - private int numberOfWorkerThreads; - - - /// - /// Event raised when a message has been received in the input queue. - /// - public event EventHandler TransportMessageReceived; - - /// - /// Changes the number of worker threads to the given target, - /// stopping or starting worker threads as needed. - /// - /// - public void ChangeNumberOfWorkerThreads(int targetNumberOfWorkerThreads) - { - lock (workerThreads) - { - var current = workerThreads.Count; - - if (targetNumberOfWorkerThreads == current) - return; - - if (targetNumberOfWorkerThreads < current) - { - for (var i = targetNumberOfWorkerThreads; i < current; i++) - workerThreads[i].Stop(); - - return; - } - - if (targetNumberOfWorkerThreads > current) - { - for (var i = current; i < targetNumberOfWorkerThreads; i++) - AddWorkerThread().Start(); - - return; - } - } - } - - void ITransport.Start(string inputqueue) - { - MessageReceiver.Init(inputqueue,IsTransactional); - - LimitWorkerThreadsToOne(); - - for (int i = 0; i < numberOfWorkerThreads; i++) - AddWorkerThread().Start(); - } - - [Conditional("COMMUNITY")] - private void LimitWorkerThreadsToOne() - { - numberOfWorkerThreads = 1; - - Logger.Info("You are running a community edition of the software which only supports one thread."); - } - - #endregion - - #region helper methods - - private WorkerThread AddWorkerThread() - { - lock (workerThreads) - { - var result = new WorkerThread(Process); - - workerThreads.Add(result); - - result.Stopped += delegate(object sender, EventArgs e) - { - var wt = sender as WorkerThread; - lock (workerThreads) - workerThreads.Remove(wt); - }; - - return result; - } - } - - /// - /// Waits for a message to become available on the input queue - /// and then receives it. - /// - /// - /// If the queue is transactional the receive operation will be wrapped in a - /// transaction. - /// - private void Process() - { - if (!HasMessage()) - return; - - _needToAbort = false; - _messageId = string.Empty; - - try - { - if (IsTransactional) - new TransactionWrapper().RunInTransaction(ProcessMessage, IsolationLevel, TransactionTimeout); - else - ProcessMessage(); - - ClearFailuresForMessage(_messageId); - } - catch (AbortHandlingCurrentMessageException) - { - //in case AbortHandlingCurrentMessage was called - return; //don't increment failures, we want this message kept around. - } - catch(Exception e) - { - if (IsTransactional) - { - var originalException = e; - - if (e is TransportMessageHandlingFailedException) - originalException = ((TransportMessageHandlingFailedException) e).OriginalException; - - IncrementFailuresForMessage(_messageId, originalException); - } - - OnFailedMessageProcessing(); - } - } - - /// - /// Receives a message from the input queue. - /// - /// - /// If a message is received the event will be raised. - /// - public void ProcessMessage() - { - var m = Receive(); - if (m == null) - return; - - _messageId = m.Id; - - if (IsTransactional) - { - if (HandledMaxRetries(m)) - { - Logger.Error(string.Format("Message has failed the maximum number of times allowed, ID={0}.", m.Id)); - return; - } - } - - //exceptions here will cause a rollback - which is what we want. - if (StartedMessageProcessing != null) - StartedMessageProcessing(this, null); - - //care about failures here - var exceptionFromMessageHandling = OnTransportMessageReceived(m); - - //and here - var exceptionFromMessageModules = OnFinishedMessageProcessing(); - - //but need to abort takes precedence - failures aren't counted here, - //so messages aren't moved to the error queue. - if (_needToAbort) - throw new AbortHandlingCurrentMessageException(); - - if (exceptionFromMessageHandling != null) //cause rollback - throw exceptionFromMessageHandling; - - if (exceptionFromMessageModules != null) //cause rollback - throw exceptionFromMessageModules; - } - - private bool HandledMaxRetries(TransportMessage message) - { - string messageId = message.Id; - - failuresPerMessageLocker.EnterReadLock(); - - if (failuresPerMessage.ContainsKey(messageId) && - (failuresPerMessage[messageId] >= maxRetries)) - { - failuresPerMessageLocker.ExitReadLock(); - failuresPerMessageLocker.EnterWriteLock(); - - var ex = exceptionsForMessages[messageId]; - FailureManager.ProcessingAlwaysFailsForMessage(message, ex); - - failuresPerMessage.Remove(messageId); - exceptionsForMessages.Remove(messageId); - - failuresPerMessageLocker.ExitWriteLock(); - - return true; - } - - failuresPerMessageLocker.ExitReadLock(); - return false; - } - - private void ClearFailuresForMessage(string messageId) - { - failuresPerMessageLocker.EnterReadLock(); - if (failuresPerMessage.ContainsKey(messageId)) - { - failuresPerMessageLocker.ExitReadLock(); - failuresPerMessageLocker.EnterWriteLock(); - - failuresPerMessage.Remove(messageId); - exceptionsForMessages.Remove(messageId); - - failuresPerMessageLocker.ExitWriteLock(); - } - else - failuresPerMessageLocker.ExitReadLock(); - } - - private void IncrementFailuresForMessage(string messageId, Exception e) - { - failuresPerMessageLocker.EnterWriteLock(); - try - { - if (!failuresPerMessage.ContainsKey(messageId)) - failuresPerMessage[messageId] = 1; - else - failuresPerMessage[messageId] = failuresPerMessage[messageId] + 1; - - exceptionsForMessages[messageId] = e; - } - finally - { - failuresPerMessageLocker.ExitWriteLock(); - } - } - - [DebuggerNonUserCode] // so that exceptions don't interfere with debugging. - private bool HasMessage() - { - try - { - return MessageReceiver.HasMessage(); - } - catch (ObjectDisposedException) - { - Logger.Fatal("Message receiver has been disposed. Cannot continue operation. Please restart this process."); - return false; - } - catch (Exception e) - { - Logger.Error("Error in peeking a message from receiver.", e); - return false; - } - } - - [DebuggerNonUserCode] // so that exceptions don't interfere with debugging. - private TransportMessage Receive() - { - try - { - return MessageReceiver.Receive(); - } - catch (ObjectDisposedException) - { - Logger.Fatal("Message receiver has been disposed. Cannot continue operation. Please restart this process."); - return null; - } - catch(Exception e) - { - Logger.Error("Error in receiving messages.", e); - return null; - } - } - - /// - /// Causes the processing of the current message to be aborted. - /// - public void AbortHandlingCurrentMessage() - { - _needToAbort = true; - } - - private Exception OnFinishedMessageProcessing() - { - try - { - if (FinishedMessageProcessing != null) - FinishedMessageProcessing(this, null); - } - catch (Exception e) - { - Logger.Error("Failed raising 'finished message processing' event.", e); - return e; - } - - return null; - } - - private Exception OnTransportMessageReceived(TransportMessage msg) - { - try - { - if (TransportMessageReceived != null) - TransportMessageReceived(this, new TransportMessageReceivedEventArgs(msg)); - } - catch (Exception e) - { - Logger.Warn("Failed raising 'transport message received' event for message with ID=" + msg.Id, e); - - return e; - } - - return null; - } - - private bool OnFailedMessageProcessing() - { - try - { - if (FailedMessageProcessing != null) - FailedMessageProcessing(this, null); - } - catch (Exception e) - { - Logger.Warn("Failed raising 'failed message processing' event.", e); - return false; - } - - return true; - } - - #endregion - - #region members - - private readonly IList workerThreads = new List(); - - private readonly ReaderWriterLockSlim failuresPerMessageLocker = new ReaderWriterLockSlim(); - /// - /// Accessed by multiple threads - lock using failuresPerMessageLocker. - /// - private readonly IDictionary failuresPerMessage = new Dictionary(); - - /// - /// Accessed by multiple threads, manage together with failuresPerMessage. - /// - private readonly IDictionary exceptionsForMessages = new Dictionary(); - - [ThreadStatic] - private static volatile bool _needToAbort; - - [ThreadStatic] private static volatile string _messageId; - - private static readonly ILog Logger = LogManager.GetLogger(typeof (TransactionalTransport)); - - #endregion - - #region IDisposable Members - - /// - /// Stops all worker threads. - /// - public void Dispose() - { - lock (workerThreads) - for (var i = 0; i < workerThreads.Count; i++) - workerThreads[i].Stop(); - } - - #endregion - } -} +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Threading; +using System.Transactions; +using Common.Logging; +using NServiceBus.Faults; +using NServiceBus.Unicast.Queuing; +using NServiceBus.Utils; + +namespace NServiceBus.Unicast.Transport.Transactional +{ + public class TransactionalTransport : ITransport + { + #region config info + + /// + /// Sets whether or not the transport is transactional. + /// + public bool IsTransactional { get; set; } + + private int maxRetries = 5; + + /// + /// Sets the maximum number of times a message will be retried + /// when an exception is thrown as a result of handling the message. + /// This value is only relevant when is true. + /// + /// + /// Default value is 5. + /// + public int MaxRetries + { + get { return maxRetries; } + set { maxRetries = value; } + } + + /// + /// Property for getting/setting the period of time when the transaction times out. + /// Only relevant when is set to true. + /// + public TimeSpan TransactionTimeout { get; set; } + + /// + /// Property for getting/setting the isolation level of the transaction scope. + /// Only relevant when is set to true. + /// + public IsolationLevel IsolationLevel { get; set; } + + /// + /// Sets the object which will be used for receiving messages. + /// + public IReceiveMessages MessageReceiver { get; set; } + + /// + /// Manages failed message processing. + /// + public IManageMessageFailures FailureManager { get; set; } + + #endregion + + #region ITransport Members + + /// + /// Event which indicates that message processing has started. + /// + public event EventHandler StartedMessageProcessing; + + /// + /// Event which indicates that message processing has completed. + /// + public event EventHandler FinishedMessageProcessing; + + /// + /// Event which indicates that message processing failed for some reason. + /// + public event EventHandler FailedMessageProcessing; + + /// + /// Gets/sets the number of concurrent threads that should be + /// created for processing the queue. + /// + /// Get returns the actual number of running worker threads, which may + /// be different than the originally configured value. + /// + /// When used as a setter, this value will be used by the + /// method only and will have no effect if called afterwards. + /// + /// To change the number of worker threads at runtime, call . + /// + public virtual int NumberOfWorkerThreads + { + get + { + lock (workerThreads) + return workerThreads.Count; + } + set + { + numberOfWorkerThreads = value; + } + } + private int numberOfWorkerThreads; + + + /// + /// Event raised when a message has been received in the input queue. + /// + public event EventHandler TransportMessageReceived; + + /// + /// Changes the number of worker threads to the given target, + /// stopping or starting worker threads as needed. + /// + /// + public void ChangeNumberOfWorkerThreads(int targetNumberOfWorkerThreads) + { + lock (workerThreads) + { + var current = workerThreads.Count; + + if (targetNumberOfWorkerThreads == current) + return; + + if (targetNumberOfWorkerThreads < current) + { + for (var i = targetNumberOfWorkerThreads; i < current; i++) + workerThreads[i].Stop(); + + return; + } + + if (targetNumberOfWorkerThreads > current) + { + for (var i = current; i < targetNumberOfWorkerThreads; i++) + AddWorkerThread().Start(); + + return; + } + } + } + + void ITransport.Start(string inputqueue) + { + MessageReceiver.Init(inputqueue,IsTransactional); + + LimitWorkerThreadsToOne(); + + for (int i = 0; i < numberOfWorkerThreads; i++) + AddWorkerThread().Start(); + } + + [Conditional("COMMUNITY")] + private void LimitWorkerThreadsToOne() + { + numberOfWorkerThreads = 1; + + Logger.Info("You are running a community edition of the software which only supports one thread."); + } + + #endregion + + #region helper methods + + private WorkerThread AddWorkerThread() + { + lock (workerThreads) + { + var result = new WorkerThread(Process); + + workerThreads.Add(result); + + result.Stopped += delegate(object sender, EventArgs e) + { + var wt = sender as WorkerThread; + lock (workerThreads) + workerThreads.Remove(wt); + }; + + return result; + } + } + + /// + /// Waits for a message to become available on the input queue + /// and then receives it. + /// + /// + /// If the queue is transactional the receive operation will be wrapped in a + /// transaction. + /// + private void Process() + { + if (!HasMessage()) + return; + + _needToAbort = false; + _messageId = string.Empty; + + try + { + if (IsTransactional) + new TransactionWrapper().RunInTransaction(ProcessMessage, IsolationLevel, TransactionTimeout); + else + ProcessMessage(); + + ClearFailuresForMessage(_messageId); + } + catch (AbortHandlingCurrentMessageException) + { + //in case AbortHandlingCurrentMessage was called + return; //don't increment failures, we want this message kept around. + } + catch(Exception e) + { + if (IsTransactional) + { + var originalException = e; + + if (e is TransportMessageHandlingFailedException) + originalException = ((TransportMessageHandlingFailedException) e).OriginalException; + + IncrementFailuresForMessage(_messageId, originalException); + } + + OnFailedMessageProcessing(); + } + } + + /// + /// Receives a message from the input queue. + /// + /// + /// If a message is received the event will be raised. + /// + public void ProcessMessage() + { + var m = Receive(); + if (m == null) + return; + + _messageId = m.Id; + + if (IsTransactional) + { + if (HandledMaxRetries(m)) + { + Logger.Error(string.Format("Message has failed the maximum number of times allowed, ID={0}.", m.Id)); + return; + } + } + + //exceptions here will cause a rollback - which is what we want. + if (StartedMessageProcessing != null) + StartedMessageProcessing(this, null); + + //care about failures here + var exceptionFromMessageHandling = OnTransportMessageReceived(m); + + //and here + var exceptionFromMessageModules = OnFinishedMessageProcessing(); + + //but need to abort takes precedence - failures aren't counted here, + //so messages aren't moved to the error queue. + if (_needToAbort) + throw new AbortHandlingCurrentMessageException(); + + if (exceptionFromMessageHandling != null) //cause rollback + throw exceptionFromMessageHandling; + + if (exceptionFromMessageModules != null) //cause rollback + throw exceptionFromMessageModules; + } + + private bool HandledMaxRetries(TransportMessage message) + { + string messageId = message.Id; + + failuresPerMessageLocker.EnterReadLock(); + + if (failuresPerMessage.ContainsKey(messageId) && + (failuresPerMessage[messageId] >= maxRetries)) + { + failuresPerMessageLocker.ExitReadLock(); + failuresPerMessageLocker.EnterWriteLock(); + + var ex = exceptionsForMessages[messageId]; + FailureManager.ProcessingAlwaysFailsForMessage(message, ex); + + failuresPerMessage.Remove(messageId); + exceptionsForMessages.Remove(messageId); + + failuresPerMessageLocker.ExitWriteLock(); + + return true; + } + + failuresPerMessageLocker.ExitReadLock(); + return false; + } + + private void ClearFailuresForMessage(string messageId) + { + failuresPerMessageLocker.EnterReadLock(); + if (failuresPerMessage.ContainsKey(messageId)) + { + failuresPerMessageLocker.ExitReadLock(); + failuresPerMessageLocker.EnterWriteLock(); + + failuresPerMessage.Remove(messageId); + exceptionsForMessages.Remove(messageId); + + failuresPerMessageLocker.ExitWriteLock(); + } + else + failuresPerMessageLocker.ExitReadLock(); + } + + private void IncrementFailuresForMessage(string messageId, Exception e) + { + failuresPerMessageLocker.EnterWriteLock(); + try + { + if (!failuresPerMessage.ContainsKey(messageId)) + failuresPerMessage[messageId] = 1; + else + failuresPerMessage[messageId] = failuresPerMessage[messageId] + 1; + + exceptionsForMessages[messageId] = e; + } + finally + { + failuresPerMessageLocker.ExitWriteLock(); + } + } + + [DebuggerNonUserCode] // so that exceptions don't interfere with debugging. + private bool HasMessage() + { + try + { + return MessageReceiver.HasMessage(); + } + catch (ObjectDisposedException) + { + Logger.Fatal("Message receiver has been disposed. Cannot continue operation. Please restart this process."); + return false; + } + catch (Exception e) + { + Logger.Error("Error in peeking a message from receiver.", e); + return false; + } + } + + [DebuggerNonUserCode] // so that exceptions don't interfere with debugging. + private TransportMessage Receive() + { + try + { + return MessageReceiver.Receive(); + } + catch (ObjectDisposedException) + { + Logger.Fatal("Message receiver has been disposed. Cannot continue operation. Please restart this process."); + return null; + } + catch(Exception e) + { + Logger.Error("Error in receiving messages.", e); + return null; + } + } + + /// + /// Causes the processing of the current message to be aborted. + /// + public void AbortHandlingCurrentMessage() + { + _needToAbort = true; + } + + private Exception OnFinishedMessageProcessing() + { + try + { + if (FinishedMessageProcessing != null) + FinishedMessageProcessing(this, null); + } + catch (Exception e) + { + Logger.Error("Failed raising 'finished message processing' event.", e); + return e; + } + + return null; + } + + private Exception OnTransportMessageReceived(TransportMessage msg) + { + try + { + if (TransportMessageReceived != null) + TransportMessageReceived(this, new TransportMessageReceivedEventArgs(msg)); + } + catch (Exception e) + { + Logger.Warn("Failed raising 'transport message received' event for message with ID=" + msg.Id, e); + + return e; + } + + return null; + } + + private bool OnFailedMessageProcessing() + { + try + { + if (FailedMessageProcessing != null) + FailedMessageProcessing(this, null); + } + catch (Exception e) + { + Logger.Warn("Failed raising 'failed message processing' event.", e); + return false; + } + + return true; + } + + #endregion + + #region members + + private readonly IList workerThreads = new List(); + + private readonly ReaderWriterLockSlim failuresPerMessageLocker = new ReaderWriterLockSlim(); + /// + /// Accessed by multiple threads - lock using failuresPerMessageLocker. + /// + private readonly IDictionary failuresPerMessage = new Dictionary(); + + /// + /// Accessed by multiple threads, manage together with failuresPerMessage. + /// + private readonly IDictionary exceptionsForMessages = new Dictionary(); + + [ThreadStatic] + private static volatile bool _needToAbort; + + [ThreadStatic] private static volatile string _messageId; + + private static readonly ILog Logger = LogManager.GetLogger(typeof (TransactionalTransport)); + + #endregion + + #region IDisposable Members + + /// + /// Stops all worker threads. + /// + public void Dispose() + { + lock (workerThreads) + for (var i = 0; i < workerThreads.Count; i++) + workerThreads[i].Stop(); + } + + #endregion + } +} diff --git a/src/impl/unicast/transport/transport.sln b/src/impl/unicast/transport/transport.sln index 6f451465760..bdf6eb5bc9e 100644 --- a/src/impl/unicast/transport/transport.sln +++ b/src/impl/unicast/transport/transport.sln @@ -1,32 +1,32 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Transport.Transactional", "NServiceBus.Unicast.Transport.Transactional\NServiceBus.Unicast.Transport.Transactional.csproj", "{2A228EF8-9C46-43F8-AF56-18569B443CF9}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Transport.Transactional.Config", "NServiceBus.Unicast.Transport.Transactional.Config\NServiceBus.Unicast.Transport.Transactional.Config.csproj", "{A0941A26-E057-4437-B031-4B2EFED18F47}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Transport.Transactional.Tests", "NServiceBus.Unicast.Transport.Transactional.Tests\NServiceBus.Unicast.Transport.Transactional.Tests.csproj", "{F29C8292-E03B-496C-B2E5-9910938B1090}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2A228EF8-9C46-43F8-AF56-18569B443CF9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2A228EF8-9C46-43F8-AF56-18569B443CF9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2A228EF8-9C46-43F8-AF56-18569B443CF9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2A228EF8-9C46-43F8-AF56-18569B443CF9}.Release|Any CPU.Build.0 = Release|Any CPU - {A0941A26-E057-4437-B031-4B2EFED18F47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A0941A26-E057-4437-B031-4B2EFED18F47}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A0941A26-E057-4437-B031-4B2EFED18F47}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A0941A26-E057-4437-B031-4B2EFED18F47}.Release|Any CPU.Build.0 = Release|Any CPU - {F29C8292-E03B-496C-B2E5-9910938B1090}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F29C8292-E03B-496C-B2E5-9910938B1090}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F29C8292-E03B-496C-B2E5-9910938B1090}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F29C8292-E03B-496C-B2E5-9910938B1090}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Transport.Transactional", "NServiceBus.Unicast.Transport.Transactional\NServiceBus.Unicast.Transport.Transactional.csproj", "{2A228EF8-9C46-43F8-AF56-18569B443CF9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Transport.Transactional.Config", "NServiceBus.Unicast.Transport.Transactional.Config\NServiceBus.Unicast.Transport.Transactional.Config.csproj", "{A0941A26-E057-4437-B031-4B2EFED18F47}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Transport.Transactional.Tests", "NServiceBus.Unicast.Transport.Transactional.Tests\NServiceBus.Unicast.Transport.Transactional.Tests.csproj", "{F29C8292-E03B-496C-B2E5-9910938B1090}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2A228EF8-9C46-43F8-AF56-18569B443CF9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2A228EF8-9C46-43F8-AF56-18569B443CF9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2A228EF8-9C46-43F8-AF56-18569B443CF9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2A228EF8-9C46-43F8-AF56-18569B443CF9}.Release|Any CPU.Build.0 = Release|Any CPU + {A0941A26-E057-4437-B031-4B2EFED18F47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A0941A26-E057-4437-B031-4B2EFED18F47}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A0941A26-E057-4437-B031-4B2EFED18F47}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A0941A26-E057-4437-B031-4B2EFED18F47}.Release|Any CPU.Build.0 = Release|Any CPU + {F29C8292-E03B-496C-B2E5-9910938B1090}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F29C8292-E03B-496C-B2E5-9910938B1090}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F29C8292-E03B-496C-B2E5-9910938B1090}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F29C8292-E03B-496C-B2E5-9910938B1090}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/impl/unitofwork/NServiceBus.UnitOfWork.NHibernate.Config/ConfigureNHibernateUnitOfWork.cs b/src/impl/unitofwork/NServiceBus.UnitOfWork.NHibernate.Config/ConfigureNHibernateUnitOfWork.cs index 7bf7be9470d..2d029800106 100644 --- a/src/impl/unitofwork/NServiceBus.UnitOfWork.NHibernate.Config/ConfigureNHibernateUnitOfWork.cs +++ b/src/impl/unitofwork/NServiceBus.UnitOfWork.NHibernate.Config/ConfigureNHibernateUnitOfWork.cs @@ -1,22 +1,22 @@ -using NServiceBus.UnitOfWork.NHibernate; -using NServiceBus.ObjectBuilder; - -namespace NServiceBus -{ - /// - /// Contains extension methods to NServiceBus.Configure for the NHibernate unit of work manager. - /// - public static class ConfigureNHibernateUnitOfWork - { - /// - /// Use the NHibernate backed unit of work implementation. - /// - /// - /// - public static Configure NHibernateUnitOfWork(this Configure config) - { - config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); - return config; - } - } -} +using NServiceBus.UnitOfWork.NHibernate; +using NServiceBus.ObjectBuilder; + +namespace NServiceBus +{ + /// + /// Contains extension methods to NServiceBus.Configure for the NHibernate unit of work manager. + /// + public static class ConfigureNHibernateUnitOfWork + { + /// + /// Use the NHibernate backed unit of work implementation. + /// + /// + /// + public static Configure NHibernateUnitOfWork(this Configure config) + { + config.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); + return config; + } + } +} diff --git a/src/impl/unitofwork/NServiceBus.UnitOfWork.NHibernate.Config/NServiceBus.UnitOfWork.NHibernate.Config.csproj b/src/impl/unitofwork/NServiceBus.UnitOfWork.NHibernate.Config/NServiceBus.UnitOfWork.NHibernate.Config.csproj index 2a3bfee6fa0..28b315ef854 100644 --- a/src/impl/unitofwork/NServiceBus.UnitOfWork.NHibernate.Config/NServiceBus.UnitOfWork.NHibernate.Config.csproj +++ b/src/impl/unitofwork/NServiceBus.UnitOfWork.NHibernate.Config/NServiceBus.UnitOfWork.NHibernate.Config.csproj @@ -1,86 +1,86 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {EC6FD140-4970-4414-A972-AE3D3576328E} - Library - Properties - NServiceBus.UnitOfWork.NHibernate.Config - NServiceBus.UnitOfWork.NHibernate.Config - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.UnitOfWork.NHibernate.Config.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll - False - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll - False - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.UnitOfWork.dll - False - - - - - 3.5 - - - 3.5 - - - 3.5 - - - - - - - CommonAssemblyInfo.cs - - - - - - - {6A731C25-84D8-42AC-BDC4-618432B87257} - NServiceBus.UnitOfWork.NHibernate - False - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {EC6FD140-4970-4414-A972-AE3D3576328E} + Library + Properties + NServiceBus.UnitOfWork.NHibernate.Config + NServiceBus.UnitOfWork.NHibernate.Config + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.UnitOfWork.NHibernate.Config.XML + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.Config.dll + False + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll + False + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.UnitOfWork.dll + False + + + + + 3.5 + + + 3.5 + + + 3.5 + + + + + + + CommonAssemblyInfo.cs + + + + + + + {6A731C25-84D8-42AC-BDC4-618432B87257} + NServiceBus.UnitOfWork.NHibernate + False + + + + \ No newline at end of file diff --git a/src/impl/unitofwork/NServiceBus.UnitOfWork.NHibernate.Config/Properties/AssemblyInfo.cs b/src/impl/unitofwork/NServiceBus.UnitOfWork.NHibernate.Config/Properties/AssemblyInfo.cs index 50ddc1b9ed8..453ca77205a 100644 --- a/src/impl/unitofwork/NServiceBus.UnitOfWork.NHibernate.Config/Properties/AssemblyInfo.cs +++ b/src/impl/unitofwork/NServiceBus.UnitOfWork.NHibernate.Config/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Unit of Work NHibernate configuration")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Unit of Work NHibernate configuration")] [assembly: AssemblyDescription("Configuration of unit of work management in NServiceBus on top of NHibernate")] \ No newline at end of file diff --git a/src/impl/unitofwork/NServiceBus.UnitOfWork.NHibernate/NServiceBus.UnitOfWork.NHibernate.csproj b/src/impl/unitofwork/NServiceBus.UnitOfWork.NHibernate/NServiceBus.UnitOfWork.NHibernate.csproj index 6a147f4c946..6f509f1b80b 100644 --- a/src/impl/unitofwork/NServiceBus.UnitOfWork.NHibernate/NServiceBus.UnitOfWork.NHibernate.csproj +++ b/src/impl/unitofwork/NServiceBus.UnitOfWork.NHibernate/NServiceBus.UnitOfWork.NHibernate.csproj @@ -1,74 +1,74 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {6A731C25-84D8-42AC-BDC4-618432B87257} - Library - Properties - NServiceBus.UnitOfWork.NHibernate - NServiceBus.UnitOfWork.NHibernate - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.UnitOfWork.NHibernate.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\..\lib\NHibernate.dll - False - - - False - ..\..\..\..\build\nservicebus.core\NServiceBus.UnitOfWork.dll - False - - - - 3.5 - - - - 3.5 - - - 3.5 - - - - - - - CommonAssemblyInfo.cs - - - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {6A731C25-84D8-42AC-BDC4-618432B87257} + Library + Properties + NServiceBus.UnitOfWork.NHibernate + NServiceBus.UnitOfWork.NHibernate + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.UnitOfWork.NHibernate.XML + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\..\lib\NHibernate.dll + False + + + False + ..\..\..\..\build\nservicebus.core\NServiceBus.UnitOfWork.dll + False + + + + 3.5 + + + + 3.5 + + + 3.5 + + + + + + + CommonAssemblyInfo.cs + + + + + + \ No newline at end of file diff --git a/src/impl/unitofwork/NServiceBus.UnitOfWork.NHibernate/Properties/AssemblyInfo.cs b/src/impl/unitofwork/NServiceBus.UnitOfWork.NHibernate/Properties/AssemblyInfo.cs index c9e72723ea4..f4f714c2da2 100644 --- a/src/impl/unitofwork/NServiceBus.UnitOfWork.NHibernate/Properties/AssemblyInfo.cs +++ b/src/impl/unitofwork/NServiceBus.UnitOfWork.NHibernate/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Unit of Work NHibernate implementation")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Unit of Work NHibernate implementation")] [assembly: AssemblyDescription("Implementation of unit of work management in NServiceBus on top of NHibernate")] \ No newline at end of file diff --git a/src/impl/unitofwork/NServiceBus.UnitOfWork.NHibernate/UnitOfWorkManager.cs b/src/impl/unitofwork/NServiceBus.UnitOfWork.NHibernate/UnitOfWorkManager.cs index 86b923e09ed..a8aeaad3c64 100644 --- a/src/impl/unitofwork/NServiceBus.UnitOfWork.NHibernate/UnitOfWorkManager.cs +++ b/src/impl/unitofwork/NServiceBus.UnitOfWork.NHibernate/UnitOfWorkManager.cs @@ -1,68 +1,68 @@ -using System.Transactions; -using NHibernate; -using NHibernate.Context; - -namespace NServiceBus.UnitOfWork.NHibernate -{ - /// - /// Implementation of unit of work management with NHibernate - /// - public class UnitOfWorkManager : IManageUnitsOfWork - { - void IManageUnitsOfWork.Begin() - { - if (SessionFactory == null) return; - - var session = SessionFactory.OpenSession(); - - CurrentSessionContext.Bind(session); - - if (NoAmbientTransaction()) - { - session.BeginTransaction(); - } - } - - void IManageUnitsOfWork.End() - { - if (SessionFactory == null) return; - - if (!NoAmbientTransaction()) return; - - var session = SessionFactory.GetCurrentSession(); - - session.Transaction.Commit(); - session.Transaction.Dispose(); - - session.Close(); - } - - void IManageUnitsOfWork.Error() - { - if (SessionFactory == null) return; - - //HandleError always run after the transactionscope so we can't check for ambient trans here - var session = SessionFactory.GetCurrentSession(); - - if (session.Transaction.IsActive) - { - session.Transaction.Rollback(); - session.Transaction.Dispose(); - } - - if (session.IsOpen) - session.Close(); - } - - /// - /// Injected NHibernate session factory. - /// - public ISessionFactory SessionFactory { get; set; } - - - private static bool NoAmbientTransaction() - { - return Transaction.Current == null; - } - } -} +using System.Transactions; +using NHibernate; +using NHibernate.Context; + +namespace NServiceBus.UnitOfWork.NHibernate +{ + /// + /// Implementation of unit of work management with NHibernate + /// + public class UnitOfWorkManager : IManageUnitsOfWork + { + void IManageUnitsOfWork.Begin() + { + if (SessionFactory == null) return; + + var session = SessionFactory.OpenSession(); + + CurrentSessionContext.Bind(session); + + if (NoAmbientTransaction()) + { + session.BeginTransaction(); + } + } + + void IManageUnitsOfWork.End() + { + if (SessionFactory == null) return; + + if (!NoAmbientTransaction()) return; + + var session = SessionFactory.GetCurrentSession(); + + session.Transaction.Commit(); + session.Transaction.Dispose(); + + session.Close(); + } + + void IManageUnitsOfWork.Error() + { + if (SessionFactory == null) return; + + //HandleError always run after the transactionscope so we can't check for ambient trans here + var session = SessionFactory.GetCurrentSession(); + + if (session.Transaction.IsActive) + { + session.Transaction.Rollback(); + session.Transaction.Dispose(); + } + + if (session.IsOpen) + session.Close(); + } + + /// + /// Injected NHibernate session factory. + /// + public ISessionFactory SessionFactory { get; set; } + + + private static bool NoAmbientTransaction() + { + return Transaction.Current == null; + } + } +} diff --git a/src/impl/unitofwork/unitofwork.sln b/src/impl/unitofwork/unitofwork.sln index 79e5f94193b..78d41c29894 100644 --- a/src/impl/unitofwork/unitofwork.sln +++ b/src/impl/unitofwork/unitofwork.sln @@ -1,26 +1,26 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.UnitOfWork.NHibernate", "NServiceBus.UnitOfWork.NHibernate\NServiceBus.UnitOfWork.NHibernate.csproj", "{6A731C25-84D8-42AC-BDC4-618432B87257}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.UnitOfWork.NHibernate.Config", "NServiceBus.UnitOfWork.NHibernate.Config\NServiceBus.UnitOfWork.NHibernate.Config.csproj", "{EC6FD140-4970-4414-A972-AE3D3576328E}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {6A731C25-84D8-42AC-BDC4-618432B87257}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6A731C25-84D8-42AC-BDC4-618432B87257}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6A731C25-84D8-42AC-BDC4-618432B87257}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6A731C25-84D8-42AC-BDC4-618432B87257}.Release|Any CPU.Build.0 = Release|Any CPU - {EC6FD140-4970-4414-A972-AE3D3576328E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EC6FD140-4970-4414-A972-AE3D3576328E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EC6FD140-4970-4414-A972-AE3D3576328E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EC6FD140-4970-4414-A972-AE3D3576328E}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.UnitOfWork.NHibernate", "NServiceBus.UnitOfWork.NHibernate\NServiceBus.UnitOfWork.NHibernate.csproj", "{6A731C25-84D8-42AC-BDC4-618432B87257}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.UnitOfWork.NHibernate.Config", "NServiceBus.UnitOfWork.NHibernate.Config\NServiceBus.UnitOfWork.NHibernate.Config.csproj", "{EC6FD140-4970-4414-A972-AE3D3576328E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6A731C25-84D8-42AC-BDC4-618432B87257}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6A731C25-84D8-42AC-BDC4-618432B87257}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6A731C25-84D8-42AC-BDC4-618432B87257}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6A731C25-84D8-42AC-BDC4-618432B87257}.Release|Any CPU.Build.0 = Release|Any CPU + {EC6FD140-4970-4414-A972-AE3D3576328E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EC6FD140-4970-4414-A972-AE3D3576328E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EC6FD140-4970-4414-A972-AE3D3576328E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EC6FD140-4970-4414-A972-AE3D3576328E}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/integration/NServiceBus.Integration.Azure.Tests/App.config b/src/integration/NServiceBus.Integration.Azure.Tests/App.config index afc956df107..d0f29c64489 100644 --- a/src/integration/NServiceBus.Integration.Azure.Tests/App.config +++ b/src/integration/NServiceBus.Integration.Azure.Tests/App.config @@ -1,8 +1,8 @@ - - - -
- - - + + + +
+ + + \ No newline at end of file diff --git a/src/integration/NServiceBus.Integration.Azure.Tests/NServiceBus.Integration.Azure.Tests.csproj b/src/integration/NServiceBus.Integration.Azure.Tests/NServiceBus.Integration.Azure.Tests.csproj index 4a9712f7e22..16c7ffb9d9d 100644 --- a/src/integration/NServiceBus.Integration.Azure.Tests/NServiceBus.Integration.Azure.Tests.csproj +++ b/src/integration/NServiceBus.Integration.Azure.Tests/NServiceBus.Integration.Azure.Tests.csproj @@ -1,78 +1,78 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {CA59C36D-FA35-42B4-99B5-5725C6AF1B01} - Library - Properties - NServiceBus.Integration.Azure.Tests - NServiceBus.Integration.Azure.Tests - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\build\nservicebus.core\NServiceBus.Config.dll - - - False - ..\..\..\tools\NUnit\nunit.framework.dll - - - False - ..\..\..\lib\Rhino.Mocks\Rhino.Mocks.dll - - - - - 3.5 - - - - - CommonAssemblyInfo.cs - - - - - - - - - {641D0198-FE99-42F4-B6CB-A14D0E9F639E} - NServiceBus.Integration.Azure - - - - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {CA59C36D-FA35-42B4-99B5-5725C6AF1B01} + Library + Properties + NServiceBus.Integration.Azure.Tests + NServiceBus.Integration.Azure.Tests + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\build\nservicebus.core\NServiceBus.Config.dll + + + False + ..\..\..\tools\NUnit\nunit.framework.dll + + + False + ..\..\..\lib\Rhino.Mocks\Rhino.Mocks.dll + + + + + 3.5 + + + + + CommonAssemblyInfo.cs + + + + + + + + + {641D0198-FE99-42F4-B6CB-A14D0E9F639E} + NServiceBus.Integration.Azure + + + + + + + \ No newline at end of file diff --git a/src/integration/NServiceBus.Integration.Azure.Tests/Properties/AssemblyInfo.cs b/src/integration/NServiceBus.Integration.Azure.Tests/Properties/AssemblyInfo.cs index 4080e1a4188..cf45b4b4972 100644 --- a/src/integration/NServiceBus.Integration.Azure.Tests/Properties/AssemblyInfo.cs +++ b/src/integration/NServiceBus.Integration.Azure.Tests/Properties/AssemblyInfo.cs @@ -1,2 +1,2 @@ -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus.Integration.Azure.Tests")] +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus.Integration.Azure.Tests")] diff --git a/src/integration/NServiceBus.Integration.Azure.Tests/SectionNotPresentInConfig.cs b/src/integration/NServiceBus.Integration.Azure.Tests/SectionNotPresentInConfig.cs index 41755feb4af..e1d6fd48edb 100644 --- a/src/integration/NServiceBus.Integration.Azure.Tests/SectionNotPresentInConfig.cs +++ b/src/integration/NServiceBus.Integration.Azure.Tests/SectionNotPresentInConfig.cs @@ -1,23 +1,23 @@ -using System; -using System.Configuration; - -namespace NServiceBus.Integration.Azure.Tests -{ - public class SectionNotPresentInConfig : ConfigurationSection - { - [ConfigurationProperty("SomeSetting", IsRequired = true)] - public string SomeSetting - { - get - { - return (string)this["SomeSetting"]; - } - set - { - this["SomeSetting"] = value; - } - } - - - } +using System; +using System.Configuration; + +namespace NServiceBus.Integration.Azure.Tests +{ + public class SectionNotPresentInConfig : ConfigurationSection + { + [ConfigurationProperty("SomeSetting", IsRequired = true)] + public string SomeSetting + { + get + { + return (string)this["SomeSetting"]; + } + set + { + this["SomeSetting"] = value; + } + } + + + } } \ No newline at end of file diff --git a/src/integration/NServiceBus.Integration.Azure.Tests/TestConfigSection.cs b/src/integration/NServiceBus.Integration.Azure.Tests/TestConfigSection.cs index ccc3b80f241..acb850e5fcd 100644 --- a/src/integration/NServiceBus.Integration.Azure.Tests/TestConfigSection.cs +++ b/src/integration/NServiceBus.Integration.Azure.Tests/TestConfigSection.cs @@ -1,35 +1,35 @@ -using System.Configuration; - -namespace NServiceBus.Integration.Azure.Tests -{ - public class TestConfigSection : ConfigurationSection - { - [ConfigurationProperty("StringSetting", IsRequired = true)] - public string StringSetting - { - get - { - return (string)this["StringSetting"]; - } - set - { - this["StringSetting"] = value; - } - - - } - - [ConfigurationProperty("IntSetting", IsRequired = false)] - public int IntSetting - { - get - { - return (int)this["IntSetting"]; - } - set - { - this["IntSetting"] = value; - } - } - } +using System.Configuration; + +namespace NServiceBus.Integration.Azure.Tests +{ + public class TestConfigSection : ConfigurationSection + { + [ConfigurationProperty("StringSetting", IsRequired = true)] + public string StringSetting + { + get + { + return (string)this["StringSetting"]; + } + set + { + this["StringSetting"] = value; + } + + + } + + [ConfigurationProperty("IntSetting", IsRequired = false)] + public int IntSetting + { + get + { + return (int)this["IntSetting"]; + } + set + { + this["IntSetting"] = value; + } + } + } } \ No newline at end of file diff --git a/src/integration/NServiceBus.Integration.Azure.Tests/When_using_the_azure_configuration_source.cs b/src/integration/NServiceBus.Integration.Azure.Tests/When_using_the_azure_configuration_source.cs index 58b4b7ae14e..89348158d67 100644 --- a/src/integration/NServiceBus.Integration.Azure.Tests/When_using_the_azure_configuration_source.cs +++ b/src/integration/NServiceBus.Integration.Azure.Tests/When_using_the_azure_configuration_source.cs @@ -1,51 +1,51 @@ -using NServiceBus.Config.ConfigurationSource; -using NUnit.Framework; -using Rhino.Mocks; - -namespace NServiceBus.Integration.Azure.Tests -{ - [TestFixture] - public class When_using_the_azure_configuration_source - { - private IAzureConfigurationSettings azureSettings; - private IConfigurationSource configSource; - - [SetUp] - public void SetUp() - { - azureSettings = MockRepository.GenerateStub(); - - configSource = new AzureConfigurationSource(azureSettings); - } - - [Test] - public void The_service_configuration_should_override_appconfig() - { - azureSettings.Stub(x => x.GetSetting("TestConfigSection.StringSetting")).Return("test"); - - Assert.AreEqual(configSource.GetConfiguration().StringSetting,"test"); - } - - [Test] - public void Overrides_should_be_possible_for_non_existing_sections() - { - azureSettings.Stub(x => x.GetSetting("SectionNotPresentInConfig.SomeSetting")).Return("test"); - - Assert.AreEqual(configSource.GetConfiguration().SomeSetting,"test"); - } - - [Test] - public void No_section_should_be_returned_if_both_azure_and_app_confis_are_empty() - { - Assert.Null(configSource.GetConfiguration()); - } - - [Test] - public void Value_types_should_be_converted_from_string_to_its_native_type() - { - azureSettings.Stub(x => x.GetSetting("TestConfigSection.IntSetting")).Return("23"); - - Assert.AreEqual(configSource.GetConfiguration().IntSetting,23); - } - } +using NServiceBus.Config.ConfigurationSource; +using NUnit.Framework; +using Rhino.Mocks; + +namespace NServiceBus.Integration.Azure.Tests +{ + [TestFixture] + public class When_using_the_azure_configuration_source + { + private IAzureConfigurationSettings azureSettings; + private IConfigurationSource configSource; + + [SetUp] + public void SetUp() + { + azureSettings = MockRepository.GenerateStub(); + + configSource = new AzureConfigurationSource(azureSettings); + } + + [Test] + public void The_service_configuration_should_override_appconfig() + { + azureSettings.Stub(x => x.GetSetting("TestConfigSection.StringSetting")).Return("test"); + + Assert.AreEqual(configSource.GetConfiguration().StringSetting,"test"); + } + + [Test] + public void Overrides_should_be_possible_for_non_existing_sections() + { + azureSettings.Stub(x => x.GetSetting("SectionNotPresentInConfig.SomeSetting")).Return("test"); + + Assert.AreEqual(configSource.GetConfiguration().SomeSetting,"test"); + } + + [Test] + public void No_section_should_be_returned_if_both_azure_and_app_confis_are_empty() + { + Assert.Null(configSource.GetConfiguration()); + } + + [Test] + public void Value_types_should_be_converted_from_string_to_its_native_type() + { + azureSettings.Stub(x => x.GetSetting("TestConfigSection.IntSetting")).Return("23"); + + Assert.AreEqual(configSource.GetConfiguration().IntSetting,23); + } + } } \ No newline at end of file diff --git a/src/integration/NServiceBus.Integration.Azure/AzureAppender.cs b/src/integration/NServiceBus.Integration.Azure/AzureAppender.cs index f608f2f1b80..01d65d68c90 100644 --- a/src/integration/NServiceBus.Integration.Azure/AzureAppender.cs +++ b/src/integration/NServiceBus.Integration.Azure/AzureAppender.cs @@ -1,135 +1,135 @@ -using System; -using System.Diagnostics; -using log4net.Appender; -using log4net.Core; -using log4net.Repository.Hierarchy; -using Microsoft.WindowsAzure.Diagnostics; -using Microsoft.WindowsAzure.ServiceRuntime; - -namespace NServiceBus.Integration.Azure -{ - public sealed class AzureAppender : AppenderSkeleton - { - private const string ConnectionStringKey = "Diagnostics.ConnectionString"; - private const string LevelKey = "Diagnostics.Level"; - private const string LayoutKey = "Diagnostics.Layout"; - private const string ScheduledTransferPeriodKey = "Diagnostics.ScheduledTransferPeriod"; - private const string EventLogsKey = "Diagnostics.EventLogs"; - - public AzureAppender() - { - ScheduledTransferPeriod = GetScheduledTransferPeriod(); - Layout = new log4net.Layout.PatternLayout(GetLayout()); - Level = GetLevel(); - } - - public int ScheduledTransferPeriod { get; set; } - - public string Level { get; set; } - - protected override void Append(LoggingEvent loggingEvent) - { - var logString = RenderLoggingEvent(loggingEvent); - - System.Diagnostics.Trace.WriteLine(logString); - } - - public override void ActivateOptions() - { - ConfigureThreshold(); - - base.ActivateOptions(); - - ConfigureAzureDiagnostics(); - } - - private void ConfigureThreshold() - { - var rootRepository = (Hierarchy)log4net.LogManager.GetRepository(); - Threshold = rootRepository.LevelMap[Level]; - } - - private void ConfigureAzureDiagnostics() - { - var traceListener = new DiagnosticMonitorTraceListener(); - Trace.Listeners.Add(traceListener); - - var dmc = DiagnosticMonitor.GetDefaultInitialConfiguration(); - - //set threshold to verbose, what gets logged is controled by the log4net level - dmc.Logs.ScheduledTransferLogLevelFilter = LogLevel.Verbose; - - ScheduleTransfer(dmc); - - ConfigureWindowsEventLogsToBeTransferred(dmc); - - DiagnosticMonitor.Start(ConnectionStringKey, dmc); - } - - private void ScheduleTransfer(DiagnosticMonitorConfiguration dmc) - { - var transferPeriod = TimeSpan.FromMinutes(ScheduledTransferPeriod); - dmc.Logs.ScheduledTransferPeriod = transferPeriod; - dmc.WindowsEventLog.ScheduledTransferPeriod = transferPeriod; - } - - private static void ConfigureWindowsEventLogsToBeTransferred(DiagnosticMonitorConfiguration dmc) - { - var eventLogs = GetEventLogs().Split(';'); - foreach (var log in eventLogs) - { - dmc.WindowsEventLog.DataSources.Add(log); - } - } - - private static string GetLevel() - { - try - { - return RoleEnvironment.GetConfigurationSettingValue(LevelKey); - } - catch (Exception) - { - return "Error"; - } - } - - private static string GetLayout() - { - try - { - return RoleEnvironment.GetConfigurationSettingValue(LayoutKey); - } - catch (Exception) - { - return "%d [%t] %-5p %c [%x] <%X{auth}> - %m%n"; - } - } - - private static int GetScheduledTransferPeriod() - { - try - { - return int.Parse(RoleEnvironment.GetConfigurationSettingValue(ScheduledTransferPeriodKey)); - } - catch (Exception) - { - return 5; - } - } - - private static string GetEventLogs() - { - try - { - return RoleEnvironment.GetConfigurationSettingValue(EventLogsKey); - } - catch (Exception) - { - return "Application!*;System!*"; - } - } - } -} - +using System; +using System.Diagnostics; +using log4net.Appender; +using log4net.Core; +using log4net.Repository.Hierarchy; +using Microsoft.WindowsAzure.Diagnostics; +using Microsoft.WindowsAzure.ServiceRuntime; + +namespace NServiceBus.Integration.Azure +{ + public sealed class AzureAppender : AppenderSkeleton + { + private const string ConnectionStringKey = "Diagnostics.ConnectionString"; + private const string LevelKey = "Diagnostics.Level"; + private const string LayoutKey = "Diagnostics.Layout"; + private const string ScheduledTransferPeriodKey = "Diagnostics.ScheduledTransferPeriod"; + private const string EventLogsKey = "Diagnostics.EventLogs"; + + public AzureAppender() + { + ScheduledTransferPeriod = GetScheduledTransferPeriod(); + Layout = new log4net.Layout.PatternLayout(GetLayout()); + Level = GetLevel(); + } + + public int ScheduledTransferPeriod { get; set; } + + public string Level { get; set; } + + protected override void Append(LoggingEvent loggingEvent) + { + var logString = RenderLoggingEvent(loggingEvent); + + System.Diagnostics.Trace.WriteLine(logString); + } + + public override void ActivateOptions() + { + ConfigureThreshold(); + + base.ActivateOptions(); + + ConfigureAzureDiagnostics(); + } + + private void ConfigureThreshold() + { + var rootRepository = (Hierarchy)log4net.LogManager.GetRepository(); + Threshold = rootRepository.LevelMap[Level]; + } + + private void ConfigureAzureDiagnostics() + { + var traceListener = new DiagnosticMonitorTraceListener(); + Trace.Listeners.Add(traceListener); + + var dmc = DiagnosticMonitor.GetDefaultInitialConfiguration(); + + //set threshold to verbose, what gets logged is controled by the log4net level + dmc.Logs.ScheduledTransferLogLevelFilter = LogLevel.Verbose; + + ScheduleTransfer(dmc); + + ConfigureWindowsEventLogsToBeTransferred(dmc); + + DiagnosticMonitor.Start(ConnectionStringKey, dmc); + } + + private void ScheduleTransfer(DiagnosticMonitorConfiguration dmc) + { + var transferPeriod = TimeSpan.FromMinutes(ScheduledTransferPeriod); + dmc.Logs.ScheduledTransferPeriod = transferPeriod; + dmc.WindowsEventLog.ScheduledTransferPeriod = transferPeriod; + } + + private static void ConfigureWindowsEventLogsToBeTransferred(DiagnosticMonitorConfiguration dmc) + { + var eventLogs = GetEventLogs().Split(';'); + foreach (var log in eventLogs) + { + dmc.WindowsEventLog.DataSources.Add(log); + } + } + + private static string GetLevel() + { + try + { + return RoleEnvironment.GetConfigurationSettingValue(LevelKey); + } + catch (Exception) + { + return "Error"; + } + } + + private static string GetLayout() + { + try + { + return RoleEnvironment.GetConfigurationSettingValue(LayoutKey); + } + catch (Exception) + { + return "%d [%t] %-5p %c [%x] <%X{auth}> - %m%n"; + } + } + + private static int GetScheduledTransferPeriod() + { + try + { + return int.Parse(RoleEnvironment.GetConfigurationSettingValue(ScheduledTransferPeriodKey)); + } + catch (Exception) + { + return 5; + } + } + + private static string GetEventLogs() + { + try + { + return RoleEnvironment.GetConfigurationSettingValue(EventLogsKey); + } + catch (Exception) + { + return "Application!*;System!*"; + } + } + } +} + \ No newline at end of file diff --git a/src/integration/NServiceBus.Integration.Azure/AzureConfigurationSettings.cs b/src/integration/NServiceBus.Integration.Azure/AzureConfigurationSettings.cs index a12bd62c9d8..be36dd1e166 100644 --- a/src/integration/NServiceBus.Integration.Azure/AzureConfigurationSettings.cs +++ b/src/integration/NServiceBus.Integration.Azure/AzureConfigurationSettings.cs @@ -1,26 +1,26 @@ -using System; -using Microsoft.WindowsAzure.ServiceRuntime; - -namespace NServiceBus.Integration.Azure -{ - public class AzureConfigurationSettings : IAzureConfigurationSettings - { - public string GetSetting(string name) - { - if (!RoleEnvironment.IsAvailable) - return ""; - - //hack: the azure runtime throws if a setting doesn't exists and there is no way of - //checking that a setting is defined. Therefor we have to do this ugly stuff - try - { - return RoleEnvironment.GetConfigurationSettingValue(name); - } - catch (Exception) - { - return ""; - } - - } - } +using System; +using Microsoft.WindowsAzure.ServiceRuntime; + +namespace NServiceBus.Integration.Azure +{ + public class AzureConfigurationSettings : IAzureConfigurationSettings + { + public string GetSetting(string name) + { + if (!RoleEnvironment.IsAvailable) + return ""; + + //hack: the azure runtime throws if a setting doesn't exists and there is no way of + //checking that a setting is defined. Therefor we have to do this ugly stuff + try + { + return RoleEnvironment.GetConfigurationSettingValue(name); + } + catch (Exception) + { + return ""; + } + + } + } } \ No newline at end of file diff --git a/src/integration/NServiceBus.Integration.Azure/AzureConfigurationSource.cs b/src/integration/NServiceBus.Integration.Azure/AzureConfigurationSource.cs index cf525d946d2..b38a5bc34b6 100644 --- a/src/integration/NServiceBus.Integration.Azure/AzureConfigurationSource.cs +++ b/src/integration/NServiceBus.Integration.Azure/AzureConfigurationSource.cs @@ -1,56 +1,56 @@ -using System; -using System.Configuration; -using System.Linq; -using System.Reflection; -using System.Web; -using System.Web.Configuration; -using Microsoft.WindowsAzure.ServiceRuntime; -using NServiceBus.Config.ConfigurationSource; - -namespace NServiceBus.Integration.Azure -{ - public class AzureConfigurationSource : IConfigurationSource - { - private readonly IAzureConfigurationSettings azureConfigurationSettings; - - public AzureConfigurationSource(IAzureConfigurationSettings configurationSettings) - { - azureConfigurationSettings = configurationSettings; - } - - T IConfigurationSource.GetConfiguration() - { - var sectionName = typeof(T).Name; - - var section = GetConfigurationHandler() - .GetSection(sectionName) as T; - - foreach (var property in typeof(T).GetProperties().Where(x => x.DeclaringType == typeof(T))) - { - var setting = azureConfigurationSettings.GetSetting(sectionName + "." + property.Name); - - if (!string.IsNullOrEmpty(setting)) - { - if (section == null) - section = new T(); - - property.SetValue(section, Convert.ChangeType(setting, property.PropertyType), null); - } - } - - return section; - } - - private static Configuration GetConfigurationHandler() - { - if (IsWebsite()) return WebConfigurationManager.OpenWebConfiguration("/"); - - return ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); - } - - private static bool IsWebsite() - { - return RoleEnvironment.IsAvailable ? RoleEnvironment.CurrentRoleInstance.InstanceEndpoints.ContainsKey("HttpIn") : HttpContext.Current != null; - } - } +using System; +using System.Configuration; +using System.Linq; +using System.Reflection; +using System.Web; +using System.Web.Configuration; +using Microsoft.WindowsAzure.ServiceRuntime; +using NServiceBus.Config.ConfigurationSource; + +namespace NServiceBus.Integration.Azure +{ + public class AzureConfigurationSource : IConfigurationSource + { + private readonly IAzureConfigurationSettings azureConfigurationSettings; + + public AzureConfigurationSource(IAzureConfigurationSettings configurationSettings) + { + azureConfigurationSettings = configurationSettings; + } + + T IConfigurationSource.GetConfiguration() + { + var sectionName = typeof(T).Name; + + var section = GetConfigurationHandler() + .GetSection(sectionName) as T; + + foreach (var property in typeof(T).GetProperties().Where(x => x.DeclaringType == typeof(T))) + { + var setting = azureConfigurationSettings.GetSetting(sectionName + "." + property.Name); + + if (!string.IsNullOrEmpty(setting)) + { + if (section == null) + section = new T(); + + property.SetValue(section, Convert.ChangeType(setting, property.PropertyType), null); + } + } + + return section; + } + + private static Configuration GetConfigurationHandler() + { + if (IsWebsite()) return WebConfigurationManager.OpenWebConfiguration("/"); + + return ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); + } + + private static bool IsWebsite() + { + return RoleEnvironment.IsAvailable ? RoleEnvironment.CurrentRoleInstance.InstanceEndpoints.ContainsKey("HttpIn") : HttpContext.Current != null; + } + } } \ No newline at end of file diff --git a/src/integration/NServiceBus.Integration.Azure/Config/ConfigureAzureIntegration.cs b/src/integration/NServiceBus.Integration.Azure/Config/ConfigureAzureIntegration.cs index dbe1ad58a7c..aaebd36a78a 100644 --- a/src/integration/NServiceBus.Integration.Azure/Config/ConfigureAzureIntegration.cs +++ b/src/integration/NServiceBus.Integration.Azure/Config/ConfigureAzureIntegration.cs @@ -1,14 +1,14 @@ -using NServiceBus.Integration.Azure; - -namespace NServiceBus.Config -{ - public static class ConfigureAzureIntegration - { - public static Configure AzureConfigurationSource(this Configure config) - { - var azureConfigSource = new AzureConfigurationSource(new AzureConfigurationSettings()); - - return config.CustomConfigurationSource(azureConfigSource); - } - } +using NServiceBus.Integration.Azure; + +namespace NServiceBus.Config +{ + public static class ConfigureAzureIntegration + { + public static Configure AzureConfigurationSource(this Configure config) + { + var azureConfigSource = new AzureConfigurationSource(new AzureConfigurationSettings()); + + return config.CustomConfigurationSource(azureConfigSource); + } + } } \ No newline at end of file diff --git a/src/integration/NServiceBus.Integration.Azure/IAzureConfigurationSettings.cs b/src/integration/NServiceBus.Integration.Azure/IAzureConfigurationSettings.cs index 81965d8b3fa..04ac9307a28 100644 --- a/src/integration/NServiceBus.Integration.Azure/IAzureConfigurationSettings.cs +++ b/src/integration/NServiceBus.Integration.Azure/IAzureConfigurationSettings.cs @@ -1,7 +1,7 @@ -namespace NServiceBus.Integration.Azure -{ - public interface IAzureConfigurationSettings - { - string GetSetting(string name); - } +namespace NServiceBus.Integration.Azure +{ + public interface IAzureConfigurationSettings + { + string GetSetting(string name); + } } \ No newline at end of file diff --git a/src/integration/NServiceBus.Integration.Azure/NServiceBus.Integration.Azure.csproj b/src/integration/NServiceBus.Integration.Azure/NServiceBus.Integration.Azure.csproj index b16fc6cef27..39f6289de1d 100644 --- a/src/integration/NServiceBus.Integration.Azure/NServiceBus.Integration.Azure.csproj +++ b/src/integration/NServiceBus.Integration.Azure/NServiceBus.Integration.Azure.csproj @@ -1,92 +1,92 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {641D0198-FE99-42F4-B6CB-A14D0E9F639E} - Library - Properties - NServiceBus.Integration.Azure - NServiceBus.Integration.Azure - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\lib\Common.Logging.dll - - - False - ..\..\..\lib\log4net.dll - - - False - ..\..\..\lib\Azure\Microsoft.WindowsAzure.Diagnostics.dll - - - False - ..\..\..\lib\Azure\Microsoft.WindowsAzure.ServiceRuntime.dll - - - False - ..\..\..\lib\Azure\Microsoft.WindowsAzure.StorageClient.dll - - - False - ..\..\..\build\output\NServiceBus.dll - - - False - ..\..\..\build\nservicebus.core\NServiceBus.Config.dll - - - False - ..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll - - - - - 3.5 - - - - - - CommonAssemblyInfo.cs - - - - - - - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {641D0198-FE99-42F4-B6CB-A14D0E9F639E} + Library + Properties + NServiceBus.Integration.Azure + NServiceBus.Integration.Azure + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\lib\Common.Logging.dll + + + False + ..\..\..\lib\log4net.dll + + + False + ..\..\..\lib\Azure\Microsoft.WindowsAzure.Diagnostics.dll + + + False + ..\..\..\lib\Azure\Microsoft.WindowsAzure.ServiceRuntime.dll + + + False + ..\..\..\lib\Azure\Microsoft.WindowsAzure.StorageClient.dll + + + False + ..\..\..\build\output\NServiceBus.dll + + + False + ..\..\..\build\nservicebus.core\NServiceBus.Config.dll + + + False + ..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll + + + + + 3.5 + + + + + + CommonAssemblyInfo.cs + + + + + + + + + + \ No newline at end of file diff --git a/src/integration/NServiceBus.Integration.Azure/Properties/AssemblyInfo.cs b/src/integration/NServiceBus.Integration.Azure/Properties/AssemblyInfo.cs index 09004998897..7c2908e2d45 100644 --- a/src/integration/NServiceBus.Integration.Azure/Properties/AssemblyInfo.cs +++ b/src/integration/NServiceBus.Integration.Azure/Properties/AssemblyInfo.cs @@ -1,2 +1,2 @@ -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus.Integration.Azure")] +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus.Integration.Azure")] diff --git a/src/integration/NServiceBus.Integration.WCF/App.config b/src/integration/NServiceBus.Integration.WCF/App.config index 570b12029de..cdd2272c69d 100644 --- a/src/integration/NServiceBus.Integration.WCF/App.config +++ b/src/integration/NServiceBus.Integration.WCF/App.config @@ -1,29 +1,29 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/integration/NServiceBus.Integration.WCF/IWcfService.cs b/src/integration/NServiceBus.Integration.WCF/IWcfService.cs index 93c89224e14..5e6677333cd 100644 --- a/src/integration/NServiceBus.Integration.WCF/IWcfService.cs +++ b/src/integration/NServiceBus.Integration.WCF/IWcfService.cs @@ -1,31 +1,31 @@ -using System.ServiceModel; -using System; - -namespace NServiceBus -{ - /// - /// Service interface for a generic WCF adapter to a messaging endpoint. - /// - /// - /// - [ServiceContract] - public interface IWcfService where TRequest : IMessage - { - /// - /// Sends the message to the messaging endpoint. - /// - /// - /// - /// - /// - [OperationContract(AsyncPattern = true)] - IAsyncResult BeginProcess(TRequest request, AsyncCallback callback, object state); - - /// - /// Returns the result received from the messaging endpoint. - /// - /// - /// - TResponse EndProcess(IAsyncResult asyncResult); - } -} +using System.ServiceModel; +using System; + +namespace NServiceBus +{ + /// + /// Service interface for a generic WCF adapter to a messaging endpoint. + /// + /// + /// + [ServiceContract] + public interface IWcfService where TRequest : IMessage + { + /// + /// Sends the message to the messaging endpoint. + /// + /// + /// + /// + /// + [OperationContract(AsyncPattern = true)] + IAsyncResult BeginProcess(TRequest request, AsyncCallback callback, object state); + + /// + /// Returns the result received from the messaging endpoint. + /// + /// + /// + TResponse EndProcess(IAsyncResult asyncResult); + } +} diff --git a/src/integration/NServiceBus.Integration.WCF/NServiceBus.Integration.WCF.csproj b/src/integration/NServiceBus.Integration.WCF/NServiceBus.Integration.WCF.csproj index f651e530456..ef46826c699 100644 --- a/src/integration/NServiceBus.Integration.WCF/NServiceBus.Integration.WCF.csproj +++ b/src/integration/NServiceBus.Integration.WCF/NServiceBus.Integration.WCF.csproj @@ -1,89 +1,89 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {8CF614E1-FEAC-4C92-9F64-EF809C0BBC0A} - Library - Properties - NServiceBus.Integration.WCF - NServiceBus.Integration.WCF - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\build\output\NServiceBus.dll - False - - - False - ..\..\..\build\nservicebus.core\NServiceBus.Config.dll - False - - - False - ..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll - False - - - False - ..\..\..\build\nservicebus.core\NServiceBus.Unicast.dll - - - - 3.5 - - - 3.0 - - - 3.5 - - - 3.5 - - - - - - - CommonAssemblyInfo.cs - - - - - - - - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {8CF614E1-FEAC-4C92-9F64-EF809C0BBC0A} + Library + Properties + NServiceBus.Integration.WCF + NServiceBus.Integration.WCF + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\build\output\NServiceBus.dll + False + + + False + ..\..\..\build\nservicebus.core\NServiceBus.Config.dll + False + + + False + ..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll + False + + + False + ..\..\..\build\nservicebus.core\NServiceBus.Unicast.dll + + + + 3.5 + + + 3.0 + + + 3.5 + + + 3.5 + + + + + + + CommonAssemblyInfo.cs + + + + + + + + + + + \ No newline at end of file diff --git a/src/integration/NServiceBus.Integration.WCF/Properties/AssemblyInfo.cs b/src/integration/NServiceBus.Integration.WCF/Properties/AssemblyInfo.cs index 2d86772ceda..8c2d31f407e 100644 --- a/src/integration/NServiceBus.Integration.WCF/Properties/AssemblyInfo.cs +++ b/src/integration/NServiceBus.Integration.WCF/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus WCF Integration")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus WCF Integration")] [assembly: AssemblyDescription("Implementation of NServiceBus integration for WCF.")] \ No newline at end of file diff --git a/src/integration/NServiceBus.Integration.WCF/ServiceAsyncResult.cs b/src/integration/NServiceBus.Integration.WCF/ServiceAsyncResult.cs index 9aadd3b6512..baab07ae2c7 100644 --- a/src/integration/NServiceBus.Integration.WCF/ServiceAsyncResult.cs +++ b/src/integration/NServiceBus.Integration.WCF/ServiceAsyncResult.cs @@ -1,70 +1,70 @@ -using System; -using System.Threading; - -namespace NServiceBus -{ - public class ServiceAsyncResult : IAsyncResult - { - private readonly object state; - private volatile bool completed; - private readonly ManualResetEvent sync; - - /// - /// Creates a new object storing the given state. - /// - /// - public ServiceAsyncResult(object state) - { - this.state = state; - sync = new ManualResetEvent(false); - } - - /// - /// Stores the given completion result from the server, - /// releases any blocked threads - /// - public void Complete(CompletionResult result) - { - this.Result = result; - completed = true; - sync.Set(); - } - - /// - /// Returns the original state passed into the Begin method. - /// - public object AsyncState - { - get { return this.state; } - } - - /// - /// Returns a handle suitable for blocking threads. - /// - public WaitHandle AsyncWaitHandle - { - get { return sync; } - } - - /// - /// Returns false. - /// - public bool CompletedSynchronously - { - get { return false; } - } - - /// - /// Contains the completion result from the server. - /// - public CompletionResult Result { get; private set; } - - /// - /// Returns if the operation has completed. - /// - public bool IsCompleted - { - get { return completed; } - } - } +using System; +using System.Threading; + +namespace NServiceBus +{ + public class ServiceAsyncResult : IAsyncResult + { + private readonly object state; + private volatile bool completed; + private readonly ManualResetEvent sync; + + /// + /// Creates a new object storing the given state. + /// + /// + public ServiceAsyncResult(object state) + { + this.state = state; + sync = new ManualResetEvent(false); + } + + /// + /// Stores the given completion result from the server, + /// releases any blocked threads + /// + public void Complete(CompletionResult result) + { + this.Result = result; + completed = true; + sync.Set(); + } + + /// + /// Returns the original state passed into the Begin method. + /// + public object AsyncState + { + get { return this.state; } + } + + /// + /// Returns a handle suitable for blocking threads. + /// + public WaitHandle AsyncWaitHandle + { + get { return sync; } + } + + /// + /// Returns false. + /// + public bool CompletedSynchronously + { + get { return false; } + } + + /// + /// Contains the completion result from the server. + /// + public CompletionResult Result { get; private set; } + + /// + /// Returns if the operation has completed. + /// + public bool IsCompleted + { + get { return completed; } + } + } } \ No newline at end of file diff --git a/src/integration/NServiceBus.Integration.WCF/WcfService.cs b/src/integration/NServiceBus.Integration.WCF/WcfService.cs index cb20ee6b811..c82875f972e 100644 --- a/src/integration/NServiceBus.Integration.WCF/WcfService.cs +++ b/src/integration/NServiceBus.Integration.WCF/WcfService.cs @@ -1,54 +1,54 @@ -using System; -using System.ServiceModel; - -namespace NServiceBus -{ - /// - /// Generic WCF service for exposing a messaging endpoint. - /// - /// - /// - [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall, - ConcurrencyMode = ConcurrencyMode.Multiple)] - public abstract class WcfService : IWcfService where TRequest : IMessage - { - protected WcfService() - { - bus = Configure.Instance.Builder.Build(); - } - - static WcfService() - { - if (!typeof(TResponse).IsEnum) - throw new InvalidOperationException(typeof(TResponse).FullName + " must be an enum representing error codes returned by the server."); - } - - IAsyncResult IWcfService.BeginProcess(TRequest request, AsyncCallback callback, object state) - { - var result = new ServiceAsyncResult(state); - - return bus.Send(request).Register(r => ProxyCallback(callback, result, r), state); - } - - TResponse IWcfService.EndProcess(IAsyncResult asyncResult) - { - var completionResult = ((ServiceAsyncResult) asyncResult).Result; - - if (completionResult == null) - throw new InvalidOperationException("Response returned from server did not contain a CompletionResult."); - - return (TResponse)Enum.ToObject(typeof(TResponse), completionResult.ErrorCode); - } - - private static void ProxyCallback(AsyncCallback callback, ServiceAsyncResult result, IAsyncResult busResult) - { - var completionResult = (CompletionResult)busResult.AsyncState; - - result.Complete(completionResult); - - callback(result); - } - - private readonly IBus bus; - } -} +using System; +using System.ServiceModel; + +namespace NServiceBus +{ + /// + /// Generic WCF service for exposing a messaging endpoint. + /// + /// + /// + [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall, + ConcurrencyMode = ConcurrencyMode.Multiple)] + public abstract class WcfService : IWcfService where TRequest : IMessage + { + protected WcfService() + { + bus = Configure.Instance.Builder.Build(); + } + + static WcfService() + { + if (!typeof(TResponse).IsEnum) + throw new InvalidOperationException(typeof(TResponse).FullName + " must be an enum representing error codes returned by the server."); + } + + IAsyncResult IWcfService.BeginProcess(TRequest request, AsyncCallback callback, object state) + { + var result = new ServiceAsyncResult(state); + + return bus.Send(request).Register(r => ProxyCallback(callback, result, r), state); + } + + TResponse IWcfService.EndProcess(IAsyncResult asyncResult) + { + var completionResult = ((ServiceAsyncResult) asyncResult).Result; + + if (completionResult == null) + throw new InvalidOperationException("Response returned from server did not contain a CompletionResult."); + + return (TResponse)Enum.ToObject(typeof(TResponse), completionResult.ErrorCode); + } + + private static void ProxyCallback(AsyncCallback callback, ServiceAsyncResult result, IAsyncResult busResult) + { + var completionResult = (CompletionResult)busResult.AsyncState; + + result.Complete(completionResult); + + callback(result); + } + + private readonly IBus bus; + } +} diff --git a/src/integration/NServiceBus.Integration.WebServices/NServiceBus.Integration.WebServices.csproj b/src/integration/NServiceBus.Integration.WebServices/NServiceBus.Integration.WebServices.csproj index 8e06f49e2e3..a70e4f17b75 100644 --- a/src/integration/NServiceBus.Integration.WebServices/NServiceBus.Integration.WebServices.csproj +++ b/src/integration/NServiceBus.Integration.WebServices/NServiceBus.Integration.WebServices.csproj @@ -1,80 +1,80 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {4BAFD4CB-59CC-49D6-B1FE-D5D27525D593} - Library - Properties - NServiceBus.Integration.WebServices - NServiceBus.Integration.WebServices - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\build\output\NServiceBus.dll - False - - - False - ..\..\..\build\nservicebus.core\NServiceBus.Config.dll - False - - - False - ..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll - False - - - - 3.5 - - - - 3.5 - - - 3.5 - - - - - - - CommonAssemblyInfo.cs - - - - Component - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {4BAFD4CB-59CC-49D6-B1FE-D5D27525D593} + Library + Properties + NServiceBus.Integration.WebServices + NServiceBus.Integration.WebServices + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\build\output\NServiceBus.dll + False + + + False + ..\..\..\build\nservicebus.core\NServiceBus.Config.dll + False + + + False + ..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll + False + + + + 3.5 + + + + 3.5 + + + 3.5 + + + + + + + CommonAssemblyInfo.cs + + + + Component + + + + \ No newline at end of file diff --git a/src/integration/NServiceBus.Integration.WebServices/Properties/AssemblyInfo.cs b/src/integration/NServiceBus.Integration.WebServices/Properties/AssemblyInfo.cs index 49edd65e4d4..506bdb7fab9 100644 --- a/src/integration/NServiceBus.Integration.WebServices/Properties/AssemblyInfo.cs +++ b/src/integration/NServiceBus.Integration.WebServices/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Web Services Integration")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Web Services Integration")] [assembly: AssemblyDescription("Implementation of NServiceBus integration with web services.")] \ No newline at end of file diff --git a/src/integration/NServiceBus.Integration.WebServices/Webservice.cs b/src/integration/NServiceBus.Integration.WebServices/Webservice.cs index 19c068a71b6..0081849f556 100644 --- a/src/integration/NServiceBus.Integration.WebServices/Webservice.cs +++ b/src/integration/NServiceBus.Integration.WebServices/Webservice.cs @@ -1,65 +1,65 @@ -using System; -using System.ComponentModel; -using System.Web.Services; - -namespace NServiceBus -{ - /// - /// Base class for writing web services that serve as a bridge to a messaging endpoint - /// - /// The request message type - /// The response code enumeration type - [WebService(Namespace = "http://tempuri.org/")] - [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] - [ToolboxItem(false)] - public abstract class Webservice : WebService where TRequest : IMessage - { - /// - /// Static constructor that checks that the type TResponse is an enum. - /// - static Webservice() - { - if (!typeof(TResponse).IsEnum) - throw new InvalidOperationException(typeof(TResponse).FullName + " must be an enum representing error codes returned by the server."); - } - - /// - /// Constructor to initialize bus. - /// - protected Webservice() - { - bus = Configure.Instance.Builder.Build(); - } - - /// - /// Initiates the sending of the message. - /// - /// - /// - /// - /// - [WebMethod] - public IAsyncResult BeginProcess(TRequest request, AsyncCallback cb, object state) - { - return bus.Send(request).Register(cb, state); - } - - /// - /// Handles the response from the server. - /// - /// - /// - [WebMethod] - public TResponse EndProcess(IAsyncResult ar) - { - var completionResult = ar.AsyncState as CompletionResult; - - if (completionResult == null) - throw new InvalidOperationException("Response returned from server did not contain a CompletionResult."); - - return (TResponse)Enum.ToObject(typeof(TResponse), completionResult.ErrorCode); - } - - private readonly IBus bus; - } -} +using System; +using System.ComponentModel; +using System.Web.Services; + +namespace NServiceBus +{ + /// + /// Base class for writing web services that serve as a bridge to a messaging endpoint + /// + /// The request message type + /// The response code enumeration type + [WebService(Namespace = "http://tempuri.org/")] + [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] + [ToolboxItem(false)] + public abstract class Webservice : WebService where TRequest : IMessage + { + /// + /// Static constructor that checks that the type TResponse is an enum. + /// + static Webservice() + { + if (!typeof(TResponse).IsEnum) + throw new InvalidOperationException(typeof(TResponse).FullName + " must be an enum representing error codes returned by the server."); + } + + /// + /// Constructor to initialize bus. + /// + protected Webservice() + { + bus = Configure.Instance.Builder.Build(); + } + + /// + /// Initiates the sending of the message. + /// + /// + /// + /// + /// + [WebMethod] + public IAsyncResult BeginProcess(TRequest request, AsyncCallback cb, object state) + { + return bus.Send(request).Register(cb, state); + } + + /// + /// Handles the response from the server. + /// + /// + /// + [WebMethod] + public TResponse EndProcess(IAsyncResult ar) + { + var completionResult = ar.AsyncState as CompletionResult; + + if (completionResult == null) + throw new InvalidOperationException("Response returned from server did not contain a CompletionResult."); + + return (TResponse)Enum.ToObject(typeof(TResponse), completionResult.ErrorCode); + } + + private readonly IBus bus; + } +} diff --git a/src/integration/integration.sln b/src/integration/integration.sln index 406c41d4a0d..33c4958499c 100644 --- a/src/integration/integration.sln +++ b/src/integration/integration.sln @@ -1,38 +1,38 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Integration.WebServices", "NServiceBus.Integration.WebServices\NServiceBus.Integration.WebServices.csproj", "{4BAFD4CB-59CC-49D6-B1FE-D5D27525D593}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Integration.WCF", "NServiceBus.Integration.WCF\NServiceBus.Integration.WCF.csproj", "{8CF614E1-FEAC-4C92-9F64-EF809C0BBC0A}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Integration.Azure", "NServiceBus.Integration.Azure\NServiceBus.Integration.Azure.csproj", "{641D0198-FE99-42F4-B6CB-A14D0E9F639E}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Integration.Azure.Tests", "NServiceBus.Integration.Azure.Tests\NServiceBus.Integration.Azure.Tests.csproj", "{CA59C36D-FA35-42B4-99B5-5725C6AF1B01}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {4BAFD4CB-59CC-49D6-B1FE-D5D27525D593}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4BAFD4CB-59CC-49D6-B1FE-D5D27525D593}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4BAFD4CB-59CC-49D6-B1FE-D5D27525D593}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4BAFD4CB-59CC-49D6-B1FE-D5D27525D593}.Release|Any CPU.Build.0 = Release|Any CPU - {8CF614E1-FEAC-4C92-9F64-EF809C0BBC0A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8CF614E1-FEAC-4C92-9F64-EF809C0BBC0A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8CF614E1-FEAC-4C92-9F64-EF809C0BBC0A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8CF614E1-FEAC-4C92-9F64-EF809C0BBC0A}.Release|Any CPU.Build.0 = Release|Any CPU - {641D0198-FE99-42F4-B6CB-A14D0E9F639E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {641D0198-FE99-42F4-B6CB-A14D0E9F639E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {641D0198-FE99-42F4-B6CB-A14D0E9F639E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {641D0198-FE99-42F4-B6CB-A14D0E9F639E}.Release|Any CPU.Build.0 = Release|Any CPU - {CA59C36D-FA35-42B4-99B5-5725C6AF1B01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CA59C36D-FA35-42B4-99B5-5725C6AF1B01}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CA59C36D-FA35-42B4-99B5-5725C6AF1B01}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CA59C36D-FA35-42B4-99B5-5725C6AF1B01}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Integration.WebServices", "NServiceBus.Integration.WebServices\NServiceBus.Integration.WebServices.csproj", "{4BAFD4CB-59CC-49D6-B1FE-D5D27525D593}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Integration.WCF", "NServiceBus.Integration.WCF\NServiceBus.Integration.WCF.csproj", "{8CF614E1-FEAC-4C92-9F64-EF809C0BBC0A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Integration.Azure", "NServiceBus.Integration.Azure\NServiceBus.Integration.Azure.csproj", "{641D0198-FE99-42F4-B6CB-A14D0E9F639E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Integration.Azure.Tests", "NServiceBus.Integration.Azure.Tests\NServiceBus.Integration.Azure.Tests.csproj", "{CA59C36D-FA35-42B4-99B5-5725C6AF1B01}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4BAFD4CB-59CC-49D6-B1FE-D5D27525D593}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4BAFD4CB-59CC-49D6-B1FE-D5D27525D593}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4BAFD4CB-59CC-49D6-B1FE-D5D27525D593}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4BAFD4CB-59CC-49D6-B1FE-D5D27525D593}.Release|Any CPU.Build.0 = Release|Any CPU + {8CF614E1-FEAC-4C92-9F64-EF809C0BBC0A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8CF614E1-FEAC-4C92-9F64-EF809C0BBC0A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8CF614E1-FEAC-4C92-9F64-EF809C0BBC0A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8CF614E1-FEAC-4C92-9F64-EF809C0BBC0A}.Release|Any CPU.Build.0 = Release|Any CPU + {641D0198-FE99-42F4-B6CB-A14D0E9F639E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {641D0198-FE99-42F4-B6CB-A14D0E9F639E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {641D0198-FE99-42F4-B6CB-A14D0E9F639E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {641D0198-FE99-42F4-B6CB-A14D0E9F639E}.Release|Any CPU.Build.0 = Release|Any CPU + {CA59C36D-FA35-42B4-99B5-5725C6AF1B01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CA59C36D-FA35-42B4-99B5-5725C6AF1B01}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CA59C36D-FA35-42B4-99B5-5725C6AF1B01}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CA59C36D-FA35-42B4-99B5-5725C6AF1B01}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/logging/NServiceBus.Logging.sln b/src/logging/NServiceBus.Logging.sln index 657900fa9ed..a34fc5c1c47 100644 --- a/src/logging/NServiceBus.Logging.sln +++ b/src/logging/NServiceBus.Logging.sln @@ -1,20 +1,20 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Logging", "NServiceBus.Logging\NServiceBus.Logging.csproj", "{12EDCB05-7B96-4CF8-A968-492388B97BB5}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {12EDCB05-7B96-4CF8-A968-492388B97BB5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {12EDCB05-7B96-4CF8-A968-492388B97BB5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {12EDCB05-7B96-4CF8-A968-492388B97BB5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {12EDCB05-7B96-4CF8-A968-492388B97BB5}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Logging", "NServiceBus.Logging\NServiceBus.Logging.csproj", "{12EDCB05-7B96-4CF8-A968-492388B97BB5}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {12EDCB05-7B96-4CF8-A968-492388B97BB5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {12EDCB05-7B96-4CF8-A968-492388B97BB5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {12EDCB05-7B96-4CF8-A968-492388B97BB5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {12EDCB05-7B96-4CF8-A968-492388B97BB5}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/logging/NServiceBus.Logging/Logging.cs b/src/logging/NServiceBus.Logging/Logging.cs index 01800478251..b876bf0bf44 100644 --- a/src/logging/NServiceBus.Logging/Logging.cs +++ b/src/logging/NServiceBus.Logging/Logging.cs @@ -1,23 +1,23 @@ -using System.Configuration; - -namespace NServiceBus.Config -{ - public class Logging : ConfigurationSection - { - /// - /// The minimal logging level above which all calls to the log will be written - /// - [ConfigurationProperty("Threshold", IsRequired = true)] - public string Threshold - { - get - { - return this["Threshold"] as string; - } - set - { - this["Threshold"] = value; - } - } - } -} +using System.Configuration; + +namespace NServiceBus.Config +{ + public class Logging : ConfigurationSection + { + /// + /// The minimal logging level above which all calls to the log will be written + /// + [ConfigurationProperty("Threshold", IsRequired = true)] + public string Threshold + { + get + { + return this["Threshold"] as string; + } + set + { + this["Threshold"] = value; + } + } + } +} diff --git a/src/logging/NServiceBus.Logging/NServiceBus.Logging.csproj b/src/logging/NServiceBus.Logging/NServiceBus.Logging.csproj index f070fd82846..33f7c3fdbf1 100644 --- a/src/logging/NServiceBus.Logging/NServiceBus.Logging.csproj +++ b/src/logging/NServiceBus.Logging/NServiceBus.Logging.csproj @@ -1,89 +1,89 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {12EDCB05-7B96-4CF8-A968-492388B97BB5} - Library - Properties - NServiceBus.Logging - NServiceBus.Logging - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.Logging.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.Logging.XML - - - - False - ..\..\..\lib\Common.Logging.dll - False - - - False - ..\..\..\lib\Common.Logging.Log4Net.dll - False - - - False - ..\..\..\lib\log4net.dll - False - - - False - ..\..\..\build\nservicebus.core\NServiceBus.Config.dll - False - - - - - 3.5 - - - 3.5 - - - 3.5 - - - - - - - CommonAssemblyInfo.cs - - - - - - - - - copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\build\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {12EDCB05-7B96-4CF8-A968-492388B97BB5} + Library + Properties + NServiceBus.Logging + NServiceBus.Logging + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.Logging.XML + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.Logging.XML + + + + False + ..\..\..\lib\Common.Logging.dll + False + + + False + ..\..\..\lib\Common.Logging.Log4Net.dll + False + + + False + ..\..\..\lib\log4net.dll + False + + + False + ..\..\..\build\nservicebus.core\NServiceBus.Config.dll + False + + + + + 3.5 + + + 3.5 + + + 3.5 + + + + + + + CommonAssemblyInfo.cs + + + + + + + + + copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\build\" + \ No newline at end of file diff --git a/src/logging/NServiceBus.Logging/Properties/AssemblyInfo.cs b/src/logging/NServiceBus.Logging/Properties/AssemblyInfo.cs index 6c1273976ed..05e299cd818 100644 --- a/src/logging/NServiceBus.Logging/Properties/AssemblyInfo.cs +++ b/src/logging/NServiceBus.Logging/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Log4Net Integration")] -[assembly: AssemblyDescription("Integration functionality for plugging Log4Net into NServiceBus.")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Log4Net Integration")] +[assembly: AssemblyDescription("Integration functionality for plugging Log4Net into NServiceBus.")] diff --git a/src/logging/NServiceBus.Logging/SetLoggingLibrary.cs b/src/logging/NServiceBus.Logging/SetLoggingLibrary.cs index f8ad6130f76..e89508d19dd 100644 --- a/src/logging/NServiceBus.Logging/SetLoggingLibrary.cs +++ b/src/logging/NServiceBus.Logging/SetLoggingLibrary.cs @@ -1,94 +1,94 @@ -using System; -using System.Collections.Specialized; -using System.Configuration; -using log4net.Appender; -using log4net.Core; -using System.Globalization; -using System.Reflection; - -namespace NServiceBus -{ - /// - /// Class containing extension method to allow users to use Log4Net for logging - /// - public static class SetLoggingLibrary - { - /// - /// Use Log4Net for logging with the Console Appender at the level of All. - /// - public static Configure Log4Net(this Configure config) - { - return config.Log4Net(ca => ca.Threshold = Level.All); - } - - /// - /// Use Log4Net for logging with your own appender type, initializing it as necessary. - /// Will call 'ActivateOptions()' on the appender for you. - /// If you don't specify a threshold, will default to Level.Debug. - /// If you don't specify layout, uses this as a default: %d [%t] %-5p %c [%x] <%X{auth}> - %m%n - /// - public static Configure Log4Net(this Configure config, Action initializeAppender) where Appender : AppenderSkeleton, new() - { - var appender = new Appender(); - initializeAppender(appender); - - return config.Log4Net(appender); - } - - /// - /// Use Log4Net for logging passing in a pre-configured appender. - /// Will call 'ActivateOptions()' on the appender for you. - /// If you don't specify a threshold, will default to Level.Debug. - /// If you don't specify layout, uses this as a default: %d [%t] %-5p %c [%x] <%X{auth}> - %m%n - /// - public static Configure Log4Net(this Configure config, AppenderSkeleton appender) - { - Log4Net(); - - if (appender.Layout == null) - appender.Layout = new log4net.Layout.PatternLayout("%d [%t] %-5p %c [%x] <%X{auth}> - %m%n"); - if (appender.Threshold == null) - { - var cfg = ConfigurationManager.GetSection(typeof(Config.Logging).Name) as Config.Logging; - if (cfg != null) - { - foreach(var f in typeof(Level).GetFields(BindingFlags.Public | BindingFlags.Static)) - if (string.Compare(cfg.Threshold, f.Name, true) == 0) - { - var val = f.GetValue(null); - appender.Threshold = val as Level; - break; - } - } - else - appender.Threshold = Level.Warn; - } - - appender.ActivateOptions(); - - log4net.Config.BasicConfigurator.Configure(appender); - - return config; - } - - /// - /// Configure NServiceBus to use Log4Net without setting a specific appender. - /// - public static void Log4Net() - { - var props = new NameValueCollection(); - props["configType"] = "EXTERNAL"; - Common.Logging.LogManager.Adapter = new Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter(props); - } - - /// - /// Configure NServiceBus to use Log4Net and specify your own configuration. - /// - public static void Log4Net(Action config) - { - Log4Net(); - - config(); - } - } -} +using System; +using System.Collections.Specialized; +using System.Configuration; +using log4net.Appender; +using log4net.Core; +using System.Globalization; +using System.Reflection; + +namespace NServiceBus +{ + /// + /// Class containing extension method to allow users to use Log4Net for logging + /// + public static class SetLoggingLibrary + { + /// + /// Use Log4Net for logging with the Console Appender at the level of All. + /// + public static Configure Log4Net(this Configure config) + { + return config.Log4Net(ca => ca.Threshold = Level.All); + } + + /// + /// Use Log4Net for logging with your own appender type, initializing it as necessary. + /// Will call 'ActivateOptions()' on the appender for you. + /// If you don't specify a threshold, will default to Level.Debug. + /// If you don't specify layout, uses this as a default: %d [%t] %-5p %c [%x] <%X{auth}> - %m%n + /// + public static Configure Log4Net(this Configure config, Action initializeAppender) where Appender : AppenderSkeleton, new() + { + var appender = new Appender(); + initializeAppender(appender); + + return config.Log4Net(appender); + } + + /// + /// Use Log4Net for logging passing in a pre-configured appender. + /// Will call 'ActivateOptions()' on the appender for you. + /// If you don't specify a threshold, will default to Level.Debug. + /// If you don't specify layout, uses this as a default: %d [%t] %-5p %c [%x] <%X{auth}> - %m%n + /// + public static Configure Log4Net(this Configure config, AppenderSkeleton appender) + { + Log4Net(); + + if (appender.Layout == null) + appender.Layout = new log4net.Layout.PatternLayout("%d [%t] %-5p %c [%x] <%X{auth}> - %m%n"); + if (appender.Threshold == null) + { + var cfg = ConfigurationManager.GetSection(typeof(Config.Logging).Name) as Config.Logging; + if (cfg != null) + { + foreach(var f in typeof(Level).GetFields(BindingFlags.Public | BindingFlags.Static)) + if (string.Compare(cfg.Threshold, f.Name, true) == 0) + { + var val = f.GetValue(null); + appender.Threshold = val as Level; + break; + } + } + else + appender.Threshold = Level.Warn; + } + + appender.ActivateOptions(); + + log4net.Config.BasicConfigurator.Configure(appender); + + return config; + } + + /// + /// Configure NServiceBus to use Log4Net without setting a specific appender. + /// + public static void Log4Net() + { + var props = new NameValueCollection(); + props["configType"] = "EXTERNAL"; + Common.Logging.LogManager.Adapter = new Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter(props); + } + + /// + /// Configure NServiceBus to use Log4Net and specify your own configuration. + /// + public static void Log4Net(Action config) + { + Log4Net(); + + config(); + } + } +} diff --git a/src/messageInterfaces/NServiceBus.MessageInterfaces/IMessageMapper.cs b/src/messageInterfaces/NServiceBus.MessageInterfaces/IMessageMapper.cs index 8ce67978e84..aec1e1ca541 100644 --- a/src/messageInterfaces/NServiceBus.MessageInterfaces/IMessageMapper.cs +++ b/src/messageInterfaces/NServiceBus.MessageInterfaces/IMessageMapper.cs @@ -1,33 +1,33 @@ -using System; -using System.Collections.Generic; - -namespace NServiceBus.MessageInterfaces -{ - /// - /// Enables looking up interfaced mapped to generated concrete types - /// and vice versa. - /// - public interface IMessageMapper : IMessageCreator - { - /// - /// Initializes the mapper with the given types to be scanned. - /// - /// - void Initialize(IEnumerable types); - - /// - /// If the given type is an interface, returns the generated concrete type. - /// If the given type is concerete, returns the interface it was generated from. - /// - /// - /// - Type GetMappedTypeFor(Type t); - - /// - /// Looks up the type mapped for the given name. - /// - /// - /// - Type GetMappedTypeFor(string typeName); - } -} +using System; +using System.Collections.Generic; + +namespace NServiceBus.MessageInterfaces +{ + /// + /// Enables looking up interfaced mapped to generated concrete types + /// and vice versa. + /// + public interface IMessageMapper : IMessageCreator + { + /// + /// Initializes the mapper with the given types to be scanned. + /// + /// + void Initialize(IEnumerable types); + + /// + /// If the given type is an interface, returns the generated concrete type. + /// If the given type is concerete, returns the interface it was generated from. + /// + /// + /// + Type GetMappedTypeFor(Type t); + + /// + /// Looks up the type mapped for the given name. + /// + /// + /// + Type GetMappedTypeFor(string typeName); + } +} diff --git a/src/messageInterfaces/NServiceBus.MessageInterfaces/NServiceBus.MessageInterfaces.csproj b/src/messageInterfaces/NServiceBus.MessageInterfaces/NServiceBus.MessageInterfaces.csproj index 55d5ca67f9a..68500808da5 100644 --- a/src/messageInterfaces/NServiceBus.MessageInterfaces/NServiceBus.MessageInterfaces.csproj +++ b/src/messageInterfaces/NServiceBus.MessageInterfaces/NServiceBus.MessageInterfaces.csproj @@ -1,101 +1,101 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {F3D13CDB-B5AE-4CEE-BDA9-6A7007D09FA6} - Library - Properties - NServiceBus.MessageInterfaces - NServiceBus.MessageInterfaces - - - - - - v4.0 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.MessageInterfaces.XML - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.MessageInterfaces.XML - AllRules.ruleset - - - - False - ..\..\..\build\output\NServiceBus.dll - - - - 3.5 - - - - - CommonAssemblyInfo.cs - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - xcopy /Y "$(OutDir)*.*" "$(ProjectDir)..\..\..\build\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {F3D13CDB-B5AE-4CEE-BDA9-6A7007D09FA6} + Library + Properties + NServiceBus.MessageInterfaces + NServiceBus.MessageInterfaces + + + + + + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.MessageInterfaces.XML + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.MessageInterfaces.XML + AllRules.ruleset + + + + False + ..\..\..\build\output\NServiceBus.dll + + + + 3.5 + + + + + CommonAssemblyInfo.cs + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + xcopy /Y "$(OutDir)*.*" "$(ProjectDir)..\..\..\build\" + \ No newline at end of file diff --git a/src/messageInterfaces/NServiceBus.MessageInterfaces/Properties/AssemblyInfo.cs b/src/messageInterfaces/NServiceBus.MessageInterfaces/Properties/AssemblyInfo.cs index d0de550d11f..980ff27de08 100644 --- a/src/messageInterfaces/NServiceBus.MessageInterfaces/Properties/AssemblyInfo.cs +++ b/src/messageInterfaces/NServiceBus.MessageInterfaces/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Message Interfaces")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Message Interfaces")] [assembly: AssemblyDescription("Interfaces for creating messages and mapping from interface types to concrete types, and back.")] \ No newline at end of file diff --git a/src/messageInterfaces/messageInterfaces.sln b/src/messageInterfaces/messageInterfaces.sln index 56cd974d01c..ba9b1709f18 100644 --- a/src/messageInterfaces/messageInterfaces.sln +++ b/src/messageInterfaces/messageInterfaces.sln @@ -1,20 +1,20 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.MessageInterfaces", "NServiceBus.MessageInterfaces\NServiceBus.MessageInterfaces.csproj", "{F3D13CDB-B5AE-4CEE-BDA9-6A7007D09FA6}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {F3D13CDB-B5AE-4CEE-BDA9-6A7007D09FA6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F3D13CDB-B5AE-4CEE-BDA9-6A7007D09FA6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F3D13CDB-B5AE-4CEE-BDA9-6A7007D09FA6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F3D13CDB-B5AE-4CEE-BDA9-6A7007D09FA6}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.MessageInterfaces", "NServiceBus.MessageInterfaces\NServiceBus.MessageInterfaces.csproj", "{F3D13CDB-B5AE-4CEE-BDA9-6A7007D09FA6}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F3D13CDB-B5AE-4CEE-BDA9-6A7007D09FA6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F3D13CDB-B5AE-4CEE-BDA9-6A7007D09FA6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F3D13CDB-B5AE-4CEE-BDA9-6A7007D09FA6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F3D13CDB-B5AE-4CEE-BDA9-6A7007D09FA6}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/messagemutator/NServiceBus.MessageMutator.sln b/src/messagemutator/NServiceBus.MessageMutator.sln index aad14d1f2ce..b79c919e204 100644 --- a/src/messagemutator/NServiceBus.MessageMutator.sln +++ b/src/messagemutator/NServiceBus.MessageMutator.sln @@ -1,20 +1,20 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.MessageMutator", ".\NServiceBus.MessageMutator\NServiceBus.MessageMutator.csproj", "{0CAB0C44-B469-4956-BCA6-71EB26EAB9FB}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {0CAB0C44-B469-4956-BCA6-71EB26EAB9FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0CAB0C44-B469-4956-BCA6-71EB26EAB9FB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0CAB0C44-B469-4956-BCA6-71EB26EAB9FB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0CAB0C44-B469-4956-BCA6-71EB26EAB9FB}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.MessageMutator", ".\NServiceBus.MessageMutator\NServiceBus.MessageMutator.csproj", "{0CAB0C44-B469-4956-BCA6-71EB26EAB9FB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0CAB0C44-B469-4956-BCA6-71EB26EAB9FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0CAB0C44-B469-4956-BCA6-71EB26EAB9FB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0CAB0C44-B469-4956-BCA6-71EB26EAB9FB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0CAB0C44-B469-4956-BCA6-71EB26EAB9FB}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/messagemutator/NServiceBus.MessageMutator/IMapTransportMessages.cs b/src/messagemutator/NServiceBus.MessageMutator/IMapTransportMessages.cs index 00fca8853ce..4f2fb6a09cf 100644 --- a/src/messagemutator/NServiceBus.MessageMutator/IMapTransportMessages.cs +++ b/src/messagemutator/NServiceBus.MessageMutator/IMapTransportMessages.cs @@ -1,12 +1,12 @@ -using NServiceBus.Unicast.Transport; - -namespace NServiceBus.MessageMutator -{ - /// - /// Maps between the messages requested to be sent to the physical transport message that will be sent. - /// - public interface IMapOutgoingTransportMessages - { - void MapOutgoing(IMessage[] messages, TransportMessage transportMessage); - } -} +using NServiceBus.Unicast.Transport; + +namespace NServiceBus.MessageMutator +{ + /// + /// Maps between the messages requested to be sent to the physical transport message that will be sent. + /// + public interface IMapOutgoingTransportMessages + { + void MapOutgoing(IMessage[] messages, TransportMessage transportMessage); + } +} diff --git a/src/messagemutator/NServiceBus.MessageMutator/IMessageMutator.cs b/src/messagemutator/NServiceBus.MessageMutator/IMessageMutator.cs index 0b4eb82165f..9df8297d095 100644 --- a/src/messagemutator/NServiceBus.MessageMutator/IMessageMutator.cs +++ b/src/messagemutator/NServiceBus.MessageMutator/IMessageMutator.cs @@ -1,34 +1,34 @@ - -namespace NServiceBus.MessageMutator -{ - /// - /// Use this interface to hook into the seralization pipeline - /// - public interface IMessageMutator : IMutateOutgoingMessages, IMutateIncomingMessages{} - - /// - /// Mutaor for incoming messages - /// - public interface IMutateIncomingMessages - { - /// - /// Mutates the given message right after it has been deseralized - /// - /// - /// - IMessage MutateIncoming(IMessage message); - } - - /// - /// Mutates outgoing messages - /// - public interface IMutateOutgoingMessages - { - /// - /// Mutates the given message just before it's serialized - /// - /// - /// - IMessage MutateOutgoing(IMessage message); - } + +namespace NServiceBus.MessageMutator +{ + /// + /// Use this interface to hook into the seralization pipeline + /// + public interface IMessageMutator : IMutateOutgoingMessages, IMutateIncomingMessages{} + + /// + /// Mutaor for incoming messages + /// + public interface IMutateIncomingMessages + { + /// + /// Mutates the given message right after it has been deseralized + /// + /// + /// + IMessage MutateIncoming(IMessage message); + } + + /// + /// Mutates outgoing messages + /// + public interface IMutateOutgoingMessages + { + /// + /// Mutates the given message just before it's serialized + /// + /// + /// + IMessage MutateOutgoing(IMessage message); + } } \ No newline at end of file diff --git a/src/messagemutator/NServiceBus.MessageMutator/NServiceBus.MessageMutator.csproj b/src/messagemutator/NServiceBus.MessageMutator/NServiceBus.MessageMutator.csproj index d2e0d76d521..03887eda64a 100644 --- a/src/messagemutator/NServiceBus.MessageMutator/NServiceBus.MessageMutator.csproj +++ b/src/messagemutator/NServiceBus.MessageMutator/NServiceBus.MessageMutator.csproj @@ -1,61 +1,61 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {0CAB0C44-B469-4956-BCA6-71EB26EAB9FB} - Library - Properties - NServiceBus.MessageMutator - NServiceBus.MessageMutator - v4.0 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\..\..\build\output\NServiceBus.dll - - - ..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll - False - - - - - - - CommonAssemblyInfo.cs - - - - - - - + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {0CAB0C44-B469-4956-BCA6-71EB26EAB9FB} + Library + Properties + NServiceBus.MessageMutator + NServiceBus.MessageMutator + v4.0 + 512 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\..\build\output\NServiceBus.dll + + + ..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll + False + + + + + + + CommonAssemblyInfo.cs + + + + + + + \ No newline at end of file diff --git a/src/messagemutator/NServiceBus.MessageMutator/Properties/AssemblyInfo.cs b/src/messagemutator/NServiceBus.MessageMutator/Properties/AssemblyInfo.cs index 71173535792..aeb45acd914 100644 --- a/src/messagemutator/NServiceBus.MessageMutator/Properties/AssemblyInfo.cs +++ b/src/messagemutator/NServiceBus.MessageMutator/Properties/AssemblyInfo.cs @@ -1,3 +1,3 @@ -using System.Reflection; - +using System.Reflection; + [assembly: AssemblyTitle("NServiceBus.MessageMutator")] \ No newline at end of file diff --git a/src/proxy/NServiceBus.Proxy.sln b/src/proxy/NServiceBus.Proxy.sln index 442d0b06b30..871cc9fa082 100644 --- a/src/proxy/NServiceBus.Proxy.sln +++ b/src/proxy/NServiceBus.Proxy.sln @@ -1,20 +1,20 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Proxy", "NServiceBus.Proxy\NServiceBus.Proxy.csproj", "{DE737CE6-63B7-4744-B247-4A9C17CB7C13}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {DE737CE6-63B7-4744-B247-4A9C17CB7C13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DE737CE6-63B7-4744-B247-4A9C17CB7C13}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DE737CE6-63B7-4744-B247-4A9C17CB7C13}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DE737CE6-63B7-4744-B247-4A9C17CB7C13}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Proxy", "NServiceBus.Proxy\NServiceBus.Proxy.csproj", "{DE737CE6-63B7-4744-B247-4A9C17CB7C13}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DE737CE6-63B7-4744-B247-4A9C17CB7C13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DE737CE6-63B7-4744-B247-4A9C17CB7C13}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DE737CE6-63B7-4744-B247-4A9C17CB7C13}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DE737CE6-63B7-4744-B247-4A9C17CB7C13}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/proxy/NServiceBus.Proxy/App.config b/src/proxy/NServiceBus.Proxy/App.config index 3446a801637..94cff2d7b9a 100644 --- a/src/proxy/NServiceBus.Proxy/App.config +++ b/src/proxy/NServiceBus.Proxy/App.config @@ -1,42 +1,42 @@ - - - - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/proxy/NServiceBus.Proxy/EndpointConfig.cs b/src/proxy/NServiceBus.Proxy/EndpointConfig.cs index b0def5c1899..10ed99cf0fd 100644 --- a/src/proxy/NServiceBus.Proxy/EndpointConfig.cs +++ b/src/proxy/NServiceBus.Proxy/EndpointConfig.cs @@ -1,62 +1,62 @@ -using System.Configuration; -using log4net; -using NServiceBus.ObjectBuilder; -using NServiceBus.Unicast.Queuing.Msmq; -using NServiceBus.Unicast.Subscriptions.Msmq; -using NServiceBus.Unicast.Transport.Transactional; - -namespace NServiceBus.Proxy -{ - class EndpointConfig : IConfigureThisEndpoint, IWantCustomInitialization - { - public void Init() - { - var numberOfThreads = int.Parse(ConfigurationManager.AppSettings["NumberOfWorkerThreads"]); - var maxRetries = int.Parse(ConfigurationManager.AppSettings["MaxRetries"]); - var remoteServer = ConfigurationManager.AppSettings["RemoteServer"]; - - var externalTransport = new TransactionalTransport - { - NumberOfWorkerThreads = numberOfThreads, - MaxRetries = maxRetries, - IsTransactional = true, - MessageReceiver = new MsmqMessageReceiver() - }; - - var internalTransport = new TransactionalTransport - { - NumberOfWorkerThreads = numberOfThreads, - MaxRetries = maxRetries, - IsTransactional = true, - MessageReceiver = new MsmqMessageReceiver() - }; - - var configure = Configure.With().DefaultBuilder(); - - configure.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton) - .ConfigureProperty(x => x.Queue, "NServiceBus_Proxy_Subscriptions"); - - configure.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton) - .ConfigureProperty(x => x.StorageQueue, "NServiceBus_Proxy_Storage"); - - configure.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton) - .ConfigureProperty(x => x.RemoteServer, remoteServer); - Logger.Info("Proxy configured for remoteserver: " + remoteServer); - - var proxy = configure.Builder.Build(); - proxy.ExternalTransport = externalTransport; - proxy.ExternalMessageSender = new MsmqMessageSender(); - proxy.InternalTransport = internalTransport; - proxy.InternalMessageSender = new MsmqMessageSender(); - - proxy.InternalAddress = ConfigurationManager.AppSettings["InternalQueue"]; - proxy.ExternalAddress = ConfigurationManager.AppSettings["ExternalQueue"]; - - proxy.Start(); - - Logger.Info("Proxy successfully started"); - } - - private static readonly ILog Logger = LogManager.GetLogger(typeof (EndpointConfig)); - } -} +using System.Configuration; +using log4net; +using NServiceBus.ObjectBuilder; +using NServiceBus.Unicast.Queuing.Msmq; +using NServiceBus.Unicast.Subscriptions.Msmq; +using NServiceBus.Unicast.Transport.Transactional; + +namespace NServiceBus.Proxy +{ + class EndpointConfig : IConfigureThisEndpoint, IWantCustomInitialization + { + public void Init() + { + var numberOfThreads = int.Parse(ConfigurationManager.AppSettings["NumberOfWorkerThreads"]); + var maxRetries = int.Parse(ConfigurationManager.AppSettings["MaxRetries"]); + var remoteServer = ConfigurationManager.AppSettings["RemoteServer"]; + + var externalTransport = new TransactionalTransport + { + NumberOfWorkerThreads = numberOfThreads, + MaxRetries = maxRetries, + IsTransactional = true, + MessageReceiver = new MsmqMessageReceiver() + }; + + var internalTransport = new TransactionalTransport + { + NumberOfWorkerThreads = numberOfThreads, + MaxRetries = maxRetries, + IsTransactional = true, + MessageReceiver = new MsmqMessageReceiver() + }; + + var configure = Configure.With().DefaultBuilder(); + + configure.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton) + .ConfigureProperty(x => x.Queue, "NServiceBus_Proxy_Subscriptions"); + + configure.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton) + .ConfigureProperty(x => x.StorageQueue, "NServiceBus_Proxy_Storage"); + + configure.Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton) + .ConfigureProperty(x => x.RemoteServer, remoteServer); + Logger.Info("Proxy configured for remoteserver: " + remoteServer); + + var proxy = configure.Builder.Build(); + proxy.ExternalTransport = externalTransport; + proxy.ExternalMessageSender = new MsmqMessageSender(); + proxy.InternalTransport = internalTransport; + proxy.InternalMessageSender = new MsmqMessageSender(); + + proxy.InternalAddress = ConfigurationManager.AppSettings["InternalQueue"]; + proxy.ExternalAddress = ConfigurationManager.AppSettings["ExternalQueue"]; + + proxy.Start(); + + Logger.Info("Proxy successfully started"); + } + + private static readonly ILog Logger = LogManager.GetLogger(typeof (EndpointConfig)); + } +} diff --git a/src/proxy/NServiceBus.Proxy/IProxyDataStorage.cs b/src/proxy/NServiceBus.Proxy/IProxyDataStorage.cs index 9f96f1e1a45..4e99bfa7652 100644 --- a/src/proxy/NServiceBus.Proxy/IProxyDataStorage.cs +++ b/src/proxy/NServiceBus.Proxy/IProxyDataStorage.cs @@ -1,8 +1,8 @@ -namespace NServiceBus.Proxy -{ - public interface IProxyDataStorage - { - void Save(ProxyData data); - ProxyData GetAndRemove(string id); - } -} +namespace NServiceBus.Proxy +{ + public interface IProxyDataStorage + { + void Save(ProxyData data); + ProxyData GetAndRemove(string id); + } +} diff --git a/src/proxy/NServiceBus.Proxy/MsmqProxyDataStorage.cs b/src/proxy/NServiceBus.Proxy/MsmqProxyDataStorage.cs index adfb7507cf8..3f0eecb6c89 100644 --- a/src/proxy/NServiceBus.Proxy/MsmqProxyDataStorage.cs +++ b/src/proxy/NServiceBus.Proxy/MsmqProxyDataStorage.cs @@ -1,56 +1,56 @@ -using System; -using System.Messaging; -using NServiceBus.Utils; - -namespace NServiceBus.Proxy -{ - class MsmqProxyDataStorage : IProxyDataStorage - { - private MessageQueue storageQueue; - - public string StorageQueue - { - get{ return s; } - set - { - s = value; - - MsmqUtilities.CreateQueueIfNecessary(value); - - string path = MsmqUtilities.GetFullPath(value); - - var q = new MessageQueue(path); - - if (!q.Transactional) - throw new Exception("Queue must be transactional."); - - q.Formatter = new XmlMessageFormatter {TargetTypes = new[] {typeof (ProxyData)}}; - q.MessageReadPropertyFilter = new MessagePropertyFilter { Body = true, CorrelationId = true }; - - storageQueue = q; - - } - } - private string s; - - public void Save(ProxyData data) - { - storageQueue.Send( - new Message {CorrelationId = data.Id, Body = data, Recoverable = true}, - MessageQueueTransactionType.Automatic); - } - - public ProxyData GetAndRemove(string id) - { - try - { - var msg = storageQueue.ReceiveByCorrelationId(id); - return msg.Body as ProxyData; - } - catch (Exception) // the receive method throws if the message isn't there - { - return null; - } - } - } -} +using System; +using System.Messaging; +using NServiceBus.Utils; + +namespace NServiceBus.Proxy +{ + class MsmqProxyDataStorage : IProxyDataStorage + { + private MessageQueue storageQueue; + + public string StorageQueue + { + get{ return s; } + set + { + s = value; + + MsmqUtilities.CreateQueueIfNecessary(value); + + string path = MsmqUtilities.GetFullPath(value); + + var q = new MessageQueue(path); + + if (!q.Transactional) + throw new Exception("Queue must be transactional."); + + q.Formatter = new XmlMessageFormatter {TargetTypes = new[] {typeof (ProxyData)}}; + q.MessageReadPropertyFilter = new MessagePropertyFilter { Body = true, CorrelationId = true }; + + storageQueue = q; + + } + } + private string s; + + public void Save(ProxyData data) + { + storageQueue.Send( + new Message {CorrelationId = data.Id, Body = data, Recoverable = true}, + MessageQueueTransactionType.Automatic); + } + + public ProxyData GetAndRemove(string id) + { + try + { + var msg = storageQueue.ReceiveByCorrelationId(id); + return msg.Body as ProxyData; + } + catch (Exception) // the receive method throws if the message isn't there + { + return null; + } + } + } +} diff --git a/src/proxy/NServiceBus.Proxy/NServiceBus.Proxy.csproj b/src/proxy/NServiceBus.Proxy/NServiceBus.Proxy.csproj index 33df2d03359..2e128a9f947 100644 --- a/src/proxy/NServiceBus.Proxy/NServiceBus.Proxy.csproj +++ b/src/proxy/NServiceBus.Proxy/NServiceBus.Proxy.csproj @@ -1,129 +1,129 @@ - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {DE737CE6-63B7-4744-B247-4A9C17CB7C13} - Library - Properties - NServiceBus.Proxy - NServiceBus.Proxy - - - - - - http://localhost/NServiceBus.Proxy/ - true - Web - true - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - true - false - true - v4.0 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\lib\log4net.dll - - - False - ..\..\..\build\output\NServiceBus.dll - - - False - ..\..\..\build\output\NServiceBus.Core.dll - - - False - ..\..\..\build\output\host\NServiceBus.Host.exe - - - - - 3.5 - - - - - - - - CommonAssemblyInfo.cs - - - - - - - - - - - False - .NET Framework Client Profile - false - - - False - .NET Framework 2.0 %28x86%29 - true - - - False - .NET Framework 3.0 %28x86%29 - false - - - False - .NET Framework 3.5 - false - - - False - .NET Framework 3.5 SP1 - false - - - - - - - - - xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\build\proxy\" - + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {DE737CE6-63B7-4744-B247-4A9C17CB7C13} + Library + Properties + NServiceBus.Proxy + NServiceBus.Proxy + + + + + + http://localhost/NServiceBus.Proxy/ + true + Web + true + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + true + false + true + v4.0 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\lib\log4net.dll + + + False + ..\..\..\build\output\NServiceBus.dll + + + False + ..\..\..\build\output\NServiceBus.Core.dll + + + False + ..\..\..\build\output\host\NServiceBus.Host.exe + + + + + 3.5 + + + + + + + + CommonAssemblyInfo.cs + + + + + + + + + + + False + .NET Framework Client Profile + false + + + False + .NET Framework 2.0 %28x86%29 + true + + + False + .NET Framework 3.0 %28x86%29 + false + + + False + .NET Framework 3.5 + false + + + False + .NET Framework 3.5 SP1 + false + + + + + + + + + xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\build\proxy\" + \ No newline at end of file diff --git a/src/proxy/NServiceBus.Proxy/Properties/AssemblyInfo.cs b/src/proxy/NServiceBus.Proxy/Properties/AssemblyInfo.cs index 78279c3c9a1..dd99969a97d 100644 --- a/src/proxy/NServiceBus.Proxy/Properties/AssemblyInfo.cs +++ b/src/proxy/NServiceBus.Proxy/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Proxy Logic")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Proxy Logic")] [assembly: AssemblyDescription("Functionality for multiple clients to talk to remote servers opening only one port.")] \ No newline at end of file diff --git a/src/proxy/NServiceBus.Proxy/Proxy.cs b/src/proxy/NServiceBus.Proxy/Proxy.cs index af4ad46c4ac..f6d3290a395 100644 --- a/src/proxy/NServiceBus.Proxy/Proxy.cs +++ b/src/proxy/NServiceBus.Proxy/Proxy.cs @@ -1,153 +1,153 @@ -using System; -using log4net; -using NServiceBus.Unicast.Queuing; -using NServiceBus.Unicast.Subscriptions; -using NServiceBus.Unicast.Transport; -using NServiceBus.Unicast; - -namespace NServiceBus.Proxy -{ - public class Proxy - { - #region config - - public ISubscriptionStorage Subscribers { get; set; } - - private ITransport externalTransport; - public ITransport ExternalTransport - { - set - { - externalTransport = value; - - externalTransport.TransportMessageReceived += ExternalTransportTransportMessageReceived; - } - } - - private ITransport internalTransport; - public ITransport InternalTransport - { - set - { - internalTransport = value; - - internalTransport.TransportMessageReceived += InternalTransportTransportMessageReceived; - } - } - - public ISendMessages InternalMessageSender { get; set; } - - public ISendMessages ExternalMessageSender { get; set; } - - public IProxyDataStorage Storage { private get; set; } - - public string RemoteServer - { - get { return remoteServer; } - set - { - var arr = value.Split('@'); - - var queue = arr[0]; - var machine = Environment.MachineName; - - if (arr.Length == 2) - if (arr[1] != "." && arr[1].ToLower() != "localhost") - machine = arr[1]; - - remoteServer = queue + "@" + machine; - } - } - - private string remoteServer; - - public string ExternalAddress { get; set; } - - public string InternalAddress { get; set; } - - #endregion - - - public void Start() - { - internalTransport.Start(InternalAddress); - externalTransport.Start(ExternalAddress); - } - - void ExternalTransportTransportMessageReceived(object sender, TransportMessageReceivedEventArgs e) - { - if (e.Message.MessageIntent == MessageIntentEnum.Publish) - { - string val = null; - foreach (var header in e.Message.Headers) - if (header.Key == UnicastBus.EnclosedMessageTypes) - val = header.Value; - - var types = UnicastBus.DeserializeEnclosedMessageTypes(val); - - var subs = Subscribers.GetSubscribersForMessage(types); - - Logger.Debug("Received notification from " + remoteServer + "."); - - foreach(var s in subs) - InternalMessageSender.Send(e.Message, s); - } - else - { - ProxyData data = null; - - if (e.Message.CorrelationId != null) - data = Storage.GetAndRemove(e.Message.CorrelationId); - - if (data == null) - return; - - e.Message.CorrelationId = data.CorrelationId; - - Logger.Debug("Received response from " + remoteServer + "."); - - InternalMessageSender.Send(e.Message, data.ClientAddress); - } - } - - void InternalTransportTransportMessageReceived(object sender, TransportMessageReceivedEventArgs e) - { - if (UnicastBus.HandledSubscriptionMessage(e.Message, Subscribers, null)) - { - e.Message.ReturnAddress = ExternalAddress; - ExternalMessageSender.Send(e.Message, remoteServer); - - Logger.Debug("Received subscription message."); - return; - } - - if (e.Message.MessageIntent == MessageIntentEnum.Init) - return; - - var data = new ProxyData - { - Id = GenerateId(), - ClientAddress = e.Message.ReturnAddress, - CorrelationId = e.Message.IdForCorrelation - }; - - Storage.Save(data); - - Logger.Debug("Forwarding request to " + remoteServer + "."); - - e.Message.IdForCorrelation = data.Id; - e.Message.ReturnAddress = ExternalAddress; - - ExternalMessageSender.Send(e.Message, remoteServer); - - return; - } - - private static string GenerateId() - { - return Guid.NewGuid() + "\\0"; - } - - private static readonly ILog Logger = LogManager.GetLogger(typeof (Proxy)); - } -} +using System; +using log4net; +using NServiceBus.Unicast.Queuing; +using NServiceBus.Unicast.Subscriptions; +using NServiceBus.Unicast.Transport; +using NServiceBus.Unicast; + +namespace NServiceBus.Proxy +{ + public class Proxy + { + #region config + + public ISubscriptionStorage Subscribers { get; set; } + + private ITransport externalTransport; + public ITransport ExternalTransport + { + set + { + externalTransport = value; + + externalTransport.TransportMessageReceived += ExternalTransportTransportMessageReceived; + } + } + + private ITransport internalTransport; + public ITransport InternalTransport + { + set + { + internalTransport = value; + + internalTransport.TransportMessageReceived += InternalTransportTransportMessageReceived; + } + } + + public ISendMessages InternalMessageSender { get; set; } + + public ISendMessages ExternalMessageSender { get; set; } + + public IProxyDataStorage Storage { private get; set; } + + public string RemoteServer + { + get { return remoteServer; } + set + { + var arr = value.Split('@'); + + var queue = arr[0]; + var machine = Environment.MachineName; + + if (arr.Length == 2) + if (arr[1] != "." && arr[1].ToLower() != "localhost") + machine = arr[1]; + + remoteServer = queue + "@" + machine; + } + } + + private string remoteServer; + + public string ExternalAddress { get; set; } + + public string InternalAddress { get; set; } + + #endregion + + + public void Start() + { + internalTransport.Start(InternalAddress); + externalTransport.Start(ExternalAddress); + } + + void ExternalTransportTransportMessageReceived(object sender, TransportMessageReceivedEventArgs e) + { + if (e.Message.MessageIntent == MessageIntentEnum.Publish) + { + string val = null; + foreach (var header in e.Message.Headers) + if (header.Key == UnicastBus.EnclosedMessageTypes) + val = header.Value; + + var types = UnicastBus.DeserializeEnclosedMessageTypes(val); + + var subs = Subscribers.GetSubscribersForMessage(types); + + Logger.Debug("Received notification from " + remoteServer + "."); + + foreach(var s in subs) + InternalMessageSender.Send(e.Message, s); + } + else + { + ProxyData data = null; + + if (e.Message.CorrelationId != null) + data = Storage.GetAndRemove(e.Message.CorrelationId); + + if (data == null) + return; + + e.Message.CorrelationId = data.CorrelationId; + + Logger.Debug("Received response from " + remoteServer + "."); + + InternalMessageSender.Send(e.Message, data.ClientAddress); + } + } + + void InternalTransportTransportMessageReceived(object sender, TransportMessageReceivedEventArgs e) + { + if (UnicastBus.HandledSubscriptionMessage(e.Message, Subscribers, null)) + { + e.Message.ReturnAddress = ExternalAddress; + ExternalMessageSender.Send(e.Message, remoteServer); + + Logger.Debug("Received subscription message."); + return; + } + + if (e.Message.MessageIntent == MessageIntentEnum.Init) + return; + + var data = new ProxyData + { + Id = GenerateId(), + ClientAddress = e.Message.ReturnAddress, + CorrelationId = e.Message.IdForCorrelation + }; + + Storage.Save(data); + + Logger.Debug("Forwarding request to " + remoteServer + "."); + + e.Message.IdForCorrelation = data.Id; + e.Message.ReturnAddress = ExternalAddress; + + ExternalMessageSender.Send(e.Message, remoteServer); + + return; + } + + private static string GenerateId() + { + return Guid.NewGuid() + "\\0"; + } + + private static readonly ILog Logger = LogManager.GetLogger(typeof (Proxy)); + } +} diff --git a/src/proxy/NServiceBus.Proxy/ProxyData.cs b/src/proxy/NServiceBus.Proxy/ProxyData.cs index 764a6d8d98a..9d66ea1ade5 100644 --- a/src/proxy/NServiceBus.Proxy/ProxyData.cs +++ b/src/proxy/NServiceBus.Proxy/ProxyData.cs @@ -1,12 +1,12 @@ -using System; - -namespace NServiceBus.Proxy -{ - [Serializable] - public class ProxyData - { - public string Id; - public string ClientAddress; - public string CorrelationId; - } -} +using System; + +namespace NServiceBus.Proxy +{ + [Serializable] + public class ProxyData + { + public string Id; + public string ClientAddress; + public string CorrelationId; + } +} diff --git a/src/testing/Delegates.cs b/src/testing/Delegates.cs index ba9134194fa..07a986972d2 100644 --- a/src/testing/Delegates.cs +++ b/src/testing/Delegates.cs @@ -1,48 +1,48 @@ -using System; -namespace NServiceBus.Testing -{ - /// - /// Predicate for checking the return code sent to Bus.Return. - /// - /// - /// - public delegate bool ReturnPredicate(int returnCode); - - /// - /// Predicate for checking the message passed to Bus.Publish. - /// - /// - /// - /// - public delegate bool PublishPredicate(T message) where T : IMessage; - - /// - /// Predicate for checking the message passed to Bus.Send. - /// - /// - /// - /// - public delegate bool SendPredicate(T message) where T : IMessage; - - /// - /// Predicate for checking the message and the destination passed to Bus.Send(msg, destination). - /// - /// - /// - /// - /// - public delegate bool SendToDestinationPredicate(string destination, T message) where T : IMessage; - - internal delegate bool BusPublishDelegate(T[] msgs) where T : IMessage; - - internal delegate bool BusSendWithDestinationAndCorrelationIdDelegate(string destination, string correlationId, IMessage[] msgs); - - internal delegate bool BusSendWithDestinationDelegate(string destination, IMessage[] msgs); - - internal delegate bool BusSendDelegate(IMessage[] msgs); - - /// - /// Delegate used for dispatching the call to invoke the saga. - /// - public delegate void HandleMessageDelegate(); -} +using System; +namespace NServiceBus.Testing +{ + /// + /// Predicate for checking the return code sent to Bus.Return. + /// + /// + /// + public delegate bool ReturnPredicate(int returnCode); + + /// + /// Predicate for checking the message passed to Bus.Publish. + /// + /// + /// + /// + public delegate bool PublishPredicate(T message) where T : IMessage; + + /// + /// Predicate for checking the message passed to Bus.Send. + /// + /// + /// + /// + public delegate bool SendPredicate(T message) where T : IMessage; + + /// + /// Predicate for checking the message and the destination passed to Bus.Send(msg, destination). + /// + /// + /// + /// + /// + public delegate bool SendToDestinationPredicate(string destination, T message) where T : IMessage; + + internal delegate bool BusPublishDelegate(T[] msgs) where T : IMessage; + + internal delegate bool BusSendWithDestinationAndCorrelationIdDelegate(string destination, string correlationId, IMessage[] msgs); + + internal delegate bool BusSendWithDestinationDelegate(string destination, IMessage[] msgs); + + internal delegate bool BusSendDelegate(IMessage[] msgs); + + /// + /// Delegate used for dispatching the call to invoke the saga. + /// + public delegate void HandleMessageDelegate(); +} diff --git a/src/testing/Handler.cs b/src/testing/Handler.cs index 14e81d6ea97..0fc1a883b74 100644 --- a/src/testing/Handler.cs +++ b/src/testing/Handler.cs @@ -1,221 +1,221 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using Rhino.Mocks; - -namespace NServiceBus.Testing -{ - /// - /// Message handler unit testing framework. - /// - /// - public class Handler - { - private readonly Helper helper; - private readonly T handler; - private readonly IMessageCreator messageCreator; - private IDictionary incomingHeaders = new Dictionary(); - private readonly List assertions = new List(); - - /// - /// Creates a new instance of the handler tester. - /// - /// - /// - /// - /// - /// - public Handler(T handler, MockRepository mocks, IBus bus, IMessageCreator messageCreator, IEnumerable types) - { - this.handler = handler; - this.messageCreator = messageCreator; - helper = new Helper(mocks, bus, messageCreator, types); - } - - /// - /// Provides a way to set external dependencies on the saga under test. - /// - /// - /// - public Handler WithExternalDependencies(Action actionToSetUpExternalDependencies) - { - actionToSetUpExternalDependencies(handler); - - return this; - } - - /// - /// Set the headers on an incoming message that will be return - /// when code calls Bus.CurrentMessageContext.Headers - /// - /// - /// - /// - public Handler SetIncomingHeader(string key, string value) - { - incomingHeaders[key] = value; - - return this; - } - - /// - /// Obselete - /// - /// - /// - /// - [Obsolete] - public Handler AssertOutgoingHeader(string key, string value) - { - return this; - } - - /// - /// Check that the saga sends a message of the given type complying with the given predicate. - /// - /// - /// - /// - public Handler ExpectSend(SendPredicate check) where TMessage : IMessage - { - helper.ExpectSend(check); - return this; - } - - /// - /// Check that the saga replies with the given message type complying with the given predicate. - /// - /// - /// - /// - public Handler ExpectReply(SendPredicate check) where TMessage : IMessage - { - helper.ExpectReply(check); - return this; - } - - /// - /// Check that the saga sends the given message type to its local queue - /// and that the message complies with the given predicate. - /// - /// - /// - /// - public Handler ExpectSendLocal(SendPredicate check) where TMessage : IMessage - { - helper.ExpectSendLocal(check); - return this; - } - - /// - /// Check that the saga uses the bus to return the appropriate error code. - /// - /// - /// - public Handler ExpectReturn(ReturnPredicate check) - { - helper.ExpectReturn(check); - return this; - } - - /// - /// Check that the saga sends the given message type to the appropriate destination. - /// - /// - /// - /// - public Handler ExpectSendToDestination(SendToDestinationPredicate check) where TMessage : IMessage - { - helper.ExpectSendToDestination(check); - return this; - } - - /// - /// Check that the saga publishes a message of the given type complying with the given predicate. - /// - /// - /// - /// - public Handler ExpectPublish(PublishPredicate check) where TMessage : IMessage - { - helper.ExpectPublish(check); - return this; - } - - /// - /// Check that the handler tells the bus to stop processing the current message. - /// - /// - public Handler ExpectDoNotContinueDispatchingCurrentMessageToHandlers() - { - helper.ExpectDoNotContinueDispatchingCurrentMessageToHandlers(); - return this; - } - - /// - /// Check that the handler tells the bus to forward the current message to the given destination. - /// - /// - /// - public Handler ExpectForwardCurrentMessageTo(string destination) - { - helper.ExpectForwardCurrentMessageTo(destination); - return this; - } - - /// - /// Check that the handler tells the bus to handle the current message later. - /// - /// - public Handler ExpectHandleCurrentMessageLater() - { - helper.ExpectHandleCurrentMessageLater(); - return this; - } - - /// - /// Activates the test that has been set up passing in the given message. - /// - /// - public void OnMessage(Action initializeMessage) where TMessage : IMessage - { - OnMessage(initializeMessage, Guid.NewGuid().ToString("N")); - } - - /// - /// Activates the test that has been set up passing in the given message, - /// setting the incoming headers and the message Id. - /// - /// - /// - public void OnMessage(Action initializeMessage, string messageId) where TMessage : IMessage - { - var context = new MessageContext { Id = messageId, ReturnAddress = "client", Headers = incomingHeaders }; - - var msg = messageCreator.CreateInstance(initializeMessage); - - foreach(KeyValuePair kvp in incomingHeaders) - ExtensionMethods.SetHeaderAction(msg, kvp.Key, kvp.Value); - - ExtensionMethods.CurrentMessageBeingHandled = msg; - - MethodInfo method = GetMessageHandler(handler.GetType(), typeof(TMessage)); - helper.Go(context, () => method.Invoke(handler, new object[] { msg })); - assertions.ForEach(a => a()); - - assertions.Clear(); - ExtensionMethods.CurrentMessageBeingHandled = null; - } - - private static MethodInfo GetMessageHandler(Type targetType, Type messageType) { - var method = targetType.GetMethod("Handle", new[] { messageType }); - if (method != null) return method; - - var handlerType = typeof(IMessageHandler<>).MakeGenericType(messageType); - return targetType.GetInterfaceMap(handlerType) - .TargetMethods - .FirstOrDefault(); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using Rhino.Mocks; + +namespace NServiceBus.Testing +{ + /// + /// Message handler unit testing framework. + /// + /// + public class Handler + { + private readonly Helper helper; + private readonly T handler; + private readonly IMessageCreator messageCreator; + private IDictionary incomingHeaders = new Dictionary(); + private readonly List assertions = new List(); + + /// + /// Creates a new instance of the handler tester. + /// + /// + /// + /// + /// + /// + public Handler(T handler, MockRepository mocks, IBus bus, IMessageCreator messageCreator, IEnumerable types) + { + this.handler = handler; + this.messageCreator = messageCreator; + helper = new Helper(mocks, bus, messageCreator, types); + } + + /// + /// Provides a way to set external dependencies on the saga under test. + /// + /// + /// + public Handler WithExternalDependencies(Action actionToSetUpExternalDependencies) + { + actionToSetUpExternalDependencies(handler); + + return this; + } + + /// + /// Set the headers on an incoming message that will be return + /// when code calls Bus.CurrentMessageContext.Headers + /// + /// + /// + /// + public Handler SetIncomingHeader(string key, string value) + { + incomingHeaders[key] = value; + + return this; + } + + /// + /// Obselete + /// + /// + /// + /// + [Obsolete] + public Handler AssertOutgoingHeader(string key, string value) + { + return this; + } + + /// + /// Check that the saga sends a message of the given type complying with the given predicate. + /// + /// + /// + /// + public Handler ExpectSend(SendPredicate check) where TMessage : IMessage + { + helper.ExpectSend(check); + return this; + } + + /// + /// Check that the saga replies with the given message type complying with the given predicate. + /// + /// + /// + /// + public Handler ExpectReply(SendPredicate check) where TMessage : IMessage + { + helper.ExpectReply(check); + return this; + } + + /// + /// Check that the saga sends the given message type to its local queue + /// and that the message complies with the given predicate. + /// + /// + /// + /// + public Handler ExpectSendLocal(SendPredicate check) where TMessage : IMessage + { + helper.ExpectSendLocal(check); + return this; + } + + /// + /// Check that the saga uses the bus to return the appropriate error code. + /// + /// + /// + public Handler ExpectReturn(ReturnPredicate check) + { + helper.ExpectReturn(check); + return this; + } + + /// + /// Check that the saga sends the given message type to the appropriate destination. + /// + /// + /// + /// + public Handler ExpectSendToDestination(SendToDestinationPredicate check) where TMessage : IMessage + { + helper.ExpectSendToDestination(check); + return this; + } + + /// + /// Check that the saga publishes a message of the given type complying with the given predicate. + /// + /// + /// + /// + public Handler ExpectPublish(PublishPredicate check) where TMessage : IMessage + { + helper.ExpectPublish(check); + return this; + } + + /// + /// Check that the handler tells the bus to stop processing the current message. + /// + /// + public Handler ExpectDoNotContinueDispatchingCurrentMessageToHandlers() + { + helper.ExpectDoNotContinueDispatchingCurrentMessageToHandlers(); + return this; + } + + /// + /// Check that the handler tells the bus to forward the current message to the given destination. + /// + /// + /// + public Handler ExpectForwardCurrentMessageTo(string destination) + { + helper.ExpectForwardCurrentMessageTo(destination); + return this; + } + + /// + /// Check that the handler tells the bus to handle the current message later. + /// + /// + public Handler ExpectHandleCurrentMessageLater() + { + helper.ExpectHandleCurrentMessageLater(); + return this; + } + + /// + /// Activates the test that has been set up passing in the given message. + /// + /// + public void OnMessage(Action initializeMessage) where TMessage : IMessage + { + OnMessage(initializeMessage, Guid.NewGuid().ToString("N")); + } + + /// + /// Activates the test that has been set up passing in the given message, + /// setting the incoming headers and the message Id. + /// + /// + /// + public void OnMessage(Action initializeMessage, string messageId) where TMessage : IMessage + { + var context = new MessageContext { Id = messageId, ReturnAddress = "client", Headers = incomingHeaders }; + + var msg = messageCreator.CreateInstance(initializeMessage); + + foreach(KeyValuePair kvp in incomingHeaders) + ExtensionMethods.SetHeaderAction(msg, kvp.Key, kvp.Value); + + ExtensionMethods.CurrentMessageBeingHandled = msg; + + MethodInfo method = GetMessageHandler(handler.GetType(), typeof(TMessage)); + helper.Go(context, () => method.Invoke(handler, new object[] { msg })); + assertions.ForEach(a => a()); + + assertions.Clear(); + ExtensionMethods.CurrentMessageBeingHandled = null; + } + + private static MethodInfo GetMessageHandler(Type targetType, Type messageType) { + var method = targetType.GetMethod("Handle", new[] { messageType }); + if (method != null) return method; + + var handlerType = typeof(IMessageHandler<>).MakeGenericType(messageType); + return targetType.GetInterfaceMap(handlerType) + .TargetMethods + .FirstOrDefault(); + } + } +} diff --git a/src/testing/Helper.cs b/src/testing/Helper.cs index ccd7d6e9b4c..82ded99630b 100644 --- a/src/testing/Helper.cs +++ b/src/testing/Helper.cs @@ -1,404 +1,404 @@ -using System; -using System.Collections.Generic; -using System.Reflection; -using Rhino.Mocks; - -namespace NServiceBus.Testing -{ - internal class Helper - { - private readonly IBus bus; - private readonly MockRepository m; - private readonly IMessageCreator messageCreator; - private readonly List delegates = new List(); - private readonly IEnumerable messageTypes = new List(); - - public Helper(MockRepository mocks, IBus b, IMessageCreator messageCreator, IEnumerable types) - { - m = mocks; - bus = b; - this.messageCreator = messageCreator; - messageTypes = types; - } - - /// - /// Check that the object sends a message of the given type complying with the given predicate. - /// - /// - /// - /// - public void ExpectSend(SendPredicate check) where TMessage : IMessage - { - Delegate d = new HandleMessageDelegate( - () => ExpectCallToSend( - delegate(IMessage[] msgs) - { - foreach (TMessage msg in msgs) - if (!check(msg)) - return false; - - return true; - } - ) - ); - - delegates.Add(d); - } - - /// - /// Check that the object replies with the given message type complying with the given predicate. - /// - /// - /// - /// - public void ExpectReply(SendPredicate check) where TMessage : IMessage - { - Delegate d = new HandleMessageDelegate( - () => ExpectCallToReply( - delegate(IMessage[] msgs) - { - foreach (TMessage msg in msgs) - if (!check(msg)) - return false; - - return true; - } - ) - ); - - delegates.Add(d); - } - - /// - /// Check that the object sends the given message type to its local queue - /// and that the message complies with the given predicate. - /// - /// - /// - /// - public void ExpectSendLocal(SendPredicate check) where TMessage : IMessage - { - Delegate d = new HandleMessageDelegate( - () => ExpectCallToSendLocal( - delegate(IMessage[] msgs) - { - foreach (TMessage msg in msgs) - if (!check(msg)) - return false; - - return true; - } - ) - ); - - delegates.Add(d); - } - - /// - /// Check that the object uses the bus to return the appropriate error code. - /// - /// - /// - public void ExpectReturn(ReturnPredicate check) - { - Delegate d = new HandleMessageDelegate( - () => ExpectCallToReturn(check) - ); - - delegates.Add(d); - } - - /// - /// Check that the object sends the given message type to the appropriate destination. - /// - /// - /// - /// - public void ExpectSendToDestination(SendToDestinationPredicate check) where TMessage : IMessage - { - Delegate d = new HandleMessageDelegate( - () => ExpectCallToSend( - delegate(string destination, IMessage[] msgs) - { - foreach (TMessage msg in msgs) - if (!check(destination, msg)) - return false; - - return true; - } - ) - ); - - delegates.Add(d); - } - - /// - /// Check that the object replies to the originator with the given message type. - /// - /// - /// - /// - public void ExpectReplyToOrginator(SendPredicate check) where TMessage : IMessage - { - Delegate d = new HandleMessageDelegate( - () => ExpectCallToSend( - delegate(string destination, string correlationId, IMessage[] msgs) - { - foreach (TMessage msg in msgs) - if (!check(msg)) - return false; - - return true; - } - ) - ); - - delegates.Add(d); - } - - /// - /// Check that the object publishes a message of the given type complying with the given predicate. - /// - /// - /// - /// - public void ExpectPublish(PublishPredicate check) where TMessage : IMessage - { - Delegate d = new HandleMessageDelegate( - () => ExpectCallToPublish( - delegate(TMessage[] msgs) - { - foreach (TMessage msg in msgs) - if (!check(msg)) - return false; - - return true; - } - ) - ); - - delegates.Add(d); - } - - /// - /// Check that the object tells the bus to not dispatch the current message to any other handlers. - /// - /// - public void ExpectDoNotContinueDispatchingCurrentMessageToHandlers() - { - Delegate d = new HandleMessageDelegate( - this.ExpectCallToDoNotContinueDispatchingCurrentMessageToHandlers - ); - - delegates.Add(d); - } - - public void ExpectForwardCurrentMessageTo(string destination) - { - string dest = string.Empty; - - Delegate del = new HandleMessageDelegate( - () => Expect.Call(() => bus.ForwardCurrentMessageTo(dest)) - .IgnoreArguments() - .Callback((string d) => d == destination) - ); - - delegates.Add(del); - } - - /// - /// Check that the object tells the bus to handle the current message later - /// - /// - public void ExpectHandleCurrentMessageLater() - { - Delegate d = new HandleMessageDelegate( - this.ExpectCallToHandleCurrentMessageLater - ); - - delegates.Add(d); - } - - /// - /// Uses the given delegate to invoke the object, checking all the expectations previously set up, - /// and then clearing them for continued testing. - /// - /// - /// - public void Go(MessageContext context, Action doSomething) - { - using (m.Record()) - { - foreach (var t in messageTypes) - GetType().GetMethod("PrepareBusGenericMethods", BindingFlags.Instance | BindingFlags.NonPublic).MakeGenericMethod(t).Invoke(this, null); - - SetupResult.For(bus.CurrentMessageContext).Return(context); - - foreach (var d in delegates) - d.DynamicInvoke(); - } - - using (m.Playback()) - doSomething(); - - m.BackToRecordAll(); - - delegates.Clear(); - } - - private void ExpectCallToReturn(ReturnPredicate callback) - { - Expect.Call(() => bus.Return(-1)) - .IgnoreArguments() - .Callback(callback); - } - - private void ExpectCallToReply(BusSendDelegate callback) - { - IMessage[] messages = null; - - Expect.Call(() => bus.Reply(messages)) - .IgnoreArguments() - .Callback(callback); - } - - private void ExpectCallToSendLocal(BusSendDelegate callback) - { - IMessage[] messages = null; - - Expect.Call(() => bus.SendLocal(messages)) - .IgnoreArguments() - .Callback(callback); - } - - private void ExpectCallToSend(BusSendDelegate callback) - { - IMessage[] messages = null; - - Expect.Call(() => bus.Send(messages)) - .IgnoreArguments().Return(null) - .Callback(callback); - } - - private void ExpectCallToSend(BusSendWithDestinationDelegate callback) - { - IMessage[] messages = null; - string destination = null; - - Expect.Call(() => bus.Send(destination, messages)) - .IgnoreArguments().Return(null) - .Callback(callback); - } - - private void ExpectCallToSend(BusSendWithDestinationAndCorrelationIdDelegate callback) - { - IMessage[] messages = null; - string destination = null; - string correlationId = null; - - Expect.Call(() => bus.Send(destination, correlationId, messages)) - .IgnoreArguments() - .Callback(callback); - } - - private void ExpectCallToPublish(BusPublishDelegate callback) where T : IMessage - { - T[] messages = null; - - Expect.Call(() => bus.Publish(messages)) - .IgnoreArguments() - .Callback(callback); - } - - private void ExpectCallToDoNotContinueDispatchingCurrentMessageToHandlers() - { - Expect.Call(() => bus.DoNotContinueDispatchingCurrentMessageToHandlers()) - .IgnoreArguments(); - } - - private void ExpectCallToHandleCurrentMessageLater() - { - Expect.Call(() => bus.HandleCurrentMessageLater()) - .IgnoreArguments(); - } - - /// - /// Invoked via reflection - do not remove. - /// - /// - private void PrepareBusGenericMethods() where TMessage : IMessage - { - var d = GetDelegateForBusGenericMethods(); - - delegates.Add(d); - } - - private Delegate GetDelegateForBusGenericMethods() where TMessage : IMessage - { - return new HandleMessageDelegate( - delegate - { - Action act = null; - string destination = null; - - bus.CreateInstance(); - LastCall.Repeat.Any().IgnoreArguments().Return(null).WhenCalled(mi => - { - mi.ReturnValue = messageCreator.CreateInstance(); - } - ); - - bus.CreateInstance(act); - LastCall.Repeat.Any().IgnoreArguments().Return(null).WhenCalled(mi => - { - var action = mi.Arguments[0] as Action; - mi.ReturnValue = messageCreator.CreateInstance(action); - } - ); - - bus.Reply(act); - LastCall.Repeat.Any().IgnoreArguments().WhenCalled(mi => - { - var action = mi.Arguments[0] as Action; - bus.Reply(messageCreator.CreateInstance(action)); - } - ); - - bus.Send(act); - LastCall.Repeat.Any().IgnoreArguments().Return(null).WhenCalled(mi => - { - var action = mi.Arguments[0] as Action; - bus.Send(messageCreator.CreateInstance(action)); - } - ); - - bus.Send(destination, act); - LastCall.Repeat.Any().IgnoreArguments().Return(null).WhenCalled(mi => - { - var dest = mi.Arguments[0] as string; - var action = mi.Arguments[1] as Action; - bus.Send(dest, messageCreator.CreateInstance(action)); - } - ); - - bus.SendLocal(act); - LastCall.Repeat.Any().IgnoreArguments().WhenCalled(mi => - { - var action = mi.Arguments[0] as Action; - bus.SendLocal(messageCreator.CreateInstance(action)); - } - ); - - bus.Publish(act); - LastCall.Repeat.Any().IgnoreArguments().WhenCalled(mi => - { - var action = mi.Arguments[0] as Action; - bus.Publish(messageCreator.CreateInstance(action)); - } - ); - - } - ); - } - } -} +using System; +using System.Collections.Generic; +using System.Reflection; +using Rhino.Mocks; + +namespace NServiceBus.Testing +{ + internal class Helper + { + private readonly IBus bus; + private readonly MockRepository m; + private readonly IMessageCreator messageCreator; + private readonly List delegates = new List(); + private readonly IEnumerable messageTypes = new List(); + + public Helper(MockRepository mocks, IBus b, IMessageCreator messageCreator, IEnumerable types) + { + m = mocks; + bus = b; + this.messageCreator = messageCreator; + messageTypes = types; + } + + /// + /// Check that the object sends a message of the given type complying with the given predicate. + /// + /// + /// + /// + public void ExpectSend(SendPredicate check) where TMessage : IMessage + { + Delegate d = new HandleMessageDelegate( + () => ExpectCallToSend( + delegate(IMessage[] msgs) + { + foreach (TMessage msg in msgs) + if (!check(msg)) + return false; + + return true; + } + ) + ); + + delegates.Add(d); + } + + /// + /// Check that the object replies with the given message type complying with the given predicate. + /// + /// + /// + /// + public void ExpectReply(SendPredicate check) where TMessage : IMessage + { + Delegate d = new HandleMessageDelegate( + () => ExpectCallToReply( + delegate(IMessage[] msgs) + { + foreach (TMessage msg in msgs) + if (!check(msg)) + return false; + + return true; + } + ) + ); + + delegates.Add(d); + } + + /// + /// Check that the object sends the given message type to its local queue + /// and that the message complies with the given predicate. + /// + /// + /// + /// + public void ExpectSendLocal(SendPredicate check) where TMessage : IMessage + { + Delegate d = new HandleMessageDelegate( + () => ExpectCallToSendLocal( + delegate(IMessage[] msgs) + { + foreach (TMessage msg in msgs) + if (!check(msg)) + return false; + + return true; + } + ) + ); + + delegates.Add(d); + } + + /// + /// Check that the object uses the bus to return the appropriate error code. + /// + /// + /// + public void ExpectReturn(ReturnPredicate check) + { + Delegate d = new HandleMessageDelegate( + () => ExpectCallToReturn(check) + ); + + delegates.Add(d); + } + + /// + /// Check that the object sends the given message type to the appropriate destination. + /// + /// + /// + /// + public void ExpectSendToDestination(SendToDestinationPredicate check) where TMessage : IMessage + { + Delegate d = new HandleMessageDelegate( + () => ExpectCallToSend( + delegate(string destination, IMessage[] msgs) + { + foreach (TMessage msg in msgs) + if (!check(destination, msg)) + return false; + + return true; + } + ) + ); + + delegates.Add(d); + } + + /// + /// Check that the object replies to the originator with the given message type. + /// + /// + /// + /// + public void ExpectReplyToOrginator(SendPredicate check) where TMessage : IMessage + { + Delegate d = new HandleMessageDelegate( + () => ExpectCallToSend( + delegate(string destination, string correlationId, IMessage[] msgs) + { + foreach (TMessage msg in msgs) + if (!check(msg)) + return false; + + return true; + } + ) + ); + + delegates.Add(d); + } + + /// + /// Check that the object publishes a message of the given type complying with the given predicate. + /// + /// + /// + /// + public void ExpectPublish(PublishPredicate check) where TMessage : IMessage + { + Delegate d = new HandleMessageDelegate( + () => ExpectCallToPublish( + delegate(TMessage[] msgs) + { + foreach (TMessage msg in msgs) + if (!check(msg)) + return false; + + return true; + } + ) + ); + + delegates.Add(d); + } + + /// + /// Check that the object tells the bus to not dispatch the current message to any other handlers. + /// + /// + public void ExpectDoNotContinueDispatchingCurrentMessageToHandlers() + { + Delegate d = new HandleMessageDelegate( + this.ExpectCallToDoNotContinueDispatchingCurrentMessageToHandlers + ); + + delegates.Add(d); + } + + public void ExpectForwardCurrentMessageTo(string destination) + { + string dest = string.Empty; + + Delegate del = new HandleMessageDelegate( + () => Expect.Call(() => bus.ForwardCurrentMessageTo(dest)) + .IgnoreArguments() + .Callback((string d) => d == destination) + ); + + delegates.Add(del); + } + + /// + /// Check that the object tells the bus to handle the current message later + /// + /// + public void ExpectHandleCurrentMessageLater() + { + Delegate d = new HandleMessageDelegate( + this.ExpectCallToHandleCurrentMessageLater + ); + + delegates.Add(d); + } + + /// + /// Uses the given delegate to invoke the object, checking all the expectations previously set up, + /// and then clearing them for continued testing. + /// + /// + /// + public void Go(MessageContext context, Action doSomething) + { + using (m.Record()) + { + foreach (var t in messageTypes) + GetType().GetMethod("PrepareBusGenericMethods", BindingFlags.Instance | BindingFlags.NonPublic).MakeGenericMethod(t).Invoke(this, null); + + SetupResult.For(bus.CurrentMessageContext).Return(context); + + foreach (var d in delegates) + d.DynamicInvoke(); + } + + using (m.Playback()) + doSomething(); + + m.BackToRecordAll(); + + delegates.Clear(); + } + + private void ExpectCallToReturn(ReturnPredicate callback) + { + Expect.Call(() => bus.Return(-1)) + .IgnoreArguments() + .Callback(callback); + } + + private void ExpectCallToReply(BusSendDelegate callback) + { + IMessage[] messages = null; + + Expect.Call(() => bus.Reply(messages)) + .IgnoreArguments() + .Callback(callback); + } + + private void ExpectCallToSendLocal(BusSendDelegate callback) + { + IMessage[] messages = null; + + Expect.Call(() => bus.SendLocal(messages)) + .IgnoreArguments() + .Callback(callback); + } + + private void ExpectCallToSend(BusSendDelegate callback) + { + IMessage[] messages = null; + + Expect.Call(() => bus.Send(messages)) + .IgnoreArguments().Return(null) + .Callback(callback); + } + + private void ExpectCallToSend(BusSendWithDestinationDelegate callback) + { + IMessage[] messages = null; + string destination = null; + + Expect.Call(() => bus.Send(destination, messages)) + .IgnoreArguments().Return(null) + .Callback(callback); + } + + private void ExpectCallToSend(BusSendWithDestinationAndCorrelationIdDelegate callback) + { + IMessage[] messages = null; + string destination = null; + string correlationId = null; + + Expect.Call(() => bus.Send(destination, correlationId, messages)) + .IgnoreArguments() + .Callback(callback); + } + + private void ExpectCallToPublish(BusPublishDelegate callback) where T : IMessage + { + T[] messages = null; + + Expect.Call(() => bus.Publish(messages)) + .IgnoreArguments() + .Callback(callback); + } + + private void ExpectCallToDoNotContinueDispatchingCurrentMessageToHandlers() + { + Expect.Call(() => bus.DoNotContinueDispatchingCurrentMessageToHandlers()) + .IgnoreArguments(); + } + + private void ExpectCallToHandleCurrentMessageLater() + { + Expect.Call(() => bus.HandleCurrentMessageLater()) + .IgnoreArguments(); + } + + /// + /// Invoked via reflection - do not remove. + /// + /// + private void PrepareBusGenericMethods() where TMessage : IMessage + { + var d = GetDelegateForBusGenericMethods(); + + delegates.Add(d); + } + + private Delegate GetDelegateForBusGenericMethods() where TMessage : IMessage + { + return new HandleMessageDelegate( + delegate + { + Action act = null; + string destination = null; + + bus.CreateInstance(); + LastCall.Repeat.Any().IgnoreArguments().Return(null).WhenCalled(mi => + { + mi.ReturnValue = messageCreator.CreateInstance(); + } + ); + + bus.CreateInstance(act); + LastCall.Repeat.Any().IgnoreArguments().Return(null).WhenCalled(mi => + { + var action = mi.Arguments[0] as Action; + mi.ReturnValue = messageCreator.CreateInstance(action); + } + ); + + bus.Reply(act); + LastCall.Repeat.Any().IgnoreArguments().WhenCalled(mi => + { + var action = mi.Arguments[0] as Action; + bus.Reply(messageCreator.CreateInstance(action)); + } + ); + + bus.Send(act); + LastCall.Repeat.Any().IgnoreArguments().Return(null).WhenCalled(mi => + { + var action = mi.Arguments[0] as Action; + bus.Send(messageCreator.CreateInstance(action)); + } + ); + + bus.Send(destination, act); + LastCall.Repeat.Any().IgnoreArguments().Return(null).WhenCalled(mi => + { + var dest = mi.Arguments[0] as string; + var action = mi.Arguments[1] as Action; + bus.Send(dest, messageCreator.CreateInstance(action)); + } + ); + + bus.SendLocal(act); + LastCall.Repeat.Any().IgnoreArguments().WhenCalled(mi => + { + var action = mi.Arguments[0] as Action; + bus.SendLocal(messageCreator.CreateInstance(action)); + } + ); + + bus.Publish(act); + LastCall.Repeat.Any().IgnoreArguments().WhenCalled(mi => + { + var action = mi.Arguments[0] as Action; + bus.Publish(messageCreator.CreateInstance(action)); + } + ); + + } + ); + } + } +} diff --git a/src/testing/MessageContext.cs b/src/testing/MessageContext.cs index fbebb79bf7d..f8695688d2a 100644 --- a/src/testing/MessageContext.cs +++ b/src/testing/MessageContext.cs @@ -1,13 +1,13 @@ -using System; -using System.Collections.Generic; - -namespace NServiceBus.Testing -{ - class MessageContext : IMessageContext - { - public string Id { get; set; } - public string ReturnAddress { get; set; } - public DateTime TimeSent { get; set; } - public IDictionary Headers { get; set; } - } -} +using System; +using System.Collections.Generic; + +namespace NServiceBus.Testing +{ + class MessageContext : IMessageContext + { + public string Id { get; set; } + public string ReturnAddress { get; set; } + public DateTime TimeSent { get; set; } + public IDictionary Headers { get; set; } + } +} diff --git a/src/testing/NServiceBus.Testing.Tests/NServiceBus.Testing.Tests.csproj b/src/testing/NServiceBus.Testing.Tests/NServiceBus.Testing.Tests.csproj index 6408eea2467..baaaf3b7b56 100644 --- a/src/testing/NServiceBus.Testing.Tests/NServiceBus.Testing.Tests.csproj +++ b/src/testing/NServiceBus.Testing.Tests/NServiceBus.Testing.Tests.csproj @@ -1,79 +1,79 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {7619C202-AE52-45DC-98AF-901DD670F117} - Library - Properties - NServiceBus.Testing.Tests - NServiceBus.Testing.Tests - v4.0 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\..\..\lib\Autofac.dll - - - ..\..\..\lib\Common.Logging.dll - - - ..\..\..\lib\Common.Logging.Log4Net.dll - - - False - ..\..\..\lib\log4net.dll - - - False - ..\..\..\build\output\NServiceBus.dll - - - False - ..\..\..\tools\NUnit\nunit.framework.dll - - - - 3.5 - - - - - - - - - {8B815173-9AFA-4D95-BAB4-686C298F17DA} - NServiceBus.Testing - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {7619C202-AE52-45DC-98AF-901DD670F117} + Library + Properties + NServiceBus.Testing.Tests + NServiceBus.Testing.Tests + v4.0 + 512 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\..\lib\Autofac.dll + + + ..\..\..\lib\Common.Logging.dll + + + ..\..\..\lib\Common.Logging.Log4Net.dll + + + False + ..\..\..\lib\log4net.dll + + + False + ..\..\..\build\output\NServiceBus.dll + + + False + ..\..\..\tools\NUnit\nunit.framework.dll + + + + 3.5 + + + + + + + + + {8B815173-9AFA-4D95-BAB4-686C298F17DA} + NServiceBus.Testing + + + + \ No newline at end of file diff --git a/src/testing/NServiceBus.Testing.Tests/Properties/AssemblyInfo.cs b/src/testing/NServiceBus.Testing.Tests/Properties/AssemblyInfo.cs index 53bc17f154b..0d0b9adebb9 100644 --- a/src/testing/NServiceBus.Testing.Tests/Properties/AssemblyInfo.cs +++ b/src/testing/NServiceBus.Testing.Tests/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Testing Tests")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Testing Tests")] [assembly: AssemblyDescription("Unit tests for the testing facilities of NServiceBus Sagas / Message Handlers.")] \ No newline at end of file diff --git a/src/testing/NServiceBus.Testing.Tests/TestHandlerFixture.cs b/src/testing/NServiceBus.Testing.Tests/TestHandlerFixture.cs index b3c4651d118..6f9ed9818ae 100644 --- a/src/testing/NServiceBus.Testing.Tests/TestHandlerFixture.cs +++ b/src/testing/NServiceBus.Testing.Tests/TestHandlerFixture.cs @@ -1,103 +1,103 @@ -using NUnit.Framework; - -namespace NServiceBus.Testing.Tests -{ - [TestFixture] - public class TestHandlerFixture - { - [TestFixtureSetUp] - public void TestFixtureSetUp() - { - Test.Initialize(typeof(IMessage).Assembly, typeof(TestHandlerFixture).Assembly); - } - - [Test] - public void ShouldAssertDoNotContinueDispatchingCurrentMessageToHandlersWasCalled() - { - Test.Handler() - .ExpectDoNotContinueDispatchingCurrentMessageToHandlers() - .OnMessage(m => {}); - } - - [Test] - [ExpectedException] - public void ShouldFailAssertingDoNotContinueDispatchingCurrentMessageToHandlersWasCalled() - { - Test.Handler() - .ExpectDoNotContinueDispatchingCurrentMessageToHandlers() - .OnMessage(m => {}); - } - - [Test] - public void ShouldAssertHandleCurrentMessageLaterWasCalled() - { - Test.Handler() - .ExpectHandleCurrentMessageLater() - .OnMessage(m => {}); - } - - [Test] - [ExpectedException] - public void ShouldFailAssertingHandleCurrentMessageLaterWasCalled() - { - Test.Handler() - .ExpectHandleCurrentMessageLater() - .OnMessage(m => {}); - } - - [Test] - public void ShouldCallHandleOnExplicitInterfaceImplementation() - { - var handler = new ExplicitInterfaceImplementation(); - Assert.IsFalse(handler.IsHandled); - Test.Handler(handler).OnMessage(m => { }); - Assert.IsTrue(handler.IsHandled); - } - - public class EmptyHandler : IHandleMessages - { - public void Handle(TestMessage message) {} - } - - public class DoNotContinueDispatchingCurrentMessageToHandlersHandler : IHandleMessages - { - public IBus Bus { get; set; } - - public void Handle(TestMessage message) - { - this.Bus.DoNotContinueDispatchingCurrentMessageToHandlers(); - } - } - - public class HandleCurrentMessageLaterHandler : IHandleMessages - { - public IBus Bus { get; set; } - - public void Handle(TestMessage message) - { - this.Bus.HandleCurrentMessageLater(); - } - } - - public class ExplicitInterfaceImplementation : IHandleMessages - { - - public bool IsHandled { get; set; } - - void IMessageHandler.Handle(TestMessage message) { - IsHandled = true; - } - - // Unit test fails if this is uncommented; seems to me that this should - // be made to pass, but it looks like a design decision based on commit - // revision 1210. - //public void Handle(TestMessage message) { - // throw new System.Exception("Shouldn't call this."); - //} - - } - - } - - public interface TestMessage : IMessage { } +using NUnit.Framework; + +namespace NServiceBus.Testing.Tests +{ + [TestFixture] + public class TestHandlerFixture + { + [TestFixtureSetUp] + public void TestFixtureSetUp() + { + Test.Initialize(typeof(IMessage).Assembly, typeof(TestHandlerFixture).Assembly); + } + + [Test] + public void ShouldAssertDoNotContinueDispatchingCurrentMessageToHandlersWasCalled() + { + Test.Handler() + .ExpectDoNotContinueDispatchingCurrentMessageToHandlers() + .OnMessage(m => {}); + } + + [Test] + [ExpectedException] + public void ShouldFailAssertingDoNotContinueDispatchingCurrentMessageToHandlersWasCalled() + { + Test.Handler() + .ExpectDoNotContinueDispatchingCurrentMessageToHandlers() + .OnMessage(m => {}); + } + + [Test] + public void ShouldAssertHandleCurrentMessageLaterWasCalled() + { + Test.Handler() + .ExpectHandleCurrentMessageLater() + .OnMessage(m => {}); + } + + [Test] + [ExpectedException] + public void ShouldFailAssertingHandleCurrentMessageLaterWasCalled() + { + Test.Handler() + .ExpectHandleCurrentMessageLater() + .OnMessage(m => {}); + } + + [Test] + public void ShouldCallHandleOnExplicitInterfaceImplementation() + { + var handler = new ExplicitInterfaceImplementation(); + Assert.IsFalse(handler.IsHandled); + Test.Handler(handler).OnMessage(m => { }); + Assert.IsTrue(handler.IsHandled); + } + + public class EmptyHandler : IHandleMessages + { + public void Handle(TestMessage message) {} + } + + public class DoNotContinueDispatchingCurrentMessageToHandlersHandler : IHandleMessages + { + public IBus Bus { get; set; } + + public void Handle(TestMessage message) + { + this.Bus.DoNotContinueDispatchingCurrentMessageToHandlers(); + } + } + + public class HandleCurrentMessageLaterHandler : IHandleMessages + { + public IBus Bus { get; set; } + + public void Handle(TestMessage message) + { + this.Bus.HandleCurrentMessageLater(); + } + } + + public class ExplicitInterfaceImplementation : IHandleMessages + { + + public bool IsHandled { get; set; } + + void IMessageHandler.Handle(TestMessage message) { + IsHandled = true; + } + + // Unit test fails if this is uncommented; seems to me that this should + // be made to pass, but it looks like a design decision based on commit + // revision 1210. + //public void Handle(TestMessage message) { + // throw new System.Exception("Shouldn't call this."); + //} + + } + + } + + public interface TestMessage : IMessage { } } \ No newline at end of file diff --git a/src/testing/NServiceBus.Testing.csproj b/src/testing/NServiceBus.Testing.csproj index 29134a735ac..474397d1a42 100644 --- a/src/testing/NServiceBus.Testing.csproj +++ b/src/testing/NServiceBus.Testing.csproj @@ -1,123 +1,123 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {8B815173-9AFA-4D95-BAB4-686C298F17DA} - Library - Properties - NServiceBus.Testing - NServiceBus.Testing - - - - - - v4.0 - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.Testing.XML - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.Testing.XML - AllRules.ruleset - - - - False - ..\..\lib\log4net.dll - False - - - False - ..\..\build\output\NServiceBus.dll - - - False - ..\..\build\output\NServiceBus.Core.dll - - - False - ..\..\lib\Rhino.Mocks\Rhino.Mocks.dll - True - - - - 3.5 - - - - - - - CommonAssemblyInfo.cs - - - - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\build\merge\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {8B815173-9AFA-4D95-BAB4-686C298F17DA} + Library + Properties + NServiceBus.Testing + NServiceBus.Testing + + + + + + v4.0 + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.Testing.XML + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.Testing.XML + AllRules.ruleset + + + + False + ..\..\lib\log4net.dll + False + + + False + ..\..\build\output\NServiceBus.dll + + + False + ..\..\build\output\NServiceBus.Core.dll + + + False + ..\..\lib\Rhino.Mocks\Rhino.Mocks.dll + True + + + + 3.5 + + + + + + + CommonAssemblyInfo.cs + + + + + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\build\merge\" + \ No newline at end of file diff --git a/src/testing/NServiceBus.Testing.sln b/src/testing/NServiceBus.Testing.sln index 32bf8eb1f7a..337cd142112 100644 --- a/src/testing/NServiceBus.Testing.sln +++ b/src/testing/NServiceBus.Testing.sln @@ -1,26 +1,26 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Testing", "NServiceBus.Testing.csproj", "{8B815173-9AFA-4D95-BAB4-686C298F17DA}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Testing.Tests", "NServiceBus.Testing.Tests\NServiceBus.Testing.Tests.csproj", "{7619C202-AE52-45DC-98AF-901DD670F117}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8B815173-9AFA-4D95-BAB4-686C298F17DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {8B815173-9AFA-4D95-BAB4-686C298F17DA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {8B815173-9AFA-4D95-BAB4-686C298F17DA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {8B815173-9AFA-4D95-BAB4-686C298F17DA}.Release|Any CPU.Build.0 = Release|Any CPU - {7619C202-AE52-45DC-98AF-901DD670F117}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7619C202-AE52-45DC-98AF-901DD670F117}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7619C202-AE52-45DC-98AF-901DD670F117}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7619C202-AE52-45DC-98AF-901DD670F117}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Testing", "NServiceBus.Testing.csproj", "{8B815173-9AFA-4D95-BAB4-686C298F17DA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Testing.Tests", "NServiceBus.Testing.Tests\NServiceBus.Testing.Tests.csproj", "{7619C202-AE52-45DC-98AF-901DD670F117}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {8B815173-9AFA-4D95-BAB4-686C298F17DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8B815173-9AFA-4D95-BAB4-686C298F17DA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8B815173-9AFA-4D95-BAB4-686C298F17DA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8B815173-9AFA-4D95-BAB4-686C298F17DA}.Release|Any CPU.Build.0 = Release|Any CPU + {7619C202-AE52-45DC-98AF-901DD670F117}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7619C202-AE52-45DC-98AF-901DD670F117}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7619C202-AE52-45DC-98AF-901DD670F117}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7619C202-AE52-45DC-98AF-901DD670F117}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/testing/Properties/AssemblyInfo.cs b/src/testing/Properties/AssemblyInfo.cs index bca2bf472c3..deed2e3f8ba 100644 --- a/src/testing/Properties/AssemblyInfo.cs +++ b/src/testing/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Testing")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Testing")] [assembly: AssemblyDescription("Unit Testing facilities for NServiceBus Sagas.")] \ No newline at end of file diff --git a/src/testing/Saga.cs b/src/testing/Saga.cs index afed350f002..c585a8e7e49 100644 --- a/src/testing/Saga.cs +++ b/src/testing/Saga.cs @@ -1,205 +1,205 @@ -using System; -using System.Collections.Generic; -using NServiceBus.Saga; -using Rhino.Mocks; - -namespace NServiceBus.Testing -{ - /// - /// Saga unit testing framework. - /// - public class Saga where T : ISaga, new() - { - private readonly Helper helper; - private readonly T saga; - private string messageId; - private string clientAddress; - private IDictionary incomingHeaders = new Dictionary(); - private IDictionary outgoingHeaders = new Dictionary(); - - internal Saga(T saga, MockRepository mocks, IBus bus, IMessageCreator messageCreator, List types) - { - this.saga = saga; - helper = new Helper(mocks, bus, messageCreator, types); - - var headers = bus.OutgoingHeaders; - LastCall.Repeat.Any().Return(outgoingHeaders); - } - - /// - /// Provides a way to set external dependencies on the saga under test. - /// - /// - /// - public Saga WithExternalDependencies(Action actionToSetUpExternalDependencies) - { - actionToSetUpExternalDependencies(saga); - - return this; - } - - /// - /// Set the address of the client that caused the saga to be started. - /// - /// - /// - public Saga WhenReceivesMessageFrom(string client) - { - clientAddress = client; - saga.Entity.Originator = client; - - return this; - } - - /// - /// Set the headers on an incoming message that will be return - /// when code calls Bus.CurrentMessageContext.Headers - /// - /// - /// - /// - public Saga SetIncomingHeader(string key, string value) - { - incomingHeaders[key] = value; - - return this; - } - - /// - /// Sets the Id of the incoming message that will be returned - /// when code calls Bus.CurrentMessageContext.Id - /// - /// - /// - public Saga SetMessageId(string messageId) - { - this.messageId = messageId; - - return this; - } - - /// - /// Get the headers set by the saga when it sends a message. - /// - public IDictionary OutgoingHeaders - { - get { return outgoingHeaders; } - } - - /// - /// Check that the saga sends a message of the given type complying with the given predicate. - /// - /// - /// - /// - public Saga ExpectSend(SendPredicate check) where TMessage : IMessage - { - helper.ExpectSend(check); - return this; - } - - /// - /// Check that the saga replies with the given message type complying with the given predicate. - /// - /// - /// - /// - public Saga ExpectReply(SendPredicate check) where TMessage : IMessage - { - helper.ExpectReply(check); - return this; - } - - /// - /// Check that the saga sends the given message type to its local queue - /// and that the message complies with the given predicate. - /// - /// - /// - /// - public Saga ExpectSendLocal(SendPredicate check) where TMessage : IMessage - { - helper.ExpectSendLocal(check); - return this; - } - - /// - /// Check that the saga uses the bus to return the appropriate error code. - /// - /// - /// - public Saga ExpectReturn(ReturnPredicate check) - { - helper.ExpectReturn(check); - return this; - } - - /// - /// Check that the saga sends the given message type to the appropriate destination. - /// - /// - /// - /// - public Saga ExpectSendToDestination(SendToDestinationPredicate check) where TMessage : IMessage - { - helper.ExpectSendToDestination(check); - return this; - } - - /// - /// Check that the saga replies to the originator with the given message type. - /// - /// - /// - /// - public Saga ExpectReplyToOrginator(SendPredicate check) where TMessage : IMessage - { - helper.ExpectReplyToOrginator(check); - return this; - } - - /// - /// Check that the saga publishes a message of the given type complying with the given predicate. - /// - /// - /// - /// - public Saga ExpectPublish(PublishPredicate check) where TMessage : IMessage - { - helper.ExpectPublish(check); - return this; - } - - /// - /// Uses the given delegate to invoke the saga, checking all the expectations previously set up, - /// and then clearing them for continued testing. - /// - /// - public Saga When(Action sagaIsInvoked) - { - var context = new MessageContext { Id = messageId, ReturnAddress = clientAddress, Headers = incomingHeaders }; - - helper.Go(context, () => sagaIsInvoked(saga)); - - return this; - } - - /// - /// Asserts that the saga is either complete or not. - /// - /// - /// - public Saga AssertSagaCompletionIs(bool complete) - { - if (saga.Completed == complete) - return this; - - if (saga.Completed) - throw new Exception("Assert failed. Saga has been completed."); - - throw new Exception("Assert failed. Saga has not been completed."); - } - - } - -} +using System; +using System.Collections.Generic; +using NServiceBus.Saga; +using Rhino.Mocks; + +namespace NServiceBus.Testing +{ + /// + /// Saga unit testing framework. + /// + public class Saga where T : ISaga, new() + { + private readonly Helper helper; + private readonly T saga; + private string messageId; + private string clientAddress; + private IDictionary incomingHeaders = new Dictionary(); + private IDictionary outgoingHeaders = new Dictionary(); + + internal Saga(T saga, MockRepository mocks, IBus bus, IMessageCreator messageCreator, List types) + { + this.saga = saga; + helper = new Helper(mocks, bus, messageCreator, types); + + var headers = bus.OutgoingHeaders; + LastCall.Repeat.Any().Return(outgoingHeaders); + } + + /// + /// Provides a way to set external dependencies on the saga under test. + /// + /// + /// + public Saga WithExternalDependencies(Action actionToSetUpExternalDependencies) + { + actionToSetUpExternalDependencies(saga); + + return this; + } + + /// + /// Set the address of the client that caused the saga to be started. + /// + /// + /// + public Saga WhenReceivesMessageFrom(string client) + { + clientAddress = client; + saga.Entity.Originator = client; + + return this; + } + + /// + /// Set the headers on an incoming message that will be return + /// when code calls Bus.CurrentMessageContext.Headers + /// + /// + /// + /// + public Saga SetIncomingHeader(string key, string value) + { + incomingHeaders[key] = value; + + return this; + } + + /// + /// Sets the Id of the incoming message that will be returned + /// when code calls Bus.CurrentMessageContext.Id + /// + /// + /// + public Saga SetMessageId(string messageId) + { + this.messageId = messageId; + + return this; + } + + /// + /// Get the headers set by the saga when it sends a message. + /// + public IDictionary OutgoingHeaders + { + get { return outgoingHeaders; } + } + + /// + /// Check that the saga sends a message of the given type complying with the given predicate. + /// + /// + /// + /// + public Saga ExpectSend(SendPredicate check) where TMessage : IMessage + { + helper.ExpectSend(check); + return this; + } + + /// + /// Check that the saga replies with the given message type complying with the given predicate. + /// + /// + /// + /// + public Saga ExpectReply(SendPredicate check) where TMessage : IMessage + { + helper.ExpectReply(check); + return this; + } + + /// + /// Check that the saga sends the given message type to its local queue + /// and that the message complies with the given predicate. + /// + /// + /// + /// + public Saga ExpectSendLocal(SendPredicate check) where TMessage : IMessage + { + helper.ExpectSendLocal(check); + return this; + } + + /// + /// Check that the saga uses the bus to return the appropriate error code. + /// + /// + /// + public Saga ExpectReturn(ReturnPredicate check) + { + helper.ExpectReturn(check); + return this; + } + + /// + /// Check that the saga sends the given message type to the appropriate destination. + /// + /// + /// + /// + public Saga ExpectSendToDestination(SendToDestinationPredicate check) where TMessage : IMessage + { + helper.ExpectSendToDestination(check); + return this; + } + + /// + /// Check that the saga replies to the originator with the given message type. + /// + /// + /// + /// + public Saga ExpectReplyToOrginator(SendPredicate check) where TMessage : IMessage + { + helper.ExpectReplyToOrginator(check); + return this; + } + + /// + /// Check that the saga publishes a message of the given type complying with the given predicate. + /// + /// + /// + /// + public Saga ExpectPublish(PublishPredicate check) where TMessage : IMessage + { + helper.ExpectPublish(check); + return this; + } + + /// + /// Uses the given delegate to invoke the saga, checking all the expectations previously set up, + /// and then clearing them for continued testing. + /// + /// + public Saga When(Action sagaIsInvoked) + { + var context = new MessageContext { Id = messageId, ReturnAddress = clientAddress, Headers = incomingHeaders }; + + helper.Go(context, () => sagaIsInvoked(saga)); + + return this; + } + + /// + /// Asserts that the saga is either complete or not. + /// + /// + /// + public Saga AssertSagaCompletionIs(bool complete) + { + if (saga.Completed == complete) + return this; + + if (saga.Completed) + throw new Exception("Assert failed. Saga has been completed."); + + throw new Exception("Assert failed. Saga has not been completed."); + } + + } + +} diff --git a/src/testing/Test.cs b/src/testing/Test.cs index b650dbea4bc..69e6f9a8b69 100644 --- a/src/testing/Test.cs +++ b/src/testing/Test.cs @@ -1,187 +1,187 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using NServiceBus.Saga; -using NServiceBus.Serialization; -using NServiceBus.Unicast; -using Rhino.Mocks; - -namespace NServiceBus.Testing -{ - /// - /// Entry class used for unit testing - /// - public static class Test - { - /// - /// Initializes the testing infrastructure. - /// - public static void Initialize() - { - Configure.With(); - InitializeInternal(); - } - - /// - /// Initializes the testing infrastructure specifying which assemblies to scan. - /// - public static void Initialize(params Assembly[] assemblies) - { - Configure.With(assemblies); - InitializeInternal(); - } - - private static void InitializeInternal() - { - Configure.Instance - .DefaultBuilder() - .XmlSerializer() - .InMemoryFaultManagement(); - } - - /// - /// Begin the test script for a saga of type T. - /// - /// - /// - public static Saga Saga() where T : ISaga, new() - { - return Saga(Guid.NewGuid()); - } - - /// - /// Begin the test script for a saga of type T while specifying the saga id. - /// - /// - /// - public static Saga Saga(Guid sagaId) where T : ISaga, new() - { - var saga = (T)Activator.CreateInstance(typeof(T)); - - var prop = typeof(T).GetProperty("Data"); - var sagaData = Activator.CreateInstance(prop.PropertyType) as ISagaEntity; - - saga.Entity = sagaData; - - if (saga.Entity != null) saga.Entity.Id = sagaId; - - return Saga(saga); - } - - /// - /// Begin the test script for the passed in saga instance. - /// Callers need to instantiate the saga's data class as well as give it an ID. - /// - /// - /// - /// - public static Saga Saga(T saga) where T : ISaga, new() - { - var mocks = new MockRepository(); - var bus = MockTheBus(mocks); - - saga.Bus = bus; - - var messageTypes = Configure.TypesToScan.Where(t => typeof(IMessage).IsAssignableFrom(t)).ToList(); - - return new Saga(saga, mocks, bus, _messageCreator, messageTypes); - } - - /// - /// Specify a test for a message handler of type T for a given message of type TMessage. - /// - /// - /// - public static Handler Handler() where T : new() - { - var handler = (T)Activator.CreateInstance(typeof(T)); - - return Handler(handler); - } - - /// - /// Specify a test for a message handler while supplying the instance to - /// test - useful if you use constructor-based dependency injection. - /// - /// - /// - public static Handler Handler(T handler) - { - bool isHandler = false; - foreach(var i in handler.GetType().GetInterfaces()) - { - var args = i.GetGenericArguments(); - if (args.Length == 1) - if (typeof(IMessage).IsAssignableFrom(args[0])) - if (typeof(IMessageHandler<>).MakeGenericType(args[0]).IsAssignableFrom(i)) - isHandler = true; - } - - if (!isHandler) - throw new ArgumentException("The handler object given does not implement IMessageHandler where T : IMessage.", "handler"); - - var mocks = new MockRepository(); - var bus = MockTheBus(mocks); - - var prop = typeof(T).GetProperties().Where(p => p.PropertyType == typeof(IBus)).FirstOrDefault(); - if (prop != null) - prop.SetValue(handler, bus, null); - - var messageTypes = Configure.TypesToScan.Where(t => typeof(IMessage).IsAssignableFrom(t)).ToList(); - - return new Handler(handler, mocks, bus, _messageCreator, messageTypes); - } - - private static IUnicastBus MockTheBus(MockRepository mocks) - { - var bus = mocks.DynamicMock(); - var starter = mocks.DynamicMock(); - - Configure.Instance.Configurer.RegisterSingleton(typeof(IStartableBus), starter); - Configure.Instance.Configurer.RegisterSingleton(typeof(IUnicastBus), bus); - - bus.Replay(); // to neutralize any event subscriptions by rest of NSB - - ExtensionMethods.Bus = bus; - - Configure.Instance.CreateBus(); - - Configure.Instance.Builder.Build(); // needed to pass message types to message creator - _messageCreator = Configure.Instance.Builder.Build(); - if (_messageCreator == null) - throw new InvalidOperationException("Please call 'Initialize' before calling this method."); - - bus.BackToRecord(); // to get ready for testing - - return bus; - } - - /// - /// Instantiate a new message of type TMessage. - /// - /// - /// - public static TMessage CreateInstance() where TMessage : IMessage - { - return _messageCreator.CreateInstance(); - } - - /// - /// Instantiate a new message of type TMessage performing the given action - /// on the created message. - /// - /// - /// - /// - public static TMessage CreateInstance(Action action) where TMessage : IMessage - { - return _messageCreator.CreateInstance(action); - } - - /// - /// Returns the message creator. - /// - private static IMessageCreator _messageCreator; - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using NServiceBus.Saga; +using NServiceBus.Serialization; +using NServiceBus.Unicast; +using Rhino.Mocks; + +namespace NServiceBus.Testing +{ + /// + /// Entry class used for unit testing + /// + public static class Test + { + /// + /// Initializes the testing infrastructure. + /// + public static void Initialize() + { + Configure.With(); + InitializeInternal(); + } + + /// + /// Initializes the testing infrastructure specifying which assemblies to scan. + /// + public static void Initialize(params Assembly[] assemblies) + { + Configure.With(assemblies); + InitializeInternal(); + } + + private static void InitializeInternal() + { + Configure.Instance + .DefaultBuilder() + .XmlSerializer() + .InMemoryFaultManagement(); + } + + /// + /// Begin the test script for a saga of type T. + /// + /// + /// + public static Saga Saga() where T : ISaga, new() + { + return Saga(Guid.NewGuid()); + } + + /// + /// Begin the test script for a saga of type T while specifying the saga id. + /// + /// + /// + public static Saga Saga(Guid sagaId) where T : ISaga, new() + { + var saga = (T)Activator.CreateInstance(typeof(T)); + + var prop = typeof(T).GetProperty("Data"); + var sagaData = Activator.CreateInstance(prop.PropertyType) as ISagaEntity; + + saga.Entity = sagaData; + + if (saga.Entity != null) saga.Entity.Id = sagaId; + + return Saga(saga); + } + + /// + /// Begin the test script for the passed in saga instance. + /// Callers need to instantiate the saga's data class as well as give it an ID. + /// + /// + /// + /// + public static Saga Saga(T saga) where T : ISaga, new() + { + var mocks = new MockRepository(); + var bus = MockTheBus(mocks); + + saga.Bus = bus; + + var messageTypes = Configure.TypesToScan.Where(t => typeof(IMessage).IsAssignableFrom(t)).ToList(); + + return new Saga(saga, mocks, bus, _messageCreator, messageTypes); + } + + /// + /// Specify a test for a message handler of type T for a given message of type TMessage. + /// + /// + /// + public static Handler Handler() where T : new() + { + var handler = (T)Activator.CreateInstance(typeof(T)); + + return Handler(handler); + } + + /// + /// Specify a test for a message handler while supplying the instance to + /// test - useful if you use constructor-based dependency injection. + /// + /// + /// + public static Handler Handler(T handler) + { + bool isHandler = false; + foreach(var i in handler.GetType().GetInterfaces()) + { + var args = i.GetGenericArguments(); + if (args.Length == 1) + if (typeof(IMessage).IsAssignableFrom(args[0])) + if (typeof(IMessageHandler<>).MakeGenericType(args[0]).IsAssignableFrom(i)) + isHandler = true; + } + + if (!isHandler) + throw new ArgumentException("The handler object given does not implement IMessageHandler where T : IMessage.", "handler"); + + var mocks = new MockRepository(); + var bus = MockTheBus(mocks); + + var prop = typeof(T).GetProperties().Where(p => p.PropertyType == typeof(IBus)).FirstOrDefault(); + if (prop != null) + prop.SetValue(handler, bus, null); + + var messageTypes = Configure.TypesToScan.Where(t => typeof(IMessage).IsAssignableFrom(t)).ToList(); + + return new Handler(handler, mocks, bus, _messageCreator, messageTypes); + } + + private static IUnicastBus MockTheBus(MockRepository mocks) + { + var bus = mocks.DynamicMock(); + var starter = mocks.DynamicMock(); + + Configure.Instance.Configurer.RegisterSingleton(typeof(IStartableBus), starter); + Configure.Instance.Configurer.RegisterSingleton(typeof(IUnicastBus), bus); + + bus.Replay(); // to neutralize any event subscriptions by rest of NSB + + ExtensionMethods.Bus = bus; + + Configure.Instance.CreateBus(); + + Configure.Instance.Builder.Build(); // needed to pass message types to message creator + _messageCreator = Configure.Instance.Builder.Build(); + if (_messageCreator == null) + throw new InvalidOperationException("Please call 'Initialize' before calling this method."); + + bus.BackToRecord(); // to get ready for testing + + return bus; + } + + /// + /// Instantiate a new message of type TMessage. + /// + /// + /// + public static TMessage CreateInstance() where TMessage : IMessage + { + return _messageCreator.CreateInstance(); + } + + /// + /// Instantiate a new message of type TMessage performing the given action + /// on the created message. + /// + /// + /// + /// + public static TMessage CreateInstance(Action action) where TMessage : IMessage + { + return _messageCreator.CreateInstance(action); + } + + /// + /// Returns the message creator. + /// + private static IMessageCreator _messageCreator; + } +} diff --git a/src/timeout/Timeout.MessageHandlers/App.config b/src/timeout/Timeout.MessageHandlers/App.config index f988f569bb9..d20bcf7b77a 100644 --- a/src/timeout/Timeout.MessageHandlers/App.config +++ b/src/timeout/Timeout.MessageHandlers/App.config @@ -1,29 +1,29 @@ - - - -
- - - - - - - - - - - - - - - - - - - - + + + +
+ + + + + + + + + + + + + + + + + + + + diff --git a/src/timeout/Timeout.MessageHandlers/Endpoint.cs b/src/timeout/Timeout.MessageHandlers/Endpoint.cs index fe3f894b830..7d133a509b8 100644 --- a/src/timeout/Timeout.MessageHandlers/Endpoint.cs +++ b/src/timeout/Timeout.MessageHandlers/Endpoint.cs @@ -1,55 +1,55 @@ -using System.Configuration; -using NServiceBus; - -namespace Timeout.MessageHandlers -{ - /// - /// Configures the timeout host. - /// - public class Endpoint : IConfigureThisEndpoint, AsA_Server, IWantCustomInitialization - { - void IWantCustomInitialization.Init() - { - var configure = NServiceBus.Configure.With().DefaultBuilder(); - - string nameSpace = ConfigurationManager.AppSettings["NameSpace"]; - string serialization = ConfigurationManager.AppSettings["Serialization"]; - - switch (serialization) - { - case "xml": - configure.XmlSerializer(nameSpace); - break; - case "binary": - configure.BinarySerializer(); - break; - default: - throw new ConfigurationErrorsException("Serialization can only be one of 'interfaces', 'xml', or 'binary'."); - } - } - } - - /// - /// Configures performance behavior of the timeout manager - /// - public class PerformanceConfig : IWantCustomInitialization - { - void IWantCustomInitialization.Init() - { - string maxSagaIdsToStore = ConfigurationManager.AppSettings["MaxSagasIdsToStore"]; - string millisToSleepBetweenMessages = ConfigurationManager.AppSettings["MillisToSleepBetweenMessages"]; - - int sagas = 1000; - if (!string.IsNullOrEmpty(maxSagaIdsToStore)) - int.TryParse(maxSagaIdsToStore, out sagas); - - NServiceBus.Configure.Instance.Configurer.ConfigureProperty(h => h.MaxSagaIdsToStore, sagas); - - int millis = 10; - if (!string.IsNullOrEmpty(millisToSleepBetweenMessages)) - int.TryParse(millisToSleepBetweenMessages, out millis); - - NServiceBus.Configure.Instance.Configurer.ConfigureProperty(h => h.MillisToSleepBetweenMessages, millis); - } - } -} +using System.Configuration; +using NServiceBus; + +namespace Timeout.MessageHandlers +{ + /// + /// Configures the timeout host. + /// + public class Endpoint : IConfigureThisEndpoint, AsA_Server, IWantCustomInitialization + { + void IWantCustomInitialization.Init() + { + var configure = NServiceBus.Configure.With().DefaultBuilder(); + + string nameSpace = ConfigurationManager.AppSettings["NameSpace"]; + string serialization = ConfigurationManager.AppSettings["Serialization"]; + + switch (serialization) + { + case "xml": + configure.XmlSerializer(nameSpace); + break; + case "binary": + configure.BinarySerializer(); + break; + default: + throw new ConfigurationErrorsException("Serialization can only be one of 'interfaces', 'xml', or 'binary'."); + } + } + } + + /// + /// Configures performance behavior of the timeout manager + /// + public class PerformanceConfig : IWantCustomInitialization + { + void IWantCustomInitialization.Init() + { + string maxSagaIdsToStore = ConfigurationManager.AppSettings["MaxSagasIdsToStore"]; + string millisToSleepBetweenMessages = ConfigurationManager.AppSettings["MillisToSleepBetweenMessages"]; + + int sagas = 1000; + if (!string.IsNullOrEmpty(maxSagaIdsToStore)) + int.TryParse(maxSagaIdsToStore, out sagas); + + NServiceBus.Configure.Instance.Configurer.ConfigureProperty(h => h.MaxSagaIdsToStore, sagas); + + int millis = 10; + if (!string.IsNullOrEmpty(millisToSleepBetweenMessages)) + int.TryParse(millisToSleepBetweenMessages, out millis); + + NServiceBus.Configure.Instance.Configurer.ConfigureProperty(h => h.MillisToSleepBetweenMessages, millis); + } + } +} diff --git a/src/timeout/Timeout.MessageHandlers/Properties/AssemblyInfo.cs b/src/timeout/Timeout.MessageHandlers/Properties/AssemblyInfo.cs index 857ca2075a8..10ce42f0ffc 100644 --- a/src/timeout/Timeout.MessageHandlers/Properties/AssemblyInfo.cs +++ b/src/timeout/Timeout.MessageHandlers/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Timeout Message Handlers")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Timeout Message Handlers")] [assembly: AssemblyDescription("Message Handlers for timeout messages in nServiceBus")] \ No newline at end of file diff --git a/src/timeout/Timeout.MessageHandlers/Timeout.MessageHandlers.csproj b/src/timeout/Timeout.MessageHandlers/Timeout.MessageHandlers.csproj index e70106d33bd..43126fe3c46 100644 --- a/src/timeout/Timeout.MessageHandlers/Timeout.MessageHandlers.csproj +++ b/src/timeout/Timeout.MessageHandlers/Timeout.MessageHandlers.csproj @@ -1,124 +1,124 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {7EA93511-0B01-4E6B-95C4-A3069A4A107A} - Library - Properties - Timeout.MessageHandlers - Timeout.MessageHandlers - - - - - - v4.0 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\Timeout.MessageHandlers.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\Timeout.MessageHandlers.XML - AllRules.ruleset - - - - False - ..\..\..\lib\log4net.dll - - - False - ..\..\..\build\output\NServiceBus.dll - - - False - ..\..\..\build\output\NServiceBus.Core.dll - - - False - ..\..\..\build\output\host\NServiceBus.Host.exe - - - - - 3.5 - - - - - - - CommonAssemblyInfo.cs - - - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - Program - $(ProjectDir)$(OutputPath)NServiceBus.Host.exe - AllRules.ruleset - - - xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\build\timeout\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {7EA93511-0B01-4E6B-95C4-A3069A4A107A} + Library + Properties + Timeout.MessageHandlers + Timeout.MessageHandlers + + + + + + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\Timeout.MessageHandlers.XML + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\Timeout.MessageHandlers.XML + AllRules.ruleset + + + + False + ..\..\..\lib\log4net.dll + + + False + ..\..\..\build\output\NServiceBus.dll + + + False + ..\..\..\build\output\NServiceBus.Core.dll + + + False + ..\..\..\build\output\host\NServiceBus.Host.exe + + + + + 3.5 + + + + + + + CommonAssemblyInfo.cs + + + + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + Program + $(ProjectDir)$(OutputPath)NServiceBus.Host.exe + AllRules.ruleset + + + xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\build\timeout\" + \ No newline at end of file diff --git a/src/timeout/Timeout.MessageHandlers/TimeoutMessageHandler.cs b/src/timeout/Timeout.MessageHandlers/TimeoutMessageHandler.cs index 476978e4dcf..f3a238513a9 100644 --- a/src/timeout/Timeout.MessageHandlers/TimeoutMessageHandler.cs +++ b/src/timeout/Timeout.MessageHandlers/TimeoutMessageHandler.cs @@ -1,93 +1,93 @@ -using System; -using System.IO; -using System.Runtime.Serialization.Formatters.Binary; -using NServiceBus; -using NServiceBus.Saga; -using System.Collections.Generic; -using System.Threading; - -namespace Timeout.MessageHandlers -{ - /// - /// Handles TimeoutMessage. - /// - public class TimeoutMessageHandler : IMessageHandler - { - /// - /// Used for sending responses. - /// - public IBus Bus { get; set; } - - /// - /// Handles the TimeoutMessage. - /// - /// - public void Handle(TimeoutMessage message) - { - Thread.Sleep(MillisToSleepBetweenMessages); - - if (message.ClearTimeout) - { - SagaIdsToClear.Add(message.SagaId); - - if (SagaIdsToClear.Count > MaxSagaIdsToStore) - SagaIdsToClear.RemoveAt(0); - - return; - } - - if (SagaIdsToClear.Contains(message.SagaId)) - { - SagaIdsToClear.Remove(message.SagaId); - return; - } - - if (message.HasNotExpired()) - Bus.HandleCurrentMessageLater(); - else - Bus.Send(Bus.CurrentMessageContext.ReturnAddress, CloneMessage(message)); - } - - private IMessage CloneMessage(IMessage source) - { - var clone = (IMessage)FullClone(source); - this.AppendCurrentHeadersToClone(clone); - return clone; - } - - private static object FullClone(object value) - { - using (var stream = new MemoryStream()) - { - var formatter = new BinaryFormatter(); - formatter.Serialize(stream, value); - stream.Position = 0; - return formatter.Deserialize(stream); - } - } - - private void AppendCurrentHeadersToClone(IMessage target) - { - foreach (var sourceKey in this.Bus.CurrentMessageContext.Headers.Keys) - target.CopyHeaderFromRequest(sourceKey); - } - - - - /// - /// There are cases when the notification about clearing sagas - /// arrives after the timeout has already occurred. Since we - /// can't know that we won't get a timeout message with a given id, - /// this caps the number that are stored so that memory doesn't leak. - /// For simplicity, we don't try to decrease the list in the background. - /// - public int MaxSagaIdsToStore { get; set; } - - /// - /// The time in milliseconds that the handler sleeps before processing a message. - /// - public int MillisToSleepBetweenMessages { get; set; } - - private static readonly List SagaIdsToClear = new List(); - } -} +using System; +using System.IO; +using System.Runtime.Serialization.Formatters.Binary; +using NServiceBus; +using NServiceBus.Saga; +using System.Collections.Generic; +using System.Threading; + +namespace Timeout.MessageHandlers +{ + /// + /// Handles TimeoutMessage. + /// + public class TimeoutMessageHandler : IMessageHandler + { + /// + /// Used for sending responses. + /// + public IBus Bus { get; set; } + + /// + /// Handles the TimeoutMessage. + /// + /// + public void Handle(TimeoutMessage message) + { + Thread.Sleep(MillisToSleepBetweenMessages); + + if (message.ClearTimeout) + { + SagaIdsToClear.Add(message.SagaId); + + if (SagaIdsToClear.Count > MaxSagaIdsToStore) + SagaIdsToClear.RemoveAt(0); + + return; + } + + if (SagaIdsToClear.Contains(message.SagaId)) + { + SagaIdsToClear.Remove(message.SagaId); + return; + } + + if (message.HasNotExpired()) + Bus.HandleCurrentMessageLater(); + else + Bus.Send(Bus.CurrentMessageContext.ReturnAddress, CloneMessage(message)); + } + + private IMessage CloneMessage(IMessage source) + { + var clone = (IMessage)FullClone(source); + this.AppendCurrentHeadersToClone(clone); + return clone; + } + + private static object FullClone(object value) + { + using (var stream = new MemoryStream()) + { + var formatter = new BinaryFormatter(); + formatter.Serialize(stream, value); + stream.Position = 0; + return formatter.Deserialize(stream); + } + } + + private void AppendCurrentHeadersToClone(IMessage target) + { + foreach (var sourceKey in this.Bus.CurrentMessageContext.Headers.Keys) + target.CopyHeaderFromRequest(sourceKey); + } + + + + /// + /// There are cases when the notification about clearing sagas + /// arrives after the timeout has already occurred. Since we + /// can't know that we won't get a timeout message with a given id, + /// this caps the number that are stored so that memory doesn't leak. + /// For simplicity, we don't try to decrease the list in the background. + /// + public int MaxSagaIdsToStore { get; set; } + + /// + /// The time in milliseconds that the handler sleeps before processing a message. + /// + public int MillisToSleepBetweenMessages { get; set; } + + private static readonly List SagaIdsToClear = new List(); + } +} diff --git a/src/timeout/Timeout.sln b/src/timeout/Timeout.sln index f6692d730ec..3b2d0da4b9d 100644 --- a/src/timeout/Timeout.sln +++ b/src/timeout/Timeout.sln @@ -1,20 +1,20 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Timeout.MessageHandlers", "Timeout.MessageHandlers\Timeout.MessageHandlers.csproj", "{7EA93511-0B01-4E6B-95C4-A3069A4A107A}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {7EA93511-0B01-4E6B-95C4-A3069A4A107A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7EA93511-0B01-4E6B-95C4-A3069A4A107A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7EA93511-0B01-4E6B-95C4-A3069A4A107A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7EA93511-0B01-4E6B-95C4-A3069A4A107A}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Timeout.MessageHandlers", "Timeout.MessageHandlers\Timeout.MessageHandlers.csproj", "{7EA93511-0B01-4E6B-95C4-A3069A4A107A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7EA93511-0B01-4E6B-95C4-A3069A4A107A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7EA93511-0B01-4E6B-95C4-A3069A4A107A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7EA93511-0B01-4E6B-95C4-A3069A4A107A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7EA93511-0B01-4E6B-95C4-A3069A4A107A}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/tools/management/Errors/ReturnToSourceQueue/NServiceBus.Tools.Management.Errors.ReturnToSourceQueue/Class1.cs b/src/tools/management/Errors/ReturnToSourceQueue/NServiceBus.Tools.Management.Errors.ReturnToSourceQueue/Class1.cs index ce79a746269..5d49b8072d5 100644 --- a/src/tools/management/Errors/ReturnToSourceQueue/NServiceBus.Tools.Management.Errors.ReturnToSourceQueue/Class1.cs +++ b/src/tools/management/Errors/ReturnToSourceQueue/NServiceBus.Tools.Management.Errors.ReturnToSourceQueue/Class1.cs @@ -1,56 +1,56 @@ -using System; -using System.Messaging; -using System.Transactions; -using NServiceBus.Utils; - -namespace NServiceBus.Tools.Management.Errors.ReturnToSourceQueue -{ - public class ErrorManager - { - private MessageQueue queue; - - public virtual string InputQueue - { - set - { - string path = MsmqUtilities.GetFullPath(value); - var q = new MessageQueue(path); - - if (!q.Transactional) - throw new ArgumentException("Queue must be transactional (" + q.Path + ")."); - - queue = q; - - var mpf = new MessagePropertyFilter(); - mpf.SetAll(); - - queue.MessageReadPropertyFilter = mpf; - } - } - - public void ReturnAll() - { - foreach(var m in queue.GetAllMessages()) - ReturnMessageToSourceQueue(m.Id); - } - - /// - /// May throw a timeout exception if a message with the given id cannot be found. - /// - /// - public void ReturnMessageToSourceQueue(string messageId) - { - using (var scope = new TransactionScope()) - { - var m = queue.ReceiveById(messageId, TimeSpan.FromSeconds(5), MessageQueueTransactionType.Automatic); - - using (var q = m.ResponseQueue) - { - q.Send(m, MessageQueueTransactionType.Automatic); - } - - scope.Complete(); - } - } - } -} +using System; +using System.Messaging; +using System.Transactions; +using NServiceBus.Utils; + +namespace NServiceBus.Tools.Management.Errors.ReturnToSourceQueue +{ + public class ErrorManager + { + private MessageQueue queue; + + public virtual string InputQueue + { + set + { + string path = MsmqUtilities.GetFullPath(value); + var q = new MessageQueue(path); + + if (!q.Transactional) + throw new ArgumentException("Queue must be transactional (" + q.Path + ")."); + + queue = q; + + var mpf = new MessagePropertyFilter(); + mpf.SetAll(); + + queue.MessageReadPropertyFilter = mpf; + } + } + + public void ReturnAll() + { + foreach(var m in queue.GetAllMessages()) + ReturnMessageToSourceQueue(m.Id); + } + + /// + /// May throw a timeout exception if a message with the given id cannot be found. + /// + /// + public void ReturnMessageToSourceQueue(string messageId) + { + using (var scope = new TransactionScope()) + { + var m = queue.ReceiveById(messageId, TimeSpan.FromSeconds(5), MessageQueueTransactionType.Automatic); + + using (var q = m.ResponseQueue) + { + q.Send(m, MessageQueueTransactionType.Automatic); + } + + scope.Complete(); + } + } + } +} diff --git a/src/tools/management/Errors/ReturnToSourceQueue/NServiceBus.Tools.Management.Errors.ReturnToSourceQueue/NServiceBus.Tools.Management.Errors.ReturnToSourceQueue.csproj b/src/tools/management/Errors/ReturnToSourceQueue/NServiceBus.Tools.Management.Errors.ReturnToSourceQueue/NServiceBus.Tools.Management.Errors.ReturnToSourceQueue.csproj index c0c2d41f35a..f58742c5242 100644 --- a/src/tools/management/Errors/ReturnToSourceQueue/NServiceBus.Tools.Management.Errors.ReturnToSourceQueue/NServiceBus.Tools.Management.Errors.ReturnToSourceQueue.csproj +++ b/src/tools/management/Errors/ReturnToSourceQueue/NServiceBus.Tools.Management.Errors.ReturnToSourceQueue/NServiceBus.Tools.Management.Errors.ReturnToSourceQueue.csproj @@ -1,102 +1,102 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {B9CE6C00-1AE2-4125-BD1A-A7AABA1072CA} - Library - Properties - NServiceBus.Tools.Management.Errors.ReturnToSourceQueue - NServiceBus.Tools.Management.Errors.ReturnToSourceQueue - - - - - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\..\..\..\build\output\NServiceBus.dll - - - False - ..\..\..\..\..\..\build\output\NServiceBus.Core.dll - - - - - - - - - - - - - - False - Microsoft .NET Framework 4 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - false - - - False - Windows Installer 3.1 - true - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {B9CE6C00-1AE2-4125-BD1A-A7AABA1072CA} + Library + Properties + NServiceBus.Tools.Management.Errors.ReturnToSourceQueue + NServiceBus.Tools.Management.Errors.ReturnToSourceQueue + + + + + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\..\..\..\build\output\NServiceBus.dll + + + False + ..\..\..\..\..\..\build\output\NServiceBus.Core.dll + + + + + + + + + + + + + + False + Microsoft .NET Framework 4 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 3.1 + true + + + + \ No newline at end of file diff --git a/src/tools/management/Errors/ReturnToSourceQueue/NServiceBus.Tools.Management.Errors.ReturnToSourceQueue/Properties/AssemblyInfo.cs b/src/tools/management/Errors/ReturnToSourceQueue/NServiceBus.Tools.Management.Errors.ReturnToSourceQueue/Properties/AssemblyInfo.cs index f1ee627c602..6367c33d215 100644 --- a/src/tools/management/Errors/ReturnToSourceQueue/NServiceBus.Tools.Management.Errors.ReturnToSourceQueue/Properties/AssemblyInfo.cs +++ b/src/tools/management/Errors/ReturnToSourceQueue/NServiceBus.Tools.Management.Errors.ReturnToSourceQueue/Properties/AssemblyInfo.cs @@ -1,35 +1,35 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("NServiceBus.Tools.Management.Errors.ReturnToSourceQueue")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("NServiceBus.Tools.Management.Errors.ReturnToSourceQueue")] -[assembly: AssemblyCopyright("Copyright © 2008")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("8188bcaf-ae07-4d5e-91d1-247cd480446d")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("NServiceBus.Tools.Management.Errors.ReturnToSourceQueue")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("NServiceBus.Tools.Management.Errors.ReturnToSourceQueue")] +[assembly: AssemblyCopyright("Copyright © 2008")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("8188bcaf-ae07-4d5e-91d1-247cd480446d")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/tools/management/Errors/ReturnToSourceQueue/ReturnToSourceQueue.sln b/src/tools/management/Errors/ReturnToSourceQueue/ReturnToSourceQueue.sln index 550c8e5d555..a628712b7f3 100644 --- a/src/tools/management/Errors/ReturnToSourceQueue/ReturnToSourceQueue.sln +++ b/src/tools/management/Errors/ReturnToSourceQueue/ReturnToSourceQueue.sln @@ -1,26 +1,26 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReturnToSourceQueue", "ReturnToSourceQueue\ReturnToSourceQueue.csproj", "{C4693C58-BB66-4630-984E-313E1BCC2474}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Tools.Management.Errors.ReturnToSourceQueue", "NServiceBus.Tools.Management.Errors.ReturnToSourceQueue\NServiceBus.Tools.Management.Errors.ReturnToSourceQueue.csproj", "{B9CE6C00-1AE2-4125-BD1A-A7AABA1072CA}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C4693C58-BB66-4630-984E-313E1BCC2474}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C4693C58-BB66-4630-984E-313E1BCC2474}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C4693C58-BB66-4630-984E-313E1BCC2474}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C4693C58-BB66-4630-984E-313E1BCC2474}.Release|Any CPU.Build.0 = Release|Any CPU - {B9CE6C00-1AE2-4125-BD1A-A7AABA1072CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B9CE6C00-1AE2-4125-BD1A-A7AABA1072CA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B9CE6C00-1AE2-4125-BD1A-A7AABA1072CA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B9CE6C00-1AE2-4125-BD1A-A7AABA1072CA}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReturnToSourceQueue", "ReturnToSourceQueue\ReturnToSourceQueue.csproj", "{C4693C58-BB66-4630-984E-313E1BCC2474}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Tools.Management.Errors.ReturnToSourceQueue", "NServiceBus.Tools.Management.Errors.ReturnToSourceQueue\NServiceBus.Tools.Management.Errors.ReturnToSourceQueue.csproj", "{B9CE6C00-1AE2-4125-BD1A-A7AABA1072CA}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C4693C58-BB66-4630-984E-313E1BCC2474}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C4693C58-BB66-4630-984E-313E1BCC2474}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C4693C58-BB66-4630-984E-313E1BCC2474}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C4693C58-BB66-4630-984E-313E1BCC2474}.Release|Any CPU.Build.0 = Release|Any CPU + {B9CE6C00-1AE2-4125-BD1A-A7AABA1072CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B9CE6C00-1AE2-4125-BD1A-A7AABA1072CA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B9CE6C00-1AE2-4125-BD1A-A7AABA1072CA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B9CE6C00-1AE2-4125-BD1A-A7AABA1072CA}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/tools/management/Errors/ReturnToSourceQueue/ReturnToSourceQueue/Program.cs b/src/tools/management/Errors/ReturnToSourceQueue/ReturnToSourceQueue/Program.cs index 0bf8d883e98..ac70829128f 100644 --- a/src/tools/management/Errors/ReturnToSourceQueue/ReturnToSourceQueue/Program.cs +++ b/src/tools/management/Errors/ReturnToSourceQueue/ReturnToSourceQueue/Program.cs @@ -1,59 +1,59 @@ -using System; -using NServiceBus.Tools.Management.Errors.ReturnToSourceQueue; - -namespace ReturnToSourceQueue -{ - class Program - { - static void Main(string[] args) - { - ErrorManager c = new ErrorManager(); - - string inputQueue = null; - string messageId = null; - - if (args != null && args.Length > 0) - inputQueue = args[0]; - - if (args != null && args.Length > 1) - messageId = args[1]; - - if (inputQueue == null) - { - Console.WriteLine("Please enter the error queue you would like to use:"); - inputQueue = Console.ReadLine(); - } - - if (messageId == null) - { - Console.WriteLine("Please enter the id of the message you'd like to return to its source queue, or 'all' to do so for all messages in the queue."); - messageId = Console.ReadLine(); - - Console.WriteLine("Attempting to return message to source queue. Please stand by."); - } - - c.InputQueue = inputQueue; - - try - { - if (messageId == "all") - c.ReturnAll(); - else - c.ReturnMessageToSourceQueue(messageId); - - Console.WriteLine("Success."); - - if (args == null || args.Length == 0) - { - Console.WriteLine("Press 'Enter' to exit."); - Console.ReadLine(); - } - } - catch(Exception e) - { - Console.WriteLine("Could not return message to source queue. Reason: " + e.Message); - Console.WriteLine(e.StackTrace); - } - } - } -} +using System; +using NServiceBus.Tools.Management.Errors.ReturnToSourceQueue; + +namespace ReturnToSourceQueue +{ + class Program + { + static void Main(string[] args) + { + ErrorManager c = new ErrorManager(); + + string inputQueue = null; + string messageId = null; + + if (args != null && args.Length > 0) + inputQueue = args[0]; + + if (args != null && args.Length > 1) + messageId = args[1]; + + if (inputQueue == null) + { + Console.WriteLine("Please enter the error queue you would like to use:"); + inputQueue = Console.ReadLine(); + } + + if (messageId == null) + { + Console.WriteLine("Please enter the id of the message you'd like to return to its source queue, or 'all' to do so for all messages in the queue."); + messageId = Console.ReadLine(); + + Console.WriteLine("Attempting to return message to source queue. Please stand by."); + } + + c.InputQueue = inputQueue; + + try + { + if (messageId == "all") + c.ReturnAll(); + else + c.ReturnMessageToSourceQueue(messageId); + + Console.WriteLine("Success."); + + if (args == null || args.Length == 0) + { + Console.WriteLine("Press 'Enter' to exit."); + Console.ReadLine(); + } + } + catch(Exception e) + { + Console.WriteLine("Could not return message to source queue. Reason: " + e.Message); + Console.WriteLine(e.StackTrace); + } + } + } +} diff --git a/src/tools/management/Errors/ReturnToSourceQueue/ReturnToSourceQueue/Properties/AssemblyInfo.cs b/src/tools/management/Errors/ReturnToSourceQueue/ReturnToSourceQueue/Properties/AssemblyInfo.cs index a41bb765ed9..1039e905b17 100644 --- a/src/tools/management/Errors/ReturnToSourceQueue/ReturnToSourceQueue/Properties/AssemblyInfo.cs +++ b/src/tools/management/Errors/ReturnToSourceQueue/ReturnToSourceQueue/Properties/AssemblyInfo.cs @@ -1,33 +1,33 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("ReturnToSourceQueue")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("ReturnToSourceQueue")] -[assembly: AssemblyCopyright("Copyright © 2008")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("c9d1bb80-048b-49be-a603-f1cfdb77c145")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ReturnToSourceQueue")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ReturnToSourceQueue")] +[assembly: AssemblyCopyright("Copyright © 2008")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("c9d1bb80-048b-49be-a603-f1cfdb77c145")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/tools/management/Errors/ReturnToSourceQueue/ReturnToSourceQueue/ReturnToSourceQueue.csproj b/src/tools/management/Errors/ReturnToSourceQueue/ReturnToSourceQueue/ReturnToSourceQueue.csproj index e66594c0010..8909dc8d629 100644 --- a/src/tools/management/Errors/ReturnToSourceQueue/ReturnToSourceQueue/ReturnToSourceQueue.csproj +++ b/src/tools/management/Errors/ReturnToSourceQueue/ReturnToSourceQueue/ReturnToSourceQueue.csproj @@ -1,109 +1,109 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {C4693C58-BB66-4630-984E-313E1BCC2474} - Exe - Properties - ReturnToSourceQueue - ReturnToSourceQueue - - - - - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\..\..\..\build\output\NServiceBus.dll - - - False - ..\..\..\..\..\..\build\output\NServiceBus.Core.dll - - - - - - - - - - - - {B9CE6C00-1AE2-4125-BD1A-A7AABA1072CA} - NServiceBus.Tools.Management.Errors.ReturnToSourceQueue - - - - - False - Microsoft .NET Framework 4 %28x86 and x64%29 - true - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - false - - - False - Windows Installer 3.1 - true - - - - - - xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\..\..\build\tools\ReturnToSourceQueue\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {C4693C58-BB66-4630-984E-313E1BCC2474} + Exe + Properties + ReturnToSourceQueue + ReturnToSourceQueue + + + + + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\..\..\..\build\output\NServiceBus.dll + + + False + ..\..\..\..\..\..\build\output\NServiceBus.Core.dll + + + + + + + + + + + + {B9CE6C00-1AE2-4125-BD1A-A7AABA1072CA} + NServiceBus.Tools.Management.Errors.ReturnToSourceQueue + + + + + False + Microsoft .NET Framework 4 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 3.1 + true + + + + + + xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\..\..\build\tools\ReturnToSourceQueue\" + \ No newline at end of file diff --git a/src/tools/management/Grid/Grid.sln b/src/tools/management/Grid/Grid.sln index 1ecc9e7e8b4..9e471eeca43 100644 --- a/src/tools/management/Grid/Grid.sln +++ b/src/tools/management/Grid/Grid.sln @@ -1,26 +1,26 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Grid", "Grid\Grid.csproj", "{DEC520C3-D1CA-4EF6-94FB-4F24F1D92651}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UI", "UI\UI.csproj", "{211C2BF6-5146-4019-8972-6AC87C90745B}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {DEC520C3-D1CA-4EF6-94FB-4F24F1D92651}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DEC520C3-D1CA-4EF6-94FB-4F24F1D92651}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DEC520C3-D1CA-4EF6-94FB-4F24F1D92651}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DEC520C3-D1CA-4EF6-94FB-4F24F1D92651}.Release|Any CPU.Build.0 = Release|Any CPU - {211C2BF6-5146-4019-8972-6AC87C90745B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {211C2BF6-5146-4019-8972-6AC87C90745B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {211C2BF6-5146-4019-8972-6AC87C90745B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {211C2BF6-5146-4019-8972-6AC87C90745B}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Grid", "Grid\Grid.csproj", "{DEC520C3-D1CA-4EF6-94FB-4F24F1D92651}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UI", "UI\UI.csproj", "{211C2BF6-5146-4019-8972-6AC87C90745B}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DEC520C3-D1CA-4EF6-94FB-4F24F1D92651}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DEC520C3-D1CA-4EF6-94FB-4F24F1D92651}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DEC520C3-D1CA-4EF6-94FB-4F24F1D92651}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DEC520C3-D1CA-4EF6-94FB-4F24F1D92651}.Release|Any CPU.Build.0 = Release|Any CPU + {211C2BF6-5146-4019-8972-6AC87C90745B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {211C2BF6-5146-4019-8972-6AC87C90745B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {211C2BF6-5146-4019-8972-6AC87C90745B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {211C2BF6-5146-4019-8972-6AC87C90745B}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/tools/management/Grid/Grid/Grid.csproj b/src/tools/management/Grid/Grid/Grid.csproj index 5604fae9e6f..89247f590ae 100644 --- a/src/tools/management/Grid/Grid/Grid.csproj +++ b/src/tools/management/Grid/Grid/Grid.csproj @@ -1,110 +1,110 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {DEC520C3-D1CA-4EF6-94FB-4F24F1D92651} - Library - Properties - Grid - Grid - - - - - - v4.0 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\..\..\lib\Interop.MSMQ.dll - - - False - ..\..\..\..\..\build\output\NServiceBus.dll - - - False - ..\..\..\..\..\build\output\NServiceBus.Core.dll - - - - 3.5 - - - - - - - - - CommonAssemblyInfo.cs - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {DEC520C3-D1CA-4EF6-94FB-4F24F1D92651} + Library + Properties + Grid + Grid + + + + + + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\..\..\lib\Interop.MSMQ.dll + + + False + ..\..\..\..\..\build\output\NServiceBus.dll + + + False + ..\..\..\..\..\build\output\NServiceBus.Core.dll + + + + 3.5 + + + + + + + + + CommonAssemblyInfo.cs + + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + \ No newline at end of file diff --git a/src/tools/management/Grid/Grid/ManagedEndpoint.cs b/src/tools/management/Grid/Grid/ManagedEndpoint.cs index 0d5e861f5e7..004e55c2e4b 100644 --- a/src/tools/management/Grid/Grid/ManagedEndpoint.cs +++ b/src/tools/management/Grid/Grid/ManagedEndpoint.cs @@ -1,53 +1,53 @@ -using System; -using System.Collections.Generic; - -namespace Grid -{ - [Serializable] - public class ManagedEndpoint - { - private string queue; - public string Queue - { - get {return queue;} - set{queue = value;} - } - - private string name; - public string Name - { - get { return name; } - set { name = value; } - } - - private int numberOfMessages; - public int NumberOfMessages - { - get - { - lock(this) - return numberOfMessages; - } - } - - private List workers = new List(); - public IList Workers - { - get { return workers; } - } - - public override string ToString() - { - return string.Format("{0} : {1}", this.name, this.queue); - } - - public void SetNumberOfMessages(int number) - { - lock (this) - this.numberOfMessages = number; - } - - public TimeSpan AgeOfOldestMessage { get; set; } - - } -} +using System; +using System.Collections.Generic; + +namespace Grid +{ + [Serializable] + public class ManagedEndpoint + { + private string queue; + public string Queue + { + get {return queue;} + set{queue = value;} + } + + private string name; + public string Name + { + get { return name; } + set { name = value; } + } + + private int numberOfMessages; + public int NumberOfMessages + { + get + { + lock(this) + return numberOfMessages; + } + } + + private List workers = new List(); + public IList Workers + { + get { return workers; } + } + + public override string ToString() + { + return string.Format("{0} : {1}", this.name, this.queue); + } + + public void SetNumberOfMessages(int number) + { + lock (this) + this.numberOfMessages = number; + } + + public TimeSpan AgeOfOldestMessage { get; set; } + + } +} diff --git a/src/tools/management/Grid/Grid/Manager.cs b/src/tools/management/Grid/Grid/Manager.cs index 5ef979b62a7..e91513edb54 100644 --- a/src/tools/management/Grid/Grid/Manager.cs +++ b/src/tools/management/Grid/Grid/Manager.cs @@ -1,189 +1,189 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Threading; -using NServiceBus.Grid.Messages; -using NServiceBus; -using System.IO; -using System.Runtime.Serialization.Formatters.Binary; -using System.Messaging; - - -namespace Grid -{ - public static class Manager - { - private static readonly string path = "storage.txt"; - - private static readonly int refreshInterval = 5; - public static int RefreshInterval - { - get - { - lock (typeof(Manager)) - return refreshInterval; - } - } - - private static IBus bus; - - private static List endpoints = new List(); - - private static readonly Timer timer = new Timer(CheckNumberOfMessages); - - static Manager() - { - if (File.Exists(path)) - { - try - { - Stream stream = File.OpenRead(path); - BinaryFormatter formatter = new BinaryFormatter(); - - object result = formatter.Deserialize(stream); - stream.Close(); - - endpoints = result as List; - } - catch(Exception) - { - // intentionally swallow exception - } - } - - timer.Change(0, refreshInterval*1000); - } - - public static void SetBus(IBus b) - { - bus = b; - } - - private static void CheckNumberOfMessages(object state) - { - timer.Change(int.MaxValue, int.MaxValue); - - Stopwatch watch = new Stopwatch(); - watch.Start(); - - List myList; - - lock(typeof(Manager)) - myList = new List(endpoints); - - foreach(ManagedEndpoint endpoint in myList) - { - MSMQ.MSMQManagementClass qMgmt = new MSMQ.MSMQManagementClass(); - object machine = Type.Missing; - object missing = Type.Missing; - object formatName = "DIRECT=OS:" + Environment.MachineName + "\\private$\\" + endpoint.Queue; - - try - { - qMgmt.Init(ref machine, ref missing, ref formatName); - endpoint.SetNumberOfMessages(qMgmt.MessageCount); - - MessageQueue q = new MessageQueue("FormatName:" + formatName as string); - - MessagePropertyFilter mpf = new MessagePropertyFilter(); - mpf.SetAll(); - - q.MessageReadPropertyFilter = mpf; - - Message m = q.Peek(); - if (m != null) - endpoint.AgeOfOldestMessage = DateTime.Now - m.SentTime; - } - catch - { - //intentionally swallow bad endpoints - } - } - - watch.Stop(); - - long due = refreshInterval*1000 - watch.ElapsedMilliseconds; - due = (due < 0 ? 0 : due); - - timer.Change(due, refreshInterval*1000); - } - - public static void Save() - { - if (!File.Exists(path)) - File.CreateText(path).Close(); - - Stream stream = File.OpenWrite(path); - BinaryFormatter formatter = new BinaryFormatter(); - - formatter.Serialize(stream, endpoints); - - stream.Close(); - } - - public static List GetManagedEndpoints() - { - lock (typeof(Manager)) - return new List(endpoints); - } - - public static void StoreManagedEndpoints(List points) - { - lock(typeof(Manager)) - endpoints = points; - } - - internal static void UpdateNumberOfWorkerThreads(string queue, int number) - { - List myList; - - lock(typeof(Manager)) - myList = new List(endpoints); - - foreach (ManagedEndpoint endpoint in myList) - foreach (Worker w in endpoint.Workers) - { - string[] aList = w.Queue.Split('\\'); - string a = aList[aList.Length - 1].ToLower(); - - string[] bList = queue.Split('\\'); - string b = bList[bList.Length - 1].ToLower(); - - if (a == b) - w.SetNumberOfWorkerThreads(number); - } - } - - public static void RefreshNumberOfWorkerThreads(string queue) - { - var message = new GetNumberOfWorkerThreadsMessage(); - bus.Send(queue, message).Register( - aResult => - { - var result = - aResult.AsyncState as CompletionResult; - if (result == null) - return; - if (result.Messages == null) - return; - if (result.Messages.Length != 1) - return; - var response = result.Messages[0] as GotNumberOfWorkerThreadsMessage; - if (response == null) - return; - var q = result.State as string; - - UpdateNumberOfWorkerThreads(q, response.NumberOfWorkerThreads); - }, queue); - } - - public static void SetNumberOfWorkerThreads(string queue, int number) - { - var message = new ChangeNumberOfWorkerThreadsMessage { NumberOfWorkerThreads = number }; - bus.Send(queue, message); - - RefreshNumberOfWorkerThreads(queue); - } - - } -} +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Threading; +using NServiceBus.Grid.Messages; +using NServiceBus; +using System.IO; +using System.Runtime.Serialization.Formatters.Binary; +using System.Messaging; + + +namespace Grid +{ + public static class Manager + { + private static readonly string path = "storage.txt"; + + private static readonly int refreshInterval = 5; + public static int RefreshInterval + { + get + { + lock (typeof(Manager)) + return refreshInterval; + } + } + + private static IBus bus; + + private static List endpoints = new List(); + + private static readonly Timer timer = new Timer(CheckNumberOfMessages); + + static Manager() + { + if (File.Exists(path)) + { + try + { + Stream stream = File.OpenRead(path); + BinaryFormatter formatter = new BinaryFormatter(); + + object result = formatter.Deserialize(stream); + stream.Close(); + + endpoints = result as List; + } + catch(Exception) + { + // intentionally swallow exception + } + } + + timer.Change(0, refreshInterval*1000); + } + + public static void SetBus(IBus b) + { + bus = b; + } + + private static void CheckNumberOfMessages(object state) + { + timer.Change(int.MaxValue, int.MaxValue); + + Stopwatch watch = new Stopwatch(); + watch.Start(); + + List myList; + + lock(typeof(Manager)) + myList = new List(endpoints); + + foreach(ManagedEndpoint endpoint in myList) + { + MSMQ.MSMQManagementClass qMgmt = new MSMQ.MSMQManagementClass(); + object machine = Type.Missing; + object missing = Type.Missing; + object formatName = "DIRECT=OS:" + Environment.MachineName + "\\private$\\" + endpoint.Queue; + + try + { + qMgmt.Init(ref machine, ref missing, ref formatName); + endpoint.SetNumberOfMessages(qMgmt.MessageCount); + + MessageQueue q = new MessageQueue("FormatName:" + formatName as string); + + MessagePropertyFilter mpf = new MessagePropertyFilter(); + mpf.SetAll(); + + q.MessageReadPropertyFilter = mpf; + + Message m = q.Peek(); + if (m != null) + endpoint.AgeOfOldestMessage = DateTime.Now - m.SentTime; + } + catch + { + //intentionally swallow bad endpoints + } + } + + watch.Stop(); + + long due = refreshInterval*1000 - watch.ElapsedMilliseconds; + due = (due < 0 ? 0 : due); + + timer.Change(due, refreshInterval*1000); + } + + public static void Save() + { + if (!File.Exists(path)) + File.CreateText(path).Close(); + + Stream stream = File.OpenWrite(path); + BinaryFormatter formatter = new BinaryFormatter(); + + formatter.Serialize(stream, endpoints); + + stream.Close(); + } + + public static List GetManagedEndpoints() + { + lock (typeof(Manager)) + return new List(endpoints); + } + + public static void StoreManagedEndpoints(List points) + { + lock(typeof(Manager)) + endpoints = points; + } + + internal static void UpdateNumberOfWorkerThreads(string queue, int number) + { + List myList; + + lock(typeof(Manager)) + myList = new List(endpoints); + + foreach (ManagedEndpoint endpoint in myList) + foreach (Worker w in endpoint.Workers) + { + string[] aList = w.Queue.Split('\\'); + string a = aList[aList.Length - 1].ToLower(); + + string[] bList = queue.Split('\\'); + string b = bList[bList.Length - 1].ToLower(); + + if (a == b) + w.SetNumberOfWorkerThreads(number); + } + } + + public static void RefreshNumberOfWorkerThreads(string queue) + { + var message = new GetNumberOfWorkerThreadsMessage(); + bus.Send(queue, message).Register( + aResult => + { + var result = + aResult.AsyncState as CompletionResult; + if (result == null) + return; + if (result.Messages == null) + return; + if (result.Messages.Length != 1) + return; + var response = result.Messages[0] as GotNumberOfWorkerThreadsMessage; + if (response == null) + return; + var q = result.State as string; + + UpdateNumberOfWorkerThreads(q, response.NumberOfWorkerThreads); + }, queue); + } + + public static void SetNumberOfWorkerThreads(string queue, int number) + { + var message = new ChangeNumberOfWorkerThreadsMessage { NumberOfWorkerThreads = number }; + bus.Send(queue, message); + + RefreshNumberOfWorkerThreads(queue); + } + + } +} diff --git a/src/tools/management/Grid/Grid/Properties/AssemblyInfo.cs b/src/tools/management/Grid/Grid/Properties/AssemblyInfo.cs index a031a1be072..26d2acf6462 100644 --- a/src/tools/management/Grid/Grid/Properties/AssemblyInfo.cs +++ b/src/tools/management/Grid/Grid/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Agent for Grid Communication")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Agent for Grid Communication")] [assembly: AssemblyDescription("Functionality for interacting with grid-enabled nServiceBus endpoints")] \ No newline at end of file diff --git a/src/tools/management/Grid/Grid/Worker.cs b/src/tools/management/Grid/Grid/Worker.cs index 2b669e56b9c..c159f962497 100644 --- a/src/tools/management/Grid/Grid/Worker.cs +++ b/src/tools/management/Grid/Grid/Worker.cs @@ -1,37 +1,37 @@ -using System; - -namespace Grid -{ - [Serializable] - public class Worker - { - private string queue; - public string Queue - { - get { return queue; } - set { queue = value; } - } - - private int numberOfWorkerThreads; - public int NumberOfWorkerThreads - { - get - { - lock(this) - return numberOfWorkerThreads; - } - } - - public override string ToString() - { - return this.queue; - } - - public void SetNumberOfWorkerThreads(int number) - { - lock (this) - this.numberOfWorkerThreads = number; - } - - } -} +using System; + +namespace Grid +{ + [Serializable] + public class Worker + { + private string queue; + public string Queue + { + get { return queue; } + set { queue = value; } + } + + private int numberOfWorkerThreads; + public int NumberOfWorkerThreads + { + get + { + lock(this) + return numberOfWorkerThreads; + } + } + + public override string ToString() + { + return this.queue; + } + + public void SetNumberOfWorkerThreads(int number) + { + lock (this) + this.numberOfWorkerThreads = number; + } + + } +} diff --git a/src/tools/management/Grid/UI/App.config b/src/tools/management/Grid/UI/App.config index 1b57ca77101..6bbb838d5c7 100644 --- a/src/tools/management/Grid/UI/App.config +++ b/src/tools/management/Grid/UI/App.config @@ -1,53 +1,53 @@ - - - -
-
- - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + +
+
+ + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/tools/management/Grid/UI/Form1.Designer.cs b/src/tools/management/Grid/UI/Form1.Designer.cs index a06c3e679c8..aa9875e2bae 100644 --- a/src/tools/management/Grid/UI/Form1.Designer.cs +++ b/src/tools/management/Grid/UI/Form1.Designer.cs @@ -1,499 +1,499 @@ -namespace UI -{ - partial class Form1 - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.splitContainer1 = new System.Windows.Forms.SplitContainer(); - this.splitContainer2 = new System.Windows.Forms.SplitContainer(); - this.ManagedEndpointList = new System.Windows.Forms.ListBox(); - this.DeleteManagedEndpoint = new System.Windows.Forms.Button(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); - this.MessagesInEndpoint = new System.Windows.Forms.Label(); - this.ClearManagedEndpoint = new System.Windows.Forms.Button(); - this.ManagedEndpointButton = new System.Windows.Forms.Button(); - this.ManagedEndpointQueue = new System.Windows.Forms.TextBox(); - this.label3 = new System.Windows.Forms.Label(); - this.ManagedEndpointName = new System.Windows.Forms.TextBox(); - this.label2 = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); - this.splitContainer3 = new System.Windows.Forms.SplitContainer(); - this.WorkerList = new System.Windows.Forms.ListBox(); - this.DeleteWorker = new System.Windows.Forms.Button(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); - this.DecreaseWorkerThreads = new System.Windows.Forms.Button(); - this.IncreaseWorkerThreads = new System.Windows.Forms.Button(); - this.RefreshNumberOfWorkerThreads = new System.Windows.Forms.Button(); - this.NumberOfWorkerThreads = new System.Windows.Forms.Label(); - this.ClearWorker = new System.Windows.Forms.Button(); - this.WorkerButton = new System.Windows.Forms.Button(); - this.WorkerQueue = new System.Windows.Forms.TextBox(); - this.label4 = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.menuStrip1 = new System.Windows.Forms.MenuStrip(); - this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.timer1 = new System.Windows.Forms.Timer(this.components); - this.groupBox3 = new System.Windows.Forms.GroupBox(); - this.AgeOfOldestMessage = new System.Windows.Forms.Label(); - this.splitContainer1.Panel1.SuspendLayout(); - this.splitContainer1.Panel2.SuspendLayout(); - this.splitContainer1.SuspendLayout(); - this.splitContainer2.Panel1.SuspendLayout(); - this.splitContainer2.Panel2.SuspendLayout(); - this.splitContainer2.SuspendLayout(); - this.groupBox1.SuspendLayout(); - this.splitContainer3.Panel1.SuspendLayout(); - this.splitContainer3.Panel2.SuspendLayout(); - this.splitContainer3.SuspendLayout(); - this.groupBox2.SuspendLayout(); - this.menuStrip1.SuspendLayout(); - this.groupBox3.SuspendLayout(); - this.SuspendLayout(); - // - // splitContainer1 - // - this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; - this.splitContainer1.Location = new System.Drawing.Point(0, 24); - this.splitContainer1.Name = "splitContainer1"; - // - // splitContainer1.Panel1 - // - this.splitContainer1.Panel1.Controls.Add(this.splitContainer2); - // - // splitContainer1.Panel2 - // - this.splitContainer1.Panel2.Controls.Add(this.splitContainer3); - this.splitContainer1.Size = new System.Drawing.Size(559, 408); - this.splitContainer1.SplitterDistance = 254; - this.splitContainer1.TabIndex = 0; - // - // splitContainer2 - // - this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; - this.splitContainer2.Location = new System.Drawing.Point(0, 0); - this.splitContainer2.Name = "splitContainer2"; - this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal; - // - // splitContainer2.Panel1 - // - this.splitContainer2.Panel1.Controls.Add(this.ManagedEndpointList); - // - // splitContainer2.Panel2 - // - this.splitContainer2.Panel2.Controls.Add(this.groupBox3); - this.splitContainer2.Panel2.Controls.Add(this.DeleteManagedEndpoint); - this.splitContainer2.Panel2.Controls.Add(this.groupBox1); - this.splitContainer2.Panel2.Controls.Add(this.ClearManagedEndpoint); - this.splitContainer2.Panel2.Controls.Add(this.ManagedEndpointButton); - this.splitContainer2.Panel2.Controls.Add(this.ManagedEndpointQueue); - this.splitContainer2.Panel2.Controls.Add(this.label3); - this.splitContainer2.Panel2.Controls.Add(this.ManagedEndpointName); - this.splitContainer2.Panel2.Controls.Add(this.label2); - this.splitContainer2.Panel2.Controls.Add(this.label1); - this.splitContainer2.Size = new System.Drawing.Size(254, 408); - this.splitContainer2.SplitterDistance = 198; - this.splitContainer2.TabIndex = 0; - // - // ManagedEndpointList - // - this.ManagedEndpointList.Dock = System.Windows.Forms.DockStyle.Fill; - this.ManagedEndpointList.FormattingEnabled = true; - this.ManagedEndpointList.Location = new System.Drawing.Point(0, 0); - this.ManagedEndpointList.Name = "ManagedEndpointList"; - this.ManagedEndpointList.Size = new System.Drawing.Size(254, 186); - this.ManagedEndpointList.TabIndex = 0; - this.ManagedEndpointList.SelectedIndexChanged += new System.EventHandler(this.ManagedEndpointList_SelectedIndexChanged); - // - // DeleteManagedEndpoint - // - this.DeleteManagedEndpoint.Location = new System.Drawing.Point(99, 94); - this.DeleteManagedEndpoint.Name = "DeleteManagedEndpoint"; - this.DeleteManagedEndpoint.Size = new System.Drawing.Size(61, 23); - this.DeleteManagedEndpoint.TabIndex = 14; - this.DeleteManagedEndpoint.Text = "Delete"; - this.DeleteManagedEndpoint.UseVisualStyleBackColor = true; - this.DeleteManagedEndpoint.Click += new System.EventHandler(this.DeleteManagedEndpoint_Click); - // - // groupBox1 - // - this.groupBox1.Controls.Add(this.MessagesInEndpoint); - this.groupBox1.Location = new System.Drawing.Point(16, 133); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(119, 73); - this.groupBox1.TabIndex = 7; - this.groupBox1.TabStop = false; - this.groupBox1.Text = "Messages in queue"; - // - // MessagesInEndpoint - // - this.MessagesInEndpoint.AutoSize = true; - this.MessagesInEndpoint.Font = new System.Drawing.Font("Arial", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.MessagesInEndpoint.Location = new System.Drawing.Point(24, 31); - this.MessagesInEndpoint.Name = "MessagesInEndpoint"; - this.MessagesInEndpoint.Size = new System.Drawing.Size(23, 24); - this.MessagesInEndpoint.TabIndex = 1; - this.MessagesInEndpoint.Text = "?"; - // - // ClearManagedEndpoint - // - this.ClearManagedEndpoint.Location = new System.Drawing.Point(16, 94); - this.ClearManagedEndpoint.Name = "ClearManagedEndpoint"; - this.ClearManagedEndpoint.Size = new System.Drawing.Size(54, 23); - this.ClearManagedEndpoint.TabIndex = 6; - this.ClearManagedEndpoint.Text = "Clear"; - this.ClearManagedEndpoint.UseVisualStyleBackColor = true; - this.ClearManagedEndpoint.Click += new System.EventHandler(this.ClearManagedEndpoint_Click); - // - // ManagedEndpointButton - // - this.ManagedEndpointButton.Location = new System.Drawing.Point(185, 94); - this.ManagedEndpointButton.Name = "ManagedEndpointButton"; - this.ManagedEndpointButton.Size = new System.Drawing.Size(55, 23); - this.ManagedEndpointButton.TabIndex = 5; - this.ManagedEndpointButton.Text = "Add"; - this.ManagedEndpointButton.UseVisualStyleBackColor = true; - this.ManagedEndpointButton.Click += new System.EventHandler(this.ManagedEndpointButton_Click); - // - // ManagedEndpointQueue - // - this.ManagedEndpointQueue.Location = new System.Drawing.Point(141, 67); - this.ManagedEndpointQueue.Name = "ManagedEndpointQueue"; - this.ManagedEndpointQueue.Size = new System.Drawing.Size(100, 20); - this.ManagedEndpointQueue.TabIndex = 4; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(96, 70); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(39, 13); - this.label3.TabIndex = 3; - this.label3.Text = "Queue"; - // - // ManagedEndpointName - // - this.ManagedEndpointName.Location = new System.Drawing.Point(141, 39); - this.ManagedEndpointName.Name = "ManagedEndpointName"; - this.ManagedEndpointName.Size = new System.Drawing.Size(100, 20); - this.ManagedEndpointName.TabIndex = 2; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(97, 42); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(38, 13); - this.label2.TabIndex = 1; - this.label2.Text = "Name:"; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(13, 14); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(97, 13); - this.label1.TabIndex = 0; - this.label1.Text = "Managed Endpoint"; - // - // splitContainer3 - // - this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill; - this.splitContainer3.Location = new System.Drawing.Point(0, 0); - this.splitContainer3.Name = "splitContainer3"; - this.splitContainer3.Orientation = System.Windows.Forms.Orientation.Horizontal; - // - // splitContainer3.Panel1 - // - this.splitContainer3.Panel1.Controls.Add(this.WorkerList); - // - // splitContainer3.Panel2 - // - this.splitContainer3.Panel2.Controls.Add(this.DeleteWorker); - this.splitContainer3.Panel2.Controls.Add(this.groupBox2); - this.splitContainer3.Panel2.Controls.Add(this.ClearWorker); - this.splitContainer3.Panel2.Controls.Add(this.WorkerButton); - this.splitContainer3.Panel2.Controls.Add(this.WorkerQueue); - this.splitContainer3.Panel2.Controls.Add(this.label4); - this.splitContainer3.Panel2.Controls.Add(this.label5); - this.splitContainer3.Size = new System.Drawing.Size(301, 408); - this.splitContainer3.SplitterDistance = 221; - this.splitContainer3.TabIndex = 0; - // - // WorkerList - // - this.WorkerList.Dock = System.Windows.Forms.DockStyle.Fill; - this.WorkerList.FormattingEnabled = true; - this.WorkerList.Location = new System.Drawing.Point(0, 0); - this.WorkerList.Name = "WorkerList"; - this.WorkerList.Size = new System.Drawing.Size(301, 212); - this.WorkerList.TabIndex = 0; - this.WorkerList.SelectedIndexChanged += new System.EventHandler(this.WorkersList_SelectedIndexChanged); - // - // DeleteWorker - // - this.DeleteWorker.Location = new System.Drawing.Point(125, 71); - this.DeleteWorker.Name = "DeleteWorker"; - this.DeleteWorker.Size = new System.Drawing.Size(61, 23); - this.DeleteWorker.TabIndex = 13; - this.DeleteWorker.Text = "Delete"; - this.DeleteWorker.UseVisualStyleBackColor = true; - this.DeleteWorker.Click += new System.EventHandler(this.DeleteWorker_Click); - // - // groupBox2 - // - this.groupBox2.Controls.Add(this.DecreaseWorkerThreads); - this.groupBox2.Controls.Add(this.IncreaseWorkerThreads); - this.groupBox2.Controls.Add(this.RefreshNumberOfWorkerThreads); - this.groupBox2.Controls.Add(this.NumberOfWorkerThreads); - this.groupBox2.Location = new System.Drawing.Point(41, 109); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.Size = new System.Drawing.Size(225, 73); - this.groupBox2.TabIndex = 12; - this.groupBox2.TabStop = false; - this.groupBox2.Text = "Number of worker threads"; - // - // DecreaseWorkerThreads - // - this.DecreaseWorkerThreads.Font = new System.Drawing.Font("Wingdings 3", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(2))); - this.DecreaseWorkerThreads.Location = new System.Drawing.Point(195, 31); - this.DecreaseWorkerThreads.Name = "DecreaseWorkerThreads"; - this.DecreaseWorkerThreads.Size = new System.Drawing.Size(24, 23); - this.DecreaseWorkerThreads.TabIndex = 4; - this.DecreaseWorkerThreads.Text = "q"; - this.DecreaseWorkerThreads.UseVisualStyleBackColor = true; - this.DecreaseWorkerThreads.Click += new System.EventHandler(this.DecreaseWorkerThreads_Click); - // - // IncreaseWorkerThreads - // - this.IncreaseWorkerThreads.Font = new System.Drawing.Font("Wingdings 3", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(2))); - this.IncreaseWorkerThreads.Location = new System.Drawing.Point(166, 31); - this.IncreaseWorkerThreads.Name = "IncreaseWorkerThreads"; - this.IncreaseWorkerThreads.Size = new System.Drawing.Size(23, 23); - this.IncreaseWorkerThreads.TabIndex = 3; - this.IncreaseWorkerThreads.Text = "p"; - this.IncreaseWorkerThreads.UseVisualStyleBackColor = true; - this.IncreaseWorkerThreads.Click += new System.EventHandler(this.IncreaseWorkerThreads_Click); - // - // RefreshNumberOfWorkerThreads - // - this.RefreshNumberOfWorkerThreads.Location = new System.Drawing.Point(7, 31); - this.RefreshNumberOfWorkerThreads.Name = "RefreshNumberOfWorkerThreads"; - this.RefreshNumberOfWorkerThreads.Size = new System.Drawing.Size(75, 23); - this.RefreshNumberOfWorkerThreads.TabIndex = 2; - this.RefreshNumberOfWorkerThreads.Text = "Refresh"; - this.RefreshNumberOfWorkerThreads.UseVisualStyleBackColor = true; - this.RefreshNumberOfWorkerThreads.Click += new System.EventHandler(this.RefreshNumberOfWorkerThreads_Click); - // - // NumberOfWorkerThreads - // - this.NumberOfWorkerThreads.AutoSize = true; - this.NumberOfWorkerThreads.Font = new System.Drawing.Font("Arial", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.NumberOfWorkerThreads.Location = new System.Drawing.Point(122, 31); - this.NumberOfWorkerThreads.Name = "NumberOfWorkerThreads"; - this.NumberOfWorkerThreads.Size = new System.Drawing.Size(23, 24); - this.NumberOfWorkerThreads.TabIndex = 1; - this.NumberOfWorkerThreads.Text = "?"; - // - // ClearWorker - // - this.ClearWorker.Location = new System.Drawing.Point(42, 70); - this.ClearWorker.Name = "ClearWorker"; - this.ClearWorker.Size = new System.Drawing.Size(56, 23); - this.ClearWorker.TabIndex = 11; - this.ClearWorker.Text = "Clear"; - this.ClearWorker.UseVisualStyleBackColor = true; - this.ClearWorker.Click += new System.EventHandler(this.ClearWorker_Click); - // - // WorkerButton - // - this.WorkerButton.Location = new System.Drawing.Point(207, 70); - this.WorkerButton.Name = "WorkerButton"; - this.WorkerButton.Size = new System.Drawing.Size(59, 23); - this.WorkerButton.TabIndex = 10; - this.WorkerButton.Text = "Add"; - this.WorkerButton.UseVisualStyleBackColor = true; - this.WorkerButton.Click += new System.EventHandler(this.WorkerButton_Click); - // - // WorkerQueue - // - this.WorkerQueue.Location = new System.Drawing.Point(167, 43); - this.WorkerQueue.Name = "WorkerQueue"; - this.WorkerQueue.Size = new System.Drawing.Size(100, 20); - this.WorkerQueue.TabIndex = 9; - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(122, 46); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(39, 13); - this.label4.TabIndex = 8; - this.label4.Text = "Queue"; - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(15, 15); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(42, 13); - this.label5.TabIndex = 7; - this.label5.Text = "Worker"; - // - // menuStrip1 - // - this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.fileToolStripMenuItem}); - this.menuStrip1.Location = new System.Drawing.Point(0, 0); - this.menuStrip1.Name = "menuStrip1"; - this.menuStrip1.Size = new System.Drawing.Size(559, 24); - this.menuStrip1.TabIndex = 1; - this.menuStrip1.Text = "menuStrip1"; - // - // fileToolStripMenuItem - // - this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.saveToolStripMenuItem, - this.exitToolStripMenuItem}); - this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; - this.fileToolStripMenuItem.Size = new System.Drawing.Size(35, 20); - this.fileToolStripMenuItem.Text = "File"; - // - // saveToolStripMenuItem - // - this.saveToolStripMenuItem.Name = "saveToolStripMenuItem"; - this.saveToolStripMenuItem.Size = new System.Drawing.Size(98, 22); - this.saveToolStripMenuItem.Text = "Save"; - this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click); - // - // exitToolStripMenuItem - // - this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; - this.exitToolStripMenuItem.Size = new System.Drawing.Size(98, 22); - this.exitToolStripMenuItem.Text = "Exit"; - this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); - // - // timer1 - // - this.timer1.Interval = 1000; - this.timer1.Tick += new System.EventHandler(this.timer1_Tick); - // - // groupBox3 - // - this.groupBox3.Controls.Add(this.AgeOfOldestMessage); - this.groupBox3.Location = new System.Drawing.Point(135, 133); - this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(119, 73); - this.groupBox3.TabIndex = 15; - this.groupBox3.TabStop = false; - this.groupBox3.Text = "Oldest Message"; - // - // AgeOfOldestMessage - // - this.AgeOfOldestMessage.AutoSize = true; - this.AgeOfOldestMessage.Font = new System.Drawing.Font("Arial", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.AgeOfOldestMessage.Location = new System.Drawing.Point(24, 31); - this.AgeOfOldestMessage.Name = "AgeOfOldestMessage"; - this.AgeOfOldestMessage.Size = new System.Drawing.Size(23, 24); - this.AgeOfOldestMessage.TabIndex = 1; - this.AgeOfOldestMessage.Text = "?"; - // - // Form1 - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(559, 432); - this.Controls.Add(this.splitContainer1); - this.Controls.Add(this.menuStrip1); - this.MainMenuStrip = this.menuStrip1; - this.Name = "Form1"; - this.Text = "Form1"; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing); - this.splitContainer1.Panel1.ResumeLayout(false); - this.splitContainer1.Panel2.ResumeLayout(false); - this.splitContainer1.ResumeLayout(false); - this.splitContainer2.Panel1.ResumeLayout(false); - this.splitContainer2.Panel2.ResumeLayout(false); - this.splitContainer2.Panel2.PerformLayout(); - this.splitContainer2.ResumeLayout(false); - this.groupBox1.ResumeLayout(false); - this.groupBox1.PerformLayout(); - this.splitContainer3.Panel1.ResumeLayout(false); - this.splitContainer3.Panel2.ResumeLayout(false); - this.splitContainer3.Panel2.PerformLayout(); - this.splitContainer3.ResumeLayout(false); - this.groupBox2.ResumeLayout(false); - this.groupBox2.PerformLayout(); - this.menuStrip1.ResumeLayout(false); - this.menuStrip1.PerformLayout(); - this.groupBox3.ResumeLayout(false); - this.groupBox3.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.SplitContainer splitContainer1; - private System.Windows.Forms.SplitContainer splitContainer2; - private System.Windows.Forms.ListBox ManagedEndpointList; - private System.Windows.Forms.Button ManagedEndpointButton; - private System.Windows.Forms.TextBox ManagedEndpointQueue; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.TextBox ManagedEndpointName; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Button ClearManagedEndpoint; - private System.Windows.Forms.GroupBox groupBox1; - private System.Windows.Forms.Label MessagesInEndpoint; - private System.Windows.Forms.SplitContainer splitContainer3; - private System.Windows.Forms.ListBox WorkerList; - private System.Windows.Forms.Button ClearWorker; - private System.Windows.Forms.Button WorkerButton; - private System.Windows.Forms.TextBox WorkerQueue; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label label5; - private System.Windows.Forms.GroupBox groupBox2; - private System.Windows.Forms.Label NumberOfWorkerThreads; - private System.Windows.Forms.Button RefreshNumberOfWorkerThreads; - private System.Windows.Forms.Button IncreaseWorkerThreads; - private System.Windows.Forms.Button DecreaseWorkerThreads; - private System.Windows.Forms.MenuStrip menuStrip1; - private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem; - private System.Windows.Forms.Button DeleteManagedEndpoint; - private System.Windows.Forms.Button DeleteWorker; - private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem; - private System.Windows.Forms.Timer timer1; - private System.Windows.Forms.GroupBox groupBox3; - private System.Windows.Forms.Label AgeOfOldestMessage; - } -} - +namespace UI +{ + partial class Form1 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.splitContainer2 = new System.Windows.Forms.SplitContainer(); + this.ManagedEndpointList = new System.Windows.Forms.ListBox(); + this.DeleteManagedEndpoint = new System.Windows.Forms.Button(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.MessagesInEndpoint = new System.Windows.Forms.Label(); + this.ClearManagedEndpoint = new System.Windows.Forms.Button(); + this.ManagedEndpointButton = new System.Windows.Forms.Button(); + this.ManagedEndpointQueue = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.ManagedEndpointName = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.splitContainer3 = new System.Windows.Forms.SplitContainer(); + this.WorkerList = new System.Windows.Forms.ListBox(); + this.DeleteWorker = new System.Windows.Forms.Button(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.DecreaseWorkerThreads = new System.Windows.Forms.Button(); + this.IncreaseWorkerThreads = new System.Windows.Forms.Button(); + this.RefreshNumberOfWorkerThreads = new System.Windows.Forms.Button(); + this.NumberOfWorkerThreads = new System.Windows.Forms.Label(); + this.ClearWorker = new System.Windows.Forms.Button(); + this.WorkerButton = new System.Windows.Forms.Button(); + this.WorkerQueue = new System.Windows.Forms.TextBox(); + this.label4 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.timer1 = new System.Windows.Forms.Timer(this.components); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.AgeOfOldestMessage = new System.Windows.Forms.Label(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + this.splitContainer2.Panel1.SuspendLayout(); + this.splitContainer2.Panel2.SuspendLayout(); + this.splitContainer2.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.splitContainer3.Panel1.SuspendLayout(); + this.splitContainer3.Panel2.SuspendLayout(); + this.splitContainer3.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.menuStrip1.SuspendLayout(); + this.groupBox3.SuspendLayout(); + this.SuspendLayout(); + // + // splitContainer1 + // + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.Location = new System.Drawing.Point(0, 24); + this.splitContainer1.Name = "splitContainer1"; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.splitContainer2); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.splitContainer3); + this.splitContainer1.Size = new System.Drawing.Size(559, 408); + this.splitContainer1.SplitterDistance = 254; + this.splitContainer1.TabIndex = 0; + // + // splitContainer2 + // + this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer2.Location = new System.Drawing.Point(0, 0); + this.splitContainer2.Name = "splitContainer2"; + this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer2.Panel1 + // + this.splitContainer2.Panel1.Controls.Add(this.ManagedEndpointList); + // + // splitContainer2.Panel2 + // + this.splitContainer2.Panel2.Controls.Add(this.groupBox3); + this.splitContainer2.Panel2.Controls.Add(this.DeleteManagedEndpoint); + this.splitContainer2.Panel2.Controls.Add(this.groupBox1); + this.splitContainer2.Panel2.Controls.Add(this.ClearManagedEndpoint); + this.splitContainer2.Panel2.Controls.Add(this.ManagedEndpointButton); + this.splitContainer2.Panel2.Controls.Add(this.ManagedEndpointQueue); + this.splitContainer2.Panel2.Controls.Add(this.label3); + this.splitContainer2.Panel2.Controls.Add(this.ManagedEndpointName); + this.splitContainer2.Panel2.Controls.Add(this.label2); + this.splitContainer2.Panel2.Controls.Add(this.label1); + this.splitContainer2.Size = new System.Drawing.Size(254, 408); + this.splitContainer2.SplitterDistance = 198; + this.splitContainer2.TabIndex = 0; + // + // ManagedEndpointList + // + this.ManagedEndpointList.Dock = System.Windows.Forms.DockStyle.Fill; + this.ManagedEndpointList.FormattingEnabled = true; + this.ManagedEndpointList.Location = new System.Drawing.Point(0, 0); + this.ManagedEndpointList.Name = "ManagedEndpointList"; + this.ManagedEndpointList.Size = new System.Drawing.Size(254, 186); + this.ManagedEndpointList.TabIndex = 0; + this.ManagedEndpointList.SelectedIndexChanged += new System.EventHandler(this.ManagedEndpointList_SelectedIndexChanged); + // + // DeleteManagedEndpoint + // + this.DeleteManagedEndpoint.Location = new System.Drawing.Point(99, 94); + this.DeleteManagedEndpoint.Name = "DeleteManagedEndpoint"; + this.DeleteManagedEndpoint.Size = new System.Drawing.Size(61, 23); + this.DeleteManagedEndpoint.TabIndex = 14; + this.DeleteManagedEndpoint.Text = "Delete"; + this.DeleteManagedEndpoint.UseVisualStyleBackColor = true; + this.DeleteManagedEndpoint.Click += new System.EventHandler(this.DeleteManagedEndpoint_Click); + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.MessagesInEndpoint); + this.groupBox1.Location = new System.Drawing.Point(16, 133); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(119, 73); + this.groupBox1.TabIndex = 7; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Messages in queue"; + // + // MessagesInEndpoint + // + this.MessagesInEndpoint.AutoSize = true; + this.MessagesInEndpoint.Font = new System.Drawing.Font("Arial", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.MessagesInEndpoint.Location = new System.Drawing.Point(24, 31); + this.MessagesInEndpoint.Name = "MessagesInEndpoint"; + this.MessagesInEndpoint.Size = new System.Drawing.Size(23, 24); + this.MessagesInEndpoint.TabIndex = 1; + this.MessagesInEndpoint.Text = "?"; + // + // ClearManagedEndpoint + // + this.ClearManagedEndpoint.Location = new System.Drawing.Point(16, 94); + this.ClearManagedEndpoint.Name = "ClearManagedEndpoint"; + this.ClearManagedEndpoint.Size = new System.Drawing.Size(54, 23); + this.ClearManagedEndpoint.TabIndex = 6; + this.ClearManagedEndpoint.Text = "Clear"; + this.ClearManagedEndpoint.UseVisualStyleBackColor = true; + this.ClearManagedEndpoint.Click += new System.EventHandler(this.ClearManagedEndpoint_Click); + // + // ManagedEndpointButton + // + this.ManagedEndpointButton.Location = new System.Drawing.Point(185, 94); + this.ManagedEndpointButton.Name = "ManagedEndpointButton"; + this.ManagedEndpointButton.Size = new System.Drawing.Size(55, 23); + this.ManagedEndpointButton.TabIndex = 5; + this.ManagedEndpointButton.Text = "Add"; + this.ManagedEndpointButton.UseVisualStyleBackColor = true; + this.ManagedEndpointButton.Click += new System.EventHandler(this.ManagedEndpointButton_Click); + // + // ManagedEndpointQueue + // + this.ManagedEndpointQueue.Location = new System.Drawing.Point(141, 67); + this.ManagedEndpointQueue.Name = "ManagedEndpointQueue"; + this.ManagedEndpointQueue.Size = new System.Drawing.Size(100, 20); + this.ManagedEndpointQueue.TabIndex = 4; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(96, 70); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(39, 13); + this.label3.TabIndex = 3; + this.label3.Text = "Queue"; + // + // ManagedEndpointName + // + this.ManagedEndpointName.Location = new System.Drawing.Point(141, 39); + this.ManagedEndpointName.Name = "ManagedEndpointName"; + this.ManagedEndpointName.Size = new System.Drawing.Size(100, 20); + this.ManagedEndpointName.TabIndex = 2; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(97, 42); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(38, 13); + this.label2.TabIndex = 1; + this.label2.Text = "Name:"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(13, 14); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(97, 13); + this.label1.TabIndex = 0; + this.label1.Text = "Managed Endpoint"; + // + // splitContainer3 + // + this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer3.Location = new System.Drawing.Point(0, 0); + this.splitContainer3.Name = "splitContainer3"; + this.splitContainer3.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer3.Panel1 + // + this.splitContainer3.Panel1.Controls.Add(this.WorkerList); + // + // splitContainer3.Panel2 + // + this.splitContainer3.Panel2.Controls.Add(this.DeleteWorker); + this.splitContainer3.Panel2.Controls.Add(this.groupBox2); + this.splitContainer3.Panel2.Controls.Add(this.ClearWorker); + this.splitContainer3.Panel2.Controls.Add(this.WorkerButton); + this.splitContainer3.Panel2.Controls.Add(this.WorkerQueue); + this.splitContainer3.Panel2.Controls.Add(this.label4); + this.splitContainer3.Panel2.Controls.Add(this.label5); + this.splitContainer3.Size = new System.Drawing.Size(301, 408); + this.splitContainer3.SplitterDistance = 221; + this.splitContainer3.TabIndex = 0; + // + // WorkerList + // + this.WorkerList.Dock = System.Windows.Forms.DockStyle.Fill; + this.WorkerList.FormattingEnabled = true; + this.WorkerList.Location = new System.Drawing.Point(0, 0); + this.WorkerList.Name = "WorkerList"; + this.WorkerList.Size = new System.Drawing.Size(301, 212); + this.WorkerList.TabIndex = 0; + this.WorkerList.SelectedIndexChanged += new System.EventHandler(this.WorkersList_SelectedIndexChanged); + // + // DeleteWorker + // + this.DeleteWorker.Location = new System.Drawing.Point(125, 71); + this.DeleteWorker.Name = "DeleteWorker"; + this.DeleteWorker.Size = new System.Drawing.Size(61, 23); + this.DeleteWorker.TabIndex = 13; + this.DeleteWorker.Text = "Delete"; + this.DeleteWorker.UseVisualStyleBackColor = true; + this.DeleteWorker.Click += new System.EventHandler(this.DeleteWorker_Click); + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.DecreaseWorkerThreads); + this.groupBox2.Controls.Add(this.IncreaseWorkerThreads); + this.groupBox2.Controls.Add(this.RefreshNumberOfWorkerThreads); + this.groupBox2.Controls.Add(this.NumberOfWorkerThreads); + this.groupBox2.Location = new System.Drawing.Point(41, 109); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(225, 73); + this.groupBox2.TabIndex = 12; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "Number of worker threads"; + // + // DecreaseWorkerThreads + // + this.DecreaseWorkerThreads.Font = new System.Drawing.Font("Wingdings 3", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(2))); + this.DecreaseWorkerThreads.Location = new System.Drawing.Point(195, 31); + this.DecreaseWorkerThreads.Name = "DecreaseWorkerThreads"; + this.DecreaseWorkerThreads.Size = new System.Drawing.Size(24, 23); + this.DecreaseWorkerThreads.TabIndex = 4; + this.DecreaseWorkerThreads.Text = "q"; + this.DecreaseWorkerThreads.UseVisualStyleBackColor = true; + this.DecreaseWorkerThreads.Click += new System.EventHandler(this.DecreaseWorkerThreads_Click); + // + // IncreaseWorkerThreads + // + this.IncreaseWorkerThreads.Font = new System.Drawing.Font("Wingdings 3", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(2))); + this.IncreaseWorkerThreads.Location = new System.Drawing.Point(166, 31); + this.IncreaseWorkerThreads.Name = "IncreaseWorkerThreads"; + this.IncreaseWorkerThreads.Size = new System.Drawing.Size(23, 23); + this.IncreaseWorkerThreads.TabIndex = 3; + this.IncreaseWorkerThreads.Text = "p"; + this.IncreaseWorkerThreads.UseVisualStyleBackColor = true; + this.IncreaseWorkerThreads.Click += new System.EventHandler(this.IncreaseWorkerThreads_Click); + // + // RefreshNumberOfWorkerThreads + // + this.RefreshNumberOfWorkerThreads.Location = new System.Drawing.Point(7, 31); + this.RefreshNumberOfWorkerThreads.Name = "RefreshNumberOfWorkerThreads"; + this.RefreshNumberOfWorkerThreads.Size = new System.Drawing.Size(75, 23); + this.RefreshNumberOfWorkerThreads.TabIndex = 2; + this.RefreshNumberOfWorkerThreads.Text = "Refresh"; + this.RefreshNumberOfWorkerThreads.UseVisualStyleBackColor = true; + this.RefreshNumberOfWorkerThreads.Click += new System.EventHandler(this.RefreshNumberOfWorkerThreads_Click); + // + // NumberOfWorkerThreads + // + this.NumberOfWorkerThreads.AutoSize = true; + this.NumberOfWorkerThreads.Font = new System.Drawing.Font("Arial", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.NumberOfWorkerThreads.Location = new System.Drawing.Point(122, 31); + this.NumberOfWorkerThreads.Name = "NumberOfWorkerThreads"; + this.NumberOfWorkerThreads.Size = new System.Drawing.Size(23, 24); + this.NumberOfWorkerThreads.TabIndex = 1; + this.NumberOfWorkerThreads.Text = "?"; + // + // ClearWorker + // + this.ClearWorker.Location = new System.Drawing.Point(42, 70); + this.ClearWorker.Name = "ClearWorker"; + this.ClearWorker.Size = new System.Drawing.Size(56, 23); + this.ClearWorker.TabIndex = 11; + this.ClearWorker.Text = "Clear"; + this.ClearWorker.UseVisualStyleBackColor = true; + this.ClearWorker.Click += new System.EventHandler(this.ClearWorker_Click); + // + // WorkerButton + // + this.WorkerButton.Location = new System.Drawing.Point(207, 70); + this.WorkerButton.Name = "WorkerButton"; + this.WorkerButton.Size = new System.Drawing.Size(59, 23); + this.WorkerButton.TabIndex = 10; + this.WorkerButton.Text = "Add"; + this.WorkerButton.UseVisualStyleBackColor = true; + this.WorkerButton.Click += new System.EventHandler(this.WorkerButton_Click); + // + // WorkerQueue + // + this.WorkerQueue.Location = new System.Drawing.Point(167, 43); + this.WorkerQueue.Name = "WorkerQueue"; + this.WorkerQueue.Size = new System.Drawing.Size(100, 20); + this.WorkerQueue.TabIndex = 9; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(122, 46); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(39, 13); + this.label4.TabIndex = 8; + this.label4.Text = "Queue"; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(15, 15); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(42, 13); + this.label5.TabIndex = 7; + this.label5.Text = "Worker"; + // + // menuStrip1 + // + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.fileToolStripMenuItem}); + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Size = new System.Drawing.Size(559, 24); + this.menuStrip1.TabIndex = 1; + this.menuStrip1.Text = "menuStrip1"; + // + // fileToolStripMenuItem + // + this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.saveToolStripMenuItem, + this.exitToolStripMenuItem}); + this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; + this.fileToolStripMenuItem.Size = new System.Drawing.Size(35, 20); + this.fileToolStripMenuItem.Text = "File"; + // + // saveToolStripMenuItem + // + this.saveToolStripMenuItem.Name = "saveToolStripMenuItem"; + this.saveToolStripMenuItem.Size = new System.Drawing.Size(98, 22); + this.saveToolStripMenuItem.Text = "Save"; + this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click); + // + // exitToolStripMenuItem + // + this.exitToolStripMenuItem.Name = "exitToolStripMenuItem"; + this.exitToolStripMenuItem.Size = new System.Drawing.Size(98, 22); + this.exitToolStripMenuItem.Text = "Exit"; + this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click); + // + // timer1 + // + this.timer1.Interval = 1000; + this.timer1.Tick += new System.EventHandler(this.timer1_Tick); + // + // groupBox3 + // + this.groupBox3.Controls.Add(this.AgeOfOldestMessage); + this.groupBox3.Location = new System.Drawing.Point(135, 133); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(119, 73); + this.groupBox3.TabIndex = 15; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "Oldest Message"; + // + // AgeOfOldestMessage + // + this.AgeOfOldestMessage.AutoSize = true; + this.AgeOfOldestMessage.Font = new System.Drawing.Font("Arial", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.AgeOfOldestMessage.Location = new System.Drawing.Point(24, 31); + this.AgeOfOldestMessage.Name = "AgeOfOldestMessage"; + this.AgeOfOldestMessage.Size = new System.Drawing.Size(23, 24); + this.AgeOfOldestMessage.TabIndex = 1; + this.AgeOfOldestMessage.Text = "?"; + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(559, 432); + this.Controls.Add(this.splitContainer1); + this.Controls.Add(this.menuStrip1); + this.MainMenuStrip = this.menuStrip1; + this.Name = "Form1"; + this.Text = "Form1"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + this.splitContainer1.ResumeLayout(false); + this.splitContainer2.Panel1.ResumeLayout(false); + this.splitContainer2.Panel2.ResumeLayout(false); + this.splitContainer2.Panel2.PerformLayout(); + this.splitContainer2.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.splitContainer3.Panel1.ResumeLayout(false); + this.splitContainer3.Panel2.ResumeLayout(false); + this.splitContainer3.Panel2.PerformLayout(); + this.splitContainer3.ResumeLayout(false); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + this.groupBox3.ResumeLayout(false); + this.groupBox3.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.SplitContainer splitContainer1; + private System.Windows.Forms.SplitContainer splitContainer2; + private System.Windows.Forms.ListBox ManagedEndpointList; + private System.Windows.Forms.Button ManagedEndpointButton; + private System.Windows.Forms.TextBox ManagedEndpointQueue; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TextBox ManagedEndpointName; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Button ClearManagedEndpoint; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.Label MessagesInEndpoint; + private System.Windows.Forms.SplitContainer splitContainer3; + private System.Windows.Forms.ListBox WorkerList; + private System.Windows.Forms.Button ClearWorker; + private System.Windows.Forms.Button WorkerButton; + private System.Windows.Forms.TextBox WorkerQueue; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.Label NumberOfWorkerThreads; + private System.Windows.Forms.Button RefreshNumberOfWorkerThreads; + private System.Windows.Forms.Button IncreaseWorkerThreads; + private System.Windows.Forms.Button DecreaseWorkerThreads; + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem; + private System.Windows.Forms.Button DeleteManagedEndpoint; + private System.Windows.Forms.Button DeleteWorker; + private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem; + private System.Windows.Forms.Timer timer1; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.Label AgeOfOldestMessage; + } +} + diff --git a/src/tools/management/Grid/UI/Form1.cs b/src/tools/management/Grid/UI/Form1.cs index d97eca1c11a..a558d123ff3 100644 --- a/src/tools/management/Grid/UI/Form1.cs +++ b/src/tools/management/Grid/UI/Form1.cs @@ -1,294 +1,294 @@ -using System; -using System.Collections.Generic; -using System.Windows.Forms; -using Grid; - -namespace UI -{ - public partial class Form1 : Form - { - private List endpoints; - private ManagedEndpoint current; - private Worker worker; - - public Form1() - { - InitializeComponent(); - } - - protected override void OnLoad(EventArgs e) - { - endpoints = Manager.GetManagedEndpoints(); - this.timer1.Start(); - this.RefreshList(); - } - - private void RefreshList() - { - this.ManagedEndpointList.SuspendLayout(); - - object selected = this.ManagedEndpointList.SelectedItem; - - this.ManagedEndpointList.DataSource = null; - this.ManagedEndpointList.DataSource = endpoints; - - this.ManagedEndpointList.SelectedItem = selected; - - this.ManagedEndpointList.ResumeLayout(true); - - current = this.ManagedEndpointList.SelectedItem as ManagedEndpoint; - } - - private void ManagedEndpointButton_Click(object sender, EventArgs e) - { - if (ManagedEndpointList.SelectedItem != null) - this.DoUpdate(); - else - this.DoAdd(); - } - - private void DoAdd() - { - ManagedEndpoint endpoint = new ManagedEndpoint(); - endpoint.Name = ManagedEndpointName.Text; - endpoint.Queue = ManagedEndpointQueue.Text; - - endpoints.Add(endpoint); - - Manager.StoreManagedEndpoints(this.endpoints); - - this.RefreshList(); - - this.ManagedEndpointList.SelectedItem = endpoint; - - this.PrepareForUpdate(); - } - - private void DoUpdate() - { - current = ManagedEndpointList.SelectedItem as ManagedEndpoint; - if (current != null) - { - current.Name = ManagedEndpointName.Text; - current.Queue = ManagedEndpointQueue.Text; - - Manager.StoreManagedEndpoints(this.endpoints); - - this.RefreshList(); - } - } - - private void ManagedEndpointList_SelectedIndexChanged(object sender, EventArgs e) - { - if (ManagedEndpointList.SelectedItem != null) - this.PrepareForUpdate(); - else - this.PrepareForAdd(); - } - - private void PrepareForAdd() - { - this.ManagedEndpointButton.Text = "Add"; - this.ManagedEndpointName.Text = string.Empty; - this.ManagedEndpointQueue.Text = string.Empty; - - this.MessagesInEndpoint.Text = "?"; - this.AgeOfOldestMessage.Text = "?"; - current = null; - this.DeleteManagedEndpoint.Enabled = false; - this.RefreshWorkerList(); - } - - private void PrepareForUpdate() - { - current = ManagedEndpointList.SelectedItem as ManagedEndpoint; - if (current != null) - { - this.ManagedEndpointButton.Text = "Update"; - this.ManagedEndpointName.Text = current.Name; - this.ManagedEndpointQueue.Text = current.Queue; - - this.UpdateManagedEndpoint(); - - this.DeleteManagedEndpoint.Enabled = true; - this.RefreshWorkerList(); - } - } - - private void UpdateManagedEndpoint() - { - if (current != null) - { - this.MessagesInEndpoint.Text = current.NumberOfMessages.ToString(); - this.AgeOfOldestMessage.Text = (int)current.AgeOfOldestMessage.TotalSeconds + "s"; - - } - } - - private void ClearManagedEndpoint_Click(object sender, EventArgs e) - { - ManagedEndpointList.SelectedIndex = -1; - } - - private void RefreshWorkerList() - { - if (current != null) - { - this.WorkerList.SuspendLayout(); - - object selected = this.WorkerList.SelectedItem; - - this.WorkerList.DataSource = null; - this.WorkerList.DataSource = current.Workers; - - this.WorkerList.SelectedItem = selected; - - this.WorkerList.ResumeLayout(true); - - worker = this.WorkerList.SelectedItem as Worker; - } - else - WorkerList.DataSource = null; - } - - private void WorkersList_SelectedIndexChanged(object sender, EventArgs e) - { - if (WorkerList.SelectedItem != null) - this.PrepareWorkerForUpdate(); - else - this.PrepareWorkerForAdd(); - } - - private void PrepareWorkerForAdd() - { - this.WorkerButton.Text = "Add"; - this.WorkerQueue.Text = string.Empty; - - this.NumberOfWorkerThreads.Text = "?"; - worker = null; - - this.DeleteWorker.Enabled = false; - } - - private void PrepareWorkerForUpdate() - { - worker = WorkerList.SelectedItem as Worker; - if (worker != null) - { - this.WorkerButton.Text = "Update"; - this.WorkerQueue.Text = worker.Queue; - this.NumberOfWorkerThreads.Text = worker.NumberOfWorkerThreads.ToString(); - - this.DeleteWorker.Enabled = true; - } - } - - private void UpdateWorker() - { - if (worker != null) - this.NumberOfWorkerThreads.Text = worker.NumberOfWorkerThreads.ToString(); - } - - private void WorkerButton_Click(object sender, EventArgs e) - { - if (WorkerList.SelectedItem != null) - this.DoWorkerUpdate(); - else - this.DoWorkerAdd(); - } - - private void ClearWorker_Click(object sender, EventArgs e) - { - WorkerList.SelectedIndex = -1; - } - - private void DoWorkerAdd() - { - if (current == null) - return; - - Worker w = new Worker(); - w.Queue = WorkerQueue.Text; - - current.Workers.Add(w); - - this.RefreshWorkerList(); - - this.WorkerList.SelectedItem = w; - - this.PrepareForUpdate(); - } - - private void DoWorkerUpdate() - { - worker = WorkerList.SelectedItem as Worker; - if (worker != null) - { - worker.Queue = WorkerQueue.Text; - - this.RefreshWorkerList(); - } - } - - private void RefreshNumberOfWorkerThreads_Click(object sender, EventArgs e) - { - if (worker != null) - Manager.RefreshNumberOfWorkerThreads(worker.Queue); - } - - private void IncreaseWorkerThreads_Click(object sender, EventArgs e) - { - if (worker != null) - Manager.SetNumberOfWorkerThreads(worker.Queue, worker.NumberOfWorkerThreads + 1); - } - - private void DecreaseWorkerThreads_Click(object sender, EventArgs e) - { - if (worker != null) - Manager.SetNumberOfWorkerThreads(worker.Queue, worker.NumberOfWorkerThreads - 1); - } - - private void Form1_FormClosing(object sender, FormClosingEventArgs e) - { - Manager.Save(); - } - - private void saveToolStripMenuItem_Click(object sender, EventArgs e) - { - Manager.Save(); - } - - private void DeleteWorker_Click(object sender, EventArgs e) - { - if (worker != null) - { - current.Workers.Remove(worker); - worker = null; - - this.RefreshWorkerList(); - } - } - - private void DeleteManagedEndpoint_Click(object sender, EventArgs e) - { - if (current != null) - { - this.endpoints.Remove(current); - current = null; - - this.RefreshList(); - } - } - - private void exitToolStripMenuItem_Click(object sender, EventArgs e) - { - this.Close(); - } - - private void timer1_Tick(object sender, EventArgs e) - { - this.UpdateManagedEndpoint(); - this.UpdateWorker(); - } - } +using System; +using System.Collections.Generic; +using System.Windows.Forms; +using Grid; + +namespace UI +{ + public partial class Form1 : Form + { + private List endpoints; + private ManagedEndpoint current; + private Worker worker; + + public Form1() + { + InitializeComponent(); + } + + protected override void OnLoad(EventArgs e) + { + endpoints = Manager.GetManagedEndpoints(); + this.timer1.Start(); + this.RefreshList(); + } + + private void RefreshList() + { + this.ManagedEndpointList.SuspendLayout(); + + object selected = this.ManagedEndpointList.SelectedItem; + + this.ManagedEndpointList.DataSource = null; + this.ManagedEndpointList.DataSource = endpoints; + + this.ManagedEndpointList.SelectedItem = selected; + + this.ManagedEndpointList.ResumeLayout(true); + + current = this.ManagedEndpointList.SelectedItem as ManagedEndpoint; + } + + private void ManagedEndpointButton_Click(object sender, EventArgs e) + { + if (ManagedEndpointList.SelectedItem != null) + this.DoUpdate(); + else + this.DoAdd(); + } + + private void DoAdd() + { + ManagedEndpoint endpoint = new ManagedEndpoint(); + endpoint.Name = ManagedEndpointName.Text; + endpoint.Queue = ManagedEndpointQueue.Text; + + endpoints.Add(endpoint); + + Manager.StoreManagedEndpoints(this.endpoints); + + this.RefreshList(); + + this.ManagedEndpointList.SelectedItem = endpoint; + + this.PrepareForUpdate(); + } + + private void DoUpdate() + { + current = ManagedEndpointList.SelectedItem as ManagedEndpoint; + if (current != null) + { + current.Name = ManagedEndpointName.Text; + current.Queue = ManagedEndpointQueue.Text; + + Manager.StoreManagedEndpoints(this.endpoints); + + this.RefreshList(); + } + } + + private void ManagedEndpointList_SelectedIndexChanged(object sender, EventArgs e) + { + if (ManagedEndpointList.SelectedItem != null) + this.PrepareForUpdate(); + else + this.PrepareForAdd(); + } + + private void PrepareForAdd() + { + this.ManagedEndpointButton.Text = "Add"; + this.ManagedEndpointName.Text = string.Empty; + this.ManagedEndpointQueue.Text = string.Empty; + + this.MessagesInEndpoint.Text = "?"; + this.AgeOfOldestMessage.Text = "?"; + current = null; + this.DeleteManagedEndpoint.Enabled = false; + this.RefreshWorkerList(); + } + + private void PrepareForUpdate() + { + current = ManagedEndpointList.SelectedItem as ManagedEndpoint; + if (current != null) + { + this.ManagedEndpointButton.Text = "Update"; + this.ManagedEndpointName.Text = current.Name; + this.ManagedEndpointQueue.Text = current.Queue; + + this.UpdateManagedEndpoint(); + + this.DeleteManagedEndpoint.Enabled = true; + this.RefreshWorkerList(); + } + } + + private void UpdateManagedEndpoint() + { + if (current != null) + { + this.MessagesInEndpoint.Text = current.NumberOfMessages.ToString(); + this.AgeOfOldestMessage.Text = (int)current.AgeOfOldestMessage.TotalSeconds + "s"; + + } + } + + private void ClearManagedEndpoint_Click(object sender, EventArgs e) + { + ManagedEndpointList.SelectedIndex = -1; + } + + private void RefreshWorkerList() + { + if (current != null) + { + this.WorkerList.SuspendLayout(); + + object selected = this.WorkerList.SelectedItem; + + this.WorkerList.DataSource = null; + this.WorkerList.DataSource = current.Workers; + + this.WorkerList.SelectedItem = selected; + + this.WorkerList.ResumeLayout(true); + + worker = this.WorkerList.SelectedItem as Worker; + } + else + WorkerList.DataSource = null; + } + + private void WorkersList_SelectedIndexChanged(object sender, EventArgs e) + { + if (WorkerList.SelectedItem != null) + this.PrepareWorkerForUpdate(); + else + this.PrepareWorkerForAdd(); + } + + private void PrepareWorkerForAdd() + { + this.WorkerButton.Text = "Add"; + this.WorkerQueue.Text = string.Empty; + + this.NumberOfWorkerThreads.Text = "?"; + worker = null; + + this.DeleteWorker.Enabled = false; + } + + private void PrepareWorkerForUpdate() + { + worker = WorkerList.SelectedItem as Worker; + if (worker != null) + { + this.WorkerButton.Text = "Update"; + this.WorkerQueue.Text = worker.Queue; + this.NumberOfWorkerThreads.Text = worker.NumberOfWorkerThreads.ToString(); + + this.DeleteWorker.Enabled = true; + } + } + + private void UpdateWorker() + { + if (worker != null) + this.NumberOfWorkerThreads.Text = worker.NumberOfWorkerThreads.ToString(); + } + + private void WorkerButton_Click(object sender, EventArgs e) + { + if (WorkerList.SelectedItem != null) + this.DoWorkerUpdate(); + else + this.DoWorkerAdd(); + } + + private void ClearWorker_Click(object sender, EventArgs e) + { + WorkerList.SelectedIndex = -1; + } + + private void DoWorkerAdd() + { + if (current == null) + return; + + Worker w = new Worker(); + w.Queue = WorkerQueue.Text; + + current.Workers.Add(w); + + this.RefreshWorkerList(); + + this.WorkerList.SelectedItem = w; + + this.PrepareForUpdate(); + } + + private void DoWorkerUpdate() + { + worker = WorkerList.SelectedItem as Worker; + if (worker != null) + { + worker.Queue = WorkerQueue.Text; + + this.RefreshWorkerList(); + } + } + + private void RefreshNumberOfWorkerThreads_Click(object sender, EventArgs e) + { + if (worker != null) + Manager.RefreshNumberOfWorkerThreads(worker.Queue); + } + + private void IncreaseWorkerThreads_Click(object sender, EventArgs e) + { + if (worker != null) + Manager.SetNumberOfWorkerThreads(worker.Queue, worker.NumberOfWorkerThreads + 1); + } + + private void DecreaseWorkerThreads_Click(object sender, EventArgs e) + { + if (worker != null) + Manager.SetNumberOfWorkerThreads(worker.Queue, worker.NumberOfWorkerThreads - 1); + } + + private void Form1_FormClosing(object sender, FormClosingEventArgs e) + { + Manager.Save(); + } + + private void saveToolStripMenuItem_Click(object sender, EventArgs e) + { + Manager.Save(); + } + + private void DeleteWorker_Click(object sender, EventArgs e) + { + if (worker != null) + { + current.Workers.Remove(worker); + worker = null; + + this.RefreshWorkerList(); + } + } + + private void DeleteManagedEndpoint_Click(object sender, EventArgs e) + { + if (current != null) + { + this.endpoints.Remove(current); + current = null; + + this.RefreshList(); + } + } + + private void exitToolStripMenuItem_Click(object sender, EventArgs e) + { + this.Close(); + } + + private void timer1_Tick(object sender, EventArgs e) + { + this.UpdateManagedEndpoint(); + this.UpdateWorker(); + } + } } \ No newline at end of file diff --git a/src/tools/management/Grid/UI/Form1.resx b/src/tools/management/Grid/UI/Form1.resx index d0fb90db3fd..4e789f7d1c6 100644 --- a/src/tools/management/Grid/UI/Form1.resx +++ b/src/tools/management/Grid/UI/Form1.resx @@ -1,126 +1,126 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - - 126, 17 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + 126, 17 + \ No newline at end of file diff --git a/src/tools/management/Grid/UI/Program.cs b/src/tools/management/Grid/UI/Program.cs index 994676fa98b..da8d1e12cf3 100644 --- a/src/tools/management/Grid/UI/Program.cs +++ b/src/tools/management/Grid/UI/Program.cs @@ -1,58 +1,58 @@ -using System; -using System.Configuration; -using System.Windows.Forms; -using NServiceBus; -using Grid; - -namespace UI -{ - static class Program - { - /// - /// The main entry point for the application. - /// - [STAThread] - static void Main() - { - string nameSpace = ConfigurationManager.AppSettings["NameSpace"]; - string serialization = ConfigurationManager.AppSettings["Serialization"]; - - Func func; - - switch (serialization) - { - case "xml": - func = cfg => cfg.XmlSerializer(nameSpace); - break; - case "binary": - func = cfg => cfg.BinarySerializer(); - break; - default: - throw new ConfigurationErrorsException("Serialization can only be either 'xml' or 'binary'."); - } - - var busMgr = func(NServiceBus.Configure.With() - .Synchronization() - .DefaultBuilder()) - .MsmqTransport() - .IsTransactional(false) - .PurgeOnStartup(false) - .UnicastBus() - .ImpersonateSender(false) - .CreateBus(); - - var bus = busMgr.Start(); - - Manager.SetBus(bus); - - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - - Form1 f = new Form1(); - - f.Closed += delegate { busMgr.Dispose(); }; - - Application.Run(f); - } - } +using System; +using System.Configuration; +using System.Windows.Forms; +using NServiceBus; +using Grid; + +namespace UI +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + string nameSpace = ConfigurationManager.AppSettings["NameSpace"]; + string serialization = ConfigurationManager.AppSettings["Serialization"]; + + Func func; + + switch (serialization) + { + case "xml": + func = cfg => cfg.XmlSerializer(nameSpace); + break; + case "binary": + func = cfg => cfg.BinarySerializer(); + break; + default: + throw new ConfigurationErrorsException("Serialization can only be either 'xml' or 'binary'."); + } + + var busMgr = func(NServiceBus.Configure.With() + .Synchronization() + .DefaultBuilder()) + .MsmqTransport() + .IsTransactional(false) + .PurgeOnStartup(false) + .UnicastBus() + .ImpersonateSender(false) + .CreateBus(); + + var bus = busMgr.Start(); + + Manager.SetBus(bus); + + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + + Form1 f = new Form1(); + + f.Closed += delegate { busMgr.Dispose(); }; + + Application.Run(f); + } + } } \ No newline at end of file diff --git a/src/tools/management/Grid/UI/Properties/AssemblyInfo.cs b/src/tools/management/Grid/UI/Properties/AssemblyInfo.cs index 7ae0c1b36f4..6e02f5efb55 100644 --- a/src/tools/management/Grid/UI/Properties/AssemblyInfo.cs +++ b/src/tools/management/Grid/UI/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Grid Management UI")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Grid Management UI")] [assembly: AssemblyDescription("User interface for managing grid enabled endpoints")] \ No newline at end of file diff --git a/src/tools/management/Grid/UI/Properties/Resources.Designer.cs b/src/tools/management/Grid/UI/Properties/Resources.Designer.cs index 654ccaa7aad..934e8d58c47 100644 --- a/src/tools/management/Grid/UI/Properties/Resources.Designer.cs +++ b/src/tools/management/Grid/UI/Properties/Resources.Designer.cs @@ -1,63 +1,63 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.3053 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace UI.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("UI.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.3053 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace UI.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("UI.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/src/tools/management/Grid/UI/Properties/Resources.resx b/src/tools/management/Grid/UI/Properties/Resources.resx index ffecec851ab..af7dbebbace 100644 --- a/src/tools/management/Grid/UI/Properties/Resources.resx +++ b/src/tools/management/Grid/UI/Properties/Resources.resx @@ -1,117 +1,117 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/src/tools/management/Grid/UI/Properties/Settings.Designer.cs b/src/tools/management/Grid/UI/Properties/Settings.Designer.cs index 732e4b92404..ac2f7efccf0 100644 --- a/src/tools/management/Grid/UI/Properties/Settings.Designer.cs +++ b/src/tools/management/Grid/UI/Properties/Settings.Designer.cs @@ -1,26 +1,26 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.3053 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace UI.Properties { - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default { - get { - return defaultInstance; - } - } - } -} +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.3053 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace UI.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/src/tools/management/Grid/UI/Properties/Settings.settings b/src/tools/management/Grid/UI/Properties/Settings.settings index abf36c5d3d7..39645652af6 100644 --- a/src/tools/management/Grid/UI/Properties/Settings.settings +++ b/src/tools/management/Grid/UI/Properties/Settings.settings @@ -1,7 +1,7 @@ - - - - - - - + + + + + + + diff --git a/src/tools/management/Grid/UI/UI.csproj b/src/tools/management/Grid/UI/UI.csproj index 1ec8446793e..261a26a10c0 100644 --- a/src/tools/management/Grid/UI/UI.csproj +++ b/src/tools/management/Grid/UI/UI.csproj @@ -1,149 +1,149 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {211C2BF6-5146-4019-8972-6AC87C90745B} - WinExe - Properties - UI - UI - - - - - - v4.0 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - False - ..\..\..\..\..\lib\log4net.dll - - - False - ..\..\..\..\..\build\output\NServiceBus.dll - - - False - ..\..\..\..\..\build\output\NServiceBus.Core.dll - - - - - 3.5 - - - - - - - - - - CommonAssemblyInfo.cs - - - Form - - - Form1.cs - - - - - Designer - Form1.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - True - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - - - {DEC520C3-D1CA-4EF6-94FB-4F24F1D92651} - Grid %28tools\management\grid\Grid%29 - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\..\build\tools\GridUI\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {211C2BF6-5146-4019-8972-6AC87C90745B} + WinExe + Properties + UI + UI + + + + + + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + False + ..\..\..\..\..\lib\log4net.dll + + + False + ..\..\..\..\..\build\output\NServiceBus.dll + + + False + ..\..\..\..\..\build\output\NServiceBus.Core.dll + + + + + 3.5 + + + + + + + + + + CommonAssemblyInfo.cs + + + Form + + + Form1.cs + + + + + Designer + Form1.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + {DEC520C3-D1CA-4EF6-94FB-4F24F1D92651} + Grid %28tools\management\grid\Grid%29 + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + xcopy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\..\..\build\tools\GridUI\" + \ No newline at end of file diff --git a/src/unicast/NServiceBus.Unicast.Config/ConfigUnicastBus.cs b/src/unicast/NServiceBus.Unicast.Config/ConfigUnicastBus.cs index d8a1fb0099a..6f024ab73ec 100644 --- a/src/unicast/NServiceBus.Unicast.Config/ConfigUnicastBus.cs +++ b/src/unicast/NServiceBus.Unicast.Config/ConfigUnicastBus.cs @@ -1,287 +1,287 @@ -using System; -using System.Configuration; -using Common.Logging; -using NServiceBus.ObjectBuilder; -using System.Collections; -using NServiceBus.Config; -using System.Collections.Generic; -using NServiceBus.Saga; -using System.Linq; - -namespace NServiceBus.Unicast.Config -{ - /// - /// Inherits NServiceBus.Configure providing UnicastBus specific configuration on top of it. - /// - public class ConfigUnicastBus : Configure - { - /// - /// A map of which message types (belonging to the given assemblies) are owned - /// by which endpoint. - /// - protected Hashtable assembliesToEndpoints = new Hashtable(); - - /// - /// Wrap the given configure object storing its builder and configurer. - /// - /// - public void Configure(Configure config) - { - Builder = config.Builder; - Configurer = config.Configurer; - - busConfig = Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); - - ConfigureSubscriptionAuthorization(); - - RegisterMessageModules(); - - var unicastBusConfig = GetConfigSection(); - string address = ""; - - if (unicastBusConfig != null) - { - address = unicastBusConfig.LocalAddress; - - foreach (MessageEndpointMapping mapping in unicastBusConfig.MessageEndpointMappings) - assembliesToEndpoints[mapping.Messages] = mapping.Endpoint; - - busConfig.ConfigureProperty(b => b.ForwardReceivedMessagesTo, unicastBusConfig.ForwardReceivedMessagesTo); - busConfig.ConfigureProperty(b => b.MessageOwners, assembliesToEndpoints); - } - - if (string.IsNullOrEmpty(address)) - { - var msmqTransportConfig = GetConfigSection(); - - if (msmqTransportConfig != null && msmqTransportConfig.InputQueue != null) - { - Logger.Warn("LocalAddress property of UnicastBusConfig not found. Using InputQueue property of MsmqTransportConfig instead. This will not be supported in the next version."); - address = msmqTransportConfig.InputQueue; - } - } - - busConfig.ConfigureProperty(t => t.Address, address); - - TypesToScan.Where(t => typeof(IMessage).IsAssignableFrom(t)).ToList().ForEach( - t => assembliesToEndpoints[t.Assembly.GetName().Name] = string.Empty - ); - } - - private void RegisterMessageModules() - { - TypesToScan.Where(t => typeof(IMessageModule).IsAssignableFrom(t) && !t.IsInterface).ToList().ForEach( - type => Configurer.ConfigureComponent(type, ComponentCallModelEnum.Singlecall) - ); - } - - private void ConfigureSubscriptionAuthorization() - { - Type authType = - TypesToScan.Where(t => typeof(IAuthorizeSubscriptions).IsAssignableFrom(t) && !t.IsInterface). - FirstOrDefault(); - - if (authType != null) - Configurer.ConfigureComponent(authType, ComponentCallModelEnum.Singleton); - } - - /// - /// Used to configure the bus. - /// - protected IComponentConfig busConfig; - - /// - /// Loads all message handler assemblies in the runtime directory. - /// - /// - public ConfigUnicastBus LoadMessageHandlers() - { - var types = new List(); - - TypesToScan.Where(TypeSpecifiesMessageHandlerOrdering) - .ToList().ForEach(t => - { - Logger.DebugFormat("Going to ask for message handler ordering from {0}.", t); - - var order = new Order(); - ((ISpecifyMessageHandlerOrdering)Activator.CreateInstance(t)).SpecifyOrder(order); - - order.Types.ToList().ForEach(ht => - { - if (types.Contains(ht)) - throw new ConfigurationErrorsException(string.Format("The order in which the type {0} should be invoked was already specified by a previous implementor of ISpecifyMessageHandlerOrdering. Check the debug logs to see which other specifiers have been invoked.", ht)); - }); - - types.AddRange(order.Types); - }); - - return LoadMessageHandlers(types); - } - - /// - /// Loads all message handler assemblies in the runtime directory - /// and specifies that handlers in the given assembly should run - /// before all others. - /// - /// Use First{T} to indicate the type to load from. - /// - /// - /// - public ConfigUnicastBus LoadMessageHandlers() - { - Type[] args = typeof(TFirst).GetGenericArguments(); - if (args.Length == 1) - { - if (typeof(First<>).MakeGenericType(args[0]).IsAssignableFrom(typeof(TFirst))) - { - return LoadMessageHandlers(new[] { args[0] }); - } - } - - throw new ArgumentException("TFirst should be of the type First where T is the type to indicate as first."); - } - - /// - /// Loads all message handler assemblies in the runtime directory - /// and specifies that the handlers in the given 'order' are to - /// run before all others and in the order specified. - /// - /// - /// - /// - public ConfigUnicastBus LoadMessageHandlers(First order) - { - return LoadMessageHandlers(order.Types); - } - - private ConfigUnicastBus LoadMessageHandlers(IEnumerable orderedTypes) - { - LoadMessageHandlersCalled = true; - var types = new List(TypesToScan); - - foreach (Type t in orderedTypes) - types.Remove(t); - - types.InsertRange(0, orderedTypes); - - return ConfigureMessageHandlersIn(types); - } - - /// - /// Scans the given types for types that are message handlers - /// then uses the Configurer to configure them into the container as single call components, - /// finally passing them to the bus as its MessageHandlerTypes. - /// - /// - /// - protected ConfigUnicastBus ConfigureMessageHandlersIn(IEnumerable types) - { - var handlers = new List(); - - foreach (Type t in types.Where(IsMessageHandler)) - { - Configurer.ConfigureComponent(t, ComponentCallModelEnum.Singlecall); - handlers.Add(t); - } - - busConfig.ConfigureProperty(b => b.MessageHandlerTypes, handlers); - - return this; - } - - /// - /// Set this if you want this endpoint to serve as something of a proxy; - /// recipients of messages sent by this endpoint will see the address - /// of endpoints that sent the incoming messages. - /// - /// - /// - public ConfigUnicastBus PropogateReturnAddressOnSend(bool value) - { - busConfig.ConfigureProperty(b => b.PropogateReturnAddressOnSend, value); - return this; - } - - /// - /// Forwards all received messages to a given endpoint (queue@machine). - /// This is useful as an auditing/debugging mechanism. - /// - /// - /// - public ConfigUnicastBus ForwardReceivedMessagesTo(string value) - { - busConfig.ConfigureProperty(b => b.ForwardReceivedMessagesTo, value); - return this; - } - - /// - /// Instructs the bus not to automatically subscribe to messages that - /// it has handlers for (given those messages belong to a different endpoint). - /// - /// This is needed only if you require fine-grained control over the subscribe/unsubscribe process. - /// - /// - public ConfigUnicastBus DoNotAutoSubscribe() - { - busConfig.ConfigureProperty(b => b.AutoSubscribe, false); - return this; - } - - /// - /// Returns true if the given type is a message handler. - /// - /// - /// - public static bool IsMessageHandler(Type t) - { - if (t.IsAbstract) - return false; - - if (typeof(ISaga).IsAssignableFrom(t)) - return false; - - foreach (Type interfaceType in t.GetInterfaces()) - { - Type messageType = GetMessageTypeFromMessageHandler(interfaceType); - if (messageType != null) - return true; - } - - return false; - } - - private static bool TypeSpecifiesMessageHandlerOrdering(Type t) - { - return typeof(ISpecifyMessageHandlerOrdering).IsAssignableFrom(t) && !t.IsAbstract && !t.IsInterface; - } - - /// - /// Returns the message type handled by the given message handler type. - /// - /// - /// - public static Type GetMessageTypeFromMessageHandler(Type t) - { - if (t.IsGenericType) - { - Type[] args = t.GetGenericArguments(); - if (args.Length != 1) - return null; - - if (!typeof(IMessage).IsAssignableFrom(args[0])) - return null; - - Type handlerType = typeof(IMessageHandler<>).MakeGenericType(args[0]); - if (handlerType.IsAssignableFrom(t)) - return args[0]; - } - - return null; - } - - private static readonly ILog Logger = LogManager.GetLogger(typeof(UnicastBus)); - - internal bool LoadMessageHandlersCalled { get; private set; } - - } -} +using System; +using System.Configuration; +using Common.Logging; +using NServiceBus.ObjectBuilder; +using System.Collections; +using NServiceBus.Config; +using System.Collections.Generic; +using NServiceBus.Saga; +using System.Linq; + +namespace NServiceBus.Unicast.Config +{ + /// + /// Inherits NServiceBus.Configure providing UnicastBus specific configuration on top of it. + /// + public class ConfigUnicastBus : Configure + { + /// + /// A map of which message types (belonging to the given assemblies) are owned + /// by which endpoint. + /// + protected Hashtable assembliesToEndpoints = new Hashtable(); + + /// + /// Wrap the given configure object storing its builder and configurer. + /// + /// + public void Configure(Configure config) + { + Builder = config.Builder; + Configurer = config.Configurer; + + busConfig = Configurer.ConfigureComponent(ComponentCallModelEnum.Singleton); + + ConfigureSubscriptionAuthorization(); + + RegisterMessageModules(); + + var unicastBusConfig = GetConfigSection(); + string address = ""; + + if (unicastBusConfig != null) + { + address = unicastBusConfig.LocalAddress; + + foreach (MessageEndpointMapping mapping in unicastBusConfig.MessageEndpointMappings) + assembliesToEndpoints[mapping.Messages] = mapping.Endpoint; + + busConfig.ConfigureProperty(b => b.ForwardReceivedMessagesTo, unicastBusConfig.ForwardReceivedMessagesTo); + busConfig.ConfigureProperty(b => b.MessageOwners, assembliesToEndpoints); + } + + if (string.IsNullOrEmpty(address)) + { + var msmqTransportConfig = GetConfigSection(); + + if (msmqTransportConfig != null && msmqTransportConfig.InputQueue != null) + { + Logger.Warn("LocalAddress property of UnicastBusConfig not found. Using InputQueue property of MsmqTransportConfig instead. This will not be supported in the next version."); + address = msmqTransportConfig.InputQueue; + } + } + + busConfig.ConfigureProperty(t => t.Address, address); + + TypesToScan.Where(t => typeof(IMessage).IsAssignableFrom(t)).ToList().ForEach( + t => assembliesToEndpoints[t.Assembly.GetName().Name] = string.Empty + ); + } + + private void RegisterMessageModules() + { + TypesToScan.Where(t => typeof(IMessageModule).IsAssignableFrom(t) && !t.IsInterface).ToList().ForEach( + type => Configurer.ConfigureComponent(type, ComponentCallModelEnum.Singlecall) + ); + } + + private void ConfigureSubscriptionAuthorization() + { + Type authType = + TypesToScan.Where(t => typeof(IAuthorizeSubscriptions).IsAssignableFrom(t) && !t.IsInterface). + FirstOrDefault(); + + if (authType != null) + Configurer.ConfigureComponent(authType, ComponentCallModelEnum.Singleton); + } + + /// + /// Used to configure the bus. + /// + protected IComponentConfig busConfig; + + /// + /// Loads all message handler assemblies in the runtime directory. + /// + /// + public ConfigUnicastBus LoadMessageHandlers() + { + var types = new List(); + + TypesToScan.Where(TypeSpecifiesMessageHandlerOrdering) + .ToList().ForEach(t => + { + Logger.DebugFormat("Going to ask for message handler ordering from {0}.", t); + + var order = new Order(); + ((ISpecifyMessageHandlerOrdering)Activator.CreateInstance(t)).SpecifyOrder(order); + + order.Types.ToList().ForEach(ht => + { + if (types.Contains(ht)) + throw new ConfigurationErrorsException(string.Format("The order in which the type {0} should be invoked was already specified by a previous implementor of ISpecifyMessageHandlerOrdering. Check the debug logs to see which other specifiers have been invoked.", ht)); + }); + + types.AddRange(order.Types); + }); + + return LoadMessageHandlers(types); + } + + /// + /// Loads all message handler assemblies in the runtime directory + /// and specifies that handlers in the given assembly should run + /// before all others. + /// + /// Use First{T} to indicate the type to load from. + /// + /// + /// + public ConfigUnicastBus LoadMessageHandlers() + { + Type[] args = typeof(TFirst).GetGenericArguments(); + if (args.Length == 1) + { + if (typeof(First<>).MakeGenericType(args[0]).IsAssignableFrom(typeof(TFirst))) + { + return LoadMessageHandlers(new[] { args[0] }); + } + } + + throw new ArgumentException("TFirst should be of the type First where T is the type to indicate as first."); + } + + /// + /// Loads all message handler assemblies in the runtime directory + /// and specifies that the handlers in the given 'order' are to + /// run before all others and in the order specified. + /// + /// + /// + /// + public ConfigUnicastBus LoadMessageHandlers(First order) + { + return LoadMessageHandlers(order.Types); + } + + private ConfigUnicastBus LoadMessageHandlers(IEnumerable orderedTypes) + { + LoadMessageHandlersCalled = true; + var types = new List(TypesToScan); + + foreach (Type t in orderedTypes) + types.Remove(t); + + types.InsertRange(0, orderedTypes); + + return ConfigureMessageHandlersIn(types); + } + + /// + /// Scans the given types for types that are message handlers + /// then uses the Configurer to configure them into the container as single call components, + /// finally passing them to the bus as its MessageHandlerTypes. + /// + /// + /// + protected ConfigUnicastBus ConfigureMessageHandlersIn(IEnumerable types) + { + var handlers = new List(); + + foreach (Type t in types.Where(IsMessageHandler)) + { + Configurer.ConfigureComponent(t, ComponentCallModelEnum.Singlecall); + handlers.Add(t); + } + + busConfig.ConfigureProperty(b => b.MessageHandlerTypes, handlers); + + return this; + } + + /// + /// Set this if you want this endpoint to serve as something of a proxy; + /// recipients of messages sent by this endpoint will see the address + /// of endpoints that sent the incoming messages. + /// + /// + /// + public ConfigUnicastBus PropogateReturnAddressOnSend(bool value) + { + busConfig.ConfigureProperty(b => b.PropogateReturnAddressOnSend, value); + return this; + } + + /// + /// Forwards all received messages to a given endpoint (queue@machine). + /// This is useful as an auditing/debugging mechanism. + /// + /// + /// + public ConfigUnicastBus ForwardReceivedMessagesTo(string value) + { + busConfig.ConfigureProperty(b => b.ForwardReceivedMessagesTo, value); + return this; + } + + /// + /// Instructs the bus not to automatically subscribe to messages that + /// it has handlers for (given those messages belong to a different endpoint). + /// + /// This is needed only if you require fine-grained control over the subscribe/unsubscribe process. + /// + /// + public ConfigUnicastBus DoNotAutoSubscribe() + { + busConfig.ConfigureProperty(b => b.AutoSubscribe, false); + return this; + } + + /// + /// Returns true if the given type is a message handler. + /// + /// + /// + public static bool IsMessageHandler(Type t) + { + if (t.IsAbstract) + return false; + + if (typeof(ISaga).IsAssignableFrom(t)) + return false; + + foreach (Type interfaceType in t.GetInterfaces()) + { + Type messageType = GetMessageTypeFromMessageHandler(interfaceType); + if (messageType != null) + return true; + } + + return false; + } + + private static bool TypeSpecifiesMessageHandlerOrdering(Type t) + { + return typeof(ISpecifyMessageHandlerOrdering).IsAssignableFrom(t) && !t.IsAbstract && !t.IsInterface; + } + + /// + /// Returns the message type handled by the given message handler type. + /// + /// + /// + public static Type GetMessageTypeFromMessageHandler(Type t) + { + if (t.IsGenericType) + { + Type[] args = t.GetGenericArguments(); + if (args.Length != 1) + return null; + + if (!typeof(IMessage).IsAssignableFrom(args[0])) + return null; + + Type handlerType = typeof(IMessageHandler<>).MakeGenericType(args[0]); + if (handlerType.IsAssignableFrom(t)) + return args[0]; + } + + return null; + } + + private static readonly ILog Logger = LogManager.GetLogger(typeof(UnicastBus)); + + internal bool LoadMessageHandlersCalled { get; private set; } + + } +} diff --git a/src/unicast/NServiceBus.Unicast.Config/ConfigureUnicastBus.cs b/src/unicast/NServiceBus.Unicast.Config/ConfigureUnicastBus.cs index 71878f14464..df64aeb2522 100644 --- a/src/unicast/NServiceBus.Unicast.Config/ConfigureUnicastBus.cs +++ b/src/unicast/NServiceBus.Unicast.Config/ConfigureUnicastBus.cs @@ -1,36 +1,36 @@ -using NServiceBus.Config; -using NServiceBus.Unicast.Config; - -namespace NServiceBus -{ - /// - /// Contains extension methods to NServiceBus.Configure. - /// - public static class ConfigureUnicastBus - { - /// - /// Use unicast messaging (your best option on nServiceBus right now). - /// - /// - /// - public static ConfigUnicastBus UnicastBus(this Configure config) - { - Instance = new ConfigUnicastBus(); - Instance.Configure(config); - - return Instance; - } - - internal static ConfigUnicastBus Instance { get; private set; } - } - - class EnsureLoadMessageHandlersWasCalled : INeedInitialization - { - void INeedInitialization.Init() - { - if (ConfigureUnicastBus.Instance != null) - if (!ConfigureUnicastBus.Instance.LoadMessageHandlersCalled) - ConfigureUnicastBus.Instance.LoadMessageHandlers(); - } - } -} +using NServiceBus.Config; +using NServiceBus.Unicast.Config; + +namespace NServiceBus +{ + /// + /// Contains extension methods to NServiceBus.Configure. + /// + public static class ConfigureUnicastBus + { + /// + /// Use unicast messaging (your best option on nServiceBus right now). + /// + /// + /// + public static ConfigUnicastBus UnicastBus(this Configure config) + { + Instance = new ConfigUnicastBus(); + Instance.Configure(config); + + return Instance; + } + + internal static ConfigUnicastBus Instance { get; private set; } + } + + class EnsureLoadMessageHandlersWasCalled : INeedInitialization + { + void INeedInitialization.Init() + { + if (ConfigureUnicastBus.Instance != null) + if (!ConfigureUnicastBus.Instance.LoadMessageHandlersCalled) + ConfigureUnicastBus.Instance.LoadMessageHandlers(); + } + } +} diff --git a/src/unicast/NServiceBus.Unicast.Config/MessageEndpointMapping.cs b/src/unicast/NServiceBus.Unicast.Config/MessageEndpointMapping.cs index 4f970d29e9d..dad597c4b2f 100644 --- a/src/unicast/NServiceBus.Unicast.Config/MessageEndpointMapping.cs +++ b/src/unicast/NServiceBus.Unicast.Config/MessageEndpointMapping.cs @@ -1,42 +1,42 @@ -using System.Configuration; - -namespace NServiceBus.Config -{ - /// - /// A configuration element representing which message types map to which endpoint. - /// - public class MessageEndpointMapping : ConfigurationElement - { - /// - /// A string defining the message assembly, or single message type. - /// - [ConfigurationProperty("Messages", IsRequired = true, IsKey = true)] - public string Messages - { - get - { - return (string)this["Messages"]; - } - set - { - this["Messages"] = value; - } - } - - /// - /// The endpoint named according to "queue@machine". - /// - [ConfigurationProperty("Endpoint", IsRequired = true, IsKey = true)] - public string Endpoint - { - get - { - return (string)this["Endpoint"]; - } - set - { - this["Endpoint"] = value; - } - } - } -} +using System.Configuration; + +namespace NServiceBus.Config +{ + /// + /// A configuration element representing which message types map to which endpoint. + /// + public class MessageEndpointMapping : ConfigurationElement + { + /// + /// A string defining the message assembly, or single message type. + /// + [ConfigurationProperty("Messages", IsRequired = true, IsKey = true)] + public string Messages + { + get + { + return (string)this["Messages"]; + } + set + { + this["Messages"] = value; + } + } + + /// + /// The endpoint named according to "queue@machine". + /// + [ConfigurationProperty("Endpoint", IsRequired = true, IsKey = true)] + public string Endpoint + { + get + { + return (string)this["Endpoint"]; + } + set + { + this["Endpoint"] = value; + } + } + } +} diff --git a/src/unicast/NServiceBus.Unicast.Config/MessageEndpointMappingCollection.cs b/src/unicast/NServiceBus.Unicast.Config/MessageEndpointMappingCollection.cs index f7c450dcb05..7df7d751045 100644 --- a/src/unicast/NServiceBus.Unicast.Config/MessageEndpointMappingCollection.cs +++ b/src/unicast/NServiceBus.Unicast.Config/MessageEndpointMappingCollection.cs @@ -1,197 +1,197 @@ -using System; -using System.Configuration; -using System.Collections; - -namespace NServiceBus.Config -{ - /// - /// A configuration element collection of MessageEndpointMappings. - /// - public class MessageEndpointMappingCollection : ConfigurationElementCollection - { - /// - /// Returns AddRemoveClearMap. - /// - public override ConfigurationElementCollectionType CollectionType - { - get - { - return - ConfigurationElementCollectionType.AddRemoveClearMap; - } - } - - /// - /// Creates a new MessageEndpointMapping. - /// - /// - protected override ConfigurationElement CreateNewElement() - { - return new MessageEndpointMapping(); - } - - /// - /// Creates a new MessageEndpointMapping, setting its Message property to the given name. - /// - /// - /// - protected override ConfigurationElement CreateNewElement(string elementName) - { - MessageEndpointMapping result = new MessageEndpointMapping(); - result.Messages = elementName; - - return result; - } - - /// - /// Returns the Messages property of the given MessageEndpointMapping element. - /// - /// - /// - protected override Object GetElementKey(ConfigurationElement element) - { - return ((MessageEndpointMapping)element).Messages; - } - - /// - /// Calls the base AddElementName. - /// - public new string AddElementName - { - get - { return base.AddElementName; } - - set - { base.AddElementName = value; } - - } - - /// - /// Calls the base ClearElementName. - /// - public new string ClearElementName - { - get - { return base.ClearElementName; } - - set - { base.AddElementName = value; } - - } - - /// - /// Returns the base RemoveElementName. - /// - public new string RemoveElementName - { - get - { return base.RemoveElementName; } - } - - /// - /// Returns the base Count. - /// - public new int Count - { - get { return base.Count; } - } - - /// - /// Gets/sets the MessageEndpointMapping at the given index. - /// - /// - /// - public MessageEndpointMapping this[int index] - { - get - { - return (MessageEndpointMapping)BaseGet(index); - } - set - { - if (BaseGet(index) != null) - { - BaseRemoveAt(index); - } - BaseAdd(index, value); - } - } - - /// - /// Gets the MessageEndpointMapping for the given name. - /// - /// - /// - new public MessageEndpointMapping this[string Name] - { - get - { - return (MessageEndpointMapping)BaseGet(Name); - } - } - - /// - /// Calls BaseIndexOf on the given mapping. - /// - /// - /// - public int IndexOf(MessageEndpointMapping mapping) - { - return BaseIndexOf(mapping); - } - - /// - /// Calls BaseAdd. - /// - /// - public void Add(MessageEndpointMapping mapping) - { - BaseAdd(mapping); - } - - /// - /// Calls BaseAdd with true as the additional parameter. - /// - /// - protected override void BaseAdd(ConfigurationElement element) - { - BaseAdd(element, true); - } - - /// - /// If the mapping exists, calls BaseRemove on it. - /// - /// - public void Remove(MessageEndpointMapping mapping) - { - if (BaseIndexOf(mapping) >= 0) - BaseRemove(mapping.Messages); - } - - /// - /// Calls BaseRemoveAt. - /// - /// - public void RemoveAt(int index) - { - BaseRemoveAt(index); - } - - /// - /// Calls BaseRemove. - /// - /// - public void Remove(string name) - { - BaseRemove(name); - } - - /// - /// Calls BaseClear. - /// - public void Clear() - { - BaseClear(); - } - } -} +using System; +using System.Configuration; +using System.Collections; + +namespace NServiceBus.Config +{ + /// + /// A configuration element collection of MessageEndpointMappings. + /// + public class MessageEndpointMappingCollection : ConfigurationElementCollection + { + /// + /// Returns AddRemoveClearMap. + /// + public override ConfigurationElementCollectionType CollectionType + { + get + { + return + ConfigurationElementCollectionType.AddRemoveClearMap; + } + } + + /// + /// Creates a new MessageEndpointMapping. + /// + /// + protected override ConfigurationElement CreateNewElement() + { + return new MessageEndpointMapping(); + } + + /// + /// Creates a new MessageEndpointMapping, setting its Message property to the given name. + /// + /// + /// + protected override ConfigurationElement CreateNewElement(string elementName) + { + MessageEndpointMapping result = new MessageEndpointMapping(); + result.Messages = elementName; + + return result; + } + + /// + /// Returns the Messages property of the given MessageEndpointMapping element. + /// + /// + /// + protected override Object GetElementKey(ConfigurationElement element) + { + return ((MessageEndpointMapping)element).Messages; + } + + /// + /// Calls the base AddElementName. + /// + public new string AddElementName + { + get + { return base.AddElementName; } + + set + { base.AddElementName = value; } + + } + + /// + /// Calls the base ClearElementName. + /// + public new string ClearElementName + { + get + { return base.ClearElementName; } + + set + { base.AddElementName = value; } + + } + + /// + /// Returns the base RemoveElementName. + /// + public new string RemoveElementName + { + get + { return base.RemoveElementName; } + } + + /// + /// Returns the base Count. + /// + public new int Count + { + get { return base.Count; } + } + + /// + /// Gets/sets the MessageEndpointMapping at the given index. + /// + /// + /// + public MessageEndpointMapping this[int index] + { + get + { + return (MessageEndpointMapping)BaseGet(index); + } + set + { + if (BaseGet(index) != null) + { + BaseRemoveAt(index); + } + BaseAdd(index, value); + } + } + + /// + /// Gets the MessageEndpointMapping for the given name. + /// + /// + /// + new public MessageEndpointMapping this[string Name] + { + get + { + return (MessageEndpointMapping)BaseGet(Name); + } + } + + /// + /// Calls BaseIndexOf on the given mapping. + /// + /// + /// + public int IndexOf(MessageEndpointMapping mapping) + { + return BaseIndexOf(mapping); + } + + /// + /// Calls BaseAdd. + /// + /// + public void Add(MessageEndpointMapping mapping) + { + BaseAdd(mapping); + } + + /// + /// Calls BaseAdd with true as the additional parameter. + /// + /// + protected override void BaseAdd(ConfigurationElement element) + { + BaseAdd(element, true); + } + + /// + /// If the mapping exists, calls BaseRemove on it. + /// + /// + public void Remove(MessageEndpointMapping mapping) + { + if (BaseIndexOf(mapping) >= 0) + BaseRemove(mapping.Messages); + } + + /// + /// Calls BaseRemoveAt. + /// + /// + public void RemoveAt(int index) + { + BaseRemoveAt(index); + } + + /// + /// Calls BaseRemove. + /// + /// + public void Remove(string name) + { + BaseRemove(name); + } + + /// + /// Calls BaseClear. + /// + public void Clear() + { + BaseClear(); + } + } +} diff --git a/src/unicast/NServiceBus.Unicast.Config/NServiceBus.Unicast.Config.csproj b/src/unicast/NServiceBus.Unicast.Config/NServiceBus.Unicast.Config.csproj index d8e2a7ef702..35e86baf8ce 100644 --- a/src/unicast/NServiceBus.Unicast.Config/NServiceBus.Unicast.Config.csproj +++ b/src/unicast/NServiceBus.Unicast.Config/NServiceBus.Unicast.Config.csproj @@ -1,133 +1,133 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {B6D6B021-F477-4C8C-B19E-9CB2ABBCA095} - Library - Properties - NServiceBus.Unicast.Config - NServiceBus.Unicast.Config - - - - - - v4.0 - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.Unicast.Config.XML - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.Unicast.Config.XML - AllRules.ruleset - - - - ..\..\..\lib\Common.Logging.dll - False - - - False - ..\..\..\build\output\NServiceBus.dll - - - False - ..\..\..\build\nservicebus.core\NServiceBus.Config.dll - - - ..\..\..\build\nservicebus.core\NServiceBus.MessageMutator.dll - - - False - ..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll - - - ..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.Msmq.Config.dll - False - - - - - 3.5 - - - - - CommonAssemblyInfo.cs - - - - - - - - - - - {EB2C42A2-70FD-4469-959B-C577470B001B} - NServiceBus.Unicast - False - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\build\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {B6D6B021-F477-4C8C-B19E-9CB2ABBCA095} + Library + Properties + NServiceBus.Unicast.Config + NServiceBus.Unicast.Config + + + + + + v4.0 + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.Unicast.Config.XML + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.Unicast.Config.XML + AllRules.ruleset + + + + ..\..\..\lib\Common.Logging.dll + False + + + False + ..\..\..\build\output\NServiceBus.dll + + + False + ..\..\..\build\nservicebus.core\NServiceBus.Config.dll + + + ..\..\..\build\nservicebus.core\NServiceBus.MessageMutator.dll + + + False + ..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll + + + ..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.Msmq.Config.dll + False + + + + + 3.5 + + + + + CommonAssemblyInfo.cs + + + + + + + + + + + {EB2C42A2-70FD-4469-959B-C577470B001B} + NServiceBus.Unicast + False + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\build\" + \ No newline at end of file diff --git a/src/unicast/NServiceBus.Unicast.Config/Properties/AssemblyInfo.cs b/src/unicast/NServiceBus.Unicast.Config/Properties/AssemblyInfo.cs index 8daa629be27..e097574f287 100644 --- a/src/unicast/NServiceBus.Unicast.Config/Properties/AssemblyInfo.cs +++ b/src/unicast/NServiceBus.Unicast.Config/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Unicast Bus Configuration Functionality")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Unicast Bus Configuration Functionality")] [assembly: AssemblyDescription("Unicast bus configuration functionality for nServiceBus")] \ No newline at end of file diff --git a/src/unicast/NServiceBus.Unicast.Config/UnicastBusConfig.cs b/src/unicast/NServiceBus.Unicast.Config/UnicastBusConfig.cs index 693a8263f92..85d44cfa055 100644 --- a/src/unicast/NServiceBus.Unicast.Config/UnicastBusConfig.cs +++ b/src/unicast/NServiceBus.Unicast.Config/UnicastBusConfig.cs @@ -1,107 +1,107 @@ -using System.Configuration; - -namespace NServiceBus.Config -{ - /// - /// A configuration section for UnicastBus specific settings. - /// - public class UnicastBusConfig : ConfigurationSection - { - /// - /// Gets/sets the local address of the bus. - /// This replaces the InputQueue property of MsmqTransportConfig - /// - [ConfigurationProperty("LocalAddress", IsRequired = false)] - public string LocalAddress - { - get - { - var result = this["LocalAddress"] as string; - if (result != null && result.Length == 0) - result = null; - - return result; - } - set - { - this["LocalAddress"] = value; - } - } - - /// - /// Gets/sets the address for sending control messages to the distributor. - /// - [ConfigurationProperty("DistributorControlAddress", IsRequired = false)] - public string DistributorControlAddress - { - get - { - var result = this["DistributorControlAddress"] as string; - if (result != null && result.Length == 0) - result = null; - - return result; - } - set - { - this["DistributorControlAddress"] = value; - } - } - - /// - /// Gets/sets the distributor's data address - used as the return address of messages sent by this endpoint. - /// - [ConfigurationProperty("DistributorDataAddress", IsRequired = false)] - public string DistributorDataAddress - { - get - { - var result = this["DistributorDataAddress"] as string; - if (result != null && result.Length == 0) - result = null; - - return result; - } - set - { - this["DistributorDataAddress"] = value; - } - } - - /// - /// Gets/sets the address to which messages received will be forwarded. - /// - [ConfigurationProperty("ForwardReceivedMessagesTo", IsRequired = false)] - public string ForwardReceivedMessagesTo - { - get - { - var result = this["ForwardReceivedMessagesTo"] as string; - if (result != null && result.Length == 0) - result = null; - - return result; - } - set - { - this["ForwardReceivedMessagesTo"] = value; - } - } - - /// - /// Contains the mappings from message types (or groups of them) to endpoints. - /// - [ConfigurationProperty("MessageEndpointMappings", IsRequired = false)] - public MessageEndpointMappingCollection MessageEndpointMappings - { - get - { - return this["MessageEndpointMappings"] as MessageEndpointMappingCollection; - } - set - { - this["MessageEndpointMappings"] = value; - } - } - } -} +using System.Configuration; + +namespace NServiceBus.Config +{ + /// + /// A configuration section for UnicastBus specific settings. + /// + public class UnicastBusConfig : ConfigurationSection + { + /// + /// Gets/sets the local address of the bus. + /// This replaces the InputQueue property of MsmqTransportConfig + /// + [ConfigurationProperty("LocalAddress", IsRequired = false)] + public string LocalAddress + { + get + { + var result = this["LocalAddress"] as string; + if (result != null && result.Length == 0) + result = null; + + return result; + } + set + { + this["LocalAddress"] = value; + } + } + + /// + /// Gets/sets the address for sending control messages to the distributor. + /// + [ConfigurationProperty("DistributorControlAddress", IsRequired = false)] + public string DistributorControlAddress + { + get + { + var result = this["DistributorControlAddress"] as string; + if (result != null && result.Length == 0) + result = null; + + return result; + } + set + { + this["DistributorControlAddress"] = value; + } + } + + /// + /// Gets/sets the distributor's data address - used as the return address of messages sent by this endpoint. + /// + [ConfigurationProperty("DistributorDataAddress", IsRequired = false)] + public string DistributorDataAddress + { + get + { + var result = this["DistributorDataAddress"] as string; + if (result != null && result.Length == 0) + result = null; + + return result; + } + set + { + this["DistributorDataAddress"] = value; + } + } + + /// + /// Gets/sets the address to which messages received will be forwarded. + /// + [ConfigurationProperty("ForwardReceivedMessagesTo", IsRequired = false)] + public string ForwardReceivedMessagesTo + { + get + { + var result = this["ForwardReceivedMessagesTo"] as string; + if (result != null && result.Length == 0) + result = null; + + return result; + } + set + { + this["ForwardReceivedMessagesTo"] = value; + } + } + + /// + /// Contains the mappings from message types (or groups of them) to endpoints. + /// + [ConfigurationProperty("MessageEndpointMappings", IsRequired = false)] + public MessageEndpointMappingCollection MessageEndpointMappings + { + get + { + return this["MessageEndpointMappings"] as MessageEndpointMappingCollection; + } + set + { + this["MessageEndpointMappings"] = value; + } + } + } +} diff --git a/src/unicast/NServiceBus.Unicast.Queuing/IReceiveMessages.cs b/src/unicast/NServiceBus.Unicast.Queuing/IReceiveMessages.cs index 7272543a7a1..0dd9c5df55d 100644 --- a/src/unicast/NServiceBus.Unicast.Queuing/IReceiveMessages.cs +++ b/src/unicast/NServiceBus.Unicast.Queuing/IReceiveMessages.cs @@ -1,28 +1,28 @@ -using NServiceBus.Unicast.Transport; -namespace NServiceBus.Unicast.Queuing -{ - /// - /// Abstraction of a the capability to receive messages - /// - public interface IReceiveMessages - { - /// - /// Initializes the message receiver. - /// - /// The address of the message source - /// Indicates if the receiver should be transactional - void Init(string address, bool transactional); - - /// - /// Returns true if there's a message ready to be received at the address passed in the Init method. - /// - /// - bool HasMessage(); - - /// - /// Tries to receive a message from the address passed in Init. - /// - /// The first transport message available. If no message is present null will be returned - TransportMessage Receive(); - } -} +using NServiceBus.Unicast.Transport; +namespace NServiceBus.Unicast.Queuing +{ + /// + /// Abstraction of a the capability to receive messages + /// + public interface IReceiveMessages + { + /// + /// Initializes the message receiver. + /// + /// The address of the message source + /// Indicates if the receiver should be transactional + void Init(string address, bool transactional); + + /// + /// Returns true if there's a message ready to be received at the address passed in the Init method. + /// + /// + bool HasMessage(); + + /// + /// Tries to receive a message from the address passed in Init. + /// + /// The first transport message available. If no message is present null will be returned + TransportMessage Receive(); + } +} diff --git a/src/unicast/NServiceBus.Unicast.Queuing/ISendMessages.cs b/src/unicast/NServiceBus.Unicast.Queuing/ISendMessages.cs index c7863c20cae..3e1a2b78d5a 100644 --- a/src/unicast/NServiceBus.Unicast.Queuing/ISendMessages.cs +++ b/src/unicast/NServiceBus.Unicast.Queuing/ISendMessages.cs @@ -1,17 +1,17 @@ -using NServiceBus.Unicast.Transport; - -namespace NServiceBus.Unicast.Queuing -{ - /// - /// Abstraction of a the capability to send messages - /// - public interface ISendMessages - { - /// - /// Sends the given message to the destination. - /// - /// - /// - void Send(TransportMessage message, string destination); - } +using NServiceBus.Unicast.Transport; + +namespace NServiceBus.Unicast.Queuing +{ + /// + /// Abstraction of a the capability to send messages + /// + public interface ISendMessages + { + /// + /// Sends the given message to the destination. + /// + /// + /// + void Send(TransportMessage message, string destination); + } } \ No newline at end of file diff --git a/src/unicast/NServiceBus.Unicast.Queuing/NServiceBus.Unicast.Queuing.csproj b/src/unicast/NServiceBus.Unicast.Queuing/NServiceBus.Unicast.Queuing.csproj index c10c0e97ac6..741d6db36d1 100644 --- a/src/unicast/NServiceBus.Unicast.Queuing/NServiceBus.Unicast.Queuing.csproj +++ b/src/unicast/NServiceBus.Unicast.Queuing/NServiceBus.Unicast.Queuing.csproj @@ -1,70 +1,70 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {04E1CE2E-C0F5-492B-BF5B-C7E9DABE92F7} - Library - Properties - NServiceBus.Unicast.Queuing - NServiceBus.Unicast.Queuing - v4.0 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll - False - - - - 3.5 - - - 3.5 - - - 3.5 - - - - - - - CommonAssemblyInfo.cs - - - - - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {04E1CE2E-C0F5-492B-BF5B-C7E9DABE92F7} + Library + Properties + NServiceBus.Unicast.Queuing + NServiceBus.Unicast.Queuing + v4.0 + 512 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll + False + + + + 3.5 + + + 3.5 + + + 3.5 + + + + + + + CommonAssemblyInfo.cs + + + + + + + + \ No newline at end of file diff --git a/src/unicast/NServiceBus.Unicast.Queuing/Properties/AssemblyInfo.cs b/src/unicast/NServiceBus.Unicast.Queuing/Properties/AssemblyInfo.cs index 7d72e6ba92b..6de571cf115 100644 --- a/src/unicast/NServiceBus.Unicast.Queuing/Properties/AssemblyInfo.cs +++ b/src/unicast/NServiceBus.Unicast.Queuing/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Unicast Queuing Functionality")] -[assembly: AssemblyDescription("Unicast Queuing functionality for NServiceBus")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Unicast Queuing Functionality")] +[assembly: AssemblyDescription("Unicast Queuing functionality for NServiceBus")] diff --git a/src/unicast/NServiceBus.Unicast.Queuing/QueueNotFoundException.cs b/src/unicast/NServiceBus.Unicast.Queuing/QueueNotFoundException.cs index 347df01572a..e273f44f19a 100644 --- a/src/unicast/NServiceBus.Unicast.Queuing/QueueNotFoundException.cs +++ b/src/unicast/NServiceBus.Unicast.Queuing/QueueNotFoundException.cs @@ -1,31 +1,31 @@ -using System; - -namespace NServiceBus.Unicast.Queuing -{ - [Serializable] - public class QueueNotFoundException : Exception - { - public string Queue { get; set; } - - public QueueNotFoundException() - { - } - - protected QueueNotFoundException( - System.Runtime.Serialization.SerializationInfo info, - System.Runtime.Serialization.StreamingContext context) : base(info, context) - { - if (info != null) - Queue = info.GetString("Queue"); - } - - public override void GetObjectData( - System.Runtime.Serialization.SerializationInfo info, - System.Runtime.Serialization.StreamingContext context) - { - base.GetObjectData(info, context); - - info.AddValue("Queue", Queue); - } - } -} +using System; + +namespace NServiceBus.Unicast.Queuing +{ + [Serializable] + public class QueueNotFoundException : Exception + { + public string Queue { get; set; } + + public QueueNotFoundException() + { + } + + protected QueueNotFoundException( + System.Runtime.Serialization.SerializationInfo info, + System.Runtime.Serialization.StreamingContext context) : base(info, context) + { + if (info != null) + Queue = info.GetString("Queue"); + } + + public override void GetObjectData( + System.Runtime.Serialization.SerializationInfo info, + System.Runtime.Serialization.StreamingContext context) + { + base.GetObjectData(info, context); + + info.AddValue("Queue", Queue); + } + } +} diff --git a/src/unicast/NServiceBus.Unicast.Queuing/QueuedMessage.cs b/src/unicast/NServiceBus.Unicast.Queuing/QueuedMessage.cs index f1e4a003fce..ca87a8bb503 100644 --- a/src/unicast/NServiceBus.Unicast.Queuing/QueuedMessage.cs +++ b/src/unicast/NServiceBus.Unicast.Queuing/QueuedMessage.cs @@ -1,25 +1,25 @@ -using System; -using System.IO; - -namespace NServiceBus.Unicast.Queuing -{ - public class QueuedMessage - { - public string CorrelationId { get; set; } - public bool Recoverable { get; set; } - public string ResponseQueue { get; set; } - public string Label { get; set; } - public TimeSpan TimeToBeReceived { get; set; } - public DateTime TimeSent { get; set; } - public int AppSpecific { get; set; } - public long LookupId { get; set; } - - public Stream BodyStream { get; set; } - public byte[] Extension { get; set; } - - /// - /// Set by the transport - /// - public string Id { get; set;} - } -} +using System; +using System.IO; + +namespace NServiceBus.Unicast.Queuing +{ + public class QueuedMessage + { + public string CorrelationId { get; set; } + public bool Recoverable { get; set; } + public string ResponseQueue { get; set; } + public string Label { get; set; } + public TimeSpan TimeToBeReceived { get; set; } + public DateTime TimeSent { get; set; } + public int AppSpecific { get; set; } + public long LookupId { get; set; } + + public Stream BodyStream { get; set; } + public byte[] Extension { get; set; } + + /// + /// Set by the transport + /// + public string Id { get; set;} + } +} diff --git a/src/unicast/NServiceBus.Unicast.Subscriptions/ISubscriptionStorage.cs b/src/unicast/NServiceBus.Unicast.Subscriptions/ISubscriptionStorage.cs index 5cc8f02d781..d0e03592769 100644 --- a/src/unicast/NServiceBus.Unicast.Subscriptions/ISubscriptionStorage.cs +++ b/src/unicast/NServiceBus.Unicast.Subscriptions/ISubscriptionStorage.cs @@ -1,38 +1,38 @@ -using System.Collections.Generic; - -namespace NServiceBus.Unicast.Subscriptions -{ - /// - /// Defines storage for subscriptions - /// - public interface ISubscriptionStorage - { - /// - /// Subscribes the given client address to messages of the given types. - /// - /// - /// - void Subscribe(string client, IEnumerable messageTypes); - - /// - /// Unsubscribes the given client address from messages of the given types. - /// - /// - /// - void Unsubscribe(string client, IEnumerable messageTypes); - - /// - /// Returns a list of addresses of subscribers that previously requested to be notified - /// of messages of the given message types. - /// - /// - /// - IEnumerable GetSubscribersForMessage(IEnumerable messageTypes); - - /// - /// Notifies the subscription storage that now is the time to perform - /// any initialization work - /// - void Init(); - } -} +using System.Collections.Generic; + +namespace NServiceBus.Unicast.Subscriptions +{ + /// + /// Defines storage for subscriptions + /// + public interface ISubscriptionStorage + { + /// + /// Subscribes the given client address to messages of the given types. + /// + /// + /// + void Subscribe(string client, IEnumerable messageTypes); + + /// + /// Unsubscribes the given client address from messages of the given types. + /// + /// + /// + void Unsubscribe(string client, IEnumerable messageTypes); + + /// + /// Returns a list of addresses of subscribers that previously requested to be notified + /// of messages of the given message types. + /// + /// + /// + IEnumerable GetSubscribersForMessage(IEnumerable messageTypes); + + /// + /// Notifies the subscription storage that now is the time to perform + /// any initialization work + /// + void Init(); + } +} diff --git a/src/unicast/NServiceBus.Unicast.Subscriptions/NServiceBus.Unicast.Subscriptions.csproj b/src/unicast/NServiceBus.Unicast.Subscriptions/NServiceBus.Unicast.Subscriptions.csproj index 7253aa8a34c..07c77abdff9 100644 --- a/src/unicast/NServiceBus.Unicast.Subscriptions/NServiceBus.Unicast.Subscriptions.csproj +++ b/src/unicast/NServiceBus.Unicast.Subscriptions/NServiceBus.Unicast.Subscriptions.csproj @@ -1,103 +1,103 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {CD9FA43E-A56D-4B62-8245-F911B137EC09} - Library - Properties - NServiceBus.Unicast.Subscriptions - NServiceBus.Unicast.Subscriptions - - - - - - v4.0 - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.Unicast.Subscriptions.XML - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.Unicast.Subscriptions.XML - AllRules.ruleset - - - - False - ..\..\..\build\output\NServiceBus.dll - False - - - - 3.5 - - - - - CommonAssemblyInfo.cs - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\build\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {CD9FA43E-A56D-4B62-8245-F911B137EC09} + Library + Properties + NServiceBus.Unicast.Subscriptions + NServiceBus.Unicast.Subscriptions + + + + + + v4.0 + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.Unicast.Subscriptions.XML + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.Unicast.Subscriptions.XML + AllRules.ruleset + + + + False + ..\..\..\build\output\NServiceBus.dll + False + + + + 3.5 + + + + + CommonAssemblyInfo.cs + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\build\" + \ No newline at end of file diff --git a/src/unicast/NServiceBus.Unicast.Subscriptions/Properties/AssemblyInfo.cs b/src/unicast/NServiceBus.Unicast.Subscriptions/Properties/AssemblyInfo.cs index e0a52924510..da4e2616007 100644 --- a/src/unicast/NServiceBus.Unicast.Subscriptions/Properties/AssemblyInfo.cs +++ b/src/unicast/NServiceBus.Unicast.Subscriptions/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Unicast Subscription Interfaces")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Unicast Subscription Interfaces")] [assembly: AssemblyDescription("Interfaces for subscription storage for unicast communication in nServiceBus")] \ No newline at end of file diff --git a/src/unicast/NServiceBus.Unicast.Tests/NServiceBus.Unicast.Tests.csproj b/src/unicast/NServiceBus.Unicast.Tests/NServiceBus.Unicast.Tests.csproj index 1af153be1cc..c45dc9ecc4f 100644 --- a/src/unicast/NServiceBus.Unicast.Tests/NServiceBus.Unicast.Tests.csproj +++ b/src/unicast/NServiceBus.Unicast.Tests/NServiceBus.Unicast.Tests.csproj @@ -1,77 +1,77 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {E603F931-C7BA-4605-8AF6-11AD27EB9BE4} - Library - Properties - NServiceBus.Unicast.Tests - NServiceBus.Unicast.Tests - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\..\..\lib\Common.Logging.dll - - - ..\..\..\build\output\NServiceBus.dll - - - ..\..\..\build\nservicebus.core\NServiceBus.Unicast.Queuing.dll - - - ..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll - - - ..\..\..\tools\NUnit\nunit.framework.dll - - - ..\..\..\lib\Rhino.Mocks\Rhino.Mocks.dll - - - - - - - - CommonAssemblyInfo.cs - - - - - - - {EB2C42A2-70FD-4469-959B-C577470B001B} - NServiceBus.Unicast - - - - + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {E603F931-C7BA-4605-8AF6-11AD27EB9BE4} + Library + Properties + NServiceBus.Unicast.Tests + NServiceBus.Unicast.Tests + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\..\lib\Common.Logging.dll + + + ..\..\..\build\output\NServiceBus.dll + + + ..\..\..\build\nservicebus.core\NServiceBus.Unicast.Queuing.dll + + + ..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll + + + ..\..\..\tools\NUnit\nunit.framework.dll + + + ..\..\..\lib\Rhino.Mocks\Rhino.Mocks.dll + + + + + + + + CommonAssemblyInfo.cs + + + + + + + {EB2C42A2-70FD-4469-959B-C577470B001B} + NServiceBus.Unicast + + + + \ No newline at end of file diff --git a/src/unicast/NServiceBus.Unicast.Tests/Properties/AssemblyInfo.cs b/src/unicast/NServiceBus.Unicast.Tests/Properties/AssemblyInfo.cs index dbfdd2f35bf..5cf5259d381 100644 --- a/src/unicast/NServiceBus.Unicast.Tests/Properties/AssemblyInfo.cs +++ b/src/unicast/NServiceBus.Unicast.Tests/Properties/AssemblyInfo.cs @@ -1,2 +1,2 @@ -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus.Unicast.Tests")] +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus.Unicast.Tests")] diff --git a/src/unicast/NServiceBus.Unicast.Tests/When_the_bus_is_started_in_send_only_mode.cs b/src/unicast/NServiceBus.Unicast.Tests/When_the_bus_is_started_in_send_only_mode.cs index 1676b7db73e..b89c957b856 100644 --- a/src/unicast/NServiceBus.Unicast.Tests/When_the_bus_is_started_in_send_only_mode.cs +++ b/src/unicast/NServiceBus.Unicast.Tests/When_the_bus_is_started_in_send_only_mode.cs @@ -1,89 +1,89 @@ -using System; -using NServiceBus; -using NServiceBus.Serialization; -using NServiceBus.Unicast.Transport; -using NUnit.Framework; -using Rhino.Mocks; -using SomeUserNamespace; - -namespace NServiceBus.Unicast.Tests -{ - [TestFixture] - public class When_the_bus_is_started_in_send_only_mode - { - UnicastBus bus; - ITransport transport; - - [SetUp] - public void SetUp() - { - transport = MockRepository.GenerateStub(); - - bus = new UnicastBus - { - Transport = transport, - MessageSerializer = MockRepository.GenerateStub() - - }; - } - - - [Test] - public void The_transport_should_not_be_started() - { - StartBus(); - transport.AssertWasNotCalled(x => x.Start(Arg.Is.Anything)); - } - - [Test] - public void An_exception_should_be_thrown_if_userdefined_messagehandlers_are_found() - { - bus.MessageHandlerTypes = new[] { typeof(SomeBuiltInHandler), typeof(TestMessageHandler) }; - - Assert.Throws(StartBus); - } - - [Test] - public void Builtin_messagehandlers_should_be_allowed() - { - bus.MessageHandlerTypes = new[] { typeof(SomeBuiltInHandler) }; - - Assert.DoesNotThrow(StartBus); - } - - - - private void StartBus() - { - ((IStartableBus)bus).Start(); - - } - - } - - public class SomeBuiltInHandler:IHandleMessages - { - public void Handle(SomeBuiltinMessage message) - { - throw new NotImplementedException(); - } - } - - public class SomeBuiltinMessage : IMessage - { - } -} - -namespace SomeUserNamespace -{ - public class TestMessageHandler : IHandleMessages - { - public void Handle(TestMessage message) - { - throw new NotImplementedException(); - } - } - public class TestMessage : IMessage - { - } -} +using System; +using NServiceBus; +using NServiceBus.Serialization; +using NServiceBus.Unicast.Transport; +using NUnit.Framework; +using Rhino.Mocks; +using SomeUserNamespace; + +namespace NServiceBus.Unicast.Tests +{ + [TestFixture] + public class When_the_bus_is_started_in_send_only_mode + { + UnicastBus bus; + ITransport transport; + + [SetUp] + public void SetUp() + { + transport = MockRepository.GenerateStub(); + + bus = new UnicastBus + { + Transport = transport, + MessageSerializer = MockRepository.GenerateStub() + + }; + } + + + [Test] + public void The_transport_should_not_be_started() + { + StartBus(); + transport.AssertWasNotCalled(x => x.Start(Arg.Is.Anything)); + } + + [Test] + public void An_exception_should_be_thrown_if_userdefined_messagehandlers_are_found() + { + bus.MessageHandlerTypes = new[] { typeof(SomeBuiltInHandler), typeof(TestMessageHandler) }; + + Assert.Throws(StartBus); + } + + [Test] + public void Builtin_messagehandlers_should_be_allowed() + { + bus.MessageHandlerTypes = new[] { typeof(SomeBuiltInHandler) }; + + Assert.DoesNotThrow(StartBus); + } + + + + private void StartBus() + { + ((IStartableBus)bus).Start(); + + } + + } + + public class SomeBuiltInHandler:IHandleMessages + { + public void Handle(SomeBuiltinMessage message) + { + throw new NotImplementedException(); + } + } + + public class SomeBuiltinMessage : IMessage + { + } +} + +namespace SomeUserNamespace +{ + public class TestMessageHandler : IHandleMessages + { + public void Handle(TestMessage message) + { + throw new NotImplementedException(); + } + } + public class TestMessage : IMessage + { + } +} diff --git a/src/unicast/NServiceBus.Unicast/BusAsyncResult.cs b/src/unicast/NServiceBus.Unicast/BusAsyncResult.cs index 094bd831bda..9a21d3c1194 100644 --- a/src/unicast/NServiceBus.Unicast/BusAsyncResult.cs +++ b/src/unicast/NServiceBus.Unicast/BusAsyncResult.cs @@ -1,94 +1,94 @@ -using System; -using System.Threading; -using Common.Logging; - -namespace NServiceBus.Unicast -{ - /// - /// Implementation of IAsyncResult returned when registering a callback. - /// - public class BusAsyncResult : IAsyncResult - { - private readonly AsyncCallback callback; - private readonly CompletionResult result; - private volatile bool completed; - private readonly ManualResetEvent sync; - - /// - /// Creates a new object storing the given callback and state. - /// - /// - /// - public BusAsyncResult(AsyncCallback callback, object state) - { - this.callback = callback; - this.result = new CompletionResult(); - this.result.State = state; - this.sync = new ManualResetEvent(false); - } - - /// - /// Stores the given error code and messages, - /// releases any blocked threads, - /// and invokes the previously given callback. - /// - /// - /// - public void Complete(int errorCode, params IMessage[] messages) - { - this.result.ErrorCode = errorCode; - this.result.Messages = messages; - this.completed = true; - - if (this.callback != null) - try - { - this.callback(this); - } - catch (Exception e) - { - log.Error(this.callback, e); - } - - this.sync.Set(); - } - - private readonly static ILog log = LogManager.GetLogger(typeof(UnicastBus)); - - #region IAsyncResult Members - - /// - /// Returns a completion result containing the error code, messages, and state. - /// - public object AsyncState - { - get { return this.result; } - } - - /// - /// Returns a handle suitable for blocking threads. - /// - public WaitHandle AsyncWaitHandle - { - get { return this.sync; } - } - - /// - /// Returns false. - /// - public bool CompletedSynchronously - { - get { return false; } - } - - /// - /// Returns if the operation has completed. - /// - public bool IsCompleted - { - get { return this.completed; } - } - - #endregion - } -} +using System; +using System.Threading; +using Common.Logging; + +namespace NServiceBus.Unicast +{ + /// + /// Implementation of IAsyncResult returned when registering a callback. + /// + public class BusAsyncResult : IAsyncResult + { + private readonly AsyncCallback callback; + private readonly CompletionResult result; + private volatile bool completed; + private readonly ManualResetEvent sync; + + /// + /// Creates a new object storing the given callback and state. + /// + /// + /// + public BusAsyncResult(AsyncCallback callback, object state) + { + this.callback = callback; + this.result = new CompletionResult(); + this.result.State = state; + this.sync = new ManualResetEvent(false); + } + + /// + /// Stores the given error code and messages, + /// releases any blocked threads, + /// and invokes the previously given callback. + /// + /// + /// + public void Complete(int errorCode, params IMessage[] messages) + { + this.result.ErrorCode = errorCode; + this.result.Messages = messages; + this.completed = true; + + if (this.callback != null) + try + { + this.callback(this); + } + catch (Exception e) + { + log.Error(this.callback, e); + } + + this.sync.Set(); + } + + private readonly static ILog log = LogManager.GetLogger(typeof(UnicastBus)); + + #region IAsyncResult Members + + /// + /// Returns a completion result containing the error code, messages, and state. + /// + public object AsyncState + { + get { return this.result; } + } + + /// + /// Returns a handle suitable for blocking threads. + /// + public WaitHandle AsyncWaitHandle + { + get { return this.sync; } + } + + /// + /// Returns false. + /// + public bool CompletedSynchronously + { + get { return false; } + } + + /// + /// Returns if the operation has completed. + /// + public bool IsCompleted + { + get { return this.completed; } + } + + #endregion + } +} diff --git a/src/unicast/NServiceBus.Unicast/Callback.cs b/src/unicast/NServiceBus.Unicast/Callback.cs index 0f57854cd44..8b9122221d8 100644 --- a/src/unicast/NServiceBus.Unicast/Callback.cs +++ b/src/unicast/NServiceBus.Unicast/Callback.cs @@ -1,153 +1,153 @@ -using System; -using System.Threading; -using System.Web; -using System.Web.UI; -using System.Web.Mvc; - -namespace NServiceBus.Unicast -{ - /// - /// Implementation of the ICallback interface for the unicast bus/ - /// - public class Callback : ICallback - { - private readonly string messageId; - - /// - /// Creates a new instance of the callback object storing the given message id. - /// - /// - public Callback(string messageId) - { - this.messageId = messageId; - } - - /// - /// Event raised when the Register method is called. - /// - public event EventHandler Registered; - - /// - /// Returns the message id this object was constructed with. - /// - public string MessageId - { - get { return messageId; } - } - - #region ICallback Members - - IAsyncResult ICallback.Register(AsyncCallback callback, object state) - { - var result = new BusAsyncResult(callback, state); - - if (Registered != null) - Registered(this, new BusAsyncResultEventArgs { Result = result, MessageId = messageId }); - - return result; - } - - void ICallback.Register(Action callback) - { - var page = callback.Target as Page; - if (page != null) - { - (this as ICallback).Register(callback, page); - return; - } - - var controller = callback.Target as AsyncController; - if (controller != null) - { - (this as ICallback).Register(callback, controller); - return; - } - - var context = SynchronizationContext.Current; - if (context != null) - { - (this as ICallback).Register(callback, context); - return; - } - } - - void ICallback.Register(Action callback, object synchronizer) - { - if (!typeof(T).IsEnum && typeof(T) != typeof(int)) - throw new InvalidOperationException("Can only support registering callbacks for integer or enum types. The given type is: " + typeof(T).FullName); - - if (HttpContext.Current != null && synchronizer == null) - throw new ArgumentNullException("synchronizer", "NServiceBus has detected that you're running in a web context but have passed in a null synchronizer. Please pass in a reference to a System.Web.UI.Page or a System.Web.Mvc.AsyncController."); - - if (synchronizer == null) - { - (this as ICallback).Register(GetCallbackInvocationActionFrom(callback), null); - return; - } - - if (synchronizer is Page) - { - (synchronizer as Page).RegisterAsyncTask(new PageAsyncTask( - (sender, e, cb, extraData) => (this as ICallback).Register(cb, extraData), - new EndEventHandler(GetCallbackInvocationActionFrom(callback)), - null, - null - )); - return; - } - - if (synchronizer is AsyncController) - { - var am = (synchronizer as AsyncController).AsyncManager; - am.OutstandingOperations.Increment(); - - (this as ICallback).Register(GetCallbackInvocationActionFrom(callback), null); - - am.OutstandingOperations.Decrement(); - return; - } - - if (synchronizer is SynchronizationContext) - { - (this as ICallback).Register( - ar => (synchronizer as SynchronizationContext).Send( - x => GetCallbackInvocationActionFrom(callback).Invoke(ar), null), - null - ); - return; - } - } - - #endregion - - private static AsyncCallback GetCallbackInvocationActionFrom(Action callback) - { - return asyncResult => - { - var cr = asyncResult.AsyncState as CompletionResult; - if (cr == null) return; - - if (typeof (T) == typeof (int)) - (callback as Action).Invoke(cr.ErrorCode); - else - callback((T) Enum.ToObject(typeof (T), cr.ErrorCode)); - }; - } - } - - /// - /// Argument passed in the Registered event of the Callback object. - /// - public class BusAsyncResultEventArgs : EventArgs - { - /// - /// Gets/sets the IAsyncResult. - /// - public BusAsyncResult Result { get; set; } - - /// - /// Gets/sets the message id. - /// - public string MessageId { get; set; } - } -} +using System; +using System.Threading; +using System.Web; +using System.Web.UI; +using System.Web.Mvc; + +namespace NServiceBus.Unicast +{ + /// + /// Implementation of the ICallback interface for the unicast bus/ + /// + public class Callback : ICallback + { + private readonly string messageId; + + /// + /// Creates a new instance of the callback object storing the given message id. + /// + /// + public Callback(string messageId) + { + this.messageId = messageId; + } + + /// + /// Event raised when the Register method is called. + /// + public event EventHandler Registered; + + /// + /// Returns the message id this object was constructed with. + /// + public string MessageId + { + get { return messageId; } + } + + #region ICallback Members + + IAsyncResult ICallback.Register(AsyncCallback callback, object state) + { + var result = new BusAsyncResult(callback, state); + + if (Registered != null) + Registered(this, new BusAsyncResultEventArgs { Result = result, MessageId = messageId }); + + return result; + } + + void ICallback.Register(Action callback) + { + var page = callback.Target as Page; + if (page != null) + { + (this as ICallback).Register(callback, page); + return; + } + + var controller = callback.Target as AsyncController; + if (controller != null) + { + (this as ICallback).Register(callback, controller); + return; + } + + var context = SynchronizationContext.Current; + if (context != null) + { + (this as ICallback).Register(callback, context); + return; + } + } + + void ICallback.Register(Action callback, object synchronizer) + { + if (!typeof(T).IsEnum && typeof(T) != typeof(int)) + throw new InvalidOperationException("Can only support registering callbacks for integer or enum types. The given type is: " + typeof(T).FullName); + + if (HttpContext.Current != null && synchronizer == null) + throw new ArgumentNullException("synchronizer", "NServiceBus has detected that you're running in a web context but have passed in a null synchronizer. Please pass in a reference to a System.Web.UI.Page or a System.Web.Mvc.AsyncController."); + + if (synchronizer == null) + { + (this as ICallback).Register(GetCallbackInvocationActionFrom(callback), null); + return; + } + + if (synchronizer is Page) + { + (synchronizer as Page).RegisterAsyncTask(new PageAsyncTask( + (sender, e, cb, extraData) => (this as ICallback).Register(cb, extraData), + new EndEventHandler(GetCallbackInvocationActionFrom(callback)), + null, + null + )); + return; + } + + if (synchronizer is AsyncController) + { + var am = (synchronizer as AsyncController).AsyncManager; + am.OutstandingOperations.Increment(); + + (this as ICallback).Register(GetCallbackInvocationActionFrom(callback), null); + + am.OutstandingOperations.Decrement(); + return; + } + + if (synchronizer is SynchronizationContext) + { + (this as ICallback).Register( + ar => (synchronizer as SynchronizationContext).Send( + x => GetCallbackInvocationActionFrom(callback).Invoke(ar), null), + null + ); + return; + } + } + + #endregion + + private static AsyncCallback GetCallbackInvocationActionFrom(Action callback) + { + return asyncResult => + { + var cr = asyncResult.AsyncState as CompletionResult; + if (cr == null) return; + + if (typeof (T) == typeof (int)) + (callback as Action).Invoke(cr.ErrorCode); + else + callback((T) Enum.ToObject(typeof (T), cr.ErrorCode)); + }; + } + } + + /// + /// Argument passed in the Registered event of the Callback object. + /// + public class BusAsyncResultEventArgs : EventArgs + { + /// + /// Gets/sets the IAsyncResult. + /// + public BusAsyncResult Result { get; set; } + + /// + /// Gets/sets the message id. + /// + public string MessageId { get; set; } + } +} diff --git a/src/unicast/NServiceBus.Unicast/IUnicastBus.cs b/src/unicast/NServiceBus.Unicast/IUnicastBus.cs index ca25bcc4f9e..b36d694dc9c 100644 --- a/src/unicast/NServiceBus.Unicast/IUnicastBus.cs +++ b/src/unicast/NServiceBus.Unicast/IUnicastBus.cs @@ -1,26 +1,26 @@ -using System; - -namespace NServiceBus.Unicast -{ - /// - /// Extension of the IBus interface for working with a distributor. - /// - public interface IUnicastBus : IBus - { - /// - /// Event raised by the Publish method when no subscribers are - /// registered for the message being published. - /// - event EventHandler NoSubscribersForMessage; - - /// - /// Event raised when a client has been subscribed to a message type. - /// - event EventHandler ClientSubscribed; - - /// - /// Event raised when the bus sends multiple messages across the wire. - /// - event EventHandler MessagesSent; - } +using System; + +namespace NServiceBus.Unicast +{ + /// + /// Extension of the IBus interface for working with a distributor. + /// + public interface IUnicastBus : IBus + { + /// + /// Event raised by the Publish method when no subscribers are + /// registered for the message being published. + /// + event EventHandler NoSubscribersForMessage; + + /// + /// Event raised when a client has been subscribed to a message type. + /// + event EventHandler ClientSubscribed; + + /// + /// Event raised when the bus sends multiple messages across the wire. + /// + event EventHandler MessagesSent; + } } \ No newline at end of file diff --git a/src/unicast/NServiceBus.Unicast/MessageContext.cs b/src/unicast/NServiceBus.Unicast/MessageContext.cs index 3b8ec11564c..3e1a2db1e29 100644 --- a/src/unicast/NServiceBus.Unicast/MessageContext.cs +++ b/src/unicast/NServiceBus.Unicast/MessageContext.cs @@ -1,43 +1,43 @@ -using System; -using System.Collections.Generic; -using NServiceBus.Unicast.Transport; - -namespace NServiceBus.Unicast -{ - /// - /// Implementation of IMessageContext - /// - public class MessageContext : IMessageContext - { - private TransportMessage transportMessage; - - /// - /// Initializes message context from the transport message. - /// - /// - public MessageContext(TransportMessage transportMessage) - { - this.transportMessage = transportMessage; - } - - IDictionary IMessageContext.Headers - { - get { return transportMessage.Headers; } - } - - string IMessageContext.Id - { - get { return transportMessage.IdForCorrelation; } - } - - string IMessageContext.ReturnAddress - { - get { return transportMessage.ReturnAddress; } - } - - DateTime IMessageContext.TimeSent - { - get { return transportMessage.TimeSent; } - } - } -} +using System; +using System.Collections.Generic; +using NServiceBus.Unicast.Transport; + +namespace NServiceBus.Unicast +{ + /// + /// Implementation of IMessageContext + /// + public class MessageContext : IMessageContext + { + private TransportMessage transportMessage; + + /// + /// Initializes message context from the transport message. + /// + /// + public MessageContext(TransportMessage transportMessage) + { + this.transportMessage = transportMessage; + } + + IDictionary IMessageContext.Headers + { + get { return transportMessage.Headers; } + } + + string IMessageContext.Id + { + get { return transportMessage.IdForCorrelation; } + } + + string IMessageContext.ReturnAddress + { + get { return transportMessage.ReturnAddress; } + } + + DateTime IMessageContext.TimeSent + { + get { return transportMessage.TimeSent; } + } + } +} diff --git a/src/unicast/NServiceBus.Unicast/MessageEventArgs.cs b/src/unicast/NServiceBus.Unicast/MessageEventArgs.cs index abc58d84e49..6e4d4f74f5b 100644 --- a/src/unicast/NServiceBus.Unicast/MessageEventArgs.cs +++ b/src/unicast/NServiceBus.Unicast/MessageEventArgs.cs @@ -1,44 +1,44 @@ -using System; - -namespace NServiceBus.Unicast -{ - /// - /// Data containing a message for raising in events. - /// - public class MessageEventArgs : EventArgs - { - /// - /// Instantiates a new object containing the given message. - /// - /// - public MessageEventArgs(IMessage msg) - { - Message = msg; - } - - /// - /// The message. - /// - public IMessage Message { get; private set; } - } - - /// - /// Data containing multiple messages for raising in events. - /// - public class MessagesEventArgs : EventArgs - { - /// - /// Instantiate an event arg referencing multiple messages. - /// - /// - public MessagesEventArgs(IMessage[] messages) - { - Messages = messages; - } - - /// - /// The messages that were sent. - /// - public IMessage[] Messages { get; private set; } - } -} +using System; + +namespace NServiceBus.Unicast +{ + /// + /// Data containing a message for raising in events. + /// + public class MessageEventArgs : EventArgs + { + /// + /// Instantiates a new object containing the given message. + /// + /// + public MessageEventArgs(IMessage msg) + { + Message = msg; + } + + /// + /// The message. + /// + public IMessage Message { get; private set; } + } + + /// + /// Data containing multiple messages for raising in events. + /// + public class MessagesEventArgs : EventArgs + { + /// + /// Instantiate an event arg referencing multiple messages. + /// + /// + public MessagesEventArgs(IMessage[] messages) + { + Messages = messages; + } + + /// + /// The messages that were sent. + /// + public IMessage[] Messages { get; private set; } + } +} diff --git a/src/unicast/NServiceBus.Unicast/NServiceBus.Unicast.csproj b/src/unicast/NServiceBus.Unicast/NServiceBus.Unicast.csproj index 02db7f67751..fccc3db9472 100644 --- a/src/unicast/NServiceBus.Unicast/NServiceBus.Unicast.csproj +++ b/src/unicast/NServiceBus.Unicast/NServiceBus.Unicast.csproj @@ -1,158 +1,158 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {EB2C42A2-70FD-4469-959B-C577470B001B} - Library - Properties - NServiceBus.Unicast - NServiceBus.Unicast - - - - - - v4.0 - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.Unicast.XML - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.Unicast.XML - AllRules.ruleset - - - - False - ..\..\..\lib\Common.Logging.dll - False - - - False - ..\..\..\build\output\NServiceBus.dll - - - False - ..\..\..\build\nservicebus.core\NServiceBus.Faults.dll - False - - - False - ..\..\..\build\nservicebus.core\NServiceBus.MessageInterfaces.dll - - - ..\..\..\build\nservicebus.core\NServiceBus.MessageMutator.dll - - - False - ..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll - - - False - ..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll - False - - - False - ..\..\..\build\nservicebus.core\NServiceBus.UnitOfWork.dll - False - - - - 3.5 - - - - - False - ..\..\..\lib\System.Web.Mvc.dll - - - - - - CommonAssemblyInfo.cs - - - - - - - - - - - - - - {04E1CE2E-C0F5-492B-BF5B-C7E9DABE92F7} - NServiceBus.Unicast.Queuing - False - - - {CD9FA43E-A56D-4B62-8245-F911B137EC09} - NServiceBus.Unicast.Subscriptions - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\build\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {EB2C42A2-70FD-4469-959B-C577470B001B} + Library + Properties + NServiceBus.Unicast + NServiceBus.Unicast + + + + + + v4.0 + + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.Unicast.XML + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.Unicast.XML + AllRules.ruleset + + + + False + ..\..\..\lib\Common.Logging.dll + False + + + False + ..\..\..\build\output\NServiceBus.dll + + + False + ..\..\..\build\nservicebus.core\NServiceBus.Faults.dll + False + + + False + ..\..\..\build\nservicebus.core\NServiceBus.MessageInterfaces.dll + + + ..\..\..\build\nservicebus.core\NServiceBus.MessageMutator.dll + + + False + ..\..\..\build\nservicebus.core\NServiceBus.ObjectBuilder.dll + + + False + ..\..\..\build\nservicebus.core\NServiceBus.Unicast.Transport.dll + False + + + False + ..\..\..\build\nservicebus.core\NServiceBus.UnitOfWork.dll + False + + + + 3.5 + + + + + False + ..\..\..\lib\System.Web.Mvc.dll + + + + + + CommonAssemblyInfo.cs + + + + + + + + + + + + + + {04E1CE2E-C0F5-492B-BF5B-C7E9DABE92F7} + NServiceBus.Unicast.Queuing + False + + + {CD9FA43E-A56D-4B62-8245-F911B137EC09} + NServiceBus.Unicast.Subscriptions + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\build\" + \ No newline at end of file diff --git a/src/unicast/NServiceBus.Unicast/Properties/AssemblyInfo.cs b/src/unicast/NServiceBus.Unicast/Properties/AssemblyInfo.cs index f8ee5e4c653..ca7ab7c7fe5 100644 --- a/src/unicast/NServiceBus.Unicast/Properties/AssemblyInfo.cs +++ b/src/unicast/NServiceBus.Unicast/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Unicast Bus Functionality")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Unicast Bus Functionality")] [assembly: AssemblyDescription("Unicast bus communication functionality for nServiceBus")] \ No newline at end of file diff --git a/src/unicast/NServiceBus.Unicast/SubscriptionEventArgs.cs b/src/unicast/NServiceBus.Unicast/SubscriptionEventArgs.cs index 43835abf909..be328fb605e 100644 --- a/src/unicast/NServiceBus.Unicast/SubscriptionEventArgs.cs +++ b/src/unicast/NServiceBus.Unicast/SubscriptionEventArgs.cs @@ -1,20 +1,20 @@ -using System; - -namespace NServiceBus.Unicast -{ - /// - /// Contains which client subscribed to which message - /// - public class SubscriptionEventArgs : EventArgs - { - /// - /// The address of the subscriber. - /// - public string SubscriberAddress { get; set; } - - /// - /// The type of message the client subscribed to. - /// - public string MessageType { get; set; } - } -} +using System; + +namespace NServiceBus.Unicast +{ + /// + /// Contains which client subscribed to which message + /// + public class SubscriptionEventArgs : EventArgs + { + /// + /// The address of the subscriber. + /// + public string SubscriberAddress { get; set; } + + /// + /// The type of message the client subscribed to. + /// + public string MessageType { get; set; } + } +} diff --git a/src/unicast/NServiceBus.Unicast/SubscriptionsManager.cs b/src/unicast/NServiceBus.Unicast/SubscriptionsManager.cs index 6e4c9e795b9..cde4bf29a8d 100644 --- a/src/unicast/NServiceBus.Unicast/SubscriptionsManager.cs +++ b/src/unicast/NServiceBus.Unicast/SubscriptionsManager.cs @@ -1,59 +1,59 @@ -using System; -using System.Collections.Generic; - -namespace NServiceBus.Unicast -{ - /// - /// Manages subscriptions and predicates for messages published by other endpoints - /// and subscribed to by the local bus. - /// - /// - /// Thread safe. - /// - public class SubscriptionsManager - { - /// - /// Gets the list of conditions associated with a message. - /// - /// The message to get conditions for. - /// A list of conditions that are associated with type of message provided. - public IList> GetConditionsForMessage(IMessage message) - { - IList> result = new List>(); - - lock (this.locker) - if (this.messageTypeToConditionLookup.ContainsKey(message.GetType())) - foreach (Predicate condition in this.messageTypeToConditionLookup[message.GetType()]) - result.Add(condition); - - return result; - } - - /// - /// Adds a condition to a message type. - /// - /// The message type to add a condition to. - /// The condition to add. - /// - /// All conditions added to a message type must be met if the messages of that type - /// are to be published to a subscriber. - public void AddConditionForSubscriptionToMessageType(Type messageType, Predicate condition) - { - if (condition == null) - return; - - lock (this.locker) - { - if (!this.messageTypeToConditionLookup.ContainsKey(messageType)) - this.messageTypeToConditionLookup.Add(messageType, new List>()); - - if (!this.messageTypeToConditionLookup[messageType].Contains(condition)) - this.messageTypeToConditionLookup[messageType].Add(condition); - } - } - - private readonly IDictionary>> messageTypeToConditionLookup = new Dictionary>>(); - - private readonly object locker = new object(); - } -} +using System; +using System.Collections.Generic; + +namespace NServiceBus.Unicast +{ + /// + /// Manages subscriptions and predicates for messages published by other endpoints + /// and subscribed to by the local bus. + /// + /// + /// Thread safe. + /// + public class SubscriptionsManager + { + /// + /// Gets the list of conditions associated with a message. + /// + /// The message to get conditions for. + /// A list of conditions that are associated with type of message provided. + public IList> GetConditionsForMessage(IMessage message) + { + IList> result = new List>(); + + lock (this.locker) + if (this.messageTypeToConditionLookup.ContainsKey(message.GetType())) + foreach (Predicate condition in this.messageTypeToConditionLookup[message.GetType()]) + result.Add(condition); + + return result; + } + + /// + /// Adds a condition to a message type. + /// + /// The message type to add a condition to. + /// The condition to add. + /// + /// All conditions added to a message type must be met if the messages of that type + /// are to be published to a subscriber. + public void AddConditionForSubscriptionToMessageType(Type messageType, Predicate condition) + { + if (condition == null) + return; + + lock (this.locker) + { + if (!this.messageTypeToConditionLookup.ContainsKey(messageType)) + this.messageTypeToConditionLookup.Add(messageType, new List>()); + + if (!this.messageTypeToConditionLookup[messageType].Contains(condition)) + this.messageTypeToConditionLookup[messageType].Add(condition); + } + } + + private readonly IDictionary>> messageTypeToConditionLookup = new Dictionary>>(); + + private readonly object locker = new object(); + } +} diff --git a/src/unicast/NServiceBus.Unicast/UnicastBus.cs b/src/unicast/NServiceBus.Unicast/UnicastBus.cs index d1b823121e0..ad4923c947a 100644 --- a/src/unicast/NServiceBus.Unicast/UnicastBus.cs +++ b/src/unicast/NServiceBus.Unicast/UnicastBus.cs @@ -1,1559 +1,1559 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Reflection; -using System.Security.Principal; -using System.Threading; -using Common.Logging; -using NServiceBus.MessageMutator; -using NServiceBus.Unicast.Queuing; -using NServiceBus.Unicast.Subscriptions; -using NServiceBus.Unicast.Transport; -using NServiceBus.ObjectBuilder; -using NServiceBus.MessageInterfaces; -using NServiceBus.Saga; -using System.Text; -using System.Linq; -using NServiceBus.Serialization; -using System.IO; -using NServiceBus.Faults; -using System.Net; -using NServiceBus.UnitOfWork; - -namespace NServiceBus.Unicast -{ - /// - /// A unicast implementation of for NServiceBus. - /// - public class UnicastBus : IUnicastBus, IStartableBus - { - /// - /// Header entry key for the given message type that is being subscribed to, when message intent is subscribe or unsubscribe. - /// - public const string SubscriptionMessageType = "SubscriptionMessageType"; - - /// - /// Header entry key indicating the types of messages contained. - /// - public const string EnclosedMessageTypes = "EnclosedMessageTypes"; - - #region config properties - - private bool autoSubscribe = true; - - /// - /// When set, when starting up, the bus performs - /// a subscribe operation for message types for which it has - /// handlers and that are owned by a different endpoint. - /// Default is true. - /// - public bool AutoSubscribe - { - get { return autoSubscribe; } - set { autoSubscribe = value; } - } - - private bool disableMessageHandling; - - /// - /// Should be used by programmer, not administrator. - /// Disables the handling of incoming messages. - /// - public virtual bool DisableMessageHandling - { - set { disableMessageHandling = value; } - } - - /// - /// The address that the bus will listen to for messages. - /// - public string Address { get; set; } - - /// - /// A reference to the transport. - /// - protected ITransport transport; - - /// - /// Should be used by programmer, not administrator. - /// Sets an implementation to use as the - /// listening endpoint for the bus. - /// - public virtual ITransport Transport - { - set - { - transport = value; - - transport.StartedMessageProcessing += TransportStartedMessageProcessing; - transport.TransportMessageReceived += TransportMessageReceived; - transport.FinishedMessageProcessing += TransportFinishedMessageProcessing; - transport.FailedMessageProcessing += TransportFailedMessageProcessing; - } - } - - /// - /// Message queue used to send messages. - /// - public ISendMessages MessageSender { get; set; } - - /// - /// Object used to manage units of work. - /// - public IManageUnitsOfWork UnitOfWorkManager { get; set; } - - /// - /// A delegate for a method that will handle the - /// event. - /// - /// The message received. - public delegate void MessageReceivedDelegate(TransportMessage message); - - /// - /// Event raised when a message is received. - /// - public event MessageReceivedDelegate MessageReceived; - - /// - /// Event raised when messages are sent. - /// - public event EventHandler MessagesSent; - - /// - /// Should be used by programmer, not administrator. - /// Gets and sets an implementation to - /// be used for subscription storage for the bus. - /// - public virtual ISubscriptionStorage SubscriptionStorage { get; set; } - - /// - /// Should be used by the programmer, not the administrator. - /// Gets and sets an implementation to - /// be used for subscription storage for the bus. - /// - public virtual IMessageSerializer MessageSerializer { get; set; } - - /// - /// Should be used by programmer, not administrator. - /// Sets implementation that will be used to - /// dynamically instantiate and execute message handlers. - /// - public IBuilder Builder { get; set; } - - private IMessageMapper messageMapper; - - /// - /// Gets/sets the message mapper. - /// - public virtual IMessageMapper MessageMapper - { - get { return messageMapper; } - set - { - messageMapper = value; - - ExtensionMethods.MessageCreator = value; - ExtensionMethods.Bus = this; - } - } - - /// - /// Should be used by programmer, not administrator. - /// Sets whether or not the return address of a received message - /// should be propogated when the message is forwarded. This field is - /// used primarily for the Distributor. - /// - public bool PropogateReturnAddressOnSend { get; set; } - - - /// - /// Should be used by administrator, not programmer. - /// Sets the address to which all messages received on this bus will be - /// forwarded to (not including subscription messages). - /// This is primarily useful for smart client scenarios - /// where both client and server software are installed on the mobile - /// device. The server software will have this field set to the address - /// of the real server. - /// - public string ForwardReceivedMessagesTo { get; set; } - - /// - /// Should be used by administrator, not programmer. - /// Sets the message types associated with the bus. - /// - /// - /// This property accepts a dictionary where the key can be the name of a type implementing - /// or the name of an assembly that contains message types. The value - /// of each entry is the address of the owner of the message type defined in the key. - /// If an assembly is specified then all the the types in the assembly implementing - /// will be registered against the address defined in the value of the entry. - /// - public IDictionary MessageOwners - { - get { return messageOwners; } - set - { - messageOwners = value; - ConfigureMessageOwners(value); - } - } - private IDictionary messageOwners; - - /// - /// Sets the list of assemblies which contain a message handlers - /// for the bus. - /// - public virtual IList MessageHandlerAssemblies - { - set - { - var types = new List(); - foreach (Assembly a in value) - types.AddRange(a.GetTypes()); - - MessageHandlerTypes = types; - } - } - - /// - /// Sets the types that will be scanned for message handlers. - /// Those found will be invoked in the same order as given. - /// - public IEnumerable MessageHandlerTypes - { - get { return messageHandlerTypes; } - set - { - messageHandlerTypes = value; - - foreach (Type t in value) - IfTypeIsMessageHandlerThenLoad(t); - } - } - private IEnumerable messageHandlerTypes; - - /// - /// Object that will be used to authorize subscription requests. - /// - public IAuthorizeSubscriptions SubscriptionAuthorizer { get; set; } - - /// - /// Object that will be used to manage failures. - /// - public IManageMessageFailures FailureManager { get; set; } - - #endregion - - #region IUnicastBus Members - - /// - /// Event raised when no subscribers found for the published message. - /// - public event EventHandler NoSubscribersForMessage; - - /// - /// Event raised when client subscribed to a message type. - /// - public event EventHandler ClientSubscribed; - - #endregion - - #region IBus Members - - /// - /// Creates an instance of the specified type. - /// Used primarily for instantiating interface-based messages. - /// - /// The type to instantiate. - /// An instance of the specified type. - public T CreateInstance() where T : IMessage - { - return messageMapper.CreateInstance(); - } - - /// - /// Creates an instance of the specified type. - /// Used primarily for instantiating interface-based messages. - /// - /// The type to instantiate. - /// An action to perform on the result - /// - public T CreateInstance(Action action) where T : IMessage - { - return messageMapper.CreateInstance(action); - } - - /// - /// Creates an instance of the specified type. - /// Used primarily for instantiating interface-based messages. - /// - /// The type to instantiate. - /// An instance of the specified type. - public object CreateInstance(Type messageType) - { - return messageMapper.CreateInstance(messageType); - } - - /// - /// Creates an instance of the requested message type (T), - /// performing the given action on the created message, - /// and then publishing it. - /// - /// - /// - public void Publish(Action messageConstructor) where T : IMessage - { - Publish(CreateInstance(messageConstructor)); - } - - /// - /// Publishes the messages to all subscribers of the first message's type. - /// - /// - public virtual void Publish(params T[] messages) where T : IMessage - { - if (SubscriptionStorage == null) - throw new InvalidOperationException("Cannot publish on this endpoint - no subscription storage has been configured. Add either 'MsmqSubscriptionStorage()' or 'DbSubscriptionStorage()' after 'NServiceBus.Configure.With()'."); - - var subscribers = SubscriptionStorage.GetSubscribersForMessage(GetFullTypes(messages as IMessage[])); - - if (subscribers.Count() == 0) - if (NoSubscribersForMessage != null) - NoSubscribersForMessage(this, new MessageEventArgs(messages[0])); - - SendMessage(subscribers, null, MessageIntentEnum.Publish, messages as IMessage[]); - } - - /// - /// Subscribes to the given type - T. - /// - /// - public void Subscribe() where T : IMessage - { - Subscribe(typeof(T)); - } - - /// - /// Subcribes to recieve published messages of the specified type. - /// - /// The type of message to subscribe to. - public virtual void Subscribe(Type messageType) - { - Subscribe(messageType, null); - } - - /// - /// Subscribes to the given type T, registering a condition that all received - /// messages of that type should comply with, otherwise discarding them. - /// - /// - /// - public void Subscribe(Predicate condition) where T : IMessage - { - var p = new Predicate(m => - { - if (m is T) - return condition((T)m); - - return true; - } - ); - - Subscribe(typeof(T), p); - } - - /// - /// Subscribes to receive published messages of the specified type if - /// they meet the provided condition. - /// - /// The type of message to subscribe to. - /// The condition under which to receive the message. - public virtual void Subscribe(Type messageType, Predicate condition) - { - AssertBusIsStarted(); - - subscriptionsManager.AddConditionForSubscriptionToMessageType(messageType, condition); - - var destination = GetDestinationForMessageType(messageType); - - if (destination == null) - throw new InvalidOperationException(string.Format("No destination could be found for message type {0}. Check the section of the configuration of this endpoint for an entry either for this specific message type or for its assembly.", messageType)); - - Log.Info("Subscribing to " + messageType.AssemblyQualifiedName + " at publisher queue " + destination); - - ((IBus)this).OutgoingHeaders[SubscriptionMessageType] = messageType.AssemblyQualifiedName; - SendMessage(destination, null, MessageIntentEnum.Subscribe, new CompletionMessage()); - ((IBus)this).OutgoingHeaders.Remove(SubscriptionMessageType); - } - - /// - /// Unsubscribes from the given type of message - T. - /// - /// - public void Unsubscribe() where T : IMessage - { - Unsubscribe(typeof(T)); - } - - /// - /// Unsubscribes from receiving published messages of the specified type. - /// - /// - public virtual void Unsubscribe(Type messageType) - { - var destination = GetDestinationForMessageType(messageType); - - if (destination == null) - throw new InvalidOperationException(string.Format("No destination could be found for message type {0}. Check the section of the configuration of this endpoint for an entry either for this specific message type or for its assembly.", messageType)); - - Log.Info("Unsubscribing from " + messageType.AssemblyQualifiedName + " at publisher queue " + destination); - - ((IBus)this).OutgoingHeaders[SubscriptionMessageType] = messageType.AssemblyQualifiedName; - SendMessage(destination, null, MessageIntentEnum.Unsubscribe, new CompletionMessage()); - ((IBus)this).OutgoingHeaders.Remove(SubscriptionMessageType); - } - - void IBus.Reply(params IMessage[] messages) - { - SendMessage(_messageBeingHandled.ReturnAddress, _messageBeingHandled.IdForCorrelation, MessageIntentEnum.Send, messages); - } - - void IBus.Reply(Action messageConstructor) - { - ((IBus)this).Reply(CreateInstance(messageConstructor)); - } - - void IBus.Return(T errorCode) - { - ((IBus)this).Reply(new CompletionMessage { ErrorCode = errorCode.GetHashCode() }); - } - - void IBus.HandleCurrentMessageLater() - { - if (_handleCurrentMessageLaterWasCalled) - return; - - MessageSender.Send(_messageBeingHandled, Address); - - _handleCurrentMessageLaterWasCalled = true; - } - - void IBus.ForwardCurrentMessageTo(string destination) - { - MessageSender.Send(_messageBeingHandled, destination); - } - - /// - /// ThreadStatic variable indicating if the current message was already - /// marked to be handled later so we don't do this more than once. - /// - [ThreadStatic] - private static bool _handleCurrentMessageLaterWasCalled; - - void IBus.SendLocal(Action messageConstructor) - { - SendLocal(CreateInstance(messageConstructor)); - } - - /// - /// Sends the list of messages back to the current bus. - /// - /// The messages to send. - public void SendLocal(params IMessage[] messages) - { - if(string.IsNullOrEmpty(Address)) - throw new InvalidOperationException("Can't sent local without a input queue configured"); - - var m = GetTransportMessageFor(messages); - - m.MessageIntent = MessageIntentEnum.Send; - - MessageSender.Send(m, Address); - } - - ICallback IBus.Send(Action messageConstructor) - { - return ((IBus)this).Send(CreateInstance(messageConstructor)); - } - - ICallback IBus.Send(params IMessage[] messages) - { - var destination = GetDestinationForMessages(messages); - - return SendMessage(destination, null, MessageIntentEnum.Send, messages); - } - - ICallback IBus.Send(string destination, Action messageConstructor) - { - return SendMessage(destination, null, MessageIntentEnum.Send, CreateInstance(messageConstructor)); - } - - ICallback IBus.Send(string destination, params IMessage[] messages) - { - return SendMessage(destination, null, MessageIntentEnum.Send, messages); - } - - void IBus.Send(string destination, string correlationId, Action messageConstructor) - { - SendMessage(destination, correlationId, MessageIntentEnum.Send, CreateInstance(messageConstructor)); - } - - void IBus.Send(string destination, string correlationId, params IMessage[] messages) - { - SendMessage(destination, correlationId, MessageIntentEnum.Send, messages); - } - - - private ICallback SendMessage(string destination, string correlationId, MessageIntentEnum messageIntent, params IMessage[] messages) - { - if (destination == null) - { - var tm = messages[0] as TimeoutMessage; - if (tm != null) - if (tm.ClearTimeout) - return null; - } - - if (destination == null) - throw new InvalidOperationException( - string.Format("No destination specified for message {0}. Message cannot be sent. Check the UnicastBusConfig section in your config file and ensure that a MessageEndpointMapping exists for the message type.", messages[0].GetType().FullName)); - - if (messages == null || messages.Length == 0) - throw new InvalidOperationException("Cannot send an empty set of messages."); - - foreach (var id in SendMessage(new List { destination }, correlationId, messageIntent, messages)) - { - var result = new Callback(id); - result.Registered += delegate(object sender, BusAsyncResultEventArgs args) - { - lock (messageIdToAsyncResultLookup) - messageIdToAsyncResultLookup[args.MessageId] = args.Result; - }; - - return result; - } - - return null; - } - - private ICollection SendMessage(IEnumerable destinations, string correlationId, MessageIntentEnum messageIntent, params IMessage[] messages) - { - AssertBusIsStarted(); - - var result = new List(); - - messages[0].SetHeader(EnclosedMessageTypes, SerializeEnclosedMessageTypes(messages)); - var toSend = GetTransportMessageFor(messages); - - toSend.CorrelationId = correlationId; - toSend.MessageIntent = messageIntent; - - foreach (var destination in destinations) - { - try - { - MessageSender.Send(toSend, destination); - } - catch (QueueNotFoundException ex) - { - throw new ConfigurationException("The destination queue '" + destination + - "' could not be found. You may have misconfigured the destination for this kind of message (" + - messages[0].GetType().FullName + - ") in the MessageEndpointMappings of the UnicastBusConfig section in your configuration file." + - "It may also be the case that the given queue just hasn't been created yet, or has been deleted." - , ex); - } - - if (Log.IsDebugEnabled) - Log.Debug(string.Format("Sending message {0} with ID {1} to destination {2}.\n" + - "ToString() of the message yields: {3}\n" + - "Message headers:\n{4}", - messages[0].GetType().AssemblyQualifiedName, - toSend.Id, - destination, - messages[0], - string.Join(", ", ((IBus)this).OutgoingHeaders.Select(h => h.Key + ":" + h.Value).ToArray()) - )); - - result.Add(toSend.Id); - } - - if (MessagesSent != null) - MessagesSent(this, new MessagesEventArgs(messages)); - - return result; - } - - /// - /// Takes the given message types and serializes them for inclusion in the EnclosedMessageTypes header. - /// - /// - /// - public static string SerializeEnclosedMessageTypes(IMessage[] messages) - { - var types = GetFullTypes(messages); - - var sBuilder = new StringBuilder(""); - types.ForEach(s => sBuilder.Append("" + s + "")); - sBuilder.Append(""); - - return sBuilder.ToString(); - } - - /// - /// Takes the serialized form of EnclosedMessageTypes and returns a list of string types. - /// - /// - /// - public static IList DeserializeEnclosedMessageTypes(string serialized) - { - string temp = serialized.Replace("", ""); - temp = temp.Replace("", ""); - string[] arr = temp.Split(new[] { "" }, StringSplitOptions.RemoveEmptyEntries); - - return new List(arr); - } - - private static List GetFullTypes(IEnumerable messages) - { - var types = new List(); - - foreach (var m in messages) - { - var s = m.GetType().AssemblyQualifiedName; - if (types.Contains(s)) - continue; - - types.Add(s); - - foreach (var t in m.GetType().GetInterfaces()) - if (typeof(IMessage).IsAssignableFrom(t) && t != typeof(IMessage)) - if (!types.Contains(t.AssemblyQualifiedName)) - types.Add(t.AssemblyQualifiedName); - } - - return types; - } - - /// - /// Implementation of IStartableBus.Started event. - /// - public event EventHandler Started; - - IBus IStartableBus.Start() - { - return (this as IStartableBus).Start(null); - } - - IBus IStartableBus.Start(Action startupAction) - { - if (started) - return this; - - lock (startLocker) - { - if (started) - return this; - - starting = true; - - - ValidateConfiguration(); - - if (startupAction != null) - startupAction(); - - AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal); - - if (SubscriptionStorage != null) - SubscriptionStorage.Init(); - - if (!IsSendOnlyEndpoint()) - { - transport.Start(Address); - } - - - if (autoSubscribe) - { - PerformAutoSubcribe(); - } - - InitializeSelf(); - - started = true; - } - - if (Started != null) - Started(this, null); - - return this; - } - - void PerformAutoSubcribe() - { - foreach (var messageType in GetMessageTypesHandledOnThisEndpoint()) - { - var destination = GetDestinationForMessageType(messageType); - if (string.IsNullOrEmpty(destination)) - continue; - - var arr = destination.Split('@'); - - var queue = arr[0]; - var machine = Environment.MachineName; - - if (arr.Length == 2) - if (arr[1] != "." && arr[1].ToLower() != "localhost" && arr[1] != IPAddress.Loopback.ToString()) - machine = arr[1]; - - destination = queue + "@" + machine; - - if (destination.ToLower() != Address.ToLower()) - Subscribe(messageType); - } - } - - void ValidateConfiguration() - { - if (MessageSerializer == null) - throw new InvalidOperationException("No message serializer has been configured."); - - if(IsSendOnlyEndpoint() && UserDefinedMessageHandlersLoaded()) - throw new InvalidOperationException("Send only endpoints can't contain message handlers."); - } - - bool UserDefinedMessageHandlersLoaded() - { - return messageHandlerTypes != null && messageHandlerTypes.Any(x=>!x.Namespace.StartsWith("NServiceBus")); - } - - private void InitializeSelf() - { - if (IsSendOnlyEndpoint()) - return;//send only endpoint - - var toSend = GetTransportMessageFor(new CompletionMessage()); - toSend.MessageIntent = MessageIntentEnum.Init; - - MessageSender.Send(toSend, Address); - } - - - - /// - /// Tells the transport to dispose. - /// - public virtual void Dispose() - { - transport.StartedMessageProcessing -= TransportStartedMessageProcessing; - transport.TransportMessageReceived -= TransportMessageReceived; - transport.FinishedMessageProcessing -= TransportFinishedMessageProcessing; - transport.FailedMessageProcessing -= TransportFailedMessageProcessing; - - transport.Dispose(); - } - - - void IBus.DoNotContinueDispatchingCurrentMessageToHandlers() - { - _doNotContinueDispatchingCurrentMessageToHandlers = true; - } - - [ThreadStatic] - private static bool _doNotContinueDispatchingCurrentMessageToHandlers; - - IDictionary IBus.OutgoingHeaders - { - get - { - return ExtensionMethods.GetStaticOutgoingHeadersAction(); - } - } - - IMessageContext IBus.CurrentMessageContext - { - get - { - return _messageBeingHandled == null ? null : new MessageContext(_messageBeingHandled); - } - } - - #endregion - - #region receiving and handling - - /// - /// Handles a received message. - /// - /// The builder used to construct the objects necessary to handle the message. - /// The received message. - /// - /// run by multiple threads so must be thread safe - /// public for testing - /// - public void HandleMessage(IBuilder builder, TransportMessage m) - { - ForwardMessageIfNecessary(m); - - var messages = Extract(m); - - if (messages == null || messages.Length == 0) - { - Log.Warn("Received an empty message - ignoring."); - return; - } - - HandleCorellatedMessage(m, messages); - - foreach (var originalMessage in messages) - { - var messageToHandle = ApplyIncomingMessageMutatorsTo(builder, originalMessage); - - ExtensionMethods.CurrentMessageBeingHandled = messageToHandle; - - var canDispatch = true; - foreach (var condition in subscriptionsManager.GetConditionsForMessage(messageToHandle)) - { - if (condition(messageToHandle)) continue; - - Log.Debug(string.Format("Condition {0} failed for message {1}", condition, messageToHandle.GetType().Name)); - canDispatch = false; - break; - } - - if (canDispatch) - DispatchMessageToHandlersBasedOnType( - builder, messageToHandle, messageToHandle.GetType()); - } - - ExtensionMethods.CurrentMessageBeingHandled = null; - } - - static IMessage ApplyIncomingMessageMutatorsTo(IBuilder builder, IMessage originalMessage) - { - var mutators = builder.BuildAll(); - - var mutatedMessage = originalMessage; - mutators.ToList().ForEach(m => - { - mutatedMessage = m.MutateIncoming(mutatedMessage); - }); - - return mutatedMessage; - } - - private IMessage[] Extract(TransportMessage m) - { - try - { - return MessageSerializer.Deserialize(new MemoryStream(m.Body)); - } - catch (Exception e) - { - FailureManager.SerializationFailedForMessage(m, e); - return null; - } - } - - /// - /// Finds the message handlers associated with the message type and dispatches - /// the message to the found handlers. - /// - /// The builder used to construct the handlers. - /// The message to dispatch to the handlers. - /// The message type by which to locate the correct handlers. - /// - /// - /// If during the dispatch, a message handler calls the DoNotContinueDispatchingCurrentMessageToHandlers method, - /// this prevents the message from being further dispatched. - /// This includes generic message handlers (of IMessage), and handlers for the specific messageType. - /// - private void DispatchMessageToHandlersBasedOnType(IBuilder builder, IMessage toHandle, Type messageType) - { - foreach (var messageHandlerType in GetHandlerTypes(messageType)) - { - try - { - Log.Debug("Activating: " + messageHandlerType.Name); - - builder.BuildAndDispatch(messageHandlerType, GetAction(toHandle)); - - Log.Debug(messageHandlerType.Name + " Done."); - - if (_doNotContinueDispatchingCurrentMessageToHandlers) - { - _doNotContinueDispatchingCurrentMessageToHandlers = false; - return; - } - } - catch (Exception e) - { - var innerEx = GetInnermostException(e); - Log.Error(messageHandlerType.Name + " Failed handling message.", GetInnermostException(innerEx)); - - throw new TransportMessageHandlingFailedException(innerEx); - } - } - } - - private Action GetAction(T message) where T : IMessage - { - return (o => - { - var messageTypesToMethods = handlerToMessageTypeToHandleMethodMap[o.GetType()]; - foreach (var messageType in messageTypesToMethods.Keys) - if (messageType.IsAssignableFrom(message.GetType())) - messageTypesToMethods[messageType].Invoke(o, new object[] { message }); - } - ); - } - - /// - /// Gets the inner most exception from an exception stack. - /// - /// The exception to get the inner most exception for. - /// The innermost exception. - /// - /// If the exception has no inner exceptions the provided exception will be returned. - /// - private static Exception GetInnermostException(Exception e) - { - var result = e; - while (result.InnerException != null) - result = result.InnerException; - - return result; - } - - /// - /// If the message contains a correlationId, attempts to - /// invoke callbacks for that Id. - /// - /// The message to evaluate. - /// The logical messages in the transport message. - private void HandleCorellatedMessage(TransportMessage msg, IMessage[] messages) - { - if (msg.CorrelationId == null) - return; - - BusAsyncResult busAsyncResult; - - lock (messageIdToAsyncResultLookup) - { - messageIdToAsyncResultLookup.TryGetValue(msg.CorrelationId, out busAsyncResult); - messageIdToAsyncResultLookup.Remove(msg.CorrelationId); - } - - if (busAsyncResult != null) - if (messages != null) - if (messages.Length == 1) - { - var cm = messages[0] as CompletionMessage; - if (cm != null) - busAsyncResult.Complete(cm.ErrorCode, null); - else - busAsyncResult.Complete(int.MinValue, messages); - } - } - - /// - /// Handles the event from the used - /// for the bus. - /// - /// The sender of the event. - /// The arguments for the event. - /// - /// When the transport passes up the its received, - /// the bus checks for initializiation, - /// sets the message as that which is currently being handled for the current thread - /// and, depending on , attempts to handle the message. - /// - private void TransportMessageReceived(object sender, TransportMessageReceivedEventArgs e) - { - using (var child = this.Builder.CreateChildBuilder()) - this.HandleTransportMessage(child, e.Message); - } - private void HandleTransportMessage(IBuilder builder, TransportMessage msg) - { - Log.Debug("Received message with ID " + msg.Id + " from sender " + msg.ReturnAddress); - - _messageBeingHandled = msg; - - if (UnitOfWorkManager != null) - UnitOfWorkManager.Begin(); - - modules = new List(); - var mods = builder.BuildAll(); - if (mods != null) - modules.AddRange(mods); - - foreach (var module in modules) - { - Log.Debug("Calling 'HandleBeginMessage' on " + module.GetType().FullName); - module.HandleBeginMessage(); //don't need to call others if one fails - } - - if (IsInitializationMessage(msg)) - { - Log.Info(Address + " initialized."); - return; - } - - if (HandledSubscriptionMessage(msg, SubscriptionStorage, SubscriptionAuthorizer)) - { - var messageType = GetSubscriptionMessageTypeFrom(msg); - - if (msg.MessageIntent == MessageIntentEnum.Subscribe) - if (ClientSubscribed != null) - ClientSubscribed(this, new SubscriptionEventArgs { MessageType = messageType, SubscriberAddress = msg.ReturnAddress }); - - return; - } - - _handleCurrentMessageLaterWasCalled = false; - - if (MessageReceived != null) - MessageReceived(msg); - - if (!disableMessageHandling) - HandleMessage(builder, msg); - - Log.Debug("Finished handling message."); - } - - private static string GetSubscriptionMessageTypeFrom(TransportMessage msg) - { - return (from header in msg.Headers where header.Key == SubscriptionMessageType select header.Value).FirstOrDefault(); - } - - /// - /// Handles subscribe and unsubscribe requests managing the given subscription storage. - /// Returns true if the message was a subscription message. - /// - /// - /// - /// - /// - public static bool HandledSubscriptionMessage(TransportMessage msg, ISubscriptionStorage subscriptionStorage, IAuthorizeSubscriptions subscriptionAuthorizer) - { - string messageType = GetSubscriptionMessageTypeFrom(msg); - - Action warn = () => - { - var warning = string.Format("Subscription message from {0} arrived at this endpoint, yet this endpoint is not configured to be a publisher.", msg.ReturnAddress); - - Log.Warn(warning); - - if (Log.IsDebugEnabled) // only under debug, so that we don't expose ourselves to a denial of service - throw new InvalidOperationException(warning); // and cause message to go to error queue by throwing an exception - }; - - if (msg.MessageIntent == MessageIntentEnum.Subscribe) - if (subscriptionStorage != null) - { - bool goAhead = true; - if (subscriptionAuthorizer != null) - if (!subscriptionAuthorizer.AuthorizeSubscribe(messageType, msg.ReturnAddress, msg.Headers)) - { - goAhead = false; - Log.Debug(string.Format("Subscription request from {0} on message type {1} was refused.", msg.ReturnAddress, messageType)); - } - - if (goAhead) - { - Log.Info("Subscribing " + msg.ReturnAddress + " to message type " + messageType); - subscriptionStorage.Subscribe(msg.ReturnAddress, new[] { messageType }); - } - - return true; - } - else - { - warn(); - } - - if (msg.MessageIntent == MessageIntentEnum.Unsubscribe) - if (subscriptionStorage != null) - { - bool goAhead = true; - - if (subscriptionAuthorizer != null) - if (!subscriptionAuthorizer.AuthorizeUnsubscribe(messageType, msg.ReturnAddress, msg.Headers)) - { - goAhead = false; - Log.Debug(string.Format("Unsubscribe request from {0} on message type {1} was refused.", msg.ReturnAddress, messageType)); - } - - if (goAhead) - { - Log.Info("Unsubscribing " + msg.ReturnAddress + " from message type " + messageType); - subscriptionStorage.Unsubscribe(msg.ReturnAddress, new[] { messageType }); - } - - return true; - } - else - { - warn(); - } - - return false; - } - - private void TransportFinishedMessageProcessing(object sender, EventArgs e) - { - for (int i = modules.Count-1; i >= 0; i--) - { - Log.Debug("Calling 'HandleEndMessage' on " + modules[i].GetType().FullName); - modules[i].HandleEndMessage(); - } - - if (UnitOfWorkManager != null) - UnitOfWorkManager.End(); - } - - private void TransportFailedMessageProcessing(object sender, EventArgs e) - { - var exceptionThrown = false; - - for (int i = modules.Count - 1; i >= 0; i--) - try - { - Log.Debug("Calling 'HandleError' on " + modules[i].GetType().FullName); - modules[i].HandleError(); - } - catch (Exception ex) - { - Log.Error("Module " + modules[i].GetType().FullName + " failed when handling error.", ex); - exceptionThrown = true; - } - - if (UnitOfWorkManager != null) - UnitOfWorkManager.Error(); - - if (exceptionThrown) - throw new Exception("Could not handle the failed message processing correctly. Check for prior error messages in the log for more information."); - } - - private void TransportStartedMessageProcessing(object sender, EventArgs e) - { - } - - private bool IsInitializationMessage(TransportMessage msg) - { - if (msg.ReturnAddress == null) - return false; - - if (!msg.ReturnAddress.Contains(Address)) - return false; - - if (msg.CorrelationId != null) - return false; - - if (msg.MessageIntent != MessageIntentEnum.Init) - return false; - - return true; - } - - #endregion - - #region helper methods - bool IsSendOnlyEndpoint() - { - return string.IsNullOrEmpty(Address); - } - - /// - /// Sets up known types needed for XML serialization as well as - /// to which address to send which message. - /// - /// A dictionary of message_type, address pairs. - private void ConfigureMessageOwners(IDictionary owners) - { - foreach (DictionaryEntry de in owners) - { - var key = de.Key as string; - if (key == null) - continue; - - try - { - var messageType = Type.GetType(key, false); - if (messageType != null) - { - RegisterMessageType(messageType, de.Value as string, false); - continue; - } - } - catch (Exception ex) - { - Log.Error("Problem loading message type: " + key, ex); - } - - try - { - var a = Assembly.Load(key); - foreach (var t in a.GetTypes()) - RegisterMessageType(t, de.Value.ToString(), true); - } - catch (Exception ex) - { - throw new ArgumentException("Problem loading message assembly: " + key, ex); - } - } - } - - /// - /// Sends the Msg to the address found in the field - /// if it isn't null. - /// - /// The message to forward - private void ForwardMessageIfNecessary(TransportMessage m) - { - if (ForwardReceivedMessagesTo != null) - MessageSender.Send(m, ForwardReceivedMessagesTo); - } - - /// - /// Registers a message type to a destination. - /// - /// A message type implementing . - /// The address of the destination the message type is registered to. - /// - /// Indicates whether or not this registration call is related to a type configured from an - /// assembly. - /// - /// - /// Since the same message type may be configured specifically to one address - /// and via its assembly to a different address, the configuredByAssembly - /// parameter dictates that the specific message type data is to be used. - /// - public void RegisterMessageType(Type messageType, string destination, bool configuredByAssembly) - { - if (typeof(IMessage) == messageType) - return; - - if (typeof(IMessage).IsAssignableFrom(messageType)) - { - if (MustNotOverrideExistingConfiguration(messageType, configuredByAssembly)) - return; - - messageTypeToDestinationLookup[messageType] = destination; - - Log.Debug("Message " + messageType.FullName + " has been allocated to endpoint " + destination + "."); - - if (messageType.GetCustomAttributes(typeof(ExpressAttribute), true).Length == 0) - recoverableMessageTypes.Add(messageType); - - foreach (TimeToBeReceivedAttribute a in messageType.GetCustomAttributes(typeof(TimeToBeReceivedAttribute), true)) - timeToBeReceivedPerMessageType[messageType] = a.TimeToBeReceived; - - return; - } - } - - /// - /// Checks whether or not the existing configuration can be overridden for a message type. - /// - /// The type of message to check the configuration for. - /// - /// Indicates whether or not this check is related to a type configured from an - /// assembly. - /// - /// true if it is acceptable to override the configuration, otherwise false. - private bool MustNotOverrideExistingConfiguration(Type messageType, bool configuredByAssembly) - { - return messageTypeToDestinationLookup.ContainsKey(messageType) && configuredByAssembly; - } - - /// - /// Wraps the provided messages in an NServiceBus envelope, does not include destination. - /// - /// The messages to wrap. - /// The envelope containing the messages. - protected TransportMessage GetTransportMessageFor(params IMessage[] rawMessages) - { - var result = new TransportMessage - { - Headers = new Dictionary(), - ReturnAddress = Address - }; - - var messages = ApplyOutgoingMessageMutatorsTo(rawMessages).ToArray(); - - var ms = new MemoryStream(); - MessageSerializer.Serialize(messages, ms); - result.Body = ms.ToArray(); - - var mappers = Builder.BuildAll(); - mappers.ToList().ForEach(m => m.MapOutgoing(messages, result)); - - if (PropogateReturnAddressOnSend) - result.ReturnAddress = Address; - - var timeToBeReceived = TimeSpan.MaxValue; - - foreach (var message in messages) - { - if (recoverableMessageTypes.Contains(message.GetType())) - result.Recoverable = true; - - var span = GetTimeToBeReceivedForMessageType(message.GetType()); - timeToBeReceived = (span < timeToBeReceived ? span : timeToBeReceived); - } - - result.TimeToBeReceived = timeToBeReceived; - - return result; - } - - IEnumerable ApplyOutgoingMessageMutatorsTo(IEnumerable messages) - { - var mutators = Builder.BuildAll(); - - foreach (var originalMessage in messages) - { - - var mutatedMessage = originalMessage; - mutators.ToList().ForEach(m => - { - mutatedMessage = m.MutateOutgoing(mutatedMessage); - }); - - yield return mutatedMessage; - } - } - - private TimeSpan GetTimeToBeReceivedForMessageType(Type messageType) - { - var result = TimeSpan.MaxValue; - - timeToBeReceivedPerMessageTypeLocker.EnterReadLock(); - if (timeToBeReceivedPerMessageType.ContainsKey(messageType)) - { - result = timeToBeReceivedPerMessageType[messageType]; - timeToBeReceivedPerMessageTypeLocker.ExitReadLock(); - return result; - } - - var options = new List(); - foreach (var interfaceType in messageType.GetInterfaces()) - { - if (timeToBeReceivedPerMessageType.ContainsKey(interfaceType)) - options.Add(timeToBeReceivedPerMessageType[interfaceType]); - } - - timeToBeReceivedPerMessageTypeLocker.ExitReadLock(); - - if (options.Count > 0) - result = options.Min(); - - timeToBeReceivedPerMessageTypeLocker.EnterWriteLock(); - timeToBeReceivedPerMessageType[messageType] = result; - timeToBeReceivedPerMessageTypeLocker.ExitWriteLock(); - - return result; - } - - /// - /// Evaluates a type and loads it if it implements IMessageHander{T}. - /// - /// The type to evaluate. - private void IfTypeIsMessageHandlerThenLoad(Type t) - { - if (t.IsAbstract) - return; - - var skipHandlerRegistration = false; - if (typeof(ISaga).IsAssignableFrom(t)) - skipHandlerRegistration = true; - - foreach (var messageType in GetMessageTypesIfIsMessageHandler(t)) - { - if (skipHandlerRegistration) - continue; - - if (!handlerList.ContainsKey(t)) - handlerList.Add(t, new List()); - - if (!(handlerList[t].Contains(messageType))) - { - handlerList[t].Add(messageType); - Log.Debug(string.Format("Associated '{0}' message with '{1}' handler", messageType, t)); - } - - if (!handlerToMessageTypeToHandleMethodMap.ContainsKey(t)) - handlerToMessageTypeToHandleMethodMap.Add(t, new Dictionary()); - - MethodInfo h = GetMessageHandler(t, messageType); - - if (!(handlerToMessageTypeToHandleMethodMap[t].ContainsKey(messageType))) - handlerToMessageTypeToHandleMethodMap[t].Add(messageType, h); - } - } - - private static MethodInfo GetMessageHandler(Type targetType, Type messageType) - { - var method = targetType.GetMethod("Handle", new[] { messageType }); - if (method != null) return method; - - var handlerType = typeof(IMessageHandler<>).MakeGenericType(messageType); - return targetType.GetInterfaceMap(handlerType) - .TargetMethods - .FirstOrDefault(); - } - - - /// - /// If the type is a message handler, returns all the message types that it handles - /// - /// - /// - private static IEnumerable GetMessageTypesIfIsMessageHandler(Type type) - { - foreach (var t in type.GetInterfaces()) - { - if (t.IsGenericType) - { - var args = t.GetGenericArguments(); - if (args.Length != 1) - continue; - - if (!typeof(IMessage).IsAssignableFrom(args[0])) - continue; - - var handlerType = typeof(IMessageHandler<>).MakeGenericType(args[0]); - if (handlerType.IsAssignableFrom(t)) - yield return args[0]; - } - } - } - - /// - /// Gets a list of handler types associated with a message type. - /// - /// The type of message to get the handlers for. - /// The list of handler types associated with the message type. - private IEnumerable GetHandlerTypes(Type messageType) - { - foreach (var handlerType in handlerList.Keys) - foreach (var msgTypeHandled in handlerList[handlerType]) - if (msgTypeHandled.IsAssignableFrom(messageType)) - { - yield return handlerType; - break; - } - } - - /// - /// Returns all the message types which have handlers configured for them. - /// - /// - private IEnumerable GetMessageTypesHandledOnThisEndpoint() - { - foreach (var handlerType in handlerList.Keys) - foreach (var msgTypeHandled in handlerList[handlerType]) - yield return msgTypeHandled; - } - - /// - /// Uses the first message in the array to pass to . - /// - /// - /// - protected string GetDestinationForMessages(IMessage[] messages) - { - if (messages == null || messages.Length == 0) - return null; - - return GetDestinationForMessageType(messages[0].GetType()); - } - - /// - /// Gets the destination address for a message type. - /// - /// The message type to get the destination for. - /// The address of the destination associated with the message type. - protected string GetDestinationForMessageType(Type messageType) - { - string destination; - - lock (messageTypeToDestinationLookup) - messageTypeToDestinationLookup.TryGetValue(messageType, out destination); - - if (destination == string.Empty) - destination = null; - - if (destination == null) - { - if (messageType.IsInterface) - return null; - - if (messageMapper != null) - { - var t = messageMapper.GetMappedTypeFor(messageType); - if (t != null && t != messageType) - return GetDestinationForMessageType(t); - } - } - - return destination; - } - - /// - /// Throws an exception if the bus hasn't begun the startup process. - /// - protected void AssertBusIsStarted() - { - if (starting == false) - throw new InvalidOperationException("The bus is not started yet, call Bus.Start() before attempting to use the bus."); - } - - #endregion - - #region Fields - - /// - /// Gets/sets the subscription manager to use for the bus. - /// - protected SubscriptionsManager subscriptionsManager = new SubscriptionsManager(); - - /// - /// Thread-static list of message modules, needs to be initialized for every transport message - /// - [ThreadStatic] - static List modules; - - /// - /// Map of message IDs to Async Results - useful for cleanup in case of timeouts. - /// - protected readonly IDictionary messageIdToAsyncResultLookup = new Dictionary(); - - private readonly IDictionary> handlerList = new Dictionary>(); - private readonly IDictionary> handlerToMessageTypeToHandleMethodMap = new Dictionary>(); - private readonly IList recoverableMessageTypes = new List(); - - private readonly IDictionary timeToBeReceivedPerMessageType = new Dictionary(); - private readonly ReaderWriterLockSlim timeToBeReceivedPerMessageTypeLocker = new ReaderWriterLockSlim(); - - /// - /// Accessed by multiple threads - needs appropriate locking - /// - private readonly IDictionary messageTypeToDestinationLookup = new Dictionary(); - - /// - /// ThreadStatic - /// - [ThreadStatic] - static TransportMessage _messageBeingHandled; - - private volatile bool started; - private volatile bool starting; - private readonly object startLocker = new object(); - - private readonly static ILog Log = LogManager.GetLogger(typeof(UnicastBus)); - #endregion - } -} +using System; +using System.Collections; +using System.Collections.Generic; +using System.Reflection; +using System.Security.Principal; +using System.Threading; +using Common.Logging; +using NServiceBus.MessageMutator; +using NServiceBus.Unicast.Queuing; +using NServiceBus.Unicast.Subscriptions; +using NServiceBus.Unicast.Transport; +using NServiceBus.ObjectBuilder; +using NServiceBus.MessageInterfaces; +using NServiceBus.Saga; +using System.Text; +using System.Linq; +using NServiceBus.Serialization; +using System.IO; +using NServiceBus.Faults; +using System.Net; +using NServiceBus.UnitOfWork; + +namespace NServiceBus.Unicast +{ + /// + /// A unicast implementation of for NServiceBus. + /// + public class UnicastBus : IUnicastBus, IStartableBus + { + /// + /// Header entry key for the given message type that is being subscribed to, when message intent is subscribe or unsubscribe. + /// + public const string SubscriptionMessageType = "SubscriptionMessageType"; + + /// + /// Header entry key indicating the types of messages contained. + /// + public const string EnclosedMessageTypes = "EnclosedMessageTypes"; + + #region config properties + + private bool autoSubscribe = true; + + /// + /// When set, when starting up, the bus performs + /// a subscribe operation for message types for which it has + /// handlers and that are owned by a different endpoint. + /// Default is true. + /// + public bool AutoSubscribe + { + get { return autoSubscribe; } + set { autoSubscribe = value; } + } + + private bool disableMessageHandling; + + /// + /// Should be used by programmer, not administrator. + /// Disables the handling of incoming messages. + /// + public virtual bool DisableMessageHandling + { + set { disableMessageHandling = value; } + } + + /// + /// The address that the bus will listen to for messages. + /// + public string Address { get; set; } + + /// + /// A reference to the transport. + /// + protected ITransport transport; + + /// + /// Should be used by programmer, not administrator. + /// Sets an implementation to use as the + /// listening endpoint for the bus. + /// + public virtual ITransport Transport + { + set + { + transport = value; + + transport.StartedMessageProcessing += TransportStartedMessageProcessing; + transport.TransportMessageReceived += TransportMessageReceived; + transport.FinishedMessageProcessing += TransportFinishedMessageProcessing; + transport.FailedMessageProcessing += TransportFailedMessageProcessing; + } + } + + /// + /// Message queue used to send messages. + /// + public ISendMessages MessageSender { get; set; } + + /// + /// Object used to manage units of work. + /// + public IManageUnitsOfWork UnitOfWorkManager { get; set; } + + /// + /// A delegate for a method that will handle the + /// event. + /// + /// The message received. + public delegate void MessageReceivedDelegate(TransportMessage message); + + /// + /// Event raised when a message is received. + /// + public event MessageReceivedDelegate MessageReceived; + + /// + /// Event raised when messages are sent. + /// + public event EventHandler MessagesSent; + + /// + /// Should be used by programmer, not administrator. + /// Gets and sets an implementation to + /// be used for subscription storage for the bus. + /// + public virtual ISubscriptionStorage SubscriptionStorage { get; set; } + + /// + /// Should be used by the programmer, not the administrator. + /// Gets and sets an implementation to + /// be used for subscription storage for the bus. + /// + public virtual IMessageSerializer MessageSerializer { get; set; } + + /// + /// Should be used by programmer, not administrator. + /// Sets implementation that will be used to + /// dynamically instantiate and execute message handlers. + /// + public IBuilder Builder { get; set; } + + private IMessageMapper messageMapper; + + /// + /// Gets/sets the message mapper. + /// + public virtual IMessageMapper MessageMapper + { + get { return messageMapper; } + set + { + messageMapper = value; + + ExtensionMethods.MessageCreator = value; + ExtensionMethods.Bus = this; + } + } + + /// + /// Should be used by programmer, not administrator. + /// Sets whether or not the return address of a received message + /// should be propogated when the message is forwarded. This field is + /// used primarily for the Distributor. + /// + public bool PropogateReturnAddressOnSend { get; set; } + + + /// + /// Should be used by administrator, not programmer. + /// Sets the address to which all messages received on this bus will be + /// forwarded to (not including subscription messages). + /// This is primarily useful for smart client scenarios + /// where both client and server software are installed on the mobile + /// device. The server software will have this field set to the address + /// of the real server. + /// + public string ForwardReceivedMessagesTo { get; set; } + + /// + /// Should be used by administrator, not programmer. + /// Sets the message types associated with the bus. + /// + /// + /// This property accepts a dictionary where the key can be the name of a type implementing + /// or the name of an assembly that contains message types. The value + /// of each entry is the address of the owner of the message type defined in the key. + /// If an assembly is specified then all the the types in the assembly implementing + /// will be registered against the address defined in the value of the entry. + /// + public IDictionary MessageOwners + { + get { return messageOwners; } + set + { + messageOwners = value; + ConfigureMessageOwners(value); + } + } + private IDictionary messageOwners; + + /// + /// Sets the list of assemblies which contain a message handlers + /// for the bus. + /// + public virtual IList MessageHandlerAssemblies + { + set + { + var types = new List(); + foreach (Assembly a in value) + types.AddRange(a.GetTypes()); + + MessageHandlerTypes = types; + } + } + + /// + /// Sets the types that will be scanned for message handlers. + /// Those found will be invoked in the same order as given. + /// + public IEnumerable MessageHandlerTypes + { + get { return messageHandlerTypes; } + set + { + messageHandlerTypes = value; + + foreach (Type t in value) + IfTypeIsMessageHandlerThenLoad(t); + } + } + private IEnumerable messageHandlerTypes; + + /// + /// Object that will be used to authorize subscription requests. + /// + public IAuthorizeSubscriptions SubscriptionAuthorizer { get; set; } + + /// + /// Object that will be used to manage failures. + /// + public IManageMessageFailures FailureManager { get; set; } + + #endregion + + #region IUnicastBus Members + + /// + /// Event raised when no subscribers found for the published message. + /// + public event EventHandler NoSubscribersForMessage; + + /// + /// Event raised when client subscribed to a message type. + /// + public event EventHandler ClientSubscribed; + + #endregion + + #region IBus Members + + /// + /// Creates an instance of the specified type. + /// Used primarily for instantiating interface-based messages. + /// + /// The type to instantiate. + /// An instance of the specified type. + public T CreateInstance() where T : IMessage + { + return messageMapper.CreateInstance(); + } + + /// + /// Creates an instance of the specified type. + /// Used primarily for instantiating interface-based messages. + /// + /// The type to instantiate. + /// An action to perform on the result + /// + public T CreateInstance(Action action) where T : IMessage + { + return messageMapper.CreateInstance(action); + } + + /// + /// Creates an instance of the specified type. + /// Used primarily for instantiating interface-based messages. + /// + /// The type to instantiate. + /// An instance of the specified type. + public object CreateInstance(Type messageType) + { + return messageMapper.CreateInstance(messageType); + } + + /// + /// Creates an instance of the requested message type (T), + /// performing the given action on the created message, + /// and then publishing it. + /// + /// + /// + public void Publish(Action messageConstructor) where T : IMessage + { + Publish(CreateInstance(messageConstructor)); + } + + /// + /// Publishes the messages to all subscribers of the first message's type. + /// + /// + public virtual void Publish(params T[] messages) where T : IMessage + { + if (SubscriptionStorage == null) + throw new InvalidOperationException("Cannot publish on this endpoint - no subscription storage has been configured. Add either 'MsmqSubscriptionStorage()' or 'DbSubscriptionStorage()' after 'NServiceBus.Configure.With()'."); + + var subscribers = SubscriptionStorage.GetSubscribersForMessage(GetFullTypes(messages as IMessage[])); + + if (subscribers.Count() == 0) + if (NoSubscribersForMessage != null) + NoSubscribersForMessage(this, new MessageEventArgs(messages[0])); + + SendMessage(subscribers, null, MessageIntentEnum.Publish, messages as IMessage[]); + } + + /// + /// Subscribes to the given type - T. + /// + /// + public void Subscribe() where T : IMessage + { + Subscribe(typeof(T)); + } + + /// + /// Subcribes to recieve published messages of the specified type. + /// + /// The type of message to subscribe to. + public virtual void Subscribe(Type messageType) + { + Subscribe(messageType, null); + } + + /// + /// Subscribes to the given type T, registering a condition that all received + /// messages of that type should comply with, otherwise discarding them. + /// + /// + /// + public void Subscribe(Predicate condition) where T : IMessage + { + var p = new Predicate(m => + { + if (m is T) + return condition((T)m); + + return true; + } + ); + + Subscribe(typeof(T), p); + } + + /// + /// Subscribes to receive published messages of the specified type if + /// they meet the provided condition. + /// + /// The type of message to subscribe to. + /// The condition under which to receive the message. + public virtual void Subscribe(Type messageType, Predicate condition) + { + AssertBusIsStarted(); + + subscriptionsManager.AddConditionForSubscriptionToMessageType(messageType, condition); + + var destination = GetDestinationForMessageType(messageType); + + if (destination == null) + throw new InvalidOperationException(string.Format("No destination could be found for message type {0}. Check the section of the configuration of this endpoint for an entry either for this specific message type or for its assembly.", messageType)); + + Log.Info("Subscribing to " + messageType.AssemblyQualifiedName + " at publisher queue " + destination); + + ((IBus)this).OutgoingHeaders[SubscriptionMessageType] = messageType.AssemblyQualifiedName; + SendMessage(destination, null, MessageIntentEnum.Subscribe, new CompletionMessage()); + ((IBus)this).OutgoingHeaders.Remove(SubscriptionMessageType); + } + + /// + /// Unsubscribes from the given type of message - T. + /// + /// + public void Unsubscribe() where T : IMessage + { + Unsubscribe(typeof(T)); + } + + /// + /// Unsubscribes from receiving published messages of the specified type. + /// + /// + public virtual void Unsubscribe(Type messageType) + { + var destination = GetDestinationForMessageType(messageType); + + if (destination == null) + throw new InvalidOperationException(string.Format("No destination could be found for message type {0}. Check the section of the configuration of this endpoint for an entry either for this specific message type or for its assembly.", messageType)); + + Log.Info("Unsubscribing from " + messageType.AssemblyQualifiedName + " at publisher queue " + destination); + + ((IBus)this).OutgoingHeaders[SubscriptionMessageType] = messageType.AssemblyQualifiedName; + SendMessage(destination, null, MessageIntentEnum.Unsubscribe, new CompletionMessage()); + ((IBus)this).OutgoingHeaders.Remove(SubscriptionMessageType); + } + + void IBus.Reply(params IMessage[] messages) + { + SendMessage(_messageBeingHandled.ReturnAddress, _messageBeingHandled.IdForCorrelation, MessageIntentEnum.Send, messages); + } + + void IBus.Reply(Action messageConstructor) + { + ((IBus)this).Reply(CreateInstance(messageConstructor)); + } + + void IBus.Return(T errorCode) + { + ((IBus)this).Reply(new CompletionMessage { ErrorCode = errorCode.GetHashCode() }); + } + + void IBus.HandleCurrentMessageLater() + { + if (_handleCurrentMessageLaterWasCalled) + return; + + MessageSender.Send(_messageBeingHandled, Address); + + _handleCurrentMessageLaterWasCalled = true; + } + + void IBus.ForwardCurrentMessageTo(string destination) + { + MessageSender.Send(_messageBeingHandled, destination); + } + + /// + /// ThreadStatic variable indicating if the current message was already + /// marked to be handled later so we don't do this more than once. + /// + [ThreadStatic] + private static bool _handleCurrentMessageLaterWasCalled; + + void IBus.SendLocal(Action messageConstructor) + { + SendLocal(CreateInstance(messageConstructor)); + } + + /// + /// Sends the list of messages back to the current bus. + /// + /// The messages to send. + public void SendLocal(params IMessage[] messages) + { + if(string.IsNullOrEmpty(Address)) + throw new InvalidOperationException("Can't sent local without a input queue configured"); + + var m = GetTransportMessageFor(messages); + + m.MessageIntent = MessageIntentEnum.Send; + + MessageSender.Send(m, Address); + } + + ICallback IBus.Send(Action messageConstructor) + { + return ((IBus)this).Send(CreateInstance(messageConstructor)); + } + + ICallback IBus.Send(params IMessage[] messages) + { + var destination = GetDestinationForMessages(messages); + + return SendMessage(destination, null, MessageIntentEnum.Send, messages); + } + + ICallback IBus.Send(string destination, Action messageConstructor) + { + return SendMessage(destination, null, MessageIntentEnum.Send, CreateInstance(messageConstructor)); + } + + ICallback IBus.Send(string destination, params IMessage[] messages) + { + return SendMessage(destination, null, MessageIntentEnum.Send, messages); + } + + void IBus.Send(string destination, string correlationId, Action messageConstructor) + { + SendMessage(destination, correlationId, MessageIntentEnum.Send, CreateInstance(messageConstructor)); + } + + void IBus.Send(string destination, string correlationId, params IMessage[] messages) + { + SendMessage(destination, correlationId, MessageIntentEnum.Send, messages); + } + + + private ICallback SendMessage(string destination, string correlationId, MessageIntentEnum messageIntent, params IMessage[] messages) + { + if (destination == null) + { + var tm = messages[0] as TimeoutMessage; + if (tm != null) + if (tm.ClearTimeout) + return null; + } + + if (destination == null) + throw new InvalidOperationException( + string.Format("No destination specified for message {0}. Message cannot be sent. Check the UnicastBusConfig section in your config file and ensure that a MessageEndpointMapping exists for the message type.", messages[0].GetType().FullName)); + + if (messages == null || messages.Length == 0) + throw new InvalidOperationException("Cannot send an empty set of messages."); + + foreach (var id in SendMessage(new List { destination }, correlationId, messageIntent, messages)) + { + var result = new Callback(id); + result.Registered += delegate(object sender, BusAsyncResultEventArgs args) + { + lock (messageIdToAsyncResultLookup) + messageIdToAsyncResultLookup[args.MessageId] = args.Result; + }; + + return result; + } + + return null; + } + + private ICollection SendMessage(IEnumerable destinations, string correlationId, MessageIntentEnum messageIntent, params IMessage[] messages) + { + AssertBusIsStarted(); + + var result = new List(); + + messages[0].SetHeader(EnclosedMessageTypes, SerializeEnclosedMessageTypes(messages)); + var toSend = GetTransportMessageFor(messages); + + toSend.CorrelationId = correlationId; + toSend.MessageIntent = messageIntent; + + foreach (var destination in destinations) + { + try + { + MessageSender.Send(toSend, destination); + } + catch (QueueNotFoundException ex) + { + throw new ConfigurationException("The destination queue '" + destination + + "' could not be found. You may have misconfigured the destination for this kind of message (" + + messages[0].GetType().FullName + + ") in the MessageEndpointMappings of the UnicastBusConfig section in your configuration file." + + "It may also be the case that the given queue just hasn't been created yet, or has been deleted." + , ex); + } + + if (Log.IsDebugEnabled) + Log.Debug(string.Format("Sending message {0} with ID {1} to destination {2}.\n" + + "ToString() of the message yields: {3}\n" + + "Message headers:\n{4}", + messages[0].GetType().AssemblyQualifiedName, + toSend.Id, + destination, + messages[0], + string.Join(", ", ((IBus)this).OutgoingHeaders.Select(h => h.Key + ":" + h.Value).ToArray()) + )); + + result.Add(toSend.Id); + } + + if (MessagesSent != null) + MessagesSent(this, new MessagesEventArgs(messages)); + + return result; + } + + /// + /// Takes the given message types and serializes them for inclusion in the EnclosedMessageTypes header. + /// + /// + /// + public static string SerializeEnclosedMessageTypes(IMessage[] messages) + { + var types = GetFullTypes(messages); + + var sBuilder = new StringBuilder(""); + types.ForEach(s => sBuilder.Append("" + s + "")); + sBuilder.Append(""); + + return sBuilder.ToString(); + } + + /// + /// Takes the serialized form of EnclosedMessageTypes and returns a list of string types. + /// + /// + /// + public static IList DeserializeEnclosedMessageTypes(string serialized) + { + string temp = serialized.Replace("", ""); + temp = temp.Replace("", ""); + string[] arr = temp.Split(new[] { "" }, StringSplitOptions.RemoveEmptyEntries); + + return new List(arr); + } + + private static List GetFullTypes(IEnumerable messages) + { + var types = new List(); + + foreach (var m in messages) + { + var s = m.GetType().AssemblyQualifiedName; + if (types.Contains(s)) + continue; + + types.Add(s); + + foreach (var t in m.GetType().GetInterfaces()) + if (typeof(IMessage).IsAssignableFrom(t) && t != typeof(IMessage)) + if (!types.Contains(t.AssemblyQualifiedName)) + types.Add(t.AssemblyQualifiedName); + } + + return types; + } + + /// + /// Implementation of IStartableBus.Started event. + /// + public event EventHandler Started; + + IBus IStartableBus.Start() + { + return (this as IStartableBus).Start(null); + } + + IBus IStartableBus.Start(Action startupAction) + { + if (started) + return this; + + lock (startLocker) + { + if (started) + return this; + + starting = true; + + + ValidateConfiguration(); + + if (startupAction != null) + startupAction(); + + AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal); + + if (SubscriptionStorage != null) + SubscriptionStorage.Init(); + + if (!IsSendOnlyEndpoint()) + { + transport.Start(Address); + } + + + if (autoSubscribe) + { + PerformAutoSubcribe(); + } + + InitializeSelf(); + + started = true; + } + + if (Started != null) + Started(this, null); + + return this; + } + + void PerformAutoSubcribe() + { + foreach (var messageType in GetMessageTypesHandledOnThisEndpoint()) + { + var destination = GetDestinationForMessageType(messageType); + if (string.IsNullOrEmpty(destination)) + continue; + + var arr = destination.Split('@'); + + var queue = arr[0]; + var machine = Environment.MachineName; + + if (arr.Length == 2) + if (arr[1] != "." && arr[1].ToLower() != "localhost" && arr[1] != IPAddress.Loopback.ToString()) + machine = arr[1]; + + destination = queue + "@" + machine; + + if (destination.ToLower() != Address.ToLower()) + Subscribe(messageType); + } + } + + void ValidateConfiguration() + { + if (MessageSerializer == null) + throw new InvalidOperationException("No message serializer has been configured."); + + if(IsSendOnlyEndpoint() && UserDefinedMessageHandlersLoaded()) + throw new InvalidOperationException("Send only endpoints can't contain message handlers."); + } + + bool UserDefinedMessageHandlersLoaded() + { + return messageHandlerTypes != null && messageHandlerTypes.Any(x=>!x.Namespace.StartsWith("NServiceBus")); + } + + private void InitializeSelf() + { + if (IsSendOnlyEndpoint()) + return;//send only endpoint + + var toSend = GetTransportMessageFor(new CompletionMessage()); + toSend.MessageIntent = MessageIntentEnum.Init; + + MessageSender.Send(toSend, Address); + } + + + + /// + /// Tells the transport to dispose. + /// + public virtual void Dispose() + { + transport.StartedMessageProcessing -= TransportStartedMessageProcessing; + transport.TransportMessageReceived -= TransportMessageReceived; + transport.FinishedMessageProcessing -= TransportFinishedMessageProcessing; + transport.FailedMessageProcessing -= TransportFailedMessageProcessing; + + transport.Dispose(); + } + + + void IBus.DoNotContinueDispatchingCurrentMessageToHandlers() + { + _doNotContinueDispatchingCurrentMessageToHandlers = true; + } + + [ThreadStatic] + private static bool _doNotContinueDispatchingCurrentMessageToHandlers; + + IDictionary IBus.OutgoingHeaders + { + get + { + return ExtensionMethods.GetStaticOutgoingHeadersAction(); + } + } + + IMessageContext IBus.CurrentMessageContext + { + get + { + return _messageBeingHandled == null ? null : new MessageContext(_messageBeingHandled); + } + } + + #endregion + + #region receiving and handling + + /// + /// Handles a received message. + /// + /// The builder used to construct the objects necessary to handle the message. + /// The received message. + /// + /// run by multiple threads so must be thread safe + /// public for testing + /// + public void HandleMessage(IBuilder builder, TransportMessage m) + { + ForwardMessageIfNecessary(m); + + var messages = Extract(m); + + if (messages == null || messages.Length == 0) + { + Log.Warn("Received an empty message - ignoring."); + return; + } + + HandleCorellatedMessage(m, messages); + + foreach (var originalMessage in messages) + { + var messageToHandle = ApplyIncomingMessageMutatorsTo(builder, originalMessage); + + ExtensionMethods.CurrentMessageBeingHandled = messageToHandle; + + var canDispatch = true; + foreach (var condition in subscriptionsManager.GetConditionsForMessage(messageToHandle)) + { + if (condition(messageToHandle)) continue; + + Log.Debug(string.Format("Condition {0} failed for message {1}", condition, messageToHandle.GetType().Name)); + canDispatch = false; + break; + } + + if (canDispatch) + DispatchMessageToHandlersBasedOnType( + builder, messageToHandle, messageToHandle.GetType()); + } + + ExtensionMethods.CurrentMessageBeingHandled = null; + } + + static IMessage ApplyIncomingMessageMutatorsTo(IBuilder builder, IMessage originalMessage) + { + var mutators = builder.BuildAll(); + + var mutatedMessage = originalMessage; + mutators.ToList().ForEach(m => + { + mutatedMessage = m.MutateIncoming(mutatedMessage); + }); + + return mutatedMessage; + } + + private IMessage[] Extract(TransportMessage m) + { + try + { + return MessageSerializer.Deserialize(new MemoryStream(m.Body)); + } + catch (Exception e) + { + FailureManager.SerializationFailedForMessage(m, e); + return null; + } + } + + /// + /// Finds the message handlers associated with the message type and dispatches + /// the message to the found handlers. + /// + /// The builder used to construct the handlers. + /// The message to dispatch to the handlers. + /// The message type by which to locate the correct handlers. + /// + /// + /// If during the dispatch, a message handler calls the DoNotContinueDispatchingCurrentMessageToHandlers method, + /// this prevents the message from being further dispatched. + /// This includes generic message handlers (of IMessage), and handlers for the specific messageType. + /// + private void DispatchMessageToHandlersBasedOnType(IBuilder builder, IMessage toHandle, Type messageType) + { + foreach (var messageHandlerType in GetHandlerTypes(messageType)) + { + try + { + Log.Debug("Activating: " + messageHandlerType.Name); + + builder.BuildAndDispatch(messageHandlerType, GetAction(toHandle)); + + Log.Debug(messageHandlerType.Name + " Done."); + + if (_doNotContinueDispatchingCurrentMessageToHandlers) + { + _doNotContinueDispatchingCurrentMessageToHandlers = false; + return; + } + } + catch (Exception e) + { + var innerEx = GetInnermostException(e); + Log.Error(messageHandlerType.Name + " Failed handling message.", GetInnermostException(innerEx)); + + throw new TransportMessageHandlingFailedException(innerEx); + } + } + } + + private Action GetAction(T message) where T : IMessage + { + return (o => + { + var messageTypesToMethods = handlerToMessageTypeToHandleMethodMap[o.GetType()]; + foreach (var messageType in messageTypesToMethods.Keys) + if (messageType.IsAssignableFrom(message.GetType())) + messageTypesToMethods[messageType].Invoke(o, new object[] { message }); + } + ); + } + + /// + /// Gets the inner most exception from an exception stack. + /// + /// The exception to get the inner most exception for. + /// The innermost exception. + /// + /// If the exception has no inner exceptions the provided exception will be returned. + /// + private static Exception GetInnermostException(Exception e) + { + var result = e; + while (result.InnerException != null) + result = result.InnerException; + + return result; + } + + /// + /// If the message contains a correlationId, attempts to + /// invoke callbacks for that Id. + /// + /// The message to evaluate. + /// The logical messages in the transport message. + private void HandleCorellatedMessage(TransportMessage msg, IMessage[] messages) + { + if (msg.CorrelationId == null) + return; + + BusAsyncResult busAsyncResult; + + lock (messageIdToAsyncResultLookup) + { + messageIdToAsyncResultLookup.TryGetValue(msg.CorrelationId, out busAsyncResult); + messageIdToAsyncResultLookup.Remove(msg.CorrelationId); + } + + if (busAsyncResult != null) + if (messages != null) + if (messages.Length == 1) + { + var cm = messages[0] as CompletionMessage; + if (cm != null) + busAsyncResult.Complete(cm.ErrorCode, null); + else + busAsyncResult.Complete(int.MinValue, messages); + } + } + + /// + /// Handles the event from the used + /// for the bus. + /// + /// The sender of the event. + /// The arguments for the event. + /// + /// When the transport passes up the its received, + /// the bus checks for initializiation, + /// sets the message as that which is currently being handled for the current thread + /// and, depending on , attempts to handle the message. + /// + private void TransportMessageReceived(object sender, TransportMessageReceivedEventArgs e) + { + using (var child = this.Builder.CreateChildBuilder()) + this.HandleTransportMessage(child, e.Message); + } + private void HandleTransportMessage(IBuilder builder, TransportMessage msg) + { + Log.Debug("Received message with ID " + msg.Id + " from sender " + msg.ReturnAddress); + + _messageBeingHandled = msg; + + if (UnitOfWorkManager != null) + UnitOfWorkManager.Begin(); + + modules = new List(); + var mods = builder.BuildAll(); + if (mods != null) + modules.AddRange(mods); + + foreach (var module in modules) + { + Log.Debug("Calling 'HandleBeginMessage' on " + module.GetType().FullName); + module.HandleBeginMessage(); //don't need to call others if one fails + } + + if (IsInitializationMessage(msg)) + { + Log.Info(Address + " initialized."); + return; + } + + if (HandledSubscriptionMessage(msg, SubscriptionStorage, SubscriptionAuthorizer)) + { + var messageType = GetSubscriptionMessageTypeFrom(msg); + + if (msg.MessageIntent == MessageIntentEnum.Subscribe) + if (ClientSubscribed != null) + ClientSubscribed(this, new SubscriptionEventArgs { MessageType = messageType, SubscriberAddress = msg.ReturnAddress }); + + return; + } + + _handleCurrentMessageLaterWasCalled = false; + + if (MessageReceived != null) + MessageReceived(msg); + + if (!disableMessageHandling) + HandleMessage(builder, msg); + + Log.Debug("Finished handling message."); + } + + private static string GetSubscriptionMessageTypeFrom(TransportMessage msg) + { + return (from header in msg.Headers where header.Key == SubscriptionMessageType select header.Value).FirstOrDefault(); + } + + /// + /// Handles subscribe and unsubscribe requests managing the given subscription storage. + /// Returns true if the message was a subscription message. + /// + /// + /// + /// + /// + public static bool HandledSubscriptionMessage(TransportMessage msg, ISubscriptionStorage subscriptionStorage, IAuthorizeSubscriptions subscriptionAuthorizer) + { + string messageType = GetSubscriptionMessageTypeFrom(msg); + + Action warn = () => + { + var warning = string.Format("Subscription message from {0} arrived at this endpoint, yet this endpoint is not configured to be a publisher.", msg.ReturnAddress); + + Log.Warn(warning); + + if (Log.IsDebugEnabled) // only under debug, so that we don't expose ourselves to a denial of service + throw new InvalidOperationException(warning); // and cause message to go to error queue by throwing an exception + }; + + if (msg.MessageIntent == MessageIntentEnum.Subscribe) + if (subscriptionStorage != null) + { + bool goAhead = true; + if (subscriptionAuthorizer != null) + if (!subscriptionAuthorizer.AuthorizeSubscribe(messageType, msg.ReturnAddress, msg.Headers)) + { + goAhead = false; + Log.Debug(string.Format("Subscription request from {0} on message type {1} was refused.", msg.ReturnAddress, messageType)); + } + + if (goAhead) + { + Log.Info("Subscribing " + msg.ReturnAddress + " to message type " + messageType); + subscriptionStorage.Subscribe(msg.ReturnAddress, new[] { messageType }); + } + + return true; + } + else + { + warn(); + } + + if (msg.MessageIntent == MessageIntentEnum.Unsubscribe) + if (subscriptionStorage != null) + { + bool goAhead = true; + + if (subscriptionAuthorizer != null) + if (!subscriptionAuthorizer.AuthorizeUnsubscribe(messageType, msg.ReturnAddress, msg.Headers)) + { + goAhead = false; + Log.Debug(string.Format("Unsubscribe request from {0} on message type {1} was refused.", msg.ReturnAddress, messageType)); + } + + if (goAhead) + { + Log.Info("Unsubscribing " + msg.ReturnAddress + " from message type " + messageType); + subscriptionStorage.Unsubscribe(msg.ReturnAddress, new[] { messageType }); + } + + return true; + } + else + { + warn(); + } + + return false; + } + + private void TransportFinishedMessageProcessing(object sender, EventArgs e) + { + for (int i = modules.Count-1; i >= 0; i--) + { + Log.Debug("Calling 'HandleEndMessage' on " + modules[i].GetType().FullName); + modules[i].HandleEndMessage(); + } + + if (UnitOfWorkManager != null) + UnitOfWorkManager.End(); + } + + private void TransportFailedMessageProcessing(object sender, EventArgs e) + { + var exceptionThrown = false; + + for (int i = modules.Count - 1; i >= 0; i--) + try + { + Log.Debug("Calling 'HandleError' on " + modules[i].GetType().FullName); + modules[i].HandleError(); + } + catch (Exception ex) + { + Log.Error("Module " + modules[i].GetType().FullName + " failed when handling error.", ex); + exceptionThrown = true; + } + + if (UnitOfWorkManager != null) + UnitOfWorkManager.Error(); + + if (exceptionThrown) + throw new Exception("Could not handle the failed message processing correctly. Check for prior error messages in the log for more information."); + } + + private void TransportStartedMessageProcessing(object sender, EventArgs e) + { + } + + private bool IsInitializationMessage(TransportMessage msg) + { + if (msg.ReturnAddress == null) + return false; + + if (!msg.ReturnAddress.Contains(Address)) + return false; + + if (msg.CorrelationId != null) + return false; + + if (msg.MessageIntent != MessageIntentEnum.Init) + return false; + + return true; + } + + #endregion + + #region helper methods + bool IsSendOnlyEndpoint() + { + return string.IsNullOrEmpty(Address); + } + + /// + /// Sets up known types needed for XML serialization as well as + /// to which address to send which message. + /// + /// A dictionary of message_type, address pairs. + private void ConfigureMessageOwners(IDictionary owners) + { + foreach (DictionaryEntry de in owners) + { + var key = de.Key as string; + if (key == null) + continue; + + try + { + var messageType = Type.GetType(key, false); + if (messageType != null) + { + RegisterMessageType(messageType, de.Value as string, false); + continue; + } + } + catch (Exception ex) + { + Log.Error("Problem loading message type: " + key, ex); + } + + try + { + var a = Assembly.Load(key); + foreach (var t in a.GetTypes()) + RegisterMessageType(t, de.Value.ToString(), true); + } + catch (Exception ex) + { + throw new ArgumentException("Problem loading message assembly: " + key, ex); + } + } + } + + /// + /// Sends the Msg to the address found in the field + /// if it isn't null. + /// + /// The message to forward + private void ForwardMessageIfNecessary(TransportMessage m) + { + if (ForwardReceivedMessagesTo != null) + MessageSender.Send(m, ForwardReceivedMessagesTo); + } + + /// + /// Registers a message type to a destination. + /// + /// A message type implementing . + /// The address of the destination the message type is registered to. + /// + /// Indicates whether or not this registration call is related to a type configured from an + /// assembly. + /// + /// + /// Since the same message type may be configured specifically to one address + /// and via its assembly to a different address, the configuredByAssembly + /// parameter dictates that the specific message type data is to be used. + /// + public void RegisterMessageType(Type messageType, string destination, bool configuredByAssembly) + { + if (typeof(IMessage) == messageType) + return; + + if (typeof(IMessage).IsAssignableFrom(messageType)) + { + if (MustNotOverrideExistingConfiguration(messageType, configuredByAssembly)) + return; + + messageTypeToDestinationLookup[messageType] = destination; + + Log.Debug("Message " + messageType.FullName + " has been allocated to endpoint " + destination + "."); + + if (messageType.GetCustomAttributes(typeof(ExpressAttribute), true).Length == 0) + recoverableMessageTypes.Add(messageType); + + foreach (TimeToBeReceivedAttribute a in messageType.GetCustomAttributes(typeof(TimeToBeReceivedAttribute), true)) + timeToBeReceivedPerMessageType[messageType] = a.TimeToBeReceived; + + return; + } + } + + /// + /// Checks whether or not the existing configuration can be overridden for a message type. + /// + /// The type of message to check the configuration for. + /// + /// Indicates whether or not this check is related to a type configured from an + /// assembly. + /// + /// true if it is acceptable to override the configuration, otherwise false. + private bool MustNotOverrideExistingConfiguration(Type messageType, bool configuredByAssembly) + { + return messageTypeToDestinationLookup.ContainsKey(messageType) && configuredByAssembly; + } + + /// + /// Wraps the provided messages in an NServiceBus envelope, does not include destination. + /// + /// The messages to wrap. + /// The envelope containing the messages. + protected TransportMessage GetTransportMessageFor(params IMessage[] rawMessages) + { + var result = new TransportMessage + { + Headers = new Dictionary(), + ReturnAddress = Address + }; + + var messages = ApplyOutgoingMessageMutatorsTo(rawMessages).ToArray(); + + var ms = new MemoryStream(); + MessageSerializer.Serialize(messages, ms); + result.Body = ms.ToArray(); + + var mappers = Builder.BuildAll(); + mappers.ToList().ForEach(m => m.MapOutgoing(messages, result)); + + if (PropogateReturnAddressOnSend) + result.ReturnAddress = Address; + + var timeToBeReceived = TimeSpan.MaxValue; + + foreach (var message in messages) + { + if (recoverableMessageTypes.Contains(message.GetType())) + result.Recoverable = true; + + var span = GetTimeToBeReceivedForMessageType(message.GetType()); + timeToBeReceived = (span < timeToBeReceived ? span : timeToBeReceived); + } + + result.TimeToBeReceived = timeToBeReceived; + + return result; + } + + IEnumerable ApplyOutgoingMessageMutatorsTo(IEnumerable messages) + { + var mutators = Builder.BuildAll(); + + foreach (var originalMessage in messages) + { + + var mutatedMessage = originalMessage; + mutators.ToList().ForEach(m => + { + mutatedMessage = m.MutateOutgoing(mutatedMessage); + }); + + yield return mutatedMessage; + } + } + + private TimeSpan GetTimeToBeReceivedForMessageType(Type messageType) + { + var result = TimeSpan.MaxValue; + + timeToBeReceivedPerMessageTypeLocker.EnterReadLock(); + if (timeToBeReceivedPerMessageType.ContainsKey(messageType)) + { + result = timeToBeReceivedPerMessageType[messageType]; + timeToBeReceivedPerMessageTypeLocker.ExitReadLock(); + return result; + } + + var options = new List(); + foreach (var interfaceType in messageType.GetInterfaces()) + { + if (timeToBeReceivedPerMessageType.ContainsKey(interfaceType)) + options.Add(timeToBeReceivedPerMessageType[interfaceType]); + } + + timeToBeReceivedPerMessageTypeLocker.ExitReadLock(); + + if (options.Count > 0) + result = options.Min(); + + timeToBeReceivedPerMessageTypeLocker.EnterWriteLock(); + timeToBeReceivedPerMessageType[messageType] = result; + timeToBeReceivedPerMessageTypeLocker.ExitWriteLock(); + + return result; + } + + /// + /// Evaluates a type and loads it if it implements IMessageHander{T}. + /// + /// The type to evaluate. + private void IfTypeIsMessageHandlerThenLoad(Type t) + { + if (t.IsAbstract) + return; + + var skipHandlerRegistration = false; + if (typeof(ISaga).IsAssignableFrom(t)) + skipHandlerRegistration = true; + + foreach (var messageType in GetMessageTypesIfIsMessageHandler(t)) + { + if (skipHandlerRegistration) + continue; + + if (!handlerList.ContainsKey(t)) + handlerList.Add(t, new List()); + + if (!(handlerList[t].Contains(messageType))) + { + handlerList[t].Add(messageType); + Log.Debug(string.Format("Associated '{0}' message with '{1}' handler", messageType, t)); + } + + if (!handlerToMessageTypeToHandleMethodMap.ContainsKey(t)) + handlerToMessageTypeToHandleMethodMap.Add(t, new Dictionary()); + + MethodInfo h = GetMessageHandler(t, messageType); + + if (!(handlerToMessageTypeToHandleMethodMap[t].ContainsKey(messageType))) + handlerToMessageTypeToHandleMethodMap[t].Add(messageType, h); + } + } + + private static MethodInfo GetMessageHandler(Type targetType, Type messageType) + { + var method = targetType.GetMethod("Handle", new[] { messageType }); + if (method != null) return method; + + var handlerType = typeof(IMessageHandler<>).MakeGenericType(messageType); + return targetType.GetInterfaceMap(handlerType) + .TargetMethods + .FirstOrDefault(); + } + + + /// + /// If the type is a message handler, returns all the message types that it handles + /// + /// + /// + private static IEnumerable GetMessageTypesIfIsMessageHandler(Type type) + { + foreach (var t in type.GetInterfaces()) + { + if (t.IsGenericType) + { + var args = t.GetGenericArguments(); + if (args.Length != 1) + continue; + + if (!typeof(IMessage).IsAssignableFrom(args[0])) + continue; + + var handlerType = typeof(IMessageHandler<>).MakeGenericType(args[0]); + if (handlerType.IsAssignableFrom(t)) + yield return args[0]; + } + } + } + + /// + /// Gets a list of handler types associated with a message type. + /// + /// The type of message to get the handlers for. + /// The list of handler types associated with the message type. + private IEnumerable GetHandlerTypes(Type messageType) + { + foreach (var handlerType in handlerList.Keys) + foreach (var msgTypeHandled in handlerList[handlerType]) + if (msgTypeHandled.IsAssignableFrom(messageType)) + { + yield return handlerType; + break; + } + } + + /// + /// Returns all the message types which have handlers configured for them. + /// + /// + private IEnumerable GetMessageTypesHandledOnThisEndpoint() + { + foreach (var handlerType in handlerList.Keys) + foreach (var msgTypeHandled in handlerList[handlerType]) + yield return msgTypeHandled; + } + + /// + /// Uses the first message in the array to pass to . + /// + /// + /// + protected string GetDestinationForMessages(IMessage[] messages) + { + if (messages == null || messages.Length == 0) + return null; + + return GetDestinationForMessageType(messages[0].GetType()); + } + + /// + /// Gets the destination address for a message type. + /// + /// The message type to get the destination for. + /// The address of the destination associated with the message type. + protected string GetDestinationForMessageType(Type messageType) + { + string destination; + + lock (messageTypeToDestinationLookup) + messageTypeToDestinationLookup.TryGetValue(messageType, out destination); + + if (destination == string.Empty) + destination = null; + + if (destination == null) + { + if (messageType.IsInterface) + return null; + + if (messageMapper != null) + { + var t = messageMapper.GetMappedTypeFor(messageType); + if (t != null && t != messageType) + return GetDestinationForMessageType(t); + } + } + + return destination; + } + + /// + /// Throws an exception if the bus hasn't begun the startup process. + /// + protected void AssertBusIsStarted() + { + if (starting == false) + throw new InvalidOperationException("The bus is not started yet, call Bus.Start() before attempting to use the bus."); + } + + #endregion + + #region Fields + + /// + /// Gets/sets the subscription manager to use for the bus. + /// + protected SubscriptionsManager subscriptionsManager = new SubscriptionsManager(); + + /// + /// Thread-static list of message modules, needs to be initialized for every transport message + /// + [ThreadStatic] + static List modules; + + /// + /// Map of message IDs to Async Results - useful for cleanup in case of timeouts. + /// + protected readonly IDictionary messageIdToAsyncResultLookup = new Dictionary(); + + private readonly IDictionary> handlerList = new Dictionary>(); + private readonly IDictionary> handlerToMessageTypeToHandleMethodMap = new Dictionary>(); + private readonly IList recoverableMessageTypes = new List(); + + private readonly IDictionary timeToBeReceivedPerMessageType = new Dictionary(); + private readonly ReaderWriterLockSlim timeToBeReceivedPerMessageTypeLocker = new ReaderWriterLockSlim(); + + /// + /// Accessed by multiple threads - needs appropriate locking + /// + private readonly IDictionary messageTypeToDestinationLookup = new Dictionary(); + + /// + /// ThreadStatic + /// + [ThreadStatic] + static TransportMessage _messageBeingHandled; + + private volatile bool started; + private volatile bool starting; + private readonly object startLocker = new object(); + + private readonly static ILog Log = LogManager.GetLogger(typeof(UnicastBus)); + #endregion + } +} diff --git a/src/unicast/Unicast.sln b/src/unicast/Unicast.sln index 21dea77497d..42b8fcac46e 100644 --- a/src/unicast/Unicast.sln +++ b/src/unicast/Unicast.sln @@ -1,44 +1,44 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast", "NServiceBus.Unicast\NServiceBus.Unicast.csproj", "{EB2C42A2-70FD-4469-959B-C577470B001B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Subscriptions", "NServiceBus.Unicast.Subscriptions\NServiceBus.Unicast.Subscriptions.csproj", "{CD9FA43E-A56D-4B62-8245-F911B137EC09}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Config", "NServiceBus.Unicast.Config\NServiceBus.Unicast.Config.csproj", "{B6D6B021-F477-4C8C-B19E-9CB2ABBCA095}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Queuing", "NServiceBus.Unicast.Queuing\NServiceBus.Unicast.Queuing.csproj", "{04E1CE2E-C0F5-492B-BF5B-C7E9DABE92F7}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Tests", "NServiceBus.Unicast.Tests\NServiceBus.Unicast.Tests.csproj", "{E603F931-C7BA-4605-8AF6-11AD27EB9BE4}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {EB2C42A2-70FD-4469-959B-C577470B001B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {EB2C42A2-70FD-4469-959B-C577470B001B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {EB2C42A2-70FD-4469-959B-C577470B001B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {EB2C42A2-70FD-4469-959B-C577470B001B}.Release|Any CPU.Build.0 = Release|Any CPU - {CD9FA43E-A56D-4B62-8245-F911B137EC09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CD9FA43E-A56D-4B62-8245-F911B137EC09}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CD9FA43E-A56D-4B62-8245-F911B137EC09}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CD9FA43E-A56D-4B62-8245-F911B137EC09}.Release|Any CPU.Build.0 = Release|Any CPU - {B6D6B021-F477-4C8C-B19E-9CB2ABBCA095}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B6D6B021-F477-4C8C-B19E-9CB2ABBCA095}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B6D6B021-F477-4C8C-B19E-9CB2ABBCA095}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B6D6B021-F477-4C8C-B19E-9CB2ABBCA095}.Release|Any CPU.Build.0 = Release|Any CPU - {04E1CE2E-C0F5-492B-BF5B-C7E9DABE92F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {04E1CE2E-C0F5-492B-BF5B-C7E9DABE92F7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {04E1CE2E-C0F5-492B-BF5B-C7E9DABE92F7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {04E1CE2E-C0F5-492B-BF5B-C7E9DABE92F7}.Release|Any CPU.Build.0 = Release|Any CPU - {E603F931-C7BA-4605-8AF6-11AD27EB9BE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E603F931-C7BA-4605-8AF6-11AD27EB9BE4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E603F931-C7BA-4605-8AF6-11AD27EB9BE4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E603F931-C7BA-4605-8AF6-11AD27EB9BE4}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast", "NServiceBus.Unicast\NServiceBus.Unicast.csproj", "{EB2C42A2-70FD-4469-959B-C577470B001B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Subscriptions", "NServiceBus.Unicast.Subscriptions\NServiceBus.Unicast.Subscriptions.csproj", "{CD9FA43E-A56D-4B62-8245-F911B137EC09}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Config", "NServiceBus.Unicast.Config\NServiceBus.Unicast.Config.csproj", "{B6D6B021-F477-4C8C-B19E-9CB2ABBCA095}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Queuing", "NServiceBus.Unicast.Queuing\NServiceBus.Unicast.Queuing.csproj", "{04E1CE2E-C0F5-492B-BF5B-C7E9DABE92F7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Tests", "NServiceBus.Unicast.Tests\NServiceBus.Unicast.Tests.csproj", "{E603F931-C7BA-4605-8AF6-11AD27EB9BE4}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {EB2C42A2-70FD-4469-959B-C577470B001B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EB2C42A2-70FD-4469-959B-C577470B001B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EB2C42A2-70FD-4469-959B-C577470B001B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EB2C42A2-70FD-4469-959B-C577470B001B}.Release|Any CPU.Build.0 = Release|Any CPU + {CD9FA43E-A56D-4B62-8245-F911B137EC09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CD9FA43E-A56D-4B62-8245-F911B137EC09}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CD9FA43E-A56D-4B62-8245-F911B137EC09}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CD9FA43E-A56D-4B62-8245-F911B137EC09}.Release|Any CPU.Build.0 = Release|Any CPU + {B6D6B021-F477-4C8C-B19E-9CB2ABBCA095}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B6D6B021-F477-4C8C-B19E-9CB2ABBCA095}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B6D6B021-F477-4C8C-B19E-9CB2ABBCA095}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B6D6B021-F477-4C8C-B19E-9CB2ABBCA095}.Release|Any CPU.Build.0 = Release|Any CPU + {04E1CE2E-C0F5-492B-BF5B-C7E9DABE92F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {04E1CE2E-C0F5-492B-BF5B-C7E9DABE92F7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {04E1CE2E-C0F5-492B-BF5B-C7E9DABE92F7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {04E1CE2E-C0F5-492B-BF5B-C7E9DABE92F7}.Release|Any CPU.Build.0 = Release|Any CPU + {E603F931-C7BA-4605-8AF6-11AD27EB9BE4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E603F931-C7BA-4605-8AF6-11AD27EB9BE4}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E603F931-C7BA-4605-8AF6-11AD27EB9BE4}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E603F931-C7BA-4605-8AF6-11AD27EB9BE4}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/unicastTransport/NServiceBus.Unicast.Transport.sln b/src/unicastTransport/NServiceBus.Unicast.Transport.sln index 93f4329430f..6d70837d9e0 100644 --- a/src/unicastTransport/NServiceBus.Unicast.Transport.sln +++ b/src/unicastTransport/NServiceBus.Unicast.Transport.sln @@ -1,20 +1,20 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Transport", "NServiceBus.Unicast.Transport\NServiceBus.Unicast.Transport.csproj", "{D9628493-605A-4259-ADD3-7732F0DEFFBB}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D9628493-605A-4259-ADD3-7732F0DEFFBB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D9628493-605A-4259-ADD3-7732F0DEFFBB}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D9628493-605A-4259-ADD3-7732F0DEFFBB}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D9628493-605A-4259-ADD3-7732F0DEFFBB}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Unicast.Transport", "NServiceBus.Unicast.Transport\NServiceBus.Unicast.Transport.csproj", "{D9628493-605A-4259-ADD3-7732F0DEFFBB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D9628493-605A-4259-ADD3-7732F0DEFFBB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D9628493-605A-4259-ADD3-7732F0DEFFBB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D9628493-605A-4259-ADD3-7732F0DEFFBB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D9628493-605A-4259-ADD3-7732F0DEFFBB}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/unicastTransport/NServiceBus.Unicast.Transport/CompletionMessage.cs b/src/unicastTransport/NServiceBus.Unicast.Transport/CompletionMessage.cs index 3793b59a726..23e44ef6143 100644 --- a/src/unicastTransport/NServiceBus.Unicast.Transport/CompletionMessage.cs +++ b/src/unicastTransport/NServiceBus.Unicast.Transport/CompletionMessage.cs @@ -1,16 +1,16 @@ -using System; - -namespace NServiceBus.Unicast.Transport -{ - /// - /// A message that will be sent on completion or error of an NServiceBus message. - /// - [Serializable] - public class CompletionMessage : IMessage - { - /// - /// Gets/sets a code specifying the type of error that occurred. - /// - public int ErrorCode { get; set; } - } -} +using System; + +namespace NServiceBus.Unicast.Transport +{ + /// + /// A message that will be sent on completion or error of an NServiceBus message. + /// + [Serializable] + public class CompletionMessage : IMessage + { + /// + /// Gets/sets a code specifying the type of error that occurred. + /// + public int ErrorCode { get; set; } + } +} diff --git a/src/unicastTransport/NServiceBus.Unicast.Transport/ITransport.cs b/src/unicastTransport/NServiceBus.Unicast.Transport/ITransport.cs index 351b27cb9c1..68c565800f1 100644 --- a/src/unicastTransport/NServiceBus.Unicast.Transport/ITransport.cs +++ b/src/unicastTransport/NServiceBus.Unicast.Transport/ITransport.cs @@ -1,59 +1,59 @@ -using System; - -namespace NServiceBus.Unicast.Transport -{ - /// - /// Defines the basic functionality of a transport to be used by NServiceBus. - /// - public interface ITransport : IDisposable - { - /// - /// Starts the transport. - /// - /// - /// The adress of a local queue that should be used as input channel for this transport - void Start(string inputqueue); - - /// - /// Gets the number of worker threads currently running in the transport. - /// - int NumberOfWorkerThreads { get; } - - /// - /// Changes the number of worker threads running in the transport. - /// This may stop active worker threads; those threads will finish - /// processing their current message and then exit. - /// - /// - /// The requested number of active worker threads after - /// the necessary threads have been stopped or started. - /// - void ChangeNumberOfWorkerThreads(int targetNumberOfWorkerThreads); - - /// - /// Raised when a message is received. - /// - event EventHandler TransportMessageReceived; - - /// - /// Raised when a message is available but before is raised. - /// - event EventHandler StartedMessageProcessing; - - /// - /// Raised after message processing was completed, even in case of an exception in message processing. - /// - event EventHandler FinishedMessageProcessing; - - /// - /// Raised if an exception was encountered at any point in the processing - including - /// when the transaction commits. - /// - event EventHandler FailedMessageProcessing; - - /// - /// Causes the current message being handled to return to the queue. - /// - void AbortHandlingCurrentMessage(); - } -} +using System; + +namespace NServiceBus.Unicast.Transport +{ + /// + /// Defines the basic functionality of a transport to be used by NServiceBus. + /// + public interface ITransport : IDisposable + { + /// + /// Starts the transport. + /// + /// + /// The adress of a local queue that should be used as input channel for this transport + void Start(string inputqueue); + + /// + /// Gets the number of worker threads currently running in the transport. + /// + int NumberOfWorkerThreads { get; } + + /// + /// Changes the number of worker threads running in the transport. + /// This may stop active worker threads; those threads will finish + /// processing their current message and then exit. + /// + /// + /// The requested number of active worker threads after + /// the necessary threads have been stopped or started. + /// + void ChangeNumberOfWorkerThreads(int targetNumberOfWorkerThreads); + + /// + /// Raised when a message is received. + /// + event EventHandler TransportMessageReceived; + + /// + /// Raised when a message is available but before is raised. + /// + event EventHandler StartedMessageProcessing; + + /// + /// Raised after message processing was completed, even in case of an exception in message processing. + /// + event EventHandler FinishedMessageProcessing; + + /// + /// Raised if an exception was encountered at any point in the processing - including + /// when the transaction commits. + /// + event EventHandler FailedMessageProcessing; + + /// + /// Causes the current message being handled to return to the queue. + /// + void AbortHandlingCurrentMessage(); + } +} diff --git a/src/unicastTransport/NServiceBus.Unicast.Transport/MessageIntentEnum.cs b/src/unicastTransport/NServiceBus.Unicast.Transport/MessageIntentEnum.cs index 895a8f30d9d..c936f0b24c5 100644 --- a/src/unicastTransport/NServiceBus.Unicast.Transport/MessageIntentEnum.cs +++ b/src/unicastTransport/NServiceBus.Unicast.Transport/MessageIntentEnum.cs @@ -1,33 +1,33 @@ -namespace NServiceBus.Unicast.Transport -{ - /// - /// Enumeration defining different kinds of message intent like Send and Publish. - /// - public enum MessageIntentEnum - { - /// - /// Initialization - /// - Init, - - /// - /// Regular point-to-point send - /// - Send, - - /// - /// Publish, not a regular point-to-point send - /// - Publish, - - /// - /// Subscribe - /// - Subscribe, - - /// - /// Unsubscribe - /// - Unsubscribe - } -} +namespace NServiceBus.Unicast.Transport +{ + /// + /// Enumeration defining different kinds of message intent like Send and Publish. + /// + public enum MessageIntentEnum + { + /// + /// Initialization + /// + Init, + + /// + /// Regular point-to-point send + /// + Send, + + /// + /// Publish, not a regular point-to-point send + /// + Publish, + + /// + /// Subscribe + /// + Subscribe, + + /// + /// Unsubscribe + /// + Unsubscribe + } +} diff --git a/src/unicastTransport/NServiceBus.Unicast.Transport/NServiceBus.Unicast.Transport.csproj b/src/unicastTransport/NServiceBus.Unicast.Transport/NServiceBus.Unicast.Transport.csproj index 12678b96513..f40f1d8f7af 100644 --- a/src/unicastTransport/NServiceBus.Unicast.Transport/NServiceBus.Unicast.Transport.csproj +++ b/src/unicastTransport/NServiceBus.Unicast.Transport/NServiceBus.Unicast.Transport.csproj @@ -1,74 +1,74 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {D9628493-605A-4259-ADD3-7732F0DEFFBB} - Library - Properties - NServiceBus.Unicast.Transport - NServiceBus.Unicast.Transport - - - - - v4.0 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.Unicast.Transport.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.Unicast.Transport.XML - - - - False - ..\..\..\build\output\NServiceBus.dll - - - - 3.5 - - - - - - CommonAssemblyInfo.cs - - - - - - - - - - - - - - copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\build\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {D9628493-605A-4259-ADD3-7732F0DEFFBB} + Library + Properties + NServiceBus.Unicast.Transport + NServiceBus.Unicast.Transport + + + + + v4.0 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.Unicast.Transport.XML + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.Unicast.Transport.XML + + + + False + ..\..\..\build\output\NServiceBus.dll + + + + 3.5 + + + + + + CommonAssemblyInfo.cs + + + + + + + + + + + + + + copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\build\" + \ No newline at end of file diff --git a/src/unicastTransport/NServiceBus.Unicast.Transport/Properties/AssemblyInfo.cs b/src/unicastTransport/NServiceBus.Unicast.Transport/Properties/AssemblyInfo.cs index eb0e7abfcbb..fac5a06c0ed 100644 --- a/src/unicastTransport/NServiceBus.Unicast.Transport/Properties/AssemblyInfo.cs +++ b/src/unicastTransport/NServiceBus.Unicast.Transport/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Unicast Transport Interfaces")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Unicast Transport Interfaces")] [assembly: AssemblyDescription("Interfaces for unicast transport communication in nServiceBus")] \ No newline at end of file diff --git a/src/unicastTransport/NServiceBus.Unicast.Transport/SubscriptionMessage.cs b/src/unicastTransport/NServiceBus.Unicast.Transport/SubscriptionMessage.cs index 98984b13f6b..24209f053d9 100644 --- a/src/unicastTransport/NServiceBus.Unicast.Transport/SubscriptionMessage.cs +++ b/src/unicastTransport/NServiceBus.Unicast.Transport/SubscriptionMessage.cs @@ -1,57 +1,57 @@ -using System; - -namespace NServiceBus.Unicast.Transport -{ - /// - /// A message representing a subscribe/unsubscribe request to receive messages - /// of a specific type. - /// - [Serializable] - public class SubscriptionMessage : IMessage - { - /// - /// Initializes a new SubscriptionMessage. - /// - public SubscriptionMessage() { } - - /// - /// Initializes a new SubscriptionMessage for the specified message type - /// that indicates whether to add or remove a subscription. - /// - /// - /// - public SubscriptionMessage(string typeName, SubscriptionType subscriptionType) - { - TypeName = typeName; - SubscriptionType = subscriptionType; - } - - /// - /// Gets/sets the name of the message type to subscribe to or - /// unsubscribe from. - /// - public string TypeName { get; set; } - - /// - /// Gets/sets whether the SubscriptionMessage is to add or - /// remove a subscription. - /// - public SubscriptionType SubscriptionType { get; set; } - } - - /// - /// Describes subscription message types. - /// - public enum SubscriptionType - { - /// - /// Add a subscription. - /// - Add, - - /// - /// Remove a subscription. - /// - Remove - } -} +using System; + +namespace NServiceBus.Unicast.Transport +{ + /// + /// A message representing a subscribe/unsubscribe request to receive messages + /// of a specific type. + /// + [Serializable] + public class SubscriptionMessage : IMessage + { + /// + /// Initializes a new SubscriptionMessage. + /// + public SubscriptionMessage() { } + + /// + /// Initializes a new SubscriptionMessage for the specified message type + /// that indicates whether to add or remove a subscription. + /// + /// + /// + public SubscriptionMessage(string typeName, SubscriptionType subscriptionType) + { + TypeName = typeName; + SubscriptionType = subscriptionType; + } + + /// + /// Gets/sets the name of the message type to subscribe to or + /// unsubscribe from. + /// + public string TypeName { get; set; } + + /// + /// Gets/sets whether the SubscriptionMessage is to add or + /// remove a subscription. + /// + public SubscriptionType SubscriptionType { get; set; } + } + + /// + /// Describes subscription message types. + /// + public enum SubscriptionType + { + /// + /// Add a subscription. + /// + Add, + + /// + /// Remove a subscription. + /// + Remove + } +} diff --git a/src/unicastTransport/NServiceBus.Unicast.Transport/TransportMessage.cs b/src/unicastTransport/NServiceBus.Unicast.Transport/TransportMessage.cs index ca77de29f8f..72a7c412bfc 100644 --- a/src/unicastTransport/NServiceBus.Unicast.Transport/TransportMessage.cs +++ b/src/unicastTransport/NServiceBus.Unicast.Transport/TransportMessage.cs @@ -1,76 +1,76 @@ -using System; -using System.Collections.Generic; - -namespace NServiceBus.Unicast.Transport -{ - /// - /// An envelope used by NServiceBus to package messages for transmission. - /// - /// - /// All messages sent and received by NServiceBus are wrapped in this class. - /// More than one message can be bundled in the envelope to be transmitted or - /// received by the bus. - /// - [Serializable] - public class TransportMessage - { - /// - /// Gets/sets the identifier of this message bundle. - /// - public string Id { get; set; } - - /// - /// Gets/sets the identifier that is copied to . - /// - public string IdForCorrelation { get; set; } - - /// - /// Gets/sets the uniqe identifier of another message bundle - /// this message bundle is associated with. - /// - public string CorrelationId { get; set; } - - /// - /// Gets/sets the return address of the message bundle. - /// - public string ReturnAddress { get; set; } - - /// - /// Gets/sets whether or not the message is supposed to - /// be guaranteed deliverable. - /// - public bool Recoverable { get; set; } - - /// - /// Indicates to the infrastructure the message intent (publish, or regular send). - /// - public MessageIntentEnum MessageIntent { get; set; } - - private TimeSpan timeToBeReceived = TimeSpan.MaxValue; - - /// - /// Gets/sets the maximum time limit in which the message bundle - /// must be received. - /// - public TimeSpan TimeToBeReceived - { - get { return timeToBeReceived; } - set { timeToBeReceived = value; } - } - - /// - /// Gets/sets the time that the message was sent by the source machine. - /// - public DateTime TimeSent { get; set; } - - /// - /// Gets/sets other applicative out-of-band information. - /// - public Dictionary Headers { get; set; } - - /// - /// Gets/sets a byte array to the body content of the message - /// - public byte[] Body { get; set; } - } -} +using System; +using System.Collections.Generic; + +namespace NServiceBus.Unicast.Transport +{ + /// + /// An envelope used by NServiceBus to package messages for transmission. + /// + /// + /// All messages sent and received by NServiceBus are wrapped in this class. + /// More than one message can be bundled in the envelope to be transmitted or + /// received by the bus. + /// + [Serializable] + public class TransportMessage + { + /// + /// Gets/sets the identifier of this message bundle. + /// + public string Id { get; set; } + + /// + /// Gets/sets the identifier that is copied to . + /// + public string IdForCorrelation { get; set; } + + /// + /// Gets/sets the uniqe identifier of another message bundle + /// this message bundle is associated with. + /// + public string CorrelationId { get; set; } + + /// + /// Gets/sets the return address of the message bundle. + /// + public string ReturnAddress { get; set; } + + /// + /// Gets/sets whether or not the message is supposed to + /// be guaranteed deliverable. + /// + public bool Recoverable { get; set; } + + /// + /// Indicates to the infrastructure the message intent (publish, or regular send). + /// + public MessageIntentEnum MessageIntent { get; set; } + + private TimeSpan timeToBeReceived = TimeSpan.MaxValue; + + /// + /// Gets/sets the maximum time limit in which the message bundle + /// must be received. + /// + public TimeSpan TimeToBeReceived + { + get { return timeToBeReceived; } + set { timeToBeReceived = value; } + } + + /// + /// Gets/sets the time that the message was sent by the source machine. + /// + public DateTime TimeSent { get; set; } + + /// + /// Gets/sets other applicative out-of-band information. + /// + public Dictionary Headers { get; set; } + + /// + /// Gets/sets a byte array to the body content of the message + /// + public byte[] Body { get; set; } + } +} diff --git a/src/unicastTransport/NServiceBus.Unicast.Transport/TransportMessageHandlingFailedException.cs b/src/unicastTransport/NServiceBus.Unicast.Transport/TransportMessageHandlingFailedException.cs index 8265e276be5..81fdd40b826 100644 --- a/src/unicastTransport/NServiceBus.Unicast.Transport/TransportMessageHandlingFailedException.cs +++ b/src/unicastTransport/NServiceBus.Unicast.Transport/TransportMessageHandlingFailedException.cs @@ -1,24 +1,24 @@ -using System; - -namespace NServiceBus.Unicast.Transport -{ - /// - /// Exception used to transport exceptions encountered in messagehandlers - /// - public class TransportMessageHandlingFailedException : Exception - { - /// - /// The exception that got thrown from the messagehandler - /// - public Exception OriginalException { get; set; } - - /// - /// Constructor - /// - /// - public TransportMessageHandlingFailedException(Exception originalException) - { - OriginalException = originalException; - } - } +using System; + +namespace NServiceBus.Unicast.Transport +{ + /// + /// Exception used to transport exceptions encountered in messagehandlers + /// + public class TransportMessageHandlingFailedException : Exception + { + /// + /// The exception that got thrown from the messagehandler + /// + public Exception OriginalException { get; set; } + + /// + /// Constructor + /// + /// + public TransportMessageHandlingFailedException(Exception originalException) + { + OriginalException = originalException; + } + } } \ No newline at end of file diff --git a/src/unicastTransport/NServiceBus.Unicast.Transport/TransportMessageReceivedEventArgs.cs b/src/unicastTransport/NServiceBus.Unicast.Transport/TransportMessageReceivedEventArgs.cs index 1240e6b1782..44af920145c 100644 --- a/src/unicastTransport/NServiceBus.Unicast.Transport/TransportMessageReceivedEventArgs.cs +++ b/src/unicastTransport/NServiceBus.Unicast.Transport/TransportMessageReceivedEventArgs.cs @@ -1,30 +1,30 @@ -using System; - -namespace NServiceBus.Unicast.Transport -{ - /// - /// Defines the arguments passed to the event handler of the - /// event. - /// - public class TransportMessageReceivedEventArgs : EventArgs - { - /// - /// Initializes a new TransportMessageReceivedEventArgs. - /// - /// The message that was received. - public TransportMessageReceivedEventArgs(TransportMessage m) - { - message = m; - } - - private readonly TransportMessage message; - - /// - /// Gets the message received. - /// - public TransportMessage Message - { - get { return message; } - } - } -} +using System; + +namespace NServiceBus.Unicast.Transport +{ + /// + /// Defines the arguments passed to the event handler of the + /// event. + /// + public class TransportMessageReceivedEventArgs : EventArgs + { + /// + /// Initializes a new TransportMessageReceivedEventArgs. + /// + /// The message that was received. + public TransportMessageReceivedEventArgs(TransportMessage m) + { + message = m; + } + + private readonly TransportMessage message; + + /// + /// Gets the message received. + /// + public TransportMessage Message + { + get { return message; } + } + } +} diff --git a/src/unitofwork/NServiceBus.UnitOfWork/IManageUnitsOfWork.cs b/src/unitofwork/NServiceBus.UnitOfWork/IManageUnitsOfWork.cs index 95f65591af2..6c4e9cf61dd 100644 --- a/src/unitofwork/NServiceBus.UnitOfWork/IManageUnitsOfWork.cs +++ b/src/unitofwork/NServiceBus.UnitOfWork/IManageUnitsOfWork.cs @@ -1,24 +1,24 @@ -namespace NServiceBus.UnitOfWork -{ - /// - /// Interface used by NServiceBus to manage units of work as a part of the - /// message processing pipeline. - /// - public interface IManageUnitsOfWork - { - /// - /// Called before all message handlers and modules - /// - void Begin(); - - /// - /// Called after all message handlers and modules - /// - void End(); - - /// - /// Called in the case there was an exception during the message processing - /// - void Error(); - } -} +namespace NServiceBus.UnitOfWork +{ + /// + /// Interface used by NServiceBus to manage units of work as a part of the + /// message processing pipeline. + /// + public interface IManageUnitsOfWork + { + /// + /// Called before all message handlers and modules + /// + void Begin(); + + /// + /// Called after all message handlers and modules + /// + void End(); + + /// + /// Called in the case there was an exception during the message processing + /// + void Error(); + } +} diff --git a/src/unitofwork/NServiceBus.UnitOfWork/NServiceBus.UnitOfWork.csproj b/src/unitofwork/NServiceBus.UnitOfWork/NServiceBus.UnitOfWork.csproj index 380bdf9af76..ff4645913d5 100644 --- a/src/unitofwork/NServiceBus.UnitOfWork/NServiceBus.UnitOfWork.csproj +++ b/src/unitofwork/NServiceBus.UnitOfWork/NServiceBus.UnitOfWork.csproj @@ -1,63 +1,63 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {5664D546-9F42-4DED-9BC1-B6799D3A6AD0} - Library - Properties - NServiceBus.UnitOfWork - NServiceBus.UnitOfWork - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.UnitOfWork.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - 3.5 - - - 3.5 - - - 3.5 - - - - - - - CommonAssemblyInfo.cs - - - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {5664D546-9F42-4DED-9BC1-B6799D3A6AD0} + Library + Properties + NServiceBus.UnitOfWork + NServiceBus.UnitOfWork + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.UnitOfWork.XML + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + 3.5 + + + 3.5 + + + 3.5 + + + + + + + CommonAssemblyInfo.cs + + + + + + \ No newline at end of file diff --git a/src/unitofwork/NServiceBus.UnitOfWork/Properties/AssemblyInfo.cs b/src/unitofwork/NServiceBus.UnitOfWork/Properties/AssemblyInfo.cs index a18d9eff884..8334715d63e 100644 --- a/src/unitofwork/NServiceBus.UnitOfWork/Properties/AssemblyInfo.cs +++ b/src/unitofwork/NServiceBus.UnitOfWork/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Unit of Work Interfaces")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Unit of Work Interfaces")] [assembly: AssemblyDescription("Interfaces for unit of work management in NServiceBus")] \ No newline at end of file diff --git a/src/unitofwork/unitofwork.sln b/src/unitofwork/unitofwork.sln index 000fa78145a..1015a86dfb4 100644 --- a/src/unitofwork/unitofwork.sln +++ b/src/unitofwork/unitofwork.sln @@ -1,20 +1,20 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.UnitOfWork", "NServiceBus.UnitOfWork\NServiceBus.UnitOfWork.csproj", "{5664D546-9F42-4DED-9BC1-B6799D3A6AD0}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {5664D546-9F42-4DED-9BC1-B6799D3A6AD0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5664D546-9F42-4DED-9BC1-B6799D3A6AD0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5664D546-9F42-4DED-9BC1-B6799D3A6AD0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5664D546-9F42-4DED-9BC1-B6799D3A6AD0}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.UnitOfWork", "NServiceBus.UnitOfWork\NServiceBus.UnitOfWork.csproj", "{5664D546-9F42-4DED-9BC1-B6799D3A6AD0}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5664D546-9F42-4DED-9BC1-B6799D3A6AD0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5664D546-9F42-4DED-9BC1-B6799D3A6AD0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5664D546-9F42-4DED-9BC1-B6799D3A6AD0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5664D546-9F42-4DED-9BC1-B6799D3A6AD0}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/utils/DtcUtil.cs b/src/utils/DtcUtil.cs index 66ddf436802..2a6173eed8e 100644 --- a/src/utils/DtcUtil.cs +++ b/src/utils/DtcUtil.cs @@ -1,71 +1,71 @@ -using System; -using System.Collections.Generic; -using System.ServiceProcess; -using Common.Logging; -using Microsoft.Win32; - -namespace NServiceBus.Utils -{ - /// - /// Utility class for working with DTC. - /// - public static class DtcUtil - { - /// - /// Checks that the MSDTC service is running and configured correctly, and if not - /// takes the necessary corrective actions to make it so. - /// - public static void StartDtcIfNecessary() - { - if (DoesSecurityConfigurationRequireRestart()) - ProcessUtil.ChangeServiceStatus(Controller, ServiceControllerStatus.Stopped, Controller.Stop); - - ProcessUtil.ChangeServiceStatus(Controller, ServiceControllerStatus.Running, Controller.Start); - - Logger.Debug("DTC is good."); - } - - private static bool DoesSecurityConfigurationRequireRestart() - { - Logger.Debug("Checking that DTC is configured correctly."); - - if (DoesSecurityConfigurationRequireRestart(false)) - { - Logger.Debug("DTC not configured correctly. Going to fix. This will require a restart of the DTC service."); - - DoesSecurityConfigurationRequireRestart(true); - - Logger.Debug("DTC configuration fixed."); - - return true; - } - - Logger.Debug("DTC is configured correctly."); - return false; - } - - private static bool DoesSecurityConfigurationRequireRestart(bool doChanges) - { - var key = Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\MSDTC\Security", doChanges); - if (key == null) - throw new InvalidOperationException("MSDTC could not be found in the registry. Cannot continue."); - - var needToChange = false; - foreach (var val in RegValues) - if ((int)key.GetValue(val) == 0) - if (doChanges) - key.SetValue(val, 1, RegistryValueKind.DWord); - else - needToChange = true; - - key.Close(); - - return needToChange; - } - - private static readonly ServiceController Controller = new ServiceController { ServiceName = "MSDTC", MachineName = "." }; - private static readonly List RegValues = new List(new[] {"NetworkDtcAccess", "NetworkDtcAccessOutbound", "NetworkDtcAccessTransactions", "XaTransactions"}); - - private static readonly ILog Logger = LogManager.GetLogger("NServiceBus.Utils"); - } -} +using System; +using System.Collections.Generic; +using System.ServiceProcess; +using Common.Logging; +using Microsoft.Win32; + +namespace NServiceBus.Utils +{ + /// + /// Utility class for working with DTC. + /// + public static class DtcUtil + { + /// + /// Checks that the MSDTC service is running and configured correctly, and if not + /// takes the necessary corrective actions to make it so. + /// + public static void StartDtcIfNecessary() + { + if (DoesSecurityConfigurationRequireRestart()) + ProcessUtil.ChangeServiceStatus(Controller, ServiceControllerStatus.Stopped, Controller.Stop); + + ProcessUtil.ChangeServiceStatus(Controller, ServiceControllerStatus.Running, Controller.Start); + + Logger.Debug("DTC is good."); + } + + private static bool DoesSecurityConfigurationRequireRestart() + { + Logger.Debug("Checking that DTC is configured correctly."); + + if (DoesSecurityConfigurationRequireRestart(false)) + { + Logger.Debug("DTC not configured correctly. Going to fix. This will require a restart of the DTC service."); + + DoesSecurityConfigurationRequireRestart(true); + + Logger.Debug("DTC configuration fixed."); + + return true; + } + + Logger.Debug("DTC is configured correctly."); + return false; + } + + private static bool DoesSecurityConfigurationRequireRestart(bool doChanges) + { + var key = Registry.LocalMachine.OpenSubKey(@"Software\Microsoft\MSDTC\Security", doChanges); + if (key == null) + throw new InvalidOperationException("MSDTC could not be found in the registry. Cannot continue."); + + var needToChange = false; + foreach (var val in RegValues) + if ((int)key.GetValue(val) == 0) + if (doChanges) + key.SetValue(val, 1, RegistryValueKind.DWord); + else + needToChange = true; + + key.Close(); + + return needToChange; + } + + private static readonly ServiceController Controller = new ServiceController { ServiceName = "MSDTC", MachineName = "." }; + private static readonly List RegValues = new List(new[] {"NetworkDtcAccess", "NetworkDtcAccessOutbound", "NetworkDtcAccessTransactions", "XaTransactions"}); + + private static readonly ILog Logger = LogManager.GetLogger("NServiceBus.Utils"); + } +} diff --git a/src/utils/MsmqInstallation.cs b/src/utils/MsmqInstallation.cs index 8e2c0aabb6a..bdd01e5681a 100644 --- a/src/utils/MsmqInstallation.cs +++ b/src/utils/MsmqInstallation.cs @@ -1,260 +1,260 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.IO; -using System.ServiceProcess; -using Microsoft.Win32; -using Common.Logging; - -namespace NServiceBus.Utils -{ - /// - /// Utility class for starting and installing MSMQ. - /// - public static class MsmqInstallation - { - /// - /// Checks that MSMQ is installed, configured correctly, and started, and if not - /// takes the necessary corrective actions to make it so. - /// - public static void StartMsmqIfNecessary() - { - InstallMsmqIfNecessary(); - - var controller = new ServiceController { ServiceName = "MSMQ", MachineName = "." }; - - ProcessUtil.ChangeServiceStatus(controller, ServiceControllerStatus.Running, controller.Start); - } - - - - private static bool IsMsmqInstalled() - { - var dll = LoadLibraryW("Mqrt.dll"); - return (dll != IntPtr.Zero); - } - - /// - /// Determines if the msmq installation on the current machine is ok - /// - /// - public static bool IsInstallationGood() - { - var msmqSetup = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\MSMQ\Setup"); - if (msmqSetup == null) - return false; - - var installedComponents = new List(msmqSetup.GetValueNames()); - msmqSetup.Close(); - - return HasOnlyNeededComponents(installedComponents); - } - - private static void InstallMsmqIfNecessary() - { - Logger.Debug("Checking if MSMQ is installed."); - if (IsMsmqInstalled()) - { - Logger.Debug("MSMQ is installed."); - Logger.Debug("Checking that only needed components are active."); - - if (IsInstallationGood()) - { - Logger.Debug("Installation is good."); - return; - } - - Logger.Debug("Installation isn't good."); - Logger.Debug("Going to re-install MSMQ. A reboot may be required."); - - PerformFunctionDependingOnOS( - () => Process.Start(OcSetup, VistaOcSetupParams + Uninstall), - () => Process.Start(OcSetup, Server2008OcSetupParams + Uninstall), - InstallMsmqOnXpOrServer2003 - ); - - Logger.Debug("Installation of MSMQ successful."); - - return; - } - - Logger.Debug("MSMQ is not installed. Going to install."); - - PerformFunctionDependingOnOS( - () => Process.Start(OcSetup, VistaOcSetupParams), - () => Process.Start(OcSetup, Server2008OcSetupParams), - InstallMsmqOnXpOrServer2003 - ); - - Logger.Debug("Installation of MSMQ successful."); - } - - private static void PerformFunctionDependingOnOS(Func vistaFunc, Func server2008Func, Func xpAndServer2003Func) - { - var os = GetOperatingSystem(); - - Process process = null; - switch (os) - { - case OperatingSystemEnum.Vista: - - process = vistaFunc(); - break; - - case OperatingSystemEnum.Server2008: - - process = server2008Func(); - break; - - case OperatingSystemEnum.XpOrServer2003: - - process = xpAndServer2003Func(); - break; - - default: - - Logger.Warn("OS not supported."); - break; - } - - if (process == null) return; - - Logger.Debug("Waiting for process to complete."); - process.WaitForExit(); - } - - private static Process InstallMsmqOnXpOrServer2003() - { - var p = Path.GetTempFileName(); - - Logger.Debug("Creating installation instruction file."); - - using (var sw = File.CreateText(p)) - { - sw.WriteLine("[Version]"); - sw.WriteLine("Signature = \"$Windows NT$\""); - sw.WriteLine(); - sw.WriteLine("[Global]"); - sw.WriteLine("FreshMode = Custom"); - sw.WriteLine("MaintenanceMode = RemoveAll"); - sw.WriteLine("UpgradeMode = UpgradeOnly"); - sw.WriteLine(); - sw.WriteLine("[Components]"); - - foreach (var s in RequiredMsmqComponentsXp) - sw.WriteLine(s + " = ON"); - - foreach (var s in UndesirableMsmqComponentsXp) - sw.WriteLine(s + " = OFF"); - - sw.Flush(); - } - - Logger.Debug("Installation instruction file created."); - Logger.Debug("Invoking MSMQ installation."); - - return Process.Start("sysocmgr", "/i:sysoc.inf /x /q /w /u:%temp%\\" + Path.GetFileName(p)); - } - - private static OperatingSystemEnum GetOperatingSystem() - { - var osvi = new OSVersionInfoEx(); - osvi.OSVersionInfoSize = (UInt32)Marshal.SizeOf(typeof(OSVersionInfoEx)); - - GetVersionEx(osvi); - - switch (Environment.OSVersion.Version.Major) - { - case 6: - - if (osvi.ProductType == VER_NT_WORKSTATION) - return OperatingSystemEnum.Vista; - - return OperatingSystemEnum.Server2008; - - case 5: - return OperatingSystemEnum.XpOrServer2003; - } - - return OperatingSystemEnum.DontCare; - } - - private static bool HasOnlyNeededComponents(IEnumerable installedComponents) - { - var needed = new List(RequiredMsmqComponentsXp); - - foreach (var i in installedComponents) - { - if (UndesirableMsmqComponentsXp.Contains(i)) - { - Logger.Warn("Undesirable MSMQ component installed: " + i); - return false; - } - - if (UndesirableMsmqComponentsV4.Contains(i)) - { - Logger.Warn("Undesirable MSMQ component installed: " + i); - return false; - } - - needed.Remove(i); - } - - if (needed.Count == 0) - return true; - - return false; - } - - /// Return Type: HMODULE->HINSTANCE->HINSTANCE__* - ///lpLibFileName: LPCWSTR->WCHAR* - [DllImportAttribute("kernel32.dll", EntryPoint = "LoadLibraryW")] - static extern IntPtr LoadLibraryW([InAttribute()] [MarshalAsAttribute(UnmanagedType.LPWStr)] string lpLibFileName); - - - [DllImport("Kernel32", CharSet=CharSet.Auto)] - static extern Boolean GetVersionEx([Out][In]OSVersionInfo versionInformation); - - - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] - class OSVersionInfoEx : OSVersionInfo - { - public UInt16 ServicePackMajor; - public UInt16 ServicePackMinor; - public UInt16 SuiteMask; - public byte ProductType; - public byte Reserved; - } - - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] - class OSVersionInfo - { - public UInt32 OSVersionInfoSize = - (UInt32)Marshal.SizeOf(typeof(OSVersionInfo)); - public UInt32 MajorVersion = 0; - public UInt32 MinorVersion = 0; - public UInt32 BuildNumber = 0; - public UInt32 PlatformId = 0; - // Attribute used to indicate marshalling for String field - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)] - public String CSDVersion = null; - } - - const byte VER_NT_WORKSTATION = 1; - const byte VER_NT_SERVER = 3; - - static readonly List RequiredMsmqComponentsXp = new List(new[] { "msmq_Core", "msmq_LocalStorage" }); - static readonly List UndesirableMsmqComponentsXp = new List(new[] { "msmq_ADIntegrated", "msmq_TriggersService", "msmq_HTTPSupport", "msmq_RoutingSupport", "msmq_MQDSService" }); - static readonly List UndesirableMsmqComponentsV4 = new List(new[] { "msmq_DCOMProxy", "msmq_MQDSServiceInstalled", "msmq_MulticastInstalled", "msmq_RoutingInstalled", "msmq_TriggersInstalled" }); - - enum OperatingSystemEnum { DontCare, XpOrServer2003, Vista, Server2008 } - - const string OcSetup = "OCSETUP"; - const string Uninstall = " /uninstall"; - const string Server2008OcSetupParams = "MSMQ-Server /passive"; - const string VistaOcSetupParams = "MSMQ-Container;" + Server2008OcSetupParams; - - private static readonly ILog Logger = LogManager.GetLogger("NServiceBus.Utils"); - } -} +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Runtime.InteropServices; +using System.IO; +using System.ServiceProcess; +using Microsoft.Win32; +using Common.Logging; + +namespace NServiceBus.Utils +{ + /// + /// Utility class for starting and installing MSMQ. + /// + public static class MsmqInstallation + { + /// + /// Checks that MSMQ is installed, configured correctly, and started, and if not + /// takes the necessary corrective actions to make it so. + /// + public static void StartMsmqIfNecessary() + { + InstallMsmqIfNecessary(); + + var controller = new ServiceController { ServiceName = "MSMQ", MachineName = "." }; + + ProcessUtil.ChangeServiceStatus(controller, ServiceControllerStatus.Running, controller.Start); + } + + + + private static bool IsMsmqInstalled() + { + var dll = LoadLibraryW("Mqrt.dll"); + return (dll != IntPtr.Zero); + } + + /// + /// Determines if the msmq installation on the current machine is ok + /// + /// + public static bool IsInstallationGood() + { + var msmqSetup = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\MSMQ\Setup"); + if (msmqSetup == null) + return false; + + var installedComponents = new List(msmqSetup.GetValueNames()); + msmqSetup.Close(); + + return HasOnlyNeededComponents(installedComponents); + } + + private static void InstallMsmqIfNecessary() + { + Logger.Debug("Checking if MSMQ is installed."); + if (IsMsmqInstalled()) + { + Logger.Debug("MSMQ is installed."); + Logger.Debug("Checking that only needed components are active."); + + if (IsInstallationGood()) + { + Logger.Debug("Installation is good."); + return; + } + + Logger.Debug("Installation isn't good."); + Logger.Debug("Going to re-install MSMQ. A reboot may be required."); + + PerformFunctionDependingOnOS( + () => Process.Start(OcSetup, VistaOcSetupParams + Uninstall), + () => Process.Start(OcSetup, Server2008OcSetupParams + Uninstall), + InstallMsmqOnXpOrServer2003 + ); + + Logger.Debug("Installation of MSMQ successful."); + + return; + } + + Logger.Debug("MSMQ is not installed. Going to install."); + + PerformFunctionDependingOnOS( + () => Process.Start(OcSetup, VistaOcSetupParams), + () => Process.Start(OcSetup, Server2008OcSetupParams), + InstallMsmqOnXpOrServer2003 + ); + + Logger.Debug("Installation of MSMQ successful."); + } + + private static void PerformFunctionDependingOnOS(Func vistaFunc, Func server2008Func, Func xpAndServer2003Func) + { + var os = GetOperatingSystem(); + + Process process = null; + switch (os) + { + case OperatingSystemEnum.Vista: + + process = vistaFunc(); + break; + + case OperatingSystemEnum.Server2008: + + process = server2008Func(); + break; + + case OperatingSystemEnum.XpOrServer2003: + + process = xpAndServer2003Func(); + break; + + default: + + Logger.Warn("OS not supported."); + break; + } + + if (process == null) return; + + Logger.Debug("Waiting for process to complete."); + process.WaitForExit(); + } + + private static Process InstallMsmqOnXpOrServer2003() + { + var p = Path.GetTempFileName(); + + Logger.Debug("Creating installation instruction file."); + + using (var sw = File.CreateText(p)) + { + sw.WriteLine("[Version]"); + sw.WriteLine("Signature = \"$Windows NT$\""); + sw.WriteLine(); + sw.WriteLine("[Global]"); + sw.WriteLine("FreshMode = Custom"); + sw.WriteLine("MaintenanceMode = RemoveAll"); + sw.WriteLine("UpgradeMode = UpgradeOnly"); + sw.WriteLine(); + sw.WriteLine("[Components]"); + + foreach (var s in RequiredMsmqComponentsXp) + sw.WriteLine(s + " = ON"); + + foreach (var s in UndesirableMsmqComponentsXp) + sw.WriteLine(s + " = OFF"); + + sw.Flush(); + } + + Logger.Debug("Installation instruction file created."); + Logger.Debug("Invoking MSMQ installation."); + + return Process.Start("sysocmgr", "/i:sysoc.inf /x /q /w /u:%temp%\\" + Path.GetFileName(p)); + } + + private static OperatingSystemEnum GetOperatingSystem() + { + var osvi = new OSVersionInfoEx(); + osvi.OSVersionInfoSize = (UInt32)Marshal.SizeOf(typeof(OSVersionInfoEx)); + + GetVersionEx(osvi); + + switch (Environment.OSVersion.Version.Major) + { + case 6: + + if (osvi.ProductType == VER_NT_WORKSTATION) + return OperatingSystemEnum.Vista; + + return OperatingSystemEnum.Server2008; + + case 5: + return OperatingSystemEnum.XpOrServer2003; + } + + return OperatingSystemEnum.DontCare; + } + + private static bool HasOnlyNeededComponents(IEnumerable installedComponents) + { + var needed = new List(RequiredMsmqComponentsXp); + + foreach (var i in installedComponents) + { + if (UndesirableMsmqComponentsXp.Contains(i)) + { + Logger.Warn("Undesirable MSMQ component installed: " + i); + return false; + } + + if (UndesirableMsmqComponentsV4.Contains(i)) + { + Logger.Warn("Undesirable MSMQ component installed: " + i); + return false; + } + + needed.Remove(i); + } + + if (needed.Count == 0) + return true; + + return false; + } + + /// Return Type: HMODULE->HINSTANCE->HINSTANCE__* + ///lpLibFileName: LPCWSTR->WCHAR* + [DllImportAttribute("kernel32.dll", EntryPoint = "LoadLibraryW")] + static extern IntPtr LoadLibraryW([InAttribute()] [MarshalAsAttribute(UnmanagedType.LPWStr)] string lpLibFileName); + + + [DllImport("Kernel32", CharSet=CharSet.Auto)] + static extern Boolean GetVersionEx([Out][In]OSVersionInfo versionInformation); + + + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] + class OSVersionInfoEx : OSVersionInfo + { + public UInt16 ServicePackMajor; + public UInt16 ServicePackMinor; + public UInt16 SuiteMask; + public byte ProductType; + public byte Reserved; + } + + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] + class OSVersionInfo + { + public UInt32 OSVersionInfoSize = + (UInt32)Marshal.SizeOf(typeof(OSVersionInfo)); + public UInt32 MajorVersion = 0; + public UInt32 MinorVersion = 0; + public UInt32 BuildNumber = 0; + public UInt32 PlatformId = 0; + // Attribute used to indicate marshalling for String field + [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)] + public String CSDVersion = null; + } + + const byte VER_NT_WORKSTATION = 1; + const byte VER_NT_SERVER = 3; + + static readonly List RequiredMsmqComponentsXp = new List(new[] { "msmq_Core", "msmq_LocalStorage" }); + static readonly List UndesirableMsmqComponentsXp = new List(new[] { "msmq_ADIntegrated", "msmq_TriggersService", "msmq_HTTPSupport", "msmq_RoutingSupport", "msmq_MQDSService" }); + static readonly List UndesirableMsmqComponentsV4 = new List(new[] { "msmq_DCOMProxy", "msmq_MQDSServiceInstalled", "msmq_MulticastInstalled", "msmq_RoutingInstalled", "msmq_TriggersInstalled" }); + + enum OperatingSystemEnum { DontCare, XpOrServer2003, Vista, Server2008 } + + const string OcSetup = "OCSETUP"; + const string Uninstall = " /uninstall"; + const string Server2008OcSetupParams = "MSMQ-Server /passive"; + const string VistaOcSetupParams = "MSMQ-Container;" + Server2008OcSetupParams; + + private static readonly ILog Logger = LogManager.GetLogger("NServiceBus.Utils"); + } +} diff --git a/src/utils/MsmqUtilities.cs b/src/utils/MsmqUtilities.cs index aa3e9eba6c6..f9504c989b2 100644 --- a/src/utils/MsmqUtilities.cs +++ b/src/utils/MsmqUtilities.cs @@ -1,207 +1,207 @@ -using System; -using System.Messaging; -using System.Net; -using System.Security.Principal; -using Common.Logging; - -namespace NServiceBus.Utils -{ - /// - /// MSMQ-related utility functions - /// - public class MsmqUtilities - { - private static readonly ILog Logger = LogManager.GetLogger(typeof(MsmqUtilities)); - private static readonly string LocalAdministratorsGroupName = new SecurityIdentifier(WellKnownSidType.BuiltinAdministratorsSid, null).Translate(typeof(NTAccount)).ToString(); - private static readonly string LocalEveryoneGroupName = new SecurityIdentifier(WellKnownSidType.WorldSid, null).Translate(typeof(NTAccount)).ToString(); - private static readonly string LocalAnonymousLogonName = new SecurityIdentifier(WellKnownSidType.AnonymousSid, null).Translate(typeof(NTAccount)).ToString(); - - /// - /// Utility method for creating a queue if it does not exist. - /// - /// - public static void CreateQueueIfNecessary(string queueName) - { - if (string.IsNullOrEmpty(queueName)) - return; - - var q = GetFullPathWithoutPrefix(queueName); - var machine = GetMachineNameFromLogicalName(queueName); - - if (machine != Environment.MachineName) - { - Logger.Debug("Queue is on remote machine."); - Logger.Debug("If this does not succeed (like if the remote machine is disconnected), processing will continue."); - } - - Logger.Debug(string.Format("Checking if queue exists: {0}.", queueName)); - - try - { - if (MessageQueue.Exists(q)) - return; - - Logger.Warn("Queue " + q + " does not exist."); - Logger.Debug("Going to create queue: " + q); - - CreateQueue(q); - } - catch (Exception ex) - { - Logger.Error(string.Format("Could not create queue {0} or check its existence. Processing will still continue.", queueName), ex); - } - } - - /// - /// Create named message queue - /// - /// - public static void CreateQueue(string queueName) - { - var createdQueue = MessageQueue.Create(queueName, true); - - createdQueue.SetPermissions(LocalAdministratorsGroupName, MessageQueueAccessRights.FullControl, AccessControlEntryType.Allow); - createdQueue.SetPermissions(LocalEveryoneGroupName, MessageQueueAccessRights.WriteMessage, AccessControlEntryType.Allow); - createdQueue.SetPermissions(LocalAnonymousLogonName, MessageQueueAccessRights.WriteMessage, AccessControlEntryType.Allow); - - Logger.Debug("Queue created: " + queueName); - } - - /// - /// Turns a '@' separated value into a full path. - /// Format is 'queue@machine', or 'queue@ipaddress' - /// - /// - /// - public static string GetFullPath(string value) - { - var machine = GetMachineNameFromLogicalName(value); - - IPAddress ipAddress; - if (IPAddress.TryParse(machine, out ipAddress)) - return PREFIX_TCP + GetFullPathWithoutPrefix(value); - - return PREFIX + GetFullPathWithoutPrefix(value); - } - - /// - /// Returns the full path without Format or direct os - /// from a '@' separated path. - /// - /// - /// - public static string GetFullPathWithoutPrefix(string value) - { - return GetMachineNameFromLogicalName(value) + PRIVATE + GetQueueNameFromLogicalName(value); - } - - /// - /// Returns the machine name from a '@' separated full logical name, - /// or the Environment.MachineName otherwise. - /// - /// - /// - public static string GetMachineNameFromLogicalName(string logicalName) - { - string[] arr = logicalName.Split('@'); - - string machine = Environment.MachineName; - - if (arr.Length >= 2) - if (arr[1] != "." && arr[1].ToLower() != "localhost") - machine = arr[1]; - - return machine; - } - - /// - /// Returns the queue name from a '@' separated full logical name. - /// - /// - /// - public static string GetQueueNameFromLogicalName(string logicalName) - { - string[] arr = logicalName.Split('@'); - - if (arr.Length >= 1) - return arr[0]; - - return null; - } - - /// - /// Checks whether or not a queue is local by its path. - /// - /// The path to the queue to check. - /// true if the queue is local, otherwise false. - public static bool QueueIsLocal(string value) - { - var machineName = Environment.MachineName.ToLower(); - - value = value.ToLower().Replace(PREFIX.ToLower(), ""); - var index = value.IndexOf('\\'); - - var queueMachineName = value.Substring(0, index).ToLower(); - - return (machineName == queueMachineName || queueMachineName == "localhost" || queueMachineName == "."); - } - - /// - /// Gets an independent address for the queue in the form: - /// queue@machine. - /// - /// - /// - public static string GetIndependentAddressForQueue(MessageQueue q) - { - if (q == null) - return null; - - string[] arr = q.FormatName.Split('\\'); - string queueName = arr[arr.Length - 1]; - - int directPrefixIndex = arr[0].IndexOf(DIRECTPREFIX); - if (directPrefixIndex >= 0) - { - return queueName + '@' + arr[0].Substring(directPrefixIndex + DIRECTPREFIX.Length); - } - - try - { - // the pessimistic approach failed, try the optimistic approach - arr = q.QueueName.Split('\\'); - queueName = arr[arr.Length - 1]; - return queueName + '@' + q.MachineName; - } - catch - { - throw new Exception(string.Concat("MessageQueueException: '", - DIRECTPREFIX, "' is missing. ", - "FormatName='", q.FormatName, "'")); - } - } - - /// - /// Returns the number of messages in the queue. - /// - /// - public static int GetNumberOfPendingMessages(string queueName) - { - var q = new MessageQueue(GetFullPath(queueName)); - - var qMgmt = new MSMQ.MSMQManagementClass(); - object machine = Environment.MachineName; - var missing = Type.Missing; - object formatName = q.FormatName; - - qMgmt.Init(ref machine, ref missing, ref formatName); - return qMgmt.MessageCount; - } - - private const string DIRECTPREFIX = "DIRECT=OS:"; - private static readonly string DIRECTPREFIX_TCP = "DIRECT=TCP:"; - private readonly static string PREFIX_TCP = "FormatName:" + DIRECTPREFIX_TCP; - private static readonly string PREFIX = "FormatName:" + DIRECTPREFIX; - private const string PRIVATE = "\\private$\\"; - } +using System; +using System.Messaging; +using System.Net; +using System.Security.Principal; +using Common.Logging; + +namespace NServiceBus.Utils +{ + /// + /// MSMQ-related utility functions + /// + public class MsmqUtilities + { + private static readonly ILog Logger = LogManager.GetLogger(typeof(MsmqUtilities)); + private static readonly string LocalAdministratorsGroupName = new SecurityIdentifier(WellKnownSidType.BuiltinAdministratorsSid, null).Translate(typeof(NTAccount)).ToString(); + private static readonly string LocalEveryoneGroupName = new SecurityIdentifier(WellKnownSidType.WorldSid, null).Translate(typeof(NTAccount)).ToString(); + private static readonly string LocalAnonymousLogonName = new SecurityIdentifier(WellKnownSidType.AnonymousSid, null).Translate(typeof(NTAccount)).ToString(); + + /// + /// Utility method for creating a queue if it does not exist. + /// + /// + public static void CreateQueueIfNecessary(string queueName) + { + if (string.IsNullOrEmpty(queueName)) + return; + + var q = GetFullPathWithoutPrefix(queueName); + var machine = GetMachineNameFromLogicalName(queueName); + + if (machine != Environment.MachineName) + { + Logger.Debug("Queue is on remote machine."); + Logger.Debug("If this does not succeed (like if the remote machine is disconnected), processing will continue."); + } + + Logger.Debug(string.Format("Checking if queue exists: {0}.", queueName)); + + try + { + if (MessageQueue.Exists(q)) + return; + + Logger.Warn("Queue " + q + " does not exist."); + Logger.Debug("Going to create queue: " + q); + + CreateQueue(q); + } + catch (Exception ex) + { + Logger.Error(string.Format("Could not create queue {0} or check its existence. Processing will still continue.", queueName), ex); + } + } + + /// + /// Create named message queue + /// + /// + public static void CreateQueue(string queueName) + { + var createdQueue = MessageQueue.Create(queueName, true); + + createdQueue.SetPermissions(LocalAdministratorsGroupName, MessageQueueAccessRights.FullControl, AccessControlEntryType.Allow); + createdQueue.SetPermissions(LocalEveryoneGroupName, MessageQueueAccessRights.WriteMessage, AccessControlEntryType.Allow); + createdQueue.SetPermissions(LocalAnonymousLogonName, MessageQueueAccessRights.WriteMessage, AccessControlEntryType.Allow); + + Logger.Debug("Queue created: " + queueName); + } + + /// + /// Turns a '@' separated value into a full path. + /// Format is 'queue@machine', or 'queue@ipaddress' + /// + /// + /// + public static string GetFullPath(string value) + { + var machine = GetMachineNameFromLogicalName(value); + + IPAddress ipAddress; + if (IPAddress.TryParse(machine, out ipAddress)) + return PREFIX_TCP + GetFullPathWithoutPrefix(value); + + return PREFIX + GetFullPathWithoutPrefix(value); + } + + /// + /// Returns the full path without Format or direct os + /// from a '@' separated path. + /// + /// + /// + public static string GetFullPathWithoutPrefix(string value) + { + return GetMachineNameFromLogicalName(value) + PRIVATE + GetQueueNameFromLogicalName(value); + } + + /// + /// Returns the machine name from a '@' separated full logical name, + /// or the Environment.MachineName otherwise. + /// + /// + /// + public static string GetMachineNameFromLogicalName(string logicalName) + { + string[] arr = logicalName.Split('@'); + + string machine = Environment.MachineName; + + if (arr.Length >= 2) + if (arr[1] != "." && arr[1].ToLower() != "localhost") + machine = arr[1]; + + return machine; + } + + /// + /// Returns the queue name from a '@' separated full logical name. + /// + /// + /// + public static string GetQueueNameFromLogicalName(string logicalName) + { + string[] arr = logicalName.Split('@'); + + if (arr.Length >= 1) + return arr[0]; + + return null; + } + + /// + /// Checks whether or not a queue is local by its path. + /// + /// The path to the queue to check. + /// true if the queue is local, otherwise false. + public static bool QueueIsLocal(string value) + { + var machineName = Environment.MachineName.ToLower(); + + value = value.ToLower().Replace(PREFIX.ToLower(), ""); + var index = value.IndexOf('\\'); + + var queueMachineName = value.Substring(0, index).ToLower(); + + return (machineName == queueMachineName || queueMachineName == "localhost" || queueMachineName == "."); + } + + /// + /// Gets an independent address for the queue in the form: + /// queue@machine. + /// + /// + /// + public static string GetIndependentAddressForQueue(MessageQueue q) + { + if (q == null) + return null; + + string[] arr = q.FormatName.Split('\\'); + string queueName = arr[arr.Length - 1]; + + int directPrefixIndex = arr[0].IndexOf(DIRECTPREFIX); + if (directPrefixIndex >= 0) + { + return queueName + '@' + arr[0].Substring(directPrefixIndex + DIRECTPREFIX.Length); + } + + try + { + // the pessimistic approach failed, try the optimistic approach + arr = q.QueueName.Split('\\'); + queueName = arr[arr.Length - 1]; + return queueName + '@' + q.MachineName; + } + catch + { + throw new Exception(string.Concat("MessageQueueException: '", + DIRECTPREFIX, "' is missing. ", + "FormatName='", q.FormatName, "'")); + } + } + + /// + /// Returns the number of messages in the queue. + /// + /// + public static int GetNumberOfPendingMessages(string queueName) + { + var q = new MessageQueue(GetFullPath(queueName)); + + var qMgmt = new MSMQ.MSMQManagementClass(); + object machine = Environment.MachineName; + var missing = Type.Missing; + object formatName = q.FormatName; + + qMgmt.Init(ref machine, ref missing, ref formatName); + return qMgmt.MessageCount; + } + + private const string DIRECTPREFIX = "DIRECT=OS:"; + private static readonly string DIRECTPREFIX_TCP = "DIRECT=TCP:"; + private readonly static string PREFIX_TCP = "FormatName:" + DIRECTPREFIX_TCP; + private static readonly string PREFIX = "FormatName:" + DIRECTPREFIX; + private const string PRIVATE = "\\private$\\"; + } } \ No newline at end of file diff --git a/src/utils/NServiceBus.Utils.Reflection/DelegateFactory.cs b/src/utils/NServiceBus.Utils.Reflection/DelegateFactory.cs index 8b0f58d9977..72cd90f27bc 100644 --- a/src/utils/NServiceBus.Utils.Reflection/DelegateFactory.cs +++ b/src/utils/NServiceBus.Utils.Reflection/DelegateFactory.cs @@ -1,118 +1,118 @@ -/* - Added reflection optimization techniques from Nate Kohari and Jimmy Bogard: - -http://kohari.org/2009/03/06/fast-late-bound-invocation-with-expression-trees/ - -http://www.lostechies.com/blogs/jimmy_bogard/archive/2009/06/17/more-on-late-bound-invocations-with-expression-trees.aspx - -http://www.lostechies.com/blogs/jimmy_bogard/archive/2009/08/05/late-bound-invocations-with-dynamicmethod.aspx - */ - -using System.Linq; -using System.Linq.Expressions; -using System.Reflection; -using System.Reflection.Emit; - -namespace NServiceBus.Utils.Reflection -{ - public delegate object LateBoundMethod(object target, object[] arguments); - public delegate object LateBoundProperty(object target); - public delegate object LateBoundField(object target); - public delegate void LateBoundFieldSet(object target, object value); - public delegate void LateBoundPropertySet(object target, object value); - - public static class DelegateFactory - { - public static LateBoundMethod Create(MethodInfo method) - { - ParameterExpression instanceParameter = Expression.Parameter(typeof(object), "target"); - ParameterExpression argumentsParameter = Expression.Parameter(typeof(object[]), "arguments"); - - MethodCallExpression call = Expression.Call( - Expression.Convert(instanceParameter, method.DeclaringType), - method, - CreateParameterExpressions(method, argumentsParameter)); - - Expression lambda = Expression.Lambda( - Expression.Convert(call, typeof(object)), - instanceParameter, - argumentsParameter); - - return lambda.Compile(); - } - - public static LateBoundProperty Create(PropertyInfo property) - { - ParameterExpression instanceParameter = Expression.Parameter(typeof(object), "target"); - - MemberExpression member = Expression.Property(Expression.Convert(instanceParameter, property.DeclaringType), property); - - Expression lambda = Expression.Lambda( - Expression.Convert(member, typeof(object)), - instanceParameter - ); - - return lambda.Compile(); - } - - public static LateBoundField Create(FieldInfo field) - { - ParameterExpression instanceParameter = Expression.Parameter(typeof(object), "target"); - - MemberExpression member = Expression.Field(Expression.Convert(instanceParameter, field.DeclaringType), field); - - Expression lambda = Expression.Lambda( - Expression.Convert(member, typeof(object)), - instanceParameter - ); - - return lambda.Compile(); - } - - public static LateBoundFieldSet CreateSet(FieldInfo field) - { - var sourceType = field.DeclaringType; - var method = new DynamicMethod("Set" + field.Name, null, new[] { typeof(object), typeof(object) }, true); - var gen = method.GetILGenerator(); - - gen.Emit(OpCodes.Ldarg_0); // Load input to stack - gen.Emit(OpCodes.Castclass, sourceType); // Cast to source type - gen.Emit(OpCodes.Ldarg_1); // Load value to stack - gen.Emit(OpCodes.Unbox_Any, field.FieldType); // Unbox the value to its proper value type - gen.Emit(OpCodes.Stfld, field); // Set the value to the input field - gen.Emit(OpCodes.Ret); - - var callback = (LateBoundFieldSet)method.CreateDelegate(typeof(LateBoundFieldSet)); - - return callback; - } - - public static LateBoundPropertySet CreateSet(PropertyInfo property) - { - var method = new DynamicMethod("Set" + property.Name, null, new[] { typeof(object), typeof(object) }, true); - var gen = method.GetILGenerator(); - - var sourceType = property.DeclaringType; - var setter = property.GetSetMethod(true); - - gen.Emit(OpCodes.Ldarg_0); // Load input to stack - gen.Emit(OpCodes.Castclass, sourceType); // Cast to source type - gen.Emit(OpCodes.Ldarg_1); // Load value to stack - gen.Emit(OpCodes.Unbox_Any, property.PropertyType); // Unbox the value to its proper value type - gen.Emit(OpCodes.Callvirt, setter); // Call the setter method - gen.Emit(OpCodes.Ret); - - var result = (LateBoundPropertySet)method.CreateDelegate(typeof(LateBoundPropertySet)); - - return result; - } - - private static Expression[] CreateParameterExpressions(MethodInfo method, Expression argumentsParameter) - { - return method.GetParameters().Select((parameter, index) => - Expression.Convert( - Expression.ArrayIndex(argumentsParameter, Expression.Constant(index)), - parameter.ParameterType)).ToArray(); - } - } -} +/* + Added reflection optimization techniques from Nate Kohari and Jimmy Bogard: + +http://kohari.org/2009/03/06/fast-late-bound-invocation-with-expression-trees/ + +http://www.lostechies.com/blogs/jimmy_bogard/archive/2009/06/17/more-on-late-bound-invocations-with-expression-trees.aspx + +http://www.lostechies.com/blogs/jimmy_bogard/archive/2009/08/05/late-bound-invocations-with-dynamicmethod.aspx + */ + +using System.Linq; +using System.Linq.Expressions; +using System.Reflection; +using System.Reflection.Emit; + +namespace NServiceBus.Utils.Reflection +{ + public delegate object LateBoundMethod(object target, object[] arguments); + public delegate object LateBoundProperty(object target); + public delegate object LateBoundField(object target); + public delegate void LateBoundFieldSet(object target, object value); + public delegate void LateBoundPropertySet(object target, object value); + + public static class DelegateFactory + { + public static LateBoundMethod Create(MethodInfo method) + { + ParameterExpression instanceParameter = Expression.Parameter(typeof(object), "target"); + ParameterExpression argumentsParameter = Expression.Parameter(typeof(object[]), "arguments"); + + MethodCallExpression call = Expression.Call( + Expression.Convert(instanceParameter, method.DeclaringType), + method, + CreateParameterExpressions(method, argumentsParameter)); + + Expression lambda = Expression.Lambda( + Expression.Convert(call, typeof(object)), + instanceParameter, + argumentsParameter); + + return lambda.Compile(); + } + + public static LateBoundProperty Create(PropertyInfo property) + { + ParameterExpression instanceParameter = Expression.Parameter(typeof(object), "target"); + + MemberExpression member = Expression.Property(Expression.Convert(instanceParameter, property.DeclaringType), property); + + Expression lambda = Expression.Lambda( + Expression.Convert(member, typeof(object)), + instanceParameter + ); + + return lambda.Compile(); + } + + public static LateBoundField Create(FieldInfo field) + { + ParameterExpression instanceParameter = Expression.Parameter(typeof(object), "target"); + + MemberExpression member = Expression.Field(Expression.Convert(instanceParameter, field.DeclaringType), field); + + Expression lambda = Expression.Lambda( + Expression.Convert(member, typeof(object)), + instanceParameter + ); + + return lambda.Compile(); + } + + public static LateBoundFieldSet CreateSet(FieldInfo field) + { + var sourceType = field.DeclaringType; + var method = new DynamicMethod("Set" + field.Name, null, new[] { typeof(object), typeof(object) }, true); + var gen = method.GetILGenerator(); + + gen.Emit(OpCodes.Ldarg_0); // Load input to stack + gen.Emit(OpCodes.Castclass, sourceType); // Cast to source type + gen.Emit(OpCodes.Ldarg_1); // Load value to stack + gen.Emit(OpCodes.Unbox_Any, field.FieldType); // Unbox the value to its proper value type + gen.Emit(OpCodes.Stfld, field); // Set the value to the input field + gen.Emit(OpCodes.Ret); + + var callback = (LateBoundFieldSet)method.CreateDelegate(typeof(LateBoundFieldSet)); + + return callback; + } + + public static LateBoundPropertySet CreateSet(PropertyInfo property) + { + var method = new DynamicMethod("Set" + property.Name, null, new[] { typeof(object), typeof(object) }, true); + var gen = method.GetILGenerator(); + + var sourceType = property.DeclaringType; + var setter = property.GetSetMethod(true); + + gen.Emit(OpCodes.Ldarg_0); // Load input to stack + gen.Emit(OpCodes.Castclass, sourceType); // Cast to source type + gen.Emit(OpCodes.Ldarg_1); // Load value to stack + gen.Emit(OpCodes.Unbox_Any, property.PropertyType); // Unbox the value to its proper value type + gen.Emit(OpCodes.Callvirt, setter); // Call the setter method + gen.Emit(OpCodes.Ret); + + var result = (LateBoundPropertySet)method.CreateDelegate(typeof(LateBoundPropertySet)); + + return result; + } + + private static Expression[] CreateParameterExpressions(MethodInfo method, Expression argumentsParameter) + { + return method.GetParameters().Select((parameter, index) => + Expression.Convert( + Expression.ArrayIndex(argumentsParameter, Expression.Constant(index)), + parameter.ParameterType)).ToArray(); + } + } +} diff --git a/src/utils/NServiceBus.Utils.Reflection/ExtensionMethods.cs b/src/utils/NServiceBus.Utils.Reflection/ExtensionMethods.cs index 45a94dbc880..b3ff5a1015f 100644 --- a/src/utils/NServiceBus.Utils.Reflection/ExtensionMethods.cs +++ b/src/utils/NServiceBus.Utils.Reflection/ExtensionMethods.cs @@ -1,119 +1,119 @@ -using System; -using System.Collections.Generic; - -namespace NServiceBus.Utils.Reflection -{ - /// - /// Contains extension methods - /// - public static class ExtensionMethods - { - /// - /// Useful for finding if a type is (for example) IMessageHandler{T} where T : IMessage. - /// - /// - /// - /// - /// - public static bool IsGenericallyEquivalent(this Type type, Type openGenericType, Type genericArg) - { - bool result = false; - LoopAndAct(type, openGenericType, genericArg, t => result = true); - - return result; - } - - /// - /// Returns the enclosed generic type given that the type is GenericallyEquivalent. - /// - /// - /// - /// - /// - public static Type GetGenericallyContainedType(this Type type, Type openGenericType, Type genericArg) - { - Type result = null; - LoopAndAct(type, openGenericType, genericArg, t => result = t); - - return result; - } - - private static void LoopAndAct(Type type, Type openGenericType, Type genericArg, Action act) - { - foreach (var i in type.GetInterfaces()) - { - var args = i.GetGenericArguments(); - - if (args.Length == 1) - if (genericArg.IsAssignableFrom(args[0])) - if (openGenericType.MakeGenericType(args[0]) == i) - { - act(args[0]); - break; - } - } - } - - /// - /// Returns true if the type can be serialized as is. - /// - /// - /// - public static bool IsSimpleType(this Type type) - { - return (type == typeof(string) || - type.IsPrimitive || - type == typeof(decimal) || - type == typeof(Guid) || - type == typeof(DateTime) || - type == typeof(TimeSpan) || - type == typeof(DateTimeOffset) || - type.IsEnum); - } - - /// - /// Takes the name of the given type and makes it friendly for serialization - /// by removing problematic characters. - /// - /// - /// - public static string SerializationFriendlyName(this Type t) - { - lock(TypeToNameLookup) - if (TypeToNameLookup.ContainsKey(t)) - return TypeToNameLookup[t]; - - var args = t.GetGenericArguments(); - if (args != null) - { - int index = t.Name.IndexOf('`'); - if (index >= 0) - { - string result = t.Name.Substring(0, index) + "Of"; - for (int i = 0; i < args.Length; i++) - { - result += args[i].SerializationFriendlyName(); - if (i != args.Length - 1) - result += "And"; - } - - if (args.Length == 2) - if (typeof(KeyValuePair<,>).MakeGenericType(args) == t) - result = "NServiceBus." + result; - - lock(TypeToNameLookup) - TypeToNameLookup[t] = result; - - return result; - } - } - - lock(TypeToNameLookup) - TypeToNameLookup[t] = t.Name; - - return t.Name; - } - - private static readonly IDictionary TypeToNameLookup = new Dictionary(); - } -} +using System; +using System.Collections.Generic; + +namespace NServiceBus.Utils.Reflection +{ + /// + /// Contains extension methods + /// + public static class ExtensionMethods + { + /// + /// Useful for finding if a type is (for example) IMessageHandler{T} where T : IMessage. + /// + /// + /// + /// + /// + public static bool IsGenericallyEquivalent(this Type type, Type openGenericType, Type genericArg) + { + bool result = false; + LoopAndAct(type, openGenericType, genericArg, t => result = true); + + return result; + } + + /// + /// Returns the enclosed generic type given that the type is GenericallyEquivalent. + /// + /// + /// + /// + /// + public static Type GetGenericallyContainedType(this Type type, Type openGenericType, Type genericArg) + { + Type result = null; + LoopAndAct(type, openGenericType, genericArg, t => result = t); + + return result; + } + + private static void LoopAndAct(Type type, Type openGenericType, Type genericArg, Action act) + { + foreach (var i in type.GetInterfaces()) + { + var args = i.GetGenericArguments(); + + if (args.Length == 1) + if (genericArg.IsAssignableFrom(args[0])) + if (openGenericType.MakeGenericType(args[0]) == i) + { + act(args[0]); + break; + } + } + } + + /// + /// Returns true if the type can be serialized as is. + /// + /// + /// + public static bool IsSimpleType(this Type type) + { + return (type == typeof(string) || + type.IsPrimitive || + type == typeof(decimal) || + type == typeof(Guid) || + type == typeof(DateTime) || + type == typeof(TimeSpan) || + type == typeof(DateTimeOffset) || + type.IsEnum); + } + + /// + /// Takes the name of the given type and makes it friendly for serialization + /// by removing problematic characters. + /// + /// + /// + public static string SerializationFriendlyName(this Type t) + { + lock(TypeToNameLookup) + if (TypeToNameLookup.ContainsKey(t)) + return TypeToNameLookup[t]; + + var args = t.GetGenericArguments(); + if (args != null) + { + int index = t.Name.IndexOf('`'); + if (index >= 0) + { + string result = t.Name.Substring(0, index) + "Of"; + for (int i = 0; i < args.Length; i++) + { + result += args[i].SerializationFriendlyName(); + if (i != args.Length - 1) + result += "And"; + } + + if (args.Length == 2) + if (typeof(KeyValuePair<,>).MakeGenericType(args) == t) + result = "NServiceBus." + result; + + lock(TypeToNameLookup) + TypeToNameLookup[t] = result; + + return result; + } + } + + lock(TypeToNameLookup) + TypeToNameLookup[t] = t.Name; + + return t.Name; + } + + private static readonly IDictionary TypeToNameLookup = new Dictionary(); + } +} diff --git a/src/utils/NServiceBus.Utils.Reflection/NServiceBus.Utils.Reflection.csproj b/src/utils/NServiceBus.Utils.Reflection/NServiceBus.Utils.Reflection.csproj index e50161a5aa7..64d49276336 100644 --- a/src/utils/NServiceBus.Utils.Reflection/NServiceBus.Utils.Reflection.csproj +++ b/src/utils/NServiceBus.Utils.Reflection/NServiceBus.Utils.Reflection.csproj @@ -1,69 +1,69 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {B82E9E46-A768-4E48-9A94-0DD4F8379366} - Library - Properties - NServiceBus.Utils.Reflection - NServiceBus.Utils.Reflection - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.Utils.Reflection.XML - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.Utils.Reflection.XML - - - - - 3.5 - - - 3.5 - - - 3.5 - - - - - - - CommonAssemblyInfo.cs - - - - - - - - - - copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\build\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {B82E9E46-A768-4E48-9A94-0DD4F8379366} + Library + Properties + NServiceBus.Utils.Reflection + NServiceBus.Utils.Reflection + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.Utils.Reflection.XML + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.Utils.Reflection.XML + + + + + 3.5 + + + 3.5 + + + 3.5 + + + + + + + CommonAssemblyInfo.cs + + + + + + + + + + copy /Y "$(ProjectDir)$(OutDir)*.*" "$(ProjectDir)..\..\..\build\" + \ No newline at end of file diff --git a/src/utils/NServiceBus.Utils.Reflection/Properties/AssemblyInfo.cs b/src/utils/NServiceBus.Utils.Reflection/Properties/AssemblyInfo.cs index 89656235440..512cda0cee6 100644 --- a/src/utils/NServiceBus.Utils.Reflection/Properties/AssemblyInfo.cs +++ b/src/utils/NServiceBus.Utils.Reflection/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Reflection Utilities")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Reflection Utilities")] [assembly: AssemblyDescription("Basic reflection utilities for nServiceBus")] \ No newline at end of file diff --git a/src/utils/NServiceBus.Utils.Reflection/Reflect.cs b/src/utils/NServiceBus.Utils.Reflection/Reflect.cs index 3380d105591..e98da5e9a63 100644 --- a/src/utils/NServiceBus.Utils.Reflection/Reflect.cs +++ b/src/utils/NServiceBus.Utils.Reflection/Reflect.cs @@ -1,222 +1,222 @@ -//http://netfx.googlecode.com/svn/trunk/Source/Reflection/Reflect.cs - -using System; -using System.Reflection; -using System.Linq.Expressions; - -namespace NServiceBus.Utils.Reflection -{ - /// - /// Provides strong-typed reflection for static members of any type or calling - /// object constructors (to retrieve the constructor ). - /// - public class Reflect - { - /// - /// Initializes the reflector class. - /// - protected Reflect() { } - - /// - /// Gets the constructor represented in the lambda expression. - /// - /// The is null. - /// The is not a lambda expression or it does not represent a constructor invocation. - public static ConstructorInfo GetConstructor(Expression constructor) - { - if (constructor == null) throw new ArgumentNullException("constructor"); - - var lambda = constructor as LambdaExpression; - if (lambda == null) throw new ArgumentException("Not a lambda expression", "constructor"); - if (lambda.Body.NodeType != ExpressionType.New) throw new ArgumentException("Not a constructor invocation", "constructor"); - - return ((NewExpression)lambda.Body).Constructor; - } - - /// - /// Gets the method represented by the lambda expression. - /// - /// The is null. - /// The is not a lambda expression or it does not represent a method invocation. - public static MethodInfo GetMethod(Expression method) - { - return GetMethodInfo(method); - } - - /// - /// Gets the property represented by the lambda expression. - /// - /// The is null. - /// The is not a lambda expression or it does not represent a property access. - public static PropertyInfo GetProperty(Expression> property) - { - var info = GetMemberInfo(property) as PropertyInfo; - if (info == null) throw new ArgumentException("Member is not a property"); - - return info; - } - - /// - /// Gets the field represented by the lambda expression. - /// - /// The is null. - /// The is not a lambda expression or it does not represent a field access. - public static FieldInfo GetField(Expression> field) - { - var info = GetMemberInfo(field) as FieldInfo; - if (info == null) throw new ArgumentException("Member is not a field"); - - return info; - } - - /// - /// Returns a MethodInfo for an expression containing a call to a method. - /// - /// - /// - protected static MethodInfo GetMethodInfo(Expression method) - { - if (method == null) throw new ArgumentNullException("method"); - - var lambda = method as LambdaExpression; - if (lambda == null) throw new ArgumentException("Not a lambda expression", "method"); - if (lambda.Body.NodeType != ExpressionType.Call) throw new ArgumentException("Not a method call", "method"); - - return ((MethodCallExpression)lambda.Body).Method; - } - - protected static MemberInfo GetMemberInfo(Expression member) - { - return GetMemberInfo(member, false); - } - - /// - /// Returns a MemberInfo for an expression containing a call to a property. - /// - /// - /// Checks that the member expression doesn't have more than one dot like a.Prop.Val - /// - protected static MemberInfo GetMemberInfo(Expression member, bool checkForSingleDot) - { - if (member == null) throw new ArgumentNullException("member"); - - var lambda = member as LambdaExpression; - if (lambda == null) throw new ArgumentException("Not a lambda expression", "member"); - - MemberExpression memberExpr = null; - - // The Func we use returns an object, so first statement can be either - // a cast (if the field/property does not return an object) or the direct member access. - if (lambda.Body.NodeType == ExpressionType.Convert) - { - // The cast is an unary expression, where the operand is the - // actual member access expression. - memberExpr = ((UnaryExpression)lambda.Body).Operand as MemberExpression; - } - else if (lambda.Body.NodeType == ExpressionType.MemberAccess) - { - memberExpr = lambda.Body as MemberExpression; - } - - if (memberExpr == null) throw new ArgumentException("Not a member access", "member"); - - if (checkForSingleDot) - if (memberExpr.Expression is ParameterExpression) - return memberExpr.Member; - else - throw new ArgumentException("Argument passed contains more than a single dot which is not allowed: " + member, "member"); - - return memberExpr.Member; - } - } - - /// - /// Provides strong-typed reflection of the - /// type. - /// - /// Type to reflect. - public class Reflect : Reflect - { - private Reflect() { } - - /// - /// Gets the method represented by the lambda expression. - /// - /// The is null. - /// The is not a lambda expression or it does not represent a method invocation. - public static MethodInfo GetMethod(Expression> method) - { - return GetMethodInfo(method); - } - - /// - /// Gets the method represented by the lambda expression. - /// - /// The is null. - /// The is not a lambda expression or it does not represent a method invocation. - public static MethodInfo GetMethod(Expression> method) - { - return GetMethodInfo(method); - } - - /// - /// Gets the method represented by the lambda expression. - /// - /// The is null. - /// The is not a lambda expression or it does not represent a method invocation. - public static MethodInfo GetMethod(Expression> method) - { - return GetMethodInfo(method); - } - - /// - /// Gets the method represented by the lambda expression. - /// - /// The is null. - /// The is not a lambda expression or it does not represent a method invocation. - public static MethodInfo GetMethod(Expression> method) - { - return GetMethodInfo(method); - } - - /// - /// Gets the property represented by the lambda expression. - /// - /// The is null. - /// The is not a lambda expression or it does not represent a property access. - public static PropertyInfo GetProperty(Expression> property) - { - return GetProperty(property, false); - } - - /// - /// Gets the property represented by the lambda expression. - /// If is true, then the property expression is checked to see that - /// only a single dot is present. - /// - /// - /// - /// - public static PropertyInfo GetProperty(Expression> property, bool checkForSingleDot) - { - var info = GetMemberInfo(property, checkForSingleDot) as PropertyInfo; - if (info == null) throw new ArgumentException("Member is not a property"); - - return info; - } - - - /// - /// Gets the field represented by the lambda expression. - /// - /// The is null. - /// The is not a lambda expression or it does not represent a field access. - public static FieldInfo GetField(Expression> field) - { - var info = GetMemberInfo(field) as FieldInfo; - if (info == null) throw new ArgumentException("Member is not a field"); - - return info; - } - } +//http://netfx.googlecode.com/svn/trunk/Source/Reflection/Reflect.cs + +using System; +using System.Reflection; +using System.Linq.Expressions; + +namespace NServiceBus.Utils.Reflection +{ + /// + /// Provides strong-typed reflection for static members of any type or calling + /// object constructors (to retrieve the constructor ). + /// + public class Reflect + { + /// + /// Initializes the reflector class. + /// + protected Reflect() { } + + /// + /// Gets the constructor represented in the lambda expression. + /// + /// The is null. + /// The is not a lambda expression or it does not represent a constructor invocation. + public static ConstructorInfo GetConstructor(Expression constructor) + { + if (constructor == null) throw new ArgumentNullException("constructor"); + + var lambda = constructor as LambdaExpression; + if (lambda == null) throw new ArgumentException("Not a lambda expression", "constructor"); + if (lambda.Body.NodeType != ExpressionType.New) throw new ArgumentException("Not a constructor invocation", "constructor"); + + return ((NewExpression)lambda.Body).Constructor; + } + + /// + /// Gets the method represented by the lambda expression. + /// + /// The is null. + /// The is not a lambda expression or it does not represent a method invocation. + public static MethodInfo GetMethod(Expression method) + { + return GetMethodInfo(method); + } + + /// + /// Gets the property represented by the lambda expression. + /// + /// The is null. + /// The is not a lambda expression or it does not represent a property access. + public static PropertyInfo GetProperty(Expression> property) + { + var info = GetMemberInfo(property) as PropertyInfo; + if (info == null) throw new ArgumentException("Member is not a property"); + + return info; + } + + /// + /// Gets the field represented by the lambda expression. + /// + /// The is null. + /// The is not a lambda expression or it does not represent a field access. + public static FieldInfo GetField(Expression> field) + { + var info = GetMemberInfo(field) as FieldInfo; + if (info == null) throw new ArgumentException("Member is not a field"); + + return info; + } + + /// + /// Returns a MethodInfo for an expression containing a call to a method. + /// + /// + /// + protected static MethodInfo GetMethodInfo(Expression method) + { + if (method == null) throw new ArgumentNullException("method"); + + var lambda = method as LambdaExpression; + if (lambda == null) throw new ArgumentException("Not a lambda expression", "method"); + if (lambda.Body.NodeType != ExpressionType.Call) throw new ArgumentException("Not a method call", "method"); + + return ((MethodCallExpression)lambda.Body).Method; + } + + protected static MemberInfo GetMemberInfo(Expression member) + { + return GetMemberInfo(member, false); + } + + /// + /// Returns a MemberInfo for an expression containing a call to a property. + /// + /// + /// Checks that the member expression doesn't have more than one dot like a.Prop.Val + /// + protected static MemberInfo GetMemberInfo(Expression member, bool checkForSingleDot) + { + if (member == null) throw new ArgumentNullException("member"); + + var lambda = member as LambdaExpression; + if (lambda == null) throw new ArgumentException("Not a lambda expression", "member"); + + MemberExpression memberExpr = null; + + // The Func we use returns an object, so first statement can be either + // a cast (if the field/property does not return an object) or the direct member access. + if (lambda.Body.NodeType == ExpressionType.Convert) + { + // The cast is an unary expression, where the operand is the + // actual member access expression. + memberExpr = ((UnaryExpression)lambda.Body).Operand as MemberExpression; + } + else if (lambda.Body.NodeType == ExpressionType.MemberAccess) + { + memberExpr = lambda.Body as MemberExpression; + } + + if (memberExpr == null) throw new ArgumentException("Not a member access", "member"); + + if (checkForSingleDot) + if (memberExpr.Expression is ParameterExpression) + return memberExpr.Member; + else + throw new ArgumentException("Argument passed contains more than a single dot which is not allowed: " + member, "member"); + + return memberExpr.Member; + } + } + + /// + /// Provides strong-typed reflection of the + /// type. + /// + /// Type to reflect. + public class Reflect : Reflect + { + private Reflect() { } + + /// + /// Gets the method represented by the lambda expression. + /// + /// The is null. + /// The is not a lambda expression or it does not represent a method invocation. + public static MethodInfo GetMethod(Expression> method) + { + return GetMethodInfo(method); + } + + /// + /// Gets the method represented by the lambda expression. + /// + /// The is null. + /// The is not a lambda expression or it does not represent a method invocation. + public static MethodInfo GetMethod(Expression> method) + { + return GetMethodInfo(method); + } + + /// + /// Gets the method represented by the lambda expression. + /// + /// The is null. + /// The is not a lambda expression or it does not represent a method invocation. + public static MethodInfo GetMethod(Expression> method) + { + return GetMethodInfo(method); + } + + /// + /// Gets the method represented by the lambda expression. + /// + /// The is null. + /// The is not a lambda expression or it does not represent a method invocation. + public static MethodInfo GetMethod(Expression> method) + { + return GetMethodInfo(method); + } + + /// + /// Gets the property represented by the lambda expression. + /// + /// The is null. + /// The is not a lambda expression or it does not represent a property access. + public static PropertyInfo GetProperty(Expression> property) + { + return GetProperty(property, false); + } + + /// + /// Gets the property represented by the lambda expression. + /// If is true, then the property expression is checked to see that + /// only a single dot is present. + /// + /// + /// + /// + public static PropertyInfo GetProperty(Expression> property, bool checkForSingleDot) + { + var info = GetMemberInfo(property, checkForSingleDot) as PropertyInfo; + if (info == null) throw new ArgumentException("Member is not a property"); + + return info; + } + + + /// + /// Gets the field represented by the lambda expression. + /// + /// The is null. + /// The is not a lambda expression or it does not represent a field access. + public static FieldInfo GetField(Expression> field) + { + var info = GetMemberInfo(field) as FieldInfo; + if (info == null) throw new ArgumentException("Member is not a field"); + + return info; + } + } } \ No newline at end of file diff --git a/src/utils/NServiceBus.Utils.csproj b/src/utils/NServiceBus.Utils.csproj index 970c4e85648..50504b66249 100644 --- a/src/utils/NServiceBus.Utils.csproj +++ b/src/utils/NServiceBus.Utils.csproj @@ -1,117 +1,117 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {2616579A-202F-48F6-8A7F-6A6AA9288CA7} - Library - Properties - NServiceBus.Utils - NServiceBus.Utils - - - - - - v4.0 - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\NServiceBus.Utils.XML - AllRules.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\NServiceBus.Utils.XML - AllRules.ruleset - - - - False - ..\..\lib\Common.Logging.dll - False - - - False - ..\..\lib\Interop.MSMQ.dll - - - - 3.5 - - - - - - - - - - CommonAssemblyInfo.cs - - - - - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - - copy /Y "$(OutDir)*.*" "$(ProjectDir)..\..\build\" - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {2616579A-202F-48F6-8A7F-6A6AA9288CA7} + Library + Properties + NServiceBus.Utils + NServiceBus.Utils + + + + + + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + bin\Debug\NServiceBus.Utils.XML + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + bin\Release\NServiceBus.Utils.XML + AllRules.ruleset + + + + False + ..\..\lib\Common.Logging.dll + False + + + False + ..\..\lib\Interop.MSMQ.dll + + + + 3.5 + + + + + + + + + + CommonAssemblyInfo.cs + + + + + + + + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + False + Windows Installer 3.1 + true + + + + + + copy /Y "$(OutDir)*.*" "$(ProjectDir)..\..\build\" + \ No newline at end of file diff --git a/src/utils/NServiceBus.Utils.sln b/src/utils/NServiceBus.Utils.sln index 25564c65bb0..4eaa12526d5 100644 --- a/src/utils/NServiceBus.Utils.sln +++ b/src/utils/NServiceBus.Utils.sln @@ -1,32 +1,32 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Utils", "NServiceBus.Utils.csproj", "{2616579A-202F-48F6-8A7F-6A6AA9288CA7}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Runner", "Runner\Runner.csproj", "{D52F3982-0F00-4E07-BDFC-61095057E5A8}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Utils.Reflection", "NServiceBus.Utils.Reflection\NServiceBus.Utils.Reflection.csproj", "{B82E9E46-A768-4E48-9A94-0DD4F8379366}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2616579A-202F-48F6-8A7F-6A6AA9288CA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2616579A-202F-48F6-8A7F-6A6AA9288CA7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2616579A-202F-48F6-8A7F-6A6AA9288CA7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2616579A-202F-48F6-8A7F-6A6AA9288CA7}.Release|Any CPU.Build.0 = Release|Any CPU - {D52F3982-0F00-4E07-BDFC-61095057E5A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D52F3982-0F00-4E07-BDFC-61095057E5A8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D52F3982-0F00-4E07-BDFC-61095057E5A8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D52F3982-0F00-4E07-BDFC-61095057E5A8}.Release|Any CPU.Build.0 = Release|Any CPU - {B82E9E46-A768-4E48-9A94-0DD4F8379366}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B82E9E46-A768-4E48-9A94-0DD4F8379366}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B82E9E46-A768-4E48-9A94-0DD4F8379366}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B82E9E46-A768-4E48-9A94-0DD4F8379366}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Utils", "NServiceBus.Utils.csproj", "{2616579A-202F-48F6-8A7F-6A6AA9288CA7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Runner", "Runner\Runner.csproj", "{D52F3982-0F00-4E07-BDFC-61095057E5A8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NServiceBus.Utils.Reflection", "NServiceBus.Utils.Reflection\NServiceBus.Utils.Reflection.csproj", "{B82E9E46-A768-4E48-9A94-0DD4F8379366}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2616579A-202F-48F6-8A7F-6A6AA9288CA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2616579A-202F-48F6-8A7F-6A6AA9288CA7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2616579A-202F-48F6-8A7F-6A6AA9288CA7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2616579A-202F-48F6-8A7F-6A6AA9288CA7}.Release|Any CPU.Build.0 = Release|Any CPU + {D52F3982-0F00-4E07-BDFC-61095057E5A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D52F3982-0F00-4E07-BDFC-61095057E5A8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D52F3982-0F00-4E07-BDFC-61095057E5A8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D52F3982-0F00-4E07-BDFC-61095057E5A8}.Release|Any CPU.Build.0 = Release|Any CPU + {B82E9E46-A768-4E48-9A94-0DD4F8379366}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B82E9E46-A768-4E48-9A94-0DD4F8379366}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B82E9E46-A768-4E48-9A94-0DD4F8379366}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B82E9E46-A768-4E48-9A94-0DD4F8379366}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/utils/PerformanceCounterInstallation.cs b/src/utils/PerformanceCounterInstallation.cs index 206e14ab540..13408fb40a8 100644 --- a/src/utils/PerformanceCounterInstallation.cs +++ b/src/utils/PerformanceCounterInstallation.cs @@ -1,42 +1,42 @@ -using System.Diagnostics; -using Common.Logging; - -namespace NServiceBus.Utils -{ - /// - /// Performs installation of nessesary categories and conters for NServiceBus - /// - public class PerformanceCounterInstallation - { - /// - /// Starts the install - /// - public static void InstallCounters() - { - Logger.Debug("Starting installation of PerformanceCounters "); - - var categoryName = "NServiceBus"; - var counterName = "Critical Time"; - - if (PerformanceCounterCategory.Exists(categoryName)) - { - Logger.Warn("Category " + categoryName + " already exist, going to delete first"); - PerformanceCounterCategory.Delete(categoryName); - } - - - var data = new CounterCreationDataCollection(); - - var c1 = new CounterCreationData(counterName, "Age of the oldest message in the queue", - PerformanceCounterType.NumberOfItems32); - data.Add(c1); - - PerformanceCounterCategory.Create(categoryName, "NServiceBus statistics", - PerformanceCounterCategoryType.MultiInstance, data); - - Logger.Debug("Installation of PerformanceCounters successful."); - } - - private static readonly ILog Logger = LogManager.GetLogger("NServiceBus.Utils"); - } +using System.Diagnostics; +using Common.Logging; + +namespace NServiceBus.Utils +{ + /// + /// Performs installation of nessesary categories and conters for NServiceBus + /// + public class PerformanceCounterInstallation + { + /// + /// Starts the install + /// + public static void InstallCounters() + { + Logger.Debug("Starting installation of PerformanceCounters "); + + var categoryName = "NServiceBus"; + var counterName = "Critical Time"; + + if (PerformanceCounterCategory.Exists(categoryName)) + { + Logger.Warn("Category " + categoryName + " already exist, going to delete first"); + PerformanceCounterCategory.Delete(categoryName); + } + + + var data = new CounterCreationDataCollection(); + + var c1 = new CounterCreationData(counterName, "Age of the oldest message in the queue", + PerformanceCounterType.NumberOfItems32); + data.Add(c1); + + PerformanceCounterCategory.Create(categoryName, "NServiceBus statistics", + PerformanceCounterCategoryType.MultiInstance, data); + + Logger.Debug("Installation of PerformanceCounters successful."); + } + + private static readonly ILog Logger = LogManager.GetLogger("NServiceBus.Utils"); + } } \ No newline at end of file diff --git a/src/utils/ProcessUtil.cs b/src/utils/ProcessUtil.cs index 1020bb2015f..9cbce16b1c1 100644 --- a/src/utils/ProcessUtil.cs +++ b/src/utils/ProcessUtil.cs @@ -1,41 +1,41 @@ -using System; -using System.ServiceProcess; -using Common.Logging; - -namespace NServiceBus.Utils -{ - /// - /// Utility class for changing a windows service's status. - /// - public static class ProcessUtil - { - /// - /// Checks the status of the given controller, and if it isn't the requested state, - /// performs the given action, and checks the state again. - /// - /// - /// - /// - public static void ChangeServiceStatus(ServiceController controller, ServiceControllerStatus status, Action changeStatus) - { - if (controller.Status == status) - { - Logger.Debug(controller.ServiceName + " status is good: " + Enum.GetName(typeof(ServiceControllerStatus), status)); - return; - } - - Logger.Debug(controller.ServiceName + " status is NOT " + Enum.GetName(typeof(ServiceControllerStatus), status) + ". Changing status..."); - - changeStatus(); - - var timeout = TimeSpan.FromSeconds(3); - controller.WaitForStatus(status, timeout); - if (controller.Status == status) - Logger.Debug(controller.ServiceName + " status changed successfully."); - else - throw new InvalidOperationException("Unable to change " + controller.ServiceName + " status to " + Enum.GetName(typeof(ServiceControllerStatus), status)); - } - - private static readonly ILog Logger = LogManager.GetLogger("NServiceBus.Utils"); - } -} +using System; +using System.ServiceProcess; +using Common.Logging; + +namespace NServiceBus.Utils +{ + /// + /// Utility class for changing a windows service's status. + /// + public static class ProcessUtil + { + /// + /// Checks the status of the given controller, and if it isn't the requested state, + /// performs the given action, and checks the state again. + /// + /// + /// + /// + public static void ChangeServiceStatus(ServiceController controller, ServiceControllerStatus status, Action changeStatus) + { + if (controller.Status == status) + { + Logger.Debug(controller.ServiceName + " status is good: " + Enum.GetName(typeof(ServiceControllerStatus), status)); + return; + } + + Logger.Debug(controller.ServiceName + " status is NOT " + Enum.GetName(typeof(ServiceControllerStatus), status) + ". Changing status..."); + + changeStatus(); + + var timeout = TimeSpan.FromSeconds(3); + controller.WaitForStatus(status, timeout); + if (controller.Status == status) + Logger.Debug(controller.ServiceName + " status changed successfully."); + else + throw new InvalidOperationException("Unable to change " + controller.ServiceName + " status to " + Enum.GetName(typeof(ServiceControllerStatus), status)); + } + + private static readonly ILog Logger = LogManager.GetLogger("NServiceBus.Utils"); + } +} diff --git a/src/utils/Properties/AssemblyInfo.cs b/src/utils/Properties/AssemblyInfo.cs index a641fb9c448..a8636f56656 100644 --- a/src/utils/Properties/AssemblyInfo.cs +++ b/src/utils/Properties/AssemblyInfo.cs @@ -1,23 +1,23 @@ -#region License - -/* - * See CommonAssemblyInfo under /src for copyright information. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#endregion - -using System.Reflection; -[assembly: AssemblyTitle("NServiceBus Basic Utilities")] +#region License + +/* + * See CommonAssemblyInfo under /src for copyright information. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +[assembly: AssemblyTitle("NServiceBus Basic Utilities")] [assembly: AssemblyDescription("Basic threading and transaction utilities for nServiceBus")] \ No newline at end of file diff --git a/src/utils/Runner/Program.cs b/src/utils/Runner/Program.cs index 80b4b3b70bd..10c82d1f1c9 100644 --- a/src/utils/Runner/Program.cs +++ b/src/utils/Runner/Program.cs @@ -1,44 +1,44 @@ -using System; -using System.Collections.Specialized; -using System.Linq; -using Common.Logging; -using NServiceBus.Utils; - -namespace Runner -{ - class Program - { - static void Main(string[] args) - { - var props = new NameValueCollection(); - props["configType"] = "EXTERNAL"; - LogManager.Adapter = new Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter(props); - - var layout = new log4net.Layout.PatternLayout("%d [%t] %-5p %c [%x] <%X{auth}> - %m%n"); - var level = log4net.Core.Level.Debug; - - var appender = new log4net.Appender.ConsoleAppender - { - Layout = layout, - Threshold = level - }; - log4net.Config.BasicConfigurator.Configure(appender); - - if(!MsmqInstallation.IsInstallationGood()) - { - Console.WriteLine("MSMQ is not configured correctly for use with NServiceBus"); - - if(!args.ToList().Contains("/i")) - { - Console.WriteLine("Please run with /i to reconfigure MSMQ"); - return; - } - } - MsmqInstallation.StartMsmqIfNecessary(); - - DtcUtil.StartDtcIfNecessary(); - - PerformanceCounterInstallation.InstallCounters(); - } - } -} +using System; +using System.Collections.Specialized; +using System.Linq; +using Common.Logging; +using NServiceBus.Utils; + +namespace Runner +{ + class Program + { + static void Main(string[] args) + { + var props = new NameValueCollection(); + props["configType"] = "EXTERNAL"; + LogManager.Adapter = new Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter(props); + + var layout = new log4net.Layout.PatternLayout("%d [%t] %-5p %c [%x] <%X{auth}> - %m%n"); + var level = log4net.Core.Level.Debug; + + var appender = new log4net.Appender.ConsoleAppender + { + Layout = layout, + Threshold = level + }; + log4net.Config.BasicConfigurator.Configure(appender); + + if(!MsmqInstallation.IsInstallationGood()) + { + Console.WriteLine("MSMQ is not configured correctly for use with NServiceBus"); + + if(!args.ToList().Contains("/i")) + { + Console.WriteLine("Please run with /i to reconfigure MSMQ"); + return; + } + } + MsmqInstallation.StartMsmqIfNecessary(); + + DtcUtil.StartDtcIfNecessary(); + + PerformanceCounterInstallation.InstallCounters(); + } + } +} diff --git a/src/utils/Runner/Properties/AssemblyInfo.cs b/src/utils/Runner/Properties/AssemblyInfo.cs index 97e77347a8b..6e73f48e9e8 100644 --- a/src/utils/Runner/Properties/AssemblyInfo.cs +++ b/src/utils/Runner/Properties/AssemblyInfo.cs @@ -1,2 +1,2 @@ -using System.Reflection; -[assembly: AssemblyTitle("Runner")] +using System.Reflection; +[assembly: AssemblyTitle("Runner")] diff --git a/src/utils/Runner/Runner.csproj b/src/utils/Runner/Runner.csproj index 0a20fe7cb12..ef723db2b86 100644 --- a/src/utils/Runner/Runner.csproj +++ b/src/utils/Runner/Runner.csproj @@ -1,72 +1,72 @@ - - - - Debug - AnyCPU - 9.0.30729 - 2.0 - {D52F3982-0F00-4E07-BDFC-61095057E5A8} - Exe - Properties - Runner - Runner - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - False - ..\..\..\lib\Common.Logging.dll - - - False - ..\..\..\lib\Common.Logging.Log4Net.dll - - - False - ..\..\..\lib\log4net.dll - - - - 3.5 - - - - - CommonAssemblyInfo.cs - - - - - - - {2616579A-202F-48F6-8A7F-6A6AA9288CA7} - NServiceBus.Utils - - - - + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {D52F3982-0F00-4E07-BDFC-61095057E5A8} + Exe + Properties + Runner + Runner + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + False + ..\..\..\lib\Common.Logging.dll + + + False + ..\..\..\lib\Common.Logging.Log4Net.dll + + + False + ..\..\..\lib\log4net.dll + + + + 3.5 + + + + + CommonAssemblyInfo.cs + + + + + + + {2616579A-202F-48F6-8A7F-6A6AA9288CA7} + NServiceBus.Utils + + + + \ No newline at end of file diff --git a/src/utils/TransactionWrapper.cs b/src/utils/TransactionWrapper.cs index 7724606096c..509c41a4374 100644 --- a/src/utils/TransactionWrapper.cs +++ b/src/utils/TransactionWrapper.cs @@ -1,38 +1,38 @@ -using System; -using System.Diagnostics; -using System.Transactions; - -namespace NServiceBus.Utils -{ - /// - /// Provides functionality for executing a callback in a transaction. - /// - public class TransactionWrapper - { - /// - /// Executes the provided delegate method in a transaction. - /// - /// The method to call. - public void RunInTransaction(Action callback) - { - RunInTransaction(callback, IsolationLevel.Serializable, TimeSpan.FromSeconds(30)); - } - - /// - /// Executes the provided delegate method in a transaction. - /// - /// The delegate method to call. - /// The isolation level of the transaction. - /// The timeout period of the transaction. - [DebuggerNonUserCode] // so that exceptions don't interfere with debugging. - public void RunInTransaction(Action callback, IsolationLevel isolationLevel, TimeSpan transactionTimeout) - { - using (var scope = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions { IsolationLevel = isolationLevel, Timeout = transactionTimeout })) - { - callback(); - - scope.Complete(); - } - } - } -} +using System; +using System.Diagnostics; +using System.Transactions; + +namespace NServiceBus.Utils +{ + /// + /// Provides functionality for executing a callback in a transaction. + /// + public class TransactionWrapper + { + /// + /// Executes the provided delegate method in a transaction. + /// + /// The method to call. + public void RunInTransaction(Action callback) + { + RunInTransaction(callback, IsolationLevel.Serializable, TimeSpan.FromSeconds(30)); + } + + /// + /// Executes the provided delegate method in a transaction. + /// + /// The delegate method to call. + /// The isolation level of the transaction. + /// The timeout period of the transaction. + [DebuggerNonUserCode] // so that exceptions don't interfere with debugging. + public void RunInTransaction(Action callback, IsolationLevel isolationLevel, TimeSpan transactionTimeout) + { + using (var scope = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions { IsolationLevel = isolationLevel, Timeout = transactionTimeout })) + { + callback(); + + scope.Complete(); + } + } + } +} diff --git a/src/utils/WorkerThread.cs b/src/utils/WorkerThread.cs index 24546eeecef..d6c6a3684a5 100644 --- a/src/utils/WorkerThread.cs +++ b/src/utils/WorkerThread.cs @@ -1,93 +1,93 @@ -using System; -using System.Threading; -using Common.Logging; - -namespace NServiceBus.Utils -{ - /// - /// Represents a worker thread that will repeatedly execute a callback. - /// - public class WorkerThread - { - private readonly Action methodToRunInLoop; - private readonly Thread thread; - - /// - /// Initializes a new WorkerThread for the specified method to run. - /// - /// The delegate method to execute in a loop. - public WorkerThread(Action methodToRunInLoop) - { - this.methodToRunInLoop = methodToRunInLoop; - thread = new Thread(Loop); - thread.SetApartmentState(ApartmentState.MTA); - thread.Name = String.Format("Worker.{0}", thread.ManagedThreadId); - thread.IsBackground = true; - } - - /// - /// Event raised when the worker thread has stopped. - /// - public event EventHandler Stopped; - - /// - /// Starts the worker thread. - /// - public void Start() - { - if (!thread.IsAlive) - thread.Start(); - } - - /// - /// Stops the worker thread. - /// - public void Stop() - { - lock (toLock) - stopRequested = true; - } - - /// - /// Executes the delegate method until the - /// method is called. - /// - protected void Loop() - { - while (!StopRequested) - { - try - { - methodToRunInLoop(); - } - catch (Exception e) - { - Logger.Error("Exception reached top level.", e); - } - } - - if (Stopped != null) - Stopped(this, null); - } - - /// - /// Gets whether or not a stop request has been received. - /// - protected bool StopRequested - { - get - { - bool result; - lock (toLock) - result = stopRequested; - - return result; - } - } - - private volatile bool stopRequested; - private readonly object toLock = new object(); - - private readonly static ILog Logger = LogManager.GetLogger(typeof(WorkerThread)); - } -} +using System; +using System.Threading; +using Common.Logging; + +namespace NServiceBus.Utils +{ + /// + /// Represents a worker thread that will repeatedly execute a callback. + /// + public class WorkerThread + { + private readonly Action methodToRunInLoop; + private readonly Thread thread; + + /// + /// Initializes a new WorkerThread for the specified method to run. + /// + /// The delegate method to execute in a loop. + public WorkerThread(Action methodToRunInLoop) + { + this.methodToRunInLoop = methodToRunInLoop; + thread = new Thread(Loop); + thread.SetApartmentState(ApartmentState.MTA); + thread.Name = String.Format("Worker.{0}", thread.ManagedThreadId); + thread.IsBackground = true; + } + + /// + /// Event raised when the worker thread has stopped. + /// + public event EventHandler Stopped; + + /// + /// Starts the worker thread. + /// + public void Start() + { + if (!thread.IsAlive) + thread.Start(); + } + + /// + /// Stops the worker thread. + /// + public void Stop() + { + lock (toLock) + stopRequested = true; + } + + /// + /// Executes the delegate method until the + /// method is called. + /// + protected void Loop() + { + while (!StopRequested) + { + try + { + methodToRunInLoop(); + } + catch (Exception e) + { + Logger.Error("Exception reached top level.", e); + } + } + + if (Stopped != null) + Stopped(this, null); + } + + /// + /// Gets whether or not a stop request has been received. + /// + protected bool StopRequested + { + get + { + bool result; + lock (toLock) + result = stopRequested; + + return result; + } + } + + private volatile bool stopRequested; + private readonly object toLock = new object(); + + private readonly static ILog Logger = LogManager.GetLogger(typeof(WorkerThread)); + } +} diff --git a/tools/NUnit/framework/nunit.framework.xml b/tools/NUnit/framework/nunit.framework.xml index f36fddd6b9f..a1660f65356 100644 --- a/tools/NUnit/framework/nunit.framework.xml +++ b/tools/NUnit/framework/nunit.framework.xml @@ -1,10280 +1,10280 @@ - - - - nunit.framework - - - - - Attribute used to apply a category to a test - - - - - The name of the category - - - - - Construct attribute for a given category based on - a name. The name may not contain the characters ',', - '+', '-' or '!'. However, this is not checked in the - constructor since it would cause an error to arise at - as the test was loaded without giving a clear indication - of where the problem is located. The error is handled - in NUnitFramework.cs by marking the test as not - runnable. - - The name of the category - - - - Protected constructor uses the Type name as the name - of the category. - - - - - The name of the category - - - - - Used to mark a field for use as a datapoint when executing a theory - within the same fixture that requires an argument of the field's Type. - - - - - Used to mark an array as containing a set of datapoints to be used - executing a theory within the same fixture that requires an argument - of the Type of the array elements. - - - - - Attribute used to provide descriptive text about a - test case or fixture. - - - - - Construct the attribute - - Text describing the test - - - - Gets the test description - - - - - Enumeration indicating how the expected message parameter is to be used - - - - Expect an exact match - - - Expect a message containing the parameter string - - - Match the regular expression provided as a parameter - - - Expect a message that starts with the parameter string - - - - ExpectedExceptionAttribute - - - - - - Constructor for a non-specific exception - - - - - Constructor for a given type of exception - - The type of the expected exception - - - - Constructor for a given exception name - - The full name of the expected exception - - - - Gets or sets the expected exception type - - - - - Gets or sets the full Type name of the expected exception - - - - - Gets or sets the expected message text - - - - - Gets or sets the user message displayed in case of failure - - - - - Gets or sets the type of match to be performed on the expected message - - - - - Gets the name of a method to be used as an exception handler - - - - - ExplicitAttribute marks a test or test fixture so that it will - only be run if explicitly executed from the gui or command line - or if it is included by use of a filter. The test will not be - run simply because an enclosing suite is run. - - - - - Default constructor - - - - - Constructor with a reason - - The reason test is marked explicit - - - - The reason test is marked explicit - - - - - Attribute used to mark a test that is to be ignored. - Ignored tests result in a warning message when the - tests are run. - - - - - Constructs the attribute without giving a reason - for ignoring the test. - - - - - Constructs the attribute giving a reason for ignoring the test - - The reason for ignoring the test - - - - The reason for ignoring a test - - - - - Abstract base for Attributes that are used to include tests - in the test run based on environmental settings. - - - - - Constructor with no included items specified, for use - with named property syntax. - - - - - Constructor taking one or more included items - - Comma-delimited list of included items - - - - Name of the item that is needed in order for - a test to run. Multiple itemss may be given, - separated by a comma. - - - - - Name of the item to be excluded. Multiple items - may be given, separated by a comma. - - - - - The reason for including or excluding the test - - - - - PlatformAttribute is used to mark a test fixture or an - individual method as applying to a particular platform only. - - - - - Constructor with no platforms specified, for use - with named property syntax. - - - - - Constructor taking one or more platforms - - Comma-deliminted list of platforms - - - - CultureAttribute is used to mark a test fixture or an - individual method as applying to a particular Culture only. - - - - - Constructor with no cultures specified, for use - with named property syntax. - - - - - Constructor taking one or more cultures - - Comma-deliminted list of cultures - - - - Marks a test to use a combinatorial join of any argument data - provided. NUnit will create a test case for every combination of - the arguments provided. This can result in a large number of test - cases and so should be used judiciously. This is the default join - type, so the attribute need not be used except as documentation. - - - - - PropertyAttribute is used to attach information to a test as a name/value pair.. - - - - - Construct a PropertyAttribute with a name and string value - - The name of the property - The property value - - - - Construct a PropertyAttribute with a name and int value - - The name of the property - The property value - - - - Construct a PropertyAttribute with a name and double value - - The name of the property - The property value - - - - Constructor for derived classes that set the - property dictionary directly. - - - - - Constructor for use by derived classes that use the - name of the type as the property name. Derived classes - must ensure that the Type of the property value is - a standard type supported by the BCL. Any custom - types will cause a serialization Exception when - in the client. - - - - - Gets the property dictionary for this attribute - - - - - Default constructor - - - - - Marks a test to use pairwise join of any argument data provided. - NUnit will attempt too excercise every pair of argument values at - least once, using as small a number of test cases as it can. With - only two arguments, this is the same as a combinatorial join. - - - - - Default constructor - - - - - Marks a test to use a sequential join of any argument data - provided. NUnit will use arguements for each parameter in - sequence, generating test cases up to the largest number - of argument values provided and using null for any arguments - for which it runs out of values. Normally, this should be - used with the same number of arguments for each parameter. - - - - - Default constructor - - - - - Summary description for MaxTimeAttribute. - - - - - Construct a MaxTimeAttribute, given a time in milliseconds. - - The maximum elapsed time in milliseconds - - - - RandomAttribute is used to supply a set of random values - to a single parameter of a parameterized test. - - - - - ValuesAttribute is used to provide literal arguments for - an individual parameter of a test. - - - - - Abstract base class for attributes that apply to parameters - and supply data for the parameter. - - - - - Gets the data to be provided to the specified parameter - - - - - The collection of data to be returned. Must - be set by any derived attribute classes. - We use an object[] so that the individual - elements may have their type changed in GetData - if necessary. - - - - - Construct with one argument - - - - - - Construct with two arguments - - - - - - - Construct with three arguments - - - - - - - - Construct with an array of arguments - - - - - - Get the collection of values to be used as arguments - - - - - Construct a set of doubles from 0.0 to 1.0, - specifying only the count. - - - - - - Construct a set of doubles from min to max - - - - - - - - Construct a set of ints from min to max - - - - - - - - Get the collection of values to be used as arguments - - - - - RangeAttribute is used to supply a range of values to an - individual parameter of a parameterized test. - - - - - Construct a range of ints using default step of 1 - - - - - - - Construct a range of ints specifying the step size - - - - - - - - Construct a range of longs - - - - - - - - Construct a range of doubles - - - - - - - - Construct a range of floats - - - - - - - - RepeatAttribute may be applied to test case in order - to run it multiple times. - - - - - Construct a RepeatAttribute - - The number of times to run the test - - - - RequiredAddinAttribute may be used to indicate the names of any addins - that must be present in order to run some or all of the tests in an - assembly. If the addin is not loaded, the entire assembly is marked - as NotRunnable. - - - - - Initializes a new instance of the class. - - The required addin. - - - - Gets the name of required addin. - - The required addin name. - - - - Summary description for SetCultureAttribute. - - - - - Construct given the name of a culture - - - - - - Summary description for SetUICultureAttribute. - - - - - Construct given the name of a culture - - - - - - Attribute used to mark a class that contains one-time SetUp - and/or TearDown methods that apply to all the tests in a - namespace or an assembly. - - - - - SetUpFixtureAttribute is used to identify a SetUpFixture - - - - - Attribute used to mark a static (shared in VB) property - that returns a list of tests. - - - - - Attribute used to identify a method that is called - immediately after each test is run. The method is - guaranteed to be called, even if an exception is thrown. - - - - - Adding this attribute to a method within a - class makes the method callable from the NUnit test runner. There is a property - called Description which is optional which you can provide a more detailed test - description. This class cannot be inherited. - - - - [TestFixture] - public class Fixture - { - [Test] - public void MethodToTest() - {} - - [Test(Description = "more detailed description")] - publc void TestDescriptionMethod() - {} - } - - - - - - Descriptive text for this test - - - - - TestCaseAttribute is used to mark parameterized test cases - and provide them with their arguments. - - - - - The ITestCaseData interface is implemented by a class - that is able to return complete testcases for use by - a parameterized test method. - - NOTE: This interface is used in both the framework - and the core, even though that results in two different - types. However, sharing the source code guarantees that - the various implementations will be compatible and that - the core is able to reflect successfully over the - framework implementations of ITestCaseData. - - - - - Gets the argument list to be provided to the test - - - - - Gets the expected result - - - - - Gets the expected exception Type - - - - - Gets the FullName of the expected exception - - - - - Gets the name to be used for the test - - - - - Gets the description of the test - - - - - Gets a value indicating whether this is ignored. - - true if ignored; otherwise, false. - - - - Gets the ignore reason. - - The ignore reason. - - - - Construct a TestCaseAttribute with a list of arguments. - This constructor is not CLS-Compliant - - - - - - Construct a TestCaseAttribute with a single argument - - - - - - Construct a TestCaseAttribute with a two arguments - - - - - - - Construct a TestCaseAttribute with a three arguments - - - - - - - - Gets the list of arguments to a test case - - - - - Gets or sets the expected result. - - The result. - - - - Gets or sets the expected exception. - - The expected exception. - - - - Gets or sets the name the expected exception. - - The expected name of the exception. - - - - Gets or sets the expected message of the expected exception - - The expected message of the exception. - - - - Gets or sets the type of match to be performed on the expected message - - - - - Gets or sets the description. - - The description. - - - - Gets or sets the name of the test. - - The name of the test. - - - - Gets or sets the ignored status of the test - - - - - Gets or sets the ignored status of the test - - - - - Gets the ignore reason. - - The ignore reason. - - - - FactoryAttribute indicates the source to be used to - provide test cases for a test method. - - - - - Construct with the name of the factory - for use with languages - that don't support params arrays. - - An array of the names of the factories that will provide data - - - - Construct with a Type and name - for use with languages - that don't support params arrays. - - The Type that will provide data - The name of the method, property or field that will provide data - - - - The name of a the method, property or fiend to be used as a source - - - - - A Type to be used as a source - - - - - [TestFixture] - public class ExampleClass - {} - - - - - Default constructor - - - - - Construct with a object[] representing a set of arguments. - In .NET 2.0, the arguments may later be separated into - type arguments and constructor arguments. - - - - - - Descriptive text for this fixture - - - - - The arguments originally provided to the attribute - - - - - Gets or sets a value indicating whether this should be ignored. - - true if ignore; otherwise, false. - - - - Gets or sets the ignore reason. May set Ignored as a side effect. - - The ignore reason. - - - - Get or set the type arguments. If not set - explicitly, any leading arguments that are - Types are taken as type arguments. - - - - - Attribute used to identify a method that is - called before any tests in a fixture are run. - - - - - Attribute used to identify a method that is called after - all the tests in a fixture have run. The method is - guaranteed to be called, even if an exception is thrown. - - - - - Adding this attribute to a method within a - class makes the method callable from the NUnit test runner. There is a property - called Description which is optional which you can provide a more detailed test - description. This class cannot be inherited. - - - - [TestFixture] - public class Fixture - { - [Test] - public void MethodToTest() - {} - - [Test(Description = "more detailed description")] - publc void TestDescriptionMethod() - {} - } - - - - - - WUsed on a method, marks the test with a timeout value in milliseconds. - The test will be run in a separate thread and is cancelled if the timeout - is exceeded. Used on a method or assembly, sets the default timeout - for all contained test methods. - - - - - Construct a TimeoutAttribute given a time in milliseconds - - The timeout value in milliseconds - - - - Marks a test that must run in the STA, causing it - to run in a separate thread if necessary. - - On methods, you may also use STAThreadAttribute - to serve the same purpose. - - - - - Construct a RequiresSTAAttribute - - - - - Marks a test that must run in the MTA, causing it - to run in a separate thread if necessary. - - On methods, you may also use MTAThreadAttribute - to serve the same purpose. - - - - - Construct a RequiresMTAAttribute - - - - - Marks a test that must run on a separate thread. - - - - - Construct a RequiresThreadAttribute - - - - - Construct a RequiresThreadAttribute, specifying the apartment - - - - - ValueSourceAttribute indicates the source to be used to - provide data for one parameter of a test method. - - - - - Construct with the name of the factory - for use with languages - that don't support params arrays. - - The name of the data source to be used - - - - Construct with a Type and name - for use with languages - that don't support params arrays. - - The Type that will provide data - The name of the method, property or field that will provide data - - - - The name of a the method, property or fiend to be used as a source - - - - - A Type to be used as a source - - - - - AttributeExistsConstraint tests for the presence of a - specified attribute on a Type. - - - - - The Constraint class is the base of all built-in constraints - within NUnit. It provides the operator overloads used to combine - constraints. - - - - - The IConstraintExpression interface is implemented by all - complete and resolvable constraints and expressions. - - - - - Return the top-level constraint for this expression - - - - - - Static UnsetObject used to detect derived constraints - failing to set the actual value. - - - - - The actual value being tested against a constraint - - - - - The display name of this Constraint for use by ToString() - - - - - Argument fields used by ToString(); - - - - - The builder holding this constraint - - - - - Construct a constraint with no arguments - - - - - Construct a constraint with one argument - - - - - Construct a constraint with two arguments - - - - - Sets the ConstraintBuilder holding this constraint - - - - - Write the failure message to the MessageWriter provided - as an argument. The default implementation simply passes - the constraint and the actual value to the writer, which - then displays the constraint description and the value. - - Constraints that need to provide additional details, - such as where the error occured can override this. - - The MessageWriter on which to display the message - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Test whether the constraint is satisfied by an - ActualValueDelegate that returns the value to be tested. - The default implementation simply evaluates the delegate - but derived classes may override it to provide for delayed - processing. - - An ActualValueDelegate - True for success, false for failure - - - - Test whether the constraint is satisfied by a given reference. - The default implementation simply dereferences the value but - derived classes may override it to provide for delayed processing. - - A reference to the value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. - - The writer on which the actual value is displayed - - - - Default override of ToString returns the constraint DisplayName - followed by any arguments within angle brackets. - - - - - - Returns the string representation of this constraint - - - - - This operator creates a constraint that is satisfied only if both - argument constraints are satisfied. - - - - - This operator creates a constraint that is satisfied if either - of the argument constraints is satisfied. - - - - - This operator creates a constraint that is satisfied if the - argument constraint is not satisfied. - - - - - Returns a DelayedConstraint with the specified delay time. - - The delay in milliseconds. - - - - - Returns a DelayedConstraint with the specified delay time - and polling interval. - - The delay in milliseconds. - The interval at which to test the constraint. - - - - - The display name of this Constraint for use by ToString(). - The default value is the name of the constraint with - trailing "Constraint" removed. Derived classes may set - this to another name in their constructors. - - - - - Returns a ConstraintExpression by appending And - to the current constraint. - - - - - Returns a ConstraintExpression by appending And - to the current constraint. - - - - - Returns a ConstraintExpression by appending Or - to the current constraint. - - - - - Class used to detect any derived constraints - that fail to set the actual value in their - Matches override. - - - - - Constructs an AttributeExistsConstraint for a specific attribute Type - - - - - - Tests whether the object provides the expected attribute. - - A Type, MethodInfo, or other ICustomAttributeProvider - True if the expected attribute is present, otherwise false - - - - Writes the description of the constraint to the specified writer - - - - - AttributeConstraint tests that a specified attribute is present - on a Type or other provider and that the value of the attribute - satisfies some other constraint. - - - - - Abstract base class used for prefixes - - - - - The base constraint - - - - - Construct given a base constraint - - - - - - Constructs an AttributeConstraint for a specified attriute - Type and base constraint. - - - - - - - Determines whether the Type or other provider has the - expected attribute and if its value matches the - additional constraint specified. - - - - - Writes a description of the attribute to the specified writer. - - - - - Writes the actual value supplied to the specified writer. - - - - - Returns a string representation of the constraint. - - - - - BasicConstraint is the abstract base for constraints that - perform a simple comparison to a constant value. - - - - - Initializes a new instance of the class. - - The expected. - The description. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - NullConstraint tests that the actual value is null - - - - - Initializes a new instance of the class. - - - - - TrueConstraint tests that the actual value is true - - - - - Initializes a new instance of the class. - - - - - FalseConstraint tests that the actual value is false - - - - - Initializes a new instance of the class. - - - - - NaNConstraint tests that the actual value is a double or float NaN - - - - - Test that the actual value is an NaN - - - - - - - Write the constraint description to a specified writer - - - - - - BinaryConstraint is the abstract base of all constraints - that combine two other constraints in some fashion. - - - - - The first constraint being combined - - - - - The second constraint being combined - - - - - Construct a BinaryConstraint from two other constraints - - The first constraint - The second constraint - - - - AndConstraint succeeds only if both members succeed. - - - - - Create an AndConstraint from two other constraints - - The first constraint - The second constraint - - - - Apply both member constraints to an actual value, succeeding - succeeding only if both of them succeed. - - The actual value - True if the constraints both succeeded - - - - Write a description for this contraint to a MessageWriter - - The MessageWriter to receive the description - - - - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. - - The writer on which the actual value is displayed - - - - OrConstraint succeeds if either member succeeds - - - - - Create an OrConstraint from two other constraints - - The first constraint - The second constraint - - - - Apply the member constraints to an actual value, succeeding - succeeding as soon as one of them succeeds. - - The actual value - True if either constraint succeeded - - - - Write a description for this contraint to a MessageWriter - - The MessageWriter to receive the description - - - - CollectionConstraint is the abstract base class for - constraints that operate on collections. - - - - - Construct an empty CollectionConstraint - - - - - Construct a CollectionConstraint - - - - - - Determines whether the specified enumerable is empty. - - The enumerable. - - true if the specified enumerable is empty; otherwise, false. - - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Protected method to be implemented by derived classes - - - - - - - CollectionItemsEqualConstraint is the abstract base class for all - collection constraints that apply some notion of item equality - as a part of their operation. - - - - - Construct an empty CollectionConstraint - - - - - Construct a CollectionConstraint - - - - - - Flag the constraint to use the supplied IComparer object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied IComparer object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied Comparison object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied IEqualityComparer object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied IEqualityComparer object. - - The IComparer object to use. - Self. - - - - Compares two collection members for equality - - - - - Return a new CollectionTally for use in making tests - - The collection to be included in the tally - - - - Flag the constraint to ignore case and return self. - - - - - EmptyCollectionConstraint tests whether a collection is empty. - - - - - Check that the collection is empty - - - - - - - Write the constraint description to a MessageWriter - - - - - - UniqueItemsConstraint tests whether all the items in a - collection are unique. - - - - - Check that all items are unique. - - - - - - - Write a description of this constraint to a MessageWriter - - - - - - CollectionContainsConstraint is used to test whether a collection - contains an expected object as a member. - - - - - Construct a CollectionContainsConstraint - - - - - - Test whether the expected item is contained in the collection - - - - - - - Write a descripton of the constraint to a MessageWriter - - - - - - CollectionEquivalentCOnstraint is used to determine whether two - collections are equivalent. - - - - - Construct a CollectionEquivalentConstraint - - - - - - Test whether two collections are equivalent - - - - - - - Write a description of this constraint to a MessageWriter - - - - - - CollectionSubsetConstraint is used to determine whether - one collection is a subset of another - - - - - Construct a CollectionSubsetConstraint - - The collection that the actual value is expected to be a subset of - - - - Test whether the actual collection is a subset of - the expected collection provided. - - - - - - - Write a description of this constraint to a MessageWriter - - - - - - CollectionOrderedConstraint is used to test whether a collection is ordered. - - - - - Construct a CollectionOrderedConstraint - - - - - Modifies the constraint to use an IComparer and returns self. - - - - - Modifies the constraint to use an IComparer<T> and returns self. - - - - - Modifies the constraint to use a Comparison<T> and returns self. - - - - - Modifies the constraint to test ordering by the value of - a specified property and returns self. - - - - - Test whether the collection is ordered - - - - - - - Write a description of the constraint to a MessageWriter - - - - - - Returns the string representation of the constraint. - - - - - - If used performs a reverse comparison - - - - - CollectionTally counts (tallies) the number of - occurences of each object in one or more enumerations. - - - - - Construct a CollectionTally object from a comparer and a collection - - - - - Try to remove an object from the tally - - The object to remove - True if successful, false if the object was not found - - - - Try to remove a set of objects from the tally - - The objects to remove - True if successful, false if any object was not found - - - - The number of objects remaining in the tally - - - - - ComparisonAdapter class centralizes all comparisons of - values in NUnit, adapting to the use of any provided - IComparer, IComparer<T> or Comparison<T> - - - - - Returns a ComparisonAdapter that wraps an IComparer - - - - - Returns a ComparisonAdapter that wraps an IComparer<T> - - - - - Returns a ComparisonAdapter that wraps a Comparison<T> - - - - - Compares two objects - - - - - Gets the default ComparisonAdapter, which wraps an - NUnitComparer object. - - - - - Construct a ComparisonAdapter for an IComparer - - - - - Compares two objects - - - - - - - - Construct a default ComparisonAdapter - - - - - ComparisonAdapter<T> extends ComparisonAdapter and - allows use of an IComparer<T> or Comparison<T> - to actually perform the comparison. - - - - - Construct a ComparisonAdapter for an IComparer<T> - - - - - Compare a Type T to an object - - - - - Construct a ComparisonAdapter for a Comparison<T> - - - - - Compare a Type T to an object - - - - - Abstract base class for constraints that compare values to - determine if one is greater than, equal to or less than - the other. - - - - - The value against which a comparison is to be made - - - - - If true, less than returns success - - - - - if true, equal returns success - - - - - if true, greater than returns success - - - - - The predicate used as a part of the description - - - - - ComparisonAdapter to be used in making the comparison - - - - - Initializes a new instance of the class. - - The value against which to make a comparison. - if set to true less succeeds. - if set to true equal succeeds. - if set to true greater succeeds. - String used in describing the constraint. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Modifies the constraint to use an IComparer and returns self - - - - - Modifies the constraint to use an IComparer<T> and returns self - - - - - Modifies the constraint to use a Comparison<T> and returns self - - - - - Tests whether a value is greater than the value supplied to its constructor - - - - - Initializes a new instance of the class. - - The expected value. - - - - Tests whether a value is greater than or equal to the value supplied to its constructor - - - - - Initializes a new instance of the class. - - The expected value. - - - - Tests whether a value is less than the value supplied to its constructor - - - - - Initializes a new instance of the class. - - The expected value. - - - - Tests whether a value is less than or equal to the value supplied to its constructor - - - - - Initializes a new instance of the class. - - The expected value. - - - - Delegate used to delay evaluation of the actual value - to be used in evaluating a constraint - - - - - ConstraintBuilder maintains the stacks that are used in - processing a ConstraintExpression. An OperatorStack - is used to hold operators that are waiting for their - operands to be reognized. a ConstraintStack holds - input constraints as well as the results of each - operator applied. - - - - - Initializes a new instance of the class. - - - - - Appends the specified operator to the expression by first - reducing the operator stack and then pushing the new - operator on the stack. - - The operator to push. - - - - Appends the specified constraint to the expresson by pushing - it on the constraint stack. - - The constraint to push. - - - - Sets the top operator right context. - - The right context. - - - - Reduces the operator stack until the topmost item - precedence is greater than or equal to the target precedence. - - The target precedence. - - - - Resolves this instance, returning a Constraint. If the builder - is not currently in a resolvable state, an exception is thrown. - - The resolved constraint - - - - Gets a value indicating whether this instance is resolvable. - - - true if this instance is resolvable; otherwise, false. - - - - - OperatorStack is a type-safe stack for holding ConstraintOperators - - - - - Initializes a new instance of the class. - - The builder. - - - - Pushes the specified operator onto the stack. - - The op. - - - - Pops the topmost operator from the stack. - - - - - - Gets a value indicating whether this is empty. - - true if empty; otherwise, false. - - - - Gets the topmost operator without modifying the stack. - - The top. - - - - ConstraintStack is a type-safe stack for holding Constraints - - - - - Initializes a new instance of the class. - - The builder. - - - - Pushes the specified constraint. As a side effect, - the constraint's builder field is set to the - ConstraintBuilder owning this stack. - - The constraint. - - - - Pops this topmost constrait from the stack. - As a side effect, the constraint's builder - field is set to null. - - - - - - Gets a value indicating whether this is empty. - - true if empty; otherwise, false. - - - - Gets the topmost constraint without modifying the stack. - - The topmost constraint - - - - ConstraintExpression represents a compound constraint in the - process of being constructed from a series of syntactic elements. - - Individual elements are appended to the expression as they are - reognized. Once an actual Constraint is appended, the expression - returns a resolvable Constraint. - - - - - ConstraintExpressionBase is the abstract base class for the - generated ConstraintExpression class, which represents a - compound constraint in the process of being constructed - from a series of syntactic elements. - - NOTE: ConstraintExpressionBase is aware of some of its - derived classes, which is an apparent violation of - encapsulation. Ideally, these classes would be a - single class, but they must be separated in order to - allow parts to be generated under .NET 1.x and to - provide proper user feedback in syntactically - aware IDEs. - - - - - The ConstraintBuilder holding the elements recognized so far - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the - class passing in a ConstraintBuilder, which may be pre-populated. - - The builder. - - - - Returns a string representation of the expression as it - currently stands. This should only be used for testing, - since it has the side-effect of resolving the expression. - - - - - - Appends an operator to the expression and returns the - resulting expression itself. - - - - - Appends a self-resolving operator to the expression and - returns a new ResolvableConstraintExpression. - - - - - Appends a constraint to the expression and returns that - constraint, which is associated with the current state - of the expression being built. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the - class passing in a ConstraintBuilder, which may be pre-populated. - - The builder. - - - - Returns a new PropertyConstraintExpression, which will either - test for the existence of the named property on the object - being tested or apply any following constraint to that property. - - - - - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. - - - - - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. - - - - - Returns the constraint provided as an argument - used to allow custom - custom constraints to easily participate in the syntax. - - - - - Returns the constraint provided as an argument - used to allow custom - custom constraints to easily participate in the syntax. - - - - - Returns a constraint that tests two items for equality - - - - - Returns a constraint that tests that two references are the same object - - - - - Returns a constraint that tests whether the - actual value is greater than the suppled argument - - - - - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument - - - - - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument - - - - - Returns a constraint that tests whether the - actual value is less than the suppled argument - - - - - Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument - - - - - Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument - - - - - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. - - - - - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is a collection containing the same elements as the - collection supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is a subset of the collection supplied as an argument. - - - - - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. - - - - - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. - - - - - Returns a new ContainsConstraint. This constraint - will, in turn, make use of the appropriate second-level - constraint, depending on the type of the actual argument. - This overload is only used if the item sought is a string, - since any other type implies that we are looking for a - collection member. - - - - - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value matches the Regex pattern supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value matches the Regex pattern supplied as an argument. - - - - - Returns a constraint that tests whether the path provided - is the same as an expected path after canonicalization. - - - - - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. - - - - - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. - - - - - Returns a constraint that tests whether the actual value falls - within a specified range. - - - - - Returns a ConstraintExpression that negates any - following constraint. - - - - - Returns a ConstraintExpression that negates any - following constraint. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if at least one of them succeeds. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them fail. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the Length property of the object being tested. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the Count property of the object being tested. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the Message property of the object being tested. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the InnerException property of the object being tested. - - - - - With is currently a NOP - reserved for future use. - - - - - Returns a constraint that tests for null - - - - - Returns a constraint that tests for True - - - - - Returns a constraint that tests for False - - - - - Returns a constraint that tests for NaN - - - - - Returns a constraint that tests for empty - - - - - Returns a constraint that tests whether a collection - contains all unique items. - - - - - Returns a constraint that tests whether an object graph is serializable in binary format. - - - - - Returns a constraint that tests whether an object graph is serializable in xml format. - - - - - Returns a constraint that tests whether a collection is ordered - - - - - Helper class with properties and methods that supply - a number of constraints used in Asserts. - - - - - Returns a new PropertyConstraintExpression, which will either - test for the existence of the named property on the object - being tested or apply any following constraint to that property. - - - - - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. - - - - - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. - - - - - Returns a constraint that tests two items for equality - - - - - Returns a constraint that tests that two references are the same object - - - - - Returns a constraint that tests whether the - actual value is greater than the suppled argument - - - - - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument - - - - - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument - - - - - Returns a constraint that tests whether the - actual value is less than the suppled argument - - - - - Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument - - - - - Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument - - - - - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. - - - - - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is a collection containing the same elements as the - collection supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is a subset of the collection supplied as an argument. - - - - - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. - - - - - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. - - - - - Returns a new ContainsConstraint. This constraint - will, in turn, make use of the appropriate second-level - constraint, depending on the type of the actual argument. - This overload is only used if the item sought is a string, - since any other type implies that we are looking for a - collection member. - - - - - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. - - - - - Returns a constraint that fails if the actual - value contains the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. - - - - - Returns a constraint that fails if the actual - value starts with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. - - - - - Returns a constraint that fails if the actual - value ends with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value matches the Regex pattern supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value matches the Regex pattern supplied as an argument. - - - - - Returns a constraint that fails if the actual - value matches the pattern supplied as an argument. - - - - - Returns a constraint that tests whether the path provided - is the same as an expected path after canonicalization. - - - - - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. - - - - - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. - - - - - Returns a constraint that tests whether the actual value falls - within a specified range. - - - - - Returns a ConstraintExpression that negates any - following constraint. - - - - - Returns a ConstraintExpression that negates any - following constraint. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if at least one of them succeeds. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them fail. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the Length property of the object being tested. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the Count property of the object being tested. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the Message property of the object being tested. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the InnerException property of the object being tested. - - - - - Returns a constraint that tests for null - - - - - Returns a constraint that tests for True - - - - - Returns a constraint that tests for False - - - - - Returns a constraint that tests for NaN - - - - - Returns a constraint that tests for empty - - - - - Returns a constraint that tests whether a collection - contains all unique items. - - - - - Returns a constraint that tests whether an object graph is serializable in binary format. - - - - - Returns a constraint that tests whether an object graph is serializable in xml format. - - - - - Returns a constraint that tests whether a collection is ordered - - - - - The ConstraintOperator class is used internally by a - ConstraintBuilder to represent an operator that - modifies or combines constraints. - - Constraint operators use left and right precedence - values to determine whether the top operator on the - stack should be reduced before pushing a new operator. - - - - - The precedence value used when the operator - is about to be pushed to the stack. - - - - - The precedence value used when the operator - is on the top of the stack. - - - - - Reduce produces a constraint from the operator and - any arguments. It takes the arguments from the constraint - stack and pushes the resulting constraint on it. - - - - - - The syntax element preceding this operator - - - - - The syntax element folowing this operator - - - - - The precedence value used when the operator - is about to be pushed to the stack. - - - - - The precedence value used when the operator - is on the top of the stack. - - - - - PrefixOperator takes a single constraint and modifies - it's action in some way. - - - - - Reduce produces a constraint from the operator and - any arguments. It takes the arguments from the constraint - stack and pushes the resulting constraint on it. - - - - - - Returns the constraint created by applying this - prefix to another constraint. - - - - - - - Negates the test of the constraint it wraps. - - - - - Constructs a new NotOperator - - - - - Returns a NotConstraint applied to its argument. - - - - - Abstract base for operators that indicate how to - apply a constraint to items in a collection. - - - - - Constructs a CollectionOperator - - - - - Represents a constraint that succeeds if all the - members of a collection match a base constraint. - - - - - Returns a constraint that will apply the argument - to the members of a collection, succeeding if - they all succeed. - - - - - Represents a constraint that succeeds if any of the - members of a collection match a base constraint. - - - - - Returns a constraint that will apply the argument - to the members of a collection, succeeding if - any of them succeed. - - - - - Represents a constraint that succeeds if none of the - members of a collection match a base constraint. - - - - - Returns a constraint that will apply the argument - to the members of a collection, succeeding if - none of them succeed. - - - - - Represents a constraint that simply wraps the - constraint provided as an argument, without any - further functionality, but which modifes the - order of evaluation because of its precedence. - - - - - Constructor for the WithOperator - - - - - Returns a constraint that wraps its argument - - - - - Abstract base class for operators that are able to reduce to a - constraint whether or not another syntactic element follows. - - - - - Operator used to test for the presence of a named Property - on an object and optionally apply further tests to the - value of that property. - - - - - Constructs a PropOperator for a particular named property - - - - - Reduce produces a constraint from the operator and - any arguments. It takes the arguments from the constraint - stack and pushes the resulting constraint on it. - - - - - - Gets the name of the property to which the operator applies - - - - - Operator that tests for the presence of a particular attribute - on a type and optionally applies further tests to the attribute. - - - - - Construct an AttributeOperator for a particular Type - - The Type of attribute tested - - - - Reduce produces a constraint from the operator and - any arguments. It takes the arguments from the constraint - stack and pushes the resulting constraint on it. - - - - - Operator that tests that an exception is thrown and - optionally applies further tests to the exception. - - - - - Construct a ThrowsOperator - - - - - Reduce produces a constraint from the operator and - any arguments. It takes the arguments from the constraint - stack and pushes the resulting constraint on it. - - - - - Abstract base class for all binary operators - - - - - Reduce produces a constraint from the operator and - any arguments. It takes the arguments from the constraint - stack and pushes the resulting constraint on it. - - - - - - Abstract method that produces a constraint by applying - the operator to its left and right constraint arguments. - - - - - Gets the left precedence of the operator - - - - - Gets the right precedence of the operator - - - - - Operator that requires both it's arguments to succeed - - - - - Construct an AndOperator - - - - - Apply the operator to produce an AndConstraint - - - - - Operator that requires at least one of it's arguments to succeed - - - - - Construct an OrOperator - - - - - Apply the operator to produce an OrConstraint - - - - - ContainsConstraint tests a whether a string contains a substring - or a collection contains an object. It postpones the decision of - which test to use until the type of the actual argument is known. - This allows testing whether a string is contained in a collection - or as a substring of another string using the same syntax. - - - - - Initializes a new instance of the class. - - The expected. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Flag the constraint to ignore case and return self. - - - - - Applies a delay to the match so that a match can be evaluated in the future. - - - - - Creates a new DelayedConstraint - - The inner constraint two decorate - The time interval after which the match is performed - If the value of is less than 0 - - - - Creates a new DelayedConstraint - - The inner constraint two decorate - The time interval after which the match is performed - The time interval used for polling - If the value of is less than 0 - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for if the base constraint fails, false if it succeeds - - - - Test whether the constraint is satisfied by a delegate - - The delegate whose value is to be tested - True for if the base constraint fails, false if it succeeds - - - - Test whether the constraint is satisfied by a given reference. - Overridden to wait for the specified delay period before - calling the base constraint with the dereferenced value. - - A reference to the value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Write the actual value for a failing constraint test to a MessageWriter. - - The writer on which the actual value is displayed - - - - Returns the string representation of the constraint. - - - - - EmptyDirectoryConstraint is used to test that a directory is empty - - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. - - The writer on which the actual value is displayed - - - - EmptyConstraint tests a whether a string or collection is empty, - postponing the decision about which test is applied until the - type of the actual argument is known. - - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - EqualConstraint is able to compare an actual value with the - expected value provided in its constructor. Two objects are - considered equal if both are null, or if both have the same - value. NUnit has special semantics for some object types. - - - - - If true, strings in error messages will be clipped - - - - - NUnitEqualityComparer used to test equality. - - - - - Initializes a new instance of the class. - - The expected value. - - - - Flag the constraint to use a tolerance when determining equality. - - Tolerance value to be used - Self. - - - - Flag the constraint to use the supplied IComparer object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied IComparer object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied IComparer object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied Comparison object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied IEqualityComparer object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied IEqualityComparer object. - - The IComparer object to use. - Self. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write a failure message. Overridden to provide custom - failure messages for EqualConstraint. - - The MessageWriter to write to - - - - Write description of this constraint - - The MessageWriter to write to - - - - Display the failure information for two collections that did not match. - - The MessageWriter on which to display - The expected collection. - The actual collection - The depth of this failure in a set of nested collections - - - - Displays a single line showing the types and sizes of the expected - and actual collections or arrays. If both are identical, the value is - only shown once. - - The MessageWriter on which to display - The expected collection or array - The actual collection or array - The indentation level for the message line - - - - Displays a single line showing the point in the expected and actual - arrays at which the comparison failed. If the arrays have different - structures or dimensions, both values are shown. - - The MessageWriter on which to display - The expected array - The actual array - Index of the failure point in the underlying collections - The indentation level for the message line - - - - Flag the constraint to ignore case and return self. - - - - - Flag the constraint to suppress string clipping - and return self. - - - - - Flag the constraint to compare arrays as collections - and return self. - - - - - Switches the .Within() modifier to interpret its tolerance as - a distance in representable values (see remarks). - - Self. - - Ulp stands for "unit in the last place" and describes the minimum - amount a given value can change. For any integers, an ulp is 1 whole - digit. For floating point values, the accuracy of which is better - for smaller numbers and worse for larger numbers, an ulp depends - on the size of the number. Using ulps for comparison of floating - point results instead of fixed tolerances is safer because it will - automatically compensate for the added inaccuracy of larger numbers. - - - - - Switches the .Within() modifier to interpret its tolerance as - a percentage that the actual values is allowed to deviate from - the expected value. - - Self - - - - Causes the tolerance to be interpreted as a TimeSpan in days. - - Self - - - - Causes the tolerance to be interpreted as a TimeSpan in hours. - - Self - - - - Causes the tolerance to be interpreted as a TimeSpan in minutes. - - Self - - - - Causes the tolerance to be interpreted as a TimeSpan in seconds. - - Self - - - - Causes the tolerance to be interpreted as a TimeSpan in milliseconds. - - Self - - - - Causes the tolerance to be interpreted as a TimeSpan in clock ticks. - - Self - - - - EqualityAdapter class handles all equality comparisons - that use an IEqualityComparer, IEqualityComparer<T> - or a ComparisonAdapter. - - - - - Compares two objects, returning true if they are equal - - - - - Returns an EqualityAdapter that wraps an IComparer. - - - - - Returns an EqualityAdapter that wraps an IEqualityComparer. - - - - - Returns an EqualityAdapter that wraps an IEqualityComparer<T>. - - - - - Returns an EqualityAdapter that wraps an IComparer<T>. - - - - - Returns an EqualityAdapter that wraps a Comparison<T>. - - - - Helper routines for working with floating point numbers - - - The floating point comparison code is based on this excellent article: - http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm - - - "ULP" means Unit in the Last Place and in the context of this library refers to - the distance between two adjacent floating point numbers. IEEE floating point - numbers can only represent a finite subset of natural numbers, with greater - accuracy for smaller numbers and lower accuracy for very large numbers. - - - If a comparison is allowed "2 ulps" of deviation, that means the values are - allowed to deviate by up to 2 adjacent floating point values, which might be - as low as 0.0000001 for small numbers or as high as 10.0 for large numbers. - - - - - Compares two floating point values for equality - First floating point value to be compared - Second floating point value t be compared - - Maximum number of representable floating point values that are allowed to - be between the left and the right floating point values - - True if both numbers are equal or close to being equal - - - Floating point values can only represent a finite subset of natural numbers. - For example, the values 2.00000000 and 2.00000024 can be stored in a float, - but nothing inbetween them. - - - This comparison will count how many possible floating point values are between - the left and the right number. If the number of possible values between both - numbers is less than or equal to maxUlps, then the numbers are considered as - being equal. - - - Implementation partially follows the code outlined here: - http://www.anttirt.net/2007/08/19/proper-floating-point-comparisons/ - - - - - Compares two double precision floating point values for equality - First double precision floating point value to be compared - Second double precision floating point value t be compared - - Maximum number of representable double precision floating point values that are - allowed to be between the left and the right double precision floating point values - - True if both numbers are equal or close to being equal - - - Double precision floating point values can only represent a limited series of - natural numbers. For example, the values 2.0000000000000000 and 2.0000000000000004 - can be stored in a double, but nothing inbetween them. - - - This comparison will count how many possible double precision floating point - values are between the left and the right number. If the number of possible - values between both numbers is less than or equal to maxUlps, then the numbers - are considered as being equal. - - - Implementation partially follows the code outlined here: - http://www.anttirt.net/2007/08/19/proper-floating-point-comparisons/ - - - - - - Reinterprets the memory contents of a floating point value as an integer value - - - Floating point value whose memory contents to reinterpret - - - The memory contents of the floating point value interpreted as an integer - - - - - Reinterprets the memory contents of a double precision floating point - value as an integer value - - - Double precision floating point value whose memory contents to reinterpret - - - The memory contents of the double precision floating point value - interpreted as an integer - - - - - Reinterprets the memory contents of an integer as a floating point value - - Integer value whose memory contents to reinterpret - - The memory contents of the integer value interpreted as a floating point value - - - - - Reinterprets the memory contents of an integer value as a double precision - floating point value - - Integer whose memory contents to reinterpret - - The memory contents of the integer interpreted as a double precision - floating point value - - - - Union of a floating point variable and an integer - - - The union's value as a floating point variable - - - The union's value as an integer - - - The union's value as an unsigned integer - - - Union of a double precision floating point variable and a long - - - The union's value as a double precision floating point variable - - - The union's value as a long - - - The union's value as an unsigned long - - - - MessageWriter is the abstract base for classes that write - constraint descriptions and messages in some form. The - class has separate methods for writing various components - of a message, allowing implementations to tailor the - presentation as needed. - - - - - Construct a MessageWriter given a culture - - - - - Method to write single line message with optional args, usually - written to precede the general failure message. - - The message to be written - Any arguments used in formatting the message - - - - Method to write single line message with optional args, usually - written to precede the general failure message, at a givel - indentation level. - - The indentation level of the message - The message to be written - Any arguments used in formatting the message - - - - Display Expected and Actual lines for a constraint. This - is called by MessageWriter's default implementation of - WriteMessageTo and provides the generic two-line display. - - The constraint that failed - - - - Display Expected and Actual lines for given values. This - method may be called by constraints that need more control over - the display of actual and expected values than is provided - by the default implementation. - - The expected value - The actual value causing the failure - - - - Display Expected and Actual lines for given values, including - a tolerance value on the Expected line. - - The expected value - The actual value causing the failure - The tolerance within which the test was made - - - - Display the expected and actual string values on separate lines. - If the mismatch parameter is >=0, an additional line is displayed - line containing a caret that points to the mismatch point. - - The expected string value - The actual string value - The point at which the strings don't match or -1 - If true, case is ignored in locating the point where the strings differ - If true, the strings should be clipped to fit the line - - - - Writes the text for a connector. - - The connector. - - - - Writes the text for a predicate. - - The predicate. - - - - Writes the text for an expected value. - - The expected value. - - - - Writes the text for a modifier - - The modifier. - - - - Writes the text for an actual value. - - The actual value. - - - - Writes the text for a generalized value. - - The value. - - - - Writes the text for a collection value, - starting at a particular point, to a max length - - The collection containing elements to write. - The starting point of the elements to write - The maximum number of elements to write - - - - Abstract method to get the max line length - - - - - Static methods used in creating messages - - - - - Static string used when strings are clipped - - - - - Returns the representation of a type as used in NUnitLite. - This is the same as Type.ToString() except for arrays, - which are displayed with their declared sizes. - - - - - - - Converts any control characters in a string - to their escaped representation. - - The string to be converted - The converted string - - - - Return the a string representation for a set of indices into an array - - Array of indices for which a string is needed - - - - Get an array of indices representing the point in a collection or - array corresponding to a single int index into the collection. - - The collection to which the indices apply - Index in the collection - Array of indices - - - - Clip a string to a given length, starting at a particular offset, returning the clipped - string with ellipses representing the removed parts - - The string to be clipped - The maximum permitted length of the result string - The point at which to start clipping - The clipped string - - - - Clip the expected and actual strings in a coordinated fashion, - so that they may be displayed together. - - - - - - - - - Shows the position two strings start to differ. Comparison - starts at the start index. - - The expected string - The actual string - The index in the strings at which comparison should start - Boolean indicating whether case should be ignored - -1 if no mismatch found, or the index where mismatch found - - - - The Numerics class contains common operations on numeric values. - - - - - Checks the type of the object, returning true if - the object is a numeric type. - - The object to check - true if the object is a numeric type - - - - Checks the type of the object, returning true if - the object is a floating point numeric type. - - The object to check - true if the object is a floating point numeric type - - - - Checks the type of the object, returning true if - the object is a fixed point numeric type. - - The object to check - true if the object is a fixed point numeric type - - - - Test two numeric values for equality, performing the usual numeric - conversions and using a provided or default tolerance. If the tolerance - provided is Empty, this method may set it to a default tolerance. - - The expected value - The actual value - A reference to the tolerance in effect - True if the values are equal - - - - Compare two numeric values, performing the usual numeric conversions. - - The expected value - The actual value - The relationship of the values to each other - - - - NUnitComparer encapsulates NUnit's default behavior - in comparing two objects. - - - - - Compares two objects - - - - - - - - Returns the default NUnitComparer. - - - - - NUnitEqualityComparer encapsulates NUnit's handling of - equality tests between objects. - - - - - If true, all string comparisons will ignore case - - - - - If true, arrays will be treated as collections, allowing - those of different dimensions to be compared - - - - - If non-zero, equality comparisons within the specified - tolerance will succeed. - - - - - Comparison object used in comparisons for some constraints. - - - - - Compares two objects for equality. - - - - - Helper method to compare two arrays - - - - - Method to compare two DirectoryInfo objects - - first directory to compare - second directory to compare - true if equivalent, false if not - - - - Returns the default NUnitEqualityComparer - - - - - Gets and sets a flag indicating whether case should - be ignored in determining equality. - - - - - Gets and sets a flag indicating that arrays should be - compared as collections, without regard to their shape. - - - - - Gets and sets an external comparer to be used to - test for equality. It is applied to members of - collections, in place of NUnit's own logic. - - - - - Gets and sets a tolerance used to compare objects of - certin types. - - - - - Gets the list of failure points for the last Match performed. - - - - - PathConstraint serves as the abstract base of constraints - that operate on paths and provides several helper methods. - - - - - The expected path used in the constraint - - - - - The actual path being tested - - - - - Flag indicating whether a caseInsensitive comparison should be made - - - - - Construct a PathConstraint for a give expected path - - The expected path - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Returns the string representation of this constraint - - - - - Canonicalize the provided path - - - The path in standardized form - - - - Test whether two paths are the same - - The first path - The second path - - - - - Test whether one path is under another path - - The first path - supposed to be the parent path - The second path - supposed to be the child path - - - - - Test whether one path is the same as or under another path - - The first path - supposed to be the parent path - The second path - supposed to be the child path - - - - - Modifies the current instance to be case-insensitve - and returns it. - - - - - Modifies the current instance to be case-sensitve - and returns it. - - - - - Summary description for SamePathConstraint. - - - - - Initializes a new instance of the class. - - The expected path - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - SubPathConstraint tests that the actual path is under the expected path - - - - - Initializes a new instance of the class. - - The expected path - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - SamePathOrUnderConstraint tests that one path is under another - - - - - Initializes a new instance of the class. - - The expected path - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Predicate constraint wraps a Predicate in a constraint, - returning success if the predicate is true. - - - - - Construct a PredicateConstraint from a predicate - - - - - Determines whether the predicate succeeds when applied - to the actual value. - - - - - Writes the description to a MessageWriter - - - - - NotConstraint negates the effect of some other constraint - - - - - Initializes a new instance of the class. - - The base constraint to be negated. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for if the base constraint fails, false if it succeeds - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Write the actual value for a failing constraint test to a MessageWriter. - - The writer on which the actual value is displayed - - - - AllItemsConstraint applies another constraint to each - item in a collection, succeeding if they all succeed. - - - - - Construct an AllItemsConstraint on top of an existing constraint - - - - - - Apply the item constraint to each item in the collection, - failing if any item fails. - - - - - - - Write a description of this constraint to a MessageWriter - - - - - - SomeItemsConstraint applies another constraint to each - item in a collection, succeeding if any of them succeeds. - - - - - Construct a SomeItemsConstraint on top of an existing constraint - - - - - - Apply the item constraint to each item in the collection, - succeeding if any item succeeds. - - - - - - - Write a description of this constraint to a MessageWriter - - - - - - NoItemConstraint applies another constraint to each - item in a collection, failing if any of them succeeds. - - - - - Construct a SomeItemsConstraint on top of an existing constraint - - - - - - Apply the item constraint to each item in the collection, - failing if any item fails. - - - - - - - Write a description of this constraint to a MessageWriter - - - - - - PropertyExistsConstraint tests that a named property - exists on the object provided through Match. - - Originally, PropertyConstraint provided this feature - in addition to making optional tests on the vaue - of the property. The two constraints are now separate. - - - - - Initializes a new instance of the class. - - The name of the property. - - - - Test whether the property exists for a given object - - The object to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Write the actual value for a failing constraint test to a - MessageWriter. - - The writer on which the actual value is displayed - - - - Returns the string representation of the constraint. - - - - - - PropertyConstraint extracts a named property and uses - its value as the actual value for a chained constraint. - - - - - Initializes a new instance of the class. - - The name. - The constraint to apply to the property. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. - - The writer on which the actual value is displayed - - - - Returns the string representation of the constraint. - - - - - - RangeConstraint tests whethe two values are within a - specified range. - - - - - Initializes a new instance of the class. - - From. - To. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Modifies the constraint to use an IComparer and returns self. - - - - - Modifies the constraint to use an IComparer<T> and returns self. - - - - - Modifies the constraint to use a Comparison<T> and returns self. - - - - - ResolvableConstraintExpression is used to represent a compound - constraint being constructed at a point where the last operator - may either terminate the expression or may have additional - qualifying constraints added to it. - - It is used, for example, for a Property element or for - an Exception element, either of which may be optionally - followed by constraints that apply to the property or - exception. - - - - - Create a new instance of ResolvableConstraintExpression - - - - - Create a new instance of ResolvableConstraintExpression, - passing in a pre-populated ConstraintBuilder. - - - - - Resolve the current expression to a Constraint - - - - - Appends an And Operator to the expression - - - - - Appends an Or operator to the expression. - - - - - SameAsConstraint tests whether an object is identical to - the object passed to its constructor - - - - - Initializes a new instance of the class. - - The expected object. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - BinarySerializableConstraint tests whether - an object is serializable in binary format. - - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. - - The writer on which the actual value is displayed - - - - Returns the string representation - - - - - BinarySerializableConstraint tests whether - an object is serializable in binary format. - - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. - - The writer on which the actual value is displayed - - - - Returns the string representation of this constraint - - - - - StringConstraint is the abstract base for constraints - that operate on strings. It supports the IgnoreCase - modifier for string operations. - - - - - The expected value - - - - - Indicates whether tests should be case-insensitive - - - - - Constructs a StringConstraint given an expected value - - The expected value - - - - Modify the constraint to ignore case in matching. - - - - - EmptyStringConstraint tests whether a string is empty. - - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - NullEmptyStringConstraint tests whether a string is either null or empty. - - - - - Constructs a new NullOrEmptyStringConstraint - - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - SubstringConstraint can test whether a string contains - the expected substring. - - - - - Initializes a new instance of the class. - - The expected. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - StartsWithConstraint can test whether a string starts - with an expected substring. - - - - - Initializes a new instance of the class. - - The expected string - - - - Test whether the constraint is matched by the actual value. - This is a template method, which calls the IsMatch method - of the derived class. - - - - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - EndsWithConstraint can test whether a string ends - with an expected substring. - - - - - Initializes a new instance of the class. - - The expected string - - - - Test whether the constraint is matched by the actual value. - This is a template method, which calls the IsMatch method - of the derived class. - - - - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - RegexConstraint can test whether a string matches - the pattern provided. - - - - - Initializes a new instance of the class. - - The pattern. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - ThrowsConstraint is used to test the exception thrown by - a delegate by applying a constraint to it. - - - - - Initializes a new instance of the class, - using a constraint to be applied to the exception. - - A constraint to apply to the caught exception. - - - - Executes the code of the delegate and captures any exception. - If a non-null base constraint was provided, it applies that - constraint to the exception. - - A delegate representing the code to be tested - True if an exception is thrown and the constraint succeeds, otherwise false - - - - Converts an ActualValueDelegate to a TestDelegate - before calling the primary overload. - - - - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. - - The writer on which the actual value is displayed - - - - Returns the string representation of this constraint - - - - - Get the actual exception thrown - used by Assert.Throws. - - - - - ThrowsNothingConstraint tests that a delegate does not - throw an exception. - - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True if no exception is thrown, otherwise false - - - - Converts an ActualValueDelegate to a TestDelegate - before calling the primary overload. - - - - - - - Write the constraint description to a MessageWriter - - The writer on which the description is displayed - - - - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. - - The writer on which the actual value is displayed - - - - Modes in which the tolerance value for a comparison can - be interpreted. - - - - - The tolerance was created with a value, without specifying - how the value would be used. This is used to prevent setting - the mode more than once and is generally changed to Linear - upon execution of the test. - - - - - The tolerance is used as a numeric range within which - two compared values are considered to be equal. - - - - - Interprets the tolerance as the percentage by which - the two compared values my deviate from each other. - - - - - Compares two values based in their distance in - representable numbers. - - - - - The Tolerance class generalizes the notion of a tolerance - within which an equality test succeeds. Normally, it is - used with numeric types, but it can be used with any - type that supports taking a difference between two - objects and comparing that difference to a value. - - - - - Constructs a linear tolerance of a specdified amount - - - - - Constructs a tolerance given an amount and ToleranceMode - - - - - Tests that the current Tolerance is linear with a - numeric value, throwing an exception if it is not. - - - - - Returns an empty Tolerance object, equivalent to - specifying an exact match. - - - - - Gets the ToleranceMode for the current Tolerance - - - - - Gets the value of the current Tolerance instance. - - - - - Returns a new tolerance, using the current amount as a percentage. - - - - - Returns a new tolerance, using the current amount in Ulps. - - - - - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of days. - - - - - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of hours. - - - - - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of minutes. - - - - - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of seconds. - - - - - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of milliseconds. - - - - - Returns a new tolerance with a TimeSpan as the amount, using - the current amount as a number of clock ticks. - - - - - Returns true if the current tolerance is empty. - - - - - TypeConstraint is the abstract base for constraints - that take a Type as their expected value. - - - - - The expected Type used by the constraint - - - - - Construct a TypeConstraint for a given Type - - - - - - Write the actual value for a failing constraint test to a - MessageWriter. TypeConstraints override this method to write - the name of the type. - - The writer on which the actual value is displayed - - - - ExactTypeConstraint is used to test that an object - is of the exact type provided in the constructor - - - - - Construct an ExactTypeConstraint for a given Type - - The expected Type. - - - - Test that an object is of the exact type specified - - The actual value. - True if the tested object is of the exact type provided, otherwise false. - - - - Write the description of this constraint to a MessageWriter - - The MessageWriter to use - - - - InstanceOfTypeConstraint is used to test that an object - is of the same type provided or derived from it. - - - - - Construct an InstanceOfTypeConstraint for the type provided - - The expected Type - - - - Test whether an object is of the specified type or a derived type - - The object to be tested - True if the object is of the provided type or derives from it, otherwise false. - - - - Write a description of this constraint to a MessageWriter - - The MessageWriter to use - - - - AssignableFromConstraint is used to test that an object - can be assigned from a given Type. - - - - - Construct an AssignableFromConstraint for the type provided - - - - - - Test whether an object can be assigned from the specified type - - The object to be tested - True if the object can be assigned a value of the expected Type, otherwise false. - - - - Write a description of this constraint to a MessageWriter - - The MessageWriter to use - - - - AssignableToConstraint is used to test that an object - can be assigned to a given Type. - - - - - Construct an AssignableToConstraint for the type provided - - - - - - Test whether an object can be assigned to the specified type - - The object to be tested - True if the object can be assigned a value of the expected Type, otherwise false. - - - - Write a description of this constraint to a MessageWriter - - The MessageWriter to use - - - - Thrown when an assertion failed. - - - - - The error message that explains - the reason for the exception - - - The error message that explains - the reason for the exception - The exception that caused the - current exception - - - - Serialization Constructor - - - - - Thrown when an assertion failed. - - - - - - - The error message that explains - the reason for the exception - The exception that caused the - current exception - - - - Serialization Constructor - - - - - Thrown when a test executes inconclusively. - - - - - The error message that explains - the reason for the exception - - - The error message that explains - the reason for the exception - The exception that caused the - current exception - - - - Serialization Constructor - - - - - Thrown when an assertion failed. - - - - - - - The error message that explains - the reason for the exception - The exception that caused the - current exception - - - - Serialization Constructor - - - - - Delegate used by tests that execute code and - capture any thrown exception. - - - - - The Assert class contains a collection of static methods that - implement the most common assertions used in NUnit. - - - - - We don't actually want any instances of this object, but some people - like to inherit from it to add other static methods. Hence, the - protected constructor disallows any instances of this object. - - - - - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. - - - - - - - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. - - - - - - - Helper for Assert.AreEqual(double expected, double actual, ...) - allowing code generation to work consistently. - - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Throws a with the message and arguments - that are passed in. This allows a test to be cut short, with a result - of success returned to NUnit. - - The message to initialize the with. - Arguments to be used in formatting the message - - - - Throws a with the message and arguments - that are passed in. This allows a test to be cut short, with a result - of success returned to NUnit. - - The message to initialize the with. - - - - Throws a with the message and arguments - that are passed in. This allows a test to be cut short, with a result - of success returned to NUnit. - - - - - Throws an with the message and arguments - that are passed in. This is used by the other Assert functions. - - The message to initialize the with. - Arguments to be used in formatting the message - - - - Throws an with the message that is - passed in. This is used by the other Assert functions. - - The message to initialize the with. - - - - Throws an . - This is used by the other Assert functions. - - - - - Throws an with the message and arguments - that are passed in. This causes the test to be reported as ignored. - - The message to initialize the with. - Arguments to be used in formatting the message - - - - Throws an with the message that is - passed in. This causes the test to be reported as ignored. - - The message to initialize the with. - - - - Throws an . - This causes the test to be reported as ignored. - - - - - Throws an with the message and arguments - that are passed in. This causes the test to be reported as inconclusive. - - The message to initialize the with. - Arguments to be used in formatting the message - - - - Throws an with the message that is - passed in. This causes the test to be reported as inconclusive. - - The message to initialize the with. - - - - Throws an . - This causes the test to be reported as Inconclusive. - - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - A Constraint to be applied - The actual value to test - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - A Constraint to be applied - The actual value to test - The message that will be displayed on failure - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - A Constraint expression to be applied - The actual value to test - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested - The message that will be displayed on failure - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - An ActualValueDelegate returning the value to be tested - A Constraint expression to be applied - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - A Constraint to be applied - The actual value to test - - - - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - A Constraint to be applied - The actual value to test - The message that will be displayed on failure - - - - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - A Constraint to be applied - The actual value to test - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - The message to display if the condition is false - Arguments to be used in formatting the message - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - The message to display if the condition is false - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - - - - Asserts that the code represented by a delegate throws an exception - that satisfies the constraint provided. - - A TestDelegate to be executed - A ThrowsConstraint used in the test - - - - Verifies that a delegate throws a particular exception when called. - - A constraint to be satisfied by the exception - A TestSnippet delegate - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Verifies that a delegate throws a particular exception when called. - - A constraint to be satisfied by the exception - A TestSnippet delegate - The message that will be displayed on failure - - - - Verifies that a delegate throws a particular exception when called. - - A constraint to be satisfied by the exception - A TestSnippet delegate - - - - Verifies that a delegate throws a particular exception when called. - - The exception Type expected - A TestSnippet delegate - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Verifies that a delegate throws a particular exception when called. - - The exception Type expected - A TestSnippet delegate - The message that will be displayed on failure - - - - Verifies that a delegate throws a particular exception when called. - - The exception Type expected - A TestSnippet delegate - - - - Verifies that a delegate throws a particular exception when called. - - Type of the expected exception - A TestSnippet delegate - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Verifies that a delegate throws a particular exception when called. - - Type of the expected exception - A TestSnippet delegate - The message that will be displayed on failure - - - - Verifies that a delegate throws a particular exception when called. - - Type of the expected exception - A TestSnippet delegate - - - - Verifies that a delegate throws an exception when called - and returns it. - - A TestDelegate - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Verifies that a delegate throws an exception when called - and returns it. - - A TestDelegate - The message that will be displayed on failure - - - - Verifies that a delegate throws an exception when called - and returns it. - - A TestDelegate - - - - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. - - The expected Exception Type - A TestDelegate - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. - - The expected Exception Type - A TestDelegate - The message that will be displayed on failure - - - - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. - - The expected Exception Type - A TestDelegate - - - - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. - - The expected Exception Type - A TestDelegate - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. - - The expected Exception Type - A TestDelegate - The message that will be displayed on failure - - - - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. - - The expected Exception Type - A TestDelegate - - - - Verifies that a delegate does not throw an exception - - A TestSnippet delegate - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Verifies that a delegate does not throw an exception. - - A TestSnippet delegate - The message that will be displayed on failure - - - - Verifies that a delegate does not throw an exception. - - A TestSnippet delegate - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - The message to display in case of failure - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - The message to display in case of failure - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - - - - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition - The message to display in case of failure - - - - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition - - - - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition - The message to display in case of failure - - - - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition - - - - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. - - The object that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. - - The object that is to be tested - The message to display in case of failure - - - - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. - - The object that is to be tested - - - - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. - - The object that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. - - The object that is to be tested - The message to display in case of failure - - - - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. - - The object that is to be tested - - - - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. - - The object that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. - - The object that is to be tested - The message to display in case of failure - - - - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. - - The object that is to be tested - - - - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. - - The object that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. - - The object that is to be tested - The message to display in case of failure - - - - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. - - The object that is to be tested - - - - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. - - The value that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. - - The value that is to be tested - The message to display in case of failure - - - - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. - - The value that is to be tested - - - - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. - - The value that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. - - The value that is to be tested - The message to display in case of failure - - - - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. - - The value that is to be tested - - - - Assert that a string is empty - that is equal to string.Empty - - The string to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Assert that a string is empty - that is equal to string.Empty - - The string to be tested - The message to display in case of failure - - - - Assert that a string is empty - that is equal to string.Empty - - The string to be tested - - - - Assert that an array, list or other collection is empty - - An array, list or other collection implementing ICollection - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Assert that an array, list or other collection is empty - - An array, list or other collection implementing ICollection - The message to display in case of failure - - - - Assert that an array, list or other collection is empty - - An array, list or other collection implementing ICollection - - - - Assert that a string is not empty - that is not equal to string.Empty - - The string to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Assert that a string is not empty - that is not equal to string.Empty - - The string to be tested - The message to display in case of failure - - - - Assert that a string is not empty - that is not equal to string.Empty - - The string to be tested - - - - Assert that an array, list or other collection is not empty - - An array, list or other collection implementing ICollection - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Assert that an array, list or other collection is not empty - - An array, list or other collection implementing ICollection - The message to display in case of failure - - - - Assert that an array, list or other collection is not empty - - An array, list or other collection implementing ICollection - - - - Assert that a string is either null or equal to string.Empty - - The string to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Assert that a string is either null or equal to string.Empty - - The string to be tested - The message to display in case of failure - - - - Assert that a string is either null or equal to string.Empty - - The string to be tested - - - - Assert that a string is not null or empty - - The string to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Assert that a string is not null or empty - - The string to be tested - The message to display in case of failure - - - - Assert that a string is not null or empty - - The string to be tested - - - - Asserts that an object may be assigned a value of a given Type. - - The expected Type. - The object under examination - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object may be assigned a value of a given Type. - - The expected Type. - The object under examination - The message to display in case of failure - - - - Asserts that an object may be assigned a value of a given Type. - - The expected Type. - The object under examination - - - - Asserts that an object may be assigned a value of a given Type. - - The expected Type. - The object under examination - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object may be assigned a value of a given Type. - - The expected Type. - The object under examination - The message to display in case of failure - - - - Asserts that an object may be assigned a value of a given Type. - - The expected Type. - The object under examination - - - - Asserts that an object may not be assigned a value of a given Type. - - The expected Type. - The object under examination - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object may not be assigned a value of a given Type. - - The expected Type. - The object under examination - The message to display in case of failure - - - - Asserts that an object may not be assigned a value of a given Type. - - The expected Type. - The object under examination - - - - Asserts that an object may not be assigned a value of a given Type. - - The expected Type. - The object under examination - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object may not be assigned a value of a given Type. - - The expected Type. - The object under examination - The message to display in case of failure - - - - Asserts that an object may not be assigned a value of a given Type. - - The expected Type. - The object under examination - - - - Asserts that an object is an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object is an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - - - - Asserts that an object is an instance of a given type. - - The expected Type - The object being examined - - - - Asserts that an object is an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object is an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - - - - Asserts that an object is an instance of a given type. - - The expected Type - The object being examined - - - - Asserts that an object is an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object is an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - - - - Asserts that an object is an instance of a given type. - - The expected Type - The object being examined - - - - Asserts that an object is not an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object is not an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - - - - Asserts that an object is not an instance of a given type. - - The expected Type - The object being examined - - - - Asserts that an object is not an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object is not an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - - - - Asserts that an object is not an instance of a given type. - - The expected Type - The object being examined - - - - Asserts that an object is not an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object is not an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - - - - Asserts that an object is not an instance of a given type. - - The expected Type - The object being examined - - - - Verifies that two values are equal. If they are not, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two values are equal. If they are not, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two values are equal. If they are not, then an - is thrown. - - The expected value - The actual value - - - - Verifies that two values are equal. If they are not, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two values are equal. If they are not, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two values are equal. If they are not, then an - is thrown. - - The expected value - The actual value - - - - Verifies that two values are equal. If they are not, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two values are equal. If they are not, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two values are equal. If they are not, then an - is thrown. - - The expected value - The actual value - - - - Verifies that two values are equal. If they are not, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two values are equal. If they are not, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two values are equal. If they are not, then an - is thrown. - - The expected value - The actual value - - - - Verifies that two values are equal. If they are not, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two values are equal. If they are not, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two values are equal. If they are not, then an - is thrown. - - The expected value - The actual value - - - - Verifies that two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. - - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. - - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual - The message to display in case of failure - - - - Verifies that two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. - - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual - - - - Verifies that two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. - - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. - - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual - The message to display in case of failure - - - - Verifies that two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. - - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual - - - - Verifies that two objects are equal. Two objects are considered - equal if both are null, or if both have the same value. NUnit - has special semantics for some object types. - If they are not equal an is thrown. - - The value that is expected - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two objects are equal. Two objects are considered - equal if both are null, or if both have the same value. NUnit - has special semantics for some object types. - If they are not equal an is thrown. - - The value that is expected - The actual value - The message to display in case of failure - - - - Verifies that two objects are equal. Two objects are considered - equal if both are null, or if both have the same value. NUnit - has special semantics for some object types. - If they are not equal an is thrown. - - The value that is expected - The actual value - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - The message to display in case of failure - - - - Verifies that two values are not equal. If they are equal, then an - is thrown. - - The expected value - The actual value - - - - Verifies that two objects are not equal. Two objects are considered - equal if both are null, or if both have the same value. NUnit - has special semantics for some object types. - If they are equal an is thrown. - - The value that is expected - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two objects are not equal. Two objects are considered - equal if both are null, or if both have the same value. NUnit - has special semantics for some object types. - If they are equal an is thrown. - - The value that is expected - The actual value - The message to display in case of failure - - - - Verifies that two objects are not equal. Two objects are considered - equal if both are null, or if both have the same value. NUnit - has special semantics for some object types. - If they are equal an is thrown. - - The value that is expected - The actual value - - - - Asserts that two objects refer to the same object. If they - are not the same an is thrown. - - The expected object - The actual object - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that two objects refer to the same object. If they - are not the same an is thrown. - - The expected object - The actual object - The message to display in case of failure - - - - Asserts that two objects refer to the same object. If they - are not the same an is thrown. - - The expected object - The actual object - - - - Asserts that two objects do not refer to the same object. If they - are the same an is thrown. - - The expected object - The actual object - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that two objects do not refer to the same object. If they - are the same an is thrown. - - The expected object - The actual object - The message to display in case of failure - - - - Asserts that two objects do not refer to the same object. If they - are the same an is thrown. - - The expected object - The actual object - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - - - - Verifies that the first value is greater than or equal tothe second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Asserts that an object is contained in a list. - - The expected object - The list to be examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object is contained in a list. - - The expected object - The list to be examined - The message to display in case of failure - - - - Asserts that an object is contained in a list. - - The expected object - The list to be examined - - - - Gets the number of assertions executed so far and - resets the counter to zero. - - - - - AssertionHelper is an optional base class for user tests, - allowing the use of shorter names for constraints and - asserts and avoiding conflict with the definition of - , from which it inherits much of its - behavior, in certain mock object frameworks. - - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. Works - identically to - - A Constraint to be applied - The actual value to test - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. Works - identically to - - A Constraint to be applied - The actual value to test - The message that will be displayed on failure - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. Works - identically to - - A Constraint to be applied - The actual value to test - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested - The message that will be displayed on failure - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - An ActualValueDelegate returning the value to be tested - A Constraint expression to be applied - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - A Constraint to be applied - The actual value to test - - - - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - A Constraint to be applied - The actual value to test - The message that will be displayed on failure - - - - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - A Constraint to be applied - The actual value to test - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that a condition is true. If the condition is false the method throws - an . Works Identically to - . - - The evaluated condition - The message to display if the condition is false - Arguments to be used in formatting the message - - - - Asserts that a condition is true. If the condition is false the method throws - an . Works Identically to - . - - The evaluated condition - The message to display if the condition is false - - - - Asserts that a condition is true. If the condition is false the method throws - an . Works Identically to . - - The evaluated condition - - - - Asserts that the code represented by a delegate throws an exception - that satisfies the constraint provided. - - A TestDelegate to be executed - A ThrowsConstraint used in the test - - - - Returns a ListMapper based on a collection. - - The original collection - - - - - Provides static methods to express the assumptions - that must be met for a test to give a meaningful - result. If an assumption is not met, the test - should produce an inconclusive result. - - - - - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. - - - - - - - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. - - - - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. - - A Constraint expression to be applied - The actual value to test - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. - - A Constraint expression to be applied - The actual value to test - The message that will be displayed on failure - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. - - A Constraint expression to be applied - The actual value to test - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. - - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. - - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested - The message that will be displayed on failure - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. - - An ActualValueDelegate returning the value to be tested - A Constraint expression to be applied - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. - - A Constraint expression to be applied - The actual value to test - - - - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. - - A Constraint expression to be applied - The actual value to test - The message that will be displayed on failure - - - - Apply a constraint to a referenced value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. - - A Constraint expression to be applied - The actual value to test - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - The message to display if the condition is false - Arguments to be used in formatting the message - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - The message to display if the condition is false - - - - Asserts that a condition is true. If the condition is false the - method throws an . - - The evaluated condition - - - - Asserts that the code represented by a delegate throws an exception - that satisfies the constraint provided. - - A TestDelegate to be executed - A ThrowsConstraint used in the test - - - - A set of Assert methods operationg on one or more collections - - - - - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. - - - - - - - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. - - - - - - - Asserts that all items contained in collection are of the type specified by expectedType. - - IEnumerable containing objects to be considered - System.Type that all objects in collection must be instances of - - - - Asserts that all items contained in collection are of the type specified by expectedType. - - IEnumerable containing objects to be considered - System.Type that all objects in collection must be instances of - The message that will be displayed on failure - - - - Asserts that all items contained in collection are of the type specified by expectedType. - - IEnumerable containing objects to be considered - System.Type that all objects in collection must be instances of - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that all items contained in collection are not equal to null. - - IEnumerable containing objects to be considered - - - - Asserts that all items contained in collection are not equal to null. - - IEnumerable containing objects to be considered - The message that will be displayed on failure - - - - Asserts that all items contained in collection are not equal to null. - - IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Ensures that every object contained in collection exists within the collection - once and only once. - - IEnumerable of objects to be considered - - - - Ensures that every object contained in collection exists within the collection - once and only once. - - IEnumerable of objects to be considered - The message that will be displayed on failure - - - - Ensures that every object contained in collection exists within the collection - once and only once. - - IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that expected and actual are exactly equal. The collections must have the same count, - and contain the exact same objects in the same order. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - - - - Asserts that expected and actual are exactly equal. The collections must have the same count, - and contain the exact same objects in the same order. - If comparer is not null then it will be used to compare the objects. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The IComparer to use in comparing objects from each IEnumerable - - - - Asserts that expected and actual are exactly equal. The collections must have the same count, - and contain the exact same objects in the same order. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - - - - Asserts that expected and actual are exactly equal. The collections must have the same count, - and contain the exact same objects in the same order. - If comparer is not null then it will be used to compare the objects. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The IComparer to use in comparing objects from each IEnumerable - The message that will be displayed on failure - - - - Asserts that expected and actual are exactly equal. The collections must have the same count, - and contain the exact same objects in the same order. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that expected and actual are exactly equal. The collections must have the same count, - and contain the exact same objects in the same order. - If comparer is not null then it will be used to compare the objects. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The IComparer to use in comparing objects from each IEnumerable - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that expected and actual are equivalent, containing the same objects but the match may be in any order. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - - - - Asserts that expected and actual are equivalent, containing the same objects but the match may be in any order. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - - - - Asserts that expected and actual are equivalent, containing the same objects but the match may be in any order. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that expected and actual are not exactly equal. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - - - - Asserts that expected and actual are not exactly equal. - If comparer is not null then it will be used to compare the objects. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The IComparer to use in comparing objects from each IEnumerable - - - - Asserts that expected and actual are not exactly equal. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - - - - Asserts that expected and actual are not exactly equal. - If comparer is not null then it will be used to compare the objects. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The IComparer to use in comparing objects from each IEnumerable - The message that will be displayed on failure - - - - Asserts that expected and actual are not exactly equal. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that expected and actual are not exactly equal. - If comparer is not null then it will be used to compare the objects. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The IComparer to use in comparing objects from each IEnumerable - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that expected and actual are not equivalent. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - - - - Asserts that expected and actual are not equivalent. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - - - - Asserts that expected and actual are not equivalent. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that collection contains actual as an item. - - IEnumerable of objects to be considered - Object to be found within collection - - - - Asserts that collection contains actual as an item. - - IEnumerable of objects to be considered - Object to be found within collection - The message that will be displayed on failure - - - - Asserts that collection contains actual as an item. - - IEnumerable of objects to be considered - Object to be found within collection - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that collection does not contain actual as an item. - - IEnumerable of objects to be considered - Object that cannot exist within collection - - - - Asserts that collection does not contain actual as an item. - - IEnumerable of objects to be considered - Object that cannot exist within collection - The message that will be displayed on failure - - - - Asserts that collection does not contain actual as an item. - - IEnumerable of objects to be considered - Object that cannot exist within collection - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that superset is not a subject of subset. - - The IEnumerable superset to be considered - The IEnumerable subset to be considered - - - - Asserts that superset is not a subject of subset. - - The IEnumerable superset to be considered - The IEnumerable subset to be considered - The message that will be displayed on failure - - - - Asserts that superset is not a subject of subset. - - The IEnumerable superset to be considered - The IEnumerable subset to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that superset is a subset of subset. - - The IEnumerable superset to be considered - The IEnumerable subset to be considered - - - - Asserts that superset is a subset of subset. - - The IEnumerable superset to be considered - The IEnumerable subset to be considered - The message that will be displayed on failure - - - - Asserts that superset is a subset of subset. - - The IEnumerable superset to be considered - The IEnumerable subset to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Assert that an array, list or other collection is empty - - An array, list or other collection implementing IEnumerable - The message to be displayed on failure - Arguments to be used in formatting the message - - - - Assert that an array, list or other collection is empty - - An array, list or other collection implementing IEnumerable - The message to be displayed on failure - - - - Assert that an array,list or other collection is empty - - An array, list or other collection implementing IEnumerable - - - - Assert that an array, list or other collection is empty - - An array, list or other collection implementing IEnumerable - The message to be displayed on failure - Arguments to be used in formatting the message - - - - Assert that an array, list or other collection is empty - - An array, list or other collection implementing IEnumerable - The message to be displayed on failure - - - - Assert that an array,list or other collection is empty - - An array, list or other collection implementing IEnumerable - - - - Assert that an array, list or other collection is ordered - - An array, list or other collection implementing IEnumerable - The message to be displayed on failure - Arguments to be used in formatting the message - - - - Assert that an array, list or other collection is ordered - - An array, list or other collection implementing IEnumerable - The message to be displayed on failure - - - - Assert that an array, list or other collection is ordered - - An array, list or other collection implementing IEnumerable - - - - Assert that an array, list or other collection is ordered - - An array, list or other collection implementing IEnumerable - A custom comparer to perform the comparisons - The message to be displayed on failure - Arguments to be used in formatting the message - - - - Assert that an array, list or other collection is ordered - - An array, list or other collection implementing IEnumerable - A custom comparer to perform the comparisons - The message to be displayed on failure - - - - Assert that an array, list or other collection is ordered - - An array, list or other collection implementing IEnumerable - A custom comparer to perform the comparisons - - - - Static helper class used in the constraint-based syntax - - - - - Creates a new SubstringConstraint - - The value of the substring - A SubstringConstraint - - - - Creates a new CollectionContainsConstraint. - - The item that should be found. - A new CollectionContainsConstraint - - - - Summary description for DirectoryAssert - - - - - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. - - - - - - - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. - - - - - - - We don't actually want any instances of this object, but some people - like to inherit from it to add other static methods. Hence, the - protected constructor disallows any instances of this object. - - - - - Verifies that two directories are equal. Two directories are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - A directory containing the value that is expected - A directory containing the actual value - The message to display if directories are not equal - Arguments to be used in formatting the message - - - - Verifies that two directories are equal. Two directories are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - A directory containing the value that is expected - A directory containing the actual value - The message to display if directories are not equal - - - - Verifies that two directories are equal. Two directories are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - A directory containing the value that is expected - A directory containing the actual value - - - - Verifies that two directories are equal. Two directories are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - A directory path string containing the value that is expected - A directory path string containing the actual value - The message to display if directories are not equal - Arguments to be used in formatting the message - - - - Verifies that two directories are equal. Two directories are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - A directory path string containing the value that is expected - A directory path string containing the actual value - The message to display if directories are not equal - - - - Verifies that two directories are equal. Two directories are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - A directory path string containing the value that is expected - A directory path string containing the actual value - - - - Asserts that two directories are not equal. If they are equal - an is thrown. - - A directory containing the value that is expected - A directory containing the actual value - The message to display if directories are not equal - Arguments to be used in formatting the message - - - - Asserts that two directories are not equal. If they are equal - an is thrown. - - A directory containing the value that is expected - A directory containing the actual value - The message to display if directories are not equal - - - - Asserts that two directories are not equal. If they are equal - an is thrown. - - A directory containing the value that is expected - A directory containing the actual value - - - - Asserts that two directories are not equal. If they are equal - an is thrown. - - A directory path string containing the value that is expected - A directory path string containing the actual value - The message to display if directories are equal - Arguments to be used in formatting the message - - - - Asserts that two directories are not equal. If they are equal - an is thrown. - - A directory path string containing the value that is expected - A directory path string containing the actual value - The message to display if directories are equal - - - - Asserts that two directories are not equal. If they are equal - an is thrown. - - A directory path string containing the value that is expected - A directory path string containing the actual value - - - - Asserts that the directory is empty. If it is not empty - an is thrown. - - A directory to search - The message to display if directories are not equal - Arguments to be used in formatting the message - - - - Asserts that the directory is empty. If it is not empty - an is thrown. - - A directory to search - The message to display if directories are not equal - - - - Asserts that the directory is empty. If it is not empty - an is thrown. - - A directory to search - - - - Asserts that the directory is empty. If it is not empty - an is thrown. - - A directory to search - The message to display if directories are not equal - Arguments to be used in formatting the message - - - - Asserts that the directory is empty. If it is not empty - an is thrown. - - A directory to search - The message to display if directories are not equal - - - - Asserts that the directory is empty. If it is not empty - an is thrown. - - A directory to search - - - - Asserts that the directory is not empty. If it is empty - an is thrown. - - A directory to search - The message to display if directories are not equal - Arguments to be used in formatting the message - - - - Asserts that the directory is not empty. If it is empty - an is thrown. - - A directory to search - The message to display if directories are not equal - - - - Asserts that the directory is not empty. If it is empty - an is thrown. - - A directory to search - - - - Asserts that the directory is not empty. If it is empty - an is thrown. - - A directory to search - The message to display if directories are not equal - Arguments to be used in formatting the message - - - - Asserts that the directory is not empty. If it is empty - an is thrown. - - A directory to search - The message to display if directories are not equal - - - - Asserts that the directory is not empty. If it is empty - an is thrown. - - A directory to search - - - - Asserts that path contains actual as a subdirectory or - an is thrown. - - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path - Arguments to be used in formatting the message - - - - Asserts that path contains actual as a subdirectory or - an is thrown. - - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path - - - - Asserts that path contains actual as a subdirectory or - an is thrown. - - A directory to search - sub-directory asserted to exist under directory - - - - Asserts that path contains actual as a subdirectory or - an is thrown. - - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path - Arguments to be used in formatting the message - - - - Asserts that path contains actual as a subdirectory or - an is thrown. - - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path - - - - Asserts that path contains actual as a subdirectory or - an is thrown. - - A directory to search - sub-directory asserted to exist under directory - - - - Asserts that path does not contain actual as a subdirectory or - an is thrown. - - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path - Arguments to be used in formatting the message - - - - Asserts that path does not contain actual as a subdirectory or - an is thrown. - - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path - - - - Asserts that path does not contain actual as a subdirectory or - an is thrown. - - A directory to search - sub-directory asserted to exist under directory - - - - Asserts that path does not contain actual as a subdirectory or - an is thrown. - - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path - Arguments to be used in formatting the message - - - - Asserts that path does not contain actual as a subdirectory or - an is thrown. - - A directory to search - sub-directory asserted to exist under directory - The message to display if directory is not within the path - - - - Asserts that path does not contain actual as a subdirectory or - an is thrown. - - A directory to search - sub-directory asserted to exist under directory - - - - Summary description for FileAssert. - - - - - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. - - - - - - - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. - - - - - - - We don't actually want any instances of this object, but some people - like to inherit from it to add other static methods. Hence, the - protected constructor disallows any instances of this object. - - - - - Verifies that two Streams are equal. Two Streams are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - The expected Stream - The actual Stream - The message to display if Streams are not equal - Arguments to be used in formatting the message - - - - Verifies that two Streams are equal. Two Streams are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - The expected Stream - The actual Stream - The message to display if objects are not equal - - - - Verifies that two Streams are equal. Two Streams are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - The expected Stream - The actual Stream - - - - Verifies that two files are equal. Two files are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - A file containing the value that is expected - A file containing the actual value - The message to display if Streams are not equal - Arguments to be used in formatting the message - - - - Verifies that two files are equal. Two files are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - A file containing the value that is expected - A file containing the actual value - The message to display if objects are not equal - - - - Verifies that two files are equal. Two files are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - A file containing the value that is expected - A file containing the actual value - - - - Verifies that two files are equal. Two files are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - The path to a file containing the value that is expected - The path to a file containing the actual value - The message to display if Streams are not equal - Arguments to be used in formatting the message - - - - Verifies that two files are equal. Two files are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - The path to a file containing the value that is expected - The path to a file containing the actual value - The message to display if objects are not equal - - - - Verifies that two files are equal. Two files are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - The path to a file containing the value that is expected - The path to a file containing the actual value - - - - Asserts that two Streams are not equal. If they are equal - an is thrown. - - The expected Stream - The actual Stream - The message to be displayed when the two Stream are the same. - Arguments to be used in formatting the message - - - - Asserts that two Streams are not equal. If they are equal - an is thrown. - - The expected Stream - The actual Stream - The message to be displayed when the Streams are the same. - - - - Asserts that two Streams are not equal. If they are equal - an is thrown. - - The expected Stream - The actual Stream - - - - Asserts that two files are not equal. If they are equal - an is thrown. - - A file containing the value that is expected - A file containing the actual value - The message to display if Streams are not equal - Arguments to be used in formatting the message - - - - Asserts that two files are not equal. If they are equal - an is thrown. - - A file containing the value that is expected - A file containing the actual value - The message to display if objects are not equal - - - - Asserts that two files are not equal. If they are equal - an is thrown. - - A file containing the value that is expected - A file containing the actual value - - - - Asserts that two files are not equal. If they are equal - an is thrown. - - The path to a file containing the value that is expected - The path to a file containing the actual value - The message to display if Streams are not equal - Arguments to be used in formatting the message - - - - Asserts that two files are not equal. If they are equal - an is thrown. - - The path to a file containing the value that is expected - The path to a file containing the actual value - The message to display if objects are not equal - - - - Asserts that two files are not equal. If they are equal - an is thrown. - - The path to a file containing the value that is expected - The path to a file containing the actual value - - - - GlobalSettings is a place for setting default values used - by the framework in performing asserts. - - - - - Default tolerance for floating point equality - - - - - Helper class with properties and methods that supply - a number of constraints used in Asserts. - - - - - Returns a new PropertyConstraintExpression, which will either - test for the existence of the named property on the object - being tested or apply any following constraint to that property. - - - - - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. - - - - - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. - - - - - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. - - - - - Returns a ConstraintExpression that negates any - following constraint. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if at least one of them succeeds. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them fail. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the Length property of the object being tested. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the Count property of the object being tested. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the Message property of the object being tested. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the InnerException property of the object being tested. - - - - - Interface implemented by a user fixture in order to - validate any expected exceptions. It is only called - for test methods marked with the ExpectedException - attribute. - - - - - Method to handle an expected exception - - The exception to be handled - - - - Helper class with properties and methods that supply - a number of constraints used in Asserts. - - - - - Returns a constraint that tests two items for equality - - - - - Returns a constraint that tests that two references are the same object - - - - - Returns a constraint that tests whether the - actual value is greater than the suppled argument - - - - - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument - - - - - Returns a constraint that tests whether the - actual value is greater than or equal to the suppled argument - - - - - Returns a constraint that tests whether the - actual value is less than the suppled argument - - - - - Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument - - - - - Returns a constraint that tests whether the - actual value is less than or equal to the suppled argument - - - - - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. - - - - - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is a collection containing the same elements as the - collection supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is a subset of the collection supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value matches the Regex pattern supplied as an argument. - - - - - Returns a constraint that tests whether the path provided - is the same as an expected path after canonicalization. - - - - - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. - - - - - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. - - - - - Returns a constraint that tests whether the actual value falls - within a specified range. - - - - - Returns a ConstraintExpression that negates any - following constraint. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. - - - - - Returns a constraint that tests for null - - - - - Returns a constraint that tests for True - - - - - Returns a constraint that tests for False - - - - - Returns a constraint that tests for NaN - - - - - Returns a constraint that tests for empty - - - - - Returns a constraint that tests whether a collection - contains all unique items. - - - - - Returns a constraint that tests whether an object graph is serializable in binary format. - - - - - Returns a constraint that tests whether an object graph is serializable in xml format. - - - - - Returns a constraint that tests whether a collection is ordered - - - - - The Iz class is a synonym for Is intended for use in VB, - which regards Is as a keyword. - - - - - The List class is a helper class with properties and methods - that supply a number of constraints used with lists and collections. - - - - - List.Map returns a ListMapper, which can be used to map - the original collection to another collection. - - - - - - - ListMapper is used to transform a collection used as an actual argument - producing another collection to be used in the assertion. - - - - - Construct a ListMapper based on a collection - - The collection to be transformed - - - - Produces a collection containing all the values of a property - - The collection of property values - - - - - Randomizer returns a set of random values in a repeatable - way, to allow re-running of tests if necessary. - - - - - Get a randomizer for a particular member, returning - one that has already been created if it exists. - This ensures that the same values are generated - each time the tests are reloaded. - - - - - Get a randomizer for a particular parameter, returning - one that has already been created if it exists. - This ensures that the same values are generated - each time the tests are reloaded. - - - - - Construct a randomizer using a random seed - - - - - Construct a randomizer using a specified seed - - - - - Return an array of random doubles between 0.0 and 1.0. - - - - - - - Return an array of random doubles with values in a specified range. - - - - - Return an array of random ints with values in a specified range. - - - - - Get a random seed for use in creating a randomizer. - - - - - The SpecialValue enum is used to represent TestCase arguments - that cannot be used as arguments to an Attribute. - - - - - Null represents a null value, which cannot be used as an - argument to an attriute under .NET 1.x - - - - - Basic Asserts on strings. - - - - - The Equals method throws an AssertionException. This is done - to make sure there is no mistake by calling this function. - - - - - - - override the default ReferenceEquals to throw an AssertionException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. - - - - - - - Asserts that a string is found within another string. - - The expected string - The string to be examined - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that a string is found within another string. - - The expected string - The string to be examined - The message to display in case of failure - - - - Asserts that a string is found within another string. - - The expected string - The string to be examined - - - - Asserts that a string is not found within another string. - - The expected string - The string to be examined - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that a string is found within another string. - - The expected string - The string to be examined - The message to display in case of failure - - - - Asserts that a string is found within another string. - - The expected string - The string to be examined - - - - Asserts that a string starts with another string. - - The expected string - The string to be examined - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that a string starts with another string. - - The expected string - The string to be examined - The message to display in case of failure - - - - Asserts that a string starts with another string. - - The expected string - The string to be examined - - - - Asserts that a string does not start with another string. - - The expected string - The string to be examined - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that a string does not start with another string. - - The expected string - The string to be examined - The message to display in case of failure - - - - Asserts that a string does not start with another string. - - The expected string - The string to be examined - - - - Asserts that a string ends with another string. - - The expected string - The string to be examined - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that a string ends with another string. - - The expected string - The string to be examined - The message to display in case of failure - - - - Asserts that a string ends with another string. - - The expected string - The string to be examined - - - - Asserts that a string does not end with another string. - - The expected string - The string to be examined - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that a string does not end with another string. - - The expected string - The string to be examined - The message to display in case of failure - - - - Asserts that a string does not end with another string. - - The expected string - The string to be examined - - - - Asserts that two strings are equal, without regard to case. - - The expected string - The actual string - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that two strings are equal, without regard to case. - - The expected string - The actual string - The message to display in case of failure - - - - Asserts that two strings are equal, without regard to case. - - The expected string - The actual string - - - - Asserts that two strings are not equal, without regard to case. - - The expected string - The actual string - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that two strings are Notequal, without regard to case. - - The expected string - The actual string - The message to display in case of failure - - - - Asserts that two strings are not equal, without regard to case. - - The expected string - The actual string - - - - Asserts that a string matches an expected regular expression pattern. - - The regex pattern to be matched - The actual string - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that a string matches an expected regular expression pattern. - - The regex pattern to be matched - The actual string - The message to display in case of failure - - - - Asserts that a string matches an expected regular expression pattern. - - The regex pattern to be matched - The actual string - - - - Asserts that a string does not match an expected regular expression pattern. - - The regex pattern to be used - The actual string - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that a string does not match an expected regular expression pattern. - - The regex pattern to be used - The actual string - The message to display in case of failure - - - - Asserts that a string does not match an expected regular expression pattern. - - The regex pattern to be used - The actual string - - - - The TestCaseData class represents a set of arguments - and other parameter info to be used for a parameterized - test case. It provides a number of instance modifiers - for use in initializing the test case. - - Note: Instance modifiers are getters that return - the same instance after modifying it's state. - - - - - The argument list to be provided to the test - - - - - The expected result to be returned - - - - - The expected exception Type - - - - - The FullName of the expected exception - - - - - The name to be used for the test - - - - - The description of the test - - - - - A dictionary of properties, used to add information - to tests without requiring the class to change. - - - - - If true, indicates that the test case is to be ignored - - - - - The reason for ignoring a test case - - - - - Initializes a new instance of the class. - - The arguments. - - - - Initializes a new instance of the class. - - The argument. - - - - Initializes a new instance of the class. - - The first argument. - The second argument. - - - - Initializes a new instance of the class. - - The first argument. - The second argument. - The third argument. - - - - Sets the expected result for the test - - The expected result - A modified TestCaseData - - - - Sets the expected exception type for the test - - Type of the expected exception. - The modified TestCaseData instance - - - - Sets the expected exception type for the test - - FullName of the expected exception. - The modified TestCaseData instance - - - - Sets the name of the test case - - The modified TestCaseData instance - - - - Sets the description for the test case - being constructed. - - The description. - The modified TestCaseData instance. - - - - Applies a category to the test - - - - - - - Applies a named property to the test - - - - - - - - Applies a named property to the test - - - - - - - - Applies a named property to the test - - - - - - - - Ignores this TestCase. - - - - - - Ignores this TestCase, specifying the reason. - - The reason. - - - - - Gets the argument list to be provided to the test - - - - - Gets the expected result - - - - - Gets the expected exception Type - - - - - Gets the FullName of the expected exception - - - - - Gets the name to be used for the test - - - - - Gets the description of the test - - - - - Gets a value indicating whether this is ignored. - - true if ignored; otherwise, false. - - - - Gets the ignore reason. - - The ignore reason. - - - - Gets a list of categories associated with this test. - - - - - Gets the property dictionary for this test - - - - - Provide the context information of the current test - - - - - Get the current test context. This is created - as needed. The user may save the context for - use within a test, but it should not be used - outside the test for which it is created. - - - - - TestAdapter adapts a Test for consumption by - the user test code. - - - - - The name of the test. - - - - - The FullName of the test - - - - - The properties of the test. - - - - - ResultAdapter adapts a TestResult for consumption by - the user test code. - - - - - Construct a ResultAdapter for a TestResult - - The TestResult to be adapted - - - - The TestState of current test. This maps to the ResultState - used in nunit.core and is subject to change in the future. - - - - - The TestStatus of current test. This enum will be used - in future versions of NUnit and so is to be preferred - to the TestState value. - - - - - The ResultState enum indicates the result of running a test - - - - - The result is inconclusive - - - - - The test was not runnable. - - - - - The test has been skipped. - - - - - The test has been ignored. - - - - - The test succeeded - - - - - The test failed - - - - - The test encountered an unexpected exception - - - - - The test was cancelled by the user - - - - - The TestStatus enum indicates the result of running a test - - - - - The test was inconclusive - - - - - The test has skipped - - - - - The test succeeded - - - - - The test failed - - - - - Helper class with static methods used to supply constraints - that operate on strings. - - - - - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. - - - - - Returns a constraint that fails if the actual - value contains the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. - - - - - Returns a constraint that fails if the actual - value starts with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. - - - - - Returns a constraint that fails if the actual - value ends with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value matches the Regex pattern supplied as an argument. - - - - - Returns a constraint that fails if the actual - value matches the pattern supplied as an argument. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. - - - - - TextMessageWriter writes constraint descriptions and messages - in displayable form as a text stream. It tailors the display - of individual message components to form the standard message - format of NUnit assertion failure messages. - - - - - Prefix used for the expected value line of a message - - - - - Prefix used for the actual value line of a message - - - - - Length of a message prefix - - - - - Construct a TextMessageWriter - - - - - Construct a TextMessageWriter, specifying a user message - and optional formatting arguments. - - - - - - - Method to write single line message with optional args, usually - written to precede the general failure message, at a givel - indentation level. - - The indentation level of the message - The message to be written - Any arguments used in formatting the message - - - - Display Expected and Actual lines for a constraint. This - is called by MessageWriter's default implementation of - WriteMessageTo and provides the generic two-line display. - - The constraint that failed - - - - Display Expected and Actual lines for given values. This - method may be called by constraints that need more control over - the display of actual and expected values than is provided - by the default implementation. - - The expected value - The actual value causing the failure - - - - Display Expected and Actual lines for given values, including - a tolerance value on the expected line. - - The expected value - The actual value causing the failure - The tolerance within which the test was made - - - - Display the expected and actual string values on separate lines. - If the mismatch parameter is >=0, an additional line is displayed - line containing a caret that points to the mismatch point. - - The expected string value - The actual string value - The point at which the strings don't match or -1 - If true, case is ignored in string comparisons - If true, clip the strings to fit the max line length - - - - Writes the text for a connector. - - The connector. - - - - Writes the text for a predicate. - - The predicate. - - - - Write the text for a modifier. - - The modifier. - - - - Writes the text for an expected value. - - The expected value. - - - - Writes the text for an actual value. - - The actual value. - - - - Writes the text for a generalized value. - - The value. - - - - Writes the text for a collection value, - starting at a particular point, to a max length - - The collection containing elements to write. - The starting point of the elements to write - The maximum number of elements to write - - - - Write the generic 'Expected' line for a constraint - - The constraint that failed - - - - Write the generic 'Expected' line for a given value - - The expected value - - - - Write the generic 'Expected' line for a given value - and tolerance. - - The expected value - The tolerance within which the test was made - - - - Write the generic 'Actual' line for a constraint - - The constraint for which the actual value is to be written - - - - Write the generic 'Actual' line for a given value - - The actual value causing a failure - - - - Gets or sets the maximum line length for this writer - - - - - Helper class with properties and methods that supply - constraints that operate on exceptions. - - - - - Creates a constraint specifying the exact type of exception expected - - - - - Creates a constraint specifying the exact type of exception expected - - - - - Creates a constraint specifying the type of exception expected - - - - - Creates a constraint specifying the type of exception expected - - - - - Creates a constraint specifying an expected exception - - - - - Creates a constraint specifying an exception with a given InnerException - - - - - Creates a constraint specifying an expected TargetInvocationException - - - - - Creates a constraint specifying an expected TargetInvocationException - - - - - Creates a constraint specifying an expected TargetInvocationException - - - - - Creates a constraint specifying that no exception is thrown - - - - + + + + nunit.framework + + + + + Attribute used to apply a category to a test + + + + + The name of the category + + + + + Construct attribute for a given category based on + a name. The name may not contain the characters ',', + '+', '-' or '!'. However, this is not checked in the + constructor since it would cause an error to arise at + as the test was loaded without giving a clear indication + of where the problem is located. The error is handled + in NUnitFramework.cs by marking the test as not + runnable. + + The name of the category + + + + Protected constructor uses the Type name as the name + of the category. + + + + + The name of the category + + + + + Used to mark a field for use as a datapoint when executing a theory + within the same fixture that requires an argument of the field's Type. + + + + + Used to mark an array as containing a set of datapoints to be used + executing a theory within the same fixture that requires an argument + of the Type of the array elements. + + + + + Attribute used to provide descriptive text about a + test case or fixture. + + + + + Construct the attribute + + Text describing the test + + + + Gets the test description + + + + + Enumeration indicating how the expected message parameter is to be used + + + + Expect an exact match + + + Expect a message containing the parameter string + + + Match the regular expression provided as a parameter + + + Expect a message that starts with the parameter string + + + + ExpectedExceptionAttribute + + + + + + Constructor for a non-specific exception + + + + + Constructor for a given type of exception + + The type of the expected exception + + + + Constructor for a given exception name + + The full name of the expected exception + + + + Gets or sets the expected exception type + + + + + Gets or sets the full Type name of the expected exception + + + + + Gets or sets the expected message text + + + + + Gets or sets the user message displayed in case of failure + + + + + Gets or sets the type of match to be performed on the expected message + + + + + Gets the name of a method to be used as an exception handler + + + + + ExplicitAttribute marks a test or test fixture so that it will + only be run if explicitly executed from the gui or command line + or if it is included by use of a filter. The test will not be + run simply because an enclosing suite is run. + + + + + Default constructor + + + + + Constructor with a reason + + The reason test is marked explicit + + + + The reason test is marked explicit + + + + + Attribute used to mark a test that is to be ignored. + Ignored tests result in a warning message when the + tests are run. + + + + + Constructs the attribute without giving a reason + for ignoring the test. + + + + + Constructs the attribute giving a reason for ignoring the test + + The reason for ignoring the test + + + + The reason for ignoring a test + + + + + Abstract base for Attributes that are used to include tests + in the test run based on environmental settings. + + + + + Constructor with no included items specified, for use + with named property syntax. + + + + + Constructor taking one or more included items + + Comma-delimited list of included items + + + + Name of the item that is needed in order for + a test to run. Multiple itemss may be given, + separated by a comma. + + + + + Name of the item to be excluded. Multiple items + may be given, separated by a comma. + + + + + The reason for including or excluding the test + + + + + PlatformAttribute is used to mark a test fixture or an + individual method as applying to a particular platform only. + + + + + Constructor with no platforms specified, for use + with named property syntax. + + + + + Constructor taking one or more platforms + + Comma-deliminted list of platforms + + + + CultureAttribute is used to mark a test fixture or an + individual method as applying to a particular Culture only. + + + + + Constructor with no cultures specified, for use + with named property syntax. + + + + + Constructor taking one or more cultures + + Comma-deliminted list of cultures + + + + Marks a test to use a combinatorial join of any argument data + provided. NUnit will create a test case for every combination of + the arguments provided. This can result in a large number of test + cases and so should be used judiciously. This is the default join + type, so the attribute need not be used except as documentation. + + + + + PropertyAttribute is used to attach information to a test as a name/value pair.. + + + + + Construct a PropertyAttribute with a name and string value + + The name of the property + The property value + + + + Construct a PropertyAttribute with a name and int value + + The name of the property + The property value + + + + Construct a PropertyAttribute with a name and double value + + The name of the property + The property value + + + + Constructor for derived classes that set the + property dictionary directly. + + + + + Constructor for use by derived classes that use the + name of the type as the property name. Derived classes + must ensure that the Type of the property value is + a standard type supported by the BCL. Any custom + types will cause a serialization Exception when + in the client. + + + + + Gets the property dictionary for this attribute + + + + + Default constructor + + + + + Marks a test to use pairwise join of any argument data provided. + NUnit will attempt too excercise every pair of argument values at + least once, using as small a number of test cases as it can. With + only two arguments, this is the same as a combinatorial join. + + + + + Default constructor + + + + + Marks a test to use a sequential join of any argument data + provided. NUnit will use arguements for each parameter in + sequence, generating test cases up to the largest number + of argument values provided and using null for any arguments + for which it runs out of values. Normally, this should be + used with the same number of arguments for each parameter. + + + + + Default constructor + + + + + Summary description for MaxTimeAttribute. + + + + + Construct a MaxTimeAttribute, given a time in milliseconds. + + The maximum elapsed time in milliseconds + + + + RandomAttribute is used to supply a set of random values + to a single parameter of a parameterized test. + + + + + ValuesAttribute is used to provide literal arguments for + an individual parameter of a test. + + + + + Abstract base class for attributes that apply to parameters + and supply data for the parameter. + + + + + Gets the data to be provided to the specified parameter + + + + + The collection of data to be returned. Must + be set by any derived attribute classes. + We use an object[] so that the individual + elements may have their type changed in GetData + if necessary. + + + + + Construct with one argument + + + + + + Construct with two arguments + + + + + + + Construct with three arguments + + + + + + + + Construct with an array of arguments + + + + + + Get the collection of values to be used as arguments + + + + + Construct a set of doubles from 0.0 to 1.0, + specifying only the count. + + + + + + Construct a set of doubles from min to max + + + + + + + + Construct a set of ints from min to max + + + + + + + + Get the collection of values to be used as arguments + + + + + RangeAttribute is used to supply a range of values to an + individual parameter of a parameterized test. + + + + + Construct a range of ints using default step of 1 + + + + + + + Construct a range of ints specifying the step size + + + + + + + + Construct a range of longs + + + + + + + + Construct a range of doubles + + + + + + + + Construct a range of floats + + + + + + + + RepeatAttribute may be applied to test case in order + to run it multiple times. + + + + + Construct a RepeatAttribute + + The number of times to run the test + + + + RequiredAddinAttribute may be used to indicate the names of any addins + that must be present in order to run some or all of the tests in an + assembly. If the addin is not loaded, the entire assembly is marked + as NotRunnable. + + + + + Initializes a new instance of the class. + + The required addin. + + + + Gets the name of required addin. + + The required addin name. + + + + Summary description for SetCultureAttribute. + + + + + Construct given the name of a culture + + + + + + Summary description for SetUICultureAttribute. + + + + + Construct given the name of a culture + + + + + + Attribute used to mark a class that contains one-time SetUp + and/or TearDown methods that apply to all the tests in a + namespace or an assembly. + + + + + SetUpFixtureAttribute is used to identify a SetUpFixture + + + + + Attribute used to mark a static (shared in VB) property + that returns a list of tests. + + + + + Attribute used to identify a method that is called + immediately after each test is run. The method is + guaranteed to be called, even if an exception is thrown. + + + + + Adding this attribute to a method within a + class makes the method callable from the NUnit test runner. There is a property + called Description which is optional which you can provide a more detailed test + description. This class cannot be inherited. + + + + [TestFixture] + public class Fixture + { + [Test] + public void MethodToTest() + {} + + [Test(Description = "more detailed description")] + publc void TestDescriptionMethod() + {} + } + + + + + + Descriptive text for this test + + + + + TestCaseAttribute is used to mark parameterized test cases + and provide them with their arguments. + + + + + The ITestCaseData interface is implemented by a class + that is able to return complete testcases for use by + a parameterized test method. + + NOTE: This interface is used in both the framework + and the core, even though that results in two different + types. However, sharing the source code guarantees that + the various implementations will be compatible and that + the core is able to reflect successfully over the + framework implementations of ITestCaseData. + + + + + Gets the argument list to be provided to the test + + + + + Gets the expected result + + + + + Gets the expected exception Type + + + + + Gets the FullName of the expected exception + + + + + Gets the name to be used for the test + + + + + Gets the description of the test + + + + + Gets a value indicating whether this is ignored. + + true if ignored; otherwise, false. + + + + Gets the ignore reason. + + The ignore reason. + + + + Construct a TestCaseAttribute with a list of arguments. + This constructor is not CLS-Compliant + + + + + + Construct a TestCaseAttribute with a single argument + + + + + + Construct a TestCaseAttribute with a two arguments + + + + + + + Construct a TestCaseAttribute with a three arguments + + + + + + + + Gets the list of arguments to a test case + + + + + Gets or sets the expected result. + + The result. + + + + Gets or sets the expected exception. + + The expected exception. + + + + Gets or sets the name the expected exception. + + The expected name of the exception. + + + + Gets or sets the expected message of the expected exception + + The expected message of the exception. + + + + Gets or sets the type of match to be performed on the expected message + + + + + Gets or sets the description. + + The description. + + + + Gets or sets the name of the test. + + The name of the test. + + + + Gets or sets the ignored status of the test + + + + + Gets or sets the ignored status of the test + + + + + Gets the ignore reason. + + The ignore reason. + + + + FactoryAttribute indicates the source to be used to + provide test cases for a test method. + + + + + Construct with the name of the factory - for use with languages + that don't support params arrays. + + An array of the names of the factories that will provide data + + + + Construct with a Type and name - for use with languages + that don't support params arrays. + + The Type that will provide data + The name of the method, property or field that will provide data + + + + The name of a the method, property or fiend to be used as a source + + + + + A Type to be used as a source + + + + + [TestFixture] + public class ExampleClass + {} + + + + + Default constructor + + + + + Construct with a object[] representing a set of arguments. + In .NET 2.0, the arguments may later be separated into + type arguments and constructor arguments. + + + + + + Descriptive text for this fixture + + + + + The arguments originally provided to the attribute + + + + + Gets or sets a value indicating whether this should be ignored. + + true if ignore; otherwise, false. + + + + Gets or sets the ignore reason. May set Ignored as a side effect. + + The ignore reason. + + + + Get or set the type arguments. If not set + explicitly, any leading arguments that are + Types are taken as type arguments. + + + + + Attribute used to identify a method that is + called before any tests in a fixture are run. + + + + + Attribute used to identify a method that is called after + all the tests in a fixture have run. The method is + guaranteed to be called, even if an exception is thrown. + + + + + Adding this attribute to a method within a + class makes the method callable from the NUnit test runner. There is a property + called Description which is optional which you can provide a more detailed test + description. This class cannot be inherited. + + + + [TestFixture] + public class Fixture + { + [Test] + public void MethodToTest() + {} + + [Test(Description = "more detailed description")] + publc void TestDescriptionMethod() + {} + } + + + + + + WUsed on a method, marks the test with a timeout value in milliseconds. + The test will be run in a separate thread and is cancelled if the timeout + is exceeded. Used on a method or assembly, sets the default timeout + for all contained test methods. + + + + + Construct a TimeoutAttribute given a time in milliseconds + + The timeout value in milliseconds + + + + Marks a test that must run in the STA, causing it + to run in a separate thread if necessary. + + On methods, you may also use STAThreadAttribute + to serve the same purpose. + + + + + Construct a RequiresSTAAttribute + + + + + Marks a test that must run in the MTA, causing it + to run in a separate thread if necessary. + + On methods, you may also use MTAThreadAttribute + to serve the same purpose. + + + + + Construct a RequiresMTAAttribute + + + + + Marks a test that must run on a separate thread. + + + + + Construct a RequiresThreadAttribute + + + + + Construct a RequiresThreadAttribute, specifying the apartment + + + + + ValueSourceAttribute indicates the source to be used to + provide data for one parameter of a test method. + + + + + Construct with the name of the factory - for use with languages + that don't support params arrays. + + The name of the data source to be used + + + + Construct with a Type and name - for use with languages + that don't support params arrays. + + The Type that will provide data + The name of the method, property or field that will provide data + + + + The name of a the method, property or fiend to be used as a source + + + + + A Type to be used as a source + + + + + AttributeExistsConstraint tests for the presence of a + specified attribute on a Type. + + + + + The Constraint class is the base of all built-in constraints + within NUnit. It provides the operator overloads used to combine + constraints. + + + + + The IConstraintExpression interface is implemented by all + complete and resolvable constraints and expressions. + + + + + Return the top-level constraint for this expression + + + + + + Static UnsetObject used to detect derived constraints + failing to set the actual value. + + + + + The actual value being tested against a constraint + + + + + The display name of this Constraint for use by ToString() + + + + + Argument fields used by ToString(); + + + + + The builder holding this constraint + + + + + Construct a constraint with no arguments + + + + + Construct a constraint with one argument + + + + + Construct a constraint with two arguments + + + + + Sets the ConstraintBuilder holding this constraint + + + + + Write the failure message to the MessageWriter provided + as an argument. The default implementation simply passes + the constraint and the actual value to the writer, which + then displays the constraint description and the value. + + Constraints that need to provide additional details, + such as where the error occured can override this. + + The MessageWriter on which to display the message + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Test whether the constraint is satisfied by an + ActualValueDelegate that returns the value to be tested. + The default implementation simply evaluates the delegate + but derived classes may override it to provide for delayed + processing. + + An ActualValueDelegate + True for success, false for failure + + + + Test whether the constraint is satisfied by a given reference. + The default implementation simply dereferences the value but + derived classes may override it to provide for delayed processing. + + A reference to the value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + Default override of ToString returns the constraint DisplayName + followed by any arguments within angle brackets. + + + + + + Returns the string representation of this constraint + + + + + This operator creates a constraint that is satisfied only if both + argument constraints are satisfied. + + + + + This operator creates a constraint that is satisfied if either + of the argument constraints is satisfied. + + + + + This operator creates a constraint that is satisfied if the + argument constraint is not satisfied. + + + + + Returns a DelayedConstraint with the specified delay time. + + The delay in milliseconds. + + + + + Returns a DelayedConstraint with the specified delay time + and polling interval. + + The delay in milliseconds. + The interval at which to test the constraint. + + + + + The display name of this Constraint for use by ToString(). + The default value is the name of the constraint with + trailing "Constraint" removed. Derived classes may set + this to another name in their constructors. + + + + + Returns a ConstraintExpression by appending And + to the current constraint. + + + + + Returns a ConstraintExpression by appending And + to the current constraint. + + + + + Returns a ConstraintExpression by appending Or + to the current constraint. + + + + + Class used to detect any derived constraints + that fail to set the actual value in their + Matches override. + + + + + Constructs an AttributeExistsConstraint for a specific attribute Type + + + + + + Tests whether the object provides the expected attribute. + + A Type, MethodInfo, or other ICustomAttributeProvider + True if the expected attribute is present, otherwise false + + + + Writes the description of the constraint to the specified writer + + + + + AttributeConstraint tests that a specified attribute is present + on a Type or other provider and that the value of the attribute + satisfies some other constraint. + + + + + Abstract base class used for prefixes + + + + + The base constraint + + + + + Construct given a base constraint + + + + + + Constructs an AttributeConstraint for a specified attriute + Type and base constraint. + + + + + + + Determines whether the Type or other provider has the + expected attribute and if its value matches the + additional constraint specified. + + + + + Writes a description of the attribute to the specified writer. + + + + + Writes the actual value supplied to the specified writer. + + + + + Returns a string representation of the constraint. + + + + + BasicConstraint is the abstract base for constraints that + perform a simple comparison to a constant value. + + + + + Initializes a new instance of the class. + + The expected. + The description. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + NullConstraint tests that the actual value is null + + + + + Initializes a new instance of the class. + + + + + TrueConstraint tests that the actual value is true + + + + + Initializes a new instance of the class. + + + + + FalseConstraint tests that the actual value is false + + + + + Initializes a new instance of the class. + + + + + NaNConstraint tests that the actual value is a double or float NaN + + + + + Test that the actual value is an NaN + + + + + + + Write the constraint description to a specified writer + + + + + + BinaryConstraint is the abstract base of all constraints + that combine two other constraints in some fashion. + + + + + The first constraint being combined + + + + + The second constraint being combined + + + + + Construct a BinaryConstraint from two other constraints + + The first constraint + The second constraint + + + + AndConstraint succeeds only if both members succeed. + + + + + Create an AndConstraint from two other constraints + + The first constraint + The second constraint + + + + Apply both member constraints to an actual value, succeeding + succeeding only if both of them succeed. + + The actual value + True if the constraints both succeeded + + + + Write a description for this contraint to a MessageWriter + + The MessageWriter to receive the description + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + OrConstraint succeeds if either member succeeds + + + + + Create an OrConstraint from two other constraints + + The first constraint + The second constraint + + + + Apply the member constraints to an actual value, succeeding + succeeding as soon as one of them succeeds. + + The actual value + True if either constraint succeeded + + + + Write a description for this contraint to a MessageWriter + + The MessageWriter to receive the description + + + + CollectionConstraint is the abstract base class for + constraints that operate on collections. + + + + + Construct an empty CollectionConstraint + + + + + Construct a CollectionConstraint + + + + + + Determines whether the specified enumerable is empty. + + The enumerable. + + true if the specified enumerable is empty; otherwise, false. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Protected method to be implemented by derived classes + + + + + + + CollectionItemsEqualConstraint is the abstract base class for all + collection constraints that apply some notion of item equality + as a part of their operation. + + + + + Construct an empty CollectionConstraint + + + + + Construct a CollectionConstraint + + + + + + Flag the constraint to use the supplied IComparer object. + + The IComparer object to use. + Self. + + + + Flag the constraint to use the supplied IComparer object. + + The IComparer object to use. + Self. + + + + Flag the constraint to use the supplied Comparison object. + + The IComparer object to use. + Self. + + + + Flag the constraint to use the supplied IEqualityComparer object. + + The IComparer object to use. + Self. + + + + Flag the constraint to use the supplied IEqualityComparer object. + + The IComparer object to use. + Self. + + + + Compares two collection members for equality + + + + + Return a new CollectionTally for use in making tests + + The collection to be included in the tally + + + + Flag the constraint to ignore case and return self. + + + + + EmptyCollectionConstraint tests whether a collection is empty. + + + + + Check that the collection is empty + + + + + + + Write the constraint description to a MessageWriter + + + + + + UniqueItemsConstraint tests whether all the items in a + collection are unique. + + + + + Check that all items are unique. + + + + + + + Write a description of this constraint to a MessageWriter + + + + + + CollectionContainsConstraint is used to test whether a collection + contains an expected object as a member. + + + + + Construct a CollectionContainsConstraint + + + + + + Test whether the expected item is contained in the collection + + + + + + + Write a descripton of the constraint to a MessageWriter + + + + + + CollectionEquivalentCOnstraint is used to determine whether two + collections are equivalent. + + + + + Construct a CollectionEquivalentConstraint + + + + + + Test whether two collections are equivalent + + + + + + + Write a description of this constraint to a MessageWriter + + + + + + CollectionSubsetConstraint is used to determine whether + one collection is a subset of another + + + + + Construct a CollectionSubsetConstraint + + The collection that the actual value is expected to be a subset of + + + + Test whether the actual collection is a subset of + the expected collection provided. + + + + + + + Write a description of this constraint to a MessageWriter + + + + + + CollectionOrderedConstraint is used to test whether a collection is ordered. + + + + + Construct a CollectionOrderedConstraint + + + + + Modifies the constraint to use an IComparer and returns self. + + + + + Modifies the constraint to use an IComparer<T> and returns self. + + + + + Modifies the constraint to use a Comparison<T> and returns self. + + + + + Modifies the constraint to test ordering by the value of + a specified property and returns self. + + + + + Test whether the collection is ordered + + + + + + + Write a description of the constraint to a MessageWriter + + + + + + Returns the string representation of the constraint. + + + + + + If used performs a reverse comparison + + + + + CollectionTally counts (tallies) the number of + occurences of each object in one or more enumerations. + + + + + Construct a CollectionTally object from a comparer and a collection + + + + + Try to remove an object from the tally + + The object to remove + True if successful, false if the object was not found + + + + Try to remove a set of objects from the tally + + The objects to remove + True if successful, false if any object was not found + + + + The number of objects remaining in the tally + + + + + ComparisonAdapter class centralizes all comparisons of + values in NUnit, adapting to the use of any provided + IComparer, IComparer<T> or Comparison<T> + + + + + Returns a ComparisonAdapter that wraps an IComparer + + + + + Returns a ComparisonAdapter that wraps an IComparer<T> + + + + + Returns a ComparisonAdapter that wraps a Comparison<T> + + + + + Compares two objects + + + + + Gets the default ComparisonAdapter, which wraps an + NUnitComparer object. + + + + + Construct a ComparisonAdapter for an IComparer + + + + + Compares two objects + + + + + + + + Construct a default ComparisonAdapter + + + + + ComparisonAdapter<T> extends ComparisonAdapter and + allows use of an IComparer<T> or Comparison<T> + to actually perform the comparison. + + + + + Construct a ComparisonAdapter for an IComparer<T> + + + + + Compare a Type T to an object + + + + + Construct a ComparisonAdapter for a Comparison<T> + + + + + Compare a Type T to an object + + + + + Abstract base class for constraints that compare values to + determine if one is greater than, equal to or less than + the other. + + + + + The value against which a comparison is to be made + + + + + If true, less than returns success + + + + + if true, equal returns success + + + + + if true, greater than returns success + + + + + The predicate used as a part of the description + + + + + ComparisonAdapter to be used in making the comparison + + + + + Initializes a new instance of the class. + + The value against which to make a comparison. + if set to true less succeeds. + if set to true equal succeeds. + if set to true greater succeeds. + String used in describing the constraint. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Modifies the constraint to use an IComparer and returns self + + + + + Modifies the constraint to use an IComparer<T> and returns self + + + + + Modifies the constraint to use a Comparison<T> and returns self + + + + + Tests whether a value is greater than the value supplied to its constructor + + + + + Initializes a new instance of the class. + + The expected value. + + + + Tests whether a value is greater than or equal to the value supplied to its constructor + + + + + Initializes a new instance of the class. + + The expected value. + + + + Tests whether a value is less than the value supplied to its constructor + + + + + Initializes a new instance of the class. + + The expected value. + + + + Tests whether a value is less than or equal to the value supplied to its constructor + + + + + Initializes a new instance of the class. + + The expected value. + + + + Delegate used to delay evaluation of the actual value + to be used in evaluating a constraint + + + + + ConstraintBuilder maintains the stacks that are used in + processing a ConstraintExpression. An OperatorStack + is used to hold operators that are waiting for their + operands to be reognized. a ConstraintStack holds + input constraints as well as the results of each + operator applied. + + + + + Initializes a new instance of the class. + + + + + Appends the specified operator to the expression by first + reducing the operator stack and then pushing the new + operator on the stack. + + The operator to push. + + + + Appends the specified constraint to the expresson by pushing + it on the constraint stack. + + The constraint to push. + + + + Sets the top operator right context. + + The right context. + + + + Reduces the operator stack until the topmost item + precedence is greater than or equal to the target precedence. + + The target precedence. + + + + Resolves this instance, returning a Constraint. If the builder + is not currently in a resolvable state, an exception is thrown. + + The resolved constraint + + + + Gets a value indicating whether this instance is resolvable. + + + true if this instance is resolvable; otherwise, false. + + + + + OperatorStack is a type-safe stack for holding ConstraintOperators + + + + + Initializes a new instance of the class. + + The builder. + + + + Pushes the specified operator onto the stack. + + The op. + + + + Pops the topmost operator from the stack. + + + + + + Gets a value indicating whether this is empty. + + true if empty; otherwise, false. + + + + Gets the topmost operator without modifying the stack. + + The top. + + + + ConstraintStack is a type-safe stack for holding Constraints + + + + + Initializes a new instance of the class. + + The builder. + + + + Pushes the specified constraint. As a side effect, + the constraint's builder field is set to the + ConstraintBuilder owning this stack. + + The constraint. + + + + Pops this topmost constrait from the stack. + As a side effect, the constraint's builder + field is set to null. + + + + + + Gets a value indicating whether this is empty. + + true if empty; otherwise, false. + + + + Gets the topmost constraint without modifying the stack. + + The topmost constraint + + + + ConstraintExpression represents a compound constraint in the + process of being constructed from a series of syntactic elements. + + Individual elements are appended to the expression as they are + reognized. Once an actual Constraint is appended, the expression + returns a resolvable Constraint. + + + + + ConstraintExpressionBase is the abstract base class for the + generated ConstraintExpression class, which represents a + compound constraint in the process of being constructed + from a series of syntactic elements. + + NOTE: ConstraintExpressionBase is aware of some of its + derived classes, which is an apparent violation of + encapsulation. Ideally, these classes would be a + single class, but they must be separated in order to + allow parts to be generated under .NET 1.x and to + provide proper user feedback in syntactically + aware IDEs. + + + + + The ConstraintBuilder holding the elements recognized so far + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the + class passing in a ConstraintBuilder, which may be pre-populated. + + The builder. + + + + Returns a string representation of the expression as it + currently stands. This should only be used for testing, + since it has the side-effect of resolving the expression. + + + + + + Appends an operator to the expression and returns the + resulting expression itself. + + + + + Appends a self-resolving operator to the expression and + returns a new ResolvableConstraintExpression. + + + + + Appends a constraint to the expression and returns that + constraint, which is associated with the current state + of the expression being built. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the + class passing in a ConstraintBuilder, which may be pre-populated. + + The builder. + + + + Returns a new PropertyConstraintExpression, which will either + test for the existence of the named property on the object + being tested or apply any following constraint to that property. + + + + + Returns a new AttributeConstraint checking for the + presence of a particular attribute on an object. + + + + + Returns a new AttributeConstraint checking for the + presence of a particular attribute on an object. + + + + + Returns the constraint provided as an argument - used to allow custom + custom constraints to easily participate in the syntax. + + + + + Returns the constraint provided as an argument - used to allow custom + custom constraints to easily participate in the syntax. + + + + + Returns a constraint that tests two items for equality + + + + + Returns a constraint that tests that two references are the same object + + + + + Returns a constraint that tests whether the + actual value is greater than the suppled argument + + + + + Returns a constraint that tests whether the + actual value is greater than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is greater than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than or equal to the suppled argument + + + + + Returns a constraint that tests whether the actual + value is of the exact type supplied as an argument. + + + + + Returns a constraint that tests whether the actual + value is of the exact type supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is of the type supplied as an argument or a derived type. + + + + + Returns a constraint that tests whether the actual value + is of the type supplied as an argument or a derived type. + + + + + Returns a constraint that tests whether the actual value + is of the type supplied as an argument or a derived type. + + + + + Returns a constraint that tests whether the actual value + is of the type supplied as an argument or a derived type. + + + + + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is a collection containing the same elements as the + collection supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is a subset of the collection supplied as an argument. + + + + + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. + + + + + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. + + + + + Returns a new ContainsConstraint. This constraint + will, in turn, make use of the appropriate second-level + constraint, depending on the type of the actual argument. + This overload is only used if the item sought is a string, + since any other type implies that we are looking for a + collection member. + + + + + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value starts with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value starts with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value ends with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value ends with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value matches the Regex pattern supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value matches the Regex pattern supplied as an argument. + + + + + Returns a constraint that tests whether the path provided + is the same as an expected path after canonicalization. + + + + + Returns a constraint that tests whether the path provided + is the same path or under an expected path after canonicalization. + + + + + Returns a constraint that tests whether the path provided + is the same path or under an expected path after canonicalization. + + + + + Returns a constraint that tests whether the actual value falls + within a specified range. + + + + + Returns a ConstraintExpression that negates any + following constraint. + + + + + Returns a ConstraintExpression that negates any + following constraint. + + + + + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if all of them succeed. + + + + + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if at least one of them succeeds. + + + + + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if all of them fail. + + + + + Returns a new ConstraintExpression, which will apply the following + constraint to the Length property of the object being tested. + + + + + Returns a new ConstraintExpression, which will apply the following + constraint to the Count property of the object being tested. + + + + + Returns a new ConstraintExpression, which will apply the following + constraint to the Message property of the object being tested. + + + + + Returns a new ConstraintExpression, which will apply the following + constraint to the InnerException property of the object being tested. + + + + + With is currently a NOP - reserved for future use. + + + + + Returns a constraint that tests for null + + + + + Returns a constraint that tests for True + + + + + Returns a constraint that tests for False + + + + + Returns a constraint that tests for NaN + + + + + Returns a constraint that tests for empty + + + + + Returns a constraint that tests whether a collection + contains all unique items. + + + + + Returns a constraint that tests whether an object graph is serializable in binary format. + + + + + Returns a constraint that tests whether an object graph is serializable in xml format. + + + + + Returns a constraint that tests whether a collection is ordered + + + + + Helper class with properties and methods that supply + a number of constraints used in Asserts. + + + + + Returns a new PropertyConstraintExpression, which will either + test for the existence of the named property on the object + being tested or apply any following constraint to that property. + + + + + Returns a new AttributeConstraint checking for the + presence of a particular attribute on an object. + + + + + Returns a new AttributeConstraint checking for the + presence of a particular attribute on an object. + + + + + Returns a constraint that tests two items for equality + + + + + Returns a constraint that tests that two references are the same object + + + + + Returns a constraint that tests whether the + actual value is greater than the suppled argument + + + + + Returns a constraint that tests whether the + actual value is greater than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is greater than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than or equal to the suppled argument + + + + + Returns a constraint that tests whether the actual + value is of the exact type supplied as an argument. + + + + + Returns a constraint that tests whether the actual + value is of the exact type supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is of the type supplied as an argument or a derived type. + + + + + Returns a constraint that tests whether the actual value + is of the type supplied as an argument or a derived type. + + + + + Returns a constraint that tests whether the actual value + is of the type supplied as an argument or a derived type. + + + + + Returns a constraint that tests whether the actual value + is of the type supplied as an argument or a derived type. + + + + + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is a collection containing the same elements as the + collection supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is a subset of the collection supplied as an argument. + + + + + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. + + + + + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. + + + + + Returns a new ContainsConstraint. This constraint + will, in turn, make use of the appropriate second-level + constraint, depending on the type of the actual argument. + This overload is only used if the item sought is a string, + since any other type implies that we are looking for a + collection member. + + + + + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. + + + + + Returns a constraint that fails if the actual + value contains the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value starts with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value starts with the substring supplied as an argument. + + + + + Returns a constraint that fails if the actual + value starts with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value ends with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value ends with the substring supplied as an argument. + + + + + Returns a constraint that fails if the actual + value ends with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value matches the Regex pattern supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value matches the Regex pattern supplied as an argument. + + + + + Returns a constraint that fails if the actual + value matches the pattern supplied as an argument. + + + + + Returns a constraint that tests whether the path provided + is the same as an expected path after canonicalization. + + + + + Returns a constraint that tests whether the path provided + is the same path or under an expected path after canonicalization. + + + + + Returns a constraint that tests whether the path provided + is the same path or under an expected path after canonicalization. + + + + + Returns a constraint that tests whether the actual value falls + within a specified range. + + + + + Returns a ConstraintExpression that negates any + following constraint. + + + + + Returns a ConstraintExpression that negates any + following constraint. + + + + + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if all of them succeed. + + + + + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if at least one of them succeeds. + + + + + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if all of them fail. + + + + + Returns a new ConstraintExpression, which will apply the following + constraint to the Length property of the object being tested. + + + + + Returns a new ConstraintExpression, which will apply the following + constraint to the Count property of the object being tested. + + + + + Returns a new ConstraintExpression, which will apply the following + constraint to the Message property of the object being tested. + + + + + Returns a new ConstraintExpression, which will apply the following + constraint to the InnerException property of the object being tested. + + + + + Returns a constraint that tests for null + + + + + Returns a constraint that tests for True + + + + + Returns a constraint that tests for False + + + + + Returns a constraint that tests for NaN + + + + + Returns a constraint that tests for empty + + + + + Returns a constraint that tests whether a collection + contains all unique items. + + + + + Returns a constraint that tests whether an object graph is serializable in binary format. + + + + + Returns a constraint that tests whether an object graph is serializable in xml format. + + + + + Returns a constraint that tests whether a collection is ordered + + + + + The ConstraintOperator class is used internally by a + ConstraintBuilder to represent an operator that + modifies or combines constraints. + + Constraint operators use left and right precedence + values to determine whether the top operator on the + stack should be reduced before pushing a new operator. + + + + + The precedence value used when the operator + is about to be pushed to the stack. + + + + + The precedence value used when the operator + is on the top of the stack. + + + + + Reduce produces a constraint from the operator and + any arguments. It takes the arguments from the constraint + stack and pushes the resulting constraint on it. + + + + + + The syntax element preceding this operator + + + + + The syntax element folowing this operator + + + + + The precedence value used when the operator + is about to be pushed to the stack. + + + + + The precedence value used when the operator + is on the top of the stack. + + + + + PrefixOperator takes a single constraint and modifies + it's action in some way. + + + + + Reduce produces a constraint from the operator and + any arguments. It takes the arguments from the constraint + stack and pushes the resulting constraint on it. + + + + + + Returns the constraint created by applying this + prefix to another constraint. + + + + + + + Negates the test of the constraint it wraps. + + + + + Constructs a new NotOperator + + + + + Returns a NotConstraint applied to its argument. + + + + + Abstract base for operators that indicate how to + apply a constraint to items in a collection. + + + + + Constructs a CollectionOperator + + + + + Represents a constraint that succeeds if all the + members of a collection match a base constraint. + + + + + Returns a constraint that will apply the argument + to the members of a collection, succeeding if + they all succeed. + + + + + Represents a constraint that succeeds if any of the + members of a collection match a base constraint. + + + + + Returns a constraint that will apply the argument + to the members of a collection, succeeding if + any of them succeed. + + + + + Represents a constraint that succeeds if none of the + members of a collection match a base constraint. + + + + + Returns a constraint that will apply the argument + to the members of a collection, succeeding if + none of them succeed. + + + + + Represents a constraint that simply wraps the + constraint provided as an argument, without any + further functionality, but which modifes the + order of evaluation because of its precedence. + + + + + Constructor for the WithOperator + + + + + Returns a constraint that wraps its argument + + + + + Abstract base class for operators that are able to reduce to a + constraint whether or not another syntactic element follows. + + + + + Operator used to test for the presence of a named Property + on an object and optionally apply further tests to the + value of that property. + + + + + Constructs a PropOperator for a particular named property + + + + + Reduce produces a constraint from the operator and + any arguments. It takes the arguments from the constraint + stack and pushes the resulting constraint on it. + + + + + + Gets the name of the property to which the operator applies + + + + + Operator that tests for the presence of a particular attribute + on a type and optionally applies further tests to the attribute. + + + + + Construct an AttributeOperator for a particular Type + + The Type of attribute tested + + + + Reduce produces a constraint from the operator and + any arguments. It takes the arguments from the constraint + stack and pushes the resulting constraint on it. + + + + + Operator that tests that an exception is thrown and + optionally applies further tests to the exception. + + + + + Construct a ThrowsOperator + + + + + Reduce produces a constraint from the operator and + any arguments. It takes the arguments from the constraint + stack and pushes the resulting constraint on it. + + + + + Abstract base class for all binary operators + + + + + Reduce produces a constraint from the operator and + any arguments. It takes the arguments from the constraint + stack and pushes the resulting constraint on it. + + + + + + Abstract method that produces a constraint by applying + the operator to its left and right constraint arguments. + + + + + Gets the left precedence of the operator + + + + + Gets the right precedence of the operator + + + + + Operator that requires both it's arguments to succeed + + + + + Construct an AndOperator + + + + + Apply the operator to produce an AndConstraint + + + + + Operator that requires at least one of it's arguments to succeed + + + + + Construct an OrOperator + + + + + Apply the operator to produce an OrConstraint + + + + + ContainsConstraint tests a whether a string contains a substring + or a collection contains an object. It postpones the decision of + which test to use until the type of the actual argument is known. + This allows testing whether a string is contained in a collection + or as a substring of another string using the same syntax. + + + + + Initializes a new instance of the class. + + The expected. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Flag the constraint to ignore case and return self. + + + + + Applies a delay to the match so that a match can be evaluated in the future. + + + + + Creates a new DelayedConstraint + + The inner constraint two decorate + The time interval after which the match is performed + If the value of is less than 0 + + + + Creates a new DelayedConstraint + + The inner constraint two decorate + The time interval after which the match is performed + The time interval used for polling + If the value of is less than 0 + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for if the base constraint fails, false if it succeeds + + + + Test whether the constraint is satisfied by a delegate + + The delegate whose value is to be tested + True for if the base constraint fails, false if it succeeds + + + + Test whether the constraint is satisfied by a given reference. + Overridden to wait for the specified delay period before + calling the base constraint with the dereferenced value. + + A reference to the value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a MessageWriter. + + The writer on which the actual value is displayed + + + + Returns the string representation of the constraint. + + + + + EmptyDirectoryConstraint is used to test that a directory is empty + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + EmptyConstraint tests a whether a string or collection is empty, + postponing the decision about which test is applied until the + type of the actual argument is known. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + EqualConstraint is able to compare an actual value with the + expected value provided in its constructor. Two objects are + considered equal if both are null, or if both have the same + value. NUnit has special semantics for some object types. + + + + + If true, strings in error messages will be clipped + + + + + NUnitEqualityComparer used to test equality. + + + + + Initializes a new instance of the class. + + The expected value. + + + + Flag the constraint to use a tolerance when determining equality. + + Tolerance value to be used + Self. + + + + Flag the constraint to use the supplied IComparer object. + + The IComparer object to use. + Self. + + + + Flag the constraint to use the supplied IComparer object. + + The IComparer object to use. + Self. + + + + Flag the constraint to use the supplied IComparer object. + + The IComparer object to use. + Self. + + + + Flag the constraint to use the supplied Comparison object. + + The IComparer object to use. + Self. + + + + Flag the constraint to use the supplied IEqualityComparer object. + + The IComparer object to use. + Self. + + + + Flag the constraint to use the supplied IEqualityComparer object. + + The IComparer object to use. + Self. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write a failure message. Overridden to provide custom + failure messages for EqualConstraint. + + The MessageWriter to write to + + + + Write description of this constraint + + The MessageWriter to write to + + + + Display the failure information for two collections that did not match. + + The MessageWriter on which to display + The expected collection. + The actual collection + The depth of this failure in a set of nested collections + + + + Displays a single line showing the types and sizes of the expected + and actual collections or arrays. If both are identical, the value is + only shown once. + + The MessageWriter on which to display + The expected collection or array + The actual collection or array + The indentation level for the message line + + + + Displays a single line showing the point in the expected and actual + arrays at which the comparison failed. If the arrays have different + structures or dimensions, both values are shown. + + The MessageWriter on which to display + The expected array + The actual array + Index of the failure point in the underlying collections + The indentation level for the message line + + + + Flag the constraint to ignore case and return self. + + + + + Flag the constraint to suppress string clipping + and return self. + + + + + Flag the constraint to compare arrays as collections + and return self. + + + + + Switches the .Within() modifier to interpret its tolerance as + a distance in representable values (see remarks). + + Self. + + Ulp stands for "unit in the last place" and describes the minimum + amount a given value can change. For any integers, an ulp is 1 whole + digit. For floating point values, the accuracy of which is better + for smaller numbers and worse for larger numbers, an ulp depends + on the size of the number. Using ulps for comparison of floating + point results instead of fixed tolerances is safer because it will + automatically compensate for the added inaccuracy of larger numbers. + + + + + Switches the .Within() modifier to interpret its tolerance as + a percentage that the actual values is allowed to deviate from + the expected value. + + Self + + + + Causes the tolerance to be interpreted as a TimeSpan in days. + + Self + + + + Causes the tolerance to be interpreted as a TimeSpan in hours. + + Self + + + + Causes the tolerance to be interpreted as a TimeSpan in minutes. + + Self + + + + Causes the tolerance to be interpreted as a TimeSpan in seconds. + + Self + + + + Causes the tolerance to be interpreted as a TimeSpan in milliseconds. + + Self + + + + Causes the tolerance to be interpreted as a TimeSpan in clock ticks. + + Self + + + + EqualityAdapter class handles all equality comparisons + that use an IEqualityComparer, IEqualityComparer<T> + or a ComparisonAdapter. + + + + + Compares two objects, returning true if they are equal + + + + + Returns an EqualityAdapter that wraps an IComparer. + + + + + Returns an EqualityAdapter that wraps an IEqualityComparer. + + + + + Returns an EqualityAdapter that wraps an IEqualityComparer<T>. + + + + + Returns an EqualityAdapter that wraps an IComparer<T>. + + + + + Returns an EqualityAdapter that wraps a Comparison<T>. + + + + Helper routines for working with floating point numbers + + + The floating point comparison code is based on this excellent article: + http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm + + + "ULP" means Unit in the Last Place and in the context of this library refers to + the distance between two adjacent floating point numbers. IEEE floating point + numbers can only represent a finite subset of natural numbers, with greater + accuracy for smaller numbers and lower accuracy for very large numbers. + + + If a comparison is allowed "2 ulps" of deviation, that means the values are + allowed to deviate by up to 2 adjacent floating point values, which might be + as low as 0.0000001 for small numbers or as high as 10.0 for large numbers. + + + + + Compares two floating point values for equality + First floating point value to be compared + Second floating point value t be compared + + Maximum number of representable floating point values that are allowed to + be between the left and the right floating point values + + True if both numbers are equal or close to being equal + + + Floating point values can only represent a finite subset of natural numbers. + For example, the values 2.00000000 and 2.00000024 can be stored in a float, + but nothing inbetween them. + + + This comparison will count how many possible floating point values are between + the left and the right number. If the number of possible values between both + numbers is less than or equal to maxUlps, then the numbers are considered as + being equal. + + + Implementation partially follows the code outlined here: + http://www.anttirt.net/2007/08/19/proper-floating-point-comparisons/ + + + + + Compares two double precision floating point values for equality + First double precision floating point value to be compared + Second double precision floating point value t be compared + + Maximum number of representable double precision floating point values that are + allowed to be between the left and the right double precision floating point values + + True if both numbers are equal or close to being equal + + + Double precision floating point values can only represent a limited series of + natural numbers. For example, the values 2.0000000000000000 and 2.0000000000000004 + can be stored in a double, but nothing inbetween them. + + + This comparison will count how many possible double precision floating point + values are between the left and the right number. If the number of possible + values between both numbers is less than or equal to maxUlps, then the numbers + are considered as being equal. + + + Implementation partially follows the code outlined here: + http://www.anttirt.net/2007/08/19/proper-floating-point-comparisons/ + + + + + + Reinterprets the memory contents of a floating point value as an integer value + + + Floating point value whose memory contents to reinterpret + + + The memory contents of the floating point value interpreted as an integer + + + + + Reinterprets the memory contents of a double precision floating point + value as an integer value + + + Double precision floating point value whose memory contents to reinterpret + + + The memory contents of the double precision floating point value + interpreted as an integer + + + + + Reinterprets the memory contents of an integer as a floating point value + + Integer value whose memory contents to reinterpret + + The memory contents of the integer value interpreted as a floating point value + + + + + Reinterprets the memory contents of an integer value as a double precision + floating point value + + Integer whose memory contents to reinterpret + + The memory contents of the integer interpreted as a double precision + floating point value + + + + Union of a floating point variable and an integer + + + The union's value as a floating point variable + + + The union's value as an integer + + + The union's value as an unsigned integer + + + Union of a double precision floating point variable and a long + + + The union's value as a double precision floating point variable + + + The union's value as a long + + + The union's value as an unsigned long + + + + MessageWriter is the abstract base for classes that write + constraint descriptions and messages in some form. The + class has separate methods for writing various components + of a message, allowing implementations to tailor the + presentation as needed. + + + + + Construct a MessageWriter given a culture + + + + + Method to write single line message with optional args, usually + written to precede the general failure message. + + The message to be written + Any arguments used in formatting the message + + + + Method to write single line message with optional args, usually + written to precede the general failure message, at a givel + indentation level. + + The indentation level of the message + The message to be written + Any arguments used in formatting the message + + + + Display Expected and Actual lines for a constraint. This + is called by MessageWriter's default implementation of + WriteMessageTo and provides the generic two-line display. + + The constraint that failed + + + + Display Expected and Actual lines for given values. This + method may be called by constraints that need more control over + the display of actual and expected values than is provided + by the default implementation. + + The expected value + The actual value causing the failure + + + + Display Expected and Actual lines for given values, including + a tolerance value on the Expected line. + + The expected value + The actual value causing the failure + The tolerance within which the test was made + + + + Display the expected and actual string values on separate lines. + If the mismatch parameter is >=0, an additional line is displayed + line containing a caret that points to the mismatch point. + + The expected string value + The actual string value + The point at which the strings don't match or -1 + If true, case is ignored in locating the point where the strings differ + If true, the strings should be clipped to fit the line + + + + Writes the text for a connector. + + The connector. + + + + Writes the text for a predicate. + + The predicate. + + + + Writes the text for an expected value. + + The expected value. + + + + Writes the text for a modifier + + The modifier. + + + + Writes the text for an actual value. + + The actual value. + + + + Writes the text for a generalized value. + + The value. + + + + Writes the text for a collection value, + starting at a particular point, to a max length + + The collection containing elements to write. + The starting point of the elements to write + The maximum number of elements to write + + + + Abstract method to get the max line length + + + + + Static methods used in creating messages + + + + + Static string used when strings are clipped + + + + + Returns the representation of a type as used in NUnitLite. + This is the same as Type.ToString() except for arrays, + which are displayed with their declared sizes. + + + + + + + Converts any control characters in a string + to their escaped representation. + + The string to be converted + The converted string + + + + Return the a string representation for a set of indices into an array + + Array of indices for which a string is needed + + + + Get an array of indices representing the point in a collection or + array corresponding to a single int index into the collection. + + The collection to which the indices apply + Index in the collection + Array of indices + + + + Clip a string to a given length, starting at a particular offset, returning the clipped + string with ellipses representing the removed parts + + The string to be clipped + The maximum permitted length of the result string + The point at which to start clipping + The clipped string + + + + Clip the expected and actual strings in a coordinated fashion, + so that they may be displayed together. + + + + + + + + + Shows the position two strings start to differ. Comparison + starts at the start index. + + The expected string + The actual string + The index in the strings at which comparison should start + Boolean indicating whether case should be ignored + -1 if no mismatch found, or the index where mismatch found + + + + The Numerics class contains common operations on numeric values. + + + + + Checks the type of the object, returning true if + the object is a numeric type. + + The object to check + true if the object is a numeric type + + + + Checks the type of the object, returning true if + the object is a floating point numeric type. + + The object to check + true if the object is a floating point numeric type + + + + Checks the type of the object, returning true if + the object is a fixed point numeric type. + + The object to check + true if the object is a fixed point numeric type + + + + Test two numeric values for equality, performing the usual numeric + conversions and using a provided or default tolerance. If the tolerance + provided is Empty, this method may set it to a default tolerance. + + The expected value + The actual value + A reference to the tolerance in effect + True if the values are equal + + + + Compare two numeric values, performing the usual numeric conversions. + + The expected value + The actual value + The relationship of the values to each other + + + + NUnitComparer encapsulates NUnit's default behavior + in comparing two objects. + + + + + Compares two objects + + + + + + + + Returns the default NUnitComparer. + + + + + NUnitEqualityComparer encapsulates NUnit's handling of + equality tests between objects. + + + + + If true, all string comparisons will ignore case + + + + + If true, arrays will be treated as collections, allowing + those of different dimensions to be compared + + + + + If non-zero, equality comparisons within the specified + tolerance will succeed. + + + + + Comparison object used in comparisons for some constraints. + + + + + Compares two objects for equality. + + + + + Helper method to compare two arrays + + + + + Method to compare two DirectoryInfo objects + + first directory to compare + second directory to compare + true if equivalent, false if not + + + + Returns the default NUnitEqualityComparer + + + + + Gets and sets a flag indicating whether case should + be ignored in determining equality. + + + + + Gets and sets a flag indicating that arrays should be + compared as collections, without regard to their shape. + + + + + Gets and sets an external comparer to be used to + test for equality. It is applied to members of + collections, in place of NUnit's own logic. + + + + + Gets and sets a tolerance used to compare objects of + certin types. + + + + + Gets the list of failure points for the last Match performed. + + + + + PathConstraint serves as the abstract base of constraints + that operate on paths and provides several helper methods. + + + + + The expected path used in the constraint + + + + + The actual path being tested + + + + + Flag indicating whether a caseInsensitive comparison should be made + + + + + Construct a PathConstraint for a give expected path + + The expected path + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Returns the string representation of this constraint + + + + + Canonicalize the provided path + + + The path in standardized form + + + + Test whether two paths are the same + + The first path + The second path + + + + + Test whether one path is under another path + + The first path - supposed to be the parent path + The second path - supposed to be the child path + + + + + Test whether one path is the same as or under another path + + The first path - supposed to be the parent path + The second path - supposed to be the child path + + + + + Modifies the current instance to be case-insensitve + and returns it. + + + + + Modifies the current instance to be case-sensitve + and returns it. + + + + + Summary description for SamePathConstraint. + + + + + Initializes a new instance of the class. + + The expected path + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + SubPathConstraint tests that the actual path is under the expected path + + + + + Initializes a new instance of the class. + + The expected path + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + SamePathOrUnderConstraint tests that one path is under another + + + + + Initializes a new instance of the class. + + The expected path + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Predicate constraint wraps a Predicate in a constraint, + returning success if the predicate is true. + + + + + Construct a PredicateConstraint from a predicate + + + + + Determines whether the predicate succeeds when applied + to the actual value. + + + + + Writes the description to a MessageWriter + + + + + NotConstraint negates the effect of some other constraint + + + + + Initializes a new instance of the class. + + The base constraint to be negated. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for if the base constraint fails, false if it succeeds + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a MessageWriter. + + The writer on which the actual value is displayed + + + + AllItemsConstraint applies another constraint to each + item in a collection, succeeding if they all succeed. + + + + + Construct an AllItemsConstraint on top of an existing constraint + + + + + + Apply the item constraint to each item in the collection, + failing if any item fails. + + + + + + + Write a description of this constraint to a MessageWriter + + + + + + SomeItemsConstraint applies another constraint to each + item in a collection, succeeding if any of them succeeds. + + + + + Construct a SomeItemsConstraint on top of an existing constraint + + + + + + Apply the item constraint to each item in the collection, + succeeding if any item succeeds. + + + + + + + Write a description of this constraint to a MessageWriter + + + + + + NoItemConstraint applies another constraint to each + item in a collection, failing if any of them succeeds. + + + + + Construct a SomeItemsConstraint on top of an existing constraint + + + + + + Apply the item constraint to each item in the collection, + failing if any item fails. + + + + + + + Write a description of this constraint to a MessageWriter + + + + + + PropertyExistsConstraint tests that a named property + exists on the object provided through Match. + + Originally, PropertyConstraint provided this feature + in addition to making optional tests on the vaue + of the property. The two constraints are now separate. + + + + + Initializes a new instance of the class. + + The name of the property. + + + + Test whether the property exists for a given object + + The object to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. + + The writer on which the actual value is displayed + + + + Returns the string representation of the constraint. + + + + + + PropertyConstraint extracts a named property and uses + its value as the actual value for a chained constraint. + + + + + Initializes a new instance of the class. + + The name. + The constraint to apply to the property. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + Returns the string representation of the constraint. + + + + + + RangeConstraint tests whethe two values are within a + specified range. + + + + + Initializes a new instance of the class. + + From. + To. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Modifies the constraint to use an IComparer and returns self. + + + + + Modifies the constraint to use an IComparer<T> and returns self. + + + + + Modifies the constraint to use a Comparison<T> and returns self. + + + + + ResolvableConstraintExpression is used to represent a compound + constraint being constructed at a point where the last operator + may either terminate the expression or may have additional + qualifying constraints added to it. + + It is used, for example, for a Property element or for + an Exception element, either of which may be optionally + followed by constraints that apply to the property or + exception. + + + + + Create a new instance of ResolvableConstraintExpression + + + + + Create a new instance of ResolvableConstraintExpression, + passing in a pre-populated ConstraintBuilder. + + + + + Resolve the current expression to a Constraint + + + + + Appends an And Operator to the expression + + + + + Appends an Or operator to the expression. + + + + + SameAsConstraint tests whether an object is identical to + the object passed to its constructor + + + + + Initializes a new instance of the class. + + The expected object. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + BinarySerializableConstraint tests whether + an object is serializable in binary format. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + Returns the string representation + + + + + BinarySerializableConstraint tests whether + an object is serializable in binary format. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + Returns the string representation of this constraint + + + + + StringConstraint is the abstract base for constraints + that operate on strings. It supports the IgnoreCase + modifier for string operations. + + + + + The expected value + + + + + Indicates whether tests should be case-insensitive + + + + + Constructs a StringConstraint given an expected value + + The expected value + + + + Modify the constraint to ignore case in matching. + + + + + EmptyStringConstraint tests whether a string is empty. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + NullEmptyStringConstraint tests whether a string is either null or empty. + + + + + Constructs a new NullOrEmptyStringConstraint + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + SubstringConstraint can test whether a string contains + the expected substring. + + + + + Initializes a new instance of the class. + + The expected. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + StartsWithConstraint can test whether a string starts + with an expected substring. + + + + + Initializes a new instance of the class. + + The expected string + + + + Test whether the constraint is matched by the actual value. + This is a template method, which calls the IsMatch method + of the derived class. + + + + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + EndsWithConstraint can test whether a string ends + with an expected substring. + + + + + Initializes a new instance of the class. + + The expected string + + + + Test whether the constraint is matched by the actual value. + This is a template method, which calls the IsMatch method + of the derived class. + + + + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + RegexConstraint can test whether a string matches + the pattern provided. + + + + + Initializes a new instance of the class. + + The pattern. + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True for success, false for failure + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + ThrowsConstraint is used to test the exception thrown by + a delegate by applying a constraint to it. + + + + + Initializes a new instance of the class, + using a constraint to be applied to the exception. + + A constraint to apply to the caught exception. + + + + Executes the code of the delegate and captures any exception. + If a non-null base constraint was provided, it applies that + constraint to the exception. + + A delegate representing the code to be tested + True if an exception is thrown and the constraint succeeds, otherwise false + + + + Converts an ActualValueDelegate to a TestDelegate + before calling the primary overload. + + + + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + Returns the string representation of this constraint + + + + + Get the actual exception thrown - used by Assert.Throws. + + + + + ThrowsNothingConstraint tests that a delegate does not + throw an exception. + + + + + Test whether the constraint is satisfied by a given value + + The value to be tested + True if no exception is thrown, otherwise false + + + + Converts an ActualValueDelegate to a TestDelegate + before calling the primary overload. + + + + + + + Write the constraint description to a MessageWriter + + The writer on which the description is displayed + + + + Write the actual value for a failing constraint test to a + MessageWriter. The default implementation simply writes + the raw value of actual, leaving it to the writer to + perform any formatting. + + The writer on which the actual value is displayed + + + + Modes in which the tolerance value for a comparison can + be interpreted. + + + + + The tolerance was created with a value, without specifying + how the value would be used. This is used to prevent setting + the mode more than once and is generally changed to Linear + upon execution of the test. + + + + + The tolerance is used as a numeric range within which + two compared values are considered to be equal. + + + + + Interprets the tolerance as the percentage by which + the two compared values my deviate from each other. + + + + + Compares two values based in their distance in + representable numbers. + + + + + The Tolerance class generalizes the notion of a tolerance + within which an equality test succeeds. Normally, it is + used with numeric types, but it can be used with any + type that supports taking a difference between two + objects and comparing that difference to a value. + + + + + Constructs a linear tolerance of a specdified amount + + + + + Constructs a tolerance given an amount and ToleranceMode + + + + + Tests that the current Tolerance is linear with a + numeric value, throwing an exception if it is not. + + + + + Returns an empty Tolerance object, equivalent to + specifying an exact match. + + + + + Gets the ToleranceMode for the current Tolerance + + + + + Gets the value of the current Tolerance instance. + + + + + Returns a new tolerance, using the current amount as a percentage. + + + + + Returns a new tolerance, using the current amount in Ulps. + + + + + Returns a new tolerance with a TimeSpan as the amount, using + the current amount as a number of days. + + + + + Returns a new tolerance with a TimeSpan as the amount, using + the current amount as a number of hours. + + + + + Returns a new tolerance with a TimeSpan as the amount, using + the current amount as a number of minutes. + + + + + Returns a new tolerance with a TimeSpan as the amount, using + the current amount as a number of seconds. + + + + + Returns a new tolerance with a TimeSpan as the amount, using + the current amount as a number of milliseconds. + + + + + Returns a new tolerance with a TimeSpan as the amount, using + the current amount as a number of clock ticks. + + + + + Returns true if the current tolerance is empty. + + + + + TypeConstraint is the abstract base for constraints + that take a Type as their expected value. + + + + + The expected Type used by the constraint + + + + + Construct a TypeConstraint for a given Type + + + + + + Write the actual value for a failing constraint test to a + MessageWriter. TypeConstraints override this method to write + the name of the type. + + The writer on which the actual value is displayed + + + + ExactTypeConstraint is used to test that an object + is of the exact type provided in the constructor + + + + + Construct an ExactTypeConstraint for a given Type + + The expected Type. + + + + Test that an object is of the exact type specified + + The actual value. + True if the tested object is of the exact type provided, otherwise false. + + + + Write the description of this constraint to a MessageWriter + + The MessageWriter to use + + + + InstanceOfTypeConstraint is used to test that an object + is of the same type provided or derived from it. + + + + + Construct an InstanceOfTypeConstraint for the type provided + + The expected Type + + + + Test whether an object is of the specified type or a derived type + + The object to be tested + True if the object is of the provided type or derives from it, otherwise false. + + + + Write a description of this constraint to a MessageWriter + + The MessageWriter to use + + + + AssignableFromConstraint is used to test that an object + can be assigned from a given Type. + + + + + Construct an AssignableFromConstraint for the type provided + + + + + + Test whether an object can be assigned from the specified type + + The object to be tested + True if the object can be assigned a value of the expected Type, otherwise false. + + + + Write a description of this constraint to a MessageWriter + + The MessageWriter to use + + + + AssignableToConstraint is used to test that an object + can be assigned to a given Type. + + + + + Construct an AssignableToConstraint for the type provided + + + + + + Test whether an object can be assigned to the specified type + + The object to be tested + True if the object can be assigned a value of the expected Type, otherwise false. + + + + Write a description of this constraint to a MessageWriter + + The MessageWriter to use + + + + Thrown when an assertion failed. + + + + + The error message that explains + the reason for the exception + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Thrown when an assertion failed. + + + + + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Thrown when a test executes inconclusively. + + + + + The error message that explains + the reason for the exception + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Thrown when an assertion failed. + + + + + + + The error message that explains + the reason for the exception + The exception that caused the + current exception + + + + Serialization Constructor + + + + + Delegate used by tests that execute code and + capture any thrown exception. + + + + + The Assert class contains a collection of static methods that + implement the most common assertions used in NUnit. + + + + + We don't actually want any instances of this object, but some people + like to inherit from it to add other static methods. Hence, the + protected constructor disallows any instances of this object. + + + + + The Equals method throws an AssertionException. This is done + to make sure there is no mistake by calling this function. + + + + + + + override the default ReferenceEquals to throw an AssertionException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + + + + + + Helper for Assert.AreEqual(double expected, double actual, ...) + allowing code generation to work consistently. + + The expected value + The actual value + The maximum acceptable difference between the + the expected and the actual + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Throws a with the message and arguments + that are passed in. This allows a test to be cut short, with a result + of success returned to NUnit. + + The message to initialize the with. + Arguments to be used in formatting the message + + + + Throws a with the message and arguments + that are passed in. This allows a test to be cut short, with a result + of success returned to NUnit. + + The message to initialize the with. + + + + Throws a with the message and arguments + that are passed in. This allows a test to be cut short, with a result + of success returned to NUnit. + + + + + Throws an with the message and arguments + that are passed in. This is used by the other Assert functions. + + The message to initialize the with. + Arguments to be used in formatting the message + + + + Throws an with the message that is + passed in. This is used by the other Assert functions. + + The message to initialize the with. + + + + Throws an . + This is used by the other Assert functions. + + + + + Throws an with the message and arguments + that are passed in. This causes the test to be reported as ignored. + + The message to initialize the with. + Arguments to be used in formatting the message + + + + Throws an with the message that is + passed in. This causes the test to be reported as ignored. + + The message to initialize the with. + + + + Throws an . + This causes the test to be reported as ignored. + + + + + Throws an with the message and arguments + that are passed in. This causes the test to be reported as inconclusive. + + The message to initialize the with. + Arguments to be used in formatting the message + + + + Throws an with the message that is + passed in. This causes the test to be reported as inconclusive. + + The message to initialize the with. + + + + Throws an . + This causes the test to be reported as Inconclusive. + + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + A Constraint to be applied + The actual value to test + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + A Constraint to be applied + The actual value to test + The message that will be displayed on failure + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + A Constraint expression to be applied + The actual value to test + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + A Constraint expression to be applied + An ActualValueDelegate returning the value to be tested + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + A Constraint expression to be applied + An ActualValueDelegate returning the value to be tested + The message that will be displayed on failure + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + An ActualValueDelegate returning the value to be tested + A Constraint expression to be applied + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + A Constraint to be applied + The actual value to test + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + A Constraint to be applied + The actual value to test + The message that will be displayed on failure + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + A Constraint to be applied + The actual value to test + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that a condition is true. If the condition is false the method throws + an . + + The evaluated condition + The message to display if the condition is false + Arguments to be used in formatting the message + + + + Asserts that a condition is true. If the condition is false the method throws + an . + + The evaluated condition + The message to display if the condition is false + + + + Asserts that a condition is true. If the condition is false the method throws + an . + + The evaluated condition + + + + Asserts that the code represented by a delegate throws an exception + that satisfies the constraint provided. + + A TestDelegate to be executed + A ThrowsConstraint used in the test + + + + Verifies that a delegate throws a particular exception when called. + + A constraint to be satisfied by the exception + A TestSnippet delegate + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Verifies that a delegate throws a particular exception when called. + + A constraint to be satisfied by the exception + A TestSnippet delegate + The message that will be displayed on failure + + + + Verifies that a delegate throws a particular exception when called. + + A constraint to be satisfied by the exception + A TestSnippet delegate + + + + Verifies that a delegate throws a particular exception when called. + + The exception Type expected + A TestSnippet delegate + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Verifies that a delegate throws a particular exception when called. + + The exception Type expected + A TestSnippet delegate + The message that will be displayed on failure + + + + Verifies that a delegate throws a particular exception when called. + + The exception Type expected + A TestSnippet delegate + + + + Verifies that a delegate throws a particular exception when called. + + Type of the expected exception + A TestSnippet delegate + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Verifies that a delegate throws a particular exception when called. + + Type of the expected exception + A TestSnippet delegate + The message that will be displayed on failure + + + + Verifies that a delegate throws a particular exception when called. + + Type of the expected exception + A TestSnippet delegate + + + + Verifies that a delegate throws an exception when called + and returns it. + + A TestDelegate + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Verifies that a delegate throws an exception when called + and returns it. + + A TestDelegate + The message that will be displayed on failure + + + + Verifies that a delegate throws an exception when called + and returns it. + + A TestDelegate + + + + Verifies that a delegate throws an exception of a certain Type + or one derived from it when called and returns it. + + The expected Exception Type + A TestDelegate + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Verifies that a delegate throws an exception of a certain Type + or one derived from it when called and returns it. + + The expected Exception Type + A TestDelegate + The message that will be displayed on failure + + + + Verifies that a delegate throws an exception of a certain Type + or one derived from it when called and returns it. + + The expected Exception Type + A TestDelegate + + + + Verifies that a delegate throws an exception of a certain Type + or one derived from it when called and returns it. + + The expected Exception Type + A TestDelegate + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Verifies that a delegate throws an exception of a certain Type + or one derived from it when called and returns it. + + The expected Exception Type + A TestDelegate + The message that will be displayed on failure + + + + Verifies that a delegate throws an exception of a certain Type + or one derived from it when called and returns it. + + The expected Exception Type + A TestDelegate + + + + Verifies that a delegate does not throw an exception + + A TestSnippet delegate + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Verifies that a delegate does not throw an exception. + + A TestSnippet delegate + The message that will be displayed on failure + + + + Verifies that a delegate does not throw an exception. + + A TestSnippet delegate + + + + Asserts that a condition is true. If the condition is false the method throws + an . + + The evaluated condition + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Asserts that a condition is true. If the condition is false the method throws + an . + + The evaluated condition + The message to display in case of failure + + + + Asserts that a condition is true. If the condition is false the method throws + an . + + The evaluated condition + + + + Asserts that a condition is true. If the condition is false the method throws + an . + + The evaluated condition + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Asserts that a condition is true. If the condition is false the method throws + an . + + The evaluated condition + The message to display in case of failure + + + + Asserts that a condition is true. If the condition is false the method throws + an . + + The evaluated condition + + + + Asserts that a condition is false. If the condition is true the method throws + an . + + The evaluated condition + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Asserts that a condition is false. If the condition is true the method throws + an . + + The evaluated condition + The message to display in case of failure + + + + Asserts that a condition is false. If the condition is true the method throws + an . + + The evaluated condition + + + + Asserts that a condition is false. If the condition is true the method throws + an . + + The evaluated condition + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Asserts that a condition is false. If the condition is true the method throws + an . + + The evaluated condition + The message to display in case of failure + + + + Asserts that a condition is false. If the condition is true the method throws + an . + + The evaluated condition + + + + Verifies that the object that is passed in is not equal to null + If the object is null then an + is thrown. + + The object that is to be tested + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the object that is passed in is not equal to null + If the object is null then an + is thrown. + + The object that is to be tested + The message to display in case of failure + + + + Verifies that the object that is passed in is not equal to null + If the object is null then an + is thrown. + + The object that is to be tested + + + + Verifies that the object that is passed in is not equal to null + If the object is null then an + is thrown. + + The object that is to be tested + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the object that is passed in is not equal to null + If the object is null then an + is thrown. + + The object that is to be tested + The message to display in case of failure + + + + Verifies that the object that is passed in is not equal to null + If the object is null then an + is thrown. + + The object that is to be tested + + + + Verifies that the object that is passed in is equal to null + If the object is not null then an + is thrown. + + The object that is to be tested + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the object that is passed in is equal to null + If the object is not null then an + is thrown. + + The object that is to be tested + The message to display in case of failure + + + + Verifies that the object that is passed in is equal to null + If the object is not null then an + is thrown. + + The object that is to be tested + + + + Verifies that the object that is passed in is equal to null + If the object is not null then an + is thrown. + + The object that is to be tested + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the object that is passed in is equal to null + If the object is not null then an + is thrown. + + The object that is to be tested + The message to display in case of failure + + + + Verifies that the object that is passed in is equal to null + If the object is not null then an + is thrown. + + The object that is to be tested + + + + Verifies that the double that is passed in is an NaN value. + If the object is not NaN then an + is thrown. + + The value that is to be tested + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the double that is passed in is an NaN value. + If the object is not NaN then an + is thrown. + + The value that is to be tested + The message to display in case of failure + + + + Verifies that the double that is passed in is an NaN value. + If the object is not NaN then an + is thrown. + + The value that is to be tested + + + + Verifies that the double that is passed in is an NaN value. + If the object is not NaN then an + is thrown. + + The value that is to be tested + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the double that is passed in is an NaN value. + If the object is not NaN then an + is thrown. + + The value that is to be tested + The message to display in case of failure + + + + Verifies that the double that is passed in is an NaN value. + If the object is not NaN then an + is thrown. + + The value that is to be tested + + + + Assert that a string is empty - that is equal to string.Empty + + The string to be tested + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Assert that a string is empty - that is equal to string.Empty + + The string to be tested + The message to display in case of failure + + + + Assert that a string is empty - that is equal to string.Empty + + The string to be tested + + + + Assert that an array, list or other collection is empty + + An array, list or other collection implementing ICollection + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Assert that an array, list or other collection is empty + + An array, list or other collection implementing ICollection + The message to display in case of failure + + + + Assert that an array, list or other collection is empty + + An array, list or other collection implementing ICollection + + + + Assert that a string is not empty - that is not equal to string.Empty + + The string to be tested + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Assert that a string is not empty - that is not equal to string.Empty + + The string to be tested + The message to display in case of failure + + + + Assert that a string is not empty - that is not equal to string.Empty + + The string to be tested + + + + Assert that an array, list or other collection is not empty + + An array, list or other collection implementing ICollection + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Assert that an array, list or other collection is not empty + + An array, list or other collection implementing ICollection + The message to display in case of failure + + + + Assert that an array, list or other collection is not empty + + An array, list or other collection implementing ICollection + + + + Assert that a string is either null or equal to string.Empty + + The string to be tested + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Assert that a string is either null or equal to string.Empty + + The string to be tested + The message to display in case of failure + + + + Assert that a string is either null or equal to string.Empty + + The string to be tested + + + + Assert that a string is not null or empty + + The string to be tested + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Assert that a string is not null or empty + + The string to be tested + The message to display in case of failure + + + + Assert that a string is not null or empty + + The string to be tested + + + + Asserts that an object may be assigned a value of a given Type. + + The expected Type. + The object under examination + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Asserts that an object may be assigned a value of a given Type. + + The expected Type. + The object under examination + The message to display in case of failure + + + + Asserts that an object may be assigned a value of a given Type. + + The expected Type. + The object under examination + + + + Asserts that an object may be assigned a value of a given Type. + + The expected Type. + The object under examination + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Asserts that an object may be assigned a value of a given Type. + + The expected Type. + The object under examination + The message to display in case of failure + + + + Asserts that an object may be assigned a value of a given Type. + + The expected Type. + The object under examination + + + + Asserts that an object may not be assigned a value of a given Type. + + The expected Type. + The object under examination + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Asserts that an object may not be assigned a value of a given Type. + + The expected Type. + The object under examination + The message to display in case of failure + + + + Asserts that an object may not be assigned a value of a given Type. + + The expected Type. + The object under examination + + + + Asserts that an object may not be assigned a value of a given Type. + + The expected Type. + The object under examination + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Asserts that an object may not be assigned a value of a given Type. + + The expected Type. + The object under examination + The message to display in case of failure + + + + Asserts that an object may not be assigned a value of a given Type. + + The expected Type. + The object under examination + + + + Asserts that an object is an instance of a given type. + + The expected Type + The object being examined + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Asserts that an object is an instance of a given type. + + The expected Type + The object being examined + The message to display in case of failure + + + + Asserts that an object is an instance of a given type. + + The expected Type + The object being examined + + + + Asserts that an object is an instance of a given type. + + The expected Type + The object being examined + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Asserts that an object is an instance of a given type. + + The expected Type + The object being examined + The message to display in case of failure + + + + Asserts that an object is an instance of a given type. + + The expected Type + The object being examined + + + + Asserts that an object is an instance of a given type. + + The expected Type + The object being examined + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Asserts that an object is an instance of a given type. + + The expected Type + The object being examined + The message to display in case of failure + + + + Asserts that an object is an instance of a given type. + + The expected Type + The object being examined + + + + Asserts that an object is not an instance of a given type. + + The expected Type + The object being examined + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Asserts that an object is not an instance of a given type. + + The expected Type + The object being examined + The message to display in case of failure + + + + Asserts that an object is not an instance of a given type. + + The expected Type + The object being examined + + + + Asserts that an object is not an instance of a given type. + + The expected Type + The object being examined + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Asserts that an object is not an instance of a given type. + + The expected Type + The object being examined + The message to display in case of failure + + + + Asserts that an object is not an instance of a given type. + + The expected Type + The object being examined + + + + Asserts that an object is not an instance of a given type. + + The expected Type + The object being examined + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Asserts that an object is not an instance of a given type. + + The expected Type + The object being examined + The message to display in case of failure + + + + Asserts that an object is not an instance of a given type. + + The expected Type + The object being examined + + + + Verifies that two values are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two values are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two values are equal. If they are not, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two values are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two values are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two values are equal. If they are not, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two values are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two values are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two values are equal. If they are not, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two values are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two values are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two values are equal. If they are not, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two values are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two values are equal. If they are not, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two values are equal. If they are not, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two doubles are equal considering a delta. If the + expected value is infinity then the delta value is ignored. If + they are not equal then an is + thrown. + + The expected value + The actual value + The maximum acceptable difference between the + the expected and the actual + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two doubles are equal considering a delta. If the + expected value is infinity then the delta value is ignored. If + they are not equal then an is + thrown. + + The expected value + The actual value + The maximum acceptable difference between the + the expected and the actual + The message to display in case of failure + + + + Verifies that two doubles are equal considering a delta. If the + expected value is infinity then the delta value is ignored. If + they are not equal then an is + thrown. + + The expected value + The actual value + The maximum acceptable difference between the + the expected and the actual + + + + Verifies that two doubles are equal considering a delta. If the + expected value is infinity then the delta value is ignored. If + they are not equal then an is + thrown. + + The expected value + The actual value + The maximum acceptable difference between the + the expected and the actual + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two doubles are equal considering a delta. If the + expected value is infinity then the delta value is ignored. If + they are not equal then an is + thrown. + + The expected value + The actual value + The maximum acceptable difference between the + the expected and the actual + The message to display in case of failure + + + + Verifies that two doubles are equal considering a delta. If the + expected value is infinity then the delta value is ignored. If + they are not equal then an is + thrown. + + The expected value + The actual value + The maximum acceptable difference between the + the expected and the actual + + + + Verifies that two objects are equal. Two objects are considered + equal if both are null, or if both have the same value. NUnit + has special semantics for some object types. + If they are not equal an is thrown. + + The value that is expected + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two objects are equal. Two objects are considered + equal if both are null, or if both have the same value. NUnit + has special semantics for some object types. + If they are not equal an is thrown. + + The value that is expected + The actual value + The message to display in case of failure + + + + Verifies that two objects are equal. Two objects are considered + equal if both are null, or if both have the same value. NUnit + has special semantics for some object types. + If they are not equal an is thrown. + + The value that is expected + The actual value + + + + Verifies that two values are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two values are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two values are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two values are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two values are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two values are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two values are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two values are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two values are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two values are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two values are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two values are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two values are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two values are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two values are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two values are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two values are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two values are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two values are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two values are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + The message to display in case of failure + + + + Verifies that two values are not equal. If they are equal, then an + is thrown. + + The expected value + The actual value + + + + Verifies that two objects are not equal. Two objects are considered + equal if both are null, or if both have the same value. NUnit + has special semantics for some object types. + If they are equal an is thrown. + + The value that is expected + The actual value + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that two objects are not equal. Two objects are considered + equal if both are null, or if both have the same value. NUnit + has special semantics for some object types. + If they are equal an is thrown. + + The value that is expected + The actual value + The message to display in case of failure + + + + Verifies that two objects are not equal. Two objects are considered + equal if both are null, or if both have the same value. NUnit + has special semantics for some object types. + If they are equal an is thrown. + + The value that is expected + The actual value + + + + Asserts that two objects refer to the same object. If they + are not the same an is thrown. + + The expected object + The actual object + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Asserts that two objects refer to the same object. If they + are not the same an is thrown. + + The expected object + The actual object + The message to display in case of failure + + + + Asserts that two objects refer to the same object. If they + are not the same an is thrown. + + The expected object + The actual object + + + + Asserts that two objects do not refer to the same object. If they + are the same an is thrown. + + The expected object + The actual object + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Asserts that two objects do not refer to the same object. If they + are the same an is thrown. + + The expected object + The actual object + The message to display in case of failure + + + + Asserts that two objects do not refer to the same object. If they + are the same an is thrown. + + The expected object + The actual object + + + + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + + + + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + + + + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + + + + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + + + + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + + + + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + + + + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + + + + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + + + + Verifies that the first value is greater than the second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + + + + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + + + + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + + + + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + + + + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + + + + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + + + + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + + + + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + + + + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + + + + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + + + + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + + + + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + + + + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + + + + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + + + + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + + + + Verifies that the first value is less than the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + + + + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + + + + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + + + + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + + + + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + + + + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + + + + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + + + + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + + + + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + The message to display in case of failure + + + + Verifies that the first value is greater than or equal tothe second + value. If it is not, then an + is thrown. + + The first value, expected to be greater + The second value, expected to be less + + + + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + + + + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + + + + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + + + + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + + + + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + + + + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + + + + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + + + + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + + + + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + + + + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + + + + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + + + + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + + + + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + + + + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + + + + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + The message to display in case of failure + + + + Verifies that the first value is less than or equal to the second + value. If it is not, then an + is thrown. + + The first value, expected to be less + The second value, expected to be greater + + + + Asserts that an object is contained in a list. + + The expected object + The list to be examined + The message to display in case of failure + Array of objects to be used in formatting the message + + + + Asserts that an object is contained in a list. + + The expected object + The list to be examined + The message to display in case of failure + + + + Asserts that an object is contained in a list. + + The expected object + The list to be examined + + + + Gets the number of assertions executed so far and + resets the counter to zero. + + + + + AssertionHelper is an optional base class for user tests, + allowing the use of shorter names for constraints and + asserts and avoiding conflict with the definition of + , from which it inherits much of its + behavior, in certain mock object frameworks. + + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. Works + identically to + + A Constraint to be applied + The actual value to test + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. Works + identically to + + A Constraint to be applied + The actual value to test + The message that will be displayed on failure + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. Works + identically to + + A Constraint to be applied + The actual value to test + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + A Constraint expression to be applied + An ActualValueDelegate returning the value to be tested + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + A Constraint expression to be applied + An ActualValueDelegate returning the value to be tested + The message that will be displayed on failure + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + An ActualValueDelegate returning the value to be tested + A Constraint expression to be applied + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + A Constraint to be applied + The actual value to test + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + A Constraint to be applied + The actual value to test + The message that will be displayed on failure + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an assertion exception on failure. + + A Constraint to be applied + The actual value to test + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that a condition is true. If the condition is false the method throws + an . Works Identically to + . + + The evaluated condition + The message to display if the condition is false + Arguments to be used in formatting the message + + + + Asserts that a condition is true. If the condition is false the method throws + an . Works Identically to + . + + The evaluated condition + The message to display if the condition is false + + + + Asserts that a condition is true. If the condition is false the method throws + an . Works Identically to . + + The evaluated condition + + + + Asserts that the code represented by a delegate throws an exception + that satisfies the constraint provided. + + A TestDelegate to be executed + A ThrowsConstraint used in the test + + + + Returns a ListMapper based on a collection. + + The original collection + + + + + Provides static methods to express the assumptions + that must be met for a test to give a meaningful + result. If an assumption is not met, the test + should produce an inconclusive result. + + + + + The Equals method throws an AssertionException. This is done + to make sure there is no mistake by calling this function. + + + + + + + override the default ReferenceEquals to throw an AssertionException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + + + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + + A Constraint expression to be applied + The actual value to test + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + + A Constraint expression to be applied + The actual value to test + The message that will be displayed on failure + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + + A Constraint expression to be applied + The actual value to test + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + + A Constraint expression to be applied + An ActualValueDelegate returning the value to be tested + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + + A Constraint expression to be applied + An ActualValueDelegate returning the value to be tested + The message that will be displayed on failure + + + + Apply a constraint to an actual value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + + An ActualValueDelegate returning the value to be tested + A Constraint expression to be applied + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + + A Constraint expression to be applied + The actual value to test + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + + A Constraint expression to be applied + The actual value to test + The message that will be displayed on failure + + + + Apply a constraint to a referenced value, succeeding if the constraint + is satisfied and throwing an InconclusiveException on failure. + + A Constraint expression to be applied + The actual value to test + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that a condition is true. If the condition is false the method throws + an . + + The evaluated condition + The message to display if the condition is false + Arguments to be used in formatting the message + + + + Asserts that a condition is true. If the condition is false the method throws + an . + + The evaluated condition + The message to display if the condition is false + + + + Asserts that a condition is true. If the condition is false the + method throws an . + + The evaluated condition + + + + Asserts that the code represented by a delegate throws an exception + that satisfies the constraint provided. + + A TestDelegate to be executed + A ThrowsConstraint used in the test + + + + A set of Assert methods operationg on one or more collections + + + + + The Equals method throws an AssertionException. This is done + to make sure there is no mistake by calling this function. + + + + + + + override the default ReferenceEquals to throw an AssertionException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + + + + + + Asserts that all items contained in collection are of the type specified by expectedType. + + IEnumerable containing objects to be considered + System.Type that all objects in collection must be instances of + + + + Asserts that all items contained in collection are of the type specified by expectedType. + + IEnumerable containing objects to be considered + System.Type that all objects in collection must be instances of + The message that will be displayed on failure + + + + Asserts that all items contained in collection are of the type specified by expectedType. + + IEnumerable containing objects to be considered + System.Type that all objects in collection must be instances of + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that all items contained in collection are not equal to null. + + IEnumerable containing objects to be considered + + + + Asserts that all items contained in collection are not equal to null. + + IEnumerable containing objects to be considered + The message that will be displayed on failure + + + + Asserts that all items contained in collection are not equal to null. + + IEnumerable of objects to be considered + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Ensures that every object contained in collection exists within the collection + once and only once. + + IEnumerable of objects to be considered + + + + Ensures that every object contained in collection exists within the collection + once and only once. + + IEnumerable of objects to be considered + The message that will be displayed on failure + + + + Ensures that every object contained in collection exists within the collection + once and only once. + + IEnumerable of objects to be considered + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that expected and actual are exactly equal. The collections must have the same count, + and contain the exact same objects in the same order. + + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + + + + Asserts that expected and actual are exactly equal. The collections must have the same count, + and contain the exact same objects in the same order. + If comparer is not null then it will be used to compare the objects. + + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + The IComparer to use in comparing objects from each IEnumerable + + + + Asserts that expected and actual are exactly equal. The collections must have the same count, + and contain the exact same objects in the same order. + + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + The message that will be displayed on failure + + + + Asserts that expected and actual are exactly equal. The collections must have the same count, + and contain the exact same objects in the same order. + If comparer is not null then it will be used to compare the objects. + + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + The IComparer to use in comparing objects from each IEnumerable + The message that will be displayed on failure + + + + Asserts that expected and actual are exactly equal. The collections must have the same count, + and contain the exact same objects in the same order. + + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that expected and actual are exactly equal. The collections must have the same count, + and contain the exact same objects in the same order. + If comparer is not null then it will be used to compare the objects. + + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + The IComparer to use in comparing objects from each IEnumerable + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that expected and actual are equivalent, containing the same objects but the match may be in any order. + + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + + + + Asserts that expected and actual are equivalent, containing the same objects but the match may be in any order. + + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + The message that will be displayed on failure + + + + Asserts that expected and actual are equivalent, containing the same objects but the match may be in any order. + + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that expected and actual are not exactly equal. + + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + + + + Asserts that expected and actual are not exactly equal. + If comparer is not null then it will be used to compare the objects. + + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + The IComparer to use in comparing objects from each IEnumerable + + + + Asserts that expected and actual are not exactly equal. + + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + The message that will be displayed on failure + + + + Asserts that expected and actual are not exactly equal. + If comparer is not null then it will be used to compare the objects. + + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + The IComparer to use in comparing objects from each IEnumerable + The message that will be displayed on failure + + + + Asserts that expected and actual are not exactly equal. + + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that expected and actual are not exactly equal. + If comparer is not null then it will be used to compare the objects. + + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + The IComparer to use in comparing objects from each IEnumerable + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that expected and actual are not equivalent. + + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + + + + Asserts that expected and actual are not equivalent. + + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + The message that will be displayed on failure + + + + Asserts that expected and actual are not equivalent. + + The first IEnumerable of objects to be considered + The second IEnumerable of objects to be considered + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that collection contains actual as an item. + + IEnumerable of objects to be considered + Object to be found within collection + + + + Asserts that collection contains actual as an item. + + IEnumerable of objects to be considered + Object to be found within collection + The message that will be displayed on failure + + + + Asserts that collection contains actual as an item. + + IEnumerable of objects to be considered + Object to be found within collection + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that collection does not contain actual as an item. + + IEnumerable of objects to be considered + Object that cannot exist within collection + + + + Asserts that collection does not contain actual as an item. + + IEnumerable of objects to be considered + Object that cannot exist within collection + The message that will be displayed on failure + + + + Asserts that collection does not contain actual as an item. + + IEnumerable of objects to be considered + Object that cannot exist within collection + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that superset is not a subject of subset. + + The IEnumerable superset to be considered + The IEnumerable subset to be considered + + + + Asserts that superset is not a subject of subset. + + The IEnumerable superset to be considered + The IEnumerable subset to be considered + The message that will be displayed on failure + + + + Asserts that superset is not a subject of subset. + + The IEnumerable superset to be considered + The IEnumerable subset to be considered + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Asserts that superset is a subset of subset. + + The IEnumerable superset to be considered + The IEnumerable subset to be considered + + + + Asserts that superset is a subset of subset. + + The IEnumerable superset to be considered + The IEnumerable subset to be considered + The message that will be displayed on failure + + + + Asserts that superset is a subset of subset. + + The IEnumerable superset to be considered + The IEnumerable subset to be considered + The message that will be displayed on failure + Arguments to be used in formatting the message + + + + Assert that an array, list or other collection is empty + + An array, list or other collection implementing IEnumerable + The message to be displayed on failure + Arguments to be used in formatting the message + + + + Assert that an array, list or other collection is empty + + An array, list or other collection implementing IEnumerable + The message to be displayed on failure + + + + Assert that an array,list or other collection is empty + + An array, list or other collection implementing IEnumerable + + + + Assert that an array, list or other collection is empty + + An array, list or other collection implementing IEnumerable + The message to be displayed on failure + Arguments to be used in formatting the message + + + + Assert that an array, list or other collection is empty + + An array, list or other collection implementing IEnumerable + The message to be displayed on failure + + + + Assert that an array,list or other collection is empty + + An array, list or other collection implementing IEnumerable + + + + Assert that an array, list or other collection is ordered + + An array, list or other collection implementing IEnumerable + The message to be displayed on failure + Arguments to be used in formatting the message + + + + Assert that an array, list or other collection is ordered + + An array, list or other collection implementing IEnumerable + The message to be displayed on failure + + + + Assert that an array, list or other collection is ordered + + An array, list or other collection implementing IEnumerable + + + + Assert that an array, list or other collection is ordered + + An array, list or other collection implementing IEnumerable + A custom comparer to perform the comparisons + The message to be displayed on failure + Arguments to be used in formatting the message + + + + Assert that an array, list or other collection is ordered + + An array, list or other collection implementing IEnumerable + A custom comparer to perform the comparisons + The message to be displayed on failure + + + + Assert that an array, list or other collection is ordered + + An array, list or other collection implementing IEnumerable + A custom comparer to perform the comparisons + + + + Static helper class used in the constraint-based syntax + + + + + Creates a new SubstringConstraint + + The value of the substring + A SubstringConstraint + + + + Creates a new CollectionContainsConstraint. + + The item that should be found. + A new CollectionContainsConstraint + + + + Summary description for DirectoryAssert + + + + + The Equals method throws an AssertionException. This is done + to make sure there is no mistake by calling this function. + + + + + + + override the default ReferenceEquals to throw an AssertionException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + + + + + + We don't actually want any instances of this object, but some people + like to inherit from it to add other static methods. Hence, the + protected constructor disallows any instances of this object. + + + + + Verifies that two directories are equal. Two directories are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Verifies that two directories are equal. Two directories are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + The message to display if directories are not equal + + + + Verifies that two directories are equal. Two directories are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + + + + Verifies that two directories are equal. Two directories are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + A directory path string containing the value that is expected + A directory path string containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Verifies that two directories are equal. Two directories are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + A directory path string containing the value that is expected + A directory path string containing the actual value + The message to display if directories are not equal + + + + Verifies that two directories are equal. Two directories are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + A directory path string containing the value that is expected + A directory path string containing the actual value + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + The message to display if directories are not equal + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + A directory containing the value that is expected + A directory containing the actual value + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + A directory path string containing the value that is expected + A directory path string containing the actual value + The message to display if directories are equal + Arguments to be used in formatting the message + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + A directory path string containing the value that is expected + A directory path string containing the actual value + The message to display if directories are equal + + + + Asserts that two directories are not equal. If they are equal + an is thrown. + + A directory path string containing the value that is expected + A directory path string containing the actual value + + + + Asserts that the directory is empty. If it is not empty + an is thrown. + + A directory to search + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that the directory is empty. If it is not empty + an is thrown. + + A directory to search + The message to display if directories are not equal + + + + Asserts that the directory is empty. If it is not empty + an is thrown. + + A directory to search + + + + Asserts that the directory is empty. If it is not empty + an is thrown. + + A directory to search + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that the directory is empty. If it is not empty + an is thrown. + + A directory to search + The message to display if directories are not equal + + + + Asserts that the directory is empty. If it is not empty + an is thrown. + + A directory to search + + + + Asserts that the directory is not empty. If it is empty + an is thrown. + + A directory to search + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that the directory is not empty. If it is empty + an is thrown. + + A directory to search + The message to display if directories are not equal + + + + Asserts that the directory is not empty. If it is empty + an is thrown. + + A directory to search + + + + Asserts that the directory is not empty. If it is empty + an is thrown. + + A directory to search + The message to display if directories are not equal + Arguments to be used in formatting the message + + + + Asserts that the directory is not empty. If it is empty + an is thrown. + + A directory to search + The message to display if directories are not equal + + + + Asserts that the directory is not empty. If it is empty + an is thrown. + + A directory to search + + + + Asserts that path contains actual as a subdirectory or + an is thrown. + + A directory to search + sub-directory asserted to exist under directory + The message to display if directory is not within the path + Arguments to be used in formatting the message + + + + Asserts that path contains actual as a subdirectory or + an is thrown. + + A directory to search + sub-directory asserted to exist under directory + The message to display if directory is not within the path + + + + Asserts that path contains actual as a subdirectory or + an is thrown. + + A directory to search + sub-directory asserted to exist under directory + + + + Asserts that path contains actual as a subdirectory or + an is thrown. + + A directory to search + sub-directory asserted to exist under directory + The message to display if directory is not within the path + Arguments to be used in formatting the message + + + + Asserts that path contains actual as a subdirectory or + an is thrown. + + A directory to search + sub-directory asserted to exist under directory + The message to display if directory is not within the path + + + + Asserts that path contains actual as a subdirectory or + an is thrown. + + A directory to search + sub-directory asserted to exist under directory + + + + Asserts that path does not contain actual as a subdirectory or + an is thrown. + + A directory to search + sub-directory asserted to exist under directory + The message to display if directory is not within the path + Arguments to be used in formatting the message + + + + Asserts that path does not contain actual as a subdirectory or + an is thrown. + + A directory to search + sub-directory asserted to exist under directory + The message to display if directory is not within the path + + + + Asserts that path does not contain actual as a subdirectory or + an is thrown. + + A directory to search + sub-directory asserted to exist under directory + + + + Asserts that path does not contain actual as a subdirectory or + an is thrown. + + A directory to search + sub-directory asserted to exist under directory + The message to display if directory is not within the path + Arguments to be used in formatting the message + + + + Asserts that path does not contain actual as a subdirectory or + an is thrown. + + A directory to search + sub-directory asserted to exist under directory + The message to display if directory is not within the path + + + + Asserts that path does not contain actual as a subdirectory or + an is thrown. + + A directory to search + sub-directory asserted to exist under directory + + + + Summary description for FileAssert. + + + + + The Equals method throws an AssertionException. This is done + to make sure there is no mistake by calling this function. + + + + + + + override the default ReferenceEquals to throw an AssertionException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + + + + + + We don't actually want any instances of this object, but some people + like to inherit from it to add other static methods. Hence, the + protected constructor disallows any instances of this object. + + + + + Verifies that two Streams are equal. Two Streams are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The expected Stream + The actual Stream + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Verifies that two Streams are equal. Two Streams are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The expected Stream + The actual Stream + The message to display if objects are not equal + + + + Verifies that two Streams are equal. Two Streams are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The expected Stream + The actual Stream + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + A file containing the value that is expected + A file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + A file containing the value that is expected + A file containing the actual value + The message to display if objects are not equal + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + A file containing the value that is expected + A file containing the actual value + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + The message to display if objects are not equal + + + + Verifies that two files are equal. Two files are considered + equal if both are null, or if both have the same value byte for byte. + If they are not equal an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + + + + Asserts that two Streams are not equal. If they are equal + an is thrown. + + The expected Stream + The actual Stream + The message to be displayed when the two Stream are the same. + Arguments to be used in formatting the message + + + + Asserts that two Streams are not equal. If they are equal + an is thrown. + + The expected Stream + The actual Stream + The message to be displayed when the Streams are the same. + + + + Asserts that two Streams are not equal. If they are equal + an is thrown. + + The expected Stream + The actual Stream + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + A file containing the value that is expected + A file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + A file containing the value that is expected + A file containing the actual value + The message to display if objects are not equal + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + A file containing the value that is expected + A file containing the actual value + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + The message to display if Streams are not equal + Arguments to be used in formatting the message + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + The message to display if objects are not equal + + + + Asserts that two files are not equal. If they are equal + an is thrown. + + The path to a file containing the value that is expected + The path to a file containing the actual value + + + + GlobalSettings is a place for setting default values used + by the framework in performing asserts. + + + + + Default tolerance for floating point equality + + + + + Helper class with properties and methods that supply + a number of constraints used in Asserts. + + + + + Returns a new PropertyConstraintExpression, which will either + test for the existence of the named property on the object + being tested or apply any following constraint to that property. + + + + + Returns a new AttributeConstraint checking for the + presence of a particular attribute on an object. + + + + + Returns a new AttributeConstraint checking for the + presence of a particular attribute on an object. + + + + + Returns a new CollectionContainsConstraint checking for the + presence of a particular object in the collection. + + + + + Returns a ConstraintExpression that negates any + following constraint. + + + + + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if all of them succeed. + + + + + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if at least one of them succeeds. + + + + + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if all of them fail. + + + + + Returns a new ConstraintExpression, which will apply the following + constraint to the Length property of the object being tested. + + + + + Returns a new ConstraintExpression, which will apply the following + constraint to the Count property of the object being tested. + + + + + Returns a new ConstraintExpression, which will apply the following + constraint to the Message property of the object being tested. + + + + + Returns a new ConstraintExpression, which will apply the following + constraint to the InnerException property of the object being tested. + + + + + Interface implemented by a user fixture in order to + validate any expected exceptions. It is only called + for test methods marked with the ExpectedException + attribute. + + + + + Method to handle an expected exception + + The exception to be handled + + + + Helper class with properties and methods that supply + a number of constraints used in Asserts. + + + + + Returns a constraint that tests two items for equality + + + + + Returns a constraint that tests that two references are the same object + + + + + Returns a constraint that tests whether the + actual value is greater than the suppled argument + + + + + Returns a constraint that tests whether the + actual value is greater than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is greater than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than or equal to the suppled argument + + + + + Returns a constraint that tests whether the + actual value is less than or equal to the suppled argument + + + + + Returns a constraint that tests whether the actual + value is of the exact type supplied as an argument. + + + + + Returns a constraint that tests whether the actual + value is of the exact type supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is of the type supplied as an argument or a derived type. + + + + + Returns a constraint that tests whether the actual value + is of the type supplied as an argument or a derived type. + + + + + Returns a constraint that tests whether the actual value + is of the type supplied as an argument or a derived type. + + + + + Returns a constraint that tests whether the actual value + is of the type supplied as an argument or a derived type. + + + + + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is assignable from the type supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is a collection containing the same elements as the + collection supplied as an argument. + + + + + Returns a constraint that tests whether the actual value + is a subset of the collection supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value starts with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value ends with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value matches the Regex pattern supplied as an argument. + + + + + Returns a constraint that tests whether the path provided + is the same as an expected path after canonicalization. + + + + + Returns a constraint that tests whether the path provided + is the same path or under an expected path after canonicalization. + + + + + Returns a constraint that tests whether the path provided + is the same path or under an expected path after canonicalization. + + + + + Returns a constraint that tests whether the actual value falls + within a specified range. + + + + + Returns a ConstraintExpression that negates any + following constraint. + + + + + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if all of them succeed. + + + + + Returns a constraint that tests for null + + + + + Returns a constraint that tests for True + + + + + Returns a constraint that tests for False + + + + + Returns a constraint that tests for NaN + + + + + Returns a constraint that tests for empty + + + + + Returns a constraint that tests whether a collection + contains all unique items. + + + + + Returns a constraint that tests whether an object graph is serializable in binary format. + + + + + Returns a constraint that tests whether an object graph is serializable in xml format. + + + + + Returns a constraint that tests whether a collection is ordered + + + + + The Iz class is a synonym for Is intended for use in VB, + which regards Is as a keyword. + + + + + The List class is a helper class with properties and methods + that supply a number of constraints used with lists and collections. + + + + + List.Map returns a ListMapper, which can be used to map + the original collection to another collection. + + + + + + + ListMapper is used to transform a collection used as an actual argument + producing another collection to be used in the assertion. + + + + + Construct a ListMapper based on a collection + + The collection to be transformed + + + + Produces a collection containing all the values of a property + + The collection of property values + + + + + Randomizer returns a set of random values in a repeatable + way, to allow re-running of tests if necessary. + + + + + Get a randomizer for a particular member, returning + one that has already been created if it exists. + This ensures that the same values are generated + each time the tests are reloaded. + + + + + Get a randomizer for a particular parameter, returning + one that has already been created if it exists. + This ensures that the same values are generated + each time the tests are reloaded. + + + + + Construct a randomizer using a random seed + + + + + Construct a randomizer using a specified seed + + + + + Return an array of random doubles between 0.0 and 1.0. + + + + + + + Return an array of random doubles with values in a specified range. + + + + + Return an array of random ints with values in a specified range. + + + + + Get a random seed for use in creating a randomizer. + + + + + The SpecialValue enum is used to represent TestCase arguments + that cannot be used as arguments to an Attribute. + + + + + Null represents a null value, which cannot be used as an + argument to an attriute under .NET 1.x + + + + + Basic Asserts on strings. + + + + + The Equals method throws an AssertionException. This is done + to make sure there is no mistake by calling this function. + + + + + + + override the default ReferenceEquals to throw an AssertionException. This + implementation makes sure there is no mistake in calling this function + as part of Assert. + + + + + + + Asserts that a string is found within another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string is found within another string. + + The expected string + The string to be examined + The message to display in case of failure + + + + Asserts that a string is found within another string. + + The expected string + The string to be examined + + + + Asserts that a string is not found within another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string is found within another string. + + The expected string + The string to be examined + The message to display in case of failure + + + + Asserts that a string is found within another string. + + The expected string + The string to be examined + + + + Asserts that a string starts with another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string starts with another string. + + The expected string + The string to be examined + The message to display in case of failure + + + + Asserts that a string starts with another string. + + The expected string + The string to be examined + + + + Asserts that a string does not start with another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string does not start with another string. + + The expected string + The string to be examined + The message to display in case of failure + + + + Asserts that a string does not start with another string. + + The expected string + The string to be examined + + + + Asserts that a string ends with another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string ends with another string. + + The expected string + The string to be examined + The message to display in case of failure + + + + Asserts that a string ends with another string. + + The expected string + The string to be examined + + + + Asserts that a string does not end with another string. + + The expected string + The string to be examined + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string does not end with another string. + + The expected string + The string to be examined + The message to display in case of failure + + + + Asserts that a string does not end with another string. + + The expected string + The string to be examined + + + + Asserts that two strings are equal, without regard to case. + + The expected string + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that two strings are equal, without regard to case. + + The expected string + The actual string + The message to display in case of failure + + + + Asserts that two strings are equal, without regard to case. + + The expected string + The actual string + + + + Asserts that two strings are not equal, without regard to case. + + The expected string + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that two strings are Notequal, without regard to case. + + The expected string + The actual string + The message to display in case of failure + + + + Asserts that two strings are not equal, without regard to case. + + The expected string + The actual string + + + + Asserts that a string matches an expected regular expression pattern. + + The regex pattern to be matched + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string matches an expected regular expression pattern. + + The regex pattern to be matched + The actual string + The message to display in case of failure + + + + Asserts that a string matches an expected regular expression pattern. + + The regex pattern to be matched + The actual string + + + + Asserts that a string does not match an expected regular expression pattern. + + The regex pattern to be used + The actual string + The message to display in case of failure + Arguments used in formatting the message + + + + Asserts that a string does not match an expected regular expression pattern. + + The regex pattern to be used + The actual string + The message to display in case of failure + + + + Asserts that a string does not match an expected regular expression pattern. + + The regex pattern to be used + The actual string + + + + The TestCaseData class represents a set of arguments + and other parameter info to be used for a parameterized + test case. It provides a number of instance modifiers + for use in initializing the test case. + + Note: Instance modifiers are getters that return + the same instance after modifying it's state. + + + + + The argument list to be provided to the test + + + + + The expected result to be returned + + + + + The expected exception Type + + + + + The FullName of the expected exception + + + + + The name to be used for the test + + + + + The description of the test + + + + + A dictionary of properties, used to add information + to tests without requiring the class to change. + + + + + If true, indicates that the test case is to be ignored + + + + + The reason for ignoring a test case + + + + + Initializes a new instance of the class. + + The arguments. + + + + Initializes a new instance of the class. + + The argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + + + + Initializes a new instance of the class. + + The first argument. + The second argument. + The third argument. + + + + Sets the expected result for the test + + The expected result + A modified TestCaseData + + + + Sets the expected exception type for the test + + Type of the expected exception. + The modified TestCaseData instance + + + + Sets the expected exception type for the test + + FullName of the expected exception. + The modified TestCaseData instance + + + + Sets the name of the test case + + The modified TestCaseData instance + + + + Sets the description for the test case + being constructed. + + The description. + The modified TestCaseData instance. + + + + Applies a category to the test + + + + + + + Applies a named property to the test + + + + + + + + Applies a named property to the test + + + + + + + + Applies a named property to the test + + + + + + + + Ignores this TestCase. + + + + + + Ignores this TestCase, specifying the reason. + + The reason. + + + + + Gets the argument list to be provided to the test + + + + + Gets the expected result + + + + + Gets the expected exception Type + + + + + Gets the FullName of the expected exception + + + + + Gets the name to be used for the test + + + + + Gets the description of the test + + + + + Gets a value indicating whether this is ignored. + + true if ignored; otherwise, false. + + + + Gets the ignore reason. + + The ignore reason. + + + + Gets a list of categories associated with this test. + + + + + Gets the property dictionary for this test + + + + + Provide the context information of the current test + + + + + Get the current test context. This is created + as needed. The user may save the context for + use within a test, but it should not be used + outside the test for which it is created. + + + + + TestAdapter adapts a Test for consumption by + the user test code. + + + + + The name of the test. + + + + + The FullName of the test + + + + + The properties of the test. + + + + + ResultAdapter adapts a TestResult for consumption by + the user test code. + + + + + Construct a ResultAdapter for a TestResult + + The TestResult to be adapted + + + + The TestState of current test. This maps to the ResultState + used in nunit.core and is subject to change in the future. + + + + + The TestStatus of current test. This enum will be used + in future versions of NUnit and so is to be preferred + to the TestState value. + + + + + The ResultState enum indicates the result of running a test + + + + + The result is inconclusive + + + + + The test was not runnable. + + + + + The test has been skipped. + + + + + The test has been ignored. + + + + + The test succeeded + + + + + The test failed + + + + + The test encountered an unexpected exception + + + + + The test was cancelled by the user + + + + + The TestStatus enum indicates the result of running a test + + + + + The test was inconclusive + + + + + The test has skipped + + + + + The test succeeded + + + + + The test failed + + + + + Helper class with static methods used to supply constraints + that operate on strings. + + + + + Returns a constraint that succeeds if the actual + value contains the substring supplied as an argument. + + + + + Returns a constraint that fails if the actual + value contains the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value starts with the substring supplied as an argument. + + + + + Returns a constraint that fails if the actual + value starts with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value ends with the substring supplied as an argument. + + + + + Returns a constraint that fails if the actual + value ends with the substring supplied as an argument. + + + + + Returns a constraint that succeeds if the actual + value matches the Regex pattern supplied as an argument. + + + + + Returns a constraint that fails if the actual + value matches the pattern supplied as an argument. + + + + + Returns a ConstraintExpression, which will apply + the following constraint to all members of a collection, + succeeding if all of them succeed. + + + + + TextMessageWriter writes constraint descriptions and messages + in displayable form as a text stream. It tailors the display + of individual message components to form the standard message + format of NUnit assertion failure messages. + + + + + Prefix used for the expected value line of a message + + + + + Prefix used for the actual value line of a message + + + + + Length of a message prefix + + + + + Construct a TextMessageWriter + + + + + Construct a TextMessageWriter, specifying a user message + and optional formatting arguments. + + + + + + + Method to write single line message with optional args, usually + written to precede the general failure message, at a givel + indentation level. + + The indentation level of the message + The message to be written + Any arguments used in formatting the message + + + + Display Expected and Actual lines for a constraint. This + is called by MessageWriter's default implementation of + WriteMessageTo and provides the generic two-line display. + + The constraint that failed + + + + Display Expected and Actual lines for given values. This + method may be called by constraints that need more control over + the display of actual and expected values than is provided + by the default implementation. + + The expected value + The actual value causing the failure + + + + Display Expected and Actual lines for given values, including + a tolerance value on the expected line. + + The expected value + The actual value causing the failure + The tolerance within which the test was made + + + + Display the expected and actual string values on separate lines. + If the mismatch parameter is >=0, an additional line is displayed + line containing a caret that points to the mismatch point. + + The expected string value + The actual string value + The point at which the strings don't match or -1 + If true, case is ignored in string comparisons + If true, clip the strings to fit the max line length + + + + Writes the text for a connector. + + The connector. + + + + Writes the text for a predicate. + + The predicate. + + + + Write the text for a modifier. + + The modifier. + + + + Writes the text for an expected value. + + The expected value. + + + + Writes the text for an actual value. + + The actual value. + + + + Writes the text for a generalized value. + + The value. + + + + Writes the text for a collection value, + starting at a particular point, to a max length + + The collection containing elements to write. + The starting point of the elements to write + The maximum number of elements to write + + + + Write the generic 'Expected' line for a constraint + + The constraint that failed + + + + Write the generic 'Expected' line for a given value + + The expected value + + + + Write the generic 'Expected' line for a given value + and tolerance. + + The expected value + The tolerance within which the test was made + + + + Write the generic 'Actual' line for a constraint + + The constraint for which the actual value is to be written + + + + Write the generic 'Actual' line for a given value + + The actual value causing a failure + + + + Gets or sets the maximum line length for this writer + + + + + Helper class with properties and methods that supply + constraints that operate on exceptions. + + + + + Creates a constraint specifying the exact type of exception expected + + + + + Creates a constraint specifying the exact type of exception expected + + + + + Creates a constraint specifying the type of exception expected + + + + + Creates a constraint specifying the type of exception expected + + + + + Creates a constraint specifying an expected exception + + + + + Creates a constraint specifying an exception with a given InnerException + + + + + Creates a constraint specifying an expected TargetInvocationException + + + + + Creates a constraint specifying an expected TargetInvocationException + + + + + Creates a constraint specifying an expected TargetInvocationException + + + + + Creates a constraint specifying that no exception is thrown + + + + diff --git a/tools/nant/NAnt.CompressionTasks.xml b/tools/nant/NAnt.CompressionTasks.xml index bd8a307ccea..51e4b7d9056 100644 --- a/tools/nant/NAnt.CompressionTasks.xml +++ b/tools/nant/NAnt.CompressionTasks.xml @@ -1,10 +1,10 @@ - - - - NAnt.CompressionTasks - - - + + + + NAnt.CompressionTasks + + + Expands a file packed using GZip compression. @@ -16,23 +16,23 @@ ]]> - - + + Extracts the file from the gzip archive. - - + + The file to expand. - - + + The destination file. - - + + Creates a tar file from the specified filesets. @@ -57,54 +57,54 @@ ]]> - - + + Creates the tar file. - - + + The tar file to create. - - + + Include empty directories in the generated tar file. The default is . - - + + The set of files to be included in the archive. - - - - The compression method. The default is . - - - - - Specifies the compression methods supported by . - - - + + + + The compression method. The default is . + + + + + Specifies the compression methods supported by . + + + No compression. - - + + GZIP compression. - - + + BZIP2 compression. - - + + Extracts files from a zip file. @@ -122,66 +122,66 @@ ]]> - - + + Extracts the files from the zip file. - - - - Extracts a file entry from the specified stream. - - The containing the compressed entry. - The name of the entry including directory information. - The date of the entry. - The uncompressed size of the entry. - - The destination directory for the entry could not be created. - -or- - The entry could not be extracted. - - - We cannot rely on the fact that the directory entry of a given file - is created before the file is extracted, so we should create the - directory if it doesn't yet exist. - - - - - Extracts a directory entry from the specified stream. - - The containing the directory entry. - The name of the directory entry. - The date of the entry. - - The destination directory for the entry could not be created. - - - + + + + Extracts a file entry from the specified stream. + + The containing the compressed entry. + The name of the entry including directory information. + The date of the entry. + The uncompressed size of the entry. + + The destination directory for the entry could not be created. + -or- + The entry could not be extracted. + + + We cannot rely on the fact that the directory entry of a given file + is created before the file is extracted, so we should create the + directory if it doesn't yet exist. + + + + + Extracts a directory entry from the specified stream. + + The containing the directory entry. + The name of the directory entry. + The date of the entry. + + The destination directory for the entry could not be created. + + + The archive file to expand. - - + + The directory where the expanded files should be stored. The default is the project base directory. - - + + Overwrite files, even if they are newer than the corresponding entries in the archive. The default is . - - + + The character encoding that has been used for filenames inside the zip file. The default is the system's OEM code page. - - + + Creates a zip file from the specified filesets. @@ -209,236 +209,236 @@ ]]> - - + + Creates the zip file. - - + + The zip file to create. - - + + The comment for the file. - - + + Date/time stamp for the files in the format MM/DD/YYYY HH:MM:SS. - - + + Desired level of compression. Possible values are 0 (STORE only) to 9 (highest). The default is 6. - - + + Include empty directories in the generated zip file. The default is . - - + + The set of files to be included in the archive. - - - - Specifies the behaviour when a duplicate file is found. The default - is . - - - + + + + Specifies the behaviour when a duplicate file is found. The default + is . + + + The character encoding to use for filenames and comment inside the zip file. The default is the system's OEM code page. - - + + Specifies how entries with the same name should be processed. - - + + Overwrite existing entry with same name. - - + + Preserve existing entry with the same name. - - + + Report failure when two entries have the same name. - - - - A is a with extra - attributes useful in the context of the . - - - + + + + A is a with extra + attributes useful in the context of the . + + + A 3 digit octal string, specify the user, group and other modes in the standard Unix fashion. Only applies to plain files. The default is 644. - - + + A 3 digit octal string, specify the user, group and other modes in the standard Unix fashion. Only applies to directories. The default is 755. - - + + The username for the tar entry. - - + + The user identifier (UID) for the tar entry. - - + + The groupname for the tar entry. - - + + The group identifier (GID) for the tar entry. - - + + The top level directory prefix. If set, all file and directory paths in the fileset will have this value prepended. Can either be a single directory name or a "/" separated path. - - - - Contains a collection of elements. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with the specified instance. - - - - - Initializes a new instance of the class - with the specified array of instances. - - - - - Adds a to the end of the collection. - - The to be added to the end of the collection. - The position into which the new element was inserted. - - - - Adds the elements of a array to the end of the collection. - - The array of elements to be added to the end of the collection. - - - - Adds the elements of a to the end of the collection. - - The to be added to the end of the collection. - - - - Determines whether a is in the collection. - - The to locate in the collection. - - if is found in the - collection; otherwise, . - - - + + + + Contains a collection of elements. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with the specified instance. + + + + + Initializes a new instance of the class + with the specified array of instances. + + + + + Adds a to the end of the collection. + + The to be added to the end of the collection. + The position into which the new element was inserted. + + + + Adds the elements of a array to the end of the collection. + + The array of elements to be added to the end of the collection. + + + + Adds the elements of a to the end of the collection. + + The to be added to the end of the collection. + + + + Determines whether a is in the collection. + + The to locate in the collection. + + if is found in the + collection; otherwise, . + + + Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. The zero-based index in at which copying begins. - - - - Retrieves the index of a specified object in the collection. - - The object for which the index is returned. - - The index of the specified . If the is not currently a member of the collection, it returns -1. - - - - - Inserts a into the collection at the specified index. - - The zero-based index at which should be inserted. - The to insert. - - - - Returns an enumerator that can iterate through the collection. - - - A for the entire collection. - - - - - Removes a member from the collection. - - The to remove from the collection. - - + + + + Retrieves the index of a specified object in the collection. + + The object for which the index is returned. + + The index of the specified . If the is not currently a member of the collection, it returns -1. + + + + + Inserts a into the collection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + + + Returns an enumerator that can iterate through the collection. + + + A for the entire collection. + + + + + Removes a member from the collection. + + The to remove from the collection. + + Gets or sets the element at the specified index. The zero-based index of the element to get or set. - - + + Get the total number of files that are represented by the filesets in this collection. - - - - Enumerates the elements of a . - - - - - Initializes a new instance of the class - with the specified . - - The collection that should be enumerated. - - + + + + Enumerates the elements of a . + + + + + Initializes a new instance of the class + with the specified . + + The collection that should be enumerated. + + Advances the enumerator to the next element of the collection. @@ -447,147 +447,147 @@ to the next element; if the enumerator has passed the end of the collection. - - + + Sets the enumerator to its initial position, which is before the first element in the collection. - - + + Gets the current element in the collection. The current element in the collection. - - - - A is a with extra - attributes useful in the context of the . - - - + + + + A is a with extra + attributes useful in the context of the . + + + The top level directory prefix. If set, all file and directory paths in the fileset will have this value prepended. Can either be a single directory name or a "/" separated path. - - - - Contains a collection of elements. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with the specified instance. - - - - - Initializes a new instance of the class - with the specified array of instances. - - - - - Adds a to the end of the collection. - - The to be added to the end of the collection. - The position into which the new element was inserted. - - - - Adds the elements of a array to the end of the collection. - - The array of elements to be added to the end of the collection. - - - - Adds the elements of a to the end of the collection. - - The to be added to the end of the collection. - - - - Determines whether a is in the collection. - - The to locate in the collection. - - if is found in the - collection; otherwise, . - - - + + + + Contains a collection of elements. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with the specified instance. + + + + + Initializes a new instance of the class + with the specified array of instances. + + + + + Adds a to the end of the collection. + + The to be added to the end of the collection. + The position into which the new element was inserted. + + + + Adds the elements of a array to the end of the collection. + + The array of elements to be added to the end of the collection. + + + + Adds the elements of a to the end of the collection. + + The to be added to the end of the collection. + + + + Determines whether a is in the collection. + + The to locate in the collection. + + if is found in the + collection; otherwise, . + + + Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. The zero-based index in at which copying begins. - - - - Retrieves the index of a specified object in the collection. - - The object for which the index is returned. - - The index of the specified . If the is not currently a member of the collection, it returns -1. - - - - - Inserts a into the collection at the specified index. - - The zero-based index at which should be inserted. - The to insert. - - - - Returns an enumerator that can iterate through the collection. - - - A for the entire collection. - - - - - Removes a member from the collection. - - The to remove from the collection. - - + + + + Retrieves the index of a specified object in the collection. + + The object for which the index is returned. + + The index of the specified . If the is not currently a member of the collection, it returns -1. + + + + + Inserts a into the collection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + + + Returns an enumerator that can iterate through the collection. + + + A for the entire collection. + + + + + Removes a member from the collection. + + The to remove from the collection. + + Gets or sets the element at the specified index. The zero-based index of the element to get or set. - - + + Get the total number of files that are represented by the filesets in this collection. - - - - Enumerates the elements of a . - - - - - Initializes a new instance of the class - with the specified . - - The collection that should be enumerated. - - + + + + Enumerates the elements of a . + + + + + Initializes a new instance of the class + with the specified . + + The collection that should be enumerated. + + Advances the enumerator to the next element of the collection. @@ -596,20 +596,20 @@ to the next element; if the enumerator has passed the end of the collection. - - + + Sets the enumerator to its initial position, which is before the first element in the collection. - - + + Gets the current element in the collection. The current element in the collection. - - - + + + diff --git a/tools/nant/NAnt.Core.xml b/tools/nant/NAnt.Core.xml index abfbe9264a9..3ddb6cd8af2 100644 --- a/tools/nant/NAnt.Core.xml +++ b/tools/nant/NAnt.Core.xml @@ -1,41 +1,41 @@ - - - - NAnt.Core - - - - - Used to indicate that a property should be able to be converted into a - . - - - + + + + NAnt.Core + + + + + Used to indicate that a property should be able to be converted into a + . + + + Base class for all validator attributes. - - - - Validates the specified value. - - The value to be validated. - The validation fails. - - - - Initializes a new instance of the - class. - - - - - Checks if the specified value can be converted to a . - - The value to be checked. - cannot be converted to a . - - + + + + Validates the specified value. + + The value to be validated. + The validation fails. + + + + Initializes a new instance of the + class. + + + + + Checks if the specified value can be converted to a . + + The value to be checked. + cannot be converted to a . + + Indicates that property should be treated as a XML attribute for the task. @@ -80,25 +80,25 @@ #endregion Private Instance Fields - - - - Initializes a new instance of the with the - specified name. - - The name of the attribute. - is . - is a zero-length . - - + + + + Initializes a new instance of the with the + specified name. + + The name of the attribute. + is . + is a zero-length . + + Gets or sets the name of the XML attribute. The name of the XML attribute. - - + + Gets or sets a value indicating whether the attribute is required. @@ -106,8 +106,8 @@ if the attribute is required; otherwise, . The default is . - - + + Gets or sets a value indicating whether property references should be expanded. @@ -116,8 +116,8 @@ if properties should be expanded; otherwise . The default is . - - + + Used to specify how this attribute will be handled as the XML is parsed and given to the element. @@ -126,8 +126,8 @@ if XML should be processed; otherwise . The default is . - - + + Indicates that property should be treated as a XML arrayList @@ -150,8 +150,8 @@ - - + + Indicates that the property should be treated as an XML element and further processing should be done. @@ -170,25 +170,25 @@ - - - - Initializes a new instance of the with the - specified name. - - The name of the attribute. - is . - is a zero-length . - - + + + + Initializes a new instance of the with the + specified name. + + The name of the attribute. + is . + is a zero-length . + + Gets or sets the name of the attribute. The name of the attribute. - - + + Gets or sets a value indicating whether the attribute is required. @@ -196,8 +196,8 @@ if the attribute is required; otherwise, . The default is . - - + + Used to specify how this element will be handled as the XML is parsed and given to the element. @@ -206,35 +206,35 @@ if XML should be processed; otherwise . The default is . - - - - Initializes a new instance of the - with the specified name. - - The name of the attribute. - is . - is a zero-length . - - - - Gets or sets the type of objects that this container holds. - - - The type of the elements that this container holds. - - - - This can be used for validation and schema generation. - - - If not specified, the type of the elements will be determined using - reflection. - - - is . - - + + + + Initializes a new instance of the + with the specified name. + + The name of the attribute. + is . + is a zero-length . + + + + Gets or sets the type of objects that this container holds. + + + The type of the elements that this container holds. + + + + This can be used for validation and schema generation. + + + If not specified, the type of the elements will be determined using + reflection. + + + is . + + Indicates that the property should be treated as a container for a collection of build elements. @@ -260,18 +260,18 @@ - - - - Initializes a new instance of the with the - specified name and child element name. - - The name of the collection. - The name of the child elements in the collection - is . - is a zero-length . - - + + + + Initializes a new instance of the with the + specified name and child element name. + + The name of the collection. + The name of the child elements in the collection + is . + is a zero-length . + + The name of the child element within the collection. @@ -281,27 +281,27 @@ This can be used for validation and schema generation. - - - - Used to indicate that a property should be able to be converted into a - . - - - - - Initializes a new instance of the - class. - - - - - Checks if the specified value can be converted to a . - - The value to be checked. - cannot be converted to a . - - + + + + Used to indicate that a property should be able to be converted into a + . + + + + + Initializes a new instance of the + class. + + + + + Checks if the specified value can be converted to a . + + The value to be checked. + cannot be converted to a . + + Indicates that class should be treated as a NAnt element. @@ -310,40 +310,40 @@ to recognize it. The name should be short but must not confict with any other element already in use. - - - - Initializes a new instance of the - with the specified name. - - The name of the element. - is . - is a zero-length . - - + + + + Initializes a new instance of the + with the specified name. + + The name of the element. + is . + is a zero-length . + + Gets or sets the name of the element. The name of the element. - - + + Indicates that a property should be treated as a XML file set for the task. - - - - Initializes a new instance of the with the - specified name. - - The name of the attribute. - is . - is a zero-length . - - + + + + Initializes a new instance of the with the + specified name. + + The name of the attribute. + is . + is a zero-length . + + Indicates that the value of the property to which the attribute is assigned, can be configured on the framework-level in the NAnt application @@ -362,23 +362,23 @@ } - - - - Initializes a new instance of the - with the specified attribute name. - - The name of the framework configuration attribute. - is a . - is a zero-length . - - + + + + Initializes a new instance of the + with the specified attribute name. + + The name of the framework configuration attribute. + is a . + is a zero-length . + + Gets or sets the name of the framework configuration attribute. The name of the framework configuration attribute. - - + + Gets or sets a value indicating whether the configuration attribute is required. @@ -387,8 +387,8 @@ if the configuration attribute is required; otherwise, . The default is . - - + + Gets or sets a value indicating whether property references should be expanded. @@ -397,62 +397,62 @@ if properties should be expanded; otherwise . The default is . - - - - Indicates that the method should be exposed as a function in NAnt build - files. - - - Attach this attribute to a method of a class that derives from - to have NAnt be able to recognize it. - - - - - Initializes a new instance of the - class with the specified name. - - The name of the function. - is . - is a zero-length . - - + + + + Indicates that the method should be exposed as a function in NAnt build + files. + + + Attach this attribute to a method of a class that derives from + to have NAnt be able to recognize it. + + + + + Initializes a new instance of the + class with the specified name. + + The name of the function. + is . + is a zero-length . + + Gets or sets the name of the function. The name of the function. - - - - Indicates that class should be treated as a set of functions. - - - Attach this attribute to a class that derives from - to have NAnt be able to recognize it as containing custom functions. - - - - - Initializes a new instance of the - class with the specified name. - - The prefix used to distinguish the functions. - The category of the functions. - - is . - -or- - is . - - - is a zero-length . - -or- - is a zero-length . - - - + + + + Indicates that class should be treated as a set of functions. + + + Attach this attribute to a class that derives from + to have NAnt be able to recognize it as containing custom functions. + + + + + Initializes a new instance of the + class with the specified name. + + The prefix used to distinguish the functions. + The category of the functions. + + is . + -or- + is . + + + is a zero-length . + -or- + is a zero-length . + + + Gets or sets the category of the function set. @@ -462,70 +462,70 @@ This will be displayed in the user docs. - - + + Gets or sets the prefix of all functions in this function set. The prefix of the functions in this function set. - - - - Indicates that property should be able to be converted into a - within the given range. - - - - - Initializes a new instance of the - class. - - - - - Initializes a new instance of the - class with the specied minimum and maximum values. - - The minimum value. - The maximum value. - - - - Checks whether the specified value can be converted to an - and whether the value lies within the range defined by the - and properties. - - The value to be checked. - - - cannot be converted to an . - - -or- - - is not in the range defined by - and . - - - - - - Gets or sets the minimum value. - - - The minimum value. The default is . - - - - - Gets or sets the maximum value. - - - The maximum value. The default is . - - - + + + + Indicates that property should be able to be converted into a + within the given range. + + + + + Initializes a new instance of the + class. + + + + + Initializes a new instance of the + class with the specied minimum and maximum values. + + The minimum value. + The maximum value. + + + + Checks whether the specified value can be converted to an + and whether the value lies within the range defined by the + and properties. + + The value to be checked. + + + cannot be converted to an . + + -or- + + is not in the range defined by + and . + + + + + + Gets or sets the minimum value. + + + The minimum value. The default is . + + + + + Gets or sets the maximum value. + + + The maximum value. The default is . + + + The base of the number to validate, which must be 2, 8, 10, or 16. @@ -535,76 +535,76 @@ The default is 10. - - + + Defines possible locations in which a task executable can be located. - - + + Locates the task executable in the current Framework directory. - - + + Locates the task executable in the current Framework SDK directory. - - - - Indicates the location that a task executable can be located in. - - - - When applied to a task deriving from , - the program to execute will first be searched for in the designated - location. - - - If the program does not exist in that location, and the file name is - not an absolute path then the list of tool paths of the current - target framework will be searched (in the order in which they are - defined in the NAnt configuration file). - - - - - - Initializes a new instance of the - with the specified location. - - The of the attribute. - - - - Gets or sets the of the task. - - - The location type of the task to which the attribute is assigned. - - - - - Used to indicate whether a property should allow - an empty string value or not. - - - - - Initializes a new instance of the - class. - - - - - Checks if the specified value adheres to the rules defined by the - properties of the . - - The value to be checked. - is an empty string value and is set to . - - + + + + Indicates the location that a task executable can be located in. + + + + When applied to a task deriving from , + the program to execute will first be searched for in the designated + location. + + + If the program does not exist in that location, and the file name is + not an absolute path then the list of tool paths of the current + target framework will be searched (in the order in which they are + defined in the NAnt configuration file). + + + + + + Initializes a new instance of the + with the specified location. + + The of the attribute. + + + + Gets or sets the of the task. + + + The location type of the task to which the attribute is assigned. + + + + + Used to indicate whether a property should allow + an empty string value or not. + + + + + Initializes a new instance of the + class. + + + + + Checks if the specified value adheres to the rules defined by the + properties of the . + + The value to be checked. + is an empty string value and is set to . + + Gets or sets a value indicating whether an empty string or should be a considered a valid value. @@ -614,23 +614,23 @@ should be considered a valid value; otherwise, . The default is . - - - - Gets or sets a regular expression. The string will be validated to - determine if it matches the expression. - - - - - - + + + + Gets or sets a regular expression. The string will be validated to + determine if it matches the expression. + + + + + + An optional error message that can be used to better describe the regular expression error. - - + + Indicates that property should be treated as a XML attribute for the task. @@ -657,17 +657,17 @@ Initialize. Just before ExecuteTask is called NAnt will expand all the macros with the current values. - - - - Initializes a new instance of the - with the specified attribute name. - - The name of the task attribute. - is a . - is a zero-length . - - + + + + Initializes a new instance of the + with the specified attribute name. + + The name of the task attribute. + is a . + is a zero-length . + + Indicates that class should be treated as a task. @@ -676,17 +676,17 @@ to recognize it. The name should be short but must not confict with any other task already in use. - - - - Initializes a new instance of the - with the specified name. - - The name of the task. - is . - is a zero-length . - - + + + + Initializes a new instance of the + with the specified name. + + The name of the task. + is . + is a zero-length . + + Models a NAnt XML element in the build file. @@ -696,29 +696,29 @@ applied to members in derived classes. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - from the specified element. - - The element that should be used to create a new instance of the class. - - - - Performs default initialization. - - - Derived classes that wish to add custom initialization should override - the method. - - - + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + from the specified element. + + The element that should be used to create a new instance of the class. + + + + Performs default initialization. + + + Derived classes that wish to add custom initialization should override + the method. + + + Logs a message with the given priority. @@ -727,52 +727,52 @@ The actual logging is delegated to the project. - - - - Logs a message with the given priority. - - The message priority at which the specified message is to be logged. - The message to log, containing zero or more format items. - An array containing zero or more objects to format. - - The actual logging is delegated to the project. - - - + + + + Logs a message with the given priority. + + The message priority at which the specified message is to be logged. + The message to log, containing zero or more format items. + An array containing zero or more objects to format. + + The actual logging is delegated to the project. + + + Derived classes should override to this method to provide extra initialization and validation not covered by the base class. The XML node of the element to use for initialization. - - - - Derived classes should override to this method to provide extra - initialization and validation not covered by the base class. - - - Access to the that was used to initialize - this is available through . - - - - - Copies all instance data of the to a given - . - - - + + + + Derived classes should override to this method to provide extra + initialization and validation not covered by the base class. + + + Access to the that was used to initialize + this is available through . + + + + + Copies all instance data of the to a given + . + + + Performs initialization using the given set of properties. - - + + Initializes all build attributes and child elements. - - + + Locates the XML node for the specified attribute in the project configuration node. @@ -790,78 +790,78 @@ configuration node can be located in that section, the framework-neutral section of the project configuration node will be searched. - - - - Returns the of the - assigned to the specified - . - - The of which the assigned should be retrieved. - - The assigned to the specified - or a null reference is no - is assigned to the . - - - - - Gets or sets the parent of the element. - - - The parent of the element. - - - This will be the parent , , or - depending on where the element is defined. - - - + + + + Returns the of the + assigned to the specified + . + + The of which the assigned should be retrieved. + + The assigned to the specified + or a null reference is no + is assigned to the . + + + + + Gets or sets the parent of the element. + + + The parent of the element. + + + This will be the parent , , or + depending on where the element is defined. + + + Gets the name of the XML element used to initialize this element. The name of the XML element used to initialize this element. - - - - Gets or sets the to which this element belongs. - - - The to which this element belongs. - - - - - Gets the properties local to this and the - . - - - The properties local to this and the . - - - - - Gets or sets the . - - - The . - - - The defines the current namespace - scope and provides methods for looking up namespace information. - - - + + + + Gets or sets the to which this element belongs. + + + The to which this element belongs. + + + + + Gets the properties local to this and the + . + + + The properties local to this and the . + + + + + Gets or sets the . + + + The . + + + The defines the current namespace + scope and provides methods for looking up namespace information. + + + Gets or sets the XML node of the element. The XML node of the element. - - + + Gets or sets the location in the build file where the element is defined. @@ -869,153 +869,153 @@ The location in the build file where the element is defined. - - - - Gets a value indicating whether the element is performing additional - processing using the that was used to - initialize the element. - - - . - - - - Elements that need to perform additional processing of the - that was used to initialize the element, should - override this property and return . - - - When , no build errors will be reported for - unknown nested build elements. - - - - - - Configures an using meta-data provided by - assigned attributes. - - - - - Initializes a new instance of the - class for the given . - - The for which an should be created. - The to initialize the with. - The to use for property expansion. - The framework that the should target. - - is . - -or- - is . - -or- - is . - - - - - Creates a child using property set/get methods. - - The instance that represents the property of the current class. - A representing the get accessor for the property. - A representing the set accessor for the property. - The used to initialize the new instance. - The collection of property values to use for macro expansion. - The from which to obtain framework-specific information. - The child. - - - - Creates an for the given - . - - The for which an should be created. - - An for the given . - - - - - Holds the that should be initialized. - - - - - Holds the that should be used to initialize - the . - - - + + + + Gets a value indicating whether the element is performing additional + processing using the that was used to + initialize the element. + + + . + + + + Elements that need to perform additional processing of the + that was used to initialize the element, should + override this property and return . + + + When , no build errors will be reported for + unknown nested build elements. + + + + + + Configures an using meta-data provided by + assigned attributes. + + + + + Initializes a new instance of the + class for the given . + + The for which an should be created. + The to initialize the with. + The to use for property expansion. + The framework that the should target. + + is . + -or- + is . + -or- + is . + + + + + Creates a child using property set/get methods. + + The instance that represents the property of the current class. + A representing the get accessor for the property. + A representing the set accessor for the property. + The used to initialize the new instance. + The collection of property values to use for macro expansion. + The from which to obtain framework-specific information. + The child. + + + + Creates an for the given + . + + The for which an should be created. + + An for the given . + + + + + Holds the that should be initialized. + + + + + Holds the that should be used to initialize + the . + + + Holds the dictionary that should be used for property expansion. - - - - Holds the framework that should be targeted by the - that we're configuring, or - if there's no current target - framework. - - - + + + + Holds the framework that should be targeted by the + that we're configuring, or + if there's no current target + framework. + + + Holds the names of the attributes that still need to be processed. - - + + Holds the names of the child nodes that still need to be processed. - - + + Holds the logger for the current class. - - - - Holds the cache of instances. - - - - - Gets the . - - - The . - - - The defines the current namespace - scope and provides methods for looking up namespace information. - - - + + + + Holds the cache of instances. + + + + + Gets the . + + + The . + + + The defines the current namespace + scope and provides methods for looking up namespace information. + + + Internal interface used for setting element attributes. - - - - Represents an explicitly named list of directories. - - - A is useful when you want to capture a list of - directories regardless whether they currently exist. - - - + + + + Represents an explicitly named list of directories. + + + A is useful when you want to capture a list of + directories regardless whether they currently exist. + + + The base of the directory of this dirlist. The default is the project base directory. - - + + Gets the collection of environment variables that should be passed to external programs that are launched. @@ -1026,87 +1026,87 @@ to external programs that are launched. - - + + The command-line arguments for the runtime engine. - - - - Represents an in which one or more extensions - are found. - - - - - Initializes a new instance of the - class for a given . - - The for which to construct an . - - - - Gets the containing extensions. - - - - - Initializes a instance of the - class for an extension in a given . - - The in which the extension is found. - is . - - - - Gets the in which the extension - was found. - - - - - Gets the from which the extension will - be created. - - - The containing the extension. - - - - - Initializes a new instance of the - with the specified type. - - The type of the to consume. - is . - - - - Responsible for scanning types for plugins, and maintaining a cache of - instances. - - - - - Scans a given for plugins. - - The containing the to scan. - The to scan. - The which will be used to output messages to the build log. - - if represents a - ; otherwise, . - - - - - Registers matching plugins for the specified . - - The which plugins must be registered for. - is . - - + + + + Represents an in which one or more extensions + are found. + + + + + Initializes a new instance of the + class for a given . + + The for which to construct an . + + + + Gets the containing extensions. + + + + + Initializes a instance of the + class for an extension in a given . + + The in which the extension is found. + is . + + + + Gets the in which the extension + was found. + + + + + Gets the from which the extension will + be created. + + + The containing the extension. + + + + + Initializes a new instance of the + with the specified type. + + The type of the to consume. + is . + + + + Responsible for scanning types for plugins, and maintaining a cache of + instances. + + + + + Scans a given for plugins. + + The containing the to scan. + The to scan. + The which will be used to output messages to the build log. + + if represents a + ; otherwise, . + + + + + Registers matching plugins for the specified . + + The which plugins must be registered for. + is . + + Functions as a chainable TextReader @@ -1117,46 +1117,46 @@ chain many ChainableReaders together. The last ChainableReader in the chain must be based on a TextReader. - - + + Makes it so all calls to Read and Peek are passed the ChainableReader passed as a parameter. ChainableReader to forward calls to - - + + Makes it so all calls to Read and Peek are passed the TextReader passed as a parameter. TextReader to forward calls to - - + + Forwards Peek calls to the TextReader or ChainableReader passed in the corresponding constructor. Character or -1 if end of stream - - + + Forwards Read calls to the TextReader or ChainableReader passed in the corresponding constructor. Character or -1 if end of stream. - - + + Closes the reader. - - + + Calls close and supresses the finalizer for the object. - - + + Gets a value indicating if the reader is backed by a stream in the chain. @@ -1165,455 +1165,185 @@ if the reader is backed by a stream; otherwise, . - - + + Allows a file's content to be modified while performing an operation. - - + + Called after construction and after properties are set. Allows for filter initialization. - - + + If then the filter will be used; otherwise, skipped. The default is . - - - - Opposite of . If - then the filter will be executed; otherwise, skipped. The default - is . - - - - - Creates a new instance of the class - for the specified class in the specified - . - - The containing the . - The class representing the . - - - - Gets the name of the class that can be created - using this . - - - The name of the class that can be created using - this . - - - - - Gets the name of the filter which the - can create. - - - The name of the task which the can - create. - - - - - Contains a strongly typed collection of objects. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with the specified instance. - - - - - Initializes a new instance of the class - with the specified array of instances. - - - - - Adds a to the end of the collection. - - The to be added to the end of the collection. - The position into which the new element was inserted. - - - - Adds the elements of a array to the end of the collection. - - The array of elements to be added to the end of the collection. - - - - Adds the elements of a to the end of the collection. - - The to be added to the end of the collection. - - - - Determines whether a is in the collection. - - The to locate in the collection. - - if is found in the - collection; otherwise, . - - - - - Determines whether a for the specified - task is in the collection. - - The name of task for which the should be located in the collection. - - if a for - the specified task is found in the collection; otherwise, - . - - - + + - Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. + Opposite of . If + then the filter will be executed; otherwise, skipped. The default + is . - The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. - The zero-based index in at which copying begins. - - - - Retrieves the index of a specified object in the collection. - - The object for which the index is returned. - - The index of the specified . If the is not currently a member of the collection, it returns -1. - - - - - Inserts a into the collection at the specified index. - - The zero-based index at which should be inserted. - The to insert. - - - - Returns an enumerator that can iterate through the collection. - - - A for the entire collection. - - - - - Removes a member from the collection. - - The to remove from the collection. - - + + - Gets or sets the element at the specified index. + Creates a new instance of the class + for the specified class in the specified + . - The zero-based index of the element to get or set. - - - - Gets the for the specified task. - - The name of the filter for which the should be located in the collection. - - - - Enumerates the elements of a . - - - - - Initializes a new instance of the class - with the specified . - - The collection that should be enumerated. - - + The containing the . + The class representing the . + + - Advances the enumerator to the next element of the collection. + Gets the name of the class that can be created + using this . - - if the enumerator was successfully advanced - to the next element; if the enumerator has - passed the end of the collection. - - - + + The name of the class that can be created using + this . + + + - Sets the enumerator to its initial position, which is before the - first element in the collection. + Gets the name of the filter which the + can create. - - + + The name of the task which the can + create. + + + - Gets the current element in the collection. + Contains a strongly typed collection of objects. - - The current element in the collection. - - - - - Represent a chain of NAnt filters that can be applied to a . - - - - A FilterChain represents a collection of one or more filters that can - be appled to a such as the . - In the case of the , the contents of the copied - files are filtered through each filter specified in the filter chain. - Filtering occurs in the order the filters are specified with filtered - output of one filter feeding into another. - - - :--------:--->:----------:--->:----------: ... :----------:--->:--------:
- :.Source.:--->:.Filter 1.:--->:.Filter 2.: ... :.Filter n.:--->:.target.:
- :--------:--->:----------:--->:----------: ... :----------:--->:--------:
-
- - A list of all filters that come with NAnt is available here. - - - The following tasks support filtering with a FilterChain: - - - - - - - - - -
- - - Replace all occurrences of @NOW@ with the current date/time and - replace tabs with spaces in all copied files. - - - - - - - - - - - - - - - ]]> - - -
- + + - Provides the abstract base class for types. + Initializes a new instance of the class. - - + + - Should be overridden by derived classes. clones the referenced types - data into the current instance. + Initializes a new instance of the class + with the specified instance. - - - - Copies all instance data of the to a given - . - - - + + - The ID used to be referenced later. + Initializes a new instance of the class + with the specified array of instances. - - + + - The ID to use as the reference. + Adds a to the end of the collection. - - - - Gets a value indicating whether a reference to the type can be - defined. - - - Only types with an assigned - to it, can be referenced. - - - + The to be added to the end of the collection. + The position into which the new element was inserted. + + - Gets the name of the datatype. + Adds the elements of a array to the end of the collection. - - The name of the datatype. - - - - - Initializes all build attributes and child elements. - - - needs to maintain the order in which the - filters are specified in the build file. - - - - - Used to to instantiate and return the chain of stream based filters. - - The that is the source of input to the filter chain. - - The is the first - in the chain, which is based on a physical stream that feeds the chain. - - - The last in the chain. - - - + The array of elements to be added to the end of the collection. + + - The filters to apply. + Adds the elements of a to the end of the collection. - - + The to be added to the end of the collection. + + - The encoding to assume when filter-copying files. The default is - system's current ANSI code page. + Determines whether a is in the collection. - - + The to locate in the collection. + + if is found in the + collection; otherwise, . + + + - Configurator that initializes filters in the order in which they've - been specified in the build file. + Determines whether a for the specified + task is in the collection. - - - - Contains a collection of elements. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with the specified instance. - - - - - Initializes a new instance of the class - with the specified array of instances. - - - - - Adds a to the end of the collection. - - The to be added to the end of the collection. - The position into which the new element was inserted. - - - - Adds the elements of a array to the end of the collection. - - The array of elements to be added to the end of the collection. - - - - Adds the elements of a to the end of the collection. - - The to be added to the end of the collection. - - - - Determines whether a is in the collection. - - The to locate in the collection. - - if is found in the - collection; otherwise, . - - - + The name of task for which the should be located in the collection. + + if a for + the specified task is found in the collection; otherwise, + . + + + Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. The zero-based index in at which copying begins. - - - - Retrieves the index of a specified object in the collection. - - The object for which the index is returned. - - The index of the specified . If the is not currently a member of the collection, it returns -1. - - - - - Inserts a into the collection at the specified index. - - The zero-based index at which should be inserted. - The to insert. - - - - Returns an enumerator that can iterate through the collection. - - - A for the entire collection. - - - - - Removes a member from the collection. - - The to remove from the collection. - - + + + + Retrieves the index of a specified object in the collection. + + The object for which the index is returned. + + The index of the specified . If the is not currently a member of the collection, it returns -1. + + + + + Inserts a into the collection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + + + Returns an enumerator that can iterate through the collection. + + + A for the entire collection. + + + + + Removes a member from the collection. + + The to remove from the collection. + + Gets or sets the element at the specified index. The zero-based index of the element to get or set. - - - - Enumerates the elements of a . - - - - - Initializes a new instance of the class - with the specified . - - The collection that should be enumerated. - - + + + + Gets the for the specified task. + + The name of the filter for which the should be located in the collection. + + + + Enumerates the elements of a . + + + + + Initializes a new instance of the class + with the specified . + + The collection that should be enumerated. + + Advances the enumerator to the next element of the collection. @@ -1622,150 +1352,420 @@ to the next element; if the enumerator has passed the end of the collection. - - + + Sets the enumerator to its initial position, which is before the first element in the collection. - - + + Gets the current element in the collection. The current element in the collection. - - - - Represents a physical . That is a reader based - on a stream. - - - Used by to represent a - based on a in the chain. - - - - - Parses NAnt properties and expressions - - - - This filter parses any NAnt properties or expressions found in its input, - inlining their values in its output. - - - Note: Due to limitations on buffering, expressions longer than 2048 - characters are not guaranteed to be expanded. - - Filters are intended to be used as a element of a . - - - Replace all properties with their corresponding values. - - - ]]> - - - - + + + + Represent a chain of NAnt filters that can be applied to a . + + + + A FilterChain represents a collection of one or more filters that can + be appled to a such as the . + In the case of the , the contents of the copied + files are filtered through each filter specified in the filter chain. + Filtering occurs in the order the filters are specified with filtered + output of one filter feeding into another. + + + :--------:--->:----------:--->:----------: ... :----------:--->:--------:
+ :.Source.:--->:.Filter 1.:--->:.Filter 2.: ... :.Filter n.:--->:.target.:
+ :--------:--->:----------:--->:----------: ... :----------:--->:--------:
+
+ + A list of all filters that come with NAnt is available here. + + + The following tasks support filtering with a FilterChain: + + + + + + + + + +
+ + + Replace all occurrences of @NOW@ with the current date/time and + replace tabs with spaces in all copied files. + + + + + + + + + + + + + + + ]]> + + +
+ + + Provides the abstract base class for types. + + + + + Should be overridden by derived classes. clones the referenced types + data into the current instance. + + + + + Copies all instance data of the to a given + . + + + + + The ID used to be referenced later. + + + + + The ID to use as the reference. + + + + + Gets a value indicating whether a reference to the type can be + defined. + + + Only types with an assigned + to it, can be referenced. + + + + + Gets the name of the datatype. + + + The name of the datatype. + + + + + Initializes all build attributes and child elements. + + + needs to maintain the order in which the + filters are specified in the build file. + + + + + Used to to instantiate and return the chain of stream based filters. + + The that is the source of input to the filter chain. + + The is the first + in the chain, which is based on a physical stream that feeds the chain. + + + The last in the chain. + + + + + The filters to apply. + + + + + The encoding to assume when filter-copying files. The default is + system's current ANSI code page. + + + + + Configurator that initializes filters in the order in which they've + been specified in the build file. + + + + + Contains a collection of elements. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with the specified instance. + + + + + Initializes a new instance of the class + with the specified array of instances. + + + + + Adds a to the end of the collection. + + The to be added to the end of the collection. + The position into which the new element was inserted. + + + + Adds the elements of a array to the end of the collection. + + The array of elements to be added to the end of the collection. + + + + Adds the elements of a to the end of the collection. + + The to be added to the end of the collection. + + + + Determines whether a is in the collection. + + The to locate in the collection. + + if is found in the + collection; otherwise, . + + + + + Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. + + The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. + The zero-based index in at which copying begins. + + + + Retrieves the index of a specified object in the collection. + + The object for which the index is returned. + + The index of the specified . If the is not currently a member of the collection, it returns -1. + + + + + Inserts a into the collection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + + + Returns an enumerator that can iterate through the collection. + + + A for the entire collection. + + + + + Removes a member from the collection. + + The to remove from the collection. + + + + Gets or sets the element at the specified index. + + The zero-based index of the element to get or set. + + + + Enumerates the elements of a . + + + + + Initializes a new instance of the class + with the specified . + + The collection that should be enumerated. + + + + Advances the enumerator to the next element of the collection. + + + if the enumerator was successfully advanced + to the next element; if the enumerator has + passed the end of the collection. + + + + + Sets the enumerator to its initial position, which is before the + first element in the collection. + + + + + Gets the current element in the collection. + + + The current element in the collection. + + + + + Represents a physical . That is a reader based + on a stream. + + + Used by to represent a + based on a in the chain. + + + + + Parses NAnt properties and expressions + + + + This filter parses any NAnt properties or expressions found in its input, + inlining their values in its output. + + + Note: Due to limitations on buffering, expressions longer than 2048 + characters are not guaranteed to be expanded. + + Filters are intended to be used as a element of a . + + + Replace all properties with their corresponding values. + + + ]]> + + + + Holds data for expression expansion between input and output. - - + + Called after construction and after properties are set. Allows for filter initialization. - - + + Reads the next character applying the filter logic. Char as an int or -1 if at the end of the stream - - + + Reads the next character applying the filter logic without advancing the current position in the stream. Char as an int or -1 if at the end of the stream - - + + Moves to the next character. - - - - Refills the buffer, running our input through - .) - - - + + + + Refills the buffer, running our input through + .) + + + Determines whether we've passed the end of our data. - - - - Replaces all occurrences of a given string in the original input with - user-supplied replacement string. - - - - This filter replaces all occurrences of a given string in the original - input stream with a user-supplied replacement string. By default string - comparisons are case sensitive but this can be changed by setting the - optional attribute to . - - - To use this filter specify the string to be replaced with the - attribute and the string to replace it with using the - attribute. - - - Filters are intended to be used as a element of a . - - - - - Replace all occurrences of "3.14" with "PI". - - - - ]]> - - - - - Replace all occurrences of "string", "String", etc. with "System.String". - - - - ]]> - - - - + + + + Replaces all occurrences of a given string in the original input with + user-supplied replacement string. + + + + This filter replaces all occurrences of a given string in the original + input stream with a user-supplied replacement string. By default string + comparisons are case sensitive but this can be changed by setting the + optional attribute to . + + + To use this filter specify the string to be replaced with the + attribute and the string to replace it with using the + attribute. + + + Filters are intended to be used as a element of a . + + + + + Replace all occurrences of "3.14" with "PI". + + + + ]]> + + + + + Replace all occurrences of "string", "String", etc. with "System.String". + + + + ]]> + + + + Construct that allows this filter to be chained to the one in the parameter chainedReader. Filter that the filter will be chained to - - + + Reads the next character applying the filter logic. Char as an int or -1 if at the end of the stream - - + + Reads the next character applying the filter logic without advancing the current position in the stream. @@ -1774,8 +1774,8 @@ Char as an int or -1 if at the end of the stream. - - + + Helper function used to search for the filter's traget string. If the string @@ -1793,109 +1793,109 @@ Ture if the stream ended while search for the string. Characters that were read while searching for the string. - - - - Returns the next character in the stream replacing the specified character. Using the - allows for the same implementation for Read and Peek - - Delegate to acquire the next character. (Read/Peek) - Char as an int or -1 if at the end of the stream - - + + + + Returns the next character in the stream replacing the specified character. Using the + allows for the same implementation for Read and Peek + + Delegate to acquire the next character. (Read/Peek) + Char as an int or -1 if at the end of the stream + + Compares to characters taking into account the _ignoreCase flag. - - + + The string to be replaced. - - + + The new value for the replaced string. Am empty string is permissible. - - + + Determines if case will be ignored. The default is . - - + + Delegate for Read and Peek. Allows the same implementation to be used for both methods. - - - - Replaces tokens in the original input with user-supplied values. - - - - This filter replaces all token surrounded by a beginning and ending - token. The default beginning and ending tokens both default to '@'. The - optional and attributes - can be specified to change either token. By default string - comparisons are case sensitive but this can be changed by setting the - optional attribute to . - - - Tokens are specified by using the element. It is - possible to specify from 1 to n tokens and replacement values. Values can - be any valid NAnt expression. - - - Filters are intended to be used as a element of a . - - - - - Replace all occurrences of the string @DATE@ with the value of property - "TODAY". - - - - - - ]]> - - - - - Replace all occurrences of the string <DATE> with the value of - property "TODAY". - - - - - - ]]> - - - - + + + + Replaces tokens in the original input with user-supplied values. + + + + This filter replaces all token surrounded by a beginning and ending + token. The default beginning and ending tokens both default to '@'. The + optional and attributes + can be specified to change either token. By default string + comparisons are case sensitive but this can be changed by setting the + optional attribute to . + + + Tokens are specified by using the element. It is + possible to specify from 1 to n tokens and replacement values. Values can + be any valid NAnt expression. + + + Filters are intended to be used as a element of a . + + + + + Replace all occurrences of the string @DATE@ with the value of property + "TODAY". + + + + + + ]]> + + + + + Replace all occurrences of the string <DATE> with the value of + property "TODAY". + + + + + + ]]> + + + + Construct that allows this filter to be chained to the one in the parameter chainedReader. Filter that the filter will be chained to - - + + Reads the next character applying the filter logic. Char as an int or -1 if at the end of the stream - - + + Reads the next character applying the filter logic without advancing the current position in the stream. @@ -1904,13 +1904,13 @@ Char as an int or -1 if at the end of the stream. - - + + Initialize the filter by setting its parameters. - - + + Finds a token give that we are positioned at a beginning token character. Either a token replacement is returned or the characters that were read looking for the token. @@ -1919,346 +1919,346 @@ A token was found by there is no replacement The stream ended while looking for the token Either the replacement token or the characters that were read looking for the token - - - - Returns the next character in the stream replacing the specified character. Using the - allows for the same implementation for Read and Peek - - Delegate to acquire the next character. (Read/Peek) - Char as an int or -1 if at the end of the stream - - - - Compares to characters taking into account. - - - - - - - + + + + Returns the next character in the stream replacing the specified character. Using the + allows for the same implementation for Read and Peek + + Delegate to acquire the next character. (Read/Peek) + Char as an int or -1 if at the end of the stream + + + + Compares to characters taking into account. + + + + + + + Marks the beginning of a token. The default is "@". - - + + Marks the end of a token. The default is "@". - - + + Tokens and replacement values. - - + + Determines if case will be ignored. The default is . - - + + Delegate for Read and Peek. Allows the same implementation to be used for both methods. - - - - Converts tabs to spaces. - - - - The filter replaces tabs in a text file - with spaces. - - - Filters are intended to be used as a element of a . - - - - Replace all tabs with four spaces. - - - ]]> - - - - + + + + Converts tabs to spaces. + + + + The filter replaces tabs in a text file + with spaces. + + + Filters are intended to be used as a element of a . + + + + Replace all tabs with four spaces. + + + ]]> + + + + Construct that allows this filter to be chained to the one in the parameter chainedReader. Filter that the filter will be chained to - - + + Retrieves the next character with moving the position in the stream. This method is not implemented -1 if end of stream otherwise a character - - + + Retrieves the next character in the stream. -1 if end of stream otherwise a character - - - - Returns the next character in the stream replacing the specified character. Using the - allows for the same implementation for Read and Peek - - Delegate to acquire the next character. (Read/Peek) - Char as an int or -1 if at the end of the stream - - + + + + Returns the next character in the stream replacing the specified character. Using the + allows for the same implementation for Read and Peek + + Delegate to acquire the next character. (Read/Peek) + Char as an int or -1 if at the end of the stream + + The number of spaces used when converting a tab. The default is "8". - - + + Delegate for Read and Peek. Allows the same implementation to be used for both methods. - - + + Functions to return information for a given assembly. - - - - Gets or sets the that this functionset will - reference. - - - The that this functionset will reference. - - - - - Loads an assembly given its file name or path. - - The name or path of the file that contains the manifest of the assembly. - - The loaded assembly. - - is an empty . - is not found, or the module you are trying to load does not specify a filename extension. - is not a valid assembly. - An assembly or module was loaded twice with two different evidences, or the assembly name is longer than MAX_PATH characters. - - - - Loads an assembly given the long form of its name. - - The long form of the assembly name. - - The loaded assembly. - - is a . - is not found. - - - Determine the location of the Microsoft Access 11 Primary Interop - Assembly by loading it using its fully qualified name, and copy it - to the build directory. - - - - - ]]> - - - - + + - Gets the full name of the assembly, also known as the display name. + Gets or sets the that this functionset will + reference. - The assembly to get the full name for. + + The that this functionset will reference. + + + + + Loads an assembly given its file name or path. + + The name or path of the file that contains the manifest of the assembly. - The full name of the assembly, also known as the display name. + The loaded assembly. - - - - Gets an for the specified assembly. - - The assembly to get an for. - - An for the specified assembly. - - - - + is an empty . + is not found, or the module you are trying to load does not specify a filename extension. + is not a valid assembly. + An assembly or module was loaded twice with two different evidences, or the assembly name is longer than MAX_PATH characters. + + - Gets the physical location, in codebase format, of the loaded file - that contains the manifest. + Loads an assembly given the long form of its name. - The assembly to get the location for. + The long form of the assembly name. - The location of the specified assembly. + The loaded assembly. - - + is a . + is not found. + + + Determine the location of the Microsoft Access 11 Primary Interop + Assembly by loading it using its fully qualified name, and copy it + to the build directory. + + + + + ]]> + + + + - Functions that return information about an assembly's identity. + Gets the full name of the assembly, also known as the display name. - - - - Gets the location of the assembly as a URL. - - The of the assembly. - - The location of the assembly as a URL. - - - - - - Gets the URI, including escape characters, that represents the codebase. - - The of the assembly. - - The URI, including escape characters, that represents the codebase. - - - - - - Gets the full name of the assembly, also known as the display name. - - The of the assembly. - - The full name of the assembly, also known as the display name. - - - - Output the full name of the nunit.framework assembly to the - build log. - - - - ]]> - - - - - - - Gets the simple, unencrypted name of the assembly. - - The of the assembly. - - The simple, unencrypted name of the assembly. - - - - Output the simple name of the nunit.framework assembly to - the build log. - - - - ]]> - - - - - - - Gets the version of the assembly. - - The of the assembly. - - The version of the assembly. - - - - Output the major version of the nunit.framework assembly - to the build log. - - - - ]]> - - - - - - - - Gets the for a given file. - - The assembly file for which to get the . - - An object representing the given file. - - is an empty . - does not exist. - is not a valid assembly. - - The assembly is not added to this domain. - - - - Output the full name of the nunit.framework assembly to the - build log. - - - - ]]> - - - - - - Converts the specified string representation of a logical value to - its equivalent. - - A string containing the value to convert. - - if is equivalent to - "True"; otherwise, . - - is not equivalent to or . - - - - Converts the specified to its equivalent string - representation. - - A to convert. - - "True" if is , or - "False" if is . - - - - - Converts the argument to an integer. + The assembly to get the full name for. + + The full name of the assembly, also known as the display name. + + + + + Gets an for the specified assembly. + + The assembly to get an for. + + An for the specified assembly. + + + + + + Gets the physical location, in codebase format, of the loaded file + that contains the manifest. + + The assembly to get the location for. + + The location of the specified assembly. + + + + + Functions that return information about an assembly's identity. + + + + + Gets the location of the assembly as a URL. + + The of the assembly. + + The location of the assembly as a URL. + + + + + + Gets the URI, including escape characters, that represents the codebase. + + The of the assembly. + + The URI, including escape characters, that represents the codebase. + + + + + + Gets the full name of the assembly, also known as the display name. + + The of the assembly. + + The full name of the assembly, also known as the display name. + + + + Output the full name of the nunit.framework assembly to the + build log. + + + + ]]> + + + + + + + Gets the simple, unencrypted name of the assembly. + + The of the assembly. + + The simple, unencrypted name of the assembly. + + + + Output the simple name of the nunit.framework assembly to + the build log. + + + + ]]> + + + + + + + Gets the version of the assembly. + + The of the assembly. + + The version of the assembly. + + + + Output the major version of the nunit.framework assembly + to the build log. + + + + ]]> + + + + + + + + Gets the for a given file. + + The assembly file for which to get the . + + An object representing the given file. + + is an empty . + does not exist. + is not a valid assembly. + + The assembly is not added to this domain. + + + + Output the full name of the nunit.framework assembly to the + build log. + + + + ]]> + + + + + + Converts the specified string representation of a logical value to + its equivalent. + + A string containing the value to convert. + + if is equivalent to + "True"; otherwise, . + + is not equivalent to or . + + + + Converts the specified to its equivalent string + representation. + + A to convert. + + "True" if is , or + "False" if is . + + + + + Converts the argument to an integer. value to be converted converted to integer. The function fails with an exception when the conversion is not possible. - - + + Converts the argument to double The value to be converted. converted to double. The function fails with an exception when the conversion is not possible. - - + + Converts the argument to a string. @@ -2271,15 +2271,15 @@ Named method ConvertToString as a static ToString method would break CLS compliance. - - + + Converts the argument to a datetime. value to be converted converted to datetime. The function fails with an exception when the conversion is not possible. - - + + Converts the argument to a boolean @@ -2288,17 +2288,17 @@ converted to boolean. The function fails with an exception when the conversion is not possible. - - - - Gets a that is the current local date and - time on this computer. - - - A whose value is the current date and time. - - - + + + + Gets a that is the current local date and + time on this computer. + + + A whose value is the current date and time. + + + Gets the year component of the specified date. @@ -2306,8 +2306,8 @@ The year, between 1 and 9999. - - + + Gets the month component of the specified date. @@ -2315,8 +2315,8 @@ The month, between 1 and 12. - - + + Gets the day of the month represented by the specified date. @@ -2324,8 +2324,8 @@ The day value, between 1 and 31. - - + + Gets the hour component of the specified date. @@ -2333,8 +2333,8 @@ The hour, between 0 and 23. - - + + Gets the minute component of the specified date. @@ -2342,8 +2342,8 @@ The minute, between 0 and 59. - - + + Gets the seconds component of the specified date. @@ -2351,8 +2351,8 @@ The seconds, between 0 and 59. - - + + Gets the milliseconds component of the specified date. @@ -2360,8 +2360,8 @@ The millisecond, between 0 and 999. - - + + Gets the number of ticks that represent the specified date. @@ -2370,8 +2370,8 @@ The number of ticks that represent the date and time of the specified date. - - + + Gets the day of the week represented by the specified date. @@ -2380,8 +2380,8 @@ The day of the week, ranging from zero, indicating Sunday, to six, indicating Saturday. - - + + Gets the day of the year represented by the specified date. @@ -2389,21 +2389,21 @@ The day of the year, between 1 and 366. - - - - Returns the number of days in the specified month of the specified - year. - - The year. - The month (a number ranging from 1 to 12). - - The number of days in for the specified - . - - is less than 1 or greater than 12. - - + + + + Returns the number of days in the specified month of the specified + year. + + The year. + The month (a number ranging from 1 to 12). + + The number of days in for the specified + . + + is less than 1 or greater than 12. + + Returns an indication whether the specified year is a leap year. @@ -2412,131 +2412,131 @@ if is a leap year; otherwise, . - - - - Converts the specified string representation of a date and time to - its equivalent. - - A string containing a date and time to convert. - - A equivalent to the date and time contained - in . - - does not contain a valid string representation of a date and time. - - The for the invariant culture is - used to supply formatting information about . - - - - - Converts the specified to its equivalent - string representation. - - A to convert. - - A string representation of formatted using - the general format specifier ("G"). - - - is formatted with the - for the invariant culture. - - - + + + + Converts the specified string representation of a date and time to + its equivalent. + + A string containing a date and time to convert. + + A equivalent to the date and time contained + in . + + does not contain a valid string representation of a date and time. + + The for the invariant culture is + used to supply formatting information about . + + + + + Converts the specified to its equivalent + string representation. + + A to convert. + + A string representation of formatted using + the general format specifier ("G"). + + + is formatted with the + for the invariant culture. + + + Groups a set of functions for dealing with directories. - - - - Returns the creation date and time of the specified directory. - - The directory for which to obtain creation date and time information. - - The creation date and time of the specified directory. - - The specified directory does not exist. - is a zero-length string, contains only white space, or contains one or more invalid characters. - The specified path, file name, or both exceed the system-defined maximum length. - - - - Returns the date and time the specified directory was last written to. - - The directory for which to obtain write date and time information. - - The date and time the specified directory was last written to. - - The specified directory does not exist. - is a zero-length string, contains only white space, or contains one or more invalid characters. - The specified path, file name, or both exceed the system-defined maximum length. - - - - Returns the date and time the specified directory was last accessed. - - The directory for which to obtain access date and time information. - - The date and time the specified directory was last accessed. - - The specified directory does not exist. - is a zero-length string, contains only white space, or contains one or more invalid characters. - The specified path, file name, or both exceed the system-defined maximum length. - The parameter is in an invalid format. - - - - Gets the current working directory. - - - A containing the path of the current working - directory. - - - - - Retrieves the parent directory of the specified path. - - The path for which to retrieve the parent directory. - - The parent directory, or an empty if - is the root directory, including the root - of a UNC server or share name. - - The directory specified by is read-only. - is a zero-length string, contains only white space, or contains one or more invalid characters. - The specified path, file name, or both exceed the system-defined maximum length. - The specified path was not found. - - - Copy "readme.txt" from the current working directory to - its parent directory. - - - - - - ]]> - - - - - - Returns the volume information, root information, or both for the - specified path. - - The path for which to retrieve the parent directory. - - A string containing the volume information, root information, or - both for the specified path. - - is a zero-length string, contains only white space, or contains one or more invalid characters. - The specified path, file name, or both exceed the system-defined maximum length. - - + + + + Returns the creation date and time of the specified directory. + + The directory for which to obtain creation date and time information. + + The creation date and time of the specified directory. + + The specified directory does not exist. + is a zero-length string, contains only white space, or contains one or more invalid characters. + The specified path, file name, or both exceed the system-defined maximum length. + + + + Returns the date and time the specified directory was last written to. + + The directory for which to obtain write date and time information. + + The date and time the specified directory was last written to. + + The specified directory does not exist. + is a zero-length string, contains only white space, or contains one or more invalid characters. + The specified path, file name, or both exceed the system-defined maximum length. + + + + Returns the date and time the specified directory was last accessed. + + The directory for which to obtain access date and time information. + + The date and time the specified directory was last accessed. + + The specified directory does not exist. + is a zero-length string, contains only white space, or contains one or more invalid characters. + The specified path, file name, or both exceed the system-defined maximum length. + The parameter is in an invalid format. + + + + Gets the current working directory. + + + A containing the path of the current working + directory. + + + + + Retrieves the parent directory of the specified path. + + The path for which to retrieve the parent directory. + + The parent directory, or an empty if + is the root directory, including the root + of a UNC server or share name. + + The directory specified by is read-only. + is a zero-length string, contains only white space, or contains one or more invalid characters. + The specified path, file name, or both exceed the system-defined maximum length. + The specified path was not found. + + + Copy "readme.txt" from the current working directory to + its parent directory. + + + + + + ]]> + + + + + + Returns the volume information, root information, or both for the + specified path. + + The path for which to retrieve the parent directory. + + A string containing the volume information, root information, or + both for the specified path. + + is a zero-length string, contains only white space, or contains one or more invalid characters. + The specified path, file name, or both exceed the system-defined maximum length. + + Determines whether the given path refers to an existing directory on disk. @@ -2554,116 +2554,116 @@ ]]> - - + + Functions for requesting information from DNS. - - - - Gets the host name of the local computer. - - - A string that contains the DNS host name of the local computer. - - An error is encountered when resolving the local host name. - - - - Converts the specified string representation of a number to its - double-precision floating point number equivalent. - - A string containing a number to convert. - - A double-precision floating point number equivalent to the numeric - value or symbol specified in . - - is not a number in a valid format. - represents a number less than or greater than . - - The for the invariant culture is - used to supply formatting information about . - - - - - Converts the specified to its equivalent - string representation. - - A to convert. - - The string representation of formatted - using the general format specifier ("G"). - - - is formatted with the - for the invariant culture. - - - + + + + Gets the host name of the local computer. + + + A string that contains the DNS host name of the local computer. + + An error is encountered when resolving the local host name. + + + + Converts the specified string representation of a number to its + double-precision floating point number equivalent. + + A string containing a number to convert. + + A double-precision floating point number equivalent to the numeric + value or symbol specified in . + + is not a number in a valid format. + represents a number less than or greater than . + + The for the invariant culture is + used to supply formatting information about . + + + + + Converts the specified to its equivalent + string representation. + + A to convert. + + The string representation of formatted + using the general format specifier ("G"). + + + is formatted with the + for the invariant culture. + + + Provide information about the current environment and platform. - - - - Gets the path to the system special folder identified by the - specified enumeration. - - An enumerated constant that identifies a system special folder. - - The path to the specified system special folder, if that folder - physically exists on your computer; otherwise, the empty string (""). - - is not a member of . - - - Copy "out.log" from the project base directory to the - program files directory. - - - - ]]> - - - - - - Gets the NetBIOS name of this local computer. - - - The NetBIOS name of this local computer. - - The name of this computer cannot be obtained. - - - - Gets an object that represents the - current operating system. - - - An object that contains the current - platform identifier and version number. - - - - Output string representation of the current operating system. - - - - ]]> - - If the operating system is Windows 2000, the output is: - - Microsoft Windows NT 5.0.2195.0 - - - - - + + + + Gets the path to the system special folder identified by the + specified enumeration. + + An enumerated constant that identifies a system special folder. + + The path to the specified system special folder, if that folder + physically exists on your computer; otherwise, the empty string (""). + + is not a member of . + + + Copy "out.log" from the project base directory to the + program files directory. + + + + ]]> + + + + + + Gets the NetBIOS name of this local computer. + + + The NetBIOS name of this local computer. + + The name of this computer cannot be obtained. + + + + Gets an object that represents the + current operating system. + + + An object that contains the current + platform identifier and version number. + + + + Output string representation of the current operating system. + + + + ]]> + + If the operating system is Windows 2000, the output is: + + Microsoft Windows NT 5.0.2195.0 + + + + + Gets the user name of the person who started the current thread. @@ -2685,18 +2685,18 @@ ]]> - - - - Returns the value of the specified environment variable. - - The environment variable of which the value should be returned. - - The value of the specified environment variable. - - Environment variable does not exist. - - + + + + Returns the value of the specified environment variable. + + The environment variable of which the value should be returned. + + The value of the specified environment variable. + + Environment variable does not exist. + + Gets a value indicating whether the specified environment variable exists. @@ -2719,68 +2719,68 @@ ]]> - - - - Gets a object that describes the major, - minor, build, and revision numbers of the Common Language Runtime. - - - A Version object. - - - Output the major version of the CLR. - - - ]]> - - - - + + + + Gets a object that describes the major, + minor, build, and revision numbers of the Common Language Runtime. + + + A Version object. + + + Output the major version of the CLR. + + + ]]> + + + + Groups a set of functions for dealing with files. - - - - Returns the creation date and time of the specified file. - - The file for which to obtain creation date and time information. - - The creation date and time of the specified file. - - The specified file does not exist. - is a zero-length string, contains only white space, or contains one or more invalid characters. - The specified path, file name, or both exceed the system-defined maximum length. - The parameter is in an invalid format. - - - - Returns the date and time the specified file was last written to. - - The file for which to obtain write date and time information. - - The date and time the specified file was last written to. - - The specified file does not exist. - is a zero-length string, contains only white space, or contains one or more invalid characters. - The specified path, file name, or both exceed the system-defined maximum length. - - - - Returns the date and time the specified file was last accessed. - - The file for which to obtain access date and time information. - - The date and time the specified file was last accessed. - - The specified file does not exist. - is a zero-length string, contains only white space, or contains one or more invalid characters. - The specified path, file name, or both exceed the system-defined maximum length. - The parameter is in an invalid format. - - + + + + Returns the creation date and time of the specified file. + + The file for which to obtain creation date and time information. + + The creation date and time of the specified file. + + The specified file does not exist. + is a zero-length string, contains only white space, or contains one or more invalid characters. + The specified path, file name, or both exceed the system-defined maximum length. + The parameter is in an invalid format. + + + + Returns the date and time the specified file was last written to. + + The file for which to obtain write date and time information. + + The date and time the specified file was last written to. + + The specified file does not exist. + is a zero-length string, contains only white space, or contains one or more invalid characters. + The specified path, file name, or both exceed the system-defined maximum length. + + + + Returns the date and time the specified file was last accessed. + + The file for which to obtain access date and time information. + + The date and time the specified file was last accessed. + + The specified file does not exist. + is a zero-length string, contains only white space, or contains one or more invalid characters. + The specified path, file name, or both exceed the system-defined maximum length. + The parameter is in an invalid format. + + Determines whether the specified file exists. @@ -2799,1015 +2799,1015 @@ ]]> - - - - Determines whether is more or equal - up-to-date than . - - The file to check against the target file. - The file for which we want to determine the status. - - if is more - or equal up-to-date than ; otherwise, - . - - or is a zero-length string, contains only white space, or contains one or more invalid characters. - The specified path, file name, or both of either or exceed the system-defined maximum length. - - - - Gets the length of the file. - - filename - - Length in bytes, of the file named . - - The file specified cannot be found. - - - - Checks if a given file is an assembly. - - The name or path of the file to be checked. - True if the file is a valid assembly, false if it's not or if the assembly seems corrupted (invalid headers or metadata). - is a null . - is an empty . - is not found, or the file you are trying to check does not specify a filename extension. - The caller does not have path discovery permission. - - + + - Functions that provide version information for a physical file on disk. + Determines whether is more or equal + up-to-date than . - - - - Returns a representing the version - information associated with the specified file. - - The file to retrieve the version information for. - - A containing information about the file. - - The file specified cannot be found. - - - - Gets the name of the company that produced the file. - - A instance containing version information about a file. - - The name of the company that produced the file. - - - - - Gets the file version of a file. - - A instance containing version information about a file. - - The file version of a file. - - - - - - Gets the name of the product the file is distributed with. - - A instance containing version information about a file. - - The name of the product the file is distributed with. - - - - - Gets the product version of a file. - - A instance containing version information about a file. - - The product version of a file. - - - - + The file to check against the target file. + The file for which we want to determine the status. + + if is more + or equal up-to-date than ; otherwise, + . + + or is a zero-length string, contains only white space, or contains one or more invalid characters. + The specified path, file name, or both of either or exceed the system-defined maximum length. + + - Checks whether the specified framework exists, and is valid. + Gets the length of the file. - The framework to test. + filename - if the specified framework exists ; otherwise, - . + Length in bytes, of the file named . - - - - Checks whether the SDK for the specified framework is installed. - - The framework to test. - - if the SDK for specified framework is installed; - otherwise, . - - - - - + The file specified cannot be found. + + - Gets the identifier of the current target framework. + Checks if a given file is an assembly. + + The name or path of the file to be checked. + True if the file is a valid assembly, false if it's not or if the assembly seems corrupted (invalid headers or metadata). + is a null . + is an empty . + is not found, or the file you are trying to check does not specify a filename extension. + The caller does not have path discovery permission. + + + + Functions that provide version information for a physical file on disk. + + + + + Returns a representing the version + information associated with the specified file. + The file to retrieve the version information for. - The identifier of the current target framework. + A containing information about the file. - - + The file specified cannot be found. + + - Gets the identifier of the runtime framework. + Gets the name of the company that produced the file. + A instance containing version information about a file. - The identifier of the runtime framework. + The name of the company that produced the file. - - - - Gets the family of the specified framework. - - The framework of which the family should be returned. - - The family of the specified framework. - - is not a valid framework identifier. - - - - - - Gets the version of the specified framework. - - The framework of which the version should be returned. - - The version of the specified framework. - - is not a valid framework identifier. - - - - - - Gets the description of the specified framework. - - The framework of which the description should be returned. - - The description of the specified framework. - - is not a valid framework identifier. - - - - - - Gets the Common Language Runtime version of the specified framework. - - The framework of which the Common Language Runtime version should be returned. - - The Common Language Runtime version of the specified framework. - - is not a valid framework identifier. - - - - - - Gets the framework directory of the specified framework. - - The framework of which the framework directory should be returned. - - The framework directory of the specified framework. - - is not a valid framework identifier. - - - - - - Gets the assembly directory of the specified framework. - - The framework of which the assembly directory should be returned. - - The assembly directory of the specified framework. - - is not a valid framework identifier. - - - - - - Gets the SDK directory of the specified framework. - - The framework of which the SDK directory should be returned. - - The SDK directory of the specified framework, or an empty - if the SDK of the specified framework is not - installed. - - is not a valid framework identifier. - - - - - - Gets the absolute path of the specified tool for the current - target framework. - - The file name of the tool to search for. - - The absolute path to if found in one of the - configured tool paths; otherwise, an error is reported. - - could not be found in the configured tool paths. - - - The configured tool paths are scanned in the order in which they - are defined in the framework configuration. - - - The file name of the tool to search should include the extension. - - - - Use gacutil to install an assembly in the GAC. - - - - - - ]]> - - - - - - Gets the runtime engine of the specified framework. - - The framework of which the runtime engine should be returned. - - The full path to the runtime engine of the specified framework, or - an empty if no runtime engine is defined - for the specified framework. - - is not a valid framework identifier. - - - - - - Gets a comma-separated list of frameworks filtered by the specified - . - - A bitwise combination of values that filter the frameworks to retrieve. - - A comma-separated list of frameworks filtered by the specified - , sorted on name. - - - - Define a build-all target that executes the build - target once for each installed framework targeting compact - devices. - - - - - - - - - - - ... - - ]]> - - - - - - Checks whether the specified framework is valid. - - The framework to check. - is not a valid framework identifier. - - - - Converts the specified string representation of a number to its - 32-bit signed integer equivalent. - - A string containing a number to convert. - - A 32-bit signed integer equivalent to the number contained in - . - - is not of the correct format. - represents a number less than or greater than . - - The for the invariant culture is - used to supply formatting information about . - - - - - Converts the specified to its equivalent string - representation. - - A to convert. - - The string representation of , consisting - of a negative sign if the value is negative, and a sequence of - digits ranging from 0 to 9 with no leading zeroes. - - - is formatted with the - for the invariant culture. - - - - - Converts the specified string representation of a number to its - 64-bit signed integer equivalent. - - A string containing a number to convert. - - A 64-bit signed integer equivalent to the number contained in - . - - is not of the correct format. - represents a number less than or greater than . - - The for the invariant culture is - used to supply formatting information about . - - - - - Converts the specified to its equivalent string - representation. - - A to convert. - - The string representation of , consisting - of a negative sign if the value is negative, and a sequence of - digits ranging from 0 to 9 with no leading zeroes. - - - is formatted with the - for the invariant culture. - - - + + - Rounds the value to the nearest whole number + Gets the file version of a file. - Number to be rounded, can be anything convertible to a double. + A instance containing version information about a file. - Rounded value. + The file version of a file. - - + + + - Returns the largest whole number less than or equal to the specified - number. + Gets the name of the product the file is distributed with. - value to be , can be anything convertible to a double + A instance containing version information about a file. - The largest whole number less than or equal to the specified number. + The name of the product the file is distributed with. - - + + - Returns the smallest whole number greater than or equal to the specified number + Gets the product version of a file. - value + A instance containing version information about a file. - The smallest whole number greater than or equal to the specified number. + The product version of a file. - - + + + - Returns the absolute value of the specified number + Checks whether the specified framework exists, and is valid. - value to take the absolute value from + The framework to test. - when is greater - than or equal to zero; otherwise, -. + if the specified framework exists ; otherwise, + . - - + + - Gets the base directory of the appdomain in which NAnt is running. + Checks whether the SDK for the specified framework is installed. + The framework to test. - The base directory of the appdomain in which NAnt is running. + if the SDK for specified framework is installed; + otherwise, . - - + + + + - Gets the NAnt assembly. + Gets the identifier of the current target framework. - The NAnt assembly. + The identifier of the current target framework. - - - - Searches the probing paths of the current target framework for the - specified file. - - The name of the file to search for. - - The absolute path to if found in one of the - configured probing; otherwise, an error is reported. - - could not be found in the configured probing paths. - - - The configured probing paths are scanned recursively in the order - in which they are defined in the framework configuration. - - - The file name to search should include the extension. - - - - - Compile an assembly referencing the nunit.framework assembly - for the current target framework that is shipped as part of the - NAnt distribution. - - - - - - - - - - - - ]]> - - - - - - Gets the name of the current project. - - - The name of the current project, or an empty - if no name is specified in the build file. - - - - - Gets the form of the build file. - - - The form of the build file, or - an empty if the project is not file backed. - - - - - Gets the local path to the build file. - - - The local path of the build file, or an empty - if the project is not file backed. - - - - - Gets the name of the target that will be executed when no other - build targets are specified. - - - The name of the target that will be executed when no other build - targets are specified, or an empty if no - default target is defined for the project. - - - + + - Gets the base directory of the current project. + Gets the identifier of the runtime framework. - The base directory of the current project. + The identifier of the runtime framework. - - + + + + Gets the family of the specified framework. + + The framework of which the family should be returned. + + The family of the specified framework. + + is not a valid framework identifier. + + + + + + Gets the version of the specified framework. + + The framework of which the version should be returned. + + The version of the specified framework. + + is not a valid framework identifier. + + + + + + Gets the description of the specified framework. + + The framework of which the description should be returned. + + The description of the specified framework. + + is not a valid framework identifier. + + + + + + Gets the Common Language Runtime version of the specified framework. + + The framework of which the Common Language Runtime version should be returned. + + The Common Language Runtime version of the specified framework. + + is not a valid framework identifier. + + + + + + Gets the framework directory of the specified framework. + + The framework of which the framework directory should be returned. + + The framework directory of the specified framework. + + is not a valid framework identifier. + + + + + + Gets the assembly directory of the specified framework. + + The framework of which the assembly directory should be returned. + + The assembly directory of the specified framework. + + is not a valid framework identifier. + + + + + + Gets the SDK directory of the specified framework. + + The framework of which the SDK directory should be returned. + + The SDK directory of the specified framework, or an empty + if the SDK of the specified framework is not + installed. + + is not a valid framework identifier. + + + + + + Gets the absolute path of the specified tool for the current + target framework. + + The file name of the tool to search for. + + The absolute path to if found in one of the + configured tool paths; otherwise, an error is reported. + + could not be found in the configured tool paths. + + + The configured tool paths are scanned in the order in which they + are defined in the framework configuration. + + + The file name of the tool to search should include the extension. + + + + Use gacutil to install an assembly in the GAC. + + + + + + ]]> + + + + + + Gets the runtime engine of the specified framework. + + The framework of which the runtime engine should be returned. + + The full path to the runtime engine of the specified framework, or + an empty if no runtime engine is defined + for the specified framework. + + is not a valid framework identifier. + + + + + + Gets a comma-separated list of frameworks filtered by the specified + . + + A bitwise combination of values that filter the frameworks to retrieve. + + A comma-separated list of frameworks filtered by the specified + , sorted on name. + + + + Define a build-all target that executes the build + target once for each installed framework targeting compact + devices. + + + + + + + + + + + ... + + ]]> + + + + + + Checks whether the specified framework is valid. + + The framework to check. + is not a valid framework identifier. + + + + Converts the specified string representation of a number to its + 32-bit signed integer equivalent. + + A string containing a number to convert. + + A 32-bit signed integer equivalent to the number contained in + . + + is not of the correct format. + represents a number less than or greater than . + + The for the invariant culture is + used to supply formatting information about . + + + + + Converts the specified to its equivalent string + representation. + + A to convert. + + The string representation of , consisting + of a negative sign if the value is negative, and a sequence of + digits ranging from 0 to 9 with no leading zeroes. + + + is formatted with the + for the invariant culture. + + + + + Converts the specified string representation of a number to its + 64-bit signed integer equivalent. + + A string containing a number to convert. + + A 64-bit signed integer equivalent to the number contained in + . + + is not of the correct format. + represents a number less than or greater than . + + The for the invariant culture is + used to supply formatting information about . + + + + + Converts the specified to its equivalent string + representation. + + A to convert. + + The string representation of , consisting + of a negative sign if the value is negative, and a sequence of + digits ranging from 0 to 9 with no leading zeroes. + + + is formatted with the + for the invariant culture. + + + + + Rounds the value to the nearest whole number + + Number to be rounded, can be anything convertible to a double. + + Rounded value. + + + + + Returns the largest whole number less than or equal to the specified + number. + + value to be , can be anything convertible to a double + + The largest whole number less than or equal to the specified number. + + + + + Returns the smallest whole number greater than or equal to the specified number + + value + + The smallest whole number greater than or equal to the specified number. + + + + + Returns the absolute value of the specified number + + value to take the absolute value from + + when is greater + than or equal to zero; otherwise, -. + + + + + Gets the base directory of the appdomain in which NAnt is running. + + + The base directory of the appdomain in which NAnt is running. + + + + + Gets the NAnt assembly. + + + The NAnt assembly. + + + + + Searches the probing paths of the current target framework for the + specified file. + + The name of the file to search for. + + The absolute path to if found in one of the + configured probing; otherwise, an error is reported. + + could not be found in the configured probing paths. + + + The configured probing paths are scanned recursively in the order + in which they are defined in the framework configuration. + + + The file name to search should include the extension. + + + + + Compile an assembly referencing the nunit.framework assembly + for the current target framework that is shipped as part of the + NAnt distribution. + + + + + + + + + + + + ]]> + + + + + + Gets the name of the current project. + + + The name of the current project, or an empty + if no name is specified in the build file. + + + + + Gets the form of the build file. + + + The form of the build file, or + an empty if the project is not file backed. + + + + + Gets the local path to the build file. + + + The local path of the build file, or an empty + if the project is not file backed. + + + + + Gets the name of the target that will be executed when no other + build targets are specified. + + + The name of the target that will be executed when no other build + targets are specified, or an empty if no + default target is defined for the project. + + + + + Gets the base directory of the current project. + + + The base directory of the current project. + + + Checks whether the specified target exists. - The target to test. + The target to test. + + if the specified target exists; otherwise, + . + + + + Execute target "clean", if it exists. + + + + + + ]]> + + + + + + Gets the name of the target being executed. + + + A that contains the name of the target + being executed. + + No target is being executed. + + + + Checks whether the specified target has already been executed. + + The target to test. + + if the specified target has already been + executed; otherwise, . + + Target does not exist. + + + + Checks whether the specified task exists. + + The task to test. + + if the specified task exists; otherwise, + . + + + + + Returns the from which the specified task + was loaded. + + The name of the task to get the of. + + The from which the specified task was loaded. + + Task is not available. + + + + Checks whether the specified property exists. + + The property to test. + + if the specified property exists; otherwise, + . + + + + Execute a set of tasks if the "build.debug" property + exists. + + + + + + + + ]]> + + + + + + Checks whether the specified property is read-only. + + The property to test. + + if the specified property is read-only; + otherwise, . + + + Check whether the "debug" property is read-only. + property::is-readonly('debug') + + Property has not been set. + + + + Checks whether the specified property is a dynamic property. + + The property to test. + + if the specified property is a dynamic + property; otherwise, . + + Property has not been set. + + + Check whether the "debug" property is a dynamic property. + + property::is-dynamic('debug') + + + + + Gets the name of the platform on which NAnt is running. + + + The name of the platform on which NAnt is running. + + + + + Checks whether NAnt is running on the win32 platform. + + + if NAnt is running on the win32 platform; + otherwise, . + + + + + Checks whether NAnt is running on unix. + + + if NAnt is running on unix; + otherwise, . + + + + + Functions that return information about an operating system. + + + + + Gets a value that identifies the operating + system platform. + + The operating system. + + value that identifies the operating system + platform. + + + + + + Gets a object that identifies this operating + system. + + The operating system. + + A object that describes the major version, + minor version, build, and revision of the operating system. + + + + + + Converts the value of the specified operating system to its equivalent + representation. + + The operating system. + + The representation of + . + + + + Output string representation of the current operating system. + + + + ]]> + + If the operating system is Windows 2000, the output is: + + Microsoft Windows NT 5.0.2195.0 + + + + + + + Returns the fully qualified path. + + The file or directory for which to obtain absolute path information. + + A string containing the fully qualified location of , + such as "C:\MyFile.txt". + + is a zero-length string, contains only white space, or contains one or more invalid characters. + contains a colon (":"). + The specified path, file name, or both exceed the system-defined maximum length. + + + + Combines two paths. + + first path + second path + + A string containing the combined paths. If one of the specified paths + is a zero-length string, this method returns the other path. If + contains an absolute path, this method + returns . + + or contain one or more invalid characters. + + + + Changes the extension of the path string. + + The path information to modify. The path cannot contain any of the characters + defined in InvalidPathChars. + The new extension (with a leading period). Specify a null reference + to remove an existing extension from . + + + A string containing the modified path information. + + + On Windows-based desktop platforms, if is + an empty , the path information is returned + unmodified. If has no extension, the returned + path contains + appended to the end of . + + + + For more information see the documentation. + + contains one or more invalid characters. + + + + Returns the directory information for the specified path string. + + The path of a file or directory. + + A containing directory information for + , or an empty if + denotes a root directory, or does not + contain directory information. + + contains invalid characters, is empty, or contains only white spaces. + + + + Returns the extension for the specified path string. + + The path string from which to get the extension. + + A containing the extension of the specified + (including the "."), or an empty + if does not have + extension information. + + contains one or more invalid characters. + + + + Returns the filename for the specified path string. + + The path string from which to obtain the file name and extension. + + + A consisting of the characters after the last + directory character in path. + + + If the last character of is a directory or + volume separator character, an empty is returned. + + + contains one or more invalid characters. + + + + Returns the filename without extension for the specified path string. + + The path of the file. + + A containing the returned + by , minus the last period (.) and all + characters following it. + + contains one or more invalid characters. + + + + Gets the root directory of the specified path. + + The path from which to obtain root directory information. + + A containing the root directory of + , such as "C:\", or an empty + if does not contain root directory information. + + contains invalid characters, or is empty. + + + + Returns a uniquely named zero-byte temporary file on disk and returns the full path to that file. + + + A containing the name of the temporary file. + + + + + Gets the path to the temporary directory. + + + A containing the path information of a + temporary directory. + + + + + Determines whether a path string includes an extension. + + The path to search for an extension. + + . if the characters that follow the last + directory separator or volume separator in the + include a period (.) followed by one or more characters; + otherwise, . + + contains one or more invalid characters. + + + + Determines whether a path string is absolute. + + The path to test. + + if path contains an absolute ; + otherwise, . + + contains one or more invalid characters. + + + + Gets the value of a variable for the specified package. + + The package for which the variable should be retrieved. + The name of the variable. + + The value of variable for the specified + package. + + pkg-config could not be started. + does not exist. + + + + Gets the link flags required to compile the package, including all + its dependencies. + + The package for which the link flags should be retrieved. - if the specified target exists; otherwise, - . + The link flags required to compile the package. - - - Execute target "clean", if it exists. - - - - - - ]]> - - - - - - Gets the name of the target being executed. - - - A that contains the name of the target - being executed. - - No target is being executed. - - - - Checks whether the specified target has already been executed. - - The target to test. - - if the specified target has already been - executed; otherwise, . - - Target does not exist. - - + pkg-config could not be started. + does not exist. + + - Checks whether the specified task exists. + Gets the compile flags required to compile the package, including all + its dependencies. - The task to test. + The package for which the compile flags should be retrieved. - if the specified task exists; otherwise, - . + The pre-processor and compile flags required to compile the package. - - - - Returns the from which the specified task - was loaded. - - The name of the task to get the of. - - The from which the specified task was loaded. - - Task is not available. - - + pkg-config could not be started. + does not exist. + + - Checks whether the specified property exists. + Determines the version of the given package. - The property to test. + The package to get the version of. - if the specified property exists; otherwise, - . + The version of the given package. - - - Execute a set of tasks if the "build.debug" property - exists. - - - - - - - - ]]> - - - - - - Checks whether the specified property is read-only. - - The property to test. - - if the specified property is read-only; - otherwise, . - - - Check whether the "debug" property is read-only. - property::is-readonly('debug') - - Property has not been set. - - - - Checks whether the specified property is a dynamic property. - - The property to test. - - if the specified property is a dynamic - property; otherwise, . - - Property has not been set. - - - Check whether the "debug" property is a dynamic property. - - property::is-dynamic('debug') - - - + pkg-config could not be started. + does not exist. + + - Gets the name of the platform on which NAnt is running. + Determines whether the given package is at least version + . + The package to check. + The version the package should at least have. - The name of the platform on which NAnt is running. + if the given package is at least version + ; otherwise, . - - + pkg-config could not be started. + + - Checks whether NAnt is running on the win32 platform. + Determines whether the given package is exactly version + . + The package to check. + The version the package should have. - if NAnt is running on the win32 platform; - otherwise, . + if the given package is exactly version + ; otherwise, . - - + pkg-config could not be started. + + - Checks whether NAnt is running on unix. + Determines whether the given package is at no newer than version + . + The package to check. + The version the package should maximum have. - if NAnt is running on unix; - otherwise, . + if the given package is at no newer than + version ; otherwise, . - - + pkg-config could not be started. + + - Functions that return information about an operating system. + Determines whether the given package is between two versions. + + The package to check. + The version the package should at least have. + The version the package should maximum have. + + if the given package is between + and ; otherwise, . + + pkg-config could not be started. + + + + Determines whether the given package exists. + + The package to check. + + if the package exists; otherwise, + . + + pkg-config could not be started. + + + + Runs pkg-config with the specified arguments and returns a + based on the exit code. + + The arguments to pass to pkg-config. + + if pkg-config exited with exit code 0; + otherwise, + + + + + Runs pkg-config with the specified arguments and returns the result + as a . - - - - Gets a value that identifies the operating - system platform. - - The operating system. - - value that identifies the operating system - platform. - - - - - - Gets a object that identifies this operating - system. - - The operating system. - - A object that describes the major version, - minor version, build, and revision of the operating system. - - - - - - Converts the value of the specified operating system to its equivalent - representation. - - The operating system. - - The representation of - . - - - - Output string representation of the current operating system. - - - - ]]> - - If the operating system is Windows 2000, the output is: - - Microsoft Windows NT 5.0.2195.0 - - - - - - - Returns the fully qualified path. - - The file or directory for which to obtain absolute path information. - - A string containing the fully qualified location of , - such as "C:\MyFile.txt". - - is a zero-length string, contains only white space, or contains one or more invalid characters. - contains a colon (":"). - The specified path, file name, or both exceed the system-defined maximum length. - - - - Combines two paths. - - first path - second path - - A string containing the combined paths. If one of the specified paths - is a zero-length string, this method returns the other path. If - contains an absolute path, this method - returns . - - or contain one or more invalid characters. - - - - Changes the extension of the path string. - - The path information to modify. The path cannot contain any of the characters - defined in InvalidPathChars. - The new extension (with a leading period). Specify a null reference - to remove an existing extension from . - - - A string containing the modified path information. - - - On Windows-based desktop platforms, if is - an empty , the path information is returned - unmodified. If has no extension, the returned - path contains - appended to the end of . - - - - For more information see the documentation. - - contains one or more invalid characters. - - - - Returns the directory information for the specified path string. - - The path of a file or directory. - - A containing directory information for - , or an empty if - denotes a root directory, or does not - contain directory information. - - contains invalid characters, is empty, or contains only white spaces. - - - - Returns the extension for the specified path string. - - The path string from which to get the extension. - - A containing the extension of the specified - (including the "."), or an empty - if does not have - extension information. - - contains one or more invalid characters. - - - - Returns the filename for the specified path string. - - The path string from which to obtain the file name and extension. - - - A consisting of the characters after the last - directory character in path. - - - If the last character of is a directory or - volume separator character, an empty is returned. - - - contains one or more invalid characters. - - - - Returns the filename without extension for the specified path string. - - The path of the file. - - A containing the returned - by , minus the last period (.) and all - characters following it. - - contains one or more invalid characters. - - - - Gets the root directory of the specified path. - - The path from which to obtain root directory information. - - A containing the root directory of - , such as "C:\", or an empty - if does not contain root directory information. - - contains invalid characters, or is empty. - - - - Returns a uniquely named zero-byte temporary file on disk and returns the full path to that file. - - - A containing the name of the temporary file. - - - - - Gets the path to the temporary directory. - - - A containing the path information of a - temporary directory. - - - - - Determines whether a path string includes an extension. - - The path to search for an extension. - - . if the characters that follow the last - directory separator or volume separator in the - include a period (.) followed by one or more characters; - otherwise, . - - contains one or more invalid characters. - - - - Determines whether a path string is absolute. - - The path to test. - - if path contains an absolute ; - otherwise, . - - contains one or more invalid characters. - - - - Gets the value of a variable for the specified package. - - The package for which the variable should be retrieved. - The name of the variable. - - The value of variable for the specified - package. - - pkg-config could not be started. - does not exist. - - - - Gets the link flags required to compile the package, including all - its dependencies. - - The package for which the link flags should be retrieved. - - The link flags required to compile the package. - - pkg-config could not be started. - does not exist. - - - - Gets the compile flags required to compile the package, including all - its dependencies. - - The package for which the compile flags should be retrieved. - - The pre-processor and compile flags required to compile the package. - - pkg-config could not be started. - does not exist. - - - - Determines the version of the given package. - - The package to get the version of. - - The version of the given package. - - pkg-config could not be started. - does not exist. - - - - Determines whether the given package is at least version - . - - The package to check. - The version the package should at least have. - - if the given package is at least version - ; otherwise, . - - pkg-config could not be started. - - - - Determines whether the given package is exactly version - . - - The package to check. - The version the package should have. - - if the given package is exactly version - ; otherwise, . - - pkg-config could not be started. - - - - Determines whether the given package is at no newer than version - . - - The package to check. - The version the package should maximum have. - - if the given package is at no newer than - version ; otherwise, . - - pkg-config could not be started. - - - - Determines whether the given package is between two versions. - - The package to check. - The version the package should at least have. - The version the package should maximum have. - - if the given package is between - and ; otherwise, . - - pkg-config could not be started. - - - - Determines whether the given package exists. - - The package to check. - - if the package exists; otherwise, - . - - pkg-config could not be started. - - - - Runs pkg-config with the specified arguments and returns a - based on the exit code. - - The arguments to pass to pkg-config. - - if pkg-config exited with exit code 0; - otherwise, - - - - - Runs pkg-config with the specified arguments and returns the result - as a . - - The arguments to pass to pkg-config. - - The result of running pkg-config with the specified arguments. - - - + The arguments to pass to pkg-config. + + The result of running pkg-config with the specified arguments. + + + Factory method to return a new instance of ExecTask - - + + Returns the length of the specified string. @@ -3821,49 +3821,49 @@ string::get-length('') ==> 0 - - - - Returns a substring of the specified string. - - input string - position of the start of the substring - the length of the substring - - - If the is greater than zero, the - function returns a substring starting at character position - with a length of - characters. - - - If the is equal to zero, the function - returns an empty string. - - - or is less than zero. - is greater than the length of . - plus indicates a position not within . - - string::substring('testing string', 0, 4) ==> 'test' - - - string::substring('testing string', 8, 3) ==> 'str' - - - string::substring('testing string', 8, 0) ==> '' - - - string::substring('testing string', -1, 5) ==> ERROR - - - string::substring('testing string', 8, -1) ==> ERROR - - - string::substring('testing string', 5, 17) ==> ERROR - - - + + + + Returns a substring of the specified string. + + input string + position of the start of the substring + the length of the substring + + + If the is greater than zero, the + function returns a substring starting at character position + with a length of + characters. + + + If the is equal to zero, the function + returns an empty string. + + + or is less than zero. + is greater than the length of . + plus indicates a position not within . + + string::substring('testing string', 0, 4) ==> 'test' + + + string::substring('testing string', 8, 3) ==> 'str' + + + string::substring('testing string', 8, 0) ==> '' + + + string::substring('testing string', -1, 5) ==> ERROR + + + string::substring('testing string', 8, -1) ==> ERROR + + + string::substring('testing string', 5, 17) ==> ERROR + + + Tests whether the specified string starts with the specified prefix string. @@ -3892,8 +3892,8 @@ string::starts-with('test', 'testing string') ==> false - - + + Tests whether the specified string ends with the specified suffix string. @@ -3922,8 +3922,8 @@ string::ends-with('string', 'testing string') ==> false - - + + Returns the specified string converted to lowercase. @@ -3944,8 +3944,8 @@ string::to-lower('Test 123') ==> 'test 123' - - + + Returns the specified string converted to uppercase. @@ -3966,39 +3966,39 @@ string::to-upper('Test 123') ==> 'TEST 123' - - - - Returns a string corresponding to the replacement of a given string - with another in the specified string. - - input string - A to be replaced. - A to replace all occurrences of . - - A equivalent to but - with all instances of replaced with - . - - is an empty string. - - This function performs a word (case-sensitive and culture-sensitive) - search to find . - - - string::replace('testing string', 'test', 'winn') ==> 'winning string' - - - string::replace('testing string', 'foo', 'winn') ==> 'testing string' - - - string::replace('testing string', 'ing', '') ==> 'test str' - - - string::replace('banana', 'ana', 'ana') ==> 'banana' - - - + + + + Returns a string corresponding to the replacement of a given string + with another in the specified string. + + input string + A to be replaced. + A to replace all occurrences of . + + A equivalent to but + with all instances of replaced with + . + + is an empty string. + + This function performs a word (case-sensitive and culture-sensitive) + search to find . + + + string::replace('testing string', 'test', 'winn') ==> 'winning string' + + + string::replace('testing string', 'foo', 'winn') ==> 'testing string' + + + string::replace('testing string', 'ing', '') ==> 'test str' + + + string::replace('banana', 'ana', 'ana') ==> 'banana' + + + Tests whether the specified string contains the given search string. @@ -4024,8 +4024,8 @@ string::contains('testing string', 'foo') ==> false - - + + Returns the position of the first occurrence in the specified string of the given search string. @@ -4059,8 +4059,8 @@ string::index-of('testing string', 'ing') ==> 4 - - + + Returns the position of the last occurrence in the specified string of the given search string. @@ -4094,72 +4094,72 @@ string::last-index-of('testing string', 'ing') ==> 11 - - - - Returns the given string left-padded to the given length. - - The that needs to be left-padded. - The number of characters in the resulting string, equal to the number of original characters plus any additional padding characters. - A Unicode padding character. - - If the length of is at least - , then a new identical - to is returned. Otherwise, - will be padded on the left with as many - characters as needed to create a length of . - - is less than zero. - - Note that only the first character of - will be used when padding the result. - - - string::pad-left('test', 10, ' ') ==> ' test' - - - string::pad-left('test', 10, 'test') ==> 'tttttttest' - - - string::pad-left('test', 3, ' ') ==> 'test' - - - string::pad-left('test', -4, ' ') ==> ERROR - - - - - Returns the given string right-padded to the given length. - - The that needs to be right-padded. - The number of characters in the resulting string, equal to the number of original characters plus any additional padding characters. - A Unicode padding character. - - If the length of is at least - , then a new identical - to is returned. Otherwise, - will be padded on the right with as many - characters as needed to create a length of . - - is less than zero. - - Note that only the first character of - will be used when padding the result. - - - string::pad-right('test', 10, ' ') ==> 'test ' - - - string::pad-right('test', 10, 'abcd') ==> 'testaaaaaa' - - - string::pad-right('test', 3, ' ') ==> 'test' - - - string::pad-right('test', -3, ' ') ==> ERROR - - - + + + + Returns the given string left-padded to the given length. + + The that needs to be left-padded. + The number of characters in the resulting string, equal to the number of original characters plus any additional padding characters. + A Unicode padding character. + + If the length of is at least + , then a new identical + to is returned. Otherwise, + will be padded on the left with as many + characters as needed to create a length of . + + is less than zero. + + Note that only the first character of + will be used when padding the result. + + + string::pad-left('test', 10, ' ') ==> ' test' + + + string::pad-left('test', 10, 'test') ==> 'tttttttest' + + + string::pad-left('test', 3, ' ') ==> 'test' + + + string::pad-left('test', -4, ' ') ==> ERROR + + + + + Returns the given string right-padded to the given length. + + The that needs to be right-padded. + The number of characters in the resulting string, equal to the number of original characters plus any additional padding characters. + A Unicode padding character. + + If the length of is at least + , then a new identical + to is returned. Otherwise, + will be padded on the right with as many + characters as needed to create a length of . + + is less than zero. + + Note that only the first character of + will be used when padding the result. + + + string::pad-right('test', 10, ' ') ==> 'test ' + + + string::pad-right('test', 10, 'abcd') ==> 'testaaaaaa' + + + string::pad-right('test', 3, ' ') ==> 'test' + + + string::pad-right('test', -3, ' ') ==> ERROR + + + Returns the given string trimmed of whitespace. @@ -4174,8 +4174,8 @@ string::trim('\t\tfoo \r\n') ==> 'foo' - - + + Returns the given string trimmed of leading whitespace. @@ -4188,452 +4188,452 @@ string::trim-start(' test ') ==> 'test ' - string::trim-start('\t\tfoo \r\n') ==> 'foo \r\n' + string::trim-start('\t\tfoo \r\n') ==> 'foo \r\n' + + + + + Returns the given string trimmed of trailing whitespace. + + input string + + The string with any trailing + white space characters removed. + + + string::trim-end(' test ') ==> ' test' + + + string::trim-end('\t\tfoo \r\n') ==> '\t\tfoo' + + + + + Returns the total number of days represented by the specified + , expressed in whole and fractional days. + + A . + + The total number of days represented by the given . + + + + + Returns the total number of hours represented by the specified + , expressed in whole and fractional hours. + + A . + + The total number of hours represented by the given . + + + + + Returns the total number of minutes represented by the specified + , expressed in whole and fractional minutes. + + A . + + The total number of minutes represented by the given . + + + + + Returns the total number of seconds represented by the specified + , expressed in whole and fractional seconds. + + A . + + The total number of seconds represented by the given . + + + + + Returns the total number of milliseconds represented by the specified + , expressed in whole and fractional milliseconds. + + A . + + The total number of milliseconds represented by the given + . + + + + + Returns the number of whole days represented by the specified + . + + A . + + The number of whole days represented by the given + . + + + + Remove all files that have not been modified in the last 7 days from directory "binaries". + + + + + + + ]]> + + + + + + Returns the number of whole hours represented by the specified + . + + A . + + The number of whole hours represented by the given + . + + + + + Returns the number of whole minutes represented by the specified + . + + A . + + The number of whole minutes represented by the given + . + + + + + Returns the number of whole seconds represented by the specified + . + + A . + + The number of whole seconds represented by the given + . + + + + + Returns the number of whole milliseconds represented by the specified + . + + A . + + The number of whole milliseconds represented by the given + . + + + + + Returns the number of ticks contained in the specified + . + + A . + + The number of ticks contained in the given . + + + + + Returns a that represents a specified number + of days, where the specification is accurate to the nearest millisecond. + + A number of days, accurate to the nearest millisecond. + + A that represents . + + + + + Returns a that represents a specified number + of hours, where the specification is accurate to the nearest + millisecond. + + A number of hours, accurate to the nearest millisecond. + + A that represents . + + + + + Returns a that represents a specified number + of minutes, where the specification is accurate to the nearest + millisecond. + + A number of minutes, accurate to the nearest millisecond. + + A that represents . + + + + + Returns a that represents a specified number + of seconds, where the specification is accurate to the nearest + millisecond. + + A number of seconds, accurate to the nearest millisecond. + + A that represents . + + + + + Returns a that represents a specified number + of milliseconds. + + A number of milliseconds. + + A that represents . + + + + + Returns a that represents a specified time, + where the specification is in units of ticks. + + A number of ticks that represent a time. + + A that represents . + + + + + Constructs a from a time indicated by a + specified string. + + A string. + + A that corresponds to . + + has an invalid format. + At least one of the hours, minutes, or seconds components is outside its valid range. + + + + Converts the specified to its equivalent + string representation. + + A to convert. + + The string representation of . The format + of the return value is of the form: [-][d.]hh:mm:ss[.ff]. + + + + + Gets the value of the major component of a given version. + + A version. + + The major version number. + + + + + + + + Gets the value of the minor component of a given version. + + A version. + + The minor version number. + + + + + + + + Gets the value of the build component of a given version. + + A version. + + The build number, or -1 if the build number is undefined. + + + + + + + + Gets the value of the revision component of a given version. + + A version. + + The revision number, or -1 if the revision number is undefined. + + + + + + + + Converts the specified string representation of a version to + its equivalent. + + A string containing the major, minor, build, and revision numbers, where each number is delimited with a period character ('.'). + + A instance representing the specified + . + + has fewer than two components or more than four components. + A major, minor, build, or revision component is less than zero. + At least one component of does not parse to a decimal integer. + + + + Converts the specified to its equivalent + string representation. + + A to convert. + + The string representation of the values of the major, minor, build, + and revision components of the specified . + + + + + + + + Changes the file attributes of a file or set of files and directories. + + + + does not have the concept of turning + attributes off. Instead you specify all the attributes that you want + turned on and the rest are turned off by default. + + + Refer to the enumeration in the .NET SDK + for more information about file attributes. + + + + + Set the read-only file attribute for the specified file in + the project directory. + + + + ]]> + - - - - Returns the given string trimmed of trailing whitespace. - - input string - - The string with any trailing - white space characters removed. - - string::trim-end(' test ') ==> ' test' + + Set the normal file attribute for the specified file. + + + + ]]> + - string::trim-end('\t\tfoo \r\n') ==> '\t\tfoo' + + Set the normal file attribute for all executable files in + the current project directory and sub-directories. + + + + + + + + + ]]> + - - - - Returns the total number of days represented by the specified - , expressed in whole and fractional days. - - A . - - The total number of days represented by the given . - - - - - Returns the total number of hours represented by the specified - , expressed in whole and fractional hours. - - A . - - The total number of hours represented by the given . - - - - - Returns the total number of minutes represented by the specified - , expressed in whole and fractional minutes. - - A . - - The total number of minutes represented by the given . - - - - - Returns the total number of seconds represented by the specified - , expressed in whole and fractional seconds. - - A . - - The total number of seconds represented by the given . - - - - - Returns the total number of milliseconds represented by the specified - , expressed in whole and fractional milliseconds. - - A . - - The total number of milliseconds represented by the given - . - - - - - Returns the number of whole days represented by the specified - . - - A . - - The number of whole days represented by the given - . - - - - Remove all files that have not been modified in the last 7 days from directory "binaries". - - - - - - - ]]> - - - - - - Returns the number of whole hours represented by the specified - . - - A . - - The number of whole hours represented by the given - . - - - - - Returns the number of whole minutes represented by the specified - . - - A . - - The number of whole minutes represented by the given - . - - - - - Returns the number of whole seconds represented by the specified - . - - A . - - The number of whole seconds represented by the given - . - - - - - Returns the number of whole milliseconds represented by the specified - . - - A . - - The number of whole milliseconds represented by the given - . - - - - - Returns the number of ticks contained in the specified - . - - A . - - The number of ticks contained in the given . - - - - - Returns a that represents a specified number - of days, where the specification is accurate to the nearest millisecond. - - A number of days, accurate to the nearest millisecond. - - A that represents . - - - - - Returns a that represents a specified number - of hours, where the specification is accurate to the nearest - millisecond. - - A number of hours, accurate to the nearest millisecond. - - A that represents . - - - - - Returns a that represents a specified number - of minutes, where the specification is accurate to the nearest - millisecond. - - A number of minutes, accurate to the nearest millisecond. - - A that represents . - - - - - Returns a that represents a specified number - of seconds, where the specification is accurate to the nearest - millisecond. - - A number of seconds, accurate to the nearest millisecond. - - A that represents . - - - - - Returns a that represents a specified number - of milliseconds. - - A number of milliseconds. - - A that represents . - - - - - Returns a that represents a specified time, - where the specification is in units of ticks. - - A number of ticks that represent a time. - - A that represents . - - - - - Constructs a from a time indicated by a - specified string. - - A string. - - A that corresponds to . - - has an invalid format. - At least one of the hours, minutes, or seconds components is outside its valid range. - - - - Converts the specified to its equivalent - string representation. - - A to convert. - - The string representation of . The format - of the return value is of the form: [-][d.]hh:mm:ss[.ff]. - - - - - Gets the value of the major component of a given version. - - A version. - - The major version number. - - - - - - - - Gets the value of the minor component of a given version. - - A version. - - The minor version number. - - - - - - - - Gets the value of the build component of a given version. - - A version. - - The build number, or -1 if the build number is undefined. - - - - - - - - Gets the value of the revision component of a given version. - - A version. - - The revision number, or -1 if the revision number is undefined. - - - - - - - - Converts the specified string representation of a version to - its equivalent. - - A string containing the major, minor, build, and revision numbers, where each number is delimited with a period character ('.'). - - A instance representing the specified - . - - has fewer than two components or more than four components. - A major, minor, build, or revision component is less than zero. - At least one component of does not parse to a decimal integer. - - - - Converts the specified to its equivalent - string representation. - - A to convert. - - The string representation of the values of the major, minor, build, - and revision components of the specified . - - - - - - - - Changes the file attributes of a file or set of files and directories. - - - - does not have the concept of turning - attributes off. Instead you specify all the attributes that you want - turned on and the rest are turned off by default. - - - Refer to the enumeration in the .NET SDK - for more information about file attributes. - - - - - Set the read-only file attribute for the specified file in - the project directory. - - - - ]]> - - - - - Set the normal file attribute for the specified file. - - - - ]]> - - - - - Set the normal file attribute for all executable files in - the current project directory and sub-directories. - - - - - - - - - ]]> - - - - + + Provides the abstract base class for tasks. A task is a piece of code that can be executed. - - + + Executes the task unless it is skipped. - - - - Logs a message with the given priority. - - The message priority at which the specified message is to be logged. - The message to be logged. - - - The actual logging is delegated to the project. - - - If the attribute is set on the task and a - message is logged with level , the - priority of the message will be increased to - when the threshold of the build log is . - - - This will allow individual tasks to run in verbose mode while - the build log itself is still configured with threshold - . - - - The threshold of the project is not taken into account to determine - whether a message should be passed to the logging infrastructure, - as build listeners might be interested in receiving all messages. - - - - - - Logs a formatted message with the given priority. - - The message priority at which the specified message is to be logged. - The message to log, containing zero or more format items. - An array containing zero or more objects to format. - - - The actual logging is delegated to the project. - - - If the attribute is set on the task and a - message is logged with level , the - priority of the message will be increased to . - when the threshold of the build log is . - - - This will allow individual tasks to run in verbose mode while - the build log itself is still configured with threshold - . - - - - - - Determines whether build output is enabled for the given - . - - The to check. - - if messages with the given - should be passed on to the logging infrastructure; otherwise, - . - - - The threshold of the project is not taken into account to determine - whether a message should be passed to the logging infrastructure, - as build listeners might be interested in receiving all messages. - - - + + + + Logs a message with the given priority. + + The message priority at which the specified message is to be logged. + The message to be logged. + + + The actual logging is delegated to the project. + + + If the attribute is set on the task and a + message is logged with level , the + priority of the message will be increased to + when the threshold of the build log is . + + + This will allow individual tasks to run in verbose mode while + the build log itself is still configured with threshold + . + + + The threshold of the project is not taken into account to determine + whether a message should be passed to the logging infrastructure, + as build listeners might be interested in receiving all messages. + + + + + + Logs a formatted message with the given priority. + + The message priority at which the specified message is to be logged. + The message to log, containing zero or more format items. + An array containing zero or more objects to format. + + + The actual logging is delegated to the project. + + + If the attribute is set on the task and a + message is logged with level , the + priority of the message will be increased to . + when the threshold of the build log is . + + + This will allow individual tasks to run in verbose mode while + the build log itself is still configured with threshold + . + + + + + + Determines whether build output is enabled for the given + . + + The to check. + + if messages with the given + should be passed on to the logging infrastructure; otherwise, + . + + + The threshold of the project is not taken into account to determine + whether a message should be passed to the logging infrastructure, + as build listeners might be interested in receiving all messages. + + + Initializes the configuration of the task using configuration settings retrieved from the NAnt configuration file. @@ -4643,17 +4643,17 @@ available for loading the default values from the configuration file if a build element is constructed from code. - - + + Initializes the task. - - + + Initializes the task. - - + + Executes the task. - - + + Locates the XML node for the specified attribute in either the configuration section of the extension assembly or the.project. @@ -4671,736 +4671,736 @@ configuration node can be located in that section, the framework-neutral section of the project configuration node will be searched. - - + + Determines if task failure stops the build, or is just reported. The default is . - - + + Determines whether the task should report detailed build log messages. The default is . - - + + If then the task will be executed; otherwise, skipped. The default is . - - - - Opposite of . If - then the task will be executed; otherwise, skipped. The default is - . - - - + + + + Opposite of . If + then the task will be executed; otherwise, skipped. The default is + . + + + The name of the task. - - + + The prefix used when sending messages to the log. - - - - Gets or sets the log threshold for this . By - default the threshold of a task is , - causing no messages to be filtered in the task itself. - - - The log threshold level for this . - - - When the threshold of a is higher than the - threshold of the , then all messages will - still be delivered to the build listeners. - - - - - Returns the TaskBuilder used to construct an instance of this - . - - - + + + + Gets or sets the log threshold for this . By + default the threshold of a task is , + causing no messages to be filtered in the task itself. + + + The log threshold level for this . + + + When the threshold of a is higher than the + threshold of the , then all messages will + still be delivered to the build listeners. + + + + + Returns the TaskBuilder used to construct an instance of this + . + + + The name of the file which will have its attributes set. This is provided as an alternate to using the task's fileset. - - + + All the matching files and directories in this fileset will have their attributes set. - - + + Set the archive attribute. The default is . - - + + Set the hidden attribute. The default is . - - + + Set the normal file attributes. This attribute is only valid if used alone. The default is . - - + + Set the read-only attribute. The default is . - - + + Set the system attribute. The default is . - - - - Checks if a resource is available at runtime. - - - - The specified property is set to if the - requested resource is available at runtime, and - if the resource is not available. - - - we advise you to use the following functions instead: - - - - Function - Description - - - - Determines whether the specified file exists. - - - - Determines whether the given path refers to an existing directory on disk. - - - - Checks whether the specified framework exists.. - - - - Checks whether the SDK for the specified framework is installed. - - - - - - Sets the myfile.present property to if the - file is available on the filesystem and if the - file is not available. - - - - ]]> - - - - - Sets the build.dir.present property to - if the directory is available on the filesystem and - if the directory is not available. - - - - ]]> - - - - - Sets the mono-0.21.framework.present property to - if the Mono 0.21 framework is available on the current system and - if the framework is not available. - - - - ]]> - - - - - Sets the net-1.1.frameworksdk.present property to - if the .NET 1.1 Framework SDK is available on the current system and - if the SDK is not available. - - - - ]]> - - - - - - Executes the task. - - - - Sets the property identified by to - when the resource exists and to - when the resource doesn't exist. - - - The availability of the resource could not be evaluated. - - - - Evaluates the availability of a resource. - - - if the resource is available; otherwise, - . - - The availability of the resource could not be evaluated. - - - - Checks if the file specified in the property is - available on the filesystem. - - - when the file exists; otherwise, . - - - - - Checks if the directory specified in the - property is available on the filesystem. - - - when the directory exists; otherwise, . - - - - - Checks if the framework specified in the - property is available on the current system. - - - when the framework is available; otherwise, - . - - - - - Checks if the SDK for the framework specified in the - property is available on the current system. - - - when the SDK for the specified framework is - available; otherwise, . - - - + + + + Checks if a resource is available at runtime. + + + + The specified property is set to if the + requested resource is available at runtime, and + if the resource is not available. + + + we advise you to use the following functions instead: + + + + Function + Description + + + + Determines whether the specified file exists. + + + + Determines whether the given path refers to an existing directory on disk. + + + + Checks whether the specified framework exists.. + + + + Checks whether the SDK for the specified framework is installed. + + + + + + Sets the myfile.present property to if the + file is available on the filesystem and if the + file is not available. + + + + ]]> + + + + + Sets the build.dir.present property to + if the directory is available on the filesystem and + if the directory is not available. + + + + ]]> + + + + + Sets the mono-0.21.framework.present property to + if the Mono 0.21 framework is available on the current system and + if the framework is not available. + + + + ]]> + + + + + Sets the net-1.1.frameworksdk.present property to + if the .NET 1.1 Framework SDK is available on the current system and + if the SDK is not available. + + + + ]]> + + + + + + Executes the task. + + + + Sets the property identified by to + when the resource exists and to + when the resource doesn't exist. + + + The availability of the resource could not be evaluated. + + + + Evaluates the availability of a resource. + + + if the resource is available; otherwise, + . + + The availability of the resource could not be evaluated. + + + + Checks if the file specified in the property is + available on the filesystem. + + + when the file exists; otherwise, . + + + + + Checks if the directory specified in the + property is available on the filesystem. + + + when the directory exists; otherwise, . + + + + + Checks if the framework specified in the + property is available on the current system. + + + when the framework is available; otherwise, + . + + + + + Checks if the SDK for the framework specified in the + property is available on the current system. + + + when the SDK for the specified framework is + available; otherwise, . + + + The resource which must be available. - - + + The type of resource which must be present. - - + + The property that must be set if the resource is available. - - + + Defines the possible resource checks. - - + + Determines whether a given file exists. - - + + Determines whether a given directory exists. - - + + Determines whether a given framework is available. - - + + Determines whether a given SDK is available. - - - - Calls a NAnt target in the current project. - - - - When the is used to execute a target, both that - target and all its dependent targets will be re-executed. - - - To avoid dependent targets from being executed more than once, two - options are available: - - - - - Add an "unless" attribute with value "${target::has-executed('<target name>')}" - to the dependent targets. - - - - - Set the attribute on the - to (recommended). - - - - - - - Call the target "build". - - - - ]]> - - - - - This shows how a project could 'compile' a debug and release build - using a common compile target. - - - - - - - - - - - - - - - - - - ]]> - - - The parameter of the - defaults to , - causing the "init" target to be executed for both - the "debug" and "release" build. - - - This results in the following build log: - - - build: - - init: - [echo] initializing - - compile: - - [echo] compiling with debug = false - - init: - - [echo] initializing - - compile: - - [echo] compiling with debug = true - - BUILD SUCCEEDED - - - If the "init" should only be executed once, set the - attribute of the - to . - - - The build log would then look like this: - - - build: - - init: - [echo] initializing - - compile: - - [echo] compiling with debug = false - - compile: - - [echo] compiling with debug = true - - BUILD SUCCEEDED - - - - + + + + Calls a NAnt target in the current project. + + + + When the is used to execute a target, both that + target and all its dependent targets will be re-executed. + + + To avoid dependent targets from being executed more than once, two + options are available: + + + + + Add an "unless" attribute with value "${target::has-executed('<target name>')}" + to the dependent targets. + + + + + Set the attribute on the + to (recommended). + + + + + + + Call the target "build". + + + + ]]> + + + + + This shows how a project could 'compile' a debug and release build + using a common compile target. + + + + + + + + + + + + + + + + + + ]]> + + + The parameter of the + defaults to , + causing the "init" target to be executed for both + the "debug" and "release" build. + + + This results in the following build log: + + + build: + + init: + [echo] initializing + + compile: + + [echo] compiling with debug = false + + init: + + [echo] initializing + + compile: + + [echo] compiling with debug = true + + BUILD SUCCEEDED + + + If the "init" should only be executed once, set the + attribute of the + to . + + + The build log would then look like this: + + + build: + + init: + [echo] initializing + + compile: + + [echo] compiling with debug = false + + compile: + + [echo] compiling with debug = true + + BUILD SUCCEEDED + + + + Executes the specified target. - - - - Makes sure the is not calling its own - parent. - - - + + + + Makes sure the is not calling its own + parent. + + + NAnt target to call. - - + + Force an execute even if the target has already been executed. The default is . - - + + Execute the specified targets dependencies -- even if they have been previously executed. The default is . - - - - Copies a file or set of files to a new file or directory. - - - - Files are only copied if the source file is newer than the destination - file, or if the destination file does not exist. However, you can - explicitly overwrite files with the attribute. - - - When a is used to select files to copy, the - attribute must be set. Files that are - located under the base directory of the will - be copied to a directory under the destination directory matching the - path relative to the base directory of the , - unless the attribute is set to - . - - - Files that are not located under the the base directory of the - will be copied directly under to the destination - directory, regardless of the value of the - attribute. - -

Encoding

- - Unless an encoding is specified, the encoding associated with the - system's current ANSI code page is used. - - - An UTF-8, little-endian Unicode, and big-endian Unicode encoded text - file is automatically recognized, if the file starts with the - appropriate byte order marks. - - - If you employ filters in your copy operation, you should limit the copy - to text files. Binary files will be corrupted by the copy operation. - -
- - - Copy a single file while changing its encoding from "latin1" to - "utf-8". - - - - ]]> - - - - Copy a set of files to a new directory. - - - - - - - ]]> - - - - - Copy a set of files to a directory, replacing @TITLE@ with - "Foo Bar" in all files. - - - - - - - - - - - - - ]]> - - -
- - - Initialize new instance of the . - - - + + + + Copies a file or set of files to a new file or directory. + + + + Files are only copied if the source file is newer than the destination + file, or if the destination file does not exist. However, you can + explicitly overwrite files with the attribute. + + + When a is used to select files to copy, the + attribute must be set. Files that are + located under the base directory of the will + be copied to a directory under the destination directory matching the + path relative to the base directory of the , + unless the attribute is set to + . + + + Files that are not located under the the base directory of the + will be copied directly under to the destination + directory, regardless of the value of the + attribute. + +

Encoding

+ + Unless an encoding is specified, the encoding associated with the + system's current ANSI code page is used. + + + An UTF-8, little-endian Unicode, and big-endian Unicode encoded text + file is automatically recognized, if the file starts with the + appropriate byte order marks. + + + If you employ filters in your copy operation, you should limit the copy + to text files. Binary files will be corrupted by the copy operation. + +
+ + + Copy a single file while changing its encoding from "latin1" to + "utf-8". + + + + ]]> + + + + Copy a set of files to a new directory. + + + + + + + ]]> + + + + + Copy a set of files to a directory, replacing @TITLE@ with + "Foo Bar" in all files. + + + + + + + + + + + + + ]]> + + +
+ + + Initialize new instance of the . + + + Checks whether the task is initialized with valid attributes. - - - - Executes the Copy task. - - A file that has to be copied does not exist or could not be copied. - - + + + + Executes the Copy task. + + A file that has to be copied does not exist or could not be copied. + + Actually does the file copies. - - + + The file to copy. - - + + The file to copy to. - - + + The directory to copy to. - - + + Overwrite existing files even if the destination files are newer. The default is . - - - - Ignore directory structure of source directory, copy all files into - a single directory, specified by the - attribute. The default is . - - - - - Copy any empty directories included in the . - The default is . - - - - - Used to select the files to copy. To use a , - the attribute must be set. - - - + + + + Ignore directory structure of source directory, copy all files into + a single directory, specified by the + attribute. The default is . + + + + + Copy any empty directories included in the . + The default is . + + + + + Used to select the files to copy. To use a , + the attribute must be set. + + + Chain of filters used to alter the file's content as it is copied. - - + + The encoding to use when reading files. The default is the system's current ANSI code page. - - + + The encoding to use when writing the files. The default is the encoding of the input file. - - - - The set of files to perform a file operation on. - - - - The key of the is the absolute path of - the destination file and the value is a - holding the path and last write time of the most recently updated - source file that is selected to be copied or moved to the - destination file. - - - On Windows, the is case-insensitive. - - - - + + + + The set of files to perform a file operation on. + + + + The key of the is the absolute path of + the destination file and the value is a + holding the path and last write time of the most recently updated + source file that is selected to be copied or moved to the + destination file. + + + On Windows, the is case-insensitive. + + + + Holds the absolute paths and last write time of a given file. - - - - Initializes a new instance of the - class for the specified file and last write time. - - The absolute path of the file. - The last write time of the file. - - + + + + Initializes a new instance of the + class for the specified file and last write time. + + The absolute path of the file. + The last write time of the file. + + Gets the absolute path of the current file. The absolute path of the current file. - - + + Gets the time when the current file was last written to. The time when the current file was last written to. - - - - Deletes a file, fileset or directory. - - - - Deletes either a single file, all files in a specified directory and - its sub-directories, or a set of files specified by one or more filesets. - - - If the or attribute is - set then the fileset contents will be ignored. To delete the files - in the fileset ommit the and - attributes in the <delete> element. - - - If the specified file or directory does not exist, no error is - reported. - - - Read-only files cannot be deleted. Use the - first to remove the read-only attribute. - - - - Delete a single file. - - - ]]> - - - - - Delete a directory and the contents within. If the directory does not - exist, no error is reported. - - - - ]]> - - - - - Delete a set of files. - - - - - - - - - ]]> - - - - + + + + Deletes a file, fileset or directory. + + + + Deletes either a single file, all files in a specified directory and + its sub-directories, or a set of files specified by one or more filesets. + + + If the or attribute is + set then the fileset contents will be ignored. To delete the files + in the fileset ommit the and + attributes in the <delete> element. + + + If the specified file or directory does not exist, no error is + reported. + + + Read-only files cannot be deleted. Use the + first to remove the read-only attribute. + + + + Delete a single file. + + + ]]> + + + + + Delete a directory and the contents within. If the directory does not + exist, no error is reported. + + + + ]]> + + + + + Delete a set of files. + + + + + + + + + ]]> + + + + Ensures the supplied attributes are valid. - - + + The file to delete. - - + + The directory to delete. - - - - Remove any empty directories included in the . - The default is . - - - + + + + Remove any empty directories included in the . + The default is . + + + All the files in the file set will be deleted. - - + + Controls whether to show the name of each deleted file or directory. The default is . - - + + An empty task that allows a build file to contain a description. @@ -5412,236 +5412,236 @@ ]]> - - - - Writes a message to the build log or a specified file. - - - - The message can be specified using the attribute - or as inline content. - - - Macros in the message will be expanded. - - - When writing to a file, the attribute is - ignored. - - - - - Writes a message with level to the build log. - - - - ]]> - - - - - Writes a message with expanded macro to the build log. - - - - ]]> - - - - - Functionally equivalent to the previous example. - - - Base build directory = ${nant.project.basedir} - ]]> - - - - - Writes the previous message to a file in the project directory, - overwriting the file if it exists. - - - Base build directory = ${nant.project.basedir} - ]]> - - - - + + + + Writes a message to the build log or a specified file. + + + + The message can be specified using the attribute + or as inline content. + + + Macros in the message will be expanded. + + + When writing to a file, the attribute is + ignored. + + + + + Writes a message with level to the build log. + + + + ]]> + + + + + Writes a message with expanded macro to the build log. + + + + ]]> + + + + + Functionally equivalent to the previous example. + + + Base build directory = ${nant.project.basedir} + ]]> + + + + + Writes the previous message to a file in the project directory, + overwriting the file if it exists. + + + Base build directory = ${nant.project.basedir} + ]]> + + + + Outputs the message to the build log or the specified file. - - + + The message to output. - - + + Gets or sets the inline content that should be output. The inline content that should be output. - - + + The file to write the message to. - - - - Determines whether the should append to the - file, or overwrite it. By default, the file will be overwritten. - - - if output should be appended to the file; - otherwise, . The default is - . - - - - - The logging level with which the message should be output. The default - is . - - - - - Executes a system command. - - - - Use of nested element(s) - is advised over the parameter, as - it supports automatic quoting and can resolve relative to absolute - paths. - - - - Ping "nant.sourceforge.net". - - - - - ]]> - - - - - Execute a java application using IKVM.NET that requires the - Apache FOP jars, and a set of custom jars. - - - - - - - - - - - - - - - - - - - - - ]]> - - - Assuming the base directory of the build file is "c:\ikvm-test" and - the value of the "fop.dist.dir" property is "c:\fop", then the value - of the -cp argument that is passed toikvm.exe is - "c:\ikvm-test\conf;c:\fop\build\fop.jar;conf;c:\fop\lib\xercesImpl-2.2.1.jar;c:\fop\lib\avalon-framework-cvs-20020806.jar;c:\fop\lib\batik.jar;c:\ikvm-test\lib\mylib.jar;c:\ikvm-test\lib\otherlib.zip" - on a DOS-based system. - - - - - - Provides the abstract base class for tasks that execute external applications. - - - - When a is applied to the - deriving class and does not return an - absolute path, then the program to execute will first be searched for - in the location specified by . - - - If the program does not exist in that location, then the list of tool - paths of the current target framework will be scanned in the order in - which they are defined in the NAnt configuration file. - - - - - - Defines the exit code that will be returned by - if the process could not be started, or did not exit (in time). - - - + + + + Determines whether the should append to the + file, or overwrite it. By default, the file will be overwritten. + + + if output should be appended to the file; + otherwise, . The default is + . + + + + + The logging level with which the message should be output. The default + is . + + + + + Executes a system command. + + + + Use of nested element(s) + is advised over the parameter, as + it supports automatic quoting and can resolve relative to absolute + paths. + + + + Ping "nant.sourceforge.net". + + + + + ]]> + + + + + Execute a java application using IKVM.NET that requires the + Apache FOP jars, and a set of custom jars. + + + + + + + + + + + + + + + + + + + + + ]]> + + + Assuming the base directory of the build file is "c:\ikvm-test" and + the value of the "fop.dist.dir" property is "c:\fop", then the value + of the -cp argument that is passed toikvm.exe is + "c:\ikvm-test\conf;c:\fop\build\fop.jar;conf;c:\fop\lib\xercesImpl-2.2.1.jar;c:\fop\lib\avalon-framework-cvs-20020806.jar;c:\fop\lib\batik.jar;c:\ikvm-test\lib\mylib.jar;c:\ikvm-test\lib\otherlib.zip" + on a DOS-based system. + + + + + + Provides the abstract base class for tasks that execute external applications. + + + + When a is applied to the + deriving class and does not return an + absolute path, then the program to execute will first be searched for + in the location specified by . + + + If the program does not exist in that location, then the list of tool + paths of the current target framework will be scanned in the order in + which they are defined in the NAnt configuration file. + + + + + + Defines the exit code that will be returned by + if the process could not be started, or did not exit (in time). + + + Will be used to ensure thread-safe operations. - - - - Starts the external process and captures its output. - - - The external process did not finish within the configured timeout. - -or- - The exit code of the external process indicates a failure. - - - - - Updates the of the specified - . - - The of which the should be updated. - - - - Starts the process and handles errors. - - The that was started. - - + + + + Starts the external process and captures its output. + + + The external process did not finish within the configured timeout. + -or- + The exit code of the external process indicates a failure. + + + + + Updates the of the specified + . + + The of which the should be updated. + + + + Starts the process and handles errors. + + The that was started. + + Reads from the stream until the external program is ended. - - + + Reads from the stream until the external program is ended. - - - - Determines the path of the external program that should be executed. - - - A fully qualifies pathname including the program name. - - The task is not available or not configured for the current framework. - - + + + + Determines the path of the external program that should be executed. + + + A fully qualifies pathname including the program name. + + The task is not available or not configured for the current framework. + + The name of the executable that should be used to launch the external program. @@ -5654,8 +5654,8 @@ If available, the configured value in the NAnt configuration file will be used if no name is specified. - - + + Gets the filename of the external program to start. @@ -5666,16 +5666,16 @@ Override in derived classes to explicitly set the location of the external tool. - - + + Gets the command-line arguments for the external program. The command-line arguments for the external program. - - + + Gets the file to which the standard output should be redirected. @@ -5689,113 +5689,113 @@ to be redirected to a file. Deriving classes should override this property to change this behaviour. - - - - Gets a value indicating whether output will be appended to the - . - - - if output should be appended to the ; - otherwise, . - - - + + + + Gets a value indicating whether output will be appended to the + . + + + if output should be appended to the ; + otherwise, . + + + Gets the working directory for the application. The working directory for the application. - - + + The maximum amount of time the application is allowed to execute, expressed in milliseconds. Defaults to no time-out. - - + + The command-line arguments for the external program. - - - - Specifies whether the external program is a managed application - which should be executed using a runtime engine, if configured. - The default is . - - - if the external program should be executed - using a runtime engine; otherwise, . - - - - The value of is only used from - , and then only if its value is set to - . In which case - returns - if is . - - - In all other cases, the value of - is ignored. - - - - - - Specifies whether the external program should be treated as a managed - application, possibly forcing it to be executed under the currently - targeted version of the CLR. - - - A indicating how the program should - be treated. - - - - If is set to , - which is the default value, and is - then - is returned. - - - When the changing to , - then is set to ; - otherwise, it is changed to . - - - - - - Gets or sets the to which standard output - messages of the external program will be written. - - - The to which standard output messages of - the external program will be written. - - - By default, standard output messages wil be written to the build log - with level . - - - - - Gets or sets the to which error output - of the external program will be written. - - - The to which error output of the external - program will be written. - - - By default, error output wil be written to the build log with level - . - - - + + + + Specifies whether the external program is a managed application + which should be executed using a runtime engine, if configured. + The default is . + + + if the external program should be executed + using a runtime engine; otherwise, . + + + + The value of is only used from + , and then only if its value is set to + . In which case + returns + if is . + + + In all other cases, the value of + is ignored. + + + + + + Specifies whether the external program should be treated as a managed + application, possibly forcing it to be executed under the currently + targeted version of the CLR. + + + A indicating how the program should + be treated. + + + + If is set to , + which is the default value, and is + then + is returned. + + + When the changing to , + then is set to ; + otherwise, it is changed to . + + + + + + Gets or sets the to which standard output + messages of the external program will be written. + + + The to which standard output messages of + the external program will be written. + + + By default, standard output messages wil be written to the build log + with level . + + + + + Gets or sets the to which error output + of the external program will be written. + + + The to which error output of the external + program will be written. + + + By default, error output wil be written to the build log with level + . + + + Gets the value that the process specified when it terminated. @@ -5804,36 +5804,36 @@ or -1000 if the process could not be started or did not exit (in time). - - + + Gets the unique identifier for the spawned application. - - + + Gets or sets a value indicating whether the application should be spawned. If you spawn an application, its output will not be logged by NAnt. The default is . - - + + Gets the command-line arguments, separated by spaces. - - - - Performs additional checks after the task has been initialized. - - does not hold a valid file name. - - + + + + Performs additional checks after the task has been initialized. + + does not hold a valid file name. + + Executes the external program. - - + + The program to execute without command arguments. @@ -5841,21 +5841,21 @@ The path will not be evaluated to a full path using the project base directory. - - - - The command-line arguments for the program. These will be - passed as is to the external program. When quoting is necessary, - these must be explictly set as part of the value. Consider using - nested elements instead. - - - + + + + The command-line arguments for the program. These will be + passed as is to the external program. When quoting is necessary, + these must be explictly set as part of the value. Consider using + nested elements instead. + + + Environment variables to pass to the program. - - + + The directory in which the command will be executed. @@ -5869,21 +5869,21 @@ base directory if it is relative. - - - - - The name of a property in which the exit code of the program should - be stored. Only of interest if is - . - - - If the exit code of the program is "-1000" then the program could - not be started, or did not exit (in time). - - - - + + + + + The name of a property in which the exit code of the program should + be stored. Only of interest if is + . + + + If the exit code of the program is "-1000" then the program could + not be started, or did not exit (in time). + + + + Specifies whether the external program should be executed using a runtime engine, if configured. The default is . @@ -5892,8 +5892,8 @@ if the external program should be executed using a runtime engine; otherwise, . - - + + Specifies whether the external program is a managed application which should be executed using a runtime engine, if configured. @@ -5903,472 +5903,472 @@ if the external program should be executed using a runtime engine; otherwise, . - - + + Gets the filename of the external program to start. The filename of the external program. - - + + + + Gets the command-line arguments for the external program. + + + The command-line arguments for the external program. + + + + + The directory the program is in. + + + + The directory the program is in. The default is the project's base + directory. + + + The basedir will be evaluated relative to the project's base + directory if it is relative. + + + + + + The file to which the standard output will be redirected. + + + By default, the standard output is redirected to the console. + + + + + Gets or sets a value indicating whether output should be appended + to the output file. The default is . + + + if output should be appended to the ; + otherwise, . + + + + + Gets or sets a value indicating whether the application should be + spawned. If you spawn an application, its output will not be logged + by NAnt. The default is . + + + + + The name of a property in which the unique identifier of the spawned + application should be stored. Only of interest if + is . + + + + + Exits the current build by throwing a , + optionally printing additional information. + + + + The cause of the build failure can be specified using the + attribute or as inline content. + + + Macros in the message will be expanded. + + + + Exits the current build without giving further information. + + + ]]> + + + + Exits the current build and writes a message to the build log. + + + ]]> + + + + Functionally equivalent to the previous example. + + Something wrong here. + ]]> + + + + - Gets the command-line arguments for the external program. + A message giving further information on why the build exited. - - The command-line arguments for the external program. - - - + + Inline content and are mutually exclusive. + + + - The directory the program is in. + Gets or sets the inline content that should be output in the build + log, giving further information on why the build exited. - - The directory the program is in. The default is the project's base - directory. + The inline content that should be output in the build log. - - The basedir will be evaluated relative to the project's base - directory if it is relative. - + + Inline content and are mutually exclusive. - - + + - The file to which the standard output will be redirected. + Gets a particular file from a URL source. - By default, the standard output is redirected to the console. + + Options include verbose reporting and timestamp based fetches. + + + Currently, only HTTP and UNC protocols are supported. FTP support may + be added when more pluggable protocols are added to the System.Net + assembly. + + + The option enables you to control downloads + so that the remote file is only fetched if newer than the local copy. + If there is no local copy, the download always takes place. When a file + is downloaded, the timestamp of the downloaded file is set to the remote + timestamp. + + + This timestamp facility only works on downloads using the HTTP protocol. + - - - - Gets or sets a value indicating whether output should be appended - to the output file. The default is . - - - if output should be appended to the ; - otherwise, . - - - - - Gets or sets a value indicating whether the application should be - spawned. If you spawn an application, its output will not be logged - by NAnt. The default is . - - - - - The name of a property in which the unique identifier of the spawned - application should be stored. Only of interest if - is . - - - - - Exits the current build by throwing a , - optionally printing additional information. - - - - The cause of the build failure can be specified using the - attribute or as inline content. - - - Macros in the message will be expanded. - - - - Exits the current build without giving further information. - - - ]]> - - - - Exits the current build and writes a message to the build log. - - - ]]> - - - - Functionally equivalent to the previous example. - - Something wrong here. - ]]> - - - - - - A message giving further information on why the build exited. - - - Inline content and are mutually exclusive. - - - - - Gets or sets the inline content that should be output in the build - log, giving further information on why the build exited. - - - The inline content that should be output in the build log. - - - Inline content and are mutually exclusive. - - - - - Gets a particular file from a URL source. - - - - Options include verbose reporting and timestamp based fetches. - - - Currently, only HTTP and UNC protocols are supported. FTP support may - be added when more pluggable protocols are added to the System.Net - assembly. - - - The option enables you to control downloads - so that the remote file is only fetched if newer than the local copy. - If there is no local copy, the download always takes place. When a file - is downloaded, the timestamp of the downloaded file is set to the remote - timestamp. - - - This timestamp facility only works on downloads using the HTTP protocol. - - - - - Gets the index page of the NAnt home page, and stores it in the file - help/index.html relative to the project base directory. - - - - ]]> - - - - - Gets the index page of a secured web site using the given credentials, - while connecting using the specified password-protected proxy server. - - - - - - - - - ]]> - - - - + + + Gets the index page of the NAnt home page, and stores it in the file + help/index.html relative to the project base directory. + + + + ]]> + + + + + Gets the index page of a secured web site using the given credentials, + while connecting using the specified password-protected proxy server. + + + + + + + + + ]]> + + + + Initializes task and ensures the supplied attributes are valid. - - + + This is where the work is done - - + + Sets the timestamp of a given file to a specified time. - - + + The URL from which to retrieve a file. - - + + The file where to store the retrieved file. - - + + If inside a firewall, proxy server/port information Format: {proxy server name}:{port number} Example: proxy.mycompany.com:8080 - - + + The network proxy to use to access the Internet resource. - - + + The network credentials used for authenticating the request with the Internet resource. - - + + Log errors but don't treat as fatal. The default is . - - + + Conditionally download a file based on the timestamp of the local copy. HTTP only. The default is . - - + + The length of time, in milliseconds, until the request times out. The default is 100000 milliseconds. - - + + The security certificates to associate with the request. - - - - Checks the conditional attributes and executes the children if - . - - - - If no conditions are checked, all child tasks are executed. - - - If more than one attribute is used, they are &&'d. The first - to fail stops the check. - - - The order of condition evaluation is, , - , , - . - - - instead of using the deprecated attributes, we advise you to use the - following functions in combination with the - attribute: - - - - Function - Description - - - - Checks whether the specified property exists. - - - - Checks whether the specified target exists. - - - - - Tests the value of a property using expressions. - - - Build release configuration - - ]]> - - - - Tests the the output of a function. - - - - - ]]> - - - - (Deprecated) Check that a target exists. - - - - - - ]]> - - - - (Deprecated) Check existence of a property. - - - - - ]]> - - - - (Deprecated) Check that a property value is true. - - - - - ]]> - - - - - (Deprecated) Check that a property exists and is - (uses multiple conditions). - - - - - - ]]> - - which is the same as - - - - - - - ]]> - - - - - (Deprecated) Check file dates. If myfile.dll is uptodate, - then do stuff. - - - - - - ]]> - - or - - - - - - - - ]]> - - or - - - - - - - - - - - ]]> - - - - + + + + Checks the conditional attributes and executes the children if + . + + + + If no conditions are checked, all child tasks are executed. + + + If more than one attribute is used, they are &&'d. The first + to fail stops the check. + + + The order of condition evaluation is, , + , , + . + + + instead of using the deprecated attributes, we advise you to use the + following functions in combination with the + attribute: + + + + Function + Description + + + + Checks whether the specified property exists. + + + + Checks whether the specified target exists. + + + + + Tests the value of a property using expressions. + + + Build release configuration + + ]]> + + + + Tests the the output of a function. + + + + + ]]> + + + + (Deprecated) Check that a target exists. + + + + + + ]]> + + + + (Deprecated) Check existence of a property. + + + + + ]]> + + + + (Deprecated) Check that a property value is true. + + + + + ]]> + + + + + (Deprecated) Check that a property exists and is + (uses multiple conditions). + + + + + + ]]> + + which is the same as + + + + + + + ]]> + + + + + (Deprecated) Check file dates. If myfile.dll is uptodate, + then do stuff. + + + + + + ]]> + + or + + + + + + + + ]]> + + or + + + + + + + + + + + ]]> + + + + Executes embedded tasks in the order in which they are defined. - - + + Automatically exclude build elements that are defined on the task from things that get executed, as they are evaluated normally during XML task initialization. - - - - Creates and executes the embedded (child XML nodes) elements. - - - Skips any element defined by the host that has - a defined. - - - - - Gets a value indicating whether the element is performing additional - processing using the that was use to - initialize the element. - - - , as a is - responsable for creating tasks from the nested build elements. - - - + + + + Creates and executes the embedded (child XML nodes) elements. + + + Skips any element defined by the host that has + a defined. + + + + + Gets a value indicating whether the element is performing additional + processing using the that was use to + initialize the element. + + + , as a is + responsable for creating tasks from the nested build elements. + + + The file to compare if uptodate. - - + + The file to check against for the uptodate file. - - - - The that contains the comparison files for - the (s) check. - - - - - The that contains the uptodate files for - the (s) check. - - - + + + + The that contains the comparison files for + the (s) check. + + + + + The that contains the uptodate files for + the (s) check. + + + Used to test whether a property is true. - - + + Used to test whether a property exists. - - + + Used to test whether a target exists. - - + + Used to test arbitrary boolean expression. - - + + The opposite of the if task. @@ -6400,8 +6400,8 @@ ]]> - - + + Includes an external build file. @@ -6437,23 +6437,23 @@ ]]> - - + + Used to check for recursived includes. - - + + Verifies parameters. - - + + Build file to include. - - + + Load a text file into a single property. @@ -6510,98 +6510,98 @@ ]]> - - + + The file to load. - - + + The name of the property to save the content to. - - + + The encoding to use when loading the file. The default is the encoding associated with the system's current ANSI code page. - - + + The filterchain definition to use. - - - - Loads tasks form a given assembly or all assemblies in a given directory - or . - - - - Load tasks from a single assembly. - - - - ]]> - - - - - Scan a single directory for task assemblies. - - - - ]]> - - - - - Use a containing both a directory and an - assembly. - - - - - - - - - ]]> - - - - - - Executes the Load Tasks task. - - Specified assembly or path does not exist. - - - - Validates the attributes. - - Both and are set. - - + + + + Loads tasks form a given assembly or all assemblies in a given directory + or . + + + + Load tasks from a single assembly. + + + + ]]> + + + + + Scan a single directory for task assemblies. + + + + ]]> + + + + + Use a containing both a directory and an + assembly. + + + + + + + + + ]]> + + + + + + Executes the Load Tasks task. + + Specified assembly or path does not exist. + + + + Validates the attributes. + + Both and are set. + + An assembly to load tasks from. - - + + A directory to scan for task assemblies. - - + + Used to select which directories or individual assemblies to scan. - - + + Loops over a set of items. @@ -6695,8 +6695,8 @@ ]]> - - + + The NAnt property name(s) that should be used for the current iterated item. @@ -6704,68 +6704,68 @@ If specifying multiple properties, separate them with a comma. - - + + The type of iteration that should be done. - - - - The type of whitespace trimming that should be done. The default - is . - - - + + + + The type of whitespace trimming that should be done. The default + is . + + + The source of the iteration. - - + + The deliminator char. - - - - Stuff to operate in. Just like the - attribute, but supports more complicated things like a - and such. - - Please remove the attribute if you - are using this element. - - - - + + + + Stuff to operate in. Just like the + attribute, but supports more complicated things like a + and such. + + Please remove the attribute if you + are using this element. + + + + Tasks to execute for each matching item. - - + + Do not remove any white space characters. - - + + Remove all white space characters from the end of the current item. - - + + Remove all white space characters from the beginning of the current item. - - + + Remove all white space characters from the beginning and end of the current item. - - + + Sends an SMTP message. @@ -6803,18 +6803,18 @@ ]]> - - + + Initializes task and ensures the supplied attributes are valid. - - + + This is where the work is done. - - + + Reads a text file and returns the content in a string. @@ -6823,58 +6823,58 @@ The content of the specified file. - - + + Email address of sender. - - + + Semicolon-separated list of recipient email addresses. - - + + Semicolon-separated list of CC: recipient email addresses. - - + + Semicolon-separated list of BCC: recipient email addresses. - - + + Host name of mail server. The default is localhost. - - + + Text to send in body of email message. - - + + Text to send in subject line of email message. - - - - Format of the message. The default is . - - - + + + + Format of the message. The default is . + + + Files that are transmitted as part of the body of the email message. - - + + Attachments that are transmitted with the message. - - + + Creates a directory and any non-existent parent directory if necessary. @@ -6894,137 +6894,137 @@ ]]> - - - - Creates the directory specified by the property. - - The directory could not be created. - - + + + + Creates the directory specified by the property. + + The directory could not be created. + + The directory to create. - - - - Moves a file or set of files to a new file or directory. - - - - Files are only moved if the source file is newer than the destination - file, or if the destination file does not exist. However, you can - explicitly overwrite files with the - attribute. - - - A can be used to select files to move. To use - a , the - attribute must be set. - -

Encoding

- - Unless an encoding is specified, the encoding associated with the - system's current ANSI code page is used. - - - An UTF-8, little-endian Unicode, and big-endian Unicode encoded text - file is automatically recognized, if the file starts with the - appropriate byte order marks. - - - If you employ filters in your move operation, you should limit the - move to text files. Binary files will be corrupted by the move - operation. - -
- - - Move a single file while changing its encoding from "latin1" to - "utf-8". - - - - ]]> - - - - Move a set of files. - - - - - - - ]]> - - - - - Move a set of files to a directory, replacing @TITLE@ with - "Foo Bar" in all files. - - - - - - - - - - - - - ]]> - - -
- + + + + Moves a file or set of files to a new file or directory. + + + + Files are only moved if the source file is newer than the destination + file, or if the destination file does not exist. However, you can + explicitly overwrite files with the + attribute. + + + A can be used to select files to move. To use + a , the + attribute must be set. + +

Encoding

+ + Unless an encoding is specified, the encoding associated with the + system's current ANSI code page is used. + + + An UTF-8, little-endian Unicode, and big-endian Unicode encoded text + file is automatically recognized, if the file starts with the + appropriate byte order marks. + + + If you employ filters in your move operation, you should limit the + move to text files. Binary files will be corrupted by the move + operation. + +
+ + + Move a single file while changing its encoding from "latin1" to + "utf-8". + + + + ]]> + + + + Move a set of files. + + + + + + + ]]> + + + + + Move a set of files to a directory, replacing @TITLE@ with + "Foo Bar" in all files. + + + + + + + + + + + + + ]]> + + +
+ Actually does the file moves. - - + + The file to move. - - + + The file to move to. - - + + The directory to move to. - - - - Used to select the files to move. To use a , - the attribute must be set. - - - - - Ignore directory structure of source directory, move all files into - a single directory, specified by the - attribute. The default is . - - - + + + + Used to select the files to move. To use a , + the attribute must be set. + + + + + Ignore directory structure of source directory, move all files into + a single directory, specified by the + attribute. The default is . + + + Chain of filters used to alter the file's content as it is moved. - - + + Creates an XSD File for all available tasks. @@ -7042,8 +7042,8 @@ ]]> - - + + Creates a NAnt Schema for given types @@ -7052,161 +7052,161 @@ The list of datatypes to generate XML Schema for. The target namespace to output. The new NAnt Schema. - - - - Creates a new instance. - - The name of the attribute. - Value indicating whether the attribute should be required. - The new instance. - - - - Creates a new instance. - - The minimum value to allow for this choice - The maximum value to allow, Decimal.MaxValue sets it to 'unbound' - The new instance. - - + + + + Creates a new instance. + + The name of the attribute. + Value indicating whether the attribute should be required. + The new instance. + + + + Creates a new instance. + + The minimum value to allow for this choice + The maximum value to allow, Decimal.MaxValue sets it to 'unbound' + The new instance. + + The name of the output file to which the XSD should be written. - - + + + + The target namespace for the output. Defaults to "http://tempuri.org/nant-donotuse.xsd" + + + + + The for which an XSD should be created. If not + specified, an XSD will be created for all available tasks. + + + + + Creates a new instance of the + class. + + Tasks for which a schema should be generated. + Data Types for which a schema should be generated. + The namespace to use. + http://tempuri.org/nant.xsd + + + + + Runs NAnt on a supplied build file, or a set of build files. + + + + By default, all the properties of the current project will be available + in the new project. Alternatively, you can set + to to not copy any properties to the new + project. + + + You can also set properties in the new project from the old project by + using nested property tags. These properties are always passed to the + new project regardless of the setting of . + This allows you to parameterize your subprojects. + + + References to data types can also be passed to the new project, but by + default they are not. If you set the to + , all references will be copied. + + + + + Build a project located in a different directory if the debug + property is not . + + + + ]]> + + + + + Build a project while adding a set of properties to that project. + + + + + + + + + + ]]> + + + + + Build all projects named default.build located anywhere under + the project base directory. + + + + + + + + + + ]]> + + + + - The target namespace for the output. Defaults to "http://tempuri.org/nant-donotuse.xsd" + Validates the element. - - - - The for which an XSD should be created. If not - specified, an XSD will be created for all available tasks. - - - - - Creates a new instance of the - class. - - Tasks for which a schema should be generated. - Data Types for which a schema should be generated. - The namespace to use. - http://tempuri.org/nant.xsd - - - - - Runs NAnt on a supplied build file, or a set of build files. - - - - By default, all the properties of the current project will be available - in the new project. Alternatively, you can set - to to not copy any properties to the new - project. - - - You can also set properties in the new project from the old project by - using nested property tags. These properties are always passed to the - new project regardless of the setting of . - This allows you to parameterize your subprojects. - - - References to data types can also be passed to the new project, but by - default they are not. If you set the to - , all references will be copied. - - - - - Build a project located in a different directory if the debug - property is not . - - - - ]]> - - - - - Build a project while adding a set of properties to that project. - - - - - - - - - - ]]> - - - - - Build all projects named default.build located anywhere under - the project base directory. - - - - - - - - - - ]]> - - - - - - Validates the element. - - - + + The build file to build. - - + + The target to execute. To specify more than one target seperate targets with a space. Targets are executed in order if possible. The default is to use target specified in the project's default attribute. - - + + Used to specify a set of build files to process. - - + + Specifies whether current property values should be inherited by the executed project. The default is . - - + + Specifies whether all references will be copied to the new project. The default is . - - + + Specifies a collection of properties that should be created in the executed project. Note, existing properties with identical names that are not read-only will be overwritten. - - + + Sets a property in the current project. @@ -7266,102 +7266,102 @@ ]]> - - + + The name of the NAnt property to set. - - + + The value to assign to the NAnt property. - - + + Specifies whether the property is read-only or not. The default is . - - + + Specifies whether references to other properties should not be expanded when the value of the property is set, but expanded when the property is actually used. By default, properties will be expanded when set. - - + + Specifies whether the value of a property should be overwritten if the property already exists (unless the property is read-only). The default is . - - - - Sets project properties based on the evaluatuion of a regular expression. - - - - The attribute must contain one or more - - named grouping constructs, which represents the names of the - properties to be set. These named grouping constructs can be enclosed - by angle brackets (?<name>) or single quotes (?'name'). - - - In the build file, use the XML element to specify <, - and to specify >. - - - The named grouping construct must not contain any punctuation and it - cannot begin with a number. - - - - - Find the last word in the given string and stores it in the property - lastword. - - - - - ]]> - - - - - Split the full filename and extension of a filename. - - - - ]]> - - - - - Split the path and the filename. (This checks for / or \ - as the path separator). - - - - ]]> - - - Results in path=d:\Temp\SomeDir\SomeDir\ and file=bla.xml. - - - - + + + + Sets project properties based on the evaluatuion of a regular expression. + + + + The attribute must contain one or more + + named grouping constructs, which represents the names of the + properties to be set. These named grouping constructs can be enclosed + by angle brackets (?<name>) or single quotes (?'name'). + + + In the build file, use the XML element to specify <, + and to specify >. + + + The named grouping construct must not contain any punctuation and it + cannot begin with a number. + + + + + Find the last word in the given string and stores it in the property + lastword. + + + + + ]]> + + + + + Split the full filename and extension of a filename. + + + + ]]> + + + + + Split the path and the filename. (This checks for / or \ + as the path separator). + + + + ]]> + + + Results in path=d:\Temp\SomeDir\SomeDir\ and file=bla.xml. + + + + Executes the task. - - + + Represents the regular expression to be evalued. @@ -7372,93 +7372,93 @@ The pattern must contain one or more named constructs, which may not contain any punctuation and cannot begin with a number. - - - - A comma separated list of options to pass to the regex engine. The - default is . - - - + + + + A comma separated list of options to pass to the regex engine. The + default is . + + + Represents the input for the regular expression. The input for the regular expression. - - - - Sets an environment variable or a whole collection of them. Use an empty - attribute to clear a variable. - - - - Variables will be set for the current NAnt process and all child - processes that NAnt spawns (compilers, shell tools, etc). If the - intention is to only set a variable for a single child process, then - using the and its nested - element might be a better option. - - - Expansion of inline environment variables is performed using the syntax - of the current platform. So on Windows platforms using the string %PATH% - in the attribute will result in the value of - the PATH variable being expanded in place before the variable is set. - - - - Set the MONO_PATH environment variable on a *nix platform. - - - ]]> - - - - Set a collection of environment variables. Note the nested variable used to set var3. - - - - - - - ]]> - - - - Set environment variables using nested path elements. - - - - - - - - - - - - - - - - - ]]> - - - - + + + + Sets an environment variable or a whole collection of them. Use an empty + attribute to clear a variable. + + + + Variables will be set for the current NAnt process and all child + processes that NAnt spawns (compilers, shell tools, etc). If the + intention is to only set a variable for a single child process, then + using the and its nested + element might be a better option. + + + Expansion of inline environment variables is performed using the syntax + of the current platform. So on Windows platforms using the string %PATH% + in the attribute will result in the value of + the PATH variable being expanded in place before the variable is set. + + + + Set the MONO_PATH environment variable on a *nix platform. + + + ]]> + + + + Set a collection of environment variables. Note the nested variable used to set var3. + + + + + + + ]]> + + + + Set environment variables using nested path elements. + + + + + + + + + + + + + + + + + ]]> + + + + Win32 DllImport for the SetEnvironmentVariable function. - - + + *nix dllimport for the setenv function. @@ -7468,8 +7468,8 @@ 0 if the execution is successful; otherwise, -1. - - + + Deletes all instances of the variable name. @@ -7477,54 +7477,54 @@ 0 if the execution is successful; otherwise, -1. - - + + Checks whether the task is initialized with valid attributes. - - + + Set the environment variables - - + + Do the actual work here. The name of the environment variable. The value of the environment variable. - - + + The name of a single Environment variable to set - - + + The literal value for the environment variable. - - + + The value for a file-based environment variable. NAnt will convert it to an absolute filename. - - + + The value for a directory-based environment variable. NAnt will convert it to an absolute path. - - + + The value for a PATH like environment variable. You can use : or ; as path separators and NAnt will convert it to the platform's local conventions. - - + + A task for sleeping a specified period of time, useful when a build or deployment process requires an interval between tasks. @@ -7545,44 +7545,44 @@ ]]> - - + + Verify parameters. - - + + Return time to sleep. - - + + Sleeps for the specified number of milliseconds. Number of milliseconds to sleep. - - + + Hours to add to the sleep time. - - + + Minutes to add to the sleep time. - - + + Seconds to add to the sleep time. - - + + Milliseconds to add to the sleep time. - - + + Processes a document via XSLT. @@ -7645,238 +7645,238 @@ ]]> - - + + Directory in which to store the results. The default is the project base directory. - - + + Desired file extension to be used for the targets. The default is html. - - + + URI or path that points to the stylesheet to use. If given as path, it can be relative to the project's basedir or absolute. - - - - Specifies a single XML document to be styled. Should be used with - the attribute. - - - - - Specifies the output name for the styled result from the - attribute. - - - + + + + Specifies a single XML document to be styled. Should be used with + the attribute. + + + + + Specifies the output name for the styled result from the + attribute. + + + Specifies a group of input files to which to apply the stylesheet. - - + + XSLT parameters to be passed to the XSLT transformation. - - + + XSLT extension objects to be passed to the XSLT transformation. - - + + The network proxy to use to access the Internet resource. - - - - Sets properties with system information. - - - Sets a number of properties with information about the system environment. The intent of this task is for nightly build logs to have a record of system information so that the build was performed on. - - - Property - Value - - - <>.clr.version - Common Language Runtime version number. - - - <>.env.* - Environment variables (e.g., <>.env.PATH). - - - <>.os.platform - Operating system platform ID. - - - <>.os.version - Operating system version. - - - <>.os - Operating system version string. - - - <>.os.folder.applicationdata - The directory that serves as a common repository for application-specific data for the current roaming user. - - - <>.os.folder.commonapplicationdata - The directory that serves as a common repository for application-specific data that is used by all users. - - - <>.os.folder.commonprogramfiles - The directory for components that are shared across applications. - - - <>.os.folder.desktopdirectory - The directory used to physically store file objects on the desktop. Do not confuse this directory with the desktop folder itself, which is a virtual folder. - - - <>.os.folder.programfiles - The Program Files directory. - - - <>.os.folder.system - The System directory. - - - <>.os.folder.temp - The temporary directory. - - - - When the name of an environment variable is not a valid property name, - the task will fail. In that case, set to - to allow that environment variable to be - skipped. - - - we advise you to use the following functions instead: - - - - Function - Description - - - - Gets a object that identifies this operating system. - - - - Gets the path to a system special folder. - - - - Returns the value of a environment variable. - - - - Gets the path to the temporary directory. - - - - Gets the Common Language Runtime version. - - - - - Register the properties with the default property prefix. - - - ]]> - - - - Register the properties without a prefix. - - - ]]> - - - - Register properties and display a summary. - - - ]]> - - - - + + + + Sets properties with system information. + + + Sets a number of properties with information about the system environment. The intent of this task is for nightly build logs to have a record of system information so that the build was performed on. + + + Property + Value + + + <>.clr.version + Common Language Runtime version number. + + + <>.env.* + Environment variables (e.g., <>.env.PATH). + + + <>.os.platform + Operating system platform ID. + + + <>.os.version + Operating system version. + + + <>.os + Operating system version string. + + + <>.os.folder.applicationdata + The directory that serves as a common repository for application-specific data for the current roaming user. + + + <>.os.folder.commonapplicationdata + The directory that serves as a common repository for application-specific data that is used by all users. + + + <>.os.folder.commonprogramfiles + The directory for components that are shared across applications. + + + <>.os.folder.desktopdirectory + The directory used to physically store file objects on the desktop. Do not confuse this directory with the desktop folder itself, which is a virtual folder. + + + <>.os.folder.programfiles + The Program Files directory. + + + <>.os.folder.system + The System directory. + + + <>.os.folder.temp + The temporary directory. + + + + When the name of an environment variable is not a valid property name, + the task will fail. In that case, set to + to allow that environment variable to be + skipped. + + + we advise you to use the following functions instead: + + + + Function + Description + + + + Gets a object that identifies this operating system. + + + + Gets the path to a system special folder. + + + + Returns the value of a environment variable. + + + + Gets the path to the temporary directory. + + + + Gets the Common Language Runtime version. + + + + + Register the properties with the default property prefix. + + + ]]> + + + + Register the properties without a prefix. + + + ]]> + + + + Register properties and display a summary. + + + ]]> + + + + The string to prefix the property names with. The default is "sys.". - - - - Sets properties with the current date and time. - - - - By default the displays the current date - and time and sets the following properties: - - - tstamp.date to yyyyMMdd - tstamp.time to HHmm - tstamp.now using the default DateTime.ToString() method - - - To set an additional property with a custom date/time use the - and attributes. - To set a number of additional properties with the exact same date and - time use the nested element (see example). - - - The date and time string displayed by the - uses the computer's default long date and time string format. You - might consider setting these to the - ISO 8601 standard - for date and time notation. - - - - Set the build.date property. - - - ]]> - - - - Set a number of properties for Ant like compatibility. - - - - - - - ]]> - - - - + + + + Sets properties with the current date and time. + + + + By default the displays the current date + and time and sets the following properties: + + + tstamp.date to yyyyMMdd + tstamp.time to HHmm + tstamp.now using the default DateTime.ToString() method + + + To set an additional property with a custom date/time use the + and attributes. + To set a number of additional properties with the exact same date and + time use the nested element (see example). + + + The date and time string displayed by the + uses the computer's default long date and time string format. You + might consider setting these to the + ISO 8601 standard + for date and time notation. + + + + Set the build.date property. + + + ]]> + + + + Set a number of properties for Ant like compatibility. + + + + + + + ]]> + + + + The property to receive the date/time string in the given pattern. - - + + The date/time pattern to be used. The following table lists the standard format characters for each standard pattern. The format characters are case-sensitive; for example, 'g' and 'G' represent slightly different patterns. @@ -7943,8 +7943,8 @@ \ cPattern Where c is any character. Displays the character literally. To display the backslash character, use "\\". - - + + Touches a file or set of files -- corresponds to the Unix touch command. @@ -7977,78 +7977,78 @@ ]]> - - + + Ensures the supplied attributes are valid. - - + + The file to touch. - - + + Specifies the new modification time of the file(s) in milliseconds since midnight Jan 1 1970. - - + + Specifies the new modification time of the file in the format MM/DD/YYYY HH:MM:SS. - - + + Used to select files that should be touched. - - - - Check modification dates on groups of files. - - - If all are same or newer than all , the specified property is set to , otherwise it - is set to . - - - - Check file dates. If myfile.dll is same or newer than myfile.cs, then set myfile.dll.uptodate property - to either or . - - - - - - - - - - - ]]> - - - - + + + + Check modification dates on groups of files. + + + If all are same or newer than all , the specified property is set to , otherwise it + is set to . + + + + Check file dates. If myfile.dll is same or newer than myfile.cs, then set myfile.dll.uptodate property + to either or . + + + + + + + + + + + ]]> + + + + Property that will be set to or depending on the result of the date check. - - - - The that contains list of source files. - - - - - The that contains list of target files. - - - + + + + The that contains list of source files. + + + + + The that contains list of target files. + + + Extracts text from an XML file at the location specified by an XPath expression. @@ -8093,23 +8093,23 @@ ]]> - - + + Executes the XML peek task. - - - - Loads an XML document from a file on disk. - - The file name of the file to load the XML document from. - - A document containing - the document object representing the file. - - - + + + + Loads an XML document from a file on disk. + + The file name of the file to load the XML document from. + + A document containing + the document object representing the file. + + + Gets the contents of the node specified by the XPath expression. @@ -8119,36 +8119,36 @@ The contents of the node specified by the XPath expression. - - + + The name of the file that contains the XML document that is going to be peeked at. - - + + The index of the node that gets its text returned when the query returns multiple nodes. - - + + The property that receives the text representation of the XML inside the node returned from the XPath expression. - - + + The XPath expression used to select which node to read. - - + + Namespace definitions to resolve prefixes in the XPath expression. - - + + Replaces text in an XML file at the location specified by an XPath expression. @@ -8189,182 +8189,182 @@ - Modify the noNamespaceSchemaLocation in an XML file. + Modify the noNamespaceSchemaLocation in an XML file. + + XML file: + + + + + ]]> + + Build fragment: + + + + + + + ]]> + + + + + + Executes the XML poke task. + + + + + Loads an XML document from a file on disk. + + + The file name of the file to load the XML document from. + + + An containing + the document object model representing the file. + + + + + Given an XML document and an expression, returns a list of nodes + which match the expression criteria. + + + The XPath expression used to select the nodes. + + + The XML document that is searched. + + + An to use for resolving namespaces + for prefixes in the XPath expression. + + + An containing references to the nodes + that matched the XPath expression. + + + + + Given a node list, replaces the XML within those nodes. + + + The list of nodes to replace the contents of. + + + The text to replace the contents with. + + + + + Saves the XML document to a file. + + The XML document to be saved. + The file name to save the XML document under. + + + + The name of the file that contains the XML document that is going + to be poked. + + + + + The XPath expression used to select which nodes are to be modified. + + + + + The value that replaces the contents of the selected nodes. + + + + + Namespace definitions to resolve prefixes in the XPath expression. + + + + + Represents a command-line argument. + + + + When passed to an external application, the argument will be quoted + when appropriate. This does not apply to the + parameter, which is always passed as is. + + + + + A single command-line argument containing a space character. + + + + ]]> + + + + + Two separate command-line arguments. - XML file: - - + ]]> - Build fragment: + + + + A single command-line argument with the value \dir;\dir2;\dir3 + on DOS-based systems and /dir:/dir2:/dir3 on Unix-like systems. + - - - - + ]]> - - + + - Executes the XML poke task. - - - - - Loads an XML document from a file on disk. - - - The file name of the file to load the XML document from. - - - An containing - the document object model representing the file. - - - - - Given an XML document and an expression, returns a list of nodes - which match the expression criteria. - - - The XPath expression used to select the nodes. - - - The XML document that is searched. - - - An to use for resolving namespaces - for prefixes in the XPath expression. - - - An containing references to the nodes - that matched the XPath expression. - - - - - Given a node list, replaces the XML within those nodes. - - - The list of nodes to replace the contents of. - - - The text to replace the contents with. - - - - - Saves the XML document to a file. + Initializes a new instance of the class. - The XML document to be saved. - The file name to save the XML document under. - - + + - The name of the file that contains the XML document that is going - to be poked. + Initializes a new instance of the class + with the specified command-line argument. - - + + - The XPath expression used to select which nodes are to be modified. + Initializes a new instance of the class + with the given file. - - + + - The value that replaces the contents of the selected nodes. + Initializes a new instance of the class + with the given path. - - + + - Namespace definitions to resolve prefixes in the XPath expression. + Returns the argument as a . - - - - Represents a command-line argument. - - - - When passed to an external application, the argument will be quoted - when appropriate. This does not apply to the - parameter, which is always passed as is. - - - - - A single command-line argument containing a space character. - - - - ]]> - - - - - Two separate command-line arguments. - - - - ]]> - - - - - A single command-line argument with the value \dir;\dir2;\dir3 - on DOS-based systems and /dir:/dir2:/dir3 on Unix-like systems. - - - - ]]> - - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with the specified command-line argument. - - - - - Initializes a new instance of the class - with the given file. - - - - - Initializes a new instance of the class - with the given path. - - - - - Returns the argument as a . - - - The argument as a . - - - File and individual path elements will be quoted if necessary. - - - + + The argument as a . + + + File and individual path elements will be quoted if necessary. + + + Quotes a command line argument if it contains a single quote or a space. @@ -8375,25 +8375,25 @@ contains a single quote or a space; otherwise, . - - + + A single command-line argument; can contain space characters. - - + + The name of a file as a single command-line argument; will be replaced with the absolute filename of the file. - - + + The value for a directory-based command-line argument; will be replaced with the absolute path of the directory. - - + + The value for a PATH-like command-line argument; you can use : or ; as path separators and NAnt will convert it @@ -8404,163 +8404,163 @@ Individual parts will be replaced with the absolute path, resolved relative to the project base directory. - - + + Sets a single command-line argument and treats it like a PATH - ensures the right separator for the local platform is used. - - + + List of command-line arguments; will be passed to the executable as is. - - + + Indicates if the argument should be passed to the external program. If then the argument will be passed; otherwise, skipped. The default is . - - + + Indicates if the argument should not be passed to the external program. If then the argument will be passed; otherwise, skipped. The default is . - - + + Gets string value corresponding with the argument. - - - - Contains a collection of elements. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with the specified instance. - - - - - Initializes a new instance of the class - with the specified array of instances. - - - - - Adds a to the end of the collection. - - The to be added to the end of the collection. - The position into which the new element was inserted. - - - - Adds the elements of a array to the end of the collection. - - The array of elements to be added to the end of the collection. - - - - Adds the elements of a to the end of the collection. - - The to be added to the end of the collection. - - - - Determines whether a is in the collection. - - The to locate in the collection. - - if is found in the - collection; otherwise, . - - - - - Determines whether a with the specified - value is in the collection. - - The argument value to locate in the collection. - - if a with value - is found in the collection; otherwise, - . - - - + + + + Contains a collection of elements. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with the specified instance. + + + + + Initializes a new instance of the class + with the specified array of instances. + + + + + Adds a to the end of the collection. + + The to be added to the end of the collection. + The position into which the new element was inserted. + + + + Adds the elements of a array to the end of the collection. + + The array of elements to be added to the end of the collection. + + + + Adds the elements of a to the end of the collection. + + The to be added to the end of the collection. + + + + Determines whether a is in the collection. + + The to locate in the collection. + + if is found in the + collection; otherwise, . + + + + + Determines whether a with the specified + value is in the collection. + + The argument value to locate in the collection. + + if a with value + is found in the collection; otherwise, + . + + + Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. The zero-based index in at which copying begins. - - - - Retrieves the index of a specified object in the collection. - - The object for which the index is returned. - - The index of the specified . If the is not currently a member of the collection, it returns -1. - - - - - Inserts a into the collection at the specified index. - - The zero-based index at which should be inserted. - The to insert. - - - - Returns an enumerator that can iterate through the collection. - - - A for the entire collection. - - - - - Removes a member from the collection. - - The to remove from the collection. - - + + + + Retrieves the index of a specified object in the collection. + + The object for which the index is returned. + + The index of the specified . If the is not currently a member of the collection, it returns -1. + + + + + Inserts a into the collection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + + + Returns an enumerator that can iterate through the collection. + + + A for the entire collection. + + + + + Removes a member from the collection. + + The to remove from the collection. + + Gets or sets the element at the specified index. The zero-based index of the element to get or set. - - - - Gets the with the specified value. - - The value of the to get. - - - - Enumerates the elements of a . - - - - - Initializes a new instance of the class - with the specified . - - The collection that should be enumerated. - - + + + + Gets the with the specified value. + + The value of the to get. + + + + Enumerates the elements of a . + + + + + Initializes a new instance of the class + with the specified . + + The collection that should be enumerated. + + Advances the enumerator to the next element of the collection. @@ -8569,364 +8569,364 @@ to the next element; if the enumerator has passed the end of the collection. - - + + Sets the enumerator to its initial position, which is before the first element in the collection. - - + + Gets the current element in the collection. The current element in the collection. - - + + Provides credentials for password-based authentication schemes. - - - - Initializes a new instance of the class. - - - - - Returns a instance representing - the current . - - - A instance representing the current - , or if the - credentials should not be used to provide authentication information - to the external resource. - - - + + + + Initializes a new instance of the class. + + + + + Returns a instance representing + the current . + + + A instance representing the current + , or if the + credentials should not be used to provide authentication information + to the external resource. + + + The domain or computer name that verifies the credentials. - - + + The password for the user name associated with the credentials. - - + + The user name associated with the credentials. - - + + Indicates if the credentials should be used to provide authentication information to the external resource. If then the credentials will be passed; otherwise, not. The default is . - - + + Indicates if the credentials should not be used to provide authentication information to the external resource. If then the credentials will be passed; otherwise, not. The default is . - - - - A specialized used for specifying a set of - directories. - - - Hint for supporting tasks that the included directories instead of - files should be used. - - - - - Filesets are groups of files. These files can be found in a directory - tree starting in a base directory and are matched by patterns taken - from a number of patterns. Filesets can appear inside tasks that support - this feature or at the project level, i.e., as children of <project>. - - -

Patterns

- - As described earlier, patterns are used for the inclusion and exclusion. - These patterns look very much like the patterns used in DOS and UNIX: - - - - - '*' matches zero or more characters - For example: - - *.cs matches .cs, x.cs and FooBar.cs, - but not FooBar.xml (does not end with .cs). - - - - - - '?' matches one character - For example: - - ?.cs matches x.cs, A.cs, but not - .cs or xyz.cs (both don't have one character - before .cs). - - - - - - Combinations of *'s and ?'s are allowed. - - - Matching is done per-directory. This means that first the first directory - in the pattern is matched against the first directory in the path to match. - Then the second directory is matched, and so on. For example, when we have - the pattern /?abc/*/*.cs and the path /xabc/foobar/test.cs, - the first ?abc is matched with xabc, then * is matched - with foobar, and finally *.cs is matched with test.cs. - They all match, so the path matches the pattern. - - - To make things a bit more flexible, we added one extra feature, which makes - it possible to match multiple directory levels. This can be used to match a - complete directory tree, or a file anywhere in the directory tree. To do this, - ** must be used as the name of a directory. When ** is used as - the name of a directory in the pattern, it matches zero or more directories. - For example: /test/** matches all files/directories under /test/, - such as /test/x.cs, or /test/foo/bar/xyz.html, but not /xyz.xml. - - - There is one "shorthand" - if a pattern ends with / or \, then - ** is appended. For example, mypackage/test/ is interpreted as - if it were mypackage/test/**. - -

Case-Sensitivity

- - By default, pattern matching is case-sensitive on Unix and case-insensitive - on other platforms. The parameter can be used - to override this. - -

Default Excludes

- - There are a set of definitions that are excluded by default from all - tasks that use filesets. They are: - - - - - **/*~ - - - - - **/#*# - - - - - **/.#* - - - - - **/%*% - - - - - **/CVS - - - - - **/CVS/** - - - - - **/.cvsignore - - - - - **/.svn - - - - - **/.svn/** - - - - - **/_svn - - - - - **/_svn/** - - - - - **/SCCS - - - - - **/SCCS/** - - - - - **/vssver.scc - - - - - **/_vti_cnf/** - - - - - If you do not want these default excludes applied, you may disable them - by setting to . - -
- - - - Pattern - Match - - - **/CVS/* - - - Matches all files in CVS directories that can be - located anywhere in the directory tree. - - Matches: - - - CVS/Repository - - - org/apache/CVS/Entries - - - org/apache/jakarta/tools/ant/CVS/Entries - - - But not: - - - org/apache/CVS/foo/bar/Entries (foo/bar/ part does not match) - - - - - - org/apache/jakarta/** - - - Matches all files in the org/apache/jakarta directory - tree. - - Matches: - - - org/apache/jakarta/tools/ant/docs/index.html - - - org/apache/jakarta/test.xml - - - But not: - - - org/apache/xyz.java (jakarta/ part is missing) - - - - - - org/apache/**/CVS/* - - - Matches all files in CVS directories that are located - anywhere in the directory tree under org/apache. - - Matches: - - - org/apache/CVS/Entries - - - org/apache/jakarta/tools/ant/CVS/Entries - - - But not: - - - org/apache/CVS/foo/bar/Entries (foo/bar/ part does not match) - - - - - - **/test/** - - - Matches all files that have a test element in their - path, including test as a filename. - - - - - - -
- - - Initializes a new instance of the class. - - - + + + + A specialized used for specifying a set of + directories. + + + Hint for supporting tasks that the included directories instead of + files should be used. + + + + + Filesets are groups of files. These files can be found in a directory + tree starting in a base directory and are matched by patterns taken + from a number of patterns. Filesets can appear inside tasks that support + this feature or at the project level, i.e., as children of <project>. + + +

Patterns

+ + As described earlier, patterns are used for the inclusion and exclusion. + These patterns look very much like the patterns used in DOS and UNIX: + + + + + '*' matches zero or more characters + For example: + + *.cs matches .cs, x.cs and FooBar.cs, + but not FooBar.xml (does not end with .cs). + + + + + + '?' matches one character + For example: + + ?.cs matches x.cs, A.cs, but not + .cs or xyz.cs (both don't have one character + before .cs). + + + + + + Combinations of *'s and ?'s are allowed. + + + Matching is done per-directory. This means that first the first directory + in the pattern is matched against the first directory in the path to match. + Then the second directory is matched, and so on. For example, when we have + the pattern /?abc/*/*.cs and the path /xabc/foobar/test.cs, + the first ?abc is matched with xabc, then * is matched + with foobar, and finally *.cs is matched with test.cs. + They all match, so the path matches the pattern. + + + To make things a bit more flexible, we added one extra feature, which makes + it possible to match multiple directory levels. This can be used to match a + complete directory tree, or a file anywhere in the directory tree. To do this, + ** must be used as the name of a directory. When ** is used as + the name of a directory in the pattern, it matches zero or more directories. + For example: /test/** matches all files/directories under /test/, + such as /test/x.cs, or /test/foo/bar/xyz.html, but not /xyz.xml. + + + There is one "shorthand" - if a pattern ends with / or \, then + ** is appended. For example, mypackage/test/ is interpreted as + if it were mypackage/test/**. + +

Case-Sensitivity

+ + By default, pattern matching is case-sensitive on Unix and case-insensitive + on other platforms. The parameter can be used + to override this. + +

Default Excludes

+ + There are a set of definitions that are excluded by default from all + tasks that use filesets. They are: + + + + + **/*~ + + + + + **/#*# + + + + + **/.#* + + + + + **/%*% + + + + + **/CVS + + + + + **/CVS/** + + + + + **/.cvsignore + + + + + **/.svn + + + + + **/.svn/** + + + + + **/_svn + + + + + **/_svn/** + + + + + **/SCCS + + + + + **/SCCS/** + + + + + **/vssver.scc + + + + + **/_vti_cnf/** + + + + + If you do not want these default excludes applied, you may disable them + by setting to . + +
+ + + + Pattern + Match + + + **/CVS/* + + + Matches all files in CVS directories that can be + located anywhere in the directory tree. + + Matches: + + + CVS/Repository + + + org/apache/CVS/Entries + + + org/apache/jakarta/tools/ant/CVS/Entries + + + But not: + + + org/apache/CVS/foo/bar/Entries (foo/bar/ part does not match) + + + + + + org/apache/jakarta/** + + + Matches all files in the org/apache/jakarta directory + tree. + + Matches: + + + org/apache/jakarta/tools/ant/docs/index.html + + + org/apache/jakarta/test.xml + + + But not: + + + org/apache/xyz.java (jakarta/ part is missing) + + + + + + org/apache/**/CVS/* + + + Matches all files in CVS directories that are located + anywhere in the directory tree under org/apache. + + Matches: + + + org/apache/CVS/Entries + + + org/apache/jakarta/tools/ant/CVS/Entries + + + But not: + + + org/apache/CVS/foo/bar/Entries (foo/bar/ part does not match) + + + + + + **/test/** + + + Matches all files that have a test element in their + path, including test as a filename. + + + + + + +
+ + + Initializes a new instance of the class. + + + copy constructor - - - - Creates a shallow copy of the . - - - A shallow copy of the . - - - + + + + Creates a shallow copy of the . + + + A shallow copy of the . + + + Adds a nested set of patterns, or references a standalone patternset. - - - - Copies all instance data of the to a given - . - - - + + + + Copies all instance data of the to a given + . + + + Determines if a file has a more recent last write time than the given time, or no longer exists. @@ -8938,8 +8938,8 @@ or that no longer exists; otherwise, . - - + + Determines if one of the given files has a more recent last write time than the given time. If one of the given files no longer exists, @@ -8951,69 +8951,69 @@ The name of the first file that has a last write time greater than ; otherwise, null. - - + + Indicates whether include and exclude patterns must be treated in a case-sensitive way. The default is on Unix; otherwise, . - - - - When set to , causes the fileset element to - throw a when no files match the - includes and excludes criteria. The default is . - - - + + + + When set to , causes the fileset element to + throw a when no files match the + includes and excludes criteria. The default is . + + + Indicates whether default excludes should be used or not. The default is . - - + + The base of the directory of this fileset. The default is the project base directory. - - + + Gets the collection of include patterns. - - + + Gets the collection of exclude patterns. - - - - Gets the collection of files that will be added to the - without pattern matching or checking if the - file exists. - - - - - Gets the collection of file names that match the fileset. - - - A collection that contains the file names that match the - . - - - - - Gets the collection of directory names that match the fileset. - - - A collection that contains the directory names that match the - . - - - + + + + Gets the collection of files that will be added to the + without pattern matching or checking if the + file exists. + + + + + Gets the collection of file names that match the fileset. + + + A collection that contains the file names that match the + . + + + + + Gets the collection of directory names that match the fileset. + + + A collection that contains the directory names that match the + . + + + Gets the collection of directory names that were scanned for files. @@ -9021,380 +9021,380 @@ A collection that contains the directory names that were scanned for files. - - + + The items to include in the fileset. - - + + The items to include in the fileset. - - + + The items to exclude from the fileset. - - + + The items to exclude from the fileset. - - + + The files from which a list of patterns or files to include should be obtained. - - + + The files from which a list of patterns or files to include should be obtained. - - + + The files from which a list of patterns or files to exclude should be obtained. - - - - Determines the most recently modified file in the fileset (by LastWriteTime of the ). - - - The of the file that has the newest (closest to present) last write time. - - - + + + + Determines the most recently modified file in the fileset (by LastWriteTime of the ). + + + The of the file that has the newest (closest to present) last write time. + + + The pattern or file name to exclude. - - + + If then the pattern will be excluded; otherwise, skipped. The default is . - - - - Opposite of . If - then the pattern will be excluded; otherwise, skipped. The default - is . - - - - - If then the file name will be added to - the without pattern matching or checking - if the file exists. The default is . - - - + + + + Opposite of . If + then the pattern will be excluded; otherwise, skipped. The default + is . + + + + + If then the file name will be added to + the without pattern matching or checking + if the file exists. The default is . + + + If then the file will be searched for on the path. The default is . - - + + The pattern or file name to include. - - + + If then the pattern will be included; otherwise, skipped. The default is . - - - - Opposite of . If - then the pattern will be included; otherwise, skipped. The default - is . - - - - - Gets the list of patterns in . - - - + + + + Opposite of . If + then the pattern will be included; otherwise, skipped. The default + is . + + + + + Gets the list of patterns in . + + + If then the patterns will be excluded; otherwise, skipped. The default is . - - - - Opposite of . If - then the patterns will be excluded; otherwise, skipped. The default - is . - - - + + + + Opposite of . If + then the patterns will be excluded; otherwise, skipped. The default + is . + + + The name of a file; each line of this file is taken to be a pattern. - - - - If then the patterns in the include file - will be added to the without pattern - matching or checking if the file exists. The default is - . - - - + + + + If then the patterns in the include file + will be added to the without pattern + matching or checking if the file exists. The default is + . + + + If then the patterns in the include file will be searched for on the path. The default is . - - + + If then the patterns will be included; otherwise, skipped. The default is . - - - - Opposite of . If - then the patterns will be included; otherwise, skipped. The default - is . - - - - - Initializes a new instance of the class. - - - - - Copy constructor for . Required in order to - assign references of type where - is used. - - A instance to create a from. - - + + + + Opposite of . If + then the patterns will be included; otherwise, skipped. The default + is . + + + + + Initializes a new instance of the class. + + + + + Copy constructor for . Required in order to + assign references of type where + is used. + + A instance to create a from. + + Represents an environment variable. - - - - Initializes a instance with the - specified name and value. - - The name of the environment variable. - The value of the environment variable. - - - - Initializes a instance. - - - + + + + Initializes a instance with the + specified name and value. + + The name of the environment variable. + The value of the environment variable. + + + + Initializes a instance. + + + The name of the environment variable. - - + + The literal value for the environment variable. - - + + The value for a file-based environment variable. NAnt will convert it to an absolute filename. - - + + The value for a directory-based environment variable. NAnt will convert it to an absolute path. - - + + The value for a PATH like environment variable. You can use : or ; as path separators and NAnt will convert it to the platform's local conventions. - - + + Sets a single environment variable and treats it like a PATH - ensures the right separator for the local platform is used. - - + + + + Gets the value of the environment variable. + + + + + Indicates if the environment variable should be passed to the + external program. If then the environment + variable will be passed; otherwise, skipped. The default is + . + + + + + Indicates if the environment variable should not be passed to the + external program. If then the environment + variable will be passed; otherwise, skipped. The default is + . + + + + + A set of environment variables. + + + + + Environment variable to pass to a program. + + + + + Environment variable to pass to a program. + + + + + Contains a collection of elements. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with the specified instance. + + + + + Initializes a new instance of the class + with the specified array of instances. + + + + + Adds a to the end of the collection. + + The to be added to the end of the collection. + The position into which the new element was inserted. + + + + Adds the elements of a array to the end of the collection. + + The array of elements to be added to the end of the collection. + + + + Adds the elements of a to the end of the collection. + + The to be added to the end of the collection. + + + + Determines whether a is in the collection. + + The to locate in the collection. + + if is found in the + collection; otherwise, . + + + + + Determines whether a with the specified + value is in the collection. + + The argument value to locate in the collection. + + if a with value + is found in the collection; otherwise, + . + + + + + Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. + + The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. + The zero-based index in at which copying begins. + + - Gets the value of the environment variable. + Retrieves the index of a specified object in the collection. - - + The object for which the index is returned. + + The index of the specified . If the is not currently a member of the collection, it returns -1. + + + - Indicates if the environment variable should be passed to the - external program. If then the environment - variable will be passed; otherwise, skipped. The default is - . + Inserts a into the collection at the specified index. - - + The zero-based index at which should be inserted. + The to insert. + + - Indicates if the environment variable should not be passed to the - external program. If then the environment - variable will be passed; otherwise, skipped. The default is - . + Returns an enumerator that can iterate through the collection. - - + + A for the entire collection. + + + - A set of environment variables. + Removes a member from the collection. - - + The to remove from the collection. + + - Environment variable to pass to a program. + Gets or sets the element at the specified index. - - + The zero-based index of the element to get or set. + + - Environment variable to pass to a program. + Gets the with the specified name. - - - - Contains a collection of elements. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with the specified instance. - - - - - Initializes a new instance of the class - with the specified array of instances. - - - - - Adds a to the end of the collection. - - The to be added to the end of the collection. - The position into which the new element was inserted. - - - - Adds the elements of a array to the end of the collection. - - The array of elements to be added to the end of the collection. - - - - Adds the elements of a to the end of the collection. - - The to be added to the end of the collection. - - - - Determines whether a is in the collection. - - The to locate in the collection. - - if is found in the - collection; otherwise, . - - - - - Determines whether a with the specified - value is in the collection. - - The argument value to locate in the collection. - - if a with value - is found in the collection; otherwise, - . - - - + The name of the to get. + + - Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. + Enumerates the elements of a . - The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. - The zero-based index in at which copying begins. - - - - Retrieves the index of a specified object in the collection. - - The object for which the index is returned. - - The index of the specified . If the is not currently a member of the collection, it returns -1. - - - - - Inserts a into the collection at the specified index. - - The zero-based index at which should be inserted. - The to insert. - - - - Returns an enumerator that can iterate through the collection. - - - A for the entire collection. - - - - - Removes a member from the collection. - - The to remove from the collection. - - + + - Gets or sets the element at the specified index. + Initializes a new instance of the class + with the specified . - The zero-based index of the element to get or set. - - - - Gets the with the specified name. - - The name of the to get. - - - - Enumerates the elements of a . - - - - - Initializes a new instance of the class - with the specified . - - The collection that should be enumerated. - - + The collection that should be enumerated. + + Advances the enumerator to the next element of the collection. @@ -9403,152 +9403,152 @@ to the next element; if the enumerator has passed the end of the collection. - - + + Sets the enumerator to its initial position, which is before the first element in the collection. - - + + Gets the current element in the collection. The current element in the collection. - - + + The name of the NAnt property to set. - - + + The string pattern to use to format the property. - - + + Indicates if the formatter should be used to format the timestamp. If then the formatter will be used; otherwise, skipped. The default is . - - + + Indicates if the formatter should be not used to format the timestamp. If then the formatter will be used; otherwise, skipped. The default is . - - - - Contains a collection of elements. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with the specified instance. - - - - - Initializes a new instance of the class - with the specified array of instances. - - - - - Adds a to the end of the collection. - - The to be added to the end of the collection. - The position into which the new element was inserted. - - - - Adds the elements of a array to the end of the collection. - - The array of elements to be added to the end of the collection. - - - - Adds the elements of a to the end of the collection. - - The to be added to the end of the collection. - - - - Determines whether a is in the collection. - - The to locate in the collection. - - if is found in the - collection; otherwise, . - - - + + + + Contains a collection of elements. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with the specified instance. + + + + + Initializes a new instance of the class + with the specified array of instances. + + + + + Adds a to the end of the collection. + + The to be added to the end of the collection. + The position into which the new element was inserted. + + + + Adds the elements of a array to the end of the collection. + + The array of elements to be added to the end of the collection. + + + + Adds the elements of a to the end of the collection. + + The to be added to the end of the collection. + + + + Determines whether a is in the collection. + + The to locate in the collection. + + if is found in the + collection; otherwise, . + + + Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. The zero-based index in at which copying begins. - - - - Retrieves the index of a specified object in the collection. - - The object for which the index is returned. - - The index of the specified . If the is not currently a member of the collection, it returns -1. - - - - - Inserts a into the collection at the specified index. - - The zero-based index at which should be inserted. - The to insert. - - - - Returns an enumerator that can iterate through the collection. - - - A for the entire collection. - - - - - Removes a member from the collection. - - The to remove from the collection. - - + + + + Retrieves the index of a specified object in the collection. + + The object for which the index is returned. + + The index of the specified . If the is not currently a member of the collection, it returns -1. + + + + + Inserts a into the collection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + + + Returns an enumerator that can iterate through the collection. + + + A for the entire collection. + + + + + Removes a member from the collection. + + The to remove from the collection. + + Gets or sets the element at the specified index. The zero-based index of the element to get or set. - - - - Enumerates the elements of a . - - - - - Initializes a new instance of the class - with the specified . - - The collection that should be enumerated. - - + + + + Enumerates the elements of a . + + + + + Initializes a new instance of the class + with the specified . + + The collection that should be enumerated. + + Advances the enumerator to the next element of the collection. @@ -9557,262 +9557,262 @@ to the next element; if the enumerator has passed the end of the collection. - - + + Sets the enumerator to its initial position, which is before the first element in the collection. - - + + Gets the current element in the collection. The current element in the collection. - - - - Specifies the execution mode for managed applications. - - - - For backward compatibility, the following string values can also be - used in build files: - - - - Value - Corresponding field - - - "true" - - - - "false" - - - - - Even if set to , the operating system can still - run the program as a managed application. - - On Linux this can be done through binfmt_misc, while on - Windows installing the .NET Framework redistributable caused managed - applications to run on the MS CLR by default. - - - - + + + + Specifies the execution mode for managed applications. + + + + For backward compatibility, the following string values can also be + used in build files: + + + + Value + Corresponding field + + + "true" + + + + "false" + + + + + Even if set to , the operating system can still + run the program as a managed application. + + On Linux this can be done through binfmt_misc, while on + Windows installing the .NET Framework redistributable caused managed + applications to run on the MS CLR by default. + + + + Do not threat the program as a managed application. - - + + Leave it up to the CLR to determine which specific version of the CLR will be used to run the application. - - + + Forces an application to run against the currently targeted version of a given CLR. - - - - Specialized that also supports - case-insensitive conversion of "true" to - and "false" to - . - - - - - Initializes a new instance of the - class. - - - - - Converts the given object to the type of this converter, using the - specified context and culture information. - - An that provides a format context. - A object. If a is passed, the current culture is assumed. - The to convert. - - An that represents the converted value. - - - + + + + Specialized that also supports + case-insensitive conversion of "true" to + and "false" to + . + + + + + Initializes a new instance of the + class. + + + + + Converts the given object to the type of this converter, using the + specified context and culture information. + + An that provides a format context. + A object. If a is passed, the current culture is assumed. + The to convert. + + An that represents the converted value. + + + Represents an option. - - + + name, value constructor - - + + Default constructor - - + + Name of the option. - - + + Value of the option. The default is . - - + + Indicates if the option should be passed to the task. If then the option will be passed; otherwise, skipped. The default is . - - + + Indicates if the option should not be passed to the task. If then the option will be passed; otherwise, skipped. The default is . - - - - Contains a collection of elements. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with the specified instance. - - - - - Initializes a new instance of the class - with the specified array of instances. - - - - - Adds a to the end of the collection. - - The to be added to the end of the collection. - The position into which the new element was inserted. - - - - Adds the elements of a array to the end of the collection. - - The array of elements to be added to the end of the collection. - - - - Adds the elements of a to the end of the collection. - - The to be added to the end of the collection. - - - - Determines whether a is in the collection. - - The to locate in the collection. - - if is found in the - collection; otherwise, . - - - - - Determines whether a for the specified - task is in the collection. - - The name of task for which the should be located in the collection. - - if a for the specified - task is found in the collection; otherwise, . - - - + + + + Contains a collection of elements. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with the specified instance. + + + + + Initializes a new instance of the class + with the specified array of instances. + + + + + Adds a to the end of the collection. + + The to be added to the end of the collection. + The position into which the new element was inserted. + + + + Adds the elements of a array to the end of the collection. + + The array of elements to be added to the end of the collection. + + + + Adds the elements of a to the end of the collection. + + The to be added to the end of the collection. + + + + Determines whether a is in the collection. + + The to locate in the collection. + + if is found in the + collection; otherwise, . + + + + + Determines whether a for the specified + task is in the collection. + + The name of task for which the should be located in the collection. + + if a for the specified + task is found in the collection; otherwise, . + + + Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. The zero-based index in at which copying begins. - - - - Retrieves the index of a specified object in the collection. - - The object for which the index is returned. - - The index of the specified . If the is not currently a member of the collection, it returns -1. - - - - - Inserts a into the collection at the specified index. - - The zero-based index at which should be inserted. - The to insert. - - - - Returns an enumerator that can iterate through the collection. - - - A for the entire collection. - - - - - Removes a member from the collection. - - The to remove from the collection. - - + + + + Retrieves the index of a specified object in the collection. + + The object for which the index is returned. + + The index of the specified . If the is not currently a member of the collection, it returns -1. + + + + + Inserts a into the collection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + + + Returns an enumerator that can iterate through the collection. + + + A for the entire collection. + + + + + Removes a member from the collection. + + The to remove from the collection. + + Gets or sets the element at the specified index. The zero-based index of the element to get or set. - - - - Gets the with the specified name. - - The name of the option that should be located in the collection. - - - - Enumerates the elements of a . - - - - - Initializes a new instance of the class - with the specified . - - The collection that should be enumerated. - - + + + + Gets the with the specified name. + + The name of the option that should be located in the collection. + + + + Enumerates the elements of a . + + + + + Initializes a new instance of the class + with the specified . + + The collection that should be enumerated. + + Advances the enumerator to the next element of the collection. @@ -9821,69 +9821,69 @@ to the next element; if the enumerator has passed the end of the collection. - - + + Sets the enumerator to its initial position, which is before the first element in the collection. - - + + Gets the current element in the collection. The current element in the collection. - - + + Represents a nested path element. - - + + The name of a file to add to the path. Will be replaced with the absolute path of the file. - - + + The name of a directory to add to the path. Will be replaced with the absolute path of the directory. - - + + A string that will be treated as a path-like string. You can use : or ; as path separators and NAnt will convert it to the platform's local conventions, while resolving references to environment variables. - - + + If then the entry will be added to the path; otherwise, skipped. The default is . - - - - Opposite of . If - then the entry will be added to the path; otherwise, skipped. - The default is . - - - - - Gets the parts of a path represented by this element. - - - A containing the parts of a path - represented by this element. - - - + + + + Opposite of . If + then the entry will be added to the path; otherwise, skipped. + The default is . + + + + + Gets the parts of a path represented by this element. + + + A containing the parts of a path + represented by this element. + + + Paths are groups of files and/or directories that need to be passed as a single @@ -9905,21 +9905,21 @@ ]]> - - - - Initializes a new instance of the class. - - - - - Invoked by for build - attributes with an underlying type. - - The to be used to resolve relative paths. - The string representing a path. - - + + + + Initializes a new instance of the class. + + + + + Invoked by for build + attributes with an underlying type. + + The to be used to resolve relative paths. + The string representing a path. + + Returns a textual representation of the path, which can be used as PATH environment variable definition. @@ -9927,162 +9927,162 @@ A textual representation of the path. - - - - Defines a set of path elements to add to the current path. - - The to add. - - - - Defines a path element to add to the current path. - - The to add. - - + + + + Defines a set of path elements to add to the current path. + + The to add. + + + + Defines a path element to add to the current path. + + The to add. + + Returns all path elements defined by this path object. A list of path elements. - - - - Splits a PATH (with ; or : as separators) into its parts, while - resolving references to environment variables. - - The to be used to resolve relative paths. - The path to translate. - - A PATH split up its parts, with references to environment variables - resolved and duplicate entries removed. - - - - - Initializes a new instance of the class. - - - + + + + Splits a PATH (with ; or : as separators) into its parts, while + resolving references to environment variables. + + The to be used to resolve relative paths. + The path to translate. + + A PATH split up its parts, with references to environment variables + resolved and duplicate entries removed. + + + + + Initializes a new instance of the class. + + + The name pattern to include/exclude. - - + + If then the pattern will be used; otherwise, skipped. The default is . - - + + If then the pattern will be used; otherwise, skipped. The default is . - - - - Contains a collection of elements. - - - - - Initializes a new instance of the class. - - - - - Removes all items from the . - - - - - Adds a to the end of the collection. - - The to be added to the end of the collection. - The position into which the new element was inserted. - - - - Adds the elements of a array to the end of the collection. - - The array of elements to be added to the end of the collection. - - - - Adds the elements of a to the end of the collection. - - The to be added to the end of the collection. - - - - Determines whether a is in the collection. - - The to locate in the collection. - - if is found in the - collection; otherwise, . - - - + + + + Contains a collection of elements. + + + + + Initializes a new instance of the class. + + + + + Removes all items from the . + + + + + Adds a to the end of the collection. + + The to be added to the end of the collection. + The position into which the new element was inserted. + + + + Adds the elements of a array to the end of the collection. + + The array of elements to be added to the end of the collection. + + + + Adds the elements of a to the end of the collection. + + The to be added to the end of the collection. + + + + Determines whether a is in the collection. + + The to locate in the collection. + + if is found in the + collection; otherwise, . + + + Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. The zero-based index in at which copying begins. - - - - Retrieves the index of a specified object in the collection. - - The object for which the index is returned. - - The index of the specified . If the is not currently a member of the collection, it returns -1. - - - - - Inserts a into the collection at the specified index. - - The zero-based index at which should be inserted. - The to insert. - - - - Returns an enumerator that can iterate through the collection. - - - A for the entire collection. - - - - - Removes a member from the collection. - - The to remove from the collection. - - + + + + Retrieves the index of a specified object in the collection. + + The object for which the index is returned. + + The index of the specified . If the is not currently a member of the collection, it returns -1. + + + + + Inserts a into the collection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + + + Returns an enumerator that can iterate through the collection. + + + A for the entire collection. + + + + + Removes a member from the collection. + + The to remove from the collection. + + Gets or sets the element at the specified index. The zero-based index of the element to get or set. - - - - Enumerates the elements of a . - - - - - Initializes a new instance of the class - with the specified . - - The collection that should be enumerated. - - + + + + Enumerates the elements of a . + + + + + Initializes a new instance of the class + with the specified . + + The collection that should be enumerated. + + Advances the enumerator to the next element of the collection. @@ -10091,507 +10091,507 @@ to the next element; if the enumerator has passed the end of the collection. - - + + Sets the enumerator to its initial position, which is before the first element in the collection. - - + + Gets the current element in the collection. The current element in the collection. - - + + Gets the current element in the collection. The current element in the collection. - - - - A set of patterns, mostly used to include or exclude certain files. - - - - The individual patterns support if and unless attributes - to specify that the element should only be used if or unless a given - condition is met. - - - The and - elements load patterns from a file. When the file is a relative path, - it will be resolved relative to the project base directory in which - the patternset is defined. Each line of this file is taken to be a - pattern. - - - The number sign (#) as the first non-blank character in a line denotes - that all text following it is a comment: - - - - - - Patterns can be grouped to sets, and later be referenced by their - . - - - When used as a standalone element (global type), any properties that - are referenced will be resolved when the definition is processed, not - when it actually used. Passing a reference to a nested build file - will not cause the properties to be re-evaluated. - - - To improve reuse of globally defined patternsets, avoid referencing - any properties altogether. - - - - - Define a set of patterns that matches all .cs files that do not contain - the text Test in their name. - - - - - - - ]]> - - - - - Define two sets. One holding C# sources, and one holding VB sources. - Both sets only include test sources when the test property is - set. A third set combines both C# and VB sources. - - - - - - - - - - - - - - - - - ]]> - - - - - Define a set from patterns in a file. - - - - - - - ]]> - - - - - Defines a patternset with patterns that are loaded from an external - file, and shows the behavior when that patternset is passed as a - reference to a nested build script. - - - External file "c:\foo\build\service.lst" holding patterns - of source files to include for the Foo.Service assembly: - - - - - Main build script located in "c:\foo\default.build": - - - - - - - - - - - - - - - - ]]> - - Nested build script located in "c:\foo\services\default.build" - which uses the patternset to feed sources files to the C# compiler: - - - - - - - - - - - ]]> - - At the time when the patternset is used in the "service" - build script, the following source files in "c:\foo\services\src" - match the defined patterns: - - - - - You should have observed that: - - - - - although the patternset is used from the "service" - build script, the path to the external file is resolved relative - to the base directory of the "main" build script in - which the patternset is defined. - - - - - the "TraceListener.cs" file is included, even though - the "build.debug" property was changed to false - after the patternset was defined (but before it was passed to - the nested build, and used). - - - - - - - - - Initializes a new instance of the class. - - - - - Adds a nested set of patterns, or references other standalone - patternset. - - The to add. - - + + + + A set of patterns, mostly used to include or exclude certain files. + + + + The individual patterns support if and unless attributes + to specify that the element should only be used if or unless a given + condition is met. + + + The and + elements load patterns from a file. When the file is a relative path, + it will be resolved relative to the project base directory in which + the patternset is defined. Each line of this file is taken to be a + pattern. + + + The number sign (#) as the first non-blank character in a line denotes + that all text following it is a comment: + + + + + + Patterns can be grouped to sets, and later be referenced by their + . + + + When used as a standalone element (global type), any properties that + are referenced will be resolved when the definition is processed, not + when it actually used. Passing a reference to a nested build file + will not cause the properties to be re-evaluated. + + + To improve reuse of globally defined patternsets, avoid referencing + any properties altogether. + + + + + Define a set of patterns that matches all .cs files that do not contain + the text Test in their name. + + + + + + + ]]> + + + + + Define two sets. One holding C# sources, and one holding VB sources. + Both sets only include test sources when the test property is + set. A third set combines both C# and VB sources. + + + + + + + + + + + + + + + + + ]]> + + + + + Define a set from patterns in a file. + + + + + + + ]]> + + + + + Defines a patternset with patterns that are loaded from an external + file, and shows the behavior when that patternset is passed as a + reference to a nested build script. + + + External file "c:\foo\build\service.lst" holding patterns + of source files to include for the Foo.Service assembly: + + + + + Main build script located in "c:\foo\default.build": + + + + + + + + + + + + + + + + ]]> + + Nested build script located in "c:\foo\services\default.build" + which uses the patternset to feed sources files to the C# compiler: + + + + + + + + + + + ]]> + + At the time when the patternset is used in the "service" + build script, the following source files in "c:\foo\services\src" + match the defined patterns: + + + + + You should have observed that: + + + + + although the patternset is used from the "service" + build script, the path to the external file is resolved relative + to the base directory of the "main" build script in + which the patternset is defined. + + + + + the "TraceListener.cs" file is included, even though + the "build.debug" property was changed to false + after the patternset was defined (but before it was passed to + the nested build, and used). + + + + + + + + + Initializes a new instance of the class. + + + + + Adds a nested set of patterns, or references other standalone + patternset. + + The to add. + + Defines a single pattern for files to include. - - - - Loads multiple patterns of files to include from a given file, set - using the parameter. - - - + + + + Loads multiple patterns of files to include from a given file, set + using the parameter. + + + Defines a single pattern for files to exclude. - - - - Loads multiple patterns of files to exclude from a given file, set - using the parameter. - - - + + + + Loads multiple patterns of files to exclude from a given file, set + using the parameter. + + + Contains HTTP proxy settings used to process requests to Internet resources. - - - - Initializes a new instance of the class. - - - - - Gets a instance representing the current - . - - - A instance representing the current - , or - if this proxy should not be used to connect to the external resource. - - - + + + + Initializes a new instance of the class. + + + + + Gets a instance representing the current + . + + + A instance representing the current + , or + if this proxy should not be used to connect to the external resource. + + + The name of the proxy host. - - - - The port number on to use. - - - + + + + The port number on to use. + + + Specifies whether to bypass the proxy server for local addresses. The default is . - - + + The credentials to submit to the proxy server for authentication. - - + + Indicates if the proxy should be used to connect to the external resource. If then the proxy will be used; otherwise, not. The default is . - - + + Indicates if the proxy should not be used to connect to the external resource. If then the proxy will be used; otherwise, not. The default is . - - + + Represents an element of which the XML is processed by its parent task or type. - - + + Gets the XML that this element represents. - - - - Gets a value indicating whether the element is performing additional - processing using the that was use to - initialize the element. - - - , as the XML that represents this build - element is processed by the containing task or type. - - - + + + + Gets a value indicating whether the element is performing additional + processing using the that was use to + initialize the element. + + + , as the XML that represents this build + element is processed by the containing task or type. + + + ReplaceTokens filter token. - - + + Token to be replaced. - - + + New value of token. - - + + Indicates if the token should be used to replace values. If then the token will be used; otherwise, not. The default is . - - + + Indicates if the token should not be used to replace values. If then the token will be used; otherwise, not. The default is . - - + + Represents an XML namespace. - - + + The prefix to associate with the namespace. - - + + The associated XML namespace URI. - - - - Indicates if the namespace should be added to the . - If then the namespace will be added; - otherwise, skipped. The default is . - - - - - Indicates if the namespace should not be added to the . - list. If then the parameter will be - added; otherwise, skipped. The default is . - - - - - Contains a collection of elements. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with the specified instance. - - - - - Initializes a new instance of the class - with the specified array of instances. - - - - - Adds a to the end of the collection. - - The to be added to the end of the collection. - The position into which the new element was inserted. - - - - Adds the elements of a array to the end of the collection. - - The array of elements to be added to the end of the collection. - - - - Adds the elements of a to the end of the collection. - - The to be added to the end of the collection. - - - - Determines whether a is in the collection. - - The to locate in the collection. - - if is found in the - collection; otherwise, . - - - - - Determines whether a with the specified - value is in the collection. - - The argument value to locate in the collection. - - if a with - value is found in the collection; otherwise, - . - - - + + + + Indicates if the namespace should be added to the . + If then the namespace will be added; + otherwise, skipped. The default is . + + + + + Indicates if the namespace should not be added to the . + list. If then the parameter will be + added; otherwise, skipped. The default is . + + + + + Contains a collection of elements. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with the specified instance. + + + + + Initializes a new instance of the class + with the specified array of instances. + + + + + Adds a to the end of the collection. + + The to be added to the end of the collection. + The position into which the new element was inserted. + + + + Adds the elements of a array to the end of the collection. + + The array of elements to be added to the end of the collection. + + + + Adds the elements of a to the end of the collection. + + The to be added to the end of the collection. + + + + Determines whether a is in the collection. + + The to locate in the collection. + + if is found in the + collection; otherwise, . + + + + + Determines whether a with the specified + value is in the collection. + + The argument value to locate in the collection. + + if a with + value is found in the collection; otherwise, + . + + + Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. The zero-based index in at which copying begins. - - - - Retrieves the index of a specified object in the collection. - - The object for which the index is returned. - - The index of the specified . If the is not currently a member of the collection, it returns -1. - - - - - Inserts a into the collection at the specified index. - - The zero-based index at which should be inserted. - The to insert. - - - - Returns an enumerator that can iterate through the collection. - - - A for the entire collection. - - - - - Removes a member from the collection. - - The to remove from the collection. - - + + + + Retrieves the index of a specified object in the collection. + + The object for which the index is returned. + + The index of the specified . If the is not currently a member of the collection, it returns -1. + + + + + Inserts a into the collection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + + + Returns an enumerator that can iterate through the collection. + + + A for the entire collection. + + + + + Removes a member from the collection. + + The to remove from the collection. + + Gets or sets the element at the specified index. The zero-based index of the element to get or set. - - - - Gets the with the specified prefix. - - The prefix of the to get. - - - - Enumerates the elements of a . - - - - - Initializes a new instance of the class - with the specified . - - The collection that should be enumerated. - - + + + + Gets the with the specified prefix. + + The prefix of the to get. + + + + Enumerates the elements of a . + + + + + Initializes a new instance of the class + with the specified . + + The collection that should be enumerated. + + Advances the enumerator to the next element of the collection. @@ -10600,142 +10600,142 @@ to the next element; if the enumerator has passed the end of the collection. - - + + Sets the enumerator to its initial position, which is before the first element in the collection. - - + + Gets the current element in the collection. The current element in the collection. - - + + Represents an XSLT extension object. The object should have a default parameterless constructor and the return value should be one of the four basic XPath data types of number, string, Boolean or node set. - - - - Initializes a new instance of the - class. - - - - - The namespace URI to associate with the extension object. - - - The namespace URI to associate with the extension object, or - if not set. - - - + + + + Initializes a new instance of the + class. + + + + + The namespace URI to associate with the extension object. + + + The namespace URI to associate with the extension object, or + if not set. + + + The full type name of the XSLT extension object. - - + + The assembly which contains the XSLT extension object. - - + + Indicates if the extension object should be added to the XSLT argument list. If then the extension object will be added; otherwise, skipped. The default is . - - + + Indicates if the extension object should not be added to the XSLT argument list. If then the extension object will be added; otherwise, skipped. The default is . - - - - Contains a collection of elements. - - - - - Initializes a new instance of the - class. - - - - - Initializes a new instance of the - class with the - specified instance. - - - - - Initializes a new instance of the - class with the - specified array of instances. - - - - - Adds a to the end of the collection. - - The to be added - to the end of the collection. - The position into which the new element was inserted. - - - - Adds the elements of a array to the - end of the collection. - - The array of - elements to be added to the end of the collection. - - - - Adds the elements of a - to the end of the collection. - - The - to be added to the end of the collection. - - - - Determines whether a is in the - collection. - - The to locate - in the collection. - - if is found in the - collection; otherwise, . - - - - - Determines whether a with the - specified value is in the collection. - - The argument value to locate in the - collection. - - if a - with value is found in the collection; - otherwise, . - - - + + + + Contains a collection of elements. + + + + + Initializes a new instance of the + class. + + + + + Initializes a new instance of the + class with the + specified instance. + + + + + Initializes a new instance of the + class with the + specified array of instances. + + + + + Adds a to the end of the collection. + + The to be added + to the end of the collection. + The position into which the new element was inserted. + + + + Adds the elements of a array to the + end of the collection. + + The array of + elements to be added to the end of the collection. + + + + Adds the elements of a + to the end of the collection. + + The + to be added to the end of the collection. + + + + Determines whether a is in the + collection. + + The to locate + in the collection. + + if is found in the + collection; otherwise, . + + + + + Determines whether a with the + specified value is in the collection. + + The argument value to locate in the + collection. + + if a + with value is found in the collection; + otherwise, . + + + Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. @@ -10745,76 +10745,76 @@ must have zero-based indexing. The zero-based index in at which copying begins. - - - - Retrieves the index of a specified - object in the collection. - - The object for - which the index is returned. - - The index of the specified . If the - is not currently a member of the - collection, it returns -1. - - - - - Inserts a into the collection at - the specified index. - - The zero-based index at which - should be inserted. - The to - insert. - - - - Returns an enumerator that can iterate through the collection. - - - A for the entire - collection. - - - - - Removes a member from the collection. - - The to remove - from the collection. - - + + + + Retrieves the index of a specified + object in the collection. + + The object for + which the index is returned. + + The index of the specified . If the + is not currently a member of the + collection, it returns -1. + + + + + Inserts a into the collection at + the specified index. + + The zero-based index at which + should be inserted. + The to + insert. + + + + Returns an enumerator that can iterate through the collection. + + + A for the entire + collection. + + + + + Removes a member from the collection. + + The to remove + from the collection. + + Gets or sets the element at the specified index. The zero-based index of the element to get or set. - - - - Gets the with the specified name. - - The name of the - to get. - - - - Enumerates the elements of a - . - - - - - Initializes a new instance of the - class - with the specified . - - The collection that should be - enumerated. - - + + + + Gets the with the specified name. + + The name of the + to get. + + + + Enumerates the elements of a + . + + + + + Initializes a new instance of the + class + with the specified . + + The collection that should be + enumerated. + + Advances the enumerator to the next element of the collection. @@ -10823,198 +10823,198 @@ to the next element; if the enumerator has passed the end of the collection. - - + + Sets the enumerator to its initial position, which is before the first element in the collection. - - + + Gets the current element in the collection. The current element in the collection. - - + + Represents an XSLT parameter. - - - - Initializes a new instance of the - class. - - - - - The name of the XSLT parameter. - - - The name of the XSLT parameter, or if - not set. - - - - - The namespace URI to associate with the parameter. - - - The namespace URI to associate with the parameter, or - if not set. - - - - - The value of the XSLT parameter. - - - The value of the XSLT parameter, or if - not set. - - - + + + + Initializes a new instance of the + class. + + + + + The name of the XSLT parameter. + + + The name of the XSLT parameter, or if + not set. + + + + + The namespace URI to associate with the parameter. + + + The namespace URI to associate with the parameter, or + if not set. + + + + + The value of the XSLT parameter. + + + The value of the XSLT parameter, or if + not set. + + + Indicates if the parameter should be added to the XSLT argument list. If then the parameter will be added; otherwise, skipped. The default is . - - + + Indicates if the parameter should not be added to the XSLT argument list. If then the parameter will be added; otherwise, skipped. The default is . - - - - Contains a collection of elements. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with the specified instance. - - - - - Initializes a new instance of the class - with the specified array of instances. - - - - - Adds a to the end of the collection. - - The to be added to the end of the collection. - The position into which the new element was inserted. - - - - Adds the elements of a array to the end of the collection. - - The array of elements to be added to the end of the collection. - - - - Adds the elements of a to the end of the collection. - - The to be added to the end of the collection. - - - - Determines whether a is in the collection. - - The to locate in the collection. - - if is found in the - collection; otherwise, . - - - - - Determines whether a with the specified - value is in the collection. - - The argument value to locate in the collection. - - if a with - value is found in the collection; otherwise, - . - - - + + + + Contains a collection of elements. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with the specified instance. + + + + + Initializes a new instance of the class + with the specified array of instances. + + + + + Adds a to the end of the collection. + + The to be added to the end of the collection. + The position into which the new element was inserted. + + + + Adds the elements of a array to the end of the collection. + + The array of elements to be added to the end of the collection. + + + + Adds the elements of a to the end of the collection. + + The to be added to the end of the collection. + + + + Determines whether a is in the collection. + + The to locate in the collection. + + if is found in the + collection; otherwise, . + + + + + Determines whether a with the specified + value is in the collection. + + The argument value to locate in the collection. + + if a with + value is found in the collection; otherwise, + . + + + Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. The zero-based index in at which copying begins. - - - - Retrieves the index of a specified object in the collection. - - The object for which the index is returned. - - The index of the specified . If the is not currently a member of the collection, it returns -1. - - - - - Inserts a into the collection at the specified index. - - The zero-based index at which should be inserted. - The to insert. - - - - Returns an enumerator that can iterate through the collection. - - - A for the entire collection. - - - - - Removes a member from the collection. - - The to remove from the collection. - - + + + + Retrieves the index of a specified object in the collection. + + The object for which the index is returned. + + The index of the specified . If the is not currently a member of the collection, it returns -1. + + + + + Inserts a into the collection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + + + Returns an enumerator that can iterate through the collection. + + + A for the entire collection. + + + + + Removes a member from the collection. + + The to remove from the collection. + + Gets or sets the element at the specified index. The zero-based index of the element to get or set. - - - - Gets the with the specified name. - - The name of the to get. - - - - Enumerates the elements of a . - - - - - Initializes a new instance of the class - with the specified . - - The collection that should be enumerated. - - + + + + Gets the with the specified name. + + The name of the to get. + + + + Enumerates the elements of a . + + + + + Initializes a new instance of the class + with the specified . + + The collection that should be enumerated. + + Advances the enumerator to the next element of the collection. @@ -11023,204 +11023,204 @@ to the next element; if the enumerator has passed the end of the collection. - - + + Sets the enumerator to its initial position, which is before the first element in the collection. - - + + Gets the current element in the collection. The current element in the collection. - - + + Resolves assemblies by caching assemblies that were loaded. - - - - Initializes an instanse of the - class. - - - - - Initializes an instanse of the - class in the context of the given . - - - - - Installs the assembly resolver by hooking up to the - event. - - - + + + + Initializes an instanse of the + class. + + + + + Initializes an instanse of the + class in the context of the given . + + + + + Installs the assembly resolver by hooking up to the + event. + + + Uninstalls the assembly resolver. - - - - Resolves an assembly not found by the system using the assembly - cache. - - The source of the event. - A that contains the event data. - - The loaded assembly, or if not found. - - - - - Occurs when an assembly is loaded. The loaded assembly is added - to the assembly cache. - - The source of the event. - An that contains the event data. - - - - Logs a message with the given priority. - - The message priority at which the specified message is to be logged. - The message to log, containing zero or more format items. - An array containing zero or more objects to format. - - The actual logging is delegated to the in which - the is executing - - - + + + + Resolves an assembly not found by the system using the assembly + cache. + + The source of the event. + A that contains the event data. + + The loaded assembly, or if not found. + + + + + Occurs when an assembly is loaded. The loaded assembly is added + to the assembly cache. + + The source of the event. + An that contains the event data. + + + + Logs a message with the given priority. + + The message priority at which the specified message is to be logged. + The message to log, containing zero or more format items. + An array containing zero or more objects to format. + + The actual logging is delegated to the in which + the is executing + + + Holds the loaded assemblies. - - - - Holds the in which the - is executing. - - - The in which the - is executing or if the - is not executing in the context of a . - - - + + + + Holds the in which the + is executing. + + + The in which the + is executing or if the + is not executing in the context of a . + + + Represents a valid command-line argument. - - - - Sets the value of the argument on the specified object. - - The object on which the value of the argument should be set. - The argument is required and no value was specified. - - - The matching property is collection-based, but is not initialized - and cannot be written to. - - -or- - - The matching property is collection-based, but has no strongly-typed - Add method. - - -or- - - The matching property is collection-based, but the signature of the - Add method is not supported. - - - - - - Assigns the specified value to the argument. - - The value that should be assigned to the argument. - - Duplicate argument. - -or- - Invalid value. - - - - - Indicates whether the specified is a - . - - - if can be assigned - to ; otherwise, . - - - - - Indicates whether the specified is collection-based. - - - if can be assigned - to and is not backed by a - that can be assigned to ; - otherwise, . - - - - - Indicates whether the specified is an array. - - - if is an array; - otherwise, . - - - + + + + Sets the value of the argument on the specified object. + + The object on which the value of the argument should be set. + The argument is required and no value was specified. + + + The matching property is collection-based, but is not initialized + and cannot be written to. + + -or- + + The matching property is collection-based, but has no strongly-typed + Add method. + + -or- + + The matching property is collection-based, but the signature of the + Add method is not supported. + + + + + + Assigns the specified value to the argument. + + The value that should be assigned to the argument. + + Duplicate argument. + -or- + Invalid value. + + + + + Indicates whether the specified is a + . + + + if can be assigned + to ; otherwise, . + + + + + Indicates whether the specified is collection-based. + + + if can be assigned + to and is not backed by a + that can be assigned to ; + otherwise, . + + + + + Indicates whether the specified is an array. + + + if is an array; + otherwise, . + + + Gets the property that backs the argument. The property that backs the arguments. - - - - Gets the underlying of the argument. - - - The underlying of the argument. - - - If the of the argument is a collection type, - this property will returns the underlying type of that collection. - - - + + + + Gets the underlying of the argument. + + + The underlying of the argument. + + + If the of the argument is a collection type, + this property will returns the underlying type of that collection. + + + Gets the long name of the argument. The long name of the argument. - - + + Gets the short name of the argument. The short name of the argument. - - + + Gets the description of the argument. The description of the argument. - - + + Gets a value indicating whether the argument is required. @@ -11228,8 +11228,8 @@ if the argument is required; otherwise, . - - + + Gets a value indicating whether a mathing command-line argument was already found. @@ -11238,8 +11238,8 @@ if a matching command-line argument was already found; otherwise, . - - + + Gets a value indicating whether the argument can be specified multiple times. @@ -11248,8 +11248,8 @@ if the argument may be specified multiple times; otherwise, . - - + + Gets a value indicating whether the argument can only be specified once with a certain value. @@ -11258,40 +11258,40 @@ if the argument should always have a unique value; otherwise, . - - - - Gets the of the property to which the argument - is applied. - - - The of the property to which the argument is - applied. - - - - - Gets a value indicating whether the argument is collection-based. - - - if the argument is backed by a - that can be assigned to and is not backed - by a that can be assigned to - ; otherwise, . - - - - - Gets a value indicating whether the argument is a set of name/value - pairs. - - - if the argument is backed by a - that can be assigned to ; otherwise, - . - - - + + + + Gets the of the property to which the argument + is applied. + + + The of the property to which the argument is + applied. + + + + + Gets a value indicating whether the argument is collection-based. + + + if the argument is backed by a + that can be assigned to and is not backed + by a that can be assigned to + ; otherwise, . + + + + + Gets a value indicating whether the argument is a set of name/value + pairs. + + + if the argument is backed by a + that can be assigned to ; otherwise, + . + + + Gets a value indicating whether the argument is array-based. @@ -11299,8 +11299,8 @@ if the argument is backed by an array; otherwise, . - - + + Gets a value indicating whether the argument is the default argument. @@ -11308,8 +11308,8 @@ if the argument is the default argument; otherwise, . - - + + Gets a value indicating whether the argument cannot be combined with other arguments. @@ -11318,156 +11318,156 @@ if the argument cannot be combined with other arguments; otherwise, . - - + + Allows control of command line parsing. - - - - Initializes a new instance of the class - with the specified argument type. - - Specifies the checking to be done on the argument. - - + + + + Initializes a new instance of the class + with the specified argument type. + + Specifies the checking to be done on the argument. + + Gets or sets the checking to be done on the argument. The checking that should be done on the argument. - - + + Gets or sets the long name of the argument. The long name of the argument. - - + + Gets or sets the short name of the argument. The short name of the argument. - - + + Gets or sets the description of the argument. The description of the argument. - - - - Contains a strongly typed collection of objects. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with the specified instance. - - - - - Initializes a new instance of the class - with the specified array of instances. - - - - - Adds a to the end of the collection. - - The to be added to the end of the collection. - The position into which the new element was inserted. - - - - Adds the elements of a array to the end of the collection. - - The array of elements to be added to the end of the collection. - - - - Adds the elements of a to the end of the collection. - - The to be added to the end of the collection. - - - - Determines whether a is in the collection. - - The to locate in the collection. - - if is found in the - collection; otherwise, . - - - + + + + Contains a strongly typed collection of objects. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with the specified instance. + + + + + Initializes a new instance of the class + with the specified array of instances. + + + + + Adds a to the end of the collection. + + The to be added to the end of the collection. + The position into which the new element was inserted. + + + + Adds the elements of a array to the end of the collection. + + The array of elements to be added to the end of the collection. + + + + Adds the elements of a to the end of the collection. + + The to be added to the end of the collection. + + + + Determines whether a is in the collection. + + The to locate in the collection. + + if is found in the + collection; otherwise, . + + + Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. The zero-based index in at which copying begins. - - - - Retrieves the index of a specified object in the collection. - - The object for which the index is returned. - - The index of the specified . If the is not currently a member of the collection, it returns -1. - - - - - Inserts a into the collection at the specified index. - - The zero-based index at which should be inserted. - The to insert. - - - - Returns an enumerator that can iterate through the collection. - - - A for the entire collection. - - - - - Removes a member from the collection. - - The to remove from the collection. - - + + + + Retrieves the index of a specified object in the collection. + + The object for which the index is returned. + + The index of the specified . If the is not currently a member of the collection, it returns -1. + + + + + Inserts a into the collection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + + + Returns an enumerator that can iterate through the collection. + + + A for the entire collection. + + + + + Removes a member from the collection. + + The to remove from the collection. + + Gets or sets the element at the specified index. The zero-based index of the element to get or set. - - - - Gets the with the specified name. - - The name of the to get. - - - - Enumerates the elements of a . - - - - - Initializes a new instance of the class - with the specified . - - The collection that should be enumerated. - - + + + + Gets the with the specified name. + + The name of the to get. + + + + Enumerates the elements of a . + + + + + Initializes a new instance of the class + with the specified . + + The collection that should be enumerated. + + Advances the enumerator to the next element of the collection. @@ -11476,120 +11476,120 @@ to the next element; if the enumerator has passed the end of the collection. - - + + Sets the enumerator to its initial position, which is before the first element in the collection. - - + + Gets the current element in the collection. The current element in the collection. - - + + The exception that is thrown when one of the command-line arguments provided is not valid. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with a descriptive message. - - A descriptive message to include with the exception. - - - - Initializes a new instance of the class - with a descriptive message and an inner exception. - - A descriptive message to include with the exception. - A nested exception that is the cause of the current exception. - - - - Initializes a new instance of the class - with serialized data. - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - - + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a descriptive message. + + A descriptive message to include with the exception. + + + + Initializes a new instance of the class + with a descriptive message and an inner exception. + + A descriptive message to include with the exception. + A nested exception that is the cause of the current exception. + + + + Initializes a new instance of the class + with serialized data. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + + Used to control parsing of command-line arguments. - - + + Indicates that this field is required. An error will be displayed if it is not present when parsing arguments. - - + + Only valid in conjunction with Multiple. Duplicate values will result in an error. - - + + Inidicates that the argument may be specified more than once. Only valid if the argument is a collection - - + + Inidicates that if this argument is specified, no other arguments may be specified. - - + + The default type for non-collection arguments. The argument is not required, but an error will be reported if it is specified more than once. - - + + The default type for collection arguments. The argument is permitted to occur multiple times, but duplicate values will cause an error to be reported. - - + + Commandline parser. - - - - Initializes a new instance of the class - using possible arguments deducted from the specific . - - The from which the possible command-line arguments should be retrieved. - A value indicating whether or not a response file is able to be used. - is a null reference. - - - - Parses an argument list. - - The arguments to parse. - The destination object on which properties will be set corresponding to the specified arguments. - is a null reference. - The of does not match the argument specification that was used to initialize the parser. - - + + + + Initializes a new instance of the class + using possible arguments deducted from the specific . + + The from which the possible command-line arguments should be retrieved. + A value indicating whether or not a response file is able to be used. + is a null reference. + + + + Parses an argument list. + + The arguments to parse. + The destination object on which properties will be set corresponding to the specified arguments. + is a null reference. + The of does not match the argument specification that was used to initialize the parser. + + Splits a string and removes any empty strings from the result. Same functionality as the @@ -11599,72 +11599,72 @@ the array of strings - - + + Read a response file and parse the arguments as usual. The response file to load arguments - - + + Parse the argument list using the - - - - Returns the that's applied - on the specified property. - - The property of which applied should be returned. - - The that's applied to the - , or a null reference if none was applied. - - - - - Gets a logo banner using version and copyright attributes defined on the - or the - . - - - A logo banner. - - - + + + + Returns the that's applied + on the specified property. + + The property of which applied should be returned. + + The that's applied to the + , or a null reference if none was applied. + + + + + Gets a logo banner using version and copyright attributes defined on the + or the + . + + + A logo banner. + + + Gets the usage instructions. The usage instructions. - - + + Gets a value indicating whether no arguments were specified on the command line. - - + + Marks a command-line option as being the default option. When the name of a command-line argument is not specified, this option will be assumed. - - - - Initializes a new instance of the class - with the specified argument type. - - Specifies the checking to be done on the argument. - - + + + + Initializes a new instance of the class + with the specified argument type. + + Specifies the checking to be done on the argument. + + Provides modified version for Copy and Move from the File class that allow for filter chain processing. - - + + Copies a file filtering its content through the filter chain. @@ -11673,8 +11673,8 @@ Chain of filters to apply when copying, or is no filters should be applied. The encoding used to read the soure file. The encoding used to write the destination file. - - + + Moves a file filtering its content through the filter chain. @@ -11683,8 +11683,8 @@ Chain of filters to apply when moving, or is no filters should be applied. The encoding used to read the soure file. The encoding used to write the destination file. - - + + Reads a file filtering its content through the filter chain. @@ -11695,57 +11695,57 @@ If is , then the system's ANSI code page will be used to read the file. - - - - Returns a uniquely named empty temporary directory on disk. - - - A representing the temporary directory. - - - - - Combines two path strings. - - The first path. - The second path. - - A string containing the combined paths. If one of the specified - paths is a zero-length string, this method returns the other path. - If contains an absolute path, this method - returns . - - - - On *nix, processing is delegated to . - - - On Windows, this method normalized the paths to avoid running into - the 260 character limit of a path and converts forward slashes in - both and to - the platform's directory separator character. - - - - - - Returns Absolute Path (Fix for 260 Char Limit of Path.GetFullPath(...)) - - The file or directory for which to obtain absolute path information. - Path Resolved - path is a zero-length string, contains only white space or contains one or more invalid characters as defined by . - is . - - + + + + Returns a uniquely named empty temporary directory on disk. + + + A representing the temporary directory. + + + + + Combines two path strings. + + The first path. + The second path. + + A string containing the combined paths. If one of the specified + paths is a zero-length string, this method returns the other path. + If contains an absolute path, this method + returns . + + + + On *nix, processing is delegated to . + + + On Windows, this method normalized the paths to avoid running into + the 260 character limit of a path and converts forward slashes in + both and to + the platform's directory separator character. + + + + + + Returns Absolute Path (Fix for 260 Char Limit of Path.GetFullPath(...)) + + The file or directory for which to obtain absolute path information. + Path Resolved + path is a zero-length string, contains only white space or contains one or more invalid characters as defined by . + is . + + Returns the home directory of the current user. The home directory of the current user. - - + + Scans a list of directories for the specified filename. @@ -11759,96 +11759,96 @@ The absolute path to the specified file, or null if the file was not found. - - + + Helper class for determining whether assemblies are located in the Global Assembly Cache. - - - - Initializes a new instance of the class in - the context of the given . - - - - - Determines whether an assembly is installed in the Global - Assembly Cache given its file name or path. - - The name or path of the file that contains the manifest of the assembly. - - if is - installed in the Global Assembly Cache; otherwise, - . - - - - To determine whether the specified assembly is installed in the - Global Assembly Cache, the assembly is loaded into a separate - . - - - If the family of the current runtime framework does not match the - family of the current target framework, this method will return - for all assemblies as there's no way to - determine whether a given assembly is in the Global Assembly Cache - for another framework family than the family of the current runtime - framework. - - - - - - Holds the in which assemblies will be loaded - to determine whether they are in the Global Assembly Cache. - - - - - Holds the context of the . - - - - - Holds a list of assembly files for which already has been determined - whether they are located in the Global Assembly Cache. - - - - The key of the is the full path to the - assembly file and the value is a indicating - whether the assembly is located in the Global Assembly Cache. - - - - + + + + Initializes a new instance of the class in + the context of the given . + + + + + Determines whether an assembly is installed in the Global + Assembly Cache given its file name or path. + + The name or path of the file that contains the manifest of the assembly. + + if is + installed in the Global Assembly Cache; otherwise, + . + + + + To determine whether the specified assembly is installed in the + Global Assembly Cache, the assembly is loaded into a separate + . + + + If the family of the current runtime framework does not match the + family of the current target framework, this method will return + for all assemblies as there's no way to + determine whether a given assembly is in the Global Assembly Cache + for another framework family than the family of the current runtime + framework. + + + + + + Holds the in which assemblies will be loaded + to determine whether they are in the Global Assembly Cache. + + + + + Holds the context of the . + + + + + Holds a list of assembly files for which already has been determined + whether they are located in the Global Assembly Cache. + + + + The key of the is the full path to the + assembly file and the value is a indicating + whether the assembly is located in the Global Assembly Cache. + + + + Holds a value indicating whether the object has been disposed. - - - - Gets the context of the . - - - The context of the . - - - - - Obtains a lifetime service object to control the lifetime policy for - this instance. - - - An object of type used to control the lifetime - policy for this instance. This is the current lifetime service object - for this instance if one exists; otherwise, a new lifetime service - object initialized with a lease that will never time out. - - - + + + + Gets the context of the . + + + The context of the . + + + + + Obtains a lifetime service object to control the lifetime policy for + this instance. + + + An object of type used to control the lifetime + policy for this instance. This is the current lifetime service object + for this instance if one exists; otherwise, a new lifetime service + object initialized with a lease that will never time out. + + + Determines whether an assembly is installed in the Global Assembly Cache given its file name or path. @@ -11859,176 +11859,176 @@ installed in the Global Assembly Cache; otherwise, . - - + + Provides a set of helper methods related to reflection. - - - - Initializes a new instance of the class. - - - Uses a private access modifier to prevent instantiation of this class. - - - - - Loads the type specified in the type string with assembly qualified name. - - The assembly qualified name of the type to load. - Flag set to to throw an exception if the type cannot be loaded. - - is and - an error is encountered while loading the , or - is not an assembly qualified name. - - - If the cannot be instantiated from the assembly - qualified type name, then we'll try to instantiate the type using its - simple type name from an already loaded assembly with an assembly - name mathing the assembly in the assembly qualified type name. - - - The type loaded or if it could not be loaded. - - - + + + + Initializes a new instance of the class. + + + Uses a private access modifier to prevent instantiation of this class. + + + + + Loads the type specified in the type string with assembly qualified name. + + The assembly qualified name of the type to load. + Flag set to to throw an exception if the type cannot be loaded. + + is and + an error is encountered while loading the , or + is not an assembly qualified name. + + + If the cannot be instantiated from the assembly + qualified type name, then we'll try to instantiate the type using its + simple type name from an already loaded assembly with an assembly + name mathing the assembly in the assembly qualified type name. + + + The type loaded or if it could not be loaded. + + + Provides resource support to NAnt assemblies. This class cannot be inherited from. - - - - Prevents the class from being - instantiated explicitly. - - - - - Registers the assembly to be used as the fallback if resources - aren't found in the local satellite assembly. - - - A that represents the - assembly to register. - - - The following example shows how to register a shared satellite - assembly. - - - - - - - - Returns the value of the specified string resource. - - - A that contains the name of the - resource to get. - - - A that contains the value of the - resource localized for the current culture. - - - The returned resource is localized for the cultural settings of the - current . - - The GetString method is thread-safe. - - - - The following example demonstrates the GetString method using - the cultural settings of the current . - - - - - - - - Returns the value of the specified string resource localized for - the specified culture. - - - - - A that contains the value of the - resource localized for the specified culture. - - - - The GetString method is thread-safe. - - - - The following example demonstrates the GetString method using - a specific culture. - - - - - - - - Returns the value of the specified string resource localized for - the specified culture for the specified assembly. - - - A that contains the name of the - resource to get. - - - A that represents - the culture for which the resource is localized. - - - A - - - A that contains the value of the - resource localized for the specified culture. - - - - The GetString method is thread-safe. - - - - The following example demonstrates the GetString method using - specific culture and assembly. - - - - - - - - Registers the specified assembly. - - - A that represents the - assembly to register. - - - + + + + Prevents the class from being + instantiated explicitly. + + + + + Registers the assembly to be used as the fallback if resources + aren't found in the local satellite assembly. + + + A that represents the + assembly to register. + + + The following example shows how to register a shared satellite + assembly. + + + + + + + + Returns the value of the specified string resource. + + + A that contains the name of the + resource to get. + + + A that contains the value of the + resource localized for the current culture. + + + The returned resource is localized for the cultural settings of the + current . + + The GetString method is thread-safe. + + + + The following example demonstrates the GetString method using + the cultural settings of the current . + + + + + + + + Returns the value of the specified string resource localized for + the specified culture. + + + + + A that contains the value of the + resource localized for the specified culture. + + + + The GetString method is thread-safe. + + + + The following example demonstrates the GetString method using + a specific culture. + + + + + + + + Returns the value of the specified string resource localized for + the specified culture for the specified assembly. + + + A that contains the name of the + resource to get. + + + A that represents + the culture for which the resource is localized. + + + A + + + A that contains the value of the + resource localized for the specified culture. + + + + The GetString method is thread-safe. + + + + The following example demonstrates the GetString method using + specific culture and assembly. + + + + + + + + Registers the specified assembly. + + + A that represents the + assembly to register. + + + Determines the manifest resource name of the resource holding the localized strings. @@ -12043,46 +12043,46 @@ strings should match the name of the assembly, minus Tasks suffix. - - - - Groups a set of useful manipulation and validation - methods. - - - - - Initializes a new instance of the class. - - - Prevents instantiation of the class. - - - - - Determines whether the last character of the given - matches the specified character. - - The string. - The character. - - if the last character of - matches ; otherwise, . - - is . - - - - Indicates whether or not the specified is - or an string. - - The value to check. - - if is - or an empty string (""); otherwise, . - - - + + + + Groups a set of useful manipulation and validation + methods. + + + + + Initializes a new instance of the class. + + + Prevents instantiation of the class. + + + + + Determines whether the last character of the given + matches the specified character. + + The string. + The character. + + if the last character of + matches ; otherwise, . + + is . + + + + Indicates whether or not the specified is + or an string. + + The value to check. + + if is + or an empty string (""); otherwise, . + + + Converts an empty string ("") to . @@ -12091,8 +12091,8 @@ if is an empty string ("") or ; otherwise, . - - + + Converts to an empty string. @@ -12101,106 +12101,106 @@ An empty string if is ; otherwise, . - - - - Concatenates a specified separator between each - element of a specified , yielding a - single concatenated string. - - A . - A . - - A consisting of the elements of - interspersed with the separator string. - - - - For example if is ", " and the elements - of are "apple", "orange", "grape", and "pear", - returns "apple, orange, - grape, pear". - - - If is , an empty - string () is used instead. - - - - - - Creates a shallow copy of the specified . - - The that should be copied. - - A shallow copy of the specified . - - - + + + + Concatenates a specified separator between each + element of a specified , yielding a + single concatenated string. + + A . + A . + + A consisting of the elements of + interspersed with the separator string. + + + + For example if is ", " and the elements + of are "apple", "orange", "grape", and "pear", + returns "apple, orange, + grape, pear". + + + If is , an empty + string () is used instead. + + + + + + Creates a shallow copy of the specified . + + The that should be copied. + + A shallow copy of the specified . + + + Thrown whenever an error occurs during the build. - - + + The location of the exception in the build document (xml file). - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with a descriptive message. - - A descriptive message to include with the exception. - - - - Initializes a new instance of the class - with the specified descriptive message and inner exception. - - A descriptive message to include with the exception. - A nested exception that is the cause of the current exception. - - - - Initializes a new instance of the class - with a descriptive message and the location in the build file that - caused the exception. - - A descriptive message to include with the exception. - The location in the build file where the exception occured. - - - - Initializes a new instance of the class - with a descriptive message, the location in the build file and an - instance of the exception that is the cause of the current exception. - - A descriptive message to include with the exception. - The location in the build file where the exception occured. - A nested exception that is the cause of the current exception. - - - - Initializes a new instance of the class - with serialized data. - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - - - - Serializes this object into the provided. - - The to populate with data. - The destination for this serialization. - - + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with a descriptive message. + + A descriptive message to include with the exception. + + + + Initializes a new instance of the class + with the specified descriptive message and inner exception. + + A descriptive message to include with the exception. + A nested exception that is the cause of the current exception. + + + + Initializes a new instance of the class + with a descriptive message and the location in the build file that + caused the exception. + + A descriptive message to include with the exception. + The location in the build file where the exception occured. + + + + Initializes a new instance of the class + with a descriptive message, the location in the build file and an + instance of the exception that is the cause of the current exception. + + A descriptive message to include with the exception. + The location in the build file where the exception occured. + A nested exception that is the cause of the current exception. + + + + Initializes a new instance of the class + with serialized data. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + + + + Serializes this object into the provided. + + The to populate with data. + The destination for this serialization. + + Creates and returns a string representation of the current exception. @@ -12208,8 +12208,8 @@ A string representation of the current exception. - - + + Gets the raw message as specified when the exception was constructed. @@ -12218,8 +12218,8 @@ The raw message as specified when the exception was constructed. - - + + Gets the location in the build file of the element from which the exception originated. @@ -12228,8 +12228,8 @@ The location in the build file of the element from which the exception originated. - - + + Gets a message that describes the current exception. @@ -12239,13 +12239,13 @@ Adds location information to the message, if available. - - + + Represents the set of command-line options supported by NAnt. - - + + Gets or sets the target framework to use (overrides NAnt.exe.config settings) @@ -12257,8 +12257,8 @@ For a list of possible frameworks, see NAnt.exe.config, possible values include "net-1.0", "net-1.1", etc. - - + + Gets or sets the target framework to use (overrides NAnt.exe.config settings) @@ -12270,8 +12270,8 @@ For a list of possible frameworks, see NAnt.exe.config, possible values include "net-1.0", "net-1.1", etc. - - + + Gets or sets the buildfile that should be executed. @@ -12281,8 +12281,8 @@ Can be both a file or an URI. - - + + Gets or sets a value indicating whether more information should be displayed during the build process. @@ -12291,8 +12291,8 @@ if more information should be displayed; otherwise, . The default is . - - + + Gets or sets a value indicating whether debug information should be displayed during the build process. @@ -12301,8 +12301,8 @@ if debug information should be displayed; otherwise, . The default is . - - + + Gets or sets a value indicating whether only error and debug debug messages should be displayed during the build process. @@ -12312,8 +12312,8 @@ displayed; otherwise, . The default is . - - + + Gets or sets a value indicating whether to produce emacs (and other editor) friendly output. @@ -12323,8 +12323,8 @@ and other editors can parse files names, etc. The default is . - - + + Gets a value indicating whether parent directories should be searched for a buildfile. @@ -12334,75 +12334,75 @@ a build file; otherwise, . The default is . - - + + Gets or sets the indentation level of the build output. The indentation level of the build output. The default is 0. - - + + Gets or sets the list of properties that should be set. The list of properties that should be set. - - - - Gets or sets the of logger to add to the list - of listeners. - - - The of logger to add to the list of - listeners. - - - The should derive from . - - - + + + + Gets or sets the of logger to add to the list + of listeners. + + + The of logger to add to the list of + listeners. + + + The should derive from . + + + Gets or sets the name of the file to log output to. The name of the file to log output to. - - - - Gets a collection containing fully qualified type names of classes - implementating that should be added - to the project as listeners. - - - A collection of fully qualified type names that should be added as - listeners to the . - - - + + + + Gets a collection containing fully qualified type names of classes + implementating that should be added + to the project as listeners. + + + A collection of fully qualified type names that should be added as + listeners to the . + + + Gets a collection of assemblies to load extensions from. A collection of assemblies to load extensions from. - - - - Gets or sets a value indicating whether help - should be printed. - - - if help should be - printed; otherwise, . The default is - . - - - + + + + Gets or sets a value indicating whether help + should be printed. + + + if help should be + printed; otherwise, . The default is + . + + + Gets or sets a value indicating whether the logo banner should be printed. @@ -12411,8 +12411,8 @@ if the logo banner should be printed; otherwise, . The default is . - - + + Gets or sets a value indicating whether the NAnt help should be printed. @@ -12421,270 +12421,270 @@ if NAnt help should be printed; otherwise, . The default is . - - + + Gets a collection containing the targets that should be executed. A collection that contains the targets that should be executed. - - + + + + Custom configuration section handler for the element. + + + + + This just passed things through. Return the node read from the config file. + + + + + Main entry point to NAnt that is called by the ConsoleStub. + + + + + Starts NAnt. This is the Main entry point. + + Command Line args, or whatever you want to pass it. They will treated as Command Line args. + + The exit code. + + + + + Prints the projecthelp to the console. + + The build file to show help for. + + is loaded and transformed with + ProjectHelp.xslt, which is an embedded resource. + + + + + Gets the file name for the build file in the specified directory. + + The directory to look for a build file. When in doubt use Environment.CurrentDirectory for directory. + Look for a build file with this pattern or name. If null look for a file that matches the default build pattern (*.build). + Whether or not to search the parent directories for a build file. + The path to the build file or null if no build file could be found. + + + + Loads the extension assemblies in the current + and scans them for extensions. + + The extension assemblies to load. + The which will be used to output messages to the build log. + + + + Dynamically constructs an instance of + the class specified. + + + + At this point, only looks in the assembly where + is defined. + + + The fully qualified name of the logger that should be instantiated. + Type could not be loaded. + does not implement . + + + + Dynamically constructs an instance of + the class specified. + + + + At this point, only looks in the assembly where + is defined. + + + The fully qualified name of the listener that should be instantiated. + Type could not be loaded. + does not implement . + + + + Add the listeners specified in the command line arguments, + along with the default listener, to the specified project. + + The command-line options. + The to add listeners to. + + + + Spits out generic help info to the console. + + + + + Write the message of the specified and + the inner exceptions to . + + The to write to . + + + + Creates a new instance of the + class for the specified class in the + specified. + + The containing the . + The class representing the . + + + + Gets the name of the class that can be + created using this . + + + The name of the class that can be created + using this . + + + + + Gets the name of the data type which the + can create. + + + The name of the data type which the + can create. + + + + + Contains a strongly typed collection of objects. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with the specified instance. + + + + + Initializes a new instance of the class + with the specified array of instances. + + + + + Adds a to the end of the collection. + + The to be added to the end of the collection. + The position into which the new element was inserted. + + + + Adds the elements of a array to the end of the collection. + + The array of elements to be added to the end of the collection. + + + + Adds the elements of a to the end of the collection. + + The to be added to the end of the collection. + + + + Determines whether a is in the collection. + + The to locate in the collection. + + if is found in the + collection; otherwise, . + + + + + Determines whether a for the specified + task is in the collection. + + The name of task for which the should be located in the collection. + + if a for + the specified task is found in the collection; otherwise, + . + + + - Custom configuration section handler for the element. + Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. - - + The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. + The zero-based index in at which copying begins. + + - This just passed things through. Return the node read from the config file. + Retrieves the index of a specified object in the collection. - - + The object for which the index is returned. + + The index of the specified . If the is not currently a member of the collection, it returns -1. + + + - Main entry point to NAnt that is called by the ConsoleStub. + Inserts a into the collection at the specified index. - - + The zero-based index at which should be inserted. + The to insert. + + - Starts NAnt. This is the Main entry point. + Returns an enumerator that can iterate through the collection. - Command Line args, or whatever you want to pass it. They will treated as Command Line args. - The exit code. + A for the entire collection. - - + + - Prints the projecthelp to the console. + Removes a member from the collection. - The build file to show help for. - - is loaded and transformed with - ProjectHelp.xslt, which is an embedded resource. - - - + The to remove from the collection. + + - Gets the file name for the build file in the specified directory. + Gets or sets the element at the specified index. - The directory to look for a build file. When in doubt use Environment.CurrentDirectory for directory. - Look for a build file with this pattern or name. If null look for a file that matches the default build pattern (*.build). - Whether or not to search the parent directories for a build file. - The path to the build file or null if no build file could be found. - - - - Loads the extension assemblies in the current - and scans them for extensions. - - The extension assemblies to load. - The which will be used to output messages to the build log. - - - - Dynamically constructs an instance of - the class specified. - - - - At this point, only looks in the assembly where - is defined. - - - The fully qualified name of the logger that should be instantiated. - Type could not be loaded. - does not implement . - - - - Dynamically constructs an instance of - the class specified. - - - - At this point, only looks in the assembly where - is defined. - - - The fully qualified name of the listener that should be instantiated. - Type could not be loaded. - does not implement . - - - - Add the listeners specified in the command line arguments, - along with the default listener, to the specified project. - - The command-line options. - The to add listeners to. - - + The zero-based index of the element to get or set. + + - Spits out generic help info to the console. + Gets the for the specified task. - - - - Write the message of the specified and - the inner exceptions to . - - The to write to . - - - - Creates a new instance of the - class for the specified class in the - specified. - - The containing the . - The class representing the . - - - - Gets the name of the class that can be - created using this . - - - The name of the class that can be created - using this . - - - - - Gets the name of the data type which the - can create. - - - The name of the data type which the - can create. - - - - - Contains a strongly typed collection of objects. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with the specified instance. - - - - - Initializes a new instance of the class - with the specified array of instances. - - - - - Adds a to the end of the collection. - - The to be added to the end of the collection. - The position into which the new element was inserted. - - - - Adds the elements of a array to the end of the collection. - - The array of elements to be added to the end of the collection. - - - - Adds the elements of a to the end of the collection. - - The to be added to the end of the collection. - - - - Determines whether a is in the collection. - - The to locate in the collection. - - if is found in the - collection; otherwise, . - - - - - Determines whether a for the specified - task is in the collection. - - The name of task for which the should be located in the collection. - - if a for - the specified task is found in the collection; otherwise, - . - - - + The name of task for which the should be located in the collection. + + - Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. + Enumerates the elements of a . - The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. - The zero-based index in at which copying begins. - - - - Retrieves the index of a specified object in the collection. - - The object for which the index is returned. - - The index of the specified . If the is not currently a member of the collection, it returns -1. - - - - - Inserts a into the collection at the specified index. - - The zero-based index at which should be inserted. - The to insert. - - - - Returns an enumerator that can iterate through the collection. - - - A for the entire collection. - - - - - Removes a member from the collection. - - The to remove from the collection. - - + + - Gets or sets the element at the specified index. + Initializes a new instance of the class + with the specified . - The zero-based index of the element to get or set. - - - - Gets the for the specified task. - - The name of task for which the should be located in the collection. - - - - Enumerates the elements of a . - - - - - Initializes a new instance of the class - with the specified . - - The collection that should be enumerated. - - + The collection that should be enumerated. + + Advances the enumerator to the next element of the collection. @@ -12693,40 +12693,40 @@ to the next element; if the enumerator has passed the end of the collection. - - + + Sets the enumerator to its initial position, which is before the first element in the collection. - - + + Gets the current element in the collection. The current element in the collection. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with the specified capacity. - - - + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with the specified capacity. + + + Inherits Properties from an existing property dictionary Instance DataType list to inherit - - + + Used for searching filesystem based on given include/exclude rules. @@ -12759,38 +12759,38 @@ } - - - - Initializes a new instance of the . - - - On unix, patterns are matching case-sensitively; otherwise, they - are matched case-insensitively. - - - - - Initializes a new instance of the - specifying whether patterns are to be match case-sensitively. - - Specifies whether patterns are to be matched case-sensititely. - - - - Creates a shallow copy of the . - - - A shallow copy of the . - - - - - Uses and search criteria (relative to - or absolute), to search for filesystem objects. - - - + + + + Initializes a new instance of the . + + + On unix, patterns are matching case-sensitively; otherwise, they + are matched case-insensitively. + + + + + Initializes a new instance of the + specifying whether patterns are to be match case-sensitively. + + Specifies whether patterns are to be matched case-sensititely. + + + + Creates a shallow copy of the . + + + A shallow copy of the . + + + + + Uses and search criteria (relative to + or absolute), to search for filesystem objects. + + + Parses specified NAnt search patterns for search directories and corresponding regex patterns. @@ -12799,8 +12799,8 @@ Out. Regex patterns. Absolute canonical paths. Out. Non-regex files. Absolute canonical paths. In. Whether to allow a pattern to add search directories. - - + + Given a NAnt search pattern returns a search directory and an regex search pattern. @@ -12811,131 +12811,131 @@ Out. Whether the pattern is potentially recursive or not Out. Whether this is a regex pattern or not Out. Regex search pattern (absolute canonical path) - - + + Searches a directory recursively for files and directories matching the search criteria. Directory in which to search (absolute canonical path) Whether to scan recursively or not - - + + Converts search pattern to a regular expression pattern. Search pattern relative to the search directory. Regular expresssion - - + + Gets or set a value indicating whether or not to use case-sensitive pattern matching. - - + + Gets the collection of include patterns. - - + + Gets the collection of exclude patterns. - - - - The base directory to scan. The default is the - current directory. - - - + + + + The base directory to scan. The default is the + current directory. + + + Gets the list of files that match the given patterns. - - + + Gets the list of directories that match the given patterns. - - + + Gets the list of directories that were scanned for files. - - - - Creates a shallow copy of the . - - - A shallow copy of the . - - - + + + + Creates a shallow copy of the . + + + A shallow copy of the . + + + Creates a string representing a list of the strings in the collection. A string that represents the contents. - - - - Initialize a new instance of the - class specifying whether or not string comparison should be - case-sensitive. - - Specifies whether or not string comparison should be case-sensitive. - - - - Creates a shallow copy of the . - - - A shallow copy of the . - - - - - Determines whether the specified string is in the - . - - The string to locate in the . The value can be . - - if value is found in the ; otherwise, . - - - String comparisons within the - are only case-sensitive if is - - - - - - Searches for the specified string and returns the zero-based index - of the first occurrence within the . - - The string to locate. The value can be . - - The zero-based index of the first occurrence of - in the , if found; otherwise, -1. - - - String comparisons within the - are only case-sensitive if is - . - - - + + + + Initialize a new instance of the + class specifying whether or not string comparison should be + case-sensitive. + + Specifies whether or not string comparison should be case-sensitive. + + + + Creates a shallow copy of the . + + + A shallow copy of the . + + + + + Determines whether the specified string is in the + . + + The string to locate in the . The value can be . + + if value is found in the ; otherwise, . + + + String comparisons within the + are only case-sensitive if is + + + + + + Searches for the specified string and returns the zero-based index + of the first occurrence within the . + + The string to locate. The value can be . + + The zero-based index of the first occurrence of + in the , if found; otherwise, -1. + + + String comparisons within the + are only case-sensitive if is + . + + + Gets a value indicating whether string comparison is case-sensitive. A value indicating whether string comparison is case-sensitive. - - + + Gets the value of the specified property. @@ -12943,24 +12943,24 @@ The value of the specified property. - - + + Splits an input string into a sequence of tokens used during parsing. - - + + Available tokens - - + + Encalsulates information about installed frameworks incuding version information and directory locations for finding tools. - - + + Resolves the specified assembly to a full path by matching it against the reference assemblies. @@ -12975,29 +12975,29 @@ Whether the file name is matched case-sensitively depends on the operating system. - - - - Searches the list of tool paths of the current framework for the - given file, and returns the absolute path if found. - - The file name of the tool to search for. - - The absolute path to if found in one of the - configured tool paths; otherwise, . - - is . - - - The configured tool paths are scanned in the order in which they - are defined in the framework configuration. - - - The file name of the tool to search should include the extension. - - - - + + + + Searches the list of tool paths of the current framework for the + given file, and returns the absolute path if found. + + The file name of the tool to search for. + + The absolute path to if found in one of the + configured tool paths; otherwise, . + + is . + + + The configured tool paths are scanned in the order in which they + are defined in the framework configuration. + + + The file name of the tool to search should include the extension. + + + + Gets the value of the specified attribute from the specified node. @@ -13007,139 +13007,139 @@ The value of the attribute with the specified name or if the attribute does not exist or has no value. - - + + Gets the name of the framework. The name of the framework. - - + + Gets the family of the framework. The family of the framework. - - + + Gets the description of the framework. The description of the framework. - - - - Gets the version of the framework. - - - The version of the framework. - - The framework is not valid. - - When is not configured, the framework is not - considered valid. - - - - - Gets the Common Language Runtime version of the framework. - - - The Common Language Runtime version of the framework. - - The framework is not valid. - - When is , the - framework is not considered valid. - - - - - Gets the CLR type of the framework. - - - The CLR type of the framework. - - The framework is not valid. - - - - Gets the Visual Studio version that corresponds with this - framework. - - - The Visual Studio version that corresponds with this framework. - - The framework is not valid. - There is no version of Visual Studio that corresponds with this framework. - - - - Gets the base directory of the framework tools for the framework. - - - The base directory of the framework tools for the framework. - - The framework is not valid. - - - - Gets the runtime information for this framework. - - - The runtime information for the framework or - if no runtime information is configured for the framework. - - The framework is not valid. - - - - Gets the directory where the system assemblies for the framework - are located. - - - The directory where the system assemblies for the framework are - located. - - The framework is not valid. - - - - Gets the directory containing the SDK tools for the framework. - - - The directory containing the SDK tools for the framework or a null - reference if the configured sdk directory does not exist, or is not - valid. - - The framework is not valid. - - - - Gets the used to initialize this framework. - - - The used to initialize this framework. - - The framework is not valid. - - - - Gets the set of assemblies and directories that should scanned for - NAnt tasks, types or functions. - - - The set of assemblies and directories that should be scanned for - NAnt tasks, types or functions. - - The framework is not valid. - - + + + + Gets the version of the framework. + + + The version of the framework. + + The framework is not valid. + + When is not configured, the framework is not + considered valid. + + + + + Gets the Common Language Runtime version of the framework. + + + The Common Language Runtime version of the framework. + + The framework is not valid. + + When is , the + framework is not considered valid. + + + + + Gets the CLR type of the framework. + + + The CLR type of the framework. + + The framework is not valid. + + + + Gets the Visual Studio version that corresponds with this + framework. + + + The Visual Studio version that corresponds with this framework. + + The framework is not valid. + There is no version of Visual Studio that corresponds with this framework. + + + + Gets the base directory of the framework tools for the framework. + + + The base directory of the framework tools for the framework. + + The framework is not valid. + + + + Gets the runtime information for this framework. + + + The runtime information for the framework or + if no runtime information is configured for the framework. + + The framework is not valid. + + + + Gets the directory where the system assemblies for the framework + are located. + + + The directory where the system assemblies for the framework are + located. + + The framework is not valid. + + + + Gets the directory containing the SDK tools for the framework. + + + The directory containing the SDK tools for the framework or a null + reference if the configured sdk directory does not exist, or is not + valid. + + The framework is not valid. + + + + Gets the used to initialize this framework. + + + The used to initialize this framework. + + The framework is not valid. + + + + Gets the set of assemblies and directories that should scanned for + NAnt tasks, types or functions. + + + The set of assemblies and directories that should be scanned for + NAnt tasks, types or functions. + + The framework is not valid. + + Returns a value indicating whether the current framework is valid. @@ -13147,118 +13147,118 @@ if the framework is installed and correctly configured; otherwise, . - - - - Gets the reference assemblies for the current framework. - - - The reference assemblies for the current framework. - - The framework is not valid. - - - - Gets the tool paths for the current framework. - - - The tool paths for the current framework. - - The framework is not valid. - - - - Gets the . - - - The . - - - The defines the current namespace - scope and provides methods for looking up namespace information. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with the specified capacity. - - - + + + + Gets the reference assemblies for the current framework. + + + The reference assemblies for the current framework. + + The framework is not valid. + + + + Gets the tool paths for the current framework. + + + The tool paths for the current framework. + + The framework is not valid. + + + + Gets the . + + + The . + + + The defines the current namespace + scope and provides methods for looking up namespace information. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with the specified capacity. + + + Defines the types of frameworks. - - + + Frameworks that are supported on the current platform, but are not installed. - - + + Frameworks that are installed on the current system. - - + + Retrieves installation state attributes. - - + + Frameworks that typically target full desktop devices. - - + + Frameworks that target compact devices. - - + + Frameworks that run in a browser. - - + + Retrieves device attributes. - - + + Frameworks released as part of the open-source Mono project. - - + + Frameworks released by Microsoft. - - + + Retrieves vendor attributes. - - + + All frameworks supported on the current platform, regarless of their installation state, target device or vendor. - - + + Stores the file name, line number and column number to record a position in a text file. - - + + Creates a location consisting of a file name, line number and column number. @@ -13266,65 +13266,65 @@ can be a local URI resource, e.g., file:///C:/WINDOWS/setuplog.txt. - - + + Creates a location consisting of a file name. can be a local URI resource, e.g., file:///C:/WINDOWS/setuplog.txt. - - + + Creates an "unknown" location. - - + + Private Init function. - - + + Returns the file name, line number and a trailing space. An error message can be appended easily. For unknown locations, returns an empty string. - - + + Gets a string containing the file name for the location. The file name includes both the file path and the extension. - - + + Gets the line number for the location. Lines start at 1. Will be zero if not specified. - - + + Gets the column number for the location. Columns start a 1. Will be zero if not specified. - - + + Maps XML nodes to the text positions from their original source. - - - - Initializes a new instance of the class. - - - + + + + Initializes a new instance of the class. + + + Determines if a file has been loaded by the current project. @@ -13333,420 +13333,420 @@ if the specified file has already been loaded by the current project; otherwise, . - - - - Adds an to the map. - - - An can only be added to the map once. - - - - - Returns the in the XML file for the given node. - - - The must be from an - that has been added to the map. - - - + + + + Adds an to the map. + + + An can only be added to the map once. + + + + + Returns the in the XML file for the given node. + + + The must be from an + that has been added to the map. + + + Represents a position in the build file. - - - - Initializes a new instance of the - with the speified line and column. - - The line coordinate of the position. - The column coordinate of the position. - - + + + + Initializes a new instance of the + with the speified line and column. + + The line coordinate of the position. + The column coordinate of the position. + + The line coordinate of the position. - - + + The column coordinate of the position. - - + + Defines the set of levels recognised by the NAnt logging system. - - + + Designates fine-grained informational events that are most useful to debug a build process. - - + + Designates events that offer a more detailed view of the build process. - - + + Designates informational events that are useful for getting a high-level view of the build process. - - + + Designates potentionally harmful events. - - + + Designates error events. - - - - Can be used to suppress all messages. - - - No events should be logged with this . - - - - - Class representing an event occurring during a build. - - - - An event is built by specifying either a project, a task or a target. - - - A level event will only have a - reference. - - - A level event will have and - references. - - - A level event will have , - and references. - - - - - - Initializes a new instance of the - class. - - - - - Initializes a new instance of the - class for a level event. - - The that emitted the event. - - - - Initializes a new instance of the - class for a level event. - - The that emitted the event. - - - - Initializes a new instance of the - class for a level event. - - The that emitted the event. - - + + + + Can be used to suppress all messages. + + + No events should be logged with this . + + + + + Class representing an event occurring during a build. + + + + An event is built by specifying either a project, a task or a target. + + + A level event will only have a + reference. + + + A level event will have and + references. + + + A level event will have , + and references. + + + + + + Initializes a new instance of the + class. + + + + + Initializes a new instance of the + class for a level event. + + The that emitted the event. + + + + Initializes a new instance of the + class for a level event. + + The that emitted the event. + + + + Initializes a new instance of the + class for a level event. + + The that emitted the event. + + Gets or sets the message associated with this event. The message associated with this event. - - + + Gets or sets the priority level associated with this event. The priority level associated with this event. - - - - Gets or sets the associated with this event. - - - The associated with this event. - - - - - Gets the that fired this event. - - - The that fired this event. - - - - - Gets the that fired this event. - - - The that fired this event, or a null reference - if this is a level event. - - - - - Gets the that fired this event. - - - The that fired this event, or - if this is a or level - event. - - - - - Represents the method that handles the build events. - - The source of the event. - A that contains the event data. - - + + + + Gets or sets the associated with this event. + + + The associated with this event. + + + + + Gets the that fired this event. + + + The that fired this event. + + + + + Gets the that fired this event. + + + The that fired this event, or a null reference + if this is a level event. + + + + + Gets the that fired this event. + + + The that fired this event, or + if this is a or level + event. + + + + + Represents the method that handles the build events. + + The source of the event. + A that contains the event data. + + Instances of classes that implement this interface can register to be notified when things happen during a build. - - - - Signals that a build has started. - - The source of the event. - A object that contains the event data. - - This event is fired before any targets have started. - - - - - Signals that the last target has finished. - - The source of the event. - A object that contains the event data. - - This event will still be fired if an error occurred during the build. - - - - - Signals that a target has started. - - The source of the event. - A object that contains the event data. - - - - Signals that a target has finished. - - The source of the event. - A object that contains the event data. - - This event will still be fired if an error occurred during the build. - - - - - Signals that a task has started. - - The source of the event. - A object that contains the event data. - - - - Signals that a task has finished. - - The source of the event. - A object that contains the event data. - - This event will still be fired if an error occurred during the build. - - - - - Signals that a message has been logged. - - The source of the event. - A object that contains the event data. - - - - Interface used by NAnt to log the build output. - - - Depending on the supplied command-line arguments, NAnt will set the - to or a - with a file as backend store. - - - + + + + Signals that a build has started. + + The source of the event. + A object that contains the event data. + + This event is fired before any targets have started. + + + + + Signals that the last target has finished. + + The source of the event. + A object that contains the event data. + + This event will still be fired if an error occurred during the build. + + + + + Signals that a target has started. + + The source of the event. + A object that contains the event data. + + + + Signals that a target has finished. + + The source of the event. + A object that contains the event data. + + This event will still be fired if an error occurred during the build. + + + + + Signals that a task has started. + + The source of the event. + A object that contains the event data. + + + + Signals that a task has finished. + + The source of the event. + A object that contains the event data. + + This event will still be fired if an error occurred during the build. + + + + + Signals that a message has been logged. + + The source of the event. + A object that contains the event data. + + + + Interface used by NAnt to log the build output. + + + Depending on the supplied command-line arguments, NAnt will set the + to or a + with a file as backend store. + + + + + Flushes buffered build events or messages to the underlying storage. + + + + + Gets or sets the highest level of message this logger should respond + to. + + The highest level of message this logger should respond to. + + Only messages with a message level higher than or equal to the given + level should actually be written to the log. + + + + + Gets or sets a value indicating whether to produce emacs (and other + editor) friendly output. + + + if output is to be unadorned so that emacs + and other editors can parse files names, etc. + + + + + Gets or sets the to which the logger is + to send its output. + + + + + Initializes a new instance of the + class. + + + + + Flushes buffered build events or messages to the underlying storage. + + + + + Signals that a build has started. + + The source of the event. + A object that contains the event data. + + This event is fired before any targets have started. + + + + + Signals that the last target has finished. + + The source of the event. + A object that contains the event data. + + This event will still be fired if an error occurred during the build. + + + - Flushes buffered build events or messages to the underlying storage. + Signals that a target has started. - - + The source of the event. + A object that contains the event data. + + - Gets or sets the highest level of message this logger should respond - to. + Signals that a task has finished. - The highest level of message this logger should respond to. + The source of the event. + A object that contains the event data. - Only messages with a message level higher than or equal to the given - level should actually be written to the log. + This event will still be fired if an error occurred during the build. - - + + - Gets or sets a value indicating whether to produce emacs (and other - editor) friendly output. + Signals that a task has started. - - if output is to be unadorned so that emacs - and other editors can parse files names, etc. - - - - - Gets or sets the to which the logger is - to send its output. - - - - - Initializes a new instance of the - class. - - - + The source of the event. + A object that contains the event data. + + - Flushes buffered build events or messages to the underlying storage. + Signals that a task has finished. + + The source of the event. + A object that contains the event data. + + This event will still be fired if an error occurred during the build. + + + + + Signals that a message has been logged. - - - - Signals that a build has started. - - The source of the event. - A object that contains the event data. - - This event is fired before any targets have started. - - - - - Signals that the last target has finished. - - The source of the event. - A object that contains the event data. - - This event will still be fired if an error occurred during the build. - - - - - Signals that a target has started. - - The source of the event. - A object that contains the event data. - - - - Signals that a task has finished. - - The source of the event. - A object that contains the event data. - - This event will still be fired if an error occurred during the build. - - - - - Signals that a task has started. - - The source of the event. - A object that contains the event data. - - - - Signals that a task has finished. - - The source of the event. - A object that contains the event data. - - This event will still be fired if an error occurred during the build. - - - - - Signals that a message has been logged. - - The source of the event. - A object that contains the event data. - - Only messages with a priority higher or equal to the threshold of - the logger will actually be output in the build log. - - - + The source of the event. + A object that contains the event data. + + Only messages with a priority higher or equal to the threshold of + the logger will actually be output in the build log. + + + Empty implementation which allows derived classes to receive the output that is generated in this logger. The message being logged. - - - - Outputs an indented message to the build log if its priority is - greather than or equal to the of the - logger. - - The priority of the message to output. - The message to output. - The number of characters that the message should be indented. - - - - Outputs an indented message to the build log if its priority is - greather than or equal to the of the - logger. - - The event to output. - - - - Outputs an indented message to the build log if its priority is - greather than or equal to the of the - logger. - - The event to output. - The number of characters that the message should be indented. - - + + + + Outputs an indented message to the build log if its priority is + greather than or equal to the of the + logger. + + The priority of the message to output. + The message to output. + The number of characters that the message should be indented. + + + + Outputs an indented message to the build log if its priority is + greather than or equal to the of the + logger. + + The event to output. + + + + Outputs an indented message to the build log if its priority is + greather than or equal to the of the + logger. + + The event to output. + The number of characters that the message should be indented. + + Holds a stack of reports for all running builds. - - + + Gets or sets the highest level of message this logger should respond to. @@ -13758,8 +13758,8 @@ Only messages with a message level higher than or equal to the given level should be written to the log. - - + + Gets or sets a value indicating whether to produce emacs (and other editor) friendly output. @@ -13769,38 +13769,38 @@ and other editors can parse files names, etc. The default is . - - - - Gets or sets the to which the logger is - to send its output. - - - The to which the logger sends its output. - - - + + + + Gets or sets the to which the logger is + to send its output. + + + The to which the logger sends its output. + + + Used to store information about a build, to allow better reporting to the user. - - + + Errors encountered so far. - - + + Warnings encountered so far. - - + + The start time of the build process. - - + + Buffers log messages from DefaultLogger, and sends an e-mail with the results. @@ -13874,170 +13874,170 @@ - - - - Initializes a new instance of the - class. - - - - - Signals that a build has started. - - The source of the event. - A object that contains the event data. - - This event is fired before any targets have started. - - - - - Signals that the last target has finished, and send an e-mail with - the build results. - - The source of the event. - A object that contains the event data. - - + + + + Initializes a new instance of the + class. + + + + + Signals that a build has started. + + The source of the event. + A object that contains the event data. + + This event is fired before any targets have started. + + + + + Signals that the last target has finished, and send an e-mail with + the build results. + + The source of the event. + A object that contains the event data. + + Receives and buffers log messages. The message being logged. - - - - Gets the value of the specified property. - - Properties to obtain value from. - Suffix of property name. "MailLogger" will be prepended internally. - Value returned if property is not present in . - Value indicating whether the property should exist, or have a default value set. - - The value of the specified property; or the default value if the - property is not present in . - - is , and the specified property is not present and no default value has been given. - - + + + + Gets the value of the specified property. + + Properties to obtain value from. + Suffix of property name. "MailLogger" will be prepended internally. + Value returned if property is not present in . + Value indicating whether the property should exist, or have a default value set. + + The value of the specified property; or the default value if the + property is not present in . + + is , and the specified property is not present and no default value has been given. + + Buffer in which the message is constructed prior to sending. - - + + Holds the stack of currently executing projects. - - - - Contains a strongly typed collection of - objects. - - - - - Initializes a new instance of the - class. - - - - - Initializes a new instance of the - class with the specified instance. - - - - - Initializes a new instance of the - class with the specified array of instances. - - - - - Adds a to the end of the collection. - - The to be added to the end of the collection. - The position into which the new element was inserted. - - - - Adds the elements of a array to the end of the collection. - - The array of elements to be added to the end of the collection. - - - - Adds the elements of a to the end of the collection. - - The to be added to the end of the collection. - - - - Determines whether a is in the collection. - - The to locate in the collection. - - if is found in the - collection; otherwise, . - - - + + + + Contains a strongly typed collection of + objects. + + + + + Initializes a new instance of the + class. + + + + + Initializes a new instance of the + class with the specified instance. + + + + + Initializes a new instance of the + class with the specified array of instances. + + + + + Adds a to the end of the collection. + + The to be added to the end of the collection. + The position into which the new element was inserted. + + + + Adds the elements of a array to the end of the collection. + + The array of elements to be added to the end of the collection. + + + + Adds the elements of a to the end of the collection. + + The to be added to the end of the collection. + + + + Determines whether a is in the collection. + + The to locate in the collection. + + if is found in the + collection; otherwise, . + + + Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. The zero-based index in at which copying begins. - - - - Retrieves the index of a specified object in the collection. - - The object for which the index is returned. - - The index of the specified . If the is not currently a member of the collection, it returns -1. - - - - - Inserts a into the collection at the specified index. - - The zero-based index at which should be inserted. - The to insert. - - - - Returns an enumerator that can iterate through the collection. - - - A for the entire collection. - - - - - Removes a member from the collection. - - The to remove from the collection. - - + + + + Retrieves the index of a specified object in the collection. + + The object for which the index is returned. + + The index of the specified . If the is not currently a member of the collection, it returns -1. + + + + + Inserts a into the collection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + + + Returns an enumerator that can iterate through the collection. + + + A for the entire collection. + + + + + Removes a member from the collection. + + The to remove from the collection. + + Gets or sets the element at the specified index. The zero-based index of the element to get or set. - - - - Enumerates the elements of a . - - - - - Initializes a new instance of the class - with the specified . - - The collection that should be enumerated. - - + + + + Enumerates the elements of a . + + + + + Initializes a new instance of the class + with the specified . + + The collection that should be enumerated. + + Advances the enumerator to the next element of the collection. @@ -14046,107 +14046,107 @@ to the next element; if the enumerator has passed the end of the collection. - - + + Sets the enumerator to its initial position, which is before the first element in the collection. - - + + Gets the current element in the collection. The current element in the collection. - - - - Implements a for writing information to - the NAnt logging infrastructure. - - - - - Initializes a new instance of the class - for the specified with the specified output - level and format provider. - - Determines the indentation level. - The with which messages will be output to the build log. - An object that controls formatting. - - + + + + Implements a for writing information to + the NAnt logging infrastructure. + + + + + Initializes a new instance of the class + for the specified with the specified output + level and format provider. + + Determines the indentation level. + The with which messages will be output to the build log. + An object that controls formatting. + + Writes a character array to the buffer. The character array to write to the text stream. - - + + Writes a string to the buffer. - - + + Writes an empty string to the logging infrastructure. - - + + Writes a string to the logging infrastructure. The string to write. If is a null reference, only the line termination characters are written. - - - - Writes out a formatted string using the same semantics as - . - - The formatting string. - The object array to write into format string. - - + + + + Writes out a formatted string using the same semantics as + . + + The formatting string. + The object array to write into format string. + + Causes any buffered data to be written to the logging infrastructure. - - + + Closes the current writer and releases any system resources associated with the writer. - - - - Obtains a lifetime service object to control the lifetime policy for - this instance. - - - An object of type used to control the lifetime - policy for this instance. This is the current lifetime service object - for this instance if one exists; otherwise, a new lifetime service - object initialized with a lease that will never time out. - - - - - Gets the in which the output is written. - - - The always writes output in UTF8 - encoding. - - - - - Gets the with which messages will be output to - the build log. - - - + + + + Obtains a lifetime service object to control the lifetime policy for + this instance. + + + An object of type used to control the lifetime + policy for this instance. This is the current lifetime service object + for this instance if one exists; otherwise, a new lifetime service + object initialized with a lease that will never time out. + + + + + Gets the in which the output is written. + + + The always writes output in UTF8 + encoding. + + + + + Gets the with which messages will be output to + the build log. + + + Used to search for files on the PATH. @@ -14160,38 +14160,38 @@ exact name of the file. - - - - Creates a shallow copy of the . - - - A shallow copy of the . - - - - - Creates a shallow copy of the . - - - A shallow copy of the . - - - + + + + Creates a shallow copy of the . + + + A shallow copy of the . + + + + + Creates a shallow copy of the . + + + A shallow copy of the . + + + Adds a file to the list of files to be scanned for. The filename or search pattern to add to the list. - - + + Scans all direcetories in the PATH environment variable for files. List of matching files found in the PATH. - - + + Scans all directories in the given environment variable for files. @@ -14200,265 +14200,265 @@ List of matching files found in the directory of the given environment variable. - - - - Creates a shallow copy of the specified . - - The that should be copied. - - A shallow copy of the specified . - - - - - Central representation of a NAnt project. - - - - The method will initialize the project with the build - file specified in the constructor and execute the default target. - - - - - - - - If no target is given, the default target will be executed if specified - in the project. - - - - - - - + + + + Creates a shallow copy of the specified . + + The that should be copied. + + A shallow copy of the specified . + + + + + Central representation of a NAnt project. + + + + The method will initialize the project with the build + file specified in the constructor and execute the default target. + + + + + + + + If no target is given, the default target will be executed if specified + in the project. + + + + + + + Constant for the "visiting" state, used when traversing a DFS of target dependencies. - - + + Constant for the "visited" state, used when traversing a DFS of target dependencies. - - + + Holds the logger for this class. - - + + Holds the default threshold for build loggers. - - - - Initializes a new class with the given - document, message threshold and indentation level. - - Any valid build format will do. - The message threshold. - The project indentation level. - - - - Initializes a new class with the given - document, message threshold and indentation level, and using - the specified to load internal configuration - settings. - - Any valid build format will do. - The message threshold. - The project indentation level. - The NAnt should use to initialize configuration settings. - - This constructor is useful for developers using NAnt as a class - library. - - - - - Initializes a new class with the given - source, message threshold and indentation level. - - - The full path to the build file. - This can be of any form that accepts. - - The message threshold. - The project indentation level. - - If the source is a uri of form 'file:///path' then use the path part. - - - - - Initializes a new class with the given - source, message threshold and indentation level, and using - the specified to load internal configuration - settings. - - - The full path to the build file. - This can be of any form that accepts. - - The message threshold. - The project indentation level. - The NAnt should use to initialize configuration settings. - is . - - If the source is a uri of form 'file:///path' then use the path part. - - - - - Initializes a as subproject of the specified - . - - - The full path to the build file. - This can be of any form that accepts. - - The parent . - - Optimized for framework initialization projects, by skipping automatic - discovery of extension assemblies and framework configuration. - - - - - Initializes a with - set to , and - set to 0. - - An containing the build script. - - Optimized for framework initialization projects, by skipping automatic - discovery of extension assemblies and framework configuration. - - - - - Gets the list of supported frameworks filtered by the specified - parameter. - - A bitwise combination of values that filter the frameworks to retrieve. - - An array of type that contains the - frameworks specified by the parameter, - sorted on name. - - - - - Dispatches a event to the build listeners - for this . - - The source of the event. - A that contains the event data. - - - - Dispatches a event to the build listeners - for this . - - The source of the event. - A that contains the event data. - - - - Dispatches a event to the build listeners - for this . - - The source of the event. - A that contains the event data. - - - - Dispatches a event to the build listeners - for this . - - The source of the event. - A that contains the event data. - - - - Dispatches a event to the build listeners - for this . - - The source of the event. - A that contains the event data. - - - - Dispatches the event to the build listeners - for this . - - The source of the event. - A that contains the event data. - - - - Dispatches a event to the build listeners - for this . - - A that contains the event data. - - - - Writes a level message to the build log with - the given . - - The to log at. - The message to log. - - - - Writes a level formatted message to the build - log with the given . - - The to log at. - The message to log, containing zero or more format items. - An array containing zero or more objects to format. - - - - Writes a task level message to the build log - with the given . - - The from which the message originated. - The to log at. - The message to log. - - - - Writes a level message to the build log with - the given . - - The from which the message orignated. - The level to log at. - The message to log. - - - - Executes the default target. - - - No top level error handling is done. Any - will be passed onto the caller. - - - + + + + Initializes a new class with the given + document, message threshold and indentation level. + + Any valid build format will do. + The message threshold. + The project indentation level. + + + + Initializes a new class with the given + document, message threshold and indentation level, and using + the specified to load internal configuration + settings. + + Any valid build format will do. + The message threshold. + The project indentation level. + The NAnt should use to initialize configuration settings. + + This constructor is useful for developers using NAnt as a class + library. + + + + + Initializes a new class with the given + source, message threshold and indentation level. + + + The full path to the build file. + This can be of any form that accepts. + + The message threshold. + The project indentation level. + + If the source is a uri of form 'file:///path' then use the path part. + + + + + Initializes a new class with the given + source, message threshold and indentation level, and using + the specified to load internal configuration + settings. + + + The full path to the build file. + This can be of any form that accepts. + + The message threshold. + The project indentation level. + The NAnt should use to initialize configuration settings. + is . + + If the source is a uri of form 'file:///path' then use the path part. + + + + + Initializes a as subproject of the specified + . + + + The full path to the build file. + This can be of any form that accepts. + + The parent . + + Optimized for framework initialization projects, by skipping automatic + discovery of extension assemblies and framework configuration. + + + + + Initializes a with + set to , and + set to 0. + + An containing the build script. + + Optimized for framework initialization projects, by skipping automatic + discovery of extension assemblies and framework configuration. + + + + + Gets the list of supported frameworks filtered by the specified + parameter. + + A bitwise combination of values that filter the frameworks to retrieve. + + An array of type that contains the + frameworks specified by the parameter, + sorted on name. + + + + + Dispatches a event to the build listeners + for this . + + The source of the event. + A that contains the event data. + + + + Dispatches a event to the build listeners + for this . + + The source of the event. + A that contains the event data. + + + + Dispatches a event to the build listeners + for this . + + The source of the event. + A that contains the event data. + + + + Dispatches a event to the build listeners + for this . + + The source of the event. + A that contains the event data. + + + + Dispatches a event to the build listeners + for this . + + The source of the event. + A that contains the event data. + + + + Dispatches the event to the build listeners + for this . + + The source of the event. + A that contains the event data. + + + + Dispatches a event to the build listeners + for this . + + A that contains the event data. + + + + Writes a level message to the build log with + the given . + + The to log at. + The message to log. + + + + Writes a level formatted message to the build + log with the given . + + The to log at. + The message to log, containing zero or more format items. + An array containing zero or more objects to format. + + + + Writes a task level message to the build log + with the given . + + The from which the message originated. + The to log at. + The message to log. + + + + Writes a level message to the build log with + the given . + + The from which the message orignated. + The level to log at. + The message to log. + + + + Executes the default target. + + + No top level error handling is done. Any + will be passed onto the caller. + + + Executes a specific target, and its dependencies. @@ -14466,8 +14466,8 @@ Global tasks are not executed. - - + + Executes a specific target. @@ -14476,8 +14476,8 @@ Global tasks are not executed. - - + + Executes the default target and wraps in error handling and time stamping. @@ -14486,320 +14486,320 @@ if the build was successful; otherwise, . - - - - Creates a new from the given . - - The definition. - The new instance. - - - - Creates a new from the given - within a . - - The definition. - The owner . - The new instance. - - - - Expands a from known properties. - - The with replacement tokens. - The location in the build file. Used to throw more accurate exceptions. - The expanded and replaced . - - - - Combines the specified path with the of - the to form a full path to file or directory. - - The relative or absolute path. - - A rooted path, or the of the - if the parameter is a null reference. - - - - - Creates the default and attaches it to - the . - - - - - Increases the of the . - - - - - Decreases the of the . - - - - - Detaches the currently attached instances - from the . - - - - - Attaches the specified build listeners to the . - - The instances to attach to the . - - The currently attached instances will - be detached before the new instances - are attached. - - - - - Inits stuff: - TypeFactory: Calls Initialize and AddProject - Log.IndentSize set to 12 - Project properties are initialized ("nant.* stuff set") - - NAnt Props: - nant.filename - nant.version - nant.location - nant.project.name - nant.project.buildfile (if doc has baseuri) - nant.project.basedir - nant.project.default = defaultTarget - - - An representing the project definition. - The project message threshold. - The project indentation level. - Optimization flags. - is . - - - - This method is only meant to be used by the - class and . - - - - - Creates a new based on the project - definition. - - - The full path to the build file. - This can be of any form that accepts. - - - An based on the specified project - definition. - - - - - Configures the platform properties for the current platform. - - NAnt does not support the current platform. - - - - Updates dependent properties when the - is set. - - - - - Topologically sorts a set of targets. - - The name of the root target. The sort is created in such a way that the sequence of targets up to the root target is the minimum possible such sequence. Must not be . - A collection of instances. - - A collection of instances in sorted order. - - There is a cyclic dependecy among the targets, or a named target does not exist. - - - - - Performs a single step in a recursive depth-first-search traversal - of the target dependency tree. - - - The current target is first set to the "visiting" state, and pushed - onto the "visiting" stack. - - - An exception is then thrown if any child of the current node is in - the visiting state, as that implies a circular dependency. The - exception contains details of the cycle, using elements of the - "visiting" stack. - - - If any child has not already been "visited", this method is called - recursively on it. - - - The current target is then added to the ordered list of targets. - Note that this is performed after the children have been visited in - order to get the correct order. The current target is set to the - "visited" state. - - - By the time this method returns, the ordered list contains the - sequence of targets up to and including the current target. - - - The current target to inspect. Must not be . - A collection of instances. - A mapping from targets to states The states in question are "VISITING" and "VISITED". Must not be . - A stack of targets which are currently being visited. Must not be . - The list to add target names to. This will end up containing the complete list of depenencies in dependency order. Must not be . - - A non-existent target is specified - -or- - A circular dependency is detected. - - - - - Builds an appropriate exception detailing a specified circular - dependency. - - The dependency to stop at. Must not be . - A stack of dependencies. Must not be . - - A detailing the specified circular - dependency. - - - - - Gets or sets the indendation level of the build output. - - - The indentation level of the build output. - - - To change the , the - and methods should be used. - - - + + + + Creates a new from the given . + + The definition. + The new instance. + + + + Creates a new from the given + within a . + + The definition. + The owner . + The new instance. + + + + Expands a from known properties. + + The with replacement tokens. + The location in the build file. Used to throw more accurate exceptions. + The expanded and replaced . + + + + Combines the specified path with the of + the to form a full path to file or directory. + + The relative or absolute path. + + A rooted path, or the of the + if the parameter is a null reference. + + + + + Creates the default and attaches it to + the . + + + + + Increases the of the . + + + + + Decreases the of the . + + + + + Detaches the currently attached instances + from the . + + + + + Attaches the specified build listeners to the . + + The instances to attach to the . + + The currently attached instances will + be detached before the new instances + are attached. + + + + + Inits stuff: + TypeFactory: Calls Initialize and AddProject + Log.IndentSize set to 12 + Project properties are initialized ("nant.* stuff set") + + NAnt Props: + nant.filename + nant.version + nant.location + nant.project.name + nant.project.buildfile (if doc has baseuri) + nant.project.basedir + nant.project.default = defaultTarget + + + An representing the project definition. + The project message threshold. + The project indentation level. + Optimization flags. + is . + + + + This method is only meant to be used by the + class and . + + + + + Creates a new based on the project + definition. + + + The full path to the build file. + This can be of any form that accepts. + + + An based on the specified project + definition. + + + + + Configures the platform properties for the current platform. + + NAnt does not support the current platform. + + + + Updates dependent properties when the + is set. + + + + + Topologically sorts a set of targets. + + The name of the root target. The sort is created in such a way that the sequence of targets up to the root target is the minimum possible such sequence. Must not be . + A collection of instances. + + A collection of instances in sorted order. + + There is a cyclic dependecy among the targets, or a named target does not exist. + + + + + Performs a single step in a recursive depth-first-search traversal + of the target dependency tree. + + + The current target is first set to the "visiting" state, and pushed + onto the "visiting" stack. + + + An exception is then thrown if any child of the current node is in + the visiting state, as that implies a circular dependency. The + exception contains details of the cycle, using elements of the + "visiting" stack. + + + If any child has not already been "visited", this method is called + recursively on it. + + + The current target is then added to the ordered list of targets. + Note that this is performed after the children have been visited in + order to get the correct order. The current target is set to the + "visited" state. + + + By the time this method returns, the ordered list contains the + sequence of targets up to and including the current target. + + + The current target to inspect. Must not be . + A collection of instances. + A mapping from targets to states The states in question are "VISITING" and "VISITED". Must not be . + A stack of targets which are currently being visited. Must not be . + The list to add target names to. This will end up containing the complete list of depenencies in dependency order. Must not be . + + A non-existent target is specified + -or- + A circular dependency is detected. + + + + + Builds an appropriate exception detailing a specified circular + dependency. + + The dependency to stop at. Must not be . + A stack of dependencies. Must not be . + + A detailing the specified circular + dependency. + + + + + Gets or sets the indendation level of the build output. + + + The indentation level of the build output. + + + To change the , the + and methods should be used. + + + + + Gets or sets the indentation size of the build output. + + + The indendation size of the build output. + + + + + Gets or sets the default threshold level for build loggers. + + + The default threshold level for build loggers. + + + + + Gets the name of the . + + + The name of the or an empty + if no name is specified. + + + + + Gets or sets the base directory used for relative references. + + + The base directory used for relative references. + + The directory is not rooted. + + + The gets and sets the built-in property + named "nant.project.basedir". + + + + - Gets or sets the indentation size of the build output. + Gets the . - The indendation size of the build output. + The . - - + + The defines the current namespace + scope and provides methods for looking up namespace information. + + + - Gets or sets the default threshold level for build loggers. + Gets the form of the current project definition. - The default threshold level for build loggers. + The form of the current project definition. - - - - Gets the name of the . - - - The name of the or an empty - if no name is specified. - - - - - Gets or sets the base directory used for relative references. - - - The base directory used for relative references. - - The directory is not rooted. - - - The gets and sets the built-in property - named "nant.project.basedir". - - - - - - Gets the . - - - The . - - - The defines the current namespace - scope and provides methods for looking up namespace information. - - - - - Gets the form of the current project definition. - - - The form of the current project definition. - - - + + Gets a collection of available .NET frameworks. A collection of available .NET frameworks. - - + + Gets the framework in which NAnt is currently running. The framework in which NAnt is currently running. - - - - Gets or sets the framework to use for compilation. - - - The framework to use for compilation. - - The value specified is . - The specified framework is not installed, or not configured correctly. - - We will use compiler tools and system assemblies for this framework - in framework-related tasks. - - - - - Gets the name of the platform on which NAnt is currently running. - - - The name of the platform on which NAnt is currently running. - - - - Possible values are: - - - - win32 - - - unix - - - - NAnt does not support the current platform. - - + + + + Gets or sets the framework to use for compilation. + + + The framework to use for compilation. + + The value specified is . + The specified framework is not installed, or not configured correctly. + + We will use compiler tools and system assemblies for this framework + in framework-related tasks. + + + + + Gets the name of the platform on which NAnt is currently running. + + + The name of the platform on which NAnt is currently running. + + + + Possible values are: + + + + win32 + + + unix + + + + NAnt does not support the current platform. + + Gets the current target. @@ -14807,8 +14807,8 @@ The current target, or if no target is executing. - - + + Gets the path to the build file. @@ -14816,26 +14816,26 @@ The path to the build file, or if the build document is not file backed. - - - - Gets the active definition. - - - The active definition. - - - - - Gets the NAnt should use to initialize - configuration settings. - - - The NAnt should use to initialize - configuration settings. - - - + + + + Gets the active definition. + + + The active definition. + + + + + Gets the NAnt should use to initialize + configuration settings. + + + The NAnt should use to initialize + configuration settings. + + + Gets the name of the target that will be executed when no other build targets are specified. @@ -14845,8 +14845,8 @@ build targets are specified, or if no default target is specified in the build file. - - + + Gets a value indicating whether tasks should output more build log messages. @@ -14855,8 +14855,8 @@ if tasks should output more build log message; otherwise, . - - + + The list of targets to build. @@ -14864,8 +14864,8 @@ Targets are built in the order they appear in the collection. If the collection is empty the default target will be built. - - + + Gets the properties defined in this project. @@ -14879,8 +14879,8 @@ These properties can be used in expansion. - - + + Gets the framework-neutral properties defined in the NAnt configuration file. @@ -14900,95 +14900,95 @@ not available for expansion in the build file. - - - - Gets the instances defined in this project. - - - The instances defined in this project. - - - - This is the collection of instances that - are defined by (eg fileset) declarations. - - - - + + + + Gets the instances defined in this project. + + + The instances defined in this project. + + + + This is the collection of instances that + are defined by (eg fileset) declarations. + + + + Gets the targets defined in this project. The targets defined in this project. - - + + Gets the build listeners for this project. The build listeners for this project. - - + + Allow the project construction to be optimized. Use this with care! - - + + Do not perform any optimizations. - - + + The project base directory must not be automatically scanned for extension assemblies. - - + + Do not scan the project configuration for frameworks, and do not configure the runtime and target framework. - - + + Holds a value indicating whether a scan for tasks, types and functions has already been performed for the current runtime framework. - - - - Initializes a new instance of the - class for the given . - - The that should be configured. - - - - Loads and processes settings from the specified - of the configuration file. - - - - - Processes the framework nodes of the given platform node. - - An representing the platform on which NAnt is running. - - - - Reads the list of global properties specified in the NAnt configuration - file. - - An representing global properties. - - + + + + Initializes a new instance of the + class for the given . + + The that should be configured. + + + + Loads and processes settings from the specified + of the configuration file. + + + + + Processes the framework nodes of the given platform node. + + An representing the platform on which NAnt is running. + + + + Reads the list of global properties specified in the NAnt configuration + file. + + An representing global properties. + + Gets the value of the specified attribute from the specified node. @@ -14998,97 +14998,97 @@ The value of the attribute with the specified name or if the attribute does not exist or has no value. - - - - Gets the underlying instance. - - - The underlying instance. - - - - - Gets the . - - - The . - - - The defines the current namespace - scope and provides methods for looking up namespace information. - - - + + + + Gets the underlying instance. + + + The underlying instance. + + + + + Gets the . + + + The . + + + The defines the current namespace + scope and provides methods for looking up namespace information. + + + Constant for the "visiting" state, used when traversing a DFS of property references. - - + + Constant for the "visited" state, used when travesing a DFS of property references. - - - - Initializes a new instance of the - class holding properties for the given - instance. - - The project for which the dictionary will hold properties. - - - - Performs additional custom processes before inserting a new element - into the instance. - - The key of the element to insert. - The value of the element to insert. - - - - Performs additional custom processes before removing an element - from the instance. - - The key of the element to remove. - The value of the element to remove. - - + + + + Initializes a new instance of the + class holding properties for the given + instance. + + The project for which the dictionary will hold properties. + + + + Performs additional custom processes before inserting a new element + into the instance. + + The key of the element to insert. + The value of the element to insert. + + + + Performs additional custom processes before removing an element + from the instance. + + The key of the element to remove. + The value of the element to remove. + + Performs additional custom processes when validating the element with the specified key and value. The key of the element to validate. The value of the element to validate. - - - - Adds a property that cannot be changed. - - The name of the property. - The value to assign to the property. - - Properties added with this method can never be changed. Note that - they are removed if the method is called. - - - + + + + Adds a property that cannot be changed. + + The name of the property. + The value to assign to the property. + + Properties added with this method can never be changed. Note that + they are removed if the method is called. + + + Marks a property as a property of which the value is expanded at execution time. The name of the property to mark as dynamic. - - + + Adds a property to the collection. The name of the property. The value to assign to the property. - - + + Determines whether the specified property is listed as read-only. @@ -15097,8 +15097,8 @@ if the property is listed as read-only; otherwise, . - - + + Determines whether the specified property is listed as dynamic. @@ -15107,23 +15107,23 @@ if the property is listed as dynamic; otherwise, . - - + + Inherits properties from an existing property dictionary Instance. Property list to inherit. The list of properties to exclude during inheritance. - - - - Expands a from known properties. - - The replacement tokens. - The to pass through for any exceptions. - The expanded and replaced string. - - + + + + Expands a from known properties. + + The replacement tokens. + The to pass through for any exceptions. + The expanded and replaced string. + + Determines whether a property already exists. @@ -15132,24 +15132,24 @@ if the specified property already exists; otherwise, . - - + + Removes the property with the specified name. The name of the property to remove. - - - - Expands a from known properties. - - The replacement tokens. - The to pass through for any exceptions. - A mapping from properties to states. The states in question are "VISITING" and "VISITED". Must not be . - A stack of properties which are currently being visited. Must not be . - The expanded and replaced string. - - + + + + Expands a from known properties. + + The replacement tokens. + The to pass through for any exceptions. + A mapping from properties to states. The states in question are "VISITING" and "VISITED". Must not be . + A stack of properties which are currently being visited. Must not be . + The expanded and replaced string. + + Evaluates the given expression string and returns the result @@ -15158,107 +15158,107 @@ - - + + Checks whether the specified property is deprecated. The property to check. - - - - Builds an appropriate exception detailing a specified circular - reference. - - The property reference to stop at. Must not be . - A stack of property references. Must not be . - - A detailing the specified circular - dependency. - - - + + + + Builds an appropriate exception detailing a specified circular + reference. + + The property reference to stop at. Must not be . + A stack of property references. Must not be . + + A detailing the specified circular + dependency. + + + Maintains a list of the property names that are readonly. - - + + Maintains a list of the property names of which the value is expanded on usage, not at initalization. - - + + The project for which the dictionary holds properties. - - + + Indexer property. - - + + Gets the project for which the dictionary holds properties. The project for which the dictionary holds properties. - - - - Initializes a new instance of the class. - - - - - Creates a shallow copy of the . - - - A shallow copy of the . - - - - - Creates a shallow copy of the . - - - A shallow copy of the . - - - + + + + Initializes a new instance of the class. + + + + + Creates a shallow copy of the . + + + A shallow copy of the . + + + + + Creates a shallow copy of the . + + + A shallow copy of the . + + + Executes dependent targets first, then the target. - - + + This indicates whether the target has already executed. - - - - The name of the target. - - - - Hides to have - return the name of target, not the name of XML element - which - would always be target. - - - Note: Properties are not allowed in the name. - - - - + + + + The name of the target. + + + + Hides to have + return the name of target, not the name of XML element - which + would always be target. + + + Note: Properties are not allowed in the name. + + + + If then the target will be executed; otherwise, skipped. The default is . - - + + Gets a value indicating whether the target should be executed. @@ -15266,15 +15266,15 @@ if the target should be executed; otherwise, . - - - - Opposite of . If - then the target will be executed; otherwise, skipped. The default - is . - - - + + + + Opposite of . If + then the target will be executed; otherwise, skipped. The default + is . + + + Gets a value indicating whether the target should NOT be executed. @@ -15282,208 +15282,208 @@ if the target should NOT be executed; otherwise, . - - + + The description of the target. - - + + Space separated list of targets that this target depends on. - - + + A collection of target names that must be executed before this target. - - - - Finds a target by name. - - The name of the target to find. - - The with the specified name, or - if no exists with - the given name. - - - - - Gets the names of the targets in the - combined into one list separated by the given . - - - A that contains a list of the names of the - targets in the , separated by - the specified . - - - - - Gets the names of the targets in the - combined into one comma-separated list. - - - A that contains a comma-separated list of the - names of the targets in the . - - - - - Creates a new instance of the class - for the specified class in the specified - . - - The containing the . - The class representing the . - - - - Gets the name of the class that can be created - using this . - - - The name of the class that can be created using - this . - - - - - Gets the name of the task which the - can create. - - - The name of the task which the can - create. - - - - - Contains a strongly typed collection of objects. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with the specified instance. - - - - - Initializes a new instance of the class - with the specified array of instances. - - - - - Adds a to the end of the collection. - - The to be added to the end of the collection. - The position into which the new element was inserted. - - - - Adds the elements of a array to the end of the collection. - - The array of elements to be added to the end of the collection. - - - - Adds the elements of a to the end of the collection. - - The to be added to the end of the collection. - - - - Determines whether a is in the collection. - - The to locate in the collection. - - if is found in the - collection; otherwise, . - - - - - Determines whether a for the specified - task is in the collection. - - The name of task for which the should be located in the collection. - - if a for the - specified task is found in the collection; otherwise, . - - - + + + + Finds a target by name. + + The name of the target to find. + + The with the specified name, or + if no exists with + the given name. + + + + + Gets the names of the targets in the + combined into one list separated by the given . + + + A that contains a list of the names of the + targets in the , separated by + the specified . + + + + + Gets the names of the targets in the + combined into one comma-separated list. + + + A that contains a comma-separated list of the + names of the targets in the . + + + + + Creates a new instance of the class + for the specified class in the specified + . + + The containing the . + The class representing the . + + + + Gets the name of the class that can be created + using this . + + + The name of the class that can be created using + this . + + + + + Gets the name of the task which the + can create. + + + The name of the task which the can + create. + + + + + Contains a strongly typed collection of objects. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with the specified instance. + + + + + Initializes a new instance of the class + with the specified array of instances. + + + + + Adds a to the end of the collection. + + The to be added to the end of the collection. + The position into which the new element was inserted. + + + + Adds the elements of a array to the end of the collection. + + The array of elements to be added to the end of the collection. + + + + Adds the elements of a to the end of the collection. + + The to be added to the end of the collection. + + + + Determines whether a is in the collection. + + The to locate in the collection. + + if is found in the + collection; otherwise, . + + + + + Determines whether a for the specified + task is in the collection. + + The name of task for which the should be located in the collection. + + if a for the + specified task is found in the collection; otherwise, . + + + Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. The zero-based index in at which copying begins. - - - - Retrieves the index of a specified object in the collection. - - The object for which the index is returned. - - The index of the specified . If the is not currently a member of the collection, it returns -1. - - - - - Inserts a into the collection at the specified index. - - The zero-based index at which should be inserted. - The to insert. - - - - Returns an enumerator that can iterate through the collection. - - - A for the entire collection. - - - - - Removes a member from the collection. - - The to remove from the collection. - - + + + + Retrieves the index of a specified object in the collection. + + The object for which the index is returned. + + The index of the specified . If the is not currently a member of the collection, it returns -1. + + + + + Inserts a into the collection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + + + Returns an enumerator that can iterate through the collection. + + + A for the entire collection. + + + + + Removes a member from the collection. + + The to remove from the collection. + + Gets or sets the element at the specified index. The zero-based index of the element to get or set. - - - - Gets the for the specified task. - - The name of task for which the should be located in the collection. - - - - Enumerates the elements of a . - - - - - Initializes a new instance of the class - with the specified . - - The collection that should be enumerated. - - + + + + Gets the for the specified task. + + The name of task for which the should be located in the collection. + + + + Enumerates the elements of a . + + + + + Initializes a new instance of the class + with the specified . + + The collection that should be enumerated. + + Advances the enumerator to the next element of the collection. @@ -15492,318 +15492,318 @@ to the next element; if the enumerator has passed the end of the collection. - - + + Sets the enumerator to its initial position, which is before the first element in the collection. - - + + Gets the current element in the collection. The current element in the collection. - - + + Comprises all of the loaded, and available, tasks. Use these static methods to register, initialize and create a task. - - - - Scans the given assembly for tasks, types, functions and filters. - - The assembly to scan for tasks, types, functions and filters. - The which will be used to output messages to the build log. - - - - Scans the given assembly for tasks, types, functions and filters. - - The assembly to scan for tasks, types, functions and filters. - The which will be used to output messages to the build log. - - if contains at - least one "extension"; otherwise, . - - - - - Scans the path for any task assemblies and adds them. - - The directory to scan in. - The which will be used to output messages to the build log. - indicating whether scanning of the directory should halt on first error. - - + + + + Scans the given assembly for tasks, types, functions and filters. + + The assembly to scan for tasks, types, functions and filters. + The which will be used to output messages to the build log. + + + + Scans the given assembly for tasks, types, functions and filters. + + The assembly to scan for tasks, types, functions and filters. + The which will be used to output messages to the build log. + + if contains at + least one "extension"; otherwise, . + + + + + Scans the path for any task assemblies and adds them. + + The directory to scan in. + The which will be used to output messages to the build log. + indicating whether scanning of the directory should halt on first error. + + Adds any task assemblies in the project base directory and its tasks subdirectory. The project to work from. - - - - Registers the project with , and optionally - scan the for extension assemblies. - - The project to work from. - Specified whether to scan the for extension assemblies. - - - - Looks up a function by name. - - The name of the function to lookup, including namespace prefix. - The in which the function is invoked. - - A representing the function, or - if a function with the given name does not - exist. - - - - - Creates a new instance for the given XML and - . - - The XML to initialize the task with. - The that the belongs to. - - The new instance. - - - - - Scans a given for tasks. - - The containing the to scan. - The to scan. - The which will be used to output messages to the build log. - - if represents a - ; otherwise, . - - - - - Scans a given for data type. - - The containing the to scan. - The to scan. - The which will be used to output messages to the build log. - - if represents a - data type; otherwise, . - - - - - Scans a given for functions. - - The to scan. - The which will be used to output messages to the build log. - - if represents a - valid set of funtions; otherwise, . - - - - - Scans a given for filters. - - The containing the to scan. - The to scan. - The which will be used to output messages to the build log. - - if represents a - ; otherwise, . - - - - - Gets the list of loaded instances. - - - List of loaded instances. - - - - - Gets the list of loaded instances. - - - List of loaded instances. - - - - - Gets the list of loaded instances. - - - List of loaded instances. - - - - - Initializes a new instance of the - class. - - - - - Initializes a new instance of the - class with a descriptive message. - - A descriptive message to include with the exception. - - - - Initializes a new instance of the - class with the specified descriptive message and inner exception. - - A descriptive message to include with the exception. - A nested exception that is the cause of the current exception. - - - - Initializes a new instance of the - class with a descriptive message and the location in the build file - that caused the exception. - - A descriptive message to include with the exception. - The location in the build file where the exception occured. - - - - Initializes a new instance of the - class with a descriptive message, the location in the build file and - an instance of the exception that is the cause of the current - exception. - - A descriptive message to include with the exception. - The location in the build file where the exception occured. - A nested exception that is the cause of the current exception. - - - - Initializes a new instance of the - class with serialized data. - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - - + + + + Registers the project with , and optionally + scan the for extension assemblies. + + The project to work from. + Specified whether to scan the for extension assemblies. + + + + Looks up a function by name. + + The name of the function to lookup, including namespace prefix. + The in which the function is invoked. + + A representing the function, or + if a function with the given name does not + exist. + + + + + Creates a new instance for the given XML and + . + + The XML to initialize the task with. + The that the belongs to. + + The new instance. + + + + + Scans a given for tasks. + + The containing the to scan. + The to scan. + The which will be used to output messages to the build log. + + if represents a + ; otherwise, . + + + + + Scans a given for data type. + + The containing the to scan. + The to scan. + The which will be used to output messages to the build log. + + if represents a + data type; otherwise, . + + + + + Scans a given for functions. + + The to scan. + The which will be used to output messages to the build log. + + if represents a + valid set of funtions; otherwise, . + + + + + Scans a given for filters. + + The containing the to scan. + The to scan. + The which will be used to output messages to the build log. + + if represents a + ; otherwise, . + + + + + Gets the list of loaded instances. + + + List of loaded instances. + + + + + Gets the list of loaded instances. + + + List of loaded instances. + + + + + Gets the list of loaded instances. + + + List of loaded instances. + + + + + Initializes a new instance of the + class. + + + + + Initializes a new instance of the + class with a descriptive message. + + A descriptive message to include with the exception. + + + + Initializes a new instance of the + class with the specified descriptive message and inner exception. + + A descriptive message to include with the exception. + A nested exception that is the cause of the current exception. + + + + Initializes a new instance of the + class with a descriptive message and the location in the build file + that caused the exception. + + A descriptive message to include with the exception. + The location in the build file where the exception occured. + + + + Initializes a new instance of the + class with a descriptive message, the location in the build file and + an instance of the exception that is the cause of the current + exception. + + A descriptive message to include with the exception. + The location in the build file where the exception occured. + A nested exception that is the cause of the current exception. + + + + Initializes a new instance of the + class with serialized data. + + The that holds the serialized object data about the exception being thrown. + The that contains contextual information about the source or destination. + + Used to wrap log messages in xml <message/> elements. - - + + Holds the stack of currently executing projects. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with serialized data. - - The that holds the serialized object data. - The that contains contextual information about the source or destination. - - - - Populates with the data needed to serialize - the instance. - - The to populate with data. - The destination for this serialization. - - + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with serialized data. + + The that holds the serialized object data. + The that contains contextual information about the source or destination. + + + + Populates with the data needed to serialize + the instance. + + The to populate with data. + The destination for this serialization. + + Returns the contents of log captured. - - - - Signals that a build has started. - - The source of the event. - A object that contains the event data. - - This event is fired before any targets have started. - - - - - Signals that the last target has finished. - - The source of the event. - A object that contains the event data. - - This event will still be fired if an error occurred during the build. - - - - - Signals that a target has started. - - The source of the event. - A object that contains the event data. - - - - Signals that a target has finished. - - The source of the event. - A object that contains the event data. - - This event will still be fired if an error occurred during the build. - - - - - Signals that a task has started. - - The source of the event. - A object that contains the event data. - - - - Signals that a task has finished. - - The source of the event. - A object that contains the event data. - - This event will still be fired if an error occurred during the build. - - - - - Signals that a message has been logged. - - The source of the event. - A object that contains the event data. - - Only messages with a priority higher or equal to the threshold of - the logger will actually be output in the build log. - - - + + + + Signals that a build has started. + + The source of the event. + A object that contains the event data. + + This event is fired before any targets have started. + + + + + Signals that the last target has finished. + + The source of the event. + A object that contains the event data. + + This event will still be fired if an error occurred during the build. + + + + + Signals that a target has started. + + The source of the event. + A object that contains the event data. + + + + Signals that a target has finished. + + The source of the event. + A object that contains the event data. + + This event will still be fired if an error occurred during the build. + + + + + Signals that a task has started. + + The source of the event. + A object that contains the event data. + + + + Signals that a task has finished. + + The source of the event. + A object that contains the event data. + + This event will still be fired if an error occurred during the build. + + + + + Signals that a message has been logged. + + The source of the event. + A object that contains the event data. + + Only messages with a priority higher or equal to the threshold of + the logger will actually be output in the build log. + + + Flushes buffered build events or messages to the underlying storage. - - + + Gets or sets the highest level of message this logger should respond to. @@ -15815,8 +15815,8 @@ Only messages with a message level higher than or equal to the given level should be written to the log. - - + + Gets or sets a value indicating whether to produce emacs (and other editor) friendly output. @@ -15824,12 +15824,12 @@ as it has no meaning in XML format. - - - - Gets or sets the to which the logger is - to send its output. - - - - + + + + Gets or sets the to which the logger is + to send its output. + + + + diff --git a/tools/nant/NAnt.DotNetTasks.xml b/tools/nant/NAnt.DotNetTasks.xml index b31c3c92286..2f669f1c4e8 100644 --- a/tools/nant/NAnt.DotNetTasks.xml +++ b/tools/nant/NAnt.DotNetTasks.xml @@ -1,221 +1,221 @@ - - - - NAnt.DotNetTasks - - - - - Generates an AssemblyInfo file using the attributes given. - - - - Create a C# AssemblyInfo file containing the specified assembly-level - attributes. - - - - - - - - - - - - - - - - - - - - - - - ]]> - - - - - Create a C# AssemblyInfo file containing an attribute with multiple - named properties by setting the - attribute on the element to - . - - - - - - - - - - - - - - ]]> - - - - + + + + NAnt.DotNetTasks + + + + + Generates an AssemblyInfo file using the attributes given. + + + + Create a C# AssemblyInfo file containing the specified assembly-level + attributes. + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + Create a C# AssemblyInfo file containing an attribute with multiple + named properties by setting the + attribute on the element to + . + + + + + + + + + + + + + + ]]> + + + + Generates an AssemblyInfo file. - - - - Determines whether the specified AssemblyInfo file in the given - needs to be persisted. - - holding the newly generated AssemblyInfo source. - - if the generated AssemblyInfo source needs - to be persisted; otherwise, . - - - + + + + Determines whether the specified AssemblyInfo file in the given + needs to be persisted. + + holding the newly generated AssemblyInfo source. + + if the generated AssemblyInfo source needs + to be persisted; otherwise, . + + + Name of the AssemblyInfo file to generate. The name of the AssemblyInfo file to generate. - - + + The code language in which the AssemblyInfo file should be generated. - - + + The assembly-level attributes to generate. The assembly-level attributes to generate. - - + + The namespaces to import. The namespaces to import. - - + + Assembly files used to locate the types of the specified attributes. - - + + Defines the supported code languages for generating an AssemblyInfo file. - - + + A value for generating C# code. - - + + A value for generating JScript code. - - + + A value for generating Visual Basic code. - - + + Encapsulates functionality to generate a code file with imports and assembly-level attributes. - - - - Initializes a new instance of the - for the specified . - - The for which an instance of the class should be initialized. - The for which an instance of the class should be initialized. - - - - Generates code for the specified imports. - - The imports for which code should be generated. - The to which the generated code will be written. - - - - Generates code for the specified assembly attributes. - - The assembly attributes for which code should be generated. - Imports used to resolve the assembly attribute names to fully qualified type names. - Assembly that will be used to resolve the attribute names to instances. - The to which the generated code will be written. - - - - Gets the in which the AssemblyInfo - code will be generated. - - - - - Gets the that will be used to - generate the AssemblyInfo code. - - - - - Responsible for returning the specified value converted to a - accepted by a constructor for a given - . - - - - - Obtains a lifetime service object to control the lifetime policy for - this instance. - - - An object of type used to control the lifetime - policy for this instance. This is the current lifetime service object - for this instance if one exists; otherwise, a new lifetime service - object initialized with a lease that will never time out. - - - - - Retrieves the specified corresponding with the specified - type name from a list of assemblies. - - The collection of assemblies that the type should tried to be instantiated from. - The list of imports that can be used to resolve the typename to a full typename. - The typename that should be used to determine the type to which the specified value should be converted. - The value that should be converted to a typed value. - - - is and the identified by has no default public constructor. - -or- - cannot be converted to a value that's suitable for one of the constructors of the identified by . - -or- - The identified by has no suitable constructor. - -or- - A identified by could not be located or loaded. - - - + + + + Initializes a new instance of the + for the specified . + + The for which an instance of the class should be initialized. + The for which an instance of the class should be initialized. + + + + Generates code for the specified imports. + + The imports for which code should be generated. + The to which the generated code will be written. + + + + Generates code for the specified assembly attributes. + + The assembly attributes for which code should be generated. + Imports used to resolve the assembly attribute names to fully qualified type names. + Assembly that will be used to resolve the attribute names to instances. + The to which the generated code will be written. + + + + Gets the in which the AssemblyInfo + code will be generated. + + + + + Gets the that will be used to + generate the AssemblyInfo code. + + + + + Responsible for returning the specified value converted to a + accepted by a constructor for a given + . + + + + + Obtains a lifetime service object to control the lifetime policy for + this instance. + + + An object of type used to control the lifetime + policy for this instance. This is the current lifetime service object + for this instance if one exists; otherwise, a new lifetime service + object initialized with a lease that will never time out. + + + + + Retrieves the specified corresponding with the specified + type name from a list of assemblies. + + The collection of assemblies that the type should tried to be instantiated from. + The list of imports that can be used to resolve the typename to a full typename. + The typename that should be used to determine the type to which the specified value should be converted. + The value that should be converted to a typed value. + + + is and the identified by has no default public constructor. + -or- + cannot be converted to a value that's suitable for one of the constructors of the identified by . + -or- + The identified by has no suitable constructor. + -or- + A identified by could not be located or loaded. + + + Wraps al.exe, the assembly linker for the .NET Framework. @@ -254,13 +254,13 @@ ]]> - - + + Generates an assembly manifest. - - + + Determines whether the assembly manifest needs compiling or is uptodate. @@ -269,51 +269,51 @@ if the assembly manifest needs compiling; otherwise, . - - + + Specifies an algorithm (in hexadecimal) to hash all files in a multifile assembly except the file that contains the assembly manifest. The default algorithm is CALG_SHA1. - - - - Specifies a string for the Company field in the assembly. - - - A string for the Company field in the assembly. - - - If is an empty string (""), the Win32 - Company resource appears as a single space. - - - - - Specifies a string for the Configuration field in the assembly. - - - A string for the Configuration field in the assembly. - - - If is an empty string (""), the Win32 - Configuration resource appears as a single space. - - - - - Specifies a string for the Copyright field in the assembly. - - - A string for the Copyright field in the assembly. - - - If is an empty string (""), the Win32 - Copyright resource appears as a single space. - - - + + + + Specifies a string for the Company field in the assembly. + + + A string for the Company field in the assembly. + + + If is an empty string (""), the Win32 + Company resource appears as a single space. + + + + + Specifies a string for the Configuration field in the assembly. + + + A string for the Configuration field in the assembly. + + + If is an empty string (""), the Win32 + Configuration resource appears as a single space. + + + + + Specifies a string for the Copyright field in the assembly. + + + A string for the Copyright field in the assembly. + + + If is an empty string (""), the Win32 + Copyright resource appears as a single space. + + + The culture string associated with the output assembly. The string must be in RFC 1766 format, such as "en-US". @@ -323,26 +323,26 @@ Corresponds with the /c[ulture]: flag. - - + + Specifies whether the assembly should be partially signed. The default is . - - - - Specifies a string for the Description field in the assembly. - - - A string for the Description field in the assembly. - - - If is an empty string (""), the Win32 - Description resource appears as a single space. - - - + + + + Specifies a string for the Description field in the assembly. + + + A string for the Description field in the assembly. + + + If is an empty string (""), the Win32 + Description resource appears as a single space. + + + Security evidence file to embed. @@ -354,16 +354,16 @@ Corresponds with the /e[vidence] flag. - - + + Specifies a string for the File Version field in the assembly. A string for the File Version field in the assembly. - - + + Specifies a value (in hexadecimal) for the Flags field in the assembly. @@ -371,13 +371,13 @@ A value (in hexadecimal) for the Flags field in the assembly. - - + + Specifies a container that holds a key pair. - - + + Specifies a file (filename) that contains a key pair or just a public key to sign an assembly. @@ -390,8 +390,8 @@ Corresponds with the /keyf[ile]: flag. - - + + Specifies the fully-qualified name (class.method) of the method to use as an entry point when converting a module to an executable file. @@ -400,13 +400,13 @@ The fully-qualified name (class.method) of the method to use as an entry point when converting a module to an executable file. - - + + One or more modules to be compiled into an assembly. - - + + The name of the output file for the assembly manifest. @@ -418,8 +418,8 @@ Corresponds with the /out flag. - - + + The target type (one of lib, exe, or winexe). @@ -428,37 +428,37 @@ Corresponds with the /t[arget]: flag. - - + + Specifies a string for the Product field in the assembly. A string for the Product field in the assembly. - - + + Specifies a string for the Product Version field in the assembly. A string for the Product Version field in the assembly. - - + + The set of resources to embed. - - + + The set of compiled resources to embed. Do not yet expose this to build authors. - - + + Indicates whether the assembly linker for a given target framework supports the "template" option, which takes an assembly from which @@ -468,8 +468,8 @@ TODO: remove this once Mono bug #74814 is fixed. - - + + Specifies an assembly from which to get all options except the culture field. @@ -482,40 +482,40 @@ Corresponds with the /template: flag. - - + + Specifies a string for the Title field in the assembly. A string for the Title field in the assembly. - - + + Specifies a string for the Trademark field in the assembly. A string for the Trademark field in the assembly. - - + + Specifies version information for the assembly. The format of the version string is major.minor.build.revision. - - + + Icon to associate with the assembly. - - + + Inserts a Win32 resource (.res file) in the output file. - - + + Gets the command-line arguments for the external program. @@ -523,68 +523,68 @@ The command-line arguments for the external program or if the task is not being executed. - - + + Provides the abstract base class for compiler tasks. - - + + Contains a list of extensions for all file types that should be treated as 'code-behind' when looking for resources. Ultimately this will determine if we use the "namespace+filename" or "namespace+classname" algorithm, since code-behind will use the "namespace+classname" algorithm. - - - - Case-insensitive list of valid culture names for this platform. - - - The key of the is the culture name and - the value is . - - - - - Class constructor for . - - - + + + + Case-insensitive list of valid culture names for this platform. + + + The key of the is the culture name and + the value is . + + + + + Class constructor for . + + + Compiles the sources and resources. - - - - Determines the manifest resource name of the given resource file. - - The containing information that will used to assemble the manifest resource name. - The resource file of which the manifest resource name should be determined. - The logical location of the resource file. - The source file on which the resource file depends. - - The manifest resource name of the specified resource file. - - - - - Determines the manifest resource name of the given resource file. - - The containing information that will used to assemble the manifest resource name. - The resource file of which the manifest resource name should be determined. - - The manifest resource name of the specified resource file. - - - For .resx resources, the name of the dependent is determined by - replacing the extension of the file with the extension of the - source files for the compiler, and removing the culture name from - the file name for localized resources. - - - + + + + Determines the manifest resource name of the given resource file. + + The containing information that will used to assemble the manifest resource name. + The resource file of which the manifest resource name should be determined. + The logical location of the resource file. + The source file on which the resource file depends. + + The manifest resource name of the specified resource file. + + + + + Determines the manifest resource name of the given resource file. + + The containing information that will used to assemble the manifest resource name. + The resource file of which the manifest resource name should be determined. + + The manifest resource name of the specified resource file. + + + For .resx resources, the name of the dependent is determined by + replacing the extension of the file with the extension of the + source files for the compiler, and removing the culture name from + the file name for localized resources. + + + Extracts the associated namespace/classname linkage found in the given stream. @@ -593,72 +593,72 @@ The namespace/classname of the source file matching the resource. - - - - Writes package references to the specified . - - The to which the package references should be written. - - - - Writes list of warnings to (not) treat as errors to the specified - . - - The to which the list of warnings should be written. - - - - Writes list of warnings to suppress to the specified - . - - The to which the list of warnings to suppress should be written. - - - - Writes conditional compilation constants to the specified - . - - The to which the conditional compilation constants should be written. - - - - Writes module references to the specified . - - The to which the module references should be written. - - - - Allows derived classes to provide compiler-specific options. - - The to which the compiler options should be written. - - - - Writes an option using the default output format. - - The to which the compiler options should be written. - The name of the option which should be passed to the compiler. - - - - Writes an option and its value using the default output format. - - The to which the compiler options should be written. - The name of the option which should be passed to the compiler. - The value of the option which should be passed to the compiler. - - The combination of and - (separated by a colon) is quoted - unless is already surrounded by quotes. - - - + + + + Writes package references to the specified . + + The to which the package references should be written. + + + + Writes list of warnings to (not) treat as errors to the specified + . + + The to which the list of warnings should be written. + + + + Writes list of warnings to suppress to the specified + . + + The to which the list of warnings to suppress should be written. + + + + Writes conditional compilation constants to the specified + . + + The to which the conditional compilation constants should be written. + + + + Writes module references to the specified . + + The to which the module references should be written. + + + + Allows derived classes to provide compiler-specific options. + + The to which the compiler options should be written. + + + + Writes an option using the default output format. + + The to which the compiler options should be written. + The name of the option which should be passed to the compiler. + + + + Writes an option and its value using the default output format. + + The to which the compiler options should be written. + The name of the option which should be passed to the compiler. + The value of the option which should be passed to the compiler. + + The combination of and + (separated by a colon) is quoted + unless is already surrounded by quotes. + + + Determines whether compilation is needed. - - + + Finds the correct namespace/classname for a resource file from the given dependent source file. @@ -673,34 +673,34 @@ This behaviour may be overidden by each particular compiler to support the namespace/classname syntax for that language. - - + + Link a list of files into a resource assembly. The collection of resources. Resource assembly to generate Culture of the generated assembly. - - + + Compiles a set of resx files to a .resources files. The set of resx files to compile. - - - - Determines the culture associated with a given resource file by - scanning the filename for valid culture names. - - The resource file path to check for culture info. - The file on which the resource file depends. - - A valid instance if the resource is - associated with a specific culture; otherwise, . - - - + + + + Determines the culture associated with a given resource file by + scanning the filename for valid culture names. + + The resource file path to check for culture info. + The file on which the resource file depends. + + A valid instance if the resource is + associated with a specific culture; otherwise, . + + + Generate debug output. The default is . @@ -708,19 +708,19 @@ Only used for <jsc> tasks, but retained for backward compatibility (Clover.NET). - - + + The output file created by the compiler. - - + + Output type. Possible values are exe, winexe, library or module. - - + + Define conditional compilation symbol(s). @@ -729,8 +729,8 @@ Corresponds to /d[efine]: flag. - - + + Icon to associate with the application. @@ -739,8 +739,8 @@ Corresponds to /win32icon: flag. - - + + Specifies a Win32 resource file (.res). @@ -749,8 +749,8 @@ Corresponds to /win32res[ource]: flag. - - + + Instructs the compiler to treat all warnings as errors. The default is . @@ -765,13 +765,13 @@ reported as errors. - - + + Controls which warnings should be reported as errors. - - + + Specifies a comma-separated list of warnings that should be suppressed by the compiler. @@ -785,13 +785,13 @@ Corresponds with the /nowarn flag. - - + + Specifies a list of warnings that you want the compiler to suppress. - - + + Instructs NAnt to recompile the output file regardless of the file timestamps. @@ -799,8 +799,8 @@ When this parameter is to , NAnt will always run the compiler to rebuild the output file, regardless of the file timestamps. - - + + Specifies which type contains the Main method that you want to use as the entry point into the program. @@ -815,25 +815,25 @@ public classes. - - + + Specifies the key pair container used to strongname the assembly. - - + + Specifies a strong name key file. - - - - Specifies whether to delay sign the assembly using only the public - portion of the strong name key. The default is - . - - - + + + + Specifies whether to delay sign the assembly using only the public + portion of the strong name key. The default is + . + + + Additional directories to search in for assembly references. @@ -842,182 +842,182 @@ Corresponds with the /lib[path]: flag. - - + + Reference metadata from the specified assembly files. - - + + Specifies list of packages to reference. - - - - Resources to embed. - - - - This can be a combination of resx files and file resources. - - - .resx files will be compiled by and then - embedded into the resulting executable. - - - The property is used to make - up the resource name added to the assembly manifest for non-resx - files. - - - For .resx files the namespace from the matching source file is used - as prefix. This matches the behaviour of Visual Studio. - - - Multiple resources tags with different namespace prefixes may be - specified. - - - - + + + + Resources to embed. + + + + This can be a combination of resx files and file resources. + + + .resx files will be compiled by and then + embedded into the resulting executable. + + + The property is used to make + up the resource name added to the assembly manifest for non-resx + files. + + + For .resx files the namespace from the matching source file is used + as prefix. This matches the behaviour of Visual Studio. + + + Multiple resources tags with different namespace prefixes may be + specified. + + + + Link the specified modules into this assembly. - - + + The set of source files for compilation. - - + + Indicates whether package references are supported by compiler for a given target framework. The default is . - - + + Indicates whether the compiler for a given target framework supports the "warnaserror" option that takes a list of warnings. The default is . - - + + Indicates whether the compiler for a given target framework supports a command line option that allows a list of warnings to be suppressed. The default is . - - + + Indicates whether the compiler for a given target framework supports the "keycontainer" option. The default is . - - + + Indicates whether the compiler for a given target framework supports the "keyfile" option. The default is . - - + + Indicates whether the compiler for a given target framework supports the "delaysign" option. The default is . - - + + Gets the file extension required by the current compiler. The file extension required by the current compiler. - - + + Gets the class name regular expression for the language of the current compiler. class name regular expression for the language of the current compiler - - + + Gets the namespace regular expression for the language of the current compiler. namespace regular expression for the language of the current compiler - - + + Gets the command-line arguments for the external program. The command-line arguments for the external program. - - + + Holds class and namespace information for resource (*.resx) linkage. - - - - Initializes a new instance of the - class. - - The namespace the resource is under. - The class name the resource is associated with. - - + + + + Initializes a new instance of the + class. + + The namespace the resource is under. + The class name the resource is associated with. + + Returns the resource linkage as a string. A string representation of the resource linkage. - - - - Gets a value indicating whether the - instances contains valid data. - - - if the - instance contains valid data; otherwise, . - - - - - Gets a value indicating whether a namespace name is available - for this instance. - - - if a namespace name is available for - this instance; otherwise, - . - - - - - Gets a value indicating whether a class name is available - for this instance. - - - if a class name is available for - this instance; otherwise, - . - - - + + + + Gets a value indicating whether the + instances contains valid data. + + + if the + instance contains valid data; otherwise, . + + + + + Gets a value indicating whether a namespace name is available + for this instance. + + + if a namespace name is available for + this instance; otherwise, + . + + + + + Gets a value indicating whether a class name is available + for this instance. + + + if a class name is available for + this instance; otherwise, + . + + + Gets the name of namespace the resource is under. The name of namespace the resource is under. - - + + Gets the name of the class (most likely a form) that the resource is associated with. @@ -1025,65 +1025,65 @@ The name of the class the resource is associated with. - - + + Gets the culture that the resource is associated with. The culture that the resource is associated with. - - - - Compiles C# programs. - - - - In order to have generate manifest resource names - that match those generated by Microsoft Visual Studio.NET, the value of - the attribute of the <> - element should match the "Default Namespace" of the C# project, and the - value of the attribute - should be set to "". - - - - Compile a "HelloWorld" application, including embedded resources. - - - - - - - - - - - - - - - - - - ]]> - - - - - - Writes the compiler options to the specified . - - to which the compiler options should be written. - - + + + + Compiles C# programs. + + + + In order to have generate manifest resource names + that match those generated by Microsoft Visual Studio.NET, the value of + the attribute of the <> + element should match the "Default Namespace" of the C# project, and the + value of the attribute + should be set to "". + + + + Compile a "HelloWorld" application, including embedded resources. + + + + + + + + + + + + + + + + + + ]]> + + + + + + Writes the compiler options to the specified . + + to which the compiler options should be written. + + Determines whether compilation is needed. - - + + The preferred base address at which to load a DLL. The default base address for a DLL is set by the .NET Framework common language @@ -1096,20 +1096,20 @@ This address can be specified as a decimal, hexadecimal, or octal number. - - - - Specifies the type of debugging information generated by the - compiler. The default is . - - - - - No longer expose this to build authors. Use - instead. - - - + + + + Specifies the type of debugging information generated by the + compiler. The default is . + + + + + No longer expose this to build authors. Use + instead. + + + The name of the XML documentation file to generate. @@ -1118,8 +1118,8 @@ Corresponds with the /doc: flag. - - + + Specifies the size of sections in the output file. Valid values are 512, 1024, 2048, 4096, and 8192. @@ -1127,8 +1127,8 @@ The size of sections in the output file. - - + + Instructs the compiler not to import mscorlib.dll. The default is . @@ -1138,8 +1138,8 @@ Corresponds with the /nostdlib[+|-] flag. - - + + Instructs the compiler not to use implicit references to assemblies. The default is . @@ -1149,8 +1149,8 @@ Corresponds with the /noconfig flag. - - + + Specifies whether an integer arithmetic statement that is not in the scope of the checked or unchecked keywords and @@ -1162,8 +1162,8 @@ Corresponds with the /checked[+|-] flag. - - + + Instructs the compiler to allow code that uses the unsafe keyword. The default is . @@ -1173,8 +1173,8 @@ Corresponds with the /unsafe[+|-] flag. - - + + Causes the compiler to only accept syntax that is included in a given specification. @@ -1184,8 +1184,8 @@ Corresponds with the /langversion flag. - - + + Specifies whether the compiler should perform optimizations to the make output files smaller, faster, and more effecient. The default @@ -1200,8 +1200,8 @@ Corresponds with the /optimize[+|-] flag. - - + + Specifies which platform version of common language runtime (CLR) can run the output file. @@ -1215,8 +1215,8 @@ Corresponds with the /platform flag. - - + + Specifies the warning level for the compiler to display. Valid values are 0-4. The default is 4. @@ -1229,8 +1229,8 @@ Corresponds with the /warn flag. - - + + Specifies the code page to use for all source code files in the compilation. @@ -1240,37 +1240,37 @@ Corresponds with the /codepage flag. - - + + Specifies whether the compiler for the active target framework supports generation of XML Documentation file. The default is . - - + + Specifies whether the compiler for the active target framework supports limiting the platform on which the compiled code can run. The default is . - - + + Specifies whether the compiler for the active target framework supports accepting only a specific language syntax. The default is . - - + + Gets the file extension required by the current compiler. For the C# compiler, the file extension is always cs. - - + + Gets the class name regular expression for the language of the current compiler. @@ -1279,8 +1279,8 @@ Class name regular expression for the language of the current compiler. - - + + Gets the namespace regular expression for the language of the current compiler. @@ -1288,61 +1288,61 @@ Namespace regular expression for the language of the current compiler. - - - - Signs delay-signed .NET Assemblies, or re-signs existing assemblies. - - - - The delay-signing mechanism takes a fileset (named targets) - and either a attribute for a file containing the - public and private keys, or to name a key - container. - - - - Sign partially-signed foo.dll with bar.snk. - - - - - - - ]]> - - - - + + + + Signs delay-signed .NET Assemblies, or re-signs existing assemblies. + + + + The delay-signing mechanism takes a fileset (named targets) + and either a attribute for a file containing the + public and private keys, or to name a key + container. + + + + Sign partially-signed foo.dll with bar.snk. + + + + + + + ]]> + + + + Converts a single file or group of files. - - + + List of assemblies/executables to sign. - - + + Specifies the filesystem path to the signing key. - - + + Specifies the key container. - - + + Gets the command line arguments for the external program. The command line arguments for the external program. - - + + Compiles ILASM programs. @@ -1360,48 +1360,48 @@ ]]> - - + + Compiles the sources. - - + + Writes the compiler options. - - - - Writes an option using the default output format. - - - The to which the compiler options should - be written. - - - A that contains the name of the - option which should be passed to the compiler. - - - - - Writes an option and its value using the default output format. - - - The to which the compiler options should - be written. - - - A that contains the name of the - option which should be passed to the compiler. - - - A that contains the value of the - option which should be passed to the compiler. - - - + + + + Writes an option using the default output format. + + + The to which the compiler options should + be written. + + + A that contains the name of the + option which should be passed to the compiler. + + + + + Writes an option and its value using the default output format. + + + The to which the compiler options should + be written. + + + A that contains the name of the + option which should be passed to the compiler. + + + A that contains the value of the + option which should be passed to the compiler. + + + Determines whether or not compilation is needed. @@ -1409,8 +1409,8 @@ if compilation is needed; otherwise, . - - + + Specifies whether or not the compiler should measure and report the compilation times. @@ -1425,8 +1425,8 @@ Corresponds to the /CLOCK flag. - - + + Specifies whether or not the compiler should generate debug information. @@ -1441,8 +1441,8 @@ Corresponds to the /DEBUG flag. - - + + Specifies whether or not the compiler should attempt to create a PE file even if compilation errors have been reported. @@ -1457,8 +1457,8 @@ Corresponds to the /ERROR flag. - - + + Instructs NAnt to recompile the output file regardless of the file timestamps. @@ -1468,8 +1468,8 @@ regardless of its timestamps; otherwise . The default is . - - + + Specifies whether or not the compiler should type a formatted listing of the compilation result. @@ -1484,165 +1484,165 @@ Corresponds to the /LISTING flag. - - - - Instructs the compiler to set the FileAlignment value in - the PE header. - - - An that represents the FileAlignment - value to set in the PE header. The value must be a power of 2, in - range from 512 to 65536. - - - - Corresponds to the /ALIGNMENT flag. - - - - - - Instructs the compiler to set the ImageBase value in - the PE header. - - - A that represents the ImageBase - value to set in the PE header. - - - - Corresponds to the /BASE flag. - - - - - - Instructs the compiler to set the Flags value in the CLR - header. - - - An that represents the Flags - value to set in the CLR header. The most frequently value are 1 - (pre-IL code) and 2 (mixed code). The third bit indicating that - the PE file is strong signed, is ignored. - - - - Corresponds to the /FLAGS flag. - - - - - - Instructs the compiler to set the Subsystem value in the PE - header. - - - An that represents the Subsystem - value to set in the PE header. The most frequently value are 3 - (console application) and 2 (GUI application). - - - - Corresponds to the /SUBSYSTEM flag. - - - - - - Specifies which output type should be generated. - - - A that contains the target type. - Possible values are dll and exe. - - - - Corresponds to the /OUTPUT flag. - - - - - - Instructs the compiler to generate a strong signature of the PE - file. - - - A that contains the private - encryption key. - - - - Corresponds to the /KEY=keysource]]> - flag. - - - - - - Instructs the compiler to generate a strong signature of the PE - file. - - - A that represents the file - containing the private encryption key. - - - - Corresponds to the /KEY=keyfile]]> - flag. - - - - - - Specifies the name of the output file created by the compiler. - - - A that represents the name of - the output file. - - - - Corresponds to the /OUTPUT flag. - - - - - - Instructs the compiler to link the specified unmanaged resource - file into the resulting PE file. - - - A that represents the unmanaged - resource file to link. - - - - Corresponds to the /RESOURCE flag. - - - - - - Specifies the set of source files to compile. - - - A that represents the set - of source files to compile. - - - - - Gets the command-line arguments for the external program. - - - A that contains the command-line - arguments for the external program. - - - + + + + Instructs the compiler to set the FileAlignment value in + the PE header. + + + An that represents the FileAlignment + value to set in the PE header. The value must be a power of 2, in + range from 512 to 65536. + + + + Corresponds to the /ALIGNMENT flag. + + + + + + Instructs the compiler to set the ImageBase value in + the PE header. + + + A that represents the ImageBase + value to set in the PE header. + + + + Corresponds to the /BASE flag. + + + + + + Instructs the compiler to set the Flags value in the CLR + header. + + + An that represents the Flags + value to set in the CLR header. The most frequently value are 1 + (pre-IL code) and 2 (mixed code). The third bit indicating that + the PE file is strong signed, is ignored. + + + + Corresponds to the /FLAGS flag. + + + + + + Instructs the compiler to set the Subsystem value in the PE + header. + + + An that represents the Subsystem + value to set in the PE header. The most frequently value are 3 + (console application) and 2 (GUI application). + + + + Corresponds to the /SUBSYSTEM flag. + + + + + + Specifies which output type should be generated. + + + A that contains the target type. + Possible values are dll and exe. + + + + Corresponds to the /OUTPUT flag. + + + + + + Instructs the compiler to generate a strong signature of the PE + file. + + + A that contains the private + encryption key. + + + + Corresponds to the /KEY=keysource]]> + flag. + + + + + + Instructs the compiler to generate a strong signature of the PE + file. + + + A that represents the file + containing the private encryption key. + + + + Corresponds to the /KEY=keyfile]]> + flag. + + + + + + Specifies the name of the output file created by the compiler. + + + A that represents the name of + the output file. + + + + Corresponds to the /OUTPUT flag. + + + + + + Instructs the compiler to link the specified unmanaged resource + file into the resulting PE file. + + + A that represents the unmanaged + resource file to link. + + + + Corresponds to the /RESOURCE flag. + + + + + + Specifies the set of source files to compile. + + + A that represents the set + of source files to compile. + + + + + Gets the command-line arguments for the external program. + + + A that contains the command-line + arguments for the external program. + + + Compiles JScript.NET programs. @@ -1658,20 +1658,20 @@ ]]> - - - - Writes module references to the specified . - - The to which the module references should be written. - - - - Writes the compiler options to the specified . - - to which the compiler options should be written. - - + + + + Writes module references to the specified . + + The to which the module references should be written. + + + + Writes the compiler options to the specified . + + to which the compiler options should be written. + + Automatically references assemblies if they have the same name as an imported namespace or as a type annotation when declaring a @@ -1682,20 +1682,20 @@ Corresponds with the /autoref flag. - - - - Instructs the compiler not to import standard library, and changes - to . The default is - . - - - - Corresponds with the /noconfig flag. - - - - + + + + Instructs the compiler not to import standard library, and changes + to . The default is + . + + + + Corresponds with the /noconfig flag. + + + + Specifies which platform version of common language runtime (CLR) can run the output file. @@ -1709,8 +1709,8 @@ Corresponds with the /platform flag. - - + + Causes the compiler to generate errors for implicit method overrides. The default is . @@ -1720,8 +1720,8 @@ Corresponds with the /versionsafe flag. - - + + Specifies the warning level for the compiler to display. Valid values are 0-4. The default is 4. @@ -1734,8 +1734,8 @@ Corresponds with the /warn flag. - - + + Controls which warnings should be reported as errors. @@ -1744,8 +1744,8 @@ compiler does not allow control over which warnings should be reported as errors. - - + + Specifies a comma-separated list of warnings that should be suppressed by the compiler. @@ -1754,8 +1754,8 @@ Override to avoid exposing this to build authors, as the JScript.NET compiler does not support package references. - - + + Specifies a list of warnings that you want the compiler to suppress. @@ -1763,8 +1763,8 @@ Override to avoid exposing this to build authors, as the JScript.NET compiler does not support suppressing warnings. - - + + Specifies the code page to use for all source code files in the compilation. @@ -1774,8 +1774,8 @@ Corresponds with the /codepage flag. - - + + Specifies the key pair container used to strongname the assembly. @@ -1783,8 +1783,8 @@ Override to avoid exposing this to build authors, as the JScript.NET does not support this. - - + + Specifies a strong name key file. @@ -1792,8 +1792,8 @@ Override to avoid exposing this to build authors, as the JScript.NET does not support this. - - + + Specifies whether to delay sign the assembly using only the public portion of the strong name key. @@ -1802,8 +1802,8 @@ Override to avoid exposing this to build authors, as the JScript.NET does not support this. - - + + Indicates whether the compiler for a given target framework supports the "keycontainer" option. The default is . @@ -1815,8 +1815,8 @@ Override to avoid exposing this to build authors, as the JScript.NET does not support this. - - + + Indicates whether the compiler for a given target framework supports the "keyfile" option. The default is . @@ -1828,8 +1828,8 @@ Override to avoid exposing this to build authors, as the JScript.NET does not support this. - - + + Indicates whether the compiler for a given target framework supports the "delaysign" option. The default is . @@ -1841,15 +1841,15 @@ Override to avoid exposing this to build authors, as the JScript.NET does not support this. - - + + Specifies whether the compiler for the active target framework supports limiting the platform on which the compiled code can run. The default is . - - + + Link the specified modules into this assembly. @@ -1857,16 +1857,16 @@ Override to avoid exposing this to build authors, as the JScript.NET compiler does not support linking modules. - - + + Gets the file extension required by the current compiler. For the JScript.NET compiler, the file extension is always js. - - + + Gets the class name regular expression for the language of the current compiler. @@ -1875,8 +1875,8 @@ Class name regular expression for the language of the current compiler. - - + + Gets the namespace regular expression for the language of the current compiler. @@ -1885,8 +1885,8 @@ Namespace regular expression for the language of the current compiler. - - + + Generates a .licence file from a .licx file. @@ -1906,25 +1906,25 @@ ]]> - - - - Initializes the class. - - - - - Updates the of the specified - . - - The of which the should be updated. - - + + - Generates the license file. + Initializes the class. - - + + + + Updates the of the specified + . + + The of which the should be updated. + + + + Generates the license file. + + + Determines whether the .licenses file needs to be recompiled or is uptodate. @@ -1934,33 +1934,33 @@ if the .licenses file needs compiling; otherwise, . - - + + Input file to process. - - + + Name of the license file to output. - - + + Names of the references to scan for the licensed component. - - + + Specifies the executable for which the .licenses file is generated. - - + + Specifies the executable for which the .licenses file is generated. - - + + Indicates whether assembly references are supported by the current target framework. The default is . @@ -1969,39 +1969,39 @@ Applies only to frameworks having a command line tool for compiling licenses files. - - + + Indicates whether the current target framework has a command line tool for compiling licenses files. The default is . - - + + Gets the working directory for the application. The working directory for the application. - - + + The command-line arguments for the external program. Override to avoid exposing these elements in build file. - - + + Gets the command-line arguments for the external program. The command-line arguments for the external program. - - + + Gets the filename of the external program to start. @@ -2012,33 +2012,33 @@ Override in derived classes to explicitly set the location of the external tool. - - + + Responsible for reading the license and writing them to a license file. - - - - Obtains a lifetime service object to control the lifetime policy for - this instance. - - - An object of type used to control the lifetime - policy for this instance. This is the current lifetime service object - for this instance if one exists; otherwise, a new lifetime service - object initialized with a lease that will never time out. - - - - - Creates the whole license file. - - The instance for which the license file should be created. - The .licenses file to create. - - + + + + Obtains a lifetime service object to control the lifetime policy for + this instance. + + + An object of type used to control the lifetime + policy for this instance. This is the current lifetime service object + for this instance if one exists; otherwise, a new lifetime service + object initialized with a lease that will never time out. + + + + + Creates the whole license file. + + The instance for which the license file should be created. + The .licenses file to create. + + Determines whether the given object is serializable in binary format. @@ -2048,147 +2048,147 @@ if is serializable in binary format; otherwise, . - - - - Runs NDoc V1.3.1 to create documentation. - - - - See the NDoc home page for more - information. - - - By default, only the NDoc MSDN documenter ships as part of the NAnt - distribution. To make another NDoc documenter from the NDoc V1.3.1 - distribution available to the , copy the - documenter assembly (and possible dependencies) to the "lib" - directory corresponding with the CLR you're running NAnt on - (eg. <nant root>/bin/lib/net/1.1). - - - - - Document two assemblies using the MSDN documenter. The namespaces are - documented in NamespaceSummary.xml. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ]]> - - Content of NamespaceSummary.xml : - - - - The Foo.Bar namespace reinvents the wheel. - - - The Foo.Bar.Tests namespace ensures that the Foo.Bar namespace reinvents the wheel correctly. - - - ]]> - - - - + + + + Runs NDoc V1.3.1 to create documentation. + + + + See the NDoc home page for more + information. + + + By default, only the NDoc MSDN documenter ships as part of the NAnt + distribution. To make another NDoc documenter from the NDoc V1.3.1 + distribution available to the , copy the + documenter assembly (and possible dependencies) to the "lib" + directory corresponding with the CLR you're running NAnt on + (eg. <nant root>/bin/lib/net/1.1). + + + + + Document two assemblies using the MSDN documenter. The namespaces are + documented in NamespaceSummary.xml. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + Content of NamespaceSummary.xml : + + + + The Foo.Bar namespace reinvents the wheel. + + + The Foo.Bar.Tests namespace ensures that the Foo.Bar namespace reinvents the wheel correctly. + + + ]]> + + + + Initializes the taks and verifies the parameters. - - + + Generates an NDoc project and builds the documentation. - - - - Represents the method that will be called to update the overall - percent complete value and the current step name. - - The source of the event. - A that contains the event data. - - - - Represents the method that will be called to update the current - step's precent complete value. - - The source of the event. - A that contains the event data. - - - - Returns the documenter for the given project. - - - Documenter is not found. - - - is . - - - - - Performs macro expansion for the given nodes. - - for which expansion should be performed. - - + + + + Represents the method that will be called to update the overall + percent complete value and the current step name. + + The source of the event. + A that contains the event data. + + + + Represents the method that will be called to update the current + step's precent complete value. + + The source of the event. + A that contains the event data. + + + + Returns the documenter for the given project. + + + Documenter is not found. + + + is . + + + + + Performs macro expansion for the given nodes. + + for which expansion should be performed. + + The set of assemblies to document. - - + + The set of namespace summary files. - - + + Specifies the formats in which the documentation should be generated. - - + + Collection of additional directories to search for referenced assemblies. - - + + Installs or removes .NET Services. @@ -2261,146 +2261,146 @@ ]]> - - + + Performs the specified action. - - - - Defines the action to take with the assembly. The default is - . - - - + + + + Defines the action to take with the assembly. The default is + . + + + The source assembly file. The assembly must be signed with a strong name. - - + + Specifies the type library file to install. - - + + Uses an existing type library. The default is . - - + + Do not reconfigure an existing target application. The default is . - - + + Configures components only; ignores methods and interfaces. The default is . - - + + Expect an existing application. The default is . - - + + Specifies the name of the COM+ application to either find or create. - - + + Specifies the name or id of the COM+ application to either find or create. - - + + Gets the command-line arguments for the external program. The command-line arguments for the external program. - - + + Defines the possible actions for a .NET Service. - - + + Finds or creates the target application. - - + + Creates the target application. - - + + Uninstalls the target application. - - - - Converts files from one resource format to another. - - - - If no is specified, the resource file will - be created next to the input file. - - - - - Convert a resource file from the .resx to the .resources - format. - - - - ]]> - - - - - Convert a set of .resx files to the .resources format. - - - - - - - - ]]> - - - - - - Updates the of the specified - . - - The of which the should be updated. - - + + + + Converts files from one resource format to another. + + + + If no is specified, the resource file will + be created next to the input file. + + + + + Convert a resource file from the .resx to the .resources + format. + + + + ]]> + + + + + Convert a set of .resx files to the .resources format. + + + + + + + + ]]> + + + + + + Updates the of the specified + . + + The of which the should be updated. + + Converts a single file or group of files. - - + + Cleans up generated files. - - + + Determines whether the specified input file needs to be compiled. @@ -2410,8 +2410,8 @@ if the input file need to be compiled; otherwise . - - + + Determines the full path and extension for the output file. @@ -2419,8 +2419,8 @@ The full path (with extensions) for the specified file. - - + + Determines whether the specified resource file references third party assemblies by checking whether a <data> element exists @@ -2437,8 +2437,8 @@ 2.0 resx files can only be compiled with a resgen tool that supported assembly references, so this method will not be used anyway. - - + + Returns a list of external file references for the specified file. @@ -2448,83 +2448,83 @@ if does not exist or does not support external file references. - - + + Input file to process. The full path to the input file. - - + + The resource file to output. - - + + The target type. The default is resources. - - + + The directory to which outputs will be stored. - - + + Use each source file's directory as the current directory for resolving relative file paths. The default is . Only supported when targeting .NET 2.0 (or higher). - - + + Takes a list of .resx or .txt files to convert to .resources files. - - + + Reference metadata from the specified assembly files. - - + + Indicates whether assembly references are supported by the resgen tool for the current target framework. The default is . - - + + Indicates whether external file references are supported by the resgen tool for the current target framework. The default is . - - + + For internal use only ! - - + + Gets the working directory for the application. The working directory for the application. - - + + Gets the command line arguments for the external program. The command line arguments for the external program. - - + + Gets the filename of the external program to start. @@ -2535,350 +2535,350 @@ Override in derived classes to explicitly set the location of the external tool. - - + + For internal use only ! - - - - Initializes a new instance of the - class for a given input and output file. - - The resource to compile. - The compiled resource. - - + + + + Initializes a new instance of the + class for a given input and output file. + + The resource to compile. + The compiled resource. + + Gets the resource file to compile. The resource file to compile. - - + + Gets the compiled resource file. The compiled resource file. - - - - Executes the code contained within the task. - - -
Code
- - The must contain a single code - element, which in turn contains the script code. - - - This code can include extensions such as functions, or tasks. Once - the script task has executed those extensions will be available for - use in the buildfile. - - - If no extensions have been defined, a static entry point named - ScriptMain - which must have a single - argument - is required. - -
Namespaces
- - The following namespaces are imported by default: - - - - System - - - System.Collections - - - System.IO - - - System.Text - - - NAnt.Core - - - NAnt.Core.Attributes - - -
Assembly References
- - The assembly references that are specified will be used to compile - the script, and will be loaded into the NAnt appdomain. - - - By default, only the NAnt.Core and mscorlib assemblies - are referenced. - -
- - Run C# code that writes a message to the build log. - - <script language="C#"> - <code> - <![CDATA[ - public static void ScriptMain(Project project) { - project.Log(Level.Info, "Hello World from a script task using C#"); - } - ]]> - </code> - </script> - - - - Define a custom function and call it using C#. - - <script language="C#" prefix="test" > - <code> - <![CDATA[ - [Function("test-func")] - public static string Testfunc( ) { - return "some result !!!!!!!!"; - } - ]]> - </code> - </script> - <echo message='${test::test-func()}'/> - - - - Use a custom namespace in C# to create a database - - <script language="C#" > - <references> - <include name="System.Data.dll" /> - </references> - <imports> - <import namespace="System.Data.SqlClient" /> - </imports> - <code> - <![CDATA[ - public static void ScriptMain(Project project) { - string dbUserName = "nant"; - string dbPassword = "nant"; - string dbServer = "(local)"; - string dbDatabaseName = "NAntSample"; - string connectionString = String.Format("Server={0};uid={1};pwd={2};", dbServer, dbUserName, dbPassword); - - SqlConnection connection = new SqlConnection(connectionString); - string createDbQuery = "CREATE DATABASE " + dbDatabaseName; - SqlCommand createDatabaseCommand = new SqlCommand(createDbQuery); - createDatabaseCommand.Connection = connection; - - connection.Open(); - - try { - createDatabaseCommand.ExecuteNonQuery(); - project.Log(Level.Info, "Database added successfully: " + dbDatabaseName); - } catch (Exception e) { - project.Log(Level.Error, e.ToString()); - } finally { - connection.Close(); - } - } - ]]> - </code> - </script> - - - - - Run Visual Basic.NET code that writes a message to the build log. - - - <script language="VB"> - <code> - <![CDATA[ - Public Shared Sub ScriptMain(project As Project) - project.Log(Level.Info, "Hello World from a script task using Visual Basic.NET") - End Sub - ]]> - </code> - </script> - - - - Define a custom task and call it using C#. - - <script language="C#" prefix="test" > - <code> - <![CDATA[ - [TaskName("usertask")] - public class TestTask : Task { - #region Private Instance Fields - private string _message; - #endregion Private Instance Fields - #region Public Instance Properties - [TaskAttribute("message", Required=true)] - public string FileName { - get { return _message; } - set { _message = value; } - } - #endregion Public Instance Properties - #region Override implementation of Task - protected override void ExecuteTask() { - Log(Level.Info, _message.ToUpper()); - } - #endregion Override implementation of Task - } - ]]> - </code> - </script> - <usertask message='Hello from UserTask'/> - - - - - Define a custom function and call it using Boo. - - - <script language="Boo.CodeDom.BooCodeProvider, Boo.CodeDom, Version=1.0.0.0, Culture=neutral, PublicKeyToken=32c39770e9a21a67" - failonerror="true"> - <code> - <![CDATA[ - - [Function("test-func")] - def MyFunc(): - return "Hello from Boo !!!!!!" - ]]> - </code> - </script> - <echo message='${script::test-func()}'/> - - -
- + + + + Executes the code contained within the task. + + +
Code
+ + The must contain a single code + element, which in turn contains the script code. + + + This code can include extensions such as functions, or tasks. Once + the script task has executed those extensions will be available for + use in the buildfile. + + + If no extensions have been defined, a static entry point named + ScriptMain - which must have a single + argument - is required. + +
Namespaces
+ + The following namespaces are imported by default: + + + + System + + + System.Collections + + + System.IO + + + System.Text + + + NAnt.Core + + + NAnt.Core.Attributes + + +
Assembly References
+ + The assembly references that are specified will be used to compile + the script, and will be loaded into the NAnt appdomain. + + + By default, only the NAnt.Core and mscorlib assemblies + are referenced. + +
+ + Run C# code that writes a message to the build log. + + <script language="C#"> + <code> + <![CDATA[ + public static void ScriptMain(Project project) { + project.Log(Level.Info, "Hello World from a script task using C#"); + } + ]]> + </code> + </script> + + + + Define a custom function and call it using C#. + + <script language="C#" prefix="test" > + <code> + <![CDATA[ + [Function("test-func")] + public static string Testfunc( ) { + return "some result !!!!!!!!"; + } + ]]> + </code> + </script> + <echo message='${test::test-func()}'/> + + + + Use a custom namespace in C# to create a database + + <script language="C#" > + <references> + <include name="System.Data.dll" /> + </references> + <imports> + <import namespace="System.Data.SqlClient" /> + </imports> + <code> + <![CDATA[ + public static void ScriptMain(Project project) { + string dbUserName = "nant"; + string dbPassword = "nant"; + string dbServer = "(local)"; + string dbDatabaseName = "NAntSample"; + string connectionString = String.Format("Server={0};uid={1};pwd={2};", dbServer, dbUserName, dbPassword); + + SqlConnection connection = new SqlConnection(connectionString); + string createDbQuery = "CREATE DATABASE " + dbDatabaseName; + SqlCommand createDatabaseCommand = new SqlCommand(createDbQuery); + createDatabaseCommand.Connection = connection; + + connection.Open(); + + try { + createDatabaseCommand.ExecuteNonQuery(); + project.Log(Level.Info, "Database added successfully: " + dbDatabaseName); + } catch (Exception e) { + project.Log(Level.Error, e.ToString()); + } finally { + connection.Close(); + } + } + ]]> + </code> + </script> + + + + + Run Visual Basic.NET code that writes a message to the build log. + + + <script language="VB"> + <code> + <![CDATA[ + Public Shared Sub ScriptMain(project As Project) + project.Log(Level.Info, "Hello World from a script task using Visual Basic.NET") + End Sub + ]]> + </code> + </script> + + + + Define a custom task and call it using C#. + + <script language="C#" prefix="test" > + <code> + <![CDATA[ + [TaskName("usertask")] + public class TestTask : Task { + #region Private Instance Fields + private string _message; + #endregion Private Instance Fields + #region Public Instance Properties + [TaskAttribute("message", Required=true)] + public string FileName { + get { return _message; } + set { _message = value; } + } + #endregion Public Instance Properties + #region Override implementation of Task + protected override void ExecuteTask() { + Log(Level.Info, _message.ToUpper()); + } + #endregion Override implementation of Task + } + ]]> + </code> + </script> + <usertask message='Hello from UserTask'/> + + + + + Define a custom function and call it using Boo. + + + <script language="Boo.CodeDom.BooCodeProvider, Boo.CodeDom, Version=1.0.0.0, Culture=neutral, PublicKeyToken=32c39770e9a21a67" + failonerror="true"> + <code> + <![CDATA[ + + [Function("test-func")] + def MyFunc(): + return "Hello from Boo !!!!!!" + ]]> + </code> + </script> + <echo message='${script::test-func()}'/> + + +
+ Initializes the task. - - + + Executes the script block. - - - - The language of the script block. Possible values are "VB", "vb", "VISUALBASIC", "C#", "c#", "CSHARP". - "JS", "js", "JSCRIPT" "VJS", "vjs", "JSHARP" or a fully-qualified name for a class implementing - . - - - + + + + The language of the script block. Possible values are "VB", "vb", "VISUALBASIC", "C#", "c#", "CSHARP". + "JS", "js", "JSCRIPT" "VJS", "vjs", "JSHARP" or a fully-qualified name for a class implementing + . + + + Any required references. - - + + The name of the main class containing the static ScriptMain entry point. - - + + The namespace prefix for any custom functions defined in the script. If ommitted the prefix will default to 'script' - - + + The namespaces to import. - - + + The code to execute. - - - - Compiles Visual Basic.NET programs. - - - - In order to have generate manifest resource names - that match those generated by Microsoft Visual Studio.NET, the value of - the attribute of the <> - element should match the "Root namespace" of the VB.NET project, and the - value of the attribute - should be set to "". - - - - Example build file using this task. - - - - - - - - - - - - - - - - - - - - - - - - - - - - ]]> - - - - - - Finds the correct namespace/classname for a resource file from the - given dependent source file, and ensure the - is prefixed. - - The file from which the resource linkage of the resource file should be determined. - The culture of the resource file for which the resource linkage should be determined. - - The namespace/classname of the source file matching the resource or - if the dependent source file does not exist. - - - - - Writes conditional compilation constants to the specified - . - - The to which the conditional compilation constants should be written. - - - - Writes the compiler options to the specified . - - to which the compiler options should be written. - - + + + + Compiles Visual Basic.NET programs. + + + + In order to have generate manifest resource names + that match those generated by Microsoft Visual Studio.NET, the value of + the attribute of the <> + element should match the "Root namespace" of the VB.NET project, and the + value of the attribute + should be set to "". + + + + Example build file using this task. + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + Finds the correct namespace/classname for a resource file from the + given dependent source file, and ensure the + is prefixed. + + The file from which the resource linkage of the resource file should be determined. + The culture of the resource file for which the resource linkage should be determined. + + The namespace/classname of the source file matching the resource or + if the dependent source file does not exist. + + + + + Writes conditional compilation constants to the specified + . + + The to which the conditional compilation constants should be written. + + + + Writes the compiler options to the specified . + + to which the compiler options should be written. + + Determines whether compilation is needed. - - + + The preferred base address at which to load a DLL. The default base address for a DLL is set by the .NET Framework common language @@ -2890,20 +2890,20 @@ This address must be specified as a hexadecimal number. - - - - Specifies the type of debugging information generated by the - compiler. The default is . - - - - - No longer expose this to build authors. Use - instead. - - - + + + + Specifies the type of debugging information generated by the + compiler. The default is . + + + + + No longer expose this to build authors. Use + instead. + + + The name of the XML documentation file to generate. Only supported when targeting .NET 2.0 (or higher). @@ -2913,8 +2913,8 @@ Corresponds with the /doc: flag. - - + + Specifies whether the /imports option gets passed to the compiler. @@ -2929,13 +2929,13 @@ Example of an imports attribute - - + + The namespaces to import. - - + + Instructs the compiler not to reference standard libraries (system.dll and VBC.RSP). The default is . @@ -2946,8 +2946,8 @@ Corresponds with the /nostdlib flag. - - + + Specifies whether /optioncompare option gets passed to the compiler. @@ -2958,8 +2958,8 @@ passed to the compiler. See the Microsoft.NET Framework SDK documentation for details. - - + + Specifies whether the /optionexplicit option gets passed to the compiler. The default is . @@ -2969,8 +2969,8 @@ otherwise, . See the Microsoft.NET Framework SDK documentation for details. - - + + Specifies whether the /optimize option gets passed to the compiler. The default is . @@ -2980,8 +2980,8 @@ otherwise, . See the Microsoft.NET Framework SDK documentation for details. - - + + Specifies whether the /optionstrict option gets passed to the compiler. The default is . @@ -2991,8 +2991,8 @@ otherwise, . See the Microsoft.NET Framework SDK documentation for details. - - + + Specifies which platform version of common language runtime (CLR) can run the output file. @@ -3006,8 +3006,8 @@ Corresponds with the /platform flag. - - + + Specifies whether the /removeintchecks option gets passed to the compiler. The default is . @@ -3017,8 +3017,8 @@ otherwise, . See the Microsoft.NET Framework SDK documentation for details. - - + + Specifies whether the /rootnamespace option gets passed to the compiler. @@ -3028,37 +3028,37 @@ namespace of the project. See the Microsoft.NET Framework SDK documentation for details. - - + + Specifies whether the compiler for the active target framework supports generation of XML Documentation file. The default is . - - + + Specifies whether the compiler for the active target framework supports NOT referencing standard libraries (system.dll and VBC.RSP). The default is . - - + + Specifies whether the compiler for the active target framework supports limiting the platform on which the compiled code can run. The default is . - - + + Gets the file extension required by the current compiler. For the VB.NET compiler, the file extension is always vb. - - + + Gets the class name regular expression for the language of the current compiler. @@ -3067,8 +3067,8 @@ Class name regular expression for the language of the current compiler. - - + + Gets the namespace regular expression for the language of the current compiler. @@ -3077,57 +3077,57 @@ Namespace regular expression for the language of the current compiler. - - - - Compiles Visual J# programs using vjc, Microsoft's J# compiler. - - - - In order to have generate manifest resource names - that match those generated by Microsoft Visual Studio.NET, the value of - the attribute of the <> - element should match the "Default Package" of the J#.NET project, and - the value of the attribute - should be set to "". - - - - Compile a "HelloWorld" application, including embedded resources. - - - - - - - - - - - - - - - - - ]]> - - - - - - Writes module references to the specified . - - The to which the module references should be written. - - - - Writes the compiler options to the specified . - - to which the compiler options should be written. - - + + + + Compiles Visual J# programs using vjc, Microsoft's J# compiler. + + + + In order to have generate manifest resource names + that match those generated by Microsoft Visual Studio.NET, the value of + the attribute of the <> + element should match the "Default Package" of the J#.NET project, and + the value of the attribute + should be set to "". + + + + Compile a "HelloWorld" application, including embedded resources. + + + + + + + + + + + + + + + + + ]]> + + + + + + Writes module references to the specified . + + The to which the module references should be written. + + + + Writes the compiler options to the specified . + + to which the compiler options should be written. + + The preferred base address at which to load a DLL. The default base address for a DLL is set by the .NET Framework common language @@ -3140,20 +3140,20 @@ This address can be specified as a decimal, hexadecimal, or octal number. - - - - Specifies the type of debugging information generated by the - compiler. The default is . - - - - - No longer expose this to build authors. Use - instead. - - - + + + + Specifies the type of debugging information generated by the + compiler. The default is . + + + + + No longer expose this to build authors. Use + instead. + + + Specifies whether package-scoped members are accessible outside of the assembly. In other words, package scope is treated as assembly @@ -3174,8 +3174,8 @@ ]]> - - + + Specifies whether to disable language extensions. @@ -3199,8 +3199,8 @@ ]]> - - + + Specifies the location of assemblies referenced by way of the /reference flag. @@ -3212,8 +3212,8 @@ See the Visual J# Reference for details. - - + + Associate Java-language/COM package names. @@ -3234,8 +3234,8 @@ ]]> - - + + Specifies the code page to use for all source code files in the compilation. @@ -3248,8 +3248,8 @@ See the Visual J# Reference for details. - - + + Specifies the warning level for the compiler to display. Valid values are 0-4. The default is 4. @@ -3262,8 +3262,8 @@ Corresponds with the /warn option. - - + + Controls which warnings should be reported as errors. @@ -3272,8 +3272,8 @@ compiler does not allow control over which warnings should be reported as errors. - - + + Reference packages @@ -3281,8 +3281,8 @@ Override to avoid exposing this to build authors, as the Visual J# compiler does not support package references. - - + + Link the specified modules into this assembly. @@ -3290,16 +3290,16 @@ Override to avoid exposing this to build authors, as the Visual J# compiler does not support linking modules. - - + + Gets the file extension required by the current compiler. For the J# compiler, the file extension is always jsl. - - + + Gets the class name regular expression for the language of the current compiler. @@ -3308,8 +3308,8 @@ Class name regular expression for the language of the current compiler. - - + + Gets the namespace regular expression for the language of the current compiler. @@ -3318,8 +3318,8 @@ Namespace regular expression for the language of the current compiler. - - + + Override to avoid exposing the configuration setting for this task as Visual J# will never support package references. @@ -3328,29 +3328,29 @@ , as the Visual J# compiler will never support package references. - - + + Represents an assembly-level attribute. - - - - Initializes a new instance of the - class. - - - + + + + Initializes a new instance of the + class. + + + Typename of the assembly-level attribute. - - + + Value of the attribute. - - + + If then the value of the attribute will be set as is, without actually looking for a matching constructor or @@ -3360,8 +3360,8 @@ if the value of the attribute should be set as is; otherwise, . - - + + Indicates if the attribute should be generated. @@ -3369,8 +3369,8 @@ if the attribute should be generated; otherwise, . - - + + Indicates if the attribute should be not generated. @@ -3378,133 +3378,133 @@ if the attribute should be not generated; otherwise, . - - - - Contains a strongly typed collection of - objects. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with the specified instance. - - - - - Initializes a new instance of the class - with the specified array of instances. - - - - - Adds a to the end of the collection. - - The to be added to the end of the collection. - The position into which the new element was inserted. - - - - Adds the elements of a array to the end of the collection. - - The array of elements to be added to the end of the collection. - - - - Adds the elements of a to the end of the collection. - - The to be added to the end of the collection. - - - - Determines whether a is in the collection. - - The to locate in the collection. - - if is found in the - collection; otherwise, . - - - - - Determines whether a with the specified - value is in the collection. - - The argument value to locate in the collection. - - if a with - value is found in the collection; otherwise, - . - - - + + + + Contains a strongly typed collection of + objects. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with the specified instance. + + + + + Initializes a new instance of the class + with the specified array of instances. + + + + + Adds a to the end of the collection. + + The to be added to the end of the collection. + The position into which the new element was inserted. + + + + Adds the elements of a array to the end of the collection. + + The array of elements to be added to the end of the collection. + + + + Adds the elements of a to the end of the collection. + + The to be added to the end of the collection. + + + + Determines whether a is in the collection. + + The to locate in the collection. + + if is found in the + collection; otherwise, . + + + + + Determines whether a with the specified + value is in the collection. + + The argument value to locate in the collection. + + if a with + value is found in the collection; otherwise, + . + + + Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. The zero-based index in at which copying begins. - - - - Retrieves the index of a specified object in the collection. - - The object for which the index is returned. - - The index of the specified . If the is not currently a member of the collection, it returns -1. - - - - - Inserts a into the collection at the specified index. - - The zero-based index at which should be inserted. - The to insert. - - - - Returns an enumerator that can iterate through the collection. - - - A for the entire collection. - - - - - Removes a member from the collection. - - The to remove from the collection. - - + + + + Retrieves the index of a specified object in the collection. + + The object for which the index is returned. + + The index of the specified . If the is not currently a member of the collection, it returns -1. + + + + + Inserts a into the collection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + + + Returns an enumerator that can iterate through the collection. + + + A for the entire collection. + + + + + Removes a member from the collection. + + The to remove from the collection. + + Gets or sets the element at the specified index. The zero-based index of the element to get or set. - - - - Gets the with the specified value. - - The value of the to get. - - - - Enumerates the elements of a . - - - - - Initializes a new instance of the class - with the specified . - - The collection that should be enumerated. - - + + + + Gets the with the specified value. + + The value of the to get. + + + + Enumerates the elements of a . + + + + + Initializes a new instance of the class + with the specified . + + The collection that should be enumerated. + + Advances the enumerator to the next element of the collection. @@ -3513,155 +3513,155 @@ to the next element; if the enumerator has passed the end of the collection. - - + + Sets the enumerator to its initial position, which is before the first element in the collection. - - + + Gets the current element in the collection. The current element in the collection. - - - - A specialized used for setting the lib directories. - - - The primary reason for this class is to allow the - to always be the same value as the parent - - - - - - Initializes a new instance of the class. - - - - + + + + A specialized used for setting the lib directories. + + + The primary reason for this class is to allow the + to always be the same value as the parent + + + + + + Initializes a new instance of the class. + + + + override this. We will always use the base directory of the parent. overriding without the TaskAttribute attribute prevents it being set in the source xml - - - - Specialized class for managing assembly files. - - - - If an include pattern does not contain any wildcard characters then - the assembly will be searched for in following locations (in the order listed): - - - - - The base directory of the fileset. - - - - - The directories specified using the nested <lib> element. - - - - - The list of reference assemblies of the current target framework. - - - - - The reference assemblies of a given target framework are defined using - <reference-assemblies> filesets in the <framework> node - of the NAnt configuration file. - - - - - Define a reference with name "sys.assemblies", holding - a set of system assemblies. - - - - - - - - ]]> - - - Use the predefined set of assemblies to compile a C# assembly. - - - - - - - - - ]]> - - - - - Compile a C# assembly using assembly references that are searched for - in the "Third Party Assemblies" and "Company Assemblies" - directories. - - - - - - - - - - - - - - - - ]]> - - - - - - - Initializes a new instance of the class. - - - + + + + Specialized class for managing assembly files. + + + + If an include pattern does not contain any wildcard characters then + the assembly will be searched for in following locations (in the order listed): + + + + + The base directory of the fileset. + + + + + The directories specified using the nested <lib> element. + + + + + The list of reference assemblies of the current target framework. + + + + + The reference assemblies of a given target framework are defined using + <reference-assemblies> filesets in the <framework> node + of the NAnt configuration file. + + + + + Define a reference with name "sys.assemblies", holding + a set of system assemblies. + + + + + + + + ]]> + + + Use the predefined set of assemblies to compile a C# assembly. + + + + + + + + + ]]> + + + + + Compile a C# assembly using assembly references that are searched for + in the "Third Party Assemblies" and "Company Assemblies" + directories. + + + + + + + + + + + + + + + + ]]> + + + + + + + Initializes a new instance of the class. + + + copy constructor for FileSet. Required in order to assign references of FileSet type where AssemblyFileSets are used - - + + Do a normal scan and then resolve assemblies. - - - - Resolves references to system assemblies and assemblies that can be - resolved using directories specified in . - - - + + + + Resolves references to system assemblies and assemblies that can be + resolved using directories specified in . + + + Additional directories to search in for assembly references. @@ -3670,406 +3670,406 @@ loosely Corresponds with the /lib[path]: flag of the various compiler tasks. - - + + Represents a compiler warning. - - + + A warning number, or comma-separated list of warnings, that you want the compiler to suppress or report. - - + + If then the element will be processed; otherwise, skipped. The default is . - - + + If then the element will be skipped; otherwise, processed. The default is . - - - - Contains a collection of elements. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with the specified instance. - - - - - Initializes a new instance of the class - with the specified array of instances. - - - - - Adds a to the end of the collection. - - The to be added to the end of the collection. - The position into which the new element was inserted. - - - - Adds the elements of a array to the end of the collection. - - The array of elements to be added to the end of the collection. - - - - Adds the elements of a to the end of the collection. - - The to be added to the end of the collection. - - - - Determines whether a is in the collection. - - The to locate in the collection. - - if is found in the - collection; otherwise, . - - - + + - Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. + Contains a collection of elements. - The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. - The zero-based index in at which copying begins. - - - - Retrieves the index of a specified object in the collection. - - The object for which the index is returned. - - The index of the specified . If the is not currently a member of the collection, it returns -1. - - - - - Inserts a into the collection at the specified index. - - The zero-based index at which should be inserted. - The to insert. - - - - Returns an enumerator that can iterate through the collection. - - - A for the entire collection. - - - - - Removes a member from the collection. - - The to remove from the collection. - - + + - Gets or sets the element at the specified index. + Initializes a new instance of the class. - The zero-based index of the element to get or set. - - - - Enumerates the elements of a . - - - - - Initializes a new instance of the class - with the specified . - - The collection that should be enumerated. - - + + - Advances the enumerator to the next element of the collection. + Initializes a new instance of the class + with the specified instance. - - if the enumerator was successfully advanced - to the next element; if the enumerator has - passed the end of the collection. - - - + + - Sets the enumerator to its initial position, which is before the - first element in the collection. + Initializes a new instance of the class + with the specified array of instances. - - + + - Gets the current element in the collection. + Adds a to the end of the collection. - - The current element in the collection. - - - - - Specifies the type of debugging information generated by the compiler. - - - - For backward compatibility, the following string values can also be - used in build files: - - - - Value - Corresponding field - - - "true" - - - - "false" - - - - - When set to then the following conditional - compilation symbols will also be defined: - - - - DEBUG - - - TRACE - - - - - + The to be added to the end of the collection. + The position into which the new element was inserted. + + - Create no debug information. + Adds the elements of a array to the end of the collection. - - + The array of elements to be added to the end of the collection. + + - Enable attaching a debugger to the running program. + Adds the elements of a to the end of the collection. - - + The to be added to the end of the collection. + + - Enable attaching a debugger to the running program. + Determines whether a is in the collection. - - + The to locate in the collection. + + if is found in the + collection; otherwise, . + + + - Only display assembler when the running program is attached to the - debugger. + Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. - - - - Specialized that also supports - case-insensitive conversion of "true" to - and "false" to - . - - - - - Initializes a new instance of the - class. - - - - - Converts the given object to the type of this converter, using the - specified context and culture information. - - An that provides a format context. - A object. If a is passed, the current culture is assumed. - The to convert. - - An that represents the converted value. - - - - - Specifies whether the generated assembly is strongly named and will - be signed later. - - - - For backward compatibility, the following string values can also be - used in build files: - - - - Value - Corresponding field - - - "true" - - - - "false" - - - - - - + The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. + The zero-based index in at which copying begins. + + - Not specified. + Retrieves the index of a specified object in the collection. - - + The object for which the index is returned. + + The index of the specified . If the is not currently a member of the collection, it returns -1. + + + + + Inserts a into the collection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + + + Returns an enumerator that can iterate through the collection. + + + A for the entire collection. + + + + + Removes a member from the collection. + + The to remove from the collection. + + + + Gets or sets the element at the specified index. + + The zero-based index of the element to get or set. + + + + Enumerates the elements of a . + + + + + Initializes a new instance of the class + with the specified . + + The collection that should be enumerated. + + + + Advances the enumerator to the next element of the collection. + + + if the enumerator was successfully advanced + to the next element; if the enumerator has + passed the end of the collection. + + + + + Sets the enumerator to its initial position, which is before the + first element in the collection. + + + + + Gets the current element in the collection. + + + The current element in the collection. + + + + + Specifies the type of debugging information generated by the compiler. + + + + For backward compatibility, the following string values can also be + used in build files: + + + + Value + Corresponding field + + + "true" + + + + "false" + + + + + When set to then the following conditional + compilation symbols will also be defined: + + + + DEBUG + + + TRACE + + + + + + + Create no debug information. + + + + + Enable attaching a debugger to the running program. + + + + + Enable attaching a debugger to the running program. + + + + + Only display assembler when the running program is attached to the + debugger. + + + + + Specialized that also supports + case-insensitive conversion of "true" to + and "false" to + . + + + + + Initializes a new instance of the + class. + + + + + Converts the given object to the type of this converter, using the + specified context and culture information. + + An that provides a format context. + A object. If a is passed, the current culture is assumed. + The to convert. + + An that represents the converted value. + + + + + Specifies whether the generated assembly is strongly named and will + be signed later. + + + + For backward compatibility, the following string values can also be + used in build files: + + + + Value + Corresponding field + + + "true" + + + + "false" + + + + + + + + Not specified. + + + Fully sign the assembly. - - + + Only place the public key in the assembly, allowing the signature to be added later. - - - - Specialized that also supports - case-insensitive conversion of "true" to - and "false" to - . - - - - - Initializes a new instance of the - class. - - - - - Converts the given object to the type of this converter, using the - specified context and culture information. - - An that provides a format context. - A object. If a is passed, the current culture is assumed. - The to convert. - - An that represents the converted value. - - - + + + + Specialized that also supports + case-insensitive conversion of "true" to + and "false" to + . + + + + + Initializes a new instance of the + class. + + + + + Converts the given object to the type of this converter, using the + specified context and culture information. + + An that provides a format context. + A object. If a is passed, the current culture is assumed. + The to convert. + + An that represents the converted value. + + + Represents an embedded resource. Do not yet expose this to build authors. - - - - Initializes a new instance of the - with the specified file name and manifest resource name. - - The path of the compiled resource. - The manifest resource name of the embedded resource. - - + + + + Initializes a new instance of the + with the specified file name and manifest resource name. + + The path of the compiled resource. + The manifest resource name of the embedded resource. + + Gets the physical location of the resource to embed. The physical location of the resource to embed. - - + + Gets the manifest resource name to use when embedding the resource. The manifest resource name to use when embedding the resource. - - - - Contains a collection of items. - - - Do not yet expose this to build authors. - - - + + + + Contains a collection of items. + + + Do not yet expose this to build authors. + + + Base class for collections that needs to be globally referencable. - - - - Initializes a new instance of the - class. - - - - - Copies the items of the collection to an , - starting at a particular index. - - The one-dimensional that is the destination of the items copied from the collection. The must have zero-based indexing. - The zero-based index in at which copying begins. - - - - Returns an enumerator that can iterate through a collection. - - - An that can be used to iterate through - the collection. - - - + + + + Initializes a new instance of the + class. + + + + + Copies the items of the collection to an , + starting at a particular index. + + The one-dimensional that is the destination of the items copied from the collection. The must have zero-based indexing. + The zero-based index in at which copying begins. + + + + Returns an enumerator that can iterate through a collection. + + + An that can be used to iterate through + the collection. + + + Removes an item at a specific index. The zero-based index of the item to remove. - - + + Removes all items from the collection. - - - - Used by methods that take instances as argument - to verify whether the instance is valid for the collection class. - - The instance to verify. - - + + + + Used by methods that take instances as argument + to verify whether the instance is valid for the collection class. + + The instance to verify. + + Checks whether the specified index is within the range of this collection. The index to check. - - + + Gets a value indicating whether access to the collection is synchronized (thread-safe). @@ -4077,16 +4077,16 @@ . - - + + Gets the number of items in the collection. The number of items in the collection. - - + + Gets an object that can be used to synchronize access to the collection. @@ -4094,191 +4094,191 @@ An object that can be used to synchronize access to the collection. - - + + Gets a value indicating whether the collection has a fixed size. . - - + + Gets a value indicating whether the collection has a fixed size. . - - - - Gets the list of elements contained in the - instance. - - - An containing the elements of the - collection. - - - - - Gets the of the items in this collection. - - - The of the items in this collection. - - - - - Returns an enumerator that can iterate through the collection. - - - A for the entire collection. - - - - - Inserts a into the collection at the - specified index. - - The zero-based index at which should be inserted. - The to insert. - - - - Removes the specified from the - collection. - - The to remove from the collection. - - - - Determines whether a is in the collection. - - The to locate in the collection. - - if is found in the - collection; otherwise, . - - - - - Gets the location of a in the collection. - - The object to locate. - - The zero-based location of the in the - collection. - - - If the is not currently a member of - the collection, -1 is returned. - - - - - Adds a to the end of the collection. - - The to be added to the end of the collection. - - The position into which the new item was inserted. - - - - - Adds the items of a to the end of the collection. - - The to be added to the end of the collection. - - - - Adds a to the end of the collection. - - The to be added to the end of the collection. - - The position into which the new item was inserted. - - - - - Inserts a into the collection at the - specified index. - - The zero-based index at which should be inserted. - The to insert. - - - - Removes the specified from the - collection. - - The to remove from the collection. - - - - Determines whether a is in the collection. - - The to locate in the collection. - - if is found in the - collection; otherwise, . - - - - - Gets the location of a in the collection. - - The object to locate. - - The zero-based location of the in the - collection. - - - If the is not currently a member of - the collection, -1 is returned. - - - + + + + Gets the list of elements contained in the + instance. + + + An containing the elements of the + collection. + + + + + Gets the of the items in this collection. + + + The of the items in this collection. + + + + + Returns an enumerator that can iterate through the collection. + + + A for the entire collection. + + + + + Inserts a into the collection at the + specified index. + + The zero-based index at which should be inserted. + The to insert. + + + + Removes the specified from the + collection. + + The to remove from the collection. + + + + Determines whether a is in the collection. + + The to locate in the collection. + + if is found in the + collection; otherwise, . + + + + + Gets the location of a in the collection. + + The object to locate. + + The zero-based location of the in the + collection. + + + If the is not currently a member of + the collection, -1 is returned. + + + + + Adds a to the end of the collection. + + The to be added to the end of the collection. + + The position into which the new item was inserted. + + + + + Adds the items of a to the end of the collection. + + The to be added to the end of the collection. + + + + Adds a to the end of the collection. + + The to be added to the end of the collection. + + The position into which the new item was inserted. + + + + + Inserts a into the collection at the + specified index. + + The zero-based index at which should be inserted. + The to insert. + + + + Removes the specified from the + collection. + + The to remove from the collection. + + + + Determines whether a is in the collection. + + The to locate in the collection. + + if is found in the + collection; otherwise, . + + + + + Gets the location of a in the collection. + + The object to locate. + + The zero-based location of the in the + collection. + + + If the is not currently a member of + the collection, -1 is returned. + + + Gets or sets the item at the specified index. The zero-based index of the item to get or set. - - - - Gets the with the specified manifest - resource name. - - The manifest resource name of the to get. - - - - Gets the of the items in this collection. - - - The of the items in this collection. - - - + + + + Gets the with the specified manifest + resource name. + + The manifest resource name of the to get. + + + + Gets the of the items in this collection. + + + The of the items in this collection. + + + Gets or sets the item at the specified index. The zero-based index of the item to get or set. - - - - Enumerates the items of a . - - - - - Initializes a new instance of the class - with the specified . - - The collection that should be enumerated. - - + + + + Enumerates the items of a . + + + + + Initializes a new instance of the class + with the specified . + + The collection that should be enumerated. + + Advances the enumerator to the next item of the collection. @@ -4287,35 +4287,35 @@ to the next item; if the enumerator has passed the end of the collection. - - + + Sets the enumerator to its initial position, which is before the first item in the collection. - - + + Gets the current item in the collection. The current item in the collection. - - + + Gets the current item in the collection. The current item in the collection. - - + + Represents a metadata file without assembly manifest. - - + + Returns a textual representation of the module, which can be used as argument for command-line tools. @@ -4323,195 +4323,195 @@ A textual representation of the path, file[,target]. - - + + The path of the module. - - + + File name where the module should be copied to before it is compiled into an assembly. - - - - Gets or sets the that contains the module. - - - - - Contains a collection of items. - - - Do not yet expose this to build authors. - - - - - Initializes a new instance of the - for the specified . - - The containing the collection. - is . - - - - Returns an enumerator that can iterate through the collection. - - - A for the entire collection. - - - - - Copies the items of the collection to an , - starting at a particular index. - - The one-dimensional that is the destination of the items copied from the collection. The must have zero-based indexing. - The zero-based index in at which copying begins. - - + + + + Gets or sets the that contains the module. + + + + + Contains a collection of items. + + + Do not yet expose this to build authors. + + + + + Initializes a new instance of the + for the specified . + + The containing the collection. + is . + + + + Returns an enumerator that can iterate through the collection. + + + A for the entire collection. + + + + + Copies the items of the collection to an , + starting at a particular index. + + The one-dimensional that is the destination of the items copied from the collection. The must have zero-based indexing. + The zero-based index in at which copying begins. + + Removes all items from the collection. - - - - Inserts a into the collection at the - specified index. - - The zero-based index at which should be inserted. - The to insert. - - - - Removes the specified from the - collection. - - The to remove from the collection. - - - - Removes an item at a specific index. - - The zero-based index of the item to remove. - The parameter is less than 0 or greater than or equal to the value of the property of the . - - - - Determines whether a is in the collection. - - The to locate in the collection. - - if is found in the - collection; otherwise, . - - - - - Gets the location of a in the collection. - - The object to locate. - - The zero-based location of the in the - collection. - - - If the is not currently a member of - the collection, -1 is returned. - - - - - Adds a to the end of the collection. - - The to be added to the end of the collection. - - The position into which the new item was inserted. - - - - - Adds the items of a to the end of the collection. - - The to be added to the end of the collection. - - - - Adds a to the end of the collection. - - The to be added to the end of the collection. - - The position into which the new item was inserted. - - - - - Returns an enumerator that can iterate through the collection. - - - A for the entire collection. - - - - - Inserts a into the collection at the - specified index. - - The zero-based index at which should be inserted. - The to insert. - - - - Removes the specified from the - collection. - - The to remove from the collection. - - - - Determines whether a is in the collection. - - The to locate in the collection. - - if is found in the - collection; otherwise, . - - - - - Gets the location of a in the collection. - - The object to locate. - - The zero-based location of the in the - collection. - - - If the is not currently a member of - the collection, -1 is returned. - - - - - Gets or sets the item at the specified index. - - The zero-based index of the item to get or set. - The parameter is less than 0 or greater than or equal to the value of the property of the . - - - - Gets the list of elements contained in the - instance. - - - An containing the elements of the - collection. - - - + + + + Inserts a into the collection at the + specified index. + + The zero-based index at which should be inserted. + The to insert. + + + + Removes the specified from the + collection. + + The to remove from the collection. + + + + Removes an item at a specific index. + + The zero-based index of the item to remove. + The parameter is less than 0 or greater than or equal to the value of the property of the . + + + + Determines whether a is in the collection. + + The to locate in the collection. + + if is found in the + collection; otherwise, . + + + + + Gets the location of a in the collection. + + The object to locate. + + The zero-based location of the in the + collection. + + + If the is not currently a member of + the collection, -1 is returned. + + + + + Adds a to the end of the collection. + + The to be added to the end of the collection. + + The position into which the new item was inserted. + + + + + Adds the items of a to the end of the collection. + + The to be added to the end of the collection. + + + + Adds a to the end of the collection. + + The to be added to the end of the collection. + + The position into which the new item was inserted. + + + + + Returns an enumerator that can iterate through the collection. + + + A for the entire collection. + + + + + Inserts a into the collection at the + specified index. + + The zero-based index at which should be inserted. + The to insert. + + + + Removes the specified from the + collection. + + The to remove from the collection. + + + + Determines whether a is in the collection. + + The to locate in the collection. + + if is found in the + collection; otherwise, . + + + + + Gets the location of a in the collection. + + The object to locate. + + The zero-based location of the in the + collection. + + + If the is not currently a member of + the collection, -1 is returned. + + + + + Gets or sets the item at the specified index. + + The zero-based index of the item to get or set. + The parameter is less than 0 or greater than or equal to the value of the property of the . + + + + Gets the list of elements contained in the + instance. + + + An containing the elements of the + collection. + + + Gets a value indicating whether access to the collection is synchronized (thread-safe). @@ -4519,16 +4519,16 @@ . - - + + Gets the number of items in the collection. The number of items in the collection. - - + + Gets an object that can be used to synchronize access to the collection. @@ -4536,43 +4536,43 @@ An object that can be used to synchronize access to the collection. - - + + Gets a value indicating whether the collection has a fixed size. . - - + + Gets a value indicating whether the collection has a fixed size. . - - - - Gets or sets the item at the specified index. - - The zero-based index of the item to get or set. - The parameter is less than 0 or greater than or equal to the value of the property of the . - - - - Enumerates the items of a . - - - - - Initializes a new instance of the class - with the specified . - - The collection that should be enumerated. - - + + + + Gets or sets the item at the specified index. + + The zero-based index of the item to get or set. + The parameter is less than 0 or greater than or equal to the value of the property of the . + + + + Enumerates the items of a . + + + + + Initializes a new instance of the class + with the specified . + + The collection that should be enumerated. + + Advances the enumerator to the next item of the collection. @@ -4581,30 +4581,30 @@ to the next item; if the enumerator has passed the end of the collection. - - + + Sets the enumerator to its initial position, which is before the first item in the collection. - - + + Gets the current item in the collection. The current item in the collection. - - + + Gets the current item in the collection. The current item in the collection. - - + + One or more modules to compile into an assembly. @@ -4624,59 +4624,59 @@ ]]> - - - - Initializes a new instance of the class. - - - - - The base of the directory of this . - The default is the project base directory. - - - - - The modules to add to this . - - - + + + + Initializes a new instance of the class. + + + + + The base of the directory of this . + The default is the project base directory. + + + + + The modules to add to this . + + + Represents a namespace to import. - - - - Initializes a new instance of the - class. - - - - - Initializes a new instance of the - class for the specified namespace. - - The namespace. - is . - - + + + + Initializes a new instance of the + class. + + + + + Initializes a new instance of the + class for the specified namespace. + + The namespace. + is . + + The name of the namespace to import. The name of the namespace to import. - - + + The name of the namespace to import. The name of the namespace to import. - - + + Indicates if the import should be generated. @@ -4684,8 +4684,8 @@ if the import should be generated; otherwise, . - - + + Indicates if the import should be not generated. @@ -4693,199 +4693,199 @@ if the import should be not generated; otherwise, . - - - - Contains a collection of items. - - - Define a reference with name "system.imports". - - - - - - ]]> - - Use the predefined set of imports to compile a VB.NET assembly. - - - - - - - - - - - - ]]> - - - - - - Returns an enumerator that can iterate through the collection. - - - A for the entire collection. - - - - - Returns a comma-delimited list of namespace imports. - - - A comma-delimited list of namespace imports, or an empty - if there are no namespace imports. - - - Each namespace import is quoted individually. - - - - - Inserts a into the collection at the - specified index. - - The zero-based index at which should be inserted. - The to insert. - - - - Removes the specified from the - collection. - - The to remove from the collection. - - - - Determines whether a is in the collection. - - The to locate in the collection. - - if is found in the - collection; otherwise, . - - - - - Gets the location of a in the collection. - - The object to locate. - - The zero-based location of the in the - collection. - - - If the is not currently a member of - the collection, -1 is returned. - - - - - Adds a to the end of the collection. - - The to be added to the end of the collection. - - The position into which the new item was inserted. - - - - - Adds the items of a to the end of the collection. - - The to be added to the end of the collection. - - - - Adds a to the end of the collection. - - The to be added to the end of the collection. - - The position into which the new item was inserted. - - - - - Inserts a into the collection at the - specified index. - - The zero-based index at which should be inserted. - The to insert. - - - - Removes the specified from the - collection. - - The to remove from the collection. - - - - Determines whether a is in the collection. - - The to locate in the collection. - - if is found in the - collection; otherwise, . - - - - - Gets the location of a in the collection. - - The object to locate. - - The zero-based location of the in the - collection. - - - If the is not currently a member of - the collection, -1 is returned. - - - + + + + Contains a collection of items. + + + Define a reference with name "system.imports". + + + + + + ]]> + + Use the predefined set of imports to compile a VB.NET assembly. + + + + + + + + + + + + ]]> + + + + + + Returns an enumerator that can iterate through the collection. + + + A for the entire collection. + + + + + Returns a comma-delimited list of namespace imports. + + + A comma-delimited list of namespace imports, or an empty + if there are no namespace imports. + + + Each namespace import is quoted individually. + + + + + Inserts a into the collection at the + specified index. + + The zero-based index at which should be inserted. + The to insert. + + + + Removes the specified from the + collection. + + The to remove from the collection. + + + + Determines whether a is in the collection. + + The to locate in the collection. + + if is found in the + collection; otherwise, . + + + + + Gets the location of a in the collection. + + The object to locate. + + The zero-based location of the in the + collection. + + + If the is not currently a member of + the collection, -1 is returned. + + + + + Adds a to the end of the collection. + + The to be added to the end of the collection. + + The position into which the new item was inserted. + + + + + Adds the items of a to the end of the collection. + + The to be added to the end of the collection. + + + + Adds a to the end of the collection. + + The to be added to the end of the collection. + + The position into which the new item was inserted. + + + + + Inserts a into the collection at the + specified index. + + The zero-based index at which should be inserted. + The to insert. + + + + Removes the specified from the + collection. + + The to remove from the collection. + + + + Determines whether a is in the collection. + + The to locate in the collection. + + if is found in the + collection; otherwise, . + + + + + Gets the location of a in the collection. + + The object to locate. + + The zero-based location of the in the + collection. + + + If the is not currently a member of + the collection, -1 is returned. + + + Gets or sets the item at the specified index. The zero-based index of the item to get or set. - - - - Gets the with the specified namespace. - - The namespace of the to get. - - - - Gets the of the items in this collection. - - - The of the items in this collection. - - - + + + + Gets the with the specified namespace. + + The namespace of the to get. + + + + Gets the of the items in this collection. + + + The of the items in this collection. + + + Gets or sets the item at the specified index. The zero-based index of the item to get or set. - - - - Enumerates the items of a . - - - - - Initializes a new instance of the class - with the specified . - - The collection that should be enumerated. - - + + + + Enumerates the items of a . + + + + + Initializes a new instance of the class + with the specified . + + The collection that should be enumerated. + + Advances the enumerator to the next item of the collection. @@ -4894,163 +4894,163 @@ to the next item; if the enumerator has passed the end of the collection. - - + + Sets the enumerator to its initial position, which is before the first item in the collection. - - + + Gets the current item in the collection. The current item in the collection. - - + + Gets the current item in the collection. The current item in the collection. - - + + Represents a package. - - + + Name of the package to reference. Multiple package can be specified with a single element as a semi-colon separated list of package names. - - + + Indicates if the package should be passed to the task. If then the package will be passed; otherwise, skipped. The default is . - - + + Indicates if the package should not be passed to the task. If then the package will be passed; otherwise, skipped. The default is . - - - - Contains a strongly typed collection of - objects. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with the specified instance. - - - - - Initializes a new instance of the class - with the specified array of instances. - - - - - Adds a to the end of the collection. - - The to be added to the end of the collection. - The position into which the new element was inserted. - - - - Adds the elements of a array to the end of the collection. - - The array of elements to be added to the end of the collection. - - - - Adds the elements of a to the end of the collection. - - The to be added to the end of the collection. - - - - Determines whether a is in the collection. - - The to locate in the collection. - - if is found in the - collection; otherwise, . - - - + + + + Contains a strongly typed collection of + objects. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with the specified instance. + + + + + Initializes a new instance of the class + with the specified array of instances. + + + + + Adds a to the end of the collection. + + The to be added to the end of the collection. + The position into which the new element was inserted. + + + + Adds the elements of a array to the end of the collection. + + The array of elements to be added to the end of the collection. + + + + Adds the elements of a to the end of the collection. + + The to be added to the end of the collection. + + + + Determines whether a is in the collection. + + The to locate in the collection. + + if is found in the + collection; otherwise, . + + + Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. The zero-based index in at which copying begins. - - - - Retrieves the index of a specified object in the collection. - - The object for which the index is returned. - - The index of the specified . If the is not currently a member of the collection, it returns -1. - - - - - Inserts a into the collection at the specified index. - - The zero-based index at which should be inserted. - The to insert. - - - - Returns an enumerator that can iterate through the collection. - - - A for the entire collection. - - - - - Removes a member from the collection. - - The to remove from the collection. - - + + + + Retrieves the index of a specified object in the collection. + + The object for which the index is returned. + + The index of the specified . If the is not currently a member of the collection, it returns -1. + + + + + Inserts a into the collection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + + + Returns an enumerator that can iterate through the collection. + + + A for the entire collection. + + + + + Removes a member from the collection. + + The to remove from the collection. + + Gets or sets the element at the specified index. The zero-based index of the element to get or set. - - - - Enumerates the elements of a . - - - - - Initializes a new instance of the class - with the specified . - - The collection that should be enumerated. - - + + + + Enumerates the elements of a . + + + + + Initializes a new instance of the class + with the specified . + + The collection that should be enumerated. + + Advances the enumerator to the next element of the collection. @@ -5059,48 +5059,48 @@ to the next element; if the enumerator has passed the end of the collection. - - + + Sets the enumerator to its initial position, which is before the first element in the collection. - - + + Gets the current element in the collection. The current element in the collection. - - - - Specialized class for managing resource files. - - - - - Initializes a new instance of the class. - - - + + + + Specialized class for managing resource files. + + + + + Initializes a new instance of the class. + + + copy constructor for FileSet. Required in order to assign references of FileSet type where ResourceFileSet are used - - - - Creates a shallow copy of the . - - - A shallow copy of the . - - - + + + + Creates a shallow copy of the . + + + A shallow copy of the . + + + Gets the manifest resource name for the specified resource file. @@ -5108,8 +5108,8 @@ The manifest resource name to be sent to the compiler. - - + + Gets the manifest resource name for the file using both its physical and logical path. @@ -5123,144 +5123,144 @@ We use the relative path of the logical path, but the filename and and the extension of the physical path to match VS.NET - - + + Indicates the prefix to prepend to the actual resource. This is usually the default namspace of the assembly. - - + + Indicates whether prefixes should be dynamically generated by taking the path of the resource relative to the basedir and appending it to the specified prefix. The default is . - - - - Gets a containing all matching resx files. - - - A containing all matching resx files. - - - - - Gets a containing all matching non-resx - files. - - - A containing all matching non-resx files. - - - - - Contains a strongly typed collection of objects. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with the specified instance. - - - - - Initializes a new instance of the class - with the specified array of instances. - - - - - Adds a to the end of the collection. - - The to be added to the end of the collection. - The position into which the new element was inserted. - - - - Adds the elements of a array to the end of the collection. - - The array of elements to be added to the end of the collection. - - - - Adds the elements of a to the end of the collection. - - The to be added to the end of the collection. - - - - Determines whether a is in the collection. - - The to locate in the collection. - - if is found in the - collection; otherwise, . - - - + + + + Gets a containing all matching resx files. + + + A containing all matching resx files. + + + + + Gets a containing all matching non-resx + files. + + + A containing all matching non-resx files. + + + + + Contains a strongly typed collection of objects. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with the specified instance. + + + + + Initializes a new instance of the class + with the specified array of instances. + + + + + Adds a to the end of the collection. + + The to be added to the end of the collection. + The position into which the new element was inserted. + + + + Adds the elements of a array to the end of the collection. + + The array of elements to be added to the end of the collection. + + + + Adds the elements of a to the end of the collection. + + The to be added to the end of the collection. + + + + Determines whether a is in the collection. + + The to locate in the collection. + + if is found in the + collection; otherwise, . + + + Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. The zero-based index in at which copying begins. - - - - Retrieves the index of a specified object in the collection. - - The object for which the index is returned. - - The index of the specified . If the is not currently a member of the collection, it returns -1. - - - - - Inserts a into the collection at the specified index. - - The zero-based index at which should be inserted. - The to insert. - - - - Returns an enumerator that can iterate through the collection. - - - A for the entire collection. - - - - - Removes a member from the collection. - - The to remove from the collection. - - + + + + Retrieves the index of a specified object in the collection. + + The object for which the index is returned. + + The index of the specified . If the is not currently a member of the collection, it returns -1. + + + + + Inserts a into the collection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + + + Returns an enumerator that can iterate through the collection. + + + A for the entire collection. + + + + + Removes a member from the collection. + + The to remove from the collection. + + Gets or sets the element at the specified index. The zero-based index of the element to get or set. - - - - Enumerates the elements of a . - - - - - Initializes a new instance of the class - with the specified . - - The collection that should be enumerated. - - + + + + Enumerates the elements of a . + + + + + Initializes a new instance of the class + with the specified . + + The collection that should be enumerated. + + Advances the enumerator to the next element of the collection. @@ -5269,22 +5269,22 @@ to the next element; if the enumerator has passed the end of the collection. - - + + Sets the enumerator to its initial position, which is before the first element in the collection. - - + + Gets the current element in the collection. The current element in the collection. - - + + Controls the behaviour of a compiler with regards to the reporting of warnings. @@ -5314,21 +5314,21 @@ ]]> - - - - Specifies a list of warnings that the compiler should treat as - errors. This overrides the - attribute. Only supported when targeting .NET 2.0 or higher. - - - - - Specifies a list of warnings that the compiler should NOT treat as - errors. This is only useful if - is . Only supported when targeting .NET 2.0 - or higher. - - - - + + + + Specifies a list of warnings that the compiler should treat as + errors. This overrides the + attribute. Only supported when targeting .NET 2.0 or higher. + + + + + Specifies a list of warnings that the compiler should NOT treat as + errors. This is only useful if + is . Only supported when targeting .NET 2.0 + or higher. + + + + diff --git a/tools/nant/NAnt.MSNetTasks.xml b/tools/nant/NAnt.MSNetTasks.xml index 51409dc75d8..9a442c68a45 100644 --- a/tools/nant/NAnt.MSNetTasks.xml +++ b/tools/nant/NAnt.MSNetTasks.xml @@ -1,120 +1,120 @@ - - - - NAnt.MSNetTasks - - - - - Disassembles any portable executable (PE) file that contains - intermediate language (IL) code. - - - - Files are only disassembled if the input file is newer than the output - file, or if the output file does not exist. However, you can - explicitly force files to be disassembled with the - attribute. - - - A can be used to select files to disassemble. - To use a , the - attribute must be set. The file name of the output file will be equal - to the file name of the input file, but with extension ".il". - - - - - Disassembles helloworld.exe to helloworld.il. - - - - ]]> - - - - - Disassembles a set of PE files into the specified directory. - - - - - - - - - ]]> - - - - + + + + NAnt.MSNetTasks + + + + + Disassembles any portable executable (PE) file that contains + intermediate language (IL) code. + + + + Files are only disassembled if the input file is newer than the output + file, or if the output file does not exist. However, you can + explicitly force files to be disassembled with the + attribute. + + + A can be used to select files to disassemble. + To use a , the + attribute must be set. The file name of the output file will be equal + to the file name of the input file, but with extension ".il". + + + + + Disassembles helloworld.exe to helloworld.il. + + + + ]]> + + + + + Disassembles a set of PE files into the specified directory. + + + + + + + + + ]]> + + + + Checks whether the task is initialized with valid attributes. - - + + Disassembles the PE file(s). - - + + Disassembles the specified PE file. The PE file to disassemble. - - - - Determines the full path and extension for the output file. - - - A that represents the PE file - file for which the corresponding output file should be determined. - - - A that represents the full path - for the output file. - - The path of the output file could not be determined. - - + + + + Determines the full path and extension for the output file. + + + A that represents the PE file + file for which the corresponding output file should be determined. + + + A that represents the full path + for the output file. + + The path of the output file could not be determined. + + Writes the disassembler options. - - - - Writes an option using the default output format. - - - The to which the disassembler options - should be written. - - - A that contains the name of the - option which should be passed to the disassembler. - - - - - Writes an option and its value using the default output format. - - - The to which the disassembler options - should be written. - - - A that contains the name of the - option which should be passed to the disassembler. - - - A that contains the value of the - option which should be passed to the disassembler. - - - + + + + Writes an option using the default output format. + + + The to which the disassembler options + should be written. + + + A that contains the name of the + option which should be passed to the disassembler. + + + + + Writes an option and its value using the default output format. + + + The to which the disassembler options + should be written. + + + A that contains the name of the + option which should be passed to the disassembler. + + + A that contains the value of the + option which should be passed to the disassembler. + + + Determines whether or not disassembling is needed. @@ -122,8 +122,8 @@ if disassembling is needed; otherwise, . - - + + Specifies whether or not the disassembler should combine the /HEADER, /BYTE, and /TOKENS options. The default @@ -140,8 +140,8 @@ Corresponds to the /ALL flag. - - + + Specifies whether or not the disassembler should generate the IL stream bytes (in hexadecimal notation) as instruction comments. @@ -157,8 +157,8 @@ Corresponds to the /BYTE flag. - - + + Instructs NAnt to rebuild the output file regardless of the file timestamps. The default is . @@ -168,8 +168,8 @@ regardless of its timestamps; otherwise . The default is . - - + + Specifies whether or not the disassembler should include PE header information and runtime header information in the output. The default @@ -185,17 +185,17 @@ Corresponds to the /HEADER flag. - - - - Specifies the PE file to disassemble. - - - A that represents the PE file - to disassemble. - - - + + + + Specifies the PE file to disassemble. + + + A that represents the PE file + to disassemble. + + + Specifies whether or not the disassembler should include references to original source lines. The default is . @@ -210,8 +210,8 @@ Corresponds to the /LINENUM flag. - - + + Specifies whether or not the disassembler should suppress ILASM code output. The default is . @@ -226,25 +226,25 @@ Corresponds to the /NOIL flag. - - - - Specifies whether or not the disassembler should disassemble - public items only. This is a shortcut for ="pub". - The default is . - - - if only public items should be - disassembled; otherwise, . The default is - . - - - - Corresponds to the /PUBONLY flag. - - - - + + + + Specifies whether or not the disassembler should disassemble + public items only. This is a shortcut for ="pub". + The default is . + + + if only public items should be + disassembled; otherwise, . The default is + . + + + + Corresponds to the /PUBONLY flag. + + + + Specifies whether or not the disassembler should enclose all names in single quotation marks. By default, only names that don't match @@ -261,8 +261,8 @@ Corresponds to the /QUOTEALLNAMES flag. - - + + Specifies whether or not the disassembler should generate structured exception handling clauses in canonical (label) form. @@ -278,8 +278,8 @@ Corresponds to the /RAWEH flag. - - + + Specifies whether or not the disassembler should generate original source lines as comments. The default is . @@ -294,8 +294,8 @@ Corresponds to the /SOURCE flag. - - + + Specifies whether or not the disassembler should generate metadata token values as comments. The default is . @@ -310,8 +310,8 @@ Corresponds to the /TOKENS flag. - - + + Specifies whether or not the disassembler should use the UNICODE encoding when generating the output. The default is ANSI. @@ -326,8 +326,8 @@ Corresponds to the /UNICODE flag. - - + + Specifies whether or not the disassembler should use the UTF-8 encoding when generating the output. The default is ANSI. @@ -342,72 +342,72 @@ Corresponds to the /UTF8 flag. - - - - Instructs the disassembler to disassemble the specified item only. - - - A that specifies the item to - disassemble. - - - - Corresponds to the /ITEM flag. - - - - - - Instructs the disassembler to disassemble only the items with the - specified visibility. Possible values are PUB, PRI, - FAM, ASM, FAA, FOA, PSC, - or any combination of them separated by +. - - - A that contains the visibility - suboptions. - - - - Corresponds to the /VISIBILITY flag. - - - - - - Specifies the name of the output file created by the disassembler. - - - A that represents the name of - the output file. - - - - Corresponds to the /OUT flag. - - - - - - Specifies the directory to which outputs will be stored. - - - A that represents the - directory to which outputs will be stored. - - - - - Specifies a list of PE files to disassemble. To use a , - the attribute must be specified. - - - A that represents the set - of PE files to disassemble. - - - + + + + Instructs the disassembler to disassemble the specified item only. + + + A that specifies the item to + disassemble. + + + + Corresponds to the /ITEM flag. + + + + + + Instructs the disassembler to disassemble only the items with the + specified visibility. Possible values are PUB, PRI, + FAM, ASM, FAA, FOA, PSC, + or any combination of them separated by +. + + + A that contains the visibility + suboptions. + + + + Corresponds to the /VISIBILITY flag. + + + + + + Specifies the name of the output file created by the disassembler. + + + A that represents the name of + the output file. + + + + Corresponds to the /OUT flag. + + + + + + Specifies the directory to which outputs will be stored. + + + A that represents the + directory to which outputs will be stored. + + + + + Specifies a list of PE files to disassemble. To use a , + the attribute must be specified. + + + A that represents the set + of PE files to disassemble. + + + The command-line arguments for the external program. @@ -415,17 +415,17 @@ Overridden to ensure the <arg> elements would not be exposed to build authors. - - - - Gets the command-line arguments for the external program. - - - A that contains the command-line - arguments for the external program. - - - + + + + Gets the command-line arguments for the external program. + + + A that contains the command-line + arguments for the external program. + + + Allows a Windows service to be controlled. @@ -445,135 +445,135 @@ ]]> - - - - Initializes a new instance of the - class. - - - + + + + Initializes a new instance of the + class. + + + Peforms actions on the service in order to reach the desired status. - - - - Determines the desired status of the service based on the action - that should be performed on it. - - - The that should be reached - in order for the to be considered successful. - - - - - Starts the service identified by and - . - - instance for controlling the service identified by and . - - - - Stops the service identified by and - . - - instance for controlling the service identified by and . - - - - Restarts the service identified by and - . - - instance for controlling the service identified by and . - - - - Pauses the service identified by and - . - - instance for controlling the service identified by and . - - - - Continues the service identified by and - . - - instance for controlling the service identified by and . - - + + + + Determines the desired status of the service based on the action + that should be performed on it. + + + The that should be reached + in order for the to be considered successful. + + + + + Starts the service identified by and + . + + instance for controlling the service identified by and . + + + + Stops the service identified by and + . + + instance for controlling the service identified by and . + + + + Restarts the service identified by and + . + + instance for controlling the service identified by and . + + + + Pauses the service identified by and + . + + instance for controlling the service identified by and . + + + + Continues the service identified by and + . + + instance for controlling the service identified by and . + + Holds the name of the service that should be controlled. - - + + Holds the name of the computer on which the service resides. - - + + Holds the action that should be performed on the service. - - + + Holds the time, in milliseconds, the task will wait for a service to reach the desired status. - - + + The name of the service that should be controlled. - - + + The name of the computer on which the service resides. The default is the local computer. - - + + The action that should be performed on the service. - - + + The time, in milliseconds, the task will wait for the service to reach the desired status. The default is 5000 milliseconds. - - + + Defines the actions that can be performed on a service. - - + + Starts a service. - - + + Stops a service. - - + + Restarts a service. - - + + Pauses a running service. - - + + Continues a paused service. - - - + + + diff --git a/tools/nant/NAnt.NUnit.xml b/tools/nant/NAnt.NUnit.xml index e5dfa343fc2..a7c623995bb 100644 --- a/tools/nant/NAnt.NUnit.xml +++ b/tools/nant/NAnt.NUnit.xml @@ -1,21 +1,21 @@ - - - - NAnt.NUnit - - - + + + + NAnt.NUnit + + + Carries data specified through the formatter element. - - + + Gets or sets the type of the formatter. The type of the formatter. - - + + Gets or sets a value indicating whether output should be persisted to a file. @@ -24,129 +24,129 @@ if output should be written to a file; otherwise, . The default is . - - + + Gets or sets the extension to append to the output filename. The extension to append to the output filename. - - - - Gets or sets the directory where the output file should be written - to, if is . - - - The directory where the output file should be written to. - - - - - Contains a strongly typed collection of objects. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with the specified instance. - - - - - Initializes a new instance of the class - with the specified array of instances. - - - - - Adds a to the end of the collection. - - The to be added to the end of the collection. - The position into which the new element was inserted. - - - - Adds the elements of a array to the end of the collection. - - The array of elements to be added to the end of the collection. - - - - Adds the elements of a to the end of the collection. - - The to be added to the end of the collection. - - - - Determines whether a is in the collection. - - The to locate in the collection. - - if is found in the - collection; otherwise, . - - - + + + + Gets or sets the directory where the output file should be written + to, if is . + + + The directory where the output file should be written to. + + + + + Contains a strongly typed collection of objects. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with the specified instance. + + + + + Initializes a new instance of the class + with the specified array of instances. + + + + + Adds a to the end of the collection. + + The to be added to the end of the collection. + The position into which the new element was inserted. + + + + Adds the elements of a array to the end of the collection. + + The array of elements to be added to the end of the collection. + + + + Adds the elements of a to the end of the collection. + + The to be added to the end of the collection. + + + + Determines whether a is in the collection. + + The to locate in the collection. + + if is found in the + collection; otherwise, . + + + Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. The zero-based index in at which copying begins. - - - - Retrieves the index of a specified object in the collection. - - The object for which the index is returned. - - The index of the specified . If the is not currently a member of the collection, it returns -1. - - - - - Inserts a into the collection at the specified index. - - The zero-based index at which should be inserted. - The to insert. - - - - Returns an enumerator that can iterate through the collection. - - - A for the entire collection. - - - - - Removes a member from the collection. - - The to remove from the collection. - - + + + + Retrieves the index of a specified object in the collection. + + The object for which the index is returned. + + The index of the specified . If the is not currently a member of the collection, it returns -1. + + + + + Inserts a into the collection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + + + Returns an enumerator that can iterate through the collection. + + + A for the entire collection. + + + + + Removes a member from the collection. + + The to remove from the collection. + + Gets or sets the element at the specified index. The zero-based index of the element to get or set. - - - - Enumerates the elements of a . - - - - - Initializes a new instance of the class - with the specified . - - The collection that should be enumerated. - - + + + + Enumerates the elements of a . + + + + + Initializes a new instance of the class + with the specified . + + The collection that should be enumerated. + + Advances the enumerator to the next element of the collection. @@ -155,177 +155,177 @@ to the next element; if the enumerator has passed the end of the collection. - - + + Sets the enumerator to its initial position, which is before the first element in the collection. - - + + Gets the current element in the collection. The current element in the collection. - - + + The built-in formatter types. - - + + A plaintext formatter. - - + + An XML formatter. - - + + Represents the FormatterElement of the NUnit task. - - + + Type of formatter. - - + + Extension to append to the output filename. - - + + Determines whether output should be persisted to a file. The default is . - - - - Specifies the directory where the output file should be written to, - if is . If not - specified, the output file will be written to the directory where - the test module is located. - - - - - Gets the underlying for the element. - - - - - Contains a strongly typed collection of objects. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with the specified instance. - - - - - Initializes a new instance of the class - with the specified array of instances. - - - - - Adds a to the end of the collection. - - The to be added to the end of the collection. - The position into which the new element was inserted. - - - - Adds the elements of a array to the end of the collection. - - The array of elements to be added to the end of the collection. - - - - Adds the elements of a to the end of the collection. - - The to be added to the end of the collection. - - - - Determines whether a is in the collection. - - The to locate in the collection. - - if is found in the - collection; otherwise, . - - - + + + + Specifies the directory where the output file should be written to, + if is . If not + specified, the output file will be written to the directory where + the test module is located. + + + + + Gets the underlying for the element. + + + + + Contains a strongly typed collection of objects. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with the specified instance. + + + + + Initializes a new instance of the class + with the specified array of instances. + + + + + Adds a to the end of the collection. + + The to be added to the end of the collection. + The position into which the new element was inserted. + + + + Adds the elements of a array to the end of the collection. + + The array of elements to be added to the end of the collection. + + + + Adds the elements of a to the end of the collection. + + The to be added to the end of the collection. + + + + Determines whether a is in the collection. + + The to locate in the collection. + + if is found in the + collection; otherwise, . + + + Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. The zero-based index in at which copying begins. - - - - Retrieves the index of a specified object in the collection. - - The object for which the index is returned. - - The index of the specified . If the is not currently a member of the collection, it returns -1. - - - - - Inserts a into the collection at the specified index. - - The zero-based index at which should be inserted. - The to insert. - - - - Returns an enumerator that can iterate through the collection. - - - A for the entire collection. - - - - - Removes a member from the collection. - - The to remove from the collection. - - + + + + Retrieves the index of a specified object in the collection. + + The object for which the index is returned. + + The index of the specified . If the is not currently a member of the collection, it returns -1. + + + + + Inserts a into the collection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + + + Returns an enumerator that can iterate through the collection. + + + A for the entire collection. + + + + + Removes a member from the collection. + + The to remove from the collection. + + Gets or sets the element at the specified index. The zero-based index of the element to get or set. - - - - Enumerates the elements of a . - - - - - Initializes a new instance of the class - with the specified . - - The collection that should be enumerated. - - + + + + Enumerates the elements of a . + + + + + Initializes a new instance of the class + with the specified . + + The collection that should be enumerated. + + Advances the enumerator to the next element of the collection. @@ -334,20 +334,20 @@ to the next element; if the enumerator has passed the end of the collection. - - + + Sets the enumerator to its initial position, which is before the first element in the collection. - - + + Gets the current element in the collection. The current element in the collection. - - - + + + diff --git a/tools/nant/NAnt.NUnit1Tasks.xml b/tools/nant/NAnt.NUnit1Tasks.xml index 1dc317da1bb..85367f347f7 100644 --- a/tools/nant/NAnt.NUnit1Tasks.xml +++ b/tools/nant/NAnt.NUnit1Tasks.xml @@ -1,132 +1,132 @@ - - - - NAnt.NUnit1Tasks - - - + + + + NAnt.NUnit1Tasks + + + The whole test suite started. - - + + The whole test suite ended. - - - - Sets the the formatter is supposed to write - its results to. - - - - - Contains a strongly typed collection of objects. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with the specified instance. - - - - - Initializes a new instance of the class - with the specified array of instances. - - - - - Adds a to the end of the collection. - - The to be added to the end of the collection. - The position into which the new element was inserted. - - - - Adds the elements of a array to the end of the collection. - - The array of elements to be added to the end of the collection. - - - - Adds the elements of a to the end of the collection. - - The to be added to the end of the collection. - - - - Determines whether a is in the collection. - - The to locate in the collection. - - if is found in the - collection; otherwise, . - - - + + + + Sets the the formatter is supposed to write + its results to. + + + + + Contains a strongly typed collection of objects. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with the specified instance. + + + + + Initializes a new instance of the class + with the specified array of instances. + + + + + Adds a to the end of the collection. + + The to be added to the end of the collection. + The position into which the new element was inserted. + + + + Adds the elements of a array to the end of the collection. + + The array of elements to be added to the end of the collection. + + + + Adds the elements of a to the end of the collection. + + The to be added to the end of the collection. + + + + Determines whether a is in the collection. + + The to locate in the collection. + + if is found in the + collection; otherwise, . + + + Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. The zero-based index in at which copying begins. - - - - Retrieves the index of a specified object in the collection. - - The object for which the index is returned. - - The index of the specified . If the is not currently a member of the collection, it returns -1. - - - - - Inserts a into the collection at the specified index. - - The zero-based index at which should be inserted. - The to insert. - - - - Returns an enumerator that can iterate through the collection. - - - A for the entire collection. - - - - - Removes a member from the collection. - - The to remove from the collection. - - + + + + Retrieves the index of a specified object in the collection. + + The object for which the index is returned. + + The index of the specified . If the is not currently a member of the collection, it returns -1. + + + + + Inserts a into the collection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + + + Returns an enumerator that can iterate through the collection. + + + A for the entire collection. + + + + + Removes a member from the collection. + + The to remove from the collection. + + Gets or sets the element at the specified index. The zero-based index of the element to get or set. - - - - Enumerates the elements of a . - - - - - Initializes a new instance of the class - with the specified . - - The collection that should be enumerated. - - + + + + Enumerates the elements of a . + + + + + Initializes a new instance of the class + with the specified . + + The collection that should be enumerated. + + Advances the enumerator to the next element of the collection. @@ -135,78 +135,78 @@ to the next element; if the enumerator has passed the end of the collection. - - + + Sets the enumerator to its initial position, which is before the first element in the collection. - - + + Gets the current element in the collection. The current element in the collection. - - + + Prints information about running tests directly to the build log. - - + + Not used, all output goes to Log class. - - + + Called when the whole test suite has started. - - + + Called when the whole test suite has ended. - - - Convert a stack trace line into something that can be clicked on in an IDE output window. - The StackTrace string, see . - The string that gets appended to the end of file(line): portion. - - - - Runs tests using the NUnit V1.0 framework. - - - - See the NUnit home page for more - information. - - - The or - attributes are only used to stop more than one test suite to stop - running. If any test suite fails a build error will be thrown. - Set to to - ignore test errors and continue build. - - - - - Run tests in the MyProject.Tests.dll assembly. - - - The test results are logged in results.xml and results.txt - using the and - formatters, respectively. - - - - - - - - ]]> - - - - + + + Convert a stack trace line into something that can be clicked on in an IDE output window. + The StackTrace string, see . + The string that gets appended to the end of file(line): portion. + + + + Runs tests using the NUnit V1.0 framework. + + + + See the NUnit home page for more + information. + + + The or + attributes are only used to stop more than one test suite to stop + running. If any test suite fails a build error will be thrown. + Set to to + ignore test errors and continue build. + + + + + Run tests in the MyProject.Tests.dll assembly. + + + The test results are logged in results.xml and results.txt + using the and + formatters, respectively. + + + + + + + + ]]> + + + + Stops running tests when a test causes an error. The default is . @@ -214,183 +214,183 @@ Implies haltonfailure. - - + + Stops running tests if a test fails (errors are considered failures as well). The default is . - - + + Cancel the individual tests if they do not finish in the specified time (measured in milliseconds). Ignored if fork is disabled. - - + + Tests to run. - - + + Formatters to output results of unit tests. - - - - Represents a test element of an . - - - + + + + Represents a test element of an . + + + Base name of the test result. The full filename is determined by this attribute and the extension of formatter. - - + + Directory to write the reports to. - - + + Class name of the test. - - + + Assembly to load the test from. - - - - Run the tests in a separate . - - - + + + + Run the tests in a separate . + + + Stop the build process if an error occurs during the test run. - - + + Stop the build process if a test fails (errors are considered failures as well). - - + + The application configuration file to use for the NUnit test domain. - - - - Contains a strongly typed collection of objects. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with the specified instance. - - - - - Initializes a new instance of the class - with the specified array of instances. - - - - - Adds a to the end of the collection. - - The to be added to the end of the collection. - The position into which the new element was inserted. - - - - Adds the elements of a array to the end of the collection. - - The array of elements to be added to the end of the collection. - - - - Adds the elements of a to the end of the collection. - - The to be added to the end of the collection. - - - - Determines whether a is in the collection. - - The to locate in the collection. - - if is found in the - collection; otherwise, . - - - + + + + Contains a strongly typed collection of objects. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with the specified instance. + + + + + Initializes a new instance of the class + with the specified array of instances. + + + + + Adds a to the end of the collection. + + The to be added to the end of the collection. + The position into which the new element was inserted. + + + + Adds the elements of a array to the end of the collection. + + The array of elements to be added to the end of the collection. + + + + Adds the elements of a to the end of the collection. + + The to be added to the end of the collection. + + + + Determines whether a is in the collection. + + The to locate in the collection. + + if is found in the + collection; otherwise, . + + + Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. The zero-based index in at which copying begins. - - - - Retrieves the index of a specified object in the collection. - - The object for which the index is returned. - - The index of the specified . If the is not currently a member of the collection, it returns -1. - - - - - Inserts a into the collection at the specified index. - - The zero-based index at which should be inserted. - The to insert. - - - - Returns an enumerator that can iterate through the collection. - - - A for the entire collection. - - - - - Removes a member from the collection. - - The to remove from the collection. - - + + + + Retrieves the index of a specified object in the collection. + + The object for which the index is returned. + + The index of the specified . If the is not currently a member of the collection, it returns -1. + + + + + Inserts a into the collection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + + + Returns an enumerator that can iterate through the collection. + + + A for the entire collection. + + + + + Removes a member from the collection. + + The to remove from the collection. + + Gets or sets the element at the specified index. The zero-based index of the element to get or set. - - - - Enumerates the elements of a . - - - - - Initializes a new instance of the class - with the specified . - - The collection that should be enumerated. - - + + + + Enumerates the elements of a . + + + + + Initializes a new instance of the class + with the specified . + + The collection that should be enumerated. + + Advances the enumerator to the next element of the collection. @@ -399,27 +399,27 @@ to the next element; if the enumerator has passed the end of the collection. - - + + Sets the enumerator to its initial position, which is before the first element in the collection. - - + + Gets the current element in the collection. The current element in the collection. - - + + Carries data specified through the test element. - - + + Determines if the unit test needs running. @@ -433,23 +433,23 @@ of the test assembly and the test results log. - - + + Runs a Suite extracted from a TestCase subclass. - - + + Creates the formatters to be used when running this test. - - + + Returns the output file or null if does not use a file. - - + + Returns the test suite from a given class. @@ -457,82 +457,82 @@ The assemblyQualifiedName parameter needs to be in form: "full.qualified.class.name,Assembly" - - + + Gets the collection of registered formatters. Collection of registered formatters. - - + + Gets the result of the test. The result of the test. - - + + Prints information about running tests in plain text. - - + + Sets the Writer the formatter is supposed to write its results to. - - + + Called when the whole test suite has started. - - + + Called when the whole test suite has ended. - - - Convert a stack trace line into something that can be clicked on in an IDE output window. - The StackTrace string, see . - The string that gets appended to the end of file(line): portion. - - - - Decorates NUnits with extra information such as - run-time. - - - - - Initializes a new instance of the - class. - - - + + + Convert a stack trace line into something that can be clicked on in an IDE output window. + The StackTrace string, see . + The string that gets appended to the end of file(line): portion. + + + + Decorates NUnits with extra information such as + run-time. + + + + + Initializes a new instance of the + class. + + + Gets or sets the total run-time of a test. The total run-time of a test. - - + + Prints detailed information about running tests in XML format. - - - - Initializes a new instance of the - class. - - - - - Sets the the formatter is supposed to - write its results to. - - - + + + + Initializes a new instance of the + class. + + + + + Sets the the formatter is supposed to + write its results to. + + + Called when the whole test suite has started. - - + + Called when the whole test suite has ended. - - - + + + diff --git a/tools/nant/NAnt.NUnit2Tasks.xml b/tools/nant/NAnt.NUnit2Tasks.xml index 7cfb91de25e..39d1ed50fe5 100644 --- a/tools/nant/NAnt.NUnit2Tasks.xml +++ b/tools/nant/NAnt.NUnit2Tasks.xml @@ -1,204 +1,204 @@ - - - - NAnt.NUnit2Tasks - - - - - Controls the categories of tests to execute using the . - - - - Only include test cases and fixtures that require no internet access. - - - - - - ]]> - - - - - Exclude test cases and fixtures that are known to fail. - - - - - - ]]> - - - - + + + + NAnt.NUnit2Tasks + + + + + Controls the categories of tests to execute using the . + + + + Only include test cases and fixtures that require no internet access. + + + + + + ]]> + + + + + Exclude test cases and fixtures that are known to fail. + + + + + + ]]> + + + + Specifies a list of categories to include. - - + + Specifies a list of categories to exclude. - - + + Represents a certain group of test cases or fixtures. - - + + A name of a category, or comma-separated list of names. - - + + If then the category will be processed; otherwise, skipped. The default is . - - + + If then the category will be skipped; otherwise, processed. The default is . - - - - Contains a collection of elements. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with the specified instance. - - - - - Initializes a new instance of the class - with the specified array of instances. - - - - - Returns a comma-delimited list of categories. - - - A comma-delimited list of categories, or an empty - if there are no categories. - - - - - Adds a to the end of the collection. - - The to be added to the end of the collection. - The position into which the new element was inserted. - - - - Adds the elements of a array to the end of the collection. - - The array of elements to be added to the end of the collection. - - - - Adds the elements of a to the end of the collection. - - The to be added to the end of the collection. - - - - Determines whether a is in the collection. - - The to locate in the collection. - - if is found in the - collection; otherwise, . - - - - - Determines whether a with the specified - value is in the collection. - - The argument value to locate in the collection. - - if a with value - is found in the collection; otherwise, - . - - - + + + + Contains a collection of elements. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with the specified instance. + + + + + Initializes a new instance of the class + with the specified array of instances. + + + + + Returns a comma-delimited list of categories. + + + A comma-delimited list of categories, or an empty + if there are no categories. + + + + + Adds a to the end of the collection. + + The to be added to the end of the collection. + The position into which the new element was inserted. + + + + Adds the elements of a array to the end of the collection. + + The array of elements to be added to the end of the collection. + + + + Adds the elements of a to the end of the collection. + + The to be added to the end of the collection. + + + + Determines whether a is in the collection. + + The to locate in the collection. + + if is found in the + collection; otherwise, . + + + + + Determines whether a with the specified + value is in the collection. + + The argument value to locate in the collection. + + if a with value + is found in the collection; otherwise, + . + + + Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. The zero-based index in at which copying begins. - - - - Retrieves the index of a specified object in the collection. - - The object for which the index is returned. - - The index of the specified . If the is not currently a member of the collection, it returns -1. - - - - - Inserts a into the collection at the specified index. - - The zero-based index at which should be inserted. - The to insert. - - - - Returns an enumerator that can iterate through the collection. - - - A for the entire collection. - - - - - Removes a member from the collection. - - The to remove from the collection. - - + + + + Retrieves the index of a specified object in the collection. + + The object for which the index is returned. + + The index of the specified . If the is not currently a member of the collection, it returns -1. + + + + + Inserts a into the collection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + + + Returns an enumerator that can iterate through the collection. + + + A for the entire collection. + + + + + Removes a member from the collection. + + The to remove from the collection. + + Gets or sets the element at the specified index. The zero-based index of the element to get or set. - - - - Gets the with the specified name. - - The name of the to get. - - - - Enumerates the elements of a . - - - - - Initializes a new instance of the class - with the specified . - - The collection that should be enumerated. - - + + + + Gets the with the specified name. + + The name of the to get. + + + + Enumerates the elements of a . + + + + + Initializes a new instance of the class + with the specified . + + The collection that should be enumerated. + + Advances the enumerator to the next element of the collection. @@ -207,128 +207,128 @@ to the next element; if the enumerator has passed the end of the collection. - - + + Sets the enumerator to its initial position, which is before the first element in the collection. - - + + Gets the current element in the collection. The current element in the collection. - - - - Contains a strongly typed collection of objects. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with the specified instance. - - - - - Initializes a new instance of the class - with the specified array of instances. - - - - - Adds a to the end of the collection. - - The to be added to the end of the collection. - The position into which the new element was inserted. - - - - Adds the elements of a array to the end of the collection. - - The array of elements to be added to the end of the collection. - - - - Adds the elements of a to the end of the collection. - - The to be added to the end of the collection. - - - - Determines whether a is in the collection. - - The to locate in the collection. - - if is found in the - collection; otherwise, . - - - + + + + Contains a strongly typed collection of objects. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with the specified instance. + + + + + Initializes a new instance of the class + with the specified array of instances. + + + + + Adds a to the end of the collection. + + The to be added to the end of the collection. + The position into which the new element was inserted. + + + + Adds the elements of a array to the end of the collection. + + The array of elements to be added to the end of the collection. + + + + Adds the elements of a to the end of the collection. + + The to be added to the end of the collection. + + + + Determines whether a is in the collection. + + The to locate in the collection. + + if is found in the + collection; otherwise, . + + + Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. The zero-based index in at which copying begins. - - - - Retrieves the index of a specified object in the collection. - - The object for which the index is returned. - - The index of the specified . If the is not currently a member of the collection, it returns -1. - - - - - Inserts a into the collection at the specified index. - - The zero-based index at which should be inserted. - The to insert. - - - - Returns an enumerator that can iterate through the collection. - - - A for the entire collection. - - - - - Removes a member from the collection. - - The to remove from the collection. - - + + + + Retrieves the index of a specified object in the collection. + + The object for which the index is returned. + + The index of the specified . If the is not currently a member of the collection, it returns -1. + + + + + Inserts a into the collection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + + + Returns an enumerator that can iterate through the collection. + + + A for the entire collection. + + + + + Removes a member from the collection. + + The to remove from the collection. + + Gets or sets the element at the specified index. The zero-based index of the element to get or set. - - - - Enumerates the elements of a . - - - - - Initializes a new instance of the class - with the specified . - - The collection that should be enumerated. - - + + + + Enumerates the elements of a . + + + + + Initializes a new instance of the class + with the specified . + + The collection that should be enumerated. + + Advances the enumerator to the next element of the collection. @@ -337,191 +337,191 @@ to the next element; if the enumerator has passed the end of the collection. - - + + Sets the enumerator to its initial position, which is before the first element in the collection. - - + + Gets the current element in the collection. The current element in the collection. - - - - Runs tests using the NUnit V2.2 framework. - - - - The attribute is only useful when more - than one test suite is used, and you want to continue running other - test suites although a test failed. - - - Set to to - ignore any errors and continue the build. - - - In order to run a test assembly built with NUnit 2.0 or 2.1 using - , you must add the following node to your - test config file : - - - - ... - - - - - - - - - - ... - - ]]> - - - See the NUnit home page for more - information. - - - - - Run tests in the MyProject.Tests.dll assembly. - - - - - - - ]]> - - - - - Only run tests that are not known to fail in files listed in the tests.txt - file. - - - - - - - - - - - - - - - - - - ]]> - - - - + + + + Runs tests using the NUnit V2.2 framework. + + + + The attribute is only useful when more + than one test suite is used, and you want to continue running other + test suites although a test failed. + + + Set to to + ignore any errors and continue the build. + + + In order to run a test assembly built with NUnit 2.0 or 2.1 using + , you must add the following node to your + test config file : + + + + ... + + + + + + + + + + ... + + ]]> + + + See the NUnit home page for more + information. + + + + + Run tests in the MyProject.Tests.dll assembly. + + + + + + + ]]> + + + + + Only run tests that are not known to fail in files listed in the tests.txt + file. + + + + + + + + + + + + + + + + + + ]]> + + + + Runs the tests and sets up the formatters. - - + + Stop the test run if a test fails. The default is . - - + + Tests to run. - - + + Formatters to output results of unit tests. - - - - Represents a test element of an . - - - + + + + Represents a test element of an . + + + Name of the assembly to search for tests. - - + + Name of a specific testfixture to run. If not specified then all testfixtures are run. - - + + Assemblies to include in test. - - + + Assemblies to scan for missing assembly references. - - + + Categories of test cases to include or exclude. - - + + Build fails on failure. The default is . - - - - XSLT transform file to use when using the - formatter. - - - + + + + XSLT transform file to use when using the + formatter. + + + The application configuration file to use for the NUnit test domain. If not specified, NAnt will try to use a configuration name matching the file name of the assembly with extension ".config". - - + + Gets all assemblies specified for these tests. All assemblies specified for these tests. - - + + Custom TestDomain, similar to the one included with NUnit, in order to workaround some limitations in it. - - - - Initializes a new instance of the - class. - - - + + + + Initializes a new instance of the + class. + + + Runs a single testcase. @@ -531,54 +531,54 @@ The result of the test. - - + + Helper class called when an assembly resolve event is raised. - - - - Initializes an instanse of the - class. - - - - - Called back when the CLR cannot resolve a given assembly. - - The source of the event. - A that contains the event data. - - The nunit.framework we know to be in NAnts bin directory, if - that is the assembly that needs to be resolved; otherwise, - . - - - - - Occurs when an assembly is loaded. The loaded assembly is added - to the assembly cache. - - The source of the event. - An that contains the event data. - - + + + + Initializes an instanse of the + class. + + + + + Called back when the CLR cannot resolve a given assembly. + + The source of the event. + A that contains the event data. + + The nunit.framework we know to be in NAnts bin directory, if + that is the assembly that needs to be resolved; otherwise, + . + + + + + Occurs when an assembly is loaded. The loaded assembly is added + to the assembly cache. + + The source of the event. + An that contains the event data. + + Holds the list of directories that will be scanned for missing assembly references. - - + + Holds the list of assemblies that can be scanned for missing assembly references. - - + + Holds the loaded assemblies. - - - + + + diff --git a/tools/nant/NAnt.SourceControlTasks.xml b/tools/nant/NAnt.SourceControlTasks.xml index e01efa610ee..a12cc5f8157 100644 --- a/tools/nant/NAnt.SourceControlTasks.xml +++ b/tools/nant/NAnt.SourceControlTasks.xml @@ -1,64 +1,64 @@ - - - - NAnt.SourceControlTasks - - - + + + + NAnt.SourceControlTasks + + + A base class for creating tasks for executing CVS client commands on a CVS repository. - - + + A base class for creating tasks for executing CVS client commands on a CVS repository. - - + + Name of the environmental variable specifying a users' home in a *nix environment. - - + + Used on windows to specify the location of application data. - - + + The environment variable that holds path information. - - + + The environment variable that holds the location of the .cvspass file. - - + + Property name used to specify the source control executable. This is used as a readonly property. - - - - Initializes a new instance of the - class. - - - + + + + Initializes a new instance of the + class. + + + Build up the command line arguments, determine which executable is being used and find the path to that executable and set the working directory. The process to prepare. - - + + Adds a new global option if none exists. If one does exist then the use switch is toggled on or of. @@ -68,8 +68,8 @@ of the option. true if the option should be appended to the commandline, otherwise false. - - + + Adds a new command option if none exists. If one does exist then the use switch is toggled on or of. @@ -79,52 +79,52 @@ of the option. true if the option should be appended to the commandline, otherwise false. - - + + Set up the environment variables for a process. A process to setup. - - + + Append the files specified in the fileset to the command line argument. Files are changed to use a relative path from the working directory that the task is spawned in. - - + + Derive the location of the version control system from the environment variable PATH. The file information of the version control system, or null if this cannot be found. - - + + The name of the passfile, overriden for each version control system (VCS). - - + + The path to the specific home directory of the version control system, this can be where the binary files are kept, or other app information. - - + + The environment variable that defines where the version control system (VCS) home variable is kept. - - + + The name of the version control system (VCS) executable file. - - + + The root variable contains information on how to locate a repository. @@ -138,8 +138,8 @@ - - + + Destination directory for the local sandbox. If destination is not specified then the current directory is used. @@ -152,34 +152,34 @@ Root path of the local sandbox. - - + + The password for logging in to the repository. The password for logging in to the repository. - - + + The full path to the cached password file. If not specified then the environment variables are used to try and locate the file. - - + + Holds a collection of globally available options. - - + + A collection of options that can be used to modify the default behavoir of the version control commands. See the sub-tasks for implementation specifics. - - + + Command-line arguments for the program. The command line arguments are used to specify any cvs command options that are not available as attributes. These are appended @@ -198,180 +198,180 @@ Produces the cvs command: c:\Program Files\TortoiseCVS\cvs.exe -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/nant -q checkout -n nant - - + + The name of the command that is going to be executed. - - + + Used to specify the version control system (VCS) files that are going to be acted on. - - + + The executable to use for ssh communication. - - + + The environment name for the ssh variable. - - + + The name of the version control system executable. - - + + Get the command line arguments for the task. - - + + Default value for the recursive directive. The default is . - - + + Default value for the quiet command. - - + + Default value for the really quiet command. - - + + An environment variable that holds path information about where cvs is located. - - + + Name of the password file that cvs stores pserver cvsroot/ password pairings. - - + + The default compression level to use for cvs commands. - - + + The default use of binaries, defaults to use sharpcvs. - - + + The name of the cvs executable. - - + + The temporary name of the sharpcvslib binary file, to avoid conflicts in the path variable. - - + + Environment variable that holds the executable name that is used for ssh communication. - - + + Property name used to specify on a project level whether sharpcvs is used or not. - - - - Initializes a new instance of the - class. - - - + + + + Initializes a new instance of the + class. + + + Build up the command line arguments, determine which executable is being used and find the path to that executable and set the working directory. The process to prepare. - - + + Override to append any commands before the modele and files. - - + + Append the command line options or commen names for the options to the generic options collection. This is then piped to the command line as a switch. - - + + Add the given argument to the command line options. Note that are not explicitly quoted are split into seperate arguments. This is to resolve a recent issue with quoting command line arguments. - - + + The environment name for the ssh variable. - - + + The name of the cvs binary, or cvs.exe at the time this was written. - - + + The name of the pass file, or .cvspass at the time of this writing. - - + + The name of the version control system specific home environment variable. - - + + Specify if the module is needed for this cvs command. It is only needed if there is no module information on the local file system. - - + + Used to specify the version control system (VCS) files that are going to be acted on. - - + + Get the cvs file set. - - + + The name of the cvs executable. - - + + The full path to the cvs binary used. The cvs tasks will attempt to "guess" the location of your cvs binary based on your path. If the @@ -383,8 +383,8 @@ On Windows: c:\vcs\cvs\cvs.exe On *nix: /usr/bin/cvs - - + + The cvs root variable has the following components: @@ -405,8 +405,8 @@ :pserver:anonymous@cvs.sourceforge.net:/cvsroot/nant - - + + The module to perform an operation on. @@ -418,8 +418,8 @@ In NAnt the module name would be: nant - - + + if the SharpCvsLib binaries that come bundled @@ -450,45 +450,45 @@ closes to the point of execution and would be used and is false. Therefore the sharpcvslib binary would NOT be used. - - + + The executable to use for ssh communication. - - + + Indicates if the output from the cvs command should be supressed. The default is . - - + + Indicates if the output from the cvs command should be stopped. The default is . - - + + if the sandbox files should be checked out in read only mode. The default is . - - + + if the sandbox files should be checked out in read/write mode. The default is . - - + + Compression level to use for all net traffic. This should be a value from 1-9.

NOTE: This is not available on sharpcvslib.
-
- + + Produces an XML report that represents the cvs changes from the given start day, to a given end date. @@ -508,65 +508,65 @@ ]]> - - + + The command being executed. - - + + Name of the xml file that will contain the cvs log information. - - + + The earliest change to use in the cvs log command. - - + + The latest date to use in the cvs log command. - - + + The cvs command to execute. - - + + Override use of sharpcvslib, needs to be true. - - - - - The cvs root variable has the following components: - - - [protocol]:[username]@[servername]:[server path] -
    -
  • protocol: ext, pserver, ssh (sharpcvslib); if you are not using sharpcvslib consult your cvs documentation.
  • -
  • username: [username]
  • -
  • servername: cvs.sourceforge.net
  • -
  • server path: /cvsroot/nant
  • -
-
- - If the cvsroot is not specified then the directory specified by the - attribute - is searched for CVS\Root. - -
- - NAnt anonymous cvsroot: - - :pserver:anonymous@cvs.sourceforge.net:/cvsroot/nant - - -
- + + + + + The cvs root variable has the following components: + + + [protocol]:[username]@[servername]:[server path] +
    +
  • protocol: ext, pserver, ssh (sharpcvslib); if you are not using sharpcvslib consult your cvs documentation.
  • +
  • username: [username]
  • +
  • servername: cvs.sourceforge.net
  • +
  • server path: /cvsroot/nant
  • +
+
+ + If the cvsroot is not specified then the directory specified by the + attribute + is searched for CVS\Root. + +
+ + NAnt anonymous cvsroot: + + :pserver:anonymous@cvs.sourceforge.net:/cvsroot/nant + + +
+ Checks out a CVS module to the required directory. @@ -617,53 +617,53 @@ ]]> - - + + The command being executed. - - - - Initializes a new instance of the class. - - - + + + + Initializes a new instance of the class. + + + Specify the revision to checkout. This corresponds to the "sticky-tag" of the file. - - + + Sticky tag or revision to checkout. - - + + Specify the revision date to checkout. The date specified is validated and then passed to the cvs binary in a standard format recognized by cvs. - - + + Specify a directory name to replace the module name. Valid names include any valid filename, excluding path information. - - + + Specify a directory name to replace the module name. Valid names include any valid filename, excluding path information. - - + + The name of the cvs command that is going to be executed. - - + + Executes the cvs login command which appends or updates an entry to the specified .cvspass file. @@ -678,13 +678,13 @@ ]]> - - - - Ensures all information is available to execute the . - - - + + + + Ensures all information is available to execute the . + + + Update the .cvspass file with the given password. If the passfile is not specified then the default search locations are used: @@ -696,29 +696,29 @@ cvsnt implementation. - - + + Password to append or update to the .cvspass file. - - + + The full path to the .cvspass file. The default is ~/.cvspass. - - + + The current working directory. - - + + The repository root string. - - + + Executes the cvs command specified by the command attribute. @@ -733,18 +733,18 @@ ]]> - - + + The cvs command to execute. - - + + Specify if the module is needed for this cvs command. - - + + Exports a cvs module in preperation for a release (i.e. the CVS version folders are not exported). @@ -785,40 +785,40 @@ ]]> - - + + The command being executed. - - - - Create a new instance of the . - - - The following values are set by default: -
    -
  • Recursive:
  • -
-
-
- + + + + Create a new instance of the . + + + The following values are set by default: +
    +
  • Recursive:
  • +
+
+
+ No shortening. Do not shorten module paths if -d specified. - - - - Indicates whether the head revision should be used if the revison specified by - or the tags are not - found. The default is . - - - if the specified tag should be moved; - otherwise, . The default is . - - - + + + + Indicates whether the head revision should be used if the revison specified by + or the tags are not + found. The default is . + + + if the specified tag should be moved; + otherwise, . The default is . + + + If a directory is specified indicates whether sub-directories should also be processed. @@ -827,14 +827,14 @@ if the sub-directories should be tagged; otherwise, . The default is . - - + + Specify the revision to update the file to. This corresponds to the "sticky-tag" of the file. - - + + Specify the revision date to update to. The version of the file that existed at the date specified is retrieved. @@ -843,19 +843,19 @@ A valid date time value, which is then converted to a format that cvs can parse. - - + + Specify a directory name to replace the module name. Valid names include any valid filename, excluding path information. - - + + The export command name for the cvs client. - - + + Tags all sources in the remote repository with a given tag. @@ -895,48 +895,48 @@ ]]> - - - - Initializes a new instance of the - class. - - - + + + + Initializes a new instance of the + class. + + + Append the tag information to the commandline. - - + + The name of the tag to assign or remove. The name of the tag to assign or remove. - - - - Indicates whether the tag specified in should - be removed or not. - - - if the specified tag should be removed; - otherwise, . The default is . - - - - - Indicates whether the tag specified in should - be moved to the current file revision. If the tag does not exist - then it is created. - - - if the specified tag should be moved; - otherwise, . The default is . - - - + + + + Indicates whether the tag specified in should + be removed or not. + + + if the specified tag should be removed; + otherwise, . The default is . + + + + + Indicates whether the tag specified in should + be moved to the current file revision. If the tag does not exist + then it is created. + + + if the specified tag should be moved; + otherwise, . The default is . + + + If a directory is specified indicates whether sub-directories should also be processed. @@ -945,19 +945,19 @@ if the sub-directories should be tagged; otherwise, . The default is . - - - - Indicates the repository that is acted on - for the tag command. Note if is - then the tag specified is moved to the revision - of the file on the HEAD of the branch specified. - - - The tag (or more likely) branch that should be used to apply the new tag. - - - + + + + Indicates the repository that is acted on + for the tag command. Note if is + then the tag specified is moved to the revision + of the file on the HEAD of the branch specified. + + + The tag (or more likely) branch that should be used to apply the new tag. + + + Indicates the revision date of the file that the tag should be applied to. @@ -966,109 +966,109 @@ A valid date which specifies the revision point that the tag will be applied to. - - - - Indicates whether the head revision should be used if the - or the tags are not - found. - - - if the specified tag should be moved; - otherwise, . The default is . - - - + + + + Indicates whether the head revision should be used if the + or the tags are not + found. + + + if the specified tag should be moved; + otherwise, . The default is . + + + The name of the cvs command that is going to be executed. - - - - Tags all local sources with the specified tag. - - - - This differs from the - in that it acts on references to the cvs files - contained in your local filesystem. As such the sticky tags and local - revisions can be considered in commits. It also allows you to verify that - all local files have been checked in before a tag is performed. - - - - Tag NAnt sources remotely. - - - ]]> - - - - Remove a tag from the remote repository. - - - ]]> - - - - + + + + Tags all local sources with the specified tag. + + + + This differs from the + in that it acts on references to the cvs files + contained in your local filesystem. As such the sticky tags and local + revisions can be considered in commits. It also allows you to verify that + all local files have been checked in before a tag is performed. + + + + Tag NAnt sources remotely. + + + ]]> + + + + Remove a tag from the remote repository. + + + ]]> + + + + Cvs command to be executed. - - - - Initializes a new instance of the - class. - - - + + + + Initializes a new instance of the + class. + + + Append the tag information to the commandline. - - + + The name of the tag to assign or remove. The name of the tag to assign or remove. - - - - Indicates whether the tag specified in should - be removed or not. - - - if the specified tag should be removed; - otherwise, . The default is . - - - - - Indicates whether the tag specified in should - be moved to the current file revision. If the tag does not exist - then it is created. - - - if the specified tag should be moved; - otherwise, . The default is . - - - + + + + Indicates whether the tag specified in should + be removed or not. + + + if the specified tag should be removed; + otherwise, . The default is . + + + + + Indicates whether the tag specified in should + be moved to the current file revision. If the tag does not exist + then it is created. + + + if the specified tag should be moved; + otherwise, . The default is . + + + If a directory is specified indicates whether sub-directories should also be processed. @@ -1077,19 +1077,19 @@ if the sub-directories should be tagged; otherwise, . The default is . - - - - Indicates the repository that is acted on - for the tag command. Note if is - then the tag specified is moved to the revision - of the file on the HEAD of the branch specified. - - - The tag (or more likely) branch that should be used to apply the new tag. - - - + + + + Indicates the repository that is acted on + for the tag command. Note if is + then the tag specified is moved to the revision + of the file on the HEAD of the branch specified. + + + The tag (or more likely) branch that should be used to apply the new tag. + + + Indicates the revision date of the file that the tag should be applied to. @@ -1098,47 +1098,47 @@ A valid date which specifies the revision point that the tag will be applied to. - - - - Indicates whether the head revision should be used if the revision specified by - or the tags are not - found. - - - if the specified tag should be moved; - otherwise, . The default is . - - - - - Indicates whether the head revision should be used if the - or the tags are not - found. - - - if the specified tag should be moved; - otherwise, . The default is . - - - + + + + Indicates whether the head revision should be used if the revision specified by + or the tags are not + found. + + + if the specified tag should be moved; + otherwise, . The default is . + + + + + Indicates whether the head revision should be used if the + or the tags are not + found. + + + if the specified tag should be moved; + otherwise, . The default is . + + + The name of the cvs command that is going to be executed. - - + + Not used - - + + Specify if the module is needed for this cvs command. It is only needed if there is no module information on the local file system. - - + + Updates a CVS module in a local working directory. @@ -1175,43 +1175,43 @@ ]]> - - + + The command being executed. - - - - Initializes a new instance of the - class. - - - Sets the build directory and prune empty directory properties to - . - - - + + + + Initializes a new instance of the + class. + + + Sets the build directory and prune empty directory properties to + . + + + If . new directories will be created on the local sandbox. The default is . - - + + If empty directories copied down from the remote repository will be removed from the local sandbox. The default is . - - + + If the local copy of the file will be overwritten with the copy from the remote repository. The default is . - - + + Specifies if the command should be executed recursively. The default is . @@ -1219,22 +1219,22 @@ The -R option is on by default in cvs. - - + + Specify the revision to update the file to. This corresponds to the "sticky-tag" of the file. - - + + Sticky tag or revision to update the local file to. A valid cvs tag. - - + + Specify the revision date to update to. The version of the file that existed at the date specified is retrieved. @@ -1243,37 +1243,37 @@ A valid date time value, which is then converted to a format that cvs can parse. - - + + Specify if the module is needed for this cvs command. It is only needed if there is no module information on the local file system. - - + + The name of the cvs command that is going to be executed. - - - - A is a with extra - attributes useful in the context of the . - - - - - Initialize the object and locate the .cvsignore - files to add to the exclude list. - - - + + + + A is a with extra + attributes useful in the context of the . + + + + + Initialize the object and locate the .cvsignore + files to add to the exclude list. + + + Indicates whether the entires in the .cvsignore should be used to limit the file list; to exclude files in .cvsignore, otherwise . The default is . - - - + + + diff --git a/tools/nant/NAnt.VSNetTasks.xml b/tools/nant/NAnt.VSNetTasks.xml index c36de5e2a58..eb1e0bddb80 100644 --- a/tools/nant/NAnt.VSNetTasks.xml +++ b/tools/nant/NAnt.VSNetTasks.xml @@ -1,25 +1,25 @@ - - - - NAnt.VSNetTasks - - - + + + + NAnt.VSNetTasks + + + Analyses Microsoft Visual Studio .NET 2003 (Everett) solution files. - - - - Gets the project file of the project with the given unique identifier. - - The unique identifier of the project for which the project file should be retrieves. - - The project file of the project with the given unique identifier. - - No project with unique identifier could be located. - - + + + + Gets the project file of the project with the given unique identifier. + + The unique identifier of the project for which the project file should be retrieves. + + The project file of the project with the given unique identifier. + + No project with unique identifier could be located. + + Logs a message with the given priority. @@ -28,29 +28,29 @@ The actual logging is delegated to the underlying task. - - - - Logs a message with the given priority. - - The message priority at which the specified message is to be logged. - The message to log, containing zero or more format items. - An array containing zero or more objects to format. - - The actual logging is delegated to the underlying task. - - - - - Loads the projects from the file system and stores them in an - instance variable. - - instance to use to determine whether an assembly is located in the Global Assembly Cache. - instance to use to determine location and references of assemblies. - TODO - A project GUID in the solution file does not match the actual GUID of the project in the project file. - - + + + + Logs a message with the given priority. + + The message priority at which the specified message is to be logged. + The message to log, containing zero or more format items. + An array containing zero or more objects to format. + + The actual logging is delegated to the underlying task. + + + + + Loads the projects from the file system and stores them in an + instance variable. + + instance to use to determine whether an assembly is located in the Global Assembly Cache. + instance to use to determine location and references of assemblies. + TODO + A project GUID in the solution file does not match the actual GUID of the project in the project file. + + Translates a project path, in the form of a relative file path or a URL, to an absolute file path. @@ -60,30 +60,30 @@ The project path translated to an absolute file path. - - - - Converts assembly references to projects to project references, adding - a build dependency.c - - The to analyze. - The solution configuration that is built. - containing list of projects that have been built. - containing list of projects that failed to build. - - - - Determines whether any of the project dependencies of the specified - project still needs to be built. - - The to analyze. - containing list of projects that have been built. - - if one of the project dependencies has not - yet been built; otherwise, . - - - + + + + Converts assembly references to projects to project references, adding + a build dependency.c + + The to analyze. + The solution configuration that is built. + containing list of projects that have been built. + containing list of projects that failed to build. + + + + Determines whether any of the project dependencies of the specified + project still needs to be built. + + The to analyze. + containing list of projects that have been built. + + if one of the project dependencies has not + yet been built; otherwise, . + + + Returns a number representing how much this file fits this project type. @@ -93,175 +93,175 @@ This enables the override in other providers. Do not return big numbers, mainly when compring only on filename. - - + + Analyses Microsoft Visual Studio .NET 2002 (Rainier) solution files. - - - - Compiles VS.NET solutions (or sets of projects), automatically determining - project dependencies from inter-project references. - - - - This task support the following projects: - - - - Visual Basic .NET - - - Visual C# .NET - - - Visual J# .NET - - - Visual C++ .NET - - - - Right now, only Microsoft Visual Studio .NET 2002 and 2003 solutions - and projects are supported. Support for .NET Compact Framework projects - is also not available at this time. - - - The also supports the model of referencing - projects by their output filenames, rather than referencing them inside - the solution. It will automatically detect the existance of a file - reference and convert it to a project reference. For example, if project - "A" references the file in the release output directory of - project "B", the will automatically - convert this to a project dependency on project "B" and will - reference the appropriate configuration output directory at the final - build time (ie: reference the debug version of "B" if the - solution is built as debug). - - - The expects all project files to be valid - XML files. - -

Resx Files

- - When building a project for a down-level target framework, special care - should be given to resx files. Resx files (can) contain references to - a specific version of CLR types, and as such are only upward compatible. - - - For example: if you want to be able to build a project both as a .NET 1.0 - and .NET 1.1 assembly, the resx files should only contain references to - .NET 1.0 CLR types. Failure to do this may result in a - failure at runtime on machines with only the .NET Framework 1.0 installed. - -
- - - Compiles all of the projects in test.sln, in release mode, in - the proper order. - - - - ]]> - - - - - Compiles all of the projects in projects.txt, in the proper - order. - - - - - - - - ]]> - - - - - Compiles projects A, B and C, using the output of project X as a - reference. - - - - - - - - - - - - - ]]> - - - - - Compiles all of the projects in the solution except for project A. - - - - - - - - ]]> - - - - - Compiles all of the projects in the solution mapping the specific project at - http://localhost/A/A.csproj to c:\inetpub\wwwroot\A\A.csproj and any URLs under - http://localhost/B/[remainder] to c:\other\B\[remainder]. This allows the build - to work without WebDAV. - - - - - - - - - ]]> - - - - - Compiles all of the projects in the solution placing compiled outputs - in c:\temp. - - - ]]> - - -
- - - Initializes a new instance of the class. - - - - - Expands the given macro. - - The macro to expand. - - The expanded macro or if the macro is not - supported. - - The macro cannot be expanded. - - + + + + Compiles VS.NET solutions (or sets of projects), automatically determining + project dependencies from inter-project references. + + + + This task support the following projects: + + + + Visual Basic .NET + + + Visual C# .NET + + + Visual J# .NET + + + Visual C++ .NET + + + + Right now, only Microsoft Visual Studio .NET 2002 and 2003 solutions + and projects are supported. Support for .NET Compact Framework projects + is also not available at this time. + + + The also supports the model of referencing + projects by their output filenames, rather than referencing them inside + the solution. It will automatically detect the existance of a file + reference and convert it to a project reference. For example, if project + "A" references the file in the release output directory of + project "B", the will automatically + convert this to a project dependency on project "B" and will + reference the appropriate configuration output directory at the final + build time (ie: reference the debug version of "B" if the + solution is built as debug). + + + The expects all project files to be valid + XML files. + +

Resx Files

+ + When building a project for a down-level target framework, special care + should be given to resx files. Resx files (can) contain references to + a specific version of CLR types, and as such are only upward compatible. + + + For example: if you want to be able to build a project both as a .NET 1.0 + and .NET 1.1 assembly, the resx files should only contain references to + .NET 1.0 CLR types. Failure to do this may result in a + failure at runtime on machines with only the .NET Framework 1.0 installed. + +
+ + + Compiles all of the projects in test.sln, in release mode, in + the proper order. + + + + ]]> + + + + + Compiles all of the projects in projects.txt, in the proper + order. + + + + + + + + ]]> + + + + + Compiles projects A, B and C, using the output of project X as a + reference. + + + + + + + + + + + + + ]]> + + + + + Compiles all of the projects in the solution except for project A. + + + + + + + + ]]> + + + + + Compiles all of the projects in the solution mapping the specific project at + http://localhost/A/A.csproj to c:\inetpub\wwwroot\A\A.csproj and any URLs under + http://localhost/B/[remainder] to c:\other\B\[remainder]. This allows the build + to work without WebDAV. + + + + + + + + + ]]> + + + + + Compiles all of the projects in the solution placing compiled outputs + in c:\temp. + + + ]]> + + +
+ + + Initializes a new instance of the class. + + + + + Expands the given macro. + + The macro to expand. + + The expanded macro or if the macro is not + supported. + + The macro cannot be expanded. + + Builds the list of folders that should be scanned for assembly references. @@ -269,13 +269,13 @@ The list of folders that should be scanned for assembly references. - - + + The projects to build. - - + + The projects to scan, but not build. @@ -285,19 +285,19 @@ these project's output files are converted to use the appropriate solution configuration at build time. - - - - The name of the VS.NET solution file to build. - - - - The can be used instead to supply a list - of Visual Studio.NET projects that should be built. - - - - + + + + The name of the VS.NET solution file to build. + + + + The can be used instead to supply a list + of Visual Studio.NET projects that should be built. + + + + The name of the solution configuration to build. @@ -306,105 +306,105 @@ Generally release or debug. Not case-sensitive. - - + + The name of platform to build the solution for. - - + + Gets the solution configuration to build. - - + + The directory where compiled targets will be placed. This overrides path settings contained in the solution/project. - - + + WebMap of URL's to project references. - - + + Fileset of projects to exclude. - - + + Set of folders where references are searched when not found in path from project file (HintPath). - - + + Includes Visual Studio search folders in reference search path. The default is . - - - - Allow the task to use WebDAV for retrieving/compiling the projects within solution. Use of - is preferred over WebDAV. The default is . - - - WebDAV support requires permission changes to be made on your project server. These changes may affect - the security of the server and should not be applied to a public installation. - Consult your web server or the NAnt Wiki documentation for more information. - - - + + + + Allow the task to use WebDAV for retrieving/compiling the projects within solution. Use of + is preferred over WebDAV. The default is . + + + WebDAV support requires permission changes to be made on your project server. These changes may affect + the security of the server and should not be applied to a public installation. + Consult your web server or the NAnt Wiki documentation for more information. + + + Gets the list of folders to scan for assembly references. The list of folders to scan for assembly references. - - + + Defines how the project is using the ATL library. - - + + Don't use ATL. - - + + Use ATL in a Static Library. - - + + Use ATL in a Shared DLL. - - + + Defines how the project is using the MFC library. - - + + Don't use MFC. - - + + Use MFC in a Static Library. - - + + Use MFC in a Shared DLL. - - + + Indicates the possible ways in which precompiled header file use is specified in a Visual C++ project. @@ -413,13 +413,13 @@ The integer values assigned match those specified in the Visual C++ project file for each setting. > - - + + Precompiled header file use not specified. - - + + Don't use a precompiled header file. @@ -427,8 +427,8 @@ For further information on the use of this option see the Microsoft documentation on the C++ compiler flag /Yc. - - + + Create precompiled header file. @@ -436,8 +436,8 @@ For further information on the use of this option see the Microsoft documentation on the C++ compiler flag /Yc. - - + + Automatically create precompiled header file if necessary. @@ -445,8 +445,8 @@ For further information on the use of this option see the Microsoft documentation on the C++ compiler flag /Yc. - - + + Use a precompiled header file. @@ -454,22 +454,22 @@ For further information on the use of this option see the Microsoft documentation on the C++ compiler flag /Yu. - - + + Represents a single mapping from URL project path to physical project path. - - + + Specifies the URL of the project file, or a URL fragment to match. The URL of the project file or the URL fragment to match. - - + + Specifies the actual path to the project file, or the path fragment to replace. @@ -478,16 +478,16 @@ The actual path to the project file or the path fragment to replace the URL fragment with. - - + + Specifies whether the mapping is case-sensitive or not. A boolean flag representing the case-sensitivity of the mapping. Default is . - - + + Indicates if the URL of the project file should be mapped. @@ -495,8 +495,8 @@ if the URL of the project file should be mapped; otherwise, . - - + + Indicates if the URL of the project file should not be mapped. @@ -504,139 +504,139 @@ if the URL of the project file should not be mapped; otherwise, . - - - - Contains a strongly typed collection of - objects. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with the specified instance. - - - - - Initializes a new instance of the class - with the specified array of instances. - - - - - Find the best matching for the given Uri. - - The value to match against the objects in the collection. - - - - Adds a to the end of the collection. - - The to be added to the end of the collection. - The position into which the new element was inserted. - - - - Adds the elements of a array to the end of the collection. - - The array of elements to be added to the end of the collection. - - - - Adds the elements of a to the end of the collection. - - The to be added to the end of the collection. - - - - Determines whether a is in the collection. - - The to locate in the collection. - - if is found in the - collection; otherwise, . - - - - - Determines whether a with the specified - value is in the collection. - - The argument value to locate in the collection. - - if a with value - is found in the collection; otherwise, - . - - - + + + + Contains a strongly typed collection of + objects. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with the specified instance. + + + + + Initializes a new instance of the class + with the specified array of instances. + + + + + Find the best matching for the given Uri. + + The value to match against the objects in the collection. + + + + Adds a to the end of the collection. + + The to be added to the end of the collection. + The position into which the new element was inserted. + + + + Adds the elements of a array to the end of the collection. + + The array of elements to be added to the end of the collection. + + + + Adds the elements of a to the end of the collection. + + The to be added to the end of the collection. + + + + Determines whether a is in the collection. + + The to locate in the collection. + + if is found in the + collection; otherwise, . + + + + + Determines whether a with the specified + value is in the collection. + + The argument value to locate in the collection. + + if a with value + is found in the collection; otherwise, + . + + + Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. The zero-based index in at which copying begins. - - - - Retrieves the index of a specified object in the collection. - - The object for which the index is returned. - - The index of the specified . If the is not currently a member of the collection, it returns -1. - - - - - Inserts a into the collection at the specified index. - - The zero-based index at which should be inserted. - The to insert. - - - - Returns an enumerator that can iterate through the collection. - - - A for the entire collection. - - - - - Removes a member from the collection. - - The to remove from the collection. - - + + + + Retrieves the index of a specified object in the collection. + + The object for which the index is returned. + + The index of the specified . If the is not currently a member of the collection, it returns -1. + + + + + Inserts a into the collection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + + + Returns an enumerator that can iterate through the collection. + + + A for the entire collection. + + + + + Removes a member from the collection. + + The to remove from the collection. + + Gets or sets the element at the specified index. The zero-based index of the element to get or set. - - - - Gets the with the specified value. - - The value of the to get. - - - - Enumerates the elements of a . - - - - - Initializes a new instance of the class - with the specified . - - The collection that should be enumerated. - - + + + + Gets the with the specified value. + + The value of the to get. + + + + Enumerates the elements of a . + + + + + Initializes a new instance of the class + with the specified . + + The collection that should be enumerated. + + Advances the enumerator to the next element of the collection. @@ -645,22 +645,22 @@ to the next element; if the enumerator has passed the end of the collection. - - + + Sets the enumerator to its initial position, which is before the first element in the collection. - - + + Gets the current element in the collection. The current element in the collection. - - + + Gets the output path of the reference, without taking the "copy local" setting into consideration. @@ -669,21 +669,21 @@ The full output path of the reference. - - - - Gets the complete set of output files of the reference for the - specified configuration. - - The solution configuration that is built. - The set of output files to be updated. - - The key of the case-insensitive is the - full path of the output file and the value is the path relative to - the output directory. - - - + + + + Gets the complete set of output files of the reference for the + specified configuration. + + The solution configuration that is built. + The set of output files to be updated. + + The key of the case-insensitive is the + full path of the output file and the value is the path relative to + the output directory. + + + Gets the complete set of assemblies that need to be referenced when a project references this component. @@ -693,8 +693,8 @@ The complete set of assemblies that need to be referenced when a project references this component. - - + + Gets the timestamp of the reference. @@ -702,8 +702,8 @@ The timestamp of the reference. - - + + Gets a value indicating whether the reference is managed for the specified configuration. @@ -713,20 +713,20 @@ if the reference is managed for the specified configuration; otherwise, . - - - - Returns the date and time the specified file was last written to. - - The file for which to obtain write date and time information. - - A structure set to the date and time that - the specified file was last written to, or - if the specified file does not - exist. - - - + + + + Returns the date and time the specified file was last written to. + + The file for which to obtain write date and time information. + + A structure set to the date and time that + the specified file was last written to, or + if the specified file does not + exist. + + + Logs a message with the given priority. @@ -735,19 +735,19 @@ The actual logging is delegated to the underlying task. - - - - Logs a message with the given priority. - - The message priority at which the specified message is to be logged. - The message to log, containing zero or more format items. - An array containing zero or more objects to format. - - The actual logging is delegated to the underlying task. - - - + + + + Logs a message with the given priority. + + The message priority at which the specified message is to be logged. + The message to log, containing zero or more format items. + An array containing zero or more objects to format. + + The actual logging is delegated to the underlying task. + + + Gets a value indicating whether the output file(s) of this reference should be copied locally. @@ -756,8 +756,8 @@ if the output file(s) of this reference should be copied locally; otherwise, . - - + + Gets a value indicating whether this reference represents a system assembly. @@ -766,13 +766,13 @@ if this reference represents a system assembly; otherwise, . - - + + Gets the project in which the reference is defined. - - + + Gets a value indicating whether the reference is managed for the specified configuration. @@ -781,21 +781,21 @@ . - - - - Gets the complete set of output files for the specified assembly - and adds them to collection. - - The path of the assembly to get the output files for. - The set of output files to be updated. - - The key of the case-insensitive is the - full path of the output file and the value is the path relative to - the output directory. - - - + + + + Gets the complete set of output files for the specified assembly + and adds them to collection. + + The path of the assembly to get the output files for. + The set of output files to be updated. + + The key of the case-insensitive is the + full path of the output file and the value is the path relative to + the output directory. + + + Gets the path of the reference, without taking the "copy local" setting into consideration. @@ -804,20 +804,20 @@ The output path of the reference. - - - - Gets the complete set of output files for the referenced project. - - The solution configuration that is built. - The set of output files to be updated. - - The key of the case-insensitive is the - full path of the output file and the value is the path relative to - the output directory. - - - + + + + Gets the complete set of output files for the referenced project. + + The solution configuration that is built. + The set of output files to be updated. + + The key of the case-insensitive is the + full path of the output file and the value is the path relative to + the output directory. + + + Gets the complete set of assemblies that need to be referenced when a project references this component. @@ -827,8 +827,8 @@ The complete set of assemblies that need to be referenced when a project references this component. - - + + Gets the timestamp of the reference. @@ -836,8 +836,8 @@ The timestamp of the reference. - - + + Resolves an assembly reference. @@ -845,8 +845,8 @@ The full path to the resolved assembly, or if the assembly reference could not be resolved. - - + + Searches for the given file in all paths in . @@ -856,8 +856,8 @@ The path of the assembly if was found in ; otherwise, . - - + + Resolves an assembly reference in the framework assembly directory of the target framework. @@ -867,19 +867,19 @@ The full path of the assembly file if the assembly could be located in the framework assembly directory; otherwise, . - - - - Resolves an assembly reference using a path relative to the project - directory. - - - The full path of the assembly, or if - is or an - empty . - - - + + + + Resolves an assembly reference using a path relative to the project + directory. + + + The full path of the assembly, or if + is or an + empty . + + + Gets a value indicating whether the output file(s) of this reference should be copied locally. @@ -888,8 +888,8 @@ if the output file(s) of this reference should be copied locally; otherwise, . - - + + Gets a value indicating whether this reference represents a system assembly. @@ -898,37 +898,37 @@ if this reference represents a system assembly; otherwise, . - - + + Base class for all project classes. - - - - Initializes a new instance of the class. - - - - - Gets the complete set of output files for the project configuration - matching the specified solution configuration. - - The solution configuration that is built. - The set of output files to be updated. - - - The key of the case-insensitive is the - full path of the output file and the value is the path relative to - the output directory. - - - If the project is not configured to be built for the specified - solution configuration, then no output files are added. - - - - + + + + Initializes a new instance of the class. + + + + + Gets the complete set of output files for the project configuration + matching the specified solution configuration. + + The solution configuration that is built. + The set of output files to be updated. + + + The key of the case-insensitive is the + full path of the output file and the value is the path relative to + the output directory. + + + If the project is not configured to be built for the specified + solution configuration, then no output files are added. + + + + Gets a value indicating whether building the project for the specified build configuration results in managed output. @@ -938,8 +938,8 @@ if the project output for the given build configuration is managed; otherwise, . - - + + Expands the given macro. @@ -948,36 +948,36 @@ The expanded macro or if the macro is not supported. - - - - Returns the Visual Studio product version of the specified project - XML fragment. - - XML fragment representing the project file. - - The Visual Studio product version of the specified project XML - file. - - - The product version could not be determined. - -or- - The product version is not supported. - - - - - Verifies whether the specified XML fragment represents a valid project - that is supported by this . - - XML fragment representing the project file. - - The XML fragment is not supported by this . - -or- - The XML fragment does not represent a valid project (for this ). - - - + + + + Returns the Visual Studio product version of the specified project + XML fragment. + + XML fragment representing the project file. + + The Visual Studio product version of the specified project XML + file. + + + The product version could not be determined. + -or- + The product version is not supported. + + + + + Verifies whether the specified XML fragment represents a valid project + that is supported by this . + + XML fragment representing the project file. + + The XML fragment is not supported by this . + -or- + The XML fragment does not represent a valid project (for this ). + + + Prepares the project for being built. @@ -986,17 +986,17 @@ The default implementation will ensure that none of the output files are marked read-only. - - - - Copies the specified file if the destination file does not exist, or - the source file has been modified since it was previously copied. - - The file to copy. - The destination file. - The in which context the operation will be performed. - - + + + + Copies the specified file if the destination file does not exist, or + the source file has been modified since it was previously copied. + + The file to copy. + The destination file. + The in which context the operation will be performed. + + Logs a message with the given priority. @@ -1005,81 +1005,81 @@ The actual logging is delegated to the underlying task. - - - - Logs a message with the given priority. - - The message priority at which the specified message is to be logged. - The message to log, containing zero or more format items. - An array containing zero or more objects to format. - - The actual logging is delegated to the underlying task. - - - + + + + Logs a message with the given priority. + + The message priority at which the specified message is to be logged. + The message to log, containing zero or more format items. + An array containing zero or more objects to format. + + The actual logging is delegated to the underlying task. + + + Gets the Visual Studio product version of the project. The Visual Studio product version of the project. - - + + Gets the name of the VS.NET project. - - + + Gets the type of the project. The type of the project. - - + + Gets the path of the VS.NET project. - - + + Gets the directory containing the VS.NET project. - - + + Get the location of the project. - - - - Get the directory in which intermediate build output that is not - specific to the build configuration will be stored. - - - - For projects, this is defined - as <Project Directory<\obj. - - - For projects, this is defined - as %HOMEPATH%\VSWebCache\<Machine Name>\<Project Directory>\obj. - - - - + + + + Get the directory in which intermediate build output that is not + specific to the build configuration will be stored. + + + + For projects, this is defined + as <Project Directory<\obj. + + + For projects, this is defined + as %HOMEPATH%\VSWebCache\<Machine Name>\<Project Directory>\obj. + + + + Gets or sets the unique identifier of the VS.NET project. - - + + Gets a list of all configurations defined in the project. - - + + Gets a list of project configurations that can be build. @@ -1089,34 +1089,34 @@ compiled. - - - - Gets the extra set of output files for the project. - - - The extra set of output files for the project. - - - The key of the case-insensitive is the - full path of the output file and the value is the path relative to - the output directory. - - - + + + + Gets the extra set of output files for the project. + + + The extra set of output files for the project. + + + The key of the case-insensitive is the + full path of the output file and the value is the path relative to + the output directory. + + + Gets the set of projects that the project depends on. The set of projects that the project depends on. - - + + TODO: refactor this !!! - - + + Gets a value indicating whether building the project for the specified build configuration results in managed output. @@ -1125,8 +1125,8 @@ . - - + + Prepares the project for being built. @@ -1135,53 +1135,53 @@ Ensures the configuration-level object directory exists and ensures that none of the output files are marked read-only. - - - - Gets the complete set of output files for the project configuration - matching the specified solution configuration. - - The solution configuration that is built. - The set of output files to be updated. - - - The key of the case-insensitive is the - full path of the output file and the value is the path relative to - the output directory. - - - If the project is not configured to be built for the specified - solution configuration, then no output files are added. - - - - - - Returns a for launching the compiler - for this project. - - The configuration to build. - The response file for the compiler. - - A for launching the compiler for - this project. - - - - - Returns the project location from the specified project XML fragment. - - XML fragment representing the project file. - - The project location of the specified project XML file. - - - The project location could not be determined. - -or- - The project location is invalid. - - - + + + + Gets the complete set of output files for the project configuration + matching the specified solution configuration. + + The solution configuration that is built. + The set of output files to be updated. + + + The key of the case-insensitive is the + full path of the output file and the value is the path relative to + the output directory. + + + If the project is not configured to be built for the specified + solution configuration, then no output files are added. + + + + + + Returns a for launching the compiler + for this project. + + The configuration to build. + The response file for the compiler. + + A for launching the compiler for + this project. + + + + + Returns the project location from the specified project XML fragment. + + XML fragment representing the project file. + + The project location of the specified project XML file. + + + The project location could not be determined. + -or- + The project location is invalid. + + + Gets the absolute path of the type library for the project output. @@ -1190,8 +1190,8 @@ The absolute path of the type library for the project output. - - + + Generates a type library for the specified assembly, registers it. @@ -1201,8 +1201,8 @@ The regasm tool is used to generate the type library. - - + + Unregister a type library for the specified assembly, and the types in that assembly. @@ -1213,131 +1213,131 @@ The regasm tool is used to unregister the type library, and remove the COM registration for types in the specified assembly. - - - - Returns containing culture-specific resources. - - - A containing culture-specific resources. - - - The key of the is - and the value is an instance - for that culture. - - - - - Creates and initializes a instance. - - - An initialized instance. - - - - - Returns the Visual Studio product version of the specified project - XML fragment. - - XML fragment representing the project to check. - - The Visual Studio product version of the specified project XML - fragment. - - - The product version could not be determined. - -or- - The product version is not supported. - - - - - Returns the of the specified project - XML fragment. - - XML fragment representing the project to check. - - The of the specified project XML - fragment. - - - The project location could not be determined. - -or- - The project location is invalid. - - - - - Holds a case-insensitive list of source files. - - - The key of the is the full path of the - source file and the value is . - - - + + + + Returns containing culture-specific resources. + + + A containing culture-specific resources. + + + The key of the is + and the value is an instance + for that culture. + + + + + Creates and initializes a instance. + + + An initialized instance. + + + + + Returns the Visual Studio product version of the specified project + XML fragment. + + XML fragment representing the project to check. + + The Visual Studio product version of the specified project XML + fragment. + + + The product version could not be determined. + -or- + The product version is not supported. + + + + + Returns the of the specified project + XML fragment. + + XML fragment representing the project to check. + + The of the specified project XML + fragment. + + + The project location could not be determined. + -or- + The project location is invalid. + + + + + Holds a case-insensitive list of source files. + + + The key of the is the full path of the + source file and the value is . + + + Gets the default file extension of sources for this project. The default file extension of sources for this project. - - - - Gets a value indicating if this is a web project. - - - if this is a web project; otherwise, - . - - - If the url of a web project has been mapped to a local path - (using the <webmap> element), then this property will return - for a - project. - - - + + + + Gets a value indicating if this is a web project. + + + if this is a web project; otherwise, + . + + + If the url of a web project has been mapped to a local path + (using the <webmap> element), then this property will return + for a + project. + + + Gets the name of the VS.NET project. - - + + Gets the path of the VS.NET project. - - + + Gets the directory containing the VS.NET project. - - + + Get the location of the project. - - + + Gets or sets the unique identifier of the VS.NET project. - - - - Groups a set of instances for a specific - culture. - - - - - Initializes a new instance - for the specified culture. - - A . - - + + + + Groups a set of instances for a specific + culture. + + + + + Initializes a new instance + for the specified culture. + + A . + + Gets the intermediate build directory in which the satellite assembly is built. @@ -1347,20 +1347,20 @@ The intermediate build directory in which the satellite assembly is built. - - - - Gets a representing the path to the - intermediate file location of the satellite assembly. - - The project build configuration. - The project settings. - - A representing the path to the - intermediate file location of the satellite assembly. - - - + + + + Gets a representing the path to the + intermediate file location of the satellite assembly. + + The project build configuration. + The project settings. + + A representing the path to the + intermediate file location of the satellite assembly. + + + Gets path of the satellite assembly, relative to the output directory. @@ -1370,257 +1370,257 @@ The path of the satellite assembly, relative to the output directory. - - - - Gets the of the - . - - - + + + + Gets the of the + . + + + Gets the set of localized resources. - - - - Verifies whether the specified XML fragment represents a valid project - that is supported by this . - - XML fragment representing the project file. - - The XML fragment is not supported by this . - -or- - The XML fragment does not represent a valid project (for this ). - - - - - Returns the Visual Studio product version of the specified project - XML fragment. - - The document element of the project. - - The Visual Studio product version of the specified project XML - fragment. - - - The product version could not be determined. - -or- - The product version is not supported. - - - - - Returns a for launching the compiler - for this project. - - The configuration to build. - The response file for the compiler. - - A for launching the compiler for - this project. - - - - - Returns the project location from the specified project XML fragment. - - XML fragment representing the project file. - - The project location of the specified project XML file. - - - The project location could not be determined. - -or- - The project location is invalid. - - - - - Returns a value indicating whether the project represented by the - specified XML fragment is supported by . - - XML fragment representing the project to check. - - if supports - the specified project; otherwise, . - - - - A project is identified as as C# project, if the XML fragment at - least has the following information: - - - - - ... - - - ]]> - - - - + + + + Verifies whether the specified XML fragment represents a valid project + that is supported by this . + + XML fragment representing the project file. + + The XML fragment is not supported by this . + -or- + The XML fragment does not represent a valid project (for this ). + + + + + Returns the Visual Studio product version of the specified project + XML fragment. + + The document element of the project. + + The Visual Studio product version of the specified project XML + fragment. + + + The product version could not be determined. + -or- + The product version is not supported. + + + + + Returns a for launching the compiler + for this project. + + The configuration to build. + The response file for the compiler. + + A for launching the compiler for + this project. + + + + + Returns the project location from the specified project XML fragment. + + XML fragment representing the project file. + + The project location of the specified project XML file. + + + The project location could not be determined. + -or- + The project location is invalid. + + + + + Returns a value indicating whether the project represented by the + specified XML fragment is supported by . + + XML fragment representing the project to check. + + if supports + the specified project; otherwise, . + + + + A project is identified as as C# project, if the XML fragment at + least has the following information: + + + + + ... + + + ]]> + + + + Gets the type of the project. The type of the project. - - + + Gets the default file extension of sources for this project. For C# projects, the default file extension is ".cs". - - - - Initializes a new instance of the - class with the given . - - The project of the configuration. - - - - Expands the given macro. - - The macro to expand. - - The expanded macro. - - - The macro is not supported. - -or- - The macro is not implemented. - -or- - The macro cannot be expanded. - - - Expansion of a given macro is not yet implemented. - - - - - Is called each time a regular expression match is found during a - operation. - - The resulting from a single regular expression match during a . - - The expanded . - - - + + + + Initializes a new instance of the + class with the given . + + The project of the configuration. + + + + Expands the given macro. + + The macro to expand. + + The expanded macro. + + + The macro is not supported. + -or- + The macro is not implemented. + -or- + The macro cannot be expanded. + + + Expansion of a given macro is not yet implemented. + + + + + Is called each time a regular expression match is found during a + operation. + + The resulting from a single regular expression match during a . + + The expanded . + + + Gets the project. - - + + Gets the name of the configuration. - - - - Get the directory in which intermediate build output will be stored - for this configuration. - - - - This is a directory relative to the project directory named - obj\<configuration name>. - - - .resx and .licx files will only be recompiled if the - compiled resource files in the are not - uptodate. - - - - + + + + Get the directory in which intermediate build output will be stored + for this configuration. + + + + This is a directory relative to the project directory named + obj\<configuration name>. + + + .resx and .licx files will only be recompiled if the + compiled resource files in the are not + uptodate. + + + + Gets the output directory. - - + + Gets the path for the output file. - - + + Gets the path in which the output file will be created before its copied to the actual output path. - - + + Get the path of the output directory relative to the project directory. - - + + Gets the platform that the configuration targets. The platform targeted by the configuration. - - - - Gets the set of output files that is specific to the project - configuration. - - - The set of output files that is specific to the project - configuration. - - - The key of the case-insensitive is the - full path of the output file and the value is the path relative to - the output directory. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the - class with the specified initial capacity. - - The appropriate number of entries that the can initially contain. - - + + + + Gets the set of output files that is specific to the project + configuration. + + + The set of output files that is specific to the project + configuration. + + + The key of the case-insensitive is the + full path of the output file and the value is the path relative to + the output directory. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the + class with the specified initial capacity. + + The appropriate number of entries that the can initially contain. + + Gets the platform that the configuration targets. The platform targeted by the configuration. - - + + Gets the path in which the output file will be created before its copied to the actual output path. - - + + Gets a value indicating whether to register the project output for use with COM components. @@ -1629,41 +1629,41 @@ if the project output should be registered for use with COM components; otherwise, . - - + + Supports grouping of individual projects, and treating them as a solution. - - - - Verifies whether the specified XML fragment represents a valid project - that is supported by this . - - XML fragment representing the project file. - - The XML fragment is not supported by this . - -or- - The XML fragment does not represent a valid project (for this ). - - - - - Returns the Visual Studio product version of the specified project - XML fragment. - - The document element of the project. - - The Visual Studio product version of the specified project XML - fragment. - - - The product version could not be determined. - -or- - The product version is not supported. - - - + + + + Verifies whether the specified XML fragment represents a valid project + that is supported by this . + + XML fragment representing the project file. + + The XML fragment is not supported by this . + -or- + The XML fragment does not represent a valid project (for this ). + + + + + Returns the Visual Studio product version of the specified project + XML fragment. + + The document element of the project. + + The Visual Studio product version of the specified project XML + fragment. + + + The product version could not be determined. + -or- + The product version is not supported. + + + Prepares the project for being built. @@ -1672,79 +1672,79 @@ Ensures the configuration-level object directory exists and ensures that none of the output files are marked read-only. - - - - Returns a for launching the compiler - for this project. - - The configuration to build. - The response file for the compiler. - - A for launching the compiler for - this project. - - - - - Returns the project location from the specified project XML fragment. - - XML fragment representing the project file. - - The project location of the specified project XML file. - - - The project location could not be determined. - -or- - The project location is invalid. - - - - - Returns a value indicating whether the project represented by the - specified XML fragment is supported by . - - XML fragment representing the project to check. - - if supports - the specified project; otherwise, . - - - - A project is identified as as J# project, if the XML fragment at - least has the following information: - - - - - ... - - - ]]> - - - - + + + + Returns a for launching the compiler + for this project. + + The configuration to build. + The response file for the compiler. + + A for launching the compiler for + this project. + + + + + Returns the project location from the specified project XML fragment. + + XML fragment representing the project file. + + The project location of the specified project XML file. + + + The project location could not be determined. + -or- + The project location is invalid. + + + + + Returns a value indicating whether the project represented by the + specified XML fragment is supported by . + + XML fragment representing the project to check. + + if supports + the specified project; otherwise, . + + + + A project is identified as as J# project, if the XML fragment at + least has the following information: + + + + + ... + + + ]]> + + + + Gets the type of the project. The type of the project. - - + + Gets the default file extension of sources for this project. For J# projects, the default file extension is ".jsl". - - + + Resolves an assembly reference. @@ -1826,8 +1826,8 @@ - - + + Gets the name of the referenced assembly. @@ -1835,47 +1835,47 @@ The name of the referenced assembly, or if the name could not be determined. - - - - Gets the Visual Studio .NET AssemblyFolders registry key matching - the current target framework. - - - The Visual Studio .NET AssemblyFolders registry key matching the - current target framework. - - The current target framework is not supported. - - We use the target framework instead of the product version of the - containing project file to determine what registry key to scan, as - we don't want to use assemblies meant for uplevel framework versions. - - - + + + + Gets the Visual Studio .NET AssemblyFolders registry key matching + the current target framework. + + + The Visual Studio .NET AssemblyFolders registry key matching the + current target framework. + + The current target framework is not supported. + + We use the target framework instead of the product version of the + containing project file to determine what registry key to scan, as + we don't want to use assemblies meant for uplevel framework versions. + + + Indentifies the different output types of a managed project. Visual Studio .NET does not support modules. - - + + A class library. - - + + A console application. - - + + A Windows program. - - + + Gets the output path of the reference, without taking the "copy local" setting into consideration. @@ -1884,23 +1884,23 @@ The output path of the reference. - - - - Gets the complete set of output files for the referenced project. - - The solution configuration that is built. - The set of output files to be updated. - - The complete set of output files for the referenced project. - - - The key of the case-insensitive is the - full path of the output file and the value is the path relative to - the output directory. - - - + + + + Gets the complete set of output files for the referenced project. + + The solution configuration that is built. + The set of output files to be updated. + + The complete set of output files for the referenced project. + + + The key of the case-insensitive is the + full path of the output file and the value is the path relative to + the output directory. + + + Gets the complete set of assemblies that need to be referenced when a project references this project. @@ -1932,8 +1932,8 @@ project. - - + + Gets the timestamp of the reference. @@ -1941,8 +1941,8 @@ The timestamp of the reference. - - + + Gets a value indicating whether the output file(s) of this reference should be copied locally. @@ -1951,8 +1951,8 @@ if the output file(s) of this reference should be copied locally; otherwise, . - - + + Gets a value indicating whether this reference represents a system assembly. @@ -1961,8 +1961,8 @@ as a project by itself can never be a system assembly. - - + + Gets a value indicating whether the reference is managed for the specified configuration. @@ -1971,8 +1971,8 @@ . - - + + Gets the path of the reference, without taking the "copy local" setting into consideration. @@ -1981,20 +1981,20 @@ The output path of the reference. - - - - Gets the complete set of output files for the referenced project. - - The solution configuration that is built. - The set of output files to be updated. - - The key of the case-insensitive is the - full path of the output file and the value is the path relative to - the output directory. - - - + + + + Gets the complete set of output files for the referenced project. + + The solution configuration that is built. + The set of output files to be updated. + + The key of the case-insensitive is the + full path of the output file and the value is the path relative to + the output directory. + + + Gets the complete set of assemblies that need to be referenced when a project references this component. @@ -2004,8 +2004,8 @@ The complete set of assemblies that need to be referenced when a project references this component. - - + + Gets the timestamp of the reference. @@ -2013,16 +2013,16 @@ The timestamp of the reference. - - + + Removes wrapper assembly from build directory, if wrapper assembly no longer exists in output directory or is not in sync with build directory, to force rebuild. The project configuration. - - + + Gets a value indicating whether the output file(s) of this reference should be copied locally. @@ -2031,8 +2031,8 @@ if the reference wraps a Primary Interop Assembly; otherwise, . - - + + Gets a value indicating whether this reference represents a system assembly. @@ -2041,18 +2041,18 @@ as none of the system assemblies are wrappers or Primary Interop Assemblies anyway. - - - - Gets the name of the tool that should be used to create the - . - - - The name of the tool that should be used to create the - . - - - + + + + Gets the name of the tool that should be used to create the + . + + + The name of the tool that should be used to create the + . + + + Gets the path of the wrapper assembly. @@ -2063,14 +2063,14 @@ The wrapper assembly is stored in the object directory of the project. - - + + Gets a value indicating whether the wrapper assembly has already been created. - - + + Gets the path of the Primary Interop Assembly. @@ -2078,8 +2078,8 @@ The path of the Primary Interop Assembly, or if not available. - - + + Gets the hex version of the type library as defined in the definition of the reference. @@ -2087,8 +2087,8 @@ The hex version of the type library. - - + + Gets the GUID of the type library as defined in the definition of the reference. @@ -2096,24 +2096,24 @@ The GUID of the type library. - - + + Gets the locale of the type library in hex notation. The locale of the type library. - - + + Gets the name of the type library. The name of the type library. - - + + Gets the name of the referenced assembly. @@ -2121,18 +2121,18 @@ The name of the referenced assembly, or if the name could not be determined. - - - - Gets the name of the tool that should be used to create the - . - - - The name of the tool that should be used to create the - . - - - + + + + Gets the name of the tool that should be used to create the + . + + + The name of the tool that should be used to create the + . + + + Gets the path of the wrapper assembly. @@ -2143,8 +2143,8 @@ The wrapper assembly is stored in the object directory of the project. - - + + Gets the path of the Primary Interop Assembly. @@ -2152,26 +2152,26 @@ The path of the Primary Interop Assembly, or if not available. - - - - Gets the hex version of the type library as defined in the definition - of the reference. - - - The hex version of the type library. - - - - The definition of the reference does not contain a "VersionMajor" attribute. - - -or - - The definition of the reference does not contain a "VersionMinor" attribute. - - - - + + + + Gets the hex version of the type library as defined in the definition + of the reference. + + + The hex version of the type library. + + + + The definition of the reference does not contain a "VersionMajor" attribute. + + -or + + The definition of the reference does not contain a "VersionMinor" attribute. + + + + Gets the GUID of the type library as defined in the definition of the reference. @@ -2179,229 +2179,229 @@ The GUID of the type library. - - + + Gets the locale of the type library in hex notation. The locale of the type library. - - + + Specifies the type of the project. - - + + A Visual Basic.NET project. - - + + A Visual C# project. - - + + A Visual C++ project. - - + + A Visual J# project. - - + + MSBuild project. - - + + Specifies the result of the build. - - + + The build failed. - - + + The build succeeded. - - + + The build succeeded and the output was updated. - - + + Visual Studio.NET 2002 - - + + Visual Studio.NET 2003 - - + + Visual Studio 2005 - - + + Indentifies the physical location of a managed project. - - + + A local project. - - + + A web project. - - - - Contains a collection of elements. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with the specified instance. - - - - - Initializes a new instance of the class - with the specified array of instances. - - - - - Adds a to the end of the collection. - - The to be added to the end of the collection. - The position into which the new element was inserted. - - - - Adds the elements of a array to the end of the collection. - - The array of elements to be added to the end of the collection. - - - - Adds the elements of a to the end of the collection. - - The to be added to the end of the collection. - - - - Determines whether a is in the collection. - - The to locate in the collection. - - if is found in the - collection; otherwise, . - - - - - Determines whether a with the specified - GUID is in the collection, using a case-insensitive lookup. - - The GUID to locate in the collection. - - if a with GUID - is found in the collection; otherwise, - . - - - + + + + Contains a collection of elements. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with the specified instance. + + + + + Initializes a new instance of the class + with the specified array of instances. + + + + + Adds a to the end of the collection. + + The to be added to the end of the collection. + The position into which the new element was inserted. + + + + Adds the elements of a array to the end of the collection. + + The array of elements to be added to the end of the collection. + + + + Adds the elements of a to the end of the collection. + + The to be added to the end of the collection. + + + + Determines whether a is in the collection. + + The to locate in the collection. + + if is found in the + collection; otherwise, . + + + + + Determines whether a with the specified + GUID is in the collection, using a case-insensitive lookup. + + The GUID to locate in the collection. + + if a with GUID + is found in the collection; otherwise, + . + + + Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. The zero-based index in at which copying begins. - - - - Retrieves the index of a specified object in the collection. - - The object for which the index is returned. - - The index of the specified . If the is not currently a member of the collection, it returns -1. - - - - - Inserts a into the collection at the specified index. - - The zero-based index at which should be inserted. - The to insert. - - - - Returns an enumerator that can iterate through the collection. - - - A for the entire collection. - - - - - Removes a member from the collection. - - The to remove from the collection. - - + + + + Retrieves the index of a specified object in the collection. + + The object for which the index is returned. + + The index of the specified . If the is not currently a member of the collection, it returns -1. + + + + + Inserts a into the collection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + + + Returns an enumerator that can iterate through the collection. + + + A for the entire collection. + + + + + Removes a member from the collection. + + The to remove from the collection. + + Remove items with the specified guid from the collection. The guid of the project to remove from the collection. - - + + Gets or sets the element at the specified index. The zero-based index of the element to get or set. - - - - Gets the with the specified GUID. - - The GUID of the to get. - - Performs a case-insensitive lookup. - - - - - Enumerates the elements of a . - - - - - Initializes a new instance of the class - with the specified . - - The collection that should be enumerated. - - + + + + Gets the with the specified GUID. + + The GUID of the to get. + + Performs a case-insensitive lookup. + + + + + Enumerates the elements of a . + + + + + Initializes a new instance of the class + with the specified . + + The collection that should be enumerated. + + Advances the enumerator to the next element of the collection. @@ -2410,22 +2410,22 @@ to the next element; if the enumerator has passed the end of the collection. - - + + Sets the enumerator to its initial position, which is before the first element in the collection. - - + + Gets the current element in the collection. The current element in the collection. - - + + Gets or sets the in memory representation of the project. @@ -2437,8 +2437,8 @@ This property will always be for projects that are not supported. - - + + Return a mapping between the configurations defined in the solution file and the project build configurations. @@ -2452,137 +2452,137 @@ This mapping only includes project build configurations that are configured to be built for a given solution configuration. - - - - Contains a collection of elements. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with the specified instance. - - - - - Initializes a new instance of the class - with the specified array of instances. - - - - - Adds a to the end of the collection. - - The to be added to the end of the collection. - - The position into which the new element was inserted. - - - - - Adds the elements of a array to the end of the collection. - - The array of elements to be added to the end of the collection. - - - - Adds the elements of a to the end of the collection. - - The to be added to the end of the collection. - - - - Determines whether a is in the collection. - - The to locate in the collection. - - if is found in the - collection; otherwise, . - - - - - Determines whether a with the specified - GUID is in the collection, using a case-insensitive lookup. - - The GUID to locate in the collection. - - if a with GUID - is found in the collection; otherwise, - . - - - + + + + Contains a collection of elements. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with the specified instance. + + + + + Initializes a new instance of the class + with the specified array of instances. + + + + + Adds a to the end of the collection. + + The to be added to the end of the collection. + + The position into which the new element was inserted. + + + + + Adds the elements of a array to the end of the collection. + + The array of elements to be added to the end of the collection. + + + + Adds the elements of a to the end of the collection. + + The to be added to the end of the collection. + + + + Determines whether a is in the collection. + + The to locate in the collection. + + if is found in the + collection; otherwise, . + + + + + Determines whether a with the specified + GUID is in the collection, using a case-insensitive lookup. + + The GUID to locate in the collection. + + if a with GUID + is found in the collection; otherwise, + . + + + Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. The zero-based index in at which copying begins. - - - - Retrieves the index of a specified object in the collection. - - The object for which the index is returned. - - The index of the specified . If the is not currently a member of the collection, it returns -1. - - - - - Inserts a into the collection at the specified index. - - The zero-based index at which should be inserted. - The to insert. - - - - Returns an enumerator that can iterate through the collection. - - - A for the entire collection. - - - - - Removes a member from the collection. - - The to remove from the collection. - - + + + + Retrieves the index of a specified object in the collection. + + The object for which the index is returned. + + The index of the specified . If the is not currently a member of the collection, it returns -1. + + + + + Inserts a into the collection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + + + Returns an enumerator that can iterate through the collection. + + + A for the entire collection. + + + + + Removes a member from the collection. + + The to remove from the collection. + + Gets or sets the element at the specified index. The zero-based index of the element to get or set. - - - - Gets the with the specified GUID. - - The GUID of the to get. - - Performs a case-insensitive lookup. - - - - - Enumerates the elements of a . - - - - - Initializes a new instance of the class - with the specified . - - The collection that should be enumerated. - - + + + + Gets the with the specified GUID. + + The GUID of the to get. + + Performs a case-insensitive lookup. + + + + + Enumerates the elements of a . + + + + + Initializes a new instance of the class + with the specified . + + The collection that should be enumerated. + + Advances the enumerator to the next element of the collection. @@ -2591,93 +2591,93 @@ to the next element; if the enumerator has passed the end of the collection. - - + + Sets the enumerator to its initial position, which is before the first element in the collection. - - + + Gets the current element in the collection. The current element in the collection. - - + + Factory class for VS.NET projects. - - - - Initializes a new instance of the - class. - - - - - Holds a case-insensitive list of cached projects. - - - The key of the is the path of the project - file (for web projects this can be a URL) and the value is a - instance. - - - - - Holds a case-insensitive list of cached project GUIDs. - - - The key of the is the path of the project - file (for web projects this can be a URL) and the value is the GUID - of the project. - - - - - Holds a case-insensitive list of cached project GUIDs. - - - The key of the is the path of the project - file (for web projects this can be a URL) and the value is the Xml - of the project. - - - - - Determines the output type of the project from its XML definition. - - The XML definition of the project settings. - - The output type of the project. - - - - The output type of the project is not set in the specified XML - definition. - - -or- - - The output type of the project is not supported. - - - - - - Gets the project GUID from the given - holding a <VisualStudioProject> node. - - The path of the project file. - The <VisualStudioProject> node from which the project GUID should be retrieved. - - The project GUID from specified <VisualStudioProject> node. - - - + + + + Initializes a new instance of the + class. + + + + + Holds a case-insensitive list of cached projects. + + + The key of the is the path of the project + file (for web projects this can be a URL) and the value is a + instance. + + + + + Holds a case-insensitive list of cached project GUIDs. + + + The key of the is the path of the project + file (for web projects this can be a URL) and the value is the GUID + of the project. + + + + + Holds a case-insensitive list of cached project GUIDs. + + + The key of the is the path of the project + file (for web projects this can be a URL) and the value is the Xml + of the project. + + + + + Determines the output type of the project from its XML definition. + + The XML definition of the project settings. + + The output type of the project. + + + + The output type of the project is not set in the specified XML + definition. + + -or- + + The output type of the project is not supported. + + + + + + Gets the project GUID from the given + holding a <VisualStudioProject> node. + + The path of the project file. + The <VisualStudioProject> node from which the project GUID should be retrieved. + + The project GUID from specified <VisualStudioProject> node. + + + Gets the .ico file to use as application icon. @@ -2685,8 +2685,8 @@ The .ico file to use as application icon, or if no application icon should be used. - - + + Gets the key file to use to sign ActiveX/COM wrappers. @@ -2695,8 +2695,8 @@ relative to the project root directory, or if the wrapper assembly should not be signed using a key file. - - + + Gets the key name to use to sign ActiveX/COM wrappers. @@ -2705,48 +2705,48 @@ or if the wrapper assembly should not be signed using a key container. - - + + Gets the output type of this project. - - - - Designates when the command line should - be run. Possible values are "OnBuildSuccess", "Always" or - "OnOutputUpdated". - - - + + + + Designates when the command line should + be run. Possible values are "OnBuildSuccess", "Always" or + "OnOutputUpdated". + + + Contains commands to be run before a build takes place. Valid commands are those in a .bat file. For more info see MSDN. - - + + Contains commands to be ran after a build has taken place. Valid commands are those in a .bat file. For more info see MSDN. - - - - Obtains a lifetime service object to control the lifetime policy for - this instance. - - - An object of type used to control the lifetime - policy for this instance. This is the current lifetime service object - for this instance if one exists; otherwise, a new lifetime service - object initialized with a lease that will never time out. - - - + + + + Obtains a lifetime service object to control the lifetime policy for + this instance. + + + An object of type used to control the lifetime + policy for this instance. This is the current lifetime service object + for this instance if one exists; otherwise, a new lifetime service + object initialized with a lease that will never time out. + + + Gets the file name of the assembly with the given assembly name. @@ -2754,46 +2754,46 @@ The file name of the assembly with the given assembly name. - - - - Compiles the resource file. - - The solution configuration that is built. - - A representing the compiled resource file. - - - - - Returns a representing the compiled resource - file. - - The solution configuration that is built. - - A representing the compiled resource file. - - - Calling this method does not force compilation of the resource file. - - - - - Gets a representing the physical location - of the resource file. - - - - - Gets a representing the logical location - of the resource file in the project. - - - When the resource file is not linked, this matches the - . - - - + + + + Compiles the resource file. + + The solution configuration that is built. + + A representing the compiled resource file. + + + + + Returns a representing the compiled resource + file. + + The solution configuration that is built. + + A representing the compiled resource file. + + + Calling this method does not force compilation of the resource file. + + + + + Gets a representing the physical location + of the resource file. + + + + + Gets a representing the logical location + of the resource file in the project. + + + When the resource file is not linked, this matches the + . + + + Gets a value indicating whether the resource is in fact a ResX file. @@ -2801,134 +2801,134 @@ if the resource is a ResX file; otherwise, . - - + + Factory class for VS.NET solutions. - - - - Initializes a new instance of the - class. - - - - - Verifies whether the specified XML fragment represents a valid project - that is supported by this . - - XML fragment representing the project file. - - The XML fragment is not supported by this . - -or- - The XML fragment does not represent a valid project (for this ). - - - - - Returns the Visual Studio product version of the specified project - XML fragment. - - The document element of the project. - - The Visual Studio product version of the specified project XML - fragment. - - - The product version could not be determined. - -or- - The product version is not supported. - - - This method is called from the ctor, and - at that time we're not sure the XML that is passed in, is indeed a - valid Visual Basic project. - - - - - Returns the project location from the specified project XML fragment. - - XML fragment representing the project file. - - The project location of the specified project XML file. - - - The project location could not be determined. - -or- - The project location is invalid. - - - - - Returns a for launching the compiler - for this project. - - The configuration to build. - The response file for the compiler. - - A for launching the compiler for - this project. - - - - - Returns a value indicating whether the project represented by the - specified XML fragment is supported by . - - XML fragment representing the project to check. - - if supports the - specified project; otherwise, . - - - - A project is identified as as Visual Basic project, if the XML - fragment at least has the following information: - - - - - ... - - - ]]> - - - - + + + + Initializes a new instance of the + class. + + + + + Verifies whether the specified XML fragment represents a valid project + that is supported by this . + + XML fragment representing the project file. + + The XML fragment is not supported by this . + -or- + The XML fragment does not represent a valid project (for this ). + + + + + Returns the Visual Studio product version of the specified project + XML fragment. + + The document element of the project. + + The Visual Studio product version of the specified project XML + fragment. + + + The product version could not be determined. + -or- + The product version is not supported. + + + This method is called from the ctor, and + at that time we're not sure the XML that is passed in, is indeed a + valid Visual Basic project. + + + + + Returns the project location from the specified project XML fragment. + + XML fragment representing the project file. + + The project location of the specified project XML file. + + + The project location could not be determined. + -or- + The project location is invalid. + + + + + Returns a for launching the compiler + for this project. + + The configuration to build. + The response file for the compiler. + + A for launching the compiler for + this project. + + + + + Returns a value indicating whether the project represented by the + specified XML fragment is supported by . + + XML fragment representing the project to check. + + if supports the + specified project; otherwise, . + + + + A project is identified as as Visual Basic project, if the XML + fragment at least has the following information: + + + + + ... + + + ]]> + + + + Gets the type of the project. The type of the project. - - + + Gets the default file extension of sources for this project. For VB projects, the default file extension is ".vb". - - + + A mapping from properties in the .vcproj file to command line arguments. - - - - Initializes a new instance of the - class. - - - + + + + Initializes a new instance of the + class. + + + Gets the argument string corresponding with a configuration property named with value . @@ -2942,245 +2942,245 @@ named with value , or if no corresponding argument exists. - - - - Creates a mapping between configuration properties for the Visual - C++ compiler and corresponding command-line arguments. - - - A mapping between configuration properties for the Visual C++ - compiler and corresponding command-line arguments. - - - - The following configuration properties are processed by - : - - - - Category - Property - - - General - Addtional Include Directories (/I[path]) - - - General - Resolve #using References (/AI[path]) - - - Preprocessor - Preprocessor Definitions (/D[macro]) - - - Code Generation - Enable C++ Exceptions (/EHsc) - - - Precompiled Headers - Create/Use Precompiled Header - - - Precompiled Headers - Create/Use PCH Through File - - - Precompiled Headers - Precompiled Header File - - - Output Files - Assembler Output - - - Output Files - ASM List Location - - - Browse Information - Enable Browse Information - - - Browse Information - Browse File - - - Advanced - Force Includes (/FI[name]) - - - Advanced - Force #using (/FU[name]) - - - Advanced - Undefine Preprocessor Definitions (/U[macro]) - - - - - - - Creates a mapping between configuration properties for the Visual - C++ linker and corresponding command-line arguments. - - - A mapping between configuration properties for the Visual C++ - linker and corresponding command-line arguments. - - - - The following configuration properties are processed by - : - - - - Category - Property - - - General - Output File (/OUT:[file]) - - - General - Additional Library Directories (/LIBPATH:[dir]) - - - Input - Additional Dependencies - - - Input - Add Module to Assembly (/ASSEMBLYMODULE:file) - - - Input - Embed Managed Resource File (/ASSEMBLYRESOURCE:file) - - - Debugging - Generate Debug Info (/DEBUG) - - - Debugging - Generate Program Database File (/PDB:name) - - - Debugging - Generate Map File (/MAP) - - - Debugging - Map File Name (/MAP:[filename]) - - - System - Heap Reserve Size (/HEAP:reserve) - - - System - Heap Commit Size (/HEAP:reserve, commit) - - - System - Stack Reserve Size (/STACK:reserve) - - - System - Stack Commit Size (/STACK:reserve, commit) - - - - The following configuration properties are ignored: - - - - Category - Property - - - General - Show Progress (/VERBOSE, /VERBOSE:LIB) - - - General - Suppress Startup Banner (/NOLOGO) - - - - Support for the following configuration properties still needs to - be implemented: - - - - Category - Property - - - General - Ignore Import Library - - - General - Register Output - - - Input - Delay Loaded DLLs (/DELAYLOAD:[dll_name]) - - - Embedded IDL - MIDL Commands (/MIDL:[file]) - - - - - + + + + Creates a mapping between configuration properties for the Visual + C++ compiler and corresponding command-line arguments. + + + A mapping between configuration properties for the Visual C++ + compiler and corresponding command-line arguments. + + + + The following configuration properties are processed by + : + + + + Category + Property + + + General + Addtional Include Directories (/I[path]) + + + General + Resolve #using References (/AI[path]) + + + Preprocessor + Preprocessor Definitions (/D[macro]) + + + Code Generation + Enable C++ Exceptions (/EHsc) + + + Precompiled Headers + Create/Use Precompiled Header + + + Precompiled Headers + Create/Use PCH Through File + + + Precompiled Headers + Precompiled Header File + + + Output Files + Assembler Output + + + Output Files + ASM List Location + + + Browse Information + Enable Browse Information + + + Browse Information + Browse File + + + Advanced + Force Includes (/FI[name]) + + + Advanced + Force #using (/FU[name]) + + + Advanced + Undefine Preprocessor Definitions (/U[macro]) + + + + + + + Creates a mapping between configuration properties for the Visual + C++ linker and corresponding command-line arguments. + + + A mapping between configuration properties for the Visual C++ + linker and corresponding command-line arguments. + + + + The following configuration properties are processed by + : + + + + Category + Property + + + General + Output File (/OUT:[file]) + + + General + Additional Library Directories (/LIBPATH:[dir]) + + + Input + Additional Dependencies + + + Input + Add Module to Assembly (/ASSEMBLYMODULE:file) + + + Input + Embed Managed Resource File (/ASSEMBLYRESOURCE:file) + + + Debugging + Generate Debug Info (/DEBUG) + + + Debugging + Generate Program Database File (/PDB:name) + + + Debugging + Generate Map File (/MAP) + + + Debugging + Map File Name (/MAP:[filename]) + + + System + Heap Reserve Size (/HEAP:reserve) + + + System + Heap Commit Size (/HEAP:reserve, commit) + + + System + Stack Reserve Size (/STACK:reserve) + + + System + Stack Commit Size (/STACK:reserve, commit) + + + + The following configuration properties are ignored: + + + + Category + Property + + + General + Show Progress (/VERBOSE, /VERBOSE:LIB) + + + General + Suppress Startup Banner (/NOLOGO) + + + + Support for the following configuration properties still needs to + be implemented: + + + + Category + Property + + + General + Ignore Import Library + + + General + Register Output + + + Input + Delay Loaded DLLs (/DELAYLOAD:[dll_name]) + + + Embedded IDL + MIDL Commands (/MIDL:[file]) + + + + + Gets the name of the command-line argument. The name of the command-line argument. - - + + Represents a command-line arguments of which the trailing backslashes in the value should be duplicated. - - + + Represents a command-line argument of which the value should be quoted, and of which trailing backslahes should be duplicated. - - + + Gets the string that the configuration setting should match in order for the command line argument to be set. - - + + Allow us to assign an argument to a specific group. - - + + The argument is not assigned to any group. - - + + The argument is ignored when the optimization level is set to Minimum Size (1) or Maximum Size (2). - - + + Resolves an assembly reference. @@ -3188,20 +3188,20 @@ The full path to the resolved assembly, or if the assembly reference could not be resolved. - - - - Is called each time a regular expression match is found during a - operation. - - The resulting from a single regular expression match during a . - - The expanded . - - The macro is not supported. - Expansion of a given macro is not yet implemented. - - + + + + Is called each time a regular expression match is found during a + operation. + + The resulting from a single regular expression match during a . + + The expanded . + + The macro is not supported. + Expansion of a given macro is not yet implemented. + + Gets the name of the referenced assembly. @@ -3209,62 +3209,62 @@ The name of the referenced assembly, or if the name could not be determined. - - + + A single build configuration for a Visual C++ project or for a specific file in the project. - - - - Expands the given macro. - - The macro to expand. - - The expanded macro. - - - The macro is not supported. - -or- - The macro is not implemented. - -or- - The macro cannot be expanded. - - - - - Gets the value of a given setting for a specified tool. - - The name of the tool. - The name of the setting. - - The value of a setting for the specified tool, or - if the setting is not defined for the specified tool. - - - An empty setting value, which is used as a means to override the - project default, will be returned as a empty . - - - - - Gets the value of a given setting for a specified tool. - - The name of the tool. - The name of the setting. - The value to return if setting is not defined. - - The value of a setting for the specified tool, or - if the setting is not defined for - the specified tool. - - - An empty setting value, which is used as a means to override the - project default, will be returned as a empty . - - - + + + + Expands the given macro. + + The macro to expand. + + The expanded macro. + + + The macro is not supported. + -or- + The macro is not implemented. + -or- + The macro cannot be expanded. + + + + + Gets the value of a given setting for a specified tool. + + The name of the tool. + The name of the setting. + + The value of a setting for the specified tool, or + if the setting is not defined for the specified tool. + + + An empty setting value, which is used as a means to override the + project default, will be returned as a empty . + + + + + Gets the value of a given setting for a specified tool. + + The name of the tool. + The name of the setting. + The value to return if setting is not defined. + + The value of a setting for the specified tool, or + if the setting is not defined for + the specified tool. + + + An empty setting value, which is used as a means to override the + project default, will be returned as a empty . + + + Gets the intermediate directory, specified relative to project directory. @@ -3272,8 +3272,8 @@ The intermediate directory, specified relative to project directory. - - + + Gets a comma-separated list of directories to scan for assembly references. @@ -3283,8 +3283,8 @@ references, or if no additional directories should scanned. - - + + Gets the name of the configuration, including the platform it targets. @@ -3292,13 +3292,13 @@ Tthe name of the configuration, including the platform it targets. - - + + Gets the output directory. - - + + Gets the path in which the output file will be created before its copied to the actual output path. @@ -3307,68 +3307,68 @@ For Visual C++ projects, the output file will be immediately created in the output path. - - + + Gets the name of the configuration. The name of the configuration. - - + + Gets the platform that the configuration targets. The platform targeted by the configuration. - - + + Represents the configuration of a file. - - - - Expands the given macro. - - The macro to expand. - - The expanded macro. - - - The macro is not supported. - -or- - The macro is not implemented. - -or- - The macro cannot be expanded. - - - - - Gets the value of a given setting for a specified tool. - - The name of the tool. - The name of the setting. - The value to return if setting is not defined in both the file and project configuration. - - The value of a setting for the specified tool, or - if the setting is not defined in - both the file and project configuration. - - - - If the setting is not defined in the file configuration, then - the project level setting will be used. - - - An empty setting value, which is used as a means to override the - project default, will be returned as a empty . - - - - + + + + Expands the given macro. + + The macro to expand. + + The expanded macro. + + + The macro is not supported. + -or- + The macro is not implemented. + -or- + The macro cannot be expanded. + + + + + Gets the value of a given setting for a specified tool. + + The name of the tool. + The name of the setting. + The value to return if setting is not defined in both the file and project configuration. + + The value of a setting for the specified tool, or + if the setting is not defined in + both the file and project configuration. + + + + If the setting is not defined in the file configuration, then + the project level setting will be used. + + + An empty setting value, which is used as a means to override the + project default, will be returned as a empty . + + + + Gets a value indication whether the file should be excluded from the build for this configuration. @@ -3377,22 +3377,22 @@ if the file should be excluded from the build for this configuration; otherwise, . - - + + Gets the relative path of the file. The path of the file relative to the project directory. - - + + Get the path of the output directory relative to the project directory. - - + + Gets the intermediate directory, specified relative to project directory. @@ -3400,8 +3400,8 @@ The intermediate directory, specified relative to project directory. - - + + Gets the path for the output file. @@ -3409,8 +3409,8 @@ The path for the output file, or if there's no output file for this configuration. - - + + Gets a comma-separated list of directories to scan for assembly references. @@ -3420,13 +3420,13 @@ references, or if no additional directories should scanned. - - + + Visual C++ project. - - + + Gets a value indicating whether building the project for the specified build configuration results in managed output. @@ -3438,36 +3438,36 @@ (exe), and Managed Extensions are enabled; otherwise, . - - - - Verifies whether the specified XML fragment represents a valid project - that is supported by this . - - XML fragment representing the project file. - - The XML fragment is not supported by this . - -or- - The XML fragment does not represent a valid project (for this ). - - - - - Returns the Visual Studio product version of the specified project - XML fragment. - - The document element of the project. - - The Visual Studio product version of the specified project XML - fragment. - - - The product version could not be determined. - -or- - The product version is not supported. - - - + + + + Verifies whether the specified XML fragment represents a valid project + that is supported by this . + + XML fragment representing the project file. + + The XML fragment is not supported by this . + -or- + The XML fragment does not represent a valid project (for this ). + + + + + Returns the Visual Studio product version of the specified project + XML fragment. + + The document element of the project. + + The Visual Studio product version of the specified project XML + fragment. + + + The product version could not be determined. + -or- + The product version is not supported. + + + Expands the given macro. @@ -3476,8 +3476,8 @@ The expanded macro or if the macro is not supported. - - + + Build resource files for the given configuration. @@ -3489,8 +3489,8 @@ list. Each res file should be built with its own file configuration. - - + + Build Interface Definition Language files for the given configuration. @@ -3503,8 +3503,8 @@ list. Each IDL file should be built with its own file configuration. - - + + Merges the specified tool setting of with . @@ -3513,8 +3513,8 @@ The merge is suppressed when the flag $(noinherit) is defined in . - - + + Gets the absolute path to the object file or directory. @@ -3527,107 +3527,107 @@ <cl> assumes a location relative to the output directory - not the project directory. - - - - Returns a value indicating whether the project represented by the - specified XML fragment is supported by . - - XML fragment representing the project to check. - - if supports the - specified project; otherwise, . - - - - A project is identified as as Visual C++ project, if the XML - fragment at least has the following information: - - - - - ]]> - - - - + + + + Returns a value indicating whether the project represented by the + specified XML fragment is supported by . + + XML fragment representing the project to check. + + if supports the + specified project; otherwise, . + + + + A project is identified as as Visual C++ project, if the XML + fragment at least has the following information: + + + + + ]]> + + + + Removes leading and trailing quotes from the specified path. The path to clean. - - - - Returns the Visual Studio product version of the specified project - XML fragment. - - XML fragment representing the project to check. - - The Visual Studio product version of the specified project XML - fragment. - - - The product version could not be determined. - -or- - The product version is not supported. - - - - - Holds the files included in the project. - - - - For project files with no specific file configuration, the relative - path is added to the list. - - - For project files that have a specific file configuration, a - containing the - instance representing the file configurations is added. - - - - + + + + Returns the Visual Studio product version of the specified project + XML fragment. + + XML fragment representing the project to check. + + The Visual Studio product version of the specified project XML + fragment. + + + The product version could not be determined. + -or- + The product version is not supported. + + + + + Holds the files included in the project. + + + + For project files with no specific file configuration, the relative + path is added to the list. + + + For project files that have a specific file configuration, a + containing the + instance representing the file configurations is added. + + + + Gets the name of the Visual C++ project. - - + + Gets the type of the project. The type of the project. - - + + Gets the path of the Visual C++ project. - - + + Gets the directory containing the VS.NET project. - - - - Get the location of the project. - - - . - - - For now, we only support local Visual C++ projects. - - - + + + + Get the location of the project. + + + . + + + For now, we only support local Visual C++ projects. + + + Get the directory in which intermediate build output that is not specific to the build configuration will be stored. @@ -3636,37 +3636,37 @@ This is a directory relative to the project directory, named temp\. - - + + Gets or sets the unique identifier of the Visual C++ project. - - + + Represents a Visual C++ project configuration. - - - - Expands the given macro. - - The macro to expand. - - The expanded macro. - - - The macro is not supported. - -or- - The macro is not implemented. - -or- - The macro cannot be expanded. - - - Expansion of a given macro is not yet implemented. - - - + + + + Expands the given macro. + + The macro to expand. + + The expanded macro. + + + The macro is not supported. + -or- + The macro is not implemented. + -or- + The macro cannot be expanded. + + + Expansion of a given macro is not yet implemented. + + + Gets the value of the specified attribute from the specified node. @@ -3676,22 +3676,22 @@ The value of the attribute with the specified name or if the attribute does not exist or has no value. - - - - Holds the output path for this build configuration. - - - Lazy initialized by . - - - + + + + Holds the output path for this build configuration. + + + Lazy initialized by . + + + Holds list of files to link in the order in which they are defined in the project file. - - + + Holds the C++ sources for each build configuration. @@ -3700,8 +3700,8 @@ value is an ArrayList holding the C++ source files for that build configuration. - - + + Holds the resources for each build configuration. @@ -3710,8 +3710,8 @@ value is an ArrayList holding the resources files for that build configuration. - - + + Holds the IDL files for each build configuration. @@ -3720,35 +3720,35 @@ value is an ArrayList holding the IDL files for that build configuration. - - + + Tells the compiler which character set to use. - - + + Gets a value indicating whether Managed Extensions for C++ are enabled. - - + + Gets a value indicating how MFC is used by the configuration. - - + + Gets a value indicating how ATL is used by the configuration. - - + + Gets the list of files to link in the order in which they are defined in the project file. - - + + Holds the C++ sources for each build configuration. @@ -3757,8 +3757,8 @@ value is an ArrayList holding the C++ source files for that build configuration. - - + + Gets the resources for each build configuration. @@ -3767,8 +3767,8 @@ value is an ArrayList holding the resources files for that build configuration. - - + + Get the IDL files for each build configuration. @@ -3777,8 +3777,8 @@ value is an ArrayList holding the IDL files for that build configuration. - - + + Gets the target path for usage in macro expansion. @@ -3786,31 +3786,31 @@ The target path, or a zero-length string if there's no output file for this configuration. - - - - Get the directory in which intermediate build output will be stored - for this configuration. - - - - This is a directory relative to the project directory named - obj\<configuration name>. - - - .resx and .licx files will only be recompiled if the - compiled resource files in the are not - uptodate. - - - - + + + + Get the directory in which intermediate build output will be stored + for this configuration. + + + + This is a directory relative to the project directory named + obj\<configuration name>. + + + .resx and .licx files will only be recompiled if the + compiled resource files in the are not + uptodate. + + + + Get the path of the output directory relative to the project directory. - - + + Gets the intermediate directory, specified relative to project directory. @@ -3818,8 +3818,8 @@ The intermediate directory, specified relative to project directory. - - + + Gets the absolute path for the output file. @@ -3827,8 +3827,8 @@ The absolute path for the output file, or if there's no output file for this configuration. - - + + Gets a comma-separated list of directories to scan for assembly references. @@ -3838,49 +3838,49 @@ references, or if no additional directories should scanned. - - + + The type of output for a given configuration. - - + + A Makefile. - - + + Application (.exe). - - + + Dynamic Library (.dll). - - + + Static Library (.lib). - - + + Utility. - - - - Gets a instance representing the - absolute path to the import library to generate. - - - A representing the absolute path to the - import library to generate, or if no - import library must be generated. - - - + + + + Gets a instance representing the + absolute path to the import library to generate. + + + A representing the absolute path to the + import library to generate, or if no + import library must be generated. + + + Gets a value indicating whether the reference is managed for the specified configuration. @@ -3890,26 +3890,26 @@ if the reference is managed for the specified configuration; otherwise, . - - + + Gets the name of the referenced assembly. The name of the referenced assembly. - - - - Gets the name of the tool that should be used to create the - . - - - The name of the tool that should be used to create the - . - - - + + + + Gets the name of the tool that should be used to create the + . + + + The name of the tool that should be used to create the + . + + + Gets the path of the wrapper assembly. @@ -3920,8 +3920,8 @@ The wrapper assembly is stored in the object directory of the project. - - + + Gets the path of the Primary Interop Assembly. @@ -3929,18 +3929,18 @@ The path of the Primary Interop Assembly, or if not available. - - - - Gets the hex version of the type library as defined in the definition - of the reference. - - - The hex version of the type library. - - The definition of the reference does not contain a "ControlVersion" attribute. - - + + + + Gets the hex version of the type library as defined in the definition + of the reference. + + + The hex version of the type library. + + The definition of the reference does not contain a "ControlVersion" attribute. + + Gets the GUID of the type library as defined in the definition of the reference. @@ -3948,14 +3948,14 @@ The GUID of the type library. - - + + Gets the locale of the type library in hex notation. The locale of the type library. - - - + + + diff --git a/tools/nant/NAnt.VisualCppTasks.xml b/tools/nant/NAnt.VisualCppTasks.xml index 876d46d3707..a8ab7a33265 100644 --- a/tools/nant/NAnt.VisualCppTasks.xml +++ b/tools/nant/NAnt.VisualCppTasks.xml @@ -1,10 +1,10 @@ - - - - NAnt.VisualCppTasks - - - + + + + NAnt.VisualCppTasks + + + Compiles C/C++ programs using cl.exe, Microsoft's C/C++ compiler. @@ -23,23 +23,23 @@ ]]> - - - - Initializes a new instance of the class. - - - + + + + Initializes a new instance of the class. + + + Compiles the sources. - - + + Determines if the sources need to be compiled. - - + + Determines whether the precompiled header file is up-to-date. @@ -53,8 +53,8 @@ in. As this is not implemented right now, its safer to always recompile. - - + + Determines whether any file that are includes in the specified source file has been updated after the obj was compiled. @@ -76,8 +76,8 @@ it will be considered stable. - - + + Quotes an argument value and duplicates trailing backslahes. @@ -85,8 +85,8 @@ The quotes argument value. - - + + Determines the file name of the OBJ file for the specified source file. @@ -96,113 +96,113 @@ The file name of the OBJ file for the specified source file. - - + + Directory where all output files are placed. - - - - Specifies the path and/or name of the generated precompiled header - file - given either relative to or as an - absolute path. - - - - - The path of the boundary file when generating/using the - specified . If a precompiled header file is - not specified then this attribute is ignored. - - - - - The mode in which the specified (if any) is - used. The default is . - - - + + + + Specifies the path and/or name of the generated precompiled header + file - given either relative to or as an + absolute path. + + + + + The path of the boundary file when generating/using the + specified . If a precompiled header file is + not specified then this attribute is ignored. + + + + + The mode in which the specified (if any) is + used. The default is . + + + Specifies whether Managed Extensions for C++ should be enabled. The default is . - - + + Tells the compiler to use the specified character set. - - + + Options to pass to the compiler. - - + + The list of files to compile. - - + + The list of directories in which to search for include files. - - + + Directories that the compiler will search to resolve file references passed to the #using directive. - - + + Specifies metadata files to reference in this compilation as an alternative to passing a file name to #using in source code. - - + + Macro definitions to pass to cl.exe. Each entry will generate a /D - - + + Macro undefines (/U) to pass to cl.exe. - - + + A name to override the default object file name; can be either a file or directory name. The default is the output directory. - - + + A name for the compiler-generated PDB file; can be either a file or directory name. The default is the output directory. - - + + Gets the filename of the external program to start. The filename of the external program. - - + + Gets the command-line arguments for the external program. The command-line arguments for the external program. - - + + Defines the supported modes for the use of precompiled header files. - - + + Create a precompiled header file. @@ -210,8 +210,8 @@ For further information on the use of this option see the Microsoft documentation on the C++ compiler flag /Yc. - - + + Automatically create a precompiled header file if necessary. @@ -219,8 +219,8 @@ For further information on the use of this option see the Microsoft documentation on the C++ compiler flag /YX. - - + + Use a (previously generated) precompiled header file. @@ -228,8 +228,8 @@ For further information on the use of this option see the Microsoft documentation on the C++ compiler flag /Yu. - - + + Run lib.exe, Microsoft's Library Manager. @@ -245,67 +245,67 @@ ]]> - - + + Creates the library. - - + + Determines if the sources need to be linked. - - + + Options to pass to the compiler. - - + + The output file. - - + + The module definition file. - - + + The list of files to combine into the output file. - - + + Symbols to add to the symbol table. - - + + Names of default libraries to ignore. - - + + The list of additional library directories to search. - - + + Gets the filename of the external program to start. The filename of the external program. - - + + Gets the command-line arguments for the external program. The command-line arguments for the external program. - - + + Links files using link.exe, Microsoft's Incremental Linker. @@ -326,18 +326,18 @@ ]]> - - + + Links the sources. - - + + Determines if the output needs linking. - - + + Quotes an argument value and duplicates trailing backslahes. @@ -345,87 +345,87 @@ The quotes argument value. - - + + Options to pass to the compiler. - - + + Create debugging information for the .exe file or DLL. The default is . - - + + The output file. - - - - A user-specified name for the program database (PDB) that the linker - creates. The default file name for the PDB has the base name of the - and the extension .pdb. - - - + + + + A user-specified name for the program database (PDB) that the linker + creates. The default file name for the PDB has the base name of the + and the extension .pdb. + + + The name of a module-definition file (.def) to be passed to the linker. - - + + Specified DLLs for delay loading. - - + + The list of files to combine into the output file. - - + + The list of additional library directories to search. - - + + Link the specified modules into this assembly. - - + + Embed the specified resources into this assembly. - - + + Symbols to add to the symbol table. - - + + Names of libraries that you want the linker to ignore when it resolves external references. - - + + Gets the filename of the external program to start. The filename of the external program. - - + + Gets the command-line arguments for the external program. The command-line arguments for the external program. - - + + Compiles messages using mc.exe, Microsoft's Win32 message compiler. @@ -448,54 +448,54 @@ ]]> - - + + Compiles the sources. - - + + Determine if source files need re-building. - - + + Options to pass to the compiler. - - + + Path to store header file. The default is the project base directory. - - + + Path to store RC file. The default is the project base directory. - - + + Input filename. - - + + Gets the filename of the external program to start. The filename of the external program. - - + + Gets the command-line arguments for the external program. The command-line arguments for the external program. - - + + This tasks allows you to run MIDL.exe. @@ -530,20 +530,20 @@ ]]> - - + + This is where the work is done. - - + + Check output files to see if we need rebuilding. if a rebuild is needed; otherwise, . - - + + Check output files to see if we need rebuilding. @@ -551,72 +551,72 @@ if a rebuild is needed; otherwise, . - - + + Writes the response file for midl.exe. - - + + The /acf switch allows the user to supply an explicit ACF file name. The switch also allows the use of different interface names in the IDL and ACF files. - - + + The /align switch is functionally the same as the MIDL /Zp option and is recognized by the MIDL compiler solely for backward compatibility with MkTypLib. The alignment value can be 1, 2, 4, or 8. - - + + The /app_config switch selects application-configuration mode, which allows you to use some ACF keywords in the IDL file. With this MIDL compiler switch, you can omit the ACF and specify an interface in a single IDL file. - - + + The /char switch helps to ensure that the MIDL compiler and C compiler operate together correctly for all char and small types. Can be one of signed | unsigned | ascii7 - - + + The /client switch directs the MIDL compiler to generate client-side C source files for an RPC interface can be one of stub | none - - + + The /cstub switch specifies the name of the client stub file for an RPC interface. - - - - Specifies the file name for the generated dlldata file for a proxy - DLL. The default file name Dlldata.c is used if - is not specified. - - - + + + + Specifies the file name for the generated dlldata file for a proxy + DLL. The default file name Dlldata.c is used if + is not specified. + + + The /env switch selects the environment in which the application runs. It can take the values win32 and win64 - - + + The /Oi switch directs the MIDL compiler to use a fully-interpreted marshaling method. @@ -631,70 +631,70 @@ - Oi="f" - Oi="cf" - - + + Specifies a file name for the type library generated by the MIDL compiler. - - + + Specifies the name of the header file. - - + + Specifies the name of the interface identifier file for a COM interface, overriding the default name obtained by adding _i.c to the IDL file name. - - + + Specifies the name of the interface proxy file for a COM interface. - - + + Name of .IDL file to process. - - + + Additional options to pass to midl.exe. - - + + Macro definitions to pass to mdil.exe. Each entry will generate a /D - - + + Macro undefines (/U) to pass to mdil. - - + + The list of directories in which to search for include files. - - + + Filename of program to execute - - + + Gets the command-line arguments for the external program. The command-line arguments for the external program. - - + + Compiles resources using rc.exe, Microsoft's Win32 resource compiler. @@ -719,226 +719,226 @@ ]]> - - + + Compile the resource file - - + + Determines if the resource need compiling. - - + + Check if a resource file has been updated. - - + + Options to pass to the compiler. - - + + Output file. - - + + The resource file to compile. - - + + Default language ID. - - + + The list of directories in which to search for include files. - - + + Macro definitions to pass to rc.exe. Each entry will generate a /d - - + + Filename of program to execute - - + + Arguments of program to execute - - + + Defines the character sets that can be used by the C++ compiler. - - + + Have the compiler determine the character set. - - + + Unicode character set. - - + + Multi-byte character set. - - + + Represents a library. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class with - the specified name. - - is . - - + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + the specified name. + + is . + + The name of the library. - - + + If then the element will be processed; otherwise, skipped. The default is . - - + + If then the element will be skipped; otherwise, processed. The default is . - - - - Contains a collection of elements. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with the specified instance. - - - - - Initializes a new instance of the class - with the specified array of instances. - - - - - Adds a to the end of the collection. - - The to be added to the end of the collection. - The position into which the new element was inserted. - - - - Adds the elements of a array to the end of the collection. - - The array of elements to be added to the end of the collection. - - - - Adds the elements of a to the end of the collection. - - The to be added to the end of the collection. - - - - Determines whether a is in the collection. - - The to locate in the collection. - - if is found in the - collection; otherwise, . - - - + + + + Contains a collection of elements. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with the specified instance. + + + + + Initializes a new instance of the class + with the specified array of instances. + + + + + Adds a to the end of the collection. + + The to be added to the end of the collection. + The position into which the new element was inserted. + + + + Adds the elements of a array to the end of the collection. + + The array of elements to be added to the end of the collection. + + + + Adds the elements of a to the end of the collection. + + The to be added to the end of the collection. + + + + Determines whether a is in the collection. + + The to locate in the collection. + + if is found in the + collection; otherwise, . + + + Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. The zero-based index in at which copying begins. - - - - Retrieves the index of a specified object in the collection. - - The object for which the index is returned. - - The index of the specified . If the is not currently a member of the collection, it returns -1. - - - - - Inserts a into the collection at the specified index. - - The zero-based index at which should be inserted. - The to insert. - - - - Returns an enumerator that can iterate through the collection. - - - A for the entire collection. - - - - - Removes a member from the collection. - - The to remove from the collection. - - + + + + Retrieves the index of a specified object in the collection. + + The object for which the index is returned. + + The index of the specified . If the is not currently a member of the collection, it returns -1. + + + + + Inserts a into the collection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + + + Returns an enumerator that can iterate through the collection. + + + A for the entire collection. + + + + + Removes a member from the collection. + + The to remove from the collection. + + Gets or sets the element at the specified index. The zero-based index of the element to get or set. - - - - Enumerates the elements of a . - - - - - Initializes a new instance of the class - with the specified . - - The collection that should be enumerated. - - + + + + Enumerates the elements of a . + + + + + Initializes a new instance of the class + with the specified . + + The collection that should be enumerated. + + Advances the enumerator to the next element of the collection. @@ -947,162 +947,162 @@ to the next element; if the enumerator has passed the end of the collection. - - + + Sets the enumerator to its initial position, which is before the first element in the collection. - - + + Gets the current element in the collection. The current element in the collection. - - + + Represents a symbol. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class with - the specified name. - - is . - - + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class with + the specified name. + + is . + + The name of the symbol. - - + + If then the element will be processed; otherwise, skipped. The default is . - - + + If then the element will be skipped; otherwise, processed. The default is . - - - - Contains a collection of elements. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with the specified instance. - - - - - Initializes a new instance of the class - with the specified array of instances. - - - - - Adds a to the end of the collection. - - The to be added to the end of the collection. - The position into which the new element was inserted. - - - - Adds the elements of a array to the end of the collection. - - The array of elements to be added to the end of the collection. - - - - Adds the elements of a to the end of the collection. - - The to be added to the end of the collection. - - - - Determines whether a is in the collection. - - The to locate in the collection. - - if is found in the - collection; otherwise, . - - - + + + + Contains a collection of elements. + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class + with the specified instance. + + + + + Initializes a new instance of the class + with the specified array of instances. + + + + + Adds a to the end of the collection. + + The to be added to the end of the collection. + The position into which the new element was inserted. + + + + Adds the elements of a array to the end of the collection. + + The array of elements to be added to the end of the collection. + + + + Adds the elements of a to the end of the collection. + + The to be added to the end of the collection. + + + + Determines whether a is in the collection. + + The to locate in the collection. + + if is found in the + collection; otherwise, . + + + Copies the entire collection to a compatible one-dimensional array, starting at the specified index of the target array. The one-dimensional array that is the destination of the elements copied from the collection. The array must have zero-based indexing. The zero-based index in at which copying begins. - - - - Retrieves the index of a specified object in the collection. - - The object for which the index is returned. - - The index of the specified . If the is not currently a member of the collection, it returns -1. - - - - - Inserts a into the collection at the specified index. - - The zero-based index at which should be inserted. - The to insert. - - - - Returns an enumerator that can iterate through the collection. - - - A for the entire collection. - - - - - Removes a member from the collection. - - The to remove from the collection. - - + + + + Retrieves the index of a specified object in the collection. + + The object for which the index is returned. + + The index of the specified . If the is not currently a member of the collection, it returns -1. + + + + + Inserts a into the collection at the specified index. + + The zero-based index at which should be inserted. + The to insert. + + + + Returns an enumerator that can iterate through the collection. + + + A for the entire collection. + + + + + Removes a member from the collection. + + The to remove from the collection. + + Gets or sets the element at the specified index. The zero-based index of the element to get or set. - - - - Enumerates the elements of a . - - - - - Initializes a new instance of the class - with the specified . - - The collection that should be enumerated. - - + + + + Enumerates the elements of a . + + + + + Initializes a new instance of the class + with the specified . + + The collection that should be enumerated. + + Advances the enumerator to the next element of the collection. @@ -1111,67 +1111,67 @@ to the next element; if the enumerator has passed the end of the collection. - - + + Sets the enumerator to its initial position, which is before the first element in the collection. - - + + Gets the current element in the collection. The current element in the collection. - - + + Defines how to deal with backslashes in values of command line arguments. - - + + Does not perform any processing on backslashes. - - + + Duplicates the trailing backslash. - - + + Fixes the trailing backslash by replaces trailing double backslashes with only one backslash and removing single trailing backslashes. - - + + Removes all the trailing backslashes. - - - - Groups a set of useful manipulation methods for - command-line arguments. - - - - - Performs backslash processing on the specified value using a given - method. - - The to process. - The to use. - - with backslashes processed using the given - . - - - + + + + Groups a set of useful manipulation methods for + command-line arguments. + + + + + Performs backslash processing on the specified value using a given + method. + + The to process. + The to use. + + with backslashes processed using the given + . + + + Duplicates the trailing backslash. @@ -1180,32 +1180,32 @@ Also duplicates trailing backslash in quoted value. - - + + Fixes the trailing backslash. This function replaces the trailing double backslashes with only one backslash. It also, removes the single trailing backslash. The input string. The result string after being processed. - - + + Removes all the trailing backslashes from the input. The input string. The result string without trailing backslashes. - - - - Quotes an argument value and processes backslashes using a given - . - - The argument value to quote. - The to use. - - The quoted argument value. - - - - + + + + Quotes an argument value and processes backslashes using a given + . + + The argument value to quote. + The to use. + + The quoted argument value. + + + + diff --git a/tools/nant/NAnt.Win32Tasks.xml b/tools/nant/NAnt.Win32Tasks.xml index 3c25f5ad0e2..bd488501b47 100644 --- a/tools/nant/NAnt.Win32Tasks.xml +++ b/tools/nant/NAnt.Win32Tasks.xml @@ -1,10 +1,10 @@ - - - - NAnt.Win32Tasks - - - + + + + NAnt.Win32Tasks + + + Groups a set of functions that convert Windows native filenames to Cygwin POSIX-style pathnames and vice versa. @@ -14,66 +14,66 @@ native Windows program, or expects to get a file name from a native Windows program. - - - - Initializes a new instance of the - class with the specified and properties. - - The in which the class is used. - The set of properties to use for macro expansion. - - - - Gets the DOS (short) form of the specified path. - - The path to convert. - - The DOS (short) form of the specified path. - - cygpath could not be started. - could not be converted to a short form. - - - - Gets the Unix form of the specified path. - - The path to convert. - - The Unix form of the specified path. - - cygpath could not be started. - could not be converted to a Unix form. - - - - Gets the Windows form of the specified path. - - The path to convert. - - The Windows form of the specified path. - - cygpath could not be started. - could not be converted to a Windows form. - - - - Runs cygpath with the specified arguments and returns the result - as a . - - The arguments to pass to cygpath. - - The result of running cygpath with the specified arguments. - - - + + + + Initializes a new instance of the + class with the specified and properties. + + The in which the class is used. + The set of properties to use for macro expansion. + + + + Gets the DOS (short) form of the specified path. + + The path to convert. + + The DOS (short) form of the specified path. + + cygpath could not be started. + could not be converted to a short form. + + + + Gets the Unix form of the specified path. + + The path to convert. + + The Unix form of the specified path. + + cygpath could not be started. + could not be converted to a Unix form. + + + + Gets the Windows form of the specified path. + + The path to convert. + + The Windows form of the specified path. + + cygpath could not be started. + could not be converted to a Windows form. + + + + Runs cygpath with the specified arguments and returns the result + as a . + + The arguments to pass to cygpath. + + The result of running cygpath with the specified arguments. + + + Factory method to return a new instance of ExecTask - - + + Generates a Windows Forms Control that wraps ActiveX Controls defined in an OCX. @@ -85,13 +85,13 @@ ]]> - - + + Import the ActiveX control. - - + + Determines whether the assembly needs to be created again. @@ -99,18 +99,18 @@ if the assembly needs to be created again; otherwise, . - - + + Filename of the .ocx file. - - + + Filename of the generated assembly. - - + + Specifies the file containing the public key to use to sign the resulting assembly. @@ -119,8 +119,8 @@ The file containing the public key to use to sign the resulting assembly. - - + + Specifies the publisher's official public/private key pair with which the resulting assembly should be signed with a strong name. @@ -129,8 +129,8 @@ The keyfile to use to sign the resulting assembly with a strong name. See the Microsoft.NET Framework SDK documentation for details. - - + + Specifies the key container in which the public/private key pair should be found that should be used to sign the resulting assembly @@ -140,40 +140,40 @@ The key container containing a public/private key pair that should be used to sign the resulting assembly. - - + + Specifies to sign the resulting control using delayed signing. - - + + Determines whether C# source code for the Windows Form wrapper should be generated. The default is . - - + + Assembly to use for Runtime Callable Wrapper rather than generating new one [.NET 1.1 or higher]. - - + + Indicates whether aximp supports using an existing Runtime Callable Wrapper for a given target framework. The default is . - - + + Gets the command-line arguments for the external program. The command-line arguments for the external program. - - + + Reads a value or set of values from the Windows Registry into one or more NAnt properties. @@ -192,13 +192,13 @@ ]]> - - + + read the specified registry value - - + + Returns the hive for a given key. @@ -207,8 +207,8 @@ The hive for a given key. - - + + Returns the key for a given registry hive. @@ -216,14 +216,14 @@ The key for a given registry hive. - - + + The property to set to the specified registry key value. If this attribute is used then a single value will be read. - - + + The prefix to use for the specified registry key values. If this attribute is used then all registry values will be read and stored as properties with this prefix. @@ -231,26 +231,26 @@ Registry values a, b, c will be turned into prefixa, prefixb, prefixc named properties - - + + The registry key to read, including the path. SOFTWARE\Microsoft\.NETFramework\sdkInstallRoot - - - - Space separated list of registry hives to search for . - For a list of possible values, see . The - default is . - - - - - - + + + + Space separated list of registry hives to search for . + For a list of possible values, see . The + default is . + + + + + + Registers an assembly, or set of assemblies for use from COM clients. @@ -300,78 +300,78 @@ ]]> - - - - Updates the of the specified - . - - The of which the should be updated. - - + + + + Updates the of the specified + . + + The of which the should be updated. + + Registers or unregisters a single assembly, or a group of assemblies. - - - - The name of the file to register. This is provided as an alternate - to using the task's . - - - + + + + The name of the file to register. This is provided as an alternate + to using the task's . + + + Registry file to export to instead of entering the types directly into the registry. - - + + Set the code base registry setting. - - + + Only refer to already registered type libraries. - - + + Export the assemblies to the specified type library and register it. - - + + Unregister the assembly. The default is . - - + + The set of assemblies to register, or unregister. - - + + The set of assembly references. - - + + Gets the working directory for the application. The working directory for the application. - - + + Gets the command line arguments for the external program. The command line arguments for the external program. - - + + Gets the filename of the external program to start. @@ -382,8 +382,8 @@ Override in derived classes to explicitly set the location of the external tool. - - + + Exports a .NET assembly to a type library that can be used from unmanaged code (wraps Microsoft's tlbexp.exe). @@ -401,13 +401,13 @@ ]]> - - + + Exports the type library. - - + + Determines whether the assembly needs to be exported to a type library again. @@ -416,8 +416,8 @@ if the assembly needs to be exported to a type library; otherwise, . - - + + Specifies the assembly for which to export a type library. @@ -425,8 +425,8 @@ The assembly for which to export a type library. See the Microsoft.NET Framework SDK documentation for details. - - + + Specifies the name of the type library file to generate. @@ -434,8 +434,8 @@ The name of the type library file to generate. See the Microsoft.NET Framework SDK documentation for details. - - + + Specifies the file used to determine capitalization of names in a type library. @@ -444,16 +444,16 @@ The file used to determine capitalization of names in a type library. See the Microsoft.NET Framework SDK documentation for details. - - + + Gets the command line arguments for the external program. The command line arguments for the external program. - - + + Imports a type library to a .NET assembly (wraps Microsoft's tlbimp.exe). @@ -491,13 +491,13 @@ ]]> - - + + Imports the type library to a .NET assembly. - - + + Returns the path of the type library, removing the identifier of the type library from the specified string. @@ -511,8 +511,8 @@ library (in this case "2") is C:\WINDOWS\system32\msvidctl.dll\2. - - + + Determines whether the type library needs to be imported again. @@ -520,8 +520,8 @@ if the type library needs to be imported; otherwise, . - - + + Specifies the name of the output file. @@ -529,8 +529,8 @@ The name of the output file. See the Microsoft.NET Framework SDK documentation for details. - - + + Specifies the namespace in which to produce the assembly. @@ -538,8 +538,8 @@ The namespace in which to produce the assembly. See the Microsoft.NET Framework SDK documentation for details. - - + + Specifies the version number of the assembly to produce. @@ -554,8 +554,8 @@ See the Microsoft.NET Framework SDK documentation for details. - - + + Specifies whether the resulting assembly should be signed with a strong name using delayed signing. The default is . @@ -565,8 +565,8 @@ with a strong name using delayed signing; otherwise, . See the Microsoft.NET Framework SDK documentation for details. - - + + Specifies whether a primary interop assembly should be produced for the specified type library. The default is . @@ -576,8 +576,8 @@ produced; otherwise, . See the Microsoft.NET Framework SDK documentation for details. - - + + Specifies the file containing the public key to use to sign the resulting assembly. @@ -587,8 +587,8 @@ assembly. See the Microsoft.NET Framework SDK documentation for details. - - + + Specifies the publisher's official public/private key pair with which the resulting assembly should be signed with a strong name. @@ -597,8 +597,8 @@ The keyfile to use to sign the resulting assembly with a strong name. See the Microsoft.NET Framework SDK documentation for details. - - + + Specifies the key container in which the public/private key pair should be found that should be used to sign the resulting assembly @@ -609,8 +609,8 @@ be used to sign the resulting assembly. See the Microsoft.NET Framework SDK documentation for details. - - + + Specifies the assembly files to use to resolve references to types defined outside the current type library. @@ -620,8 +620,8 @@ outside the current type library. See the Microsoft.NET Framework SDK documentation for details. - - + + Specifies whether a type library should not be imported if all references within the current assembly or the reference assemblies @@ -632,25 +632,25 @@ all references cannot be resolved; otherwise, . See the Microsoft.NET Framework SDK documentation for details. - - - - Specifies whether to import a COM style SafeArray as a managed - class type. The default is . - - - if a COM style SafeArray should be imported - as a managed class type; otherwise, - . - - See the Microsoft.NET Framework SDK documentation for details. - - + + + + Specifies whether to import a COM style SafeArray as a managed + class type. The default is . + + + if a COM style SafeArray should be imported + as a managed class type; otherwise, + . + + See the Microsoft.NET Framework SDK documentation for details. + + Specifies how to transform the metadata [.NET 1.1 or higher]. - - + + Specifies the source type library that gets passed to the type library importer. @@ -660,8 +660,8 @@ importer. See the Microsoft.NET Framework SDK documentation for details. - - + + Specifies whether interfaces should be produced without .NET Framework security checks. The default is . @@ -671,20 +671,20 @@ checks should be produced; otherwise, . See the Microsoft.NET Framework SDK documentation for details. - - + + Indicates whether tlbimp supports transforming metadata for a given target framework. The default is . - - + + Gets the command line arguments for the external program. The command line arguments for the external program. - - - + + + diff --git a/tools/nant/NAnt.xml b/tools/nant/NAnt.xml index 64a0575ab7b..05605b625bb 100644 --- a/tools/nant/NAnt.xml +++ b/tools/nant/NAnt.xml @@ -1,23 +1,23 @@ - - - - NAnt - - - - - Stub used to created and launch real ConsoleDriver - class in Core assembly. - - - + + + + NAnt + + + + + Stub used to created and launch real ConsoleDriver + class in Core assembly. + + + Entry point for executable Command Line arguments The result of the real execution - - + + Constructs the privatebinpath. @@ -35,8 +35,8 @@ The privatebinpath. - - + + Given an absolute directory and an absolute file name, returns a relative file name. @@ -46,33 +46,33 @@ A relative file name for the given absolute file name. - - + + Helper class for invoking the application entry point in NAnt.Core and passing the command-line arguments. - - - - Initializes a new instance of the - class with the specified command-line arguments. - - The commandline arguments passed to NAnt.exe. - Directories relative to the base directory of the AppDomain to probe for missing assembly references. - - + + + + Initializes a new instance of the + class with the specified command-line arguments. + + The commandline arguments passed to NAnt.exe. + Directories relative to the base directory of the AppDomain to probe for missing assembly references. + + Invokes the application entry point in NAnt.Core. - - + + Gets the status that the build process returned when it exited. The code that the build process specified when it terminated. - - - + + + diff --git a/tools/nant/extensions/common/2.0/NAnt.MSBuild.xml b/tools/nant/extensions/common/2.0/NAnt.MSBuild.xml index 15b267e95bb..0f179afa170 100644 --- a/tools/nant/extensions/common/2.0/NAnt.MSBuild.xml +++ b/tools/nant/extensions/common/2.0/NAnt.MSBuild.xml @@ -1,36 +1,36 @@ - - - - NAnt.MSBuild - - - - - Functions to return information for MSBuild system. - - - - - - - - Test whether project is VS2005 project and could be built using <msbuild> - - The name or path of the project file (csproj, vbproj, ...). - - True, if it is msbuild project, False otherwise. - - - - - Initialize is guaranteed to be called by MSBuild at the start of the build - before any events are raised. - - - - - Analyses Microsoft Visual Studio .NET 2005 (Whidbey) solution files. - - - - + + + + NAnt.MSBuild + + + + + Functions to return information for MSBuild system. + + + + + + + + Test whether project is VS2005 project and could be built using <msbuild> + + The name or path of the project file (csproj, vbproj, ...). + + True, if it is msbuild project, False otherwise. + + + + + Initialize is guaranteed to be called by MSBuild at the start of the build + before any events are raised. + + + + + Analyses Microsoft Visual Studio .NET 2005 (Whidbey) solution files. + + + + diff --git a/tools/nant/nant.xsd b/tools/nant/nant.xsd index d3780486c7a..2a7782d7e91 100644 --- a/tools/nant/nant.xsd +++ b/tools/nant/nant.xsd @@ -1,2491 +1,2491 @@ - - - - NAnt schema generated at 12/08/2007 13:32:12 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + NAnt schema generated at 12/08/2007 13:32:12 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file